diff --git a/.gitattributes b/.gitattributes index 229c2eaefea..37484ad742a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -74,3 +74,7 @@ javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/auto # Auto-generated modeling for Python python/ql/lib/semmle/python/frameworks/data/internal/subclass-capture/*.yml linguist-generated=true + +# auto-generated bazel lock file +ruby/extractor/cargo-bazel-lock.json linguist-generated=true +ruby/extractor/cargo-bazel-lock.json -merge diff --git a/.github/labeler.yml b/.github/labeler.yml index baa8f5ff05f..9a52f1477ef 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -20,7 +20,7 @@ JS: Kotlin: - java/kotlin-extractor/**/* - - java/ql/test/kotlin/**/* + - java/ql/test-kotlin*/**/* Python: - python/**/* diff --git a/.github/workflows/compile-queries.yml b/.github/workflows/compile-queries.yml index 7176c6c1a50..38452f97d36 100644 --- a/.github/workflows/compile-queries.yml +++ b/.github/workflows/compile-queries.yml @@ -28,7 +28,7 @@ jobs: with: key: all-queries - name: check formatting - run: find */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only + run: find shared */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only - name: compile queries - check-only # run with --check-only if running in a PR (github.sha != main) if : ${{ github.event_name == 'pull_request' }} diff --git a/.github/workflows/ruby-build.yml b/.github/workflows/ruby-build.yml index fda4045cd44..7ef3f499f83 100644 --- a/.github/workflows/ruby-build.yml +++ b/.github/workflows/ruby-build.yml @@ -51,9 +51,11 @@ jobs: run: | brew install gnu-tar echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - - name: Install cargo-cross - if: runner.os == 'Linux' - run: cargo install cross --version 0.2.5 + - name: Prepare Windows + if: runner.os == 'Windows' + shell: powershell + run: | + git config --global core.longpaths true - uses: ./.github/actions/os-version id: os_version - name: Cache entire extractor @@ -82,16 +84,8 @@ jobs: - name: Run tests if: steps.cache-extractor.outputs.cache-hit != 'true' run: cd extractor && cargo test --verbose - # On linux, build the extractor via cross in a centos7 container. - # This ensures we don't depend on glibc > 2.17. - - name: Release build (linux) - if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os == 'Linux' - run: | - cd extractor - cross build --release - mv target/x86_64-unknown-linux-gnu/release/codeql-extractor-ruby target/release/ - - name: Release build (windows and macos) - if: steps.cache-extractor.outputs.cache-hit != 'true' && runner.os != 'Linux' + - name: Release build + if: steps.cache-extractor.outputs.cache-hit != 'true' run: cd extractor && cargo build --release - name: Generate dbscheme if: ${{ matrix.os == 'ubuntu-latest' && steps.cache-extractor.outputs.cache-hit != 'true'}} @@ -123,7 +117,7 @@ jobs: - name: Cache compilation cache id: query-cache uses: ./.github/actions/cache-query-compilation - with: + with: key: ruby-build - name: Build Query Pack run: | @@ -235,54 +229,3 @@ jobs: shell: bash run: | codeql database analyze --search-path "${{ runner.temp }}/ruby-bundle" --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls - - # This is a copy of the 'test' job that runs in a centos7 container. - # This tests that the extractor works correctly on systems with an old glibc. - test-centos7: - defaults: - run: - working-directory: ${{ github.workspace }} - strategy: - fail-fast: false - runs-on: ubuntu-latest - container: - image: centos:centos7 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - needs: [package] - steps: - - name: Install gh cli - run: | - yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo - # fetch-codeql requires unzip and jq - # jq is available in epel-release (https://docs.fedoraproject.org/en-US/epel/) - yum install -y gh unzip epel-release - yum install -y jq - - uses: actions/checkout@v3 - - name: Fetch CodeQL - uses: ./.github/actions/fetch-codeql - - # Due to a bug in Actions, we can't use runner.temp in the run blocks here. - # https://github.com/actions/runner/issues/2185 - - - name: Download Ruby bundle - uses: actions/download-artifact@v3 - with: - name: codeql-ruby-bundle - path: ${{ runner.temp }} - - name: Unzip Ruby bundle - shell: bash - run: unzip -q -d "$RUNNER_TEMP"/ruby-bundle "$RUNNER_TEMP"/codeql-ruby-bundle.zip - - - name: Run QL test - shell: bash - run: | - codeql test run --search-path "$RUNNER_TEMP"/ruby-bundle --additional-packs "$RUNNER_TEMP"/ruby-bundle ruby/ql/test/library-tests/ast/constants/ - - name: Create database - shell: bash - run: | - codeql database create --search-path "$RUNNER_TEMP"/ruby-bundle --language ruby --source-root ruby/ql/test/library-tests/ast/constants/ ../database - - name: Analyze database - shell: bash - run: | - codeql database analyze --search-path "$RUNNER_TEMP"/ruby-bundle --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls diff --git a/.gitignore b/.gitignore index c81e23fc7f8..3d2e92e3ca9 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,9 @@ # local bazel options /local.bazelrc +# generated cmake directory +/.bazel-cmake + # CLion project files /.clwb diff --git a/config/identical-files.json b/config/identical-files.json index a24b5a3a618..ce0e3a67f35 100644 --- a/config/identical-files.json +++ b/config/identical-files.json @@ -88,123 +88,46 @@ "IR Instruction": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Instruction.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll", - "csharp/ql/src/experimental/ir/implementation/raw/Instruction.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Instruction.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll" ], "IR IRBlock": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRBlock.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRBlock.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRBlock.qll", - "csharp/ql/src/experimental/ir/implementation/raw/IRBlock.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRBlock.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRBlock.qll" ], "IR IRVariable": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRVariable.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRVariable.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll", - "csharp/ql/src/experimental/ir/implementation/raw/IRVariable.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRVariable.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll" ], "IR IRFunction": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRFunction.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRFunction.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRFunction.qll", - "csharp/ql/src/experimental/ir/implementation/raw/IRFunction.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRFunction.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRFunction.qll" ], "IR Operand": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Operand.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll", - "csharp/ql/src/experimental/ir/implementation/raw/Operand.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Operand.qll" - ], - "IR IRType": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/IRType.qll", - "csharp/ql/src/experimental/ir/implementation/IRType.qll" - ], - "IR IRConfiguration": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/IRConfiguration.qll", - "csharp/ql/src/experimental/ir/implementation/IRConfiguration.qll" - ], - "IR UseSoundEscapeAnalysis": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/UseSoundEscapeAnalysis.qll", - "csharp/ql/src/experimental/ir/implementation/UseSoundEscapeAnalysis.qll" - ], - "IR IRFunctionBase": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/IRFunctionBase.qll", - "csharp/ql/src/experimental/ir/implementation/internal/IRFunctionBase.qll" - ], - "IR Operand Tag": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/OperandTag.qll", - "csharp/ql/src/experimental/ir/implementation/internal/OperandTag.qll" - ], - "IR TInstruction": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TInstruction.qll", - "csharp/ql/src/experimental/ir/implementation/internal/TInstruction.qll" - ], - "IR TIRVariable": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TIRVariable.qll", - "csharp/ql/src/experimental/ir/implementation/internal/TIRVariable.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll" ], "IR IR": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IR.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IR.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IR.qll", - "csharp/ql/src/experimental/ir/implementation/raw/IR.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IR.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IR.qll" ], "IR IRConsistency": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRConsistency.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRConsistency.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll", - "csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRConsistency.qll" ], "IR PrintIR": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/PrintIR.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll", - "csharp/ql/src/experimental/ir/implementation/raw/PrintIR.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/PrintIR.qll" - ], - "IR IntegerConstant": [ - "cpp/ql/lib/semmle/code/cpp/ir/internal/IntegerConstant.qll", - "csharp/ql/src/experimental/ir/internal/IntegerConstant.qll" - ], - "IR IntegerInteval": [ - "cpp/ql/lib/semmle/code/cpp/ir/internal/IntegerInterval.qll", - "csharp/ql/src/experimental/ir/internal/IntegerInterval.qll" - ], - "IR IntegerPartial": [ - "cpp/ql/lib/semmle/code/cpp/ir/internal/IntegerPartial.qll", - "csharp/ql/src/experimental/ir/internal/IntegerPartial.qll" - ], - "IR Overlap": [ - "cpp/ql/lib/semmle/code/cpp/ir/internal/Overlap.qll", - "csharp/ql/src/experimental/ir/internal/Overlap.qll" - ], - "IR EdgeKind": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/EdgeKind.qll", - "csharp/ql/src/experimental/ir/implementation/EdgeKind.qll" - ], - "IR MemoryAccessKind": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/MemoryAccessKind.qll", - "csharp/ql/src/experimental/ir/implementation/MemoryAccessKind.qll" - ], - "IR TempVariableTag": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/TempVariableTag.qll", - "csharp/ql/src/experimental/ir/implementation/TempVariableTag.qll" - ], - "IR Opcode": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/Opcode.qll", - "csharp/ql/src/experimental/ir/implementation/Opcode.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll" ], "IR SSAConsistency": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConsistency.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConsistency.qll" ], "C++ IR InstructionImports": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/InstructionImports.qll", @@ -252,8 +175,7 @@ ], "SSA AliasAnalysis": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll" ], "SSA PrintAliasAnalysis": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/PrintAliasAnalysis.qll", @@ -268,44 +190,28 @@ "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/internal/ValueNumberingImports.qll" ], - "IR SSA SimpleSSA": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll" - ], - "IR AliasConfiguration (unaliased_ssa)": [ - "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll" - ], "IR SSA SSAConstruction": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll" ], "IR SSA PrintSSA": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/PrintSSA.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/PrintSSA.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintSSA.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/PrintSSA.qll" ], "IR ValueNumberInternal": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/internal/ValueNumberingInternal.qll", - "csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/internal/ValueNumberingInternal.qll" ], "C++ IR ValueNumber": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/ValueNumbering.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll", - "csharp/ql/src/experimental/ir/implementation/raw/gvn/ValueNumbering.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/ValueNumbering.qll" ], "C++ IR PrintValueNumbering": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/gvn/PrintValueNumbering.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll", - "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/PrintValueNumbering.qll", - "csharp/ql/src/experimental/ir/implementation/raw/gvn/PrintValueNumbering.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll" + "cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/gvn/PrintValueNumbering.qll" ], "C++ IR ConstantAnalysis": [ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/constant/ConstantAnalysis.qll", @@ -333,38 +239,6 @@ "cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/reachability/PrintDominance.qll", "cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/reachability/PrintDominance.qll" ], - "C# IR InstructionImports": [ - "csharp/ql/src/experimental/ir/implementation/raw/internal/InstructionImports.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/InstructionImports.qll" - ], - "C# IR IRImports": [ - "csharp/ql/src/experimental/ir/implementation/raw/internal/IRImports.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRImports.qll" - ], - "C# IR IRBlockImports": [ - "csharp/ql/src/experimental/ir/implementation/raw/internal/IRBlockImports.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll" - ], - "C# IR IRFunctionImports": [ - "csharp/ql/src/experimental/ir/implementation/raw/internal/IRFunctionImports.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRFunctionImports.qll" - ], - "C# IR IRVariableImports": [ - "csharp/ql/src/experimental/ir/implementation/raw/internal/IRVariableImports.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRVariableImports.qll" - ], - "C# IR OperandImports": [ - "csharp/ql/src/experimental/ir/implementation/raw/internal/OperandImports.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/OperandImports.qll" - ], - "C# IR PrintIRImports": [ - "csharp/ql/src/experimental/ir/implementation/raw/internal/PrintIRImports.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintIRImports.qll" - ], - "C# IR ValueNumberingImports": [ - "csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingImports.qll", - "csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll" - ], "C# ControlFlowReachability": [ "csharp/ql/lib/semmle/code/csharp/dataflow/internal/ControlFlowReachability.qll", "csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/ControlFlowReachability.qll" @@ -498,4 +372,4 @@ "python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml", "python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml" ] -} \ No newline at end of file +} diff --git a/cpp/autobuilder/Semmle.Autobuild.Cpp/Program.cs b/cpp/autobuilder/Semmle.Autobuild.Cpp/Program.cs index a7556197bcd..5fca6f556fb 100644 --- a/cpp/autobuilder/Semmle.Autobuild.Cpp/Program.cs +++ b/cpp/autobuilder/Semmle.Autobuild.Cpp/Program.cs @@ -1,5 +1,7 @@ using System; + using Semmle.Autobuild.Shared; +using Semmle.Util; namespace Semmle.Autobuild.Cpp { diff --git a/cpp/ql/lib/change-notes/2024-02-26-ir-named-destructors.md b/cpp/ql/lib/change-notes/2024-02-26-ir-named-destructors.md new file mode 100644 index 00000000000..4e35decaf8e --- /dev/null +++ b/cpp/ql/lib/change-notes/2024-02-26-ir-named-destructors.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added destructors for named objects to the intermediate representation. \ No newline at end of file diff --git a/cpp/ql/lib/semmle/code/cpp/Enclosing.qll b/cpp/ql/lib/semmle/code/cpp/Enclosing.qll index d821589a76c..013f5e672be 100644 --- a/cpp/ql/lib/semmle/code/cpp/Enclosing.qll +++ b/cpp/ql/lib/semmle/code/cpp/Enclosing.qll @@ -60,4 +60,6 @@ Element exprEnclosingElement(Expr e) { ) else result = de.getDeclaration() ) + or + result.(Stmt).getAnImplicitDestructorCall() = e } diff --git a/cpp/ql/lib/semmle/code/cpp/controlflow/SubBasicBlocks.qll b/cpp/ql/lib/semmle/code/cpp/controlflow/SubBasicBlocks.qll index 9ee0fa3131b..3d97281daa5 100644 --- a/cpp/ql/lib/semmle/code/cpp/controlflow/SubBasicBlocks.qll +++ b/cpp/ql/lib/semmle/code/cpp/controlflow/SubBasicBlocks.qll @@ -1,6 +1,6 @@ // NOTE: There are two copies of this file, and they must be kept identical: // - semmle/code/cpp/controlflow/SubBasicBlocks.qll -// - semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll +// - semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll [now DEPRECATED] // // The second one is a private copy of the `SubBasicBlocks` library for // internal use by the data flow library. Having an extra copy prevents diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/AddressFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/AddressFlow.qll index f6072763e1a..30029a5c762 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/AddressFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/AddressFlow.qll @@ -1,4 +1,6 @@ /** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + * * Provides a local analysis for identifying where a variable address * is effectively taken. Array-like offsets are allowed to pass through but * not field-like offsets. diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowDispatch.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowDispatch.qll index b8870cefd32..895cc09a048 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowDispatch.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowDispatch.qll @@ -1,3 +1,7 @@ +/** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + */ + private import cpp private import DataFlowPrivate private import DataFlowUtil diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll index f5c51b43e37..115e145bec0 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -1,3 +1,7 @@ +/** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + */ + private import DataFlowImplSpecific private import codeql.dataflow.internal.DataFlowImpl import MakeImpl diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll index 868c3ef6a2b..5d61aac1561 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll @@ -1,3 +1,7 @@ +/** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + */ + private import DataFlowImplSpecific private import codeql.dataflow.internal.DataFlowImplCommon import MakeImplCommon diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll index 229031e0149..8abc7a8760a 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll @@ -1,4 +1,6 @@ /** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + * * Provides consistency queries for checking invariants in the language-specific * data-flow classes and predicates. */ diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplSpecific.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplSpecific.qll index 7fa662bd691..e8686419aac 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplSpecific.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplSpecific.qll @@ -1,4 +1,6 @@ /** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + * * Provides C++-specific definitions for use in the data flow library. */ diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll index 80a1ea28dea..9b111de7a04 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll @@ -1,3 +1,7 @@ +/** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + */ + private import cpp private import DataFlowUtil private import DataFlowDispatch diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll index 10338b18927..83efaf1511f 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll @@ -1,4 +1,6 @@ /** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + * * Provides C++-specific definitions for use in the data flow library. */ diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowVar.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowVar.qll index 6632a4af18c..4385c4e268a 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowVar.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowVar.qll @@ -1,4 +1,6 @@ /** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + * * Provides a class for handling variables in the data flow analysis. */ diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll index 9ee0fa3131b..3d97281daa5 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll @@ -1,6 +1,6 @@ // NOTE: There are two copies of this file, and they must be kept identical: // - semmle/code/cpp/controlflow/SubBasicBlocks.qll -// - semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll +// - semmle/code/cpp/dataflow/internal/SubBasicBlocks.qll [now DEPRECATED] // // The second one is a private copy of the `SubBasicBlocks` library for // internal use by the data flow library. Having an extra copy prevents diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingImplSpecific.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingImplSpecific.qll index 3f917d69802..e1549ea57a3 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingImplSpecific.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingImplSpecific.qll @@ -1,4 +1,6 @@ /** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + * * Provides C++-specific definitions for use in the taint tracking library. */ diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll index 89a8eba2199..4f097fa4bf3 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll @@ -1,4 +1,6 @@ /** + * DEPRECATED: Use `semmle.code.cpp.dataflow.new.DataFlow` instead. + * * Provides classes for performing local (intra-procedural) and * global (inter-procedural) taint-tracking analyses. * diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingParameter.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingParameter.qll index 0d73207dad9..f9346e28434 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingParameter.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingParameter.qll @@ -1,3 +1,7 @@ +/** + * DEPRECATED: Use `Global` and `GlobalWithState` instead. + */ + import semmle.code.cpp.dataflow.internal.TaintTrackingUtil as Public module Private { diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingParameter.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingParameter.qll index fb4862fd06b..e935b8d4d08 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingParameter.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingParameter.qll @@ -1,3 +1,7 @@ +/** + * DEPRECATED: Use `Global` and `GlobalWithState` instead. + */ + import semmle.code.cpp.dataflow.internal.TaintTrackingUtil as Public module Private { diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll index 2a7dfbb8208..b411790596e 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll @@ -34,7 +34,7 @@ private import Node0ToString cached private newtype TIRDataFlowNode = TNode0(Node0Impl node) { DataFlowImplCommon::forceCachingInSameStage() } or - TVariableNode(Variable var, int indirectionIndex) { + TGlobalLikeVariableNode(GlobalLikeVariable var, int indirectionIndex) { indirectionIndex = [getMinIndirectionsForType(var.getUnspecifiedType()) .. Ssa::getMaxIndirectionsForType(var.getUnspecifiedType())] } or @@ -396,7 +396,7 @@ class Node extends TIRDataFlowNode { * modeling flow in and out of global variables. */ Variable asVariable() { - this = TVariableNode(result, getMinIndirectionsForType(result.getUnspecifiedType())) + this = TGlobalLikeVariableNode(result, getMinIndirectionsForType(result.getUnspecifiedType())) } /** @@ -406,7 +406,7 @@ class Node extends TIRDataFlowNode { */ Variable asIndirectVariable(int indirectionIndex) { indirectionIndex > getMinIndirectionsForType(result.getUnspecifiedType()) and - this = TVariableNode(result, indirectionIndex) + this = TGlobalLikeVariableNode(result, indirectionIndex) } /** Gets an indirection of this node's underlying variable, if any. */ @@ -1751,15 +1751,18 @@ class DefinitionByReferenceNode extends IndirectArgumentOutNode { } /** - * A `Node` corresponding to a variable in the program, as opposed to the - * value of that variable at some particular point. This can be used for - * modeling flow in and out of global variables. + * A `Node` corresponding to a global (or `static` local) variable in the + * program, as opposed to the value of that variable at some particular point. + * This is used to model flow through global variables (and `static` local + * variables). + * + * There is no `VariableNode` for non-`static` local variables. */ -class VariableNode extends Node, TVariableNode { +class VariableNode extends Node, TGlobalLikeVariableNode { Variable v; int indirectionIndex; - VariableNode() { this = TVariableNode(v, indirectionIndex) } + VariableNode() { this = TGlobalLikeVariableNode(v, indirectionIndex) } /** Gets the variable corresponding to this node. */ Variable getVariable() { result = v } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll index 69ace9f890e..c036343544c 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll @@ -10,13 +10,12 @@ private import semmle.code.cpp.models.interfaces.FunctionInputsAndOutputs as FIO private import semmle.code.cpp.ir.internal.IRCppLanguage private import semmle.code.cpp.ir.dataflow.internal.ModelUtil private import DataFlowPrivate -private import ssa0.SsaInternals as SsaInternals0 import SsaInternalsCommon private module SourceVariables { cached private newtype TSourceVariable = - TMkSourceVariable(SsaInternals0::SourceVariable base, int ind) { + TMkSourceVariable(BaseSourceVariable base, int ind) { ind = [0 .. countIndirectionsForCppType(base.getLanguageType()) + 1] } @@ -30,7 +29,7 @@ private module SourceVariables { } class SourceVariable extends TSourceVariable { - SsaInternals0::SourceVariable base; + BaseSourceVariable base; int ind; SourceVariable() { this = TMkSourceVariable(base, ind) } @@ -42,7 +41,7 @@ private module SourceVariables { * Gets the base source variable (i.e., the variable without any * indirections) of this source variable. */ - SsaInternals0::SourceVariable getBaseVariable() { result = base } + BaseSourceVariable getBaseVariable() { result = base } /** Gets a textual representation of this element. */ string toString() { result = repeatStars(this.getIndirection()) + base.toString() } @@ -104,17 +103,9 @@ predicate hasRawIndirectInstruction(Instruction instr, int indirectionIndex) { cached private newtype TDefOrUseImpl = + TDefAddressImpl(BaseIRVariable v) or TDefImpl(BaseSourceVariableInstruction base, Operand address, int indirectionIndex) { - isDef(_, _, address, base, _, indirectionIndex) and - ( - // We only include the definition if the SSA pruning stage - // concluded that the definition is live after the write. - any(SsaInternals0::Def def).getAddressOperand() = address - or - // Since the pruning stage doesn't know about global variables we can't use the above check to - // rule out dead assignments to globals. - base.(VariableAddressInstruction).getAstVariable() instanceof GlobalLikeVariable - ) + isDef(_, _, address, base, _, indirectionIndex) } or TUseImpl(BaseSourceVariableInstruction base, Operand operand, int indirectionIndex) { isUse(_, operand, base, _, indirectionIndex) and @@ -133,8 +124,7 @@ private newtype TDefOrUseImpl = TIteratorDef( Operand iteratorDerefAddress, BaseSourceVariableInstruction container, int indirectionIndex ) { - isIteratorDef(container, iteratorDerefAddress, _, _, indirectionIndex) and - any(SsaInternals0::Def def | def.isIteratorDef()).getAddressOperand() = iteratorDerefAddress + isIteratorDef(container, iteratorDerefAddress, _, _, indirectionIndex) } or TIteratorUse( Operand iteratorAddress, BaseSourceVariableInstruction container, int indirectionIndex @@ -267,24 +257,64 @@ private predicate sourceVariableHasBaseAndIndex(SourceVariable v, BaseSourceVari } abstract class DefImpl extends DefOrUseImpl { - Operand address; int ind; bindingset[ind] DefImpl() { any() } - abstract int getIndirection(); - - abstract Node0Impl getValue(); - - abstract predicate isCertain(); - - Operand getAddressOperand() { result = address } - override int getIndirectionIndex() { result = ind } override string toString() { result = "Def of " + this.getSourceVariable() } + abstract int getIndirection(); + + abstract predicate isCertain(); + + abstract Node0Impl getValue(); +} + +/** An initial definition of an `IRVariable`'s address. */ +private class DefAddressImpl extends DefImpl, TDefAddressImpl { + BaseIRVariable v; + + DefAddressImpl() { + this = TDefAddressImpl(v) and + ind = 0 + } + + final override int getIndirection() { result = 0 } + + final override predicate isCertain() { any() } + + final override Node0Impl getValue() { none() } + + final override predicate hasIndexInBlock(IRBlock block, int index) { + block = v.getIRVariable().getEnclosingIRFunction().getEntryBlock() and + index = 0 + } + + override Cpp::Location getLocation() { result = v.getIRVariable().getLocation() } + + final override SourceVariable getSourceVariable() { + result.getBaseVariable() = v and + result.getIndirection() = 0 + } + + final override BaseSourceVariableInstruction getBase() { none() } +} + +/** + * An SSA definition that has an associated `Operand` representing the address + * that is being written to. + */ +abstract private class OperandBasedDef extends DefImpl { + Operand address; + + bindingset[ind] + OperandBasedDef() { any() } + + Operand getAddressOperand() { result = address } + override Cpp::Location getLocation() { result = this.getAddressOperand().getUse().getLocation() } final override predicate hasIndexInBlock(IRBlock block, int index) { @@ -292,7 +322,7 @@ abstract class DefImpl extends DefOrUseImpl { } } -private class DirectDef extends DefImpl, TDefImpl { +private class DirectDef extends OperandBasedDef, TDefImpl { BaseSourceVariableInstruction base; DirectDef() { this = TDefImpl(base, address, ind) } @@ -306,7 +336,7 @@ private class DirectDef extends DefImpl, TDefImpl { override predicate isCertain() { isDef(true, _, address, base, _, ind) } } -private class IteratorDef extends DefImpl, TIteratorDef { +private class IteratorDef extends OperandBasedDef, TIteratorDef { BaseSourceVariableInstruction container; IteratorDef() { this = TIteratorDef(address, container, ind) } @@ -984,17 +1014,6 @@ predicate fromPhiNode(SsaPhiNode nodeFrom, Node nodeTo) { ) } -/** - * Holds if there is a write at index `i` in basic block `bb` to variable `v` that's - * subsequently read (as determined by the SSA pruning stage). - */ -private predicate variableWriteCand(IRBlock bb, int i, SourceVariable v) { - exists(SsaInternals0::Def def, SsaInternals0::SourceVariable v0 | - def.asDefOrUse().hasIndexInBlock(bb, i, v0) and - v0 = v.getBaseVariable() - ) -} - private predicate sourceVariableIsGlobal( SourceVariable sv, GlobalLikeVariable global, IRFunction func, int indirectionIndex ) { @@ -1018,16 +1037,14 @@ private module SsaInput implements SsaImplCommon::InputSig { predicate variableWrite(IRBlock bb, int i, SourceVariable v, boolean certain) { DataFlowImplCommon::forceCachingInSameStage() and ( - variableWriteCand(bb, i, v) or - sourceVariableIsGlobal(v, _, _, _) - ) and - exists(DefImpl def | def.hasIndexInBlock(bb, i, v) | - if def.isCertain() then certain = true else certain = false - ) - or - exists(GlobalDefImpl global | - global.hasIndexInBlock(bb, i, v) and - certain = true + exists(DefImpl def | def.hasIndexInBlock(bb, i, v) | + if def.isCertain() then certain = true else certain = false + ) + or + exists(GlobalDefImpl global | + global.hasIndexInBlock(bb, i, v) and + certain = true + ) ) } @@ -1202,7 +1219,7 @@ class UseOrPhi extends SsaDefOrUse { class Def extends DefOrUse { override DefImpl defOrUse; - Operand getAddressOperand() { result = defOrUse.getAddressOperand() } + Operand getAddressOperand() { result = defOrUse.(OperandBasedDef).getAddressOperand() } Instruction getAddress() { result = this.getAddressOperand().getDef() } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ssa0/SsaInternals.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ssa0/SsaInternals.qll deleted file mode 100644 index ce53005470d..00000000000 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ssa0/SsaInternals.qll +++ /dev/null @@ -1,347 +0,0 @@ -/** - * This module defines an initial SSA pruning stage that doesn't take - * indirections into account. - */ - -private import codeql.ssa.Ssa as SsaImplCommon -private import semmle.code.cpp.ir.IR -private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon -private import semmle.code.cpp.models.interfaces.Allocation as Alloc -private import semmle.code.cpp.models.interfaces.DataFlow as DataFlow -private import semmle.code.cpp.ir.implementation.raw.internal.SideEffects as SideEffects -private import semmle.code.cpp.ir.internal.IRCppLanguage -private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate -private import semmle.code.cpp.ir.dataflow.internal.DataFlowUtil -private import semmle.code.cpp.ir.dataflow.internal.SsaInternalsCommon - -private module SourceVariables { - class SourceVariable extends BaseSourceVariable { - /** - * Gets the base source variable of this `SourceVariable`. - */ - BaseSourceVariable getBaseVariable() { result = this } - } -} - -import SourceVariables - -private newtype TDefOrUseImpl = - TDefImpl(Operand address) { isDef(_, _, address, _, _, _) } or - TUseImpl(Operand operand) { - isUse(_, operand, _, _, _) and - not isDef(true, _, operand, _, _, _) - } or - TIteratorDef(BaseSourceVariableInstruction container, Operand iteratorAddress) { - isIteratorDef(container, iteratorAddress, _, _, _) - } or - TIteratorUse(BaseSourceVariableInstruction container, Operand iteratorAddress) { - isIteratorUse(container, iteratorAddress, _, _) - } or - TFinalParameterUse(Parameter p) { - any(Indirection indirection).getType() = p.getUnspecifiedType() - } - -abstract private class DefOrUseImpl extends TDefOrUseImpl { - /** Gets a textual representation of this element. */ - abstract string toString(); - - /** Gets the block of this definition or use. */ - final IRBlock getBlock() { this.hasIndexInBlock(result, _) } - - /** Holds if this definition or use has index `index` in block `block`. */ - abstract predicate hasIndexInBlock(IRBlock block, int index); - - final predicate hasIndexInBlock(IRBlock block, int index, SourceVariable sv) { - this.hasIndexInBlock(block, index) and - sv = this.getSourceVariable() - } - - /** Gets the location of this element. */ - abstract Cpp::Location getLocation(); - - abstract BaseSourceVariableInstruction getBase(); - - final BaseSourceVariable getBaseSourceVariable() { - result = this.getBase().getBaseSourceVariable() - } - - /** Gets the variable that is defined or used. */ - final SourceVariable getSourceVariable() { - result.getBaseVariable() = this.getBaseSourceVariable() - } - - abstract predicate isCertain(); -} - -abstract class DefImpl extends DefOrUseImpl { - Operand address; - - Operand getAddressOperand() { result = address } - - abstract Node0Impl getValue(); - - override string toString() { result = address.toString() } - - override Cpp::Location getLocation() { result = this.getAddressOperand().getLocation() } - - final override predicate hasIndexInBlock(IRBlock block, int index) { - this.getAddressOperand().getUse() = block.getInstruction(index) - } -} - -private class DirectDef extends DefImpl, TDefImpl { - DirectDef() { this = TDefImpl(address) } - - override BaseSourceVariableInstruction getBase() { isDef(_, _, address, result, _, _) } - - override Node0Impl getValue() { isDef(_, result, address, _, _, _) } - - override predicate isCertain() { isDef(true, _, address, _, _, _) } -} - -private class IteratorDef extends DefImpl, TIteratorDef { - BaseSourceVariableInstruction container; - - IteratorDef() { this = TIteratorDef(container, address) } - - override BaseSourceVariableInstruction getBase() { result = container } - - override Node0Impl getValue() { isIteratorDef(_, address, result, _, _) } - - override predicate isCertain() { none() } -} - -abstract class UseImpl extends DefOrUseImpl { } - -abstract private class OperandBasedUse extends UseImpl { - Operand operand; - - override string toString() { result = operand.toString() } - - final override predicate hasIndexInBlock(IRBlock block, int index) { - // Ideally, this would just be implemented as: - // ``` - // operand.getUse() = block.getInstruction(index) - // ``` - // but because the IR generated for a snippet such as - // ``` - // int x = *p++; - // ``` - // looks like - // ``` - // r1(glval) = VariableAddress[x] : - // r2(glval) = VariableAddress[p] : - // r3(int *) = Load[p] : &:r2, m1 - // r4(int) = Constant[1] : - // r5(int *) = PointerAdd[4] : r3, r4 - // m3(int *) = Store[p] : &:r2, r5 - // r6(int *) = CopyValue : r3 - // r7(int) = Load[?] : &:r6, ~m2 - // m2(int) = Store[x] : &:r1, r7 - // ``` - // we need to ensure that the `r3` operand of the `CopyValue` instruction isn't seen as a fresh use - // of `p` that happens after the increment. So if the base instruction of this use comes from a - // post-fix crement operation we set the index of the SSA use that wraps the `r3` operand at the - // `CopyValue` instruction to be the same index as the `r3` operand at the `PointerAdd` instruction. - // This ensures that the SSA library doesn't create flow from the `PointerAdd` to `r6`. - exists(BaseSourceVariableInstruction base | base = this.getBase() | - if base.getAst() = any(Cpp::PostfixCrementOperation c).getOperand() - then - exists(Operand op | - op = - min(Operand cand, int i | - isUse(_, cand, base, _, _) and - block.getInstruction(i) = cand.getUse() - | - cand order by i - ) and - block.getInstruction(index) = op.getUse() - ) - else operand.getUse() = block.getInstruction(index) - ) - } - - final override Cpp::Location getLocation() { result = operand.getLocation() } -} - -private class DirectUse extends OperandBasedUse, TUseImpl { - DirectUse() { this = TUseImpl(operand) } - - override BaseSourceVariableInstruction getBase() { isUse(_, operand, result, _, _) } - - override predicate isCertain() { isUse(true, operand, _, _, _) } -} - -private class IteratorUse extends OperandBasedUse, TIteratorUse { - BaseSourceVariableInstruction container; - - IteratorUse() { this = TIteratorUse(container, operand) } - - override BaseSourceVariableInstruction getBase() { result = container } - - override predicate isCertain() { none() } -} - -private class FinalParameterUse extends UseImpl, TFinalParameterUse { - Parameter p; - - FinalParameterUse() { this = TFinalParameterUse(p) } - - override string toString() { result = p.toString() } - - final override predicate hasIndexInBlock(IRBlock block, int index) { - // Ideally, this should always be a `ReturnInstruction`, but if - // someone forgets to write a `return` statement in a function - // with a non-void return type we generate an `UnreachedInstruction`. - // In this case we still want to generate flow out of such functions - // if they write to a parameter. So we pick the index of the - // `UnreachedInstruction` as the index of this use. - // Note that a function may have both a `ReturnInstruction` and an - // `UnreachedInstruction`. If that's the case this predicate will - // return multiple results. I don't think this is detrimental to - // performance, however. - exists(Instruction return | - return instanceof ReturnInstruction or - return instanceof UnreachedInstruction - | - block.getInstruction(index) = return and - return.getEnclosingFunction() = p.getFunction() - ) - } - - final override Cpp::Location getLocation() { - // Parameters can have multiple locations. When there's a unique location we use - // that one, but if multiple locations exist we default to an unknown location. - result = unique( | | p.getLocation()) - or - not exists(unique( | | p.getLocation())) and - result instanceof UnknownDefaultLocation - } - - override BaseSourceVariableInstruction getBase() { - exists(InitializeParameterInstruction init | - init.getParameter() = p and - // This is always a `VariableAddressInstruction` - result = init.getAnOperand().getDef() - ) - } - - override predicate isCertain() { any() } -} - -private module SsaInput implements SsaImplCommon::InputSig { - import InputSigCommon - import SourceVariables - - /** - * Holds if the `i`'th write in block `bb` writes to the variable `v`. - * `certain` is `true` if the write is guaranteed to overwrite the entire variable. - */ - predicate variableWrite(IRBlock bb, int i, SourceVariable v, boolean certain) { - DataFlowImplCommon::forceCachingInSameStage() and - exists(DefImpl def | def.hasIndexInBlock(bb, i, v) | - if def.isCertain() then certain = true else certain = false - ) - } - - /** - * Holds if the `i`'th read in block `bb` reads to the variable `v`. - * `certain` is `true` if the read is guaranteed. - */ - predicate variableRead(IRBlock bb, int i, SourceVariable v, boolean certain) { - exists(UseImpl use | use.hasIndexInBlock(bb, i, v) | - if use.isCertain() then certain = true else certain = false - ) - } -} - -private newtype TSsaDefOrUse = - TDefOrUse(DefOrUseImpl defOrUse) { - defOrUse instanceof UseImpl - or - // If `defOrUse` is a definition we only include it if the - // SSA library concludes that it's live after the write. - exists(DefinitionExt def, SourceVariable sv, IRBlock bb, int i | - def.definesAt(sv, bb, i, _) and - defOrUse.(DefImpl).hasIndexInBlock(bb, i, sv) - ) - } or - TPhi(PhiNode phi) - -abstract private class SsaDefOrUse extends TSsaDefOrUse { - string toString() { result = "SsaDefOrUse" } - - DefOrUseImpl asDefOrUse() { none() } - - PhiNode asPhi() { none() } - - abstract Location getLocation(); -} - -class DefOrUse extends TDefOrUse, SsaDefOrUse { - DefOrUseImpl defOrUse; - - DefOrUse() { this = TDefOrUse(defOrUse) } - - final override DefOrUseImpl asDefOrUse() { result = defOrUse } - - final override Location getLocation() { result = defOrUse.getLocation() } - - final SourceVariable getSourceVariable() { result = defOrUse.getSourceVariable() } -} - -class Phi extends TPhi, SsaDefOrUse { - PhiNode phi; - - Phi() { this = TPhi(phi) } - - final override PhiNode asPhi() { result = phi } - - final override Location getLocation() { result = phi.getBasicBlock().getLocation() } -} - -class UseOrPhi extends SsaDefOrUse { - UseOrPhi() { - this.asDefOrUse() instanceof UseImpl - or - this instanceof Phi - } - - final override Location getLocation() { - result = this.asDefOrUse().getLocation() or result = this.(Phi).getLocation() - } - - override string toString() { - result = this.asDefOrUse().toString() - or - this instanceof Phi and - result = "Phi" - } -} - -class Def extends DefOrUse { - override DefImpl defOrUse; - - Operand getAddressOperand() { result = defOrUse.getAddressOperand() } - - Instruction getAddress() { result = this.getAddressOperand().getDef() } - - Node0Impl getValue() { result = defOrUse.getValue() } - - override string toString() { result = this.asDefOrUse().toString() } - - BaseSourceVariableInstruction getBase() { result = defOrUse.getBase() } - - predicate isIteratorDef() { defOrUse instanceof IteratorDef } -} - -private module SsaImpl = SsaImplCommon::Make; - -class PhiNode extends SsaImpl::DefinitionExt { - PhiNode() { - this instanceof SsaImpl::PhiNode or - this instanceof SsaImpl::PhiReadNode - } -} - -class DefinitionExt = SsaImpl::DefinitionExt; diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll index 07764ef7aa4..96a01954d17 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll @@ -11,6 +11,7 @@ private import InstructionTag private import TranslatedCondition private import TranslatedElement private import TranslatedExpr +private import TranslatedCall private import TranslatedStmt private import TranslatedFunction private import TranslatedGlobalVar diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/InstructionTag.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/InstructionTag.qll index b3ac43e2873..f9315a36bcf 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/InstructionTag.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/InstructionTag.qll @@ -85,10 +85,14 @@ newtype TInstructionTag = // The next three cases handle generation of branching for __except handling. TryExceptCompareNegativeOneBranch() or TryExceptCompareZeroBranch() or - TryExceptCompareOneBranch() + TryExceptCompareOneBranch() or + ImplicitDestructorTag(int index) { + exists(Expr e | exists(e.getImplicitDestructorCall(index))) or + exists(Stmt s | exists(s.getImplicitDestructorCall(index))) + } class InstructionTag extends TInstructionTag { - final string toString() { result = "Tag" } + final string toString() { result = getInstructionTagId(this) } } /** @@ -255,4 +259,8 @@ string getInstructionTagId(TInstructionTag tag) { tag = TryExceptCompareZeroBranch() and result = "TryExceptCompareZeroBranch" or tag = TryExceptCompareOneBranch() and result = "TryExceptCompareOneBranch" + or + exists(int index | + tag = ImplicitDestructorTag(index) and result = "ImplicitDestructor(" + index + ")" + ) } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll index ffa26d180c3..7e3dc3cd9e2 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll @@ -27,7 +27,7 @@ private CallInstruction getTranslatedCallInstruction(Call call) { * of a higher-level constructor (e.g. the allocator call in a `NewExpr`). */ abstract class TranslatedCall extends TranslatedExpr { - final override TranslatedElement getChild(int id) { + final override TranslatedElement getChildInternal(int id) { // We choose the child's id in the order of evaluation. // The qualifier is evaluated before the call target, because the value of // the call target may depend on the value of the qualifier for virtual @@ -47,13 +47,19 @@ abstract class TranslatedCall extends TranslatedExpr { else result = this.getFirstCallTargetInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getSideEffects().getALastInstruction() + } + + override TranslatedElement getLastChild() { result = this.getSideEffects() } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = CallTag() and opcode instanceof Opcode::Call and resultType = getTypeForPRValue(this.getCallResultType()) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getQualifier() and result = this.getFirstCallTargetInstruction(kind) or @@ -87,7 +93,7 @@ abstract class TranslatedCall extends TranslatedExpr { ) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = CallTag() and result = this.getSideEffects().getFirstInstruction(kind) } @@ -225,7 +231,7 @@ abstract class TranslatedSideEffects extends TranslatedElement { ) } - final override Instruction getChildSuccessor(TranslatedElement te, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement te, EdgeKind kind) { exists(int i | this.getChild(i) = te and if exists(this.getChild(i + 1)) @@ -234,6 +240,10 @@ abstract class TranslatedSideEffects extends TranslatedElement { ) } + override TranslatedElement getLastChild() { + result = this.getChild(max(int i | exists(this.getChild(i)))) + } + final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType type) { none() } @@ -246,7 +256,18 @@ abstract class TranslatedSideEffects extends TranslatedElement { result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getALastInstructionInternal() { + if exists(this.getAChild()) + then result = this.getChild(max(int i | exists(this.getChild(i)))).getALastInstruction() + else + // If there are no side effects, the "last" instruction should be the parent call's last + // instruction, so that implicit destructors can be inserted in the right place. + result = this.getParent().getInstruction(CallTag()) + } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + none() + } /** Gets the primary instruction to be associated with each side effect instruction. */ abstract Instruction getPrimaryInstruction(); @@ -273,8 +294,8 @@ abstract class TranslatedDirectCall extends TranslatedCall { resultType = getFunctionGLValueType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - result = TranslatedCall.super.getInstructionSuccessor(tag, kind) + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + result = TranslatedCall.super.getInstructionSuccessorInternal(tag, kind) or tag = CallTargetTag() and result = this.getFirstArgumentOrCallInstruction(kind) @@ -367,6 +388,16 @@ class TranslatedStructorCall extends TranslatedFunctionCall { context = this.getParent() and result = context.getReceiver() ) + or + exists(Stmt parent | + expr = parent.getAnImplicitDestructorCall() and + result = getTranslatedExpr(expr.getQualifier().getFullyConverted()).getResult() + ) + or + exists(Expr parent | + expr = parent.getAnImplicitDestructorCall() and + result = getTranslatedExpr(expr.getQualifier().getFullyConverted()).getResult() + ) } override predicate hasQualifier() { any() } @@ -416,19 +447,25 @@ private int initializeAllocationGroup() { result = 3 } abstract class TranslatedSideEffect extends TranslatedElement { final override TranslatedElement getChild(int n) { none() } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + none() + } final override Instruction getFirstInstruction(EdgeKind kind) { result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType type) { tag = OnlyInstructionTag() and this.sideEffectInstruction(opcode, type) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { result = this.getParent().getChildSuccessor(this, kind) and tag = OnlyInstructionTag() } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCondition.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCondition.qll index 333e87ca214..77864969068 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCondition.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCondition.qll @@ -50,19 +50,29 @@ abstract class TranslatedFlexibleCondition extends TranslatedCondition, Conditio { TranslatedFlexibleCondition() { this = TTranslatedFlexibleCondition(expr) } + final override predicate handlesDestructorsExplicitly() { none() } // TODO: this needs to be revisted when we get unnamed destructors + final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } final override Instruction getFirstInstruction(EdgeKind kind) { result = this.getOperand().getFirstInstruction(kind) } + final override Instruction getALastInstructionInternal() { + result = this.getOperand().getALastInstruction() + } + final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + none() + } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + none() + } abstract TranslatedCondition getOperand(); } @@ -88,12 +98,16 @@ class TranslatedParenthesisCondition extends TranslatedFlexibleCondition { abstract class TranslatedNativeCondition extends TranslatedCondition, TTranslatedNativeCondition { TranslatedNativeCondition() { this = TTranslatedNativeCondition(expr) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + none() + } } abstract class TranslatedBinaryLogicalOperation extends TranslatedNativeCondition, ConditionContext { override BinaryLogicalOperation expr; + final override predicate handlesDestructorsExplicitly() { none() } // TODO: this needs to be revisted when we get unnamed destructors + final override TranslatedElement getChild(int id) { id = 0 and result = this.getLeftOperand() or @@ -104,11 +118,19 @@ abstract class TranslatedBinaryLogicalOperation extends TranslatedNativeConditio result = this.getLeftOperand().getFirstInstruction(kind) } + final override Instruction getALastInstructionInternal() { + result = this.getLeftOperand().getALastInstruction() + or + result = this.getRightOperand().getALastInstruction() + } + final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + none() + } final TranslatedCondition getLeftOperand() { result = getTranslatedCondition(expr.getLeftOperand().getFullyConverted()) @@ -162,19 +184,25 @@ class TranslatedValueCondition extends TranslatedCondition, TTranslatedValueCond result = this.getValueExpr().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(ValueConditionConditionalBranchTag()) + } + + final override predicate handlesDestructorsExplicitly() { none() } // TODO: this needs to be revisted when we get unnamed destructors + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = ValueConditionConditionalBranchTag() and opcode instanceof Opcode::ConditionalBranch and resultType = getVoidType() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getValueExpr() and result = this.getInstruction(ValueConditionConditionalBranchTag()) and kind instanceof GotoEdge } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = ValueConditionConditionalBranchTag() and ( kind instanceof TrueEdge and diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedDeclarationEntry.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedDeclarationEntry.qll index 61095072d5e..55b5aa179f4 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedDeclarationEntry.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedDeclarationEntry.qll @@ -60,6 +60,10 @@ abstract class TranslatedLocalVariableDeclaration extends TranslatedVariableInit */ abstract LocalVariable getVariable(); + final override TranslatedElement getChild(int id) { + result = TranslatedVariableInitialization.super.getChildInternal(id) + } + final override Type getTargetType() { result = getVariableType(this.getVariable()) } final override TranslatedInitialization getInitialization() { @@ -152,7 +156,13 @@ class TranslatedStaticLocalVariableDeclarationEntry extends TranslatedDeclaratio kind instanceof GotoEdge } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getALastInstructionInternal() { + result = this.getInstruction(DynamicInitializationConditionalBranchTag()) + or + result = this.getInstruction(DynamicInitializationFlagStoreTag()) + } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = DynamicInitializationFlagAddressTag() and kind instanceof GotoEdge and result = this.getInstruction(DynamicInitializationFlagLoadTag()) @@ -178,7 +188,7 @@ class TranslatedStaticLocalVariableDeclarationEntry extends TranslatedDeclaratio result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getInstruction(DynamicInitializationFlagConstantTag()) and kind instanceof GotoEdge diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll index c83aea863e0..a9d4b6e1095 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll @@ -20,10 +20,14 @@ private import SideEffects * they were explicit nodes in the expression tree, rather than as implicit * nodes as in the regular AST representation. */ -private Element getRealParent(Expr expr) { +Element getRealParent(Expr expr) { result = expr.getParentWithConversions() or result.(Destructor).getADestruction() = expr + or + result.(Expr).getAnImplicitDestructorCall() = expr + or + result.(Stmt).getAnImplicitDestructorCall() = expr } IRUserVariable getIRUserVariable(Declaration decl, Variable var) { @@ -92,6 +96,9 @@ private predicate ignoreExprAndDescendants(Expr expr) { exists(BuiltInVarArgsStart vaStartExpr | vaStartExpr.getLastNamedParameter().getFullyConverted() = expr ) + or + // suppress destructors of temporary variables until proper support is added for them. + exists(Expr parent | parent.getAnImplicitDestructorCall() = expr) } /** @@ -105,12 +112,6 @@ private predicate ignoreExprOnly(Expr expr) { newExpr.getAllocatorCall() = expr ) or - exists(DeleteOrDeleteArrayExpr deleteExpr | - // Ignore the destructor call as we don't model it yet. Don't ignore - // its arguments, though, as they are the arguments to the deallocator. - deleteExpr.getDestructorCall() = expr - ) - or // The extractor deliberately emits an `ErrorExpr` as the first argument to // the allocator call, if any, of a `NewOrNewArrayExpr`. That `ErrorExpr` // should not be translated. @@ -118,6 +119,11 @@ private predicate ignoreExprOnly(Expr expr) { or not translateFunction(getEnclosingFunction(expr)) and not Raw::varHasIRFunc(getEnclosingVariable(expr)) + or + exists(DeleteOrDeleteArrayExpr deleteExpr | + // Ignore the destructor call, because the duplicated qualifier breaks control flow. + deleteExpr.getDestructorCall() = expr + ) } /** @@ -608,16 +614,27 @@ newtype TTranslatedElement = TTranslatedInitialization(Expr expr) { not ignoreExpr(expr) and ( - exists(Initializer init | init.getExpr().getFullyConverted() = expr) or - exists(ClassAggregateLiteral initList | initList.getAFieldExpr(_).getFullyConverted() = expr) or + exists(Initializer init | init.getExpr().getFullyConverted() = expr) + or + exists(ClassAggregateLiteral initList | initList.getAFieldExpr(_).getFullyConverted() = expr) + or exists(ArrayOrVectorAggregateLiteral initList | initList.getAnElementExpr(_).getFullyConverted() = expr - ) or - exists(ReturnStmt returnStmt | returnStmt.getExpr().getFullyConverted() = expr) or - exists(ConstructorFieldInit fieldInit | fieldInit.getExpr().getFullyConverted() = expr) or - exists(NewExpr newExpr | newExpr.getInitializer().getFullyConverted() = expr) or - exists(ThrowExpr throw | throw.getExpr().getFullyConverted() = expr) or - exists(TemporaryObjectExpr temp | temp.getExpr() = expr) or + ) + or + exists(ReturnStmt returnStmt | + returnStmt.getExpr().getFullyConverted() = expr and + hasReturnValue(returnStmt.getEnclosingFunction()) + ) + or + exists(ConstructorFieldInit fieldInit | fieldInit.getExpr().getFullyConverted() = expr) + or + exists(NewExpr newExpr | newExpr.getInitializer().getFullyConverted() = expr) + or + exists(ThrowExpr throw | throw.getExpr().getFullyConverted() = expr) + or + exists(TemporaryObjectExpr temp | temp.getExpr() = expr) + or exists(LambdaExpression lambda | lambda.getInitializer().getFullyConverted() = expr) ) } or @@ -730,9 +747,13 @@ newtype TTranslatedElement = // The declaration/initialization part of a `ConditionDeclExpr` TTranslatedConditionDecl(ConditionDeclExpr expr) { not ignoreExpr(expr) } or // The side effects of a `Call` - TTranslatedCallSideEffects(CallOrAllocationExpr expr) { not ignoreSideEffects(expr) } or + TTranslatedCallSideEffects(CallOrAllocationExpr expr) { + not ignoreExpr(expr) and + not ignoreSideEffects(expr) + } or // The non-argument-specific side effect of a `Call` TTranslatedCallSideEffect(Expr expr, SideEffectOpcode opcode) { + not ignoreExpr(expr) and not ignoreSideEffects(expr) and opcode = getCallSideEffectOpcode(expr) } or @@ -750,9 +771,8 @@ newtype TTranslatedElement = // Constructor calls lack a qualifier (`this`) expression, so we need to handle the side effects // on `*this` without an `Expr`. TTranslatedStructorQualifierSideEffect(Call call, SideEffectOpcode opcode) { + not ignoreExpr(call) and not ignoreSideEffects(call) and - // Don't bother with destructor calls for now, since we won't see very many of them in the IR - // until we start injecting implicit destructor calls. call instanceof ConstructorCall and opcode = getASideEffectOpcode(call, -1) } or @@ -866,6 +886,23 @@ abstract class TranslatedElement extends TTranslatedElement { 1 + sum(TranslatedElement child | child = this.getChildByRank(_) | child.getDescendantCount()) } + /** + * Holds if this element has implicit destructor calls that should follow it. + */ + predicate hasAnImplicitDestructorCall() { none() } + + /** + * Gets the child index of the first destructor call that should be executed after this `TranslatedElement` + */ + int getFirstDestructorCallIndex() { none() } + + /** + * Holds if this `TranslatedElement` includes any destructor calls that must be performed after + * it in its `getChildSuccessorInternal`, `getInstructionSuccessorInternal`, and + * `getALastInstructionInternal` relations, rather than needing them inserted. + */ + predicate handlesDestructorsExplicitly() { none() } + private int getUniqueId() { if not exists(this.getParent()) then result = 0 @@ -901,15 +938,81 @@ abstract class TranslatedElement extends TTranslatedElement { /** * Gets the successor instruction of the instruction that was generated by * this element for tag `tag`. The successor edge kind is specified by `kind`. + * This predicate does not usually include destructors, which are inserted as + * part of `getInstructionSuccessor` unless `handlesDestructorsExplicitly` + * holds. */ - abstract Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind); + abstract Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind); + + /** + * Gets the successor instruction of the instruction that was generated by + * this element for tag `tag`. The successor edge kind is specified by `kind`. + */ + final Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + if + this.hasAnImplicitDestructorCall() and + this.getInstruction(tag) = this.getALastInstructionInternal() and + not this.handlesDestructorsExplicitly() + then + result = this.getChild(this.getFirstDestructorCallIndex()).getFirstInstruction(kind) and + kind instanceof GotoEdge + else result = this.getInstructionSuccessorInternal(tag, kind) + } + + /** + * Gets an instruction within this `TranslatedElement` (including its transitive children) which + * will be followed by an instruction outside the `TranslatedElement`. + */ + final Instruction getALastInstruction() { + if this.hasAnImplicitDestructorCall() and not this.handlesDestructorsExplicitly() + then result = this.getChild(max(int n | exists(this.getChild(n)))).getALastInstruction() // last destructor + else result = this.getALastInstructionInternal() + } + + /** + * Gets an instruction within this `TranslatedElement` (including its transitive children) which + * will be followed by an instruction outside the `TranslatedElement`. + * This predicate does not usually include destructors, which are inserted as + * part of `getALastInstruction` unless `handlesDestructorsExplicitly` holds. + */ + abstract Instruction getALastInstructionInternal(); + + TranslatedElement getLastChild() { none() } + + /** + * Gets the successor instruction to which control should flow after the + * child element specified by `child` has finished execution. The successor + * edge kind is specified by `kind`. + * This predicate does not usually include destructors, which are inserted as + * part of `getChildSuccessor` unless `handlesDestructorsExplicitly` holds. + */ + Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } /** * Gets the successor instruction to which control should flow after the * child element specified by `child` has finished execution. The successor * edge kind is specified by `kind`. */ - abstract Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind); + final Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + ( + if + // this is the last child and we need to handle destructors for it + this.hasAnImplicitDestructorCall() and + not this.handlesDestructorsExplicitly() and + child = this.getLastChild() + then result = this.getChild(this.getFirstDestructorCallIndex()).getFirstInstruction(kind) + else result = this.getChildSuccessorInternal(child, kind) + ) + or + not this.handlesDestructorsExplicitly() and + exists(int id | + id >= this.getFirstDestructorCallIndex() and + child = this.getChild(id) and + if id = max(int n | exists(this.getChild(n))) + then result = this.getParent().getChildSuccessor(this, kind) + else result = this.getChild(id + 1).getFirstInstruction(kind) + ) + } /** * Gets the instruction to which control should flow if an exception is thrown diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll index 4bf21a43f63..51111c24572 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll @@ -14,6 +14,7 @@ private import TranslatedFunction private import TranslatedInitialization private import TranslatedStmt private import TranslatedGlobalVar +private import IRConstruction import TranslatedCall /** @@ -75,6 +76,27 @@ abstract class TranslatedExpr extends TranslatedElement { expr.isGLValueCategory() } + /** + * Gets the immediate child element of this element. The `id` is unique + * among all children of this element, but the values are not necessarily + * consecutive. + * + * This predicate does not usually include destructors, which are inserted as + * part of `getChild` unless `handlesDestructorsExplicitly` + * holds. + */ + abstract TranslatedElement getChildInternal(int id); + + final override TranslatedElement getChild(int id) { + result = this.getChildInternal(id) + or + exists(int maxChildId, int destructorIndex | + maxChildId = max(int childId | exists(this.getChildInternal(childId))) and + result.(TranslatedExpr).getExpr() = expr.getImplicitDestructorCall(destructorIndex) and + id = maxChildId + 1 + destructorIndex + ) + } + final override Locatable getAst() { result = expr } final override Declaration getFunction() { result = getEnclosingDeclaration(expr) } @@ -178,12 +200,16 @@ class TranslatedConditionValue extends TranslatedCoreExpr, ConditionContext, { TranslatedConditionValue() { this = TTranslatedConditionValue(expr) } - override TranslatedElement getChild(int id) { id = 0 and result = this.getCondition() } + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getCondition() } override Instruction getFirstInstruction(EdgeKind kind) { result = this.getCondition().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(ConditionValueResultLoadTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { ( tag = ConditionValueTrueTempAddressTag() or @@ -212,7 +238,7 @@ class TranslatedConditionValue extends TranslatedCoreExpr, ConditionContext, resultType = this.getResultType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and ( tag = ConditionValueTrueTempAddressTag() and @@ -289,7 +315,7 @@ class TranslatedConditionValue extends TranslatedCoreExpr, ConditionContext, override Instruction getResult() { result = this.getInstruction(ConditionValueResultLoadTag()) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } override Instruction getChildTrueSuccessor(TranslatedCondition child, EdgeKind kind) { child = this.getCondition() and @@ -318,7 +344,9 @@ abstract class TranslatedValueCategoryAdjustment extends TranslatedExpr { result = this.getOperand().getFirstInstruction(kind) } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } + final override TranslatedElement getChildInternal(int id) { + id = 0 and result = this.getOperand() + } final override predicate producesExprResult() { // A temp object always produces the result of the expression. @@ -345,17 +373,19 @@ class TranslatedLoad extends TranslatedValueCategoryAdjustment, TTranslatedLoad override predicate isResultGLValue() { none() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = LoadTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getOperand() and result = this.getInstruction(LoadTag()) and kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { result = this.getInstruction(LoadTag()) } + override Instruction getResult() { result = this.getInstruction(LoadTag()) } override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) { @@ -393,7 +423,7 @@ class TranslatedSyntheticTemporaryObject extends TranslatedValueCategoryAdjustme override predicate isResultGLValue() { any() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = InitializerVariableAddressTag() and result = this.getInstruction(InitializerStoreTag()) and kind instanceof GotoEdge @@ -402,7 +432,11 @@ class TranslatedSyntheticTemporaryObject extends TranslatedValueCategoryAdjustme result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getInstruction(InitializerStoreTag()) + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getOperand() and result = this.getInstruction(InitializerVariableAddressTag()) and kind instanceof GotoEdge @@ -446,7 +480,7 @@ class TranslatedResultCopy extends TranslatedExpr, TTranslatedResultCopy { result = this.getOperand().getFirstInstruction(kind) } - override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getOperand() } override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = ResultCopyTag() and @@ -454,12 +488,16 @@ class TranslatedResultCopy extends TranslatedExpr, TTranslatedResultCopy { resultType = this.getOperand().getResultType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = ResultCopyTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getInstruction(ResultCopyTag()) + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getOperand() and result = this.getInstruction(ResultCopyTag()) and kind instanceof GotoEdge @@ -485,17 +523,23 @@ class TranslatedCommaExpr extends TranslatedNonConstantExpr { result = this.getLeftOperand().getFirstInstruction(kind) } - override TranslatedElement getChild(int id) { + override Instruction getALastInstructionInternal() { + result = this.getRightOperand().getALastInstruction() + } + + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getLeftOperand() or id = 1 and result = this.getRightOperand() } + override TranslatedElement getLastChild() { result = this.getRightOperand() } + override Instruction getResult() { result = this.getRightOperand().getResult() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getLeftOperand() and result = this.getRightOperand().getFirstInstruction(kind) or @@ -526,7 +570,9 @@ private int getElementSize(Type type) { abstract class TranslatedCrementOperation extends TranslatedNonConstantExpr { override CrementOperation expr; - final override TranslatedElement getChild(int id) { id = 0 and result = this.getLoadedOperand() } + final override TranslatedElement getChildInternal(int id) { + id = 0 and result = this.getLoadedOperand() + } final override string getInstructionConstantValue(InstructionTag tag) { tag = CrementConstantTag() and @@ -592,7 +638,11 @@ abstract class TranslatedCrementOperation extends TranslatedNonConstantExpr { result = this.getLoadedOperand().getFirstInstruction(kind) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getInstruction(CrementStoreTag()) + } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and ( tag = CrementConstantTag() and @@ -606,7 +656,7 @@ abstract class TranslatedCrementOperation extends TranslatedNonConstantExpr { result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getLoadedOperand() and result = this.getInstruction(CrementConstantTag()) and kind instanceof GotoEdge @@ -695,18 +745,22 @@ class TranslatedArrayExpr extends TranslatedNonConstantExpr { result = this.getBaseOperand().getFirstInstruction(kind) } - final override TranslatedElement getChild(int id) { + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getBaseOperand() or id = 1 and result = this.getOffsetOperand() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getBaseOperand() and result = this.getOffsetOperand().getFirstInstruction(kind) or @@ -753,11 +807,21 @@ abstract class TranslatedTransparentExpr extends TranslatedNonConstantExpr { result = this.getOperand().getFirstInstruction(kind) } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } + override Instruction getALastInstructionInternal() { + result = this.getOperand().getALastInstruction() + } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + final override TranslatedElement getChildInternal(int id) { + id = 0 and result = this.getOperand() + } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override TranslatedElement getLastChild() { result = this.getOperand() } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + none() + } + + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getOperand() and result = this.getParent().getChildSuccessor(this, kind) } @@ -810,7 +874,7 @@ class TranslatedTransparentConversion extends TranslatedTransparentExpr { class TranslatedThisExpr extends TranslatedNonConstantExpr { override ThisExpr expr; - final override TranslatedElement getChild(int id) { none() } + final override TranslatedElement getChildInternal(int id) { none() } final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = ThisAddressTag() and @@ -829,7 +893,9 @@ class TranslatedThisExpr extends TranslatedNonConstantExpr { kind instanceof GotoEdge } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getALastInstructionInternal() { result = this.getInstruction(ThisLoadTag()) } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and tag = ThisAddressTag() and result = this.getInstruction(ThisLoadTag()) @@ -838,7 +904,9 @@ class TranslatedThisExpr extends TranslatedNonConstantExpr { result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + none() + } final override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) { tag = ThisLoadTag() and @@ -855,7 +923,7 @@ class TranslatedThisExpr extends TranslatedNonConstantExpr { abstract class TranslatedVariableAccess extends TranslatedNonConstantExpr { override VariableAccess expr; - final override TranslatedElement getChild(int id) { + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getQualifier() // Might not exist } @@ -865,12 +933,12 @@ abstract class TranslatedVariableAccess extends TranslatedNonConstantExpr { override Instruction getResult() { result = this.getInstruction(OnlyInstructionTag()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getQualifier() and result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge @@ -890,6 +958,10 @@ class TranslatedNonFieldVariableAccess extends TranslatedVariableAccess { ) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) { none() } @@ -924,6 +996,10 @@ class TranslatedFieldAccess extends TranslatedVariableAccess { result = this.getQualifier().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) { tag = OnlyInstructionTag() and operandTag instanceof UnaryOperandTag and @@ -962,14 +1038,16 @@ class TranslatedStructuredBindingVariableAccess extends TranslatedNonConstantExp result = this.getInstruction(StructuredBindingAccessTag()) } - override TranslatedElement getChild(int id) { + override Instruction getALastInstructionInternal() { result = this.getInstruction(LoadTag()) } + + override TranslatedElement getChildInternal(int id) { // Structured bindings cannot be qualified. none() } override Instruction getResult() { result = this.getInstruction(LoadTag()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = StructuredBindingAccessTag() and kind instanceof GotoEdge and result = this.getInstruction(LoadTag()) @@ -978,7 +1056,7 @@ class TranslatedStructuredBindingVariableAccess extends TranslatedNonConstantExp result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = StructuredBindingAccessTag() and @@ -1010,7 +1088,7 @@ class TranslatedStructuredBindingVariableAccess extends TranslatedNonConstantExp class TranslatedFunctionAccess extends TranslatedNonConstantExpr { override FunctionAccess expr; - override TranslatedElement getChild(int id) { + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getQualifier() // Might not exist } @@ -1026,9 +1104,13 @@ class TranslatedFunctionAccess extends TranslatedNonConstantExpr { ) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + override Instruction getResult() { result = this.getInstruction(OnlyInstructionTag()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } @@ -1044,7 +1126,7 @@ class TranslatedFunctionAccess extends TranslatedNonConstantExpr { result = expr.getTarget() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getQualifier() and result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge @@ -1077,7 +1159,11 @@ abstract class TranslatedConstantExpr extends TranslatedCoreExpr, TTranslatedVal kind instanceof GotoEdge } - final override TranslatedElement getChild(int id) { none() } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + + final override TranslatedElement getChildInternal(int id) { none() } final override Instruction getResult() { result = this.getInstruction(OnlyInstructionTag()) } @@ -1091,12 +1177,14 @@ abstract class TranslatedConstantExpr extends TranslatedCoreExpr, TTranslatedVal resultType = this.getResultType() } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + none() + } abstract Opcode getOpcode(); } @@ -1154,14 +1242,20 @@ class TranslatedUnaryExpr extends TranslatedSingleInstructionExpr { result = this.getOperand().getFirstInstruction(kind) } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override TranslatedElement getChildInternal(int id) { + id = 0 and result = this.getOperand() + } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getOperand() and result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge @@ -1195,7 +1289,9 @@ abstract class TranslatedConversion extends TranslatedNonConstantExpr { result = this.getOperand().getFirstInstruction(kind) } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } + final override TranslatedElement getChildInternal(int id) { + id = 0 and result = this.getOperand() + } final TranslatedExpr getOperand() { result = getTranslatedExpr(expr.getExpr()) } } @@ -1205,12 +1301,16 @@ abstract class TranslatedConversion extends TranslatedNonConstantExpr { * single instruction. */ abstract class TranslatedSingleInstructionConversion extends TranslatedConversion { - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getOperand() and result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge @@ -1307,7 +1407,11 @@ class TranslatedInheritanceConversion extends TranslatedSingleInstructionConvers class TranslatedBoolConversion extends TranslatedConversion { override BoolConversion expr; - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getInstruction(BoolConversionCompareTag()) + } + + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and tag = BoolConversionConstantTag() and result = this.getInstruction(BoolConversionCompareTag()) @@ -1316,7 +1420,7 @@ class TranslatedBoolConversion extends TranslatedConversion { result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getOperand() and result = this.getInstruction(BoolConversionConstantTag()) and kind instanceof GotoEdge @@ -1432,7 +1536,11 @@ class TranslatedBinaryOperation extends TranslatedSingleInstructionExpr { result = this.getLeftOperand().getFirstInstruction(kind) } - final override TranslatedElement getChild(int id) { + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getLeftOperand() or id = 1 and result = this.getRightOperand() @@ -1456,12 +1564,12 @@ class TranslatedBinaryOperation extends TranslatedSingleInstructionExpr { ) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getLeftOperand() and result = this.getRightOperand().getFirstInstruction(kind) or @@ -1518,7 +1626,7 @@ class TranslatedBinaryOperation extends TranslatedSingleInstructionExpr { class TranslatedAssignExpr extends TranslatedNonConstantExpr { override AssignExpr expr; - final override TranslatedElement getChild(int id) { + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getLeftOperand() or id = 1 and result = this.getRightOperand() @@ -1529,6 +1637,10 @@ class TranslatedAssignExpr extends TranslatedNonConstantExpr { result = this.getRightOperand().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(AssignmentStoreTag()) + } + final override Instruction getResult() { // The following distinction is needed to work around extractor limitations // in old versions of the extractor. @@ -1553,12 +1665,12 @@ class TranslatedAssignExpr extends TranslatedNonConstantExpr { result = getTranslatedExpr(expr.getRValue().getFullyConverted()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = AssignmentStoreTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { // Operands are evaluated right-to-left. child = this.getRightOperand() and result = this.getLeftOperand().getFirstInstruction(kind) @@ -1592,7 +1704,7 @@ class TranslatedAssignExpr extends TranslatedNonConstantExpr { class TranslatedBlockAssignExpr extends TranslatedNonConstantExpr { override BlockAssignExpr expr; - final override TranslatedElement getChild(int id) { + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getLeftOperand() or id = 1 and result = this.getRightOperand() @@ -1603,6 +1715,10 @@ class TranslatedBlockAssignExpr extends TranslatedNonConstantExpr { result = this.getLeftOperand().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(AssignmentStoreTag()) + } + final override Instruction getResult() { result = this.getInstruction(AssignmentStoreTag()) } final TranslatedExpr getLeftOperand() { @@ -1613,7 +1729,7 @@ class TranslatedBlockAssignExpr extends TranslatedNonConstantExpr { result = getTranslatedExpr(expr.getRValue().getFullyConverted()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = LoadTag() and result = this.getInstruction(AssignmentStoreTag()) and kind instanceof GotoEdge @@ -1622,7 +1738,7 @@ class TranslatedBlockAssignExpr extends TranslatedNonConstantExpr { result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getLeftOperand() and result = this.getRightOperand().getFirstInstruction(kind) or @@ -1661,7 +1777,7 @@ class TranslatedBlockAssignExpr extends TranslatedNonConstantExpr { class TranslatedAssignOperation extends TranslatedNonConstantExpr { override AssignOperation expr; - final override TranslatedElement getChild(int id) { + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getLoadedLeftOperand() or id = 1 and result = this.getRightOperand() @@ -1672,6 +1788,10 @@ class TranslatedAssignOperation extends TranslatedNonConstantExpr { result = this.getRightOperand().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(AssignmentStoreTag()) + } + final override Instruction getResult() { // The following distinction is needed to work around extractor limitations // in old versions of the extractor. @@ -1708,7 +1828,7 @@ class TranslatedAssignOperation extends TranslatedNonConstantExpr { result = getTranslatedExpr(expr.getRValue().getFullyConverted()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and ( tag = AssignOperationConvertLeftTag() and @@ -1729,7 +1849,7 @@ class TranslatedAssignOperation extends TranslatedNonConstantExpr { result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { // Operands are evaluated right-to-left. child = this.getRightOperand() and result = this.getLoadedLeftOperand().getFirstInstruction(kind) @@ -1900,20 +2020,26 @@ class TranslatedConstantAllocationSize extends TranslatedAllocationSize { result = this.getInstruction(AllocationSizeTag()) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(AllocationSizeTag()) + } + final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = AllocationSizeTag() and opcode instanceof Opcode::Constant and resultType = getTypeForPRValue(expr.getAllocator().getParameter(0).getType()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = AllocationSizeTag() and result = this.getParent().getChildSuccessor(this, kind) } - final override TranslatedElement getChild(int id) { none() } + final override TranslatedElement getChildInternal(int id) { none() } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + none() + } final override string getInstructionConstantValue(InstructionTag tag) { tag = AllocationSizeTag() and @@ -1937,6 +2063,10 @@ class TranslatedNonConstantAllocationSize extends TranslatedAllocationSize { result = this.getExtent().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(AllocationSizeTag()) + } + final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { resultType = getTypeForPRValue(expr.getAllocator().getParameter(0).getType()) and ( @@ -1951,7 +2081,7 @@ class TranslatedNonConstantAllocationSize extends TranslatedAllocationSize { ) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and ( this.extentNeedsConversion() and @@ -1966,9 +2096,9 @@ class TranslatedNonConstantAllocationSize extends TranslatedAllocationSize { result = this.getParent().getChildSuccessor(this, kind) } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getExtent() } + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getExtent() } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getExtent() and kind instanceof GotoEdge and if this.extentNeedsConversion() @@ -2102,8 +2232,8 @@ class TranslatedDeleteOrDeleteArrayExpr extends TranslatedNonConstantExpr, Trans else opcode instanceof Opcode::VirtualDeleteFunctionAddress } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - result = TranslatedCall.super.getInstructionSuccessor(tag, kind) + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + result = TranslatedCall.super.getInstructionSuccessorInternal(tag, kind) or tag = CallTargetTag() and result = this.getFirstArgumentOrCallInstruction(kind) @@ -2167,7 +2297,11 @@ abstract class StructorCallContext extends TranslatedElement { class TranslatedDestructorFieldDestruction extends TranslatedNonConstantExpr, StructorCallContext { override DestructorFieldDestruction expr; - final override TranslatedElement getChild(int id) { id = 0 and result = this.getDestructorCall() } + final override TranslatedElement getChildInternal(int id) { + id = 0 and result = this.getDestructorCall() + } + + override TranslatedElement getLastChild() { result = this.getDestructorCall() } final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = OnlyInstructionTag() and @@ -2175,12 +2309,12 @@ class TranslatedDestructorFieldDestruction extends TranslatedNonConstantExpr, St resultType = getTypeForGLValue(expr.getTarget().getType()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getDestructorCall().getFirstInstruction(kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getDestructorCall() and result = this.getParent().getChildSuccessor(this, kind) } @@ -2192,6 +2326,10 @@ class TranslatedDestructorFieldDestruction extends TranslatedNonConstantExpr, St kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + final override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) { tag = OnlyInstructionTag() and operandTag instanceof UnaryOperandTag and @@ -2208,6 +2346,47 @@ class TranslatedDestructorFieldDestruction extends TranslatedNonConstantExpr, St private TranslatedExpr getDestructorCall() { result = getTranslatedExpr(expr.getExpr()) } } +/** + * The IR translation of a vacuous destructor call. That is, an expression that + * looks like a destructor call, but has no effect. + * + * Note that, even though there's no destructor call, we should still evaluate + * the qualifier. + */ +class TranslatedVacuousDestructorCall extends TranslatedNonConstantExpr { + override VacuousDestructorCall expr; + + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } + + final TranslatedExpr getQualifier() { + result = getTranslatedExpr(expr.getQualifier().getFullyConverted()) + } + + override Instruction getFirstInstruction(EdgeKind kind) { + result = this.getQualifier().getFirstInstruction(kind) + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + child = this.getQualifier() and + result = this.getParent().getChildSuccessor(this, kind) + } + + override TranslatedElement getChildInternal(int id) { + id = 0 and + result = this.getQualifier() + } + + override Instruction getResult() { none() } + + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { + none() + } + + override Instruction getALastInstructionInternal() { + result = this.getQualifier().getALastInstruction() + } +} + /** * The IR translation of the `?:` operator. This class has the portions of the implementation that * are shared between the standard three-operand form (`a ? b : c`) and the GCC-extension @@ -2216,6 +2395,17 @@ class TranslatedDestructorFieldDestruction extends TranslatedNonConstantExpr, St abstract class TranslatedConditionalExpr extends TranslatedNonConstantExpr { override ConditionalExpr expr; + override Instruction getALastInstructionInternal() { + if this.elseIsVoid() + then result = this.getElse().getALastInstruction() + else + if exists(this.getInstruction(ConditionValueResultLoadTag())) + then result = this.getInstruction(ConditionValueResultLoadTag()) + else result = this.getInstruction(ConditionValueResultTempAddressTag()) + } + + override TranslatedElement getLastChild() { this.elseIsVoid() and result = this.getElse() } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { // Note that the ternary flavor needs no explicit `ConditionalBranch` instruction here, because // the condition is a `TranslatedCondition`, which will simply connect the successor edges of @@ -2260,7 +2450,7 @@ abstract class TranslatedConditionalExpr extends TranslatedNonConstantExpr { ) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { not this.resultIsVoid() and ( not this.thenIsVoid() and @@ -2368,7 +2558,7 @@ abstract class TranslatedConditionalExpr extends TranslatedNonConstantExpr { else result = this.getInstruction(ConditionValueResultLoadTag()) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getElse() and if this.elseIsVoid() then result = this.getParent().getChildSuccessor(this, kind) @@ -2415,7 +2605,7 @@ abstract class TranslatedConditionalExpr extends TranslatedNonConstantExpr { class TranslatedTernaryConditionalExpr extends TranslatedConditionalExpr, ConditionContext { TranslatedTernaryConditionalExpr() { not expr.isTwoOperand() } - final override TranslatedElement getChild(int id) { + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getCondition() or id = 1 and result = this.getThen() @@ -2427,8 +2617,8 @@ class TranslatedTernaryConditionalExpr extends TranslatedConditionalExpr, Condit result = this.getCondition().getFirstInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { - result = TranslatedConditionalExpr.super.getChildSuccessor(child, kind) + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + result = TranslatedConditionalExpr.super.getChildSuccessorInternal(child, kind) or ( child = this.getThen() and @@ -2470,7 +2660,7 @@ class TranslatedTernaryConditionalExpr extends TranslatedConditionalExpr, Condit class TranslatedBinaryConditionalExpr extends TranslatedConditionalExpr { TranslatedBinaryConditionalExpr() { expr.isTwoOperand() } - final override TranslatedElement getChild(int id) { + final override TranslatedElement getChildInternal(int id) { // We only truly have two children, because our "condition" and "then" are the same as far as // the extractor is concerned. id = 0 and result = this.getCondition() @@ -2491,8 +2681,8 @@ class TranslatedBinaryConditionalExpr extends TranslatedConditionalExpr { resultType = getVoidType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - result = super.getInstructionSuccessor(tag, kind) + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + result = super.getInstructionSuccessorInternal(tag, kind) or tag = ValueConditionConditionalBranchTag() and ( @@ -2512,8 +2702,8 @@ class TranslatedBinaryConditionalExpr extends TranslatedConditionalExpr { result = this.getCondition().getResult() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { - result = super.getChildSuccessor(child, kind) + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + result = super.getChildSuccessorInternal(child, kind) or kind instanceof GotoEdge and child = this.getCondition() and @@ -2554,6 +2744,16 @@ class TranslatedTemporaryObjectExpr extends TranslatedNonConstantExpr, override Type getTargetType() { result = expr.getType() } + final override TranslatedElement getChildInternal(int id) { + result = TranslatedVariableInitialization.super.getChildInternal(id) + } + + final override Instruction getChildSuccessorInternal(TranslatedElement elem, EdgeKind kind) { + result = TranslatedVariableInitialization.super.getChildSuccessorInternal(elem, kind) + } + + final override TranslatedElement getLastChild() { result = this.getInitialization() } + final override TranslatedInitialization getInitialization() { result = getTranslatedInitialization(expr.getExpr()) } @@ -2581,7 +2781,7 @@ abstract class TranslatedThrowExpr extends TranslatedNonConstantExpr { resultType = getVoidType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = ThrowTag() and kind instanceof ExceptionEdge and result = this.getParent().getExceptionSuccessorInstruction(any(GotoEdge edge)) @@ -2599,16 +2799,24 @@ abstract class TranslatedThrowExpr extends TranslatedNonConstantExpr { class TranslatedThrowValueExpr extends TranslatedThrowExpr, TranslatedVariableInitialization { TranslatedThrowValueExpr() { not expr instanceof ReThrowExpr } + final override TranslatedElement getChildInternal(int id) { + result = TranslatedVariableInitialization.super.getChildInternal(id) + } + + final override Instruction getChildSuccessorInternal(TranslatedElement elem, EdgeKind kind) { + result = TranslatedVariableInitialization.super.getChildSuccessorInternal(elem, kind) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { TranslatedThrowExpr.super.hasInstruction(opcode, tag, resultType) or TranslatedVariableInitialization.super.hasInstruction(opcode, tag, resultType) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - result = TranslatedThrowExpr.super.getInstructionSuccessor(tag, kind) + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + result = TranslatedThrowExpr.super.getInstructionSuccessorInternal(tag, kind) or - result = TranslatedVariableInitialization.super.getInstructionSuccessor(tag, kind) + result = TranslatedVariableInitialization.super.getInstructionSuccessorInternal(tag, kind) } final override Instruction getInitializationSuccessor(EdgeKind kind) { @@ -2658,14 +2866,16 @@ class TranslatedThrowValueExpr extends TranslatedThrowExpr, TranslatedVariableIn class TranslatedReThrowExpr extends TranslatedThrowExpr { override ReThrowExpr expr; - override TranslatedElement getChild(int id) { none() } + override TranslatedElement getChildInternal(int id) { none() } override Instruction getFirstInstruction(EdgeKind kind) { result = this.getInstruction(ThrowTag()) and kind instanceof GotoEdge } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getALastInstructionInternal() { result = this.getInstruction(ThrowTag()) } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } final override Opcode getThrowOpcode() { result instanceof Opcode::ReThrow } } @@ -2696,16 +2906,20 @@ class TranslatedBuiltInOperation extends TranslatedNonConstantExpr { ) } - final override TranslatedElement getChild(int id) { + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + + final override TranslatedElement getChildInternal(int id) { result = getTranslatedExpr(expr.getChild(id).getFullyConverted()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { exists(int id | child = this.getChild(id) | result = this.getChild(id + 1).getFirstInstruction(kind) or @@ -2810,15 +3024,19 @@ class TranslatedVarArgsStart extends TranslatedNonConstantExpr { kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(VarArgsVAListStoreTag()) + } + final override Instruction getResult() { none() } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getVAList() } + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getVAList() } private TranslatedExpr getVAList() { result = getTranslatedExpr(expr.getVAList().getFullyConverted()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = VarArgsStartEllipsisAddressTag() and kind instanceof GotoEdge and result = this.getInstruction(VarArgsStartTag()) @@ -2830,7 +3048,7 @@ class TranslatedVarArgsStart extends TranslatedNonConstantExpr { result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getVAList() and result = this.getInstruction(VarArgsVAListStoreTag()) and kind instanceof GotoEdge @@ -2883,15 +3101,19 @@ class TranslatedVarArg extends TranslatedNonConstantExpr { result = this.getVAList().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(VarArgsVAListStoreTag()) + } + final override Instruction getResult() { result = this.getInstruction(VarArgsArgAddressTag()) } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getVAList() } + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getVAList() } private TranslatedExpr getVAList() { result = getTranslatedExpr(expr.getVAList().getFullyConverted()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = VarArgsVAListLoadTag() and kind instanceof GotoEdge and result = this.getInstruction(VarArgsArgAddressTag()) @@ -2908,7 +3130,7 @@ class TranslatedVarArg extends TranslatedNonConstantExpr { result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getVAList() and result = this.getInstruction(VarArgsVAListLoadTag()) and kind instanceof GotoEdge @@ -2955,20 +3177,24 @@ class TranslatedVarArgsEnd extends TranslatedNonConstantExpr { result = this.getVAList().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + final override Instruction getResult() { none() } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getVAList() } + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getVAList() } private TranslatedExpr getVAList() { result = getTranslatedExpr(expr.getVAList().getFullyConverted()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getVAList() and result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge @@ -3001,9 +3227,13 @@ class TranslatedVarArgCopy extends TranslatedNonConstantExpr { result = this.getSourceVAList().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(VarArgsVAListStoreTag()) + } + final override Instruction getResult() { result = this.getInstruction(VarArgsVAListStoreTag()) } - final override TranslatedElement getChild(int id) { + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getDestinationVAList() or id = 1 and result = this.getSourceVAList() @@ -3017,7 +3247,7 @@ class TranslatedVarArgCopy extends TranslatedNonConstantExpr { result = getTranslatedExpr(expr.getSourceVAList().getFullyConverted()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = VarArgsVAListLoadTag() and result = this.getDestinationVAList().getFirstInstruction(kind) or @@ -3025,7 +3255,7 @@ class TranslatedVarArgCopy extends TranslatedNonConstantExpr { result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { kind instanceof GotoEdge and ( child = this.getSourceVAList() and @@ -3059,7 +3289,7 @@ class TranslatedVarArgCopy extends TranslatedNonConstantExpr { abstract class TranslatedNewOrNewArrayExpr extends TranslatedNonConstantExpr, InitializationContext { override NewOrNewArrayExpr expr; - final override TranslatedElement getChild(int id) { + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getAllocatorCall() or id = 1 and result = this.getInitialization() @@ -3075,16 +3305,24 @@ abstract class TranslatedNewOrNewArrayExpr extends TranslatedNonConstantExpr, In result = this.getAllocatorCall().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + if exists(this.getInitialization()) + then result = this.getInitialization().getALastInstruction() + else result = this.getInstruction(OnlyInstructionTag()) + } + + override TranslatedElement getLastChild() { result = this.getInitialization() } + final override Instruction getResult() { result = this.getInstruction(OnlyInstructionTag()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and if exists(this.getInitialization()) then result = this.getInitialization().getFirstInstruction(kind) else result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { kind instanceof GotoEdge and child = this.getAllocatorCall() and result = this.getInstruction(OnlyInstructionTag()) @@ -3149,17 +3387,23 @@ class TranslatedConditionDeclExpr extends TranslatedNonConstantExpr { result = this.getDecl().getFirstInstruction(kind) } - final override TranslatedElement getChild(int id) { + override Instruction getALastInstructionInternal() { + result = this.getConditionExpr().getALastInstruction() + } + + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getDecl() or id = 1 and result = this.getConditionExpr() } + override TranslatedElement getLastChild() { result = this.getConditionExpr() } + override Instruction getResult() { result = this.getConditionExpr().getResult() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getDecl() and result = this.getConditionExpr().getFirstInstruction(kind) or @@ -3189,11 +3433,15 @@ class TranslatedLambdaExpr extends TranslatedNonConstantExpr, InitializationCont kind instanceof GotoEdge } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getInitialization() } + override Instruction getALastInstructionInternal() { result = this.getInstruction(LoadTag()) } + + final override TranslatedElement getChildInternal(int id) { + id = 0 and result = this.getInitialization() + } override Instruction getResult() { result = this.getInstruction(LoadTag()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = InitializerVariableAddressTag() and kind instanceof GotoEdge and result = this.getInstruction(InitializerStoreTag()) @@ -3211,7 +3459,7 @@ class TranslatedLambdaExpr extends TranslatedNonConstantExpr, InitializationCont result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getInstruction(LoadTag()) and kind instanceof GotoEdge @@ -3280,14 +3528,20 @@ class TranslatedStmtExpr extends TranslatedNonConstantExpr { result = this.getStmt().getFirstInstruction(kind) } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getStmt() } + override Instruction getALastInstructionInternal() { + result = this.getStmt().getALastInstruction() + } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getStmt() } + + override TranslatedElement getLastChild() { result = this.getStmt() } + + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag instanceof OnlyInstructionTag and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getStmt() and result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge @@ -3318,14 +3572,20 @@ class TranslatedErrorExpr extends TranslatedSingleInstructionExpr { kind instanceof GotoEdge } - final override TranslatedElement getChild(int id) { none() } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override TranslatedElement getChildInternal(int id) { none() } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + none() + } final override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) { none() @@ -3412,12 +3672,18 @@ class TranslatedAssumeExpr extends TranslatedSingleInstructionExpr { kind instanceof GotoEdge } - final override TranslatedElement getChild(int id) { none() } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override TranslatedElement getChildInternal(int id) { none() } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + none() + } } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedFunction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedFunction.qll index a8f10f75d16..3e4e83965e2 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedFunction.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedFunction.qll @@ -114,7 +114,11 @@ class TranslatedFunction extends TranslatedRootElement, TTranslatedFunction { kind instanceof GotoEdge } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getInstruction(ExitFunctionTag()) + } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and ( tag = EnterFunctionTag() and @@ -150,7 +154,7 @@ class TranslatedFunction extends TranslatedRootElement, TTranslatedFunction { ) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { exists(int paramIndex | child = this.getParameter(paramIndex) | if exists(func.getParameter(paramIndex + 1)) or @@ -379,7 +383,13 @@ abstract class TranslatedParameter extends TranslatedElement { kind instanceof GotoEdge } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + if this.hasIndirection() + then result = this.getInstruction(InitializerIndirectStoreTag()) + else result = this.getInstruction(InitializerStoreTag()) + } + + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and tag = InitializerVariableAddressTag() and result = this.getInstruction(InitializerStoreTag()) @@ -397,7 +407,9 @@ abstract class TranslatedParameter extends TranslatedElement { result = this.getParent().getChildSuccessor(this, kind) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + none() + } final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = InitializerVariableAddressTag() and @@ -611,15 +623,23 @@ class TranslatedConstructorInitList extends TranslatedElement, InitializationCon else result = this.getParent().getChildSuccessor(this, kind) } + override Instruction getALastInstructionInternal() { + result = this.getLastChild().getALastInstruction() + } + + override TranslatedElement getLastChild() { + result = this.getChild(max(int id | exists(this.getChild(id)))) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() } override Function getFunction() { result = func } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { exists(int id | child = this.getChild(id) and if exists(this.getChild(id + 1)) @@ -678,15 +698,23 @@ class TranslatedDestructorDestructionList extends TranslatedElement, else result = this.getParent().getChildSuccessor(this, kind) } + override Instruction getALastInstructionInternal() { + result = this.getChild(max(int id | exists(this.getChild(id)))).getALastInstruction() + } + + override TranslatedElement getLastChild() { + result = this.getChild(max(int id | exists(this.getChild(id)))) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() } override Function getFunction() { result = func } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { exists(int id | child = this.getChild(id) and if exists(this.getChild(id + 1)) @@ -728,7 +756,20 @@ class TranslatedReadEffects extends TranslatedElement, TTranslatedReadEffects { else result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + if exists(this.getAChild()) + then + result = + max(TranslatedElement child, int id | child = this.getChild(id) | child order by id) + .getFirstInstruction(any(GotoEdge goto)) + else result = this.getParent().getChildSuccessor(this, any(GotoEdge goto)) + } + + override TranslatedElement getLastChild() { + result = this.getChild(max(int id | exists(this.getChild(id)))) + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { exists(int id | child = this.getChild(id) | if exists(TranslatedReadEffect child2, int id2 | id2 > id and child2 = this.getChild(id2)) then @@ -746,7 +787,7 @@ class TranslatedReadEffects extends TranslatedElement, TTranslatedReadEffects { none() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } } private TranslatedThisReadEffect getTranslatedThisReadEffect(Function func) { @@ -760,9 +801,9 @@ private TranslatedParameterReadEffect getTranslatedParameterReadEffect(Parameter abstract class TranslatedReadEffect extends TranslatedElement { override TranslatedElement getChild(int id) { none() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } @@ -772,6 +813,10 @@ abstract class TranslatedReadEffect extends TranslatedElement { kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { opcode instanceof Opcode::ReturnIndirection and tag = OnlyInstructionTag() and diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll index d14adfa80e8..50322927af9 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedGlobalVar.qll @@ -27,6 +27,10 @@ class TranslatedStaticStorageDurationVarInit extends TranslatedRootElement, kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(ExitFunctionTag()) + } + override TranslatedElement getChild(int n) { n = 1 and result = getTranslatedInitialization(var.getInitializer().getExpr().getFullyConverted()) @@ -58,7 +62,7 @@ class TranslatedStaticStorageDurationVarInit extends TranslatedRootElement, type = getVoidType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and ( tag = EnterFunctionTag() and @@ -81,7 +85,7 @@ class TranslatedStaticStorageDurationVarInit extends TranslatedRootElement, ) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getChild(1) and result = this.getInstruction(ReturnTag()) and kind instanceof GotoEdge diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedInitialization.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedInitialization.qll index fcff4a838eb..9b6165d0782 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedInitialization.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedInitialization.qll @@ -35,13 +35,19 @@ abstract class InitializationContext extends TranslatedElement { * declarations, `return` statements, and `throw` expressions. */ abstract class TranslatedVariableInitialization extends TranslatedElement, InitializationContext { - final override TranslatedElement getChild(int id) { id = 0 and result = this.getInitialization() } + TranslatedElement getChildInternal(int id) { id = 0 and result = this.getInitialization() } final override Instruction getFirstInstruction(EdgeKind kind) { result = this.getInstruction(InitializerVariableAddressTag()) and kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + result = this.getInitialization().getALastInstruction() + or + not exists(this.getInitialization()) and result = this.getInstruction(OnlyInstructionTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = InitializerVariableAddressTag() and opcode instanceof Opcode::VariableAddress and @@ -53,7 +59,7 @@ abstract class TranslatedVariableInitialization extends TranslatedElement, Initi resultType = getTypeForPRValue(this.getTargetType()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { ( tag = InitializerVariableAddressTag() and if this.hasUninitializedInstruction() @@ -71,7 +77,7 @@ abstract class TranslatedVariableInitialization extends TranslatedElement, Initi ) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getInitializationSuccessor(kind) } @@ -177,7 +183,11 @@ abstract class TranslatedListInitialization extends TranslatedInitialization, In result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getChild(max(int i | exists(this.getChild(i)))).getALastInstruction() + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { exists(int index | child = this.getChild(index) and if exists(this.getChild(index + 1)) @@ -190,7 +200,9 @@ abstract class TranslatedListInitialization extends TranslatedInitialization, In none() } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + none() + } override Instruction getTargetAddress() { result = this.getContext().getTargetAddress() } @@ -260,18 +272,22 @@ class TranslatedSimpleDirectInitialization extends TranslatedDirectInitializatio not expr instanceof StringLiteral } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(InitializerStoreTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = InitializerStoreTag() and opcode instanceof Opcode::Store and resultType = getTypeForPRValue(this.getContext().getTargetType()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = InitializerStoreTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitializer() and result = this.getInstruction(InitializerStoreTag()) and kind instanceof GotoEdge @@ -296,6 +312,12 @@ class TranslatedSimpleDirectInitialization extends TranslatedDirectInitializatio class TranslatedStringLiteralInitialization extends TranslatedDirectInitialization { override StringLiteral expr; + override Instruction getALastInstructionInternal() { + if this.zeroInitRange(_, _) + then result = this.getInstruction(ZeroPadStringStoreTag()) + else result = this.getInstruction(InitializerStoreTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { // Load the string literal to make it a prvalue of type `char[len]` tag = InitializerLoadStringTag() and @@ -337,7 +359,7 @@ class TranslatedStringLiteralInitialization extends TranslatedDirectInitializati ) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and tag = InitializerLoadStringTag() and result = this.getInstruction(InitializerStoreTag()) @@ -367,7 +389,7 @@ class TranslatedStringLiteralInitialization extends TranslatedDirectInitializati ) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitializer() and result = this.getInstruction(InitializerLoadStringTag()) and kind instanceof GotoEdge @@ -457,16 +479,22 @@ class TranslatedConstructorInitialization extends TranslatedDirectInitialization { override ConstructorCall expr; + override Instruction getALastInstructionInternal() { + result = this.getInitializer().getALastInstruction() + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitializer() and result = this.getParent().getChildSuccessor(this, kind) } + override TranslatedElement getLastChild() { result = this.getInitializer() } + override Instruction getInstructionRegisterOperand(InstructionTag tag, OperandTag operandTag) { none() } @@ -558,23 +586,29 @@ class TranslatedExplicitFieldInitialization extends TranslatedFieldInitializatio this = TTranslatedExplicitFieldInitialization(ast, field, expr, position) } + override Instruction getALastInstructionInternal() { + result = this.getInitialization().getALastInstruction() + } + override Instruction getTargetAddress() { result = this.getInstruction(this.getFieldAddressTag()) } override Type getTargetType() { result = field.getUnspecifiedType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = this.getFieldAddressTag() and result = this.getInitialization().getFirstInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getParent().getChildSuccessor(this, kind) } override TranslatedElement getChild(int id) { id = 0 and result = this.getInitialization() } + override TranslatedElement getLastChild() { result = this.getInitialization() } + private TranslatedInitialization getInitialization() { result = getTranslatedInitialization(expr) } @@ -595,6 +629,10 @@ class TranslatedFieldValueInitialization extends TranslatedFieldInitialization, { TranslatedFieldValueInitialization() { this = TTranslatedFieldValueInitialization(ast, field) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(this.getFieldDefaultValueStoreTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { TranslatedFieldInitialization.super.hasInstruction(opcode, tag, resultType) or @@ -607,7 +645,7 @@ class TranslatedFieldValueInitialization extends TranslatedFieldInitialization, resultType = getTypeForPRValue(field.getUnspecifiedType()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { kind instanceof GotoEdge and ( tag = this.getFieldAddressTag() and @@ -639,7 +677,7 @@ class TranslatedFieldValueInitialization extends TranslatedFieldInitialization, ) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } override TranslatedElement getChild(int id) { none() } @@ -689,7 +727,7 @@ abstract class TranslatedElementInitialization extends TranslatedElement { resultType = getTypeForGLValue(this.getElementType()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = this.getElementIndexTag() and result = this.getInstruction(this.getElementAddressTag()) and kind instanceof GotoEdge @@ -743,20 +781,24 @@ class TranslatedExplicitElementInitialization extends TranslatedElementInitializ this = TTranslatedExplicitElementInitialization(initList, elementIndex, position) } + override Instruction getALastInstructionInternal() { + result = this.getInitialization().getALastInstruction() + } + override Instruction getTargetAddress() { result = this.getInstruction(this.getElementAddressTag()) } override Type getTargetType() { result = this.getElementType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - result = TranslatedElementInitialization.super.getInstructionSuccessor(tag, kind) + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + result = TranslatedElementInitialization.super.getInstructionSuccessorInternal(tag, kind) or tag = this.getElementAddressTag() and result = this.getInitialization().getFirstInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getParent().getChildSuccessor(this, kind) } @@ -788,6 +830,10 @@ class TranslatedElementValueInitialization extends TranslatedElementInitializati this = TTranslatedElementValueInitialization(initList, elementIndex, elementCount) } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(this.getElementDefaultValueStoreTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { TranslatedElementInitialization.super.hasInstruction(opcode, tag, resultType) or @@ -800,8 +846,8 @@ class TranslatedElementValueInitialization extends TranslatedElementInitializati resultType = this.getDefaultValueType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - result = TranslatedElementInitialization.super.getInstructionSuccessor(tag, kind) + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + result = TranslatedElementInitialization.super.getInstructionSuccessorInternal(tag, kind) or kind instanceof GotoEdge and ( @@ -836,7 +882,7 @@ class TranslatedElementValueInitialization extends TranslatedElementInitializati ) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } override TranslatedElement getChild(int id) { none() } @@ -876,11 +922,13 @@ abstract class TranslatedStructorCallFromStructor extends TranslatedElement, Str final override Function getFunction() { result = getEnclosingFunction(call) } - final override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + final override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getStructorCall() and result = this.getParent().getChildSuccessor(this, kind) } + override TranslatedElement getLastChild() { result = this.getStructorCall() } + final TranslatedExpr getStructorCall() { result = getTranslatedExpr(call) } } @@ -894,13 +942,17 @@ abstract class TranslatedBaseStructorCall extends TranslatedStructorCallFromStru kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + result = this.getStructorCall().getALastInstruction() + } + final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = OnlyInstructionTag() and opcode instanceof Opcode::ConvertToNonVirtualBase and resultType = getTypeForGLValue(call.getTarget().getDeclaringType()) } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getStructorCall().getFirstInstruction(kind) } @@ -947,11 +999,17 @@ class TranslatedConstructorDelegationInit extends TranslatedConstructorCallFromC result = this.getStructorCall().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getStructorCall().getALastInstruction() + } + final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + none() + } final override Instruction getReceiver() { result = getTranslatedFunction(this.getFunction()).getInitializeThisInstruction() @@ -1009,6 +1067,8 @@ class TranslatedConstructorBareInit extends TranslatedElement, TTranslatedConstr result = this.getParent().getChildSuccessor(this, kind) } + override Instruction getALastInstructionInternal() { none() } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() } @@ -1017,9 +1077,9 @@ class TranslatedConstructorBareInit extends TranslatedElement, TTranslatedConstr override Declaration getFunction() { result = this.getParent().getFunction() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } } TranslatedConstructorBareInit getTranslatedConstructorBareInit(ConstructorInit init) { diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll index a7d12052392..d8ec66a2ee7 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll @@ -138,7 +138,7 @@ class TranslatedMicrosoftTryExceptHandler extends TranslatedElement, result = "1" } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { // Generate -1 -> Compare condition tag = TryExceptGenerateNegativeOne() and kind instanceof GotoEdge and @@ -202,7 +202,7 @@ class TranslatedMicrosoftTryExceptHandler extends TranslatedElement, result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { kind instanceof GotoEdge and child = this.getTranslatedCondition() and result = this.getInstruction(TryExceptGenerateNegativeOne()) @@ -211,6 +211,14 @@ class TranslatedMicrosoftTryExceptHandler extends TranslatedElement, result = this.getParent().getChildSuccessor(this, kind) } + override TranslatedElement getLastChild() { result = this.getTranslatedHandler() } + + override Instruction getALastInstructionInternal() { + result = this.getTranslatedHandler().getALastInstruction() + or + result = this.getInstruction(UnwindTag()) + } + private TranslatedExpr getTranslatedCondition() { result = getTranslatedExpr(tryExcept.getCondition()) } @@ -235,6 +243,27 @@ abstract class TranslatedStmt extends TranslatedElement, TTranslatedStmt { TranslatedStmt() { this = TTranslatedStmt(stmt) } + abstract TranslatedElement getChildInternal(int id); + + final override TranslatedElement getChild(int id) { + result = this.getChildInternal(id) + or + exists(int destructorIndex | + result.(TranslatedExpr).getExpr() = stmt.getImplicitDestructorCall(destructorIndex) and + id = this.getFirstDestructorCallIndex() + destructorIndex + ) + } + + final override int getFirstDestructorCallIndex() { + result = max(int childId | exists(this.getChildInternal(childId))) + 1 + or + not exists(this.getChildInternal(_)) and result = 0 + } + + final override predicate hasAnImplicitDestructorCall() { + exists(stmt.getAnImplicitDestructorCall()) + } + final override string toString() { result = stmt.toString() } final override Locatable getAst() { result = stmt } @@ -252,25 +281,29 @@ class TranslatedEmptyStmt extends TranslatedStmt { stmt instanceof SwitchCase } - override TranslatedElement getChild(int id) { none() } + override TranslatedElement getChildInternal(int id) { none() } override Instruction getFirstInstruction(EdgeKind kind) { result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = OnlyInstructionTag() and opcode instanceof Opcode::NoOp and resultType = getVoidType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } } /** @@ -281,7 +314,7 @@ class TranslatedEmptyStmt extends TranslatedStmt { class TranslatedDeclStmt extends TranslatedStmt { override DeclStmt stmt; - override TranslatedElement getChild(int id) { result = this.getDeclarationEntry(id) } + override TranslatedElement getChildInternal(int id) { result = this.getDeclarationEntry(id) } override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() @@ -294,6 +327,12 @@ class TranslatedDeclStmt extends TranslatedStmt { result = this.getParent().getChildSuccessor(this, kind) } + override Instruction getALastInstructionInternal() { + result = this.getChild(this.getChildCount() - 1).getALastInstruction() + } + + override TranslatedElement getLastChild() { result = this.getChild(this.getChildCount() - 1) } + private int getChildCount() { result = count(this.getDeclarationEntry(_)) } IRDeclarationEntry getIRDeclarationEntry(int index) { @@ -318,9 +357,9 @@ class TranslatedDeclStmt extends TranslatedStmt { ) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { exists(int index | child = this.getDeclarationEntry(index) and if index = (this.getChildCount() - 1) @@ -335,7 +374,7 @@ class TranslatedExprStmt extends TranslatedStmt { TranslatedExpr getExpr() { result = getTranslatedExpr(stmt.getExpr().getFullyConverted()) } - override TranslatedElement getChild(int id) { id = 0 and result = this.getExpr() } + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getExpr() } override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() @@ -345,9 +384,15 @@ class TranslatedExprStmt extends TranslatedStmt { result = this.getExpr().getFirstInstruction(kind) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getALastInstructionInternal() { + result = this.getExpr().getALastInstruction() + } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override TranslatedElement getLastChild() { result = this.getExpr() } + + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getExpr() and result = this.getParent().getChildSuccessor(this, kind) } @@ -359,6 +404,21 @@ abstract class TranslatedReturnStmt extends TranslatedStmt { final TranslatedFunction getEnclosingFunction() { result = getTranslatedFunction(stmt.getEnclosingFunction()) } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + exists(int id | + child = this.getChild(id) and + id >= this.getFirstDestructorCallIndex() and + ( + result = this.getChild(id + 1).getFirstInstruction(kind) + or + not exists(this.getChild(id + 1)) and + result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind) + ) + ) + } + + final override predicate handlesDestructorsExplicitly() { any() } } /** @@ -368,7 +428,19 @@ class TranslatedReturnValueStmt extends TranslatedReturnStmt, TranslatedVariable TranslatedReturnValueStmt() { stmt.hasExpr() and hasReturnValue(stmt.getEnclosingFunction()) } final override Instruction getInitializationSuccessor(EdgeKind kind) { - result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind) + if this.hasAnImplicitDestructorCall() + then result = this.getChild(1).getFirstInstruction(kind) + else result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind) + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + result = TranslatedVariableInitialization.super.getChildSuccessorInternal(child, kind) + or + result = TranslatedReturnStmt.super.getChildSuccessorInternal(child, kind) + } + + final override TranslatedElement getChildInternal(int id) { + result = TranslatedVariableInitialization.super.getChildInternal(id) } final override Type getTargetType() { result = this.getEnclosingFunction().getReturnType() } @@ -390,7 +462,7 @@ class TranslatedReturnVoidExpressionStmt extends TranslatedReturnStmt { stmt.hasExpr() and not hasReturnValue(stmt.getEnclosingFunction()) } - override TranslatedElement getChild(int id) { + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getExpr() } @@ -399,21 +471,31 @@ class TranslatedReturnVoidExpressionStmt extends TranslatedReturnStmt { result = this.getExpr().getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + if this.hasAnImplicitDestructorCall() + then result = this.getChild(max(int id | exists(this.getChild(id)))).getALastInstruction() + else result = this.getInstruction(OnlyInstructionTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = OnlyInstructionTag() and opcode instanceof Opcode::NoOp and resultType = getVoidType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and - result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind) + if this.hasAnImplicitDestructorCall() + then result = this.getChild(1).getFirstInstruction(kind) + else result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getExpr() and result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge + or + result = TranslatedReturnStmt.super.getChildSuccessorInternal(child, kind) } private TranslatedExpr getExpr() { result = getTranslatedExpr(stmt.getExpr()) } @@ -428,25 +510,43 @@ class TranslatedReturnVoidStmt extends TranslatedReturnStmt { not stmt.hasExpr() and not hasReturnValue(stmt.getEnclosingFunction()) } - override TranslatedElement getChild(int id) { none() } + override TranslatedElement getChildInternal(int id) { none() } override Instruction getFirstInstruction(EdgeKind kind) { result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + if this.hasAnImplicitDestructorCall() + then result = this.getChild(max(int id | exists(this.getChild(id)))).getALastInstruction() + else result = this.getInstruction(OnlyInstructionTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = OnlyInstructionTag() and opcode instanceof Opcode::NoOp and resultType = getVoidType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and - result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind) + if this.hasAnImplicitDestructorCall() + then result = this.getChild(0).getFirstInstruction(kind) + else result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + exists(int id | + this.getChild(id) = child and + ( + result = this.getChild(id + 1).getFirstInstruction(kind) + or + not exists(this.getChild(id + 1)) and + result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind) + ) + ) + } } /** @@ -464,6 +564,16 @@ class TranslatedNoValueReturnStmt extends TranslatedReturnStmt, TranslatedVariab result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind) } + final override TranslatedElement getChildInternal(int id) { + result = TranslatedVariableInitialization.super.getChildInternal(id) + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + result = TranslatedVariableInitialization.super.getChildSuccessorInternal(child, kind) + or + result = TranslatedReturnStmt.super.getChildSuccessorInternal(child, kind) + } + final override Type getTargetType() { result = this.getEnclosingFunction().getReturnType() } final override TranslatedInitialization getInitialization() { none() } @@ -518,7 +628,7 @@ private class TryOrMicrosoftTryStmt extends Stmt { class TranslatedTryStmt extends TranslatedStmt { override TryOrMicrosoftTryStmt stmt; - override TranslatedElement getChild(int id) { + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getBody() or result = this.getHandler(id - 1) @@ -531,13 +641,23 @@ class TranslatedTryStmt extends TranslatedStmt { none() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } override Instruction getFirstInstruction(EdgeKind kind) { result = this.getBody().getFirstInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getLastChild().getALastInstruction() + } + + override TranslatedElement getLastChild() { + if exists(this.getFinally()) + then result = this.getFinally() + else result = [this.getBody(), this.getHandler(_)] + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { // All non-finally children go to the successor of the `try` if // there is no finally block, but if there is a finally block // then we go to that one. @@ -581,7 +701,7 @@ class TranslatedTryStmt extends TranslatedStmt { class TranslatedBlock extends TranslatedStmt { override BlockStmt stmt; - override TranslatedElement getChild(int id) { result = this.getStmt(id) } + override TranslatedElement getChildInternal(int id) { result = this.getStmt(id) } override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { this.isEmpty() and @@ -596,18 +716,26 @@ class TranslatedBlock extends TranslatedStmt { else result = this.getStmt(0).getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + if this.isEmpty() + then result = this.getInstruction(OnlyInstructionTag()) + else result = this.getStmt(this.getStmtCount() - 1).getFirstInstruction(any(GotoEdge goto)) + } + + override TranslatedElement getLastChild() { result = this.getStmt(this.getStmtCount() - 1) } + private predicate isEmpty() { not exists(stmt.getStmt(0)) } private TranslatedStmt getStmt(int index) { result = getTranslatedStmt(stmt.getStmt(index)) } private int getStmtCount() { result = stmt.getNumStmt() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { exists(int index | child = this.getStmt(index) and if index = (this.getStmtCount() - 1) @@ -623,14 +751,20 @@ class TranslatedBlock extends TranslatedStmt { abstract class TranslatedHandler extends TranslatedStmt { override Handler stmt; - override TranslatedElement getChild(int id) { id = 1 and result = this.getBlock() } + override TranslatedElement getChildInternal(int id) { id = 1 and result = this.getBlock() } override Instruction getFirstInstruction(EdgeKind kind) { result = this.getInstruction(CatchTag()) and kind instanceof GotoEdge } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getBlock().getALastInstruction() + } + + override TranslatedElement getLastChild() { result = this.getBlock() } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getBlock() and result = this.getParent().getChildSuccessor(this, kind) } @@ -656,20 +790,20 @@ class TranslatedCatchByTypeHandler extends TranslatedHandler { resultType = getVoidType() } - override TranslatedElement getChild(int id) { - result = super.getChild(id) + override TranslatedElement getChildInternal(int id) { + result = super.getChildInternal(id) or id = 0 and result = this.getParameter() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { - result = super.getChildSuccessor(child, kind) + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + result = super.getChildSuccessorInternal(child, kind) or child = this.getParameter() and result = this.getBlock().getFirstInstruction(kind) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = CatchTag() and ( kind instanceof GotoEdge and @@ -702,7 +836,7 @@ class TranslatedCatchAnyHandler extends TranslatedHandler { resultType = getVoidType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = CatchTag() and result = this.getBlock().getFirstInstruction(kind) } @@ -717,7 +851,13 @@ class TranslatedIfStmt extends TranslatedStmt, ConditionContext { else result = this.getFirstConditionInstruction(kind) } - override TranslatedElement getChild(int id) { + override Instruction getALastInstructionInternal() { + result = this.getElse().getALastInstruction() or result = this.getThen().getALastInstruction() + } + + override TranslatedElement getLastChild() { result = this.getElse() or result = this.getThen() } + + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getInitialization() or id = 1 and result = this.getCondition() @@ -747,7 +887,7 @@ class TranslatedIfStmt extends TranslatedStmt, ConditionContext { private predicate hasElse() { exists(stmt.getElse()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } override Instruction getChildTrueSuccessor(TranslatedCondition child, EdgeKind kind) { child = this.getCondition() and @@ -761,7 +901,7 @@ class TranslatedIfStmt extends TranslatedStmt, ConditionContext { else result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getFirstConditionInstruction(kind) or @@ -783,7 +923,7 @@ class TranslatedConstExprIfStmt extends TranslatedStmt, ConditionContext { else result = this.getFirstConditionInstruction(kind) } - override TranslatedElement getChild(int id) { + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getInitialization() or id = 1 and result = this.getCondition() @@ -813,7 +953,7 @@ class TranslatedConstExprIfStmt extends TranslatedStmt, ConditionContext { private predicate hasElse() { exists(stmt.getElse()) } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } override Instruction getChildTrueSuccessor(TranslatedCondition child, EdgeKind kind) { child = this.getCondition() and @@ -827,7 +967,7 @@ class TranslatedConstExprIfStmt extends TranslatedStmt, ConditionContext { else result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getFirstConditionInstruction(kind) or @@ -838,11 +978,23 @@ class TranslatedConstExprIfStmt extends TranslatedStmt, ConditionContext { override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() } + + override Instruction getALastInstructionInternal() { + result = this.getThen().getALastInstruction() + or + result = this.getElse().getALastInstruction() + } } abstract class TranslatedLoop extends TranslatedStmt, ConditionContext { override Loop stmt; + override Instruction getALastInstructionInternal() { + result = this.getCondition().getALastInstruction() + } + + override TranslatedElement getLastChild() { result = this.getCondition() } + final TranslatedCondition getCondition() { result = getTranslatedCondition(stmt.getCondition().getFullyConverted()) } @@ -857,7 +1009,7 @@ abstract class TranslatedLoop extends TranslatedStmt, ConditionContext { final predicate hasCondition() { exists(stmt.getCondition()) } - override TranslatedElement getChild(int id) { + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getCondition() or id = 1 and result = this.getBody() @@ -867,13 +1019,15 @@ abstract class TranslatedLoop extends TranslatedStmt, ConditionContext { none() } - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + final override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + none() + } final override Instruction getChildTrueSuccessor(TranslatedCondition child, EdgeKind kind) { child = this.getCondition() and result = this.getBody().getFirstInstruction(kind) } - final override Instruction getChildFalseSuccessor(TranslatedCondition child, EdgeKind kind) { + override Instruction getChildFalseSuccessor(TranslatedCondition child, EdgeKind kind) { child = this.getCondition() and result = this.getParent().getChildSuccessor(this, kind) } @@ -882,13 +1036,36 @@ abstract class TranslatedLoop extends TranslatedStmt, ConditionContext { class TranslatedWhileStmt extends TranslatedLoop { TranslatedWhileStmt() { stmt instanceof WhileStmt } + override TranslatedElement getChildInternal(int id) { + id = 0 and result = this.getCondition() + or + id = 1 and result = this.getBody() + or + exists(int n | + result.getAst() = stmt.getImplicitDestructorCall(n) and + id = 2 + n + ) + } + + override predicate handlesDestructorsExplicitly() { any() } + + final override Instruction getChildFalseSuccessor(TranslatedCondition child, EdgeKind kind) { + child = this.getCondition() and + if this.hasAnImplicitDestructorCall() + then result = this.getChild(this.getFirstDestructorCallIndex()).getFirstInstruction(kind) + else result = this.getParent().getChildSuccessor(this, kind) + } + override Instruction getFirstInstruction(EdgeKind kind) { result = this.getFirstConditionInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getBody() and result = this.getFirstConditionInstruction(kind) + or + child = this.getChild(this.getFirstDestructorCallIndex()) and + result = this.getParent().getChildSuccessor(this, kind) } } @@ -899,7 +1076,7 @@ class TranslatedDoStmt extends TranslatedLoop { result = this.getBody().getFirstInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getBody() and result = this.getFirstConditionInstruction(kind) } @@ -908,7 +1085,16 @@ class TranslatedDoStmt extends TranslatedLoop { class TranslatedForStmt extends TranslatedLoop { override ForStmt stmt; - override TranslatedElement getChild(int id) { + override predicate handlesDestructorsExplicitly() { any() } + + final override Instruction getChildFalseSuccessor(TranslatedCondition child, EdgeKind kind) { + child = this.getCondition() and + if this.hasAnImplicitDestructorCall() + then result = this.getChild(this.getFirstDestructorCallIndex()).getFirstInstruction(kind) + else result = this.getParent().getChildSuccessor(this, kind) + } + + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getInitialization() or id = 1 and result = this.getCondition() @@ -916,6 +1102,11 @@ class TranslatedForStmt extends TranslatedLoop { id = 2 and result = this.getUpdate() or id = 3 and result = this.getBody() + or + exists(int n | + result.getAst() = stmt.getImplicitDestructorCall(n) and + id = 4 + n + ) } private TranslatedStmt getInitialization() { @@ -934,7 +1125,7 @@ class TranslatedForStmt extends TranslatedLoop { else result = this.getFirstConditionInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getFirstConditionInstruction(kind) or @@ -946,6 +1137,19 @@ class TranslatedForStmt extends TranslatedLoop { ) or child = this.getUpdate() and result = this.getFirstConditionInstruction(kind) + or + exists(int destructorId | + destructorId >= this.getFirstDestructorCallIndex() and + child = this.getChild(destructorId) and + result = this.getChild(destructorId + 1).getFirstInstruction(kind) + ) + or + exists(int lastDestructorIndex | + lastDestructorIndex = + max(int n | exists(this.getChild(n)) and n >= this.getFirstDestructorCallIndex()) and + child = this.getChild(lastDestructorIndex) and + result = this.getParent().getChildSuccessor(this, kind) + ) } } @@ -959,7 +1163,7 @@ class TranslatedForStmt extends TranslatedLoop { class TranslatedRangeBasedForStmt extends TranslatedStmt, ConditionContext { override RangeBasedForStmt stmt; - override TranslatedElement getChild(int id) { + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getInitialization() or id = 1 and result = this.getRangeVariableDeclStmt() @@ -988,7 +1192,13 @@ class TranslatedRangeBasedForStmt extends TranslatedStmt, ConditionContext { else result = this.getFirstRangeVariableDeclStmtInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getALastInstructionInternal() { + result = this.getCondition().getALastInstruction() + } + + override TranslatedElement getLastChild() { result = this.getCondition() } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getFirstRangeVariableDeclStmtInstruction(kind) or @@ -1012,7 +1222,7 @@ class TranslatedRangeBasedForStmt extends TranslatedStmt, ConditionContext { none() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } override Instruction getChildTrueSuccessor(TranslatedCondition child, EdgeKind kind) { child = this.getCondition() and @@ -1070,7 +1280,11 @@ class TranslatedJumpStmt extends TranslatedStmt { kind instanceof GotoEdge } - override TranslatedElement getChild(int id) { none() } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + + override TranslatedElement getChildInternal(int id) { none() } override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = OnlyInstructionTag() and @@ -1078,12 +1292,12 @@ class TranslatedJumpStmt extends TranslatedStmt { resultType = getVoidType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = getTranslatedStmt(stmt.getTarget()).getFirstInstruction(kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } } private EdgeKind getCaseEdge(SwitchCase switchCase) { @@ -1114,7 +1328,13 @@ class TranslatedSwitchStmt extends TranslatedStmt { else result = this.getFirstExprInstruction(kind) } - override TranslatedElement getChild(int id) { + override Instruction getALastInstructionInternal() { + result = this.getBody().getALastInstruction() + } + + override TranslatedElement getLastChild() { result = this.getBody() } + + override TranslatedElement getChildInternal(int id) { id = 0 and result = this.getInitialization() or id = 1 and result = this.getExpr() @@ -1140,7 +1360,7 @@ class TranslatedSwitchStmt extends TranslatedStmt { result = this.getExpr().getResult() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = SwitchBranchTag() and exists(SwitchCase switchCase | switchCase = stmt.getASwitchCase() and @@ -1154,7 +1374,7 @@ class TranslatedSwitchStmt extends TranslatedStmt { result = this.getParent().getChildSuccessor(this, any(GotoEdge edge)) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getInitialization() and result = this.getFirstExprInstruction(kind) or @@ -1169,7 +1389,7 @@ class TranslatedSwitchStmt extends TranslatedStmt { class TranslatedAsmStmt extends TranslatedStmt { override AsmStmt stmt; - override TranslatedExpr getChild(int id) { + override TranslatedExpr getChildInternal(int id) { result = getTranslatedExpr(stmt.getChild(id).(Expr).getFullyConverted()) } @@ -1181,6 +1401,8 @@ class TranslatedAsmStmt extends TranslatedStmt { ) } + override Instruction getALastInstructionInternal() { result = this.getInstruction(AsmTag()) } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { tag = AsmTag() and opcode instanceof Opcode::InlineAsm and @@ -1191,7 +1413,7 @@ class TranslatedAsmStmt extends TranslatedStmt { exists(int index | tag = AsmTag() and operandTag = asmOperand(index) and - result = this.getChild(index).getResult() + result = this.getChildInternal(index).getResult() ) } @@ -1203,12 +1425,12 @@ class TranslatedAsmStmt extends TranslatedStmt { result = getUnknownType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = AsmTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { exists(int index | child = this.getChild(index) and if exists(this.getChild(index + 1)) @@ -1223,7 +1445,7 @@ class TranslatedAsmStmt extends TranslatedStmt { class TranslatedVlaDimensionStmt extends TranslatedStmt { override VlaDimensionStmt stmt; - override TranslatedExpr getChild(int id) { + override TranslatedExpr getChildInternal(int id) { id = 0 and result = getTranslatedExpr(stmt.getDimensionExpr().getFullyConverted()) } @@ -1232,13 +1454,19 @@ class TranslatedVlaDimensionStmt extends TranslatedStmt { result = this.getChild(0).getFirstInstruction(kind) } + override Instruction getALastInstructionInternal() { + result = this.getChild(0).getALastInstruction() + } + + override TranslatedElement getLastChild() { result = this.getChild(0) } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { none() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { none() } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { child = this.getChild(0) and result = this.getParent().getChildSuccessor(this, kind) } @@ -1247,13 +1475,17 @@ class TranslatedVlaDimensionStmt extends TranslatedStmt { class TranslatedVlaDeclarationStmt extends TranslatedStmt { override VlaDeclStmt stmt; - override TranslatedExpr getChild(int id) { none() } + override TranslatedExpr getChildInternal(int id) { none() } override Instruction getFirstInstruction(EdgeKind kind) { result = this.getInstruction(OnlyInstructionTag()) and kind instanceof GotoEdge } + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { // TODO: This needs a new kind of instruction that represents initialization of a VLA. // For now we just emit a `NoOp` instruction so that the CFG isn't incomplete. @@ -1262,10 +1494,10 @@ class TranslatedVlaDeclarationStmt extends TranslatedStmt { resultType = getVoidType() } - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { tag = OnlyInstructionTag() and result = this.getParent().getChildSuccessor(this, kind) } - override Instruction getChildSuccessor(TranslatedElement child, EdgeKind kind) { none() } + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll b/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll index c1d97d36360..f61a3a52c6b 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll @@ -11,7 +11,7 @@ private int getTypeSizeWorkaround(Type type) { exists(Type unspecifiedType | unspecifiedType = type.getUnspecifiedType() and ( - unspecifiedType instanceof FunctionReferenceType and + (unspecifiedType instanceof FunctionReferenceType or unspecifiedType instanceof RoutineType) and result = getPointerSize() or exists(PointerToMemberType ptmType | @@ -176,7 +176,7 @@ private IRType getIRTypeForPRValue(Type type) { isPointerIshType(unspecifiedType) and result.(IRAddressType).getByteSize() = getTypeSize(unspecifiedType) or - unspecifiedType instanceof FunctionPointerIshType and + (unspecifiedType instanceof FunctionPointerIshType or unspecifiedType instanceof RoutineType) and result.(IRFunctionAddressType).getByteSize() = getTypeSize(type) or unspecifiedType instanceof VoidType and result instanceof IRVoidType diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/SmartPointer.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/SmartPointer.qll index 883596a8532..fe5448812fd 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/implementations/SmartPointer.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/SmartPointer.qll @@ -168,3 +168,57 @@ private class SmartPtrSetterFunction extends MemberFunction, AliasFunction, Side ) } } + +/** A destructor assocaited with a smart pointer. */ +private class SmartPtrDestructor extends Destructor, SideEffectFunction, AliasFunction { + SmartPtr declaringType; + + SmartPtrDestructor() { + declaringType = this.getDeclaringType() and not this.isFromUninstantiatedTemplate(_) + } + + /** + * Gets the destructor associated with the base type of this smart pointer. + */ + private Destructor getBaseTypeDestructor() { + result.getDeclaringType() = declaringType.getBaseType() + } + + override predicate hasOnlySpecificReadSideEffects() { + this.getBaseTypeDestructor().(SideEffectFunction).hasOnlySpecificReadSideEffects() + or + // If there's no declared destructor for the base type then it won't have + // any strange read side effects. + not exists(this.getBaseTypeDestructor()) + } + + override predicate hasOnlySpecificWriteSideEffects() { + this.getBaseTypeDestructor().(SideEffectFunction).hasOnlySpecificWriteSideEffects() + or + // If there's no declared destructor for the base type then it won't have + // any strange write side effects. + not exists(this.getBaseTypeDestructor()) + } + + override predicate hasSpecificReadSideEffect(ParameterIndex i, boolean buffer) { + i = -1 and buffer = false + } + + override predicate hasSpecificWriteSideEffect(ParameterIndex i, boolean buffer, boolean mustWrite) { + i = -1 and buffer = false and mustWrite = true + } + + override predicate parameterNeverEscapes(int index) { + this.getBaseTypeDestructor().(AliasFunction).parameterNeverEscapes(index) + or + // If there's no declared destructor for the base type then it won't cause + // anything to escape. + not exists(this.getBaseTypeDestructor()) and + index = -1 + } + + override predicate parameterEscapesOnlyViaReturn(int index) { + // A destructor call does not have a return value + none() + } +} diff --git a/cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql b/cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql index 2a50e7ae358..0d1cc7bcf39 100644 --- a/cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql +++ b/cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql @@ -8,7 +8,7 @@ * type `const char*` it is still considered non-constant if the value is not coming from a string * literal. For example, for a parameter with type `const char*` of an exported function that is * used as a format string, there is no way to ensure the originating value was a string literal. - * @kind problem + * @kind path-problem * @problem.severity recommendation * @security-severity 9.3 * @precision high @@ -26,6 +26,7 @@ import semmle.code.cpp.ir.dataflow.internal.ModelUtil import semmle.code.cpp.models.interfaces.DataFlow import semmle.code.cpp.models.interfaces.Taint import semmle.code.cpp.ir.IR +import NonConstFlow::PathGraph class UncalledFunction extends Function { UncalledFunction() { @@ -68,7 +69,10 @@ predicate isNonConst(DataFlow::Node node) { // Parameters of uncalled functions that aren't const exists(UncalledFunction f, Parameter p | f.getAParameter() = p and - p = node.asParameter() + p = node.asParameter() and + // Ignore main's argv parameter as it is already considered a `FlowSource` + // not ignoring it will result in path redundancies + (f.getName() = "main" implies p != f.getParameter(1)) ) or // Consider as an input any out arg of a function or a function's return where the function is not: @@ -127,11 +131,13 @@ module NonConstFlowConfig implements DataFlow::ConfigSig { module NonConstFlow = TaintTracking::Global; -from FormattingFunctionCall call, Expr formatString, DataFlow::Node sink +from + FormattingFunctionCall call, Expr formatString, NonConstFlow::PathNode sink, + NonConstFlow::PathNode source where + isSinkImpl(sink.getNode(), formatString) and call.getArgument(call.getFormatParameterIndex()) = formatString and - NonConstFlow::flowTo(sink) and - isSinkImpl(sink, formatString) -select formatString, - "The format string argument to " + call.getTarget().getName() + - " should be constant to prevent security issues and other potential errors." + NonConstFlow::flowPath(source, sink) +select sink.getNode(), source, sink, + "The format string argument to $@ has a source which cannot be " + + "verified to originate from a string literal.", call, call.getTarget().getName() diff --git a/cpp/ql/src/change-notes/2024-02-29-non-constant-format-path-query.md b/cpp/ql/src/change-notes/2024-02-29-non-constant-format-path-query.md new file mode 100644 index 00000000000..2e5933a61e8 --- /dev/null +++ b/cpp/ql/src/change-notes/2024-02-29-non-constant-format-path-query.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The "non-constant format string" query (`cpp/non-constant-format`) has been converted to a `path-problem` query. \ No newline at end of file diff --git a/cpp/ql/test/library-tests/arguments/arguments.expected b/cpp/ql/test/library-tests/arguments/arguments.expected index efaf3cf81c0..9d0d85857ef 100644 --- a/cpp/ql/test/library-tests/arguments/arguments.expected +++ b/cpp/ql/test/library-tests/arguments/arguments.expected @@ -3,7 +3,7 @@ | arguments.c | 3 | --edg | | arguments.c | 4 | --disable_system_macros | | arguments.c | 5 | --edg | -| arguments.c | 6 | --verbosity | +| arguments.c | 6 | --codeql-verbosity | | arguments.c | 7 | --edg | | arguments.c | 8 | 2 | | arguments.c | 9 | --edg | diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected index 8b2b371a4e2..fa6958d92ea 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected @@ -166,6 +166,8 @@ postWithInFlow | test.cpp:932:5:932:19 | * ... [post update] | PostUpdateNode should not be the target of local flow. | | test.cpp:932:6:932:19 | global_pointer [inner post update] | PostUpdateNode should not be the target of local flow. | | test.cpp:1045:9:1045:11 | ref arg buf | PostUpdateNode should not be the target of local flow. | +| test.cpp:1051:5:1051:11 | content [post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1052:9:1052:9 | a [inner post update] | PostUpdateNode should not be the target of local flow. | viableImplInCallContextTooLarge uniqueParameterNodeAtPosition uniqueParameterNodePosition diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.expected new file mode 100644 index 00000000000..0e33430cde7 --- /dev/null +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.expected @@ -0,0 +1,197 @@ +| example.c:15:37:15:37 | **b | example.c:15:37:15:37 | **b | +| example.c:15:37:15:37 | **b | example.c:15:37:15:37 | **b | +| example.c:15:37:15:37 | **b | example.c:15:37:15:37 | *b | +| example.c:15:37:15:37 | **b | example.c:19:6:19:6 | *b | +| example.c:15:37:15:37 | *b | example.c:15:37:15:37 | **b | +| example.c:15:37:15:37 | *b | example.c:15:37:15:37 | *b | +| example.c:15:37:15:37 | *b | example.c:15:37:15:37 | *b | +| example.c:15:37:15:37 | *b | example.c:15:37:15:37 | b | +| example.c:15:37:15:37 | *b | example.c:19:6:19:6 | b | +| example.c:15:37:15:37 | b | example.c:15:37:15:37 | *b | +| example.c:15:37:15:37 | b | example.c:15:37:15:37 | b | +| example.c:15:37:15:37 | b | example.c:15:37:15:37 | b | +| example.c:15:37:15:37 | b | example.c:19:6:19:6 | b | +| example.c:15:44:15:46 | pos | example.c:24:24:24:26 | pos | +| example.c:17:11:17:16 | *definition of coords | example.c:17:11:17:16 | *definition of coords | +| example.c:17:11:17:16 | *definition of coords | example.c:17:11:17:16 | *definition of coords | +| example.c:17:11:17:16 | *definition of coords | example.c:17:11:17:16 | *definition of coords | +| example.c:17:11:17:16 | *definition of coords | example.c:17:11:17:16 | *definition of coords | +| example.c:17:11:17:16 | *definition of coords | example.c:24:13:24:18 | *coords | +| example.c:17:11:17:16 | *definition of coords [post update] | example.c:17:11:17:16 | *definition of coords | +| example.c:17:11:17:16 | *definition of coords [post update] | example.c:24:13:24:18 | *coords | +| example.c:17:11:17:16 | definition of coords | example.c:17:11:17:16 | *definition of coords | +| example.c:17:11:17:16 | definition of coords | example.c:17:11:17:16 | definition of coords | +| example.c:17:11:17:16 | definition of coords | example.c:17:11:17:16 | definition of coords | +| example.c:17:11:17:16 | definition of coords | example.c:17:11:17:16 | definition of coords | +| example.c:17:11:17:16 | definition of coords | example.c:17:11:17:16 | definition of coords | +| example.c:17:11:17:16 | definition of coords | example.c:24:13:24:18 | coords | +| example.c:17:11:17:16 | definition of coords [post update] | example.c:17:11:17:16 | definition of coords | +| example.c:17:11:17:16 | definition of coords [post update] | example.c:24:13:24:18 | coords | +| example.c:17:19:17:22 | {...} | example.c:17:19:17:22 | {...} | +| example.c:17:21:17:21 | 0 | example.c:17:21:17:21 | 0 | +| example.c:19:6:19:6 | *b | example.c:15:37:15:37 | *b | +| example.c:19:6:19:6 | *b [post update] | example.c:15:37:15:37 | *b | +| example.c:19:6:19:6 | *b [post update] | example.c:19:6:19:6 | *b | +| example.c:19:6:19:6 | b [post update] | example.c:19:6:19:6 | b | +| example.c:24:2:24:7 | *coords | example.c:26:18:26:24 | *& ... | +| example.c:24:2:24:7 | *coords [post update] | example.c:26:18:26:24 | *& ... | +| example.c:24:2:24:7 | coords | example.c:26:18:26:24 | & ... | +| example.c:24:2:24:7 | coords [post update] | example.c:26:18:26:24 | & ... | +| example.c:24:13:24:18 | *coords | example.c:24:2:24:7 | *coords | +| example.c:24:13:24:18 | *coords [post update] | example.c:24:2:24:7 | *coords | +| example.c:24:13:24:18 | coords | example.c:24:2:24:7 | coords | +| example.c:24:13:24:18 | coords [post update] | example.c:24:2:24:7 | coords | +| example.c:24:13:24:30 | ... = ... | example.c:24:2:24:30 | ... = ... | +| example.c:24:20:24:20 | *y | example.c:24:20:24:20 | *y | +| example.c:24:20:24:20 | y | example.c:24:20:24:20 | y | +| example.c:24:20:24:20 | y | example.c:24:20:24:20 | y | +| example.c:24:24:24:26 | pos | example.c:28:14:28:25 | & ... | +| example.c:24:24:24:26 | pos | example.c:28:14:28:25 | *& ... | +| example.c:24:24:24:30 | ... + ... | example.c:24:13:24:30 | ... = ... | +| example.c:26:13:26:16 | call to getX | example.c:26:2:26:25 | ... = ... | +| example.c:26:18:26:24 | & ... | example.c:26:2:26:7 | coords | +| example.c:26:18:26:24 | *& ... | example.c:26:2:26:7 | *coords | +| example.c:26:18:26:24 | getX output argument | example.c:26:2:26:7 | *coords | +| example.c:26:18:26:24 | pointer to getX output argument | example.c:26:2:26:7 | coords | +| example.c:26:19:26:24 | *coords | example.c:26:18:26:24 | *& ... | +| example.c:26:19:26:24 | coords | example.c:26:18:26:24 | & ... | +| example.c:28:22:28:25 | & ... | example.c:28:14:28:25 | & ... | +| example.c:28:22:28:25 | *& ... | example.c:28:14:28:25 | *& ... | +| example.c:28:23:28:25 | *pos | example.c:28:22:28:25 | *& ... | +| example.c:28:23:28:25 | pos | example.c:28:22:28:25 | & ... | +| test.cpp:6:12:6:17 | call to source | test.cpp:6:12:6:17 | call to source | +| test.cpp:6:12:6:17 | call to source | test.cpp:7:8:7:9 | t1 | +| test.cpp:7:8:7:9 | t1 | test.cpp:8:8:8:9 | t1 | +| test.cpp:7:8:7:9 | t1 | test.cpp:8:8:8:9 | t1 | +| test.cpp:8:3:8:9 | ... = ... | test.cpp:10:8:10:9 | t2 | +| test.cpp:8:8:8:9 | t1 | test.cpp:8:3:8:9 | ... = ... | +| test.cpp:8:8:8:9 | t1 | test.cpp:9:8:9:9 | t1 | +| test.cpp:8:8:8:9 | t1 | test.cpp:9:8:9:9 | t1 | +| test.cpp:9:8:9:9 | t1 | test.cpp:11:7:11:8 | t1 | +| test.cpp:9:8:9:9 | t1 | test.cpp:11:7:11:8 | t1 | +| test.cpp:10:8:10:9 | t2 | test.cpp:13:10:13:11 | t2 | +| test.cpp:10:8:10:9 | t2 | test.cpp:15:3:15:6 | Phi | +| test.cpp:10:8:10:9 | t2 | test.cpp:15:3:15:6 | Phi | +| test.cpp:11:7:11:8 | t1 | test.cpp:21:8:21:9 | t1 | +| test.cpp:12:5:12:10 | ... = ... | test.cpp:13:10:13:11 | t2 | +| test.cpp:12:10:12:10 | 0 | test.cpp:12:5:12:10 | ... = ... | +| test.cpp:13:10:13:11 | t2 | test.cpp:15:3:15:6 | Phi | +| test.cpp:13:10:13:11 | t2 | test.cpp:15:3:15:6 | Phi | +| test.cpp:15:3:15:6 | Phi | test.cpp:15:8:15:9 | t2 | +| test.cpp:15:3:15:6 | Phi | test.cpp:15:8:15:9 | t2 | +| test.cpp:15:8:15:9 | t2 | test.cpp:23:19:23:19 | Phi | +| test.cpp:15:8:15:9 | t2 | test.cpp:23:19:23:19 | Phi | +| test.cpp:17:3:17:8 | ... = ... | test.cpp:21:8:21:9 | t1 | +| test.cpp:17:8:17:8 | 0 | test.cpp:17:3:17:8 | ... = ... | +| test.cpp:21:8:21:9 | t1 | test.cpp:23:19:23:19 | Phi | +| test.cpp:21:8:21:9 | t1 | test.cpp:23:19:23:19 | Phi | +| test.cpp:23:15:23:16 | 0 | test.cpp:23:15:23:16 | 0 | +| test.cpp:23:15:23:16 | 0 | test.cpp:23:19:23:19 | Phi | +| test.cpp:23:19:23:19 | Phi | test.cpp:23:19:23:19 | i | +| test.cpp:23:19:23:19 | Phi | test.cpp:23:19:23:19 | i | +| test.cpp:23:19:23:19 | Phi | test.cpp:23:23:23:24 | t1 | +| test.cpp:23:19:23:19 | Phi | test.cpp:23:23:23:24 | t1 | +| test.cpp:23:19:23:19 | Phi | test.cpp:24:10:24:11 | t2 | +| test.cpp:23:19:23:19 | Phi | test.cpp:24:10:24:11 | t2 | +| test.cpp:23:19:23:19 | i | test.cpp:23:27:23:27 | i | +| test.cpp:23:19:23:19 | i | test.cpp:23:27:23:27 | i | +| test.cpp:23:23:23:24 | t1 | test.cpp:23:19:23:19 | Phi | +| test.cpp:23:23:23:24 | t1 | test.cpp:26:8:26:9 | t1 | +| test.cpp:23:23:23:24 | t1 | test.cpp:26:8:26:9 | t1 | +| test.cpp:23:27:23:27 | *i | test.cpp:23:27:23:27 | *i | +| test.cpp:23:27:23:27 | *i | test.cpp:23:27:23:27 | i | +| test.cpp:23:27:23:27 | i | test.cpp:23:19:23:19 | Phi | +| test.cpp:23:27:23:27 | i | test.cpp:23:27:23:27 | i | +| test.cpp:23:27:23:27 | i | test.cpp:23:27:23:27 | i | +| test.cpp:23:27:23:29 | ... ++ | test.cpp:23:19:23:19 | Phi | +| test.cpp:23:27:23:29 | ... ++ | test.cpp:23:27:23:29 | ... ++ | +| test.cpp:24:5:24:11 | ... = ... | test.cpp:23:19:23:19 | Phi | +| test.cpp:24:10:24:11 | t2 | test.cpp:23:19:23:19 | Phi | +| test.cpp:24:10:24:11 | t2 | test.cpp:23:19:23:19 | Phi | +| test.cpp:24:10:24:11 | t2 | test.cpp:24:5:24:11 | ... = ... | +| test.cpp:382:48:382:54 | source1 | test.cpp:384:16:384:23 | *& ... | +| test.cpp:383:12:383:13 | 0 | test.cpp:383:12:383:13 | 0 | +| test.cpp:383:12:383:13 | 0 | test.cpp:384:10:384:13 | *& ... | +| test.cpp:384:10:384:13 | & ... | test.cpp:384:3:384:8 | call to memcpy | +| test.cpp:384:10:384:13 | & ... | test.cpp:384:10:384:13 | & ... | +| test.cpp:384:10:384:13 | & ... | test.cpp:385:8:385:10 | tmp | +| test.cpp:384:10:384:13 | *& ... | test.cpp:384:10:384:13 | *& ... | +| test.cpp:384:10:384:13 | memcpy output argument | test.cpp:385:8:385:10 | tmp | +| test.cpp:384:10:384:13 | pointer to memcpy output argument | test.cpp:385:8:385:10 | tmp | +| test.cpp:384:11:384:13 | *tmp | test.cpp:384:10:384:13 | *& ... | +| test.cpp:384:11:384:13 | tmp | test.cpp:384:10:384:13 | & ... | +| test.cpp:384:16:384:23 | & ... | test.cpp:384:16:384:23 | & ... | +| test.cpp:384:16:384:23 | *& ... | test.cpp:384:3:384:8 | **call to memcpy | +| test.cpp:384:16:384:23 | *& ... | test.cpp:384:3:384:8 | *call to memcpy | +| test.cpp:384:16:384:23 | *& ... | test.cpp:384:10:384:13 | memcpy output argument | +| test.cpp:384:16:384:23 | *& ... | test.cpp:384:16:384:23 | *& ... | +| test.cpp:384:16:384:23 | **(const void *)... | test.cpp:384:3:384:8 | **call to memcpy | +| test.cpp:384:16:384:23 | **(const void *)... | test.cpp:384:10:384:13 | memcpy output argument | +| test.cpp:384:17:384:23 | *source1 | test.cpp:384:16:384:23 | *& ... | +| test.cpp:384:17:384:23 | source1 | test.cpp:384:16:384:23 | & ... | +| test.cpp:388:53:388:59 | source1 | test.cpp:391:16:391:23 | *& ... | +| test.cpp:388:66:388:66 | b | test.cpp:393:7:393:7 | b | +| test.cpp:389:12:389:13 | 0 | test.cpp:389:12:389:13 | 0 | +| test.cpp:389:12:389:13 | 0 | test.cpp:390:18:390:21 | *& ... | +| test.cpp:390:18:390:21 | & ... | test.cpp:390:18:390:21 | & ... | +| test.cpp:390:18:390:21 | & ... | test.cpp:391:10:391:13 | & ... | +| test.cpp:390:18:390:21 | *& ... | test.cpp:390:18:390:21 | *& ... | +| test.cpp:390:18:390:21 | *& ... | test.cpp:391:10:391:13 | *& ... | +| test.cpp:390:19:390:21 | *tmp | test.cpp:390:18:390:21 | *& ... | +| test.cpp:390:19:390:21 | tmp | test.cpp:390:18:390:21 | & ... | +| test.cpp:391:10:391:13 | & ... | test.cpp:391:3:391:8 | call to memcpy | +| test.cpp:391:10:391:13 | & ... | test.cpp:391:10:391:13 | & ... | +| test.cpp:391:10:391:13 | & ... | test.cpp:392:8:392:10 | tmp | +| test.cpp:391:10:391:13 | *& ... | test.cpp:391:10:391:13 | *& ... | +| test.cpp:391:10:391:13 | memcpy output argument | test.cpp:392:8:392:10 | tmp | +| test.cpp:391:10:391:13 | pointer to memcpy output argument | test.cpp:392:8:392:10 | tmp | +| test.cpp:391:11:391:13 | *tmp | test.cpp:391:10:391:13 | *& ... | +| test.cpp:391:11:391:13 | tmp | test.cpp:391:10:391:13 | & ... | +| test.cpp:391:16:391:23 | & ... | test.cpp:391:16:391:23 | & ... | +| test.cpp:391:16:391:23 | *& ... | test.cpp:391:3:391:8 | **call to memcpy | +| test.cpp:391:16:391:23 | *& ... | test.cpp:391:3:391:8 | *call to memcpy | +| test.cpp:391:16:391:23 | *& ... | test.cpp:391:10:391:13 | memcpy output argument | +| test.cpp:391:16:391:23 | *& ... | test.cpp:391:16:391:23 | *& ... | +| test.cpp:391:16:391:23 | **(const void *)... | test.cpp:391:3:391:8 | **call to memcpy | +| test.cpp:391:16:391:23 | **(const void *)... | test.cpp:391:10:391:13 | memcpy output argument | +| test.cpp:391:17:391:23 | *source1 | test.cpp:391:16:391:23 | *& ... | +| test.cpp:391:17:391:23 | source1 | test.cpp:391:16:391:23 | & ... | +| test.cpp:392:8:392:10 | tmp | test.cpp:394:10:394:12 | tmp | +| test.cpp:392:8:392:10 | tmp | test.cpp:394:10:394:12 | tmp | +| test.cpp:487:67:487:67 | **s | test.cpp:487:67:487:67 | **s | +| test.cpp:487:67:487:67 | **s | test.cpp:487:67:487:67 | **s | +| test.cpp:487:67:487:67 | **s | test.cpp:487:67:487:67 | *s | +| test.cpp:487:67:487:67 | **s | test.cpp:488:21:488:21 | *s | +| test.cpp:487:67:487:67 | *s | test.cpp:487:67:487:67 | **s | +| test.cpp:487:67:487:67 | *s | test.cpp:487:67:487:67 | *s | +| test.cpp:487:67:487:67 | *s | test.cpp:487:67:487:67 | *s | +| test.cpp:487:67:487:67 | *s | test.cpp:487:67:487:67 | s | +| test.cpp:487:67:487:67 | *s | test.cpp:488:21:488:21 | s | +| test.cpp:487:67:487:67 | s | test.cpp:487:67:487:67 | *s | +| test.cpp:487:67:487:67 | s | test.cpp:487:67:487:67 | s | +| test.cpp:487:67:487:67 | s | test.cpp:487:67:487:67 | s | +| test.cpp:487:67:487:67 | s | test.cpp:488:21:488:21 | s | +| test.cpp:488:21:488:21 | *s | test.cpp:489:20:489:20 | *s | +| test.cpp:488:21:488:21 | *s [post update] | test.cpp:489:20:489:20 | *s | +| test.cpp:488:21:488:21 | s | test.cpp:489:20:489:20 | s | +| test.cpp:488:21:488:21 | s | test.cpp:489:20:489:20 | s | +| test.cpp:488:21:488:21 | s [post update] | test.cpp:489:20:489:20 | s | +| test.cpp:488:24:488:30 | *content | test.cpp:488:21:488:30 | *content | +| test.cpp:488:24:488:30 | content | test.cpp:488:21:488:30 | content | +| test.cpp:489:20:489:20 | *s | test.cpp:487:67:487:67 | *s | +| test.cpp:489:20:489:20 | *s [post update] | test.cpp:487:67:487:67 | *s | +| test.cpp:489:20:489:20 | *s [post update] | test.cpp:489:20:489:20 | *s | +| test.cpp:489:20:489:20 | s [post update] | test.cpp:489:20:489:20 | s | +| test.cpp:489:23:489:29 | *content | test.cpp:489:23:489:29 | *content | +| test.cpp:489:23:489:29 | *content | test.cpp:490:8:490:17 | * ... | +| test.cpp:489:23:489:29 | content | test.cpp:489:23:489:29 | content | +| test.cpp:489:23:489:29 | content | test.cpp:490:9:490:17 | p_content | +| test.cpp:1050:12:1050:12 | definition of a | test.cpp:1051:3:1051:3 | *a | +| test.cpp:1051:3:1051:3 | *a | test.cpp:1052:8:1052:9 | *& ... | +| test.cpp:1051:3:1051:3 | *a [post update] | test.cpp:1052:8:1052:9 | *& ... | +| test.cpp:1051:3:1051:3 | a | test.cpp:1052:8:1052:9 | & ... | +| test.cpp:1051:3:1051:3 | a [post update] | test.cpp:1052:8:1052:9 | & ... | +| test.cpp:1051:15:1051:21 | 0 | test.cpp:1051:3:1051:21 | ... = ... | +| test.cpp:1051:15:1051:21 | *0 | test.cpp:1051:3:1051:21 | *... = ... | +| test.cpp:1052:9:1052:9 | *a | test.cpp:1052:8:1052:9 | *& ... | +| test.cpp:1052:9:1052:9 | a | test.cpp:1052:8:1052:9 | & ... | diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.ql b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.ql new file mode 100644 index 00000000000..7a908a6e3f2 --- /dev/null +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.ql @@ -0,0 +1,8 @@ +import cpp +import semmle.code.cpp.dataflow.new.DataFlow + +from DataFlow::Node nodeFrom, DataFlow::Node nodeTo +where + DataFlow::localFlowStep(nodeFrom, nodeTo) and + nodeFrom.getFunction().getName().matches("%\\_with\\_local\\_flow") +select nodeFrom, nodeTo diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow.expected index 525e6b22da5..2f4c618a130 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow.expected @@ -81,3 +81,10 @@ WARNING: Module DataFlow has been deprecated and may be removed in future (local | test.cpp:488:21:488:21 | s [post update] | test.cpp:489:20:489:20 | s | | test.cpp:488:24:488:30 | ref arg content | test.cpp:489:23:489:29 | content | | test.cpp:489:23:489:29 | content | test.cpp:490:9:490:17 | p_content | +| test.cpp:1050:12:1050:12 | a | test.cpp:1051:3:1051:3 | a | +| test.cpp:1050:12:1050:12 | a | test.cpp:1052:9:1052:9 | a | +| test.cpp:1051:3:1051:3 | a [post update] | test.cpp:1052:9:1052:9 | a | +| test.cpp:1051:3:1051:21 | ... = ... | test.cpp:1051:5:1051:11 | content [post update] | +| test.cpp:1051:15:1051:21 | 0 | test.cpp:1051:3:1051:21 | ... = ... | +| test.cpp:1052:8:1052:9 | ref arg & ... | test.cpp:1052:9:1052:9 | a [inner post update] | +| test.cpp:1052:9:1052:9 | a | test.cpp:1052:8:1052:9 | & ... | diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected index c9f90a60b6e..e03ee68b8a3 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected @@ -123,6 +123,7 @@ astFlow | test.cpp:842:11:842:16 | call to source | test.cpp:844:8:844:8 | y | | test.cpp:846:13:846:27 | call to indirect_source | test.cpp:848:23:848:25 | rpx | | test.cpp:860:54:860:59 | call to source | test.cpp:861:10:861:37 | static_local_pointer_dynamic | +| test.cpp:1050:12:1050:12 | a | test.cpp:1052:8:1052:9 | & ... | | true_upon_entry.cpp:17:11:17:16 | call to source | true_upon_entry.cpp:21:8:21:8 | x | | true_upon_entry.cpp:27:9:27:14 | call to source | true_upon_entry.cpp:29:8:29:8 | x | | true_upon_entry.cpp:33:11:33:16 | call to source | true_upon_entry.cpp:39:8:39:8 | x | diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp index b36c289aaf1..b2bff6327c5 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp @@ -1044,4 +1044,10 @@ void* memset(void*, int, size_t); void memset_test(char* buf) { // $ ast-def=buf ir-def=*buf memset(buf, source(), 10); sink(*buf); // $ ir MISSING: ast +} + +void flow_out_of_address_with_local_flow() { + MyStruct a; + a.content = nullptr; + sink(&a); // $ SPURIOUS: ast } \ No newline at end of file diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/uninitialized.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/uninitialized.expected index 39fb882940d..fc230b0ed20 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/uninitialized.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/uninitialized.expected @@ -54,3 +54,5 @@ | test.cpp:796:12:796:12 | a | test.cpp:797:20:797:20 | a | | test.cpp:796:12:796:12 | a | test.cpp:797:31:797:31 | a | | test.cpp:796:12:796:12 | a | test.cpp:798:17:798:17 | a | +| test.cpp:1050:12:1050:12 | a | test.cpp:1051:3:1051:3 | a | +| test.cpp:1050:12:1050:12 | a | test.cpp:1052:9:1052:9 | a | diff --git a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected index 4423145ca31..24501a4bcae 100644 --- a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected +++ b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected @@ -4316,8 +4316,6 @@ ir.cpp: # 365| ValueCategory = prvalue # 361| getStmt(2): [LabelStmt] label ...: # 367| getStmt(1): [ReturnStmt] return ... -# 369| [TopLevelFunction] void VoidFunc() -# 369| : # 370| [TopLevelFunction] int Add(int, int) # 370| : # 370| getParameter(0): [Parameter] x @@ -5553,6 +5551,8 @@ ir.cpp: # 605| Type = [RValueReferenceType] String && # 607| [ConstMemberFunction] char const* String::c_str() const # 607| : +# 608| [MemberFunction] char String::pop_back() +# 608| : # 613| [TopLevelFunction] String ReturnObject() # 613| : # 615| [TopLevelFunction] void DeclareObject() @@ -9386,6 +9386,10 @@ ir.cpp: # 1059| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [LValueReferenceType] const vector & +# 1059| [CopyAssignmentOperator] vector& vector::operator=(vector const&) +# 1059| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const vector & # 1059| [CopyAssignmentOperator] vector& vector::operator=(vector const&) # 1059| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) @@ -9394,6 +9398,10 @@ ir.cpp: # 1059| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [LValueReferenceType] const vector & +# 1059| [CopyConstructor] void vector::vector(vector const&) +# 1059| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const vector & # 1059| [CopyConstructor] void vector::vector(vector const&) # 1059| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) @@ -9406,6 +9414,14 @@ ir.cpp: # 1060| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) #-----| Type = [RValueReferenceType] iterator && +# 1060| [CopyAssignmentOperator] vector::iterator& vector::iterator::operator=(vector::iterator const public&) +# 1060| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const iterator & +# 1060| [MoveAssignmentOperator] vector::iterator& vector::iterator::operator=(vector::iterator&&) +# 1060| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [RValueReferenceType] iterator && # 1060| [CopyAssignmentOperator] vector::iterator& vector::iterator::operator=(vector::iterator const public&) # 1060| : #-----| getParameter(0): [Parameter] (unnamed parameter 0) @@ -9416,12 +9432,16 @@ ir.cpp: #-----| Type = [RValueReferenceType] iterator && # 1062| [MemberFunction] vector::iterator& vector::iterator::operator++() # 1062| : +# 1062| [MemberFunction] vector::iterator& vector::iterator::operator++() +# 1062| : # 1062| [MemberFunction] vector::iterator& vector::iterator::operator++() # 1062| : # 1062| [MemberFunction] vector::iterator& vector::iterator::operator++() # 1062| : # 1063| [ConstMemberFunction] ClassWithDestructor& vector::iterator::operator*() const # 1063| : +# 1063| [ConstMemberFunction] String& vector::iterator::operator*() const +# 1063| : # 1063| [ConstMemberFunction] T& vector::iterator::operator*() const # 1063| : # 1063| [ConstMemberFunction] int& vector::iterator::operator*() const @@ -9430,6 +9450,10 @@ ir.cpp: # 1065| : # 1065| getParameter(0): [Parameter] right # 1065| Type = [NestedStruct] iterator +# 1065| [ConstMemberFunction] bool vector::iterator::operator!=(vector::iterator) const +# 1065| : +# 1065| getParameter(0): [Parameter] right +# 1065| Type = [NestedStruct] iterator # 1065| [ConstMemberFunction] bool vector::iterator::operator!=(vector::iterator) const # 1065| : # 1065| getParameter(0): [Parameter] right @@ -9442,6 +9466,10 @@ ir.cpp: # 1068| : # 1068| getParameter(0): [Parameter] (unnamed parameter 0) # 1068| Type = [Class] ClassWithDestructor +# 1068| [Constructor] void vector::vector(String) +# 1068| : +# 1068| getParameter(0): [Parameter] (unnamed parameter 0) +# 1068| Type = [Struct] String # 1068| [Constructor] void vector::vector(T) # 1068| : # 1068| getParameter(0): [Parameter] (unnamed parameter 0) @@ -9458,12 +9486,16 @@ ir.cpp: # 1069| : # 1070| [ConstMemberFunction] vector::iterator vector::begin() const # 1070| : +# 1070| [ConstMemberFunction] vector::iterator vector::begin() const +# 1070| : # 1070| [ConstMemberFunction] vector::iterator vector::begin() const # 1070| : # 1070| [ConstMemberFunction] vector::iterator vector::begin() const # 1070| : # 1071| [ConstMemberFunction] vector::iterator vector::end() const # 1071| : +# 1071| [ConstMemberFunction] vector::iterator vector::end() const +# 1071| : # 1071| [ConstMemberFunction] vector::iterator vector::end() const # 1071| : # 1071| [ConstMemberFunction] vector::iterator vector::end() const @@ -17160,6 +17192,909 @@ ir.cpp: # 2190| getExpr(): [ConstructorCall] call to ClassWithDestructor # 2190| Type = [VoidType] void # 2190| ValueCategory = prvalue +# 2194| [FunctionTemplateInstantiation,TopLevelFunction] ClassWithDestructor& vacuous_destructor_call::get(ClassWithDestructor&) +# 2194| : +# 2194| getParameter(0): [Parameter] t +# 2194| Type = [LValueReferenceType] ClassWithDestructor & +# 2194| getEntryPoint(): [BlockStmt] { ... } +# 2194| getStmt(0): [ReturnStmt] return ... +# 2194| getExpr(): [VariableAccess] t +# 2194| Type = [LValueReferenceType] ClassWithDestructor & +# 2194| ValueCategory = prvalue(load) +# 2194| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2194| Type = [LValueReferenceType] ClassWithDestructor & +# 2194| ValueCategory = prvalue +# 2194| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2194| Type = [Class] ClassWithDestructor +# 2194| ValueCategory = lvalue +# 2194| [TemplateFunction,TopLevelFunction] T& vacuous_destructor_call::get(T&) +# 2194| : +# 2194| getParameter(0): [Parameter] t +# 2194| Type = [LValueReferenceType] T & +# 2194| getEntryPoint(): [BlockStmt] { ... } +# 2194| getStmt(0): [ReturnStmt] return ... +# 2194| getExpr(): [VariableAccess] t +# 2194| Type = [LValueReferenceType] T & +# 2194| ValueCategory = prvalue(load) +# 2194| getExpr().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2194| Type = [TemplateParameter] T +# 2194| ValueCategory = lvalue +# 2194| [FunctionTemplateInstantiation,TopLevelFunction] int& vacuous_destructor_call::get(int&) +# 2194| : +# 2194| getParameter(0): [Parameter] t +# 2194| Type = [LValueReferenceType] int & +# 2194| getEntryPoint(): [BlockStmt] { ... } +# 2194| getStmt(0): [ReturnStmt] return ... +# 2194| getExpr(): [VariableAccess] t +# 2194| Type = [LValueReferenceType] int & +# 2194| ValueCategory = prvalue(load) +# 2194| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2194| Type = [LValueReferenceType] int & +# 2194| ValueCategory = prvalue +# 2194| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2194| Type = [IntType] int +# 2194| ValueCategory = lvalue +# 2197| [FunctionTemplateInstantiation,TopLevelFunction] void vacuous_destructor_call::call_destructor(ClassWithDestructor&) +# 2197| : +# 2197| getParameter(0): [Parameter] t +# 2197| Type = [LValueReferenceType] ClassWithDestructor & +# 2197| getEntryPoint(): [BlockStmt] { ... } +# 2198| getStmt(0): [ExprStmt] ExprStmt +# 2198| getExpr(): [DestructorCall] call to ~ClassWithDestructor +# 2198| Type = [VoidType] void +# 2198| ValueCategory = prvalue +# 2198| getQualifier(): [FunctionCall] call to get +# 2198| Type = [LValueReferenceType] ClassWithDestructor & +# 2198| ValueCategory = prvalue +# 2198| getArgument(0): [VariableAccess] t +# 2198| Type = [LValueReferenceType] ClassWithDestructor & +# 2198| ValueCategory = prvalue(load) +# 2198| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2198| Type = [LValueReferenceType] ClassWithDestructor & +# 2198| ValueCategory = prvalue +# 2198| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2198| Type = [Class] ClassWithDestructor +# 2198| ValueCategory = lvalue +# 2198| getQualifier().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2198| Type = [Class] ClassWithDestructor +# 2198| ValueCategory = lvalue +# 2199| getStmt(1): [ReturnStmt] return ... +# 2197| [TemplateFunction,TopLevelFunction] void vacuous_destructor_call::call_destructor(T&) +# 2197| : +# 2197| getParameter(0): [Parameter] t +# 2197| Type = [LValueReferenceType] T & +# 2197| getEntryPoint(): [BlockStmt] { ... } +# 2198| getStmt(0): [ExprStmt] ExprStmt +# 2198| getExpr(): [ExprCall] call to expression +# 2198| Type = [UnknownType] unknown +# 2198| ValueCategory = prvalue +# 2198| getExpr(): [Literal] Unknown literal +# 2198| Type = [UnknownType] unknown +# 2198| ValueCategory = prvalue +# 2198| getChild(-1): [ExprCall] call to expression +# 2198| Type = [UnknownType] unknown +# 2198| ValueCategory = prvalue +# 2198| getExpr(): [Literal] Unknown literal +# 2198| Type = [UnknownType] unknown +# 2198| ValueCategory = prvalue +# 2198| getArgument(0): [VariableAccess] t +# 2198| Type = [LValueReferenceType] T & +# 2198| ValueCategory = prvalue(load) +# 2198| getArgument(0).getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2198| Type = [TemplateParameter] T +# 2198| ValueCategory = lvalue +# 2199| getStmt(1): [ReturnStmt] return ... +# 2197| [FunctionTemplateInstantiation,TopLevelFunction] void vacuous_destructor_call::call_destructor(int&) +# 2197| : +# 2197| getParameter(0): [Parameter] t +# 2197| Type = [LValueReferenceType] int & +# 2197| getEntryPoint(): [BlockStmt] { ... } +# 2198| getStmt(0): [ExprStmt] ExprStmt +# 2198| getExpr(): [VacuousDestructorCall] (vacuous destructor call) +# 2198| Type = [VoidType] void +# 2198| ValueCategory = prvalue +# 2198| getChild(0): [FunctionCall] call to get +# 2198| Type = [LValueReferenceType] int & +# 2198| ValueCategory = prvalue +# 2198| getArgument(0): [VariableAccess] t +# 2198| Type = [LValueReferenceType] int & +# 2198| ValueCategory = prvalue(load) +# 2198| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2198| Type = [LValueReferenceType] int & +# 2198| ValueCategory = prvalue +# 2198| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2198| Type = [IntType] int +# 2198| ValueCategory = lvalue +# 2198| getChild(0).getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2198| Type = [IntType] int +# 2198| ValueCategory = lvalue +# 2199| getStmt(1): [ReturnStmt] return ... +# 2201| [TopLevelFunction] void vacuous_destructor_call::non_vacuous_destructor_call() +# 2201| : +# 2201| getEntryPoint(): [BlockStmt] { ... } +# 2202| getStmt(0): [DeclStmt] declaration +# 2202| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c +# 2202| Type = [Class] ClassWithDestructor +# 2202| getVariable().getInitializer(): [Initializer] initializer for c +# 2202| getExpr(): [ConstructorCall] call to ClassWithDestructor +# 2202| Type = [VoidType] void +# 2202| ValueCategory = prvalue +# 2203| getStmt(1): [ExprStmt] ExprStmt +# 2203| getExpr(): [FunctionCall] call to call_destructor +# 2203| Type = [VoidType] void +# 2203| ValueCategory = prvalue +# 2203| getArgument(0): [VariableAccess] c +# 2203| Type = [Class] ClassWithDestructor +# 2203| ValueCategory = lvalue +# 2203| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2203| Type = [LValueReferenceType] ClassWithDestructor & +# 2203| ValueCategory = prvalue +# 2204| getStmt(2): [ReturnStmt] return ... +# 2204| getImplicitDestructorCall(0): [DestructorCall] call to ~ClassWithDestructor +# 2204| Type = [VoidType] void +# 2204| ValueCategory = prvalue +# 2204| getQualifier(): [VariableAccess] c +# 2204| Type = [Class] ClassWithDestructor +# 2204| ValueCategory = lvalue +# 2206| [TopLevelFunction] void vacuous_destructor_call::vacuous_destructor_call() +# 2206| : +# 2206| getEntryPoint(): [BlockStmt] { ... } +# 2207| getStmt(0): [DeclStmt] declaration +# 2207| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i +# 2207| Type = [IntType] int +# 2208| getStmt(1): [ExprStmt] ExprStmt +# 2208| getExpr(): [FunctionCall] call to call_destructor +# 2208| Type = [VoidType] void +# 2208| ValueCategory = prvalue +# 2208| getArgument(0): [VariableAccess] i +# 2208| Type = [IntType] int +# 2208| ValueCategory = lvalue +# 2208| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2208| Type = [LValueReferenceType] int & +# 2208| ValueCategory = prvalue +# 2209| getStmt(2): [ReturnStmt] return ... +# 2212| [TopLevelFunction] void TryCatchDestructors(bool) +# 2212| : +# 2212| getParameter(0): [Parameter] b +# 2212| Type = [BoolType] bool +# 2212| getEntryPoint(): [BlockStmt] { ... } +# 2213| getStmt(0): [TryStmt] try { ... } +# 2213| getStmt(): [BlockStmt] { ... } +# 2214| getStmt(0): [DeclStmt] declaration +# 2214| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2214| Type = [Struct] String +# 2214| getVariable().getInitializer(): [Initializer] initializer for s +# 2214| getExpr(): [ConstructorCall] call to String +# 2214| Type = [VoidType] void +# 2214| ValueCategory = prvalue +# 2215| getStmt(1): [IfStmt] if (...) ... +# 2215| getCondition(): [VariableAccess] b +# 2215| Type = [BoolType] bool +# 2215| ValueCategory = prvalue(load) +# 2215| getThen(): [BlockStmt] { ... } +# 2216| getStmt(0): [ExprStmt] ExprStmt +# 2216| getExpr(): [ThrowExpr] throw ... +# 2216| Type = [PointerType] const char * +# 2216| ValueCategory = prvalue +# 2216| getExpr(): string literal +# 2216| Type = [ArrayType] const char[15] +# 2216| Value = [StringLiteral] "string literal" +# 2216| ValueCategory = lvalue +# 2219| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] s +# 2219| Type = [Struct] String +# 2219| ValueCategory = lvalue +# 2216| getExpr().getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2216| Type = [PointerType] const char * +# 2216| ValueCategory = prvalue +# 2218| getStmt(2): [DeclStmt] declaration +# 2218| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 +# 2218| Type = [Struct] String +# 2218| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2218| getExpr(): [ConstructorCall] call to String +# 2218| Type = [VoidType] void +# 2218| ValueCategory = prvalue +# 2219| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] s2 +# 2219| Type = [Struct] String +# 2219| ValueCategory = lvalue +# 2219| getImplicitDestructorCall(1): [DestructorCall] call to ~String +# 2219| Type = [VoidType] void +# 2219| ValueCategory = prvalue +# 2219| getQualifier(): [VariableAccess] s +# 2219| Type = [Struct] String +# 2219| ValueCategory = lvalue +# 2220| getChild(1): [Handler] +# 2220| getBlock(): [CatchBlock] { ... } +# 2221| getStmt(0): [ExprStmt] ExprStmt +# 2221| getExpr(): [ThrowExpr] throw ... +# 2221| Type = [Struct] String +# 2221| ValueCategory = prvalue +# 2221| getExpr(): [ConstructorCall] call to String +# 2221| Type = [VoidType] void +# 2221| ValueCategory = prvalue +# 2221| getArgument(0): [VariableAccess] s +# 2221| Type = [PointerType] const char * +# 2221| ValueCategory = prvalue(load) +# 2223| getChild(2): [Handler] +# 2223| getBlock(): [CatchBlock] { ... } +# 2225| getChild(3): [Handler] +# 2225| getBlock(): [CatchAnyBlock] { ... } +# 2226| getStmt(0): [ExprStmt] ExprStmt +# 2226| getExpr(): [ReThrowExpr] re-throw exception +# 2226| Type = [VoidType] void +# 2226| ValueCategory = prvalue +# 2228| getStmt(1): [ReturnStmt] return ... +# 2230| [TopLevelFunction] void IfDestructors(bool) +# 2230| : +# 2230| getParameter(0): [Parameter] b +# 2230| Type = [BoolType] bool +# 2230| getEntryPoint(): [BlockStmt] { ... } +# 2231| getStmt(0): [DeclStmt] declaration +# 2231| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s1 +# 2231| Type = [Struct] String +# 2231| getVariable().getInitializer(): [Initializer] initializer for s1 +# 2231| getExpr(): [ConstructorCall] call to String +# 2231| Type = [VoidType] void +# 2231| ValueCategory = prvalue +# 2232| getStmt(1): [IfStmt] if (...) ... +# 2232| getCondition(): [VariableAccess] b +# 2232| Type = [BoolType] bool +# 2232| ValueCategory = prvalue(load) +# 2232| getThen(): [BlockStmt] { ... } +# 2233| getStmt(0): [DeclStmt] declaration +# 2233| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 +# 2233| Type = [Struct] String +# 2233| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2233| getExpr(): [ConstructorCall] call to String +# 2233| Type = [VoidType] void +# 2233| ValueCategory = prvalue +# 2234| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2234| Type = [VoidType] void +# 2234| ValueCategory = prvalue +# 2234| getQualifier(): [VariableAccess] s2 +# 2234| Type = [Struct] String +# 2234| ValueCategory = lvalue +# 2234| getElse(): [BlockStmt] { ... } +# 2235| getStmt(0): [DeclStmt] declaration +# 2235| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s3 +# 2235| Type = [Struct] String +# 2235| getVariable().getInitializer(): [Initializer] initializer for s3 +# 2235| getExpr(): [ConstructorCall] call to String +# 2235| Type = [VoidType] void +# 2235| ValueCategory = prvalue +# 2236| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2236| Type = [VoidType] void +# 2236| ValueCategory = prvalue +# 2236| getQualifier(): [VariableAccess] s3 +# 2236| Type = [Struct] String +# 2236| ValueCategory = lvalue +# 2237| getStmt(2): [DeclStmt] declaration +# 2237| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s4 +# 2237| Type = [Struct] String +# 2237| getVariable().getInitializer(): [Initializer] initializer for s4 +# 2237| getExpr(): [ConstructorCall] call to String +# 2237| Type = [VoidType] void +# 2237| ValueCategory = prvalue +# 2238| getStmt(3): [ReturnStmt] return ... +# 2238| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2238| Type = [VoidType] void +# 2238| ValueCategory = prvalue +# 2238| getQualifier(): [VariableAccess] s4 +# 2238| Type = [Struct] String +# 2238| ValueCategory = lvalue +# 2238| getImplicitDestructorCall(1): [DestructorCall] call to ~String +# 2238| Type = [VoidType] void +# 2238| ValueCategory = prvalue +# 2238| getQualifier(): [VariableAccess] s1 +# 2238| Type = [Struct] String +# 2238| ValueCategory = lvalue +# 2240| [TopLevelFunction] void ForDestructors() +# 2240| : +# 2240| getEntryPoint(): [BlockStmt] { ... } +# 2241| getStmt(0): [DeclStmt] declaration +# 2241| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c +# 2241| Type = [PlainCharType] char +# 2241| getVariable().getInitializer(): [Initializer] initializer for c +# 2241| getExpr(): [CharLiteral] 97 +# 2241| Type = [PlainCharType] char +# 2241| Value = [CharLiteral] 97 +# 2241| ValueCategory = prvalue +# 2242| getStmt(1): [ForStmt] for(...;...;...) ... +# 2242| getInitialization(): [DeclStmt] declaration +# 2242| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2242| Type = [Struct] String +# 2242| getVariable().getInitializer(): [Initializer] initializer for s +# 2242| getExpr(): [ConstructorCall] call to String +# 2242| Type = [VoidType] void +# 2242| ValueCategory = prvalue +# 2242| getArgument(0): hello +# 2242| Type = [ArrayType] const char[6] +# 2242| Value = [StringLiteral] "hello" +# 2242| ValueCategory = lvalue +# 2242| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2242| Type = [PointerType] const char * +# 2242| ValueCategory = prvalue +# 2242| getCondition(): [NEExpr] ... != ... +# 2242| Type = [BoolType] bool +# 2242| ValueCategory = prvalue +# 2242| getLeftOperand(): [VariableAccess] c +# 2242| Type = [PlainCharType] char +# 2242| ValueCategory = prvalue(load) +# 2242| getRightOperand(): [Literal] 0 +# 2242| Type = [IntType] int +# 2242| Value = [Literal] 0 +# 2242| ValueCategory = prvalue +# 2242| getLeftOperand().getFullyConverted(): [CStyleCast] (int)... +# 2242| Conversion = [IntegralConversion] integral conversion +# 2242| Type = [IntType] int +# 2242| ValueCategory = prvalue +# 2242| getUpdate(): [AssignExpr] ... = ... +# 2242| Type = [PlainCharType] char +# 2242| ValueCategory = lvalue +# 2242| getLValue(): [VariableAccess] c +# 2242| Type = [PlainCharType] char +# 2242| ValueCategory = lvalue +# 2242| getRValue(): [FunctionCall] call to pop_back +# 2242| Type = [PlainCharType] char +# 2242| ValueCategory = prvalue +# 2242| getQualifier(): [VariableAccess] s +# 2242| Type = [Struct] String +# 2242| ValueCategory = lvalue +# 2242| getStmt(): [BlockStmt] { ... } +# 2243| getStmt(0): [DeclStmt] declaration +# 2243| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 +# 2243| Type = [Struct] String +# 2243| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2243| getExpr(): [ConstructorCall] call to String +# 2243| Type = [VoidType] void +# 2243| ValueCategory = prvalue +# 2244| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2244| Type = [VoidType] void +# 2244| ValueCategory = prvalue +# 2244| getQualifier(): [VariableAccess] s2 +# 2244| Type = [Struct] String +# 2244| ValueCategory = lvalue +# 2242| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2242| Type = [VoidType] void +# 2242| ValueCategory = prvalue +# 2242| getQualifier(): [VariableAccess] s +# 2242| Type = [Struct] String +# 2242| ValueCategory = lvalue +# 2246| getStmt(2): [RangeBasedForStmt] for(...:...) ... +# 2246| getChild(1): [DeclStmt] declaration +# 2246| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__range) +# 2246| Type = [RValueReferenceType] vector && +#-----| getVariable().getInitializer(): [Initializer] initializer for (__range) +# 2246| getExpr(): [ConstructorCall] call to vector +# 2246| Type = [VoidType] void +# 2246| ValueCategory = prvalue +# 2246| getArgument(0): [ConstructorCall] call to String +# 2246| Type = [VoidType] void +# 2246| ValueCategory = prvalue +# 2246| getArgument(0): hello +# 2246| Type = [ArrayType] const char[6] +# 2246| Value = [StringLiteral] "hello" +# 2246| ValueCategory = lvalue +# 2246| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2246| Type = [PointerType] const char * +# 2246| ValueCategory = prvalue +# 2246| getArgument(0).getFullyConverted(): [TemporaryObjectExpr] temporary object +# 2246| Type = [Struct] String +# 2246| ValueCategory = lvalue +# 2246| getExpr().getFullyConverted(): [ReferenceToExpr] (reference to) +# 2246| Type = [LValueReferenceType] vector & +# 2246| ValueCategory = prvalue +# 2246| getExpr(): [TemporaryObjectExpr] temporary object +# 2246| Type = [ClassTemplateInstantiation,Struct] vector +# 2246| ValueCategory = xvalue +# 2246| getBeginEndDeclaration(): [DeclStmt] declaration +# 2246| getDeclarationEntry(0): [VariableDeclarationEntry] declaration of (__begin) +# 2246| Type = [NestedStruct] iterator +#-----| getVariable().getInitializer(): [Initializer] initializer for (__begin) +# 2246| getExpr(): [FunctionCall] call to begin +# 2246| Type = [NestedStruct] iterator +# 2246| ValueCategory = prvalue +# 2246| getQualifier(): [VariableAccess] (__range) +# 2246| Type = [RValueReferenceType] vector && +# 2246| ValueCategory = prvalue(load) +#-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... +#-----| Conversion = [GlvalueConversion] glvalue conversion +#-----| Type = [SpecifiedType] const vector +#-----| ValueCategory = lvalue +#-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +#-----| Type = [ClassTemplateInstantiation,Struct] vector +#-----| ValueCategory = lvalue +# 2246| getDeclarationEntry(1): [VariableDeclarationEntry] declaration of (__end) +# 2246| Type = [NestedStruct] iterator +#-----| getVariable().getInitializer(): [Initializer] initializer for (__end) +# 2246| getExpr(): [FunctionCall] call to end +# 2246| Type = [NestedStruct] iterator +# 2246| ValueCategory = prvalue +# 2246| getQualifier(): [VariableAccess] (__range) +# 2246| Type = [RValueReferenceType] vector && +# 2246| ValueCategory = prvalue(load) +#-----| getQualifier().getFullyConverted(): [CStyleCast] (const vector)... +#-----| Conversion = [GlvalueConversion] glvalue conversion +#-----| Type = [SpecifiedType] const vector +#-----| ValueCategory = lvalue +#-----| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +#-----| Type = [ClassTemplateInstantiation,Struct] vector +#-----| ValueCategory = lvalue +# 2246| getCondition(): [FunctionCall] call to operator!= +# 2246| Type = [BoolType] bool +# 2246| ValueCategory = prvalue +# 2246| getQualifier(): [VariableAccess] (__begin) +# 2246| Type = [NestedStruct] iterator +# 2246| ValueCategory = lvalue +# 2246| getArgument(0): [VariableAccess] (__end) +# 2246| Type = [NestedStruct] iterator +# 2246| ValueCategory = prvalue(load) +#-----| getQualifier().getFullyConverted(): [CStyleCast] (const iterator)... +#-----| Conversion = [GlvalueConversion] glvalue conversion +#-----| Type = [SpecifiedType] const iterator +#-----| ValueCategory = lvalue +# 2246| getUpdate(): [FunctionCall] call to operator++ +# 2246| Type = [LValueReferenceType] iterator & +# 2246| ValueCategory = prvalue +# 2246| getQualifier(): [VariableAccess] (__begin) +# 2246| Type = [NestedStruct] iterator +# 2246| ValueCategory = lvalue +# 2246| getChild(5): [DeclStmt] declaration +# 2246| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2246| Type = [Struct] String +# 2246| getVariable().getInitializer(): [Initializer] initializer for s +# 2246| getExpr(): [ConstructorCall] call to String +# 2246| Type = [VoidType] void +# 2246| ValueCategory = prvalue +# 2246| getArgument(0): [OverloadedPointerDereferenceExpr] call to operator* +# 2246| Type = [LValueReferenceType] String & +# 2246| ValueCategory = prvalue +# 2246| getQualifier(): [VariableAccess] (__begin) +# 2246| Type = [NestedStruct] iterator +# 2246| ValueCategory = lvalue +#-----| getQualifier().getFullyConverted(): [CStyleCast] (const iterator)... +#-----| Conversion = [GlvalueConversion] glvalue conversion +#-----| Type = [SpecifiedType] const iterator +#-----| ValueCategory = lvalue +# 2246| getArgument(0).getFullyConverted(): [ReferenceToExpr] (reference to) +# 2246| Type = [LValueReferenceType] const String & +# 2246| ValueCategory = prvalue +# 2246| getExpr(): [CStyleCast] (const String)... +# 2246| Conversion = [GlvalueConversion] glvalue conversion +# 2246| Type = [SpecifiedType] const String +# 2246| ValueCategory = lvalue +# 2246| getExpr(): [ReferenceDereferenceExpr] (reference dereference) +# 2246| Type = [Struct] String +# 2246| ValueCategory = lvalue +# 2246| getStmt(): [BlockStmt] { ... } +# 2247| getStmt(0): [DeclStmt] declaration +# 2247| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 +# 2247| Type = [Struct] String +# 2247| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2247| getExpr(): [ConstructorCall] call to String +# 2247| Type = [VoidType] void +# 2247| ValueCategory = prvalue +# 2248| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2248| Type = [VoidType] void +# 2248| ValueCategory = prvalue +# 2248| getQualifier(): [VariableAccess] s2 +# 2248| Type = [Struct] String +# 2248| ValueCategory = lvalue +# 2246| getImplicitDestructorCall(1): [DestructorCall] call to ~String +# 2246| Type = [VoidType] void +# 2246| ValueCategory = prvalue +# 2246| getQualifier(): [VariableAccess] s +# 2246| Type = [Struct] String +# 2246| ValueCategory = lvalue +# 2246| getUpdate().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference) +# 2246| Type = [NestedStruct] iterator +# 2246| ValueCategory = lvalue +# 2250| getStmt(3): [ForStmt] for(...;...;...) ... +# 2250| getInitialization(): [DeclStmt] declaration +# 2250| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2250| Type = [Struct] String +# 2250| getVariable().getInitializer(): [Initializer] initializer for s +# 2250| getExpr(): [ConstructorCall] call to String +# 2250| Type = [VoidType] void +# 2250| ValueCategory = prvalue +# 2250| getArgument(0): hello +# 2250| Type = [ArrayType] const char[6] +# 2250| Value = [StringLiteral] "hello" +# 2250| ValueCategory = lvalue +# 2250| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2250| Type = [PointerType] const char * +# 2250| ValueCategory = prvalue +# 2250| getDeclarationEntry(1): [VariableDeclarationEntry] definition of s2 +# 2250| Type = [Struct] String +# 2250| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2250| getExpr(): [ConstructorCall] call to String +# 2250| Type = [VoidType] void +# 2250| ValueCategory = prvalue +# 2250| getArgument(0): world +# 2250| Type = [ArrayType] const char[6] +# 2250| Value = [StringLiteral] "world" +# 2250| ValueCategory = lvalue +# 2250| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2250| Type = [PointerType] const char * +# 2250| ValueCategory = prvalue +# 2250| getCondition(): [NEExpr] ... != ... +# 2250| Type = [BoolType] bool +# 2250| ValueCategory = prvalue +# 2250| getLeftOperand(): [VariableAccess] c +# 2250| Type = [PlainCharType] char +# 2250| ValueCategory = prvalue(load) +# 2250| getRightOperand(): [Literal] 0 +# 2250| Type = [IntType] int +# 2250| Value = [Literal] 0 +# 2250| ValueCategory = prvalue +# 2250| getLeftOperand().getFullyConverted(): [CStyleCast] (int)... +# 2250| Conversion = [IntegralConversion] integral conversion +# 2250| Type = [IntType] int +# 2250| ValueCategory = prvalue +# 2250| getUpdate(): [AssignExpr] ... = ... +# 2250| Type = [PlainCharType] char +# 2250| ValueCategory = lvalue +# 2250| getLValue(): [VariableAccess] c +# 2250| Type = [PlainCharType] char +# 2250| ValueCategory = lvalue +# 2250| getRValue(): [FunctionCall] call to pop_back +# 2250| Type = [PlainCharType] char +# 2250| ValueCategory = prvalue +# 2250| getQualifier(): [VariableAccess] s +# 2250| Type = [Struct] String +# 2250| ValueCategory = lvalue +# 2250| getStmt(): [BlockStmt] { ... } +# 2251| getStmt(0): [ExprStmt] ExprStmt +# 2251| getExpr(): [AssignExpr] ... = ... +# 2251| Type = [PlainCharType] char +# 2251| ValueCategory = lvalue +# 2251| getLValue(): [VariableAccess] c +# 2251| Type = [PlainCharType] char +# 2251| ValueCategory = lvalue +# 2251| getRValue(): [Literal] 0 +# 2251| Type = [IntType] int +# 2251| Value = [Literal] 0 +# 2251| ValueCategory = prvalue +# 2251| getRValue().getFullyConverted(): [CStyleCast] (char)... +# 2251| Conversion = [IntegralConversion] integral conversion +# 2251| Type = [PlainCharType] char +# 2251| Value = [CStyleCast] 0 +# 2251| ValueCategory = prvalue +# 2250| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2250| Type = [VoidType] void +# 2250| ValueCategory = prvalue +# 2250| getQualifier(): [VariableAccess] s2 +# 2250| Type = [Struct] String +# 2250| ValueCategory = lvalue +# 2250| getImplicitDestructorCall(1): [DestructorCall] call to ~String +# 2250| Type = [VoidType] void +# 2250| ValueCategory = prvalue +# 2250| getQualifier(): [VariableAccess] s +# 2250| Type = [Struct] String +# 2250| ValueCategory = lvalue +# 2253| getStmt(4): [ReturnStmt] return ... +# 2255| [TopLevelFunction] void IfDestructors2(bool) +# 2255| : +# 2255| getParameter(0): [Parameter] b +# 2255| Type = [BoolType] bool +# 2255| getEntryPoint(): [BlockStmt] { ... } +# 2256| getStmt(0): [IfStmt] if (...) ... +# 2256| getInitialization(): [DeclStmt] declaration +# 2256| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2256| Type = [Struct] String +# 2256| getVariable().getInitializer(): [Initializer] initializer for s +# 2256| getExpr(): [ConstructorCall] call to String +# 2256| Type = [VoidType] void +# 2256| ValueCategory = prvalue +# 2256| getArgument(0): hello +# 2256| Type = [ArrayType] const char[6] +# 2256| Value = [StringLiteral] "hello" +# 2256| ValueCategory = lvalue +# 2256| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 2256| Type = [PointerType] const char * +# 2256| ValueCategory = prvalue +# 2256| getCondition(): [VariableAccess] b +# 2256| Type = [BoolType] bool +# 2256| ValueCategory = prvalue(load) +# 2256| getThen(): [BlockStmt] { ... } +# 2257| getStmt(0): [DeclStmt] declaration +# 2257| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x +# 2257| Type = [IntType] int +# 2257| getVariable().getInitializer(): [Initializer] initializer for x +# 2257| getExpr(): [Literal] 0 +# 2257| Type = [IntType] int +# 2257| Value = [Literal] 0 +# 2257| ValueCategory = prvalue +# 2258| getElse(): [BlockStmt] { ... } +# 2259| getStmt(0): [DeclStmt] declaration +# 2259| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y +# 2259| Type = [IntType] int +# 2259| getVariable().getInitializer(): [Initializer] initializer for y +# 2259| getExpr(): [Literal] 0 +# 2259| Type = [IntType] int +# 2259| Value = [Literal] 0 +# 2259| ValueCategory = prvalue +# 2260| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2260| Type = [VoidType] void +# 2260| ValueCategory = prvalue +# 2260| getQualifier(): [VariableAccess] s +# 2260| Type = [Struct] String +# 2260| ValueCategory = lvalue +# 2261| getStmt(1): [ReturnStmt] return ... +# 2263| [CopyAssignmentOperator] Bool& Bool::operator=(Bool const&) +# 2263| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const Bool & +# 2263| [CopyConstructor] void Bool::Bool(Bool const&) +# 2263| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const Bool & +# 2265| [Constructor] void Bool::Bool(bool) +# 2265| : +# 2265| getParameter(0): [Parameter] b_ +# 2265| Type = [BoolType] bool +# 2266| [ConversionOperator] bool Bool::operator bool() +# 2266| : +# 2267| [Destructor] void Bool::~Bool() +# 2267| : +# 2270| [TopLevelFunction] void IfDestructors3(bool) +# 2270| : +# 2270| getParameter(0): [Parameter] b +# 2270| Type = [BoolType] bool +# 2270| getEntryPoint(): [BlockStmt] { ... } +# 2271| getStmt(0): [IfStmt] if (...) ... +# 2271| getCondition(): [ConditionDeclExpr] (condition decl) +# 2271| Type = [BoolType] bool +# 2271| ValueCategory = prvalue +# 2271| getChild(0): [FunctionCall] call to operator bool +# 2271| Type = [BoolType] bool +# 2271| ValueCategory = prvalue +# 2271| getQualifier(): [VariableAccess] B +# 2271| Type = [Class] Bool +# 2271| ValueCategory = prvalue(load) +# 2271| getThen(): [BlockStmt] { ... } +# 2272| getStmt(0): [DeclStmt] declaration +# 2272| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s1 +# 2272| Type = [Struct] String +# 2272| getVariable().getInitializer(): [Initializer] initializer for s1 +# 2272| getExpr(): [ConstructorCall] call to String +# 2272| Type = [VoidType] void +# 2272| ValueCategory = prvalue +# 2273| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2273| Type = [VoidType] void +# 2273| ValueCategory = prvalue +# 2273| getQualifier(): [VariableAccess] s1 +# 2273| Type = [Struct] String +# 2273| ValueCategory = lvalue +# 2273| getElse(): [BlockStmt] { ... } +# 2274| getStmt(0): [DeclStmt] declaration +# 2274| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s2 +# 2274| Type = [Struct] String +# 2274| getVariable().getInitializer(): [Initializer] initializer for s2 +# 2274| getExpr(): [ConstructorCall] call to String +# 2274| Type = [VoidType] void +# 2274| ValueCategory = prvalue +# 2275| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2275| Type = [VoidType] void +# 2275| ValueCategory = prvalue +# 2275| getQualifier(): [VariableAccess] s2 +# 2275| Type = [Struct] String +# 2275| ValueCategory = lvalue +# 2275| getImplicitDestructorCall(0): [DestructorCall] call to ~Bool +# 2275| Type = [VoidType] void +# 2275| ValueCategory = prvalue +# 2275| getQualifier(): [VariableAccess] B +# 2275| Type = [Class] Bool +# 2275| ValueCategory = lvalue +# 2276| getStmt(1): [ReturnStmt] return ... +# 2278| [TopLevelFunction] void WhileLoopDestructors(bool) +# 2278| : +# 2278| getParameter(0): [Parameter] b +# 2278| Type = [BoolType] bool +# 2278| getEntryPoint(): [BlockStmt] { ... } +# 2279| getStmt(0): [BlockStmt] { ... } +# 2280| getStmt(0): [DeclStmt] declaration +# 2280| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2280| Type = [Struct] String +# 2280| getVariable().getInitializer(): [Initializer] initializer for s +# 2280| getExpr(): [ConstructorCall] call to String +# 2280| Type = [VoidType] void +# 2280| ValueCategory = prvalue +# 2281| getStmt(1): [WhileStmt] while (...) ... +# 2281| getCondition(): [VariableAccess] b +# 2281| Type = [BoolType] bool +# 2281| ValueCategory = prvalue(load) +# 2281| getStmt(): [BlockStmt] { ... } +# 2282| getStmt(0): [ExprStmt] ExprStmt +# 2282| getExpr(): [AssignExpr] ... = ... +# 2282| Type = [BoolType] bool +# 2282| ValueCategory = lvalue +# 2282| getLValue(): [VariableAccess] b +# 2282| Type = [BoolType] bool +# 2282| ValueCategory = lvalue +# 2282| getRValue(): [Literal] 0 +# 2282| Type = [BoolType] bool +# 2282| Value = [Literal] 0 +# 2282| ValueCategory = prvalue +# 2284| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2284| Type = [VoidType] void +# 2284| ValueCategory = prvalue +# 2284| getQualifier(): [VariableAccess] s +# 2284| Type = [Struct] String +# 2284| ValueCategory = lvalue +# 2286| getStmt(1): [BlockStmt] { ... } +# 2287| getStmt(0): [WhileStmt] while (...) ... +# 2287| getCondition(): [ConditionDeclExpr] (condition decl) +# 2287| Type = [BoolType] bool +# 2287| ValueCategory = prvalue +# 2287| getChild(0): [FunctionCall] call to operator bool +# 2287| Type = [BoolType] bool +# 2287| ValueCategory = prvalue +# 2287| getQualifier(): [VariableAccess] B +# 2287| Type = [Class] Bool +# 2287| ValueCategory = prvalue(load) +# 2287| getStmt(): [BlockStmt] { ... } +# 2288| getStmt(0): [ExprStmt] ExprStmt +# 2288| getExpr(): [AssignExpr] ... = ... +# 2288| Type = [BoolType] bool +# 2288| ValueCategory = lvalue +# 2288| getLValue(): [VariableAccess] b +# 2288| Type = [BoolType] bool +# 2288| ValueCategory = lvalue +# 2288| getRValue(): [Literal] 0 +# 2288| Type = [BoolType] bool +# 2288| Value = [Literal] 0 +# 2288| ValueCategory = prvalue +# 2289| getImplicitDestructorCall(0): [DestructorCall] call to ~Bool +# 2289| Type = [VoidType] void +# 2289| ValueCategory = prvalue +# 2289| getQualifier(): [VariableAccess] B +# 2289| Type = [Class] Bool +# 2289| ValueCategory = lvalue +# 2289| getImplicitDestructorCall(0): [DestructorCall] call to ~Bool +# 2289| Type = [VoidType] void +# 2289| ValueCategory = prvalue +# 2289| getQualifier(): [VariableAccess] B +# 2289| Type = [Class] Bool +# 2289| ValueCategory = lvalue +# 2291| getStmt(2): [ReturnStmt] return ... +# 2293| [TopLevelFunction] void VoidFunc() +# 2293| : +# 2293| getEntryPoint(): [BlockStmt] { ... } +# 2293| getStmt(0): [ReturnStmt] return ... +# 2295| [TopLevelFunction] void IfReturnDestructors(bool) +# 2295| : +# 2295| getParameter(0): [Parameter] b +# 2295| Type = [BoolType] bool +# 2295| getEntryPoint(): [BlockStmt] { ... } +# 2296| getStmt(0): [DeclStmt] declaration +# 2296| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2296| Type = [Struct] String +# 2296| getVariable().getInitializer(): [Initializer] initializer for s +# 2296| getExpr(): [ConstructorCall] call to String +# 2296| Type = [VoidType] void +# 2296| ValueCategory = prvalue +# 2297| getStmt(1): [IfStmt] if (...) ... +# 2297| getCondition(): [VariableAccess] b +# 2297| Type = [BoolType] bool +# 2297| ValueCategory = prvalue(load) +# 2297| getThen(): [BlockStmt] { ... } +# 2298| getStmt(0): [ReturnStmt] return ... +# 2304| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2304| Type = [VoidType] void +# 2304| ValueCategory = prvalue +# 2304| getQualifier(): [VariableAccess] s +# 2304| Type = [Struct] String +# 2304| ValueCategory = lvalue +# 2300| getStmt(2): [IfStmt] if (...) ... +# 2300| getCondition(): [VariableAccess] b +# 2300| Type = [BoolType] bool +# 2300| ValueCategory = prvalue(load) +# 2300| getThen(): [BlockStmt] { ... } +# 2301| getStmt(0): [ReturnStmt] return ... +# 2301| getExpr(): [FunctionCall] call to VoidFunc +# 2301| Type = [VoidType] void +# 2301| ValueCategory = prvalue +# 2304| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2304| Type = [VoidType] void +# 2304| ValueCategory = prvalue +# 2304| getQualifier(): [VariableAccess] s +# 2304| Type = [Struct] String +# 2304| ValueCategory = lvalue +# 2303| getStmt(3): [ExprStmt] ExprStmt +# 2303| getExpr(): [VariableAccess] s +# 2303| Type = [Struct] String +# 2303| ValueCategory = lvalue +# 2304| getStmt(4): [ReturnStmt] return ... +# 2304| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2304| Type = [VoidType] void +# 2304| ValueCategory = prvalue +# 2304| getQualifier(): [VariableAccess] s +# 2304| Type = [Struct] String +# 2304| ValueCategory = lvalue +# 2306| [TopLevelFunction] int IfReturnDestructors3(bool) +# 2306| : +# 2306| getParameter(0): [Parameter] b +# 2306| Type = [BoolType] bool +# 2306| getEntryPoint(): [BlockStmt] { ... } +# 2307| getStmt(0): [DeclStmt] declaration +# 2307| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2307| Type = [Struct] String +# 2307| getVariable().getInitializer(): [Initializer] initializer for s +# 2307| getExpr(): [ConstructorCall] call to String +# 2307| Type = [VoidType] void +# 2307| ValueCategory = prvalue +# 2308| getStmt(1): [IfStmt] if (...) ... +# 2308| getCondition(): [VariableAccess] b +# 2308| Type = [BoolType] bool +# 2308| ValueCategory = prvalue(load) +# 2308| getThen(): [BlockStmt] { ... } +# 2309| getStmt(0): [ReturnStmt] return ... +# 2309| getExpr(): [Literal] 1 +# 2309| Type = [IntType] int +# 2309| Value = [Literal] 1 +# 2309| ValueCategory = prvalue +# 2312| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2312| Type = [VoidType] void +# 2312| ValueCategory = prvalue +# 2312| getQualifier(): [VariableAccess] s +# 2312| Type = [Struct] String +# 2312| ValueCategory = lvalue +# 2311| getStmt(2): [ReturnStmt] return ... +# 2311| getExpr(): [Literal] 0 +# 2311| Type = [IntType] int +# 2311| Value = [Literal] 0 +# 2311| ValueCategory = prvalue +# 2312| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2312| Type = [VoidType] void +# 2312| ValueCategory = prvalue +# 2312| getQualifier(): [VariableAccess] s +# 2312| Type = [Struct] String +# 2312| ValueCategory = lvalue +# 2314| [TopLevelFunction] void VoidReturnDestructors() +# 2314| : +# 2314| getEntryPoint(): [BlockStmt] { ... } +# 2315| getStmt(0): [DeclStmt] declaration +# 2315| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 2315| Type = [Struct] String +# 2315| getVariable().getInitializer(): [Initializer] initializer for s +# 2315| getExpr(): [ConstructorCall] call to String +# 2315| Type = [VoidType] void +# 2315| ValueCategory = prvalue +# 2316| getStmt(1): [ReturnStmt] return ... +# 2316| getExpr(): [FunctionCall] call to VoidFunc +# 2316| Type = [VoidType] void +# 2316| ValueCategory = prvalue +# 2317| getImplicitDestructorCall(0): [DestructorCall] call to ~String +# 2317| Type = [VoidType] void +# 2317| ValueCategory = prvalue +# 2317| getQualifier(): [VariableAccess] s +# 2317| Type = [Struct] String +# 2317| ValueCategory = lvalue +# 2320| [CopyAssignmentOperator] return_routine_type::HasVoidToIntFunc& return_routine_type::HasVoidToIntFunc::operator=(return_routine_type::HasVoidToIntFunc const&) +# 2320| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const HasVoidToIntFunc & +# 2320| [MoveAssignmentOperator] return_routine_type::HasVoidToIntFunc& return_routine_type::HasVoidToIntFunc::operator=(return_routine_type::HasVoidToIntFunc&&) +# 2320| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [RValueReferenceType] HasVoidToIntFunc && +# 2322| [MemberFunction] void return_routine_type::HasVoidToIntFunc::VoidToInt(int) +# 2322| : +# 2322| getParameter(0): [Parameter] (unnamed parameter 0) +# 2322| Type = [IntType] int +# 2327| [TopLevelFunction] return_routine_type::VoidToIntMemberFunc return_routine_type::GetVoidToIntFunc() +# 2327| : +# 2328| getEntryPoint(): [BlockStmt] { ... } +# 2329| getStmt(0): [ReturnStmt] return ... +# 2329| getExpr(): [FunctionAccess] VoidToInt +# 2329| Type = [RoutineType] ..()(..) +# 2329| ValueCategory = prvalue perf-regression.cpp: # 4| [CopyAssignmentOperator] Big& Big::operator=(Big const&) # 4| : diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected index d9b4056f20e..510a271b7ac 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected @@ -3628,50 +3628,82 @@ ir.cpp: # 615| void DeclareObject() # 615| Block 0 -# 615| v615_1(void) = EnterFunction : -# 615| m615_2(unknown) = AliasedDefinition : -# 615| m615_3(unknown) = InitializeNonLocal : -# 615| m615_4(unknown) = Chi : total:m615_2, partial:m615_3 -# 616| r616_1(glval) = VariableAddress[s1] : -# 616| m616_2(String) = Uninitialized[s1] : &:r616_1 -# 616| r616_3(glval) = FunctionAddress[String] : -# 616| v616_4(void) = Call[String] : func:r616_3, this:r616_1 -# 616| m616_5(unknown) = ^CallSideEffect : ~m615_4 -# 616| m616_6(unknown) = Chi : total:m615_4, partial:m616_5 -# 616| m616_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r616_1 -# 616| m616_8(String) = Chi : total:m616_2, partial:m616_7 -# 617| r617_1(glval) = VariableAddress[s2] : -# 617| m617_2(String) = Uninitialized[s2] : &:r617_1 -# 617| r617_3(glval) = FunctionAddress[String] : -# 617| r617_4(glval) = StringConstant["hello"] : -# 617| r617_5(char *) = Convert : r617_4 -# 617| v617_6(void) = Call[String] : func:r617_3, this:r617_1, 0:r617_5 -# 617| m617_7(unknown) = ^CallSideEffect : ~m616_6 -# 617| m617_8(unknown) = Chi : total:m616_6, partial:m617_7 -# 617| v617_9(void) = ^BufferReadSideEffect[0] : &:r617_5, ~m615_3 -# 617| m617_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r617_1 -# 617| m617_11(String) = Chi : total:m617_2, partial:m617_10 -# 618| r618_1(glval) = VariableAddress[s3] : -# 618| r618_2(glval) = FunctionAddress[ReturnObject] : -# 618| r618_3(String) = Call[ReturnObject] : func:r618_2 -# 618| m618_4(unknown) = ^CallSideEffect : ~m617_8 -# 618| m618_5(unknown) = Chi : total:m617_8, partial:m618_4 -# 618| m618_6(String) = Store[s3] : &:r618_1, r618_3 -# 619| r619_1(glval) = VariableAddress[s4] : -# 619| m619_2(String) = Uninitialized[s4] : &:r619_1 -# 619| r619_3(glval) = FunctionAddress[String] : -# 619| r619_4(glval) = StringConstant["test"] : -# 619| r619_5(char *) = Convert : r619_4 -# 619| v619_6(void) = Call[String] : func:r619_3, this:r619_1, 0:r619_5 -# 619| m619_7(unknown) = ^CallSideEffect : ~m618_5 -# 619| m619_8(unknown) = Chi : total:m618_5, partial:m619_7 -# 619| v619_9(void) = ^BufferReadSideEffect[0] : &:r619_5, ~m615_3 -# 619| m619_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r619_1 -# 619| m619_11(String) = Chi : total:m619_2, partial:m619_10 -# 620| v620_1(void) = NoOp : -# 615| v615_5(void) = ReturnVoid : -# 615| v615_6(void) = AliasedUse : ~m619_8 -# 615| v615_7(void) = ExitFunction : +# 615| v615_1(void) = EnterFunction : +# 615| m615_2(unknown) = AliasedDefinition : +# 615| m615_3(unknown) = InitializeNonLocal : +# 615| m615_4(unknown) = Chi : total:m615_2, partial:m615_3 +# 616| r616_1(glval) = VariableAddress[s1] : +# 616| m616_2(String) = Uninitialized[s1] : &:r616_1 +# 616| r616_3(glval) = FunctionAddress[String] : +# 616| v616_4(void) = Call[String] : func:r616_3, this:r616_1 +# 616| m616_5(unknown) = ^CallSideEffect : ~m615_4 +# 616| m616_6(unknown) = Chi : total:m615_4, partial:m616_5 +# 616| m616_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r616_1 +# 616| m616_8(String) = Chi : total:m616_2, partial:m616_7 +# 617| r617_1(glval) = VariableAddress[s2] : +# 617| m617_2(String) = Uninitialized[s2] : &:r617_1 +# 617| r617_3(glval) = FunctionAddress[String] : +# 617| r617_4(glval) = StringConstant["hello"] : +# 617| r617_5(char *) = Convert : r617_4 +# 617| v617_6(void) = Call[String] : func:r617_3, this:r617_1, 0:r617_5 +# 617| m617_7(unknown) = ^CallSideEffect : ~m616_6 +# 617| m617_8(unknown) = Chi : total:m616_6, partial:m617_7 +# 617| v617_9(void) = ^BufferReadSideEffect[0] : &:r617_5, ~m615_3 +# 617| m617_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r617_1 +# 617| m617_11(String) = Chi : total:m617_2, partial:m617_10 +# 618| r618_1(glval) = VariableAddress[s3] : +# 618| r618_2(glval) = FunctionAddress[ReturnObject] : +# 618| r618_3(String) = Call[ReturnObject] : func:r618_2 +# 618| m618_4(unknown) = ^CallSideEffect : ~m617_8 +# 618| m618_5(unknown) = Chi : total:m617_8, partial:m618_4 +# 618| m618_6(String) = Store[s3] : &:r618_1, r618_3 +# 619| r619_1(glval) = VariableAddress[s4] : +# 619| m619_2(String) = Uninitialized[s4] : &:r619_1 +# 619| r619_3(glval) = FunctionAddress[String] : +# 619| r619_4(glval) = StringConstant["test"] : +# 619| r619_5(char *) = Convert : r619_4 +# 619| v619_6(void) = Call[String] : func:r619_3, this:r619_1, 0:r619_5 +# 619| m619_7(unknown) = ^CallSideEffect : ~m618_5 +# 619| m619_8(unknown) = Chi : total:m618_5, partial:m619_7 +# 619| v619_9(void) = ^BufferReadSideEffect[0] : &:r619_5, ~m615_3 +# 619| m619_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r619_1 +# 619| m619_11(String) = Chi : total:m619_2, partial:m619_10 +# 620| v620_1(void) = NoOp : +# 620| r620_2(glval) = VariableAddress[s4] : +# 620| r620_3(glval) = FunctionAddress[~String] : +# 620| v620_4(void) = Call[~String] : func:r620_3, this:r620_2 +# 620| m620_5(unknown) = ^CallSideEffect : ~m619_8 +# 620| m620_6(unknown) = Chi : total:m619_8, partial:m620_5 +# 620| v620_7(void) = ^IndirectReadSideEffect[-1] : &:r620_2, m619_11 +# 620| m620_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r620_2 +# 620| m620_9(String) = Chi : total:m619_11, partial:m620_8 +# 620| r620_10(glval) = VariableAddress[s3] : +# 620| r620_11(glval) = FunctionAddress[~String] : +# 620| v620_12(void) = Call[~String] : func:r620_11, this:r620_10 +# 620| m620_13(unknown) = ^CallSideEffect : ~m620_6 +# 620| m620_14(unknown) = Chi : total:m620_6, partial:m620_13 +# 620| v620_15(void) = ^IndirectReadSideEffect[-1] : &:r620_10, m618_6 +# 620| m620_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r620_10 +# 620| m620_17(String) = Chi : total:m618_6, partial:m620_16 +# 620| r620_18(glval) = VariableAddress[s2] : +# 620| r620_19(glval) = FunctionAddress[~String] : +# 620| v620_20(void) = Call[~String] : func:r620_19, this:r620_18 +# 620| m620_21(unknown) = ^CallSideEffect : ~m620_14 +# 620| m620_22(unknown) = Chi : total:m620_14, partial:m620_21 +# 620| v620_23(void) = ^IndirectReadSideEffect[-1] : &:r620_18, m617_11 +# 620| m620_24(String) = ^IndirectMayWriteSideEffect[-1] : &:r620_18 +# 620| m620_25(String) = Chi : total:m617_11, partial:m620_24 +# 620| r620_26(glval) = VariableAddress[s1] : +# 620| r620_27(glval) = FunctionAddress[~String] : +# 620| v620_28(void) = Call[~String] : func:r620_27, this:r620_26 +# 620| m620_29(unknown) = ^CallSideEffect : ~m620_22 +# 620| m620_30(unknown) = Chi : total:m620_22, partial:m620_29 +# 620| v620_31(void) = ^IndirectReadSideEffect[-1] : &:r620_26, m616_8 +# 620| m620_32(String) = ^IndirectMayWriteSideEffect[-1] : &:r620_26 +# 620| m620_33(String) = Chi : total:m616_8, partial:m620_32 +# 615| v615_5(void) = ReturnVoid : +# 615| v615_6(void) = AliasedUse : ~m620_30 +# 615| v615_7(void) = ExitFunction : # 622| void CallMethods(String&, String*, String) # 622| Block 0 @@ -5158,8 +5190,32 @@ ir.cpp: # 839| r839_4(glval) = VariableAddress[pb] : # 839| m839_5(Base *) = Store[pb] : &:r839_4, r839_3 # 840| v840_1(void) = NoOp : +# 840| r840_2(glval) = VariableAddress[d] : +# 840| r840_3(glval) = FunctionAddress[~Derived] : +# 840| v840_4(void) = Call[~Derived] : func:r840_3, this:r840_2 +# 840| m840_5(unknown) = ^CallSideEffect : ~m831_10 +# 840| m840_6(unknown) = Chi : total:m831_10, partial:m840_5 +# 840| v840_7(void) = ^IndirectReadSideEffect[-1] : &:r840_2, m831_14 +# 840| m840_8(Derived) = ^IndirectMayWriteSideEffect[-1] : &:r840_2 +# 840| m840_9(Derived) = Chi : total:m831_14, partial:m840_8 +# 840| r840_10(glval) = VariableAddress[m] : +# 840| r840_11(glval) = FunctionAddress[~Middle] : +# 840| v840_12(void) = Call[~Middle] : func:r840_11, this:r840_10 +# 840| m840_13(unknown) = ^CallSideEffect : ~m840_6 +# 840| m840_14(unknown) = Chi : total:m840_6, partial:m840_13 +# 840| v840_15(void) = ^IndirectReadSideEffect[-1] : &:r840_10, m817_13 +# 840| m840_16(Middle) = ^IndirectMayWriteSideEffect[-1] : &:r840_10 +# 840| m840_17(Middle) = Chi : total:m817_13, partial:m840_16 +# 840| r840_18(glval) = VariableAddress[b] : +# 840| r840_19(glval) = FunctionAddress[~Base] : +# 840| v840_20(void) = Call[~Base] : func:r840_19, this:r840_18 +# 840| m840_21(unknown) = ^CallSideEffect : ~m840_14 +# 840| m840_22(unknown) = Chi : total:m840_14, partial:m840_21 +# 840| v840_23(void) = ^IndirectReadSideEffect[-1] : &:r840_18, m824_24 +# 840| m840_24(Base) = ^IndirectMayWriteSideEffect[-1] : &:r840_18 +# 840| m840_25(Base) = Chi : total:m824_24, partial:m840_24 # 799| v799_5(void) = ReturnVoid : -# 799| v799_6(void) = AliasedUse : ~m831_10 +# 799| v799_6(void) = AliasedUse : ~m840_22 # 799| v799_7(void) = ExitFunction : # 842| void PolymorphicBase::PolymorphicBase() @@ -5224,68 +5280,84 @@ ir.cpp: # 849| void DynamicCast() # 849| Block 0 -# 849| v849_1(void) = EnterFunction : -# 849| m849_2(unknown) = AliasedDefinition : -# 849| m849_3(unknown) = InitializeNonLocal : -# 849| m849_4(unknown) = Chi : total:m849_2, partial:m849_3 -# 850| r850_1(glval) = VariableAddress[b] : -# 850| m850_2(PolymorphicBase) = Uninitialized[b] : &:r850_1 -# 850| r850_3(glval) = FunctionAddress[PolymorphicBase] : -# 850| v850_4(void) = Call[PolymorphicBase] : func:r850_3, this:r850_1 -# 850| m850_5(unknown) = ^CallSideEffect : ~m849_4 -# 850| m850_6(unknown) = Chi : total:m849_4, partial:m850_5 -# 850| m850_7(PolymorphicBase) = ^IndirectMayWriteSideEffect[-1] : &:r850_1 -# 850| m850_8(PolymorphicBase) = Chi : total:m850_2, partial:m850_7 -# 851| r851_1(glval) = VariableAddress[d] : -# 851| m851_2(PolymorphicDerived) = Uninitialized[d] : &:r851_1 -# 851| r851_3(glval) = FunctionAddress[PolymorphicDerived] : -# 851| v851_4(void) = Call[PolymorphicDerived] : func:r851_3, this:r851_1 -# 851| m851_5(unknown) = ^CallSideEffect : ~m850_6 -# 851| m851_6(unknown) = Chi : total:m850_6, partial:m851_5 -# 851| m851_7(PolymorphicDerived) = ^IndirectMayWriteSideEffect[-1] : &:r851_1 -# 851| m851_8(PolymorphicDerived) = Chi : total:m851_2, partial:m851_7 -# 853| r853_1(glval) = VariableAddress[pb] : -# 853| r853_2(glval) = VariableAddress[b] : -# 853| r853_3(PolymorphicBase *) = CopyValue : r853_2 -# 853| m853_4(PolymorphicBase *) = Store[pb] : &:r853_1, r853_3 -# 854| r854_1(glval) = VariableAddress[pd] : -# 854| r854_2(glval) = VariableAddress[d] : -# 854| r854_3(PolymorphicDerived *) = CopyValue : r854_2 -# 854| m854_4(PolymorphicDerived *) = Store[pd] : &:r854_1, r854_3 -# 857| r857_1(glval) = VariableAddress[pd] : -# 857| r857_2(PolymorphicDerived *) = Load[pd] : &:r857_1, m854_4 -# 857| r857_3(PolymorphicBase *) = CheckedConvertOrNull : r857_2 -# 857| r857_4(glval) = VariableAddress[pb] : -# 857| m857_5(PolymorphicBase *) = Store[pb] : &:r857_4, r857_3 -# 858| r858_1(glval) = VariableAddress[rb] : -# 858| r858_2(glval) = VariableAddress[d] : -# 858| r858_3(glval) = CheckedConvertOrThrow : r858_2 -# 858| r858_4(PolymorphicBase &) = CopyValue : r858_3 -# 858| m858_5(PolymorphicBase &) = Store[rb] : &:r858_1, r858_4 -# 860| r860_1(glval) = VariableAddress[pb] : -# 860| r860_2(PolymorphicBase *) = Load[pb] : &:r860_1, m857_5 -# 860| r860_3(PolymorphicDerived *) = CheckedConvertOrNull : r860_2 -# 860| r860_4(glval) = VariableAddress[pd] : -# 860| m860_5(PolymorphicDerived *) = Store[pd] : &:r860_4, r860_3 -# 861| r861_1(glval) = VariableAddress[rd] : -# 861| r861_2(glval) = VariableAddress[b] : -# 861| r861_3(glval) = CheckedConvertOrThrow : r861_2 -# 861| r861_4(PolymorphicDerived &) = CopyValue : r861_3 -# 861| m861_5(PolymorphicDerived &) = Store[rd] : &:r861_1, r861_4 -# 863| r863_1(glval) = VariableAddress[pv] : -# 863| r863_2(glval) = VariableAddress[pb] : -# 863| r863_3(PolymorphicBase *) = Load[pb] : &:r863_2, m857_5 -# 863| r863_4(void *) = CompleteObjectAddress : r863_3 -# 863| m863_5(void *) = Store[pv] : &:r863_1, r863_4 -# 864| r864_1(glval) = VariableAddress[pcv] : -# 864| r864_2(glval) = VariableAddress[pd] : -# 864| r864_3(PolymorphicDerived *) = Load[pd] : &:r864_2, m860_5 -# 864| r864_4(void *) = CompleteObjectAddress : r864_3 -# 864| m864_5(void *) = Store[pcv] : &:r864_1, r864_4 -# 865| v865_1(void) = NoOp : -# 849| v849_5(void) = ReturnVoid : -# 849| v849_6(void) = AliasedUse : ~m851_6 -# 849| v849_7(void) = ExitFunction : +# 849| v849_1(void) = EnterFunction : +# 849| m849_2(unknown) = AliasedDefinition : +# 849| m849_3(unknown) = InitializeNonLocal : +# 849| m849_4(unknown) = Chi : total:m849_2, partial:m849_3 +# 850| r850_1(glval) = VariableAddress[b] : +# 850| m850_2(PolymorphicBase) = Uninitialized[b] : &:r850_1 +# 850| r850_3(glval) = FunctionAddress[PolymorphicBase] : +# 850| v850_4(void) = Call[PolymorphicBase] : func:r850_3, this:r850_1 +# 850| m850_5(unknown) = ^CallSideEffect : ~m849_4 +# 850| m850_6(unknown) = Chi : total:m849_4, partial:m850_5 +# 850| m850_7(PolymorphicBase) = ^IndirectMayWriteSideEffect[-1] : &:r850_1 +# 850| m850_8(PolymorphicBase) = Chi : total:m850_2, partial:m850_7 +# 851| r851_1(glval) = VariableAddress[d] : +# 851| m851_2(PolymorphicDerived) = Uninitialized[d] : &:r851_1 +# 851| r851_3(glval) = FunctionAddress[PolymorphicDerived] : +# 851| v851_4(void) = Call[PolymorphicDerived] : func:r851_3, this:r851_1 +# 851| m851_5(unknown) = ^CallSideEffect : ~m850_6 +# 851| m851_6(unknown) = Chi : total:m850_6, partial:m851_5 +# 851| m851_7(PolymorphicDerived) = ^IndirectMayWriteSideEffect[-1] : &:r851_1 +# 851| m851_8(PolymorphicDerived) = Chi : total:m851_2, partial:m851_7 +# 853| r853_1(glval) = VariableAddress[pb] : +# 853| r853_2(glval) = VariableAddress[b] : +# 853| r853_3(PolymorphicBase *) = CopyValue : r853_2 +# 853| m853_4(PolymorphicBase *) = Store[pb] : &:r853_1, r853_3 +# 854| r854_1(glval) = VariableAddress[pd] : +# 854| r854_2(glval) = VariableAddress[d] : +# 854| r854_3(PolymorphicDerived *) = CopyValue : r854_2 +# 854| m854_4(PolymorphicDerived *) = Store[pd] : &:r854_1, r854_3 +# 857| r857_1(glval) = VariableAddress[pd] : +# 857| r857_2(PolymorphicDerived *) = Load[pd] : &:r857_1, m854_4 +# 857| r857_3(PolymorphicBase *) = CheckedConvertOrNull : r857_2 +# 857| r857_4(glval) = VariableAddress[pb] : +# 857| m857_5(PolymorphicBase *) = Store[pb] : &:r857_4, r857_3 +# 858| r858_1(glval) = VariableAddress[rb] : +# 858| r858_2(glval) = VariableAddress[d] : +# 858| r858_3(glval) = CheckedConvertOrThrow : r858_2 +# 858| r858_4(PolymorphicBase &) = CopyValue : r858_3 +# 858| m858_5(PolymorphicBase &) = Store[rb] : &:r858_1, r858_4 +# 860| r860_1(glval) = VariableAddress[pb] : +# 860| r860_2(PolymorphicBase *) = Load[pb] : &:r860_1, m857_5 +# 860| r860_3(PolymorphicDerived *) = CheckedConvertOrNull : r860_2 +# 860| r860_4(glval) = VariableAddress[pd] : +# 860| m860_5(PolymorphicDerived *) = Store[pd] : &:r860_4, r860_3 +# 861| r861_1(glval) = VariableAddress[rd] : +# 861| r861_2(glval) = VariableAddress[b] : +# 861| r861_3(glval) = CheckedConvertOrThrow : r861_2 +# 861| r861_4(PolymorphicDerived &) = CopyValue : r861_3 +# 861| m861_5(PolymorphicDerived &) = Store[rd] : &:r861_1, r861_4 +# 863| r863_1(glval) = VariableAddress[pv] : +# 863| r863_2(glval) = VariableAddress[pb] : +# 863| r863_3(PolymorphicBase *) = Load[pb] : &:r863_2, m857_5 +# 863| r863_4(void *) = CompleteObjectAddress : r863_3 +# 863| m863_5(void *) = Store[pv] : &:r863_1, r863_4 +# 864| r864_1(glval) = VariableAddress[pcv] : +# 864| r864_2(glval) = VariableAddress[pd] : +# 864| r864_3(PolymorphicDerived *) = Load[pd] : &:r864_2, m860_5 +# 864| r864_4(void *) = CompleteObjectAddress : r864_3 +# 864| m864_5(void *) = Store[pcv] : &:r864_1, r864_4 +# 865| v865_1(void) = NoOp : +# 865| r865_2(glval) = VariableAddress[d] : +# 865| r865_3(glval) = FunctionAddress[~PolymorphicDerived] : +# 865| v865_4(void) = Call[~PolymorphicDerived] : func:r865_3, this:r865_2 +# 865| m865_5(unknown) = ^CallSideEffect : ~m851_6 +# 865| m865_6(unknown) = Chi : total:m851_6, partial:m865_5 +# 865| v865_7(void) = ^IndirectReadSideEffect[-1] : &:r865_2, m851_8 +# 865| m865_8(PolymorphicDerived) = ^IndirectMayWriteSideEffect[-1] : &:r865_2 +# 865| m865_9(PolymorphicDerived) = Chi : total:m851_8, partial:m865_8 +# 865| r865_10(glval) = VariableAddress[b] : +# 865| r865_11(glval) = FunctionAddress[~PolymorphicBase] : +# 865| v865_12(void) = Call[~PolymorphicBase] : func:r865_11, this:r865_10 +# 865| m865_13(unknown) = ^CallSideEffect : ~m865_6 +# 865| m865_14(unknown) = Chi : total:m865_6, partial:m865_13 +# 865| v865_15(void) = ^IndirectReadSideEffect[-1] : &:r865_10, m850_8 +# 865| m865_16(PolymorphicBase) = ^IndirectMayWriteSideEffect[-1] : &:r865_10 +# 865| m865_17(PolymorphicBase) = Chi : total:m850_8, partial:m865_16 +# 849| v849_5(void) = ReturnVoid : +# 849| v849_6(void) = AliasedUse : ~m865_14 +# 849| v849_7(void) = ExitFunction : # 867| void String::String() # 867| Block 0 @@ -6187,184 +6259,200 @@ ir.cpp: # 1040| void Lambda(int, String const&) # 1040| Block 0 -# 1040| v1040_1(void) = EnterFunction : -# 1040| m1040_2(unknown) = AliasedDefinition : -# 1040| m1040_3(unknown) = InitializeNonLocal : -# 1040| m1040_4(unknown) = Chi : total:m1040_2, partial:m1040_3 -# 1040| r1040_5(glval) = VariableAddress[x] : -# 1040| m1040_6(int) = InitializeParameter[x] : &:r1040_5 -# 1040| r1040_7(glval) = VariableAddress[s] : -# 1040| m1040_8(String &) = InitializeParameter[s] : &:r1040_7 -# 1040| r1040_9(String &) = Load[s] : &:r1040_7, m1040_8 -# 1040| m1040_10(unknown) = InitializeIndirection[s] : &:r1040_9 -# 1041| r1041_1(glval) = VariableAddress[lambda_empty] : -# 1041| r1041_2(glval) = VariableAddress[#temp1041:23] : -# 1041| m1041_3(decltype([...](...){...})) = Uninitialized[#temp1041:23] : &:r1041_2 -# 1041| r1041_4(decltype([...](...){...})) = Load[#temp1041:23] : &:r1041_2, m1041_3 -# 1041| m1041_5(decltype([...](...){...})) = Store[lambda_empty] : &:r1041_1, r1041_4 -# 1042| r1042_1(char) = Constant[65] : -# 1043| r1043_1(glval) = VariableAddress[lambda_ref] : -# 1043| r1043_2(glval) = VariableAddress[#temp1043:20] : -# 1043| m1043_3(decltype([...](...){...})) = Uninitialized[#temp1043:20] : &:r1043_2 -# 1043| r1043_4(glval) = FieldAddress[s] : r1043_2 -# 1043| r1043_5(glval) = VariableAddress[s] : -# 1043| r1043_6(String &) = Load[s] : &:r1043_5, m1040_8 -# 1043| r1043_7(glval) = CopyValue : r1043_6 -# 1043| r1043_8(String &) = CopyValue : r1043_7 -# 1043| m1043_9(String &) = Store[?] : &:r1043_4, r1043_8 -# 1043| m1043_10(decltype([...](...){...})) = Chi : total:m1043_3, partial:m1043_9 -# 1043| r1043_11(glval) = FieldAddress[x] : r1043_2 -# 1043| r1043_12(glval) = VariableAddress[x] : -#-----| r0_1(int &) = CopyValue : r1043_12 -#-----| m0_2(int &) = Store[?] : &:r1043_11, r0_1 -#-----| m0_3(decltype([...](...){...})) = Chi : total:m1043_10, partial:m0_2 -# 1043| r1043_13(decltype([...](...){...})) = Load[#temp1043:20] : &:r1043_2, m0_3 -# 1043| m1043_14(decltype([...](...){...})) = Store[lambda_ref] : &:r1043_1, r1043_13 -# 1044| r1044_1(glval) = VariableAddress[lambda_ref] : -# 1044| r1044_2(glval) = Convert : r1044_1 -# 1044| r1044_3(glval) = FunctionAddress[operator()] : -# 1044| r1044_4(float) = Constant[1.0] : -# 1044| r1044_5(char) = Call[operator()] : func:r1044_3, this:r1044_2, 0:r1044_4 -# 1044| m1044_6(unknown) = ^CallSideEffect : ~m1040_4 -# 1044| m1044_7(unknown) = Chi : total:m1040_4, partial:m1044_6 -# 1044| v1044_8(void) = ^IndirectReadSideEffect[-1] : &:r1044_2, m1043_14 -# 1045| r1045_1(glval) = VariableAddress[lambda_val] : -# 1045| r1045_2(glval) = VariableAddress[#temp1045:20] : -# 1045| m1045_3(decltype([...](...){...})) = Uninitialized[#temp1045:20] : &:r1045_2 -# 1045| r1045_4(glval) = FieldAddress[s] : r1045_2 -# 1045| r1045_5(glval) = FunctionAddress[String] : -# 1045| v1045_6(void) = Call[String] : func:r1045_5, this:r1045_4 -# 1045| m1045_7(unknown) = ^CallSideEffect : ~m1044_7 -# 1045| m1045_8(unknown) = Chi : total:m1044_7, partial:m1045_7 -# 1045| m1045_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r1045_4 -# 1045| m1045_10(decltype([...](...){...})) = Chi : total:m1045_3, partial:m1045_9 -# 1045| r1045_11(glval) = FieldAddress[x] : r1045_2 -# 1045| r1045_12(glval) = VariableAddress[x] : -# 1045| r1045_13(int) = Load[x] : &:r1045_12, m1040_6 -# 1045| m1045_14(int) = Store[?] : &:r1045_11, r1045_13 -# 1045| m1045_15(decltype([...](...){...})) = Chi : total:m1045_10, partial:m1045_14 -# 1045| r1045_16(decltype([...](...){...})) = Load[#temp1045:20] : &:r1045_2, m1045_15 -# 1045| m1045_17(decltype([...](...){...})) = Store[lambda_val] : &:r1045_1, r1045_16 -# 1046| r1046_1(glval) = VariableAddress[lambda_val] : -# 1046| r1046_2(glval) = Convert : r1046_1 -# 1046| r1046_3(glval) = FunctionAddress[operator()] : -# 1046| r1046_4(float) = Constant[2.0] : -# 1046| r1046_5(char) = Call[operator()] : func:r1046_3, this:r1046_2, 0:r1046_4 -# 1046| m1046_6(unknown) = ^CallSideEffect : ~m1045_8 -# 1046| m1046_7(unknown) = Chi : total:m1045_8, partial:m1046_6 -# 1046| v1046_8(void) = ^IndirectReadSideEffect[-1] : &:r1046_2, m1045_17 -# 1047| r1047_1(glval) = VariableAddress[lambda_ref_explicit] : -# 1047| r1047_2(glval) = VariableAddress[#temp1047:29] : -# 1047| m1047_3(decltype([...](...){...})) = Uninitialized[#temp1047:29] : &:r1047_2 -# 1047| r1047_4(glval) = FieldAddress[s] : r1047_2 -# 1047| r1047_5(glval) = VariableAddress[s] : -# 1047| r1047_6(String &) = Load[s] : &:r1047_5, m1040_8 -# 1047| r1047_7(glval) = CopyValue : r1047_6 -# 1047| r1047_8(String &) = CopyValue : r1047_7 -# 1047| m1047_9(String &) = Store[?] : &:r1047_4, r1047_8 -# 1047| r1047_10(decltype([...](...){...})) = Load[#temp1047:29] : &:r1047_2, ~m1047_9 -# 1047| m1047_11(decltype([...](...){...})) = Store[lambda_ref_explicit] : &:r1047_1, r1047_10 -# 1048| r1048_1(glval) = VariableAddress[lambda_ref_explicit] : -# 1048| r1048_2(glval) = Convert : r1048_1 -# 1048| r1048_3(glval) = FunctionAddress[operator()] : -# 1048| r1048_4(float) = Constant[3.0] : -# 1048| r1048_5(char) = Call[operator()] : func:r1048_3, this:r1048_2, 0:r1048_4 -# 1048| m1048_6(unknown) = ^CallSideEffect : ~m1046_7 -# 1048| m1048_7(unknown) = Chi : total:m1046_7, partial:m1048_6 -# 1048| v1048_8(void) = ^IndirectReadSideEffect[-1] : &:r1048_2, m1047_11 -# 1049| r1049_1(glval) = VariableAddress[lambda_val_explicit] : -# 1049| r1049_2(glval) = VariableAddress[#temp1049:29] : -# 1049| m1049_3(decltype([...](...){...})) = Uninitialized[#temp1049:29] : &:r1049_2 -# 1049| r1049_4(glval) = FieldAddress[s] : r1049_2 -# 1049| r1049_5(glval) = FunctionAddress[String] : -# 1049| v1049_6(void) = Call[String] : func:r1049_5, this:r1049_4 -# 1049| m1049_7(unknown) = ^CallSideEffect : ~m1048_7 -# 1049| m1049_8(unknown) = Chi : total:m1048_7, partial:m1049_7 -# 1049| m1049_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r1049_4 -# 1049| m1049_10(decltype([...](...){...})) = Chi : total:m1049_3, partial:m1049_9 -# 1049| r1049_11(decltype([...](...){...})) = Load[#temp1049:29] : &:r1049_2, m1049_10 -# 1049| m1049_12(decltype([...](...){...})) = Store[lambda_val_explicit] : &:r1049_1, r1049_11 -# 1050| r1050_1(glval) = VariableAddress[lambda_val_explicit] : -# 1050| r1050_2(glval) = Convert : r1050_1 -# 1050| r1050_3(glval) = FunctionAddress[operator()] : -# 1050| r1050_4(float) = Constant[4.0] : -# 1050| r1050_5(char) = Call[operator()] : func:r1050_3, this:r1050_2, 0:r1050_4 -# 1050| m1050_6(unknown) = ^CallSideEffect : ~m1049_8 -# 1050| m1050_7(unknown) = Chi : total:m1049_8, partial:m1050_6 -# 1050| v1050_8(void) = ^IndirectReadSideEffect[-1] : &:r1050_2, m1049_12 -# 1051| r1051_1(glval) = VariableAddress[lambda_mixed_explicit] : -# 1051| r1051_2(glval) = VariableAddress[#temp1051:31] : -# 1051| m1051_3(decltype([...](...){...})) = Uninitialized[#temp1051:31] : &:r1051_2 -# 1051| r1051_4(glval) = FieldAddress[s] : r1051_2 -# 1051| r1051_5(glval) = VariableAddress[s] : -# 1051| r1051_6(String &) = Load[s] : &:r1051_5, m1040_8 -# 1051| r1051_7(glval) = CopyValue : r1051_6 -# 1051| r1051_8(String &) = CopyValue : r1051_7 -# 1051| m1051_9(String &) = Store[?] : &:r1051_4, r1051_8 -# 1051| m1051_10(decltype([...](...){...})) = Chi : total:m1051_3, partial:m1051_9 -# 1051| r1051_11(glval) = FieldAddress[x] : r1051_2 -# 1051| r1051_12(glval) = VariableAddress[x] : -# 1051| r1051_13(int) = Load[x] : &:r1051_12, m1040_6 -# 1051| m1051_14(int) = Store[?] : &:r1051_11, r1051_13 -# 1051| m1051_15(decltype([...](...){...})) = Chi : total:m1051_10, partial:m1051_14 -# 1051| r1051_16(decltype([...](...){...})) = Load[#temp1051:31] : &:r1051_2, m1051_15 -# 1051| m1051_17(decltype([...](...){...})) = Store[lambda_mixed_explicit] : &:r1051_1, r1051_16 -# 1052| r1052_1(glval) = VariableAddress[lambda_mixed_explicit] : -# 1052| r1052_2(glval) = Convert : r1052_1 -# 1052| r1052_3(glval) = FunctionAddress[operator()] : -# 1052| r1052_4(float) = Constant[5.0] : -# 1052| r1052_5(char) = Call[operator()] : func:r1052_3, this:r1052_2, 0:r1052_4 -# 1052| m1052_6(unknown) = ^CallSideEffect : ~m1050_7 -# 1052| m1052_7(unknown) = Chi : total:m1050_7, partial:m1052_6 -# 1052| v1052_8(void) = ^IndirectReadSideEffect[-1] : &:r1052_2, m1051_17 -# 1053| r1053_1(glval) = VariableAddress[r] : -# 1053| r1053_2(glval) = VariableAddress[x] : -# 1053| r1053_3(int) = Load[x] : &:r1053_2, m1040_6 -# 1053| r1053_4(int) = Constant[1] : -# 1053| r1053_5(int) = Sub : r1053_3, r1053_4 -# 1053| m1053_6(int) = Store[r] : &:r1053_1, r1053_5 -# 1054| r1054_1(glval) = VariableAddress[lambda_inits] : -# 1054| r1054_2(glval) = VariableAddress[#temp1054:22] : -# 1054| m1054_3(decltype([...](...){...})) = Uninitialized[#temp1054:22] : &:r1054_2 -# 1054| r1054_4(glval) = FieldAddress[s] : r1054_2 -# 1054| r1054_5(glval) = VariableAddress[s] : -# 1054| r1054_6(String &) = Load[s] : &:r1054_5, m1040_8 -# 1054| r1054_7(glval) = CopyValue : r1054_6 -# 1054| r1054_8(String &) = CopyValue : r1054_7 -# 1054| m1054_9(String &) = Store[?] : &:r1054_4, r1054_8 -# 1054| m1054_10(decltype([...](...){...})) = Chi : total:m1054_3, partial:m1054_9 -# 1054| r1054_11(glval) = FieldAddress[x] : r1054_2 -# 1054| r1054_12(glval) = VariableAddress[x] : -# 1054| r1054_13(int) = Load[x] : &:r1054_12, m1040_6 -# 1054| m1054_14(int) = Store[?] : &:r1054_11, r1054_13 -# 1054| m1054_15(decltype([...](...){...})) = Chi : total:m1054_10, partial:m1054_14 -# 1054| r1054_16(glval) = FieldAddress[i] : r1054_2 -# 1054| r1054_17(glval) = VariableAddress[x] : -# 1054| r1054_18(int) = Load[x] : &:r1054_17, m1040_6 -# 1054| r1054_19(int) = Constant[1] : -# 1054| r1054_20(int) = Add : r1054_18, r1054_19 -# 1054| m1054_21(int) = Store[?] : &:r1054_16, r1054_20 -# 1054| m1054_22(decltype([...](...){...})) = Chi : total:m1054_15, partial:m1054_21 -# 1054| r1054_23(glval) = FieldAddress[j] : r1054_2 -# 1054| r1054_24(glval) = VariableAddress[r] : -# 1054| r1054_25(int &) = CopyValue : r1054_24 -# 1054| m1054_26(int &) = Store[?] : &:r1054_23, r1054_25 -# 1054| m1054_27(decltype([...](...){...})) = Chi : total:m1054_22, partial:m1054_26 -# 1054| r1054_28(decltype([...](...){...})) = Load[#temp1054:22] : &:r1054_2, m1054_27 -# 1054| m1054_29(decltype([...](...){...})) = Store[lambda_inits] : &:r1054_1, r1054_28 -# 1055| r1055_1(glval) = VariableAddress[lambda_inits] : -# 1055| r1055_2(glval) = Convert : r1055_1 -# 1055| r1055_3(glval) = FunctionAddress[operator()] : -# 1055| r1055_4(float) = Constant[6.0] : -# 1055| r1055_5(char) = Call[operator()] : func:r1055_3, this:r1055_2, 0:r1055_4 -# 1055| m1055_6(unknown) = ^CallSideEffect : ~m1052_7 -# 1055| m1055_7(unknown) = Chi : total:m1052_7, partial:m1055_6 -# 1055| v1055_8(void) = ^IndirectReadSideEffect[-1] : &:r1055_2, m1054_29 -# 1056| v1056_1(void) = NoOp : -# 1040| v1040_11(void) = ReturnIndirection[s] : &:r1040_9, m1040_10 -# 1040| v1040_12(void) = ReturnVoid : -# 1040| v1040_13(void) = AliasedUse : ~m1055_7 -# 1040| v1040_14(void) = ExitFunction : +# 1040| v1040_1(void) = EnterFunction : +# 1040| m1040_2(unknown) = AliasedDefinition : +# 1040| m1040_3(unknown) = InitializeNonLocal : +# 1040| m1040_4(unknown) = Chi : total:m1040_2, partial:m1040_3 +# 1040| r1040_5(glval) = VariableAddress[x] : +# 1040| m1040_6(int) = InitializeParameter[x] : &:r1040_5 +# 1040| r1040_7(glval) = VariableAddress[s] : +# 1040| m1040_8(String &) = InitializeParameter[s] : &:r1040_7 +# 1040| r1040_9(String &) = Load[s] : &:r1040_7, m1040_8 +# 1040| m1040_10(unknown) = InitializeIndirection[s] : &:r1040_9 +# 1041| r1041_1(glval) = VariableAddress[lambda_empty] : +# 1041| r1041_2(glval) = VariableAddress[#temp1041:23] : +# 1041| m1041_3(decltype([...](...){...})) = Uninitialized[#temp1041:23] : &:r1041_2 +# 1041| r1041_4(decltype([...](...){...})) = Load[#temp1041:23] : &:r1041_2, m1041_3 +# 1041| m1041_5(decltype([...](...){...})) = Store[lambda_empty] : &:r1041_1, r1041_4 +# 1042| r1042_1(char) = Constant[65] : +# 1043| r1043_1(glval) = VariableAddress[lambda_ref] : +# 1043| r1043_2(glval) = VariableAddress[#temp1043:20] : +# 1043| m1043_3(decltype([...](...){...})) = Uninitialized[#temp1043:20] : &:r1043_2 +# 1043| r1043_4(glval) = FieldAddress[s] : r1043_2 +# 1043| r1043_5(glval) = VariableAddress[s] : +# 1043| r1043_6(String &) = Load[s] : &:r1043_5, m1040_8 +# 1043| r1043_7(glval) = CopyValue : r1043_6 +# 1043| r1043_8(String &) = CopyValue : r1043_7 +# 1043| m1043_9(String &) = Store[?] : &:r1043_4, r1043_8 +# 1043| m1043_10(decltype([...](...){...})) = Chi : total:m1043_3, partial:m1043_9 +# 1043| r1043_11(glval) = FieldAddress[x] : r1043_2 +# 1043| r1043_12(glval) = VariableAddress[x] : +#-----| r0_1(int &) = CopyValue : r1043_12 +#-----| m0_2(int &) = Store[?] : &:r1043_11, r0_1 +#-----| m0_3(decltype([...](...){...})) = Chi : total:m1043_10, partial:m0_2 +# 1043| r1043_13(decltype([...](...){...})) = Load[#temp1043:20] : &:r1043_2, m0_3 +# 1043| m1043_14(decltype([...](...){...})) = Store[lambda_ref] : &:r1043_1, r1043_13 +# 1044| r1044_1(glval) = VariableAddress[lambda_ref] : +# 1044| r1044_2(glval) = Convert : r1044_1 +# 1044| r1044_3(glval) = FunctionAddress[operator()] : +# 1044| r1044_4(float) = Constant[1.0] : +# 1044| r1044_5(char) = Call[operator()] : func:r1044_3, this:r1044_2, 0:r1044_4 +# 1044| m1044_6(unknown) = ^CallSideEffect : ~m1040_4 +# 1044| m1044_7(unknown) = Chi : total:m1040_4, partial:m1044_6 +# 1044| v1044_8(void) = ^IndirectReadSideEffect[-1] : &:r1044_2, m1043_14 +# 1045| r1045_1(glval) = VariableAddress[lambda_val] : +# 1045| r1045_2(glval) = VariableAddress[#temp1045:20] : +# 1045| m1045_3(decltype([...](...){...})) = Uninitialized[#temp1045:20] : &:r1045_2 +# 1045| r1045_4(glval) = FieldAddress[s] : r1045_2 +# 1045| r1045_5(glval) = FunctionAddress[String] : +# 1045| v1045_6(void) = Call[String] : func:r1045_5, this:r1045_4 +# 1045| m1045_7(unknown) = ^CallSideEffect : ~m1044_7 +# 1045| m1045_8(unknown) = Chi : total:m1044_7, partial:m1045_7 +# 1045| m1045_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r1045_4 +# 1045| m1045_10(decltype([...](...){...})) = Chi : total:m1045_3, partial:m1045_9 +# 1045| r1045_11(glval) = FieldAddress[x] : r1045_2 +# 1045| r1045_12(glval) = VariableAddress[x] : +# 1045| r1045_13(int) = Load[x] : &:r1045_12, m1040_6 +# 1045| m1045_14(int) = Store[?] : &:r1045_11, r1045_13 +# 1045| m1045_15(decltype([...](...){...})) = Chi : total:m1045_10, partial:m1045_14 +# 1045| r1045_16(decltype([...](...){...})) = Load[#temp1045:20] : &:r1045_2, m1045_15 +# 1045| m1045_17(decltype([...](...){...})) = Store[lambda_val] : &:r1045_1, r1045_16 +# 1046| r1046_1(glval) = VariableAddress[lambda_val] : +# 1046| r1046_2(glval) = Convert : r1046_1 +# 1046| r1046_3(glval) = FunctionAddress[operator()] : +# 1046| r1046_4(float) = Constant[2.0] : +# 1046| r1046_5(char) = Call[operator()] : func:r1046_3, this:r1046_2, 0:r1046_4 +# 1046| m1046_6(unknown) = ^CallSideEffect : ~m1045_8 +# 1046| m1046_7(unknown) = Chi : total:m1045_8, partial:m1046_6 +# 1046| v1046_8(void) = ^IndirectReadSideEffect[-1] : &:r1046_2, m1045_17 +# 1047| r1047_1(glval) = VariableAddress[lambda_ref_explicit] : +# 1047| r1047_2(glval) = VariableAddress[#temp1047:29] : +# 1047| m1047_3(decltype([...](...){...})) = Uninitialized[#temp1047:29] : &:r1047_2 +# 1047| r1047_4(glval) = FieldAddress[s] : r1047_2 +# 1047| r1047_5(glval) = VariableAddress[s] : +# 1047| r1047_6(String &) = Load[s] : &:r1047_5, m1040_8 +# 1047| r1047_7(glval) = CopyValue : r1047_6 +# 1047| r1047_8(String &) = CopyValue : r1047_7 +# 1047| m1047_9(String &) = Store[?] : &:r1047_4, r1047_8 +# 1047| r1047_10(decltype([...](...){...})) = Load[#temp1047:29] : &:r1047_2, ~m1047_9 +# 1047| m1047_11(decltype([...](...){...})) = Store[lambda_ref_explicit] : &:r1047_1, r1047_10 +# 1048| r1048_1(glval) = VariableAddress[lambda_ref_explicit] : +# 1048| r1048_2(glval) = Convert : r1048_1 +# 1048| r1048_3(glval) = FunctionAddress[operator()] : +# 1048| r1048_4(float) = Constant[3.0] : +# 1048| r1048_5(char) = Call[operator()] : func:r1048_3, this:r1048_2, 0:r1048_4 +# 1048| m1048_6(unknown) = ^CallSideEffect : ~m1046_7 +# 1048| m1048_7(unknown) = Chi : total:m1046_7, partial:m1048_6 +# 1048| v1048_8(void) = ^IndirectReadSideEffect[-1] : &:r1048_2, m1047_11 +# 1049| r1049_1(glval) = VariableAddress[lambda_val_explicit] : +# 1049| r1049_2(glval) = VariableAddress[#temp1049:29] : +# 1049| m1049_3(decltype([...](...){...})) = Uninitialized[#temp1049:29] : &:r1049_2 +# 1049| r1049_4(glval) = FieldAddress[s] : r1049_2 +# 1049| r1049_5(glval) = FunctionAddress[String] : +# 1049| v1049_6(void) = Call[String] : func:r1049_5, this:r1049_4 +# 1049| m1049_7(unknown) = ^CallSideEffect : ~m1048_7 +# 1049| m1049_8(unknown) = Chi : total:m1048_7, partial:m1049_7 +# 1049| m1049_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r1049_4 +# 1049| m1049_10(decltype([...](...){...})) = Chi : total:m1049_3, partial:m1049_9 +# 1049| r1049_11(decltype([...](...){...})) = Load[#temp1049:29] : &:r1049_2, m1049_10 +# 1049| m1049_12(decltype([...](...){...})) = Store[lambda_val_explicit] : &:r1049_1, r1049_11 +# 1050| r1050_1(glval) = VariableAddress[lambda_val_explicit] : +# 1050| r1050_2(glval) = Convert : r1050_1 +# 1050| r1050_3(glval) = FunctionAddress[operator()] : +# 1050| r1050_4(float) = Constant[4.0] : +# 1050| r1050_5(char) = Call[operator()] : func:r1050_3, this:r1050_2, 0:r1050_4 +# 1050| m1050_6(unknown) = ^CallSideEffect : ~m1049_8 +# 1050| m1050_7(unknown) = Chi : total:m1049_8, partial:m1050_6 +# 1050| v1050_8(void) = ^IndirectReadSideEffect[-1] : &:r1050_2, m1049_12 +# 1051| r1051_1(glval) = VariableAddress[lambda_mixed_explicit] : +# 1051| r1051_2(glval) = VariableAddress[#temp1051:31] : +# 1051| m1051_3(decltype([...](...){...})) = Uninitialized[#temp1051:31] : &:r1051_2 +# 1051| r1051_4(glval) = FieldAddress[s] : r1051_2 +# 1051| r1051_5(glval) = VariableAddress[s] : +# 1051| r1051_6(String &) = Load[s] : &:r1051_5, m1040_8 +# 1051| r1051_7(glval) = CopyValue : r1051_6 +# 1051| r1051_8(String &) = CopyValue : r1051_7 +# 1051| m1051_9(String &) = Store[?] : &:r1051_4, r1051_8 +# 1051| m1051_10(decltype([...](...){...})) = Chi : total:m1051_3, partial:m1051_9 +# 1051| r1051_11(glval) = FieldAddress[x] : r1051_2 +# 1051| r1051_12(glval) = VariableAddress[x] : +# 1051| r1051_13(int) = Load[x] : &:r1051_12, m1040_6 +# 1051| m1051_14(int) = Store[?] : &:r1051_11, r1051_13 +# 1051| m1051_15(decltype([...](...){...})) = Chi : total:m1051_10, partial:m1051_14 +# 1051| r1051_16(decltype([...](...){...})) = Load[#temp1051:31] : &:r1051_2, m1051_15 +# 1051| m1051_17(decltype([...](...){...})) = Store[lambda_mixed_explicit] : &:r1051_1, r1051_16 +# 1052| r1052_1(glval) = VariableAddress[lambda_mixed_explicit] : +# 1052| r1052_2(glval) = Convert : r1052_1 +# 1052| r1052_3(glval) = FunctionAddress[operator()] : +# 1052| r1052_4(float) = Constant[5.0] : +# 1052| r1052_5(char) = Call[operator()] : func:r1052_3, this:r1052_2, 0:r1052_4 +# 1052| m1052_6(unknown) = ^CallSideEffect : ~m1050_7 +# 1052| m1052_7(unknown) = Chi : total:m1050_7, partial:m1052_6 +# 1052| v1052_8(void) = ^IndirectReadSideEffect[-1] : &:r1052_2, m1051_17 +# 1053| r1053_1(glval) = VariableAddress[r] : +# 1053| r1053_2(glval) = VariableAddress[x] : +# 1053| r1053_3(int) = Load[x] : &:r1053_2, m1040_6 +# 1053| r1053_4(int) = Constant[1] : +# 1053| r1053_5(int) = Sub : r1053_3, r1053_4 +# 1053| m1053_6(int) = Store[r] : &:r1053_1, r1053_5 +# 1054| r1054_1(glval) = VariableAddress[lambda_inits] : +# 1054| r1054_2(glval) = VariableAddress[#temp1054:22] : +# 1054| m1054_3(decltype([...](...){...})) = Uninitialized[#temp1054:22] : &:r1054_2 +# 1054| r1054_4(glval) = FieldAddress[s] : r1054_2 +# 1054| r1054_5(glval) = VariableAddress[s] : +# 1054| r1054_6(String &) = Load[s] : &:r1054_5, m1040_8 +# 1054| r1054_7(glval) = CopyValue : r1054_6 +# 1054| r1054_8(String &) = CopyValue : r1054_7 +# 1054| m1054_9(String &) = Store[?] : &:r1054_4, r1054_8 +# 1054| m1054_10(decltype([...](...){...})) = Chi : total:m1054_3, partial:m1054_9 +# 1054| r1054_11(glval) = FieldAddress[x] : r1054_2 +# 1054| r1054_12(glval) = VariableAddress[x] : +# 1054| r1054_13(int) = Load[x] : &:r1054_12, m1040_6 +# 1054| m1054_14(int) = Store[?] : &:r1054_11, r1054_13 +# 1054| m1054_15(decltype([...](...){...})) = Chi : total:m1054_10, partial:m1054_14 +# 1054| r1054_16(glval) = FieldAddress[i] : r1054_2 +# 1054| r1054_17(glval) = VariableAddress[x] : +# 1054| r1054_18(int) = Load[x] : &:r1054_17, m1040_6 +# 1054| r1054_19(int) = Constant[1] : +# 1054| r1054_20(int) = Add : r1054_18, r1054_19 +# 1054| m1054_21(int) = Store[?] : &:r1054_16, r1054_20 +# 1054| m1054_22(decltype([...](...){...})) = Chi : total:m1054_15, partial:m1054_21 +# 1054| r1054_23(glval) = FieldAddress[j] : r1054_2 +# 1054| r1054_24(glval) = VariableAddress[r] : +# 1054| r1054_25(int &) = CopyValue : r1054_24 +# 1054| m1054_26(int &) = Store[?] : &:r1054_23, r1054_25 +# 1054| m1054_27(decltype([...](...){...})) = Chi : total:m1054_22, partial:m1054_26 +# 1054| r1054_28(decltype([...](...){...})) = Load[#temp1054:22] : &:r1054_2, m1054_27 +# 1054| m1054_29(decltype([...](...){...})) = Store[lambda_inits] : &:r1054_1, r1054_28 +# 1055| r1055_1(glval) = VariableAddress[lambda_inits] : +# 1055| r1055_2(glval) = Convert : r1055_1 +# 1055| r1055_3(glval) = FunctionAddress[operator()] : +# 1055| r1055_4(float) = Constant[6.0] : +# 1055| r1055_5(char) = Call[operator()] : func:r1055_3, this:r1055_2, 0:r1055_4 +# 1055| m1055_6(unknown) = ^CallSideEffect : ~m1052_7 +# 1055| m1055_7(unknown) = Chi : total:m1052_7, partial:m1055_6 +# 1055| v1055_8(void) = ^IndirectReadSideEffect[-1] : &:r1055_2, m1054_29 +# 1056| v1056_1(void) = NoOp : +# 1056| r1056_2(glval) = VariableAddress[lambda_val_explicit] : +# 1056| r1056_3(glval) = FunctionAddress[~] : +# 1056| v1056_4(void) = Call[~] : func:r1056_3, this:r1056_2 +# 1056| m1056_5(unknown) = ^CallSideEffect : ~m1055_7 +# 1056| m1056_6(unknown) = Chi : total:m1055_7, partial:m1056_5 +# 1056| v1056_7(void) = ^IndirectReadSideEffect[-1] : &:r1056_2, m1049_12 +# 1056| m1056_8(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r1056_2 +# 1056| m1056_9(decltype([...](...){...})) = Chi : total:m1049_12, partial:m1056_8 +# 1056| r1056_10(glval) = VariableAddress[lambda_val] : +# 1056| r1056_11(glval) = FunctionAddress[~] : +# 1056| v1056_12(void) = Call[~] : func:r1056_11, this:r1056_10 +# 1056| m1056_13(unknown) = ^CallSideEffect : ~m1056_6 +# 1056| m1056_14(unknown) = Chi : total:m1056_6, partial:m1056_13 +# 1056| v1056_15(void) = ^IndirectReadSideEffect[-1] : &:r1056_10, m1045_17 +# 1056| m1056_16(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r1056_10 +# 1056| m1056_17(decltype([...](...){...})) = Chi : total:m1045_17, partial:m1056_16 +# 1040| v1040_11(void) = ReturnIndirection[s] : &:r1040_9, m1040_10 +# 1040| v1040_12(void) = ReturnVoid : +# 1040| v1040_13(void) = AliasedUse : ~m1056_14 +# 1040| v1040_14(void) = ExitFunction : # 1041| void (void Lambda(int, String const&))::(lambda [] type at line 1041, col. 23)::(unnamed constructor)((void Lambda(int, String const&))::(lambda [] type at line 1041, col. 23)&&) # 1041| Block 0 @@ -7717,9 +7805,17 @@ ir.cpp: # 1288| m1288_7(unknown) = ^CallSideEffect : ~m1288_4 # 1288| m1288_8(unknown) = Chi : total:m1288_4, partial:m1288_7 # 1289| v1289_1(void) = NoOp : +# 1289| r1289_2(glval) = VariableAddress[c] : +# 1289| r1289_3(glval) = FunctionAddress[~C] : +# 1289| v1289_4(void) = Call[~C] : func:r1289_3, this:r1289_2 +# 1289| m1289_5(unknown) = ^CallSideEffect : ~m1288_8 +# 1289| m1289_6(unknown) = Chi : total:m1288_8, partial:m1289_5 +# 1289| v1289_7(void) = ^IndirectReadSideEffect[-1] : &:r1289_2, m1273_8 +# 1289| m1289_8(C) = ^IndirectMayWriteSideEffect[-1] : &:r1289_2 +# 1289| m1289_9(C) = Chi : total:m1273_8, partial:m1289_8 # 1272| v1272_11(void) = ReturnIndirection[a_arg] : &:r1272_9, m1283_12 # 1272| v1272_12(void) = ReturnVoid : -# 1272| v1272_13(void) = AliasedUse : ~m1288_8 +# 1272| v1272_13(void) = AliasedUse : ~m1289_6 # 1272| v1272_14(void) = ExitFunction : # 1291| int missingReturnValue(bool, int) @@ -8279,8 +8375,16 @@ ir.cpp: # 1378| m1378_5(unknown) = Chi : total:m1376_11, partial:m1378_4 # 1378| m1378_6(String) = Store[#temp1378:5] : &:r1378_1, r1378_3 # 1379| v1379_1(void) = NoOp : +# 1379| r1379_2(glval) = VariableAddress[s] : +# 1379| r1379_3(glval) = FunctionAddress[~String] : +# 1379| v1379_4(void) = Call[~String] : func:r1379_3, this:r1379_2 +# 1379| m1379_5(unknown) = ^CallSideEffect : ~m1378_5 +# 1379| m1379_6(unknown) = Chi : total:m1378_5, partial:m1379_5 +# 1379| v1379_7(void) = ^IndirectReadSideEffect[-1] : &:r1379_2, m1368_6 +# 1379| m1379_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r1379_2 +# 1379| m1379_9(String) = Chi : total:m1368_6, partial:m1379_8 # 1367| v1367_5(void) = ReturnVoid : -# 1367| v1367_6(void) = AliasedUse : ~m1378_5 +# 1367| v1367_6(void) = AliasedUse : ~m1379_6 # 1367| v1367_7(void) = ExitFunction : # 1381| void temporary_destructor_only() @@ -8354,8 +8458,24 @@ ir.cpp: # 1390| m1390_5(unknown) = Chi : total:m1388_10, partial:m1390_4 # 1390| m1390_6(destructor_only) = Store[#temp1390:5] : &:r1390_1, r1390_3 # 1391| v1391_1(void) = NoOp : +# 1391| r1391_2(glval) = VariableAddress[d2] : +# 1391| r1391_3(glval) = FunctionAddress[~destructor_only] : +# 1391| v1391_4(void) = Call[~destructor_only] : func:r1391_3, this:r1391_2 +# 1391| m1391_5(unknown) = ^CallSideEffect : ~m1390_5 +# 1391| m1391_6(unknown) = Chi : total:m1390_5, partial:m1391_5 +# 1391| v1391_7(void) = ^IndirectReadSideEffect[-1] : &:r1391_2, m1384_2 +# 1391| m1391_8(destructor_only) = ^IndirectMayWriteSideEffect[-1] : &:r1391_2 +# 1391| m1391_9(destructor_only) = Chi : total:m1384_2, partial:m1391_8 +# 1391| r1391_10(glval) = VariableAddress[d] : +# 1391| r1391_11(glval) = FunctionAddress[~destructor_only] : +# 1391| v1391_12(void) = Call[~destructor_only] : func:r1391_11, this:r1391_10 +# 1391| m1391_13(unknown) = ^CallSideEffect : ~m1391_6 +# 1391| m1391_14(unknown) = Chi : total:m1391_6, partial:m1391_13 +# 1391| v1391_15(void) = ^IndirectReadSideEffect[-1] : &:r1391_10, m1382_6 +# 1391| m1391_16(destructor_only) = ^IndirectMayWriteSideEffect[-1] : &:r1391_10 +# 1391| m1391_17(destructor_only) = Chi : total:m1382_6, partial:m1391_16 # 1381| v1381_5(void) = ReturnVoid : -# 1381| v1381_6(void) = AliasedUse : ~m1390_5 +# 1381| v1381_6(void) = AliasedUse : ~m1391_14 # 1381| v1381_7(void) = ExitFunction : # 1393| void temporary_copy_constructor() @@ -11110,8 +11230,16 @@ ir.cpp: # 1927| r1927_6(glval) = VariableAddress[z] : # 1927| m1927_7(int) = Store[z] : &:r1927_6, r1927_3 # 1928| v1928_1(void) = NoOp : +# 1928| r1928_2(glval) = VariableAddress[c] : +# 1928| r1928_3(glval) = FunctionAddress[~C] : +# 1928| v1928_4(void) = Call[~C] : func:r1928_3, this:r1928_2 +# 1928| m1928_5(unknown) = ^CallSideEffect : ~m1927_5 +# 1928| m1928_6(unknown) = Chi : total:m1927_5, partial:m1928_5 +# 1928| v1928_7(void) = ^IndirectReadSideEffect[-1] : &:r1928_2, m1921_8 +# 1928| m1928_8(C) = ^IndirectMayWriteSideEffect[-1] : &:r1928_2 +# 1928| m1928_9(C) = Chi : total:m1921_8, partial:m1928_8 # 1920| v1920_5(void) = ReturnVoid : -# 1920| v1920_6(void) = AliasedUse : ~m1927_5 +# 1920| v1920_6(void) = AliasedUse : ~m1928_6 # 1920| v1920_7(void) = ExitFunction : # 1930| void test_double_assign() @@ -11371,8 +11499,16 @@ ir.cpp: # 1995| r1995_3(glval<..(*)(..)>) = VariableAddress[pfn] : # 1995| m1995_4(..(*)(..)) = Store[pfn] : &:r1995_3, r1995_2 # 1996| v1996_1(void) = NoOp : +# 1996| r1996_2(glval) = VariableAddress[c] : +# 1996| r1996_3(glval) = FunctionAddress[~C] : +# 1996| v1996_4(void) = Call[~C] : func:r1996_3, this:r1996_2 +# 1996| m1996_5(unknown) = ^CallSideEffect : ~m1993_6 +# 1996| m1996_6(unknown) = Chi : total:m1993_6, partial:m1996_5 +# 1996| v1996_7(void) = ^IndirectReadSideEffect[-1] : &:r1996_2, m1993_8 +# 1996| m1996_8(C) = ^IndirectMayWriteSideEffect[-1] : &:r1996_2 +# 1996| m1996_9(C) = Chi : total:m1993_8, partial:m1996_8 # 1992| v1992_5(void) = ReturnVoid : -# 1992| v1992_6(void) = AliasedUse : ~m1993_6 +# 1992| v1992_6(void) = AliasedUse : ~m1996_6 # 1992| v1992_7(void) = ExitFunction : # 1998| void TernaryTestInt(bool, int, int, int) @@ -12641,25 +12777,33 @@ ir.cpp: #-----| True -> Block 2 # 2137| Block 1 -# 2137| m2137_9(unknown) = Phi : from 14:~m2159_5, from 19:~m2163_54, from 23:~m2168_42 +# 2137| m2137_9(unknown) = Phi : from 13:~m2172_5, from 19:~m2172_13, from 23:~m2172_22 # 2137| v2137_10(void) = ReturnVoid : # 2137| v2137_11(void) = AliasedUse : ~m2137_9 # 2137| v2137_12(void) = ExitFunction : # 2139| Block 2 -# 2139| r2139_1(glval) = VariableAddress[x] : -# 2139| r2139_2(glval) = FunctionAddress[set_x] : -# 2139| r2139_3(char) = Constant[97] : -# 2139| v2139_4(void) = Call[set_x] : func:r2139_2, this:r2139_1, 0:r2139_3 -# 2139| m2139_5(unknown) = ^CallSideEffect : ~m2138_6 -# 2139| m2139_6(unknown) = Chi : total:m2138_6, partial:m2139_5 -# 2139| v2139_7(void) = ^IndirectReadSideEffect[-1] : &:r2139_1, m2138_8 -# 2139| m2139_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2139_1 -# 2139| m2139_9(ClassWithDestructor) = Chi : total:m2138_8, partial:m2139_8 +# 2139| r2139_1(glval) = VariableAddress[x] : +# 2139| r2139_2(glval) = FunctionAddress[set_x] : +# 2139| r2139_3(char) = Constant[97] : +# 2139| v2139_4(void) = Call[set_x] : func:r2139_2, this:r2139_1, 0:r2139_3 +# 2139| m2139_5(unknown) = ^CallSideEffect : ~m2138_6 +# 2139| m2139_6(unknown) = Chi : total:m2138_6, partial:m2139_5 +# 2139| v2139_7(void) = ^IndirectReadSideEffect[-1] : &:r2139_1, m2138_8 +# 2139| m2139_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2139_1 +# 2139| m2139_9(ClassWithDestructor) = Chi : total:m2138_8, partial:m2139_8 +# 2139| r2139_10(glval) = VariableAddress[x] : +# 2139| r2139_11(glval) = FunctionAddress[~ClassWithDestructor] : +# 2139| v2139_12(void) = Call[~ClassWithDestructor] : func:r2139_11, this:r2139_10 +# 2139| m2139_13(unknown) = ^CallSideEffect : ~m2139_6 +# 2139| m2139_14(unknown) = Chi : total:m2139_6, partial:m2139_13 +# 2139| v2139_15(void) = ^IndirectReadSideEffect[-1] : &:r2139_10, m2139_9 +# 2139| m2139_16(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2139_10 +# 2139| m2139_17(ClassWithDestructor) = Chi : total:m2139_9, partial:m2139_16 #-----| Goto -> Block 3 # 2141| Block 3 -# 2141| m2141_1(unknown) = Phi : from 0:~m2138_6, from 2:~m2139_6 +# 2141| m2141_1(unknown) = Phi : from 0:~m2138_6, from 2:~m2139_14 # 2141| r2141_2(glval) = VariableAddress[x] : # 2141| m2141_3(ClassWithDestructor) = Uninitialized[x] : &:r2141_2 # 2141| r2141_4(glval) = FunctionAddress[ClassWithDestructor] : @@ -12779,8 +12923,8 @@ ir.cpp: #-----| Goto -> Block 8 # 2154| Block 8 -# 2154| m2154_34(iterator) = Phi : from 7:m2154_25, from 9:m2154_59 -# 2154| m2154_35(unknown) = Phi : from 7:~m2154_32, from 9:~m2154_56 +# 2154| m2154_34(iterator) = Phi : from 7:m2154_25, from 9:m2154_67 +# 2154| m2154_35(unknown) = Phi : from 7:~m2154_32, from 9:~m2154_64 # 2154| r2154_36(glval) = VariableAddress[(__begin)] : #-----| r0_7(glval) = Convert : r2154_36 # 2154| r2154_37(glval) = FunctionAddress[operator!=] : @@ -12795,34 +12939,42 @@ ir.cpp: #-----| True -> Block 9 # 2154| Block 9 -# 2154| r2154_44(glval) = VariableAddress[y] : -# 2154| r2154_45(glval) = VariableAddress[(__begin)] : -#-----| r0_9(glval) = Convert : r2154_45 -# 2154| r2154_46(glval) = FunctionAddress[operator*] : -# 2154| r2154_47(ClassWithDestructor &) = Call[operator*] : func:r2154_46, this:r0_9 -# 2154| m2154_48(unknown) = ^CallSideEffect : ~m2154_42 -# 2154| m2154_49(unknown) = Chi : total:m2154_42, partial:m2154_48 -#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_9, m2154_34 -# 2154| r2154_50(ClassWithDestructor) = Load[?] : &:r2154_47, ~m2154_49 -# 2154| m2154_51(ClassWithDestructor) = Store[y] : &:r2154_44, r2154_50 -# 2155| r2155_1(glval) = VariableAddress[y] : -# 2155| r2155_2(glval) = FunctionAddress[set_x] : -# 2155| r2155_3(char) = Constant[97] : -# 2155| v2155_4(void) = Call[set_x] : func:r2155_2, this:r2155_1, 0:r2155_3 -# 2155| m2155_5(unknown) = ^CallSideEffect : ~m2154_49 -# 2155| m2155_6(unknown) = Chi : total:m2154_49, partial:m2155_5 -# 2155| v2155_7(void) = ^IndirectReadSideEffect[-1] : &:r2155_1, m2154_51 -# 2155| m2155_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2155_1 -# 2155| m2155_9(ClassWithDestructor) = Chi : total:m2154_51, partial:m2155_8 -# 2154| r2154_52(glval) = VariableAddress[(__begin)] : -# 2154| r2154_53(glval) = FunctionAddress[operator++] : -# 2154| r2154_54(iterator &) = Call[operator++] : func:r2154_53, this:r2154_52 -# 2154| m2154_55(unknown) = ^CallSideEffect : ~m2155_6 -# 2154| m2154_56(unknown) = Chi : total:m2155_6, partial:m2154_55 -# 2154| v2154_57(void) = ^IndirectReadSideEffect[-1] : &:r2154_52, m2154_34 -# 2154| m2154_58(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2154_52 -# 2154| m2154_59(iterator) = Chi : total:m2154_34, partial:m2154_58 -# 2154| r2154_60(glval) = CopyValue : r2154_54 +# 2154| r2154_44(glval) = VariableAddress[y] : +# 2154| r2154_45(glval) = VariableAddress[(__begin)] : +#-----| r0_9(glval) = Convert : r2154_45 +# 2154| r2154_46(glval) = FunctionAddress[operator*] : +# 2154| r2154_47(ClassWithDestructor &) = Call[operator*] : func:r2154_46, this:r0_9 +# 2154| m2154_48(unknown) = ^CallSideEffect : ~m2154_42 +# 2154| m2154_49(unknown) = Chi : total:m2154_42, partial:m2154_48 +#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_9, m2154_34 +# 2154| r2154_50(ClassWithDestructor) = Load[?] : &:r2154_47, ~m2154_49 +# 2154| m2154_51(ClassWithDestructor) = Store[y] : &:r2154_44, r2154_50 +# 2155| r2155_1(glval) = VariableAddress[y] : +# 2155| r2155_2(glval) = FunctionAddress[set_x] : +# 2155| r2155_3(char) = Constant[97] : +# 2155| v2155_4(void) = Call[set_x] : func:r2155_2, this:r2155_1, 0:r2155_3 +# 2155| m2155_5(unknown) = ^CallSideEffect : ~m2154_49 +# 2155| m2155_6(unknown) = Chi : total:m2154_49, partial:m2155_5 +# 2155| v2155_7(void) = ^IndirectReadSideEffect[-1] : &:r2155_1, m2154_51 +# 2155| m2155_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2155_1 +# 2155| m2155_9(ClassWithDestructor) = Chi : total:m2154_51, partial:m2155_8 +# 2154| r2154_52(glval) = VariableAddress[y] : +# 2154| r2154_53(glval) = FunctionAddress[~ClassWithDestructor] : +# 2154| v2154_54(void) = Call[~ClassWithDestructor] : func:r2154_53, this:r2154_52 +# 2154| m2154_55(unknown) = ^CallSideEffect : ~m2155_6 +# 2154| m2154_56(unknown) = Chi : total:m2155_6, partial:m2154_55 +# 2154| v2154_57(void) = ^IndirectReadSideEffect[-1] : &:r2154_52, m2155_9 +# 2154| m2154_58(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2154_52 +# 2154| m2154_59(ClassWithDestructor) = Chi : total:m2155_9, partial:m2154_58 +# 2154| r2154_60(glval) = VariableAddress[(__begin)] : +# 2154| r2154_61(glval) = FunctionAddress[operator++] : +# 2154| r2154_62(iterator &) = Call[operator++] : func:r2154_61, this:r2154_60 +# 2154| m2154_63(unknown) = ^CallSideEffect : ~m2154_56 +# 2154| m2154_64(unknown) = Chi : total:m2154_56, partial:m2154_63 +# 2154| v2154_65(void) = ^IndirectReadSideEffect[-1] : &:r2154_60, m2154_34 +# 2154| m2154_66(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2154_60 +# 2154| m2154_67(iterator) = Chi : total:m2154_34, partial:m2154_66 +# 2154| r2154_68(glval) = CopyValue : r2154_62 #-----| Goto (back edge) -> Block 8 # 2157| Block 10 @@ -12868,8 +13020,8 @@ ir.cpp: #-----| Goto -> Block 11 # 2157| Block 11 -# 2157| m2157_34(iterator) = Phi : from 10:m2157_25, from 12:m2157_51 -# 2157| m2157_35(unknown) = Phi : from 10:~m2157_32, from 12:~m2157_48 +# 2157| m2157_34(iterator) = Phi : from 10:m2157_25, from 14:m2157_83 +# 2157| m2157_35(unknown) = Phi : from 10:~m2157_32, from 14:~m2157_80 # 2157| r2157_36(glval) = VariableAddress[(__begin)] : #-----| r0_17(glval) = Convert : r2157_36 # 2157| r2157_37(glval) = FunctionAddress[operator!=] : @@ -12881,40 +13033,28 @@ ir.cpp: #-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, m2157_34 # 2157| v2157_43(void) = ConditionalBranch : r2157_40 #-----| False -> Block 15 -#-----| True -> Block 13 +#-----| True -> Block 12 # 2157| Block 12 -# 2157| r2157_44(glval) = VariableAddress[(__begin)] : -# 2157| r2157_45(glval) = FunctionAddress[operator++] : -# 2157| r2157_46(iterator &) = Call[operator++] : func:r2157_45, this:r2157_44 -# 2157| m2157_47(unknown) = ^CallSideEffect : ~m2159_5 -# 2157| m2157_48(unknown) = Chi : total:m2159_5, partial:m2157_47 -# 2157| v2157_49(void) = ^IndirectReadSideEffect[-1] : &:r2157_44, m2157_34 -# 2157| m2157_50(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2157_44 -# 2157| m2157_51(iterator) = Chi : total:m2157_34, partial:m2157_50 -# 2157| r2157_52(glval) = CopyValue : r2157_46 -#-----| Goto (back edge) -> Block 11 - -# 2157| Block 13 -# 2157| r2157_53(glval) = VariableAddress[y] : -# 2157| r2157_54(glval) = VariableAddress[(__begin)] : -#-----| r0_19(glval) = Convert : r2157_54 -# 2157| r2157_55(glval) = FunctionAddress[operator*] : -# 2157| r2157_56(ClassWithDestructor &) = Call[operator*] : func:r2157_55, this:r0_19 -# 2157| m2157_57(unknown) = ^CallSideEffect : ~m2157_42 -# 2157| m2157_58(unknown) = Chi : total:m2157_42, partial:m2157_57 +# 2157| r2157_44(glval) = VariableAddress[y] : +# 2157| r2157_45(glval) = VariableAddress[(__begin)] : +#-----| r0_19(glval) = Convert : r2157_45 +# 2157| r2157_46(glval) = FunctionAddress[operator*] : +# 2157| r2157_47(ClassWithDestructor &) = Call[operator*] : func:r2157_46, this:r0_19 +# 2157| m2157_48(unknown) = ^CallSideEffect : ~m2157_42 +# 2157| m2157_49(unknown) = Chi : total:m2157_42, partial:m2157_48 #-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, m2157_34 -# 2157| r2157_59(ClassWithDestructor) = Load[?] : &:r2157_56, ~m2157_58 -# 2157| m2157_60(ClassWithDestructor) = Store[y] : &:r2157_53, r2157_59 +# 2157| r2157_50(ClassWithDestructor) = Load[?] : &:r2157_47, ~m2157_49 +# 2157| m2157_51(ClassWithDestructor) = Store[y] : &:r2157_44, r2157_50 # 2158| r2158_1(glval) = VariableAddress[y] : # 2158| r2158_2(glval) = FunctionAddress[set_x] : # 2158| r2158_3(char) = Constant[97] : # 2158| v2158_4(void) = Call[set_x] : func:r2158_2, this:r2158_1, 0:r2158_3 -# 2158| m2158_5(unknown) = ^CallSideEffect : ~m2157_58 -# 2158| m2158_6(unknown) = Chi : total:m2157_58, partial:m2158_5 -# 2158| v2158_7(void) = ^IndirectReadSideEffect[-1] : &:r2158_1, m2157_60 +# 2158| m2158_5(unknown) = ^CallSideEffect : ~m2157_49 +# 2158| m2158_6(unknown) = Chi : total:m2157_49, partial:m2158_5 +# 2158| v2158_7(void) = ^IndirectReadSideEffect[-1] : &:r2158_1, m2157_51 # 2158| m2158_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2158_1 -# 2158| m2158_9(ClassWithDestructor) = Chi : total:m2157_60, partial:m2158_8 +# 2158| m2158_9(ClassWithDestructor) = Chi : total:m2157_51, partial:m2158_8 # 2159| r2159_1(glval) = VariableAddress[y] : # 2159| r2159_2(glval) = FunctionAddress[get_x] : # 2159| r2159_3(char) = Call[get_x] : func:r2159_2, this:r2159_1 @@ -12927,13 +13067,57 @@ ir.cpp: # 2159| r2159_10(int) = Constant[98] : # 2159| r2159_11(bool) = CompareEQ : r2159_9, r2159_10 # 2159| v2159_12(void) = ConditionalBranch : r2159_11 -#-----| False -> Block 12 -#-----| True -> Block 14 +#-----| False -> Block 14 +#-----| True -> Block 13 -# 2160| Block 14 -# 2160| v2160_1(void) = NoOp : +# 2160| Block 13 +# 2160| v2160_1(void) = NoOp : +# 2157| r2157_52(glval) = VariableAddress[y] : +# 2157| r2157_53(glval) = FunctionAddress[~ClassWithDestructor] : +# 2157| v2157_54(void) = Call[~ClassWithDestructor] : func:r2157_53, this:r2157_52 +# 2157| m2157_55(unknown) = ^CallSideEffect : ~m2159_5 +# 2157| m2157_56(unknown) = Chi : total:m2159_5, partial:m2157_55 +# 2157| v2157_57(void) = ^IndirectReadSideEffect[-1] : &:r2157_52, m2159_8 +# 2157| m2157_58(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2157_52 +# 2157| m2157_59(ClassWithDestructor) = Chi : total:m2159_8, partial:m2157_58 +# 2157| r2157_60(glval>) = VariableAddress[ys] : +# 2157| r2157_61(glval) = FunctionAddress[~vector] : +# 2157| v2157_62(void) = Call[~vector] : func:r2157_61, this:r2157_60 +# 2157| m2157_63(unknown) = ^CallSideEffect : ~m2157_56 +# 2157| m2157_64(unknown) = Chi : total:m2157_56, partial:m2157_63 +# 2157| v2157_65(void) = ^IndirectReadSideEffect[-1] : &:r2157_60, m2157_13 +# 2157| m2157_66(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2157_60 +# 2157| m2157_67(vector) = Chi : total:m2157_13, partial:m2157_66 +# 2172| r2172_1(glval) = VariableAddress[x] : +# 2172| r2172_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2172| v2172_3(void) = Call[~ClassWithDestructor] : func:r2172_2, this:r2172_1 +# 2172| m2172_4(unknown) = ^CallSideEffect : ~m2157_64 +# 2172| m2172_5(unknown) = Chi : total:m2157_64, partial:m2172_4 +# 2172| v2172_6(void) = ^IndirectReadSideEffect[-1] : &:r2172_1, m2153_8 +# 2172| m2172_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2172_1 +# 2172| m2172_8(ClassWithDestructor) = Chi : total:m2153_8, partial:m2172_7 #-----| Goto -> Block 1 +# 2157| Block 14 +# 2157| r2157_68(glval) = VariableAddress[y] : +# 2157| r2157_69(glval) = FunctionAddress[~ClassWithDestructor] : +# 2157| v2157_70(void) = Call[~ClassWithDestructor] : func:r2157_69, this:r2157_68 +# 2157| m2157_71(unknown) = ^CallSideEffect : ~m2159_5 +# 2157| m2157_72(unknown) = Chi : total:m2159_5, partial:m2157_71 +# 2157| v2157_73(void) = ^IndirectReadSideEffect[-1] : &:r2157_68, m2159_8 +# 2157| m2157_74(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2157_68 +# 2157| m2157_75(ClassWithDestructor) = Chi : total:m2159_8, partial:m2157_74 +# 2157| r2157_76(glval) = VariableAddress[(__begin)] : +# 2157| r2157_77(glval) = FunctionAddress[operator++] : +# 2157| r2157_78(iterator &) = Call[operator++] : func:r2157_77, this:r2157_76 +# 2157| m2157_79(unknown) = ^CallSideEffect : ~m2157_72 +# 2157| m2157_80(unknown) = Chi : total:m2157_72, partial:m2157_79 +# 2157| v2157_81(void) = ^IndirectReadSideEffect[-1] : &:r2157_76, m2157_34 +# 2157| m2157_82(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2157_76 +# 2157| m2157_83(iterator) = Chi : total:m2157_34, partial:m2157_82 +# 2157| r2157_84(glval) = CopyValue : r2157_78 +#-----| Goto (back edge) -> Block 11 + # 2163| Block 15 # 2163| r2163_1(glval>) = VariableAddress[ys] : # 2163| m2163_2(vector) = Uninitialized[ys] : &:r2163_1 @@ -13020,7 +13204,23 @@ ir.cpp: #-----| True -> Block 19 # 2165| Block 19 -# 2165| v2165_1(void) = NoOp : +# 2165| v2165_1(void) = NoOp : +# 2163| r2163_57(glval>) = VariableAddress[ys] : +# 2163| r2163_58(glval) = FunctionAddress[~vector] : +# 2163| v2163_59(void) = Call[~vector] : func:r2163_58, this:r2163_57 +# 2163| m2163_60(unknown) = ^CallSideEffect : ~m2163_54 +# 2163| m2163_61(unknown) = Chi : total:m2163_54, partial:m2163_60 +# 2163| v2163_62(void) = ^IndirectReadSideEffect[-1] : &:r2163_57, m2163_9 +# 2163| m2163_63(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2163_57 +# 2163| m2163_64(vector) = Chi : total:m2163_9, partial:m2163_63 +# 2172| r2172_9(glval) = VariableAddress[x] : +# 2172| r2172_10(glval) = FunctionAddress[~ClassWithDestructor] : +# 2172| v2172_11(void) = Call[~ClassWithDestructor] : func:r2172_10, this:r2172_9 +# 2172| m2172_12(unknown) = ^CallSideEffect : ~m2163_61 +# 2172| m2172_13(unknown) = Chi : total:m2163_61, partial:m2172_12 +# 2172| v2172_14(void) = ^IndirectReadSideEffect[-1] : &:r2172_9, m2153_8 +# 2172| m2172_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2172_9 +# 2172| m2172_16(ClassWithDestructor) = Chi : total:m2153_8, partial:m2172_15 #-----| Goto -> Block 1 # 2168| Block 20 @@ -13066,8 +13266,8 @@ ir.cpp: #-----| Goto -> Block 21 # 2168| Block 21 -# 2168| m2168_34(iterator) = Phi : from 20:m2168_25, from 22:m2168_59 -# 2168| m2168_35(unknown) = Phi : from 20:~m2168_32, from 22:~m2168_56 +# 2168| m2168_34(iterator) = Phi : from 20:m2168_25, from 22:m2168_67 +# 2168| m2168_35(unknown) = Phi : from 20:~m2168_32, from 22:~m2168_64 # 2168| r2168_36(glval) = VariableAddress[(__begin)] : #-----| r0_37(glval) = Convert : r2168_36 # 2168| r2168_37(glval) = FunctionAddress[operator!=] : @@ -13082,45 +13282,77 @@ ir.cpp: #-----| True -> Block 22 # 2168| Block 22 -# 2168| r2168_44(glval) = VariableAddress[y] : -# 2168| r2168_45(glval) = VariableAddress[(__begin)] : -#-----| r0_39(glval) = Convert : r2168_45 -# 2168| r2168_46(glval) = FunctionAddress[operator*] : -# 2168| r2168_47(ClassWithDestructor &) = Call[operator*] : func:r2168_46, this:r0_39 -# 2168| m2168_48(unknown) = ^CallSideEffect : ~m2168_42 -# 2168| m2168_49(unknown) = Chi : total:m2168_42, partial:m2168_48 -#-----| v0_40(void) = ^IndirectReadSideEffect[-1] : &:r0_39, m2168_34 -# 2168| r2168_50(ClassWithDestructor) = Load[?] : &:r2168_47, ~m2168_49 -# 2168| m2168_51(ClassWithDestructor) = Store[y] : &:r2168_44, r2168_50 -# 2169| r2169_1(glval) = VariableAddress[z1] : -# 2169| m2169_2(ClassWithDestructor) = Uninitialized[z1] : &:r2169_1 -# 2169| r2169_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2169| v2169_4(void) = Call[ClassWithDestructor] : func:r2169_3, this:r2169_1 -# 2169| m2169_5(unknown) = ^CallSideEffect : ~m2168_49 -# 2169| m2169_6(unknown) = Chi : total:m2168_49, partial:m2169_5 -# 2169| m2169_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2169_1 -# 2169| m2169_8(ClassWithDestructor) = Chi : total:m2169_2, partial:m2169_7 -# 2170| r2170_1(glval) = VariableAddress[z2] : -# 2170| m2170_2(ClassWithDestructor) = Uninitialized[z2] : &:r2170_1 -# 2170| r2170_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2170| v2170_4(void) = Call[ClassWithDestructor] : func:r2170_3, this:r2170_1 -# 2170| m2170_5(unknown) = ^CallSideEffect : ~m2169_6 -# 2170| m2170_6(unknown) = Chi : total:m2169_6, partial:m2170_5 -# 2170| m2170_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2170_1 -# 2170| m2170_8(ClassWithDestructor) = Chi : total:m2170_2, partial:m2170_7 -# 2168| r2168_52(glval) = VariableAddress[(__begin)] : -# 2168| r2168_53(glval) = FunctionAddress[operator++] : -# 2168| r2168_54(iterator &) = Call[operator++] : func:r2168_53, this:r2168_52 -# 2168| m2168_55(unknown) = ^CallSideEffect : ~m2170_6 -# 2168| m2168_56(unknown) = Chi : total:m2170_6, partial:m2168_55 -# 2168| v2168_57(void) = ^IndirectReadSideEffect[-1] : &:r2168_52, m2168_34 -# 2168| m2168_58(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2168_52 -# 2168| m2168_59(iterator) = Chi : total:m2168_34, partial:m2168_58 -# 2168| r2168_60(glval) = CopyValue : r2168_54 +# 2168| r2168_44(glval) = VariableAddress[y] : +# 2168| r2168_45(glval) = VariableAddress[(__begin)] : +#-----| r0_39(glval) = Convert : r2168_45 +# 2168| r2168_46(glval) = FunctionAddress[operator*] : +# 2168| r2168_47(ClassWithDestructor &) = Call[operator*] : func:r2168_46, this:r0_39 +# 2168| m2168_48(unknown) = ^CallSideEffect : ~m2168_42 +# 2168| m2168_49(unknown) = Chi : total:m2168_42, partial:m2168_48 +#-----| v0_40(void) = ^IndirectReadSideEffect[-1] : &:r0_39, m2168_34 +# 2168| r2168_50(ClassWithDestructor) = Load[?] : &:r2168_47, ~m2168_49 +# 2168| m2168_51(ClassWithDestructor) = Store[y] : &:r2168_44, r2168_50 +# 2169| r2169_1(glval) = VariableAddress[z1] : +# 2169| m2169_2(ClassWithDestructor) = Uninitialized[z1] : &:r2169_1 +# 2169| r2169_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2169| v2169_4(void) = Call[ClassWithDestructor] : func:r2169_3, this:r2169_1 +# 2169| m2169_5(unknown) = ^CallSideEffect : ~m2168_49 +# 2169| m2169_6(unknown) = Chi : total:m2168_49, partial:m2169_5 +# 2169| m2169_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2169_1 +# 2169| m2169_8(ClassWithDestructor) = Chi : total:m2169_2, partial:m2169_7 +# 2170| r2170_1(glval) = VariableAddress[z2] : +# 2170| m2170_2(ClassWithDestructor) = Uninitialized[z2] : &:r2170_1 +# 2170| r2170_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2170| v2170_4(void) = Call[ClassWithDestructor] : func:r2170_3, this:r2170_1 +# 2170| m2170_5(unknown) = ^CallSideEffect : ~m2169_6 +# 2170| m2170_6(unknown) = Chi : total:m2169_6, partial:m2170_5 +# 2170| m2170_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2170_1 +# 2170| m2170_8(ClassWithDestructor) = Chi : total:m2170_2, partial:m2170_7 +# 2171| r2171_1(glval) = VariableAddress[z2] : +# 2171| r2171_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2171| v2171_3(void) = Call[~ClassWithDestructor] : func:r2171_2, this:r2171_1 +# 2171| m2171_4(unknown) = ^CallSideEffect : ~m2170_6 +# 2171| m2171_5(unknown) = Chi : total:m2170_6, partial:m2171_4 +# 2171| v2171_6(void) = ^IndirectReadSideEffect[-1] : &:r2171_1, m2170_8 +# 2171| m2171_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2171_1 +# 2171| m2171_8(ClassWithDestructor) = Chi : total:m2170_8, partial:m2171_7 +# 2171| r2171_9(glval) = VariableAddress[z1] : +# 2171| r2171_10(glval) = FunctionAddress[~ClassWithDestructor] : +# 2171| v2171_11(void) = Call[~ClassWithDestructor] : func:r2171_10, this:r2171_9 +# 2171| m2171_12(unknown) = ^CallSideEffect : ~m2171_5 +# 2171| m2171_13(unknown) = Chi : total:m2171_5, partial:m2171_12 +# 2171| v2171_14(void) = ^IndirectReadSideEffect[-1] : &:r2171_9, m2169_8 +# 2171| m2171_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2171_9 +# 2171| m2171_16(ClassWithDestructor) = Chi : total:m2169_8, partial:m2171_15 +# 2168| r2168_52(glval) = VariableAddress[y] : +# 2168| r2168_53(glval) = FunctionAddress[~ClassWithDestructor] : +# 2168| v2168_54(void) = Call[~ClassWithDestructor] : func:r2168_53, this:r2168_52 +# 2168| m2168_55(unknown) = ^CallSideEffect : ~m2171_13 +# 2168| m2168_56(unknown) = Chi : total:m2171_13, partial:m2168_55 +# 2168| v2168_57(void) = ^IndirectReadSideEffect[-1] : &:r2168_52, m2168_51 +# 2168| m2168_58(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2168_52 +# 2168| m2168_59(ClassWithDestructor) = Chi : total:m2168_51, partial:m2168_58 +# 2168| r2168_60(glval) = VariableAddress[(__begin)] : +# 2168| r2168_61(glval) = FunctionAddress[operator++] : +# 2168| r2168_62(iterator &) = Call[operator++] : func:r2168_61, this:r2168_60 +# 2168| m2168_63(unknown) = ^CallSideEffect : ~m2168_56 +# 2168| m2168_64(unknown) = Chi : total:m2168_56, partial:m2168_63 +# 2168| v2168_65(void) = ^IndirectReadSideEffect[-1] : &:r2168_60, m2168_34 +# 2168| m2168_66(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2168_60 +# 2168| m2168_67(iterator) = Chi : total:m2168_34, partial:m2168_66 +# 2168| r2168_68(glval) = CopyValue : r2168_62 #-----| Goto (back edge) -> Block 21 # 2172| Block 23 -# 2172| v2172_1(void) = NoOp : +# 2172| v2172_17(void) = NoOp : +# 2172| r2172_18(glval) = VariableAddress[x] : +# 2172| r2172_19(glval) = FunctionAddress[~ClassWithDestructor] : +# 2172| v2172_20(void) = Call[~ClassWithDestructor] : func:r2172_19, this:r2172_18 +# 2172| m2172_21(unknown) = ^CallSideEffect : ~m2168_42 +# 2172| m2172_22(unknown) = Chi : total:m2168_42, partial:m2172_21 +# 2172| v2172_23(void) = ^IndirectReadSideEffect[-1] : &:r2172_18, m2153_8 +# 2172| m2172_24(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2172_18 +# 2172| m2172_25(ClassWithDestructor) = Chi : total:m2153_8, partial:m2172_24 #-----| Goto -> Block 1 # 2137| Block 24 @@ -13160,11 +13392,19 @@ ir.cpp: #-----| Goto -> Block 2 # 2177| Block 2 -# 2177| m2177_1(unknown) = Phi : from 0:~m2175_6, from 1:~m2176_7 -# 2177| v2177_2(void) = NoOp : -# 2174| v2174_5(void) = ReturnVoid : -# 2174| v2174_6(void) = AliasedUse : ~m2177_1 -# 2174| v2174_7(void) = ExitFunction : +# 2177| m2177_1(unknown) = Phi : from 0:~m2175_6, from 1:~m2176_7 +# 2177| v2177_2(void) = NoOp : +# 2177| r2177_3(glval) = VariableAddress[a] : +# 2177| r2177_4(glval) = FunctionAddress[~ClassWithDestructor] : +# 2177| v2177_5(void) = Call[~ClassWithDestructor] : func:r2177_4, this:r2177_3 +# 2177| m2177_6(unknown) = ^CallSideEffect : ~m2177_1 +# 2177| m2177_7(unknown) = Chi : total:m2177_1, partial:m2177_6 +# 2177| v2177_8(void) = ^IndirectReadSideEffect[-1] : &:r2177_3, m2175_8 +# 2177| m2177_9(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2177_3 +# 2177| m2177_10(ClassWithDestructor) = Chi : total:m2175_8, partial:m2177_9 +# 2174| v2174_5(void) = ReturnVoid : +# 2174| v2174_6(void) = AliasedUse : ~m2177_7 +# 2174| v2174_7(void) = ExitFunction : # 2179| void static_variable_with_destructor_2() # 2179| Block 0 @@ -13192,19 +13432,27 @@ ir.cpp: #-----| Goto -> Block 2 # 2181| Block 2 -# 2181| m2181_1(unknown) = Phi : from 0:~m2179_4, from 1:~m2180_7 -# 2181| r2181_2(glval) = VariableAddress[b] : -# 2181| m2181_3(ClassWithDestructor) = Uninitialized[b] : &:r2181_2 -# 2181| r2181_4(glval) = FunctionAddress[ClassWithDestructor] : -# 2181| v2181_5(void) = Call[ClassWithDestructor] : func:r2181_4, this:r2181_2 -# 2181| m2181_6(unknown) = ^CallSideEffect : ~m2181_1 -# 2181| m2181_7(unknown) = Chi : total:m2181_1, partial:m2181_6 -# 2181| m2181_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2181_2 -# 2181| m2181_9(ClassWithDestructor) = Chi : total:m2181_3, partial:m2181_8 -# 2182| v2182_1(void) = NoOp : -# 2179| v2179_5(void) = ReturnVoid : -# 2179| v2179_6(void) = AliasedUse : ~m2181_7 -# 2179| v2179_7(void) = ExitFunction : +# 2181| m2181_1(unknown) = Phi : from 0:~m2179_4, from 1:~m2180_7 +# 2181| r2181_2(glval) = VariableAddress[b] : +# 2181| m2181_3(ClassWithDestructor) = Uninitialized[b] : &:r2181_2 +# 2181| r2181_4(glval) = FunctionAddress[ClassWithDestructor] : +# 2181| v2181_5(void) = Call[ClassWithDestructor] : func:r2181_4, this:r2181_2 +# 2181| m2181_6(unknown) = ^CallSideEffect : ~m2181_1 +# 2181| m2181_7(unknown) = Chi : total:m2181_1, partial:m2181_6 +# 2181| m2181_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2181_2 +# 2181| m2181_9(ClassWithDestructor) = Chi : total:m2181_3, partial:m2181_8 +# 2182| v2182_1(void) = NoOp : +# 2182| r2182_2(glval) = VariableAddress[b] : +# 2182| r2182_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2182| v2182_4(void) = Call[~ClassWithDestructor] : func:r2182_3, this:r2182_2 +# 2182| m2182_5(unknown) = ^CallSideEffect : ~m2181_7 +# 2182| m2182_6(unknown) = Chi : total:m2181_7, partial:m2182_5 +# 2182| v2182_7(void) = ^IndirectReadSideEffect[-1] : &:r2182_2, m2181_9 +# 2182| m2182_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2182_2 +# 2182| m2182_9(ClassWithDestructor) = Chi : total:m2181_9, partial:m2182_8 +# 2179| v2179_5(void) = ReturnVoid : +# 2179| v2179_6(void) = AliasedUse : ~m2182_6 +# 2179| v2179_7(void) = ExitFunction : # 2184| void static_variable_with_destructor_3() # 2184| Block 0 @@ -13248,11 +13496,27 @@ ir.cpp: #-----| Goto -> Block 2 # 2188| Block 2 -# 2188| m2188_1(unknown) = Phi : from 0:~m2186_6, from 1:~m2187_7 -# 2188| v2188_2(void) = NoOp : -# 2184| v2184_5(void) = ReturnVoid : -# 2184| v2184_6(void) = AliasedUse : ~m2188_1 -# 2184| v2184_7(void) = ExitFunction : +# 2188| m2188_1(unknown) = Phi : from 0:~m2186_6, from 1:~m2187_7 +# 2188| v2188_2(void) = NoOp : +# 2188| r2188_3(glval) = VariableAddress[b] : +# 2188| r2188_4(glval) = FunctionAddress[~ClassWithDestructor] : +# 2188| v2188_5(void) = Call[~ClassWithDestructor] : func:r2188_4, this:r2188_3 +# 2188| m2188_6(unknown) = ^CallSideEffect : ~m2188_1 +# 2188| m2188_7(unknown) = Chi : total:m2188_1, partial:m2188_6 +# 2188| v2188_8(void) = ^IndirectReadSideEffect[-1] : &:r2188_3, m2186_8 +# 2188| m2188_9(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2188_3 +# 2188| m2188_10(ClassWithDestructor) = Chi : total:m2186_8, partial:m2188_9 +# 2188| r2188_11(glval) = VariableAddress[a] : +# 2188| r2188_12(glval) = FunctionAddress[~ClassWithDestructor] : +# 2188| v2188_13(void) = Call[~ClassWithDestructor] : func:r2188_12, this:r2188_11 +# 2188| m2188_14(unknown) = ^CallSideEffect : ~m2188_7 +# 2188| m2188_15(unknown) = Chi : total:m2188_7, partial:m2188_14 +# 2188| v2188_16(void) = ^IndirectReadSideEffect[-1] : &:r2188_11, m2185_8 +# 2188| m2188_17(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2188_11 +# 2188| m2188_18(ClassWithDestructor) = Chi : total:m2185_8, partial:m2188_17 +# 2184| v2184_5(void) = ReturnVoid : +# 2184| v2184_6(void) = AliasedUse : ~m2188_15 +# 2184| v2184_7(void) = ExitFunction : # 2190| ClassWithDestructor global_class_with_destructor # 2190| Block 0 @@ -13269,6 +13533,1066 @@ ir.cpp: # 2190| v2190_11(void) = AliasedUse : ~m2190_9 # 2190| v2190_12(void) = ExitFunction : +# 2194| ClassWithDestructor& vacuous_destructor_call::get(ClassWithDestructor&) +# 2194| Block 0 +# 2194| v2194_1(void) = EnterFunction : +# 2194| m2194_2(unknown) = AliasedDefinition : +# 2194| m2194_3(unknown) = InitializeNonLocal : +# 2194| m2194_4(unknown) = Chi : total:m2194_2, partial:m2194_3 +# 2194| r2194_5(glval) = VariableAddress[t] : +# 2194| m2194_6(ClassWithDestructor &) = InitializeParameter[t] : &:r2194_5 +# 2194| r2194_7(ClassWithDestructor &) = Load[t] : &:r2194_5, m2194_6 +# 2194| m2194_8(unknown) = InitializeIndirection[t] : &:r2194_7 +# 2194| r2194_9(glval) = VariableAddress[#return] : +# 2194| r2194_10(glval) = VariableAddress[t] : +# 2194| r2194_11(ClassWithDestructor &) = Load[t] : &:r2194_10, m2194_6 +# 2194| r2194_12(glval) = CopyValue : r2194_11 +# 2194| r2194_13(ClassWithDestructor &) = CopyValue : r2194_12 +# 2194| m2194_14(ClassWithDestructor &) = Store[#return] : &:r2194_9, r2194_13 +# 2194| v2194_15(void) = ReturnIndirection[t] : &:r2194_7, m2194_8 +# 2194| r2194_16(glval) = VariableAddress[#return] : +# 2194| v2194_17(void) = ReturnValue : &:r2194_16, m2194_14 +# 2194| v2194_18(void) = AliasedUse : m2194_3 +# 2194| v2194_19(void) = ExitFunction : + +# 2194| int& vacuous_destructor_call::get(int&) +# 2194| Block 0 +# 2194| v2194_1(void) = EnterFunction : +# 2194| m2194_2(unknown) = AliasedDefinition : +# 2194| m2194_3(unknown) = InitializeNonLocal : +# 2194| m2194_4(unknown) = Chi : total:m2194_2, partial:m2194_3 +# 2194| r2194_5(glval) = VariableAddress[t] : +# 2194| m2194_6(int &) = InitializeParameter[t] : &:r2194_5 +# 2194| r2194_7(int &) = Load[t] : &:r2194_5, m2194_6 +# 2194| m2194_8(unknown) = InitializeIndirection[t] : &:r2194_7 +# 2194| r2194_9(glval) = VariableAddress[#return] : +# 2194| r2194_10(glval) = VariableAddress[t] : +# 2194| r2194_11(int &) = Load[t] : &:r2194_10, m2194_6 +# 2194| r2194_12(glval) = CopyValue : r2194_11 +# 2194| r2194_13(int &) = CopyValue : r2194_12 +# 2194| m2194_14(int &) = Store[#return] : &:r2194_9, r2194_13 +# 2194| v2194_15(void) = ReturnIndirection[t] : &:r2194_7, m2194_8 +# 2194| r2194_16(glval) = VariableAddress[#return] : +# 2194| v2194_17(void) = ReturnValue : &:r2194_16, m2194_14 +# 2194| v2194_18(void) = AliasedUse : m2194_3 +# 2194| v2194_19(void) = ExitFunction : + +# 2197| void vacuous_destructor_call::call_destructor(ClassWithDestructor&) +# 2197| Block 0 +# 2197| v2197_1(void) = EnterFunction : +# 2197| m2197_2(unknown) = AliasedDefinition : +# 2197| m2197_3(unknown) = InitializeNonLocal : +# 2197| m2197_4(unknown) = Chi : total:m2197_2, partial:m2197_3 +# 2197| r2197_5(glval) = VariableAddress[t] : +# 2197| m2197_6(ClassWithDestructor &) = InitializeParameter[t] : &:r2197_5 +# 2197| r2197_7(ClassWithDestructor &) = Load[t] : &:r2197_5, m2197_6 +# 2197| m2197_8(unknown) = InitializeIndirection[t] : &:r2197_7 +# 2198| r2198_1(glval) = FunctionAddress[get] : +# 2198| r2198_2(glval) = VariableAddress[t] : +# 2198| r2198_3(ClassWithDestructor &) = Load[t] : &:r2198_2, m2197_6 +# 2198| r2198_4(glval) = CopyValue : r2198_3 +# 2198| r2198_5(ClassWithDestructor &) = CopyValue : r2198_4 +# 2198| r2198_6(ClassWithDestructor &) = Call[get] : func:r2198_1, 0:r2198_5 +# 2198| m2198_7(unknown) = ^CallSideEffect : ~m2197_4 +# 2198| m2198_8(unknown) = Chi : total:m2197_4, partial:m2198_7 +# 2198| v2198_9(void) = ^BufferReadSideEffect[0] : &:r2198_5, ~m2197_8 +# 2198| m2198_10(unknown) = ^BufferMayWriteSideEffect[0] : &:r2198_5 +# 2198| m2198_11(unknown) = Chi : total:m2197_8, partial:m2198_10 +# 2198| r2198_12(glval) = CopyValue : r2198_6 +# 2198| r2198_13(glval) = FunctionAddress[~ClassWithDestructor] : +# 2198| v2198_14(void) = Call[~ClassWithDestructor] : func:r2198_13 +# 2198| m2198_15(unknown) = ^CallSideEffect : ~m2198_8 +# 2198| m2198_16(unknown) = Chi : total:m2198_8, partial:m2198_15 +# 2198| v2198_17(void) = ^IndirectReadSideEffect[-1] : &:r2198_12, ~m2198_11 +# 2198| m2198_18(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2198_12 +# 2198| m2198_19(unknown) = Chi : total:m2198_11, partial:m2198_18 +# 2199| v2199_1(void) = NoOp : +# 2197| v2197_9(void) = ReturnIndirection[t] : &:r2197_7, m2198_19 +# 2197| v2197_10(void) = ReturnVoid : +# 2197| v2197_11(void) = AliasedUse : ~m2198_16 +# 2197| v2197_12(void) = ExitFunction : + +# 2197| void vacuous_destructor_call::call_destructor(int&) +# 2197| Block 0 +# 2197| v2197_1(void) = EnterFunction : +# 2197| m2197_2(unknown) = AliasedDefinition : +# 2197| m2197_3(unknown) = InitializeNonLocal : +# 2197| m2197_4(unknown) = Chi : total:m2197_2, partial:m2197_3 +# 2197| r2197_5(glval) = VariableAddress[t] : +# 2197| m2197_6(int &) = InitializeParameter[t] : &:r2197_5 +# 2197| r2197_7(int &) = Load[t] : &:r2197_5, m2197_6 +# 2197| m2197_8(unknown) = InitializeIndirection[t] : &:r2197_7 +# 2198| r2198_1(glval) = FunctionAddress[get] : +# 2198| r2198_2(glval) = VariableAddress[t] : +# 2198| r2198_3(int &) = Load[t] : &:r2198_2, m2197_6 +# 2198| r2198_4(glval) = CopyValue : r2198_3 +# 2198| r2198_5(int &) = CopyValue : r2198_4 +# 2198| r2198_6(int &) = Call[get] : func:r2198_1, 0:r2198_5 +# 2198| m2198_7(unknown) = ^CallSideEffect : ~m2197_4 +# 2198| m2198_8(unknown) = Chi : total:m2197_4, partial:m2198_7 +# 2198| v2198_9(void) = ^BufferReadSideEffect[0] : &:r2198_5, ~m2197_8 +# 2198| m2198_10(unknown) = ^BufferMayWriteSideEffect[0] : &:r2198_5 +# 2198| m2198_11(unknown) = Chi : total:m2197_8, partial:m2198_10 +# 2198| r2198_12(glval) = CopyValue : r2198_6 +# 2199| v2199_1(void) = NoOp : +# 2197| v2197_9(void) = ReturnIndirection[t] : &:r2197_7, m2198_11 +# 2197| v2197_10(void) = ReturnVoid : +# 2197| v2197_11(void) = AliasedUse : ~m2198_8 +# 2197| v2197_12(void) = ExitFunction : + +# 2201| void vacuous_destructor_call::non_vacuous_destructor_call() +# 2201| Block 0 +# 2201| v2201_1(void) = EnterFunction : +# 2201| m2201_2(unknown) = AliasedDefinition : +# 2201| m2201_3(unknown) = InitializeNonLocal : +# 2201| m2201_4(unknown) = Chi : total:m2201_2, partial:m2201_3 +# 2202| r2202_1(glval) = VariableAddress[c] : +# 2202| m2202_2(ClassWithDestructor) = Uninitialized[c] : &:r2202_1 +# 2202| r2202_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2202| v2202_4(void) = Call[ClassWithDestructor] : func:r2202_3, this:r2202_1 +# 2202| m2202_5(unknown) = ^CallSideEffect : ~m2201_4 +# 2202| m2202_6(unknown) = Chi : total:m2201_4, partial:m2202_5 +# 2202| m2202_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2202_1 +# 2202| m2202_8(ClassWithDestructor) = Chi : total:m2202_2, partial:m2202_7 +# 2203| r2203_1(glval) = FunctionAddress[call_destructor] : +# 2203| r2203_2(glval) = VariableAddress[c] : +# 2203| r2203_3(ClassWithDestructor &) = CopyValue : r2203_2 +# 2203| v2203_4(void) = Call[call_destructor] : func:r2203_1, 0:r2203_3 +# 2203| m2203_5(unknown) = ^CallSideEffect : ~m2202_6 +# 2203| m2203_6(unknown) = Chi : total:m2202_6, partial:m2203_5 +# 2203| v2203_7(void) = ^BufferReadSideEffect[0] : &:r2203_3, ~m2202_8 +# 2203| m2203_8(unknown) = ^BufferMayWriteSideEffect[0] : &:r2203_3 +# 2203| m2203_9(ClassWithDestructor) = Chi : total:m2202_8, partial:m2203_8 +# 2204| v2204_1(void) = NoOp : +# 2204| r2204_2(glval) = VariableAddress[c] : +# 2204| r2204_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2204| v2204_4(void) = Call[~ClassWithDestructor] : func:r2204_3, this:r2204_2 +# 2204| m2204_5(unknown) = ^CallSideEffect : ~m2203_6 +# 2204| m2204_6(unknown) = Chi : total:m2203_6, partial:m2204_5 +# 2204| v2204_7(void) = ^IndirectReadSideEffect[-1] : &:r2204_2, m2203_9 +# 2204| m2204_8(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2204_2 +# 2204| m2204_9(ClassWithDestructor) = Chi : total:m2203_9, partial:m2204_8 +# 2201| v2201_5(void) = ReturnVoid : +# 2201| v2201_6(void) = AliasedUse : ~m2204_6 +# 2201| v2201_7(void) = ExitFunction : + +# 2206| void vacuous_destructor_call::vacuous_destructor_call() +# 2206| Block 0 +# 2206| v2206_1(void) = EnterFunction : +# 2206| m2206_2(unknown) = AliasedDefinition : +# 2206| m2206_3(unknown) = InitializeNonLocal : +# 2206| m2206_4(unknown) = Chi : total:m2206_2, partial:m2206_3 +# 2207| r2207_1(glval) = VariableAddress[i] : +# 2207| m2207_2(int) = Uninitialized[i] : &:r2207_1 +# 2208| r2208_1(glval) = FunctionAddress[call_destructor] : +# 2208| r2208_2(glval) = VariableAddress[i] : +# 2208| r2208_3(int &) = CopyValue : r2208_2 +# 2208| v2208_4(void) = Call[call_destructor] : func:r2208_1, 0:r2208_3 +# 2208| m2208_5(unknown) = ^CallSideEffect : ~m2206_4 +# 2208| m2208_6(unknown) = Chi : total:m2206_4, partial:m2208_5 +# 2208| v2208_7(void) = ^BufferReadSideEffect[0] : &:r2208_3, ~m2207_2 +# 2208| m2208_8(unknown) = ^BufferMayWriteSideEffect[0] : &:r2208_3 +# 2208| m2208_9(int) = Chi : total:m2207_2, partial:m2208_8 +# 2209| v2209_1(void) = NoOp : +# 2206| v2206_5(void) = ReturnVoid : +# 2206| v2206_6(void) = AliasedUse : ~m2208_6 +# 2206| v2206_7(void) = ExitFunction : + +# 2212| void TryCatchDestructors(bool) +# 2212| Block 0 +# 2212| v2212_1(void) = EnterFunction : +# 2212| m2212_2(unknown) = AliasedDefinition : +# 2212| m2212_3(unknown) = InitializeNonLocal : +# 2212| m2212_4(unknown) = Chi : total:m2212_2, partial:m2212_3 +# 2212| r2212_5(glval) = VariableAddress[b] : +# 2212| m2212_6(bool) = InitializeParameter[b] : &:r2212_5 +# 2214| r2214_1(glval) = VariableAddress[s] : +# 2214| m2214_2(String) = Uninitialized[s] : &:r2214_1 +# 2214| r2214_3(glval) = FunctionAddress[String] : +# 2214| v2214_4(void) = Call[String] : func:r2214_3, this:r2214_1 +# 2214| m2214_5(unknown) = ^CallSideEffect : ~m2212_4 +# 2214| m2214_6(unknown) = Chi : total:m2212_4, partial:m2214_5 +# 2214| m2214_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2214_1 +# 2214| m2214_8(String) = Chi : total:m2214_2, partial:m2214_7 +# 2215| r2215_1(glval) = VariableAddress[b] : +# 2215| r2215_2(bool) = Load[b] : &:r2215_1, m2212_6 +# 2215| v2215_3(void) = ConditionalBranch : r2215_2 +#-----| False -> Block 4 +#-----| True -> Block 3 + +# 2212| Block 1 +# 2212| m2212_7(unknown) = Phi : from 2:~m2212_10, from 10:~m2228_1 +# 2212| v2212_8(void) = AliasedUse : ~m2212_7 +# 2212| v2212_9(void) = ExitFunction : + +# 2212| Block 2 +# 2212| m2212_10(unknown) = Phi : from 6:~m2221_8, from 9:~m2214_6 +# 2212| v2212_11(void) = Unwind : +#-----| Goto -> Block 1 + +# 2216| Block 3 +# 2216| r2216_1(glval) = VariableAddress[#throw2216:7] : +# 2216| r2216_2(glval) = StringConstant["string literal"] : +# 2216| r2216_3(char *) = Convert : r2216_2 +# 2216| m2216_4(char *) = Store[#throw2216:7] : &:r2216_1, r2216_3 +# 2216| v2216_5(void) = ThrowValue : &:r2216_1, m2216_4 +#-----| Exception -> Block 5 + +# 2218| Block 4 +# 2218| r2218_1(glval) = VariableAddress[s2] : +# 2218| m2218_2(String) = Uninitialized[s2] : &:r2218_1 +# 2218| r2218_3(glval) = FunctionAddress[String] : +# 2218| v2218_4(void) = Call[String] : func:r2218_3, this:r2218_1 +# 2218| m2218_5(unknown) = ^CallSideEffect : ~m2214_6 +# 2218| m2218_6(unknown) = Chi : total:m2214_6, partial:m2218_5 +# 2218| m2218_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2218_1 +# 2218| m2218_8(String) = Chi : total:m2218_2, partial:m2218_7 +# 2219| r2219_1(glval) = VariableAddress[s2] : +# 2219| r2219_2(glval) = FunctionAddress[~String] : +# 2219| v2219_3(void) = Call[~String] : func:r2219_2, this:r2219_1 +# 2219| m2219_4(unknown) = ^CallSideEffect : ~m2218_6 +# 2219| m2219_5(unknown) = Chi : total:m2218_6, partial:m2219_4 +# 2219| v2219_6(void) = ^IndirectReadSideEffect[-1] : &:r2219_1, m2218_8 +# 2219| m2219_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2219_1 +# 2219| m2219_8(String) = Chi : total:m2218_8, partial:m2219_7 +# 2219| r2219_9(glval) = VariableAddress[s] : +# 2219| r2219_10(glval) = FunctionAddress[~String] : +# 2219| v2219_11(void) = Call[~String] : func:r2219_10, this:r2219_9 +# 2219| m2219_12(unknown) = ^CallSideEffect : ~m2219_5 +# 2219| m2219_13(unknown) = Chi : total:m2219_5, partial:m2219_12 +# 2219| v2219_14(void) = ^IndirectReadSideEffect[-1] : &:r2219_9, m2214_8 +# 2219| m2219_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2219_9 +# 2219| m2219_16(String) = Chi : total:m2214_8, partial:m2219_15 +#-----| Goto -> Block 10 + +# 2220| Block 5 +# 2220| v2220_1(void) = CatchByType[const char *] : +#-----| Exception -> Block 7 +#-----| Goto -> Block 6 + +# 2220| Block 6 +# 2220| r2220_2(glval) = VariableAddress[s] : +# 2220| m2220_3(char *) = InitializeParameter[s] : &:r2220_2 +# 2220| r2220_4(char *) = Load[s] : &:r2220_2, m2220_3 +# 2220| m2220_5(unknown) = InitializeIndirection[s] : &:r2220_4 +# 2221| r2221_1(glval) = VariableAddress[#throw2221:5] : +# 2221| m2221_2(String) = Uninitialized[#throw2221:5] : &:r2221_1 +# 2221| r2221_3(glval) = FunctionAddress[String] : +# 2221| r2221_4(glval) = VariableAddress[s] : +# 2221| r2221_5(char *) = Load[s] : &:r2221_4, m2220_3 +# 2221| v2221_6(void) = Call[String] : func:r2221_3, this:r2221_1, 0:r2221_5 +# 2221| m2221_7(unknown) = ^CallSideEffect : ~m2214_6 +# 2221| m2221_8(unknown) = Chi : total:m2214_6, partial:m2221_7 +# 2221| v2221_9(void) = ^BufferReadSideEffect[0] : &:r2221_5, ~m2220_5 +# 2221| m2221_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r2221_1 +# 2221| m2221_11(String) = Chi : total:m2221_2, partial:m2221_10 +# 2221| v2221_12(void) = ThrowValue : &:r2221_1, m2221_11 +#-----| Exception -> Block 2 + +# 2223| Block 7 +# 2223| v2223_1(void) = CatchByType[const String &] : +#-----| Exception -> Block 9 +#-----| Goto -> Block 8 + +# 2223| Block 8 +# 2223| r2223_2(glval) = VariableAddress[e] : +# 2223| m2223_3(String &) = InitializeParameter[e] : &:r2223_2 +# 2223| r2223_4(String &) = Load[e] : &:r2223_2, m2223_3 +# 2223| m2223_5(unknown) = InitializeIndirection[e] : &:r2223_4 +# 2223| v2223_6(void) = NoOp : +#-----| Goto -> Block 10 + +# 2225| Block 9 +# 2225| v2225_1(void) = CatchAny : +# 2226| v2226_1(void) = ReThrow : +#-----| Exception -> Block 2 + +# 2228| Block 10 +# 2228| m2228_1(unknown) = Phi : from 4:~m2219_13, from 8:~m2214_6 +# 2228| v2228_2(void) = NoOp : +# 2212| v2212_12(void) = ReturnVoid : +#-----| Goto -> Block 1 + +# 2230| void IfDestructors(bool) +# 2230| Block 0 +# 2230| v2230_1(void) = EnterFunction : +# 2230| m2230_2(unknown) = AliasedDefinition : +# 2230| m2230_3(unknown) = InitializeNonLocal : +# 2230| m2230_4(unknown) = Chi : total:m2230_2, partial:m2230_3 +# 2230| r2230_5(glval) = VariableAddress[b] : +# 2230| m2230_6(bool) = InitializeParameter[b] : &:r2230_5 +# 2231| r2231_1(glval) = VariableAddress[s1] : +# 2231| m2231_2(String) = Uninitialized[s1] : &:r2231_1 +# 2231| r2231_3(glval) = FunctionAddress[String] : +# 2231| v2231_4(void) = Call[String] : func:r2231_3, this:r2231_1 +# 2231| m2231_5(unknown) = ^CallSideEffect : ~m2230_4 +# 2231| m2231_6(unknown) = Chi : total:m2230_4, partial:m2231_5 +# 2231| m2231_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2231_1 +# 2231| m2231_8(String) = Chi : total:m2231_2, partial:m2231_7 +# 2232| r2232_1(glval) = VariableAddress[b] : +# 2232| r2232_2(bool) = Load[b] : &:r2232_1, m2230_6 +# 2232| v2232_3(void) = ConditionalBranch : r2232_2 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2233| Block 1 +# 2233| r2233_1(glval) = VariableAddress[s2] : +# 2233| m2233_2(String) = Uninitialized[s2] : &:r2233_1 +# 2233| r2233_3(glval) = FunctionAddress[String] : +# 2233| v2233_4(void) = Call[String] : func:r2233_3, this:r2233_1 +# 2233| m2233_5(unknown) = ^CallSideEffect : ~m2231_6 +# 2233| m2233_6(unknown) = Chi : total:m2231_6, partial:m2233_5 +# 2233| m2233_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2233_1 +# 2233| m2233_8(String) = Chi : total:m2233_2, partial:m2233_7 +# 2234| r2234_1(glval) = VariableAddress[s2] : +# 2234| r2234_2(glval) = FunctionAddress[~String] : +# 2234| v2234_3(void) = Call[~String] : func:r2234_2, this:r2234_1 +# 2234| m2234_4(unknown) = ^CallSideEffect : ~m2233_6 +# 2234| m2234_5(unknown) = Chi : total:m2233_6, partial:m2234_4 +# 2234| v2234_6(void) = ^IndirectReadSideEffect[-1] : &:r2234_1, m2233_8 +# 2234| m2234_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2234_1 +# 2234| m2234_8(String) = Chi : total:m2233_8, partial:m2234_7 +#-----| Goto -> Block 3 + +# 2235| Block 2 +# 2235| r2235_1(glval) = VariableAddress[s3] : +# 2235| m2235_2(String) = Uninitialized[s3] : &:r2235_1 +# 2235| r2235_3(glval) = FunctionAddress[String] : +# 2235| v2235_4(void) = Call[String] : func:r2235_3, this:r2235_1 +# 2235| m2235_5(unknown) = ^CallSideEffect : ~m2231_6 +# 2235| m2235_6(unknown) = Chi : total:m2231_6, partial:m2235_5 +# 2235| m2235_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2235_1 +# 2235| m2235_8(String) = Chi : total:m2235_2, partial:m2235_7 +# 2236| r2236_1(glval) = VariableAddress[s3] : +# 2236| r2236_2(glval) = FunctionAddress[~String] : +# 2236| v2236_3(void) = Call[~String] : func:r2236_2, this:r2236_1 +# 2236| m2236_4(unknown) = ^CallSideEffect : ~m2235_6 +# 2236| m2236_5(unknown) = Chi : total:m2235_6, partial:m2236_4 +# 2236| v2236_6(void) = ^IndirectReadSideEffect[-1] : &:r2236_1, m2235_8 +# 2236| m2236_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2236_1 +# 2236| m2236_8(String) = Chi : total:m2235_8, partial:m2236_7 +#-----| Goto -> Block 3 + +# 2237| Block 3 +# 2237| m2237_1(unknown) = Phi : from 1:~m2234_5, from 2:~m2236_5 +# 2237| r2237_2(glval) = VariableAddress[s4] : +# 2237| m2237_3(String) = Uninitialized[s4] : &:r2237_2 +# 2237| r2237_4(glval) = FunctionAddress[String] : +# 2237| v2237_5(void) = Call[String] : func:r2237_4, this:r2237_2 +# 2237| m2237_6(unknown) = ^CallSideEffect : ~m2237_1 +# 2237| m2237_7(unknown) = Chi : total:m2237_1, partial:m2237_6 +# 2237| m2237_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2237_2 +# 2237| m2237_9(String) = Chi : total:m2237_3, partial:m2237_8 +# 2238| v2238_1(void) = NoOp : +# 2238| r2238_2(glval) = VariableAddress[s4] : +# 2238| r2238_3(glval) = FunctionAddress[~String] : +# 2238| v2238_4(void) = Call[~String] : func:r2238_3, this:r2238_2 +# 2238| m2238_5(unknown) = ^CallSideEffect : ~m2237_7 +# 2238| m2238_6(unknown) = Chi : total:m2237_7, partial:m2238_5 +# 2238| v2238_7(void) = ^IndirectReadSideEffect[-1] : &:r2238_2, m2237_9 +# 2238| m2238_8(String) = ^IndirectMayWriteSideEffect[-1] : &:r2238_2 +# 2238| m2238_9(String) = Chi : total:m2237_9, partial:m2238_8 +# 2238| r2238_10(glval) = VariableAddress[s1] : +# 2238| r2238_11(glval) = FunctionAddress[~String] : +# 2238| v2238_12(void) = Call[~String] : func:r2238_11, this:r2238_10 +# 2238| m2238_13(unknown) = ^CallSideEffect : ~m2238_6 +# 2238| m2238_14(unknown) = Chi : total:m2238_6, partial:m2238_13 +# 2238| v2238_15(void) = ^IndirectReadSideEffect[-1] : &:r2238_10, m2231_8 +# 2238| m2238_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r2238_10 +# 2238| m2238_17(String) = Chi : total:m2231_8, partial:m2238_16 +# 2230| v2230_7(void) = ReturnVoid : +# 2230| v2230_8(void) = AliasedUse : ~m2238_14 +# 2230| v2230_9(void) = ExitFunction : + +# 2240| void ForDestructors() +# 2240| Block 0 +# 2240| v2240_1(void) = EnterFunction : +# 2240| m2240_2(unknown) = AliasedDefinition : +# 2240| m2240_3(unknown) = InitializeNonLocal : +# 2240| m2240_4(unknown) = Chi : total:m2240_2, partial:m2240_3 +# 2241| r2241_1(glval) = VariableAddress[c] : +# 2241| r2241_2(char) = Constant[97] : +# 2241| m2241_3(char) = Store[c] : &:r2241_1, r2241_2 +# 2242| r2242_1(glval) = VariableAddress[s] : +# 2242| m2242_2(String) = Uninitialized[s] : &:r2242_1 +# 2242| r2242_3(glval) = FunctionAddress[String] : +# 2242| r2242_4(glval) = StringConstant["hello"] : +# 2242| r2242_5(char *) = Convert : r2242_4 +# 2242| v2242_6(void) = Call[String] : func:r2242_3, this:r2242_1, 0:r2242_5 +# 2242| m2242_7(unknown) = ^CallSideEffect : ~m2240_4 +# 2242| m2242_8(unknown) = Chi : total:m2240_4, partial:m2242_7 +# 2242| v2242_9(void) = ^BufferReadSideEffect[0] : &:r2242_5, ~m2240_3 +# 2242| m2242_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r2242_1 +# 2242| m2242_11(String) = Chi : total:m2242_2, partial:m2242_10 +#-----| Goto -> Block 1 + +# 2242| Block 1 +# 2242| m2242_12(String) = Phi : from 0:m2242_11, from 2:m2242_28 +# 2242| m2242_13(unknown) = Phi : from 0:~m2242_8, from 2:~m2242_25 +# 2242| m2242_14(char) = Phi : from 0:m2241_3, from 2:m2242_30 +# 2242| r2242_15(glval) = VariableAddress[c] : +# 2242| r2242_16(char) = Load[c] : &:r2242_15, m2242_14 +# 2242| r2242_17(int) = Convert : r2242_16 +# 2242| r2242_18(int) = Constant[0] : +# 2242| r2242_19(bool) = CompareNE : r2242_17, r2242_18 +# 2242| v2242_20(void) = ConditionalBranch : r2242_19 +#-----| False -> Block 3 +#-----| True -> Block 2 + +# 2243| Block 2 +# 2243| r2243_1(glval) = VariableAddress[s2] : +# 2243| m2243_2(String) = Uninitialized[s2] : &:r2243_1 +# 2243| r2243_3(glval) = FunctionAddress[String] : +# 2243| v2243_4(void) = Call[String] : func:r2243_3, this:r2243_1 +# 2243| m2243_5(unknown) = ^CallSideEffect : ~m2242_13 +# 2243| m2243_6(unknown) = Chi : total:m2242_13, partial:m2243_5 +# 2243| m2243_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2243_1 +# 2243| m2243_8(String) = Chi : total:m2243_2, partial:m2243_7 +# 2244| r2244_1(glval) = VariableAddress[s2] : +# 2244| r2244_2(glval) = FunctionAddress[~String] : +# 2244| v2244_3(void) = Call[~String] : func:r2244_2, this:r2244_1 +# 2244| m2244_4(unknown) = ^CallSideEffect : ~m2243_6 +# 2244| m2244_5(unknown) = Chi : total:m2243_6, partial:m2244_4 +# 2244| v2244_6(void) = ^IndirectReadSideEffect[-1] : &:r2244_1, m2243_8 +# 2244| m2244_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2244_1 +# 2244| m2244_8(String) = Chi : total:m2243_8, partial:m2244_7 +# 2242| r2242_21(glval) = VariableAddress[s] : +# 2242| r2242_22(glval) = FunctionAddress[pop_back] : +# 2242| r2242_23(char) = Call[pop_back] : func:r2242_22, this:r2242_21 +# 2242| m2242_24(unknown) = ^CallSideEffect : ~m2244_5 +# 2242| m2242_25(unknown) = Chi : total:m2244_5, partial:m2242_24 +# 2242| v2242_26(void) = ^IndirectReadSideEffect[-1] : &:r2242_21, m2242_12 +# 2242| m2242_27(String) = ^IndirectMayWriteSideEffect[-1] : &:r2242_21 +# 2242| m2242_28(String) = Chi : total:m2242_12, partial:m2242_27 +# 2242| r2242_29(glval) = VariableAddress[c] : +# 2242| m2242_30(char) = Store[c] : &:r2242_29, r2242_23 +#-----| Goto (back edge) -> Block 1 + +# 2242| Block 3 +# 2242| r2242_31(glval) = VariableAddress[s] : +# 2242| r2242_32(glval) = FunctionAddress[~String] : +# 2242| v2242_33(void) = Call[~String] : func:r2242_32, this:r2242_31 +# 2242| m2242_34(unknown) = ^CallSideEffect : ~m2242_13 +# 2242| m2242_35(unknown) = Chi : total:m2242_13, partial:m2242_34 +# 2242| v2242_36(void) = ^IndirectReadSideEffect[-1] : &:r2242_31, m2242_12 +# 2242| m2242_37(String) = ^IndirectMayWriteSideEffect[-1] : &:r2242_31 +# 2242| m2242_38(String) = Chi : total:m2242_12, partial:m2242_37 +# 2246| r2246_1(glval &&>) = VariableAddress[(__range)] : +# 2246| r2246_2(glval>) = VariableAddress[#temp2246:20] : +# 2246| m2246_3(vector) = Uninitialized[#temp2246:20] : &:r2246_2 +# 2246| r2246_4(glval) = FunctionAddress[vector] : +# 2246| r2246_5(glval) = VariableAddress[#temp2246:35] : +# 2246| m2246_6(String) = Uninitialized[#temp2246:35] : &:r2246_5 +# 2246| r2246_7(glval) = FunctionAddress[String] : +# 2246| r2246_8(glval) = StringConstant["hello"] : +# 2246| r2246_9(char *) = Convert : r2246_8 +# 2246| v2246_10(void) = Call[String] : func:r2246_7, this:r2246_5, 0:r2246_9 +# 2246| m2246_11(unknown) = ^CallSideEffect : ~m2242_35 +# 2246| m2246_12(unknown) = Chi : total:m2242_35, partial:m2246_11 +# 2246| v2246_13(void) = ^BufferReadSideEffect[0] : &:r2246_9, ~m2240_3 +# 2246| m2246_14(String) = ^IndirectMayWriteSideEffect[-1] : &:r2246_5 +# 2246| m2246_15(String) = Chi : total:m2246_6, partial:m2246_14 +# 2246| r2246_16(String) = Load[#temp2246:35] : &:r2246_5, m2246_15 +# 2246| v2246_17(void) = Call[vector] : func:r2246_4, this:r2246_2, 0:r2246_16 +# 2246| m2246_18(unknown) = ^CallSideEffect : ~m2246_12 +# 2246| m2246_19(unknown) = Chi : total:m2246_12, partial:m2246_18 +# 2246| m2246_20(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2246_2 +# 2246| m2246_21(vector) = Chi : total:m2246_3, partial:m2246_20 +# 2246| r2246_22(vector &) = CopyValue : r2246_2 +# 2246| m2246_23(vector &&) = Store[(__range)] : &:r2246_1, r2246_22 +# 2246| r2246_24(glval) = VariableAddress[(__begin)] : +# 2246| r2246_25(glval &&>) = VariableAddress[(__range)] : +# 2246| r2246_26(vector &&) = Load[(__range)] : &:r2246_25, m2246_23 +#-----| r0_1(glval>) = CopyValue : r2246_26 +#-----| r0_2(glval>) = Convert : r0_1 +# 2246| r2246_27(glval) = FunctionAddress[begin] : +# 2246| r2246_28(iterator) = Call[begin] : func:r2246_27, this:r0_2 +# 2246| m2246_29(unknown) = ^CallSideEffect : ~m2246_19 +# 2246| m2246_30(unknown) = Chi : total:m2246_19, partial:m2246_29 +#-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, m2246_21 +# 2246| m2246_31(iterator) = Store[(__begin)] : &:r2246_24, r2246_28 +# 2246| r2246_32(glval) = VariableAddress[(__end)] : +# 2246| r2246_33(glval &&>) = VariableAddress[(__range)] : +# 2246| r2246_34(vector &&) = Load[(__range)] : &:r2246_33, m2246_23 +#-----| r0_4(glval>) = CopyValue : r2246_34 +#-----| r0_5(glval>) = Convert : r0_4 +# 2246| r2246_35(glval) = FunctionAddress[end] : +# 2246| r2246_36(iterator) = Call[end] : func:r2246_35, this:r0_5 +# 2246| m2246_37(unknown) = ^CallSideEffect : ~m2246_30 +# 2246| m2246_38(unknown) = Chi : total:m2246_30, partial:m2246_37 +#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, m2246_21 +# 2246| m2246_39(iterator) = Store[(__end)] : &:r2246_32, r2246_36 +#-----| Goto -> Block 4 + +# 2246| Block 4 +# 2246| m2246_40(iterator) = Phi : from 3:m2246_31, from 5:m2246_82 +# 2246| m2246_41(unknown) = Phi : from 3:~m2246_38, from 5:~m2246_79 +# 2246| r2246_42(glval) = VariableAddress[(__begin)] : +#-----| r0_7(glval) = Convert : r2246_42 +# 2246| r2246_43(glval) = FunctionAddress[operator!=] : +# 2246| r2246_44(glval) = VariableAddress[(__end)] : +# 2246| r2246_45(iterator) = Load[(__end)] : &:r2246_44, m2246_39 +# 2246| r2246_46(bool) = Call[operator!=] : func:r2246_43, this:r0_7, 0:r2246_45 +# 2246| m2246_47(unknown) = ^CallSideEffect : ~m2246_41 +# 2246| m2246_48(unknown) = Chi : total:m2246_41, partial:m2246_47 +#-----| v0_8(void) = ^IndirectReadSideEffect[-1] : &:r0_7, m2246_40 +# 2246| v2246_49(void) = ConditionalBranch : r2246_46 +#-----| False -> Block 6 +#-----| True -> Block 5 + +# 2246| Block 5 +# 2246| r2246_50(glval) = VariableAddress[s] : +# 2246| m2246_51(String) = Uninitialized[s] : &:r2246_50 +# 2246| r2246_52(glval) = FunctionAddress[String] : +# 2246| r2246_53(glval) = VariableAddress[(__begin)] : +#-----| r0_9(glval) = Convert : r2246_53 +# 2246| r2246_54(glval) = FunctionAddress[operator*] : +# 2246| r2246_55(String &) = Call[operator*] : func:r2246_54, this:r0_9 +# 2246| m2246_56(unknown) = ^CallSideEffect : ~m2246_48 +# 2246| m2246_57(unknown) = Chi : total:m2246_48, partial:m2246_56 +#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_9, m2246_40 +# 2246| r2246_58(glval) = CopyValue : r2246_55 +# 2246| r2246_59(glval) = Convert : r2246_58 +# 2246| r2246_60(String &) = CopyValue : r2246_59 +# 2246| v2246_61(void) = Call[String] : func:r2246_52, this:r2246_50, 0:r2246_60 +# 2246| m2246_62(unknown) = ^CallSideEffect : ~m2246_57 +# 2246| m2246_63(unknown) = Chi : total:m2246_57, partial:m2246_62 +# 2246| v2246_64(void) = ^BufferReadSideEffect[0] : &:r2246_60, ~m2246_63 +# 2246| m2246_65(String) = ^IndirectMayWriteSideEffect[-1] : &:r2246_50 +# 2246| m2246_66(String) = Chi : total:m2246_51, partial:m2246_65 +# 2247| r2247_1(glval) = VariableAddress[s2] : +# 2247| m2247_2(String) = Uninitialized[s2] : &:r2247_1 +# 2247| r2247_3(glval) = FunctionAddress[String] : +# 2247| v2247_4(void) = Call[String] : func:r2247_3, this:r2247_1 +# 2247| m2247_5(unknown) = ^CallSideEffect : ~m2246_63 +# 2247| m2247_6(unknown) = Chi : total:m2246_63, partial:m2247_5 +# 2247| m2247_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2247_1 +# 2247| m2247_8(String) = Chi : total:m2247_2, partial:m2247_7 +# 2248| r2248_1(glval) = VariableAddress[s2] : +# 2248| r2248_2(glval) = FunctionAddress[~String] : +# 2248| v2248_3(void) = Call[~String] : func:r2248_2, this:r2248_1 +# 2248| m2248_4(unknown) = ^CallSideEffect : ~m2247_6 +# 2248| m2248_5(unknown) = Chi : total:m2247_6, partial:m2248_4 +# 2248| v2248_6(void) = ^IndirectReadSideEffect[-1] : &:r2248_1, m2247_8 +# 2248| m2248_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2248_1 +# 2248| m2248_8(String) = Chi : total:m2247_8, partial:m2248_7 +# 2246| r2246_67(glval) = VariableAddress[s] : +# 2246| r2246_68(glval) = FunctionAddress[~String] : +# 2246| v2246_69(void) = Call[~String] : func:r2246_68, this:r2246_67 +# 2246| m2246_70(unknown) = ^CallSideEffect : ~m2248_5 +# 2246| m2246_71(unknown) = Chi : total:m2248_5, partial:m2246_70 +# 2246| v2246_72(void) = ^IndirectReadSideEffect[-1] : &:r2246_67, m2246_66 +# 2246| m2246_73(String) = ^IndirectMayWriteSideEffect[-1] : &:r2246_67 +# 2246| m2246_74(String) = Chi : total:m2246_66, partial:m2246_73 +# 2246| r2246_75(glval) = VariableAddress[(__begin)] : +# 2246| r2246_76(glval) = FunctionAddress[operator++] : +# 2246| r2246_77(iterator &) = Call[operator++] : func:r2246_76, this:r2246_75 +# 2246| m2246_78(unknown) = ^CallSideEffect : ~m2246_71 +# 2246| m2246_79(unknown) = Chi : total:m2246_71, partial:m2246_78 +# 2246| v2246_80(void) = ^IndirectReadSideEffect[-1] : &:r2246_75, m2246_40 +# 2246| m2246_81(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2246_75 +# 2246| m2246_82(iterator) = Chi : total:m2246_40, partial:m2246_81 +# 2246| r2246_83(glval) = CopyValue : r2246_77 +#-----| Goto (back edge) -> Block 4 + +# 2250| Block 6 +# 2250| r2250_1(glval) = VariableAddress[s] : +# 2250| m2250_2(String) = Uninitialized[s] : &:r2250_1 +# 2250| r2250_3(glval) = FunctionAddress[String] : +# 2250| r2250_4(glval) = StringConstant["hello"] : +# 2250| r2250_5(char *) = Convert : r2250_4 +# 2250| v2250_6(void) = Call[String] : func:r2250_3, this:r2250_1, 0:r2250_5 +# 2250| m2250_7(unknown) = ^CallSideEffect : ~m2246_48 +# 2250| m2250_8(unknown) = Chi : total:m2246_48, partial:m2250_7 +# 2250| v2250_9(void) = ^BufferReadSideEffect[0] : &:r2250_5, ~m2240_3 +# 2250| m2250_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_1 +# 2250| m2250_11(String) = Chi : total:m2250_2, partial:m2250_10 +# 2250| r2250_12(glval) = VariableAddress[s2] : +# 2250| m2250_13(String) = Uninitialized[s2] : &:r2250_12 +# 2250| r2250_14(glval) = FunctionAddress[String] : +# 2250| r2250_15(glval) = StringConstant["world"] : +# 2250| r2250_16(char *) = Convert : r2250_15 +# 2250| v2250_17(void) = Call[String] : func:r2250_14, this:r2250_12, 0:r2250_16 +# 2250| m2250_18(unknown) = ^CallSideEffect : ~m2250_8 +# 2250| m2250_19(unknown) = Chi : total:m2250_8, partial:m2250_18 +# 2250| v2250_20(void) = ^BufferReadSideEffect[0] : &:r2250_16, ~m2240_3 +# 2250| m2250_21(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_12 +# 2250| m2250_22(String) = Chi : total:m2250_13, partial:m2250_21 +#-----| Goto -> Block 7 + +# 2250| Block 7 +# 2250| m2250_23(String) = Phi : from 6:m2250_11, from 8:m2250_39 +# 2250| m2250_24(unknown) = Phi : from 6:~m2250_19, from 8:~m2250_36 +# 2250| m2250_25(char) = Phi : from 6:m2242_14, from 8:m2250_41 +# 2250| r2250_26(glval) = VariableAddress[c] : +# 2250| r2250_27(char) = Load[c] : &:r2250_26, m2250_25 +# 2250| r2250_28(int) = Convert : r2250_27 +# 2250| r2250_29(int) = Constant[0] : +# 2250| r2250_30(bool) = CompareNE : r2250_28, r2250_29 +# 2250| v2250_31(void) = ConditionalBranch : r2250_30 +#-----| False -> Block 9 +#-----| True -> Block 8 + +# 2251| Block 8 +# 2251| r2251_1(char) = Constant[0] : +# 2251| r2251_2(glval) = VariableAddress[c] : +# 2251| m2251_3(char) = Store[c] : &:r2251_2, r2251_1 +# 2250| r2250_32(glval) = VariableAddress[s] : +# 2250| r2250_33(glval) = FunctionAddress[pop_back] : +# 2250| r2250_34(char) = Call[pop_back] : func:r2250_33, this:r2250_32 +# 2250| m2250_35(unknown) = ^CallSideEffect : ~m2250_24 +# 2250| m2250_36(unknown) = Chi : total:m2250_24, partial:m2250_35 +# 2250| v2250_37(void) = ^IndirectReadSideEffect[-1] : &:r2250_32, m2250_23 +# 2250| m2250_38(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_32 +# 2250| m2250_39(String) = Chi : total:m2250_23, partial:m2250_38 +# 2250| r2250_40(glval) = VariableAddress[c] : +# 2250| m2250_41(char) = Store[c] : &:r2250_40, r2250_34 +#-----| Goto (back edge) -> Block 7 + +# 2250| Block 9 +# 2250| r2250_42(glval) = VariableAddress[s2] : +# 2250| r2250_43(glval) = FunctionAddress[~String] : +# 2250| v2250_44(void) = Call[~String] : func:r2250_43, this:r2250_42 +# 2250| m2250_45(unknown) = ^CallSideEffect : ~m2250_24 +# 2250| m2250_46(unknown) = Chi : total:m2250_24, partial:m2250_45 +# 2250| v2250_47(void) = ^IndirectReadSideEffect[-1] : &:r2250_42, m2250_22 +# 2250| m2250_48(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_42 +# 2250| m2250_49(String) = Chi : total:m2250_22, partial:m2250_48 +# 2250| r2250_50(glval) = VariableAddress[s] : +# 2250| r2250_51(glval) = FunctionAddress[~String] : +# 2250| v2250_52(void) = Call[~String] : func:r2250_51, this:r2250_50 +# 2250| m2250_53(unknown) = ^CallSideEffect : ~m2250_46 +# 2250| m2250_54(unknown) = Chi : total:m2250_46, partial:m2250_53 +# 2250| v2250_55(void) = ^IndirectReadSideEffect[-1] : &:r2250_50, m2250_23 +# 2250| m2250_56(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_50 +# 2250| m2250_57(String) = Chi : total:m2250_23, partial:m2250_56 +# 2253| v2253_1(void) = NoOp : +# 2240| v2240_5(void) = ReturnVoid : +# 2240| v2240_6(void) = AliasedUse : ~m2250_54 +# 2240| v2240_7(void) = ExitFunction : + +# 2255| void IfDestructors2(bool) +# 2255| Block 0 +# 2255| v2255_1(void) = EnterFunction : +# 2255| m2255_2(unknown) = AliasedDefinition : +# 2255| m2255_3(unknown) = InitializeNonLocal : +# 2255| m2255_4(unknown) = Chi : total:m2255_2, partial:m2255_3 +# 2255| r2255_5(glval) = VariableAddress[b] : +# 2255| m2255_6(bool) = InitializeParameter[b] : &:r2255_5 +# 2256| r2256_1(glval) = VariableAddress[s] : +# 2256| m2256_2(String) = Uninitialized[s] : &:r2256_1 +# 2256| r2256_3(glval) = FunctionAddress[String] : +# 2256| r2256_4(glval) = StringConstant["hello"] : +# 2256| r2256_5(char *) = Convert : r2256_4 +# 2256| v2256_6(void) = Call[String] : func:r2256_3, this:r2256_1, 0:r2256_5 +# 2256| m2256_7(unknown) = ^CallSideEffect : ~m2255_4 +# 2256| m2256_8(unknown) = Chi : total:m2255_4, partial:m2256_7 +# 2256| v2256_9(void) = ^BufferReadSideEffect[0] : &:r2256_5, ~m2255_3 +# 2256| m2256_10(String) = ^IndirectMayWriteSideEffect[-1] : &:r2256_1 +# 2256| m2256_11(String) = Chi : total:m2256_2, partial:m2256_10 +# 2256| r2256_12(glval) = VariableAddress[b] : +# 2256| r2256_13(bool) = Load[b] : &:r2256_12, m2255_6 +# 2256| v2256_14(void) = ConditionalBranch : r2256_13 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2257| Block 1 +# 2257| r2257_1(glval) = VariableAddress[x] : +# 2257| r2257_2(int) = Constant[0] : +# 2257| m2257_3(int) = Store[x] : &:r2257_1, r2257_2 +#-----| Goto -> Block 3 + +# 2259| Block 2 +# 2259| r2259_1(glval) = VariableAddress[y] : +# 2259| r2259_2(int) = Constant[0] : +# 2259| m2259_3(int) = Store[y] : &:r2259_1, r2259_2 +#-----| Goto -> Block 3 + +# 2260| Block 3 +# 2260| r2260_1(glval) = VariableAddress[s] : +# 2260| r2260_2(glval) = FunctionAddress[~String] : +# 2260| v2260_3(void) = Call[~String] : func:r2260_2, this:r2260_1 +# 2260| m2260_4(unknown) = ^CallSideEffect : ~m2256_8 +# 2260| m2260_5(unknown) = Chi : total:m2256_8, partial:m2260_4 +# 2260| v2260_6(void) = ^IndirectReadSideEffect[-1] : &:r2260_1, m2256_11 +# 2260| m2260_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2260_1 +# 2260| m2260_8(String) = Chi : total:m2256_11, partial:m2260_7 +# 2261| v2261_1(void) = NoOp : +# 2255| v2255_7(void) = ReturnVoid : +# 2255| v2255_8(void) = AliasedUse : ~m2260_5 +# 2255| v2255_9(void) = ExitFunction : + +# 2270| void IfDestructors3(bool) +# 2270| Block 0 +# 2270| v2270_1(void) = EnterFunction : +# 2270| m2270_2(unknown) = AliasedDefinition : +# 2270| m2270_3(unknown) = InitializeNonLocal : +# 2270| m2270_4(unknown) = Chi : total:m2270_2, partial:m2270_3 +# 2270| r2270_5(glval) = VariableAddress[b] : +# 2270| m2270_6(bool) = InitializeParameter[b] : &:r2270_5 +# 2271| r2271_1(glval) = VariableAddress[B] : +# 2271| m2271_2(Bool) = Uninitialized[B] : &:r2271_1 +# 2271| r2271_3(glval) = FunctionAddress[Bool] : +# 2271| r2271_4(glval) = VariableAddress[b] : +# 2271| r2271_5(bool) = Load[b] : &:r2271_4, m2270_6 +# 2271| v2271_6(void) = Call[Bool] : func:r2271_3, this:r2271_1, 0:r2271_5 +# 2271| m2271_7(unknown) = ^CallSideEffect : ~m2270_4 +# 2271| m2271_8(unknown) = Chi : total:m2270_4, partial:m2271_7 +# 2271| m2271_9(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2271_1 +# 2271| m2271_10(Bool) = Chi : total:m2271_2, partial:m2271_9 +# 2271| r2271_11(glval) = VariableAddress[B] : +# 2271| r2271_12(glval) = FunctionAddress[operator bool] : +# 2271| r2271_13(bool) = Call[operator bool] : func:r2271_12, this:r2271_11 +# 2271| m2271_14(unknown) = ^CallSideEffect : ~m2271_8 +# 2271| m2271_15(unknown) = Chi : total:m2271_8, partial:m2271_14 +# 2271| v2271_16(void) = ^IndirectReadSideEffect[-1] : &:r2271_11, m2271_10 +# 2271| m2271_17(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2271_11 +# 2271| m2271_18(Bool) = Chi : total:m2271_10, partial:m2271_17 +# 2271| r2271_19(bool) = CopyValue : r2271_13 +# 2271| v2271_20(void) = ConditionalBranch : r2271_19 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2272| Block 1 +# 2272| r2272_1(glval) = VariableAddress[s1] : +# 2272| m2272_2(String) = Uninitialized[s1] : &:r2272_1 +# 2272| r2272_3(glval) = FunctionAddress[String] : +# 2272| v2272_4(void) = Call[String] : func:r2272_3, this:r2272_1 +# 2272| m2272_5(unknown) = ^CallSideEffect : ~m2271_15 +# 2272| m2272_6(unknown) = Chi : total:m2271_15, partial:m2272_5 +# 2272| m2272_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2272_1 +# 2272| m2272_8(String) = Chi : total:m2272_2, partial:m2272_7 +# 2273| r2273_1(glval) = VariableAddress[s1] : +# 2273| r2273_2(glval) = FunctionAddress[~String] : +# 2273| v2273_3(void) = Call[~String] : func:r2273_2, this:r2273_1 +# 2273| m2273_4(unknown) = ^CallSideEffect : ~m2272_6 +# 2273| m2273_5(unknown) = Chi : total:m2272_6, partial:m2273_4 +# 2273| v2273_6(void) = ^IndirectReadSideEffect[-1] : &:r2273_1, m2272_8 +# 2273| m2273_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2273_1 +# 2273| m2273_8(String) = Chi : total:m2272_8, partial:m2273_7 +#-----| Goto -> Block 3 + +# 2274| Block 2 +# 2274| r2274_1(glval) = VariableAddress[s2] : +# 2274| m2274_2(String) = Uninitialized[s2] : &:r2274_1 +# 2274| r2274_3(glval) = FunctionAddress[String] : +# 2274| v2274_4(void) = Call[String] : func:r2274_3, this:r2274_1 +# 2274| m2274_5(unknown) = ^CallSideEffect : ~m2271_15 +# 2274| m2274_6(unknown) = Chi : total:m2271_15, partial:m2274_5 +# 2274| m2274_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2274_1 +# 2274| m2274_8(String) = Chi : total:m2274_2, partial:m2274_7 +# 2275| r2275_1(glval) = VariableAddress[s2] : +# 2275| r2275_2(glval) = FunctionAddress[~String] : +# 2275| v2275_3(void) = Call[~String] : func:r2275_2, this:r2275_1 +# 2275| m2275_4(unknown) = ^CallSideEffect : ~m2274_6 +# 2275| m2275_5(unknown) = Chi : total:m2274_6, partial:m2275_4 +# 2275| v2275_6(void) = ^IndirectReadSideEffect[-1] : &:r2275_1, m2274_8 +# 2275| m2275_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2275_1 +# 2275| m2275_8(String) = Chi : total:m2274_8, partial:m2275_7 +#-----| Goto -> Block 3 + +# 2275| Block 3 +# 2275| m2275_9(unknown) = Phi : from 1:~m2273_5, from 2:~m2275_5 +# 2275| r2275_10(glval) = VariableAddress[B] : +# 2275| r2275_11(glval) = FunctionAddress[~Bool] : +# 2275| v2275_12(void) = Call[~Bool] : func:r2275_11, this:r2275_10 +# 2275| m2275_13(unknown) = ^CallSideEffect : ~m2275_9 +# 2275| m2275_14(unknown) = Chi : total:m2275_9, partial:m2275_13 +# 2275| v2275_15(void) = ^IndirectReadSideEffect[-1] : &:r2275_10, m2271_18 +# 2275| m2275_16(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2275_10 +# 2275| m2275_17(Bool) = Chi : total:m2271_18, partial:m2275_16 +# 2276| v2276_1(void) = NoOp : +# 2270| v2270_7(void) = ReturnVoid : +# 2270| v2270_8(void) = AliasedUse : ~m2275_14 +# 2270| v2270_9(void) = ExitFunction : + +# 2278| void WhileLoopDestructors(bool) +# 2278| Block 0 +# 2278| v2278_1(void) = EnterFunction : +# 2278| m2278_2(unknown) = AliasedDefinition : +# 2278| m2278_3(unknown) = InitializeNonLocal : +# 2278| m2278_4(unknown) = Chi : total:m2278_2, partial:m2278_3 +# 2278| r2278_5(glval) = VariableAddress[b] : +# 2278| m2278_6(bool) = InitializeParameter[b] : &:r2278_5 +# 2280| r2280_1(glval) = VariableAddress[s] : +# 2280| m2280_2(String) = Uninitialized[s] : &:r2280_1 +# 2280| r2280_3(glval) = FunctionAddress[String] : +# 2280| v2280_4(void) = Call[String] : func:r2280_3, this:r2280_1 +# 2280| m2280_5(unknown) = ^CallSideEffect : ~m2278_4 +# 2280| m2280_6(unknown) = Chi : total:m2278_4, partial:m2280_5 +# 2280| m2280_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 +# 2280| m2280_8(String) = Chi : total:m2280_2, partial:m2280_7 +#-----| Goto -> Block 1 + +# 2281| Block 1 +# 2281| m2281_1(bool) = Phi : from 0:m2278_6, from 2:m2282_3 +# 2281| r2281_2(glval) = VariableAddress[b] : +# 2281| r2281_3(bool) = Load[b] : &:r2281_2, m2281_1 +# 2281| v2281_4(void) = ConditionalBranch : r2281_3 +#-----| False -> Block 3 +#-----| True -> Block 2 + +# 2282| Block 2 +# 2282| r2282_1(bool) = Constant[0] : +# 2282| r2282_2(glval) = VariableAddress[b] : +# 2282| m2282_3(bool) = Store[b] : &:r2282_2, r2282_1 +#-----| Goto (back edge) -> Block 1 + +# 2284| Block 3 +# 2284| r2284_1(glval) = VariableAddress[s] : +# 2284| r2284_2(glval) = FunctionAddress[~String] : +# 2284| v2284_3(void) = Call[~String] : func:r2284_2, this:r2284_1 +# 2284| m2284_4(unknown) = ^CallSideEffect : ~m2280_6 +# 2284| m2284_5(unknown) = Chi : total:m2280_6, partial:m2284_4 +# 2284| v2284_6(void) = ^IndirectReadSideEffect[-1] : &:r2284_1, m2280_8 +# 2284| m2284_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2284_1 +# 2284| m2284_8(String) = Chi : total:m2280_8, partial:m2284_7 +#-----| Goto -> Block 4 + +# 2287| Block 4 +# 2287| m2287_1(unknown) = Phi : from 3:~m2284_5, from 5:~m2289_5 +# 2287| m2287_2(bool) = Phi : from 3:m2281_1, from 5:m2288_3 +# 2287| r2287_3(glval) = VariableAddress[B] : +# 2287| m2287_4(Bool) = Uninitialized[B] : &:r2287_3 +# 2287| r2287_5(glval) = FunctionAddress[Bool] : +# 2287| r2287_6(glval) = VariableAddress[b] : +# 2287| r2287_7(bool) = Load[b] : &:r2287_6, m2287_2 +# 2287| v2287_8(void) = Call[Bool] : func:r2287_5, this:r2287_3, 0:r2287_7 +# 2287| m2287_9(unknown) = ^CallSideEffect : ~m2287_1 +# 2287| m2287_10(unknown) = Chi : total:m2287_1, partial:m2287_9 +# 2287| m2287_11(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2287_3 +# 2287| m2287_12(Bool) = Chi : total:m2287_4, partial:m2287_11 +# 2287| r2287_13(glval) = VariableAddress[B] : +# 2287| r2287_14(glval) = FunctionAddress[operator bool] : +# 2287| r2287_15(bool) = Call[operator bool] : func:r2287_14, this:r2287_13 +# 2287| m2287_16(unknown) = ^CallSideEffect : ~m2287_10 +# 2287| m2287_17(unknown) = Chi : total:m2287_10, partial:m2287_16 +# 2287| v2287_18(void) = ^IndirectReadSideEffect[-1] : &:r2287_13, m2287_12 +# 2287| m2287_19(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2287_13 +# 2287| m2287_20(Bool) = Chi : total:m2287_12, partial:m2287_19 +# 2287| r2287_21(bool) = CopyValue : r2287_15 +# 2287| v2287_22(void) = ConditionalBranch : r2287_21 +#-----| False -> Block 6 +#-----| True -> Block 5 + +# 2288| Block 5 +# 2288| r2288_1(bool) = Constant[0] : +# 2288| r2288_2(glval) = VariableAddress[b] : +# 2288| m2288_3(bool) = Store[b] : &:r2288_2, r2288_1 +# 2289| r2289_1(glval) = VariableAddress[B] : +# 2289| r2289_2(glval) = FunctionAddress[~Bool] : +# 2289| v2289_3(void) = Call[~Bool] : func:r2289_2, this:r2289_1 +# 2289| m2289_4(unknown) = ^CallSideEffect : ~m2287_17 +# 2289| m2289_5(unknown) = Chi : total:m2287_17, partial:m2289_4 +# 2289| v2289_6(void) = ^IndirectReadSideEffect[-1] : &:r2289_1, m2287_20 +# 2289| m2289_7(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2289_1 +# 2289| m2289_8(Bool) = Chi : total:m2287_20, partial:m2289_7 +#-----| Goto (back edge) -> Block 4 + +# 2289| Block 6 +# 2289| r2289_9(glval) = VariableAddress[B] : +# 2289| r2289_10(glval) = FunctionAddress[~Bool] : +# 2289| v2289_11(void) = Call[~Bool] : func:r2289_10, this:r2289_9 +# 2289| m2289_12(unknown) = ^CallSideEffect : ~m2287_17 +# 2289| m2289_13(unknown) = Chi : total:m2287_17, partial:m2289_12 +# 2289| v2289_14(void) = ^IndirectReadSideEffect[-1] : &:r2289_9, m2287_20 +# 2289| m2289_15(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2289_9 +# 2289| m2289_16(Bool) = Chi : total:m2287_20, partial:m2289_15 +# 2291| v2291_1(void) = NoOp : +# 2278| v2278_7(void) = ReturnVoid : +# 2278| v2278_8(void) = AliasedUse : ~m2289_13 +# 2278| v2278_9(void) = ExitFunction : + +# 2293| void VoidFunc() +# 2293| Block 0 +# 2293| v2293_1(void) = EnterFunction : +# 2293| m2293_2(unknown) = AliasedDefinition : +# 2293| m2293_3(unknown) = InitializeNonLocal : +# 2293| m2293_4(unknown) = Chi : total:m2293_2, partial:m2293_3 +# 2293| v2293_5(void) = NoOp : +# 2293| v2293_6(void) = ReturnVoid : +# 2293| v2293_7(void) = AliasedUse : m2293_3 +# 2293| v2293_8(void) = ExitFunction : + +# 2295| void IfReturnDestructors(bool) +# 2295| Block 0 +# 2295| v2295_1(void) = EnterFunction : +# 2295| m2295_2(unknown) = AliasedDefinition : +# 2295| m2295_3(unknown) = InitializeNonLocal : +# 2295| m2295_4(unknown) = Chi : total:m2295_2, partial:m2295_3 +# 2295| r2295_5(glval) = VariableAddress[b] : +# 2295| m2295_6(bool) = InitializeParameter[b] : &:r2295_5 +# 2296| r2296_1(glval) = VariableAddress[s] : +# 2296| m2296_2(String) = Uninitialized[s] : &:r2296_1 +# 2296| r2296_3(glval) = FunctionAddress[String] : +# 2296| v2296_4(void) = Call[String] : func:r2296_3, this:r2296_1 +# 2296| m2296_5(unknown) = ^CallSideEffect : ~m2295_4 +# 2296| m2296_6(unknown) = Chi : total:m2295_4, partial:m2296_5 +# 2296| m2296_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2296_1 +# 2296| m2296_8(String) = Chi : total:m2296_2, partial:m2296_7 +# 2297| r2297_1(glval) = VariableAddress[b] : +# 2297| r2297_2(bool) = Load[b] : &:r2297_1, m2295_6 +# 2297| v2297_3(void) = ConditionalBranch : r2297_2 +#-----| False -> Block 3 +#-----| True -> Block 2 + +# 2295| Block 1 +# 2295| m2295_7(unknown) = Phi : from 2:~m2304_5, from 4:~m2304_13, from 5:~m2304_22 +# 2295| v2295_8(void) = ReturnVoid : +# 2295| v2295_9(void) = AliasedUse : ~m2295_7 +# 2295| v2295_10(void) = ExitFunction : + +# 2298| Block 2 +# 2298| v2298_1(void) = NoOp : +# 2304| r2304_1(glval) = VariableAddress[s] : +# 2304| r2304_2(glval) = FunctionAddress[~String] : +# 2304| v2304_3(void) = Call[~String] : func:r2304_2, this:r2304_1 +# 2304| m2304_4(unknown) = ^CallSideEffect : ~m2296_6 +# 2304| m2304_5(unknown) = Chi : total:m2296_6, partial:m2304_4 +# 2304| v2304_6(void) = ^IndirectReadSideEffect[-1] : &:r2304_1, m2296_8 +# 2304| m2304_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_1 +# 2304| m2304_8(String) = Chi : total:m2296_8, partial:m2304_7 +#-----| Goto -> Block 1 + +# 2300| Block 3 +# 2300| r2300_1(glval) = VariableAddress[b] : +# 2300| r2300_2(bool) = Load[b] : &:r2300_1, m2295_6 +# 2300| v2300_3(void) = ConditionalBranch : r2300_2 +#-----| False -> Block 5 +#-----| True -> Block 4 + +# 2301| Block 4 +# 2301| r2301_1(glval) = FunctionAddress[VoidFunc] : +# 2301| v2301_2(void) = Call[VoidFunc] : func:r2301_1 +# 2301| m2301_3(unknown) = ^CallSideEffect : ~m2296_6 +# 2301| m2301_4(unknown) = Chi : total:m2296_6, partial:m2301_3 +# 2301| v2301_5(void) = NoOp : +# 2304| r2304_9(glval) = VariableAddress[s] : +# 2304| r2304_10(glval) = FunctionAddress[~String] : +# 2304| v2304_11(void) = Call[~String] : func:r2304_10, this:r2304_9 +# 2304| m2304_12(unknown) = ^CallSideEffect : ~m2301_4 +# 2304| m2304_13(unknown) = Chi : total:m2301_4, partial:m2304_12 +# 2304| v2304_14(void) = ^IndirectReadSideEffect[-1] : &:r2304_9, m2296_8 +# 2304| m2304_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_9 +# 2304| m2304_16(String) = Chi : total:m2296_8, partial:m2304_15 +#-----| Goto -> Block 1 + +# 2303| Block 5 +# 2303| r2303_1(glval) = VariableAddress[s] : +# 2304| v2304_17(void) = NoOp : +# 2304| r2304_18(glval) = VariableAddress[s] : +# 2304| r2304_19(glval) = FunctionAddress[~String] : +# 2304| v2304_20(void) = Call[~String] : func:r2304_19, this:r2304_18 +# 2304| m2304_21(unknown) = ^CallSideEffect : ~m2296_6 +# 2304| m2304_22(unknown) = Chi : total:m2296_6, partial:m2304_21 +# 2304| v2304_23(void) = ^IndirectReadSideEffect[-1] : &:r2304_18, m2296_8 +# 2304| m2304_24(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_18 +# 2304| m2304_25(String) = Chi : total:m2296_8, partial:m2304_24 +#-----| Goto -> Block 1 + +# 2306| int IfReturnDestructors3(bool) +# 2306| Block 0 +# 2306| v2306_1(void) = EnterFunction : +# 2306| m2306_2(unknown) = AliasedDefinition : +# 2306| m2306_3(unknown) = InitializeNonLocal : +# 2306| m2306_4(unknown) = Chi : total:m2306_2, partial:m2306_3 +# 2306| r2306_5(glval) = VariableAddress[b] : +# 2306| m2306_6(bool) = InitializeParameter[b] : &:r2306_5 +# 2307| r2307_1(glval) = VariableAddress[s] : +# 2307| m2307_2(String) = Uninitialized[s] : &:r2307_1 +# 2307| r2307_3(glval) = FunctionAddress[String] : +# 2307| v2307_4(void) = Call[String] : func:r2307_3, this:r2307_1 +# 2307| m2307_5(unknown) = ^CallSideEffect : ~m2306_4 +# 2307| m2307_6(unknown) = Chi : total:m2306_4, partial:m2307_5 +# 2307| m2307_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_1 +# 2307| m2307_8(String) = Chi : total:m2307_2, partial:m2307_7 +# 2308| r2308_1(glval) = VariableAddress[b] : +# 2308| r2308_2(bool) = Load[b] : &:r2308_1, m2306_6 +# 2308| v2308_3(void) = ConditionalBranch : r2308_2 +#-----| False -> Block 3 +#-----| True -> Block 2 + +# 2306| Block 1 +# 2306| m2306_7(unknown) = Phi : from 2:~m2312_5, from 3:~m2312_13 +# 2306| m2306_8(int) = Phi : from 2:m2309_3, from 3:m2311_3 +# 2306| r2306_9(glval) = VariableAddress[#return] : +# 2306| v2306_10(void) = ReturnValue : &:r2306_9, m2306_8 +# 2306| v2306_11(void) = AliasedUse : ~m2306_7 +# 2306| v2306_12(void) = ExitFunction : + +# 2309| Block 2 +# 2309| r2309_1(glval) = VariableAddress[#return] : +# 2309| r2309_2(int) = Constant[1] : +# 2309| m2309_3(int) = Store[#return] : &:r2309_1, r2309_2 +# 2312| r2312_1(glval) = VariableAddress[s] : +# 2312| r2312_2(glval) = FunctionAddress[~String] : +# 2312| v2312_3(void) = Call[~String] : func:r2312_2, this:r2312_1 +# 2312| m2312_4(unknown) = ^CallSideEffect : ~m2307_6 +# 2312| m2312_5(unknown) = Chi : total:m2307_6, partial:m2312_4 +# 2312| v2312_6(void) = ^IndirectReadSideEffect[-1] : &:r2312_1, m2307_8 +# 2312| m2312_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_1 +# 2312| m2312_8(String) = Chi : total:m2307_8, partial:m2312_7 +#-----| Goto -> Block 1 + +# 2311| Block 3 +# 2311| r2311_1(glval) = VariableAddress[#return] : +# 2311| r2311_2(int) = Constant[0] : +# 2311| m2311_3(int) = Store[#return] : &:r2311_1, r2311_2 +# 2312| r2312_9(glval) = VariableAddress[s] : +# 2312| r2312_10(glval) = FunctionAddress[~String] : +# 2312| v2312_11(void) = Call[~String] : func:r2312_10, this:r2312_9 +# 2312| m2312_12(unknown) = ^CallSideEffect : ~m2307_6 +# 2312| m2312_13(unknown) = Chi : total:m2307_6, partial:m2312_12 +# 2312| v2312_14(void) = ^IndirectReadSideEffect[-1] : &:r2312_9, m2307_8 +# 2312| m2312_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_9 +# 2312| m2312_16(String) = Chi : total:m2307_8, partial:m2312_15 +#-----| Goto -> Block 1 + +# 2314| void VoidReturnDestructors() +# 2314| Block 0 +# 2314| v2314_1(void) = EnterFunction : +# 2314| m2314_2(unknown) = AliasedDefinition : +# 2314| m2314_3(unknown) = InitializeNonLocal : +# 2314| m2314_4(unknown) = Chi : total:m2314_2, partial:m2314_3 +# 2315| r2315_1(glval) = VariableAddress[s] : +# 2315| m2315_2(String) = Uninitialized[s] : &:r2315_1 +# 2315| r2315_3(glval) = FunctionAddress[String] : +# 2315| v2315_4(void) = Call[String] : func:r2315_3, this:r2315_1 +# 2315| m2315_5(unknown) = ^CallSideEffect : ~m2314_4 +# 2315| m2315_6(unknown) = Chi : total:m2314_4, partial:m2315_5 +# 2315| m2315_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2315_1 +# 2315| m2315_8(String) = Chi : total:m2315_2, partial:m2315_7 +# 2316| r2316_1(glval) = FunctionAddress[VoidFunc] : +# 2316| v2316_2(void) = Call[VoidFunc] : func:r2316_1 +# 2316| m2316_3(unknown) = ^CallSideEffect : ~m2315_6 +# 2316| m2316_4(unknown) = Chi : total:m2315_6, partial:m2316_3 +# 2316| v2316_5(void) = NoOp : +# 2317| r2317_1(glval) = VariableAddress[s] : +# 2317| r2317_2(glval) = FunctionAddress[~String] : +# 2317| v2317_3(void) = Call[~String] : func:r2317_2, this:r2317_1 +# 2317| m2317_4(unknown) = ^CallSideEffect : ~m2316_4 +# 2317| m2317_5(unknown) = Chi : total:m2316_4, partial:m2317_4 +# 2317| v2317_6(void) = ^IndirectReadSideEffect[-1] : &:r2317_1, m2315_8 +# 2317| m2317_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2317_1 +# 2317| m2317_8(String) = Chi : total:m2315_8, partial:m2317_7 +# 2314| v2314_5(void) = ReturnVoid : +# 2314| v2314_6(void) = AliasedUse : ~m2317_5 +# 2314| v2314_7(void) = ExitFunction : + +# 2327| return_routine_type::VoidToIntMemberFunc return_routine_type::GetVoidToIntFunc() +# 2327| Block 0 +# 2327| v2327_1(void) = EnterFunction : +# 2327| m2327_2(unknown) = AliasedDefinition : +# 2327| m2327_3(unknown) = InitializeNonLocal : +# 2327| m2327_4(unknown) = Chi : total:m2327_2, partial:m2327_3 +# 2329| r2329_1(glval<..:: *>) = VariableAddress[#return] : +# 2329| r2329_2(..()(..)) = FunctionAddress[VoidToInt] : +# 2329| m2329_3(..:: *) = Store[#return] : &:r2329_1, r2329_2 +# 2327| r2327_5(glval<..:: *>) = VariableAddress[#return] : +# 2327| v2327_6(void) = ReturnValue : &:r2327_5, m2329_3 +# 2327| v2327_7(void) = AliasedUse : m2327_3 +# 2327| v2327_8(void) = ExitFunction : + perf-regression.cpp: # 6| void Big::Big() # 6| Block 0 @@ -13357,6 +14681,11 @@ smart_ptr.cpp: # 12| m12_14(unknown) = ^BufferMayWriteSideEffect[0] : &:r12_9 # 12| m12_15(unknown) = Chi : total:m10_8, partial:m12_14 # 13| v13_1(void) = NoOp : +# 13| r13_2(glval>>) = VariableAddress[up] : +# 13| r13_3(glval) = FunctionAddress[~unique_ptr] : +# 13| v13_4(void) = Call[~unique_ptr] : func:r13_3, this:r13_2 +# 13| v13_5(void) = ^IndirectReadSideEffect[-1] : &:r13_2, m11_9 +# 13| m13_6(unique_ptr>) = ^IndirectMustWriteSideEffect[-1] : &:r13_2 # 10| v10_9(void) = ReturnIndirection[p] : &:r10_7, m12_15 # 10| v10_10(void) = ReturnVoid : # 10| v10_11(void) = AliasedUse : ~m12_12 @@ -13401,6 +14730,11 @@ smart_ptr.cpp: # 19| m19_18(unknown) = ^BufferMayWriteSideEffect[0] : &:r19_13 # 19| m19_19(unknown) = Chi : total:m17_8, partial:m19_18 # 20| v20_1(void) = NoOp : +# 20| r20_2(glval>) = VariableAddress[sp] : +# 20| r20_3(glval) = FunctionAddress[~shared_ptr] : +# 20| v20_4(void) = Call[~shared_ptr] : func:r20_3, this:r20_2 +# 20| v20_5(void) = ^IndirectReadSideEffect[-1] : &:r20_2, m18_9 +# 20| m20_6(shared_ptr) = ^IndirectMustWriteSideEffect[-1] : &:r20_2 # 17| v17_9(void) = ReturnIndirection[p] : &:r17_7, m19_19 # 17| v17_10(void) = ReturnVoid : # 17| v17_11(void) = AliasedUse : ~m19_16 @@ -13514,6 +14848,31 @@ smart_ptr.cpp: # 47| m47_16(unknown) = Chi : total:m47_10, partial:m47_15 # 47| v47_17(void) = ^BufferReadSideEffect[0] : &:r47_13, ~m47_16 # 48| v48_1(void) = NoOp : +# 48| r48_2(glval>>) = VariableAddress[sp_const_sp_const_int] : +# 48| r48_3(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_4(void) = Call[~shared_ptr] : func:r48_3, this:r48_2 +# 48| v48_5(void) = ^IndirectReadSideEffect[-1] : &:r48_2, m45_2 +# 48| m48_6(shared_ptr>) = ^IndirectMustWriteSideEffect[-1] : &:r48_2 +# 48| r48_7(glval>>) = VariableAddress[sp_const_sp_int] : +# 48| r48_8(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_9(void) = Call[~shared_ptr] : func:r48_8, this:r48_7 +# 48| v48_10(void) = ^IndirectReadSideEffect[-1] : &:r48_7, m41_2 +# 48| m48_11(shared_ptr>) = ^IndirectMustWriteSideEffect[-1] : &:r48_7 +# 48| r48_12(glval>>) = VariableAddress[sp_sp_const_int] : +# 48| r48_13(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_14(void) = Call[~shared_ptr] : func:r48_13, this:r48_12 +# 48| v48_15(void) = ^IndirectReadSideEffect[-1] : &:r48_12, m37_2 +# 48| m48_16(shared_ptr>) = ^IndirectMustWriteSideEffect[-1] : &:r48_12 +# 48| r48_17(glval>) = VariableAddress[sp_const_int_pointer] : +# 48| r48_18(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_19(void) = Call[~shared_ptr] : func:r48_18, this:r48_17 +# 48| v48_20(void) = ^IndirectReadSideEffect[-1] : &:r48_17, m33_2 +# 48| m48_21(shared_ptr) = ^IndirectMustWriteSideEffect[-1] : &:r48_17 +# 48| r48_22(glval>) = VariableAddress[sp_const_int] : +# 48| r48_23(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_24(void) = Call[~shared_ptr] : func:r48_23, this:r48_22 +# 48| v48_25(void) = ^IndirectReadSideEffect[-1] : &:r48_22, m29_2 +# 48| m48_26(shared_ptr) = ^IndirectMustWriteSideEffect[-1] : &:r48_22 # 28| v28_5(void) = ReturnVoid : # 28| v28_6(void) = AliasedUse : ~m47_16 # 28| v28_7(void) = ExitFunction : diff --git a/cpp/ql/test/library-tests/ir/ir/ir.cpp b/cpp/ql/test/library-tests/ir/ir/ir.cpp index 1de5f8d5b8f..b63449d96f0 100644 --- a/cpp/ql/test/library-tests/ir/ir/ir.cpp +++ b/cpp/ql/test/library-tests/ir/ir/ir.cpp @@ -605,7 +605,7 @@ struct String { String& operator=(String&&); const char* c_str() const; - + char pop_back(); private: const char* p; }; @@ -2189,4 +2189,146 @@ void static_variable_with_destructor_3() { static ClassWithDestructor global_class_with_destructor; +namespace vacuous_destructor_call { + template + T& get(T& t) { return t; } + + template + void call_destructor(T& t) { + get(t).~T(); + } + + void non_vacuous_destructor_call() { + ClassWithDestructor c; + call_destructor(c); + } + + void vacuous_destructor_call() { + int i; + call_destructor(i); + } +} + +void TryCatchDestructors(bool b) { + try { + String s; + if (b) { + throw "string literal"; + } + String s2; + } + catch (const char* s) { + throw String(s); + } + catch (const String& e) { + } + catch (...) { + throw; + } +} + +void IfDestructors(bool b) { + String s1; + if(b) { + String s2; + } else { + String s3; + } + String s4; +} + +void ForDestructors() { + char c = 'a'; + for(String s("hello"); c != 0; c = s.pop_back()) { + String s2; + } + + for(String s : vector(String("hello"))) { + String s2; + } + + for(String s("hello"), s2("world"); c != 0; c = s.pop_back()) { + c = 0; + } +} + +void IfDestructors2(bool b) { + if(String s = String("hello"); b) { + int x = 0; + } else { + int y = 0; + } +} + +class Bool { + public: + Bool(bool b_); + operator bool(); + ~Bool(); +}; + +void IfDestructors3(bool b) { + if(Bool B = Bool(b)) { + String s1; + } else { + String s2; + } +} + +void WhileLoopDestructors(bool b) { + { + String s; + while(b) { + b = false; + } + } + + { + while (Bool B = Bool(b)) { + b = false; + } + } +} + +void VoidFunc() {} + +void IfReturnDestructors(bool b) { + String s; + if(b) { + return; + } + if(b) { + return VoidFunc(); + } + s; +} + +int IfReturnDestructors3(bool b) { + String s; + if(b) { + return 1; + } + return 0; +} + +void VoidReturnDestructors() { + String s; + return VoidFunc(); +} + +namespace return_routine_type { + struct HasVoidToIntFunc + { + void VoidToInt(int); + }; + + typedef void (HasVoidToIntFunc::*VoidToIntMemberFunc)(int); + + static VoidToIntMemberFunc GetVoidToIntFunc() + { + return &HasVoidToIntFunc::VoidToInt; + } + +} + // semmle-extractor-options: -std=c++20 --clang diff --git a/cpp/ql/test/library-tests/ir/ir/operand_locations.expected b/cpp/ql/test/library-tests/ir/ir/operand_locations.expected index fe7bebfa3cb..6d9a76dc068 100644 --- a/cpp/ql/test/library-tests/ir/ir/operand_locations.expected +++ b/cpp/ql/test/library-tests/ir/ir/operand_locations.expected @@ -692,6 +692,7 @@ | file://:0:0:0:0 | Address | &:r0_1 | | file://:0:0:0:0 | Address | &:r0_2 | | file://:0:0:0:0 | Address | &:r0_2 | +| file://:0:0:0:0 | Address | &:r0_2 | | file://:0:0:0:0 | Address | &:r0_3 | | file://:0:0:0:0 | Address | &:r0_3 | | file://:0:0:0:0 | Address | &:r0_3 | @@ -738,6 +739,7 @@ | file://:0:0:0:0 | Address | &:r0_5 | | file://:0:0:0:0 | Address | &:r0_5 | | file://:0:0:0:0 | Address | &:r0_5 | +| file://:0:0:0:0 | Address | &:r0_5 | | file://:0:0:0:0 | Address | &:r0_6 | | file://:0:0:0:0 | Address | &:r0_6 | | file://:0:0:0:0 | Address | &:r0_7 | @@ -745,6 +747,7 @@ | file://:0:0:0:0 | Address | &:r0_7 | | file://:0:0:0:0 | Address | &:r0_7 | | file://:0:0:0:0 | Address | &:r0_7 | +| file://:0:0:0:0 | Address | &:r0_7 | | file://:0:0:0:0 | Address | &:r0_8 | | file://:0:0:0:0 | Address | &:r0_8 | | file://:0:0:0:0 | Address | &:r0_8 | @@ -755,6 +758,7 @@ | file://:0:0:0:0 | Address | &:r0_9 | | file://:0:0:0:0 | Address | &:r0_9 | | file://:0:0:0:0 | Address | &:r0_9 | +| file://:0:0:0:0 | Address | &:r0_9 | | file://:0:0:0:0 | Address | &:r0_10 | | file://:0:0:0:0 | Address | &:r0_10 | | file://:0:0:0:0 | Address | &:r0_10 | @@ -917,6 +921,10 @@ | file://:0:0:0:0 | SideEffect | m2168_13 | | file://:0:0:0:0 | SideEffect | m2168_34 | | file://:0:0:0:0 | SideEffect | m2168_34 | +| file://:0:0:0:0 | SideEffect | m2246_21 | +| file://:0:0:0:0 | SideEffect | m2246_21 | +| file://:0:0:0:0 | SideEffect | m2246_40 | +| file://:0:0:0:0 | SideEffect | m2246_40 | | file://:0:0:0:0 | SideEffect | ~m0_4 | | file://:0:0:0:0 | SideEffect | ~m0_4 | | file://:0:0:0:0 | SideEffect | ~m0_4 | @@ -966,9 +974,11 @@ | file://:0:0:0:0 | Unary | r0_1 | | file://:0:0:0:0 | Unary | r0_1 | | file://:0:0:0:0 | Unary | r0_1 | +| file://:0:0:0:0 | Unary | r0_1 | | file://:0:0:0:0 | Unary | r0_2 | | file://:0:0:0:0 | Unary | r0_3 | | file://:0:0:0:0 | Unary | r0_4 | +| file://:0:0:0:0 | Unary | r0_4 | | file://:0:0:0:0 | Unary | r0_5 | | file://:0:0:0:0 | Unary | r0_5 | | file://:0:0:0:0 | Unary | r0_6 | @@ -3024,7 +3034,7 @@ | ir.cpp:594:15:594:27 | Unary | r594_1 | | ir.cpp:615:6:615:18 | ChiPartial | partial:m615_3 | | ir.cpp:615:6:615:18 | ChiTotal | total:m615_2 | -| ir.cpp:615:6:615:18 | SideEffect | ~m619_8 | +| ir.cpp:615:6:615:18 | SideEffect | ~m620_30 | | ir.cpp:616:12:616:13 | Address | &:r616_1 | | ir.cpp:616:12:616:13 | Address | &:r616_1 | | ir.cpp:616:12:616:13 | Arg(this) | this:r616_1 | @@ -3066,6 +3076,46 @@ | ir.cpp:619:24:619:29 | Arg(0) | 0:r619_5 | | ir.cpp:619:24:619:29 | SideEffect | ~m615_3 | | ir.cpp:619:24:619:29 | Unary | r619_4 | +| ir.cpp:620:1:620:1 | Address | &:r620_2 | +| ir.cpp:620:1:620:1 | Address | &:r620_2 | +| ir.cpp:620:1:620:1 | Address | &:r620_10 | +| ir.cpp:620:1:620:1 | Address | &:r620_10 | +| ir.cpp:620:1:620:1 | Address | &:r620_18 | +| ir.cpp:620:1:620:1 | Address | &:r620_18 | +| ir.cpp:620:1:620:1 | Address | &:r620_26 | +| ir.cpp:620:1:620:1 | Address | &:r620_26 | +| ir.cpp:620:1:620:1 | Arg(this) | this:r620_2 | +| ir.cpp:620:1:620:1 | Arg(this) | this:r620_10 | +| ir.cpp:620:1:620:1 | Arg(this) | this:r620_18 | +| ir.cpp:620:1:620:1 | Arg(this) | this:r620_26 | +| ir.cpp:620:1:620:1 | CallTarget | func:r620_3 | +| ir.cpp:620:1:620:1 | CallTarget | func:r620_11 | +| ir.cpp:620:1:620:1 | CallTarget | func:r620_19 | +| ir.cpp:620:1:620:1 | CallTarget | func:r620_27 | +| ir.cpp:620:1:620:1 | ChiPartial | partial:m620_5 | +| ir.cpp:620:1:620:1 | ChiPartial | partial:m620_8 | +| ir.cpp:620:1:620:1 | ChiPartial | partial:m620_13 | +| ir.cpp:620:1:620:1 | ChiPartial | partial:m620_16 | +| ir.cpp:620:1:620:1 | ChiPartial | partial:m620_21 | +| ir.cpp:620:1:620:1 | ChiPartial | partial:m620_24 | +| ir.cpp:620:1:620:1 | ChiPartial | partial:m620_29 | +| ir.cpp:620:1:620:1 | ChiPartial | partial:m620_32 | +| ir.cpp:620:1:620:1 | ChiTotal | total:m616_8 | +| ir.cpp:620:1:620:1 | ChiTotal | total:m617_11 | +| ir.cpp:620:1:620:1 | ChiTotal | total:m618_6 | +| ir.cpp:620:1:620:1 | ChiTotal | total:m619_8 | +| ir.cpp:620:1:620:1 | ChiTotal | total:m619_11 | +| ir.cpp:620:1:620:1 | ChiTotal | total:m620_6 | +| ir.cpp:620:1:620:1 | ChiTotal | total:m620_14 | +| ir.cpp:620:1:620:1 | ChiTotal | total:m620_22 | +| ir.cpp:620:1:620:1 | SideEffect | m616_8 | +| ir.cpp:620:1:620:1 | SideEffect | m617_11 | +| ir.cpp:620:1:620:1 | SideEffect | m618_6 | +| ir.cpp:620:1:620:1 | SideEffect | m619_11 | +| ir.cpp:620:1:620:1 | SideEffect | ~m619_8 | +| ir.cpp:620:1:620:1 | SideEffect | ~m620_6 | +| ir.cpp:620:1:620:1 | SideEffect | ~m620_14 | +| ir.cpp:620:1:620:1 | SideEffect | ~m620_22 | | ir.cpp:622:6:622:16 | ChiPartial | partial:m622_3 | | ir.cpp:622:6:622:16 | ChiTotal | total:m622_2 | | ir.cpp:622:6:622:16 | SideEffect | ~m625_6 | @@ -3980,7 +4030,7 @@ | ir.cpp:796:3:796:3 | SideEffect | ~m796_16 | | ir.cpp:799:6:799:25 | ChiPartial | partial:m799_3 | | ir.cpp:799:6:799:25 | ChiTotal | total:m799_2 | -| ir.cpp:799:6:799:25 | SideEffect | ~m831_10 | +| ir.cpp:799:6:799:25 | SideEffect | ~m840_22 | | ir.cpp:800:8:800:8 | Address | &:r800_1 | | ir.cpp:800:8:800:8 | Address | &:r800_1 | | ir.cpp:800:8:800:8 | Arg(this) | this:r800_1 | @@ -4331,6 +4381,36 @@ | ir.cpp:839:8:839:10 | Load | m837_3 | | ir.cpp:839:8:839:10 | StoreValue | r839_3 | | ir.cpp:839:8:839:10 | Unary | r839_2 | +| ir.cpp:840:1:840:1 | Address | &:r840_2 | +| ir.cpp:840:1:840:1 | Address | &:r840_2 | +| ir.cpp:840:1:840:1 | Address | &:r840_10 | +| ir.cpp:840:1:840:1 | Address | &:r840_10 | +| ir.cpp:840:1:840:1 | Address | &:r840_18 | +| ir.cpp:840:1:840:1 | Address | &:r840_18 | +| ir.cpp:840:1:840:1 | Arg(this) | this:r840_2 | +| ir.cpp:840:1:840:1 | Arg(this) | this:r840_10 | +| ir.cpp:840:1:840:1 | Arg(this) | this:r840_18 | +| ir.cpp:840:1:840:1 | CallTarget | func:r840_3 | +| ir.cpp:840:1:840:1 | CallTarget | func:r840_11 | +| ir.cpp:840:1:840:1 | CallTarget | func:r840_19 | +| ir.cpp:840:1:840:1 | ChiPartial | partial:m840_5 | +| ir.cpp:840:1:840:1 | ChiPartial | partial:m840_8 | +| ir.cpp:840:1:840:1 | ChiPartial | partial:m840_13 | +| ir.cpp:840:1:840:1 | ChiPartial | partial:m840_16 | +| ir.cpp:840:1:840:1 | ChiPartial | partial:m840_21 | +| ir.cpp:840:1:840:1 | ChiPartial | partial:m840_24 | +| ir.cpp:840:1:840:1 | ChiTotal | total:m817_13 | +| ir.cpp:840:1:840:1 | ChiTotal | total:m824_24 | +| ir.cpp:840:1:840:1 | ChiTotal | total:m831_10 | +| ir.cpp:840:1:840:1 | ChiTotal | total:m831_14 | +| ir.cpp:840:1:840:1 | ChiTotal | total:m840_6 | +| ir.cpp:840:1:840:1 | ChiTotal | total:m840_14 | +| ir.cpp:840:1:840:1 | SideEffect | m817_13 | +| ir.cpp:840:1:840:1 | SideEffect | m824_24 | +| ir.cpp:840:1:840:1 | SideEffect | m831_14 | +| ir.cpp:840:1:840:1 | SideEffect | ~m831_10 | +| ir.cpp:840:1:840:1 | SideEffect | ~m840_6 | +| ir.cpp:840:1:840:1 | SideEffect | ~m840_14 | | ir.cpp:842:8:842:8 | Address | &:r842_5 | | ir.cpp:842:8:842:8 | Address | &:r842_5 | | ir.cpp:842:8:842:8 | Address | &:r842_7 | @@ -4375,7 +4455,7 @@ | ir.cpp:846:8:846:8 | Unary | m846_6 | | ir.cpp:849:6:849:16 | ChiPartial | partial:m849_3 | | ir.cpp:849:6:849:16 | ChiTotal | total:m849_2 | -| ir.cpp:849:6:849:16 | SideEffect | ~m851_6 | +| ir.cpp:849:6:849:16 | SideEffect | ~m865_14 | | ir.cpp:850:19:850:19 | Address | &:r850_1 | | ir.cpp:850:19:850:19 | Address | &:r850_1 | | ir.cpp:850:19:850:19 | Arg(this) | this:r850_1 | @@ -4428,6 +4508,26 @@ | ir.cpp:864:47:864:48 | Address | &:r864_2 | | ir.cpp:864:47:864:48 | Load | m860_5 | | ir.cpp:864:47:864:48 | Unary | r864_3 | +| ir.cpp:865:1:865:1 | Address | &:r865_2 | +| ir.cpp:865:1:865:1 | Address | &:r865_2 | +| ir.cpp:865:1:865:1 | Address | &:r865_10 | +| ir.cpp:865:1:865:1 | Address | &:r865_10 | +| ir.cpp:865:1:865:1 | Arg(this) | this:r865_2 | +| ir.cpp:865:1:865:1 | Arg(this) | this:r865_10 | +| ir.cpp:865:1:865:1 | CallTarget | func:r865_3 | +| ir.cpp:865:1:865:1 | CallTarget | func:r865_11 | +| ir.cpp:865:1:865:1 | ChiPartial | partial:m865_5 | +| ir.cpp:865:1:865:1 | ChiPartial | partial:m865_8 | +| ir.cpp:865:1:865:1 | ChiPartial | partial:m865_13 | +| ir.cpp:865:1:865:1 | ChiPartial | partial:m865_16 | +| ir.cpp:865:1:865:1 | ChiTotal | total:m850_8 | +| ir.cpp:865:1:865:1 | ChiTotal | total:m851_6 | +| ir.cpp:865:1:865:1 | ChiTotal | total:m851_8 | +| ir.cpp:865:1:865:1 | ChiTotal | total:m865_6 | +| ir.cpp:865:1:865:1 | SideEffect | m850_8 | +| ir.cpp:865:1:865:1 | SideEffect | m851_8 | +| ir.cpp:865:1:865:1 | SideEffect | ~m851_6 | +| ir.cpp:865:1:865:1 | SideEffect | ~m865_6 | | ir.cpp:867:1:867:14 | Address | &:m867_6 | | ir.cpp:867:1:867:14 | Address | &:r867_5 | | ir.cpp:867:1:867:14 | Address | &:r867_5 | @@ -5111,7 +5211,7 @@ | ir.cpp:1038:14:1038:14 | StoreValue | r1038_10 | | ir.cpp:1040:6:1040:11 | ChiPartial | partial:m1040_3 | | ir.cpp:1040:6:1040:11 | ChiTotal | total:m1040_2 | -| ir.cpp:1040:6:1040:11 | SideEffect | ~m1055_7 | +| ir.cpp:1040:6:1040:11 | SideEffect | ~m1056_14 | | ir.cpp:1040:17:1040:17 | Address | &:r1040_5 | | ir.cpp:1040:34:1040:34 | Address | &:r1040_7 | | ir.cpp:1040:34:1040:34 | Address | &:r1040_7 | @@ -5589,6 +5689,26 @@ | ir.cpp:1055:15:1055:15 | ChiTotal | total:m1052_7 | | ir.cpp:1055:15:1055:15 | SideEffect | ~m1052_7 | | ir.cpp:1055:16:1055:16 | Arg(0) | 0:r1055_4 | +| ir.cpp:1056:1:1056:1 | Address | &:r1056_2 | +| ir.cpp:1056:1:1056:1 | Address | &:r1056_2 | +| ir.cpp:1056:1:1056:1 | Address | &:r1056_10 | +| ir.cpp:1056:1:1056:1 | Address | &:r1056_10 | +| ir.cpp:1056:1:1056:1 | Arg(this) | this:r1056_2 | +| ir.cpp:1056:1:1056:1 | Arg(this) | this:r1056_10 | +| ir.cpp:1056:1:1056:1 | CallTarget | func:r1056_3 | +| ir.cpp:1056:1:1056:1 | CallTarget | func:r1056_11 | +| ir.cpp:1056:1:1056:1 | ChiPartial | partial:m1056_5 | +| ir.cpp:1056:1:1056:1 | ChiPartial | partial:m1056_8 | +| ir.cpp:1056:1:1056:1 | ChiPartial | partial:m1056_13 | +| ir.cpp:1056:1:1056:1 | ChiPartial | partial:m1056_16 | +| ir.cpp:1056:1:1056:1 | ChiTotal | total:m1045_17 | +| ir.cpp:1056:1:1056:1 | ChiTotal | total:m1049_12 | +| ir.cpp:1056:1:1056:1 | ChiTotal | total:m1055_7 | +| ir.cpp:1056:1:1056:1 | ChiTotal | total:m1056_6 | +| ir.cpp:1056:1:1056:1 | SideEffect | m1045_17 | +| ir.cpp:1056:1:1056:1 | SideEffect | m1049_12 | +| ir.cpp:1056:1:1056:1 | SideEffect | ~m1055_7 | +| ir.cpp:1056:1:1056:1 | SideEffect | ~m1056_6 | | ir.cpp:1079:6:1079:18 | ChiPartial | partial:m1079_3 | | ir.cpp:1079:6:1079:18 | ChiTotal | total:m1079_2 | | ir.cpp:1079:6:1079:18 | SideEffect | ~m1090_1 | @@ -6230,7 +6350,7 @@ | ir.cpp:1264:21:1264:21 | StoreValue | r1264_2 | | ir.cpp:1272:6:1272:33 | ChiPartial | partial:m1272_3 | | ir.cpp:1272:6:1272:33 | ChiTotal | total:m1272_2 | -| ir.cpp:1272:6:1272:33 | SideEffect | ~m1288_8 | +| ir.cpp:1272:6:1272:33 | SideEffect | ~m1289_6 | | ir.cpp:1272:39:1272:45 | Address | &:r1272_5 | | ir.cpp:1272:51:1272:55 | Address | &:r1272_7 | | ir.cpp:1272:51:1272:55 | Address | &:r1272_7 | @@ -6350,6 +6470,16 @@ | ir.cpp:1288:25:1288:49 | ChiPartial | partial:m1288_7 | | ir.cpp:1288:25:1288:49 | ChiTotal | total:m1288_4 | | ir.cpp:1288:25:1288:49 | SideEffect | ~m1288_4 | +| ir.cpp:1289:1:1289:1 | Address | &:r1289_2 | +| ir.cpp:1289:1:1289:1 | Address | &:r1289_2 | +| ir.cpp:1289:1:1289:1 | Arg(this) | this:r1289_2 | +| ir.cpp:1289:1:1289:1 | CallTarget | func:r1289_3 | +| ir.cpp:1289:1:1289:1 | ChiPartial | partial:m1289_5 | +| ir.cpp:1289:1:1289:1 | ChiPartial | partial:m1289_8 | +| ir.cpp:1289:1:1289:1 | ChiTotal | total:m1273_8 | +| ir.cpp:1289:1:1289:1 | ChiTotal | total:m1288_8 | +| ir.cpp:1289:1:1289:1 | SideEffect | m1273_8 | +| ir.cpp:1289:1:1289:1 | SideEffect | ~m1288_8 | | ir.cpp:1291:5:1291:22 | Address | &:r1291_10 | | ir.cpp:1291:5:1291:22 | ChiPartial | partial:m1291_3 | | ir.cpp:1291:5:1291:22 | ChiTotal | total:m1291_2 | @@ -6628,7 +6758,7 @@ | ir.cpp:1329:5:1329:15 | StoreValue | r1329_2 | | ir.cpp:1367:6:1367:21 | ChiPartial | partial:m1367_3 | | ir.cpp:1367:6:1367:21 | ChiTotal | total:m1367_2 | -| ir.cpp:1367:6:1367:21 | SideEffect | ~m1378_5 | +| ir.cpp:1367:6:1367:21 | SideEffect | ~m1379_6 | | ir.cpp:1368:12:1368:12 | Address | &:r1368_1 | | ir.cpp:1368:16:1368:34 | CallTarget | func:r1368_2 | | ir.cpp:1368:16:1368:34 | ChiPartial | partial:m1368_4 | @@ -6753,9 +6883,19 @@ | ir.cpp:1378:5:1378:28 | SideEffect | ~m1376_11 | | ir.cpp:1378:5:1378:28 | StoreValue | r1378_3 | | ir.cpp:1378:5:1378:30 | Address | &:r1378_1 | +| ir.cpp:1379:1:1379:1 | Address | &:r1379_2 | +| ir.cpp:1379:1:1379:1 | Address | &:r1379_2 | +| ir.cpp:1379:1:1379:1 | Arg(this) | this:r1379_2 | +| ir.cpp:1379:1:1379:1 | CallTarget | func:r1379_3 | +| ir.cpp:1379:1:1379:1 | ChiPartial | partial:m1379_5 | +| ir.cpp:1379:1:1379:1 | ChiPartial | partial:m1379_8 | +| ir.cpp:1379:1:1379:1 | ChiTotal | total:m1368_6 | +| ir.cpp:1379:1:1379:1 | ChiTotal | total:m1378_5 | +| ir.cpp:1379:1:1379:1 | SideEffect | m1368_6 | +| ir.cpp:1379:1:1379:1 | SideEffect | ~m1378_5 | | ir.cpp:1381:6:1381:30 | ChiPartial | partial:m1381_3 | | ir.cpp:1381:6:1381:30 | ChiTotal | total:m1381_2 | -| ir.cpp:1381:6:1381:30 | SideEffect | ~m1390_5 | +| ir.cpp:1381:6:1381:30 | SideEffect | ~m1391_14 | | ir.cpp:1382:21:1382:21 | Address | &:r1382_1 | | ir.cpp:1382:25:1382:52 | CallTarget | func:r1382_2 | | ir.cpp:1382:25:1382:52 | ChiPartial | partial:m1382_4 | @@ -6827,6 +6967,26 @@ | ir.cpp:1390:5:1390:37 | SideEffect | ~m1388_10 | | ir.cpp:1390:5:1390:37 | StoreValue | r1390_3 | | ir.cpp:1390:5:1390:39 | Address | &:r1390_1 | +| ir.cpp:1391:1:1391:1 | Address | &:r1391_2 | +| ir.cpp:1391:1:1391:1 | Address | &:r1391_2 | +| ir.cpp:1391:1:1391:1 | Address | &:r1391_10 | +| ir.cpp:1391:1:1391:1 | Address | &:r1391_10 | +| ir.cpp:1391:1:1391:1 | Arg(this) | this:r1391_2 | +| ir.cpp:1391:1:1391:1 | Arg(this) | this:r1391_10 | +| ir.cpp:1391:1:1391:1 | CallTarget | func:r1391_3 | +| ir.cpp:1391:1:1391:1 | CallTarget | func:r1391_11 | +| ir.cpp:1391:1:1391:1 | ChiPartial | partial:m1391_5 | +| ir.cpp:1391:1:1391:1 | ChiPartial | partial:m1391_8 | +| ir.cpp:1391:1:1391:1 | ChiPartial | partial:m1391_13 | +| ir.cpp:1391:1:1391:1 | ChiPartial | partial:m1391_16 | +| ir.cpp:1391:1:1391:1 | ChiTotal | total:m1382_6 | +| ir.cpp:1391:1:1391:1 | ChiTotal | total:m1384_2 | +| ir.cpp:1391:1:1391:1 | ChiTotal | total:m1390_5 | +| ir.cpp:1391:1:1391:1 | ChiTotal | total:m1391_6 | +| ir.cpp:1391:1:1391:1 | SideEffect | m1382_6 | +| ir.cpp:1391:1:1391:1 | SideEffect | m1384_2 | +| ir.cpp:1391:1:1391:1 | SideEffect | ~m1390_5 | +| ir.cpp:1391:1:1391:1 | SideEffect | ~m1391_6 | | ir.cpp:1393:6:1393:31 | ChiPartial | partial:m1393_3 | | ir.cpp:1393:6:1393:31 | ChiTotal | total:m1393_2 | | ir.cpp:1393:6:1393:31 | SideEffect | ~m1403_6 | @@ -9129,7 +9289,7 @@ | ir.cpp:1917:12:1917:12 | StoreValue | r1917_3 | | ir.cpp:1920:6:1920:43 | ChiPartial | partial:m1920_3 | | ir.cpp:1920:6:1920:43 | ChiTotal | total:m1920_2 | -| ir.cpp:1920:6:1920:43 | SideEffect | ~m1927_5 | +| ir.cpp:1920:6:1920:43 | SideEffect | ~m1928_6 | | ir.cpp:1921:7:1921:7 | Address | &:r1921_1 | | ir.cpp:1921:7:1921:7 | Address | &:r1921_1 | | ir.cpp:1921:7:1921:7 | Arg(this) | this:r1921_1 | @@ -9163,6 +9323,16 @@ | ir.cpp:1927:9:1927:23 | SideEffect | ~m1925_5 | | ir.cpp:1927:9:1927:23 | StoreValue | r1927_3 | | ir.cpp:1927:25:1927:26 | Arg(0) | 0:r1927_2 | +| ir.cpp:1928:1:1928:1 | Address | &:r1928_2 | +| ir.cpp:1928:1:1928:1 | Address | &:r1928_2 | +| ir.cpp:1928:1:1928:1 | Arg(this) | this:r1928_2 | +| ir.cpp:1928:1:1928:1 | CallTarget | func:r1928_3 | +| ir.cpp:1928:1:1928:1 | ChiPartial | partial:m1928_5 | +| ir.cpp:1928:1:1928:1 | ChiPartial | partial:m1928_8 | +| ir.cpp:1928:1:1928:1 | ChiTotal | total:m1921_8 | +| ir.cpp:1928:1:1928:1 | ChiTotal | total:m1927_5 | +| ir.cpp:1928:1:1928:1 | SideEffect | m1921_8 | +| ir.cpp:1928:1:1928:1 | SideEffect | ~m1927_5 | | ir.cpp:1930:6:1930:23 | ChiPartial | partial:m1930_3 | | ir.cpp:1930:6:1930:23 | ChiTotal | total:m1930_2 | | ir.cpp:1930:6:1930:23 | SideEffect | m1930_3 | @@ -9319,7 +9489,7 @@ | ir.cpp:1989:5:1989:21 | Address | &:r1989_1 | | ir.cpp:1992:6:1992:21 | ChiPartial | partial:m1992_3 | | ir.cpp:1992:6:1992:21 | ChiTotal | total:m1992_2 | -| ir.cpp:1992:6:1992:21 | SideEffect | ~m1993_6 | +| ir.cpp:1992:6:1992:21 | SideEffect | ~m1996_6 | | ir.cpp:1993:7:1993:7 | Address | &:r1993_1 | | ir.cpp:1993:7:1993:7 | Address | &:r1993_1 | | ir.cpp:1993:7:1993:7 | Arg(this) | this:r1993_1 | @@ -9333,6 +9503,16 @@ | ir.cpp:1994:23:1994:45 | StoreValue | r1994_2 | | ir.cpp:1995:5:1995:7 | Address | &:r1995_3 | | ir.cpp:1995:13:1995:32 | StoreValue | r1995_2 | +| ir.cpp:1996:1:1996:1 | Address | &:r1996_2 | +| ir.cpp:1996:1:1996:1 | Address | &:r1996_2 | +| ir.cpp:1996:1:1996:1 | Arg(this) | this:r1996_2 | +| ir.cpp:1996:1:1996:1 | CallTarget | func:r1996_3 | +| ir.cpp:1996:1:1996:1 | ChiPartial | partial:m1996_5 | +| ir.cpp:1996:1:1996:1 | ChiPartial | partial:m1996_8 | +| ir.cpp:1996:1:1996:1 | ChiTotal | total:m1993_6 | +| ir.cpp:1996:1:1996:1 | ChiTotal | total:m1993_8 | +| ir.cpp:1996:1:1996:1 | SideEffect | m1993_8 | +| ir.cpp:1996:1:1996:1 | SideEffect | ~m1993_6 | | ir.cpp:1998:6:1998:19 | ChiPartial | partial:m1998_3 | | ir.cpp:1998:6:1998:19 | ChiTotal | total:m1998_2 | | ir.cpp:1998:6:1998:19 | SideEffect | ~m2002_9 | @@ -10262,9 +10442,9 @@ | ir.cpp:2135:54:2135:57 | StoreValue | r2135_4 | | ir.cpp:2137:6:2137:35 | ChiPartial | partial:m2137_3 | | ir.cpp:2137:6:2137:35 | ChiTotal | total:m2137_2 | -| ir.cpp:2137:6:2137:35 | Phi | from 14:~m2159_5 | -| ir.cpp:2137:6:2137:35 | Phi | from 19:~m2163_54 | -| ir.cpp:2137:6:2137:35 | Phi | from 23:~m2168_42 | +| ir.cpp:2137:6:2137:35 | Phi | from 13:~m2172_5 | +| ir.cpp:2137:6:2137:35 | Phi | from 19:~m2172_13 | +| ir.cpp:2137:6:2137:35 | Phi | from 23:~m2172_22 | | ir.cpp:2137:6:2137:35 | SideEffect | ~m2137_9 | | ir.cpp:2137:42:2137:42 | Address | &:r2137_5 | | ir.cpp:2137:50:2137:50 | Address | &:r2137_7 | @@ -10291,6 +10471,16 @@ | ir.cpp:2139:11:2139:15 | ChiTotal | total:m2138_6 | | ir.cpp:2139:11:2139:15 | SideEffect | ~m2138_6 | | ir.cpp:2139:17:2139:19 | Arg(0) | 0:r2139_3 | +| ir.cpp:2139:21:2139:21 | Address | &:r2139_10 | +| ir.cpp:2139:21:2139:21 | Address | &:r2139_10 | +| ir.cpp:2139:21:2139:21 | Arg(this) | this:r2139_10 | +| ir.cpp:2139:21:2139:21 | CallTarget | func:r2139_11 | +| ir.cpp:2139:21:2139:21 | ChiPartial | partial:m2139_13 | +| ir.cpp:2139:21:2139:21 | ChiPartial | partial:m2139_16 | +| ir.cpp:2139:21:2139:21 | ChiTotal | total:m2139_6 | +| ir.cpp:2139:21:2139:21 | ChiTotal | total:m2139_9 | +| ir.cpp:2139:21:2139:21 | SideEffect | m2139_9 | +| ir.cpp:2139:21:2139:21 | SideEffect | ~m2139_6 | | ir.cpp:2141:39:2141:39 | Address | &:r2141_2 | | ir.cpp:2141:39:2141:39 | Address | &:r2141_2 | | ir.cpp:2141:39:2141:39 | Arg(this) | this:r2141_2 | @@ -10300,7 +10490,7 @@ | ir.cpp:2141:39:2141:39 | ChiTotal | total:m2141_1 | | ir.cpp:2141:39:2141:39 | ChiTotal | total:m2141_3 | | ir.cpp:2141:39:2141:39 | Phi | from 0:~m2138_6 | -| ir.cpp:2141:39:2141:39 | Phi | from 2:~m2139_6 | +| ir.cpp:2141:39:2141:39 | Phi | from 2:~m2139_14 | | ir.cpp:2141:39:2141:39 | SideEffect | ~m2141_1 | | ir.cpp:2141:42:2141:76 | Condition | r2141_10 | | ir.cpp:2142:9:2142:9 | Address | &:r2142_1 | @@ -10380,56 +10570,66 @@ | ir.cpp:2154:40:2154:41 | ChiTotal | total:m2154_2 | | ir.cpp:2154:40:2154:41 | SideEffect | ~m2153_6 | | ir.cpp:2154:64:2154:64 | Address | &:r2154_44 | +| ir.cpp:2154:64:2154:64 | Address | &:r2154_52 | +| ir.cpp:2154:64:2154:64 | Address | &:r2154_52 | +| ir.cpp:2154:64:2154:64 | Arg(this) | this:r2154_52 | +| ir.cpp:2154:64:2154:64 | CallTarget | func:r2154_53 | +| ir.cpp:2154:64:2154:64 | ChiPartial | partial:m2154_55 | +| ir.cpp:2154:64:2154:64 | ChiPartial | partial:m2154_58 | +| ir.cpp:2154:64:2154:64 | ChiTotal | total:m2155_6 | +| ir.cpp:2154:64:2154:64 | ChiTotal | total:m2155_9 | +| ir.cpp:2154:64:2154:64 | SideEffect | m2155_9 | +| ir.cpp:2154:64:2154:64 | SideEffect | ~m2155_6 | | ir.cpp:2154:68:2154:68 | Address | &:r2154_19 | | ir.cpp:2154:68:2154:68 | Address | &:r2154_27 | | ir.cpp:2154:68:2154:68 | Address | &:r2154_38 | | ir.cpp:2154:68:2154:68 | Address | &:r2154_47 | -| ir.cpp:2154:68:2154:68 | Address | &:r2154_52 | -| ir.cpp:2154:68:2154:68 | Address | &:r2154_52 | +| ir.cpp:2154:68:2154:68 | Address | &:r2154_60 | +| ir.cpp:2154:68:2154:68 | Address | &:r2154_60 | | ir.cpp:2154:68:2154:68 | Arg(0) | 0:r2154_39 | | ir.cpp:2154:68:2154:68 | Arg(this) | this:r0_2 | | ir.cpp:2154:68:2154:68 | Arg(this) | this:r0_5 | | ir.cpp:2154:68:2154:68 | Arg(this) | this:r0_7 | | ir.cpp:2154:68:2154:68 | Arg(this) | this:r0_9 | -| ir.cpp:2154:68:2154:68 | Arg(this) | this:r2154_52 | +| ir.cpp:2154:68:2154:68 | Arg(this) | this:r2154_60 | | ir.cpp:2154:68:2154:68 | CallTarget | func:r2154_21 | | ir.cpp:2154:68:2154:68 | CallTarget | func:r2154_29 | | ir.cpp:2154:68:2154:68 | CallTarget | func:r2154_37 | | ir.cpp:2154:68:2154:68 | CallTarget | func:r2154_46 | -| ir.cpp:2154:68:2154:68 | CallTarget | func:r2154_53 | +| ir.cpp:2154:68:2154:68 | CallTarget | func:r2154_61 | | ir.cpp:2154:68:2154:68 | ChiPartial | partial:m2154_23 | | ir.cpp:2154:68:2154:68 | ChiPartial | partial:m2154_31 | | ir.cpp:2154:68:2154:68 | ChiPartial | partial:m2154_41 | | ir.cpp:2154:68:2154:68 | ChiPartial | partial:m2154_48 | -| ir.cpp:2154:68:2154:68 | ChiPartial | partial:m2154_55 | -| ir.cpp:2154:68:2154:68 | ChiPartial | partial:m2154_58 | +| ir.cpp:2154:68:2154:68 | ChiPartial | partial:m2154_63 | +| ir.cpp:2154:68:2154:68 | ChiPartial | partial:m2154_66 | | ir.cpp:2154:68:2154:68 | ChiTotal | total:m2154_11 | | ir.cpp:2154:68:2154:68 | ChiTotal | total:m2154_24 | | ir.cpp:2154:68:2154:68 | ChiTotal | total:m2154_34 | | ir.cpp:2154:68:2154:68 | ChiTotal | total:m2154_35 | | ir.cpp:2154:68:2154:68 | ChiTotal | total:m2154_42 | -| ir.cpp:2154:68:2154:68 | ChiTotal | total:m2155_6 | +| ir.cpp:2154:68:2154:68 | ChiTotal | total:m2154_56 | | ir.cpp:2154:68:2154:68 | Condition | r2154_40 | | ir.cpp:2154:68:2154:68 | Load | m2154_17 | | ir.cpp:2154:68:2154:68 | Load | m2154_17 | | ir.cpp:2154:68:2154:68 | Load | m2154_33 | | ir.cpp:2154:68:2154:68 | Phi | from 7:m2154_25 | | ir.cpp:2154:68:2154:68 | Phi | from 7:~m2154_32 | -| ir.cpp:2154:68:2154:68 | Phi | from 9:m2154_59 | -| ir.cpp:2154:68:2154:68 | Phi | from 9:~m2154_56 | +| ir.cpp:2154:68:2154:68 | Phi | from 9:m2154_67 | +| ir.cpp:2154:68:2154:68 | Phi | from 9:~m2154_64 | | ir.cpp:2154:68:2154:68 | SideEffect | m2154_34 | | ir.cpp:2154:68:2154:68 | SideEffect | ~m2154_11 | | ir.cpp:2154:68:2154:68 | SideEffect | ~m2154_24 | | ir.cpp:2154:68:2154:68 | SideEffect | ~m2154_35 | | ir.cpp:2154:68:2154:68 | SideEffect | ~m2154_42 | -| ir.cpp:2154:68:2154:68 | SideEffect | ~m2155_6 | +| ir.cpp:2154:68:2154:68 | SideEffect | ~m2154_56 | | ir.cpp:2154:68:2154:68 | StoreValue | r2154_22 | | ir.cpp:2154:68:2154:68 | StoreValue | r2154_30 | | ir.cpp:2154:68:2154:68 | Unary | r2154_20 | | ir.cpp:2154:68:2154:68 | Unary | r2154_28 | | ir.cpp:2154:68:2154:68 | Unary | r2154_36 | | ir.cpp:2154:68:2154:68 | Unary | r2154_45 | -| ir.cpp:2154:68:2154:68 | Unary | r2154_54 | +| ir.cpp:2154:68:2154:68 | Unary | r2154_62 | | ir.cpp:2154:68:2154:69 | StoreValue | r2154_16 | | ir.cpp:2154:68:2154:69 | Unary | r2154_15 | | ir.cpp:2154:68:2154:70 | Load | ~m2154_49 | @@ -10450,7 +10650,17 @@ | ir.cpp:2157:5:2157:5 | Address | &:r2157_26 | | ir.cpp:2157:37:2157:38 | Address | &:r2157_1 | | ir.cpp:2157:37:2157:38 | Address | &:r2157_1 | +| ir.cpp:2157:37:2157:38 | Address | &:r2157_60 | +| ir.cpp:2157:37:2157:38 | Address | &:r2157_60 | | ir.cpp:2157:37:2157:38 | Arg(this) | this:r2157_1 | +| ir.cpp:2157:37:2157:38 | Arg(this) | this:r2157_60 | +| ir.cpp:2157:37:2157:38 | CallTarget | func:r2157_61 | +| ir.cpp:2157:37:2157:38 | ChiPartial | partial:m2157_63 | +| ir.cpp:2157:37:2157:38 | ChiPartial | partial:m2157_66 | +| ir.cpp:2157:37:2157:38 | ChiTotal | total:m2157_13 | +| ir.cpp:2157:37:2157:38 | ChiTotal | total:m2157_56 | +| ir.cpp:2157:37:2157:38 | SideEffect | m2157_13 | +| ir.cpp:2157:37:2157:38 | SideEffect | ~m2157_56 | | ir.cpp:2157:40:2157:40 | Address | &:r2157_4 | | ir.cpp:2157:40:2157:40 | Address | &:r2157_4 | | ir.cpp:2157:40:2157:40 | Address | &:r2157_5 | @@ -10464,71 +10674,91 @@ | ir.cpp:2157:40:2157:41 | ChiTotal | total:m2154_42 | | ir.cpp:2157:40:2157:41 | ChiTotal | total:m2157_2 | | ir.cpp:2157:40:2157:41 | SideEffect | ~m2154_42 | -| ir.cpp:2157:64:2157:64 | Address | &:r2157_53 | +| ir.cpp:2157:64:2157:64 | Address | &:r2157_44 | +| ir.cpp:2157:64:2157:64 | Address | &:r2157_52 | +| ir.cpp:2157:64:2157:64 | Address | &:r2157_52 | +| ir.cpp:2157:64:2157:64 | Address | &:r2157_68 | +| ir.cpp:2157:64:2157:64 | Address | &:r2157_68 | +| ir.cpp:2157:64:2157:64 | Arg(this) | this:r2157_52 | +| ir.cpp:2157:64:2157:64 | Arg(this) | this:r2157_68 | +| ir.cpp:2157:64:2157:64 | CallTarget | func:r2157_53 | +| ir.cpp:2157:64:2157:64 | CallTarget | func:r2157_69 | +| ir.cpp:2157:64:2157:64 | ChiPartial | partial:m2157_55 | +| ir.cpp:2157:64:2157:64 | ChiPartial | partial:m2157_58 | +| ir.cpp:2157:64:2157:64 | ChiPartial | partial:m2157_71 | +| ir.cpp:2157:64:2157:64 | ChiPartial | partial:m2157_74 | +| ir.cpp:2157:64:2157:64 | ChiTotal | total:m2159_5 | +| ir.cpp:2157:64:2157:64 | ChiTotal | total:m2159_5 | +| ir.cpp:2157:64:2157:64 | ChiTotal | total:m2159_8 | +| ir.cpp:2157:64:2157:64 | ChiTotal | total:m2159_8 | +| ir.cpp:2157:64:2157:64 | SideEffect | m2159_8 | +| ir.cpp:2157:64:2157:64 | SideEffect | m2159_8 | +| ir.cpp:2157:64:2157:64 | SideEffect | ~m2159_5 | +| ir.cpp:2157:64:2157:64 | SideEffect | ~m2159_5 | | ir.cpp:2157:68:2157:68 | Address | &:r2157_19 | | ir.cpp:2157:68:2157:68 | Address | &:r2157_27 | | ir.cpp:2157:68:2157:68 | Address | &:r2157_38 | -| ir.cpp:2157:68:2157:68 | Address | &:r2157_44 | -| ir.cpp:2157:68:2157:68 | Address | &:r2157_44 | -| ir.cpp:2157:68:2157:68 | Address | &:r2157_56 | +| ir.cpp:2157:68:2157:68 | Address | &:r2157_47 | +| ir.cpp:2157:68:2157:68 | Address | &:r2157_76 | +| ir.cpp:2157:68:2157:68 | Address | &:r2157_76 | | ir.cpp:2157:68:2157:68 | Arg(0) | 0:r2157_39 | | ir.cpp:2157:68:2157:68 | Arg(this) | this:r0_12 | | ir.cpp:2157:68:2157:68 | Arg(this) | this:r0_15 | | ir.cpp:2157:68:2157:68 | Arg(this) | this:r0_17 | | ir.cpp:2157:68:2157:68 | Arg(this) | this:r0_19 | -| ir.cpp:2157:68:2157:68 | Arg(this) | this:r2157_44 | +| ir.cpp:2157:68:2157:68 | Arg(this) | this:r2157_76 | | ir.cpp:2157:68:2157:68 | CallTarget | func:r2157_21 | | ir.cpp:2157:68:2157:68 | CallTarget | func:r2157_29 | | ir.cpp:2157:68:2157:68 | CallTarget | func:r2157_37 | -| ir.cpp:2157:68:2157:68 | CallTarget | func:r2157_45 | -| ir.cpp:2157:68:2157:68 | CallTarget | func:r2157_55 | +| ir.cpp:2157:68:2157:68 | CallTarget | func:r2157_46 | +| ir.cpp:2157:68:2157:68 | CallTarget | func:r2157_77 | | ir.cpp:2157:68:2157:68 | ChiPartial | partial:m2157_23 | | ir.cpp:2157:68:2157:68 | ChiPartial | partial:m2157_31 | | ir.cpp:2157:68:2157:68 | ChiPartial | partial:m2157_41 | -| ir.cpp:2157:68:2157:68 | ChiPartial | partial:m2157_47 | -| ir.cpp:2157:68:2157:68 | ChiPartial | partial:m2157_50 | -| ir.cpp:2157:68:2157:68 | ChiPartial | partial:m2157_57 | +| ir.cpp:2157:68:2157:68 | ChiPartial | partial:m2157_48 | +| ir.cpp:2157:68:2157:68 | ChiPartial | partial:m2157_79 | +| ir.cpp:2157:68:2157:68 | ChiPartial | partial:m2157_82 | | ir.cpp:2157:68:2157:68 | ChiTotal | total:m2157_11 | | ir.cpp:2157:68:2157:68 | ChiTotal | total:m2157_24 | | ir.cpp:2157:68:2157:68 | ChiTotal | total:m2157_34 | | ir.cpp:2157:68:2157:68 | ChiTotal | total:m2157_35 | | ir.cpp:2157:68:2157:68 | ChiTotal | total:m2157_42 | -| ir.cpp:2157:68:2157:68 | ChiTotal | total:m2159_5 | +| ir.cpp:2157:68:2157:68 | ChiTotal | total:m2157_72 | | ir.cpp:2157:68:2157:68 | Condition | r2157_40 | | ir.cpp:2157:68:2157:68 | Load | m2157_17 | | ir.cpp:2157:68:2157:68 | Load | m2157_17 | | ir.cpp:2157:68:2157:68 | Load | m2157_33 | | ir.cpp:2157:68:2157:68 | Phi | from 10:m2157_25 | | ir.cpp:2157:68:2157:68 | Phi | from 10:~m2157_32 | -| ir.cpp:2157:68:2157:68 | Phi | from 12:m2157_51 | -| ir.cpp:2157:68:2157:68 | Phi | from 12:~m2157_48 | +| ir.cpp:2157:68:2157:68 | Phi | from 14:m2157_83 | +| ir.cpp:2157:68:2157:68 | Phi | from 14:~m2157_80 | | ir.cpp:2157:68:2157:68 | SideEffect | m2157_34 | | ir.cpp:2157:68:2157:68 | SideEffect | ~m2157_11 | | ir.cpp:2157:68:2157:68 | SideEffect | ~m2157_24 | | ir.cpp:2157:68:2157:68 | SideEffect | ~m2157_35 | | ir.cpp:2157:68:2157:68 | SideEffect | ~m2157_42 | -| ir.cpp:2157:68:2157:68 | SideEffect | ~m2159_5 | +| ir.cpp:2157:68:2157:68 | SideEffect | ~m2157_72 | | ir.cpp:2157:68:2157:68 | StoreValue | r2157_22 | | ir.cpp:2157:68:2157:68 | StoreValue | r2157_30 | | ir.cpp:2157:68:2157:68 | Unary | r2157_20 | | ir.cpp:2157:68:2157:68 | Unary | r2157_28 | | ir.cpp:2157:68:2157:68 | Unary | r2157_36 | -| ir.cpp:2157:68:2157:68 | Unary | r2157_46 | -| ir.cpp:2157:68:2157:68 | Unary | r2157_54 | +| ir.cpp:2157:68:2157:68 | Unary | r2157_45 | +| ir.cpp:2157:68:2157:68 | Unary | r2157_78 | | ir.cpp:2157:68:2157:69 | StoreValue | r2157_16 | | ir.cpp:2157:68:2157:69 | Unary | r2157_15 | -| ir.cpp:2157:68:2157:70 | Load | ~m2157_58 | -| ir.cpp:2157:68:2157:70 | StoreValue | r2157_59 | +| ir.cpp:2157:68:2157:70 | Load | ~m2157_49 | +| ir.cpp:2157:68:2157:70 | StoreValue | r2157_50 | | ir.cpp:2158:7:2158:7 | Address | &:r2158_1 | | ir.cpp:2158:7:2158:7 | Address | &:r2158_1 | | ir.cpp:2158:7:2158:7 | Arg(this) | this:r2158_1 | | ir.cpp:2158:7:2158:7 | ChiPartial | partial:m2158_8 | -| ir.cpp:2158:7:2158:7 | ChiTotal | total:m2157_60 | -| ir.cpp:2158:7:2158:7 | SideEffect | m2157_60 | +| ir.cpp:2158:7:2158:7 | ChiTotal | total:m2157_51 | +| ir.cpp:2158:7:2158:7 | SideEffect | m2157_51 | | ir.cpp:2158:9:2158:13 | CallTarget | func:r2158_2 | | ir.cpp:2158:9:2158:13 | ChiPartial | partial:m2158_5 | -| ir.cpp:2158:9:2158:13 | ChiTotal | total:m2157_58 | -| ir.cpp:2158:9:2158:13 | SideEffect | ~m2157_58 | +| ir.cpp:2158:9:2158:13 | ChiTotal | total:m2157_49 | +| ir.cpp:2158:9:2158:13 | SideEffect | ~m2157_49 | | ir.cpp:2158:15:2158:17 | Arg(0) | 0:r2158_3 | | ir.cpp:2159:11:2159:11 | Address | &:r2159_1 | | ir.cpp:2159:11:2159:11 | Address | &:r2159_1 | @@ -10549,7 +10779,17 @@ | ir.cpp:2163:5:2163:5 | Address | &:r2163_22 | | ir.cpp:2163:21:2163:22 | Address | &:r2163_1 | | ir.cpp:2163:21:2163:22 | Address | &:r2163_1 | +| ir.cpp:2163:21:2163:22 | Address | &:r2163_57 | +| ir.cpp:2163:21:2163:22 | Address | &:r2163_57 | | ir.cpp:2163:21:2163:22 | Arg(this) | this:r2163_1 | +| ir.cpp:2163:21:2163:22 | Arg(this) | this:r2163_57 | +| ir.cpp:2163:21:2163:22 | CallTarget | func:r2163_58 | +| ir.cpp:2163:21:2163:22 | ChiPartial | partial:m2163_60 | +| ir.cpp:2163:21:2163:22 | ChiPartial | partial:m2163_63 | +| ir.cpp:2163:21:2163:22 | ChiTotal | total:m2163_9 | +| ir.cpp:2163:21:2163:22 | ChiTotal | total:m2163_54 | +| ir.cpp:2163:21:2163:22 | SideEffect | m2163_9 | +| ir.cpp:2163:21:2163:22 | SideEffect | ~m2163_54 | | ir.cpp:2163:24:2163:24 | Arg(0) | 0:r2163_4 | | ir.cpp:2163:24:2163:25 | CallTarget | func:r2163_3 | | ir.cpp:2163:24:2163:25 | ChiPartial | partial:m2163_6 | @@ -10637,56 +10877,66 @@ | ir.cpp:2168:40:2168:41 | ChiTotal | total:m2168_2 | | ir.cpp:2168:40:2168:41 | SideEffect | ~m2163_38 | | ir.cpp:2168:64:2168:64 | Address | &:r2168_44 | +| ir.cpp:2168:64:2168:64 | Address | &:r2168_52 | +| ir.cpp:2168:64:2168:64 | Address | &:r2168_52 | +| ir.cpp:2168:64:2168:64 | Arg(this) | this:r2168_52 | +| ir.cpp:2168:64:2168:64 | CallTarget | func:r2168_53 | +| ir.cpp:2168:64:2168:64 | ChiPartial | partial:m2168_55 | +| ir.cpp:2168:64:2168:64 | ChiPartial | partial:m2168_58 | +| ir.cpp:2168:64:2168:64 | ChiTotal | total:m2168_51 | +| ir.cpp:2168:64:2168:64 | ChiTotal | total:m2171_13 | +| ir.cpp:2168:64:2168:64 | SideEffect | m2168_51 | +| ir.cpp:2168:64:2168:64 | SideEffect | ~m2171_13 | | ir.cpp:2168:68:2168:68 | Address | &:r2168_19 | | ir.cpp:2168:68:2168:68 | Address | &:r2168_27 | | ir.cpp:2168:68:2168:68 | Address | &:r2168_38 | | ir.cpp:2168:68:2168:68 | Address | &:r2168_47 | -| ir.cpp:2168:68:2168:68 | Address | &:r2168_52 | -| ir.cpp:2168:68:2168:68 | Address | &:r2168_52 | +| ir.cpp:2168:68:2168:68 | Address | &:r2168_60 | +| ir.cpp:2168:68:2168:68 | Address | &:r2168_60 | | ir.cpp:2168:68:2168:68 | Arg(0) | 0:r2168_39 | | ir.cpp:2168:68:2168:68 | Arg(this) | this:r0_32 | | ir.cpp:2168:68:2168:68 | Arg(this) | this:r0_35 | | ir.cpp:2168:68:2168:68 | Arg(this) | this:r0_37 | | ir.cpp:2168:68:2168:68 | Arg(this) | this:r0_39 | -| ir.cpp:2168:68:2168:68 | Arg(this) | this:r2168_52 | +| ir.cpp:2168:68:2168:68 | Arg(this) | this:r2168_60 | | ir.cpp:2168:68:2168:68 | CallTarget | func:r2168_21 | | ir.cpp:2168:68:2168:68 | CallTarget | func:r2168_29 | | ir.cpp:2168:68:2168:68 | CallTarget | func:r2168_37 | | ir.cpp:2168:68:2168:68 | CallTarget | func:r2168_46 | -| ir.cpp:2168:68:2168:68 | CallTarget | func:r2168_53 | +| ir.cpp:2168:68:2168:68 | CallTarget | func:r2168_61 | | ir.cpp:2168:68:2168:68 | ChiPartial | partial:m2168_23 | | ir.cpp:2168:68:2168:68 | ChiPartial | partial:m2168_31 | | ir.cpp:2168:68:2168:68 | ChiPartial | partial:m2168_41 | | ir.cpp:2168:68:2168:68 | ChiPartial | partial:m2168_48 | -| ir.cpp:2168:68:2168:68 | ChiPartial | partial:m2168_55 | -| ir.cpp:2168:68:2168:68 | ChiPartial | partial:m2168_58 | +| ir.cpp:2168:68:2168:68 | ChiPartial | partial:m2168_63 | +| ir.cpp:2168:68:2168:68 | ChiPartial | partial:m2168_66 | | ir.cpp:2168:68:2168:68 | ChiTotal | total:m2168_11 | | ir.cpp:2168:68:2168:68 | ChiTotal | total:m2168_24 | | ir.cpp:2168:68:2168:68 | ChiTotal | total:m2168_34 | | ir.cpp:2168:68:2168:68 | ChiTotal | total:m2168_35 | | ir.cpp:2168:68:2168:68 | ChiTotal | total:m2168_42 | -| ir.cpp:2168:68:2168:68 | ChiTotal | total:m2170_6 | +| ir.cpp:2168:68:2168:68 | ChiTotal | total:m2168_56 | | ir.cpp:2168:68:2168:68 | Condition | r2168_40 | | ir.cpp:2168:68:2168:68 | Load | m2168_17 | | ir.cpp:2168:68:2168:68 | Load | m2168_17 | | ir.cpp:2168:68:2168:68 | Load | m2168_33 | | ir.cpp:2168:68:2168:68 | Phi | from 20:m2168_25 | | ir.cpp:2168:68:2168:68 | Phi | from 20:~m2168_32 | -| ir.cpp:2168:68:2168:68 | Phi | from 22:m2168_59 | -| ir.cpp:2168:68:2168:68 | Phi | from 22:~m2168_56 | +| ir.cpp:2168:68:2168:68 | Phi | from 22:m2168_67 | +| ir.cpp:2168:68:2168:68 | Phi | from 22:~m2168_64 | | ir.cpp:2168:68:2168:68 | SideEffect | m2168_34 | | ir.cpp:2168:68:2168:68 | SideEffect | ~m2168_11 | | ir.cpp:2168:68:2168:68 | SideEffect | ~m2168_24 | | ir.cpp:2168:68:2168:68 | SideEffect | ~m2168_35 | | ir.cpp:2168:68:2168:68 | SideEffect | ~m2168_42 | -| ir.cpp:2168:68:2168:68 | SideEffect | ~m2170_6 | +| ir.cpp:2168:68:2168:68 | SideEffect | ~m2168_56 | | ir.cpp:2168:68:2168:68 | StoreValue | r2168_22 | | ir.cpp:2168:68:2168:68 | StoreValue | r2168_30 | | ir.cpp:2168:68:2168:68 | Unary | r2168_20 | | ir.cpp:2168:68:2168:68 | Unary | r2168_28 | | ir.cpp:2168:68:2168:68 | Unary | r2168_36 | | ir.cpp:2168:68:2168:68 | Unary | r2168_45 | -| ir.cpp:2168:68:2168:68 | Unary | r2168_54 | +| ir.cpp:2168:68:2168:68 | Unary | r2168_62 | | ir.cpp:2168:68:2168:69 | StoreValue | r2168_16 | | ir.cpp:2168:68:2168:69 | Unary | r2168_15 | | ir.cpp:2168:68:2168:70 | Load | ~m2168_49 | @@ -10709,9 +10959,59 @@ | ir.cpp:2170:27:2170:28 | ChiTotal | total:m2169_6 | | ir.cpp:2170:27:2170:28 | ChiTotal | total:m2170_2 | | ir.cpp:2170:27:2170:28 | SideEffect | ~m2169_6 | +| ir.cpp:2171:5:2171:5 | Address | &:r2171_1 | +| ir.cpp:2171:5:2171:5 | Address | &:r2171_1 | +| ir.cpp:2171:5:2171:5 | Address | &:r2171_9 | +| ir.cpp:2171:5:2171:5 | Address | &:r2171_9 | +| ir.cpp:2171:5:2171:5 | Arg(this) | this:r2171_1 | +| ir.cpp:2171:5:2171:5 | Arg(this) | this:r2171_9 | +| ir.cpp:2171:5:2171:5 | CallTarget | func:r2171_2 | +| ir.cpp:2171:5:2171:5 | CallTarget | func:r2171_10 | +| ir.cpp:2171:5:2171:5 | ChiPartial | partial:m2171_4 | +| ir.cpp:2171:5:2171:5 | ChiPartial | partial:m2171_7 | +| ir.cpp:2171:5:2171:5 | ChiPartial | partial:m2171_12 | +| ir.cpp:2171:5:2171:5 | ChiPartial | partial:m2171_15 | +| ir.cpp:2171:5:2171:5 | ChiTotal | total:m2169_8 | +| ir.cpp:2171:5:2171:5 | ChiTotal | total:m2170_6 | +| ir.cpp:2171:5:2171:5 | ChiTotal | total:m2170_8 | +| ir.cpp:2171:5:2171:5 | ChiTotal | total:m2171_5 | +| ir.cpp:2171:5:2171:5 | SideEffect | m2169_8 | +| ir.cpp:2171:5:2171:5 | SideEffect | m2170_8 | +| ir.cpp:2171:5:2171:5 | SideEffect | ~m2170_6 | +| ir.cpp:2171:5:2171:5 | SideEffect | ~m2171_5 | +| ir.cpp:2172:1:2172:1 | Address | &:r2172_1 | +| ir.cpp:2172:1:2172:1 | Address | &:r2172_1 | +| ir.cpp:2172:1:2172:1 | Address | &:r2172_9 | +| ir.cpp:2172:1:2172:1 | Address | &:r2172_9 | +| ir.cpp:2172:1:2172:1 | Address | &:r2172_18 | +| ir.cpp:2172:1:2172:1 | Address | &:r2172_18 | +| ir.cpp:2172:1:2172:1 | Arg(this) | this:r2172_1 | +| ir.cpp:2172:1:2172:1 | Arg(this) | this:r2172_9 | +| ir.cpp:2172:1:2172:1 | Arg(this) | this:r2172_18 | +| ir.cpp:2172:1:2172:1 | CallTarget | func:r2172_2 | +| ir.cpp:2172:1:2172:1 | CallTarget | func:r2172_10 | +| ir.cpp:2172:1:2172:1 | CallTarget | func:r2172_19 | +| ir.cpp:2172:1:2172:1 | ChiPartial | partial:m2172_4 | +| ir.cpp:2172:1:2172:1 | ChiPartial | partial:m2172_7 | +| ir.cpp:2172:1:2172:1 | ChiPartial | partial:m2172_12 | +| ir.cpp:2172:1:2172:1 | ChiPartial | partial:m2172_15 | +| ir.cpp:2172:1:2172:1 | ChiPartial | partial:m2172_21 | +| ir.cpp:2172:1:2172:1 | ChiPartial | partial:m2172_24 | +| ir.cpp:2172:1:2172:1 | ChiTotal | total:m2153_8 | +| ir.cpp:2172:1:2172:1 | ChiTotal | total:m2153_8 | +| ir.cpp:2172:1:2172:1 | ChiTotal | total:m2153_8 | +| ir.cpp:2172:1:2172:1 | ChiTotal | total:m2157_64 | +| ir.cpp:2172:1:2172:1 | ChiTotal | total:m2163_61 | +| ir.cpp:2172:1:2172:1 | ChiTotal | total:m2168_42 | +| ir.cpp:2172:1:2172:1 | SideEffect | m2153_8 | +| ir.cpp:2172:1:2172:1 | SideEffect | m2153_8 | +| ir.cpp:2172:1:2172:1 | SideEffect | m2153_8 | +| ir.cpp:2172:1:2172:1 | SideEffect | ~m2157_64 | +| ir.cpp:2172:1:2172:1 | SideEffect | ~m2163_61 | +| ir.cpp:2172:1:2172:1 | SideEffect | ~m2168_42 | | ir.cpp:2174:6:2174:38 | ChiPartial | partial:m2174_3 | | ir.cpp:2174:6:2174:38 | ChiTotal | total:m2174_2 | -| ir.cpp:2174:6:2174:38 | SideEffect | ~m2177_1 | +| ir.cpp:2174:6:2174:38 | SideEffect | ~m2177_7 | | ir.cpp:2175:25:2175:25 | Address | &:r2175_1 | | ir.cpp:2175:25:2175:25 | Address | &:r2175_1 | | ir.cpp:2175:25:2175:25 | Arg(this) | this:r2175_1 | @@ -10730,11 +11030,21 @@ | ir.cpp:2176:32:2176:32 | Condition | r2176_2 | | ir.cpp:2176:32:2176:32 | Load | ~m2175_6 | | ir.cpp:2176:32:2176:32 | StoreValue | r2176_5 | +| ir.cpp:2177:1:2177:1 | Address | &:r2177_3 | +| ir.cpp:2177:1:2177:1 | Address | &:r2177_3 | +| ir.cpp:2177:1:2177:1 | Arg(this) | this:r2177_3 | +| ir.cpp:2177:1:2177:1 | CallTarget | func:r2177_4 | +| ir.cpp:2177:1:2177:1 | ChiPartial | partial:m2177_6 | +| ir.cpp:2177:1:2177:1 | ChiPartial | partial:m2177_9 | +| ir.cpp:2177:1:2177:1 | ChiTotal | total:m2175_8 | +| ir.cpp:2177:1:2177:1 | ChiTotal | total:m2177_1 | | ir.cpp:2177:1:2177:1 | Phi | from 0:~m2175_6 | | ir.cpp:2177:1:2177:1 | Phi | from 1:~m2176_7 | +| ir.cpp:2177:1:2177:1 | SideEffect | m2175_8 | +| ir.cpp:2177:1:2177:1 | SideEffect | ~m2177_1 | | ir.cpp:2179:6:2179:38 | ChiPartial | partial:m2179_3 | | ir.cpp:2179:6:2179:38 | ChiTotal | total:m2179_2 | -| ir.cpp:2179:6:2179:38 | SideEffect | ~m2181_7 | +| ir.cpp:2179:6:2179:38 | SideEffect | ~m2182_6 | | ir.cpp:2180:32:2180:32 | Address | &:r2180_1 | | ir.cpp:2180:32:2180:32 | Address | &:r2180_1 | | ir.cpp:2180:32:2180:32 | Address | &:r2180_4 | @@ -10755,9 +11065,19 @@ | ir.cpp:2181:25:2181:25 | Phi | from 0:~m2179_4 | | ir.cpp:2181:25:2181:25 | Phi | from 1:~m2180_7 | | ir.cpp:2181:25:2181:25 | SideEffect | ~m2181_1 | +| ir.cpp:2182:1:2182:1 | Address | &:r2182_2 | +| ir.cpp:2182:1:2182:1 | Address | &:r2182_2 | +| ir.cpp:2182:1:2182:1 | Arg(this) | this:r2182_2 | +| ir.cpp:2182:1:2182:1 | CallTarget | func:r2182_3 | +| ir.cpp:2182:1:2182:1 | ChiPartial | partial:m2182_5 | +| ir.cpp:2182:1:2182:1 | ChiPartial | partial:m2182_8 | +| ir.cpp:2182:1:2182:1 | ChiTotal | total:m2181_7 | +| ir.cpp:2182:1:2182:1 | ChiTotal | total:m2181_9 | +| ir.cpp:2182:1:2182:1 | SideEffect | m2181_9 | +| ir.cpp:2182:1:2182:1 | SideEffect | ~m2181_7 | | ir.cpp:2184:6:2184:38 | ChiPartial | partial:m2184_3 | | ir.cpp:2184:6:2184:38 | ChiTotal | total:m2184_2 | -| ir.cpp:2184:6:2184:38 | SideEffect | ~m2188_1 | +| ir.cpp:2184:6:2184:38 | SideEffect | ~m2188_15 | | ir.cpp:2185:25:2185:25 | Address | &:r2185_1 | | ir.cpp:2185:25:2185:25 | Address | &:r2185_1 | | ir.cpp:2185:25:2185:25 | Arg(this) | this:r2185_1 | @@ -10785,8 +11105,28 @@ | ir.cpp:2187:32:2187:32 | Condition | r2187_2 | | ir.cpp:2187:32:2187:32 | Load | ~m2186_6 | | ir.cpp:2187:32:2187:32 | StoreValue | r2187_5 | +| ir.cpp:2188:1:2188:1 | Address | &:r2188_3 | +| ir.cpp:2188:1:2188:1 | Address | &:r2188_3 | +| ir.cpp:2188:1:2188:1 | Address | &:r2188_11 | +| ir.cpp:2188:1:2188:1 | Address | &:r2188_11 | +| ir.cpp:2188:1:2188:1 | Arg(this) | this:r2188_3 | +| ir.cpp:2188:1:2188:1 | Arg(this) | this:r2188_11 | +| ir.cpp:2188:1:2188:1 | CallTarget | func:r2188_4 | +| ir.cpp:2188:1:2188:1 | CallTarget | func:r2188_12 | +| ir.cpp:2188:1:2188:1 | ChiPartial | partial:m2188_6 | +| ir.cpp:2188:1:2188:1 | ChiPartial | partial:m2188_9 | +| ir.cpp:2188:1:2188:1 | ChiPartial | partial:m2188_14 | +| ir.cpp:2188:1:2188:1 | ChiPartial | partial:m2188_17 | +| ir.cpp:2188:1:2188:1 | ChiTotal | total:m2185_8 | +| ir.cpp:2188:1:2188:1 | ChiTotal | total:m2186_8 | +| ir.cpp:2188:1:2188:1 | ChiTotal | total:m2188_1 | +| ir.cpp:2188:1:2188:1 | ChiTotal | total:m2188_7 | | ir.cpp:2188:1:2188:1 | Phi | from 0:~m2186_6 | | ir.cpp:2188:1:2188:1 | Phi | from 1:~m2187_7 | +| ir.cpp:2188:1:2188:1 | SideEffect | m2185_8 | +| ir.cpp:2188:1:2188:1 | SideEffect | m2186_8 | +| ir.cpp:2188:1:2188:1 | SideEffect | ~m2188_1 | +| ir.cpp:2188:1:2188:1 | SideEffect | ~m2188_7 | | ir.cpp:2190:28:2190:55 | Address | &:r2190_3 | | ir.cpp:2190:28:2190:55 | Arg(this) | this:r2190_3 | | ir.cpp:2190:28:2190:55 | CallTarget | func:r2190_4 | @@ -10796,6 +11136,906 @@ | ir.cpp:2190:28:2190:55 | ChiTotal | total:m2190_7 | | ir.cpp:2190:28:2190:55 | SideEffect | ~m2190_2 | | ir.cpp:2190:28:2190:55 | SideEffect | ~m2190_9 | +| ir.cpp:2194:8:2194:8 | Address | &:r2194_16 | +| ir.cpp:2194:8:2194:8 | Address | &:r2194_16 | +| ir.cpp:2194:8:2194:8 | ChiPartial | partial:m2194_3 | +| ir.cpp:2194:8:2194:8 | ChiPartial | partial:m2194_3 | +| ir.cpp:2194:8:2194:8 | ChiTotal | total:m2194_2 | +| ir.cpp:2194:8:2194:8 | ChiTotal | total:m2194_2 | +| ir.cpp:2194:8:2194:8 | Load | m2194_14 | +| ir.cpp:2194:8:2194:8 | Load | m2194_14 | +| ir.cpp:2194:8:2194:8 | SideEffect | m2194_3 | +| ir.cpp:2194:8:2194:8 | SideEffect | m2194_3 | +| ir.cpp:2194:15:2194:15 | Address | &:r2194_5 | +| ir.cpp:2194:15:2194:15 | Address | &:r2194_5 | +| ir.cpp:2194:15:2194:15 | Address | &:r2194_5 | +| ir.cpp:2194:15:2194:15 | Address | &:r2194_5 | +| ir.cpp:2194:15:2194:15 | Address | &:r2194_7 | +| ir.cpp:2194:15:2194:15 | Address | &:r2194_7 | +| ir.cpp:2194:15:2194:15 | Address | &:r2194_7 | +| ir.cpp:2194:15:2194:15 | Address | &:r2194_7 | +| ir.cpp:2194:15:2194:15 | Load | m2194_6 | +| ir.cpp:2194:15:2194:15 | Load | m2194_6 | +| ir.cpp:2194:15:2194:15 | SideEffect | m2194_8 | +| ir.cpp:2194:15:2194:15 | SideEffect | m2194_8 | +| ir.cpp:2194:20:2194:28 | Address | &:r2194_9 | +| ir.cpp:2194:20:2194:28 | Address | &:r2194_9 | +| ir.cpp:2194:27:2194:27 | Address | &:r2194_10 | +| ir.cpp:2194:27:2194:27 | Address | &:r2194_10 | +| ir.cpp:2194:27:2194:27 | Load | m2194_6 | +| ir.cpp:2194:27:2194:27 | Load | m2194_6 | +| ir.cpp:2194:27:2194:27 | StoreValue | r2194_13 | +| ir.cpp:2194:27:2194:27 | StoreValue | r2194_13 | +| ir.cpp:2194:27:2194:27 | Unary | r2194_11 | +| ir.cpp:2194:27:2194:27 | Unary | r2194_11 | +| ir.cpp:2194:27:2194:27 | Unary | r2194_12 | +| ir.cpp:2194:27:2194:27 | Unary | r2194_12 | +| ir.cpp:2197:10:2197:10 | ChiPartial | partial:m2197_3 | +| ir.cpp:2197:10:2197:10 | ChiPartial | partial:m2197_3 | +| ir.cpp:2197:10:2197:10 | ChiTotal | total:m2197_2 | +| ir.cpp:2197:10:2197:10 | ChiTotal | total:m2197_2 | +| ir.cpp:2197:10:2197:10 | SideEffect | ~m2198_8 | +| ir.cpp:2197:10:2197:10 | SideEffect | ~m2198_16 | +| ir.cpp:2197:29:2197:29 | Address | &:r2197_5 | +| ir.cpp:2197:29:2197:29 | Address | &:r2197_5 | +| ir.cpp:2197:29:2197:29 | Address | &:r2197_5 | +| ir.cpp:2197:29:2197:29 | Address | &:r2197_5 | +| ir.cpp:2197:29:2197:29 | Address | &:r2197_7 | +| ir.cpp:2197:29:2197:29 | Address | &:r2197_7 | +| ir.cpp:2197:29:2197:29 | Address | &:r2197_7 | +| ir.cpp:2197:29:2197:29 | Address | &:r2197_7 | +| ir.cpp:2197:29:2197:29 | Load | m2197_6 | +| ir.cpp:2197:29:2197:29 | Load | m2197_6 | +| ir.cpp:2197:29:2197:29 | SideEffect | m2198_11 | +| ir.cpp:2197:29:2197:29 | SideEffect | m2198_19 | +| ir.cpp:2198:9:2198:11 | CallTarget | func:r2198_1 | +| ir.cpp:2198:9:2198:11 | CallTarget | func:r2198_1 | +| ir.cpp:2198:9:2198:11 | ChiPartial | partial:m2198_7 | +| ir.cpp:2198:9:2198:11 | ChiPartial | partial:m2198_7 | +| ir.cpp:2198:9:2198:11 | ChiTotal | total:m2197_4 | +| ir.cpp:2198:9:2198:11 | ChiTotal | total:m2197_4 | +| ir.cpp:2198:9:2198:11 | SideEffect | ~m2197_4 | +| ir.cpp:2198:9:2198:11 | SideEffect | ~m2197_4 | +| ir.cpp:2198:9:2198:11 | Unary | r2198_6 | +| ir.cpp:2198:9:2198:11 | Unary | r2198_6 | +| ir.cpp:2198:12:2198:15 | Address | &:r2198_12 | +| ir.cpp:2198:12:2198:15 | Address | &:r2198_12 | +| ir.cpp:2198:12:2198:15 | ChiPartial | partial:m2198_18 | +| ir.cpp:2198:12:2198:15 | ChiTotal | total:m2198_11 | +| ir.cpp:2198:12:2198:15 | SideEffect | ~m2198_11 | +| ir.cpp:2198:13:2198:13 | Address | &:r2198_2 | +| ir.cpp:2198:13:2198:13 | Address | &:r2198_2 | +| ir.cpp:2198:13:2198:13 | Address | &:r2198_5 | +| ir.cpp:2198:13:2198:13 | Address | &:r2198_5 | +| ir.cpp:2198:13:2198:13 | Address | &:r2198_5 | +| ir.cpp:2198:13:2198:13 | Address | &:r2198_5 | +| ir.cpp:2198:13:2198:13 | Arg(0) | 0:r2198_5 | +| ir.cpp:2198:13:2198:13 | Arg(0) | 0:r2198_5 | +| ir.cpp:2198:13:2198:13 | ChiPartial | partial:m2198_10 | +| ir.cpp:2198:13:2198:13 | ChiPartial | partial:m2198_10 | +| ir.cpp:2198:13:2198:13 | ChiTotal | total:m2197_8 | +| ir.cpp:2198:13:2198:13 | ChiTotal | total:m2197_8 | +| ir.cpp:2198:13:2198:13 | Load | m2197_6 | +| ir.cpp:2198:13:2198:13 | Load | m2197_6 | +| ir.cpp:2198:13:2198:13 | SideEffect | ~m2197_8 | +| ir.cpp:2198:13:2198:13 | SideEffect | ~m2197_8 | +| ir.cpp:2198:13:2198:13 | Unary | r2198_3 | +| ir.cpp:2198:13:2198:13 | Unary | r2198_3 | +| ir.cpp:2198:13:2198:13 | Unary | r2198_4 | +| ir.cpp:2198:13:2198:13 | Unary | r2198_4 | +| ir.cpp:2198:16:2198:17 | CallTarget | func:r2198_13 | +| ir.cpp:2198:16:2198:17 | ChiPartial | partial:m2198_15 | +| ir.cpp:2198:16:2198:17 | ChiTotal | total:m2198_8 | +| ir.cpp:2198:16:2198:17 | SideEffect | ~m2198_8 | +| ir.cpp:2201:10:2201:36 | ChiPartial | partial:m2201_3 | +| ir.cpp:2201:10:2201:36 | ChiTotal | total:m2201_2 | +| ir.cpp:2201:10:2201:36 | SideEffect | ~m2204_6 | +| ir.cpp:2202:29:2202:29 | Address | &:r2202_1 | +| ir.cpp:2202:29:2202:29 | Address | &:r2202_1 | +| ir.cpp:2202:29:2202:29 | Arg(this) | this:r2202_1 | +| ir.cpp:2202:29:2202:29 | CallTarget | func:r2202_3 | +| ir.cpp:2202:29:2202:29 | ChiPartial | partial:m2202_5 | +| ir.cpp:2202:29:2202:29 | ChiPartial | partial:m2202_7 | +| ir.cpp:2202:29:2202:29 | ChiTotal | total:m2201_4 | +| ir.cpp:2202:29:2202:29 | ChiTotal | total:m2202_2 | +| ir.cpp:2202:29:2202:29 | SideEffect | ~m2201_4 | +| ir.cpp:2203:9:2203:23 | CallTarget | func:r2203_1 | +| ir.cpp:2203:9:2203:23 | ChiPartial | partial:m2203_5 | +| ir.cpp:2203:9:2203:23 | ChiTotal | total:m2202_6 | +| ir.cpp:2203:9:2203:23 | SideEffect | ~m2202_6 | +| ir.cpp:2203:25:2203:25 | Address | &:r2203_3 | +| ir.cpp:2203:25:2203:25 | Address | &:r2203_3 | +| ir.cpp:2203:25:2203:25 | Arg(0) | 0:r2203_3 | +| ir.cpp:2203:25:2203:25 | ChiPartial | partial:m2203_8 | +| ir.cpp:2203:25:2203:25 | ChiTotal | total:m2202_8 | +| ir.cpp:2203:25:2203:25 | SideEffect | ~m2202_8 | +| ir.cpp:2203:25:2203:25 | Unary | r2203_2 | +| ir.cpp:2204:5:2204:5 | Address | &:r2204_2 | +| ir.cpp:2204:5:2204:5 | Address | &:r2204_2 | +| ir.cpp:2204:5:2204:5 | Arg(this) | this:r2204_2 | +| ir.cpp:2204:5:2204:5 | CallTarget | func:r2204_3 | +| ir.cpp:2204:5:2204:5 | ChiPartial | partial:m2204_5 | +| ir.cpp:2204:5:2204:5 | ChiPartial | partial:m2204_8 | +| ir.cpp:2204:5:2204:5 | ChiTotal | total:m2203_6 | +| ir.cpp:2204:5:2204:5 | ChiTotal | total:m2203_9 | +| ir.cpp:2204:5:2204:5 | SideEffect | m2203_9 | +| ir.cpp:2204:5:2204:5 | SideEffect | ~m2203_6 | +| ir.cpp:2206:10:2206:32 | ChiPartial | partial:m2206_3 | +| ir.cpp:2206:10:2206:32 | ChiTotal | total:m2206_2 | +| ir.cpp:2206:10:2206:32 | SideEffect | ~m2208_6 | +| ir.cpp:2207:13:2207:13 | Address | &:r2207_1 | +| ir.cpp:2208:9:2208:23 | CallTarget | func:r2208_1 | +| ir.cpp:2208:9:2208:23 | ChiPartial | partial:m2208_5 | +| ir.cpp:2208:9:2208:23 | ChiTotal | total:m2206_4 | +| ir.cpp:2208:9:2208:23 | SideEffect | ~m2206_4 | +| ir.cpp:2208:25:2208:25 | Address | &:r2208_3 | +| ir.cpp:2208:25:2208:25 | Address | &:r2208_3 | +| ir.cpp:2208:25:2208:25 | Arg(0) | 0:r2208_3 | +| ir.cpp:2208:25:2208:25 | ChiPartial | partial:m2208_8 | +| ir.cpp:2208:25:2208:25 | ChiTotal | total:m2207_2 | +| ir.cpp:2208:25:2208:25 | SideEffect | ~m2207_2 | +| ir.cpp:2208:25:2208:25 | Unary | r2208_2 | +| ir.cpp:2212:6:2212:24 | ChiPartial | partial:m2212_3 | +| ir.cpp:2212:6:2212:24 | ChiTotal | total:m2212_2 | +| ir.cpp:2212:6:2212:24 | Phi | from 2:~m2212_10 | +| ir.cpp:2212:6:2212:24 | Phi | from 6:~m2221_8 | +| ir.cpp:2212:6:2212:24 | Phi | from 9:~m2214_6 | +| ir.cpp:2212:6:2212:24 | Phi | from 10:~m2228_1 | +| ir.cpp:2212:6:2212:24 | SideEffect | ~m2212_7 | +| ir.cpp:2212:31:2212:31 | Address | &:r2212_5 | +| ir.cpp:2214:12:2214:12 | Address | &:r2214_1 | +| ir.cpp:2214:12:2214:12 | Address | &:r2214_1 | +| ir.cpp:2214:12:2214:12 | Arg(this) | this:r2214_1 | +| ir.cpp:2214:12:2214:12 | CallTarget | func:r2214_3 | +| ir.cpp:2214:12:2214:12 | ChiPartial | partial:m2214_5 | +| ir.cpp:2214:12:2214:12 | ChiPartial | partial:m2214_7 | +| ir.cpp:2214:12:2214:12 | ChiTotal | total:m2212_4 | +| ir.cpp:2214:12:2214:12 | ChiTotal | total:m2214_2 | +| ir.cpp:2214:12:2214:12 | SideEffect | ~m2212_4 | +| ir.cpp:2215:9:2215:9 | Address | &:r2215_1 | +| ir.cpp:2215:9:2215:9 | Condition | r2215_2 | +| ir.cpp:2215:9:2215:9 | Load | m2212_6 | +| ir.cpp:2216:7:2216:28 | Address | &:r2216_1 | +| ir.cpp:2216:7:2216:28 | Address | &:r2216_1 | +| ir.cpp:2216:7:2216:28 | Load | m2216_4 | +| ir.cpp:2216:13:2216:28 | StoreValue | r2216_3 | +| ir.cpp:2216:13:2216:28 | Unary | r2216_2 | +| ir.cpp:2218:12:2218:13 | Address | &:r2218_1 | +| ir.cpp:2218:12:2218:13 | Address | &:r2218_1 | +| ir.cpp:2218:12:2218:13 | Arg(this) | this:r2218_1 | +| ir.cpp:2218:12:2218:13 | CallTarget | func:r2218_3 | +| ir.cpp:2218:12:2218:13 | ChiPartial | partial:m2218_5 | +| ir.cpp:2218:12:2218:13 | ChiPartial | partial:m2218_7 | +| ir.cpp:2218:12:2218:13 | ChiTotal | total:m2214_6 | +| ir.cpp:2218:12:2218:13 | ChiTotal | total:m2218_2 | +| ir.cpp:2218:12:2218:13 | SideEffect | ~m2214_6 | +| ir.cpp:2219:3:2219:3 | Address | &:r2219_1 | +| ir.cpp:2219:3:2219:3 | Address | &:r2219_1 | +| ir.cpp:2219:3:2219:3 | Address | &:r2219_9 | +| ir.cpp:2219:3:2219:3 | Address | &:r2219_9 | +| ir.cpp:2219:3:2219:3 | Arg(this) | this:r2219_1 | +| ir.cpp:2219:3:2219:3 | Arg(this) | this:r2219_9 | +| ir.cpp:2219:3:2219:3 | CallTarget | func:r2219_2 | +| ir.cpp:2219:3:2219:3 | CallTarget | func:r2219_10 | +| ir.cpp:2219:3:2219:3 | ChiPartial | partial:m2219_4 | +| ir.cpp:2219:3:2219:3 | ChiPartial | partial:m2219_7 | +| ir.cpp:2219:3:2219:3 | ChiPartial | partial:m2219_12 | +| ir.cpp:2219:3:2219:3 | ChiPartial | partial:m2219_15 | +| ir.cpp:2219:3:2219:3 | ChiTotal | total:m2214_8 | +| ir.cpp:2219:3:2219:3 | ChiTotal | total:m2218_6 | +| ir.cpp:2219:3:2219:3 | ChiTotal | total:m2218_8 | +| ir.cpp:2219:3:2219:3 | ChiTotal | total:m2219_5 | +| ir.cpp:2219:3:2219:3 | SideEffect | m2214_8 | +| ir.cpp:2219:3:2219:3 | SideEffect | m2218_8 | +| ir.cpp:2219:3:2219:3 | SideEffect | ~m2218_6 | +| ir.cpp:2219:3:2219:3 | SideEffect | ~m2219_5 | +| ir.cpp:2220:22:2220:22 | Address | &:r2220_2 | +| ir.cpp:2220:22:2220:22 | Address | &:r2220_2 | +| ir.cpp:2220:22:2220:22 | Address | &:r2220_4 | +| ir.cpp:2220:22:2220:22 | Load | m2220_3 | +| ir.cpp:2221:5:2221:19 | Address | &:r2221_1 | +| ir.cpp:2221:5:2221:19 | Address | &:r2221_1 | +| ir.cpp:2221:5:2221:19 | Address | &:r2221_1 | +| ir.cpp:2221:5:2221:19 | Arg(this) | this:r2221_1 | +| ir.cpp:2221:5:2221:19 | CallTarget | func:r2221_3 | +| ir.cpp:2221:5:2221:19 | ChiPartial | partial:m2221_7 | +| ir.cpp:2221:5:2221:19 | ChiPartial | partial:m2221_10 | +| ir.cpp:2221:5:2221:19 | ChiTotal | total:m2214_6 | +| ir.cpp:2221:5:2221:19 | ChiTotal | total:m2221_2 | +| ir.cpp:2221:5:2221:19 | Load | m2221_11 | +| ir.cpp:2221:5:2221:19 | SideEffect | ~m2214_6 | +| ir.cpp:2221:18:2221:18 | Address | &:r2221_4 | +| ir.cpp:2221:18:2221:18 | Address | &:r2221_5 | +| ir.cpp:2221:18:2221:18 | Arg(0) | 0:r2221_5 | +| ir.cpp:2221:18:2221:18 | Load | m2220_3 | +| ir.cpp:2221:18:2221:18 | SideEffect | ~m2220_5 | +| ir.cpp:2223:24:2223:24 | Address | &:r2223_2 | +| ir.cpp:2223:24:2223:24 | Address | &:r2223_2 | +| ir.cpp:2223:24:2223:24 | Address | &:r2223_4 | +| ir.cpp:2223:24:2223:24 | Load | m2223_3 | +| ir.cpp:2228:1:2228:1 | Phi | from 4:~m2219_13 | +| ir.cpp:2228:1:2228:1 | Phi | from 8:~m2214_6 | +| ir.cpp:2230:6:2230:18 | ChiPartial | partial:m2230_3 | +| ir.cpp:2230:6:2230:18 | ChiTotal | total:m2230_2 | +| ir.cpp:2230:6:2230:18 | SideEffect | ~m2238_14 | +| ir.cpp:2230:25:2230:25 | Address | &:r2230_5 | +| ir.cpp:2231:12:2231:13 | Address | &:r2231_1 | +| ir.cpp:2231:12:2231:13 | Address | &:r2231_1 | +| ir.cpp:2231:12:2231:13 | Arg(this) | this:r2231_1 | +| ir.cpp:2231:12:2231:13 | CallTarget | func:r2231_3 | +| ir.cpp:2231:12:2231:13 | ChiPartial | partial:m2231_5 | +| ir.cpp:2231:12:2231:13 | ChiPartial | partial:m2231_7 | +| ir.cpp:2231:12:2231:13 | ChiTotal | total:m2230_4 | +| ir.cpp:2231:12:2231:13 | ChiTotal | total:m2231_2 | +| ir.cpp:2231:12:2231:13 | SideEffect | ~m2230_4 | +| ir.cpp:2232:8:2232:8 | Address | &:r2232_1 | +| ir.cpp:2232:8:2232:8 | Condition | r2232_2 | +| ir.cpp:2232:8:2232:8 | Load | m2230_6 | +| ir.cpp:2233:16:2233:17 | Address | &:r2233_1 | +| ir.cpp:2233:16:2233:17 | Address | &:r2233_1 | +| ir.cpp:2233:16:2233:17 | Arg(this) | this:r2233_1 | +| ir.cpp:2233:16:2233:17 | CallTarget | func:r2233_3 | +| ir.cpp:2233:16:2233:17 | ChiPartial | partial:m2233_5 | +| ir.cpp:2233:16:2233:17 | ChiPartial | partial:m2233_7 | +| ir.cpp:2233:16:2233:17 | ChiTotal | total:m2231_6 | +| ir.cpp:2233:16:2233:17 | ChiTotal | total:m2233_2 | +| ir.cpp:2233:16:2233:17 | SideEffect | ~m2231_6 | +| ir.cpp:2234:5:2234:5 | Address | &:r2234_1 | +| ir.cpp:2234:5:2234:5 | Address | &:r2234_1 | +| ir.cpp:2234:5:2234:5 | Arg(this) | this:r2234_1 | +| ir.cpp:2234:5:2234:5 | CallTarget | func:r2234_2 | +| ir.cpp:2234:5:2234:5 | ChiPartial | partial:m2234_4 | +| ir.cpp:2234:5:2234:5 | ChiPartial | partial:m2234_7 | +| ir.cpp:2234:5:2234:5 | ChiTotal | total:m2233_6 | +| ir.cpp:2234:5:2234:5 | ChiTotal | total:m2233_8 | +| ir.cpp:2234:5:2234:5 | SideEffect | m2233_8 | +| ir.cpp:2234:5:2234:5 | SideEffect | ~m2233_6 | +| ir.cpp:2235:16:2235:17 | Address | &:r2235_1 | +| ir.cpp:2235:16:2235:17 | Address | &:r2235_1 | +| ir.cpp:2235:16:2235:17 | Arg(this) | this:r2235_1 | +| ir.cpp:2235:16:2235:17 | CallTarget | func:r2235_3 | +| ir.cpp:2235:16:2235:17 | ChiPartial | partial:m2235_5 | +| ir.cpp:2235:16:2235:17 | ChiPartial | partial:m2235_7 | +| ir.cpp:2235:16:2235:17 | ChiTotal | total:m2231_6 | +| ir.cpp:2235:16:2235:17 | ChiTotal | total:m2235_2 | +| ir.cpp:2235:16:2235:17 | SideEffect | ~m2231_6 | +| ir.cpp:2236:5:2236:5 | Address | &:r2236_1 | +| ir.cpp:2236:5:2236:5 | Address | &:r2236_1 | +| ir.cpp:2236:5:2236:5 | Arg(this) | this:r2236_1 | +| ir.cpp:2236:5:2236:5 | CallTarget | func:r2236_2 | +| ir.cpp:2236:5:2236:5 | ChiPartial | partial:m2236_4 | +| ir.cpp:2236:5:2236:5 | ChiPartial | partial:m2236_7 | +| ir.cpp:2236:5:2236:5 | ChiTotal | total:m2235_6 | +| ir.cpp:2236:5:2236:5 | ChiTotal | total:m2235_8 | +| ir.cpp:2236:5:2236:5 | SideEffect | m2235_8 | +| ir.cpp:2236:5:2236:5 | SideEffect | ~m2235_6 | +| ir.cpp:2237:12:2237:13 | Address | &:r2237_2 | +| ir.cpp:2237:12:2237:13 | Address | &:r2237_2 | +| ir.cpp:2237:12:2237:13 | Arg(this) | this:r2237_2 | +| ir.cpp:2237:12:2237:13 | CallTarget | func:r2237_4 | +| ir.cpp:2237:12:2237:13 | ChiPartial | partial:m2237_6 | +| ir.cpp:2237:12:2237:13 | ChiPartial | partial:m2237_8 | +| ir.cpp:2237:12:2237:13 | ChiTotal | total:m2237_1 | +| ir.cpp:2237:12:2237:13 | ChiTotal | total:m2237_3 | +| ir.cpp:2237:12:2237:13 | Phi | from 1:~m2234_5 | +| ir.cpp:2237:12:2237:13 | Phi | from 2:~m2236_5 | +| ir.cpp:2237:12:2237:13 | SideEffect | ~m2237_1 | +| ir.cpp:2238:1:2238:1 | Address | &:r2238_2 | +| ir.cpp:2238:1:2238:1 | Address | &:r2238_2 | +| ir.cpp:2238:1:2238:1 | Address | &:r2238_10 | +| ir.cpp:2238:1:2238:1 | Address | &:r2238_10 | +| ir.cpp:2238:1:2238:1 | Arg(this) | this:r2238_2 | +| ir.cpp:2238:1:2238:1 | Arg(this) | this:r2238_10 | +| ir.cpp:2238:1:2238:1 | CallTarget | func:r2238_3 | +| ir.cpp:2238:1:2238:1 | CallTarget | func:r2238_11 | +| ir.cpp:2238:1:2238:1 | ChiPartial | partial:m2238_5 | +| ir.cpp:2238:1:2238:1 | ChiPartial | partial:m2238_8 | +| ir.cpp:2238:1:2238:1 | ChiPartial | partial:m2238_13 | +| ir.cpp:2238:1:2238:1 | ChiPartial | partial:m2238_16 | +| ir.cpp:2238:1:2238:1 | ChiTotal | total:m2231_8 | +| ir.cpp:2238:1:2238:1 | ChiTotal | total:m2237_7 | +| ir.cpp:2238:1:2238:1 | ChiTotal | total:m2237_9 | +| ir.cpp:2238:1:2238:1 | ChiTotal | total:m2238_6 | +| ir.cpp:2238:1:2238:1 | SideEffect | m2231_8 | +| ir.cpp:2238:1:2238:1 | SideEffect | m2237_9 | +| ir.cpp:2238:1:2238:1 | SideEffect | ~m2237_7 | +| ir.cpp:2238:1:2238:1 | SideEffect | ~m2238_6 | +| ir.cpp:2240:6:2240:19 | ChiPartial | partial:m2240_3 | +| ir.cpp:2240:6:2240:19 | ChiTotal | total:m2240_2 | +| ir.cpp:2240:6:2240:19 | SideEffect | ~m2250_54 | +| ir.cpp:2241:10:2241:10 | Address | &:r2241_1 | +| ir.cpp:2241:13:2241:16 | StoreValue | r2241_2 | +| ir.cpp:2242:16:2242:16 | Address | &:r2242_1 | +| ir.cpp:2242:16:2242:16 | Address | &:r2242_1 | +| ir.cpp:2242:16:2242:16 | Address | &:r2242_31 | +| ir.cpp:2242:16:2242:16 | Address | &:r2242_31 | +| ir.cpp:2242:16:2242:16 | Arg(this) | this:r2242_1 | +| ir.cpp:2242:16:2242:16 | Arg(this) | this:r2242_31 | +| ir.cpp:2242:16:2242:16 | CallTarget | func:r2242_32 | +| ir.cpp:2242:16:2242:16 | ChiPartial | partial:m2242_34 | +| ir.cpp:2242:16:2242:16 | ChiPartial | partial:m2242_37 | +| ir.cpp:2242:16:2242:16 | ChiTotal | total:m2242_12 | +| ir.cpp:2242:16:2242:16 | ChiTotal | total:m2242_13 | +| ir.cpp:2242:16:2242:16 | SideEffect | m2242_12 | +| ir.cpp:2242:16:2242:16 | SideEffect | ~m2242_13 | +| ir.cpp:2242:18:2242:24 | Address | &:r2242_5 | +| ir.cpp:2242:18:2242:24 | Arg(0) | 0:r2242_5 | +| ir.cpp:2242:18:2242:24 | SideEffect | ~m2240_3 | +| ir.cpp:2242:18:2242:24 | Unary | r2242_4 | +| ir.cpp:2242:18:2242:25 | CallTarget | func:r2242_3 | +| ir.cpp:2242:18:2242:25 | ChiPartial | partial:m2242_7 | +| ir.cpp:2242:18:2242:25 | ChiPartial | partial:m2242_10 | +| ir.cpp:2242:18:2242:25 | ChiTotal | total:m2240_4 | +| ir.cpp:2242:18:2242:25 | ChiTotal | total:m2242_2 | +| ir.cpp:2242:18:2242:25 | SideEffect | ~m2240_4 | +| ir.cpp:2242:28:2242:28 | Address | &:r2242_15 | +| ir.cpp:2242:28:2242:28 | Left | r2242_17 | +| ir.cpp:2242:28:2242:28 | Load | m2242_14 | +| ir.cpp:2242:28:2242:28 | Phi | from 0:m2241_3 | +| ir.cpp:2242:28:2242:28 | Phi | from 0:m2242_11 | +| ir.cpp:2242:28:2242:28 | Phi | from 0:~m2242_8 | +| ir.cpp:2242:28:2242:28 | Phi | from 2:m2242_28 | +| ir.cpp:2242:28:2242:28 | Phi | from 2:m2242_30 | +| ir.cpp:2242:28:2242:28 | Phi | from 2:~m2242_25 | +| ir.cpp:2242:28:2242:28 | Unary | r2242_16 | +| ir.cpp:2242:28:2242:33 | Condition | r2242_19 | +| ir.cpp:2242:33:2242:33 | Right | r2242_18 | +| ir.cpp:2242:36:2242:36 | Address | &:r2242_29 | +| ir.cpp:2242:40:2242:40 | Address | &:r2242_21 | +| ir.cpp:2242:40:2242:40 | Address | &:r2242_21 | +| ir.cpp:2242:40:2242:40 | Arg(this) | this:r2242_21 | +| ir.cpp:2242:40:2242:40 | ChiPartial | partial:m2242_27 | +| ir.cpp:2242:40:2242:40 | ChiTotal | total:m2242_12 | +| ir.cpp:2242:40:2242:40 | SideEffect | m2242_12 | +| ir.cpp:2242:42:2242:49 | CallTarget | func:r2242_22 | +| ir.cpp:2242:42:2242:49 | ChiPartial | partial:m2242_24 | +| ir.cpp:2242:42:2242:49 | ChiTotal | total:m2244_5 | +| ir.cpp:2242:42:2242:49 | SideEffect | ~m2244_5 | +| ir.cpp:2242:42:2242:49 | StoreValue | r2242_23 | +| ir.cpp:2243:16:2243:17 | Address | &:r2243_1 | +| ir.cpp:2243:16:2243:17 | Address | &:r2243_1 | +| ir.cpp:2243:16:2243:17 | Arg(this) | this:r2243_1 | +| ir.cpp:2243:16:2243:17 | CallTarget | func:r2243_3 | +| ir.cpp:2243:16:2243:17 | ChiPartial | partial:m2243_5 | +| ir.cpp:2243:16:2243:17 | ChiPartial | partial:m2243_7 | +| ir.cpp:2243:16:2243:17 | ChiTotal | total:m2242_13 | +| ir.cpp:2243:16:2243:17 | ChiTotal | total:m2243_2 | +| ir.cpp:2243:16:2243:17 | SideEffect | ~m2242_13 | +| ir.cpp:2244:5:2244:5 | Address | &:r2244_1 | +| ir.cpp:2244:5:2244:5 | Address | &:r2244_1 | +| ir.cpp:2244:5:2244:5 | Arg(this) | this:r2244_1 | +| ir.cpp:2244:5:2244:5 | CallTarget | func:r2244_2 | +| ir.cpp:2244:5:2244:5 | ChiPartial | partial:m2244_4 | +| ir.cpp:2244:5:2244:5 | ChiPartial | partial:m2244_7 | +| ir.cpp:2244:5:2244:5 | ChiTotal | total:m2243_6 | +| ir.cpp:2244:5:2244:5 | ChiTotal | total:m2243_8 | +| ir.cpp:2244:5:2244:5 | SideEffect | m2243_8 | +| ir.cpp:2244:5:2244:5 | SideEffect | ~m2243_6 | +| ir.cpp:2246:5:2246:5 | Address | &:r2246_1 | +| ir.cpp:2246:5:2246:5 | Address | &:r2246_24 | +| ir.cpp:2246:5:2246:5 | Address | &:r2246_32 | +| ir.cpp:2246:16:2246:16 | Address | &:r2246_50 | +| ir.cpp:2246:16:2246:16 | Address | &:r2246_50 | +| ir.cpp:2246:16:2246:16 | Address | &:r2246_67 | +| ir.cpp:2246:16:2246:16 | Address | &:r2246_67 | +| ir.cpp:2246:16:2246:16 | Arg(this) | this:r2246_50 | +| ir.cpp:2246:16:2246:16 | Arg(this) | this:r2246_67 | +| ir.cpp:2246:16:2246:16 | CallTarget | func:r2246_52 | +| ir.cpp:2246:16:2246:16 | CallTarget | func:r2246_68 | +| ir.cpp:2246:16:2246:16 | ChiPartial | partial:m2246_62 | +| ir.cpp:2246:16:2246:16 | ChiPartial | partial:m2246_65 | +| ir.cpp:2246:16:2246:16 | ChiPartial | partial:m2246_70 | +| ir.cpp:2246:16:2246:16 | ChiPartial | partial:m2246_73 | +| ir.cpp:2246:16:2246:16 | ChiTotal | total:m2246_51 | +| ir.cpp:2246:16:2246:16 | ChiTotal | total:m2246_57 | +| ir.cpp:2246:16:2246:16 | ChiTotal | total:m2246_66 | +| ir.cpp:2246:16:2246:16 | ChiTotal | total:m2248_5 | +| ir.cpp:2246:16:2246:16 | SideEffect | m2246_66 | +| ir.cpp:2246:16:2246:16 | SideEffect | ~m2246_57 | +| ir.cpp:2246:16:2246:16 | SideEffect | ~m2248_5 | +| ir.cpp:2246:20:2246:20 | Address | &:r2246_25 | +| ir.cpp:2246:20:2246:20 | Address | &:r2246_33 | +| ir.cpp:2246:20:2246:20 | Address | &:r2246_44 | +| ir.cpp:2246:20:2246:20 | Address | &:r2246_75 | +| ir.cpp:2246:20:2246:20 | Address | &:r2246_75 | +| ir.cpp:2246:20:2246:20 | Arg(0) | 0:r2246_45 | +| ir.cpp:2246:20:2246:20 | Arg(this) | this:r0_2 | +| ir.cpp:2246:20:2246:20 | Arg(this) | this:r0_5 | +| ir.cpp:2246:20:2246:20 | Arg(this) | this:r0_7 | +| ir.cpp:2246:20:2246:20 | Arg(this) | this:r0_9 | +| ir.cpp:2246:20:2246:20 | Arg(this) | this:r2246_75 | +| ir.cpp:2246:20:2246:20 | CallTarget | func:r2246_27 | +| ir.cpp:2246:20:2246:20 | CallTarget | func:r2246_35 | +| ir.cpp:2246:20:2246:20 | CallTarget | func:r2246_43 | +| ir.cpp:2246:20:2246:20 | CallTarget | func:r2246_54 | +| ir.cpp:2246:20:2246:20 | CallTarget | func:r2246_76 | +| ir.cpp:2246:20:2246:20 | ChiPartial | partial:m2246_29 | +| ir.cpp:2246:20:2246:20 | ChiPartial | partial:m2246_37 | +| ir.cpp:2246:20:2246:20 | ChiPartial | partial:m2246_47 | +| ir.cpp:2246:20:2246:20 | ChiPartial | partial:m2246_56 | +| ir.cpp:2246:20:2246:20 | ChiPartial | partial:m2246_78 | +| ir.cpp:2246:20:2246:20 | ChiPartial | partial:m2246_81 | +| ir.cpp:2246:20:2246:20 | ChiTotal | total:m2246_19 | +| ir.cpp:2246:20:2246:20 | ChiTotal | total:m2246_30 | +| ir.cpp:2246:20:2246:20 | ChiTotal | total:m2246_40 | +| ir.cpp:2246:20:2246:20 | ChiTotal | total:m2246_41 | +| ir.cpp:2246:20:2246:20 | ChiTotal | total:m2246_48 | +| ir.cpp:2246:20:2246:20 | ChiTotal | total:m2246_71 | +| ir.cpp:2246:20:2246:20 | Condition | r2246_46 | +| ir.cpp:2246:20:2246:20 | Load | m2246_23 | +| ir.cpp:2246:20:2246:20 | Load | m2246_23 | +| ir.cpp:2246:20:2246:20 | Load | m2246_39 | +| ir.cpp:2246:20:2246:20 | Phi | from 3:m2246_31 | +| ir.cpp:2246:20:2246:20 | Phi | from 3:~m2246_38 | +| ir.cpp:2246:20:2246:20 | Phi | from 5:m2246_82 | +| ir.cpp:2246:20:2246:20 | Phi | from 5:~m2246_79 | +| ir.cpp:2246:20:2246:20 | SideEffect | m2246_40 | +| ir.cpp:2246:20:2246:20 | SideEffect | ~m2246_19 | +| ir.cpp:2246:20:2246:20 | SideEffect | ~m2246_30 | +| ir.cpp:2246:20:2246:20 | SideEffect | ~m2246_41 | +| ir.cpp:2246:20:2246:20 | SideEffect | ~m2246_48 | +| ir.cpp:2246:20:2246:20 | SideEffect | ~m2246_71 | +| ir.cpp:2246:20:2246:20 | StoreValue | r2246_28 | +| ir.cpp:2246:20:2246:20 | StoreValue | r2246_36 | +| ir.cpp:2246:20:2246:20 | Unary | r2246_26 | +| ir.cpp:2246:20:2246:20 | Unary | r2246_34 | +| ir.cpp:2246:20:2246:20 | Unary | r2246_42 | +| ir.cpp:2246:20:2246:20 | Unary | r2246_53 | +| ir.cpp:2246:20:2246:20 | Unary | r2246_55 | +| ir.cpp:2246:20:2246:20 | Unary | r2246_77 | +| ir.cpp:2246:20:2246:50 | Address | &:r2246_2 | +| ir.cpp:2246:20:2246:50 | Address | &:r2246_2 | +| ir.cpp:2246:20:2246:50 | Arg(this) | this:r2246_2 | +| ir.cpp:2246:20:2246:50 | CallTarget | func:r2246_4 | +| ir.cpp:2246:20:2246:50 | ChiPartial | partial:m2246_18 | +| ir.cpp:2246:20:2246:50 | ChiPartial | partial:m2246_20 | +| ir.cpp:2246:20:2246:50 | ChiTotal | total:m2246_3 | +| ir.cpp:2246:20:2246:50 | ChiTotal | total:m2246_12 | +| ir.cpp:2246:20:2246:50 | SideEffect | ~m2246_12 | +| ir.cpp:2246:20:2246:50 | StoreValue | r2246_22 | +| ir.cpp:2246:20:2246:50 | Unary | r2246_2 | +| ir.cpp:2246:20:2246:51 | Address | &:r2246_60 | +| ir.cpp:2246:20:2246:51 | Arg(0) | 0:r2246_60 | +| ir.cpp:2246:20:2246:51 | SideEffect | ~m2246_63 | +| ir.cpp:2246:20:2246:51 | Unary | r2246_58 | +| ir.cpp:2246:20:2246:51 | Unary | r2246_59 | +| ir.cpp:2246:35:2246:49 | Address | &:r2246_5 | +| ir.cpp:2246:35:2246:49 | Address | &:r2246_5 | +| ir.cpp:2246:35:2246:49 | Address | &:r2246_5 | +| ir.cpp:2246:35:2246:49 | Arg(0) | 0:r2246_16 | +| ir.cpp:2246:35:2246:49 | Arg(this) | this:r2246_5 | +| ir.cpp:2246:35:2246:49 | CallTarget | func:r2246_7 | +| ir.cpp:2246:35:2246:49 | ChiPartial | partial:m2246_11 | +| ir.cpp:2246:35:2246:49 | ChiPartial | partial:m2246_14 | +| ir.cpp:2246:35:2246:49 | ChiTotal | total:m2242_35 | +| ir.cpp:2246:35:2246:49 | ChiTotal | total:m2246_6 | +| ir.cpp:2246:35:2246:49 | Load | m2246_15 | +| ir.cpp:2246:35:2246:49 | SideEffect | ~m2242_35 | +| ir.cpp:2246:42:2246:48 | Address | &:r2246_9 | +| ir.cpp:2246:42:2246:48 | Arg(0) | 0:r2246_9 | +| ir.cpp:2246:42:2246:48 | SideEffect | ~m2240_3 | +| ir.cpp:2246:42:2246:48 | Unary | r2246_8 | +| ir.cpp:2247:16:2247:17 | Address | &:r2247_1 | +| ir.cpp:2247:16:2247:17 | Address | &:r2247_1 | +| ir.cpp:2247:16:2247:17 | Arg(this) | this:r2247_1 | +| ir.cpp:2247:16:2247:17 | CallTarget | func:r2247_3 | +| ir.cpp:2247:16:2247:17 | ChiPartial | partial:m2247_5 | +| ir.cpp:2247:16:2247:17 | ChiPartial | partial:m2247_7 | +| ir.cpp:2247:16:2247:17 | ChiTotal | total:m2246_63 | +| ir.cpp:2247:16:2247:17 | ChiTotal | total:m2247_2 | +| ir.cpp:2247:16:2247:17 | SideEffect | ~m2246_63 | +| ir.cpp:2248:5:2248:5 | Address | &:r2248_1 | +| ir.cpp:2248:5:2248:5 | Address | &:r2248_1 | +| ir.cpp:2248:5:2248:5 | Arg(this) | this:r2248_1 | +| ir.cpp:2248:5:2248:5 | CallTarget | func:r2248_2 | +| ir.cpp:2248:5:2248:5 | ChiPartial | partial:m2248_4 | +| ir.cpp:2248:5:2248:5 | ChiPartial | partial:m2248_7 | +| ir.cpp:2248:5:2248:5 | ChiTotal | total:m2247_6 | +| ir.cpp:2248:5:2248:5 | ChiTotal | total:m2247_8 | +| ir.cpp:2248:5:2248:5 | SideEffect | m2247_8 | +| ir.cpp:2248:5:2248:5 | SideEffect | ~m2247_6 | +| ir.cpp:2250:16:2250:16 | Address | &:r2250_1 | +| ir.cpp:2250:16:2250:16 | Address | &:r2250_1 | +| ir.cpp:2250:16:2250:16 | Address | &:r2250_50 | +| ir.cpp:2250:16:2250:16 | Address | &:r2250_50 | +| ir.cpp:2250:16:2250:16 | Arg(this) | this:r2250_1 | +| ir.cpp:2250:16:2250:16 | Arg(this) | this:r2250_50 | +| ir.cpp:2250:16:2250:16 | CallTarget | func:r2250_51 | +| ir.cpp:2250:16:2250:16 | ChiPartial | partial:m2250_53 | +| ir.cpp:2250:16:2250:16 | ChiPartial | partial:m2250_56 | +| ir.cpp:2250:16:2250:16 | ChiTotal | total:m2250_23 | +| ir.cpp:2250:16:2250:16 | ChiTotal | total:m2250_46 | +| ir.cpp:2250:16:2250:16 | SideEffect | m2250_23 | +| ir.cpp:2250:16:2250:16 | SideEffect | ~m2250_46 | +| ir.cpp:2250:18:2250:24 | Address | &:r2250_5 | +| ir.cpp:2250:18:2250:24 | Arg(0) | 0:r2250_5 | +| ir.cpp:2250:18:2250:24 | SideEffect | ~m2240_3 | +| ir.cpp:2250:18:2250:24 | Unary | r2250_4 | +| ir.cpp:2250:18:2250:25 | CallTarget | func:r2250_3 | +| ir.cpp:2250:18:2250:25 | ChiPartial | partial:m2250_7 | +| ir.cpp:2250:18:2250:25 | ChiPartial | partial:m2250_10 | +| ir.cpp:2250:18:2250:25 | ChiTotal | total:m2246_48 | +| ir.cpp:2250:18:2250:25 | ChiTotal | total:m2250_2 | +| ir.cpp:2250:18:2250:25 | SideEffect | ~m2246_48 | +| ir.cpp:2250:28:2250:29 | Address | &:r2250_12 | +| ir.cpp:2250:28:2250:29 | Address | &:r2250_12 | +| ir.cpp:2250:28:2250:29 | Address | &:r2250_42 | +| ir.cpp:2250:28:2250:29 | Address | &:r2250_42 | +| ir.cpp:2250:28:2250:29 | Arg(this) | this:r2250_12 | +| ir.cpp:2250:28:2250:29 | Arg(this) | this:r2250_42 | +| ir.cpp:2250:28:2250:29 | CallTarget | func:r2250_43 | +| ir.cpp:2250:28:2250:29 | ChiPartial | partial:m2250_45 | +| ir.cpp:2250:28:2250:29 | ChiPartial | partial:m2250_48 | +| ir.cpp:2250:28:2250:29 | ChiTotal | total:m2250_22 | +| ir.cpp:2250:28:2250:29 | ChiTotal | total:m2250_24 | +| ir.cpp:2250:28:2250:29 | SideEffect | m2250_22 | +| ir.cpp:2250:28:2250:29 | SideEffect | ~m2250_24 | +| ir.cpp:2250:31:2250:37 | Address | &:r2250_16 | +| ir.cpp:2250:31:2250:37 | Arg(0) | 0:r2250_16 | +| ir.cpp:2250:31:2250:37 | SideEffect | ~m2240_3 | +| ir.cpp:2250:31:2250:37 | Unary | r2250_15 | +| ir.cpp:2250:31:2250:38 | CallTarget | func:r2250_14 | +| ir.cpp:2250:31:2250:38 | ChiPartial | partial:m2250_18 | +| ir.cpp:2250:31:2250:38 | ChiPartial | partial:m2250_21 | +| ir.cpp:2250:31:2250:38 | ChiTotal | total:m2250_8 | +| ir.cpp:2250:31:2250:38 | ChiTotal | total:m2250_13 | +| ir.cpp:2250:31:2250:38 | SideEffect | ~m2250_8 | +| ir.cpp:2250:41:2250:41 | Address | &:r2250_26 | +| ir.cpp:2250:41:2250:41 | Left | r2250_28 | +| ir.cpp:2250:41:2250:41 | Load | m2250_25 | +| ir.cpp:2250:41:2250:41 | Phi | from 6:m2242_14 | +| ir.cpp:2250:41:2250:41 | Phi | from 6:m2250_11 | +| ir.cpp:2250:41:2250:41 | Phi | from 6:~m2250_19 | +| ir.cpp:2250:41:2250:41 | Phi | from 8:m2250_39 | +| ir.cpp:2250:41:2250:41 | Phi | from 8:m2250_41 | +| ir.cpp:2250:41:2250:41 | Phi | from 8:~m2250_36 | +| ir.cpp:2250:41:2250:41 | Unary | r2250_27 | +| ir.cpp:2250:41:2250:46 | Condition | r2250_30 | +| ir.cpp:2250:46:2250:46 | Right | r2250_29 | +| ir.cpp:2250:49:2250:49 | Address | &:r2250_40 | +| ir.cpp:2250:53:2250:53 | Address | &:r2250_32 | +| ir.cpp:2250:53:2250:53 | Address | &:r2250_32 | +| ir.cpp:2250:53:2250:53 | Arg(this) | this:r2250_32 | +| ir.cpp:2250:53:2250:53 | ChiPartial | partial:m2250_38 | +| ir.cpp:2250:53:2250:53 | ChiTotal | total:m2250_23 | +| ir.cpp:2250:53:2250:53 | SideEffect | m2250_23 | +| ir.cpp:2250:55:2250:62 | CallTarget | func:r2250_33 | +| ir.cpp:2250:55:2250:62 | ChiPartial | partial:m2250_35 | +| ir.cpp:2250:55:2250:62 | ChiTotal | total:m2250_24 | +| ir.cpp:2250:55:2250:62 | SideEffect | ~m2250_24 | +| ir.cpp:2250:55:2250:62 | StoreValue | r2250_34 | +| ir.cpp:2251:9:2251:9 | Address | &:r2251_2 | +| ir.cpp:2251:13:2251:13 | StoreValue | r2251_1 | +| ir.cpp:2255:6:2255:19 | ChiPartial | partial:m2255_3 | +| ir.cpp:2255:6:2255:19 | ChiTotal | total:m2255_2 | +| ir.cpp:2255:6:2255:19 | SideEffect | ~m2260_5 | +| ir.cpp:2255:26:2255:26 | Address | &:r2255_5 | +| ir.cpp:2256:15:2256:15 | Address | &:r2256_1 | +| ir.cpp:2256:15:2256:15 | Address | &:r2256_1 | +| ir.cpp:2256:15:2256:15 | Arg(this) | this:r2256_1 | +| ir.cpp:2256:18:2256:33 | CallTarget | func:r2256_3 | +| ir.cpp:2256:18:2256:33 | ChiPartial | partial:m2256_7 | +| ir.cpp:2256:18:2256:33 | ChiPartial | partial:m2256_10 | +| ir.cpp:2256:18:2256:33 | ChiTotal | total:m2255_4 | +| ir.cpp:2256:18:2256:33 | ChiTotal | total:m2256_2 | +| ir.cpp:2256:18:2256:33 | SideEffect | ~m2255_4 | +| ir.cpp:2256:26:2256:32 | Address | &:r2256_5 | +| ir.cpp:2256:26:2256:32 | Arg(0) | 0:r2256_5 | +| ir.cpp:2256:26:2256:32 | SideEffect | ~m2255_3 | +| ir.cpp:2256:26:2256:32 | Unary | r2256_4 | +| ir.cpp:2256:36:2256:36 | Address | &:r2256_12 | +| ir.cpp:2256:36:2256:36 | Condition | r2256_13 | +| ir.cpp:2256:36:2256:36 | Load | m2255_6 | +| ir.cpp:2257:13:2257:13 | Address | &:r2257_1 | +| ir.cpp:2257:16:2257:17 | StoreValue | r2257_2 | +| ir.cpp:2259:13:2259:13 | Address | &:r2259_1 | +| ir.cpp:2259:16:2259:17 | StoreValue | r2259_2 | +| ir.cpp:2260:5:2260:5 | Address | &:r2260_1 | +| ir.cpp:2260:5:2260:5 | Address | &:r2260_1 | +| ir.cpp:2260:5:2260:5 | Arg(this) | this:r2260_1 | +| ir.cpp:2260:5:2260:5 | CallTarget | func:r2260_2 | +| ir.cpp:2260:5:2260:5 | ChiPartial | partial:m2260_4 | +| ir.cpp:2260:5:2260:5 | ChiPartial | partial:m2260_7 | +| ir.cpp:2260:5:2260:5 | ChiTotal | total:m2256_8 | +| ir.cpp:2260:5:2260:5 | ChiTotal | total:m2256_11 | +| ir.cpp:2260:5:2260:5 | SideEffect | m2256_11 | +| ir.cpp:2260:5:2260:5 | SideEffect | ~m2256_8 | +| ir.cpp:2270:6:2270:19 | ChiPartial | partial:m2270_3 | +| ir.cpp:2270:6:2270:19 | ChiTotal | total:m2270_2 | +| ir.cpp:2270:6:2270:19 | SideEffect | ~m2275_14 | +| ir.cpp:2270:26:2270:26 | Address | &:r2270_5 | +| ir.cpp:2271:8:2271:23 | Address | &:r2271_1 | +| ir.cpp:2271:8:2271:23 | Address | &:r2271_1 | +| ir.cpp:2271:8:2271:23 | Arg(this) | this:r2271_1 | +| ir.cpp:2271:8:2271:23 | Condition | r2271_19 | +| ir.cpp:2271:13:2271:13 | Address | &:r2271_11 | +| ir.cpp:2271:13:2271:13 | Address | &:r2271_11 | +| ir.cpp:2271:13:2271:13 | Arg(this) | this:r2271_11 | +| ir.cpp:2271:13:2271:13 | CallTarget | func:r2271_12 | +| ir.cpp:2271:13:2271:13 | ChiPartial | partial:m2271_14 | +| ir.cpp:2271:13:2271:13 | ChiPartial | partial:m2271_17 | +| ir.cpp:2271:13:2271:13 | ChiTotal | total:m2271_8 | +| ir.cpp:2271:13:2271:13 | ChiTotal | total:m2271_10 | +| ir.cpp:2271:13:2271:13 | SideEffect | m2271_10 | +| ir.cpp:2271:13:2271:13 | SideEffect | ~m2271_8 | +| ir.cpp:2271:13:2271:13 | Unary | r2271_13 | +| ir.cpp:2271:16:2271:23 | CallTarget | func:r2271_3 | +| ir.cpp:2271:16:2271:23 | ChiPartial | partial:m2271_7 | +| ir.cpp:2271:16:2271:23 | ChiPartial | partial:m2271_9 | +| ir.cpp:2271:16:2271:23 | ChiTotal | total:m2270_4 | +| ir.cpp:2271:16:2271:23 | ChiTotal | total:m2271_2 | +| ir.cpp:2271:16:2271:23 | SideEffect | ~m2270_4 | +| ir.cpp:2271:22:2271:22 | Address | &:r2271_4 | +| ir.cpp:2271:22:2271:22 | Arg(0) | 0:r2271_5 | +| ir.cpp:2271:22:2271:22 | Load | m2270_6 | +| ir.cpp:2272:16:2272:17 | Address | &:r2272_1 | +| ir.cpp:2272:16:2272:17 | Address | &:r2272_1 | +| ir.cpp:2272:16:2272:17 | Arg(this) | this:r2272_1 | +| ir.cpp:2272:16:2272:17 | CallTarget | func:r2272_3 | +| ir.cpp:2272:16:2272:17 | ChiPartial | partial:m2272_5 | +| ir.cpp:2272:16:2272:17 | ChiPartial | partial:m2272_7 | +| ir.cpp:2272:16:2272:17 | ChiTotal | total:m2271_15 | +| ir.cpp:2272:16:2272:17 | ChiTotal | total:m2272_2 | +| ir.cpp:2272:16:2272:17 | SideEffect | ~m2271_15 | +| ir.cpp:2273:5:2273:5 | Address | &:r2273_1 | +| ir.cpp:2273:5:2273:5 | Address | &:r2273_1 | +| ir.cpp:2273:5:2273:5 | Arg(this) | this:r2273_1 | +| ir.cpp:2273:5:2273:5 | CallTarget | func:r2273_2 | +| ir.cpp:2273:5:2273:5 | ChiPartial | partial:m2273_4 | +| ir.cpp:2273:5:2273:5 | ChiPartial | partial:m2273_7 | +| ir.cpp:2273:5:2273:5 | ChiTotal | total:m2272_6 | +| ir.cpp:2273:5:2273:5 | ChiTotal | total:m2272_8 | +| ir.cpp:2273:5:2273:5 | SideEffect | m2272_8 | +| ir.cpp:2273:5:2273:5 | SideEffect | ~m2272_6 | +| ir.cpp:2274:16:2274:17 | Address | &:r2274_1 | +| ir.cpp:2274:16:2274:17 | Address | &:r2274_1 | +| ir.cpp:2274:16:2274:17 | Arg(this) | this:r2274_1 | +| ir.cpp:2274:16:2274:17 | CallTarget | func:r2274_3 | +| ir.cpp:2274:16:2274:17 | ChiPartial | partial:m2274_5 | +| ir.cpp:2274:16:2274:17 | ChiPartial | partial:m2274_7 | +| ir.cpp:2274:16:2274:17 | ChiTotal | total:m2271_15 | +| ir.cpp:2274:16:2274:17 | ChiTotal | total:m2274_2 | +| ir.cpp:2274:16:2274:17 | SideEffect | ~m2271_15 | +| ir.cpp:2275:5:2275:5 | Address | &:r2275_1 | +| ir.cpp:2275:5:2275:5 | Address | &:r2275_1 | +| ir.cpp:2275:5:2275:5 | Address | &:r2275_10 | +| ir.cpp:2275:5:2275:5 | Address | &:r2275_10 | +| ir.cpp:2275:5:2275:5 | Arg(this) | this:r2275_1 | +| ir.cpp:2275:5:2275:5 | Arg(this) | this:r2275_10 | +| ir.cpp:2275:5:2275:5 | CallTarget | func:r2275_2 | +| ir.cpp:2275:5:2275:5 | CallTarget | func:r2275_11 | +| ir.cpp:2275:5:2275:5 | ChiPartial | partial:m2275_4 | +| ir.cpp:2275:5:2275:5 | ChiPartial | partial:m2275_7 | +| ir.cpp:2275:5:2275:5 | ChiPartial | partial:m2275_13 | +| ir.cpp:2275:5:2275:5 | ChiPartial | partial:m2275_16 | +| ir.cpp:2275:5:2275:5 | ChiTotal | total:m2271_18 | +| ir.cpp:2275:5:2275:5 | ChiTotal | total:m2274_6 | +| ir.cpp:2275:5:2275:5 | ChiTotal | total:m2274_8 | +| ir.cpp:2275:5:2275:5 | ChiTotal | total:m2275_9 | +| ir.cpp:2275:5:2275:5 | Phi | from 1:~m2273_5 | +| ir.cpp:2275:5:2275:5 | Phi | from 2:~m2275_5 | +| ir.cpp:2275:5:2275:5 | SideEffect | m2271_18 | +| ir.cpp:2275:5:2275:5 | SideEffect | m2274_8 | +| ir.cpp:2275:5:2275:5 | SideEffect | ~m2274_6 | +| ir.cpp:2275:5:2275:5 | SideEffect | ~m2275_9 | +| ir.cpp:2278:6:2278:25 | ChiPartial | partial:m2278_3 | +| ir.cpp:2278:6:2278:25 | ChiTotal | total:m2278_2 | +| ir.cpp:2278:6:2278:25 | SideEffect | ~m2289_13 | +| ir.cpp:2278:32:2278:32 | Address | &:r2278_5 | +| ir.cpp:2280:16:2280:16 | Address | &:r2280_1 | +| ir.cpp:2280:16:2280:16 | Address | &:r2280_1 | +| ir.cpp:2280:16:2280:16 | Arg(this) | this:r2280_1 | +| ir.cpp:2280:16:2280:16 | CallTarget | func:r2280_3 | +| ir.cpp:2280:16:2280:16 | ChiPartial | partial:m2280_5 | +| ir.cpp:2280:16:2280:16 | ChiPartial | partial:m2280_7 | +| ir.cpp:2280:16:2280:16 | ChiTotal | total:m2278_4 | +| ir.cpp:2280:16:2280:16 | ChiTotal | total:m2280_2 | +| ir.cpp:2280:16:2280:16 | SideEffect | ~m2278_4 | +| ir.cpp:2281:15:2281:15 | Address | &:r2281_2 | +| ir.cpp:2281:15:2281:15 | Condition | r2281_3 | +| ir.cpp:2281:15:2281:15 | Load | m2281_1 | +| ir.cpp:2281:15:2281:15 | Phi | from 0:m2278_6 | +| ir.cpp:2281:15:2281:15 | Phi | from 2:m2282_3 | +| ir.cpp:2282:13:2282:13 | Address | &:r2282_2 | +| ir.cpp:2282:17:2282:21 | StoreValue | r2282_1 | +| ir.cpp:2284:5:2284:5 | Address | &:r2284_1 | +| ir.cpp:2284:5:2284:5 | Address | &:r2284_1 | +| ir.cpp:2284:5:2284:5 | Arg(this) | this:r2284_1 | +| ir.cpp:2284:5:2284:5 | CallTarget | func:r2284_2 | +| ir.cpp:2284:5:2284:5 | ChiPartial | partial:m2284_4 | +| ir.cpp:2284:5:2284:5 | ChiPartial | partial:m2284_7 | +| ir.cpp:2284:5:2284:5 | ChiTotal | total:m2280_6 | +| ir.cpp:2284:5:2284:5 | ChiTotal | total:m2280_8 | +| ir.cpp:2284:5:2284:5 | SideEffect | m2280_8 | +| ir.cpp:2284:5:2284:5 | SideEffect | ~m2280_6 | +| ir.cpp:2287:16:2287:31 | Address | &:r2287_3 | +| ir.cpp:2287:16:2287:31 | Address | &:r2287_3 | +| ir.cpp:2287:16:2287:31 | Arg(this) | this:r2287_3 | +| ir.cpp:2287:16:2287:31 | Condition | r2287_21 | +| ir.cpp:2287:16:2287:31 | Phi | from 3:m2281_1 | +| ir.cpp:2287:16:2287:31 | Phi | from 3:~m2284_5 | +| ir.cpp:2287:16:2287:31 | Phi | from 5:m2288_3 | +| ir.cpp:2287:16:2287:31 | Phi | from 5:~m2289_5 | +| ir.cpp:2287:21:2287:21 | Address | &:r2287_13 | +| ir.cpp:2287:21:2287:21 | Address | &:r2287_13 | +| ir.cpp:2287:21:2287:21 | Arg(this) | this:r2287_13 | +| ir.cpp:2287:21:2287:21 | CallTarget | func:r2287_14 | +| ir.cpp:2287:21:2287:21 | ChiPartial | partial:m2287_16 | +| ir.cpp:2287:21:2287:21 | ChiPartial | partial:m2287_19 | +| ir.cpp:2287:21:2287:21 | ChiTotal | total:m2287_10 | +| ir.cpp:2287:21:2287:21 | ChiTotal | total:m2287_12 | +| ir.cpp:2287:21:2287:21 | SideEffect | m2287_12 | +| ir.cpp:2287:21:2287:21 | SideEffect | ~m2287_10 | +| ir.cpp:2287:21:2287:21 | Unary | r2287_15 | +| ir.cpp:2287:24:2287:31 | CallTarget | func:r2287_5 | +| ir.cpp:2287:24:2287:31 | ChiPartial | partial:m2287_9 | +| ir.cpp:2287:24:2287:31 | ChiPartial | partial:m2287_11 | +| ir.cpp:2287:24:2287:31 | ChiTotal | total:m2287_1 | +| ir.cpp:2287:24:2287:31 | ChiTotal | total:m2287_4 | +| ir.cpp:2287:24:2287:31 | SideEffect | ~m2287_1 | +| ir.cpp:2287:30:2287:30 | Address | &:r2287_6 | +| ir.cpp:2287:30:2287:30 | Arg(0) | 0:r2287_7 | +| ir.cpp:2287:30:2287:30 | Load | m2287_2 | +| ir.cpp:2288:13:2288:13 | Address | &:r2288_2 | +| ir.cpp:2288:17:2288:21 | StoreValue | r2288_1 | +| ir.cpp:2289:9:2289:9 | Address | &:r2289_1 | +| ir.cpp:2289:9:2289:9 | Address | &:r2289_1 | +| ir.cpp:2289:9:2289:9 | Address | &:r2289_9 | +| ir.cpp:2289:9:2289:9 | Address | &:r2289_9 | +| ir.cpp:2289:9:2289:9 | Arg(this) | this:r2289_1 | +| ir.cpp:2289:9:2289:9 | Arg(this) | this:r2289_9 | +| ir.cpp:2289:9:2289:9 | CallTarget | func:r2289_2 | +| ir.cpp:2289:9:2289:9 | CallTarget | func:r2289_10 | +| ir.cpp:2289:9:2289:9 | ChiPartial | partial:m2289_4 | +| ir.cpp:2289:9:2289:9 | ChiPartial | partial:m2289_7 | +| ir.cpp:2289:9:2289:9 | ChiPartial | partial:m2289_12 | +| ir.cpp:2289:9:2289:9 | ChiPartial | partial:m2289_15 | +| ir.cpp:2289:9:2289:9 | ChiTotal | total:m2287_17 | +| ir.cpp:2289:9:2289:9 | ChiTotal | total:m2287_17 | +| ir.cpp:2289:9:2289:9 | ChiTotal | total:m2287_20 | +| ir.cpp:2289:9:2289:9 | ChiTotal | total:m2287_20 | +| ir.cpp:2289:9:2289:9 | SideEffect | m2287_20 | +| ir.cpp:2289:9:2289:9 | SideEffect | m2287_20 | +| ir.cpp:2289:9:2289:9 | SideEffect | ~m2287_17 | +| ir.cpp:2289:9:2289:9 | SideEffect | ~m2287_17 | +| ir.cpp:2293:6:2293:13 | ChiPartial | partial:m2293_3 | +| ir.cpp:2293:6:2293:13 | ChiTotal | total:m2293_2 | +| ir.cpp:2293:6:2293:13 | SideEffect | m2293_3 | +| ir.cpp:2295:6:2295:24 | ChiPartial | partial:m2295_3 | +| ir.cpp:2295:6:2295:24 | ChiTotal | total:m2295_2 | +| ir.cpp:2295:6:2295:24 | Phi | from 2:~m2304_5 | +| ir.cpp:2295:6:2295:24 | Phi | from 4:~m2304_13 | +| ir.cpp:2295:6:2295:24 | Phi | from 5:~m2304_22 | +| ir.cpp:2295:6:2295:24 | SideEffect | ~m2295_7 | +| ir.cpp:2295:31:2295:31 | Address | &:r2295_5 | +| ir.cpp:2296:12:2296:12 | Address | &:r2296_1 | +| ir.cpp:2296:12:2296:12 | Address | &:r2296_1 | +| ir.cpp:2296:12:2296:12 | Arg(this) | this:r2296_1 | +| ir.cpp:2296:12:2296:12 | CallTarget | func:r2296_3 | +| ir.cpp:2296:12:2296:12 | ChiPartial | partial:m2296_5 | +| ir.cpp:2296:12:2296:12 | ChiPartial | partial:m2296_7 | +| ir.cpp:2296:12:2296:12 | ChiTotal | total:m2295_4 | +| ir.cpp:2296:12:2296:12 | ChiTotal | total:m2296_2 | +| ir.cpp:2296:12:2296:12 | SideEffect | ~m2295_4 | +| ir.cpp:2297:8:2297:8 | Address | &:r2297_1 | +| ir.cpp:2297:8:2297:8 | Condition | r2297_2 | +| ir.cpp:2297:8:2297:8 | Load | m2295_6 | +| ir.cpp:2300:8:2300:8 | Address | &:r2300_1 | +| ir.cpp:2300:8:2300:8 | Condition | r2300_2 | +| ir.cpp:2300:8:2300:8 | Load | m2295_6 | +| ir.cpp:2301:16:2301:23 | CallTarget | func:r2301_1 | +| ir.cpp:2301:16:2301:23 | ChiPartial | partial:m2301_3 | +| ir.cpp:2301:16:2301:23 | ChiTotal | total:m2296_6 | +| ir.cpp:2301:16:2301:23 | SideEffect | ~m2296_6 | +| ir.cpp:2304:1:2304:1 | Address | &:r2304_1 | +| ir.cpp:2304:1:2304:1 | Address | &:r2304_1 | +| ir.cpp:2304:1:2304:1 | Address | &:r2304_9 | +| ir.cpp:2304:1:2304:1 | Address | &:r2304_9 | +| ir.cpp:2304:1:2304:1 | Address | &:r2304_18 | +| ir.cpp:2304:1:2304:1 | Address | &:r2304_18 | +| ir.cpp:2304:1:2304:1 | Arg(this) | this:r2304_1 | +| ir.cpp:2304:1:2304:1 | Arg(this) | this:r2304_9 | +| ir.cpp:2304:1:2304:1 | Arg(this) | this:r2304_18 | +| ir.cpp:2304:1:2304:1 | CallTarget | func:r2304_2 | +| ir.cpp:2304:1:2304:1 | CallTarget | func:r2304_10 | +| ir.cpp:2304:1:2304:1 | CallTarget | func:r2304_19 | +| ir.cpp:2304:1:2304:1 | ChiPartial | partial:m2304_4 | +| ir.cpp:2304:1:2304:1 | ChiPartial | partial:m2304_7 | +| ir.cpp:2304:1:2304:1 | ChiPartial | partial:m2304_12 | +| ir.cpp:2304:1:2304:1 | ChiPartial | partial:m2304_15 | +| ir.cpp:2304:1:2304:1 | ChiPartial | partial:m2304_21 | +| ir.cpp:2304:1:2304:1 | ChiPartial | partial:m2304_24 | +| ir.cpp:2304:1:2304:1 | ChiTotal | total:m2296_6 | +| ir.cpp:2304:1:2304:1 | ChiTotal | total:m2296_6 | +| ir.cpp:2304:1:2304:1 | ChiTotal | total:m2296_8 | +| ir.cpp:2304:1:2304:1 | ChiTotal | total:m2296_8 | +| ir.cpp:2304:1:2304:1 | ChiTotal | total:m2296_8 | +| ir.cpp:2304:1:2304:1 | ChiTotal | total:m2301_4 | +| ir.cpp:2304:1:2304:1 | SideEffect | m2296_8 | +| ir.cpp:2304:1:2304:1 | SideEffect | m2296_8 | +| ir.cpp:2304:1:2304:1 | SideEffect | m2296_8 | +| ir.cpp:2304:1:2304:1 | SideEffect | ~m2296_6 | +| ir.cpp:2304:1:2304:1 | SideEffect | ~m2296_6 | +| ir.cpp:2304:1:2304:1 | SideEffect | ~m2301_4 | +| ir.cpp:2306:5:2306:24 | Address | &:r2306_9 | +| ir.cpp:2306:5:2306:24 | ChiPartial | partial:m2306_3 | +| ir.cpp:2306:5:2306:24 | ChiTotal | total:m2306_2 | +| ir.cpp:2306:5:2306:24 | Load | m2306_8 | +| ir.cpp:2306:5:2306:24 | Phi | from 2:m2309_3 | +| ir.cpp:2306:5:2306:24 | Phi | from 2:~m2312_5 | +| ir.cpp:2306:5:2306:24 | Phi | from 3:m2311_3 | +| ir.cpp:2306:5:2306:24 | Phi | from 3:~m2312_13 | +| ir.cpp:2306:5:2306:24 | SideEffect | ~m2306_7 | +| ir.cpp:2306:31:2306:31 | Address | &:r2306_5 | +| ir.cpp:2307:12:2307:12 | Address | &:r2307_1 | +| ir.cpp:2307:12:2307:12 | Address | &:r2307_1 | +| ir.cpp:2307:12:2307:12 | Arg(this) | this:r2307_1 | +| ir.cpp:2307:12:2307:12 | CallTarget | func:r2307_3 | +| ir.cpp:2307:12:2307:12 | ChiPartial | partial:m2307_5 | +| ir.cpp:2307:12:2307:12 | ChiPartial | partial:m2307_7 | +| ir.cpp:2307:12:2307:12 | ChiTotal | total:m2306_4 | +| ir.cpp:2307:12:2307:12 | ChiTotal | total:m2307_2 | +| ir.cpp:2307:12:2307:12 | SideEffect | ~m2306_4 | +| ir.cpp:2308:8:2308:8 | Address | &:r2308_1 | +| ir.cpp:2308:8:2308:8 | Condition | r2308_2 | +| ir.cpp:2308:8:2308:8 | Load | m2306_6 | +| ir.cpp:2309:9:2309:17 | Address | &:r2309_1 | +| ir.cpp:2309:16:2309:16 | StoreValue | r2309_2 | +| ir.cpp:2311:5:2311:13 | Address | &:r2311_1 | +| ir.cpp:2311:12:2311:12 | StoreValue | r2311_2 | +| ir.cpp:2312:1:2312:1 | Address | &:r2312_1 | +| ir.cpp:2312:1:2312:1 | Address | &:r2312_1 | +| ir.cpp:2312:1:2312:1 | Address | &:r2312_9 | +| ir.cpp:2312:1:2312:1 | Address | &:r2312_9 | +| ir.cpp:2312:1:2312:1 | Arg(this) | this:r2312_1 | +| ir.cpp:2312:1:2312:1 | Arg(this) | this:r2312_9 | +| ir.cpp:2312:1:2312:1 | CallTarget | func:r2312_2 | +| ir.cpp:2312:1:2312:1 | CallTarget | func:r2312_10 | +| ir.cpp:2312:1:2312:1 | ChiPartial | partial:m2312_4 | +| ir.cpp:2312:1:2312:1 | ChiPartial | partial:m2312_7 | +| ir.cpp:2312:1:2312:1 | ChiPartial | partial:m2312_12 | +| ir.cpp:2312:1:2312:1 | ChiPartial | partial:m2312_15 | +| ir.cpp:2312:1:2312:1 | ChiTotal | total:m2307_6 | +| ir.cpp:2312:1:2312:1 | ChiTotal | total:m2307_6 | +| ir.cpp:2312:1:2312:1 | ChiTotal | total:m2307_8 | +| ir.cpp:2312:1:2312:1 | ChiTotal | total:m2307_8 | +| ir.cpp:2312:1:2312:1 | SideEffect | m2307_8 | +| ir.cpp:2312:1:2312:1 | SideEffect | m2307_8 | +| ir.cpp:2312:1:2312:1 | SideEffect | ~m2307_6 | +| ir.cpp:2312:1:2312:1 | SideEffect | ~m2307_6 | +| ir.cpp:2314:6:2314:26 | ChiPartial | partial:m2314_3 | +| ir.cpp:2314:6:2314:26 | ChiTotal | total:m2314_2 | +| ir.cpp:2314:6:2314:26 | SideEffect | ~m2317_5 | +| ir.cpp:2315:12:2315:12 | Address | &:r2315_1 | +| ir.cpp:2315:12:2315:12 | Address | &:r2315_1 | +| ir.cpp:2315:12:2315:12 | Arg(this) | this:r2315_1 | +| ir.cpp:2315:12:2315:12 | CallTarget | func:r2315_3 | +| ir.cpp:2315:12:2315:12 | ChiPartial | partial:m2315_5 | +| ir.cpp:2315:12:2315:12 | ChiPartial | partial:m2315_7 | +| ir.cpp:2315:12:2315:12 | ChiTotal | total:m2314_4 | +| ir.cpp:2315:12:2315:12 | ChiTotal | total:m2315_2 | +| ir.cpp:2315:12:2315:12 | SideEffect | ~m2314_4 | +| ir.cpp:2316:12:2316:19 | CallTarget | func:r2316_1 | +| ir.cpp:2316:12:2316:19 | ChiPartial | partial:m2316_3 | +| ir.cpp:2316:12:2316:19 | ChiTotal | total:m2315_6 | +| ir.cpp:2316:12:2316:19 | SideEffect | ~m2315_6 | +| ir.cpp:2317:1:2317:1 | Address | &:r2317_1 | +| ir.cpp:2317:1:2317:1 | Address | &:r2317_1 | +| ir.cpp:2317:1:2317:1 | Arg(this) | this:r2317_1 | +| ir.cpp:2317:1:2317:1 | CallTarget | func:r2317_2 | +| ir.cpp:2317:1:2317:1 | ChiPartial | partial:m2317_4 | +| ir.cpp:2317:1:2317:1 | ChiPartial | partial:m2317_7 | +| ir.cpp:2317:1:2317:1 | ChiTotal | total:m2315_8 | +| ir.cpp:2317:1:2317:1 | ChiTotal | total:m2316_4 | +| ir.cpp:2317:1:2317:1 | SideEffect | m2315_8 | +| ir.cpp:2317:1:2317:1 | SideEffect | ~m2316_4 | +| ir.cpp:2327:32:2327:47 | Address | &:r2327_5 | +| ir.cpp:2327:32:2327:47 | ChiPartial | partial:m2327_3 | +| ir.cpp:2327:32:2327:47 | ChiTotal | total:m2327_2 | +| ir.cpp:2327:32:2327:47 | Load | m2329_3 | +| ir.cpp:2327:32:2327:47 | SideEffect | m2327_3 | +| ir.cpp:2329:9:2329:44 | Address | &:r2329_1 | +| ir.cpp:2329:16:2329:43 | StoreValue | r2329_2 | | perf-regression.cpp:6:3:6:5 | Address | &:r6_5 | | perf-regression.cpp:6:3:6:5 | Address | &:r6_5 | | perf-regression.cpp:6:3:6:5 | Address | &:r6_7 | @@ -10874,6 +12114,11 @@ | smart_ptr.cpp:12:24:12:28 | StoreValue | r12_7 | | smart_ptr.cpp:12:25:12:26 | Arg(0) | 0:r12_5 | | smart_ptr.cpp:12:25:12:26 | Unary | r12_4 | +| smart_ptr.cpp:13:1:13:1 | Address | &:r13_2 | +| smart_ptr.cpp:13:1:13:1 | Address | &:r13_2 | +| smart_ptr.cpp:13:1:13:1 | Arg(this) | this:r13_2 | +| smart_ptr.cpp:13:1:13:1 | CallTarget | func:r13_3 | +| smart_ptr.cpp:13:1:13:1 | SideEffect | m11_9 | | smart_ptr.cpp:17:6:17:24 | ChiPartial | partial:m17_3 | | smart_ptr.cpp:17:6:17:24 | ChiTotal | total:m17_2 | | smart_ptr.cpp:17:6:17:24 | SideEffect | ~m19_16 | @@ -10917,6 +12162,11 @@ | smart_ptr.cpp:19:20:19:21 | SideEffect | ~m18_8 | | smart_ptr.cpp:19:20:19:21 | Unary | r19_5 | | smart_ptr.cpp:19:20:19:21 | Unary | r19_6 | +| smart_ptr.cpp:20:1:20:1 | Address | &:r20_2 | +| smart_ptr.cpp:20:1:20:1 | Address | &:r20_2 | +| smart_ptr.cpp:20:1:20:1 | Arg(this) | this:r20_2 | +| smart_ptr.cpp:20:1:20:1 | CallTarget | func:r20_3 | +| smart_ptr.cpp:20:1:20:1 | SideEffect | m18_9 | | smart_ptr.cpp:28:6:28:27 | ChiPartial | partial:m28_3 | | smart_ptr.cpp:28:6:28:27 | ChiTotal | total:m28_2 | | smart_ptr.cpp:28:6:28:27 | SideEffect | ~m47_16 | @@ -11039,6 +12289,31 @@ | smart_ptr.cpp:47:43:47:63 | SideEffect | ~m47_16 | | smart_ptr.cpp:47:43:47:63 | Unary | r47_5 | | smart_ptr.cpp:47:43:47:63 | Unary | r47_6 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_2 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_2 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_7 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_7 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_12 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_12 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_17 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_17 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_22 | +| smart_ptr.cpp:48:1:48:1 | Address | &:r48_22 | +| smart_ptr.cpp:48:1:48:1 | Arg(this) | this:r48_2 | +| smart_ptr.cpp:48:1:48:1 | Arg(this) | this:r48_7 | +| smart_ptr.cpp:48:1:48:1 | Arg(this) | this:r48_12 | +| smart_ptr.cpp:48:1:48:1 | Arg(this) | this:r48_17 | +| smart_ptr.cpp:48:1:48:1 | Arg(this) | this:r48_22 | +| smart_ptr.cpp:48:1:48:1 | CallTarget | func:r48_3 | +| smart_ptr.cpp:48:1:48:1 | CallTarget | func:r48_8 | +| smart_ptr.cpp:48:1:48:1 | CallTarget | func:r48_13 | +| smart_ptr.cpp:48:1:48:1 | CallTarget | func:r48_18 | +| smart_ptr.cpp:48:1:48:1 | CallTarget | func:r48_23 | +| smart_ptr.cpp:48:1:48:1 | SideEffect | m29_2 | +| smart_ptr.cpp:48:1:48:1 | SideEffect | m33_2 | +| smart_ptr.cpp:48:1:48:1 | SideEffect | m37_2 | +| smart_ptr.cpp:48:1:48:1 | SideEffect | m41_2 | +| smart_ptr.cpp:48:1:48:1 | SideEffect | m45_2 | | struct_init.cpp:9:13:9:25 | Left | r9_3 | | struct_init.cpp:9:13:9:25 | Left | r9_3 | | struct_init.cpp:9:13:9:25 | SideEffect | ~m11_10 | diff --git a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected index 9913148c609..02bd6400025 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected @@ -3526,42 +3526,66 @@ ir.cpp: # 615| void DeclareObject() # 615| Block 0 -# 615| v615_1(void) = EnterFunction : -# 615| mu615_2(unknown) = AliasedDefinition : -# 615| mu615_3(unknown) = InitializeNonLocal : -# 616| r616_1(glval) = VariableAddress[s1] : -# 616| mu616_2(String) = Uninitialized[s1] : &:r616_1 -# 616| r616_3(glval) = FunctionAddress[String] : -# 616| v616_4(void) = Call[String] : func:r616_3, this:r616_1 -# 616| mu616_5(unknown) = ^CallSideEffect : ~m? -# 616| mu616_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r616_1 -# 617| r617_1(glval) = VariableAddress[s2] : -# 617| mu617_2(String) = Uninitialized[s2] : &:r617_1 -# 617| r617_3(glval) = FunctionAddress[String] : -# 617| r617_4(glval) = StringConstant["hello"] : -# 617| r617_5(char *) = Convert : r617_4 -# 617| v617_6(void) = Call[String] : func:r617_3, this:r617_1, 0:r617_5 -# 617| mu617_7(unknown) = ^CallSideEffect : ~m? -# 617| v617_8(void) = ^BufferReadSideEffect[0] : &:r617_5, ~m? -# 617| mu617_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r617_1 -# 618| r618_1(glval) = VariableAddress[s3] : -# 618| r618_2(glval) = FunctionAddress[ReturnObject] : -# 618| r618_3(String) = Call[ReturnObject] : func:r618_2 -# 618| mu618_4(unknown) = ^CallSideEffect : ~m? -# 618| mu618_5(String) = Store[s3] : &:r618_1, r618_3 -# 619| r619_1(glval) = VariableAddress[s4] : -# 619| mu619_2(String) = Uninitialized[s4] : &:r619_1 -# 619| r619_3(glval) = FunctionAddress[String] : -# 619| r619_4(glval) = StringConstant["test"] : -# 619| r619_5(char *) = Convert : r619_4 -# 619| v619_6(void) = Call[String] : func:r619_3, this:r619_1, 0:r619_5 -# 619| mu619_7(unknown) = ^CallSideEffect : ~m? -# 619| v619_8(void) = ^BufferReadSideEffect[0] : &:r619_5, ~m? -# 619| mu619_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r619_1 -# 620| v620_1(void) = NoOp : -# 615| v615_4(void) = ReturnVoid : -# 615| v615_5(void) = AliasedUse : ~m? -# 615| v615_6(void) = ExitFunction : +# 615| v615_1(void) = EnterFunction : +# 615| mu615_2(unknown) = AliasedDefinition : +# 615| mu615_3(unknown) = InitializeNonLocal : +# 616| r616_1(glval) = VariableAddress[s1] : +# 616| mu616_2(String) = Uninitialized[s1] : &:r616_1 +# 616| r616_3(glval) = FunctionAddress[String] : +# 616| v616_4(void) = Call[String] : func:r616_3, this:r616_1 +# 616| mu616_5(unknown) = ^CallSideEffect : ~m? +# 616| mu616_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r616_1 +# 617| r617_1(glval) = VariableAddress[s2] : +# 617| mu617_2(String) = Uninitialized[s2] : &:r617_1 +# 617| r617_3(glval) = FunctionAddress[String] : +# 617| r617_4(glval) = StringConstant["hello"] : +# 617| r617_5(char *) = Convert : r617_4 +# 617| v617_6(void) = Call[String] : func:r617_3, this:r617_1, 0:r617_5 +# 617| mu617_7(unknown) = ^CallSideEffect : ~m? +# 617| v617_8(void) = ^BufferReadSideEffect[0] : &:r617_5, ~m? +# 617| mu617_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r617_1 +# 618| r618_1(glval) = VariableAddress[s3] : +# 618| r618_2(glval) = FunctionAddress[ReturnObject] : +# 618| r618_3(String) = Call[ReturnObject] : func:r618_2 +# 618| mu618_4(unknown) = ^CallSideEffect : ~m? +# 618| mu618_5(String) = Store[s3] : &:r618_1, r618_3 +# 619| r619_1(glval) = VariableAddress[s4] : +# 619| mu619_2(String) = Uninitialized[s4] : &:r619_1 +# 619| r619_3(glval) = FunctionAddress[String] : +# 619| r619_4(glval) = StringConstant["test"] : +# 619| r619_5(char *) = Convert : r619_4 +# 619| v619_6(void) = Call[String] : func:r619_3, this:r619_1, 0:r619_5 +# 619| mu619_7(unknown) = ^CallSideEffect : ~m? +# 619| v619_8(void) = ^BufferReadSideEffect[0] : &:r619_5, ~m? +# 619| mu619_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r619_1 +# 620| v620_1(void) = NoOp : +# 620| r620_2(glval) = VariableAddress[s4] : +# 620| r620_3(glval) = FunctionAddress[~String] : +# 620| v620_4(void) = Call[~String] : func:r620_3, this:r620_2 +# 620| mu620_5(unknown) = ^CallSideEffect : ~m? +# 620| v620_6(void) = ^IndirectReadSideEffect[-1] : &:r620_2, ~m? +# 620| mu620_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r620_2 +# 620| r620_8(glval) = VariableAddress[s3] : +# 620| r620_9(glval) = FunctionAddress[~String] : +# 620| v620_10(void) = Call[~String] : func:r620_9, this:r620_8 +# 620| mu620_11(unknown) = ^CallSideEffect : ~m? +# 620| v620_12(void) = ^IndirectReadSideEffect[-1] : &:r620_8, ~m? +# 620| mu620_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r620_8 +# 620| r620_14(glval) = VariableAddress[s2] : +# 620| r620_15(glval) = FunctionAddress[~String] : +# 620| v620_16(void) = Call[~String] : func:r620_15, this:r620_14 +# 620| mu620_17(unknown) = ^CallSideEffect : ~m? +# 620| v620_18(void) = ^IndirectReadSideEffect[-1] : &:r620_14, ~m? +# 620| mu620_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r620_14 +# 620| r620_20(glval) = VariableAddress[s1] : +# 620| r620_21(glval) = FunctionAddress[~String] : +# 620| v620_22(void) = Call[~String] : func:r620_21, this:r620_20 +# 620| mu620_23(unknown) = ^CallSideEffect : ~m? +# 620| v620_24(void) = ^IndirectReadSideEffect[-1] : &:r620_20, ~m? +# 620| mu620_25(String) = ^IndirectMayWriteSideEffect[-1] : &:r620_20 +# 615| v615_4(void) = ReturnVoid : +# 615| v615_5(void) = AliasedUse : ~m? +# 615| v615_6(void) = ExitFunction : # 622| void CallMethods(String&, String*, String) # 622| Block 0 @@ -4924,6 +4948,24 @@ ir.cpp: # 839| r839_4(glval) = VariableAddress[pb] : # 839| mu839_5(Base *) = Store[pb] : &:r839_4, r839_3 # 840| v840_1(void) = NoOp : +# 840| r840_2(glval) = VariableAddress[d] : +# 840| r840_3(glval) = FunctionAddress[~Derived] : +# 840| v840_4(void) = Call[~Derived] : func:r840_3, this:r840_2 +# 840| mu840_5(unknown) = ^CallSideEffect : ~m? +# 840| v840_6(void) = ^IndirectReadSideEffect[-1] : &:r840_2, ~m? +# 840| mu840_7(Derived) = ^IndirectMayWriteSideEffect[-1] : &:r840_2 +# 840| r840_8(glval) = VariableAddress[m] : +# 840| r840_9(glval) = FunctionAddress[~Middle] : +# 840| v840_10(void) = Call[~Middle] : func:r840_9, this:r840_8 +# 840| mu840_11(unknown) = ^CallSideEffect : ~m? +# 840| v840_12(void) = ^IndirectReadSideEffect[-1] : &:r840_8, ~m? +# 840| mu840_13(Middle) = ^IndirectMayWriteSideEffect[-1] : &:r840_8 +# 840| r840_14(glval) = VariableAddress[b] : +# 840| r840_15(glval) = FunctionAddress[~Base] : +# 840| v840_16(void) = Call[~Base] : func:r840_15, this:r840_14 +# 840| mu840_17(unknown) = ^CallSideEffect : ~m? +# 840| v840_18(void) = ^IndirectReadSideEffect[-1] : &:r840_14, ~m? +# 840| mu840_19(Base) = ^IndirectMayWriteSideEffect[-1] : &:r840_14 # 799| v799_4(void) = ReturnVoid : # 799| v799_5(void) = AliasedUse : ~m? # 799| v799_6(void) = ExitFunction : @@ -4984,63 +5026,75 @@ ir.cpp: # 849| void DynamicCast() # 849| Block 0 -# 849| v849_1(void) = EnterFunction : -# 849| mu849_2(unknown) = AliasedDefinition : -# 849| mu849_3(unknown) = InitializeNonLocal : -# 850| r850_1(glval) = VariableAddress[b] : -# 850| mu850_2(PolymorphicBase) = Uninitialized[b] : &:r850_1 -# 850| r850_3(glval) = FunctionAddress[PolymorphicBase] : -# 850| v850_4(void) = Call[PolymorphicBase] : func:r850_3, this:r850_1 -# 850| mu850_5(unknown) = ^CallSideEffect : ~m? -# 850| mu850_6(PolymorphicBase) = ^IndirectMayWriteSideEffect[-1] : &:r850_1 -# 851| r851_1(glval) = VariableAddress[d] : -# 851| mu851_2(PolymorphicDerived) = Uninitialized[d] : &:r851_1 -# 851| r851_3(glval) = FunctionAddress[PolymorphicDerived] : -# 851| v851_4(void) = Call[PolymorphicDerived] : func:r851_3, this:r851_1 -# 851| mu851_5(unknown) = ^CallSideEffect : ~m? -# 851| mu851_6(PolymorphicDerived) = ^IndirectMayWriteSideEffect[-1] : &:r851_1 -# 853| r853_1(glval) = VariableAddress[pb] : -# 853| r853_2(glval) = VariableAddress[b] : -# 853| r853_3(PolymorphicBase *) = CopyValue : r853_2 -# 853| mu853_4(PolymorphicBase *) = Store[pb] : &:r853_1, r853_3 -# 854| r854_1(glval) = VariableAddress[pd] : -# 854| r854_2(glval) = VariableAddress[d] : -# 854| r854_3(PolymorphicDerived *) = CopyValue : r854_2 -# 854| mu854_4(PolymorphicDerived *) = Store[pd] : &:r854_1, r854_3 -# 857| r857_1(glval) = VariableAddress[pd] : -# 857| r857_2(PolymorphicDerived *) = Load[pd] : &:r857_1, ~m? -# 857| r857_3(PolymorphicBase *) = CheckedConvertOrNull : r857_2 -# 857| r857_4(glval) = VariableAddress[pb] : -# 857| mu857_5(PolymorphicBase *) = Store[pb] : &:r857_4, r857_3 -# 858| r858_1(glval) = VariableAddress[rb] : -# 858| r858_2(glval) = VariableAddress[d] : -# 858| r858_3(glval) = CheckedConvertOrThrow : r858_2 -# 858| r858_4(PolymorphicBase &) = CopyValue : r858_3 -# 858| mu858_5(PolymorphicBase &) = Store[rb] : &:r858_1, r858_4 -# 860| r860_1(glval) = VariableAddress[pb] : -# 860| r860_2(PolymorphicBase *) = Load[pb] : &:r860_1, ~m? -# 860| r860_3(PolymorphicDerived *) = CheckedConvertOrNull : r860_2 -# 860| r860_4(glval) = VariableAddress[pd] : -# 860| mu860_5(PolymorphicDerived *) = Store[pd] : &:r860_4, r860_3 -# 861| r861_1(glval) = VariableAddress[rd] : -# 861| r861_2(glval) = VariableAddress[b] : -# 861| r861_3(glval) = CheckedConvertOrThrow : r861_2 -# 861| r861_4(PolymorphicDerived &) = CopyValue : r861_3 -# 861| mu861_5(PolymorphicDerived &) = Store[rd] : &:r861_1, r861_4 -# 863| r863_1(glval) = VariableAddress[pv] : -# 863| r863_2(glval) = VariableAddress[pb] : -# 863| r863_3(PolymorphicBase *) = Load[pb] : &:r863_2, ~m? -# 863| r863_4(void *) = CompleteObjectAddress : r863_3 -# 863| mu863_5(void *) = Store[pv] : &:r863_1, r863_4 -# 864| r864_1(glval) = VariableAddress[pcv] : -# 864| r864_2(glval) = VariableAddress[pd] : -# 864| r864_3(PolymorphicDerived *) = Load[pd] : &:r864_2, ~m? -# 864| r864_4(void *) = CompleteObjectAddress : r864_3 -# 864| mu864_5(void *) = Store[pcv] : &:r864_1, r864_4 -# 865| v865_1(void) = NoOp : -# 849| v849_4(void) = ReturnVoid : -# 849| v849_5(void) = AliasedUse : ~m? -# 849| v849_6(void) = ExitFunction : +# 849| v849_1(void) = EnterFunction : +# 849| mu849_2(unknown) = AliasedDefinition : +# 849| mu849_3(unknown) = InitializeNonLocal : +# 850| r850_1(glval) = VariableAddress[b] : +# 850| mu850_2(PolymorphicBase) = Uninitialized[b] : &:r850_1 +# 850| r850_3(glval) = FunctionAddress[PolymorphicBase] : +# 850| v850_4(void) = Call[PolymorphicBase] : func:r850_3, this:r850_1 +# 850| mu850_5(unknown) = ^CallSideEffect : ~m? +# 850| mu850_6(PolymorphicBase) = ^IndirectMayWriteSideEffect[-1] : &:r850_1 +# 851| r851_1(glval) = VariableAddress[d] : +# 851| mu851_2(PolymorphicDerived) = Uninitialized[d] : &:r851_1 +# 851| r851_3(glval) = FunctionAddress[PolymorphicDerived] : +# 851| v851_4(void) = Call[PolymorphicDerived] : func:r851_3, this:r851_1 +# 851| mu851_5(unknown) = ^CallSideEffect : ~m? +# 851| mu851_6(PolymorphicDerived) = ^IndirectMayWriteSideEffect[-1] : &:r851_1 +# 853| r853_1(glval) = VariableAddress[pb] : +# 853| r853_2(glval) = VariableAddress[b] : +# 853| r853_3(PolymorphicBase *) = CopyValue : r853_2 +# 853| mu853_4(PolymorphicBase *) = Store[pb] : &:r853_1, r853_3 +# 854| r854_1(glval) = VariableAddress[pd] : +# 854| r854_2(glval) = VariableAddress[d] : +# 854| r854_3(PolymorphicDerived *) = CopyValue : r854_2 +# 854| mu854_4(PolymorphicDerived *) = Store[pd] : &:r854_1, r854_3 +# 857| r857_1(glval) = VariableAddress[pd] : +# 857| r857_2(PolymorphicDerived *) = Load[pd] : &:r857_1, ~m? +# 857| r857_3(PolymorphicBase *) = CheckedConvertOrNull : r857_2 +# 857| r857_4(glval) = VariableAddress[pb] : +# 857| mu857_5(PolymorphicBase *) = Store[pb] : &:r857_4, r857_3 +# 858| r858_1(glval) = VariableAddress[rb] : +# 858| r858_2(glval) = VariableAddress[d] : +# 858| r858_3(glval) = CheckedConvertOrThrow : r858_2 +# 858| r858_4(PolymorphicBase &) = CopyValue : r858_3 +# 858| mu858_5(PolymorphicBase &) = Store[rb] : &:r858_1, r858_4 +# 860| r860_1(glval) = VariableAddress[pb] : +# 860| r860_2(PolymorphicBase *) = Load[pb] : &:r860_1, ~m? +# 860| r860_3(PolymorphicDerived *) = CheckedConvertOrNull : r860_2 +# 860| r860_4(glval) = VariableAddress[pd] : +# 860| mu860_5(PolymorphicDerived *) = Store[pd] : &:r860_4, r860_3 +# 861| r861_1(glval) = VariableAddress[rd] : +# 861| r861_2(glval) = VariableAddress[b] : +# 861| r861_3(glval) = CheckedConvertOrThrow : r861_2 +# 861| r861_4(PolymorphicDerived &) = CopyValue : r861_3 +# 861| mu861_5(PolymorphicDerived &) = Store[rd] : &:r861_1, r861_4 +# 863| r863_1(glval) = VariableAddress[pv] : +# 863| r863_2(glval) = VariableAddress[pb] : +# 863| r863_3(PolymorphicBase *) = Load[pb] : &:r863_2, ~m? +# 863| r863_4(void *) = CompleteObjectAddress : r863_3 +# 863| mu863_5(void *) = Store[pv] : &:r863_1, r863_4 +# 864| r864_1(glval) = VariableAddress[pcv] : +# 864| r864_2(glval) = VariableAddress[pd] : +# 864| r864_3(PolymorphicDerived *) = Load[pd] : &:r864_2, ~m? +# 864| r864_4(void *) = CompleteObjectAddress : r864_3 +# 864| mu864_5(void *) = Store[pcv] : &:r864_1, r864_4 +# 865| v865_1(void) = NoOp : +# 865| r865_2(glval) = VariableAddress[d] : +# 865| r865_3(glval) = FunctionAddress[~PolymorphicDerived] : +# 865| v865_4(void) = Call[~PolymorphicDerived] : func:r865_3, this:r865_2 +# 865| mu865_5(unknown) = ^CallSideEffect : ~m? +# 865| v865_6(void) = ^IndirectReadSideEffect[-1] : &:r865_2, ~m? +# 865| mu865_7(PolymorphicDerived) = ^IndirectMayWriteSideEffect[-1] : &:r865_2 +# 865| r865_8(glval) = VariableAddress[b] : +# 865| r865_9(glval) = FunctionAddress[~PolymorphicBase] : +# 865| v865_10(void) = Call[~PolymorphicBase] : func:r865_9, this:r865_8 +# 865| mu865_11(unknown) = ^CallSideEffect : ~m? +# 865| v865_12(void) = ^IndirectReadSideEffect[-1] : &:r865_8, ~m? +# 865| mu865_13(PolymorphicBase) = ^IndirectMayWriteSideEffect[-1] : &:r865_8 +# 849| v849_4(void) = ReturnVoid : +# 849| v849_5(void) = AliasedUse : ~m? +# 849| v849_6(void) = ExitFunction : # 867| void String::String() # 867| Block 0 @@ -6038,6 +6092,18 @@ ir.cpp: # 1055| mu1055_6(unknown) = ^CallSideEffect : ~m? # 1055| v1055_7(void) = ^IndirectReadSideEffect[-1] : &:r1055_2, ~m? # 1056| v1056_1(void) = NoOp : +# 1056| r1056_2(glval) = VariableAddress[lambda_val_explicit] : +# 1056| r1056_3(glval) = FunctionAddress[~] : +# 1056| v1056_4(void) = Call[~] : func:r1056_3, this:r1056_2 +# 1056| mu1056_5(unknown) = ^CallSideEffect : ~m? +# 1056| v1056_6(void) = ^IndirectReadSideEffect[-1] : &:r1056_2, ~m? +# 1056| mu1056_7(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r1056_2 +# 1056| r1056_8(glval) = VariableAddress[lambda_val] : +# 1056| r1056_9(glval) = FunctionAddress[~] : +# 1056| v1056_10(void) = Call[~] : func:r1056_9, this:r1056_8 +# 1056| mu1056_11(unknown) = ^CallSideEffect : ~m? +# 1056| v1056_12(void) = ^IndirectReadSideEffect[-1] : &:r1056_8, ~m? +# 1056| mu1056_13(decltype([...](...){...})) = ^IndirectMayWriteSideEffect[-1] : &:r1056_8 # 1040| v1040_10(void) = ReturnIndirection[s] : &:r1040_8, ~m? # 1040| v1040_11(void) = ReturnVoid : # 1040| v1040_12(void) = AliasedUse : ~m? @@ -7307,6 +7373,12 @@ ir.cpp: # 1288| v1288_5(void) = Call[static_member_without_def] : func:r1288_4 # 1288| mu1288_6(unknown) = ^CallSideEffect : ~m? # 1289| v1289_1(void) = NoOp : +# 1289| r1289_2(glval) = VariableAddress[c] : +# 1289| r1289_3(glval) = FunctionAddress[~C] : +# 1289| v1289_4(void) = Call[~C] : func:r1289_3, this:r1289_2 +# 1289| mu1289_5(unknown) = ^CallSideEffect : ~m? +# 1289| v1289_6(void) = ^IndirectReadSideEffect[-1] : &:r1289_2, ~m? +# 1289| mu1289_7(C) = ^IndirectMayWriteSideEffect[-1] : &:r1289_2 # 1272| v1272_10(void) = ReturnIndirection[a_arg] : &:r1272_8, ~m? # 1272| v1272_11(void) = ReturnVoid : # 1272| v1272_12(void) = AliasedUse : ~m? @@ -7821,6 +7893,12 @@ ir.cpp: # 1378| mu1378_4(unknown) = ^CallSideEffect : ~m? # 1378| mu1378_5(String) = Store[#temp1378:5] : &:r1378_1, r1378_3 # 1379| v1379_1(void) = NoOp : +# 1379| r1379_2(glval) = VariableAddress[s] : +# 1379| r1379_3(glval) = FunctionAddress[~String] : +# 1379| v1379_4(void) = Call[~String] : func:r1379_3, this:r1379_2 +# 1379| mu1379_5(unknown) = ^CallSideEffect : ~m? +# 1379| v1379_6(void) = ^IndirectReadSideEffect[-1] : &:r1379_2, ~m? +# 1379| mu1379_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r1379_2 # 1367| v1367_4(void) = ReturnVoid : # 1367| v1367_5(void) = AliasedUse : ~m? # 1367| v1367_6(void) = ExitFunction : @@ -7885,6 +7963,18 @@ ir.cpp: # 1390| mu1390_4(unknown) = ^CallSideEffect : ~m? # 1390| mu1390_5(destructor_only) = Store[#temp1390:5] : &:r1390_1, r1390_3 # 1391| v1391_1(void) = NoOp : +# 1391| r1391_2(glval) = VariableAddress[d2] : +# 1391| r1391_3(glval) = FunctionAddress[~destructor_only] : +# 1391| v1391_4(void) = Call[~destructor_only] : func:r1391_3, this:r1391_2 +# 1391| mu1391_5(unknown) = ^CallSideEffect : ~m? +# 1391| v1391_6(void) = ^IndirectReadSideEffect[-1] : &:r1391_2, ~m? +# 1391| mu1391_7(destructor_only) = ^IndirectMayWriteSideEffect[-1] : &:r1391_2 +# 1391| r1391_8(glval) = VariableAddress[d] : +# 1391| r1391_9(glval) = FunctionAddress[~destructor_only] : +# 1391| v1391_10(void) = Call[~destructor_only] : func:r1391_9, this:r1391_8 +# 1391| mu1391_11(unknown) = ^CallSideEffect : ~m? +# 1391| v1391_12(void) = ^IndirectReadSideEffect[-1] : &:r1391_8, ~m? +# 1391| mu1391_13(destructor_only) = ^IndirectMayWriteSideEffect[-1] : &:r1391_8 # 1381| v1381_4(void) = ReturnVoid : # 1381| v1381_5(void) = AliasedUse : ~m? # 1381| v1381_6(void) = ExitFunction : @@ -10431,6 +10521,12 @@ ir.cpp: # 1927| r1927_5(glval) = VariableAddress[z] : # 1927| mu1927_6(int) = Store[z] : &:r1927_5, r1927_3 # 1928| v1928_1(void) = NoOp : +# 1928| r1928_2(glval) = VariableAddress[c] : +# 1928| r1928_3(glval) = FunctionAddress[~C] : +# 1928| v1928_4(void) = Call[~C] : func:r1928_3, this:r1928_2 +# 1928| mu1928_5(unknown) = ^CallSideEffect : ~m? +# 1928| v1928_6(void) = ^IndirectReadSideEffect[-1] : &:r1928_2, ~m? +# 1928| mu1928_7(C) = ^IndirectMayWriteSideEffect[-1] : &:r1928_2 # 1920| v1920_4(void) = ReturnVoid : # 1920| v1920_5(void) = AliasedUse : ~m? # 1920| v1920_6(void) = ExitFunction : @@ -10664,6 +10760,12 @@ ir.cpp: # 1995| r1995_3(glval<..(*)(..)>) = VariableAddress[pfn] : # 1995| mu1995_4(..(*)(..)) = Store[pfn] : &:r1995_3, r1995_2 # 1996| v1996_1(void) = NoOp : +# 1996| r1996_2(glval) = VariableAddress[c] : +# 1996| r1996_3(glval) = FunctionAddress[~C] : +# 1996| v1996_4(void) = Call[~C] : func:r1996_3, this:r1996_2 +# 1996| mu1996_5(unknown) = ^CallSideEffect : ~m? +# 1996| v1996_6(void) = ^IndirectReadSideEffect[-1] : &:r1996_2, ~m? +# 1996| mu1996_7(C) = ^IndirectMayWriteSideEffect[-1] : &:r1996_2 # 1992| v1992_4(void) = ReturnVoid : # 1992| v1992_5(void) = AliasedUse : ~m? # 1992| v1992_6(void) = ExitFunction : @@ -11835,13 +11937,19 @@ ir.cpp: # 2137| v2137_10(void) = ExitFunction : # 2139| Block 2 -# 2139| r2139_1(glval) = VariableAddress[x] : -# 2139| r2139_2(glval) = FunctionAddress[set_x] : -# 2139| r2139_3(char) = Constant[97] : -# 2139| v2139_4(void) = Call[set_x] : func:r2139_2, this:r2139_1, 0:r2139_3 -# 2139| mu2139_5(unknown) = ^CallSideEffect : ~m? -# 2139| v2139_6(void) = ^IndirectReadSideEffect[-1] : &:r2139_1, ~m? -# 2139| mu2139_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2139_1 +# 2139| r2139_1(glval) = VariableAddress[x] : +# 2139| r2139_2(glval) = FunctionAddress[set_x] : +# 2139| r2139_3(char) = Constant[97] : +# 2139| v2139_4(void) = Call[set_x] : func:r2139_2, this:r2139_1, 0:r2139_3 +# 2139| mu2139_5(unknown) = ^CallSideEffect : ~m? +# 2139| v2139_6(void) = ^IndirectReadSideEffect[-1] : &:r2139_1, ~m? +# 2139| mu2139_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2139_1 +# 2139| r2139_8(glval) = VariableAddress[x] : +# 2139| r2139_9(glval) = FunctionAddress[~ClassWithDestructor] : +# 2139| v2139_10(void) = Call[~ClassWithDestructor] : func:r2139_9, this:r2139_8 +# 2139| mu2139_11(unknown) = ^CallSideEffect : ~m? +# 2139| v2139_12(void) = ^IndirectReadSideEffect[-1] : &:r2139_8, ~m? +# 2139| mu2139_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2139_8 #-----| Goto -> Block 3 # 2141| Block 3 @@ -11853,7 +11961,7 @@ ir.cpp: # 2141| mu2141_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2141_1 # 2141| r2141_7(bool) = Constant[1] : # 2141| v2141_8(void) = ConditionalBranch : r2141_7 -#-----| False -> Block 5 +#-----| False -> Block 6 #-----| True -> Block 4 # 2142| Block 4 @@ -11864,9 +11972,18 @@ ir.cpp: # 2142| mu2142_5(unknown) = ^CallSideEffect : ~m? # 2142| v2142_6(void) = ^IndirectReadSideEffect[-1] : &:r2142_1, ~m? # 2142| mu2142_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2142_1 -#-----| Goto -> Block 5 +#-----| Goto -> Block 6 -# 2144| Block 5 +# 2142| Block 5 +# 2142| r2142_8(glval) = VariableAddress[x] : +# 2142| r2142_9(glval) = FunctionAddress[~ClassWithDestructor] : +# 2142| v2142_10(void) = Call[~ClassWithDestructor] : func:r2142_9, this:r2142_8 +# 2142| mu2142_11(unknown) = ^CallSideEffect : ~m? +# 2142| v2142_12(void) = ^IndirectReadSideEffect[-1] : &:r2142_8, ~m? +# 2142| mu2142_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2142_8 +#-----| Goto -> Block 6 + +# 2144| Block 6 # 2144| r2144_1(glval) = VariableAddress[x] : # 2144| mu2144_2(ClassWithDestructor) = Uninitialized[x] : &:r2144_1 # 2144| r2144_3(glval) = FunctionAddress[ClassWithDestructor] : @@ -11877,10 +11994,10 @@ ir.cpp: # 2144| r2144_8(char) = Load[c] : &:r2144_7, ~m? # 2144| r2144_9(int) = Convert : r2144_8 # 2144| v2144_10(void) = Switch : r2144_9 -#-----| Case[97] -> Block 6 -#-----| Default -> Block 7 +#-----| Case[97] -> Block 7 +#-----| Default -> Block 8 -# 2145| Block 6 +# 2145| Block 7 # 2145| v2145_1(void) = NoOp : # 2146| r2146_1(glval) = VariableAddress[x] : # 2146| r2146_2(glval) = FunctionAddress[set_x] : @@ -11890,9 +12007,9 @@ ir.cpp: # 2146| v2146_6(void) = ^IndirectReadSideEffect[-1] : &:r2146_1, ~m? # 2146| mu2146_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2146_1 # 2147| v2147_1(void) = NoOp : -#-----| Goto -> Block 8 +#-----| Goto -> Block 10 -# 2148| Block 7 +# 2148| Block 8 # 2148| v2148_1(void) = NoOp : # 2149| r2149_1(glval) = VariableAddress[x] : # 2149| r2149_2(glval) = FunctionAddress[set_x] : @@ -11902,10 +12019,19 @@ ir.cpp: # 2149| v2149_6(void) = ^IndirectReadSideEffect[-1] : &:r2149_1, ~m? # 2149| mu2149_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2149_1 # 2150| v2150_1(void) = NoOp : -#-----| Goto -> Block 8 +#-----| Goto -> Block 10 -# 2151| Block 8 -# 2151| v2151_1(void) = NoOp : +# 2151| Block 9 +# 2151| r2151_1(glval) = VariableAddress[x] : +# 2151| r2151_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2151| v2151_3(void) = Call[~ClassWithDestructor] : func:r2151_2, this:r2151_1 +# 2151| mu2151_4(unknown) = ^CallSideEffect : ~m? +# 2151| v2151_5(void) = ^IndirectReadSideEffect[-1] : &:r2151_1, ~m? +# 2151| mu2151_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2151_1 +#-----| Goto -> Block 10 + +# 2151| Block 10 +# 2151| v2151_7(void) = NoOp : # 2153| r2153_1(glval) = VariableAddress[x] : # 2153| mu2153_2(ClassWithDestructor) = Uninitialized[x] : &:r2153_1 # 2153| r2153_3(glval) = FunctionAddress[ClassWithDestructor] : @@ -11947,9 +12073,9 @@ ir.cpp: # 2154| mu2154_28(unknown) = ^CallSideEffect : ~m? #-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m? # 2154| mu2154_29(iterator) = Store[(__end)] : &:r2154_23, r2154_27 -#-----| Goto -> Block 9 +#-----| Goto -> Block 11 -# 2154| Block 9 +# 2154| Block 11 # 2154| r2154_30(glval) = VariableAddress[(__begin)] : #-----| r0_7(glval) = Convert : r2154_30 # 2154| r2154_31(glval) = FunctionAddress[operator!=] : @@ -11959,36 +12085,51 @@ ir.cpp: # 2154| mu2154_35(unknown) = ^CallSideEffect : ~m? #-----| v0_8(void) = ^IndirectReadSideEffect[-1] : &:r0_7, ~m? # 2154| v2154_36(void) = ConditionalBranch : r2154_34 -#-----| False -> Block 11 -#-----| True -> Block 10 +#-----| False -> Block 14 +#-----| True -> Block 12 -# 2154| Block 10 -# 2154| r2154_37(glval) = VariableAddress[y] : -# 2154| r2154_38(glval) = VariableAddress[(__begin)] : -#-----| r0_9(glval) = Convert : r2154_38 -# 2154| r2154_39(glval) = FunctionAddress[operator*] : -# 2154| r2154_40(ClassWithDestructor &) = Call[operator*] : func:r2154_39, this:r0_9 -# 2154| mu2154_41(unknown) = ^CallSideEffect : ~m? -#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_9, ~m? -# 2154| r2154_42(ClassWithDestructor) = Load[?] : &:r2154_40, ~m? -# 2154| mu2154_43(ClassWithDestructor) = Store[y] : &:r2154_37, r2154_42 -# 2155| r2155_1(glval) = VariableAddress[y] : -# 2155| r2155_2(glval) = FunctionAddress[set_x] : -# 2155| r2155_3(char) = Constant[97] : -# 2155| v2155_4(void) = Call[set_x] : func:r2155_2, this:r2155_1, 0:r2155_3 -# 2155| mu2155_5(unknown) = ^CallSideEffect : ~m? -# 2155| v2155_6(void) = ^IndirectReadSideEffect[-1] : &:r2155_1, ~m? -# 2155| mu2155_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2155_1 -# 2154| r2154_44(glval) = VariableAddress[(__begin)] : -# 2154| r2154_45(glval) = FunctionAddress[operator++] : -# 2154| r2154_46(iterator &) = Call[operator++] : func:r2154_45, this:r2154_44 -# 2154| mu2154_47(unknown) = ^CallSideEffect : ~m? -# 2154| v2154_48(void) = ^IndirectReadSideEffect[-1] : &:r2154_44, ~m? -# 2154| mu2154_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2154_44 -# 2154| r2154_50(glval) = CopyValue : r2154_46 -#-----| Goto (back edge) -> Block 9 +# 2154| Block 12 +# 2154| r2154_37(glval) = VariableAddress[y] : +# 2154| r2154_38(glval) = VariableAddress[(__begin)] : +#-----| r0_9(glval) = Convert : r2154_38 +# 2154| r2154_39(glval) = FunctionAddress[operator*] : +# 2154| r2154_40(ClassWithDestructor &) = Call[operator*] : func:r2154_39, this:r0_9 +# 2154| mu2154_41(unknown) = ^CallSideEffect : ~m? +#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_9, ~m? +# 2154| r2154_42(ClassWithDestructor) = Load[?] : &:r2154_40, ~m? +# 2154| mu2154_43(ClassWithDestructor) = Store[y] : &:r2154_37, r2154_42 +# 2155| r2155_1(glval) = VariableAddress[y] : +# 2155| r2155_2(glval) = FunctionAddress[set_x] : +# 2155| r2155_3(char) = Constant[97] : +# 2155| v2155_4(void) = Call[set_x] : func:r2155_2, this:r2155_1, 0:r2155_3 +# 2155| mu2155_5(unknown) = ^CallSideEffect : ~m? +# 2155| v2155_6(void) = ^IndirectReadSideEffect[-1] : &:r2155_1, ~m? +# 2155| mu2155_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2155_1 +# 2154| r2154_44(glval) = VariableAddress[y] : +# 2154| r2154_45(glval) = FunctionAddress[~ClassWithDestructor] : +# 2154| v2154_46(void) = Call[~ClassWithDestructor] : func:r2154_45, this:r2154_44 +# 2154| mu2154_47(unknown) = ^CallSideEffect : ~m? +# 2154| v2154_48(void) = ^IndirectReadSideEffect[-1] : &:r2154_44, ~m? +# 2154| mu2154_49(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2154_44 +# 2154| r2154_50(glval) = VariableAddress[(__begin)] : +# 2154| r2154_51(glval) = FunctionAddress[operator++] : +# 2154| r2154_52(iterator &) = Call[operator++] : func:r2154_51, this:r2154_50 +# 2154| mu2154_53(unknown) = ^CallSideEffect : ~m? +# 2154| v2154_54(void) = ^IndirectReadSideEffect[-1] : &:r2154_50, ~m? +# 2154| mu2154_55(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2154_50 +# 2154| r2154_56(glval) = CopyValue : r2154_52 +#-----| Goto (back edge) -> Block 11 -# 2157| Block 11 +# 2154| Block 13 +# 2154| r2154_57(glval>) = VariableAddress[ys] : +# 2154| r2154_58(glval) = FunctionAddress[~vector] : +# 2154| v2154_59(void) = Call[~vector] : func:r2154_58, this:r2154_57 +# 2154| mu2154_60(unknown) = ^CallSideEffect : ~m? +# 2154| v2154_61(void) = ^IndirectReadSideEffect[-1] : &:r2154_57, ~m? +# 2154| mu2154_62(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2154_57 +#-----| Goto -> Block 14 + +# 2157| Block 14 # 2157| r2157_1(glval>) = VariableAddress[ys] : # 2157| mu2157_2(vector) = Uninitialized[ys] : &:r2157_1 # 2157| r2157_3(glval) = FunctionAddress[vector] : @@ -12024,9 +12165,9 @@ ir.cpp: # 2157| mu2157_28(unknown) = ^CallSideEffect : ~m? #-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m? # 2157| mu2157_29(iterator) = Store[(__end)] : &:r2157_23, r2157_27 -#-----| Goto -> Block 12 +#-----| Goto -> Block 15 -# 2157| Block 12 +# 2157| Block 15 # 2157| r2157_30(glval) = VariableAddress[(__begin)] : #-----| r0_17(glval) = Convert : r2157_30 # 2157| r2157_31(glval) = FunctionAddress[operator!=] : @@ -12036,29 +12177,19 @@ ir.cpp: # 2157| mu2157_35(unknown) = ^CallSideEffect : ~m? #-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m? # 2157| v2157_36(void) = ConditionalBranch : r2157_34 -#-----| False -> Block 16 -#-----| True -> Block 14 +#-----| False -> Block 20 +#-----| True -> Block 16 -# 2157| Block 13 -# 2157| r2157_37(glval) = VariableAddress[(__begin)] : -# 2157| r2157_38(glval) = FunctionAddress[operator++] : -# 2157| r2157_39(iterator &) = Call[operator++] : func:r2157_38, this:r2157_37 -# 2157| mu2157_40(unknown) = ^CallSideEffect : ~m? -# 2157| v2157_41(void) = ^IndirectReadSideEffect[-1] : &:r2157_37, ~m? -# 2157| mu2157_42(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2157_37 -# 2157| r2157_43(glval) = CopyValue : r2157_39 -#-----| Goto (back edge) -> Block 12 - -# 2157| Block 14 -# 2157| r2157_44(glval) = VariableAddress[y] : -# 2157| r2157_45(glval) = VariableAddress[(__begin)] : -#-----| r0_19(glval) = Convert : r2157_45 -# 2157| r2157_46(glval) = FunctionAddress[operator*] : -# 2157| r2157_47(ClassWithDestructor &) = Call[operator*] : func:r2157_46, this:r0_19 -# 2157| mu2157_48(unknown) = ^CallSideEffect : ~m? +# 2157| Block 16 +# 2157| r2157_37(glval) = VariableAddress[y] : +# 2157| r2157_38(glval) = VariableAddress[(__begin)] : +#-----| r0_19(glval) = Convert : r2157_38 +# 2157| r2157_39(glval) = FunctionAddress[operator*] : +# 2157| r2157_40(ClassWithDestructor &) = Call[operator*] : func:r2157_39, this:r0_19 +# 2157| mu2157_41(unknown) = ^CallSideEffect : ~m? #-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m? -# 2157| r2157_49(ClassWithDestructor) = Load[?] : &:r2157_47, ~m? -# 2157| mu2157_50(ClassWithDestructor) = Store[y] : &:r2157_44, r2157_49 +# 2157| r2157_42(ClassWithDestructor) = Load[?] : &:r2157_40, ~m? +# 2157| mu2157_43(ClassWithDestructor) = Store[y] : &:r2157_37, r2157_42 # 2158| r2158_1(glval) = VariableAddress[y] : # 2158| r2158_2(glval) = FunctionAddress[set_x] : # 2158| r2158_3(char) = Constant[97] : @@ -12076,14 +12207,57 @@ ir.cpp: # 2159| r2159_8(int) = Constant[98] : # 2159| r2159_9(bool) = CompareEQ : r2159_7, r2159_8 # 2159| v2159_10(void) = ConditionalBranch : r2159_9 -#-----| False -> Block 13 -#-----| True -> Block 15 +#-----| False -> Block 18 +#-----| True -> Block 17 -# 2160| Block 15 -# 2160| v2160_1(void) = NoOp : +# 2160| Block 17 +# 2160| v2160_1(void) = NoOp : +# 2157| r2157_44(glval) = VariableAddress[y] : +# 2157| r2157_45(glval) = FunctionAddress[~ClassWithDestructor] : +# 2157| v2157_46(void) = Call[~ClassWithDestructor] : func:r2157_45, this:r2157_44 +# 2157| mu2157_47(unknown) = ^CallSideEffect : ~m? +# 2157| v2157_48(void) = ^IndirectReadSideEffect[-1] : &:r2157_44, ~m? +# 2157| mu2157_49(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2157_44 +# 2157| r2157_50(glval>) = VariableAddress[ys] : +# 2157| r2157_51(glval) = FunctionAddress[~vector] : +# 2157| v2157_52(void) = Call[~vector] : func:r2157_51, this:r2157_50 +# 2157| mu2157_53(unknown) = ^CallSideEffect : ~m? +# 2157| v2157_54(void) = ^IndirectReadSideEffect[-1] : &:r2157_50, ~m? +# 2157| mu2157_55(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2157_50 +# 2172| r2172_1(glval) = VariableAddress[x] : +# 2172| r2172_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2172| v2172_3(void) = Call[~ClassWithDestructor] : func:r2172_2, this:r2172_1 +# 2172| mu2172_4(unknown) = ^CallSideEffect : ~m? +# 2172| v2172_5(void) = ^IndirectReadSideEffect[-1] : &:r2172_1, ~m? +# 2172| mu2172_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2172_1 #-----| Goto -> Block 1 -# 2163| Block 16 +# 2157| Block 18 +# 2157| r2157_56(glval) = VariableAddress[y] : +# 2157| r2157_57(glval) = FunctionAddress[~ClassWithDestructor] : +# 2157| v2157_58(void) = Call[~ClassWithDestructor] : func:r2157_57, this:r2157_56 +# 2157| mu2157_59(unknown) = ^CallSideEffect : ~m? +# 2157| v2157_60(void) = ^IndirectReadSideEffect[-1] : &:r2157_56, ~m? +# 2157| mu2157_61(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2157_56 +# 2157| r2157_62(glval) = VariableAddress[(__begin)] : +# 2157| r2157_63(glval) = FunctionAddress[operator++] : +# 2157| r2157_64(iterator &) = Call[operator++] : func:r2157_63, this:r2157_62 +# 2157| mu2157_65(unknown) = ^CallSideEffect : ~m? +# 2157| v2157_66(void) = ^IndirectReadSideEffect[-1] : &:r2157_62, ~m? +# 2157| mu2157_67(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2157_62 +# 2157| r2157_68(glval) = CopyValue : r2157_64 +#-----| Goto (back edge) -> Block 15 + +# 2157| Block 19 +# 2157| r2157_69(glval>) = VariableAddress[ys] : +# 2157| r2157_70(glval) = FunctionAddress[~vector] : +# 2157| v2157_71(void) = Call[~vector] : func:r2157_70, this:r2157_69 +# 2157| mu2157_72(unknown) = ^CallSideEffect : ~m? +# 2157| v2157_73(void) = ^IndirectReadSideEffect[-1] : &:r2157_69, ~m? +# 2157| mu2157_74(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2157_69 +#-----| Goto -> Block 20 + +# 2163| Block 20 # 2163| r2163_1(glval>) = VariableAddress[ys] : # 2163| mu2163_2(vector) = Uninitialized[ys] : &:r2163_1 # 2163| r2163_3(glval) = FunctionAddress[vector] : @@ -12115,9 +12289,9 @@ ir.cpp: # 2163| mu2163_24(unknown) = ^CallSideEffect : ~m? #-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_25, ~m? # 2163| mu2163_25(iterator) = Store[(__end)] : &:r2163_19, r2163_23 -#-----| Goto -> Block 17 +#-----| Goto -> Block 21 -# 2163| Block 17 +# 2163| Block 21 # 2163| r2163_26(glval) = VariableAddress[(__begin)] : #-----| r0_27(glval) = Convert : r2163_26 # 2163| r2163_27(glval) = FunctionAddress[operator!=] : @@ -12127,10 +12301,10 @@ ir.cpp: # 2163| mu2163_31(unknown) = ^CallSideEffect : ~m? #-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? # 2163| v2163_32(void) = ConditionalBranch : r2163_30 -#-----| False -> Block 21 -#-----| True -> Block 19 +#-----| False -> Block 26 +#-----| True -> Block 23 -# 2163| Block 18 +# 2163| Block 22 # 2163| r2163_33(glval) = VariableAddress[(__begin)] : # 2163| r2163_34(glval) = FunctionAddress[operator++] : # 2163| r2163_35(iterator &) = Call[operator++] : func:r2163_34, this:r2163_33 @@ -12138,9 +12312,9 @@ ir.cpp: # 2163| v2163_37(void) = ^IndirectReadSideEffect[-1] : &:r2163_33, ~m? # 2163| mu2163_38(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2163_33 # 2163| r2163_39(glval) = CopyValue : r2163_35 -#-----| Goto (back edge) -> Block 17 +#-----| Goto (back edge) -> Block 21 -# 2163| Block 19 +# 2163| Block 23 # 2163| r2163_40(glval) = VariableAddress[y] : # 2163| r2163_41(glval) = VariableAddress[(__begin)] : #-----| r0_29(glval) = Convert : r2163_41 @@ -12155,14 +12329,35 @@ ir.cpp: # 2164| r2164_3(int) = Constant[1] : # 2164| r2164_4(bool) = CompareEQ : r2164_2, r2164_3 # 2164| v2164_5(void) = ConditionalBranch : r2164_4 -#-----| False -> Block 18 -#-----| True -> Block 20 +#-----| False -> Block 22 +#-----| True -> Block 24 -# 2165| Block 20 -# 2165| v2165_1(void) = NoOp : +# 2165| Block 24 +# 2165| v2165_1(void) = NoOp : +# 2163| r2163_47(glval>) = VariableAddress[ys] : +# 2163| r2163_48(glval) = FunctionAddress[~vector] : +# 2163| v2163_49(void) = Call[~vector] : func:r2163_48, this:r2163_47 +# 2163| mu2163_50(unknown) = ^CallSideEffect : ~m? +# 2163| v2163_51(void) = ^IndirectReadSideEffect[-1] : &:r2163_47, ~m? +# 2163| mu2163_52(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2163_47 +# 2172| r2172_7(glval) = VariableAddress[x] : +# 2172| r2172_8(glval) = FunctionAddress[~ClassWithDestructor] : +# 2172| v2172_9(void) = Call[~ClassWithDestructor] : func:r2172_8, this:r2172_7 +# 2172| mu2172_10(unknown) = ^CallSideEffect : ~m? +# 2172| v2172_11(void) = ^IndirectReadSideEffect[-1] : &:r2172_7, ~m? +# 2172| mu2172_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2172_7 #-----| Goto -> Block 1 -# 2168| Block 21 +# 2163| Block 25 +# 2163| r2163_53(glval>) = VariableAddress[ys] : +# 2163| r2163_54(glval) = FunctionAddress[~vector] : +# 2163| v2163_55(void) = Call[~vector] : func:r2163_54, this:r2163_53 +# 2163| mu2163_56(unknown) = ^CallSideEffect : ~m? +# 2163| v2163_57(void) = ^IndirectReadSideEffect[-1] : &:r2163_53, ~m? +# 2163| mu2163_58(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2163_53 +#-----| Goto -> Block 26 + +# 2168| Block 26 # 2168| r2168_1(glval>) = VariableAddress[ys] : # 2168| mu2168_2(vector) = Uninitialized[ys] : &:r2168_1 # 2168| r2168_3(glval) = FunctionAddress[vector] : @@ -12198,9 +12393,9 @@ ir.cpp: # 2168| mu2168_28(unknown) = ^CallSideEffect : ~m? #-----| v0_36(void) = ^IndirectReadSideEffect[-1] : &:r0_35, ~m? # 2168| mu2168_29(iterator) = Store[(__end)] : &:r2168_23, r2168_27 -#-----| Goto -> Block 22 +#-----| Goto -> Block 27 -# 2168| Block 22 +# 2168| Block 27 # 2168| r2168_30(glval) = VariableAddress[(__begin)] : #-----| r0_37(glval) = Convert : r2168_30 # 2168| r2168_31(glval) = FunctionAddress[operator!=] : @@ -12210,42 +12405,75 @@ ir.cpp: # 2168| mu2168_35(unknown) = ^CallSideEffect : ~m? #-----| v0_38(void) = ^IndirectReadSideEffect[-1] : &:r0_37, ~m? # 2168| v2168_36(void) = ConditionalBranch : r2168_34 -#-----| False -> Block 24 -#-----| True -> Block 23 +#-----| False -> Block 30 +#-----| True -> Block 28 -# 2168| Block 23 -# 2168| r2168_37(glval) = VariableAddress[y] : -# 2168| r2168_38(glval) = VariableAddress[(__begin)] : -#-----| r0_39(glval) = Convert : r2168_38 -# 2168| r2168_39(glval) = FunctionAddress[operator*] : -# 2168| r2168_40(ClassWithDestructor &) = Call[operator*] : func:r2168_39, this:r0_39 -# 2168| mu2168_41(unknown) = ^CallSideEffect : ~m? -#-----| v0_40(void) = ^IndirectReadSideEffect[-1] : &:r0_39, ~m? -# 2168| r2168_42(ClassWithDestructor) = Load[?] : &:r2168_40, ~m? -# 2168| mu2168_43(ClassWithDestructor) = Store[y] : &:r2168_37, r2168_42 -# 2169| r2169_1(glval) = VariableAddress[z1] : -# 2169| mu2169_2(ClassWithDestructor) = Uninitialized[z1] : &:r2169_1 -# 2169| r2169_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2169| v2169_4(void) = Call[ClassWithDestructor] : func:r2169_3, this:r2169_1 -# 2169| mu2169_5(unknown) = ^CallSideEffect : ~m? -# 2169| mu2169_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2169_1 -# 2170| r2170_1(glval) = VariableAddress[z2] : -# 2170| mu2170_2(ClassWithDestructor) = Uninitialized[z2] : &:r2170_1 -# 2170| r2170_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2170| v2170_4(void) = Call[ClassWithDestructor] : func:r2170_3, this:r2170_1 -# 2170| mu2170_5(unknown) = ^CallSideEffect : ~m? -# 2170| mu2170_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2170_1 -# 2168| r2168_44(glval) = VariableAddress[(__begin)] : -# 2168| r2168_45(glval) = FunctionAddress[operator++] : -# 2168| r2168_46(iterator &) = Call[operator++] : func:r2168_45, this:r2168_44 -# 2168| mu2168_47(unknown) = ^CallSideEffect : ~m? -# 2168| v2168_48(void) = ^IndirectReadSideEffect[-1] : &:r2168_44, ~m? -# 2168| mu2168_49(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2168_44 -# 2168| r2168_50(glval) = CopyValue : r2168_46 -#-----| Goto (back edge) -> Block 22 +# 2168| Block 28 +# 2168| r2168_37(glval) = VariableAddress[y] : +# 2168| r2168_38(glval) = VariableAddress[(__begin)] : +#-----| r0_39(glval) = Convert : r2168_38 +# 2168| r2168_39(glval) = FunctionAddress[operator*] : +# 2168| r2168_40(ClassWithDestructor &) = Call[operator*] : func:r2168_39, this:r0_39 +# 2168| mu2168_41(unknown) = ^CallSideEffect : ~m? +#-----| v0_40(void) = ^IndirectReadSideEffect[-1] : &:r0_39, ~m? +# 2168| r2168_42(ClassWithDestructor) = Load[?] : &:r2168_40, ~m? +# 2168| mu2168_43(ClassWithDestructor) = Store[y] : &:r2168_37, r2168_42 +# 2169| r2169_1(glval) = VariableAddress[z1] : +# 2169| mu2169_2(ClassWithDestructor) = Uninitialized[z1] : &:r2169_1 +# 2169| r2169_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2169| v2169_4(void) = Call[ClassWithDestructor] : func:r2169_3, this:r2169_1 +# 2169| mu2169_5(unknown) = ^CallSideEffect : ~m? +# 2169| mu2169_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2169_1 +# 2170| r2170_1(glval) = VariableAddress[z2] : +# 2170| mu2170_2(ClassWithDestructor) = Uninitialized[z2] : &:r2170_1 +# 2170| r2170_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2170| v2170_4(void) = Call[ClassWithDestructor] : func:r2170_3, this:r2170_1 +# 2170| mu2170_5(unknown) = ^CallSideEffect : ~m? +# 2170| mu2170_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2170_1 +# 2171| r2171_1(glval) = VariableAddress[z2] : +# 2171| r2171_2(glval) = FunctionAddress[~ClassWithDestructor] : +# 2171| v2171_3(void) = Call[~ClassWithDestructor] : func:r2171_2, this:r2171_1 +# 2171| mu2171_4(unknown) = ^CallSideEffect : ~m? +# 2171| v2171_5(void) = ^IndirectReadSideEffect[-1] : &:r2171_1, ~m? +# 2171| mu2171_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2171_1 +# 2171| r2171_7(glval) = VariableAddress[z1] : +# 2171| r2171_8(glval) = FunctionAddress[~ClassWithDestructor] : +# 2171| v2171_9(void) = Call[~ClassWithDestructor] : func:r2171_8, this:r2171_7 +# 2171| mu2171_10(unknown) = ^CallSideEffect : ~m? +# 2171| v2171_11(void) = ^IndirectReadSideEffect[-1] : &:r2171_7, ~m? +# 2171| mu2171_12(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2171_7 +# 2168| r2168_44(glval) = VariableAddress[y] : +# 2168| r2168_45(glval) = FunctionAddress[~ClassWithDestructor] : +# 2168| v2168_46(void) = Call[~ClassWithDestructor] : func:r2168_45, this:r2168_44 +# 2168| mu2168_47(unknown) = ^CallSideEffect : ~m? +# 2168| v2168_48(void) = ^IndirectReadSideEffect[-1] : &:r2168_44, ~m? +# 2168| mu2168_49(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2168_44 +# 2168| r2168_50(glval) = VariableAddress[(__begin)] : +# 2168| r2168_51(glval) = FunctionAddress[operator++] : +# 2168| r2168_52(iterator &) = Call[operator++] : func:r2168_51, this:r2168_50 +# 2168| mu2168_53(unknown) = ^CallSideEffect : ~m? +# 2168| v2168_54(void) = ^IndirectReadSideEffect[-1] : &:r2168_50, ~m? +# 2168| mu2168_55(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2168_50 +# 2168| r2168_56(glval) = CopyValue : r2168_52 +#-----| Goto (back edge) -> Block 27 -# 2172| Block 24 -# 2172| v2172_1(void) = NoOp : +# 2168| Block 29 +# 2168| r2168_57(glval>) = VariableAddress[ys] : +# 2168| r2168_58(glval) = FunctionAddress[~vector] : +# 2168| v2168_59(void) = Call[~vector] : func:r2168_58, this:r2168_57 +# 2168| mu2168_60(unknown) = ^CallSideEffect : ~m? +# 2168| v2168_61(void) = ^IndirectReadSideEffect[-1] : &:r2168_57, ~m? +# 2168| mu2168_62(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2168_57 +#-----| Goto -> Block 30 + +# 2172| Block 30 +# 2172| v2172_13(void) = NoOp : +# 2172| r2172_14(glval) = VariableAddress[x] : +# 2172| r2172_15(glval) = FunctionAddress[~ClassWithDestructor] : +# 2172| v2172_16(void) = Call[~ClassWithDestructor] : func:r2172_15, this:r2172_14 +# 2172| mu2172_17(unknown) = ^CallSideEffect : ~m? +# 2172| v2172_18(void) = ^IndirectReadSideEffect[-1] : &:r2172_14, ~m? +# 2172| mu2172_19(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2172_14 #-----| Goto -> Block 1 # 2174| void static_variable_with_destructor_1() @@ -12276,10 +12504,16 @@ ir.cpp: #-----| Goto -> Block 2 # 2177| Block 2 -# 2177| v2177_1(void) = NoOp : -# 2174| v2174_4(void) = ReturnVoid : -# 2174| v2174_5(void) = AliasedUse : ~m? -# 2174| v2174_6(void) = ExitFunction : +# 2177| v2177_1(void) = NoOp : +# 2177| r2177_2(glval) = VariableAddress[a] : +# 2177| r2177_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2177| v2177_4(void) = Call[~ClassWithDestructor] : func:r2177_3, this:r2177_2 +# 2177| mu2177_5(unknown) = ^CallSideEffect : ~m? +# 2177| v2177_6(void) = ^IndirectReadSideEffect[-1] : &:r2177_2, ~m? +# 2177| mu2177_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2177_2 +# 2174| v2174_4(void) = ReturnVoid : +# 2174| v2174_5(void) = AliasedUse : ~m? +# 2174| v2174_6(void) = ExitFunction : # 2179| void static_variable_with_destructor_2() # 2179| Block 0 @@ -12303,16 +12537,22 @@ ir.cpp: #-----| Goto -> Block 2 # 2181| Block 2 -# 2181| r2181_1(glval) = VariableAddress[b] : -# 2181| mu2181_2(ClassWithDestructor) = Uninitialized[b] : &:r2181_1 -# 2181| r2181_3(glval) = FunctionAddress[ClassWithDestructor] : -# 2181| v2181_4(void) = Call[ClassWithDestructor] : func:r2181_3, this:r2181_1 -# 2181| mu2181_5(unknown) = ^CallSideEffect : ~m? -# 2181| mu2181_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2181_1 -# 2182| v2182_1(void) = NoOp : -# 2179| v2179_4(void) = ReturnVoid : -# 2179| v2179_5(void) = AliasedUse : ~m? -# 2179| v2179_6(void) = ExitFunction : +# 2181| r2181_1(glval) = VariableAddress[b] : +# 2181| mu2181_2(ClassWithDestructor) = Uninitialized[b] : &:r2181_1 +# 2181| r2181_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2181| v2181_4(void) = Call[ClassWithDestructor] : func:r2181_3, this:r2181_1 +# 2181| mu2181_5(unknown) = ^CallSideEffect : ~m? +# 2181| mu2181_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2181_1 +# 2182| v2182_1(void) = NoOp : +# 2182| r2182_2(glval) = VariableAddress[b] : +# 2182| r2182_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2182| v2182_4(void) = Call[~ClassWithDestructor] : func:r2182_3, this:r2182_2 +# 2182| mu2182_5(unknown) = ^CallSideEffect : ~m? +# 2182| v2182_6(void) = ^IndirectReadSideEffect[-1] : &:r2182_2, ~m? +# 2182| mu2182_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2182_2 +# 2179| v2179_4(void) = ReturnVoid : +# 2179| v2179_5(void) = AliasedUse : ~m? +# 2179| v2179_6(void) = ExitFunction : # 2184| void static_variable_with_destructor_3() # 2184| Block 0 @@ -12348,10 +12588,22 @@ ir.cpp: #-----| Goto -> Block 2 # 2188| Block 2 -# 2188| v2188_1(void) = NoOp : -# 2184| v2184_4(void) = ReturnVoid : -# 2184| v2184_5(void) = AliasedUse : ~m? -# 2184| v2184_6(void) = ExitFunction : +# 2188| v2188_1(void) = NoOp : +# 2188| r2188_2(glval) = VariableAddress[b] : +# 2188| r2188_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2188| v2188_4(void) = Call[~ClassWithDestructor] : func:r2188_3, this:r2188_2 +# 2188| mu2188_5(unknown) = ^CallSideEffect : ~m? +# 2188| v2188_6(void) = ^IndirectReadSideEffect[-1] : &:r2188_2, ~m? +# 2188| mu2188_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2188_2 +# 2188| r2188_8(glval) = VariableAddress[a] : +# 2188| r2188_9(glval) = FunctionAddress[~ClassWithDestructor] : +# 2188| v2188_10(void) = Call[~ClassWithDestructor] : func:r2188_9, this:r2188_8 +# 2188| mu2188_11(unknown) = ^CallSideEffect : ~m? +# 2188| v2188_12(void) = ^IndirectReadSideEffect[-1] : &:r2188_8, ~m? +# 2188| mu2188_13(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2188_8 +# 2184| v2184_4(void) = ReturnVoid : +# 2184| v2184_5(void) = AliasedUse : ~m? +# 2184| v2184_6(void) = ExitFunction : # 2190| ClassWithDestructor global_class_with_destructor # 2190| Block 0 @@ -12366,6 +12618,902 @@ ir.cpp: # 2190| v2190_9(void) = AliasedUse : ~m? # 2190| v2190_10(void) = ExitFunction : +# 2194| ClassWithDestructor& vacuous_destructor_call::get(ClassWithDestructor&) +# 2194| Block 0 +# 2194| v2194_1(void) = EnterFunction : +# 2194| mu2194_2(unknown) = AliasedDefinition : +# 2194| mu2194_3(unknown) = InitializeNonLocal : +# 2194| r2194_4(glval) = VariableAddress[t] : +# 2194| mu2194_5(ClassWithDestructor &) = InitializeParameter[t] : &:r2194_4 +# 2194| r2194_6(ClassWithDestructor &) = Load[t] : &:r2194_4, ~m? +# 2194| mu2194_7(unknown) = InitializeIndirection[t] : &:r2194_6 +# 2194| r2194_8(glval) = VariableAddress[#return] : +# 2194| r2194_9(glval) = VariableAddress[t] : +# 2194| r2194_10(ClassWithDestructor &) = Load[t] : &:r2194_9, ~m? +# 2194| r2194_11(glval) = CopyValue : r2194_10 +# 2194| r2194_12(ClassWithDestructor &) = CopyValue : r2194_11 +# 2194| mu2194_13(ClassWithDestructor &) = Store[#return] : &:r2194_8, r2194_12 +# 2194| v2194_14(void) = ReturnIndirection[t] : &:r2194_6, ~m? +# 2194| r2194_15(glval) = VariableAddress[#return] : +# 2194| v2194_16(void) = ReturnValue : &:r2194_15, ~m? +# 2194| v2194_17(void) = AliasedUse : ~m? +# 2194| v2194_18(void) = ExitFunction : + +# 2194| int& vacuous_destructor_call::get(int&) +# 2194| Block 0 +# 2194| v2194_1(void) = EnterFunction : +# 2194| mu2194_2(unknown) = AliasedDefinition : +# 2194| mu2194_3(unknown) = InitializeNonLocal : +# 2194| r2194_4(glval) = VariableAddress[t] : +# 2194| mu2194_5(int &) = InitializeParameter[t] : &:r2194_4 +# 2194| r2194_6(int &) = Load[t] : &:r2194_4, ~m? +# 2194| mu2194_7(unknown) = InitializeIndirection[t] : &:r2194_6 +# 2194| r2194_8(glval) = VariableAddress[#return] : +# 2194| r2194_9(glval) = VariableAddress[t] : +# 2194| r2194_10(int &) = Load[t] : &:r2194_9, ~m? +# 2194| r2194_11(glval) = CopyValue : r2194_10 +# 2194| r2194_12(int &) = CopyValue : r2194_11 +# 2194| mu2194_13(int &) = Store[#return] : &:r2194_8, r2194_12 +# 2194| v2194_14(void) = ReturnIndirection[t] : &:r2194_6, ~m? +# 2194| r2194_15(glval) = VariableAddress[#return] : +# 2194| v2194_16(void) = ReturnValue : &:r2194_15, ~m? +# 2194| v2194_17(void) = AliasedUse : ~m? +# 2194| v2194_18(void) = ExitFunction : + +# 2197| void vacuous_destructor_call::call_destructor(ClassWithDestructor&) +# 2197| Block 0 +# 2197| v2197_1(void) = EnterFunction : +# 2197| mu2197_2(unknown) = AliasedDefinition : +# 2197| mu2197_3(unknown) = InitializeNonLocal : +# 2197| r2197_4(glval) = VariableAddress[t] : +# 2197| mu2197_5(ClassWithDestructor &) = InitializeParameter[t] : &:r2197_4 +# 2197| r2197_6(ClassWithDestructor &) = Load[t] : &:r2197_4, ~m? +# 2197| mu2197_7(unknown) = InitializeIndirection[t] : &:r2197_6 +# 2198| r2198_1(glval) = FunctionAddress[get] : +# 2198| r2198_2(glval) = VariableAddress[t] : +# 2198| r2198_3(ClassWithDestructor &) = Load[t] : &:r2198_2, ~m? +# 2198| r2198_4(glval) = CopyValue : r2198_3 +# 2198| r2198_5(ClassWithDestructor &) = CopyValue : r2198_4 +# 2198| r2198_6(ClassWithDestructor &) = Call[get] : func:r2198_1, 0:r2198_5 +# 2198| mu2198_7(unknown) = ^CallSideEffect : ~m? +# 2198| v2198_8(void) = ^BufferReadSideEffect[0] : &:r2198_5, ~m? +# 2198| mu2198_9(unknown) = ^BufferMayWriteSideEffect[0] : &:r2198_5 +# 2198| r2198_10(glval) = CopyValue : r2198_6 +# 2198| r2198_11(glval) = FunctionAddress[~ClassWithDestructor] : +# 2198| v2198_12(void) = Call[~ClassWithDestructor] : func:r2198_11 +# 2198| mu2198_13(unknown) = ^CallSideEffect : ~m? +# 2198| v2198_14(void) = ^IndirectReadSideEffect[-1] : &:r2198_10, ~m? +# 2198| mu2198_15(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2198_10 +# 2199| v2199_1(void) = NoOp : +# 2197| v2197_8(void) = ReturnIndirection[t] : &:r2197_6, ~m? +# 2197| v2197_9(void) = ReturnVoid : +# 2197| v2197_10(void) = AliasedUse : ~m? +# 2197| v2197_11(void) = ExitFunction : + +# 2197| void vacuous_destructor_call::call_destructor(int&) +# 2197| Block 0 +# 2197| v2197_1(void) = EnterFunction : +# 2197| mu2197_2(unknown) = AliasedDefinition : +# 2197| mu2197_3(unknown) = InitializeNonLocal : +# 2197| r2197_4(glval) = VariableAddress[t] : +# 2197| mu2197_5(int &) = InitializeParameter[t] : &:r2197_4 +# 2197| r2197_6(int &) = Load[t] : &:r2197_4, ~m? +# 2197| mu2197_7(unknown) = InitializeIndirection[t] : &:r2197_6 +# 2198| r2198_1(glval) = FunctionAddress[get] : +# 2198| r2198_2(glval) = VariableAddress[t] : +# 2198| r2198_3(int &) = Load[t] : &:r2198_2, ~m? +# 2198| r2198_4(glval) = CopyValue : r2198_3 +# 2198| r2198_5(int &) = CopyValue : r2198_4 +# 2198| r2198_6(int &) = Call[get] : func:r2198_1, 0:r2198_5 +# 2198| mu2198_7(unknown) = ^CallSideEffect : ~m? +# 2198| v2198_8(void) = ^BufferReadSideEffect[0] : &:r2198_5, ~m? +# 2198| mu2198_9(unknown) = ^BufferMayWriteSideEffect[0] : &:r2198_5 +# 2198| r2198_10(glval) = CopyValue : r2198_6 +# 2199| v2199_1(void) = NoOp : +# 2197| v2197_8(void) = ReturnIndirection[t] : &:r2197_6, ~m? +# 2197| v2197_9(void) = ReturnVoid : +# 2197| v2197_10(void) = AliasedUse : ~m? +# 2197| v2197_11(void) = ExitFunction : + +# 2201| void vacuous_destructor_call::non_vacuous_destructor_call() +# 2201| Block 0 +# 2201| v2201_1(void) = EnterFunction : +# 2201| mu2201_2(unknown) = AliasedDefinition : +# 2201| mu2201_3(unknown) = InitializeNonLocal : +# 2202| r2202_1(glval) = VariableAddress[c] : +# 2202| mu2202_2(ClassWithDestructor) = Uninitialized[c] : &:r2202_1 +# 2202| r2202_3(glval) = FunctionAddress[ClassWithDestructor] : +# 2202| v2202_4(void) = Call[ClassWithDestructor] : func:r2202_3, this:r2202_1 +# 2202| mu2202_5(unknown) = ^CallSideEffect : ~m? +# 2202| mu2202_6(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2202_1 +# 2203| r2203_1(glval) = FunctionAddress[call_destructor] : +# 2203| r2203_2(glval) = VariableAddress[c] : +# 2203| r2203_3(ClassWithDestructor &) = CopyValue : r2203_2 +# 2203| v2203_4(void) = Call[call_destructor] : func:r2203_1, 0:r2203_3 +# 2203| mu2203_5(unknown) = ^CallSideEffect : ~m? +# 2203| v2203_6(void) = ^BufferReadSideEffect[0] : &:r2203_3, ~m? +# 2203| mu2203_7(unknown) = ^BufferMayWriteSideEffect[0] : &:r2203_3 +# 2204| v2204_1(void) = NoOp : +# 2204| r2204_2(glval) = VariableAddress[c] : +# 2204| r2204_3(glval) = FunctionAddress[~ClassWithDestructor] : +# 2204| v2204_4(void) = Call[~ClassWithDestructor] : func:r2204_3, this:r2204_2 +# 2204| mu2204_5(unknown) = ^CallSideEffect : ~m? +# 2204| v2204_6(void) = ^IndirectReadSideEffect[-1] : &:r2204_2, ~m? +# 2204| mu2204_7(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2204_2 +# 2201| v2201_4(void) = ReturnVoid : +# 2201| v2201_5(void) = AliasedUse : ~m? +# 2201| v2201_6(void) = ExitFunction : + +# 2206| void vacuous_destructor_call::vacuous_destructor_call() +# 2206| Block 0 +# 2206| v2206_1(void) = EnterFunction : +# 2206| mu2206_2(unknown) = AliasedDefinition : +# 2206| mu2206_3(unknown) = InitializeNonLocal : +# 2207| r2207_1(glval) = VariableAddress[i] : +# 2207| mu2207_2(int) = Uninitialized[i] : &:r2207_1 +# 2208| r2208_1(glval) = FunctionAddress[call_destructor] : +# 2208| r2208_2(glval) = VariableAddress[i] : +# 2208| r2208_3(int &) = CopyValue : r2208_2 +# 2208| v2208_4(void) = Call[call_destructor] : func:r2208_1, 0:r2208_3 +# 2208| mu2208_5(unknown) = ^CallSideEffect : ~m? +# 2208| v2208_6(void) = ^BufferReadSideEffect[0] : &:r2208_3, ~m? +# 2208| mu2208_7(unknown) = ^BufferMayWriteSideEffect[0] : &:r2208_3 +# 2209| v2209_1(void) = NoOp : +# 2206| v2206_4(void) = ReturnVoid : +# 2206| v2206_5(void) = AliasedUse : ~m? +# 2206| v2206_6(void) = ExitFunction : + +# 2212| void TryCatchDestructors(bool) +# 2212| Block 0 +# 2212| v2212_1(void) = EnterFunction : +# 2212| mu2212_2(unknown) = AliasedDefinition : +# 2212| mu2212_3(unknown) = InitializeNonLocal : +# 2212| r2212_4(glval) = VariableAddress[b] : +# 2212| mu2212_5(bool) = InitializeParameter[b] : &:r2212_4 +# 2214| r2214_1(glval) = VariableAddress[s] : +# 2214| mu2214_2(String) = Uninitialized[s] : &:r2214_1 +# 2214| r2214_3(glval) = FunctionAddress[String] : +# 2214| v2214_4(void) = Call[String] : func:r2214_3, this:r2214_1 +# 2214| mu2214_5(unknown) = ^CallSideEffect : ~m? +# 2214| mu2214_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2214_1 +# 2215| r2215_1(glval) = VariableAddress[b] : +# 2215| r2215_2(bool) = Load[b] : &:r2215_1, ~m? +# 2215| v2215_3(void) = ConditionalBranch : r2215_2 +#-----| False -> Block 4 +#-----| True -> Block 3 + +# 2212| Block 1 +# 2212| v2212_6(void) = AliasedUse : ~m? +# 2212| v2212_7(void) = ExitFunction : + +# 2212| Block 2 +# 2212| v2212_8(void) = Unwind : +#-----| Goto -> Block 1 + +# 2216| Block 3 +# 2216| r2216_1(glval) = VariableAddress[#throw2216:7] : +# 2216| r2216_2(glval) = StringConstant["string literal"] : +# 2216| r2216_3(char *) = Convert : r2216_2 +# 2216| mu2216_4(char *) = Store[#throw2216:7] : &:r2216_1, r2216_3 +# 2216| v2216_5(void) = ThrowValue : &:r2216_1, ~m? +#-----| Exception -> Block 5 + +# 2218| Block 4 +# 2218| r2218_1(glval) = VariableAddress[s2] : +# 2218| mu2218_2(String) = Uninitialized[s2] : &:r2218_1 +# 2218| r2218_3(glval) = FunctionAddress[String] : +# 2218| v2218_4(void) = Call[String] : func:r2218_3, this:r2218_1 +# 2218| mu2218_5(unknown) = ^CallSideEffect : ~m? +# 2218| mu2218_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2218_1 +# 2219| r2219_1(glval) = VariableAddress[s2] : +# 2219| r2219_2(glval) = FunctionAddress[~String] : +# 2219| v2219_3(void) = Call[~String] : func:r2219_2, this:r2219_1 +# 2219| mu2219_4(unknown) = ^CallSideEffect : ~m? +# 2219| v2219_5(void) = ^IndirectReadSideEffect[-1] : &:r2219_1, ~m? +# 2219| mu2219_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2219_1 +# 2219| r2219_7(glval) = VariableAddress[s] : +# 2219| r2219_8(glval) = FunctionAddress[~String] : +# 2219| v2219_9(void) = Call[~String] : func:r2219_8, this:r2219_7 +# 2219| mu2219_10(unknown) = ^CallSideEffect : ~m? +# 2219| v2219_11(void) = ^IndirectReadSideEffect[-1] : &:r2219_7, ~m? +# 2219| mu2219_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2219_7 +#-----| Goto -> Block 10 + +# 2220| Block 5 +# 2220| v2220_1(void) = CatchByType[const char *] : +#-----| Exception -> Block 7 +#-----| Goto -> Block 6 + +# 2220| Block 6 +# 2220| r2220_2(glval) = VariableAddress[s] : +# 2220| mu2220_3(char *) = InitializeParameter[s] : &:r2220_2 +# 2220| r2220_4(char *) = Load[s] : &:r2220_2, ~m? +# 2220| mu2220_5(unknown) = InitializeIndirection[s] : &:r2220_4 +# 2221| r2221_1(glval) = VariableAddress[#throw2221:5] : +# 2221| mu2221_2(String) = Uninitialized[#throw2221:5] : &:r2221_1 +# 2221| r2221_3(glval) = FunctionAddress[String] : +# 2221| r2221_4(glval) = VariableAddress[s] : +# 2221| r2221_5(char *) = Load[s] : &:r2221_4, ~m? +# 2221| v2221_6(void) = Call[String] : func:r2221_3, this:r2221_1, 0:r2221_5 +# 2221| mu2221_7(unknown) = ^CallSideEffect : ~m? +# 2221| v2221_8(void) = ^BufferReadSideEffect[0] : &:r2221_5, ~m? +# 2221| mu2221_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2221_1 +# 2221| v2221_10(void) = ThrowValue : &:r2221_1, ~m? +#-----| Exception -> Block 2 + +# 2223| Block 7 +# 2223| v2223_1(void) = CatchByType[const String &] : +#-----| Exception -> Block 9 +#-----| Goto -> Block 8 + +# 2223| Block 8 +# 2223| r2223_2(glval) = VariableAddress[e] : +# 2223| mu2223_3(String &) = InitializeParameter[e] : &:r2223_2 +# 2223| r2223_4(String &) = Load[e] : &:r2223_2, ~m? +# 2223| mu2223_5(unknown) = InitializeIndirection[e] : &:r2223_4 +# 2223| v2223_6(void) = NoOp : +#-----| Goto -> Block 10 + +# 2225| Block 9 +# 2225| v2225_1(void) = CatchAny : +# 2226| v2226_1(void) = ReThrow : +#-----| Exception -> Block 2 + +# 2228| Block 10 +# 2228| v2228_1(void) = NoOp : +# 2212| v2212_9(void) = ReturnVoid : +#-----| Goto -> Block 1 + +# 2230| void IfDestructors(bool) +# 2230| Block 0 +# 2230| v2230_1(void) = EnterFunction : +# 2230| mu2230_2(unknown) = AliasedDefinition : +# 2230| mu2230_3(unknown) = InitializeNonLocal : +# 2230| r2230_4(glval) = VariableAddress[b] : +# 2230| mu2230_5(bool) = InitializeParameter[b] : &:r2230_4 +# 2231| r2231_1(glval) = VariableAddress[s1] : +# 2231| mu2231_2(String) = Uninitialized[s1] : &:r2231_1 +# 2231| r2231_3(glval) = FunctionAddress[String] : +# 2231| v2231_4(void) = Call[String] : func:r2231_3, this:r2231_1 +# 2231| mu2231_5(unknown) = ^CallSideEffect : ~m? +# 2231| mu2231_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2231_1 +# 2232| r2232_1(glval) = VariableAddress[b] : +# 2232| r2232_2(bool) = Load[b] : &:r2232_1, ~m? +# 2232| v2232_3(void) = ConditionalBranch : r2232_2 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2233| Block 1 +# 2233| r2233_1(glval) = VariableAddress[s2] : +# 2233| mu2233_2(String) = Uninitialized[s2] : &:r2233_1 +# 2233| r2233_3(glval) = FunctionAddress[String] : +# 2233| v2233_4(void) = Call[String] : func:r2233_3, this:r2233_1 +# 2233| mu2233_5(unknown) = ^CallSideEffect : ~m? +# 2233| mu2233_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2233_1 +# 2234| r2234_1(glval) = VariableAddress[s2] : +# 2234| r2234_2(glval) = FunctionAddress[~String] : +# 2234| v2234_3(void) = Call[~String] : func:r2234_2, this:r2234_1 +# 2234| mu2234_4(unknown) = ^CallSideEffect : ~m? +# 2234| v2234_5(void) = ^IndirectReadSideEffect[-1] : &:r2234_1, ~m? +# 2234| mu2234_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2234_1 +#-----| Goto -> Block 3 + +# 2235| Block 2 +# 2235| r2235_1(glval) = VariableAddress[s3] : +# 2235| mu2235_2(String) = Uninitialized[s3] : &:r2235_1 +# 2235| r2235_3(glval) = FunctionAddress[String] : +# 2235| v2235_4(void) = Call[String] : func:r2235_3, this:r2235_1 +# 2235| mu2235_5(unknown) = ^CallSideEffect : ~m? +# 2235| mu2235_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2235_1 +# 2236| r2236_1(glval) = VariableAddress[s3] : +# 2236| r2236_2(glval) = FunctionAddress[~String] : +# 2236| v2236_3(void) = Call[~String] : func:r2236_2, this:r2236_1 +# 2236| mu2236_4(unknown) = ^CallSideEffect : ~m? +# 2236| v2236_5(void) = ^IndirectReadSideEffect[-1] : &:r2236_1, ~m? +# 2236| mu2236_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2236_1 +#-----| Goto -> Block 3 + +# 2237| Block 3 +# 2237| r2237_1(glval) = VariableAddress[s4] : +# 2237| mu2237_2(String) = Uninitialized[s4] : &:r2237_1 +# 2237| r2237_3(glval) = FunctionAddress[String] : +# 2237| v2237_4(void) = Call[String] : func:r2237_3, this:r2237_1 +# 2237| mu2237_5(unknown) = ^CallSideEffect : ~m? +# 2237| mu2237_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2237_1 +# 2238| v2238_1(void) = NoOp : +# 2238| r2238_2(glval) = VariableAddress[s4] : +# 2238| r2238_3(glval) = FunctionAddress[~String] : +# 2238| v2238_4(void) = Call[~String] : func:r2238_3, this:r2238_2 +# 2238| mu2238_5(unknown) = ^CallSideEffect : ~m? +# 2238| v2238_6(void) = ^IndirectReadSideEffect[-1] : &:r2238_2, ~m? +# 2238| mu2238_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2238_2 +# 2238| r2238_8(glval) = VariableAddress[s1] : +# 2238| r2238_9(glval) = FunctionAddress[~String] : +# 2238| v2238_10(void) = Call[~String] : func:r2238_9, this:r2238_8 +# 2238| mu2238_11(unknown) = ^CallSideEffect : ~m? +# 2238| v2238_12(void) = ^IndirectReadSideEffect[-1] : &:r2238_8, ~m? +# 2238| mu2238_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r2238_8 +# 2230| v2230_6(void) = ReturnVoid : +# 2230| v2230_7(void) = AliasedUse : ~m? +# 2230| v2230_8(void) = ExitFunction : + +# 2240| void ForDestructors() +# 2240| Block 0 +# 2240| v2240_1(void) = EnterFunction : +# 2240| mu2240_2(unknown) = AliasedDefinition : +# 2240| mu2240_3(unknown) = InitializeNonLocal : +# 2241| r2241_1(glval) = VariableAddress[c] : +# 2241| r2241_2(char) = Constant[97] : +# 2241| mu2241_3(char) = Store[c] : &:r2241_1, r2241_2 +# 2242| r2242_1(glval) = VariableAddress[s] : +# 2242| mu2242_2(String) = Uninitialized[s] : &:r2242_1 +# 2242| r2242_3(glval) = FunctionAddress[String] : +# 2242| r2242_4(glval) = StringConstant["hello"] : +# 2242| r2242_5(char *) = Convert : r2242_4 +# 2242| v2242_6(void) = Call[String] : func:r2242_3, this:r2242_1, 0:r2242_5 +# 2242| mu2242_7(unknown) = ^CallSideEffect : ~m? +# 2242| v2242_8(void) = ^BufferReadSideEffect[0] : &:r2242_5, ~m? +# 2242| mu2242_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2242_1 +#-----| Goto -> Block 1 + +# 2242| Block 1 +# 2242| r2242_10(glval) = VariableAddress[c] : +# 2242| r2242_11(char) = Load[c] : &:r2242_10, ~m? +# 2242| r2242_12(int) = Convert : r2242_11 +# 2242| r2242_13(int) = Constant[0] : +# 2242| r2242_14(bool) = CompareNE : r2242_12, r2242_13 +# 2242| v2242_15(void) = ConditionalBranch : r2242_14 +#-----| False -> Block 3 +#-----| True -> Block 2 + +# 2243| Block 2 +# 2243| r2243_1(glval) = VariableAddress[s2] : +# 2243| mu2243_2(String) = Uninitialized[s2] : &:r2243_1 +# 2243| r2243_3(glval) = FunctionAddress[String] : +# 2243| v2243_4(void) = Call[String] : func:r2243_3, this:r2243_1 +# 2243| mu2243_5(unknown) = ^CallSideEffect : ~m? +# 2243| mu2243_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2243_1 +# 2244| r2244_1(glval) = VariableAddress[s2] : +# 2244| r2244_2(glval) = FunctionAddress[~String] : +# 2244| v2244_3(void) = Call[~String] : func:r2244_2, this:r2244_1 +# 2244| mu2244_4(unknown) = ^CallSideEffect : ~m? +# 2244| v2244_5(void) = ^IndirectReadSideEffect[-1] : &:r2244_1, ~m? +# 2244| mu2244_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2244_1 +# 2242| r2242_16(glval) = VariableAddress[s] : +# 2242| r2242_17(glval) = FunctionAddress[pop_back] : +# 2242| r2242_18(char) = Call[pop_back] : func:r2242_17, this:r2242_16 +# 2242| mu2242_19(unknown) = ^CallSideEffect : ~m? +# 2242| v2242_20(void) = ^IndirectReadSideEffect[-1] : &:r2242_16, ~m? +# 2242| mu2242_21(String) = ^IndirectMayWriteSideEffect[-1] : &:r2242_16 +# 2242| r2242_22(glval) = VariableAddress[c] : +# 2242| mu2242_23(char) = Store[c] : &:r2242_22, r2242_18 +#-----| Goto (back edge) -> Block 1 + +# 2242| Block 3 +# 2242| r2242_24(glval) = VariableAddress[s] : +# 2242| r2242_25(glval) = FunctionAddress[~String] : +# 2242| v2242_26(void) = Call[~String] : func:r2242_25, this:r2242_24 +# 2242| mu2242_27(unknown) = ^CallSideEffect : ~m? +# 2242| v2242_28(void) = ^IndirectReadSideEffect[-1] : &:r2242_24, ~m? +# 2242| mu2242_29(String) = ^IndirectMayWriteSideEffect[-1] : &:r2242_24 +# 2246| r2246_1(glval &&>) = VariableAddress[(__range)] : +# 2246| r2246_2(glval>) = VariableAddress[#temp2246:20] : +# 2246| mu2246_3(vector) = Uninitialized[#temp2246:20] : &:r2246_2 +# 2246| r2246_4(glval) = FunctionAddress[vector] : +# 2246| r2246_5(glval) = VariableAddress[#temp2246:35] : +# 2246| mu2246_6(String) = Uninitialized[#temp2246:35] : &:r2246_5 +# 2246| r2246_7(glval) = FunctionAddress[String] : +# 2246| r2246_8(glval) = StringConstant["hello"] : +# 2246| r2246_9(char *) = Convert : r2246_8 +# 2246| v2246_10(void) = Call[String] : func:r2246_7, this:r2246_5, 0:r2246_9 +# 2246| mu2246_11(unknown) = ^CallSideEffect : ~m? +# 2246| v2246_12(void) = ^BufferReadSideEffect[0] : &:r2246_9, ~m? +# 2246| mu2246_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r2246_5 +# 2246| r2246_14(String) = Load[#temp2246:35] : &:r2246_5, ~m? +# 2246| v2246_15(void) = Call[vector] : func:r2246_4, this:r2246_2, 0:r2246_14 +# 2246| mu2246_16(unknown) = ^CallSideEffect : ~m? +# 2246| mu2246_17(vector) = ^IndirectMayWriteSideEffect[-1] : &:r2246_2 +# 2246| r2246_18(vector &) = CopyValue : r2246_2 +# 2246| mu2246_19(vector &&) = Store[(__range)] : &:r2246_1, r2246_18 +# 2246| r2246_20(glval) = VariableAddress[(__begin)] : +# 2246| r2246_21(glval &&>) = VariableAddress[(__range)] : +# 2246| r2246_22(vector &&) = Load[(__range)] : &:r2246_21, ~m? +#-----| r0_1(glval>) = CopyValue : r2246_22 +#-----| r0_2(glval>) = Convert : r0_1 +# 2246| r2246_23(glval) = FunctionAddress[begin] : +# 2246| r2246_24(iterator) = Call[begin] : func:r2246_23, this:r0_2 +# 2246| mu2246_25(unknown) = ^CallSideEffect : ~m? +#-----| v0_3(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m? +# 2246| mu2246_26(iterator) = Store[(__begin)] : &:r2246_20, r2246_24 +# 2246| r2246_27(glval) = VariableAddress[(__end)] : +# 2246| r2246_28(glval &&>) = VariableAddress[(__range)] : +# 2246| r2246_29(vector &&) = Load[(__range)] : &:r2246_28, ~m? +#-----| r0_4(glval>) = CopyValue : r2246_29 +#-----| r0_5(glval>) = Convert : r0_4 +# 2246| r2246_30(glval) = FunctionAddress[end] : +# 2246| r2246_31(iterator) = Call[end] : func:r2246_30, this:r0_5 +# 2246| mu2246_32(unknown) = ^CallSideEffect : ~m? +#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m? +# 2246| mu2246_33(iterator) = Store[(__end)] : &:r2246_27, r2246_31 +#-----| Goto -> Block 4 + +# 2246| Block 4 +# 2246| r2246_34(glval) = VariableAddress[(__begin)] : +#-----| r0_7(glval) = Convert : r2246_34 +# 2246| r2246_35(glval) = FunctionAddress[operator!=] : +# 2246| r2246_36(glval) = VariableAddress[(__end)] : +# 2246| r2246_37(iterator) = Load[(__end)] : &:r2246_36, ~m? +# 2246| r2246_38(bool) = Call[operator!=] : func:r2246_35, this:r0_7, 0:r2246_37 +# 2246| mu2246_39(unknown) = ^CallSideEffect : ~m? +#-----| v0_8(void) = ^IndirectReadSideEffect[-1] : &:r0_7, ~m? +# 2246| v2246_40(void) = ConditionalBranch : r2246_38 +#-----| False -> Block 6 +#-----| True -> Block 5 + +# 2246| Block 5 +# 2246| r2246_41(glval) = VariableAddress[s] : +# 2246| mu2246_42(String) = Uninitialized[s] : &:r2246_41 +# 2246| r2246_43(glval) = FunctionAddress[String] : +# 2246| r2246_44(glval) = VariableAddress[(__begin)] : +#-----| r0_9(glval) = Convert : r2246_44 +# 2246| r2246_45(glval) = FunctionAddress[operator*] : +# 2246| r2246_46(String &) = Call[operator*] : func:r2246_45, this:r0_9 +# 2246| mu2246_47(unknown) = ^CallSideEffect : ~m? +#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_9, ~m? +# 2246| r2246_48(glval) = CopyValue : r2246_46 +# 2246| r2246_49(glval) = Convert : r2246_48 +# 2246| r2246_50(String &) = CopyValue : r2246_49 +# 2246| v2246_51(void) = Call[String] : func:r2246_43, this:r2246_41, 0:r2246_50 +# 2246| mu2246_52(unknown) = ^CallSideEffect : ~m? +# 2246| v2246_53(void) = ^BufferReadSideEffect[0] : &:r2246_50, ~m? +# 2246| mu2246_54(String) = ^IndirectMayWriteSideEffect[-1] : &:r2246_41 +# 2247| r2247_1(glval) = VariableAddress[s2] : +# 2247| mu2247_2(String) = Uninitialized[s2] : &:r2247_1 +# 2247| r2247_3(glval) = FunctionAddress[String] : +# 2247| v2247_4(void) = Call[String] : func:r2247_3, this:r2247_1 +# 2247| mu2247_5(unknown) = ^CallSideEffect : ~m? +# 2247| mu2247_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2247_1 +# 2248| r2248_1(glval) = VariableAddress[s2] : +# 2248| r2248_2(glval) = FunctionAddress[~String] : +# 2248| v2248_3(void) = Call[~String] : func:r2248_2, this:r2248_1 +# 2248| mu2248_4(unknown) = ^CallSideEffect : ~m? +# 2248| v2248_5(void) = ^IndirectReadSideEffect[-1] : &:r2248_1, ~m? +# 2248| mu2248_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2248_1 +# 2246| r2246_55(glval) = VariableAddress[s] : +# 2246| r2246_56(glval) = FunctionAddress[~String] : +# 2246| v2246_57(void) = Call[~String] : func:r2246_56, this:r2246_55 +# 2246| mu2246_58(unknown) = ^CallSideEffect : ~m? +# 2246| v2246_59(void) = ^IndirectReadSideEffect[-1] : &:r2246_55, ~m? +# 2246| mu2246_60(String) = ^IndirectMayWriteSideEffect[-1] : &:r2246_55 +# 2246| r2246_61(glval) = VariableAddress[(__begin)] : +# 2246| r2246_62(glval) = FunctionAddress[operator++] : +# 2246| r2246_63(iterator &) = Call[operator++] : func:r2246_62, this:r2246_61 +# 2246| mu2246_64(unknown) = ^CallSideEffect : ~m? +# 2246| v2246_65(void) = ^IndirectReadSideEffect[-1] : &:r2246_61, ~m? +# 2246| mu2246_66(iterator) = ^IndirectMayWriteSideEffect[-1] : &:r2246_61 +# 2246| r2246_67(glval) = CopyValue : r2246_63 +#-----| Goto (back edge) -> Block 4 + +# 2250| Block 6 +# 2250| r2250_1(glval) = VariableAddress[s] : +# 2250| mu2250_2(String) = Uninitialized[s] : &:r2250_1 +# 2250| r2250_3(glval) = FunctionAddress[String] : +# 2250| r2250_4(glval) = StringConstant["hello"] : +# 2250| r2250_5(char *) = Convert : r2250_4 +# 2250| v2250_6(void) = Call[String] : func:r2250_3, this:r2250_1, 0:r2250_5 +# 2250| mu2250_7(unknown) = ^CallSideEffect : ~m? +# 2250| v2250_8(void) = ^BufferReadSideEffect[0] : &:r2250_5, ~m? +# 2250| mu2250_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_1 +# 2250| r2250_10(glval) = VariableAddress[s2] : +# 2250| mu2250_11(String) = Uninitialized[s2] : &:r2250_10 +# 2250| r2250_12(glval) = FunctionAddress[String] : +# 2250| r2250_13(glval) = StringConstant["world"] : +# 2250| r2250_14(char *) = Convert : r2250_13 +# 2250| v2250_15(void) = Call[String] : func:r2250_12, this:r2250_10, 0:r2250_14 +# 2250| mu2250_16(unknown) = ^CallSideEffect : ~m? +# 2250| v2250_17(void) = ^BufferReadSideEffect[0] : &:r2250_14, ~m? +# 2250| mu2250_18(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_10 +#-----| Goto -> Block 7 + +# 2250| Block 7 +# 2250| r2250_19(glval) = VariableAddress[c] : +# 2250| r2250_20(char) = Load[c] : &:r2250_19, ~m? +# 2250| r2250_21(int) = Convert : r2250_20 +# 2250| r2250_22(int) = Constant[0] : +# 2250| r2250_23(bool) = CompareNE : r2250_21, r2250_22 +# 2250| v2250_24(void) = ConditionalBranch : r2250_23 +#-----| False -> Block 9 +#-----| True -> Block 8 + +# 2251| Block 8 +# 2251| r2251_1(char) = Constant[0] : +# 2251| r2251_2(glval) = VariableAddress[c] : +# 2251| mu2251_3(char) = Store[c] : &:r2251_2, r2251_1 +# 2250| r2250_25(glval) = VariableAddress[s] : +# 2250| r2250_26(glval) = FunctionAddress[pop_back] : +# 2250| r2250_27(char) = Call[pop_back] : func:r2250_26, this:r2250_25 +# 2250| mu2250_28(unknown) = ^CallSideEffect : ~m? +# 2250| v2250_29(void) = ^IndirectReadSideEffect[-1] : &:r2250_25, ~m? +# 2250| mu2250_30(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_25 +# 2250| r2250_31(glval) = VariableAddress[c] : +# 2250| mu2250_32(char) = Store[c] : &:r2250_31, r2250_27 +#-----| Goto (back edge) -> Block 7 + +# 2250| Block 9 +# 2250| r2250_33(glval) = VariableAddress[s2] : +# 2250| r2250_34(glval) = FunctionAddress[~String] : +# 2250| v2250_35(void) = Call[~String] : func:r2250_34, this:r2250_33 +# 2250| mu2250_36(unknown) = ^CallSideEffect : ~m? +# 2250| v2250_37(void) = ^IndirectReadSideEffect[-1] : &:r2250_33, ~m? +# 2250| mu2250_38(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_33 +# 2250| r2250_39(glval) = VariableAddress[s] : +# 2250| r2250_40(glval) = FunctionAddress[~String] : +# 2250| v2250_41(void) = Call[~String] : func:r2250_40, this:r2250_39 +# 2250| mu2250_42(unknown) = ^CallSideEffect : ~m? +# 2250| v2250_43(void) = ^IndirectReadSideEffect[-1] : &:r2250_39, ~m? +# 2250| mu2250_44(String) = ^IndirectMayWriteSideEffect[-1] : &:r2250_39 +# 2253| v2253_1(void) = NoOp : +# 2240| v2240_4(void) = ReturnVoid : +# 2240| v2240_5(void) = AliasedUse : ~m? +# 2240| v2240_6(void) = ExitFunction : + +# 2255| void IfDestructors2(bool) +# 2255| Block 0 +# 2255| v2255_1(void) = EnterFunction : +# 2255| mu2255_2(unknown) = AliasedDefinition : +# 2255| mu2255_3(unknown) = InitializeNonLocal : +# 2255| r2255_4(glval) = VariableAddress[b] : +# 2255| mu2255_5(bool) = InitializeParameter[b] : &:r2255_4 +# 2256| r2256_1(glval) = VariableAddress[s] : +# 2256| mu2256_2(String) = Uninitialized[s] : &:r2256_1 +# 2256| r2256_3(glval) = FunctionAddress[String] : +# 2256| r2256_4(glval) = StringConstant["hello"] : +# 2256| r2256_5(char *) = Convert : r2256_4 +# 2256| v2256_6(void) = Call[String] : func:r2256_3, this:r2256_1, 0:r2256_5 +# 2256| mu2256_7(unknown) = ^CallSideEffect : ~m? +# 2256| v2256_8(void) = ^BufferReadSideEffect[0] : &:r2256_5, ~m? +# 2256| mu2256_9(String) = ^IndirectMayWriteSideEffect[-1] : &:r2256_1 +# 2256| r2256_10(glval) = VariableAddress[b] : +# 2256| r2256_11(bool) = Load[b] : &:r2256_10, ~m? +# 2256| v2256_12(void) = ConditionalBranch : r2256_11 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2257| Block 1 +# 2257| r2257_1(glval) = VariableAddress[x] : +# 2257| r2257_2(int) = Constant[0] : +# 2257| mu2257_3(int) = Store[x] : &:r2257_1, r2257_2 +#-----| Goto -> Block 3 + +# 2259| Block 2 +# 2259| r2259_1(glval) = VariableAddress[y] : +# 2259| r2259_2(int) = Constant[0] : +# 2259| mu2259_3(int) = Store[y] : &:r2259_1, r2259_2 +#-----| Goto -> Block 3 + +# 2260| Block 3 +# 2260| r2260_1(glval) = VariableAddress[s] : +# 2260| r2260_2(glval) = FunctionAddress[~String] : +# 2260| v2260_3(void) = Call[~String] : func:r2260_2, this:r2260_1 +# 2260| mu2260_4(unknown) = ^CallSideEffect : ~m? +# 2260| v2260_5(void) = ^IndirectReadSideEffect[-1] : &:r2260_1, ~m? +# 2260| mu2260_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2260_1 +# 2261| v2261_1(void) = NoOp : +# 2255| v2255_6(void) = ReturnVoid : +# 2255| v2255_7(void) = AliasedUse : ~m? +# 2255| v2255_8(void) = ExitFunction : + +# 2270| void IfDestructors3(bool) +# 2270| Block 0 +# 2270| v2270_1(void) = EnterFunction : +# 2270| mu2270_2(unknown) = AliasedDefinition : +# 2270| mu2270_3(unknown) = InitializeNonLocal : +# 2270| r2270_4(glval) = VariableAddress[b] : +# 2270| mu2270_5(bool) = InitializeParameter[b] : &:r2270_4 +# 2271| r2271_1(glval) = VariableAddress[B] : +# 2271| mu2271_2(Bool) = Uninitialized[B] : &:r2271_1 +# 2271| r2271_3(glval) = FunctionAddress[Bool] : +# 2271| r2271_4(glval) = VariableAddress[b] : +# 2271| r2271_5(bool) = Load[b] : &:r2271_4, ~m? +# 2271| v2271_6(void) = Call[Bool] : func:r2271_3, this:r2271_1, 0:r2271_5 +# 2271| mu2271_7(unknown) = ^CallSideEffect : ~m? +# 2271| mu2271_8(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2271_1 +# 2271| r2271_9(glval) = VariableAddress[B] : +# 2271| r2271_10(glval) = FunctionAddress[operator bool] : +# 2271| r2271_11(bool) = Call[operator bool] : func:r2271_10, this:r2271_9 +# 2271| mu2271_12(unknown) = ^CallSideEffect : ~m? +# 2271| v2271_13(void) = ^IndirectReadSideEffect[-1] : &:r2271_9, ~m? +# 2271| mu2271_14(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2271_9 +# 2271| r2271_15(bool) = CopyValue : r2271_11 +# 2271| v2271_16(void) = ConditionalBranch : r2271_15 +#-----| False -> Block 2 +#-----| True -> Block 1 + +# 2272| Block 1 +# 2272| r2272_1(glval) = VariableAddress[s1] : +# 2272| mu2272_2(String) = Uninitialized[s1] : &:r2272_1 +# 2272| r2272_3(glval) = FunctionAddress[String] : +# 2272| v2272_4(void) = Call[String] : func:r2272_3, this:r2272_1 +# 2272| mu2272_5(unknown) = ^CallSideEffect : ~m? +# 2272| mu2272_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2272_1 +# 2273| r2273_1(glval) = VariableAddress[s1] : +# 2273| r2273_2(glval) = FunctionAddress[~String] : +# 2273| v2273_3(void) = Call[~String] : func:r2273_2, this:r2273_1 +# 2273| mu2273_4(unknown) = ^CallSideEffect : ~m? +# 2273| v2273_5(void) = ^IndirectReadSideEffect[-1] : &:r2273_1, ~m? +# 2273| mu2273_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2273_1 +#-----| Goto -> Block 3 + +# 2274| Block 2 +# 2274| r2274_1(glval) = VariableAddress[s2] : +# 2274| mu2274_2(String) = Uninitialized[s2] : &:r2274_1 +# 2274| r2274_3(glval) = FunctionAddress[String] : +# 2274| v2274_4(void) = Call[String] : func:r2274_3, this:r2274_1 +# 2274| mu2274_5(unknown) = ^CallSideEffect : ~m? +# 2274| mu2274_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2274_1 +# 2275| r2275_1(glval) = VariableAddress[s2] : +# 2275| r2275_2(glval) = FunctionAddress[~String] : +# 2275| v2275_3(void) = Call[~String] : func:r2275_2, this:r2275_1 +# 2275| mu2275_4(unknown) = ^CallSideEffect : ~m? +# 2275| v2275_5(void) = ^IndirectReadSideEffect[-1] : &:r2275_1, ~m? +# 2275| mu2275_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2275_1 +#-----| Goto -> Block 3 + +# 2275| Block 3 +# 2275| r2275_7(glval) = VariableAddress[B] : +# 2275| r2275_8(glval) = FunctionAddress[~Bool] : +# 2275| v2275_9(void) = Call[~Bool] : func:r2275_8, this:r2275_7 +# 2275| mu2275_10(unknown) = ^CallSideEffect : ~m? +# 2275| v2275_11(void) = ^IndirectReadSideEffect[-1] : &:r2275_7, ~m? +# 2275| mu2275_12(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2275_7 +# 2276| v2276_1(void) = NoOp : +# 2270| v2270_6(void) = ReturnVoid : +# 2270| v2270_7(void) = AliasedUse : ~m? +# 2270| v2270_8(void) = ExitFunction : + +# 2278| void WhileLoopDestructors(bool) +# 2278| Block 0 +# 2278| v2278_1(void) = EnterFunction : +# 2278| mu2278_2(unknown) = AliasedDefinition : +# 2278| mu2278_3(unknown) = InitializeNonLocal : +# 2278| r2278_4(glval) = VariableAddress[b] : +# 2278| mu2278_5(bool) = InitializeParameter[b] : &:r2278_4 +# 2280| r2280_1(glval) = VariableAddress[s] : +# 2280| mu2280_2(String) = Uninitialized[s] : &:r2280_1 +# 2280| r2280_3(glval) = FunctionAddress[String] : +# 2280| v2280_4(void) = Call[String] : func:r2280_3, this:r2280_1 +# 2280| mu2280_5(unknown) = ^CallSideEffect : ~m? +# 2280| mu2280_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2280_1 +#-----| Goto -> Block 1 + +# 2281| Block 1 +# 2281| r2281_1(glval) = VariableAddress[b] : +# 2281| r2281_2(bool) = Load[b] : &:r2281_1, ~m? +# 2281| v2281_3(void) = ConditionalBranch : r2281_2 +#-----| False -> Block 3 +#-----| True -> Block 2 + +# 2282| Block 2 +# 2282| r2282_1(bool) = Constant[0] : +# 2282| r2282_2(glval) = VariableAddress[b] : +# 2282| mu2282_3(bool) = Store[b] : &:r2282_2, r2282_1 +#-----| Goto (back edge) -> Block 1 + +# 2284| Block 3 +# 2284| r2284_1(glval) = VariableAddress[s] : +# 2284| r2284_2(glval) = FunctionAddress[~String] : +# 2284| v2284_3(void) = Call[~String] : func:r2284_2, this:r2284_1 +# 2284| mu2284_4(unknown) = ^CallSideEffect : ~m? +# 2284| v2284_5(void) = ^IndirectReadSideEffect[-1] : &:r2284_1, ~m? +# 2284| mu2284_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2284_1 +#-----| Goto -> Block 4 + +# 2287| Block 4 +# 2287| r2287_1(glval) = VariableAddress[B] : +# 2287| mu2287_2(Bool) = Uninitialized[B] : &:r2287_1 +# 2287| r2287_3(glval) = FunctionAddress[Bool] : +# 2287| r2287_4(glval) = VariableAddress[b] : +# 2287| r2287_5(bool) = Load[b] : &:r2287_4, ~m? +# 2287| v2287_6(void) = Call[Bool] : func:r2287_3, this:r2287_1, 0:r2287_5 +# 2287| mu2287_7(unknown) = ^CallSideEffect : ~m? +# 2287| mu2287_8(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2287_1 +# 2287| r2287_9(glval) = VariableAddress[B] : +# 2287| r2287_10(glval) = FunctionAddress[operator bool] : +# 2287| r2287_11(bool) = Call[operator bool] : func:r2287_10, this:r2287_9 +# 2287| mu2287_12(unknown) = ^CallSideEffect : ~m? +# 2287| v2287_13(void) = ^IndirectReadSideEffect[-1] : &:r2287_9, ~m? +# 2287| mu2287_14(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2287_9 +# 2287| r2287_15(bool) = CopyValue : r2287_11 +# 2287| v2287_16(void) = ConditionalBranch : r2287_15 +#-----| False -> Block 6 +#-----| True -> Block 5 + +# 2288| Block 5 +# 2288| r2288_1(bool) = Constant[0] : +# 2288| r2288_2(glval) = VariableAddress[b] : +# 2288| mu2288_3(bool) = Store[b] : &:r2288_2, r2288_1 +# 2289| r2289_1(glval) = VariableAddress[B] : +# 2289| r2289_2(glval) = FunctionAddress[~Bool] : +# 2289| v2289_3(void) = Call[~Bool] : func:r2289_2, this:r2289_1 +# 2289| mu2289_4(unknown) = ^CallSideEffect : ~m? +# 2289| v2289_5(void) = ^IndirectReadSideEffect[-1] : &:r2289_1, ~m? +# 2289| mu2289_6(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2289_1 +#-----| Goto (back edge) -> Block 4 + +# 2289| Block 6 +# 2289| r2289_7(glval) = VariableAddress[B] : +# 2289| r2289_8(glval) = FunctionAddress[~Bool] : +# 2289| v2289_9(void) = Call[~Bool] : func:r2289_8, this:r2289_7 +# 2289| mu2289_10(unknown) = ^CallSideEffect : ~m? +# 2289| v2289_11(void) = ^IndirectReadSideEffect[-1] : &:r2289_7, ~m? +# 2289| mu2289_12(Bool) = ^IndirectMayWriteSideEffect[-1] : &:r2289_7 +# 2291| v2291_1(void) = NoOp : +# 2278| v2278_6(void) = ReturnVoid : +# 2278| v2278_7(void) = AliasedUse : ~m? +# 2278| v2278_8(void) = ExitFunction : + +# 2293| void VoidFunc() +# 2293| Block 0 +# 2293| v2293_1(void) = EnterFunction : +# 2293| mu2293_2(unknown) = AliasedDefinition : +# 2293| mu2293_3(unknown) = InitializeNonLocal : +# 2293| v2293_4(void) = NoOp : +# 2293| v2293_5(void) = ReturnVoid : +# 2293| v2293_6(void) = AliasedUse : ~m? +# 2293| v2293_7(void) = ExitFunction : + +# 2295| void IfReturnDestructors(bool) +# 2295| Block 0 +# 2295| v2295_1(void) = EnterFunction : +# 2295| mu2295_2(unknown) = AliasedDefinition : +# 2295| mu2295_3(unknown) = InitializeNonLocal : +# 2295| r2295_4(glval) = VariableAddress[b] : +# 2295| mu2295_5(bool) = InitializeParameter[b] : &:r2295_4 +# 2296| r2296_1(glval) = VariableAddress[s] : +# 2296| mu2296_2(String) = Uninitialized[s] : &:r2296_1 +# 2296| r2296_3(glval) = FunctionAddress[String] : +# 2296| v2296_4(void) = Call[String] : func:r2296_3, this:r2296_1 +# 2296| mu2296_5(unknown) = ^CallSideEffect : ~m? +# 2296| mu2296_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2296_1 +# 2297| r2297_1(glval) = VariableAddress[b] : +# 2297| r2297_2(bool) = Load[b] : &:r2297_1, ~m? +# 2297| v2297_3(void) = ConditionalBranch : r2297_2 +#-----| False -> Block 3 +#-----| True -> Block 2 + +# 2295| Block 1 +# 2295| v2295_6(void) = ReturnVoid : +# 2295| v2295_7(void) = AliasedUse : ~m? +# 2295| v2295_8(void) = ExitFunction : + +# 2298| Block 2 +# 2298| v2298_1(void) = NoOp : +# 2304| r2304_1(glval) = VariableAddress[s] : +# 2304| r2304_2(glval) = FunctionAddress[~String] : +# 2304| v2304_3(void) = Call[~String] : func:r2304_2, this:r2304_1 +# 2304| mu2304_4(unknown) = ^CallSideEffect : ~m? +# 2304| v2304_5(void) = ^IndirectReadSideEffect[-1] : &:r2304_1, ~m? +# 2304| mu2304_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_1 +#-----| Goto -> Block 1 + +# 2300| Block 3 +# 2300| r2300_1(glval) = VariableAddress[b] : +# 2300| r2300_2(bool) = Load[b] : &:r2300_1, ~m? +# 2300| v2300_3(void) = ConditionalBranch : r2300_2 +#-----| False -> Block 5 +#-----| True -> Block 4 + +# 2301| Block 4 +# 2301| r2301_1(glval) = FunctionAddress[VoidFunc] : +# 2301| v2301_2(void) = Call[VoidFunc] : func:r2301_1 +# 2301| mu2301_3(unknown) = ^CallSideEffect : ~m? +# 2301| v2301_4(void) = NoOp : +# 2304| r2304_7(glval) = VariableAddress[s] : +# 2304| r2304_8(glval) = FunctionAddress[~String] : +# 2304| v2304_9(void) = Call[~String] : func:r2304_8, this:r2304_7 +# 2304| mu2304_10(unknown) = ^CallSideEffect : ~m? +# 2304| v2304_11(void) = ^IndirectReadSideEffect[-1] : &:r2304_7, ~m? +# 2304| mu2304_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_7 +#-----| Goto -> Block 1 + +# 2303| Block 5 +# 2303| r2303_1(glval) = VariableAddress[s] : +# 2304| v2304_13(void) = NoOp : +# 2304| r2304_14(glval) = VariableAddress[s] : +# 2304| r2304_15(glval) = FunctionAddress[~String] : +# 2304| v2304_16(void) = Call[~String] : func:r2304_15, this:r2304_14 +# 2304| mu2304_17(unknown) = ^CallSideEffect : ~m? +# 2304| v2304_18(void) = ^IndirectReadSideEffect[-1] : &:r2304_14, ~m? +# 2304| mu2304_19(String) = ^IndirectMayWriteSideEffect[-1] : &:r2304_14 +#-----| Goto -> Block 1 + +# 2306| int IfReturnDestructors3(bool) +# 2306| Block 0 +# 2306| v2306_1(void) = EnterFunction : +# 2306| mu2306_2(unknown) = AliasedDefinition : +# 2306| mu2306_3(unknown) = InitializeNonLocal : +# 2306| r2306_4(glval) = VariableAddress[b] : +# 2306| mu2306_5(bool) = InitializeParameter[b] : &:r2306_4 +# 2307| r2307_1(glval) = VariableAddress[s] : +# 2307| mu2307_2(String) = Uninitialized[s] : &:r2307_1 +# 2307| r2307_3(glval) = FunctionAddress[String] : +# 2307| v2307_4(void) = Call[String] : func:r2307_3, this:r2307_1 +# 2307| mu2307_5(unknown) = ^CallSideEffect : ~m? +# 2307| mu2307_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2307_1 +# 2308| r2308_1(glval) = VariableAddress[b] : +# 2308| r2308_2(bool) = Load[b] : &:r2308_1, ~m? +# 2308| v2308_3(void) = ConditionalBranch : r2308_2 +#-----| False -> Block 3 +#-----| True -> Block 2 + +# 2306| Block 1 +# 2306| r2306_6(glval) = VariableAddress[#return] : +# 2306| v2306_7(void) = ReturnValue : &:r2306_6, ~m? +# 2306| v2306_8(void) = AliasedUse : ~m? +# 2306| v2306_9(void) = ExitFunction : + +# 2309| Block 2 +# 2309| r2309_1(glval) = VariableAddress[#return] : +# 2309| r2309_2(int) = Constant[1] : +# 2309| mu2309_3(int) = Store[#return] : &:r2309_1, r2309_2 +# 2312| r2312_1(glval) = VariableAddress[s] : +# 2312| r2312_2(glval) = FunctionAddress[~String] : +# 2312| v2312_3(void) = Call[~String] : func:r2312_2, this:r2312_1 +# 2312| mu2312_4(unknown) = ^CallSideEffect : ~m? +# 2312| v2312_5(void) = ^IndirectReadSideEffect[-1] : &:r2312_1, ~m? +# 2312| mu2312_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_1 +#-----| Goto -> Block 1 + +# 2311| Block 3 +# 2311| r2311_1(glval) = VariableAddress[#return] : +# 2311| r2311_2(int) = Constant[0] : +# 2311| mu2311_3(int) = Store[#return] : &:r2311_1, r2311_2 +# 2312| r2312_7(glval) = VariableAddress[s] : +# 2312| r2312_8(glval) = FunctionAddress[~String] : +# 2312| v2312_9(void) = Call[~String] : func:r2312_8, this:r2312_7 +# 2312| mu2312_10(unknown) = ^CallSideEffect : ~m? +# 2312| v2312_11(void) = ^IndirectReadSideEffect[-1] : &:r2312_7, ~m? +# 2312| mu2312_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2312_7 +#-----| Goto -> Block 1 + +# 2314| void VoidReturnDestructors() +# 2314| Block 0 +# 2314| v2314_1(void) = EnterFunction : +# 2314| mu2314_2(unknown) = AliasedDefinition : +# 2314| mu2314_3(unknown) = InitializeNonLocal : +# 2315| r2315_1(glval) = VariableAddress[s] : +# 2315| mu2315_2(String) = Uninitialized[s] : &:r2315_1 +# 2315| r2315_3(glval) = FunctionAddress[String] : +# 2315| v2315_4(void) = Call[String] : func:r2315_3, this:r2315_1 +# 2315| mu2315_5(unknown) = ^CallSideEffect : ~m? +# 2315| mu2315_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2315_1 +# 2316| r2316_1(glval) = FunctionAddress[VoidFunc] : +# 2316| v2316_2(void) = Call[VoidFunc] : func:r2316_1 +# 2316| mu2316_3(unknown) = ^CallSideEffect : ~m? +# 2316| v2316_4(void) = NoOp : +# 2317| r2317_1(glval) = VariableAddress[s] : +# 2317| r2317_2(glval) = FunctionAddress[~String] : +# 2317| v2317_3(void) = Call[~String] : func:r2317_2, this:r2317_1 +# 2317| mu2317_4(unknown) = ^CallSideEffect : ~m? +# 2317| v2317_5(void) = ^IndirectReadSideEffect[-1] : &:r2317_1, ~m? +# 2317| mu2317_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2317_1 +# 2314| v2314_4(void) = ReturnVoid : +# 2314| v2314_5(void) = AliasedUse : ~m? +# 2314| v2314_6(void) = ExitFunction : + +# 2327| return_routine_type::VoidToIntMemberFunc return_routine_type::GetVoidToIntFunc() +# 2327| Block 0 +# 2327| v2327_1(void) = EnterFunction : +# 2327| mu2327_2(unknown) = AliasedDefinition : +# 2327| mu2327_3(unknown) = InitializeNonLocal : +# 2329| r2329_1(glval<..:: *>) = VariableAddress[#return] : +# 2329| r2329_2(..()(..)) = FunctionAddress[VoidToInt] : +# 2329| mu2329_3(..:: *) = Store[#return] : &:r2329_1, r2329_2 +# 2327| r2327_4(glval<..:: *>) = VariableAddress[#return] : +# 2327| v2327_5(void) = ReturnValue : &:r2327_4, ~m? +# 2327| v2327_6(void) = AliasedUse : ~m? +# 2327| v2327_7(void) = ExitFunction : + perf-regression.cpp: # 6| void Big::Big() # 6| Block 0 @@ -12444,6 +13592,11 @@ smart_ptr.cpp: # 12| v12_12(void) = ^BufferReadSideEffect[0] : &:r12_9, ~m? # 12| mu12_13(unknown) = ^BufferMayWriteSideEffect[0] : &:r12_9 # 13| v13_1(void) = NoOp : +# 13| r13_2(glval>>) = VariableAddress[up] : +# 13| r13_3(glval) = FunctionAddress[~unique_ptr] : +# 13| v13_4(void) = Call[~unique_ptr] : func:r13_3, this:r13_2 +# 13| v13_5(void) = ^IndirectReadSideEffect[-1] : &:r13_2, ~m? +# 13| mu13_6(unique_ptr>) = ^IndirectMustWriteSideEffect[-1] : &:r13_2 # 10| v10_8(void) = ReturnIndirection[p] : &:r10_6, ~m? # 10| v10_9(void) = ReturnVoid : # 10| v10_10(void) = AliasedUse : ~m? @@ -12483,6 +13636,11 @@ smart_ptr.cpp: # 19| v19_15(void) = ^BufferReadSideEffect[0] : &:r19_12, ~m? # 19| mu19_16(unknown) = ^BufferMayWriteSideEffect[0] : &:r19_12 # 20| v20_1(void) = NoOp : +# 20| r20_2(glval>) = VariableAddress[sp] : +# 20| r20_3(glval) = FunctionAddress[~shared_ptr] : +# 20| v20_4(void) = Call[~shared_ptr] : func:r20_3, this:r20_2 +# 20| v20_5(void) = ^IndirectReadSideEffect[-1] : &:r20_2, ~m? +# 20| mu20_6(shared_ptr) = ^IndirectMustWriteSideEffect[-1] : &:r20_2 # 17| v17_8(void) = ReturnIndirection[p] : &:r17_6, ~m? # 17| v17_9(void) = ReturnVoid : # 17| v17_10(void) = AliasedUse : ~m? @@ -12582,6 +13740,31 @@ smart_ptr.cpp: # 47| mu47_14(unknown) = ^CallSideEffect : ~m? # 47| v47_15(void) = ^BufferReadSideEffect[0] : &:r47_12, ~m? # 48| v48_1(void) = NoOp : +# 48| r48_2(glval>>) = VariableAddress[sp_const_sp_const_int] : +# 48| r48_3(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_4(void) = Call[~shared_ptr] : func:r48_3, this:r48_2 +# 48| v48_5(void) = ^IndirectReadSideEffect[-1] : &:r48_2, ~m? +# 48| mu48_6(shared_ptr>) = ^IndirectMustWriteSideEffect[-1] : &:r48_2 +# 48| r48_7(glval>>) = VariableAddress[sp_const_sp_int] : +# 48| r48_8(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_9(void) = Call[~shared_ptr] : func:r48_8, this:r48_7 +# 48| v48_10(void) = ^IndirectReadSideEffect[-1] : &:r48_7, ~m? +# 48| mu48_11(shared_ptr>) = ^IndirectMustWriteSideEffect[-1] : &:r48_7 +# 48| r48_12(glval>>) = VariableAddress[sp_sp_const_int] : +# 48| r48_13(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_14(void) = Call[~shared_ptr] : func:r48_13, this:r48_12 +# 48| v48_15(void) = ^IndirectReadSideEffect[-1] : &:r48_12, ~m? +# 48| mu48_16(shared_ptr>) = ^IndirectMustWriteSideEffect[-1] : &:r48_12 +# 48| r48_17(glval>) = VariableAddress[sp_const_int_pointer] : +# 48| r48_18(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_19(void) = Call[~shared_ptr] : func:r48_18, this:r48_17 +# 48| v48_20(void) = ^IndirectReadSideEffect[-1] : &:r48_17, ~m? +# 48| mu48_21(shared_ptr) = ^IndirectMustWriteSideEffect[-1] : &:r48_17 +# 48| r48_22(glval>) = VariableAddress[sp_const_int] : +# 48| r48_23(glval) = FunctionAddress[~shared_ptr] : +# 48| v48_24(void) = Call[~shared_ptr] : func:r48_23, this:r48_22 +# 48| v48_25(void) = ^IndirectReadSideEffect[-1] : &:r48_22, ~m? +# 48| mu48_26(shared_ptr) = ^IndirectMustWriteSideEffect[-1] : &:r48_22 # 28| v28_4(void) = ReturnVoid : # 28| v28_5(void) = AliasedUse : ~m? # 28| v28_6(void) = ExitFunction : diff --git a/cpp/ql/test/library-tests/ir/points_to/points_to.expected b/cpp/ql/test/library-tests/ir/points_to/points_to.expected index 48de9172b36..8ec8033d086 100644 --- a/cpp/ql/test/library-tests/ir/points_to/points_to.expected +++ b/cpp/ql/test/library-tests/ir/points_to/points_to.expected @@ -1,2 +1,2 @@ -failures testFailures +failures diff --git a/cpp/ql/test/library-tests/special_members/generated_copy/functions.expected b/cpp/ql/test/library-tests/special_members/generated_copy/functions.expected index fa8f9be95b9..e60a795b9c0 100644 --- a/cpp/ql/test/library-tests/special_members/generated_copy/functions.expected +++ b/cpp/ql/test/library-tests/special_members/generated_copy/functions.expected @@ -11,8 +11,7 @@ | copy.cpp:13:9:13:9 | operator= | protected_cc::Sub2& protected_cc::Sub2::operator=(protected_cc::Sub2 const&) | | | | copy.cpp:13:9:13:9 | operator= | protected_cc::Sub2& protected_cc::Sub2::operator=(protected_cc::Sub2&&) | | | | copy.cpp:17:9:17:9 | HasMember | void protected_cc::HasMember::HasMember() | deleted | | -| copy.cpp:17:9:17:9 | HasMember | void protected_cc::HasMember::HasMember(protected_cc::HasMember const&) | | | -| copy.cpp:17:9:17:9 | HasMember | void protected_cc::HasMember::HasMember(protected_cc::HasMember&&) | | | +| copy.cpp:17:9:17:9 | HasMember | void protected_cc::HasMember::HasMember(protected_cc::HasMember const&) | deleted | | | copy.cpp:17:9:17:9 | operator= | protected_cc::HasMember& protected_cc::HasMember::operator=(protected_cc::HasMember const&) | | | | copy.cpp:17:9:17:9 | operator= | protected_cc::HasMember& protected_cc::HasMember::operator=(protected_cc::HasMember&&) | | | | copy.cpp:25:5:25:5 | C | void deleted_cc::C::C(deleted_cc::C const&) | deleted | | diff --git a/cpp/ql/test/library-tests/specifiers2/specifiers2.expected b/cpp/ql/test/library-tests/specifiers2/specifiers2.expected index 8950906cb63..b4dd73b148f 100644 --- a/cpp/ql/test/library-tests/specifiers2/specifiers2.expected +++ b/cpp/ql/test/library-tests/specifiers2/specifiers2.expected @@ -186,7 +186,6 @@ | Variable | specifiers2pp.cpp:16:13:16:22 | privateInt | privateInt | private | | Variable | specifiers2pp.cpp:17:21:17:30 | mutableInt | mutableInt | private | | Variable | specifiers2pp.cpp:20:13:20:24 | protectedInt | protectedInt | protected | -| Variable | specifiers2pp.cpp:52:25:52:27 | vci | vci | static | | VariableDeclarationEntry | specifiers2.c:5:12:5:12 | declaration of i | i | extern | | VariableDeclarationEntry | specifiers2.c:6:12:6:12 | declaration of i | i | extern | | VariableDeclarationEntry | specifiers2.c:8:12:8:12 | declaration of j | j | extern | diff --git a/cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_consistency.expected index c2e0783d70f..48f73fa8d87 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_consistency.expected @@ -7,7 +7,6 @@ missingOperandType duplicateChiOperand sideEffectWithoutPrimary instructionWithoutSuccessor -| VacuousDestructorCall.cpp:2:29:2:29 | InitializeIndirection: y | Instruction 'InitializeIndirection: y' has no successors in function '$@'. | VacuousDestructorCall.cpp:2:6:2:6 | void CallDestructor(int, int*) | void CallDestructor(int, int*) | | ms_try_mix.cpp:35:13:35:19 | ThrowValue: throw ... | Instruction 'ThrowValue: throw ...' has no successors in function '$@'. | ms_try_mix.cpp:29:6:29:19 | void ms_finally_mix(int) | void ms_finally_mix(int) | | ms_try_mix.cpp:53:5:53:11 | ThrowValue: throw ... | Instruction 'ThrowValue: throw ...' has no successors in function '$@'. | ms_try_mix.cpp:49:6:49:28 | void ms_empty_finally_at_end() | void ms_empty_finally_at_end() | | stmt_expr.cpp:27:5:27:15 | Store: ... = ... | Instruction 'Store: ... = ...' has no successors in function '$@'. | stmt_expr.cpp:21:13:21:13 | void stmtexpr::g(int) | void stmtexpr::g(int) | diff --git a/cpp/ql/test/library-tests/syntax-zoo/raw_consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/raw_consistency.expected index caff6369ad9..9c9cad3aefb 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/raw_consistency.expected +++ b/cpp/ql/test/library-tests/syntax-zoo/raw_consistency.expected @@ -8,9 +8,6 @@ missingOperandType duplicateChiOperand sideEffectWithoutPrimary instructionWithoutSuccessor -| VacuousDestructorCall.cpp:2:29:2:29 | InitializeIndirection: y | Instruction 'InitializeIndirection: y' has no successors in function '$@'. | VacuousDestructorCall.cpp:2:6:2:6 | void CallDestructor(int, int*) | void CallDestructor(int, int*) | -| VacuousDestructorCall.cpp:3:3:3:3 | VariableAddress: x | Instruction 'VariableAddress: x' has no successors in function '$@'. | VacuousDestructorCall.cpp:2:6:2:6 | void CallDestructor(int, int*) | void CallDestructor(int, int*) | -| VacuousDestructorCall.cpp:4:3:4:3 | Load: y | Instruction 'Load: y' has no successors in function '$@'. | VacuousDestructorCall.cpp:2:6:2:6 | void CallDestructor(int, int*) | void CallDestructor(int, int*) | | ms_try_mix.cpp:35:13:35:19 | ThrowValue: throw ... | Instruction 'ThrowValue: throw ...' has no successors in function '$@'. | ms_try_mix.cpp:29:6:29:19 | void ms_finally_mix(int) | void ms_finally_mix(int) | | ms_try_mix.cpp:53:5:53:11 | ThrowValue: throw ... | Instruction 'ThrowValue: throw ...' has no successors in function '$@'. | ms_try_mix.cpp:49:6:49:28 | void ms_empty_finally_at_end() | void ms_empty_finally_at_end() | | stmt_expr.cpp:27:5:27:15 | Store: ... = ... | Instruction 'Store: ... = ...' has no successors in function '$@'. | stmt_expr.cpp:21:13:21:13 | void stmtexpr::g(int) | void stmtexpr::g(int) | @@ -30,7 +27,6 @@ multipleIRTypes lostReachability backEdgeCountMismatch useNotDominatedByDefinition -| VacuousDestructorCall.cpp:2:29:2:29 | Address | Operand 'Address' is not dominated by its definition in function '$@'. | VacuousDestructorCall.cpp:2:6:2:6 | void CallDestructor(int, int*) | void CallDestructor(int, int*) | | ms_try_except.cpp:9:19:9:19 | Left | Operand 'Left' is not dominated by its definition in function '$@'. | ms_try_except.cpp:2:6:2:18 | void ms_try_except(int) | void ms_try_except(int) | | ms_try_except.cpp:9:19:9:19 | Left | Operand 'Left' is not dominated by its definition in function '$@'. | ms_try_except.cpp:2:6:2:18 | void ms_try_except(int) | void ms_try_except(int) | | ms_try_except.cpp:19:17:19:21 | Left | Operand 'Left' is not dominated by its definition in function '$@'. | ms_try_except.cpp:2:6:2:18 | void ms_try_except(int) | void ms_try_except(int) | diff --git a/cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_consistency.expected index c2e0783d70f..48f73fa8d87 100644 --- a/cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_consistency.expected @@ -7,7 +7,6 @@ missingOperandType duplicateChiOperand sideEffectWithoutPrimary instructionWithoutSuccessor -| VacuousDestructorCall.cpp:2:29:2:29 | InitializeIndirection: y | Instruction 'InitializeIndirection: y' has no successors in function '$@'. | VacuousDestructorCall.cpp:2:6:2:6 | void CallDestructor(int, int*) | void CallDestructor(int, int*) | | ms_try_mix.cpp:35:13:35:19 | ThrowValue: throw ... | Instruction 'ThrowValue: throw ...' has no successors in function '$@'. | ms_try_mix.cpp:29:6:29:19 | void ms_finally_mix(int) | void ms_finally_mix(int) | | ms_try_mix.cpp:53:5:53:11 | ThrowValue: throw ... | Instruction 'ThrowValue: throw ...' has no successors in function '$@'. | ms_try_mix.cpp:49:6:49:28 | void ms_empty_finally_at_end() | void ms_empty_finally_at_end() | | stmt_expr.cpp:27:5:27:15 | Store: ... = ... | Instruction 'Store: ... = ...' has no successors in function '$@'. | stmt_expr.cpp:21:13:21:13 | void stmtexpr::g(int) | void stmtexpr::g(int) | diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/NonConstantFormat.expected b/cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/NonConstantFormat.expected index a512dfbd914..2539c728d87 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/NonConstantFormat.expected +++ b/cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/NonConstantFormat.expected @@ -1,21 +1,99 @@ -| NonConstantFormat.c:30:10:30:16 | access to array | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| NonConstantFormat.c:41:9:41:27 | call to any_random_function | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| NonConstantFormat.c:45:9:45:48 | call to gettext | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| nested.cpp:21:23:21:26 | fmt0 | The format string argument to snprintf should be constant to prevent security issues and other potential errors. | -| nested.cpp:79:32:79:38 | call to get_fmt | The format string argument to diagnostic should be constant to prevent security issues and other potential errors. | -| nested.cpp:87:18:87:20 | fmt | The format string argument to diagnostic should be constant to prevent security issues and other potential errors. | -| test.cpp:51:10:51:21 | call to make_message | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:130:20:130:26 | access to array | The format string argument to sprintf should be constant to prevent security issues and other potential errors. | -| test.cpp:157:12:157:15 | data | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:170:12:170:14 | res | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:195:31:195:33 | str | The format string argument to StringCchPrintfW should be constant to prevent security issues and other potential errors. | -| test.cpp:197:11:197:14 | wstr | The format string argument to wprintf should be constant to prevent security issues and other potential errors. | -| test.cpp:205:12:205:20 | ... + ... | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:206:12:206:16 | hello | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:211:12:211:16 | hello | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:217:12:217:16 | hello | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:223:12:223:16 | hello | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:228:12:228:18 | ++ ... | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:235:12:235:16 | hello | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:242:12:242:16 | hello | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| test.cpp:247:12:247:16 | hello | The format string argument to printf should be constant to prevent security issues and other potential errors. | +edges +| NonConstantFormat.c:28:27:28:30 | **argv | NonConstantFormat.c:30:10:30:16 | *access to array | provenance | | +| NonConstantFormat.c:45:11:45:47 | *call to any_random_function | NonConstantFormat.c:45:9:45:48 | *call to gettext | provenance | | +| nested.cpp:19:29:19:32 | *fmt0 | nested.cpp:21:23:21:26 | *fmt0 | provenance | | +| nested.cpp:27:32:27:34 | *fmt | nested.cpp:28:16:28:18 | *fmt | provenance | | +| nested.cpp:28:16:28:18 | *fmt | nested.cpp:19:29:19:32 | *fmt0 | provenance | | +| nested.cpp:34:37:34:39 | *fmt | nested.cpp:35:19:35:21 | *fmt | provenance | | +| nested.cpp:35:19:35:21 | *fmt | nested.cpp:27:32:27:34 | *fmt | provenance | | +| nested.cpp:42:24:42:34 | *call to ext_fmt_str | nested.cpp:34:37:34:39 | *fmt | provenance | | +| nested.cpp:86:19:86:46 | *call to __builtin_alloca | nested.cpp:87:18:87:20 | *fmt | provenance | | +| test.cpp:27:39:27:39 | n | test.cpp:27:13:27:24 | **make_message | provenance | | +| test.cpp:46:14:46:17 | argc | test.cpp:51:23:51:30 | ... - ... | provenance | | +| test.cpp:46:27:46:30 | **argv | test.cpp:130:20:130:26 | *access to array | provenance | | +| test.cpp:51:23:51:30 | ... - ... | test.cpp:27:39:27:39 | n | provenance | | +| test.cpp:51:23:51:30 | ... - ... | test.cpp:51:10:51:21 | *call to make_message | provenance | | +| test.cpp:155:27:155:30 | data | test.cpp:157:12:157:15 | data | provenance | | +| test.cpp:167:31:167:34 | data | test.cpp:170:12:170:14 | *res | provenance | | +| test.cpp:193:32:193:34 | str | test.cpp:195:31:195:33 | str | provenance | | +| test.cpp:193:32:193:34 | str | test.cpp:197:11:197:14 | *wstr | provenance | | +| test.cpp:204:25:204:36 | *call to get_string | test.cpp:205:12:205:20 | *... + ... | provenance | | +| test.cpp:204:25:204:36 | *call to get_string | test.cpp:206:12:206:16 | *hello | provenance | | +| test.cpp:209:25:209:36 | *call to get_string | test.cpp:211:12:211:16 | *hello | provenance | | +| test.cpp:215:25:215:36 | *call to get_string | test.cpp:217:12:217:16 | *hello | provenance | | +| test.cpp:221:25:221:36 | *call to get_string | test.cpp:223:12:223:16 | *hello | provenance | | +| test.cpp:227:25:227:36 | *call to get_string | test.cpp:228:12:228:18 | *++ ... | provenance | | +| test.cpp:232:25:232:36 | *call to get_string | test.cpp:235:12:235:16 | *hello | provenance | | +| test.cpp:239:25:239:36 | *call to get_string | test.cpp:242:12:242:16 | *hello | provenance | | +| test.cpp:245:25:245:36 | *call to get_string | test.cpp:247:12:247:16 | *hello | provenance | | +nodes +| NonConstantFormat.c:28:27:28:30 | **argv | semmle.label | **argv | +| NonConstantFormat.c:30:10:30:16 | *access to array | semmle.label | *access to array | +| NonConstantFormat.c:41:9:41:45 | *call to any_random_function | semmle.label | *call to any_random_function | +| NonConstantFormat.c:45:9:45:48 | *call to gettext | semmle.label | *call to gettext | +| NonConstantFormat.c:45:11:45:47 | *call to any_random_function | semmle.label | *call to any_random_function | +| nested.cpp:19:29:19:32 | *fmt0 | semmle.label | *fmt0 | +| nested.cpp:21:23:21:26 | *fmt0 | semmle.label | *fmt0 | +| nested.cpp:27:32:27:34 | *fmt | semmle.label | *fmt | +| nested.cpp:28:16:28:18 | *fmt | semmle.label | *fmt | +| nested.cpp:34:37:34:39 | *fmt | semmle.label | *fmt | +| nested.cpp:35:19:35:21 | *fmt | semmle.label | *fmt | +| nested.cpp:42:24:42:34 | *call to ext_fmt_str | semmle.label | *call to ext_fmt_str | +| nested.cpp:79:32:79:38 | *call to get_fmt | semmle.label | *call to get_fmt | +| nested.cpp:86:19:86:46 | *call to __builtin_alloca | semmle.label | *call to __builtin_alloca | +| nested.cpp:87:18:87:20 | *fmt | semmle.label | *fmt | +| test.cpp:27:13:27:24 | **make_message | semmle.label | **make_message | +| test.cpp:27:39:27:39 | n | semmle.label | n | +| test.cpp:46:14:46:17 | argc | semmle.label | argc | +| test.cpp:46:27:46:30 | **argv | semmle.label | **argv | +| test.cpp:51:10:51:21 | *call to make_message | semmle.label | *call to make_message | +| test.cpp:51:23:51:30 | ... - ... | semmle.label | ... - ... | +| test.cpp:130:20:130:26 | *access to array | semmle.label | *access to array | +| test.cpp:155:27:155:30 | data | semmle.label | data | +| test.cpp:157:12:157:15 | data | semmle.label | data | +| test.cpp:167:31:167:34 | data | semmle.label | data | +| test.cpp:170:12:170:14 | *res | semmle.label | *res | +| test.cpp:193:32:193:34 | str | semmle.label | str | +| test.cpp:195:31:195:33 | str | semmle.label | str | +| test.cpp:197:11:197:14 | *wstr | semmle.label | *wstr | +| test.cpp:204:25:204:36 | *call to get_string | semmle.label | *call to get_string | +| test.cpp:205:12:205:20 | *... + ... | semmle.label | *... + ... | +| test.cpp:206:12:206:16 | *hello | semmle.label | *hello | +| test.cpp:209:25:209:36 | *call to get_string | semmle.label | *call to get_string | +| test.cpp:211:12:211:16 | *hello | semmle.label | *hello | +| test.cpp:215:25:215:36 | *call to get_string | semmle.label | *call to get_string | +| test.cpp:217:12:217:16 | *hello | semmle.label | *hello | +| test.cpp:221:25:221:36 | *call to get_string | semmle.label | *call to get_string | +| test.cpp:223:12:223:16 | *hello | semmle.label | *hello | +| test.cpp:227:25:227:36 | *call to get_string | semmle.label | *call to get_string | +| test.cpp:228:12:228:18 | *++ ... | semmle.label | *++ ... | +| test.cpp:232:25:232:36 | *call to get_string | semmle.label | *call to get_string | +| test.cpp:235:12:235:16 | *hello | semmle.label | *hello | +| test.cpp:239:25:239:36 | *call to get_string | semmle.label | *call to get_string | +| test.cpp:242:12:242:16 | *hello | semmle.label | *hello | +| test.cpp:245:25:245:36 | *call to get_string | semmle.label | *call to get_string | +| test.cpp:247:12:247:16 | *hello | semmle.label | *hello | +subpaths +| test.cpp:51:23:51:30 | ... - ... | test.cpp:27:39:27:39 | n | test.cpp:27:13:27:24 | **make_message | test.cpp:51:10:51:21 | *call to make_message | +#select +| NonConstantFormat.c:30:10:30:16 | *access to array | NonConstantFormat.c:28:27:28:30 | **argv | NonConstantFormat.c:30:10:30:16 | *access to array | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | NonConstantFormat.c:30:3:30:8 | call to printf | printf | +| NonConstantFormat.c:41:9:41:45 | *call to any_random_function | NonConstantFormat.c:41:9:41:45 | *call to any_random_function | NonConstantFormat.c:41:9:41:45 | *call to any_random_function | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | NonConstantFormat.c:41:2:41:7 | call to printf | printf | +| NonConstantFormat.c:45:9:45:48 | *call to gettext | NonConstantFormat.c:45:11:45:47 | *call to any_random_function | NonConstantFormat.c:45:9:45:48 | *call to gettext | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | NonConstantFormat.c:45:2:45:7 | call to printf | printf | +| nested.cpp:21:23:21:26 | *fmt0 | nested.cpp:42:24:42:34 | *call to ext_fmt_str | nested.cpp:21:23:21:26 | *fmt0 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | nested.cpp:21:5:21:12 | call to snprintf | snprintf | +| nested.cpp:79:32:79:38 | *call to get_fmt | nested.cpp:79:32:79:38 | *call to get_fmt | nested.cpp:79:32:79:38 | *call to get_fmt | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | nested.cpp:79:5:79:14 | call to diagnostic | diagnostic | +| nested.cpp:87:18:87:20 | *fmt | nested.cpp:86:19:86:46 | *call to __builtin_alloca | nested.cpp:87:18:87:20 | *fmt | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | nested.cpp:87:7:87:16 | call to diagnostic | diagnostic | +| test.cpp:51:10:51:21 | *call to make_message | test.cpp:46:14:46:17 | argc | test.cpp:51:10:51:21 | *call to make_message | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:51:3:51:8 | call to printf | printf | +| test.cpp:130:20:130:26 | *access to array | test.cpp:46:27:46:30 | **argv | test.cpp:130:20:130:26 | *access to array | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:130:2:130:10 | call to sprintf | sprintf | +| test.cpp:157:12:157:15 | data | test.cpp:155:27:155:30 | data | test.cpp:157:12:157:15 | data | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:157:5:157:10 | call to printf | printf | +| test.cpp:170:12:170:14 | *res | test.cpp:167:31:167:34 | data | test.cpp:170:12:170:14 | *res | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:170:5:170:10 | call to printf | printf | +| test.cpp:195:31:195:33 | str | test.cpp:193:32:193:34 | str | test.cpp:195:31:195:33 | str | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:195:3:195:18 | call to StringCchPrintfW | StringCchPrintfW | +| test.cpp:197:11:197:14 | *wstr | test.cpp:193:32:193:34 | str | test.cpp:197:11:197:14 | *wstr | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:197:3:197:9 | call to wprintf | wprintf | +| test.cpp:205:12:205:20 | *... + ... | test.cpp:204:25:204:36 | *call to get_string | test.cpp:205:12:205:20 | *... + ... | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:205:5:205:10 | call to printf | printf | +| test.cpp:206:12:206:16 | *hello | test.cpp:204:25:204:36 | *call to get_string | test.cpp:206:12:206:16 | *hello | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:206:5:206:10 | call to printf | printf | +| test.cpp:211:12:211:16 | *hello | test.cpp:209:25:209:36 | *call to get_string | test.cpp:211:12:211:16 | *hello | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:211:5:211:10 | call to printf | printf | +| test.cpp:217:12:217:16 | *hello | test.cpp:215:25:215:36 | *call to get_string | test.cpp:217:12:217:16 | *hello | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:217:5:217:10 | call to printf | printf | +| test.cpp:223:12:223:16 | *hello | test.cpp:221:25:221:36 | *call to get_string | test.cpp:223:12:223:16 | *hello | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:223:5:223:10 | call to printf | printf | +| test.cpp:228:12:228:18 | *++ ... | test.cpp:227:25:227:36 | *call to get_string | test.cpp:228:12:228:18 | *++ ... | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:228:5:228:10 | call to printf | printf | +| test.cpp:235:12:235:16 | *hello | test.cpp:232:25:232:36 | *call to get_string | test.cpp:235:12:235:16 | *hello | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:235:5:235:10 | call to printf | printf | +| test.cpp:242:12:242:16 | *hello | test.cpp:239:25:239:36 | *call to get_string | test.cpp:242:12:242:16 | *hello | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:242:5:242:10 | call to printf | printf | +| test.cpp:247:12:247:16 | *hello | test.cpp:245:25:245:36 | *call to get_string | test.cpp:247:12:247:16 | *hello | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | test.cpp:247:5:247:10 | call to printf | printf | diff --git a/cpp/ql/test/query-tests/Likely Bugs/Protocols/TlsSettingsMisconfiguration.expected b/cpp/ql/test/query-tests/Likely Bugs/Protocols/TlsSettingsMisconfiguration.expected index 021bf2094b8..f889cb12a68 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Protocols/TlsSettingsMisconfiguration.expected +++ b/cpp/ql/test/query-tests/Likely Bugs/Protocols/TlsSettingsMisconfiguration.expected @@ -1,9 +1,4 @@ -| test2.cpp:7:32:7:33 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:6:40:6:72 | sslv23 | sslv23 | test2.cpp:7:32:7:33 | call to context | no_sslv3 has not been set | -| test2.cpp:7:32:7:33 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:6:40:6:72 | sslv23 | sslv23 | test2.cpp:7:32:7:33 | call to context | no_tlsv1 has not been set | -| test2.cpp:7:32:7:33 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:6:40:6:72 | sslv23 | sslv23 | test2.cpp:7:32:7:33 | call to context | no_tlsv1_1 has not been set | | test2.cpp:15:32:15:33 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:14:40:14:72 | sslv23 | sslv23 | test2.cpp:15:32:15:33 | call to context | no_sslv3 has not been set | -| test2.cpp:15:32:15:33 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:14:40:14:72 | sslv23 | sslv23 | test2.cpp:15:32:15:33 | call to context | no_tlsv1 has not been set | -| test2.cpp:15:32:15:33 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:14:40:14:72 | sslv23 | sslv23 | test2.cpp:15:32:15:33 | call to context | no_tlsv1_1 has not been set | | test2.cpp:23:32:23:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:23:32:23:64 | sslv23 | sslv23 | test2.cpp:23:32:23:65 | call to context | no_sslv3 has not been set | | test2.cpp:23:32:23:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:23:32:23:64 | sslv23 | sslv23 | test2.cpp:23:32:23:65 | call to context | no_tlsv1 has not been set | | test2.cpp:23:32:23:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:23:32:23:64 | sslv23 | sslv23 | test2.cpp:23:32:23:65 | call to context | no_tlsv1_1 has not been set | @@ -19,22 +14,11 @@ | test2.cpp:52:32:52:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:52:32:52:64 | sslv23 | sslv23 | test2.cpp:52:32:52:65 | call to context | no_sslv3 has not been set | | test2.cpp:52:32:52:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:52:32:52:64 | sslv23 | sslv23 | test2.cpp:52:32:52:65 | call to context | no_tlsv1 has not been set | | test2.cpp:52:32:52:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test2.cpp:52:32:52:64 | sslv23 | sslv23 | test2.cpp:52:32:52:65 | call to context | no_tlsv1_1 has not been set | -| test3.cpp:7:32:7:62 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test3.cpp:7:32:7:61 | tls | tls | test3.cpp:7:32:7:62 | call to context | no_tlsv1 has not been set | | test3.cpp:7:32:7:62 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test3.cpp:7:32:7:61 | tls | tls | test3.cpp:7:32:7:62 | call to context | no_tlsv1_1 has not been set | -| test3.cpp:15:32:15:62 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test3.cpp:15:32:15:61 | tls | tls | test3.cpp:15:32:15:62 | call to context | no_tlsv1 has not been set | -| test3.cpp:15:32:15:62 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test3.cpp:15:32:15:61 | tls | tls | test3.cpp:15:32:15:62 | call to context | no_tlsv1_1 has not been set | -| test.cpp:11:32:11:69 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:11:32:11:68 | tls_client | tls_client | test.cpp:11:32:11:69 | call to context | no_tlsv1 has not been set | -| test.cpp:11:32:11:69 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:11:32:11:68 | tls_client | tls_client | test.cpp:11:32:11:69 | call to context | no_tlsv1_1 has not been set | -| test.cpp:17:32:17:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:17:32:17:64 | sslv23 | sslv23 | test.cpp:17:32:17:65 | call to context | no_sslv3 has not been set | -| test.cpp:17:32:17:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:17:32:17:64 | sslv23 | sslv23 | test.cpp:17:32:17:65 | call to context | no_tlsv1 has not been set | -| test.cpp:17:32:17:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:17:32:17:64 | sslv23 | sslv23 | test.cpp:17:32:17:65 | call to context | no_tlsv1_1 has not been set | | test.cpp:25:32:25:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:25:32:25:64 | sslv23 | sslv23 | test.cpp:25:32:25:65 | call to context | no_sslv3 has not been set | -| test.cpp:25:32:25:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:25:32:25:64 | sslv23 | sslv23 | test.cpp:25:32:25:65 | call to context | no_tlsv1 has not been set | -| test.cpp:25:32:25:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:25:32:25:64 | sslv23 | sslv23 | test.cpp:25:32:25:65 | call to context | no_tlsv1_1 has not been set | | test.cpp:31:32:31:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:31:32:31:64 | sslv23 | sslv23 | test.cpp:31:32:31:65 | call to context | no_sslv3 has not been set | | test.cpp:31:32:31:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:31:32:31:64 | sslv23 | sslv23 | test.cpp:31:32:31:65 | call to context | no_tlsv1 has not been set | | test.cpp:31:32:31:65 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:31:32:31:64 | sslv23 | sslv23 | test.cpp:31:32:31:65 | call to context | no_tlsv1_1 has not been set | | test.cpp:36:32:36:62 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:36:32:36:61 | tls | tls | test.cpp:36:32:36:62 | call to context | no_tlsv1 has not been set | | test.cpp:36:32:36:62 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:36:32:36:61 | tls | tls | test.cpp:36:32:36:62 | call to context | no_tlsv1_1 has not been set | -| test.cpp:41:32:41:62 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:41:32:41:61 | tls | tls | test.cpp:41:32:41:62 | call to context | no_tlsv1 has not been set | -| test.cpp:41:32:41:62 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:41:32:41:61 | tls | tls | test.cpp:41:32:41:62 | call to context | no_tlsv1_1 has not been set | +| test.cpp:41:32:41:62 | call to context | This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@. | test.cpp:41:32:41:61 | tls | tls | test.cpp:43:6:43:16 | call to set_options | no_tlsv1_2 was set | diff --git a/cpp/ql/test/query-tests/Likely Bugs/Protocols/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Protocols/test.cpp index 3e04e15fc89..5c2c2d6e357 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Protocols/test.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Protocols/test.cpp @@ -8,13 +8,13 @@ void SetOptionsNoOldTls(boost::asio::ssl::context& ctx) void TestProperConfiguration_inter_CorrectUsage01() { - boost::asio::ssl::context ctx(boost::asio::ssl::context::tls_client); // GOOD [FALSE POSITIVE] + boost::asio::ssl::context ctx(boost::asio::ssl::context::tls_client); // GOOD SetOptionsNoOldTls(ctx); } void TestProperConfiguration_inter_CorrectUsage02() { - boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23); // GOOD [FALSE POSITIVE] + boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23); // GOOD ctx.set_options(boost::asio::ssl::context::no_tlsv1 | boost::asio::ssl::context::no_tlsv1_1 | boost::asio::ssl::context::no_sslv3); diff --git a/cpp/ql/test/query-tests/Likely Bugs/Protocols/test2.cpp b/cpp/ql/test/query-tests/Likely Bugs/Protocols/test2.cpp index 40f8acf17ea..e8c802d6902 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Protocols/test2.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Protocols/test2.cpp @@ -2,7 +2,7 @@ void good1() { - // GOOD [FALSE POSITIVE] + // GOOD boost::asio::ssl::context::method m = boost::asio::ssl::context::sslv23; boost::asio::ssl::context ctx(m); ctx.set_options(boost::asio::ssl::context::no_tlsv1 | boost::asio::ssl::context::no_tlsv1_1 | boost::asio::ssl::context::no_sslv3); diff --git a/cpp/ql/test/query-tests/Likely Bugs/Protocols/test3.cpp b/cpp/ql/test/query-tests/Likely Bugs/Protocols/test3.cpp index ebbd0417f3e..c9932b31618 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Protocols/test3.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Protocols/test3.cpp @@ -13,7 +13,7 @@ void useTLS_bad() void useTLS_good() { boost::asio::ssl::context ctx(boost::asio::ssl::context::tls); - ctx.set_options(boost::asio::ssl::context::no_tlsv1 | boost::asio::ssl::context::no_tlsv1_1); // GOOD [FALSE POSITIVE] + ctx.set_options(boost::asio::ssl::context::no_tlsv1 | boost::asio::ssl::context::no_tlsv1_1); // GOOD // ... } diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/consts/NonConstantFormat.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/consts/NonConstantFormat.expected index bc0712a43e0..91f3d367db6 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/consts/NonConstantFormat.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/consts/NonConstantFormat.expected @@ -1,14 +1,83 @@ -| consts.cpp:86:9:86:10 | v1 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:91:9:91:10 | v2 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:95:9:95:10 | v3 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:100:9:100:10 | v4 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:103:9:103:15 | call to varFunc | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:107:9:107:10 | v5 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:112:9:112:10 | v6 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:116:9:116:13 | access to array | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:121:9:121:10 | v8 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:126:9:126:27 | call to nonConstFuncToArray | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:130:9:130:10 | v9 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:135:9:135:11 | v10 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:140:9:140:11 | v11 | The format string argument to printf should be constant to prevent security issues and other potential errors. | -| consts.cpp:145:9:145:11 | v12 | The format string argument to printf should be constant to prevent security issues and other potential errors. | +edges +| consts.cpp:24:7:24:9 | **gv1 | consts.cpp:24:7:24:9 | **gv1 | provenance | | +| consts.cpp:24:7:24:9 | **gv1 | consts.cpp:29:7:29:25 | **nonConstFuncToArray | provenance | | +| consts.cpp:29:7:29:25 | **nonConstFuncToArray | consts.cpp:126:9:126:30 | *call to nonConstFuncToArray | provenance | | +| consts.cpp:85:7:85:8 | gets output argument | consts.cpp:24:7:24:9 | **gv1 | provenance | | +| consts.cpp:85:7:85:8 | gets output argument | consts.cpp:86:9:86:10 | *v1 | provenance | | +| consts.cpp:85:7:85:8 | gets output argument | consts.cpp:95:9:95:10 | *v3 | provenance | | +| consts.cpp:85:7:85:8 | gets output argument | consts.cpp:100:9:100:10 | *v4 | provenance | | +| consts.cpp:85:7:85:8 | gets output argument | consts.cpp:116:9:116:13 | *access to array | provenance | | +| consts.cpp:85:7:85:8 | gets output argument | consts.cpp:121:9:121:10 | *v8 | provenance | | +| consts.cpp:85:7:85:8 | gets output argument | consts.cpp:130:9:130:10 | *v9 | provenance | | +| consts.cpp:85:7:85:8 | gets output argument | consts.cpp:135:9:135:11 | *v10 | provenance | | +| consts.cpp:90:7:90:10 | *call to gets | consts.cpp:91:9:91:10 | *v2 | provenance | | +| consts.cpp:90:7:90:10 | *call to gets | consts.cpp:116:9:116:13 | *access to array | provenance | | +| consts.cpp:90:7:90:10 | *call to gets | consts.cpp:121:9:121:10 | *v8 | provenance | | +| consts.cpp:90:12:90:13 | gets output argument | consts.cpp:24:7:24:9 | **gv1 | provenance | | +| consts.cpp:90:12:90:13 | gets output argument | consts.cpp:95:9:95:10 | *v3 | provenance | | +| consts.cpp:90:12:90:13 | gets output argument | consts.cpp:100:9:100:10 | *v4 | provenance | | +| consts.cpp:90:12:90:13 | gets output argument | consts.cpp:116:9:116:13 | *access to array | provenance | | +| consts.cpp:90:12:90:13 | gets output argument | consts.cpp:121:9:121:10 | *v8 | provenance | | +| consts.cpp:90:12:90:13 | gets output argument | consts.cpp:130:9:130:10 | *v9 | provenance | | +| consts.cpp:90:12:90:13 | gets output argument | consts.cpp:135:9:135:11 | *v10 | provenance | | +| consts.cpp:106:13:106:19 | *call to varFunc | consts.cpp:107:9:107:10 | *v5 | provenance | | +| consts.cpp:111:7:111:13 | *call to varFunc | consts.cpp:112:9:112:10 | *v6 | provenance | | +| consts.cpp:139:13:139:16 | readString output argument | consts.cpp:140:9:140:11 | *v11 | provenance | | +| consts.cpp:139:13:139:16 | readString output argument | consts.cpp:140:9:140:11 | v11 | provenance | | +| consts.cpp:144:16:144:18 | readStringRef output argument | consts.cpp:145:9:145:11 | *v12 | provenance | | +| consts.cpp:144:16:144:18 | readStringRef output argument | consts.cpp:145:9:145:11 | v12 | provenance | | +nodes +| consts.cpp:24:7:24:9 | **gv1 | semmle.label | **gv1 | +| consts.cpp:29:7:29:25 | **nonConstFuncToArray | semmle.label | **nonConstFuncToArray | +| consts.cpp:85:7:85:8 | gets output argument | semmle.label | gets output argument | +| consts.cpp:86:9:86:10 | *v1 | semmle.label | *v1 | +| consts.cpp:90:7:90:10 | *call to gets | semmle.label | *call to gets | +| consts.cpp:90:12:90:13 | gets output argument | semmle.label | gets output argument | +| consts.cpp:91:9:91:10 | *v2 | semmle.label | *v2 | +| consts.cpp:95:9:95:10 | *v3 | semmle.label | *v3 | +| consts.cpp:100:9:100:10 | *v4 | semmle.label | *v4 | +| consts.cpp:103:9:103:17 | *call to varFunc | semmle.label | *call to varFunc | +| consts.cpp:106:13:106:19 | *call to varFunc | semmle.label | *call to varFunc | +| consts.cpp:107:9:107:10 | *v5 | semmle.label | *v5 | +| consts.cpp:111:7:111:13 | *call to varFunc | semmle.label | *call to varFunc | +| consts.cpp:112:9:112:10 | *v6 | semmle.label | *v6 | +| consts.cpp:116:9:116:13 | *access to array | semmle.label | *access to array | +| consts.cpp:121:9:121:10 | *v8 | semmle.label | *v8 | +| consts.cpp:126:9:126:30 | *call to nonConstFuncToArray | semmle.label | *call to nonConstFuncToArray | +| consts.cpp:130:9:130:10 | *v9 | semmle.label | *v9 | +| consts.cpp:135:9:135:11 | *v10 | semmle.label | *v10 | +| consts.cpp:139:13:139:16 | readString output argument | semmle.label | readString output argument | +| consts.cpp:139:13:139:16 | readString output argument | semmle.label | readString output argument | +| consts.cpp:140:9:140:11 | *v11 | semmle.label | *v11 | +| consts.cpp:140:9:140:11 | v11 | semmle.label | v11 | +| consts.cpp:144:16:144:18 | readStringRef output argument | semmle.label | readStringRef output argument | +| consts.cpp:144:16:144:18 | readStringRef output argument | semmle.label | readStringRef output argument | +| consts.cpp:145:9:145:11 | *v12 | semmle.label | *v12 | +| consts.cpp:145:9:145:11 | v12 | semmle.label | v12 | +subpaths +#select +| consts.cpp:86:9:86:10 | *v1 | consts.cpp:85:7:85:8 | gets output argument | consts.cpp:86:9:86:10 | *v1 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:86:2:86:7 | call to printf | printf | +| consts.cpp:91:9:91:10 | *v2 | consts.cpp:90:7:90:10 | *call to gets | consts.cpp:91:9:91:10 | *v2 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:91:2:91:7 | call to printf | printf | +| consts.cpp:95:9:95:10 | *v3 | consts.cpp:85:7:85:8 | gets output argument | consts.cpp:95:9:95:10 | *v3 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:95:2:95:7 | call to printf | printf | +| consts.cpp:95:9:95:10 | *v3 | consts.cpp:90:12:90:13 | gets output argument | consts.cpp:95:9:95:10 | *v3 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:95:2:95:7 | call to printf | printf | +| consts.cpp:100:9:100:10 | *v4 | consts.cpp:85:7:85:8 | gets output argument | consts.cpp:100:9:100:10 | *v4 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:100:2:100:7 | call to printf | printf | +| consts.cpp:100:9:100:10 | *v4 | consts.cpp:90:12:90:13 | gets output argument | consts.cpp:100:9:100:10 | *v4 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:100:2:100:7 | call to printf | printf | +| consts.cpp:103:9:103:17 | *call to varFunc | consts.cpp:103:9:103:17 | *call to varFunc | consts.cpp:103:9:103:17 | *call to varFunc | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:103:2:103:7 | call to printf | printf | +| consts.cpp:107:9:107:10 | *v5 | consts.cpp:106:13:106:19 | *call to varFunc | consts.cpp:107:9:107:10 | *v5 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:107:2:107:7 | call to printf | printf | +| consts.cpp:112:9:112:10 | *v6 | consts.cpp:111:7:111:13 | *call to varFunc | consts.cpp:112:9:112:10 | *v6 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:112:2:112:7 | call to printf | printf | +| consts.cpp:116:9:116:13 | *access to array | consts.cpp:85:7:85:8 | gets output argument | consts.cpp:116:9:116:13 | *access to array | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:116:2:116:7 | call to printf | printf | +| consts.cpp:116:9:116:13 | *access to array | consts.cpp:90:7:90:10 | *call to gets | consts.cpp:116:9:116:13 | *access to array | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:116:2:116:7 | call to printf | printf | +| consts.cpp:116:9:116:13 | *access to array | consts.cpp:90:12:90:13 | gets output argument | consts.cpp:116:9:116:13 | *access to array | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:116:2:116:7 | call to printf | printf | +| consts.cpp:121:9:121:10 | *v8 | consts.cpp:85:7:85:8 | gets output argument | consts.cpp:121:9:121:10 | *v8 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:121:2:121:7 | call to printf | printf | +| consts.cpp:121:9:121:10 | *v8 | consts.cpp:90:7:90:10 | *call to gets | consts.cpp:121:9:121:10 | *v8 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:121:2:121:7 | call to printf | printf | +| consts.cpp:121:9:121:10 | *v8 | consts.cpp:90:12:90:13 | gets output argument | consts.cpp:121:9:121:10 | *v8 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:121:2:121:7 | call to printf | printf | +| consts.cpp:126:9:126:30 | *call to nonConstFuncToArray | consts.cpp:85:7:85:8 | gets output argument | consts.cpp:126:9:126:30 | *call to nonConstFuncToArray | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:126:2:126:7 | call to printf | printf | +| consts.cpp:126:9:126:30 | *call to nonConstFuncToArray | consts.cpp:90:12:90:13 | gets output argument | consts.cpp:126:9:126:30 | *call to nonConstFuncToArray | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:126:2:126:7 | call to printf | printf | +| consts.cpp:130:9:130:10 | *v9 | consts.cpp:85:7:85:8 | gets output argument | consts.cpp:130:9:130:10 | *v9 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:130:2:130:7 | call to printf | printf | +| consts.cpp:130:9:130:10 | *v9 | consts.cpp:90:12:90:13 | gets output argument | consts.cpp:130:9:130:10 | *v9 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:130:2:130:7 | call to printf | printf | +| consts.cpp:135:9:135:11 | *v10 | consts.cpp:85:7:85:8 | gets output argument | consts.cpp:135:9:135:11 | *v10 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:135:2:135:7 | call to printf | printf | +| consts.cpp:135:9:135:11 | *v10 | consts.cpp:90:12:90:13 | gets output argument | consts.cpp:135:9:135:11 | *v10 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:135:2:135:7 | call to printf | printf | +| consts.cpp:140:9:140:11 | *v11 | consts.cpp:139:13:139:16 | readString output argument | consts.cpp:140:9:140:11 | *v11 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:140:2:140:7 | call to printf | printf | +| consts.cpp:140:9:140:11 | v11 | consts.cpp:139:13:139:16 | readString output argument | consts.cpp:140:9:140:11 | v11 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:140:2:140:7 | call to printf | printf | +| consts.cpp:145:9:145:11 | *v12 | consts.cpp:144:16:144:18 | readStringRef output argument | consts.cpp:145:9:145:11 | *v12 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:145:2:145:7 | call to printf | printf | +| consts.cpp:145:9:145:11 | v12 | consts.cpp:144:16:144:18 | readStringRef output argument | consts.cpp:145:9:145:11 | v12 | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | consts.cpp:145:2:145:7 | call to printf | printf | diff --git a/csharp/CSharp.sln b/csharp/CSharp.sln index 3c9f3ef4e4f..0ba39b813bb 100644 --- a/csharp/CSharp.sln +++ b/csharp/CSharp.sln @@ -34,6 +34,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Autobuild.CSharp.Tes EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Extraction.CSharp.DependencyStubGenerator", "extractor\Semmle.Extraction.CSharp.DependencyStubGenerator\Semmle.Extraction.CSharp.DependencyStubGenerator.csproj", "{0EDA21A3-ADD8-4C10-B494-58B12B526B76}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Autobuild.Cpp", "..\cpp\autobuilder\Semmle.Autobuild.Cpp\Semmle.Autobuild.Cpp.csproj", "{125C4FB7-34DA-442A-9095-3EA1514270CD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semmle.Autobuild.Cpp.Tests", "..\cpp\autobuilder\Semmle.Autobuild.Cpp.Tests\Semmle.Autobuild.Cpp.Tests.csproj", "{72F369B7-0707-401A-802F-D526F272F9EE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -102,6 +106,14 @@ Global {0EDA21A3-ADD8-4C10-B494-58B12B526B76}.Debug|Any CPU.Build.0 = Debug|Any CPU {0EDA21A3-ADD8-4C10-B494-58B12B526B76}.Release|Any CPU.ActiveCfg = Release|Any CPU {0EDA21A3-ADD8-4C10-B494-58B12B526B76}.Release|Any CPU.Build.0 = Release|Any CPU + {125C4FB7-34DA-442A-9095-3EA1514270CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {125C4FB7-34DA-442A-9095-3EA1514270CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {125C4FB7-34DA-442A-9095-3EA1514270CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {125C4FB7-34DA-442A-9095-3EA1514270CD}.Release|Any CPU.Build.0 = Release|Any CPU + {72F369B7-0707-401A-802F-D526F272F9EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {72F369B7-0707-401A-802F-D526F272F9EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72F369B7-0707-401A-802F-D526F272F9EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {72F369B7-0707-401A-802F-D526F272F9EE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/BuildScripts.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/BuildScripts.cs index 9f5a4b74c2e..da2e3c36c9b 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/BuildScripts.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests/BuildScripts.cs @@ -558,8 +558,6 @@ namespace Semmle.Autobuild.CSharp.Tests [Fact] public void TestLinuxBuildlessExtractionSuccess() { - actions.RunProcess["dotnet --list-sdks"] = 0; - actions.RunProcessOut["dotnet --list-sdks"] = "any version"; actions.RunProcess[@"C:\codeql\csharp/tools/linux64/Semmle.Extraction.CSharp.Standalone"] = 0; actions.FileExists["csharp.log"] = true; actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_TRAP_DIR"] = ""; @@ -569,14 +567,12 @@ namespace Semmle.Autobuild.CSharp.Tests actions.EnumerateDirectories[@"C:\Project"] = ""; var autobuilder = CreateAutoBuilder(false, buildless: "true"); - TestAutobuilderScript(autobuilder, 0, 2); + TestAutobuilderScript(autobuilder, 0, 1); } [Fact] public void TestLinuxBuildlessExtractionFailed() { - actions.RunProcess["dotnet --list-sdks"] = 0; - actions.RunProcessOut["dotnet --list-sdks"] = "any version"; actions.RunProcess[@"C:\codeql\csharp/tools/linux64/Semmle.Extraction.CSharp.Standalone"] = 10; actions.FileExists["csharp.log"] = true; actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_TRAP_DIR"] = ""; @@ -586,14 +582,12 @@ namespace Semmle.Autobuild.CSharp.Tests actions.EnumerateDirectories[@"C:\Project"] = ""; var autobuilder = CreateAutoBuilder(false, buildless: "true"); - TestAutobuilderScript(autobuilder, 10, 2); + TestAutobuilderScript(autobuilder, 10, 1); } [Fact] public void TestLinuxBuildlessExtractionSolution() { - actions.RunProcess["dotnet --list-sdks"] = 0; - actions.RunProcessOut["dotnet --list-sdks"] = "any version"; actions.RunProcess[@"C:\codeql\csharp/tools/linux64/Semmle.Extraction.CSharp.Standalone"] = 0; actions.FileExists["csharp.log"] = true; actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_TRAP_DIR"] = ""; @@ -603,28 +597,7 @@ namespace Semmle.Autobuild.CSharp.Tests actions.EnumerateDirectories[@"C:\Project"] = ""; var autobuilder = CreateAutoBuilder(false, buildless: "true"); - TestAutobuilderScript(autobuilder, 0, 2); - } - - [Fact] - public void TestLinuxBuildlessExtractionNoDotnet() - { - actions.RunProcess["dotnet --list-sdks"] = 1; - actions.RunProcessOut["dotnet --list-sdks"] = ""; - actions.RunProcess[@"chmod u+x scratch/.dotnet/dotnet-install.sh"] = 0; - actions.RunProcess[@"scratch/.dotnet/dotnet-install.sh --channel release --version 8.0.101 --install-dir scratch/.dotnet"] = 0; - actions.RunProcess[@"C:\codeql\csharp/tools/linux64/Semmle.Extraction.CSharp.Standalone --dotnet scratch/.dotnet"] = 0; - actions.FileExists["csharp.log"] = true; - actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_TRAP_DIR"] = ""; - actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_SOURCE_ARCHIVE_DIR"] = ""; - actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_SCRATCH_DIR"] = "scratch"; - actions.EnumerateFiles[@"C:\Project"] = "foo.cs\ntest.sln"; - actions.EnumerateDirectories[@"C:\Project"] = ""; - actions.DownloadFiles.Add(("https://dot.net/v1/dotnet-install.sh", "scratch/.dotnet/dotnet-install.sh")); - actions.CreateDirectories.Add(@"scratch/.dotnet"); - - var autobuilder = CreateAutoBuilder(false, buildless: "true"); - TestAutobuilderScript(autobuilder, 0, 4); + TestAutobuilderScript(autobuilder, 0, 1); } private void SkipVsWhere() @@ -915,8 +888,6 @@ namespace Semmle.Autobuild.CSharp.Tests [Fact] public void TestSkipNugetBuildless() { - actions.RunProcess["dotnet --list-sdks"] = 0; - actions.RunProcessOut["dotnet --list-sdks"] = "any version"; actions.RunProcess[@"C:\codeql\csharp/tools/linux64/Semmle.Extraction.CSharp.Standalone"] = 0; actions.FileExists["csharp.log"] = true; actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_TRAP_DIR"] = ""; @@ -926,7 +897,7 @@ namespace Semmle.Autobuild.CSharp.Tests actions.EnumerateDirectories[@"C:\Project"] = ""; var autobuilder = CreateAutoBuilder(false, buildless: "true"); - TestAutobuilderScript(autobuilder, 0, 2); + TestAutobuilderScript(autobuilder, 0, 1); } @@ -999,12 +970,10 @@ namespace Semmle.Autobuild.CSharp.Tests actions.RunProcess["dotnet --list-sdks"] = 0; actions.RunProcessOut["dotnet --list-sdks"] = @"2.1.3 [C:\Program Files\dotnet\sdks] 2.1.4 [C:\Program Files\dotnet\sdks]"; - actions.RunProcess[@"chmod u+x scratch/.dotnet/dotnet-install.sh"] = 0; - actions.RunProcess[@"scratch/.dotnet/dotnet-install.sh --channel release --version 2.1.3 --install-dir scratch/.dotnet"] = 0; - actions.RunProcess[@"scratch/.dotnet/dotnet --info"] = 0; - actions.RunProcess[@"scratch/.dotnet/dotnet clean C:\Project/test.csproj"] = 0; - actions.RunProcess[@"scratch/.dotnet/dotnet restore C:\Project/test.csproj"] = 0; - actions.RunProcess[@"scratch/.dotnet/dotnet build --no-incremental C:\Project/test.csproj"] = 0; + actions.RunProcess[@"dotnet --info"] = 0; + actions.RunProcess[@"dotnet clean C:\Project/test.csproj"] = 0; + actions.RunProcess[@"dotnet restore C:\Project/test.csproj"] = 0; + actions.RunProcess[@"dotnet build --no-incremental C:\Project/test.csproj"] = 0; actions.FileExists["csharp.log"] = true; actions.FileExists["test.csproj"] = true; actions.GetEnvironmentVariable["CODEQL_EXTRACTOR_CSHARP_TRAP_DIR"] = ""; @@ -1022,17 +991,15 @@ namespace Semmle.Autobuild.CSharp.Tests "); actions.LoadXml[@"C:\Project/test.csproj"] = xml; - actions.DownloadFiles.Add(("https://dot.net/v1/dotnet-install.sh", "scratch/.dotnet/dotnet-install.sh")); - actions.CreateDirectories.Add(@"scratch/.dotnet"); var autobuilder = CreateAutoBuilder(false, dotnetVersion: "2.1.3"); - TestAutobuilderScript(autobuilder, 0, 7); + TestAutobuilderScript(autobuilder, 0, 5); } private void TestDotnetVersionWindows(Action action, int commandsRun) { actions.RunProcess["cmd.exe /C dotnet --list-sdks"] = 0; - actions.RunProcessOut["cmd.exe /C dotnet --list-sdks"] = "2.1.3 [C:\\Program Files\\dotnet\\sdks]\n2.1.4 [C:\\Program Files\\dotnet\\sdks]"; + actions.RunProcessOut["cmd.exe /C dotnet --list-sdks"] = "2.1.4 [C:\\Program Files\\dotnet\\sdks]"; action(); actions.RunProcess[@"cmd.exe /C scratch\.dotnet\dotnet --info"] = 0; actions.RunProcess[@"cmd.exe /C scratch\.dotnet\dotnet clean C:\Project\test.csproj"] = 0; diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/AutoBuildRule.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/AutoBuildRule.cs index cd138d62af5..e58c8ddccd9 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/AutoBuildRule.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/AutoBuildRule.cs @@ -1,5 +1,6 @@ using Semmle.Autobuild.Shared; using Semmle.Extraction.CSharp; +using Semmle.Util; namespace Semmle.Autobuild.CSharp { diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs index 859029eee32..aad91541064 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs @@ -50,11 +50,8 @@ namespace Semmle.Autobuild.CSharp attempt = new BuildCommandRule(DotNetRule.WithDotNet).Analyse(this, false) & CheckExtractorRun(true); break; case CSharpBuildStrategy.Buildless: - attempt = DotNetRule.WithDotNet(this, ensureDotNetAvailable: true, (dotNetPath, env) => - { - // No need to check that the extractor has been executed in buildless mode - return new StandaloneBuildRule(dotNetPath).Analyse(this, false); - }); + // No need to check that the extractor has been executed in buildless mode + attempt = new StandaloneBuildRule().Analyse(this, false); break; case CSharpBuildStrategy.MSBuild: attempt = new MsBuildRule().Analyse(this, false) & CheckExtractorRun(true); @@ -84,7 +81,7 @@ namespace Semmle.Autobuild.CSharp return 0; if (warnOnFailure) - Log(Severity.Error, "No C# code detected during build."); + Logger.LogError("No C# code detected during build."); return 1; }); diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/Constants.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/Constants.cs deleted file mode 100644 index 6e0f0ded7a4..00000000000 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/Constants.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Semmle.Autobuild.CSharp -{ - internal static class Constants - { - // The version number should be kept in sync with the version .NET version used for building the application. - public const string LatestDotNetSdkVersion = "8.0.101"; - } -} diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/DotNetRule.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/DotNetRule.cs index f5e519b1f90..cd25055da1a 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/DotNetRule.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/DotNetRule.cs @@ -5,7 +5,7 @@ using System.Linq; using Semmle.Util; using Semmle.Util.Logging; using Semmle.Autobuild.Shared; -using Newtonsoft.Json.Linq; +using Semmle.Extraction.CSharp.DependencyFetching; namespace Semmle.Autobuild.CSharp { @@ -39,11 +39,11 @@ namespace Semmle.Autobuild.CSharp if (notDotNetProject is not null) { - builder.Log(Severity.Info, "Not using .NET Core because of incompatible project {0}", notDotNetProject); + builder.Logger.Log(Severity.Info, "Not using .NET Core because of incompatible project {0}", notDotNetProject); return BuildScript.Failure; } - builder.Log(Severity.Info, "Attempting to build using .NET Core"); + builder.Logger.LogInfo("Attempting to build using .NET Core"); } return WithDotNet(builder, ensureDotNetAvailable: false, (dotNetPath, environment) => @@ -81,29 +81,22 @@ namespace Semmle.Autobuild.CSharp /// public static BuildScript WithDotNet(IAutobuilder builder, bool ensureDotNetAvailable, Func?, BuildScript> f) { - var installDir = builder.Actions.PathCombine(FileUtils.GetTemporaryWorkingDirectory(builder.Actions.GetEnvironmentVariable, builder.Options.Language.UpperCaseName, out var _), ".dotnet"); - var installScript = DownloadDotNet(builder, installDir, ensureDotNetAvailable); - return BuildScript.Bind(installScript, installed => + var temp = FileUtils.GetTemporaryWorkingDirectory(builder.Actions.GetEnvironmentVariable, builder.Options.Language.UpperCaseName, out var shouldCleanUp); + return DotNet.WithDotNet(builder.Actions, builder.Logger, builder.Paths.Select(x => x.Item1), temp, shouldCleanUp, ensureDotNetAvailable, builder.Options.DotNetVersion, installDir => { var env = new Dictionary { { "DOTNET_SKIP_FIRST_TIME_EXPERIENCE", "true" }, { "MSBUILDDISABLENODEREUSE", "1" } }; - if (installed == 0) + if (installDir is not null) { - // The installation succeeded, so use the newly installed .NET Core + // The installation succeeded, so use the newly installed .NET var path = builder.Actions.GetEnvironmentVariable("PATH"); var delim = builder.Actions.IsWindows() ? ";" : ":"; - env.Add("DOTNET_MULTILEVEL_LOOKUP", "false"); // prevent look up of other .NET Core SDKs + env.Add("DOTNET_MULTILEVEL_LOOKUP", "false"); // prevent look up of other .NET SDKs env.Add("PATH", installDir + delim + path); } - else - { - // The .NET SDK was not installed, either because the installation failed or because it was already installed. - installDir = null; - } - return f(installDir, env); }); } @@ -119,146 +112,6 @@ namespace Semmle.Autobuild.CSharp public static BuildScript WithDotNet(IAutobuilder builder, Func?, BuildScript> f) => WithDotNet(builder, ensureDotNetAvailable: false, (_, env) => f(env)); - /// - /// Returns a script for downloading relevant versions of the - /// .NET Core SDK. The SDK(s) will be installed at installDir - /// (provided that the script succeeds). - /// - private static BuildScript DownloadDotNet(IAutobuilder builder, string installDir, bool ensureDotNetAvailable) - { - if (!string.IsNullOrEmpty(builder.Options.DotNetVersion)) - // Specific version supplied in configuration: always use that - return DownloadDotNetVersion(builder, installDir, builder.Options.DotNetVersion); - - // Download versions mentioned in `global.json` files - // See https://docs.microsoft.com/en-us/dotnet/core/tools/global-json - var installScript = BuildScript.Success; - var validGlobalJson = false; - foreach (var path in builder.Paths.Select(p => p.Item1).Where(p => p.EndsWith("global.json", StringComparison.Ordinal))) - { - string version; - try - { - var o = JObject.Parse(File.ReadAllText(path)); - version = (string)(o?["sdk"]?["version"]!); - } - catch // lgtm[cs/catch-of-all-exceptions] - { - // not a valid global.json file - continue; - } - - installScript &= DownloadDotNetVersion(builder, installDir, version); - validGlobalJson = true; - } - - if (validGlobalJson) - { - return installScript; - } - - if (ensureDotNetAvailable) - { - return DownloadDotNetVersion(builder, installDir, Constants.LatestDotNetSdkVersion, needExactVersion: false); - } - - return BuildScript.Failure; - } - - /// - /// Returns a script for downloading a specific .NET Core SDK version, if the - /// version is not already installed. - /// - /// See https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script. - /// - private static BuildScript DownloadDotNetVersion(IAutobuilder builder, string path, string version, bool needExactVersion = true) - { - return BuildScript.Bind(GetInstalledSdksScript(builder.Actions), (sdks, sdksRet) => - { - if (needExactVersion && sdksRet == 0 && sdks.Count == 1 && sdks[0].StartsWith(version + " ", StringComparison.Ordinal)) - { - // The requested SDK is already installed (and no other SDKs are installed), so - // no need to reinstall - return BuildScript.Failure; - } - else if (!needExactVersion && sdksRet == 0 && sdks.Count > 0) - { - // there's at least one SDK installed, so no need to reinstall - return BuildScript.Failure; - } - else if (!needExactVersion && sdksRet != 0) - { - builder.Log(Severity.Info, "No .NET Core SDK found."); - } - - builder.Log(Severity.Info, "Attempting to download .NET Core {0}", version); - - if (builder.Actions.IsWindows()) - { - - var psCommand = $"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version {version} -InstallDir {path}"; - - BuildScript GetInstall(string pwsh) => - new CommandBuilder(builder.Actions). - RunCommand(pwsh). - Argument("-NoProfile"). - Argument("-ExecutionPolicy"). - Argument("unrestricted"). - Argument("-Command"). - Argument("\"" + psCommand + "\""). - Script; - - return GetInstall("pwsh") | GetInstall("powershell"); - } - else - { - var dotnetInstallPath = builder.Actions.PathCombine(FileUtils.GetTemporaryWorkingDirectory( - builder.Actions.GetEnvironmentVariable, - builder.Options.Language.UpperCaseName, - out var shouldCleanUp), ".dotnet", "dotnet-install.sh"); - - var downloadDotNetInstallSh = BuildScript.DownloadFile( - "https://dot.net/v1/dotnet-install.sh", - dotnetInstallPath, - e => builder.Log(Severity.Warning, $"Failed to download 'dotnet-install.sh': {e.Message}")); - - var chmod = new CommandBuilder(builder.Actions). - RunCommand("chmod"). - Argument("u+x"). - Argument(dotnetInstallPath); - - var install = new CommandBuilder(builder.Actions). - RunCommand(dotnetInstallPath). - Argument("--channel"). - Argument("release"). - Argument("--version"). - Argument(version). - Argument("--install-dir"). - Argument(path); - - var buildScript = downloadDotNetInstallSh & chmod.Script & install.Script; - - if (shouldCleanUp) - { - var removeScript = new CommandBuilder(builder.Actions). - RunCommand("rm"). - Argument(dotnetInstallPath); - buildScript &= removeScript.Script; - } - - return buildScript; - } - }); - } - - private static BuildScript GetInstalledSdksScript(IBuildActions actions) - { - var listSdks = new CommandBuilder(actions, silent: true). - RunCommand("dotnet"). - Argument("--list-sdks"); - return listSdks.Script; - } - private static string DotNetCommand(IBuildActions actions, string? dotNetPath) => dotNetPath is not null ? actions.PathCombine(dotNetPath, "dotnet") : "dotnet"; diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/Program.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/Program.cs index 479625c76e3..71289148916 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/Program.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/Program.cs @@ -1,5 +1,7 @@ using System; + using Semmle.Autobuild.Shared; +using Semmle.Util; namespace Semmle.Autobuild.CSharp { diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj b/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj index dbbe8c80471..911e71bfdc9 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/Semmle.Autobuild.CSharp.csproj @@ -20,6 +20,7 @@ + diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs index 0279c6af01c..c202a029674 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/StandaloneBuildRule.cs @@ -1,4 +1,5 @@ using Semmle.Autobuild.Shared; +using Semmle.Util; namespace Semmle.Autobuild.CSharp { @@ -7,13 +8,6 @@ namespace Semmle.Autobuild.CSharp /// internal class StandaloneBuildRule : IBuildRule { - private readonly string? dotNetPath; - - internal StandaloneBuildRule(string? dotNetPath) - { - this.dotNetPath = dotNetPath; - } - public BuildScript Analyse(IAutobuilder builder, bool auto) { if (builder.CodeQLExtractorLangRoot is null @@ -26,12 +20,6 @@ namespace Semmle.Autobuild.CSharp var cmd = new CommandBuilder(builder.Actions); cmd.RunCommand(standalone); - if (!string.IsNullOrEmpty(this.dotNetPath)) - { - cmd.Argument("--dotnet"); - cmd.QuoteArgument(this.dotNetPath); - } - return cmd.Script; } } diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/Autobuilder.cs b/csharp/autobuilder/Semmle.Autobuild.Shared/Autobuilder.cs index d6757418875..a23d29d2979 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/Autobuilder.cs +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/Autobuilder.cs @@ -70,11 +70,9 @@ namespace Semmle.Autobuild.Shared IBuildActions Actions { get; } /// - /// Log a given build event to the console. + /// A logger. /// - /// The format string. - /// Inserts to the format string. - void Log(Severity severity, string format, params object[] args); + ILogger Logger { get; } /// /// Value of CODEQL_EXTRACTOR__ROOT environment variable. @@ -135,21 +133,7 @@ namespace Semmle.Autobuild.Shared /// True iff the path was found. public bool HasPath(string path) => Paths.Any(p => path == p.Item1); - private void FindFiles(string dir, int depth, int maxDepth, IList<(string, int)> results) - { - foreach (var f in Actions.EnumerateFiles(dir)) - { - results.Add((f, depth)); - } - if (depth < maxDepth) - { - foreach (var d in Actions.EnumerateDirectories(dir)) - { - FindFiles(d, depth + 1, maxDepth, results); - } - } - } /// /// The root of the source directory. @@ -196,12 +180,7 @@ namespace Semmle.Autobuild.Shared Options = options; DiagnosticClassifier = diagnosticClassifier; - pathsLazy = new Lazy>(() => - { - var files = new List<(string, int)>(); - FindFiles(options.RootDirectory, 0, options.SearchDepth, files); - return files.OrderBy(f => f.Item2).ToArray(); - }); + pathsLazy = new Lazy>(() => Actions.FindFiles(options.RootDirectory, options.SearchDepth)); projectsOrSolutionsToBuildLazy = new Lazy>(() => { @@ -214,7 +193,7 @@ namespace Semmle.Autobuild.Shared if (actions.FileExists(solution)) ret.Add(new Solution(this, solution, true)); else - Log(Severity.Error, $"The specified project or solution file {solution} was not found"); + logger.LogError($"The specified project or solution file {solution} was not found"); } return ret; } @@ -273,6 +252,8 @@ namespace Semmle.Autobuild.Shared logThreadId: false) ?? Verbosity.Info, logThreadId: false); + public ILogger Logger => logger; + private readonly IDiagnosticsWriter diagnostics; /// @@ -285,16 +266,6 @@ namespace Semmle.Autobuild.Shared return Path.GetRelativePath(this.RootDirectory, path); } - /// - /// Log a given build event to the console. - /// - /// The format string. - /// Inserts to the format string. - public void Log(Severity severity, string format, params object[] args) - { - logger.Log(severity, format, args); - } - /// /// Write to the diagnostics file. /// @@ -310,7 +281,7 @@ namespace Semmle.Autobuild.Shared /// The exit code, 0 for success and non-zero for failures. public int AttemptBuild() { - Log(Severity.Info, $"Working directory: {Options.RootDirectory}"); + logger.LogInfo($"Working directory: {Options.RootDirectory}"); var script = GetBuildScript(); @@ -319,12 +290,12 @@ namespace Semmle.Autobuild.Shared void startCallback(string s, bool silent) { - Log(silent ? Severity.Debug : Severity.Info, $"\nRunning {s}"); + logger.Log(silent ? Severity.Debug : Severity.Info, $"\nRunning {s}"); } void exitCallback(int ret, string msg, bool silent) { - Log(silent ? Severity.Debug : Severity.Info, $"Exit code {ret}{(string.IsNullOrEmpty(msg) ? "" : $": {msg}")}"); + logger.Log(silent ? Severity.Debug : Severity.Info, $"Exit code {ret}{(string.IsNullOrEmpty(msg) ? "" : $": {msg}")}"); } var onOutput = BuildOutputHandler(Console.Out); @@ -374,7 +345,7 @@ namespace Semmle.Autobuild.Shared protected BuildScript AutobuildFailure() => BuildScript.Create(actions => { - Log(Severity.Error, "Could not auto-detect a suitable build method"); + logger.LogError("Could not auto-detect a suitable build method"); AutobuildFailureDiagnostic(); diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildCommandAutoRule.cs b/csharp/autobuilder/Semmle.Autobuild.Shared/BuildCommandAutoRule.cs index c0990a75ae1..d754b3c3134 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildCommandAutoRule.cs +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/BuildCommandAutoRule.cs @@ -1,5 +1,7 @@ using System.Collections.Generic; using System.Linq; + +using Semmle.Util; using Semmle.Util.Logging; namespace Semmle.Autobuild.Shared @@ -53,7 +55,7 @@ namespace Semmle.Autobuild.Shared public BuildScript Analyse(IAutobuilder builder, bool auto) { - builder.Log(Severity.Info, "Attempting to locate build script"); + builder.Logger.LogInfo("Attempting to locate build script"); // a list of extensions for files that we consider to be scripts on the current platform var extensions = builder.Actions.IsWindows() ? winExtensions : linuxExtensions; diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildCommandRule.cs b/csharp/autobuilder/Semmle.Autobuild.Shared/BuildCommandRule.cs index 54d406c9dac..9aaefe1a1da 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildCommandRule.cs +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/BuildCommandRule.cs @@ -1,4 +1,6 @@ -namespace Semmle.Autobuild.Shared +using Semmle.Util; + +namespace Semmle.Autobuild.Shared { /// /// Execute the build_command rule. diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildTools.cs b/csharp/autobuilder/Semmle.Autobuild.Shared/BuildTools.cs index a0079ca8bb9..0e910b68d48 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildTools.cs +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/BuildTools.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using Semmle.Util; namespace Semmle.Autobuild.Shared { diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/MsBuildRule.cs b/csharp/autobuilder/Semmle.Autobuild.Shared/MsBuildRule.cs index 3099449a1fb..bff10532abf 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/MsBuildRule.cs +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/MsBuildRule.cs @@ -40,7 +40,7 @@ namespace Semmle.Autobuild.Shared return BuildScript.Failure; if (auto) - builder.Log(Severity.Info, "Attempting to build using MSBuild"); + builder.Logger.LogInfo("Attempting to build using MSBuild"); var vsTools = GetVcVarsBatFile(builder); @@ -54,7 +54,7 @@ namespace Semmle.Autobuild.Shared if (vsTools is null && builder.Actions.IsWindows()) { - builder.Log(Severity.Warning, "Could not find a suitable version of VsDevCmd.bat/vcvarsall.bat"); + builder.Logger.LogWarning("Could not find a suitable version of VsDevCmd.bat/vcvarsall.bat"); } // Use `nuget.exe` from source code repo, if present, otherwise first attempt with global @@ -165,18 +165,18 @@ namespace Semmle.Autobuild.Shared { foreach (var b in BuildTools.VcVarsAllBatFiles(builder.Actions)) { - builder.Log(Severity.Info, "Found {0} version {1}", b.Path, b.ToolsVersion); + builder.Logger.Log(Severity.Info, "Found {0} version {1}", b.Path, b.ToolsVersion); } vsTools = BuildTools.FindCompatibleVcVars(builder.Actions, msToolsVersion); if (vsTools is null) - builder.Log(Severity.Warning, "Could not find build tools matching version {0}", msToolsVersion); + builder.Logger.LogWarning("Could not find build tools matching version {0}", msToolsVersion); else - builder.Log(Severity.Info, "Setting Visual Studio tools to {0}", vsTools.Path); + builder.Logger.Log(Severity.Info, "Setting Visual Studio tools to {0}", vsTools.Path); } else { - builder.Log(Severity.Error, "The format of vstools_version is incorrect. Please specify an integer."); + builder.Logger.LogError("The format of vstools_version is incorrect. Please specify an integer."); } } @@ -189,18 +189,18 @@ namespace Semmle.Autobuild.Shared private static BuildScript DownloadNugetExe(IAutobuilder builder, string path) where TAutobuildOptions : AutobuildOptionsShared => BuildScript.Create(_ => { - builder.Log(Severity.Info, "Attempting to download nuget.exe"); + builder.Logger.LogInfo("Attempting to download nuget.exe"); return 0; }) & BuildScript.DownloadFile( FileUtils.NugetExeUrl, path, - e => builder.Log(Severity.Warning, $"Failed to download 'nuget.exe': {e.Message}")) + e => builder.Logger.LogWarning($"Failed to download 'nuget.exe': {e.Message}")) & BuildScript.Create(_ => { - builder.Log(Severity.Info, $"Successfully downloaded {path}"); + builder.Logger.LogInfo($"Successfully downloaded {path}"); return 0; }); } diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/Project.cs b/csharp/autobuilder/Semmle.Autobuild.Shared/Project.cs index 71522859871..5979b11e8fc 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/Project.cs +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/Project.cs @@ -41,7 +41,7 @@ namespace Semmle.Autobuild.Shared } catch (Exception ex) when (ex is XmlException || ex is FileNotFoundException) { - builder.Log(Severity.Info, $"Unable to read project file {path}."); + builder.Logger.LogInfo($"Unable to read project file {path}."); return; } @@ -66,7 +66,7 @@ namespace Semmle.Autobuild.Shared catch // lgtm[cs/catch-of-all-exceptions] // Generic catch clause - Version constructor throws about 5 different exceptions. { - builder.Log(Severity.Warning, "Project {0} has invalid tools version {1}", path, toolsVersion); + builder.Logger.Log(Severity.Warning, "Project {0} has invalid tools version {1}", path, toolsVersion); } } diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/Solution.cs b/csharp/autobuilder/Semmle.Autobuild.Shared/Solution.cs index d48cfa15913..7a98a01de25 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/Solution.cs +++ b/csharp/autobuilder/Semmle.Autobuild.Shared/Solution.cs @@ -73,7 +73,7 @@ namespace Semmle.Autobuild.Shared return; } - builder.Log(Severity.Info, $"Unable to read solution file {path}."); + builder.Logger.LogInfo($"Unable to read solution file {path}."); includedProjects = Array.Empty>(); return; } diff --git a/csharp/codeql-extractor.yml b/csharp/codeql-extractor.yml index 0f65d9bc2e5..13019e7b0a3 100644 --- a/csharp/codeql-extractor.yml +++ b/csharp/codeql-extractor.yml @@ -9,6 +9,7 @@ extra_env_vars: build_modes: - autobuild - manual + - none github_api_languages: - C# scc_languages: @@ -33,8 +34,10 @@ options: type: string pattern: "^(none|gzip|brotli)$" buildless: - title: Whether to use buildless (standalone) extraction. + title: DEPRECATED - Whether to use buildless (standalone) extraction. description: > + DEPRECATED: Use `--build-mode none` instead. + A value indicating, which type of extraction the autobuilder should perform. If 'true', then the standalone extractor will be used, otherwise tracing extraction will be performed. diff --git a/csharp/documentation/library-coverage/coverage.csv b/csharp/documentation/library-coverage/coverage.csv index 43681e0a264..8bb3b01441a 100644 --- a/csharp/documentation/library-coverage/coverage.csv +++ b/csharp/documentation/library-coverage/coverage.csv @@ -1,44 +1,44 @@ -package,sink,source,summary,sink:code-injection,sink:encryption-decryptor,sink:encryption-encryptor,sink:encryption-keyprop,sink:encryption-symmetrickey,sink:file-content-store,sink:html-injection,sink:js-injection,sink:log-injection,sink:sql-injection,source:file,source:file-write,source:local,source:remote,summary:taint,summary:value -Amazon.Lambda.APIGatewayEvents,,6,,,,,,,,,,,,,,,6,, -Amazon.Lambda.Core,10,,,,,,,,,,,10,,,,,,, -Dapper,55,,,,,,,,,,,,55,,,,,, -ILCompiler,,,81,,,,,,,,,,,,,,,81, -ILLink.RoslynAnalyzer,,,63,,,,,,,,,,,,,,,63, -ILLink.Shared,,,32,,,,,,,,,,,,,,,29,3 -ILLink.Tasks,,,5,,,,,,,,,,,,,,,5, -Internal.IL,,,69,,,,,,,,,,,,,,,67,2 -Internal.Pgo,,,9,,,,,,,,,,,,,,,8,1 -Internal.TypeSystem,,,367,,,,,,,,,,,,,,,331,36 -JsonToItemsTaskFactory,,,7,,,,,,,,,,,,,,,7, -Microsoft.Android.Build,,,14,,,,,,,,,,,,,,,14, -Microsoft.Apple.Build,,,7,,,,,,,,,,,,,,,7, -Microsoft.ApplicationBlocks.Data,28,,,,,,,,,,,,28,,,,,, -Microsoft.CSharp,,,24,,,,,,,,,,,,,,,24, -Microsoft.Diagnostics.Tools.Pgo,,,13,,,,,,,,,,,,,,,13, -Microsoft.EntityFrameworkCore,6,,12,,,,,,,,,,6,,,,,,12 -Microsoft.Extensions.Caching.Distributed,,,15,,,,,,,,,,,,,,,15, -Microsoft.Extensions.Caching.Memory,,,38,,,,,,,,,,,,,,,37,1 -Microsoft.Extensions.Configuration,,,83,,,,,,,,,,,,,,,80,3 -Microsoft.Extensions.DependencyInjection,,,120,,,,,,,,,,,,,,,120, -Microsoft.Extensions.DependencyModel,,,12,,,,,,,,,,,,,,,12, -Microsoft.Extensions.Diagnostics.Metrics,,,13,,,,,,,,,,,,,,,13, -Microsoft.Extensions.FileProviders,,,15,,,,,,,,,,,,,,,15, -Microsoft.Extensions.FileSystemGlobbing,,,16,,,,,,,,,,,,,,,14,2 -Microsoft.Extensions.Hosting,,,23,,,,,,,,,,,,,,,22,1 -Microsoft.Extensions.Http,,,10,,,,,,,,,,,,,,,10, -Microsoft.Extensions.Logging,,,60,,,,,,,,,,,,,,,59,1 -Microsoft.Extensions.Options,,,8,,,,,,,,,,,,,,,8, -Microsoft.Extensions.Primitives,,,64,,,,,,,,,,,,,,,64, -Microsoft.Interop,,,78,,,,,,,,,,,,,,,78, -Microsoft.NET.Build.Tasks,,,1,,,,,,,,,,,,,,,1, -Microsoft.NET.WebAssembly.Webcil,,,7,,,,,,,,,,,,,,,7, -Microsoft.VisualBasic,,,10,,,,,,,,,,,,,,,5,5 -Microsoft.WebAssembly.Build.Tasks,,,3,,,,,,,,,,,,,,,3, -Microsoft.Win32.SafeHandles,,,4,,,,,,,,,,,,,,,4, -Mono.Linker,,,163,,,,,,,,,,,,,,,163, -MySql.Data.MySqlClient,48,,,,,,,,,,,,48,,,,,, -Newtonsoft.Json,,,91,,,,,,,,,,,,,,,73,18 -ServiceStack,194,,7,27,,,,,75,,,,92,,,,,7, -SourceGenerators,,,4,,,,,,,,,,,,,,,4, -System,67,25,11862,,8,8,9,,,4,5,,33,1,17,3,4,9896,1966 -Windows.Security.Cryptography.Core,1,,,,,,,1,,,,,,,,,,, +package,sink,source,summary,sink:code-injection,sink:encryption-decryptor,sink:encryption-encryptor,sink:encryption-keyprop,sink:encryption-symmetrickey,sink:file-content-store,sink:html-injection,sink:js-injection,sink:log-injection,sink:sql-injection,source:commandargs,source:environment,source:file,source:file-write,source:local,source:remote,summary:taint,summary:value +Amazon.Lambda.APIGatewayEvents,,6,,,,,,,,,,,,,,,,,6,, +Amazon.Lambda.Core,10,,,,,,,,,,,10,,,,,,,,, +Dapper,55,,,,,,,,,,,,55,,,,,,,, +ILCompiler,,,81,,,,,,,,,,,,,,,,,81, +ILLink.RoslynAnalyzer,,,63,,,,,,,,,,,,,,,,,63, +ILLink.Shared,,,32,,,,,,,,,,,,,,,,,29,3 +ILLink.Tasks,,,5,,,,,,,,,,,,,,,,,5, +Internal.IL,,,69,,,,,,,,,,,,,,,,,67,2 +Internal.Pgo,,,9,,,,,,,,,,,,,,,,,8,1 +Internal.TypeSystem,,,367,,,,,,,,,,,,,,,,,331,36 +JsonToItemsTaskFactory,,,7,,,,,,,,,,,,,,,,,7, +Microsoft.Android.Build,,,14,,,,,,,,,,,,,,,,,14, +Microsoft.Apple.Build,,,7,,,,,,,,,,,,,,,,,7, +Microsoft.ApplicationBlocks.Data,28,,,,,,,,,,,,28,,,,,,,, +Microsoft.CSharp,,,24,,,,,,,,,,,,,,,,,24, +Microsoft.Diagnostics.Tools.Pgo,,,13,,,,,,,,,,,,,,,,,13, +Microsoft.EntityFrameworkCore,6,,12,,,,,,,,,,6,,,,,,,,12 +Microsoft.Extensions.Caching.Distributed,,,15,,,,,,,,,,,,,,,,,15, +Microsoft.Extensions.Caching.Memory,,,38,,,,,,,,,,,,,,,,,37,1 +Microsoft.Extensions.Configuration,,2,89,,,,,,,,,,,,2,,,,,86,3 +Microsoft.Extensions.DependencyInjection,,,120,,,,,,,,,,,,,,,,,120, +Microsoft.Extensions.DependencyModel,,,12,,,,,,,,,,,,,,,,,12, +Microsoft.Extensions.Diagnostics.Metrics,,,13,,,,,,,,,,,,,,,,,13, +Microsoft.Extensions.FileProviders,,,15,,,,,,,,,,,,,,,,,15, +Microsoft.Extensions.FileSystemGlobbing,,,16,,,,,,,,,,,,,,,,,14,2 +Microsoft.Extensions.Hosting,,,23,,,,,,,,,,,,,,,,,22,1 +Microsoft.Extensions.Http,,,10,,,,,,,,,,,,,,,,,10, +Microsoft.Extensions.Logging,,,60,,,,,,,,,,,,,,,,,59,1 +Microsoft.Extensions.Options,,,8,,,,,,,,,,,,,,,,,8, +Microsoft.Extensions.Primitives,,,64,,,,,,,,,,,,,,,,,64, +Microsoft.Interop,,,78,,,,,,,,,,,,,,,,,78, +Microsoft.NET.Build.Tasks,,,1,,,,,,,,,,,,,,,,,1, +Microsoft.NET.WebAssembly.Webcil,,,7,,,,,,,,,,,,,,,,,7, +Microsoft.VisualBasic,,,10,,,,,,,,,,,,,,,,,5,5 +Microsoft.WebAssembly.Build.Tasks,,,3,,,,,,,,,,,,,,,,,3, +Microsoft.Win32.SafeHandles,,,4,,,,,,,,,,,,,,,,,4, +Mono.Linker,,,163,,,,,,,,,,,,,,,,,163, +MySql.Data.MySqlClient,48,,,,,,,,,,,,48,,,,,,,, +Newtonsoft.Json,,,91,,,,,,,,,,,,,,,,,73,18 +ServiceStack,194,,7,27,,,,,75,,,,92,,,,,,,7, +SourceGenerators,,,4,,,,,,,,,,,,,,,,,4, +System,67,30,11864,,8,8,9,,,4,5,,33,2,3,1,17,3,4,9898,1966 +Windows.Security.Cryptography.Core,1,,,,,,,1,,,,,,,,,,,,, diff --git a/csharp/documentation/library-coverage/coverage.rst b/csharp/documentation/library-coverage/coverage.rst index 9219a2a663f..bdee069e89a 100644 --- a/csharp/documentation/library-coverage/coverage.rst +++ b/csharp/documentation/library-coverage/coverage.rst @@ -8,7 +8,7 @@ C# framework & library support Framework / library,Package,Flow sources,Taint & value steps,Sinks (total),`CWE-079` :sub:`Cross-site scripting` `ServiceStack `_,"``ServiceStack.*``, ``ServiceStack``",,7,194, - System,"``System.*``, ``System``",25,11862,67,9 - Others,"``Amazon.Lambda.APIGatewayEvents``, ``Amazon.Lambda.Core``, ``Dapper``, ``ILCompiler``, ``ILLink.RoslynAnalyzer``, ``ILLink.Shared``, ``ILLink.Tasks``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``JsonToItemsTaskFactory``, ``Microsoft.Android.Build``, ``Microsoft.Apple.Build``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.CSharp``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.Diagnostics.Metrics``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NET.WebAssembly.Webcil``, ``Microsoft.VisualBasic``, ``Microsoft.WebAssembly.Build.Tasks``, ``Microsoft.Win32.SafeHandles``, ``Mono.Linker``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``SourceGenerators``, ``Windows.Security.Cryptography.Core``",6,1541,148, - Totals,,31,13410,409,9 + System,"``System.*``, ``System``",30,11864,67,9 + Others,"``Amazon.Lambda.APIGatewayEvents``, ``Amazon.Lambda.Core``, ``Dapper``, ``ILCompiler``, ``ILLink.RoslynAnalyzer``, ``ILLink.Shared``, ``ILLink.Tasks``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``JsonToItemsTaskFactory``, ``Microsoft.Android.Build``, ``Microsoft.Apple.Build``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.CSharp``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.Diagnostics.Metrics``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NET.WebAssembly.Webcil``, ``Microsoft.VisualBasic``, ``Microsoft.WebAssembly.Build.Tasks``, ``Microsoft.Win32.SafeHandles``, ``Mono.Linker``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``SourceGenerators``, ``Windows.Security.Cryptography.Core``",8,1547,148, + Totals,,38,13418,409,9 diff --git a/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/compiler_generated.ql b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/compiler_generated.ql new file mode 100644 index 00000000000..7d51351f1dd --- /dev/null +++ b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/compiler_generated.ql @@ -0,0 +1,7 @@ +class Modifiable extends @modifiable { + Modifiable() { compiler_generated(this) } + + string toString() { none() } +} + +select any(Modifiable m) diff --git a/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/expr_compiler_generated.ql b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/expr_compiler_generated.ql new file mode 100644 index 00000000000..16051ecb5f6 --- /dev/null +++ b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/expr_compiler_generated.ql @@ -0,0 +1,7 @@ +class Expression extends @expr { + Expression() { compiler_generated(this) } + + string toString() { none() } +} + +select any(Expression e) diff --git a/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/old.dbscheme b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/old.dbscheme new file mode 100644 index 00000000000..21ede72308c --- /dev/null +++ b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/old.dbscheme @@ -0,0 +1,2099 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + unique int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, array = 3, this = 4 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); + +/* Common Intermediate Language - CIL */ + +case @cil_instruction.opcode of + 0 = @cil_nop +| 1 = @cil_break +| 2 = @cil_ldarg_0 +| 3 = @cil_ldarg_1 +| 4 = @cil_ldarg_2 +| 5 = @cil_ldarg_3 +| 6 = @cil_ldloc_0 +| 7 = @cil_ldloc_1 +| 8 = @cil_ldloc_2 +| 9 = @cil_ldloc_3 +| 10 = @cil_stloc_0 +| 11 = @cil_stloc_1 +| 12 = @cil_stloc_2 +| 13 = @cil_stloc_3 +| 14 = @cil_ldarg_s +| 15 = @cil_ldarga_s +| 16 = @cil_starg_s +| 17 = @cil_ldloc_s +| 18 = @cil_ldloca_s +| 19 = @cil_stloc_s +| 20 = @cil_ldnull +| 21 = @cil_ldc_i4_m1 +| 22 = @cil_ldc_i4_0 +| 23 = @cil_ldc_i4_1 +| 24 = @cil_ldc_i4_2 +| 25 = @cil_ldc_i4_3 +| 26 = @cil_ldc_i4_4 +| 27 = @cil_ldc_i4_5 +| 28 = @cil_ldc_i4_6 +| 29 = @cil_ldc_i4_7 +| 30 = @cil_ldc_i4_8 +| 31 = @cil_ldc_i4_s +| 32 = @cil_ldc_i4 +| 33 = @cil_ldc_i8 +| 34 = @cil_ldc_r4 +| 35 = @cil_ldc_r8 +| 37 = @cil_dup +| 38 = @cil_pop +| 39 = @cil_jmp +| 40 = @cil_call +| 41 = @cil_calli +| 42 = @cil_ret +| 43 = @cil_br_s +| 44 = @cil_brfalse_s +| 45 = @cil_brtrue_s +| 46 = @cil_beq_s +| 47 = @cil_bge_s +| 48 = @cil_bgt_s +| 49 = @cil_ble_s +| 50 = @cil_blt_s +| 51 = @cil_bne_un_s +| 52 = @cil_bge_un_s +| 53 = @cil_bgt_un_s +| 54 = @cil_ble_un_s +| 55 = @cil_blt_un_s +| 56 = @cil_br +| 57 = @cil_brfalse +| 58 = @cil_brtrue +| 59 = @cil_beq +| 60 = @cil_bge +| 61 = @cil_bgt +| 62 = @cil_ble +| 63 = @cil_blt +| 64 = @cil_bne_un +| 65 = @cil_bge_un +| 66 = @cil_bgt_un +| 67 = @cil_ble_un +| 68 = @cil_blt_un +| 69 = @cil_switch +| 70 = @cil_ldind_i1 +| 71 = @cil_ldind_u1 +| 72 = @cil_ldind_i2 +| 73 = @cil_ldind_u2 +| 74 = @cil_ldind_i4 +| 75 = @cil_ldind_u4 +| 76 = @cil_ldind_i8 +| 77 = @cil_ldind_i +| 78 = @cil_ldind_r4 +| 79 = @cil_ldind_r8 +| 80 = @cil_ldind_ref +| 81 = @cil_stind_ref +| 82 = @cil_stind_i1 +| 83 = @cil_stind_i2 +| 84 = @cil_stind_i4 +| 85 = @cil_stind_i8 +| 86 = @cil_stind_r4 +| 87 = @cil_stind_r8 +| 88 = @cil_add +| 89 = @cil_sub +| 90 = @cil_mul +| 91 = @cil_div +| 92 = @cil_div_un +| 93 = @cil_rem +| 94 = @cil_rem_un +| 95 = @cil_and +| 96 = @cil_or +| 97 = @cil_xor +| 98 = @cil_shl +| 99 = @cil_shr +| 100 = @cil_shr_un +| 101 = @cil_neg +| 102 = @cil_not +| 103 = @cil_conv_i1 +| 104 = @cil_conv_i2 +| 105 = @cil_conv_i4 +| 106 = @cil_conv_i8 +| 107 = @cil_conv_r4 +| 108 = @cil_conv_r8 +| 109 = @cil_conv_u4 +| 110 = @cil_conv_u8 +| 111 = @cil_callvirt +| 112 = @cil_cpobj +| 113 = @cil_ldobj +| 114 = @cil_ldstr +| 115 = @cil_newobj +| 116 = @cil_castclass +| 117 = @cil_isinst +| 118 = @cil_conv_r_un +| 121 = @cil_unbox +| 122 = @cil_throw +| 123 = @cil_ldfld +| 124 = @cil_ldflda +| 125 = @cil_stfld +| 126 = @cil_ldsfld +| 127 = @cil_ldsflda +| 128 = @cil_stsfld +| 129 = @cil_stobj +| 130 = @cil_conv_ovf_i1_un +| 131 = @cil_conv_ovf_i2_un +| 132 = @cil_conv_ovf_i4_un +| 133 = @cil_conv_ovf_i8_un +| 134 = @cil_conv_ovf_u1_un +| 135 = @cil_conv_ovf_u2_un +| 136 = @cil_conv_ovf_u4_un +| 137 = @cil_conv_ovf_u8_un +| 138 = @cil_conv_ovf_i_un +| 139 = @cil_conv_ovf_u_un +| 140 = @cil_box +| 141 = @cil_newarr +| 142 = @cil_ldlen +| 143 = @cil_ldelema +| 144 = @cil_ldelem_i1 +| 145 = @cil_ldelem_u1 +| 146 = @cil_ldelem_i2 +| 147 = @cil_ldelem_u2 +| 148 = @cil_ldelem_i4 +| 149 = @cil_ldelem_u4 +| 150 = @cil_ldelem_i8 +| 151 = @cil_ldelem_i +| 152 = @cil_ldelem_r4 +| 153 = @cil_ldelem_r8 +| 154 = @cil_ldelem_ref +| 155 = @cil_stelem_i +| 156 = @cil_stelem_i1 +| 157 = @cil_stelem_i2 +| 158 = @cil_stelem_i4 +| 159 = @cil_stelem_i8 +| 160 = @cil_stelem_r4 +| 161 = @cil_stelem_r8 +| 162 = @cil_stelem_ref +| 163 = @cil_ldelem +| 164 = @cil_stelem +| 165 = @cil_unbox_any +| 179 = @cil_conv_ovf_i1 +| 180 = @cil_conv_ovf_u1 +| 181 = @cil_conv_ovf_i2 +| 182 = @cil_conv_ovf_u2 +| 183 = @cil_conv_ovf_i4 +| 184 = @cil_conv_ovf_u4 +| 185 = @cil_conv_ovf_i8 +| 186 = @cil_conv_ovf_u8 +| 194 = @cil_refanyval +| 195 = @cil_ckinfinite +| 198 = @cil_mkrefany +| 208 = @cil_ldtoken +| 209 = @cil_conv_u2 +| 210 = @cil_conv_u1 +| 211 = @cil_conv_i +| 212 = @cil_conv_ovf_i +| 213 = @cil_conv_ovf_u +| 214 = @cil_add_ovf +| 215 = @cil_add_ovf_un +| 216 = @cil_mul_ovf +| 217 = @cil_mul_ovf_un +| 218 = @cil_sub_ovf +| 219 = @cil_sub_ovf_un +| 220 = @cil_endfinally +| 221 = @cil_leave +| 222 = @cil_leave_s +| 223 = @cil_stind_i +| 224 = @cil_conv_u +| 65024 = @cil_arglist +| 65025 = @cil_ceq +| 65026 = @cil_cgt +| 65027 = @cil_cgt_un +| 65028 = @cil_clt +| 65029 = @cil_clt_un +| 65030 = @cil_ldftn +| 65031 = @cil_ldvirtftn +| 65033 = @cil_ldarg +| 65034 = @cil_ldarga +| 65035 = @cil_starg +| 65036 = @cil_ldloc +| 65037 = @cil_ldloca +| 65038 = @cil_stloc +| 65039 = @cil_localloc +| 65041 = @cil_endfilter +| 65042 = @cil_unaligned +| 65043 = @cil_volatile +| 65044 = @cil_tail +| 65045 = @cil_initobj +| 65046 = @cil_constrained +| 65047 = @cil_cpblk +| 65048 = @cil_initblk +| 65050 = @cil_rethrow +| 65052 = @cil_sizeof +| 65053 = @cil_refanytype +| 65054 = @cil_readonly +; + +// CIL ignored instructions + +@cil_ignore = @cil_nop | @cil_break | @cil_volatile | @cil_unaligned; + +// CIL local/parameter/field access + +@cil_ldarg_any = @cil_ldarg_0 | @cil_ldarg_1 | @cil_ldarg_2 | @cil_ldarg_3 | @cil_ldarg_s | @cil_ldarga_s | @cil_ldarg | @cil_ldarga; +@cil_starg_any = @cil_starg | @cil_starg_s; + +@cil_ldloc_any = @cil_ldloc_0 | @cil_ldloc_1 | @cil_ldloc_2 | @cil_ldloc_3 | @cil_ldloc_s | @cil_ldloca_s | @cil_ldloc | @cil_ldloca; +@cil_stloc_any = @cil_stloc_0 | @cil_stloc_1 | @cil_stloc_2 | @cil_stloc_3 | @cil_stloc_s | @cil_stloc; + +@cil_ldfld_any = @cil_ldfld | @cil_ldsfld | @cil_ldsflda | @cil_ldflda; +@cil_stfld_any = @cil_stfld | @cil_stsfld; + +@cil_local_access = @cil_stloc_any | @cil_ldloc_any; +@cil_arg_access = @cil_starg_any | @cil_ldarg_any; +@cil_read_access = @cil_ldloc_any | @cil_ldarg_any | @cil_ldfld_any; +@cil_write_access = @cil_stloc_any | @cil_starg_any | @cil_stfld_any; + +@cil_stack_access = @cil_local_access | @cil_arg_access; +@cil_field_access = @cil_ldfld_any | @cil_stfld_any; + +@cil_access = @cil_read_access | @cil_write_access; + +// CIL constant/literal instructions + +@cil_ldc_i = @cil_ldc_i4_any | @cil_ldc_i8; + +@cil_ldc_i4_any = @cil_ldc_i4_m1 | @cil_ldc_i4_0 | @cil_ldc_i4_1 | @cil_ldc_i4_2 | @cil_ldc_i4_3 | + @cil_ldc_i4_4 | @cil_ldc_i4_5 | @cil_ldc_i4_6 | @cil_ldc_i4_7 | @cil_ldc_i4_8 | @cil_ldc_i4_s | @cil_ldc_i4; + +@cil_ldc_r = @cil_ldc_r4 | @cil_ldc_r8; + +@cil_literal = @cil_ldnull | @cil_ldc_i | @cil_ldc_r | @cil_ldstr; + +// Control flow + +@cil_conditional_jump = @cil_binary_jump | @cil_unary_jump; +@cil_binary_jump = @cil_beq_s | @cil_bge_s | @cil_bgt_s | @cil_ble_s | @cil_blt_s | + @cil_bne_un_s | @cil_bge_un_s | @cil_bgt_un_s | @cil_ble_un_s | @cil_blt_un_s | + @cil_beq | @cil_bge | @cil_bgt | @cil_ble | @cil_blt | + @cil_bne_un | @cil_bge_un | @cil_bgt_un | @cil_ble_un | @cil_blt_un; +@cil_unary_jump = @cil_brfalse_s | @cil_brtrue_s | @cil_brfalse | @cil_brtrue | @cil_switch; +@cil_unconditional_jump = @cil_br | @cil_br_s | @cil_leave_any; +@cil_leave_any = @cil_leave | @cil_leave_s; +@cil_jump = @cil_unconditional_jump | @cil_conditional_jump; + +// CIL call instructions + +@cil_call_any = @cil_jmp | @cil_call | @cil_calli | @cil_tail | @cil_callvirt | @cil_newobj; + +// CIL expression instructions + +@cil_expr = @cil_literal | @cil_binary_expr | @cil_unary_expr | @cil_call_any | @cil_read_access | + @cil_newarr | @cil_ldtoken | @cil_sizeof | + @cil_ldftn | @cil_ldvirtftn | @cil_localloc | @cil_mkrefany | @cil_refanytype | @cil_arglist | @cil_dup; + +@cil_unary_expr = + @cil_conversion_operation | @cil_unary_arithmetic_operation | @cil_unary_bitwise_operation| + @cil_ldlen | @cil_isinst | @cil_box | @cil_ldobj | @cil_castclass | @cil_unbox_any | + @cil_ldind | @cil_unbox; + +@cil_conversion_operation = + @cil_conv_i1 | @cil_conv_i2 | @cil_conv_i4 | @cil_conv_i8 | + @cil_conv_u1 | @cil_conv_u2 | @cil_conv_u4 | @cil_conv_u8 | + @cil_conv_ovf_i | @cil_conv_ovf_i_un | @cil_conv_ovf_i1 | @cil_conv_ovf_i1_un | + @cil_conv_ovf_i2 | @cil_conv_ovf_i2_un | @cil_conv_ovf_i4 | @cil_conv_ovf_i4_un | + @cil_conv_ovf_i8 | @cil_conv_ovf_i8_un | @cil_conv_ovf_u | @cil_conv_ovf_u_un | + @cil_conv_ovf_u1 | @cil_conv_ovf_u1_un | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_ovf_u4 | @cil_conv_ovf_u4_un | @cil_conv_ovf_u8 | @cil_conv_ovf_u8_un | + @cil_conv_r4 | @cil_conv_r8 | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_i | @cil_conv_u | @cil_conv_r_un; + +@cil_ldind = @cil_ldind_i | @cil_ldind_i1 | @cil_ldind_i2 | @cil_ldind_i4 | @cil_ldind_i8 | + @cil_ldind_r4 | @cil_ldind_r8 | @cil_ldind_ref | @cil_ldind_u1 | @cil_ldind_u2 | @cil_ldind_u4; + +@cil_stind = @cil_stind_i | @cil_stind_i1 | @cil_stind_i2 | @cil_stind_i4 | @cil_stind_i8 | + @cil_stind_r4 | @cil_stind_r8 | @cil_stind_ref; + +@cil_bitwise_operation = @cil_binary_bitwise_operation | @cil_unary_bitwise_operation; + +@cil_binary_bitwise_operation = @cil_and | @cil_or | @cil_xor | @cil_shr | @cil_shr | @cil_shr_un | @cil_shl; + +@cil_binary_arithmetic_operation = @cil_add | @cil_sub | @cil_mul | @cil_div | @cil_div_un | + @cil_rem | @cil_rem_un | @cil_add_ovf | @cil_add_ovf_un | @cil_mul_ovf | @cil_mul_ovf_un | + @cil_sub_ovf | @cil_sub_ovf_un; + +@cil_unary_bitwise_operation = @cil_not; + +@cil_binary_expr = @cil_binary_arithmetic_operation | @cil_binary_bitwise_operation | @cil_read_array | @cil_comparison_operation; + +@cil_unary_arithmetic_operation = @cil_neg; + +@cil_comparison_operation = @cil_cgt_un | @cil_ceq | @cil_cgt | @cil_clt | @cil_clt_un; + +// Elements that retrieve an address of something +@cil_read_ref = @cil_ldloca_s | @cil_ldarga_s | @cil_ldflda | @cil_ldsflda | @cil_ldelema; + +// CIL array instructions + +@cil_read_array = + @cil_ldelem | @cil_ldelema | @cil_ldelem_i1 | @cil_ldelem_ref | @cil_ldelem_i | + @cil_ldelem_i1 | @cil_ldelem_i2 | @cil_ldelem_i4 | @cil_ldelem_i8 | @cil_ldelem_r4 | + @cil_ldelem_r8 | @cil_ldelem_u1 | @cil_ldelem_u2 | @cil_ldelem_u4; + +@cil_write_array = @cil_stelem | @cil_stelem_ref | + @cil_stelem_i | @cil_stelem_i1 | @cil_stelem_i2 | @cil_stelem_i4 | @cil_stelem_i8 | + @cil_stelem_r4 | @cil_stelem_r8; + +@cil_throw_any = @cil_throw | @cil_rethrow; + +#keyset[impl, index] +cil_instruction( + unique int id: @cil_instruction, + int opcode: int ref, + int index: int ref, + int impl: @cil_method_implementation ref); + +cil_jump( + unique int instruction: @cil_jump ref, + int target: @cil_instruction ref); + +cil_access( + unique int instruction: @cil_instruction ref, + int target: @cil_accessible ref); + +cil_value( + unique int instruction: @cil_literal ref, + string value: string ref); + +#keyset[instruction, index] +cil_switch( + int instruction: @cil_switch ref, + int index: int ref, + int target: @cil_instruction ref); + +cil_instruction_location( + unique int id: @cil_instruction ref, + int loc: @location ref); + +cil_type_location( + int id: @cil_type ref, + int loc: @location ref); + +cil_method_location( + int id: @cil_method ref, + int loc: @location ref); + +@cil_namespace = @namespace; + +@cil_type_container = @cil_type | @cil_namespace | @cil_method; + +case @cil_type.kind of + 0 = @cil_valueorreftype +| 1 = @cil_typeparameter +| 2 = @cil_array_type +| 3 = @cil_pointer_type +| 4 = @cil_function_pointer_type +; + +cil_type( + unique int id: @cil_type, + string name: string ref, + int kind: int ref, + int parent: @cil_type_container ref, + int sourceDecl: @cil_type ref); + +cil_pointer_type( + unique int id: @cil_pointer_type ref, + int pointee: @cil_type ref); + +cil_array_type( + unique int id: @cil_array_type ref, + int element_type: @cil_type ref, + int rank: int ref); + +cil_function_pointer_return_type( + unique int id: @cil_function_pointer_type ref, + int return_type: @cil_type ref); + +cil_method( + unique int id: @cil_method, + string name: string ref, + int parent: @cil_type ref, + int return_type: @cil_type ref); + +cil_method_source_declaration( + unique int method: @cil_method ref, + int source: @cil_method ref); + +cil_method_implementation( + unique int id: @cil_method_implementation, + int method: @cil_method ref, + int location: @assembly ref); + +cil_implements( + int id: @cil_method ref, + int decl: @cil_method ref); + +#keyset[parent, name] +cil_field( + unique int id: @cil_field, + int parent: @cil_type ref, + string name: string ref, + int field_type: @cil_type ref); + +@cil_element = @cil_instruction | @cil_declaration | @cil_handler | @cil_attribute | @cil_namespace; +@cil_named_element = @cil_declaration | @cil_namespace; +@cil_declaration = @cil_variable | @cil_method | @cil_type | @cil_member; +@cil_accessible = @cil_declaration; +@cil_variable = @cil_field | @cil_stack_variable; +@cil_stack_variable = @cil_local_variable | @cil_parameter; +@cil_member = @cil_method | @cil_type | @cil_field | @cil_property | @cil_event; +@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field | @cil_function_pointer_type; +@cil_parameterizable = @cil_method | @cil_function_pointer_type; +@cil_has_type_annotation = @cil_stack_variable | @cil_property | @cil_field | @cil_method | @cil_function_pointer_type; + +#keyset[parameterizable, index] +cil_parameter( + unique int id: @cil_parameter, + int parameterizable: @cil_parameterizable ref, + int index: int ref, + int param_type: @cil_type ref); + +cil_parameter_in(unique int id: @cil_parameter ref); +cil_parameter_out(unique int id: @cil_parameter ref); + +cil_setter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +#keyset[id, modifier] +cil_custom_modifiers( + int id: @cil_custom_modifier_receiver ref, + int modifier: @cil_type ref, + int kind: int ref); // modreq: 1, modopt: 0 + +cil_type_annotation( + int id: @cil_has_type_annotation ref, + int annotation: int ref); + +cil_getter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +cil_adder(unique int event: @cil_event ref, + int method: @cil_method ref); + +cil_remover(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_raiser(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_property( + unique int id: @cil_property, + int parent: @cil_type ref, + string name: string ref, + int property_type: @cil_type ref); + +#keyset[parent, name] +cil_event(unique int id: @cil_event, + int parent: @cil_type ref, + string name: string ref, + int event_type: @cil_type ref); + +#keyset[impl, index] +cil_local_variable( + unique int id: @cil_local_variable, + int impl: @cil_method_implementation ref, + int index: int ref, + int var_type: @cil_type ref); + +cil_function_pointer_calling_conventions( + int id: @cil_function_pointer_type ref, + int kind: int ref); + +// CIL handlers (exception handlers etc). + +case @cil_handler.kind of + 0 = @cil_catch_handler +| 1 = @cil_filter_handler +| 2 = @cil_finally_handler +| 4 = @cil_fault_handler +; + +#keyset[impl, index] +cil_handler( + unique int id: @cil_handler, + int impl: @cil_method_implementation ref, + int index: int ref, + int kind: int ref, + int try_start: @cil_instruction ref, + int try_end: @cil_instruction ref, + int handler_start: @cil_instruction ref); + +cil_handler_filter( + unique int id: @cil_handler ref, + int filter_start: @cil_instruction ref); + +cil_handler_type( + unique int id: @cil_handler ref, + int catch_type: @cil_type ref); + +@cil_controlflow_node = @cil_entry_point | @cil_instruction; + +@cil_entry_point = @cil_method_implementation | @cil_handler; + +@cil_dataflow_node = @cil_instruction | @cil_variable | @cil_method; + +cil_method_stack_size( + unique int method: @cil_method_implementation ref, + int size: int ref); + +// CIL modifiers + +cil_public(int id: @cil_member ref); +cil_private(int id: @cil_member ref); +cil_protected(int id: @cil_member ref); +cil_internal(int id: @cil_member ref); +cil_static(int id: @cil_member ref); +cil_sealed(int id: @cil_member ref); +cil_virtual(int id: @cil_method ref); +cil_abstract(int id: @cil_member ref); +cil_class(int id: @cil_type ref); +cil_interface(int id: @cil_type ref); +cil_security(int id: @cil_member ref); +cil_requiresecobject(int id: @cil_method ref); +cil_specialname(int id: @cil_method ref); +cil_newslot(int id: @cil_method ref); + +cil_base_class(unique int id: @cil_type ref, int base: @cil_type ref); +cil_base_interface(int id: @cil_type ref, int base: @cil_type ref); +cil_enum_underlying_type(unique int id: @cil_type ref, int underlying: @cil_type ref); + +#keyset[unbound, index] +cil_type_parameter( + int unbound: @cil_member ref, + int index: int ref, + int param: @cil_typeparameter ref); + +#keyset[bound, index] +cil_type_argument( + int bound: @cil_member ref, + int index: int ref, + int t: @cil_type ref); + +// CIL type parameter constraints + +cil_typeparam_covariant(int tp: @cil_typeparameter ref); +cil_typeparam_contravariant(int tp: @cil_typeparameter ref); +cil_typeparam_class(int tp: @cil_typeparameter ref); +cil_typeparam_struct(int tp: @cil_typeparameter ref); +cil_typeparam_new(int tp: @cil_typeparameter ref); +cil_typeparam_constraint(int tp: @cil_typeparameter ref, int supertype: @cil_type ref); + +// CIL attributes + +cil_attribute( + unique int attributeid: @cil_attribute, + int element: @cil_declaration ref, + int constructor: @cil_method ref); + +#keyset[attribute_id, param] +cil_attribute_named_argument( + int attribute_id: @cil_attribute ref, + string param: string ref, + string value: string ref); + +#keyset[attribute_id, index] +cil_attribute_positional_argument( + int attribute_id: @cil_attribute ref, + int index: int ref, + string value: string ref); + + +// Common .Net data model covering both C# and CIL + +// Common elements +@dotnet_element = @element | @cil_element; +@dotnet_named_element = @named_element | @cil_named_element; +@dotnet_callable = @callable | @cil_method; +@dotnet_variable = @variable | @cil_variable; +@dotnet_field = @field | @cil_field; +@dotnet_parameter = @parameter | @cil_parameter; +@dotnet_declaration = @declaration | @cil_declaration; +@dotnet_member = @member | @cil_member; +@dotnet_event = @event | @cil_event; +@dotnet_property = @property | @cil_property | @indexer; +@dotnet_parameterizable = @parameterizable | @cil_parameterizable; + +// Common types +@dotnet_type = @type | @cil_type; +@dotnet_call = @call | @cil_call_any; +@dotnet_throw = @throw_element | @cil_throw_any; +@dotnet_valueorreftype = @cil_valueorreftype | @value_or_ref_type | @cil_array_type | @void_type; +@dotnet_typeparameter = @type_parameter | @cil_typeparameter; +@dotnet_array_type = @array_type | @cil_array_type; +@dotnet_pointer_type = @pointer_type | @cil_pointer_type; +@dotnet_type_parameter = @type_parameter | @cil_typeparameter; +@dotnet_generic = @dotnet_valueorreftype | @dotnet_callable; + +// Attributes +@dotnet_attribute = @attribute | @cil_attribute; + +// Expressions +@dotnet_expr = @expr | @cil_expr; + +// Literals +@dotnet_literal = @literal_expr | @cil_literal; +@dotnet_string_literal = @string_literal_expr | @cil_ldstr; +@dotnet_int_literal = @integer_literal_expr | @cil_ldc_i; +@dotnet_float_literal = @float_literal_expr | @cil_ldc_r; +@dotnet_null_literal = @null_literal_expr | @cil_ldnull; + +@metadata_entity = @cil_method | @cil_type | @cil_field | @cil_property | @field | @property | + @callable | @value_or_ref_type | @void_type; + +metadata_handle(int entity : @metadata_entity ref, int location: @assembly ref, int handle: int ref) diff --git a/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/semmlecode.csharp.dbscheme b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/semmlecode.csharp.dbscheme new file mode 100644 index 00000000000..c9ee11bd1ee --- /dev/null +++ b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/semmlecode.csharp.dbscheme @@ -0,0 +1,2100 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + unique int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +compiler_generated(unique int id: @modifiable ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, array = 3, this = 4 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_compiler_generated( + unique int id: @expr ref); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); + +/* Common Intermediate Language - CIL */ + +case @cil_instruction.opcode of + 0 = @cil_nop +| 1 = @cil_break +| 2 = @cil_ldarg_0 +| 3 = @cil_ldarg_1 +| 4 = @cil_ldarg_2 +| 5 = @cil_ldarg_3 +| 6 = @cil_ldloc_0 +| 7 = @cil_ldloc_1 +| 8 = @cil_ldloc_2 +| 9 = @cil_ldloc_3 +| 10 = @cil_stloc_0 +| 11 = @cil_stloc_1 +| 12 = @cil_stloc_2 +| 13 = @cil_stloc_3 +| 14 = @cil_ldarg_s +| 15 = @cil_ldarga_s +| 16 = @cil_starg_s +| 17 = @cil_ldloc_s +| 18 = @cil_ldloca_s +| 19 = @cil_stloc_s +| 20 = @cil_ldnull +| 21 = @cil_ldc_i4_m1 +| 22 = @cil_ldc_i4_0 +| 23 = @cil_ldc_i4_1 +| 24 = @cil_ldc_i4_2 +| 25 = @cil_ldc_i4_3 +| 26 = @cil_ldc_i4_4 +| 27 = @cil_ldc_i4_5 +| 28 = @cil_ldc_i4_6 +| 29 = @cil_ldc_i4_7 +| 30 = @cil_ldc_i4_8 +| 31 = @cil_ldc_i4_s +| 32 = @cil_ldc_i4 +| 33 = @cil_ldc_i8 +| 34 = @cil_ldc_r4 +| 35 = @cil_ldc_r8 +| 37 = @cil_dup +| 38 = @cil_pop +| 39 = @cil_jmp +| 40 = @cil_call +| 41 = @cil_calli +| 42 = @cil_ret +| 43 = @cil_br_s +| 44 = @cil_brfalse_s +| 45 = @cil_brtrue_s +| 46 = @cil_beq_s +| 47 = @cil_bge_s +| 48 = @cil_bgt_s +| 49 = @cil_ble_s +| 50 = @cil_blt_s +| 51 = @cil_bne_un_s +| 52 = @cil_bge_un_s +| 53 = @cil_bgt_un_s +| 54 = @cil_ble_un_s +| 55 = @cil_blt_un_s +| 56 = @cil_br +| 57 = @cil_brfalse +| 58 = @cil_brtrue +| 59 = @cil_beq +| 60 = @cil_bge +| 61 = @cil_bgt +| 62 = @cil_ble +| 63 = @cil_blt +| 64 = @cil_bne_un +| 65 = @cil_bge_un +| 66 = @cil_bgt_un +| 67 = @cil_ble_un +| 68 = @cil_blt_un +| 69 = @cil_switch +| 70 = @cil_ldind_i1 +| 71 = @cil_ldind_u1 +| 72 = @cil_ldind_i2 +| 73 = @cil_ldind_u2 +| 74 = @cil_ldind_i4 +| 75 = @cil_ldind_u4 +| 76 = @cil_ldind_i8 +| 77 = @cil_ldind_i +| 78 = @cil_ldind_r4 +| 79 = @cil_ldind_r8 +| 80 = @cil_ldind_ref +| 81 = @cil_stind_ref +| 82 = @cil_stind_i1 +| 83 = @cil_stind_i2 +| 84 = @cil_stind_i4 +| 85 = @cil_stind_i8 +| 86 = @cil_stind_r4 +| 87 = @cil_stind_r8 +| 88 = @cil_add +| 89 = @cil_sub +| 90 = @cil_mul +| 91 = @cil_div +| 92 = @cil_div_un +| 93 = @cil_rem +| 94 = @cil_rem_un +| 95 = @cil_and +| 96 = @cil_or +| 97 = @cil_xor +| 98 = @cil_shl +| 99 = @cil_shr +| 100 = @cil_shr_un +| 101 = @cil_neg +| 102 = @cil_not +| 103 = @cil_conv_i1 +| 104 = @cil_conv_i2 +| 105 = @cil_conv_i4 +| 106 = @cil_conv_i8 +| 107 = @cil_conv_r4 +| 108 = @cil_conv_r8 +| 109 = @cil_conv_u4 +| 110 = @cil_conv_u8 +| 111 = @cil_callvirt +| 112 = @cil_cpobj +| 113 = @cil_ldobj +| 114 = @cil_ldstr +| 115 = @cil_newobj +| 116 = @cil_castclass +| 117 = @cil_isinst +| 118 = @cil_conv_r_un +| 121 = @cil_unbox +| 122 = @cil_throw +| 123 = @cil_ldfld +| 124 = @cil_ldflda +| 125 = @cil_stfld +| 126 = @cil_ldsfld +| 127 = @cil_ldsflda +| 128 = @cil_stsfld +| 129 = @cil_stobj +| 130 = @cil_conv_ovf_i1_un +| 131 = @cil_conv_ovf_i2_un +| 132 = @cil_conv_ovf_i4_un +| 133 = @cil_conv_ovf_i8_un +| 134 = @cil_conv_ovf_u1_un +| 135 = @cil_conv_ovf_u2_un +| 136 = @cil_conv_ovf_u4_un +| 137 = @cil_conv_ovf_u8_un +| 138 = @cil_conv_ovf_i_un +| 139 = @cil_conv_ovf_u_un +| 140 = @cil_box +| 141 = @cil_newarr +| 142 = @cil_ldlen +| 143 = @cil_ldelema +| 144 = @cil_ldelem_i1 +| 145 = @cil_ldelem_u1 +| 146 = @cil_ldelem_i2 +| 147 = @cil_ldelem_u2 +| 148 = @cil_ldelem_i4 +| 149 = @cil_ldelem_u4 +| 150 = @cil_ldelem_i8 +| 151 = @cil_ldelem_i +| 152 = @cil_ldelem_r4 +| 153 = @cil_ldelem_r8 +| 154 = @cil_ldelem_ref +| 155 = @cil_stelem_i +| 156 = @cil_stelem_i1 +| 157 = @cil_stelem_i2 +| 158 = @cil_stelem_i4 +| 159 = @cil_stelem_i8 +| 160 = @cil_stelem_r4 +| 161 = @cil_stelem_r8 +| 162 = @cil_stelem_ref +| 163 = @cil_ldelem +| 164 = @cil_stelem +| 165 = @cil_unbox_any +| 179 = @cil_conv_ovf_i1 +| 180 = @cil_conv_ovf_u1 +| 181 = @cil_conv_ovf_i2 +| 182 = @cil_conv_ovf_u2 +| 183 = @cil_conv_ovf_i4 +| 184 = @cil_conv_ovf_u4 +| 185 = @cil_conv_ovf_i8 +| 186 = @cil_conv_ovf_u8 +| 194 = @cil_refanyval +| 195 = @cil_ckinfinite +| 198 = @cil_mkrefany +| 208 = @cil_ldtoken +| 209 = @cil_conv_u2 +| 210 = @cil_conv_u1 +| 211 = @cil_conv_i +| 212 = @cil_conv_ovf_i +| 213 = @cil_conv_ovf_u +| 214 = @cil_add_ovf +| 215 = @cil_add_ovf_un +| 216 = @cil_mul_ovf +| 217 = @cil_mul_ovf_un +| 218 = @cil_sub_ovf +| 219 = @cil_sub_ovf_un +| 220 = @cil_endfinally +| 221 = @cil_leave +| 222 = @cil_leave_s +| 223 = @cil_stind_i +| 224 = @cil_conv_u +| 65024 = @cil_arglist +| 65025 = @cil_ceq +| 65026 = @cil_cgt +| 65027 = @cil_cgt_un +| 65028 = @cil_clt +| 65029 = @cil_clt_un +| 65030 = @cil_ldftn +| 65031 = @cil_ldvirtftn +| 65033 = @cil_ldarg +| 65034 = @cil_ldarga +| 65035 = @cil_starg +| 65036 = @cil_ldloc +| 65037 = @cil_ldloca +| 65038 = @cil_stloc +| 65039 = @cil_localloc +| 65041 = @cil_endfilter +| 65042 = @cil_unaligned +| 65043 = @cil_volatile +| 65044 = @cil_tail +| 65045 = @cil_initobj +| 65046 = @cil_constrained +| 65047 = @cil_cpblk +| 65048 = @cil_initblk +| 65050 = @cil_rethrow +| 65052 = @cil_sizeof +| 65053 = @cil_refanytype +| 65054 = @cil_readonly +; + +// CIL ignored instructions + +@cil_ignore = @cil_nop | @cil_break | @cil_volatile | @cil_unaligned; + +// CIL local/parameter/field access + +@cil_ldarg_any = @cil_ldarg_0 | @cil_ldarg_1 | @cil_ldarg_2 | @cil_ldarg_3 | @cil_ldarg_s | @cil_ldarga_s | @cil_ldarg | @cil_ldarga; +@cil_starg_any = @cil_starg | @cil_starg_s; + +@cil_ldloc_any = @cil_ldloc_0 | @cil_ldloc_1 | @cil_ldloc_2 | @cil_ldloc_3 | @cil_ldloc_s | @cil_ldloca_s | @cil_ldloc | @cil_ldloca; +@cil_stloc_any = @cil_stloc_0 | @cil_stloc_1 | @cil_stloc_2 | @cil_stloc_3 | @cil_stloc_s | @cil_stloc; + +@cil_ldfld_any = @cil_ldfld | @cil_ldsfld | @cil_ldsflda | @cil_ldflda; +@cil_stfld_any = @cil_stfld | @cil_stsfld; + +@cil_local_access = @cil_stloc_any | @cil_ldloc_any; +@cil_arg_access = @cil_starg_any | @cil_ldarg_any; +@cil_read_access = @cil_ldloc_any | @cil_ldarg_any | @cil_ldfld_any; +@cil_write_access = @cil_stloc_any | @cil_starg_any | @cil_stfld_any; + +@cil_stack_access = @cil_local_access | @cil_arg_access; +@cil_field_access = @cil_ldfld_any | @cil_stfld_any; + +@cil_access = @cil_read_access | @cil_write_access; + +// CIL constant/literal instructions + +@cil_ldc_i = @cil_ldc_i4_any | @cil_ldc_i8; + +@cil_ldc_i4_any = @cil_ldc_i4_m1 | @cil_ldc_i4_0 | @cil_ldc_i4_1 | @cil_ldc_i4_2 | @cil_ldc_i4_3 | + @cil_ldc_i4_4 | @cil_ldc_i4_5 | @cil_ldc_i4_6 | @cil_ldc_i4_7 | @cil_ldc_i4_8 | @cil_ldc_i4_s | @cil_ldc_i4; + +@cil_ldc_r = @cil_ldc_r4 | @cil_ldc_r8; + +@cil_literal = @cil_ldnull | @cil_ldc_i | @cil_ldc_r | @cil_ldstr; + +// Control flow + +@cil_conditional_jump = @cil_binary_jump | @cil_unary_jump; +@cil_binary_jump = @cil_beq_s | @cil_bge_s | @cil_bgt_s | @cil_ble_s | @cil_blt_s | + @cil_bne_un_s | @cil_bge_un_s | @cil_bgt_un_s | @cil_ble_un_s | @cil_blt_un_s | + @cil_beq | @cil_bge | @cil_bgt | @cil_ble | @cil_blt | + @cil_bne_un | @cil_bge_un | @cil_bgt_un | @cil_ble_un | @cil_blt_un; +@cil_unary_jump = @cil_brfalse_s | @cil_brtrue_s | @cil_brfalse | @cil_brtrue | @cil_switch; +@cil_unconditional_jump = @cil_br | @cil_br_s | @cil_leave_any; +@cil_leave_any = @cil_leave | @cil_leave_s; +@cil_jump = @cil_unconditional_jump | @cil_conditional_jump; + +// CIL call instructions + +@cil_call_any = @cil_jmp | @cil_call | @cil_calli | @cil_tail | @cil_callvirt | @cil_newobj; + +// CIL expression instructions + +@cil_expr = @cil_literal | @cil_binary_expr | @cil_unary_expr | @cil_call_any | @cil_read_access | + @cil_newarr | @cil_ldtoken | @cil_sizeof | + @cil_ldftn | @cil_ldvirtftn | @cil_localloc | @cil_mkrefany | @cil_refanytype | @cil_arglist | @cil_dup; + +@cil_unary_expr = + @cil_conversion_operation | @cil_unary_arithmetic_operation | @cil_unary_bitwise_operation| + @cil_ldlen | @cil_isinst | @cil_box | @cil_ldobj | @cil_castclass | @cil_unbox_any | + @cil_ldind | @cil_unbox; + +@cil_conversion_operation = + @cil_conv_i1 | @cil_conv_i2 | @cil_conv_i4 | @cil_conv_i8 | + @cil_conv_u1 | @cil_conv_u2 | @cil_conv_u4 | @cil_conv_u8 | + @cil_conv_ovf_i | @cil_conv_ovf_i_un | @cil_conv_ovf_i1 | @cil_conv_ovf_i1_un | + @cil_conv_ovf_i2 | @cil_conv_ovf_i2_un | @cil_conv_ovf_i4 | @cil_conv_ovf_i4_un | + @cil_conv_ovf_i8 | @cil_conv_ovf_i8_un | @cil_conv_ovf_u | @cil_conv_ovf_u_un | + @cil_conv_ovf_u1 | @cil_conv_ovf_u1_un | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_ovf_u4 | @cil_conv_ovf_u4_un | @cil_conv_ovf_u8 | @cil_conv_ovf_u8_un | + @cil_conv_r4 | @cil_conv_r8 | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_i | @cil_conv_u | @cil_conv_r_un; + +@cil_ldind = @cil_ldind_i | @cil_ldind_i1 | @cil_ldind_i2 | @cil_ldind_i4 | @cil_ldind_i8 | + @cil_ldind_r4 | @cil_ldind_r8 | @cil_ldind_ref | @cil_ldind_u1 | @cil_ldind_u2 | @cil_ldind_u4; + +@cil_stind = @cil_stind_i | @cil_stind_i1 | @cil_stind_i2 | @cil_stind_i4 | @cil_stind_i8 | + @cil_stind_r4 | @cil_stind_r8 | @cil_stind_ref; + +@cil_bitwise_operation = @cil_binary_bitwise_operation | @cil_unary_bitwise_operation; + +@cil_binary_bitwise_operation = @cil_and | @cil_or | @cil_xor | @cil_shr | @cil_shr | @cil_shr_un | @cil_shl; + +@cil_binary_arithmetic_operation = @cil_add | @cil_sub | @cil_mul | @cil_div | @cil_div_un | + @cil_rem | @cil_rem_un | @cil_add_ovf | @cil_add_ovf_un | @cil_mul_ovf | @cil_mul_ovf_un | + @cil_sub_ovf | @cil_sub_ovf_un; + +@cil_unary_bitwise_operation = @cil_not; + +@cil_binary_expr = @cil_binary_arithmetic_operation | @cil_binary_bitwise_operation | @cil_read_array | @cil_comparison_operation; + +@cil_unary_arithmetic_operation = @cil_neg; + +@cil_comparison_operation = @cil_cgt_un | @cil_ceq | @cil_cgt | @cil_clt | @cil_clt_un; + +// Elements that retrieve an address of something +@cil_read_ref = @cil_ldloca_s | @cil_ldarga_s | @cil_ldflda | @cil_ldsflda | @cil_ldelema; + +// CIL array instructions + +@cil_read_array = + @cil_ldelem | @cil_ldelema | @cil_ldelem_i1 | @cil_ldelem_ref | @cil_ldelem_i | + @cil_ldelem_i1 | @cil_ldelem_i2 | @cil_ldelem_i4 | @cil_ldelem_i8 | @cil_ldelem_r4 | + @cil_ldelem_r8 | @cil_ldelem_u1 | @cil_ldelem_u2 | @cil_ldelem_u4; + +@cil_write_array = @cil_stelem | @cil_stelem_ref | + @cil_stelem_i | @cil_stelem_i1 | @cil_stelem_i2 | @cil_stelem_i4 | @cil_stelem_i8 | + @cil_stelem_r4 | @cil_stelem_r8; + +@cil_throw_any = @cil_throw | @cil_rethrow; + +#keyset[impl, index] +cil_instruction( + unique int id: @cil_instruction, + int opcode: int ref, + int index: int ref, + int impl: @cil_method_implementation ref); + +cil_jump( + unique int instruction: @cil_jump ref, + int target: @cil_instruction ref); + +cil_access( + unique int instruction: @cil_instruction ref, + int target: @cil_accessible ref); + +cil_value( + unique int instruction: @cil_literal ref, + string value: string ref); + +#keyset[instruction, index] +cil_switch( + int instruction: @cil_switch ref, + int index: int ref, + int target: @cil_instruction ref); + +cil_instruction_location( + unique int id: @cil_instruction ref, + int loc: @location ref); + +cil_type_location( + int id: @cil_type ref, + int loc: @location ref); + +cil_method_location( + int id: @cil_method ref, + int loc: @location ref); + +@cil_namespace = @namespace; + +@cil_type_container = @cil_type | @cil_namespace | @cil_method; + +case @cil_type.kind of + 0 = @cil_valueorreftype +| 1 = @cil_typeparameter +| 2 = @cil_array_type +| 3 = @cil_pointer_type +| 4 = @cil_function_pointer_type +; + +cil_type( + unique int id: @cil_type, + string name: string ref, + int kind: int ref, + int parent: @cil_type_container ref, + int sourceDecl: @cil_type ref); + +cil_pointer_type( + unique int id: @cil_pointer_type ref, + int pointee: @cil_type ref); + +cil_array_type( + unique int id: @cil_array_type ref, + int element_type: @cil_type ref, + int rank: int ref); + +cil_function_pointer_return_type( + unique int id: @cil_function_pointer_type ref, + int return_type: @cil_type ref); + +cil_method( + unique int id: @cil_method, + string name: string ref, + int parent: @cil_type ref, + int return_type: @cil_type ref); + +cil_method_source_declaration( + unique int method: @cil_method ref, + int source: @cil_method ref); + +cil_method_implementation( + unique int id: @cil_method_implementation, + int method: @cil_method ref, + int location: @assembly ref); + +cil_implements( + int id: @cil_method ref, + int decl: @cil_method ref); + +#keyset[parent, name] +cil_field( + unique int id: @cil_field, + int parent: @cil_type ref, + string name: string ref, + int field_type: @cil_type ref); + +@cil_element = @cil_instruction | @cil_declaration | @cil_handler | @cil_attribute | @cil_namespace; +@cil_named_element = @cil_declaration | @cil_namespace; +@cil_declaration = @cil_variable | @cil_method | @cil_type | @cil_member; +@cil_accessible = @cil_declaration; +@cil_variable = @cil_field | @cil_stack_variable; +@cil_stack_variable = @cil_local_variable | @cil_parameter; +@cil_member = @cil_method | @cil_type | @cil_field | @cil_property | @cil_event; +@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field | @cil_function_pointer_type; +@cil_parameterizable = @cil_method | @cil_function_pointer_type; +@cil_has_type_annotation = @cil_stack_variable | @cil_property | @cil_field | @cil_method | @cil_function_pointer_type; + +#keyset[parameterizable, index] +cil_parameter( + unique int id: @cil_parameter, + int parameterizable: @cil_parameterizable ref, + int index: int ref, + int param_type: @cil_type ref); + +cil_parameter_in(unique int id: @cil_parameter ref); +cil_parameter_out(unique int id: @cil_parameter ref); + +cil_setter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +#keyset[id, modifier] +cil_custom_modifiers( + int id: @cil_custom_modifier_receiver ref, + int modifier: @cil_type ref, + int kind: int ref); // modreq: 1, modopt: 0 + +cil_type_annotation( + int id: @cil_has_type_annotation ref, + int annotation: int ref); + +cil_getter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +cil_adder(unique int event: @cil_event ref, + int method: @cil_method ref); + +cil_remover(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_raiser(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_property( + unique int id: @cil_property, + int parent: @cil_type ref, + string name: string ref, + int property_type: @cil_type ref); + +#keyset[parent, name] +cil_event(unique int id: @cil_event, + int parent: @cil_type ref, + string name: string ref, + int event_type: @cil_type ref); + +#keyset[impl, index] +cil_local_variable( + unique int id: @cil_local_variable, + int impl: @cil_method_implementation ref, + int index: int ref, + int var_type: @cil_type ref); + +cil_function_pointer_calling_conventions( + int id: @cil_function_pointer_type ref, + int kind: int ref); + +// CIL handlers (exception handlers etc). + +case @cil_handler.kind of + 0 = @cil_catch_handler +| 1 = @cil_filter_handler +| 2 = @cil_finally_handler +| 4 = @cil_fault_handler +; + +#keyset[impl, index] +cil_handler( + unique int id: @cil_handler, + int impl: @cil_method_implementation ref, + int index: int ref, + int kind: int ref, + int try_start: @cil_instruction ref, + int try_end: @cil_instruction ref, + int handler_start: @cil_instruction ref); + +cil_handler_filter( + unique int id: @cil_handler ref, + int filter_start: @cil_instruction ref); + +cil_handler_type( + unique int id: @cil_handler ref, + int catch_type: @cil_type ref); + +@cil_controlflow_node = @cil_entry_point | @cil_instruction; + +@cil_entry_point = @cil_method_implementation | @cil_handler; + +@cil_dataflow_node = @cil_instruction | @cil_variable | @cil_method; + +cil_method_stack_size( + unique int method: @cil_method_implementation ref, + int size: int ref); + +// CIL modifiers + +cil_public(int id: @cil_member ref); +cil_private(int id: @cil_member ref); +cil_protected(int id: @cil_member ref); +cil_internal(int id: @cil_member ref); +cil_static(int id: @cil_member ref); +cil_sealed(int id: @cil_member ref); +cil_virtual(int id: @cil_method ref); +cil_abstract(int id: @cil_member ref); +cil_class(int id: @cil_type ref); +cil_interface(int id: @cil_type ref); +cil_security(int id: @cil_member ref); +cil_requiresecobject(int id: @cil_method ref); +cil_specialname(int id: @cil_method ref); +cil_newslot(int id: @cil_method ref); + +cil_base_class(unique int id: @cil_type ref, int base: @cil_type ref); +cil_base_interface(int id: @cil_type ref, int base: @cil_type ref); +cil_enum_underlying_type(unique int id: @cil_type ref, int underlying: @cil_type ref); + +#keyset[unbound, index] +cil_type_parameter( + int unbound: @cil_member ref, + int index: int ref, + int param: @cil_typeparameter ref); + +#keyset[bound, index] +cil_type_argument( + int bound: @cil_member ref, + int index: int ref, + int t: @cil_type ref); + +// CIL type parameter constraints + +cil_typeparam_covariant(int tp: @cil_typeparameter ref); +cil_typeparam_contravariant(int tp: @cil_typeparameter ref); +cil_typeparam_class(int tp: @cil_typeparameter ref); +cil_typeparam_struct(int tp: @cil_typeparameter ref); +cil_typeparam_new(int tp: @cil_typeparameter ref); +cil_typeparam_constraint(int tp: @cil_typeparameter ref, int supertype: @cil_type ref); + +// CIL attributes + +cil_attribute( + unique int attributeid: @cil_attribute, + int element: @cil_declaration ref, + int constructor: @cil_method ref); + +#keyset[attribute_id, param] +cil_attribute_named_argument( + int attribute_id: @cil_attribute ref, + string param: string ref, + string value: string ref); + +#keyset[attribute_id, index] +cil_attribute_positional_argument( + int attribute_id: @cil_attribute ref, + int index: int ref, + string value: string ref); + + +// Common .Net data model covering both C# and CIL + +// Common elements +@dotnet_element = @element | @cil_element; +@dotnet_named_element = @named_element | @cil_named_element; +@dotnet_callable = @callable | @cil_method; +@dotnet_variable = @variable | @cil_variable; +@dotnet_field = @field | @cil_field; +@dotnet_parameter = @parameter | @cil_parameter; +@dotnet_declaration = @declaration | @cil_declaration; +@dotnet_member = @member | @cil_member; +@dotnet_event = @event | @cil_event; +@dotnet_property = @property | @cil_property | @indexer; +@dotnet_parameterizable = @parameterizable | @cil_parameterizable; + +// Common types +@dotnet_type = @type | @cil_type; +@dotnet_call = @call | @cil_call_any; +@dotnet_throw = @throw_element | @cil_throw_any; +@dotnet_valueorreftype = @cil_valueorreftype | @value_or_ref_type | @cil_array_type | @void_type; +@dotnet_typeparameter = @type_parameter | @cil_typeparameter; +@dotnet_array_type = @array_type | @cil_array_type; +@dotnet_pointer_type = @pointer_type | @cil_pointer_type; +@dotnet_type_parameter = @type_parameter | @cil_typeparameter; +@dotnet_generic = @dotnet_valueorreftype | @dotnet_callable; + +// Attributes +@dotnet_attribute = @attribute | @cil_attribute; + +// Expressions +@dotnet_expr = @expr | @cil_expr; + +// Literals +@dotnet_literal = @literal_expr | @cil_literal; +@dotnet_string_literal = @string_literal_expr | @cil_ldstr; +@dotnet_int_literal = @integer_literal_expr | @cil_ldc_i; +@dotnet_float_literal = @float_literal_expr | @cil_ldc_r; +@dotnet_null_literal = @null_literal_expr | @cil_ldnull; + +@metadata_entity = @cil_method | @cil_type | @cil_field | @cil_property | @field | @property | + @callable | @value_or_ref_type | @void_type; + +metadata_handle(int entity : @metadata_entity ref, int location: @assembly ref, int handle: int ref) diff --git a/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/upgrade.properties b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/upgrade.properties new file mode 100644 index 00000000000..2cf7c647937 --- /dev/null +++ b/csharp/downgrades/21ede72308c41493f19b37720d8259d5eb307f12/upgrade.properties @@ -0,0 +1,4 @@ +description: Split `compiler_generated` into `expr_compiler_generated` and `compiler_generated`. +compatibility: backwards +compiler_generated.rel: run compiler_generated.qlo +expr_compiler_generated.rel: run expr_compiler_generated.qlo diff --git a/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/old.dbscheme b/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/old.dbscheme new file mode 100644 index 00000000000..fd04e45710e --- /dev/null +++ b/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/old.dbscheme @@ -0,0 +1,2099 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + unique int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); + +/* Common Intermediate Language - CIL */ + +case @cil_instruction.opcode of + 0 = @cil_nop +| 1 = @cil_break +| 2 = @cil_ldarg_0 +| 3 = @cil_ldarg_1 +| 4 = @cil_ldarg_2 +| 5 = @cil_ldarg_3 +| 6 = @cil_ldloc_0 +| 7 = @cil_ldloc_1 +| 8 = @cil_ldloc_2 +| 9 = @cil_ldloc_3 +| 10 = @cil_stloc_0 +| 11 = @cil_stloc_1 +| 12 = @cil_stloc_2 +| 13 = @cil_stloc_3 +| 14 = @cil_ldarg_s +| 15 = @cil_ldarga_s +| 16 = @cil_starg_s +| 17 = @cil_ldloc_s +| 18 = @cil_ldloca_s +| 19 = @cil_stloc_s +| 20 = @cil_ldnull +| 21 = @cil_ldc_i4_m1 +| 22 = @cil_ldc_i4_0 +| 23 = @cil_ldc_i4_1 +| 24 = @cil_ldc_i4_2 +| 25 = @cil_ldc_i4_3 +| 26 = @cil_ldc_i4_4 +| 27 = @cil_ldc_i4_5 +| 28 = @cil_ldc_i4_6 +| 29 = @cil_ldc_i4_7 +| 30 = @cil_ldc_i4_8 +| 31 = @cil_ldc_i4_s +| 32 = @cil_ldc_i4 +| 33 = @cil_ldc_i8 +| 34 = @cil_ldc_r4 +| 35 = @cil_ldc_r8 +| 37 = @cil_dup +| 38 = @cil_pop +| 39 = @cil_jmp +| 40 = @cil_call +| 41 = @cil_calli +| 42 = @cil_ret +| 43 = @cil_br_s +| 44 = @cil_brfalse_s +| 45 = @cil_brtrue_s +| 46 = @cil_beq_s +| 47 = @cil_bge_s +| 48 = @cil_bgt_s +| 49 = @cil_ble_s +| 50 = @cil_blt_s +| 51 = @cil_bne_un_s +| 52 = @cil_bge_un_s +| 53 = @cil_bgt_un_s +| 54 = @cil_ble_un_s +| 55 = @cil_blt_un_s +| 56 = @cil_br +| 57 = @cil_brfalse +| 58 = @cil_brtrue +| 59 = @cil_beq +| 60 = @cil_bge +| 61 = @cil_bgt +| 62 = @cil_ble +| 63 = @cil_blt +| 64 = @cil_bne_un +| 65 = @cil_bge_un +| 66 = @cil_bgt_un +| 67 = @cil_ble_un +| 68 = @cil_blt_un +| 69 = @cil_switch +| 70 = @cil_ldind_i1 +| 71 = @cil_ldind_u1 +| 72 = @cil_ldind_i2 +| 73 = @cil_ldind_u2 +| 74 = @cil_ldind_i4 +| 75 = @cil_ldind_u4 +| 76 = @cil_ldind_i8 +| 77 = @cil_ldind_i +| 78 = @cil_ldind_r4 +| 79 = @cil_ldind_r8 +| 80 = @cil_ldind_ref +| 81 = @cil_stind_ref +| 82 = @cil_stind_i1 +| 83 = @cil_stind_i2 +| 84 = @cil_stind_i4 +| 85 = @cil_stind_i8 +| 86 = @cil_stind_r4 +| 87 = @cil_stind_r8 +| 88 = @cil_add +| 89 = @cil_sub +| 90 = @cil_mul +| 91 = @cil_div +| 92 = @cil_div_un +| 93 = @cil_rem +| 94 = @cil_rem_un +| 95 = @cil_and +| 96 = @cil_or +| 97 = @cil_xor +| 98 = @cil_shl +| 99 = @cil_shr +| 100 = @cil_shr_un +| 101 = @cil_neg +| 102 = @cil_not +| 103 = @cil_conv_i1 +| 104 = @cil_conv_i2 +| 105 = @cil_conv_i4 +| 106 = @cil_conv_i8 +| 107 = @cil_conv_r4 +| 108 = @cil_conv_r8 +| 109 = @cil_conv_u4 +| 110 = @cil_conv_u8 +| 111 = @cil_callvirt +| 112 = @cil_cpobj +| 113 = @cil_ldobj +| 114 = @cil_ldstr +| 115 = @cil_newobj +| 116 = @cil_castclass +| 117 = @cil_isinst +| 118 = @cil_conv_r_un +| 121 = @cil_unbox +| 122 = @cil_throw +| 123 = @cil_ldfld +| 124 = @cil_ldflda +| 125 = @cil_stfld +| 126 = @cil_ldsfld +| 127 = @cil_ldsflda +| 128 = @cil_stsfld +| 129 = @cil_stobj +| 130 = @cil_conv_ovf_i1_un +| 131 = @cil_conv_ovf_i2_un +| 132 = @cil_conv_ovf_i4_un +| 133 = @cil_conv_ovf_i8_un +| 134 = @cil_conv_ovf_u1_un +| 135 = @cil_conv_ovf_u2_un +| 136 = @cil_conv_ovf_u4_un +| 137 = @cil_conv_ovf_u8_un +| 138 = @cil_conv_ovf_i_un +| 139 = @cil_conv_ovf_u_un +| 140 = @cil_box +| 141 = @cil_newarr +| 142 = @cil_ldlen +| 143 = @cil_ldelema +| 144 = @cil_ldelem_i1 +| 145 = @cil_ldelem_u1 +| 146 = @cil_ldelem_i2 +| 147 = @cil_ldelem_u2 +| 148 = @cil_ldelem_i4 +| 149 = @cil_ldelem_u4 +| 150 = @cil_ldelem_i8 +| 151 = @cil_ldelem_i +| 152 = @cil_ldelem_r4 +| 153 = @cil_ldelem_r8 +| 154 = @cil_ldelem_ref +| 155 = @cil_stelem_i +| 156 = @cil_stelem_i1 +| 157 = @cil_stelem_i2 +| 158 = @cil_stelem_i4 +| 159 = @cil_stelem_i8 +| 160 = @cil_stelem_r4 +| 161 = @cil_stelem_r8 +| 162 = @cil_stelem_ref +| 163 = @cil_ldelem +| 164 = @cil_stelem +| 165 = @cil_unbox_any +| 179 = @cil_conv_ovf_i1 +| 180 = @cil_conv_ovf_u1 +| 181 = @cil_conv_ovf_i2 +| 182 = @cil_conv_ovf_u2 +| 183 = @cil_conv_ovf_i4 +| 184 = @cil_conv_ovf_u4 +| 185 = @cil_conv_ovf_i8 +| 186 = @cil_conv_ovf_u8 +| 194 = @cil_refanyval +| 195 = @cil_ckinfinite +| 198 = @cil_mkrefany +| 208 = @cil_ldtoken +| 209 = @cil_conv_u2 +| 210 = @cil_conv_u1 +| 211 = @cil_conv_i +| 212 = @cil_conv_ovf_i +| 213 = @cil_conv_ovf_u +| 214 = @cil_add_ovf +| 215 = @cil_add_ovf_un +| 216 = @cil_mul_ovf +| 217 = @cil_mul_ovf_un +| 218 = @cil_sub_ovf +| 219 = @cil_sub_ovf_un +| 220 = @cil_endfinally +| 221 = @cil_leave +| 222 = @cil_leave_s +| 223 = @cil_stind_i +| 224 = @cil_conv_u +| 65024 = @cil_arglist +| 65025 = @cil_ceq +| 65026 = @cil_cgt +| 65027 = @cil_cgt_un +| 65028 = @cil_clt +| 65029 = @cil_clt_un +| 65030 = @cil_ldftn +| 65031 = @cil_ldvirtftn +| 65033 = @cil_ldarg +| 65034 = @cil_ldarga +| 65035 = @cil_starg +| 65036 = @cil_ldloc +| 65037 = @cil_ldloca +| 65038 = @cil_stloc +| 65039 = @cil_localloc +| 65041 = @cil_endfilter +| 65042 = @cil_unaligned +| 65043 = @cil_volatile +| 65044 = @cil_tail +| 65045 = @cil_initobj +| 65046 = @cil_constrained +| 65047 = @cil_cpblk +| 65048 = @cil_initblk +| 65050 = @cil_rethrow +| 65052 = @cil_sizeof +| 65053 = @cil_refanytype +| 65054 = @cil_readonly +; + +// CIL ignored instructions + +@cil_ignore = @cil_nop | @cil_break | @cil_volatile | @cil_unaligned; + +// CIL local/parameter/field access + +@cil_ldarg_any = @cil_ldarg_0 | @cil_ldarg_1 | @cil_ldarg_2 | @cil_ldarg_3 | @cil_ldarg_s | @cil_ldarga_s | @cil_ldarg | @cil_ldarga; +@cil_starg_any = @cil_starg | @cil_starg_s; + +@cil_ldloc_any = @cil_ldloc_0 | @cil_ldloc_1 | @cil_ldloc_2 | @cil_ldloc_3 | @cil_ldloc_s | @cil_ldloca_s | @cil_ldloc | @cil_ldloca; +@cil_stloc_any = @cil_stloc_0 | @cil_stloc_1 | @cil_stloc_2 | @cil_stloc_3 | @cil_stloc_s | @cil_stloc; + +@cil_ldfld_any = @cil_ldfld | @cil_ldsfld | @cil_ldsflda | @cil_ldflda; +@cil_stfld_any = @cil_stfld | @cil_stsfld; + +@cil_local_access = @cil_stloc_any | @cil_ldloc_any; +@cil_arg_access = @cil_starg_any | @cil_ldarg_any; +@cil_read_access = @cil_ldloc_any | @cil_ldarg_any | @cil_ldfld_any; +@cil_write_access = @cil_stloc_any | @cil_starg_any | @cil_stfld_any; + +@cil_stack_access = @cil_local_access | @cil_arg_access; +@cil_field_access = @cil_ldfld_any | @cil_stfld_any; + +@cil_access = @cil_read_access | @cil_write_access; + +// CIL constant/literal instructions + +@cil_ldc_i = @cil_ldc_i4_any | @cil_ldc_i8; + +@cil_ldc_i4_any = @cil_ldc_i4_m1 | @cil_ldc_i4_0 | @cil_ldc_i4_1 | @cil_ldc_i4_2 | @cil_ldc_i4_3 | + @cil_ldc_i4_4 | @cil_ldc_i4_5 | @cil_ldc_i4_6 | @cil_ldc_i4_7 | @cil_ldc_i4_8 | @cil_ldc_i4_s | @cil_ldc_i4; + +@cil_ldc_r = @cil_ldc_r4 | @cil_ldc_r8; + +@cil_literal = @cil_ldnull | @cil_ldc_i | @cil_ldc_r | @cil_ldstr; + +// Control flow + +@cil_conditional_jump = @cil_binary_jump | @cil_unary_jump; +@cil_binary_jump = @cil_beq_s | @cil_bge_s | @cil_bgt_s | @cil_ble_s | @cil_blt_s | + @cil_bne_un_s | @cil_bge_un_s | @cil_bgt_un_s | @cil_ble_un_s | @cil_blt_un_s | + @cil_beq | @cil_bge | @cil_bgt | @cil_ble | @cil_blt | + @cil_bne_un | @cil_bge_un | @cil_bgt_un | @cil_ble_un | @cil_blt_un; +@cil_unary_jump = @cil_brfalse_s | @cil_brtrue_s | @cil_brfalse | @cil_brtrue | @cil_switch; +@cil_unconditional_jump = @cil_br | @cil_br_s | @cil_leave_any; +@cil_leave_any = @cil_leave | @cil_leave_s; +@cil_jump = @cil_unconditional_jump | @cil_conditional_jump; + +// CIL call instructions + +@cil_call_any = @cil_jmp | @cil_call | @cil_calli | @cil_tail | @cil_callvirt | @cil_newobj; + +// CIL expression instructions + +@cil_expr = @cil_literal | @cil_binary_expr | @cil_unary_expr | @cil_call_any | @cil_read_access | + @cil_newarr | @cil_ldtoken | @cil_sizeof | + @cil_ldftn | @cil_ldvirtftn | @cil_localloc | @cil_mkrefany | @cil_refanytype | @cil_arglist | @cil_dup; + +@cil_unary_expr = + @cil_conversion_operation | @cil_unary_arithmetic_operation | @cil_unary_bitwise_operation| + @cil_ldlen | @cil_isinst | @cil_box | @cil_ldobj | @cil_castclass | @cil_unbox_any | + @cil_ldind | @cil_unbox; + +@cil_conversion_operation = + @cil_conv_i1 | @cil_conv_i2 | @cil_conv_i4 | @cil_conv_i8 | + @cil_conv_u1 | @cil_conv_u2 | @cil_conv_u4 | @cil_conv_u8 | + @cil_conv_ovf_i | @cil_conv_ovf_i_un | @cil_conv_ovf_i1 | @cil_conv_ovf_i1_un | + @cil_conv_ovf_i2 | @cil_conv_ovf_i2_un | @cil_conv_ovf_i4 | @cil_conv_ovf_i4_un | + @cil_conv_ovf_i8 | @cil_conv_ovf_i8_un | @cil_conv_ovf_u | @cil_conv_ovf_u_un | + @cil_conv_ovf_u1 | @cil_conv_ovf_u1_un | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_ovf_u4 | @cil_conv_ovf_u4_un | @cil_conv_ovf_u8 | @cil_conv_ovf_u8_un | + @cil_conv_r4 | @cil_conv_r8 | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_i | @cil_conv_u | @cil_conv_r_un; + +@cil_ldind = @cil_ldind_i | @cil_ldind_i1 | @cil_ldind_i2 | @cil_ldind_i4 | @cil_ldind_i8 | + @cil_ldind_r4 | @cil_ldind_r8 | @cil_ldind_ref | @cil_ldind_u1 | @cil_ldind_u2 | @cil_ldind_u4; + +@cil_stind = @cil_stind_i | @cil_stind_i1 | @cil_stind_i2 | @cil_stind_i4 | @cil_stind_i8 | + @cil_stind_r4 | @cil_stind_r8 | @cil_stind_ref; + +@cil_bitwise_operation = @cil_binary_bitwise_operation | @cil_unary_bitwise_operation; + +@cil_binary_bitwise_operation = @cil_and | @cil_or | @cil_xor | @cil_shr | @cil_shr | @cil_shr_un | @cil_shl; + +@cil_binary_arithmetic_operation = @cil_add | @cil_sub | @cil_mul | @cil_div | @cil_div_un | + @cil_rem | @cil_rem_un | @cil_add_ovf | @cil_add_ovf_un | @cil_mul_ovf | @cil_mul_ovf_un | + @cil_sub_ovf | @cil_sub_ovf_un; + +@cil_unary_bitwise_operation = @cil_not; + +@cil_binary_expr = @cil_binary_arithmetic_operation | @cil_binary_bitwise_operation | @cil_read_array | @cil_comparison_operation; + +@cil_unary_arithmetic_operation = @cil_neg; + +@cil_comparison_operation = @cil_cgt_un | @cil_ceq | @cil_cgt | @cil_clt | @cil_clt_un; + +// Elements that retrieve an address of something +@cil_read_ref = @cil_ldloca_s | @cil_ldarga_s | @cil_ldflda | @cil_ldsflda | @cil_ldelema; + +// CIL array instructions + +@cil_read_array = + @cil_ldelem | @cil_ldelema | @cil_ldelem_i1 | @cil_ldelem_ref | @cil_ldelem_i | + @cil_ldelem_i1 | @cil_ldelem_i2 | @cil_ldelem_i4 | @cil_ldelem_i8 | @cil_ldelem_r4 | + @cil_ldelem_r8 | @cil_ldelem_u1 | @cil_ldelem_u2 | @cil_ldelem_u4; + +@cil_write_array = @cil_stelem | @cil_stelem_ref | + @cil_stelem_i | @cil_stelem_i1 | @cil_stelem_i2 | @cil_stelem_i4 | @cil_stelem_i8 | + @cil_stelem_r4 | @cil_stelem_r8; + +@cil_throw_any = @cil_throw | @cil_rethrow; + +#keyset[impl, index] +cil_instruction( + unique int id: @cil_instruction, + int opcode: int ref, + int index: int ref, + int impl: @cil_method_implementation ref); + +cil_jump( + unique int instruction: @cil_jump ref, + int target: @cil_instruction ref); + +cil_access( + unique int instruction: @cil_instruction ref, + int target: @cil_accessible ref); + +cil_value( + unique int instruction: @cil_literal ref, + string value: string ref); + +#keyset[instruction, index] +cil_switch( + int instruction: @cil_switch ref, + int index: int ref, + int target: @cil_instruction ref); + +cil_instruction_location( + unique int id: @cil_instruction ref, + int loc: @location ref); + +cil_type_location( + int id: @cil_type ref, + int loc: @location ref); + +cil_method_location( + int id: @cil_method ref, + int loc: @location ref); + +@cil_namespace = @namespace; + +@cil_type_container = @cil_type | @cil_namespace | @cil_method; + +case @cil_type.kind of + 0 = @cil_valueorreftype +| 1 = @cil_typeparameter +| 2 = @cil_array_type +| 3 = @cil_pointer_type +| 4 = @cil_function_pointer_type +; + +cil_type( + unique int id: @cil_type, + string name: string ref, + int kind: int ref, + int parent: @cil_type_container ref, + int sourceDecl: @cil_type ref); + +cil_pointer_type( + unique int id: @cil_pointer_type ref, + int pointee: @cil_type ref); + +cil_array_type( + unique int id: @cil_array_type ref, + int element_type: @cil_type ref, + int rank: int ref); + +cil_function_pointer_return_type( + unique int id: @cil_function_pointer_type ref, + int return_type: @cil_type ref); + +cil_method( + unique int id: @cil_method, + string name: string ref, + int parent: @cil_type ref, + int return_type: @cil_type ref); + +cil_method_source_declaration( + unique int method: @cil_method ref, + int source: @cil_method ref); + +cil_method_implementation( + unique int id: @cil_method_implementation, + int method: @cil_method ref, + int location: @assembly ref); + +cil_implements( + int id: @cil_method ref, + int decl: @cil_method ref); + +#keyset[parent, name] +cil_field( + unique int id: @cil_field, + int parent: @cil_type ref, + string name: string ref, + int field_type: @cil_type ref); + +@cil_element = @cil_instruction | @cil_declaration | @cil_handler | @cil_attribute | @cil_namespace; +@cil_named_element = @cil_declaration | @cil_namespace; +@cil_declaration = @cil_variable | @cil_method | @cil_type | @cil_member; +@cil_accessible = @cil_declaration; +@cil_variable = @cil_field | @cil_stack_variable; +@cil_stack_variable = @cil_local_variable | @cil_parameter; +@cil_member = @cil_method | @cil_type | @cil_field | @cil_property | @cil_event; +@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field | @cil_function_pointer_type; +@cil_parameterizable = @cil_method | @cil_function_pointer_type; +@cil_has_type_annotation = @cil_stack_variable | @cil_property | @cil_field | @cil_method | @cil_function_pointer_type; + +#keyset[parameterizable, index] +cil_parameter( + unique int id: @cil_parameter, + int parameterizable: @cil_parameterizable ref, + int index: int ref, + int param_type: @cil_type ref); + +cil_parameter_in(unique int id: @cil_parameter ref); +cil_parameter_out(unique int id: @cil_parameter ref); + +cil_setter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +#keyset[id, modifier] +cil_custom_modifiers( + int id: @cil_custom_modifier_receiver ref, + int modifier: @cil_type ref, + int kind: int ref); // modreq: 1, modopt: 0 + +cil_type_annotation( + int id: @cil_has_type_annotation ref, + int annotation: int ref); + +cil_getter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +cil_adder(unique int event: @cil_event ref, + int method: @cil_method ref); + +cil_remover(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_raiser(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_property( + unique int id: @cil_property, + int parent: @cil_type ref, + string name: string ref, + int property_type: @cil_type ref); + +#keyset[parent, name] +cil_event(unique int id: @cil_event, + int parent: @cil_type ref, + string name: string ref, + int event_type: @cil_type ref); + +#keyset[impl, index] +cil_local_variable( + unique int id: @cil_local_variable, + int impl: @cil_method_implementation ref, + int index: int ref, + int var_type: @cil_type ref); + +cil_function_pointer_calling_conventions( + int id: @cil_function_pointer_type ref, + int kind: int ref); + +// CIL handlers (exception handlers etc). + +case @cil_handler.kind of + 0 = @cil_catch_handler +| 1 = @cil_filter_handler +| 2 = @cil_finally_handler +| 4 = @cil_fault_handler +; + +#keyset[impl, index] +cil_handler( + unique int id: @cil_handler, + int impl: @cil_method_implementation ref, + int index: int ref, + int kind: int ref, + int try_start: @cil_instruction ref, + int try_end: @cil_instruction ref, + int handler_start: @cil_instruction ref); + +cil_handler_filter( + unique int id: @cil_handler ref, + int filter_start: @cil_instruction ref); + +cil_handler_type( + unique int id: @cil_handler ref, + int catch_type: @cil_type ref); + +@cil_controlflow_node = @cil_entry_point | @cil_instruction; + +@cil_entry_point = @cil_method_implementation | @cil_handler; + +@cil_dataflow_node = @cil_instruction | @cil_variable | @cil_method; + +cil_method_stack_size( + unique int method: @cil_method_implementation ref, + int size: int ref); + +// CIL modifiers + +cil_public(int id: @cil_member ref); +cil_private(int id: @cil_member ref); +cil_protected(int id: @cil_member ref); +cil_internal(int id: @cil_member ref); +cil_static(int id: @cil_member ref); +cil_sealed(int id: @cil_member ref); +cil_virtual(int id: @cil_method ref); +cil_abstract(int id: @cil_member ref); +cil_class(int id: @cil_type ref); +cil_interface(int id: @cil_type ref); +cil_security(int id: @cil_member ref); +cil_requiresecobject(int id: @cil_method ref); +cil_specialname(int id: @cil_method ref); +cil_newslot(int id: @cil_method ref); + +cil_base_class(unique int id: @cil_type ref, int base: @cil_type ref); +cil_base_interface(int id: @cil_type ref, int base: @cil_type ref); +cil_enum_underlying_type(unique int id: @cil_type ref, int underlying: @cil_type ref); + +#keyset[unbound, index] +cil_type_parameter( + int unbound: @cil_member ref, + int index: int ref, + int param: @cil_typeparameter ref); + +#keyset[bound, index] +cil_type_argument( + int bound: @cil_member ref, + int index: int ref, + int t: @cil_type ref); + +// CIL type parameter constraints + +cil_typeparam_covariant(int tp: @cil_typeparameter ref); +cil_typeparam_contravariant(int tp: @cil_typeparameter ref); +cil_typeparam_class(int tp: @cil_typeparameter ref); +cil_typeparam_struct(int tp: @cil_typeparameter ref); +cil_typeparam_new(int tp: @cil_typeparameter ref); +cil_typeparam_constraint(int tp: @cil_typeparameter ref, int supertype: @cil_type ref); + +// CIL attributes + +cil_attribute( + unique int attributeid: @cil_attribute, + int element: @cil_declaration ref, + int constructor: @cil_method ref); + +#keyset[attribute_id, param] +cil_attribute_named_argument( + int attribute_id: @cil_attribute ref, + string param: string ref, + string value: string ref); + +#keyset[attribute_id, index] +cil_attribute_positional_argument( + int attribute_id: @cil_attribute ref, + int index: int ref, + string value: string ref); + + +// Common .Net data model covering both C# and CIL + +// Common elements +@dotnet_element = @element | @cil_element; +@dotnet_named_element = @named_element | @cil_named_element; +@dotnet_callable = @callable | @cil_method; +@dotnet_variable = @variable | @cil_variable; +@dotnet_field = @field | @cil_field; +@dotnet_parameter = @parameter | @cil_parameter; +@dotnet_declaration = @declaration | @cil_declaration; +@dotnet_member = @member | @cil_member; +@dotnet_event = @event | @cil_event; +@dotnet_property = @property | @cil_property | @indexer; +@dotnet_parameterizable = @parameterizable | @cil_parameterizable; + +// Common types +@dotnet_type = @type | @cil_type; +@dotnet_call = @call | @cil_call_any; +@dotnet_throw = @throw_element | @cil_throw_any; +@dotnet_valueorreftype = @cil_valueorreftype | @value_or_ref_type | @cil_array_type | @void_type; +@dotnet_typeparameter = @type_parameter | @cil_typeparameter; +@dotnet_array_type = @array_type | @cil_array_type; +@dotnet_pointer_type = @pointer_type | @cil_pointer_type; +@dotnet_type_parameter = @type_parameter | @cil_typeparameter; +@dotnet_generic = @dotnet_valueorreftype | @dotnet_callable; + +// Attributes +@dotnet_attribute = @attribute | @cil_attribute; + +// Expressions +@dotnet_expr = @expr | @cil_expr; + +// Literals +@dotnet_literal = @literal_expr | @cil_literal; +@dotnet_string_literal = @string_literal_expr | @cil_ldstr; +@dotnet_int_literal = @integer_literal_expr | @cil_ldc_i; +@dotnet_float_literal = @float_literal_expr | @cil_ldc_r; +@dotnet_null_literal = @null_literal_expr | @cil_ldnull; + +@metadata_entity = @cil_method | @cil_type | @cil_field | @cil_property | @field | @property | + @callable | @value_or_ref_type | @void_type; + +metadata_handle(int entity : @metadata_entity ref, int location: @assembly ref, int handle: int ref) diff --git a/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/params.ql b/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/params.ql new file mode 100644 index 00000000000..a4f2c61b65f --- /dev/null +++ b/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/params.ql @@ -0,0 +1,19 @@ +class Parameter extends @parameter { + string toString() { none() } +} + +class TypeOrRef extends @type_or_ref { + string toString() { none() } +} + +class Parameterizable extends @parameterizable { + string toString() { none() } +} + +from + Parameter p, string name, TypeOrRef typeId, int index, int mode, Parameterizable parentId, + Parameter unboundId, int updatedMode +where + params(p, name, typeId, index, mode, parentId, unboundId) and + if mode = 6 then updatedMode = 0 else updatedMode = mode +select p, name, typeId, index, updatedMode, parentId, unboundId diff --git a/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/semmlecode.csharp.dbscheme b/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/semmlecode.csharp.dbscheme new file mode 100644 index 00000000000..21ede72308c --- /dev/null +++ b/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/semmlecode.csharp.dbscheme @@ -0,0 +1,2099 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + unique int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, array = 3, this = 4 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); + +/* Common Intermediate Language - CIL */ + +case @cil_instruction.opcode of + 0 = @cil_nop +| 1 = @cil_break +| 2 = @cil_ldarg_0 +| 3 = @cil_ldarg_1 +| 4 = @cil_ldarg_2 +| 5 = @cil_ldarg_3 +| 6 = @cil_ldloc_0 +| 7 = @cil_ldloc_1 +| 8 = @cil_ldloc_2 +| 9 = @cil_ldloc_3 +| 10 = @cil_stloc_0 +| 11 = @cil_stloc_1 +| 12 = @cil_stloc_2 +| 13 = @cil_stloc_3 +| 14 = @cil_ldarg_s +| 15 = @cil_ldarga_s +| 16 = @cil_starg_s +| 17 = @cil_ldloc_s +| 18 = @cil_ldloca_s +| 19 = @cil_stloc_s +| 20 = @cil_ldnull +| 21 = @cil_ldc_i4_m1 +| 22 = @cil_ldc_i4_0 +| 23 = @cil_ldc_i4_1 +| 24 = @cil_ldc_i4_2 +| 25 = @cil_ldc_i4_3 +| 26 = @cil_ldc_i4_4 +| 27 = @cil_ldc_i4_5 +| 28 = @cil_ldc_i4_6 +| 29 = @cil_ldc_i4_7 +| 30 = @cil_ldc_i4_8 +| 31 = @cil_ldc_i4_s +| 32 = @cil_ldc_i4 +| 33 = @cil_ldc_i8 +| 34 = @cil_ldc_r4 +| 35 = @cil_ldc_r8 +| 37 = @cil_dup +| 38 = @cil_pop +| 39 = @cil_jmp +| 40 = @cil_call +| 41 = @cil_calli +| 42 = @cil_ret +| 43 = @cil_br_s +| 44 = @cil_brfalse_s +| 45 = @cil_brtrue_s +| 46 = @cil_beq_s +| 47 = @cil_bge_s +| 48 = @cil_bgt_s +| 49 = @cil_ble_s +| 50 = @cil_blt_s +| 51 = @cil_bne_un_s +| 52 = @cil_bge_un_s +| 53 = @cil_bgt_un_s +| 54 = @cil_ble_un_s +| 55 = @cil_blt_un_s +| 56 = @cil_br +| 57 = @cil_brfalse +| 58 = @cil_brtrue +| 59 = @cil_beq +| 60 = @cil_bge +| 61 = @cil_bgt +| 62 = @cil_ble +| 63 = @cil_blt +| 64 = @cil_bne_un +| 65 = @cil_bge_un +| 66 = @cil_bgt_un +| 67 = @cil_ble_un +| 68 = @cil_blt_un +| 69 = @cil_switch +| 70 = @cil_ldind_i1 +| 71 = @cil_ldind_u1 +| 72 = @cil_ldind_i2 +| 73 = @cil_ldind_u2 +| 74 = @cil_ldind_i4 +| 75 = @cil_ldind_u4 +| 76 = @cil_ldind_i8 +| 77 = @cil_ldind_i +| 78 = @cil_ldind_r4 +| 79 = @cil_ldind_r8 +| 80 = @cil_ldind_ref +| 81 = @cil_stind_ref +| 82 = @cil_stind_i1 +| 83 = @cil_stind_i2 +| 84 = @cil_stind_i4 +| 85 = @cil_stind_i8 +| 86 = @cil_stind_r4 +| 87 = @cil_stind_r8 +| 88 = @cil_add +| 89 = @cil_sub +| 90 = @cil_mul +| 91 = @cil_div +| 92 = @cil_div_un +| 93 = @cil_rem +| 94 = @cil_rem_un +| 95 = @cil_and +| 96 = @cil_or +| 97 = @cil_xor +| 98 = @cil_shl +| 99 = @cil_shr +| 100 = @cil_shr_un +| 101 = @cil_neg +| 102 = @cil_not +| 103 = @cil_conv_i1 +| 104 = @cil_conv_i2 +| 105 = @cil_conv_i4 +| 106 = @cil_conv_i8 +| 107 = @cil_conv_r4 +| 108 = @cil_conv_r8 +| 109 = @cil_conv_u4 +| 110 = @cil_conv_u8 +| 111 = @cil_callvirt +| 112 = @cil_cpobj +| 113 = @cil_ldobj +| 114 = @cil_ldstr +| 115 = @cil_newobj +| 116 = @cil_castclass +| 117 = @cil_isinst +| 118 = @cil_conv_r_un +| 121 = @cil_unbox +| 122 = @cil_throw +| 123 = @cil_ldfld +| 124 = @cil_ldflda +| 125 = @cil_stfld +| 126 = @cil_ldsfld +| 127 = @cil_ldsflda +| 128 = @cil_stsfld +| 129 = @cil_stobj +| 130 = @cil_conv_ovf_i1_un +| 131 = @cil_conv_ovf_i2_un +| 132 = @cil_conv_ovf_i4_un +| 133 = @cil_conv_ovf_i8_un +| 134 = @cil_conv_ovf_u1_un +| 135 = @cil_conv_ovf_u2_un +| 136 = @cil_conv_ovf_u4_un +| 137 = @cil_conv_ovf_u8_un +| 138 = @cil_conv_ovf_i_un +| 139 = @cil_conv_ovf_u_un +| 140 = @cil_box +| 141 = @cil_newarr +| 142 = @cil_ldlen +| 143 = @cil_ldelema +| 144 = @cil_ldelem_i1 +| 145 = @cil_ldelem_u1 +| 146 = @cil_ldelem_i2 +| 147 = @cil_ldelem_u2 +| 148 = @cil_ldelem_i4 +| 149 = @cil_ldelem_u4 +| 150 = @cil_ldelem_i8 +| 151 = @cil_ldelem_i +| 152 = @cil_ldelem_r4 +| 153 = @cil_ldelem_r8 +| 154 = @cil_ldelem_ref +| 155 = @cil_stelem_i +| 156 = @cil_stelem_i1 +| 157 = @cil_stelem_i2 +| 158 = @cil_stelem_i4 +| 159 = @cil_stelem_i8 +| 160 = @cil_stelem_r4 +| 161 = @cil_stelem_r8 +| 162 = @cil_stelem_ref +| 163 = @cil_ldelem +| 164 = @cil_stelem +| 165 = @cil_unbox_any +| 179 = @cil_conv_ovf_i1 +| 180 = @cil_conv_ovf_u1 +| 181 = @cil_conv_ovf_i2 +| 182 = @cil_conv_ovf_u2 +| 183 = @cil_conv_ovf_i4 +| 184 = @cil_conv_ovf_u4 +| 185 = @cil_conv_ovf_i8 +| 186 = @cil_conv_ovf_u8 +| 194 = @cil_refanyval +| 195 = @cil_ckinfinite +| 198 = @cil_mkrefany +| 208 = @cil_ldtoken +| 209 = @cil_conv_u2 +| 210 = @cil_conv_u1 +| 211 = @cil_conv_i +| 212 = @cil_conv_ovf_i +| 213 = @cil_conv_ovf_u +| 214 = @cil_add_ovf +| 215 = @cil_add_ovf_un +| 216 = @cil_mul_ovf +| 217 = @cil_mul_ovf_un +| 218 = @cil_sub_ovf +| 219 = @cil_sub_ovf_un +| 220 = @cil_endfinally +| 221 = @cil_leave +| 222 = @cil_leave_s +| 223 = @cil_stind_i +| 224 = @cil_conv_u +| 65024 = @cil_arglist +| 65025 = @cil_ceq +| 65026 = @cil_cgt +| 65027 = @cil_cgt_un +| 65028 = @cil_clt +| 65029 = @cil_clt_un +| 65030 = @cil_ldftn +| 65031 = @cil_ldvirtftn +| 65033 = @cil_ldarg +| 65034 = @cil_ldarga +| 65035 = @cil_starg +| 65036 = @cil_ldloc +| 65037 = @cil_ldloca +| 65038 = @cil_stloc +| 65039 = @cil_localloc +| 65041 = @cil_endfilter +| 65042 = @cil_unaligned +| 65043 = @cil_volatile +| 65044 = @cil_tail +| 65045 = @cil_initobj +| 65046 = @cil_constrained +| 65047 = @cil_cpblk +| 65048 = @cil_initblk +| 65050 = @cil_rethrow +| 65052 = @cil_sizeof +| 65053 = @cil_refanytype +| 65054 = @cil_readonly +; + +// CIL ignored instructions + +@cil_ignore = @cil_nop | @cil_break | @cil_volatile | @cil_unaligned; + +// CIL local/parameter/field access + +@cil_ldarg_any = @cil_ldarg_0 | @cil_ldarg_1 | @cil_ldarg_2 | @cil_ldarg_3 | @cil_ldarg_s | @cil_ldarga_s | @cil_ldarg | @cil_ldarga; +@cil_starg_any = @cil_starg | @cil_starg_s; + +@cil_ldloc_any = @cil_ldloc_0 | @cil_ldloc_1 | @cil_ldloc_2 | @cil_ldloc_3 | @cil_ldloc_s | @cil_ldloca_s | @cil_ldloc | @cil_ldloca; +@cil_stloc_any = @cil_stloc_0 | @cil_stloc_1 | @cil_stloc_2 | @cil_stloc_3 | @cil_stloc_s | @cil_stloc; + +@cil_ldfld_any = @cil_ldfld | @cil_ldsfld | @cil_ldsflda | @cil_ldflda; +@cil_stfld_any = @cil_stfld | @cil_stsfld; + +@cil_local_access = @cil_stloc_any | @cil_ldloc_any; +@cil_arg_access = @cil_starg_any | @cil_ldarg_any; +@cil_read_access = @cil_ldloc_any | @cil_ldarg_any | @cil_ldfld_any; +@cil_write_access = @cil_stloc_any | @cil_starg_any | @cil_stfld_any; + +@cil_stack_access = @cil_local_access | @cil_arg_access; +@cil_field_access = @cil_ldfld_any | @cil_stfld_any; + +@cil_access = @cil_read_access | @cil_write_access; + +// CIL constant/literal instructions + +@cil_ldc_i = @cil_ldc_i4_any | @cil_ldc_i8; + +@cil_ldc_i4_any = @cil_ldc_i4_m1 | @cil_ldc_i4_0 | @cil_ldc_i4_1 | @cil_ldc_i4_2 | @cil_ldc_i4_3 | + @cil_ldc_i4_4 | @cil_ldc_i4_5 | @cil_ldc_i4_6 | @cil_ldc_i4_7 | @cil_ldc_i4_8 | @cil_ldc_i4_s | @cil_ldc_i4; + +@cil_ldc_r = @cil_ldc_r4 | @cil_ldc_r8; + +@cil_literal = @cil_ldnull | @cil_ldc_i | @cil_ldc_r | @cil_ldstr; + +// Control flow + +@cil_conditional_jump = @cil_binary_jump | @cil_unary_jump; +@cil_binary_jump = @cil_beq_s | @cil_bge_s | @cil_bgt_s | @cil_ble_s | @cil_blt_s | + @cil_bne_un_s | @cil_bge_un_s | @cil_bgt_un_s | @cil_ble_un_s | @cil_blt_un_s | + @cil_beq | @cil_bge | @cil_bgt | @cil_ble | @cil_blt | + @cil_bne_un | @cil_bge_un | @cil_bgt_un | @cil_ble_un | @cil_blt_un; +@cil_unary_jump = @cil_brfalse_s | @cil_brtrue_s | @cil_brfalse | @cil_brtrue | @cil_switch; +@cil_unconditional_jump = @cil_br | @cil_br_s | @cil_leave_any; +@cil_leave_any = @cil_leave | @cil_leave_s; +@cil_jump = @cil_unconditional_jump | @cil_conditional_jump; + +// CIL call instructions + +@cil_call_any = @cil_jmp | @cil_call | @cil_calli | @cil_tail | @cil_callvirt | @cil_newobj; + +// CIL expression instructions + +@cil_expr = @cil_literal | @cil_binary_expr | @cil_unary_expr | @cil_call_any | @cil_read_access | + @cil_newarr | @cil_ldtoken | @cil_sizeof | + @cil_ldftn | @cil_ldvirtftn | @cil_localloc | @cil_mkrefany | @cil_refanytype | @cil_arglist | @cil_dup; + +@cil_unary_expr = + @cil_conversion_operation | @cil_unary_arithmetic_operation | @cil_unary_bitwise_operation| + @cil_ldlen | @cil_isinst | @cil_box | @cil_ldobj | @cil_castclass | @cil_unbox_any | + @cil_ldind | @cil_unbox; + +@cil_conversion_operation = + @cil_conv_i1 | @cil_conv_i2 | @cil_conv_i4 | @cil_conv_i8 | + @cil_conv_u1 | @cil_conv_u2 | @cil_conv_u4 | @cil_conv_u8 | + @cil_conv_ovf_i | @cil_conv_ovf_i_un | @cil_conv_ovf_i1 | @cil_conv_ovf_i1_un | + @cil_conv_ovf_i2 | @cil_conv_ovf_i2_un | @cil_conv_ovf_i4 | @cil_conv_ovf_i4_un | + @cil_conv_ovf_i8 | @cil_conv_ovf_i8_un | @cil_conv_ovf_u | @cil_conv_ovf_u_un | + @cil_conv_ovf_u1 | @cil_conv_ovf_u1_un | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_ovf_u4 | @cil_conv_ovf_u4_un | @cil_conv_ovf_u8 | @cil_conv_ovf_u8_un | + @cil_conv_r4 | @cil_conv_r8 | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_i | @cil_conv_u | @cil_conv_r_un; + +@cil_ldind = @cil_ldind_i | @cil_ldind_i1 | @cil_ldind_i2 | @cil_ldind_i4 | @cil_ldind_i8 | + @cil_ldind_r4 | @cil_ldind_r8 | @cil_ldind_ref | @cil_ldind_u1 | @cil_ldind_u2 | @cil_ldind_u4; + +@cil_stind = @cil_stind_i | @cil_stind_i1 | @cil_stind_i2 | @cil_stind_i4 | @cil_stind_i8 | + @cil_stind_r4 | @cil_stind_r8 | @cil_stind_ref; + +@cil_bitwise_operation = @cil_binary_bitwise_operation | @cil_unary_bitwise_operation; + +@cil_binary_bitwise_operation = @cil_and | @cil_or | @cil_xor | @cil_shr | @cil_shr | @cil_shr_un | @cil_shl; + +@cil_binary_arithmetic_operation = @cil_add | @cil_sub | @cil_mul | @cil_div | @cil_div_un | + @cil_rem | @cil_rem_un | @cil_add_ovf | @cil_add_ovf_un | @cil_mul_ovf | @cil_mul_ovf_un | + @cil_sub_ovf | @cil_sub_ovf_un; + +@cil_unary_bitwise_operation = @cil_not; + +@cil_binary_expr = @cil_binary_arithmetic_operation | @cil_binary_bitwise_operation | @cil_read_array | @cil_comparison_operation; + +@cil_unary_arithmetic_operation = @cil_neg; + +@cil_comparison_operation = @cil_cgt_un | @cil_ceq | @cil_cgt | @cil_clt | @cil_clt_un; + +// Elements that retrieve an address of something +@cil_read_ref = @cil_ldloca_s | @cil_ldarga_s | @cil_ldflda | @cil_ldsflda | @cil_ldelema; + +// CIL array instructions + +@cil_read_array = + @cil_ldelem | @cil_ldelema | @cil_ldelem_i1 | @cil_ldelem_ref | @cil_ldelem_i | + @cil_ldelem_i1 | @cil_ldelem_i2 | @cil_ldelem_i4 | @cil_ldelem_i8 | @cil_ldelem_r4 | + @cil_ldelem_r8 | @cil_ldelem_u1 | @cil_ldelem_u2 | @cil_ldelem_u4; + +@cil_write_array = @cil_stelem | @cil_stelem_ref | + @cil_stelem_i | @cil_stelem_i1 | @cil_stelem_i2 | @cil_stelem_i4 | @cil_stelem_i8 | + @cil_stelem_r4 | @cil_stelem_r8; + +@cil_throw_any = @cil_throw | @cil_rethrow; + +#keyset[impl, index] +cil_instruction( + unique int id: @cil_instruction, + int opcode: int ref, + int index: int ref, + int impl: @cil_method_implementation ref); + +cil_jump( + unique int instruction: @cil_jump ref, + int target: @cil_instruction ref); + +cil_access( + unique int instruction: @cil_instruction ref, + int target: @cil_accessible ref); + +cil_value( + unique int instruction: @cil_literal ref, + string value: string ref); + +#keyset[instruction, index] +cil_switch( + int instruction: @cil_switch ref, + int index: int ref, + int target: @cil_instruction ref); + +cil_instruction_location( + unique int id: @cil_instruction ref, + int loc: @location ref); + +cil_type_location( + int id: @cil_type ref, + int loc: @location ref); + +cil_method_location( + int id: @cil_method ref, + int loc: @location ref); + +@cil_namespace = @namespace; + +@cil_type_container = @cil_type | @cil_namespace | @cil_method; + +case @cil_type.kind of + 0 = @cil_valueorreftype +| 1 = @cil_typeparameter +| 2 = @cil_array_type +| 3 = @cil_pointer_type +| 4 = @cil_function_pointer_type +; + +cil_type( + unique int id: @cil_type, + string name: string ref, + int kind: int ref, + int parent: @cil_type_container ref, + int sourceDecl: @cil_type ref); + +cil_pointer_type( + unique int id: @cil_pointer_type ref, + int pointee: @cil_type ref); + +cil_array_type( + unique int id: @cil_array_type ref, + int element_type: @cil_type ref, + int rank: int ref); + +cil_function_pointer_return_type( + unique int id: @cil_function_pointer_type ref, + int return_type: @cil_type ref); + +cil_method( + unique int id: @cil_method, + string name: string ref, + int parent: @cil_type ref, + int return_type: @cil_type ref); + +cil_method_source_declaration( + unique int method: @cil_method ref, + int source: @cil_method ref); + +cil_method_implementation( + unique int id: @cil_method_implementation, + int method: @cil_method ref, + int location: @assembly ref); + +cil_implements( + int id: @cil_method ref, + int decl: @cil_method ref); + +#keyset[parent, name] +cil_field( + unique int id: @cil_field, + int parent: @cil_type ref, + string name: string ref, + int field_type: @cil_type ref); + +@cil_element = @cil_instruction | @cil_declaration | @cil_handler | @cil_attribute | @cil_namespace; +@cil_named_element = @cil_declaration | @cil_namespace; +@cil_declaration = @cil_variable | @cil_method | @cil_type | @cil_member; +@cil_accessible = @cil_declaration; +@cil_variable = @cil_field | @cil_stack_variable; +@cil_stack_variable = @cil_local_variable | @cil_parameter; +@cil_member = @cil_method | @cil_type | @cil_field | @cil_property | @cil_event; +@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field | @cil_function_pointer_type; +@cil_parameterizable = @cil_method | @cil_function_pointer_type; +@cil_has_type_annotation = @cil_stack_variable | @cil_property | @cil_field | @cil_method | @cil_function_pointer_type; + +#keyset[parameterizable, index] +cil_parameter( + unique int id: @cil_parameter, + int parameterizable: @cil_parameterizable ref, + int index: int ref, + int param_type: @cil_type ref); + +cil_parameter_in(unique int id: @cil_parameter ref); +cil_parameter_out(unique int id: @cil_parameter ref); + +cil_setter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +#keyset[id, modifier] +cil_custom_modifiers( + int id: @cil_custom_modifier_receiver ref, + int modifier: @cil_type ref, + int kind: int ref); // modreq: 1, modopt: 0 + +cil_type_annotation( + int id: @cil_has_type_annotation ref, + int annotation: int ref); + +cil_getter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +cil_adder(unique int event: @cil_event ref, + int method: @cil_method ref); + +cil_remover(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_raiser(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_property( + unique int id: @cil_property, + int parent: @cil_type ref, + string name: string ref, + int property_type: @cil_type ref); + +#keyset[parent, name] +cil_event(unique int id: @cil_event, + int parent: @cil_type ref, + string name: string ref, + int event_type: @cil_type ref); + +#keyset[impl, index] +cil_local_variable( + unique int id: @cil_local_variable, + int impl: @cil_method_implementation ref, + int index: int ref, + int var_type: @cil_type ref); + +cil_function_pointer_calling_conventions( + int id: @cil_function_pointer_type ref, + int kind: int ref); + +// CIL handlers (exception handlers etc). + +case @cil_handler.kind of + 0 = @cil_catch_handler +| 1 = @cil_filter_handler +| 2 = @cil_finally_handler +| 4 = @cil_fault_handler +; + +#keyset[impl, index] +cil_handler( + unique int id: @cil_handler, + int impl: @cil_method_implementation ref, + int index: int ref, + int kind: int ref, + int try_start: @cil_instruction ref, + int try_end: @cil_instruction ref, + int handler_start: @cil_instruction ref); + +cil_handler_filter( + unique int id: @cil_handler ref, + int filter_start: @cil_instruction ref); + +cil_handler_type( + unique int id: @cil_handler ref, + int catch_type: @cil_type ref); + +@cil_controlflow_node = @cil_entry_point | @cil_instruction; + +@cil_entry_point = @cil_method_implementation | @cil_handler; + +@cil_dataflow_node = @cil_instruction | @cil_variable | @cil_method; + +cil_method_stack_size( + unique int method: @cil_method_implementation ref, + int size: int ref); + +// CIL modifiers + +cil_public(int id: @cil_member ref); +cil_private(int id: @cil_member ref); +cil_protected(int id: @cil_member ref); +cil_internal(int id: @cil_member ref); +cil_static(int id: @cil_member ref); +cil_sealed(int id: @cil_member ref); +cil_virtual(int id: @cil_method ref); +cil_abstract(int id: @cil_member ref); +cil_class(int id: @cil_type ref); +cil_interface(int id: @cil_type ref); +cil_security(int id: @cil_member ref); +cil_requiresecobject(int id: @cil_method ref); +cil_specialname(int id: @cil_method ref); +cil_newslot(int id: @cil_method ref); + +cil_base_class(unique int id: @cil_type ref, int base: @cil_type ref); +cil_base_interface(int id: @cil_type ref, int base: @cil_type ref); +cil_enum_underlying_type(unique int id: @cil_type ref, int underlying: @cil_type ref); + +#keyset[unbound, index] +cil_type_parameter( + int unbound: @cil_member ref, + int index: int ref, + int param: @cil_typeparameter ref); + +#keyset[bound, index] +cil_type_argument( + int bound: @cil_member ref, + int index: int ref, + int t: @cil_type ref); + +// CIL type parameter constraints + +cil_typeparam_covariant(int tp: @cil_typeparameter ref); +cil_typeparam_contravariant(int tp: @cil_typeparameter ref); +cil_typeparam_class(int tp: @cil_typeparameter ref); +cil_typeparam_struct(int tp: @cil_typeparameter ref); +cil_typeparam_new(int tp: @cil_typeparameter ref); +cil_typeparam_constraint(int tp: @cil_typeparameter ref, int supertype: @cil_type ref); + +// CIL attributes + +cil_attribute( + unique int attributeid: @cil_attribute, + int element: @cil_declaration ref, + int constructor: @cil_method ref); + +#keyset[attribute_id, param] +cil_attribute_named_argument( + int attribute_id: @cil_attribute ref, + string param: string ref, + string value: string ref); + +#keyset[attribute_id, index] +cil_attribute_positional_argument( + int attribute_id: @cil_attribute ref, + int index: int ref, + string value: string ref); + + +// Common .Net data model covering both C# and CIL + +// Common elements +@dotnet_element = @element | @cil_element; +@dotnet_named_element = @named_element | @cil_named_element; +@dotnet_callable = @callable | @cil_method; +@dotnet_variable = @variable | @cil_variable; +@dotnet_field = @field | @cil_field; +@dotnet_parameter = @parameter | @cil_parameter; +@dotnet_declaration = @declaration | @cil_declaration; +@dotnet_member = @member | @cil_member; +@dotnet_event = @event | @cil_event; +@dotnet_property = @property | @cil_property | @indexer; +@dotnet_parameterizable = @parameterizable | @cil_parameterizable; + +// Common types +@dotnet_type = @type | @cil_type; +@dotnet_call = @call | @cil_call_any; +@dotnet_throw = @throw_element | @cil_throw_any; +@dotnet_valueorreftype = @cil_valueorreftype | @value_or_ref_type | @cil_array_type | @void_type; +@dotnet_typeparameter = @type_parameter | @cil_typeparameter; +@dotnet_array_type = @array_type | @cil_array_type; +@dotnet_pointer_type = @pointer_type | @cil_pointer_type; +@dotnet_type_parameter = @type_parameter | @cil_typeparameter; +@dotnet_generic = @dotnet_valueorreftype | @dotnet_callable; + +// Attributes +@dotnet_attribute = @attribute | @cil_attribute; + +// Expressions +@dotnet_expr = @expr | @cil_expr; + +// Literals +@dotnet_literal = @literal_expr | @cil_literal; +@dotnet_string_literal = @string_literal_expr | @cil_ldstr; +@dotnet_int_literal = @integer_literal_expr | @cil_ldc_i; +@dotnet_float_literal = @float_literal_expr | @cil_ldc_r; +@dotnet_null_literal = @null_literal_expr | @cil_ldnull; + +@metadata_entity = @cil_method | @cil_type | @cil_field | @cil_property | @field | @property | + @callable | @value_or_ref_type | @void_type; + +metadata_handle(int entity : @metadata_entity ref, int location: @assembly ref, int handle: int ref) diff --git a/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/upgrade.properties b/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/upgrade.properties new file mode 100644 index 00000000000..d17d64146a7 --- /dev/null +++ b/csharp/downgrades/fd04e45710e1988076801608abffdfa013b680fc/upgrade.properties @@ -0,0 +1,3 @@ +description: Extract `ref readonly` parameters as having `mode` 0 in the params table. +compatibility: full +params.rel: run params.qlo diff --git a/csharp/extractor/Semmle.Extraction.CIL.Driver/Program.cs b/csharp/extractor/Semmle.Extraction.CIL.Driver/Program.cs index 8fcc6fefcb3..2009fe1c94f 100644 --- a/csharp/extractor/Semmle.Extraction.CIL.Driver/Program.cs +++ b/csharp/extractor/Semmle.Extraction.CIL.Driver/Program.cs @@ -46,7 +46,7 @@ namespace Semmle.Extraction.CIL.Driver .ToArray(); foreach (var missingRef in options.MissingReferences) - logger.Log(Severity.Info, " Missing assembly " + missingRef); + logger.LogInfo(" Missing assembly " + missingRef); var sw = new Stopwatch(); sw.Start(); diff --git a/csharp/extractor/Semmle.Extraction.CIL/Analyser.cs b/csharp/extractor/Semmle.Extraction.CIL/Analyser.cs index 4d7fa77c548..50288aadd94 100644 --- a/csharp/extractor/Semmle.Extraction.CIL/Analyser.cs +++ b/csharp/extractor/Semmle.Extraction.CIL/Analyser.cs @@ -45,7 +45,7 @@ namespace Semmle.Extraction.CIL } catch (Exception ex) // lgtm[cs/catch-of-all-exceptions] { - logger.Log(Severity.Error, string.Format("Exception extracting {0}: {1}", assemblyPath, ex)); + logger.LogError(string.Format("Exception extracting {0}: {1}", assemblyPath, ex)); } } } diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs index e3c64d468c1..724ae8f69fd 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs @@ -7,6 +7,7 @@ using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; + using Semmle.Util; using Semmle.Util.Logging; @@ -27,8 +28,8 @@ namespace Semmle.Extraction.CSharp.DependencyFetching private readonly List generatedSources; private int dotnetFrameworkVersionVariantCount = 0; private int conflictedReferences = 0; - private readonly IDependencyOptions options; private readonly DirectoryInfo sourceDir; + private string? dotnetPath; private readonly IDotNet dotnet; private readonly FileContent fileContent; private readonly TemporaryDirectory packageDirectory; @@ -39,17 +40,17 @@ namespace Semmle.Extraction.CSharp.DependencyFetching private readonly Lazy runtimeLazy; private Runtime Runtime => runtimeLazy.Value; + private readonly int threads = EnvironmentVariables.GetDefaultNumberOfThreads(); /// /// Performs C# dependency fetching. /// /// Dependency fetching options /// Logger for dependency fetching progress. - public DependencyManager(string srcDir, IDependencyOptions options, ILogger logger) + public DependencyManager(string srcDir, ILogger logger) { var startTime = DateTime.Now; - this.options = options; this.logger = logger; this.sourceDir = new DirectoryInfo(srcDir); @@ -59,17 +60,6 @@ namespace Semmle.Extraction.CSharp.DependencyFetching tempWorkingDirectory = new TemporaryDirectory(FileUtils.GetTemporaryWorkingDirectory(out cleanupTempWorkingDirectory)); - try - { - this.dotnet = DotNet.Make(options, logger, tempWorkingDirectory); - runtimeLazy = new Lazy(() => new Runtime(dotnet, logger)); - } - catch - { - logger.LogError("Missing dotnet CLI"); - throw; - } - logger.LogInfo($"Finding files in {srcDir}..."); var allFiles = GetAllFiles().ToList(); @@ -85,6 +75,33 @@ namespace Semmle.Extraction.CSharp.DependencyFetching logger.LogInfo($"Found {allFiles.Count} files, {nonGeneratedSources.Count} source files, {allProjects.Count} project files, {allSolutions.Count} solution files, {dllPaths.Count} DLLs."); + void startCallback(string s, bool silent) + { + logger.Log(silent ? Severity.Debug : Severity.Info, $"\nRunning {s}"); + } + + void exitCallback(int ret, string msg, bool silent) + { + logger.Log(silent ? Severity.Debug : Severity.Info, $"Exit code {ret}{(string.IsNullOrEmpty(msg) ? "" : $": {msg}")}"); + } + + DotNet.WithDotNet(SystemBuildActions.Instance, logger, smallNonBinaryFiles, tempWorkingDirectory.ToString(), shouldCleanUp: false, ensureDotNetAvailable: true, version: null, installDir => + { + this.dotnetPath = installDir; + return BuildScript.Success; + }).Run(SystemBuildActions.Instance, startCallback, exitCallback); + + try + { + this.dotnet = DotNet.Make(logger, dotnetPath, tempWorkingDirectory); + runtimeLazy = new Lazy(() => new Runtime(dotnet)); + } + catch + { + logger.LogError("Missing dotnet CLI"); + throw; + } + RestoreNugetPackages(allNonBinaryFiles, allProjects, allSolutions, dllPaths); // Find DLLs in the .Net / Asp.Net Framework // This needs to come after the nuget restore, because the nuget restore might fetch the .NET Core/Framework reference assemblies. @@ -570,15 +587,13 @@ namespace Semmle.Extraction.CSharp.DependencyFetching } } - public DependencyManager(string srcDir) : this(srcDir, DependencyOptions.Default, new ConsoleLogger(Verbosity.Info, logThreadId: true)) { } - private IEnumerable GetAllFiles() { IEnumerable files = sourceDir.GetFiles("*.*", new EnumerationOptions { RecurseSubdirectories = true }); - if (options.DotNetPath != null) + if (dotnetPath != null) { - files = files.Where(f => !f.FullName.StartsWith(options.DotNetPath, StringComparison.OrdinalIgnoreCase)); + files = files.Where(f => !f.FullName.StartsWith(dotnetPath, StringComparison.OrdinalIgnoreCase)); } files = files.Where(f => @@ -590,12 +605,12 @@ namespace Semmle.Extraction.CSharp.DependencyFetching return true; } - logger.Log(Severity.Warning, $"File {f.FullName} could not be processed."); + logger.LogWarning($"File {f.FullName} could not be processed."); return false; } catch (Exception ex) { - logger.Log(Severity.Warning, $"File {f.FullName} could not be processed: {ex.Message}"); + logger.LogWarning($"File {f.FullName} could not be processed: {ex.Message}"); return false; } }); @@ -651,7 +666,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching } catch (AssemblyLoadException) { - logger.Log(Severity.Warning, $"Could not load assembly information from {usedReference.Key}"); + logger.LogWarning($"Could not load assembly information from {usedReference.Key}"); } } @@ -738,7 +753,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching private void AnalyseSolutions(IEnumerable solutions) { - Parallel.ForEach(solutions, new ParallelOptions { MaxDegreeOfParallelism = options.Threads }, solutionFile => + Parallel.ForEach(solutions, new ParallelOptions { MaxDegreeOfParallelism = threads }, solutionFile => { try { @@ -799,6 +814,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching private IEnumerable RestoreSolutions(IEnumerable solutions, out IEnumerable assets) { var successCount = 0; + var nugetSourceFailures = 0; var assetFiles = new List(); var projects = solutions.SelectMany(solution => { @@ -808,11 +824,16 @@ namespace Semmle.Extraction.CSharp.DependencyFetching { successCount++; } + if (res.HasNugetPackageSourceError) + { + nugetSourceFailures++; + } assetFiles.AddRange(res.AssetsFilePaths); return res.RestoredProjects; }).ToList(); assets = assetFiles; CompilationInfos.Add(("Successfully restored solution files", successCount.ToString())); + CompilationInfos.Add(("Failed solution restore with package source error", nugetSourceFailures.ToString())); CompilationInfos.Add(("Restored projects through solution files", projects.Count.ToString())); return projects; } @@ -826,9 +847,10 @@ namespace Semmle.Extraction.CSharp.DependencyFetching private void RestoreProjects(IEnumerable projects, out IEnumerable assets) { var successCount = 0; + var nugetSourceFailures = 0; var assetFiles = new List(); var sync = new object(); - Parallel.ForEach(projects, new ParallelOptions { MaxDegreeOfParallelism = options.Threads }, project => + Parallel.ForEach(projects, new ParallelOptions { MaxDegreeOfParallelism = threads }, project => { logger.LogInfo($"Restoring project {project}..."); var res = dotnet.Restore(new(project, packageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true)); @@ -838,11 +860,16 @@ namespace Semmle.Extraction.CSharp.DependencyFetching { successCount++; } + if (res.HasNugetPackageSourceError) + { + nugetSourceFailures++; + } assetFiles.AddRange(res.AssetsFilePaths); } }); assets = assetFiles; CompilationInfos.Add(("Successfully restored project files", successCount.ToString())); + CompilationInfos.Add(("Failed project restore with package source error", nugetSourceFailures.ToString())); } [GeneratedRegex(@"^(.+)\.(\d+\.\d+\.\d+(-(.+))?)$", RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.Singleline)] @@ -928,7 +955,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching var successCount = 0; var sync = new object(); - Parallel.ForEach(notYetDownloadedPackages, new ParallelOptions { MaxDegreeOfParallelism = options.Threads }, package => + Parallel.ForEach(notYetDownloadedPackages, new ParallelOptions { MaxDegreeOfParallelism = threads }, package => { var success = TryRestorePackageManually(package.Name, nugetConfig, package.PackageReferenceSource); if (!success) diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyOptions.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyOptions.cs deleted file mode 100644 index 59e5c54097c..00000000000 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyOptions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using Semmle.Util; - -namespace Semmle.Extraction.CSharp.DependencyFetching -{ - /// - /// Dependency fetching related options. - /// - public interface IDependencyOptions - { - /// - /// The number of threads to use. - /// - int Threads { get; } - - /// - /// The path to the local ".dotnet" directory, if any. - /// - string? DotNetPath { get; } - } - - public class DependencyOptions : IDependencyOptions - { - public static IDependencyOptions Default => new DependencyOptions(); - - public int Threads { get; set; } = EnvironmentVariables.GetDefaultNumberOfThreads(); - - public string? DotNetPath { get; set; } = null; - } -} diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs index 37c028920a8..41a117ed5d8 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs @@ -2,7 +2,9 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text.RegularExpressions; + +using Newtonsoft.Json.Linq; + using Semmle.Util; using Semmle.Util.Logging; @@ -11,29 +13,26 @@ namespace Semmle.Extraction.CSharp.DependencyFetching /// /// Utilities to run the "dotnet" command. /// - internal partial class DotNet : IDotNet + public partial class DotNet : IDotNet { private readonly IDotNetCliInvoker dotnetCliInvoker; - private readonly ILogger logger; private readonly TemporaryDirectory? tempWorkingDirectory; private DotNet(IDotNetCliInvoker dotnetCliInvoker, ILogger logger, TemporaryDirectory? tempWorkingDirectory = null) { - this.logger = logger; this.tempWorkingDirectory = tempWorkingDirectory; this.dotnetCliInvoker = dotnetCliInvoker; Info(); } - private DotNet(IDependencyOptions options, ILogger logger, TemporaryDirectory tempWorkingDirectory) : this(new DotNetCliInvoker(logger, Path.Combine(options.DotNetPath ?? string.Empty, "dotnet")), logger, tempWorkingDirectory) { } + private DotNet(ILogger logger, string? dotNetPath, TemporaryDirectory tempWorkingDirectory) : this(new DotNetCliInvoker(logger, Path.Combine(dotNetPath ?? string.Empty, "dotnet")), logger, tempWorkingDirectory) { } internal static IDotNet Make(IDotNetCliInvoker dotnetCliInvoker, ILogger logger) => new DotNet(dotnetCliInvoker, logger); - public static IDotNet Make(IDependencyOptions options, ILogger logger, TemporaryDirectory tempWorkingDirectory) => new DotNet(options, logger, tempWorkingDirectory); + public static IDotNet Make(ILogger logger, string? dotNetPath, TemporaryDirectory tempWorkingDirectory) => new DotNet(logger, dotNetPath, tempWorkingDirectory); private void Info() { - // TODO: make sure the below `dotnet` version is matching the one specified in global.json var res = dotnetCliInvoker.RunCommand("--info"); if (!res) { @@ -108,5 +107,196 @@ namespace Semmle.Extraction.CSharp.DependencyFetching var args = $"exec {execArgs}"; return dotnetCliInvoker.RunCommand(args); } + + // The version number should be kept in sync with the version .NET version used for building the application. + public const string LatestDotNetSdkVersion = "8.0.101"; + + /// + /// Returns a script for downloading relevant versions of the + /// .NET SDK. The SDK(s) will be installed at installDir + /// (provided that the script succeeds). + /// + private static BuildScript DownloadDotNet(IBuildActions actions, ILogger logger, IEnumerable files, string tempWorkingDirectory, bool shouldCleanUp, string installDir, string? version, bool ensureDotNetAvailable) + { + if (!string.IsNullOrEmpty(version)) + // Specific version requested + return DownloadDotNetVersion(actions, logger, tempWorkingDirectory, shouldCleanUp, installDir, [version]); + + // Download versions mentioned in `global.json` files + // See https://docs.microsoft.com/en-us/dotnet/core/tools/global-json + var versions = new List(); + + foreach (var path in files.Where(p => p.EndsWith("global.json", StringComparison.Ordinal))) + { + try + { + var o = JObject.Parse(File.ReadAllText(path)); + var v = (string?)o?["sdk"]?["version"]; + if (v is not null) + { + versions.Add(v); + } + } + catch + { + // not a valid `global.json` file + logger.LogInfo($"Couldn't find .NET SDK version in '{path}'."); + continue; + } + } + + if (versions.Count > 0) + { + return DownloadDotNetVersion(actions, logger, tempWorkingDirectory, shouldCleanUp, installDir, versions); + } + + if (ensureDotNetAvailable) + { + return DownloadDotNetVersion(actions, logger, tempWorkingDirectory, shouldCleanUp, installDir, [LatestDotNetSdkVersion], needExactVersion: false); + } + + return BuildScript.Failure; + } + + /// + /// Returns a script for downloading specific .NET SDK versions, if the + /// versions are not already installed. + /// + /// See https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script. + /// + private static BuildScript DownloadDotNetVersion(IBuildActions actions, ILogger logger, string tempWorkingDirectory, bool shouldCleanUp, string path, IEnumerable versions, bool needExactVersion = true) + { + if (!versions.Any()) + { + logger.LogInfo("No .NET SDK versions requested."); + return BuildScript.Failure; + } + + return BuildScript.Bind(GetInstalledSdksScript(actions), (sdks, sdksRet) => + { + if ( + needExactVersion && + sdksRet == 0 && + // quadratic; should be OK, given that both `version` and `sdks` are expected to be small + versions.All(version => sdks.Any(sdk => sdk.StartsWith(version + " ", StringComparison.Ordinal)))) + { + // The requested SDKs are already installed, so no need to reinstall + return BuildScript.Failure; + } + else if (!needExactVersion && sdksRet == 0 && sdks.Count > 0) + { + // there's at least one SDK installed, so no need to reinstall + return BuildScript.Failure; + } + else if (!needExactVersion && sdksRet != 0) + { + logger.LogInfo("No .NET SDK found."); + } + + BuildScript prelude; + BuildScript postlude; + Func getInstall; + + if (actions.IsWindows()) + { + prelude = BuildScript.Success; + postlude = BuildScript.Success; + + getInstall = version => + { + var psCommand = $"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version {version} -InstallDir {path}"; + + BuildScript GetInstall(string pwsh) => + new CommandBuilder(actions). + RunCommand(pwsh). + Argument("-NoProfile"). + Argument("-ExecutionPolicy"). + Argument("unrestricted"). + Argument("-Command"). + Argument("\"" + psCommand + "\""). + Script; + + return GetInstall("pwsh") | GetInstall("powershell"); + }; + } + else + { + var dotnetInstallPath = actions.PathCombine(tempWorkingDirectory, ".dotnet", "dotnet-install.sh"); + + var downloadDotNetInstallSh = BuildScript.DownloadFile( + "https://dot.net/v1/dotnet-install.sh", + dotnetInstallPath, + e => logger.LogWarning($"Failed to download 'dotnet-install.sh': {e.Message}")); + + var chmod = new CommandBuilder(actions). + RunCommand("chmod"). + Argument("u+x"). + Argument(dotnetInstallPath); + + prelude = downloadDotNetInstallSh & chmod.Script; + postlude = shouldCleanUp ? BuildScript.DeleteFile(dotnetInstallPath) : BuildScript.Success; + + getInstall = version => new CommandBuilder(actions). + RunCommand(dotnetInstallPath). + Argument("--channel"). + Argument("release"). + Argument("--version"). + Argument(version). + Argument("--install-dir"). + Argument(path).Script; + } + + var installScript = prelude & BuildScript.Failure; + + var attempted = new HashSet(); + foreach (var version in versions) + { + if (!attempted.Add(version)) + continue; + + installScript = BuildScript.Bind(installScript, combinedExit => + { + logger.LogInfo($"Attempting to download .NET {version}"); + + // When there are multiple versions requested, we want to try to fetch them all, reporting + // a successful exit code when at least one of them succeeds + return combinedExit != 0 ? getInstall(version) : BuildScript.Bind(getInstall(version), _ => BuildScript.Success); + }); + } + + return installScript & postlude; + }); + } + + private static BuildScript GetInstalledSdksScript(IBuildActions actions) + { + var listSdks = new CommandBuilder(actions, silent: true). + RunCommand("dotnet"). + Argument("--list-sdks"); + return listSdks.Script; + } + + /// + /// Returns a script that attempts to download relevant version(s) of the + /// .NET SDK, followed by running the script generated by . + /// + /// The argument to is the path to the directory in which the + /// .NET SDK(s) were installed. + /// + public static BuildScript WithDotNet(IBuildActions actions, ILogger logger, IEnumerable files, string tempWorkingDirectory, bool shouldCleanUp, bool ensureDotNetAvailable, string? version, Func f) + { + var installDir = actions.PathCombine(tempWorkingDirectory, ".dotnet"); + var installScript = DownloadDotNet(actions, logger, files, tempWorkingDirectory, shouldCleanUp, installDir, version, ensureDotNetAvailable); + return BuildScript.Bind(installScript, installed => + { + if (installed != 0) + { + // The .NET SDK was not installed, either because the installation failed or because it was already installed. + installDir = null; + } + + return f(installDir); + }); + } } -} +} \ No newline at end of file diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FilePathFilter.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FilePathFilter.cs index d1a3ed011d4..1a1e9934e8c 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FilePathFilter.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FilePathFilter.cs @@ -55,12 +55,12 @@ namespace Semmle.Extraction.CSharp.DependencyFetching } else { - logger.Log(Severity.Info, $"Invalid filter: {filter}"); + logger.LogInfo($"Invalid filter: {filter}"); continue; } var regex = new FilePattern(filterText).RegexPattern; - logger.Log(Severity.Info, $"Filtering {(include ? "in" : "out")} files matching '{regex}'. Original glob filter: '{filter}'"); + logger.LogInfo($"Filtering {(include ? "in" : "out")} files matching '{regex}'. Original glob filter: '{filter}'"); pathFilters.Add(new PathFilter(new Regex(regex, RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.Singleline), include)); } @@ -91,7 +91,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching if (!include) { - logger.Log(Severity.Info, $"Excluding '{f.FileInfo.FullName}'"); + logger.LogInfo($"Excluding '{f.FileInfo.FullName}'"); } return include; diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNet.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNet.cs index 5904248b34f..d66135c1644 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNet.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNet.cs @@ -5,7 +5,7 @@ using System.Text.RegularExpressions; namespace Semmle.Extraction.CSharp.DependencyFetching { - internal interface IDotNet + public interface IDotNet { RestoreResult Restore(RestoreSettings restoreSettings); bool New(string folder); @@ -15,9 +15,9 @@ namespace Semmle.Extraction.CSharp.DependencyFetching bool Exec(string execArgs); } - internal record class RestoreSettings(string File, string PackageDirectory, bool ForceDotnetRefAssemblyFetching, string? PathToNugetConfig = null, bool ForceReevaluation = false); + public record class RestoreSettings(string File, string PackageDirectory, bool ForceDotnetRefAssemblyFetching, string? PathToNugetConfig = null, bool ForceReevaluation = false); - internal partial record class RestoreResult(bool Success, IList Output) + public partial record class RestoreResult(bool Success, IList Output) { private readonly Lazy> assetsFilePaths = new(() => GetFirstGroupOnMatch(AssetsFileRegex(), Output)); public IEnumerable AssetsFilePaths => Success ? assetsFilePaths.Value : Array.Empty(); diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Runtime.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Runtime.cs index 90c4af2c4d3..a489ec504c4 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Runtime.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Runtime.cs @@ -18,14 +18,12 @@ namespace Semmle.Extraction.CSharp.DependencyFetching private const string aspNetCoreApp = "Microsoft.AspNetCore.App"; private readonly IDotNet dotNet; - private readonly ILogger logger; private readonly Lazy> newestRuntimes; private Dictionary NewestRuntimes => newestRuntimes.Value; - public Runtime(IDotNet dotNet, ILogger logger) + public Runtime(IDotNet dotNet) { this.dotNet = dotNet; - this.logger = logger; this.newestRuntimes = new(GetNewestRuntimes); } diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Program.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Program.cs index 8160bfdd3ae..12f06a58fd4 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Program.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyStubGenerator/Program.cs @@ -3,7 +3,7 @@ using Semmle.Extraction.CSharp.StubGenerator; using Semmle.Util.Logging; var logger = new ConsoleLogger(Verbosity.Info, logThreadId: false); -using var dependencyManager = new DependencyManager(".", DependencyOptions.Default, logger); +using var dependencyManager = new DependencyManager(".", logger); StubGenerator.GenerateStubs(logger, dependencyManager.ReferenceFiles, "codeql_csharp_stubs"); return 0; diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Extractor.cs index 115a8d418b6..d868768e350 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Extractor.cs @@ -60,10 +60,9 @@ namespace Semmle.Extraction.CSharp.Standalone { try { - FileUtils.TryDelete(output.FullName); if (shouldCleanUpContainingFolder) { - output.Directory?.Delete(true); + FileUtils.TryDelete(output.FullName); } } catch @@ -105,12 +104,19 @@ namespace Semmle.Extraction.CSharp.Standalone public void Analysed(int item, int total, string source, string output, TimeSpan time, AnalysisAction action) { - logger.Log(Severity.Info, "[{0}/{1}] {2} ({3})", item, total, source, - action == AnalysisAction.Extracted - ? time.ToString() - : action == AnalysisAction.Excluded - ? "excluded" - : "up to date"); + var extra = action switch + { + AnalysisAction.Extracted => time.ToString(), + AnalysisAction.Excluded => "excluded", + AnalysisAction.UpToDate => "up to date", + _ => "unknown action" + }; + logger.LogInfo($"[{item}/{total}] {source} ({extra})"); + } + + public void Started(int item, int total, string source) + { + logger.LogInfo($"[{item}/{total}] {source} (processing started)"); } public void MissingType(string type) @@ -138,7 +144,7 @@ namespace Semmle.Extraction.CSharp.Standalone using var logger = new ConsoleLogger(options.Verbosity, logThreadId: true); logger.Log(Severity.Info, "Extracting C# in buildless mode"); - using var dependencyManager = new DependencyManager(options.SrcDir, options.Dependencies, logger); + using var dependencyManager = new DependencyManager(options.SrcDir, logger); if (!dependencyManager.AllSourceFiles.Any()) { diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Options.cs b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Options.cs index f6e21b32bbd..2efe7704775 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Options.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/Options.cs @@ -23,18 +23,6 @@ namespace Semmle.Extraction.CSharp.Standalone } } - public override bool HandleOption(string key, string value) - { - switch (key) - { - case "dotnet": - dependencies.DotNetPath = value; - return true; - default: - return base.HandleOption(key, value); - } - } - public override bool HandleArgument(string arg) { return true; @@ -51,12 +39,6 @@ namespace Semmle.Extraction.CSharp.Standalone /// public string SrcDir { get; } = Directory.GetCurrentDirectory(); - private readonly DependencyOptions dependencies = new DependencyOptions(); - /// - /// Dependency fetching related options. - /// - public IDependencyOptions Dependencies => dependencies; - /// /// Whether errors were encountered parsing the arguments. /// diff --git a/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/StubGenerator.cs b/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/StubGenerator.cs index 32ae6d25161..0f8347eb0bc 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/StubGenerator.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/StubGenerator.cs @@ -36,7 +36,7 @@ public static class StubGenerator references.Add((reference, path)); }); - logger.Log(Severity.Info, $"Generating stubs for {references.Count} assemblies."); + logger.LogInfo($"Generating stubs for {references.Count} assemblies."); var compilation = CSharpCompilation.Create( "stubgenerator.dll", @@ -50,7 +50,7 @@ public static class StubGenerator }); stopWatch.Stop(); - logger.Log(Severity.Info, $"Stub generation took {stopWatch.Elapsed}."); + logger.LogInfo($"Stub generation took {stopWatch.Elapsed}."); return stubPaths.ToArray(); } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Assembly.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Assembly.cs index a997b7129df..a826aa5e02c 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Assembly.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Assembly.cs @@ -9,19 +9,20 @@ namespace Semmle.Extraction.CSharp.Entities private readonly string assemblyPath; private readonly IAssemblySymbol assembly; + private readonly bool isOutputAssembly; private Assembly(Context cx, Microsoft.CodeAnalysis.Location? init) : base(cx, init) { - if (init is null) + isOutputAssembly = init is null; + if (isOutputAssembly) { - // This is the output assembly assemblyPath = cx.Extractor.OutputPath; assembly = cx.Compilation.Assembly; } else { - assembly = init.MetadataModule!.ContainingAssembly; + assembly = init!.MetadataModule!.ContainingAssembly; var identity = assembly.Identity; var idString = identity.Name + " " + identity.Version; assemblyPath = cx.Extractor.GetAssemblyFile(idString); @@ -32,8 +33,13 @@ namespace Semmle.Extraction.CSharp.Entities { if (assemblyPath is not null) { - trapFile.assemblies(this, File.Create(Context, assemblyPath), assembly.ToString() ?? "", - assembly.Identity.Name, assembly.Identity.Version.ToString()); + var isBuildlessOutputAssembly = isOutputAssembly && Context.Extractor.Mode.HasFlag(ExtractorMode.Standalone); + var identifier = isBuildlessOutputAssembly + ? "" + : assembly.ToString() ?? ""; + var name = isBuildlessOutputAssembly ? "" : assembly.Identity.Name; + var version = isBuildlessOutputAssembly ? "" : assembly.Identity.Version.ToString(); + trapFile.assemblies(this, File.Create(Context, assemblyPath), identifier, name, version); } } @@ -68,8 +74,16 @@ namespace Semmle.Extraction.CSharp.Entities public override void WriteId(EscapingTextWriter trapFile) { - trapFile.Write(assembly.ToString()); - if (!(assemblyPath is null)) + if (isOutputAssembly && Context.Extractor.Mode.HasFlag(ExtractorMode.Standalone)) + { + trapFile.Write("buildlessOutputAssembly"); + } + else + { + trapFile.Write(assembly.ToString()); + } + + if (assemblyPath is not null) { trapFile.Write("#file:///"); trapFile.Write(assemblyPath.Replace("\\", "/")); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/CachedSymbol.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/CachedSymbol.cs index cc8357ee4ca..5c72aa4d90e 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/CachedSymbol.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/CachedSymbol.cs @@ -53,6 +53,7 @@ namespace Semmle.Extraction.CSharp.Entities trapFile.type_annotation(this, Kinds.TypeAnnotation.Ref); break; case RefKind.RefReadOnly: + case RefKind.RefReadOnlyParameter: trapFile.type_annotation(this, Kinds.TypeAnnotation.ReadonlyRef); break; } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expression.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expression.cs index 04cce8a5c79..58b01891add 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expression.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expression.cs @@ -54,7 +54,7 @@ namespace Semmle.Extraction.CSharp.Entities } if (info.IsCompilerGenerated) - trapFile.expr_compiler_generated(this); + trapFile.compiler_generated(this); if (info.ExprValue is string value) trapFile.expr_value(this, value); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Parameter.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Parameter.cs index b0ef221e5e3..5843418255c 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Parameter.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Parameter.cs @@ -24,7 +24,13 @@ namespace Semmle.Extraction.CSharp.Entities public enum Kind { - None, Ref, Out, Params, This, In + None = 0, + Ref = 1, + Out = 2, + Params = 3, + This = 4, + In = 5, + RefReadOnly = 6 } protected virtual int Ordinal => Symbol.Ordinal; @@ -41,6 +47,8 @@ namespace Semmle.Extraction.CSharp.Entities return Kind.Ref; case RefKind.In: return Kind.In; + case RefKind.RefReadOnlyParameter: + return Kind.RefReadOnly; default: if (Symbol.IsParams) return Kind.Params; diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Statement`1.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Statement`1.cs index d58698ff2eb..0d7bdd31354 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Statement`1.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Statement`1.cs @@ -9,12 +9,14 @@ namespace Semmle.Extraction.CSharp.Entities { protected readonly TSyntax Stmt; private readonly Location location; + private readonly bool isCompilerGenerated; protected Statement(Context cx, TSyntax stmt, Kinds.StmtKind kind, IStatementParentEntity parent, int child, Location location, bool isCompilerGenerated = false) : base(cx, kind, parent, child) { Stmt = stmt; this.location = location; + this.isCompilerGenerated = isCompilerGenerated; if (!isCompilerGenerated) { cx.BindComments(this, location.Symbol); @@ -29,6 +31,11 @@ namespace Semmle.Extraction.CSharp.Entities base.Populate(trapFile); trapFile.stmt_location(this, location); + + if (isCompilerGenerated) + { + trapFile.compiler_generated(this); + } } public override Microsoft.CodeAnalysis.Location ReportingLocation => Stmt.GetLocation(); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Analyser.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Analyser.cs index 2f56bbfa3cc..59359b2715a 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Analyser.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Analyser.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; @@ -23,8 +24,6 @@ namespace Semmle.Extraction.CSharp private protected Entities.Compilation? compilationEntity; private IDisposable? compilationTrapFile; - private readonly object progressMutex = new object(); - // The bulk of the extraction work, potentially executed in parallel. protected readonly List extractionTasks = new List(); private int taskCount = 0; @@ -131,6 +130,9 @@ namespace Semmle.Extraction.CSharp var skipExtraction = options.Cache && File.Exists(trapWriter.TrapFile); + var currentTaskId = IncrementTaskCount(); + ReportProgressTaskStarted(currentTaskId, assemblyPath); + if (!skipExtraction) { /* Note on parallel builds: @@ -167,7 +169,7 @@ namespace Semmle.Extraction.CSharp } } - ReportProgress(assemblyPath, trapWriter.TrapFile, stopwatch.Elapsed, skipExtraction ? AnalysisAction.UpToDate : AnalysisAction.Extracted); + ReportProgressTaskDone(currentTaskId, assemblyPath, trapWriter.TrapFile, stopwatch.Elapsed, skipExtraction ? AnalysisAction.UpToDate : AnalysisAction.Extracted); } catch (Exception ex) // lgtm[cs/catch-of-all-exceptions] { @@ -177,11 +179,13 @@ namespace Semmle.Extraction.CSharp private void DoExtractCIL(PortableExecutableReference r) { + var currentTaskId = IncrementTaskCount(); + ReportProgressTaskStarted(currentTaskId, r.FilePath); var stopwatch = new Stopwatch(); stopwatch.Start(); CIL.Analyser.ExtractCIL(r.FilePath!, Logger, options, out var trapFile, out var extracted); stopwatch.Stop(); - ReportProgress(r.FilePath, trapFile, stopwatch.Elapsed, extracted ? AnalysisAction.Extracted : AnalysisAction.UpToDate); + ReportProgressTaskDone(currentTaskId, r.FilePath, trapFile, stopwatch.Elapsed, extracted ? AnalysisAction.Extracted : AnalysisAction.UpToDate); } private void DoExtractTree(SyntaxTree tree) @@ -201,6 +205,9 @@ namespace Semmle.Extraction.CSharp upToDate = options.Fast && FileIsUpToDate(sourcePath, trapWriter.TrapFile); + var currentTaskId = IncrementTaskCount(); + ReportProgressTaskStarted(currentTaskId, sourcePath); + if (!upToDate) { var cx = new Context(extractor, compilation.Clone(), trapWriter, new SourceScope(tree), addAssemblyTrapPrefix); @@ -221,7 +228,7 @@ namespace Semmle.Extraction.CSharp cx.PopulateAll(); } - ReportProgress(sourcePath, trapPath, stopwatch.Elapsed, upToDate ? AnalysisAction.UpToDate : AnalysisAction.Extracted); + ReportProgressTaskDone(currentTaskId, sourcePath, trapPath, stopwatch.Elapsed, upToDate ? AnalysisAction.UpToDate : AnalysisAction.Extracted); } catch (Exception ex) // lgtm[cs/catch-of-all-exceptions] { @@ -234,6 +241,11 @@ namespace Semmle.Extraction.CSharp try { var assemblyPath = extractor.OutputPath; + var stopwatch = new Stopwatch(); + stopwatch.Start(); + var currentTaskId = IncrementTaskCount(); + ReportProgressTaskStarted(currentTaskId, assemblyPath); + var transformedAssemblyPath = PathTransformer.Transform(assemblyPath); var assembly = compilation.Assembly; var trapWriter = transformedAssemblyPath.CreateTrapWriter(Logger, options.TrapCompression, discardDuplicates: false); @@ -243,6 +255,8 @@ namespace Semmle.Extraction.CSharp compilationEntity = Entities.Compilation.Create(cx); extractor.CompilationInfos.ForEach(ci => trapWriter.Writer.compilation_info(compilationEntity, ci.key, ci.value)); + + ReportProgressTaskDone(currentTaskId, assemblyPath, trapWriter.TrapFile, stopwatch.Elapsed, AnalysisAction.Extracted); } catch (Exception ex) // lgtm[cs/catch-of-all-exceptions] { @@ -279,10 +293,19 @@ namespace Semmle.Extraction.CSharp } } - private void ReportProgress(string src, string output, TimeSpan time, AnalysisAction action) + private int IncrementTaskCount() { - lock (progressMutex) - progressMonitor.Analysed(++taskCount, extractionTasks.Count, src, output, time, action); + return Interlocked.Increment(ref taskCount); + } + + private void ReportProgressTaskStarted(int currentCount, string src) + { + progressMonitor.Started(currentCount, extractionTasks.Count, src); + } + + private void ReportProgressTaskDone(int currentCount, string src, string output, TimeSpan time, AnalysisAction action) + { + progressMonitor.Analysed(currentCount, extractionTasks.Count, src, output, time, action); } /// diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs index 86677f68620..68d077b15e6 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs @@ -47,6 +47,8 @@ namespace Semmle.Extraction.CSharp } } + public void Started(int item, int total, string source) { } + public void MissingNamespace(string @namespace) { } public void MissingSummary(int types, int namespaces) { } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/IProgressMonitor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/IProgressMonitor.cs index 8f0fdb1adc0..3fc1e16c843 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/IProgressMonitor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/IProgressMonitor.cs @@ -19,6 +19,11 @@ namespace Semmle.Extraction.CSharp /// What action was taken for the file. void Analysed(int item, int total, string source, string output, TimeSpan time, AnalysisAction action); + /// + /// Callback that processing of a particular item has been started. + /// + void Started(int item, int total, string source); + /// /// A "using namespace" directive was seen but the given /// namespace could not be found. diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Tuples.cs b/csharp/extractor/Semmle.Extraction.CSharp/Tuples.cs index 6f61119eb77..71ed85cb201 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Tuples.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Tuples.cs @@ -164,9 +164,6 @@ namespace Semmle.Extraction.CSharp internal static void expr_call(this TextWriter trapFile, Expression expr, Method target) => trapFile.WriteTuple("expr_call", expr, target); - internal static void expr_compiler_generated(this TextWriter trapFile, Expression expr) => - trapFile.WriteTuple("expr_compiler_generated", expr); - internal static void expr_flowstate(this TextWriter trapFile, Expression expr, int flowState) => trapFile.WriteTuple("expr_flowstate", expr, flowState); diff --git a/csharp/extractor/Semmle.Extraction.Tests/Runtime.cs b/csharp/extractor/Semmle.Extraction.Tests/Runtime.cs index 0d4ed6c4b92..17bc477bde8 100644 --- a/csharp/extractor/Semmle.Extraction.Tests/Runtime.cs +++ b/csharp/extractor/Semmle.Extraction.Tests/Runtime.cs @@ -47,7 +47,7 @@ namespace Semmle.Extraction.Tests "Microsoft.NETCore.App 7.0.2 [/path/dotnet/shared/Microsoft.NETCore.App]" }; var dotnet = new DotNetStub(listedRuntimes, null!); - var runtime = new Runtime(dotnet, new LoggerStub()); + var runtime = new Runtime(dotnet); // Execute var runtimes = runtime.GetNewestRuntimes(); @@ -73,7 +73,7 @@ namespace Semmle.Extraction.Tests "Microsoft.NETCore.App 8.0.0-preview.5.23280.8 [/path/dotnet/shared/Microsoft.NETCore.App]" }; var dotnet = new DotNetStub(listedRuntimes, null!); - var runtime = new Runtime(dotnet, new LoggerStub()); + var runtime = new Runtime(dotnet); // Execute var runtimes = runtime.GetNewestRuntimes(); @@ -96,7 +96,7 @@ namespace Semmle.Extraction.Tests "Microsoft.NETCore.App 8.0.0-preview.5.23280.8 [/path/dotnet/shared/Microsoft.NETCore.App]" }; var dotnet = new DotNetStub(listedRuntimes, null!); - var runtime = new Runtime(dotnet, new LoggerStub()); + var runtime = new Runtime(dotnet); // Execute var runtimes = runtime.GetNewestRuntimes(); @@ -125,7 +125,7 @@ namespace Semmle.Extraction.Tests @"Microsoft.WindowsDesktop.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]" }; var dotnet = new DotNetStub(listedRuntimes, null!); - var runtime = new Runtime(dotnet, new LoggerStub()); + var runtime = new Runtime(dotnet); // Execute var runtimes = runtime.GetNewestRuntimes(); diff --git a/csharp/extractor/Semmle.Extraction/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction/Extractor/Extractor.cs index 362b7910c56..db0b30fb2b8 100644 --- a/csharp/extractor/Semmle.Extraction/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction/Extractor/Extractor.cs @@ -43,7 +43,7 @@ namespace Semmle.Extraction ++Errors; if (Errors == maxErrors) { - Logger.Log(Severity.Info, " Stopping logging after {0} errors", Errors); + Logger.LogInfo(" Stopping logging after {0} errors", Errors); } } diff --git a/csharp/extractor/Semmle.Extraction/TrapWriter.cs b/csharp/extractor/Semmle.Extraction/TrapWriter.cs index 7f2c38466c0..aff9983dd7c 100644 --- a/csharp/extractor/Semmle.Extraction/TrapWriter.cs +++ b/csharp/extractor/Semmle.Extraction/TrapWriter.cs @@ -227,7 +227,7 @@ namespace Semmle.Extraction { // If this happened, it was probably because the same file was compiled multiple times. // In any case, this is not a fatal error. - logger.Log(Severity.Warning, "Problem archiving " + dest + ": " + ex); + logger.LogWarning("Problem archiving " + dest + ": " + ex); } } diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildActions.cs b/csharp/extractor/Semmle.Util/BuildActions.cs similarity index 92% rename from csharp/autobuilder/Semmle.Autobuild.Shared/BuildActions.cs rename to csharp/extractor/Semmle.Util/BuildActions.cs index 1788f525367..e3a4e7ecafe 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildActions.cs +++ b/csharp/extractor/Semmle.Util/BuildActions.cs @@ -8,7 +8,7 @@ using System.Runtime.InteropServices; using System.Xml; using Semmle.Util; -namespace Semmle.Autobuild.Shared +namespace Semmle.Util { public delegate void BuildOutputHandler(string? data); @@ -287,4 +287,30 @@ namespace Semmle.Autobuild.Shared public static IBuildActions Instance { get; } = new SystemBuildActions(); } + + public static class BuildActionExtensions + { + private static void FindFiles(this IBuildActions actions, string dir, int depth, int? maxDepth, IList<(string, int)> results) + { + foreach (var f in actions.EnumerateFiles(dir)) + { + results.Add((f, depth)); + } + + if (depth < maxDepth) + { + foreach (var d in actions.EnumerateDirectories(dir)) + { + actions.FindFiles(d, depth + 1, maxDepth, results); + } + } + } + + public static (string path, int depth)[] FindFiles(this IBuildActions actions, string dir, int? maxDepth) + { + var results = new List<(string, int)>(); + actions.FindFiles(dir, 0, maxDepth, results); + return results.OrderBy(f => f.Item2).ToArray(); + } + } } diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildScript.cs b/csharp/extractor/Semmle.Util/BuildScript.cs similarity index 99% rename from csharp/autobuilder/Semmle.Autobuild.Shared/BuildScript.cs rename to csharp/extractor/Semmle.Util/BuildScript.cs index 573c6f3043b..9092463afda 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/BuildScript.cs +++ b/csharp/extractor/Semmle.Util/BuildScript.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -namespace Semmle.Autobuild.Shared +namespace Semmle.Util { /// /// A build script. diff --git a/csharp/extractor/Semmle.Util/CanonicalPathCache.cs b/csharp/extractor/Semmle.Util/CanonicalPathCache.cs index 87fcb3717bd..e7e4c07c36e 100644 --- a/csharp/extractor/Semmle.Util/CanonicalPathCache.cs +++ b/csharp/extractor/Semmle.Util/CanonicalPathCache.cs @@ -268,7 +268,7 @@ namespace Semmle.Util catch // lgtm[cs/catch-of-all-exceptions] { // Failed to late-bind a suitable library. - logger.Log(Severity.Warning, "Preserving symlinks in canonical paths"); + logger.LogWarning("Preserving symlinks in canonical paths"); pathStrategy = new QueryDirectoryStrategy(); } break; diff --git a/csharp/autobuilder/Semmle.Autobuild.Shared/CommandBuilder.cs b/csharp/extractor/Semmle.Util/CommandBuilder.cs similarity index 99% rename from csharp/autobuilder/Semmle.Autobuild.Shared/CommandBuilder.cs rename to csharp/extractor/Semmle.Util/CommandBuilder.cs index 263f35f2fff..3d8f907f866 100644 --- a/csharp/autobuilder/Semmle.Autobuild.Shared/CommandBuilder.cs +++ b/csharp/extractor/Semmle.Util/CommandBuilder.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace Semmle.Autobuild.Shared +namespace Semmle.Util { /// /// Utility to construct a build command. diff --git a/csharp/extractor/Semmle.Util/FileUtils.cs b/csharp/extractor/Semmle.Util/FileUtils.cs index 09269e37e8b..094c4da3338 100644 --- a/csharp/extractor/Semmle.Util/FileUtils.cs +++ b/csharp/extractor/Semmle.Util/FileUtils.cs @@ -133,14 +133,14 @@ namespace Semmle.Util var directoryName = Path.GetDirectoryName(nested); if (directoryName is null) { - logger.Log(Severity.Warning, "Failed to get directory name from path '" + nested + "'."); + logger.LogWarning("Failed to get directory name from path '" + nested + "'."); throw new InvalidOperationException(); } Directory.CreateDirectory(directoryName); } catch (PathTooLongException) { - logger.Log(Severity.Warning, "Failed to create parent directory of '" + nested + "': Path too long."); + logger.LogWarning("Failed to create parent directory of '" + nested + "': Path too long."); throw; } return nested; diff --git a/csharp/ql/consistency-queries/DataFlowConsistency.ql b/csharp/ql/consistency-queries/DataFlowConsistency.ql index 0e442236ac5..1ee888329c7 100644 --- a/csharp/ql/consistency-queries/DataFlowConsistency.ql +++ b/csharp/ql/consistency-queries/DataFlowConsistency.ql @@ -1,5 +1,4 @@ import csharp -import cil private import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl as ControlFlowGraphImpl private import semmle.code.csharp.dataflow.internal.DataFlowImplSpecific private import semmle.code.csharp.dataflow.internal.TaintTrackingImplSpecific @@ -31,11 +30,6 @@ private module Input implements InputSig { n instanceof FlowInsensitiveFieldNode } - predicate missingLocationExclude(Node n) { - // Some CIL methods are missing locations - n.asParameter() instanceof CIL::Parameter - } - predicate postWithInFlowExclude(Node n) { n instanceof FlowSummaryNode or @@ -47,11 +41,7 @@ private module Input implements InputSig { or not exists(LocalFlow::getAPostUpdateNodeForArg(n.getControlFlowNode())) or - n instanceof ImplicitCapturedArgumentNode - or n instanceof ParamsArgumentNode - or - n.asExpr() instanceof CIL::Expr } predicate postHasUniquePreExclude(PostUpdateNode n) { @@ -104,8 +94,6 @@ private module Input implements InputSig { not split = cfn.getASplit() ) or - call instanceof TransitiveCapturedDataFlowCall - or call.(NonDelegateDataFlowCall).getDispatchCall().isReflection() ) } diff --git a/csharp/ql/consistency-queries/VariableCaptureConsistency.ql b/csharp/ql/consistency-queries/VariableCaptureConsistency.ql new file mode 100644 index 00000000000..927741f07bf --- /dev/null +++ b/csharp/ql/consistency-queries/VariableCaptureConsistency.ql @@ -0,0 +1,17 @@ +import csharp +import semmle.code.csharp.dataflow.internal.DataFlowPrivate::VariableCapture::Flow::ConsistencyChecks +private import semmle.code.csharp.dataflow.internal.DataFlowPrivate::VariableCapture::Flow::ConsistencyChecks as ConsistencyChecks +private import semmle.code.csharp.controlflow.BasicBlocks +private import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl + +query predicate uniqueEnclosingCallable(BasicBlock bb, string msg) { + ConsistencyChecks::uniqueEnclosingCallable(bb, msg) and + getNodeCfgScope(bb.getFirstNode()) instanceof Callable +} + +query predicate consistencyOverview(string msg, int n) { none() } + +query predicate uniqueCallableLocation(Callable c, string msg) { + ConsistencyChecks::uniqueCallableLocation(c, msg) and + count(c.getBody()) = 1 +} diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone/test.py b/csharp/ql/integration-tests/all-platforms/cshtml_standalone/test.py index b1f535c1727..64b9f13b36b 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml_standalone/test.py +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone/test.py @@ -1,4 +1,4 @@ import os from create_database_utils import * -run_codeql_database_create(lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create(lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_disabled/test.py b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_disabled/test.py index 0b433134e5a..3e00c972b00 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_disabled/test.py +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_disabled/test.py @@ -2,4 +2,4 @@ import os from create_database_utils import * os.environ['CODEQL_EXTRACTOR_CSHARP_BUILDLESS_EXTRACT_WEB_VIEWS'] = 'false' -run_codeql_database_create(lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create(lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/test.py b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/test.py index b1f535c1727..64b9f13b36b 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/test.py +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_flowsteps/test.py @@ -1,4 +1,4 @@ import os from create_database_utils import * -run_codeql_database_create(lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create(lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_net6/test.py b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_net6/test.py index b1f535c1727..64b9f13b36b 100644 --- a/csharp/ql/integration-tests/all-platforms/cshtml_standalone_net6/test.py +++ b/csharp/ql/integration-tests/all-platforms/cshtml_standalone_net6/test.py @@ -1,4 +1,4 @@ import os from create_database_utils import * -run_codeql_database_create(lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create(lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_build/Program.cs b/csharp/ql/integration-tests/all-platforms/dotnet_build/Program.cs index e9708d0b5d2..bd44629f7e2 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_build/Program.cs +++ b/csharp/ql/integration-tests/all-platforms/dotnet_build/Program.cs @@ -1 +1 @@ -Console.WriteLine(args[0]); +Console.WriteLine($"{string.Join(",", args)}"); diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_build/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_build/test.py index 8bc8d33ba1d..6680a708e70 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_build/test.py +++ b/csharp/ql/integration-tests/all-platforms/dotnet_build/test.py @@ -1,5 +1,16 @@ from create_database_utils import * from diagnostics_test_utils import * -run_codeql_database_create(['dotnet build'], db=None, lang="csharp") -check_diagnostics() +def check_build_out(msg, s): + if "[build-stdout] " + msg not in s: + raise Exception("The C# tracer did not interpret the dotnet path-to-application command correctly.") + +run_codeql_database_create(['dotnet build'], test_db="test1-db", lang="csharp") +check_diagnostics(test_db="test1-db") + +# This test checks that we don't inject any flags when running the application using `dotnet` +my_dir = "my_program" +my_abs_path = os.path.abspath(f"{my_dir}/dotnet_build.dll") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test1-db', 'dotnet build -o my_program', f'dotnet {my_abs_path} build is not a subcommand'], "test2-db", "csharp") +check_build_out("build,is,not,a,subcommand", s) +check_diagnostics(test_db="test2-db") diff --git a/csharp/ql/integration-tests/all-platforms/dotnet_run/test.py b/csharp/ql/integration-tests/all-platforms/dotnet_run/test.py index ef306b1842b..d1a44bdb1fe 100644 --- a/csharp/ql/integration-tests/all-platforms/dotnet_run/test.py +++ b/csharp/ql/integration-tests/all-platforms/dotnet_run/test.py @@ -1,65 +1,57 @@ from create_database_utils import * from diagnostics_test_utils import * -def run_codeql_database_create_stdout(args, dbname): - stdout = open(dbname + "file.txt", 'w+') - run_codeql_database_create(args, test_db=dbname, db=None, stdout=stdout, lang="csharp") - stdout.seek(0) - s = stdout.read() - stdout.close() - return s - def check_build_out(msg, s): if "[build-stdout] " + msg not in s: - raise Exception("The C# extractor did not interpret the 'dotnet run' command correctly") + raise Exception("The C# tracer did not interpret the 'dotnet run' command correctly") # no arguments -s = run_codeql_database_create_stdout(['dotnet run'], "test-db") +s = run_codeql_database_create_stdout(['dotnet run'], "test-db", "csharp") check_build_out("Default reply", s) check_diagnostics() # no arguments, but `--` -s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test-db', 'dotnet run --'], "test2-db") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test-db', 'dotnet run --'], "test2-db", "csharp") check_build_out("Default reply", s) check_diagnostics(test_db="test2-db") # one argument, no `--` -s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test2-db', 'dotnet run hello'], "test3-db") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test2-db', 'dotnet run hello'], "test3-db", "csharp") check_build_out("Default reply", s) check_diagnostics(test_db="test3-db") # one argument, but `--` -s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test3-db', 'dotnet run -- hello'], "test4-db") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test3-db', 'dotnet run -- hello'], "test4-db", "csharp") check_build_out("Default reply", s) check_diagnostics(test_db="test4-db") # two arguments, no `--` -s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test4-db', 'dotnet run hello world'], "test5-db") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test4-db', 'dotnet run hello world'], "test5-db", "csharp") check_build_out("hello, world", s) check_diagnostics(test_db="test5-db") # two arguments, and `--` -s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test5-db', 'dotnet run -- hello world'], "test6-db") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test5-db', 'dotnet run -- hello world'], "test6-db", "csharp") check_build_out("hello, world", s) check_diagnostics(test_db="test6-db") # shared compilation enabled; tracer should override by changing the command # to `dotnet run -p:UseSharedCompilation=true -p:UseSharedCompilation=false -- hello world` -s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test6-db', 'dotnet run -p:UseSharedCompilation=true -- hello world'], "test7-db") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test6-db', 'dotnet run -p:UseSharedCompilation=true -- hello world'], "test7-db", "csharp") check_build_out("hello, world", s) check_diagnostics(test_db="test7-db") # option passed into `dotnet run` -s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test7-db', 'dotnet build', 'dotnet run --no-build hello world'], "test8-db") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test7-db', 'dotnet build', 'dotnet run --no-build hello world'], "test8-db", "csharp") check_build_out("hello, world", s) check_diagnostics(test_db="test8-db") # two arguments, no '--' (first argument quoted) -s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test8-db', 'dotnet run "hello world part1" part2'], "test9-db") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test8-db', 'dotnet run "hello world part1" part2'], "test9-db", "csharp") check_build_out("hello world part1, part2", s) check_diagnostics(test_db="test9-db") # two arguments, no '--' (second argument quoted) and using dotnet to execute dotnet -s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test9-db', 'dotnet dotnet run part1 "hello world part2"'], "test10-db") +s = run_codeql_database_create_stdout(['dotnet clean', 'rm -rf test9-db', 'dotnet dotnet run part1 "hello world part2"'], "test10-db", "csharp") check_build_out("part1, hello world part2", s) check_diagnostics(test_db="test10-db") diff --git a/csharp/ql/integration-tests/all-platforms/standalone/test.py b/csharp/ql/integration-tests/all-platforms/standalone/test.py index 72f47e38d22..a17966e148a 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone/test.py +++ b/csharp/ql/integration-tests/all-platforms/standalone/test.py @@ -1,3 +1,3 @@ from create_database_utils import * -run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/test.py b/csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/test.py index 72f47e38d22..a17966e148a 100644 --- a/csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/test.py +++ b/csharp/ql/integration-tests/all-platforms/standalone_dependencies_net48/test.py @@ -1,3 +1,3 @@ from create_database_utils import * -run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/test.py b/csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/test.py index 7173ed4c6c2..c372671b20b 100644 --- a/csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/test.py +++ b/csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/test.py @@ -5,4 +5,4 @@ path = b'\xd2abcd.cs' with open(path, 'w') as file: file.write('class X { }\n') -run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies/test.py b/csharp/ql/integration-tests/posix-only/standalone_dependencies/test.py index 72f47e38d22..a17966e148a 100644 --- a/csharp/ql/integration-tests/posix-only/standalone_dependencies/test.py +++ b/csharp/ql/integration-tests/posix-only/standalone_dependencies/test.py @@ -1,3 +1,3 @@ from create_database_utils import * -run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/test.py b/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/test.py index 72f47e38d22..a17966e148a 100644 --- a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/test.py +++ b/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/test.py @@ -1,3 +1,3 @@ from create_database_utils import * -run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test.py b/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test.py index ddd46a7f1e2..277f7d92160 100644 --- a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test.py +++ b/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test.py @@ -2,4 +2,4 @@ from create_database_utils import * import os os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_DOTNET_FRAMEWORK_REFERENCES"] = "/non-existent-path" -run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/test.py b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/test.py index 72f47e38d22..a17966e148a 100644 --- a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/test.py +++ b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/test.py @@ -1,3 +1,3 @@ from create_database_utils import * -run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.expected b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.expected new file mode 100644 index 00000000000..fad4c55aca5 --- /dev/null +++ b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.expected @@ -0,0 +1,17 @@ +| Failed project restore with package source error | 1.0 | +| Failed solution restore with package source error | 0.0 | +| Fallback nuget restore | 1.0 | +| Project files on filesystem | 1.0 | +| Resolved assembly conflicts | 7.0 | +| Restored .NET framework variants | 0.0 | +| Restored projects through solution files | 0.0 | +| Solution files on filesystem | 1.0 | +| Source files generated | 0.0 | +| Source files on filesystem | 1.0 | +| Successfully ran fallback nuget restore | 1.0 | +| Successfully restored project files | 0.0 | +| Successfully restored solution files | 1.0 | +| Unresolved references | 0.0 | +| UseWPF set | 0.0 | +| UseWindowsForms set | 0.0 | +| WebView extraction enabled | 1.0 | diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.ql b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.ql new file mode 100644 index 00000000000..87a9e20f027 --- /dev/null +++ b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.ql @@ -0,0 +1,14 @@ +import csharp +import semmle.code.csharp.commons.Diagnostics + +query predicate compilationInfo(string key, float value) { + key != "Resolved references" and + exists(Compilation c, string infoKey, string infoValue | infoValue = c.getInfo(infoKey) | + key = infoKey and + value = infoValue.toFloat() + or + not exists(infoValue.toFloat()) and + key = infoKey + ": " + infoValue and + value = 1 + ) +} diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/test.py b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/test.py index 72f47e38d22..a17966e148a 100644 --- a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/test.py +++ b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/test.py @@ -1,3 +1,3 @@ from create_database_utils import * -run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/test.py b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/test.py index 9142835c65f..ff2e3ba7d3b 100644 --- a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/test.py +++ b/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/test.py @@ -1,3 +1,3 @@ from create_database_utils import * -run_codeql_database_create([], source="proj", lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], source="proj", lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/integration-tests/windows-only/standalone_dependencies/test.py b/csharp/ql/integration-tests/windows-only/standalone_dependencies/test.py index 72f47e38d22..a17966e148a 100644 --- a/csharp/ql/integration-tests/windows-only/standalone_dependencies/test.py +++ b/csharp/ql/integration-tests/windows-only/standalone_dependencies/test.py @@ -1,3 +1,3 @@ from create_database_utils import * -run_codeql_database_create([], lang="csharp", extra_args=["--extractor-option=buildless=true"]) +run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) diff --git a/csharp/ql/lib/change-notes/2024-02-21-getonly-properties.md b/csharp/ql/lib/change-notes/2024-02-21-getonly-properties.md index 3e8940a44e6..6bb8e99c71e 100644 --- a/csharp/ql/lib/change-notes/2024-02-21-getonly-properties.md +++ b/csharp/ql/lib/change-notes/2024-02-21-getonly-properties.md @@ -1,4 +1,4 @@ --- category: minorAnalysis --- -* C#: Data flow via get only properties like `public object Obj { get; }` is now captured by the data flow library. +* Data flow via get only properties like `public object Obj { get; }` is now captured by the data flow library. diff --git a/csharp/ql/lib/change-notes/2024-02-22-no-db-stats.md b/csharp/ql/lib/change-notes/2024-02-22-no-db-stats.md new file mode 100644 index 00000000000..d6ffbd523ac --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-02-22-no-db-stats.md @@ -0,0 +1,4 @@ +--- +category: majorAnalysis +--- +* We no longer make use of CodeQL database stats, which may affect join-orders in custom queries. It is therefore recommended to test performance of custom queries after upgrading to this version. diff --git a/csharp/ql/lib/change-notes/2024-02-23-compiler-generated.md b/csharp/ql/lib/change-notes/2024-02-23-compiler-generated.md new file mode 100644 index 00000000000..9b1739b9b6d --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-02-23-compiler-generated.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* C#: The table `expr_compiler_generated` has been deleted and its content has been added to `compiler_generated`. diff --git a/csharp/ql/lib/change-notes/2024-02-26-variable-capture-flow.md b/csharp/ql/lib/change-notes/2024-02-26-variable-capture-flow.md new file mode 100644 index 00000000000..66ab65083dc --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-02-26-variable-capture-flow.md @@ -0,0 +1,4 @@ +--- +category: majorAnalysis +--- +* Improved support for flow through captured variables that properly adheres to inter-procedural control flow. \ No newline at end of file diff --git a/csharp/ql/lib/change-notes/2024-02-28-experimental-attribute.md b/csharp/ql/lib/change-notes/2024-02-28-experimental-attribute.md new file mode 100644 index 00000000000..8749c790954 --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-02-28-experimental-attribute.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* C# 12: Add QL library support (`ExperimentalAttribute`) for the experimental attribute. diff --git a/csharp/ql/lib/change-notes/2024-02-28-refreadonly-parameter.md b/csharp/ql/lib/change-notes/2024-02-28-refreadonly-parameter.md new file mode 100644 index 00000000000..586b5341d29 --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-02-28-refreadonly-parameter.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* C# 12: Add extractor and QL library support for `ref readonly` parameters. diff --git a/csharp/ql/lib/change-notes/2024-03-04-deprecate-dotnet-and-cil.md b/csharp/ql/lib/change-notes/2024-03-04-deprecate-dotnet-and-cil.md new file mode 100644 index 00000000000..fea31bb8bbb --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-03-04-deprecate-dotnet-and-cil.md @@ -0,0 +1,4 @@ +--- +category: breaking +--- +* The QL library C# classes no longer extend their corresponding `DotNet` classes. Furthermore, CIL related data flow functionality has been deleted and all `DotNet` and `CIL` related classes have been deprecated. This effectively means that it no longer has any effect to enable CIL extraction. diff --git a/csharp/ql/lib/change-notes/2024-03-04-fixed-system.io.textreader-models.md b/csharp/ql/lib/change-notes/2024-03-04-fixed-system.io.textreader-models.md new file mode 100644 index 00000000000..a32f8a7c22c --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-03-04-fixed-system.io.textreader-models.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The models for `System.IO.TextReader` have been modified to better model the flow of tainted text from a `TextReader`. diff --git a/csharp/ql/lib/change-notes/2024-03-05-new-commandargs-and-environment-models.md b/csharp/ql/lib/change-notes/2024-03-05-new-commandargs-and-environment-models.md new file mode 100644 index 00000000000..0bee733157c --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-03-05-new-commandargs-and-environment-models.md @@ -0,0 +1,5 @@ +--- +category: minorAnalysis +--- +* The .NET standard libraries APIs for accessing command line arguments and environment variables have been modeled using the `commandargs` and `environment` threat models. +* The `cs/assembly-path-injection` query has been modified so that it's sources rely on `ThreatModelFlowSource`. In order to restore results from command line arguments, you should enable the `commandargs` threat model. diff --git a/csharp/ql/lib/change-notes/2024-03-07-update-system.net.http.httprequestmessage-models.md b/csharp/ql/lib/change-notes/2024-03-07-update-system.net.http.httprequestmessage-models.md new file mode 100644 index 00000000000..2ac3a1059c6 --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-03-07-update-system.net.http.httprequestmessage-models.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The models for `System.Net.Http.HttpRequestMessage` have been modified to better model the flow of tainted URIs. \ No newline at end of file diff --git a/csharp/ql/lib/change-notes/2024-03-11-csharp12-dotnet8.md b/csharp/ql/lib/change-notes/2024-03-11-csharp12-dotnet8.md new file mode 100644 index 00000000000..7111e8966d6 --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-03-11-csharp12-dotnet8.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Support for C# 12 / .NET8. diff --git a/csharp/ql/lib/dotnet.qll b/csharp/ql/lib/dotnet.qll index b583edda18a..2814ac41fc1 100644 --- a/csharp/ql/lib/dotnet.qll +++ b/csharp/ql/lib/dotnet.qll @@ -2,4 +2,4 @@ * The default QL library for modeling .NET definitions for both C# and CIL code. */ -import semmle.code.dotnet.DotNet as DotNet +deprecated import semmle.code.dotnet.DotNet as DotNet diff --git a/csharp/ql/lib/ext/Microsoft.Extensions.Configuration.model.yml b/csharp/ql/lib/ext/Microsoft.Extensions.Configuration.model.yml new file mode 100644 index 00000000000..e07c669b5bd --- /dev/null +++ b/csharp/ql/lib/ext/Microsoft.Extensions.Configuration.model.yml @@ -0,0 +1,17 @@ +extensions: + - addsTo: + pack: codeql/csharp-all + extensible: sourceModel + data: + - ["Microsoft.Extensions.Configuration", "EnvironmentVariablesExtensions", False, "AddEnvironmentVariables", "", "", "Argument[0]", "environment", "manual"] + - ["Microsoft.Extensions.Configuration", "EnvironmentVariablesExtensions", False, "AddEnvironmentVariables", "", "", "ReturnValue", "environment", "manual"] + - addsTo: + pack: codeql/csharp-all + extensible: summaryModel + data: + - ["Microsoft.Extensions.Configuration", "IConfiguration", True, "get_Item", "(System.String)", "", "Argument[this]", "ReturnValue", "taint", "manual"] + - ["Microsoft.Extensions.Configuration", "IConfigurationBuilder", True, "Build", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"] + - ["Microsoft.Extensions.Configuration", "CommandLineConfigurationExtensions", False, "AddCommandLine", "", "", "Argument[1]", "Argument[0]", "taint", "manual"] + - ["Microsoft.Extensions.Configuration", "CommandLineConfigurationExtensions", False, "AddCommandLine", "(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary)", "", "Argument[2]", "Argument[0]", "taint", "manual"] + - ["Microsoft.Extensions.Configuration", "CommandLineConfigurationExtensions", False, "AddCommandLine", "", "", "Argument[1]", "ReturnValue", "taint", "manual"] + - ["Microsoft.Extensions.Configuration", "CommandLineConfigurationExtensions", False, "AddCommandLine", "(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary)", "", "Argument[2]", "ReturnValue", "taint", "manual"] \ No newline at end of file diff --git a/csharp/ql/lib/ext/System.IO.model.yml b/csharp/ql/lib/ext/System.IO.model.yml index b03d68535de..e1120d5684e 100644 --- a/csharp/ql/lib/ext/System.IO.model.yml +++ b/csharp/ql/lib/ext/System.IO.model.yml @@ -89,14 +89,16 @@ extensions: - ["System.IO", "StreamReader", False, "StreamReader", "(System.String,System.Text.Encoding,System.Boolean,System.Int32)", "", "Argument[0]", "Argument[this]", "taint", "manual"] - ["System.IO", "StringReader", False, "StringReader", "(System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"] - ["System.IO", "TextReader", True, "Read", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"] - - ["System.IO", "TextReader", True, "Read", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"] - - ["System.IO", "TextReader", True, "Read", "(System.Span)", "", "Argument[this]", "ReturnValue", "taint", "manual"] - - ["System.IO", "TextReader", True, "ReadAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"] - - ["System.IO", "TextReader", True, "ReadAsync", "(System.Memory,System.Threading.CancellationToken)", "", "Argument[this]", "ReturnValue", "taint", "manual"] - - ["System.IO", "TextReader", True, "ReadBlock", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"] - - ["System.IO", "TextReader", True, "ReadBlock", "(System.Span)", "", "Argument[this]", "ReturnValue", "taint", "manual"] - - ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"] - - ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Memory,System.Threading.CancellationToken)", "", "Argument[this]", "ReturnValue", "taint", "manual"] + - ["System.IO", "TextReader", True, "Read", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"] + - ["System.IO", "TextReader", True, "Read", "(System.Span)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"] + - ["System.IO", "TextReader", True, "ReadAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"] + # Post-update nodes for `Memory` are currently unsupported. This model is provided for completeness + - ["System.IO", "TextReader", True, "ReadAsync", "(System.Memory,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"] + - ["System.IO", "TextReader", True, "ReadBlock", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"] + - ["System.IO", "TextReader", True, "ReadBlock", "(System.Span)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"] + - ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Char[],System.Int32,System.Int32)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"] + # Post-update nodes for `Memory` are currently unsupported. This model is provided for completeness + - ["System.IO", "TextReader", True, "ReadBlockAsync", "(System.Memory,System.Threading.CancellationToken)", "", "Argument[this]", "Argument[0].Element", "taint", "manual"] - ["System.IO", "TextReader", True, "ReadLine", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"] - ["System.IO", "TextReader", True, "ReadLineAsync", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"] - ["System.IO", "TextReader", True, "ReadToEnd", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"] diff --git a/csharp/ql/lib/ext/System.Net.Http.model.yml b/csharp/ql/lib/ext/System.Net.Http.model.yml index 058718d30ac..7d4fbf87a57 100644 --- a/csharp/ql/lib/ext/System.Net.Http.model.yml +++ b/csharp/ql/lib/ext/System.Net.Http.model.yml @@ -8,6 +8,8 @@ extensions: pack: codeql/csharp-all extensible: summaryModel data: + - ["System.Net.Http", "HttpRequestMessage", False, "HttpRequestMessage", "(System.Net.Http.HttpMethod,System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"] + - ["System.Net.Http", "HttpRequestMessage", False, "HttpRequestMessage", "(System.Net.Http.HttpMethod,System.String)", "", "Argument[1]", "Argument[this]", "taint", "manual"] - ["System.Net.Http", "HttpRequestOptions", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair`2.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair`2.Key]", "value", "manual"] - ["System.Net.Http", "HttpRequestOptions", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair`2.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair`2.Value]", "value", "manual"] - ["System.Net.Http", "MultipartContent", False, "Add", "(System.Net.Http.HttpContent)", "", "Argument[0]", "Argument[this].Element", "value", "manual"] diff --git a/csharp/ql/lib/ext/System.model.yml b/csharp/ql/lib/ext/System.model.yml index 36ce30e0ecb..7e37f7a48a9 100644 --- a/csharp/ql/lib/ext/System.model.yml +++ b/csharp/ql/lib/ext/System.model.yml @@ -6,6 +6,11 @@ extensions: - ["System", "Console", False, "Read", "", "", "ReturnValue", "local", "manual"] - ["System", "Console", False, "ReadKey", "", "", "ReturnValue", "local", "manual"] - ["System", "Console", False, "ReadLine", "", "", "ReturnValue", "local", "manual"] + - ["System", "Environment", False, "ExpandEnvironmentVariables", "(System.String)", "", "ReturnValue", "environment", "manual"] + - ["System", "Environment", False, "GetCommandLineArgs", "()", "", "ReturnValue", "commandargs", "manual"] + - ["System", "Environment", False, "get_CommandLine", "()", "", "ReturnValue", "commandargs", "manual"] + - ["System", "Environment", False, "GetEnvironmentVariable", "", "", "ReturnValue", "environment", "manual"] + - ["System", "Environment", False, "GetEnvironmentVariables", "", "", "ReturnValue", "environment", "manual"] - addsTo: pack: codeql/csharp-all extensible: summaryModel diff --git a/csharp/ql/lib/printCfg.ql b/csharp/ql/lib/printCfg.ql new file mode 100644 index 00000000000..aa92b119204 --- /dev/null +++ b/csharp/ql/lib/printCfg.ql @@ -0,0 +1,50 @@ +/** + * @name Print CFG + * @description Produces a representation of a file's Control Flow Graph. + * This query is used by the VS Code extension. + * @id cs/print-cfg + * @kind graph + * @tags ide-contextual-queries/print-cfg + */ + +private import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl + +external string selectedSourceFile(); + +private predicate selectedSourceFileAlias = selectedSourceFile/0; + +external int selectedSourceLine(); + +private predicate selectedSourceLineAlias = selectedSourceLine/0; + +external int selectedSourceColumn(); + +private predicate selectedSourceColumnAlias = selectedSourceColumn/0; + +module ViewCfgQueryInput implements ViewCfgQueryInputSig { + predicate selectedSourceFile = selectedSourceFileAlias/0; + + predicate selectedSourceLine = selectedSourceLineAlias/0; + + predicate selectedSourceColumn = selectedSourceColumnAlias/0; + + predicate cfgScopeSpan( + CfgScope scope, File file, int startLine, int startColumn, int endLine, int endColumn + ) { + file = scope.getFile() and + scope.getLocation().getStartLine() = startLine and + scope.getLocation().getStartColumn() = startColumn and + exists(Location loc | + loc.getEndLine() = endLine and + loc.getEndColumn() = endColumn + | + loc = scope.(Callable).getBody().getLocation() + or + loc = scope.(Field).getInitializer().getLocation() + or + loc = scope.(Property).getInitializer().getLocation() + ) + } +} + +import ViewCfgQuery diff --git a/csharp/ql/lib/semmle/code/cil/Access.qll b/csharp/ql/lib/semmle/code/cil/Access.qll index 5fecd8acb10..9c23976543b 100644 --- a/csharp/ql/lib/semmle/code/cil/Access.qll +++ b/csharp/ql/lib/semmle/code/cil/Access.qll @@ -7,7 +7,7 @@ private import CIL /** An instruction that accesses a variable. */ -class Access extends Instruction, @cil_access { +deprecated class Access extends Instruction, @cil_access { /** Gets the declaration referenced by this instruction. */ Variable getTarget() { cil_access(this, result) } } @@ -16,59 +16,59 @@ class Access extends Instruction, @cil_access { * An instruction that accesses a variable. * This class is provided for consistency with the C# data model. */ -class VariableAccess extends Access, @cil_access { } +deprecated class VariableAccess extends Access, @cil_access { } /** An instruction that reads a variable. */ -class ReadAccess extends VariableAccess, Expr, @cil_read_access { +deprecated class ReadAccess extends VariableAccess, Expr, @cil_read_access { override Type getType() { result = this.getTarget().getType() } } /** An instruction yielding an address. */ -class ReadRef extends Expr, @cil_read_ref { } +deprecated class ReadRef extends Expr, @cil_read_ref { } /** An instruction that reads the address of a variable. */ -class ReadRefAccess extends ReadAccess, ReadRef { } +deprecated class ReadRefAccess extends ReadAccess, ReadRef { } /** An instruction that writes a variable. */ -class WriteAccess extends VariableAccess, @cil_write_access { +deprecated class WriteAccess extends VariableAccess, @cil_write_access { /** Gets the expression whose value is used in this variable write. */ Expr getExpr() { none() } } /** An instruction that accesses a parameter. */ -class ParameterAccess extends StackVariableAccess, @cil_arg_access { +deprecated class ParameterAccess extends StackVariableAccess, @cil_arg_access { override MethodParameter getTarget() { result = StackVariableAccess.super.getTarget() } } /** An instruction that reads a parameter. */ -class ParameterReadAccess extends ParameterAccess, ReadAccess { +deprecated class ParameterReadAccess extends ParameterAccess, ReadAccess { override int getPopCount() { result = 0 } } /** An instruction that writes to a parameter. */ -class ParameterWriteAccess extends ParameterAccess, WriteAccess { +deprecated class ParameterWriteAccess extends ParameterAccess, WriteAccess { override int getPopCount() { result = 1 } override Expr getExpr() { result = this.getOperand(0) } } /** An access to the `this` parameter. */ -class ThisAccess extends ParameterReadAccess { +deprecated class ThisAccess extends ParameterReadAccess { ThisAccess() { this.getTarget() instanceof ThisParameter } } /** An instruction that accesses a stack variable. */ -class StackVariableAccess extends VariableAccess, @cil_stack_access { +deprecated class StackVariableAccess extends VariableAccess, @cil_stack_access { override StackVariable getTarget() { result = VariableAccess.super.getTarget() } } /** An instruction that accesses a local variable. */ -class LocalVariableAccess extends StackVariableAccess, @cil_local_access { +deprecated class LocalVariableAccess extends StackVariableAccess, @cil_local_access { override LocalVariable getTarget() { result = StackVariableAccess.super.getTarget() } } /** An instruction that writes to a local variable. */ -class LocalVariableWriteAccess extends LocalVariableAccess, WriteAccess { +deprecated class LocalVariableWriteAccess extends LocalVariableAccess, WriteAccess { override int getPopCount() { result = 1 } override Expr getExpr() { result = this.getOperand(0) } @@ -77,12 +77,12 @@ class LocalVariableWriteAccess extends LocalVariableAccess, WriteAccess { } /** An instruction that reads a local variable. */ -class LocalVariableReadAccess extends LocalVariableAccess, ReadAccess { +deprecated class LocalVariableReadAccess extends LocalVariableAccess, ReadAccess { override int getPopCount() { result = 0 } } /** An instruction that accesses a field. */ -class FieldAccess extends VariableAccess, @cil_field_access { +deprecated class FieldAccess extends VariableAccess, @cil_field_access { override Field getTarget() { result = VariableAccess.super.getTarget() } override string getExtra() { result = this.getTarget().getName() } @@ -92,7 +92,7 @@ class FieldAccess extends VariableAccess, @cil_field_access { } /** An instruction that reads a field. */ -abstract class FieldReadAccess extends FieldAccess, ReadAccess { } +abstract deprecated class FieldReadAccess extends FieldAccess, ReadAccess { } /** An instruction that writes a field. */ -abstract class FieldWriteAccess extends FieldAccess, WriteAccess { } +abstract deprecated class FieldWriteAccess extends FieldAccess, WriteAccess { } diff --git a/csharp/ql/lib/semmle/code/cil/Attribute.qll b/csharp/ql/lib/semmle/code/cil/Attribute.qll index 1ec53603463..431438fb5e9 100644 --- a/csharp/ql/lib/semmle/code/cil/Attribute.qll +++ b/csharp/ql/lib/semmle/code/cil/Attribute.qll @@ -4,7 +4,7 @@ private import CIL private import semmle.code.csharp.Location as CS /** An attribute to a declaration, such as a method, field, type or parameter. */ -class Attribute extends Element, @cil_attribute { +deprecated class Attribute extends Element, @cil_attribute { /** Gets the declaration this attribute is attached to. */ Declaration getDeclaration() { cil_attribute(this, result, _) } @@ -29,7 +29,7 @@ class Attribute extends Element, @cil_attribute { } /** A generic attribute to a declaration. */ -class GenericAttribute extends Attribute { +deprecated class GenericAttribute extends Attribute { private ConstructedType type; GenericAttribute() { type = this.getType() } diff --git a/csharp/ql/lib/semmle/code/cil/BasicBlock.qll b/csharp/ql/lib/semmle/code/cil/BasicBlock.qll index 2680cb0a769..94126193bcc 100644 --- a/csharp/ql/lib/semmle/code/cil/BasicBlock.qll +++ b/csharp/ql/lib/semmle/code/cil/BasicBlock.qll @@ -8,7 +8,7 @@ private import CIL * A basic block, that is, a maximal straight-line sequence of control flow nodes * without branches or joins. */ -class BasicBlock extends Cached::TBasicBlockStart { +deprecated class BasicBlock extends Cached::TBasicBlockStart { /** Gets an immediate successor of this basic block, if any. */ BasicBlock getASuccessor() { result.getFirstNode() = this.getLastNode().getASuccessor() } @@ -249,7 +249,7 @@ class BasicBlock extends Cached::TBasicBlockStart { * Internal implementation details. */ cached -private module Cached { +deprecated private module Cached { /** Internal representation of basic blocks. */ cached newtype TBasicBlock = TBasicBlockStart(ControlFlowNode cfn) { startsBB(cfn) } @@ -287,49 +287,54 @@ private module Cached { * Holds if the first node of basic block `succ` is a control flow * successor of the last node of basic block `pred`. */ -private predicate succBB(BasicBlock pred, BasicBlock succ) { succ = pred.getASuccessor() } +deprecated private predicate succBB(BasicBlock pred, BasicBlock succ) { + succ = pred.getASuccessor() +} /** Holds if `dom` is an immediate dominator of `bb`. */ -predicate bbIDominates(BasicBlock dom, BasicBlock bb) = idominance(entryBB/1, succBB/2)(_, dom, bb) +deprecated predicate bbIDominates(BasicBlock dom, BasicBlock bb) = + idominance(entryBB/1, succBB/2)(_, dom, bb) /** Holds if `pred` is a basic block predecessor of `succ`. */ -private predicate predBB(BasicBlock succ, BasicBlock pred) { succBB(pred, succ) } +deprecated private predicate predBB(BasicBlock succ, BasicBlock pred) { succBB(pred, succ) } /** Holds if `dom` is an immediate post-dominator of `bb`. */ -predicate bbIPostDominates(BasicBlock dom, BasicBlock bb) = +deprecated predicate bbIPostDominates(BasicBlock dom, BasicBlock bb) = idominance(exitBB/1, predBB/2)(_, dom, bb) /** * An entry basic block, that is, a basic block whose first node is * the entry node of a callable. */ -class EntryBasicBlock extends BasicBlock { +deprecated class EntryBasicBlock extends BasicBlock { EntryBasicBlock() { entryBB(this) } } /** Holds if `bb` is an entry basic block. */ -private predicate entryBB(BasicBlock bb) { bb.getFirstNode() instanceof MethodImplementation } +deprecated private predicate entryBB(BasicBlock bb) { + bb.getFirstNode() instanceof MethodImplementation +} /** * An exit basic block, that is, a basic block whose last node is * an exit node. */ -class ExitBasicBlock extends BasicBlock { +deprecated class ExitBasicBlock extends BasicBlock { ExitBasicBlock() { exitBB(this) } } /** Holds if `bb` is an exit basic block. */ -private predicate exitBB(BasicBlock bb) { not exists(bb.getLastNode().getASuccessor()) } +deprecated private predicate exitBB(BasicBlock bb) { not exists(bb.getLastNode().getASuccessor()) } /** * A basic block with more than one predecessor. */ -class JoinBlock extends BasicBlock { +deprecated class JoinBlock extends BasicBlock { JoinBlock() { this.getFirstNode().isJoin() } } /** A basic block that terminates in a condition, splitting the subsequent control flow. */ -class ConditionBlock extends BasicBlock { +deprecated class ConditionBlock extends BasicBlock { ConditionBlock() { exists(BasicBlock succ | succ = this.getATrueSuccessor() diff --git a/csharp/ql/lib/semmle/code/cil/CallableReturns.qll b/csharp/ql/lib/semmle/code/cil/CallableReturns.qll index 4cd46c10941..4fc49adcf44 100644 --- a/csharp/ql/lib/semmle/code/cil/CallableReturns.qll +++ b/csharp/ql/lib/semmle/code/cil/CallableReturns.qll @@ -8,22 +8,26 @@ cached private module Cached { /** Holds if method `m` always returns null. */ cached - predicate alwaysNullMethod(Method m) { forex(Expr e | m.canReturn(e) | alwaysNullExpr(e)) } + deprecated predicate alwaysNullMethod(Method m) { + forex(Expr e | m.canReturn(e) | alwaysNullExpr(e)) + } /** Holds if method `m` always returns non-null. */ cached - predicate alwaysNotNullMethod(Method m) { forex(Expr e | m.canReturn(e) | alwaysNotNullExpr(e)) } + deprecated predicate alwaysNotNullMethod(Method m) { + forex(Expr e | m.canReturn(e) | alwaysNotNullExpr(e)) + } /** Holds if method `m` always throws an exception. */ cached - predicate alwaysThrowsMethod(Method m) { + deprecated predicate alwaysThrowsMethod(Method m) { m.hasBody() and not exists(m.getImplementation().getAnInstruction().(Return)) } /** Holds if method `m` always throws an exception of type `t`. */ cached - predicate alwaysThrowsException(Method m, Type t) { + deprecated predicate alwaysThrowsException(Method m, Type t) { alwaysThrowsMethod(m) and forex(Throw ex | ex = m.getImplementation().getAnInstruction() | t = ex.getExceptionType()) } @@ -32,12 +36,12 @@ private module Cached { import Cached pragma[noinline] -private predicate alwaysNullVariableUpdate(VariableUpdate vu) { +deprecated private predicate alwaysNullVariableUpdate(VariableUpdate vu) { forex(Expr src | src = vu.getSource() | alwaysNullExpr(src)) } /** Holds if expression `expr` always evaluates to `null`. */ -private predicate alwaysNullExpr(Expr expr) { +deprecated private predicate alwaysNullExpr(Expr expr) { expr instanceof NullLiteral or alwaysNullMethod(expr.(StaticCall).getTarget()) @@ -50,12 +54,12 @@ private predicate alwaysNullExpr(Expr expr) { } pragma[noinline] -private predicate alwaysNotNullVariableUpdate(VariableUpdate vu) { +deprecated private predicate alwaysNotNullVariableUpdate(VariableUpdate vu) { forex(Expr src | src = vu.getSource() | alwaysNotNullExpr(src)) } /** Holds if expression `expr` always evaluates to non-null. */ -private predicate alwaysNotNullExpr(Expr expr) { +deprecated private predicate alwaysNotNullExpr(Expr expr) { expr instanceof Opcodes::NewObj or expr instanceof Literal and not expr instanceof NullLiteral diff --git a/csharp/ql/lib/semmle/code/cil/ConsistencyChecks.qll b/csharp/ql/lib/semmle/code/cil/ConsistencyChecks.qll index ffb84dc2100..612e94711a2 100644 --- a/csharp/ql/lib/semmle/code/cil/ConsistencyChecks.qll +++ b/csharp/ql/lib/semmle/code/cil/ConsistencyChecks.qll @@ -8,15 +8,15 @@ private import semmle.code.csharp.commons.QualifiedName private newtype ConsistencyCheck = MissingEntityCheck() or - TypeCheck(Type t) or - CfgCheck(ControlFlowNode n) or - DeclarationCheck(Declaration d) or + deprecated TypeCheck(Type t) or + deprecated CfgCheck(ControlFlowNode n) or + deprecated DeclarationCheck(Declaration d) or MissingCSharpCheck(CS::Declaration d) /** * A consistency violation in the database or data model. */ -abstract class ConsistencyViolation extends ConsistencyCheck { +abstract deprecated class ConsistencyViolation extends ConsistencyCheck { abstract string toString(); abstract string getMessage(); @@ -25,14 +25,14 @@ abstract class ConsistencyViolation extends ConsistencyCheck { /** * A check that is deliberately disabled. */ -abstract class DisabledCheck extends ConsistencyViolation { +abstract deprecated class DisabledCheck extends ConsistencyViolation { DisabledCheck() { none() } } /** * A consistency violation on a control flow node. */ -abstract class CfgViolation extends ConsistencyViolation, CfgCheck { +abstract deprecated class CfgViolation extends ConsistencyViolation, CfgCheck { ControlFlowNode node; CfgViolation() { this = CfgCheck(node) } @@ -43,7 +43,7 @@ abstract class CfgViolation extends ConsistencyViolation, CfgCheck { /** * A consistency violation in a specific instruction. */ -abstract class InstructionViolation extends CfgViolation, CfgCheck { +abstract deprecated class InstructionViolation extends CfgViolation, CfgCheck { Instruction instruction; InstructionViolation() { this = CfgCheck(instruction) } @@ -70,7 +70,7 @@ abstract class InstructionViolation extends CfgViolation, CfgCheck { /** * A literal that does not have exactly one `getValue()`. */ -class MissingValue extends InstructionViolation { +deprecated class MissingValue extends InstructionViolation { MissingValue() { exists(Literal l | l = instruction | count(l.getValue()) != 1) } override string getMessage() { result = "Literal has invalid getValue()" } @@ -79,7 +79,7 @@ class MissingValue extends InstructionViolation { /** * A call that does not have exactly one `getTarget()`. */ -class MissingCallTarget extends InstructionViolation { +deprecated class MissingCallTarget extends InstructionViolation { MissingCallTarget() { exists(Call c | c = instruction | count(c.getTarget()) != 1 and not c instanceof Opcodes::Calli @@ -94,7 +94,7 @@ class MissingCallTarget extends InstructionViolation { /** * An instruction that has not been assigned a specific QL class. */ -class MissingOpCode extends InstructionViolation { +deprecated class MissingOpCode extends InstructionViolation { MissingOpCode() { not exists(instruction.getOpcodeName()) } override string getMessage() { @@ -114,7 +114,7 @@ class MissingOpCode extends InstructionViolation { * It could also mean that the target of a call has failed and has not determined the * correct number of arguments. */ -class MissingOperand extends InstructionViolation { +deprecated class MissingOperand extends InstructionViolation { MissingOperand() { exists(int op | op in [0 .. instruction.getPopCount() - 1] | not exists(instruction.getOperand(op)) and not instruction instanceof DeadInstruction @@ -136,7 +136,7 @@ class MissingOperand extends InstructionViolation { * These should not exist, however it turns out that the Mono compiler sometimes * emits them. */ -class DeadInstruction extends Instruction { +deprecated class DeadInstruction extends Instruction { DeadInstruction() { not exists(EntryPoint e | e.getASuccessor+() = this) } } @@ -146,20 +146,20 @@ class DeadInstruction extends Instruction { * If this fails, it means that the calculation of the call graph is incorrect. * Disabled, because Mono compiler sometimes emits dead instructions. */ -class DeadInstructionViolation extends InstructionViolation, DisabledCheck { +deprecated class DeadInstructionViolation extends InstructionViolation, DisabledCheck { DeadInstructionViolation() { instruction instanceof DeadInstruction } override string getMessage() { result = "This instruction is not reachable" } } -class YesNoBranch extends ConditionalBranch { +deprecated class YesNoBranch extends ConditionalBranch { YesNoBranch() { not this instanceof Opcodes::Switch } } /** * A branch instruction that does not have exactly 2 successors. */ -class InvalidBranchSuccessors extends InstructionViolation { +deprecated class InvalidBranchSuccessors extends InstructionViolation { InvalidBranchSuccessors() { // Mono compiler sometimes generates branches to the next instruction, which is just wrong. // However it is valid CIL. @@ -174,7 +174,7 @@ class InvalidBranchSuccessors extends InstructionViolation { /** * An instruction that has a true/false successor but is not a branch. */ -class OnlyYesNoBranchHasTrueFalseSuccessors extends InstructionViolation { +deprecated class OnlyYesNoBranchHasTrueFalseSuccessors extends InstructionViolation { OnlyYesNoBranchHasTrueFalseSuccessors() { (exists(instruction.getTrueSuccessor()) or exists(instruction.getFalseSuccessor())) and not instruction instanceof YesNoBranch @@ -186,7 +186,7 @@ class OnlyYesNoBranchHasTrueFalseSuccessors extends InstructionViolation { /** * An unconditional branch instruction that has more than one successor. */ -class UnconditionalBranchSuccessors extends InstructionViolation { +deprecated class UnconditionalBranchSuccessors extends InstructionViolation { UnconditionalBranchSuccessors() { exists(UnconditionalBranch i | i = instruction | count(i.getASuccessor()) != 1) } @@ -199,7 +199,7 @@ class UnconditionalBranchSuccessors extends InstructionViolation { /** * A branch instruction that does not have a true successor. */ -class NoTrueSuccessor extends InstructionViolation { +deprecated class NoTrueSuccessor extends InstructionViolation { NoTrueSuccessor() { exists(YesNoBranch i | i = instruction | not exists(i.getTrueSuccessor())) } override string getMessage() { result = "Missing a true successor" } @@ -208,7 +208,7 @@ class NoTrueSuccessor extends InstructionViolation { /** * A branch instruction that does not have a false successor. */ -class NoFalseSuccessor extends InstructionViolation { +deprecated class NoFalseSuccessor extends InstructionViolation { NoFalseSuccessor() { exists(YesNoBranch i | i = instruction | not exists(i.getFalseSuccessor())) } override string getMessage() { result = "Missing a false successor" } @@ -217,7 +217,7 @@ class NoFalseSuccessor extends InstructionViolation { /** * An instruction whose true successor is not a successor. */ -class TrueSuccessorIsSuccessor extends InstructionViolation { +deprecated class TrueSuccessorIsSuccessor extends InstructionViolation { TrueSuccessorIsSuccessor() { exists(instruction.getTrueSuccessor()) and not instruction.getTrueSuccessor() = instruction.getASuccessor() @@ -229,7 +229,7 @@ class TrueSuccessorIsSuccessor extends InstructionViolation { /** * An instruction whose false successor is not a successor. */ -class FalseSuccessorIsSuccessor extends InstructionViolation { +deprecated class FalseSuccessorIsSuccessor extends InstructionViolation { FalseSuccessorIsSuccessor() { exists(instruction.getFalseSuccessor()) and not instruction.getFalseSuccessor() = instruction.getASuccessor() @@ -241,7 +241,7 @@ class FalseSuccessorIsSuccessor extends InstructionViolation { /** * An access that does not have exactly one target. */ -class AccessMissingTarget extends InstructionViolation { +deprecated class AccessMissingTarget extends InstructionViolation { AccessMissingTarget() { exists(Access i | i = instruction | count(i.getTarget()) != 1) } override string getMessage() { result = "Access has invalid getTarget()" } @@ -250,7 +250,7 @@ class AccessMissingTarget extends InstructionViolation { /** * A catch handler that doesn't have a caught exception type. */ -class CatchHandlerMissingType extends CfgViolation { +deprecated class CatchHandlerMissingType extends CfgViolation { CatchHandlerMissingType() { exists(CatchHandler h | h = node | not exists(h.getCaughtType())) } override string getMessage() { result = "Catch handler missing caught type" } @@ -259,7 +259,7 @@ class CatchHandlerMissingType extends CfgViolation { /** * A CFG node that does not have a stack size. */ -class MissingStackSize extends CfgViolation { +deprecated class MissingStackSize extends CfgViolation { MissingStackSize() { ( not exists(node.getStackSizeAfter()) or @@ -275,7 +275,7 @@ class MissingStackSize extends CfgViolation { * A CFG node that does not have exactly one stack size. * Disabled because inconsistent stack sizes have been observed. */ -class InvalidStackSize extends CfgViolation, DisabledCheck { +deprecated class InvalidStackSize extends CfgViolation, DisabledCheck { InvalidStackSize() { ( count(node.getStackSizeAfter()) != 1 or @@ -294,7 +294,7 @@ class InvalidStackSize extends CfgViolation, DisabledCheck { /** * A CFG node that does not have exactly 1 `getPopCount()`. */ -class InconsistentPopCount extends CfgViolation { +deprecated class InconsistentPopCount extends CfgViolation { InconsistentPopCount() { count(node.getPopCount()) != 1 } override string getMessage() { @@ -305,7 +305,7 @@ class InconsistentPopCount extends CfgViolation { /** * A CFG node that does not have exactly one `getPushCount()`. */ -class InconsistentPushCount extends CfgViolation { +deprecated class InconsistentPushCount extends CfgViolation { InconsistentPushCount() { count(node.getPushCount()) != 1 } override string getMessage() { @@ -316,7 +316,7 @@ class InconsistentPushCount extends CfgViolation { /** * A return instruction that does not have a stack size of 0 after it. */ -class InvalidReturn extends InstructionViolation { +deprecated class InvalidReturn extends InstructionViolation { InvalidReturn() { instruction instanceof Return and instruction.getStackSizeAfter() != 0 } override string getMessage() { result = "Return has invalid stack size" } @@ -325,7 +325,7 @@ class InvalidReturn extends InstructionViolation { /** * A throw instruction that does not have a stack size of 0 after it. */ -class InvalidThrow extends InstructionViolation, DisabledCheck { +deprecated class InvalidThrow extends InstructionViolation, DisabledCheck { InvalidThrow() { instruction instanceof Throw and instruction.getStackSizeAfter() != 0 } override string getMessage() { @@ -336,7 +336,7 @@ class InvalidThrow extends InstructionViolation, DisabledCheck { /** * A field access where the field is "static" but the instruction is "instance". */ -class StaticFieldTarget extends InstructionViolation { +deprecated class StaticFieldTarget extends InstructionViolation { StaticFieldTarget() { exists(FieldAccess i | i = instruction | (i instanceof Opcodes::Stfld or i instanceof Opcodes::Stfld) and @@ -350,7 +350,7 @@ class StaticFieldTarget extends InstructionViolation { /** * A branch without a target. */ -class BranchWithoutTarget extends InstructionViolation { +deprecated class BranchWithoutTarget extends InstructionViolation { BranchWithoutTarget() { instruction = any(Branch b | not exists(b.getTarget()) and not b instanceof Opcodes::Switch) } @@ -361,7 +361,7 @@ class BranchWithoutTarget extends InstructionViolation { /** * A consistency violation in a type. */ -class TypeViolation extends ConsistencyViolation, TypeCheck { +deprecated class TypeViolation extends ConsistencyViolation, TypeCheck { /** Gets the type containing the violation. */ Type getType() { this = TypeCheck(result) } @@ -373,7 +373,7 @@ class TypeViolation extends ConsistencyViolation, TypeCheck { /** * A type that has both type arguments and type parameters. */ -class TypeIsBothConstructedAndUnbound extends TypeViolation { +deprecated class TypeIsBothConstructedAndUnbound extends TypeViolation { TypeIsBothConstructedAndUnbound() { this.getType() instanceof ConstructedGeneric and this.getType() instanceof UnboundGeneric } @@ -385,7 +385,7 @@ class TypeIsBothConstructedAndUnbound extends TypeViolation { * The location of a constructed generic type should be the same * as the location of its unbound generic type. */ -class InconsistentTypeLocation extends TypeViolation { +deprecated class InconsistentTypeLocation extends TypeViolation { InconsistentTypeLocation() { this.getType().getLocation() != this.getType().getUnboundDeclaration().getLocation() } @@ -396,7 +396,7 @@ class InconsistentTypeLocation extends TypeViolation { /** * A constructed type that does not match its unbound generic type. */ -class TypeParameterMismatch extends TypeViolation { +deprecated class TypeParameterMismatch extends TypeViolation { TypeParameterMismatch() { this.getType().(ConstructedGeneric).getNumberOfTypeArguments() != this.getType().getUnboundType().(UnboundGeneric).getNumberOfTypeParameters() @@ -415,7 +415,7 @@ class TypeParameterMismatch extends TypeViolation { /** * A consistency violation in a method. */ -class MethodViolation extends ConsistencyViolation, DeclarationCheck { +deprecated class MethodViolation extends ConsistencyViolation, DeclarationCheck { /** Gets the method containing the violation. */ Method getMethod() { this = DeclarationCheck(result) } @@ -428,7 +428,7 @@ class MethodViolation extends ConsistencyViolation, DeclarationCheck { * The location of a constructed method should be equal to the * location of its unbound generic. */ -class InconsistentMethodLocation extends MethodViolation { +deprecated class InconsistentMethodLocation extends MethodViolation { InconsistentMethodLocation() { this.getMethod().getLocation() != this.getMethod().getUnboundDeclaration().getLocation() } @@ -439,7 +439,7 @@ class InconsistentMethodLocation extends MethodViolation { /** * A constructed method that does not match its unbound method. */ -class ConstructedMethodTypeParams extends MethodViolation { +deprecated class ConstructedMethodTypeParams extends MethodViolation { ConstructedMethodTypeParams() { this.getMethod().(ConstructedGeneric).getNumberOfTypeArguments() != this.getMethod().getUnboundDeclaration().(UnboundGeneric).getNumberOfTypeParameters() @@ -456,14 +456,14 @@ class ConstructedMethodTypeParams extends MethodViolation { /** * A violation marking an entity that should be present but is not. */ -abstract class MissingEntityViolation extends ConsistencyViolation, MissingEntityCheck { +abstract deprecated class MissingEntityViolation extends ConsistencyViolation, MissingEntityCheck { override string toString() { result = "Missing entity" } } /** * The type `object` is missing from the database. */ -class MissingObjectViolation extends MissingEntityViolation { +deprecated class MissingObjectViolation extends MissingEntityViolation { MissingObjectViolation() { exists(this) and not exists(ObjectType o) @@ -475,7 +475,7 @@ class MissingObjectViolation extends MissingEntityViolation { /** * An override that is invalid because the overridden method is not in a base class. */ -class InvalidOverride extends MethodViolation { +deprecated class InvalidOverride extends MethodViolation { private Method base; InvalidOverride() { @@ -497,7 +497,7 @@ class InvalidOverride extends MethodViolation { /** * A pointer type that does not have a pointee type. */ -class InvalidPointerType extends TypeViolation { +deprecated class InvalidPointerType extends TypeViolation { InvalidPointerType() { exists(PointerType p | p = this.getType() | count(p.getReferentType()) != 1) } @@ -508,7 +508,7 @@ class InvalidPointerType extends TypeViolation { /** * An array with an invalid `getElementType`. */ -class ArrayTypeMissingElement extends TypeViolation { +deprecated class ArrayTypeMissingElement extends TypeViolation { ArrayTypeMissingElement() { exists(ArrayType t | t = this.getType() | count(t.getElementType()) != 1) } @@ -519,7 +519,7 @@ class ArrayTypeMissingElement extends TypeViolation { /** * An array with an invalid `getRank`. */ -class ArrayTypeInvalidRank extends TypeViolation { +deprecated class ArrayTypeInvalidRank extends TypeViolation { ArrayTypeInvalidRank() { exists(ArrayType t | t = this.getType() | not t.getRank() > 0) } override string getMessage() { result = "Invalid ArrayType.getRank()" } @@ -529,7 +529,7 @@ class ArrayTypeInvalidRank extends TypeViolation { * A type should have at most one kind, except for missing referenced types * where the interface/class is unknown. */ -class KindViolation extends TypeViolation { +deprecated class KindViolation extends TypeViolation { KindViolation() { count(typeKind(this.getType())) != 1 and exists(this.getType().getLocation()) @@ -544,7 +544,7 @@ class KindViolation extends TypeViolation { * The type of a kind must be consistent between a constructed generic and its * unbound generic. */ -class InconsistentKind extends TypeViolation { +deprecated class InconsistentKind extends TypeViolation { InconsistentKind() { typeKind(this.getType()) != typeKind(this.getType().getUnboundDeclaration()) } @@ -552,7 +552,7 @@ class InconsistentKind extends TypeViolation { override string getMessage() { result = "Inconsistent type kind of source declaration" } } -private string typeKind(Type t) { +deprecated private string typeKind(Type t) { t instanceof Interface and result = "interface" or t instanceof Class and result = "class" @@ -567,7 +567,7 @@ private string typeKind(Type t) { /** * A violation in a `Member`. */ -abstract class DeclarationViolation extends ConsistencyViolation, DeclarationCheck { +abstract deprecated class DeclarationViolation extends ConsistencyViolation, DeclarationCheck { abstract override string getMessage(); /** Gets the member containing the potential violation. */ @@ -579,7 +579,7 @@ abstract class DeclarationViolation extends ConsistencyViolation, DeclarationChe /** * Properties that have no accessors. */ -class PropertyWithNoAccessors extends DeclarationViolation { +deprecated class PropertyWithNoAccessors extends DeclarationViolation { PropertyWithNoAccessors() { exists(Property p | p = this.getDeclaration() | not exists(p.getAnAccessor())) } @@ -590,7 +590,7 @@ class PropertyWithNoAccessors extends DeclarationViolation { /** * An expression that have an unexpected push count. */ -class ExprPushCount extends InstructionViolation { +deprecated class ExprPushCount extends InstructionViolation { ExprPushCount() { instruction instanceof Expr and not instruction instanceof Opcodes::Dup and @@ -608,7 +608,7 @@ class ExprPushCount extends InstructionViolation { * An expression that does not have exactly one type. * Note that calls with no return have type `System.Void`. */ -class ExprMissingType extends InstructionViolation { +deprecated class ExprMissingType extends InstructionViolation { ExprMissingType() { // Don't have types for the following op codes: not instruction instanceof Opcodes::Ldftn and @@ -632,7 +632,7 @@ class ExprMissingType extends InstructionViolation { /** * An instruction that has a push count of 0, yet is still used as an operand */ -class InvalidExpressionViolation extends InstructionViolation { +deprecated class InvalidExpressionViolation extends InstructionViolation { InvalidExpressionViolation() { instruction.getPushCount() = 0 and exists(Instruction expr | instruction = expr.getAnOperand()) @@ -647,7 +647,7 @@ class InvalidExpressionViolation extends InstructionViolation { * A type that has multiple entities with the same qualified name in `System`. * .NET Core does sometimes duplicate types, so this check is disabled. */ -class TypeMultiplyDefined extends TypeViolation, DisabledCheck { +deprecated class TypeMultiplyDefined extends TypeViolation, DisabledCheck { TypeMultiplyDefined() { this.getType().getParent().getName() = "System" and not this.getType() instanceof ConstructedGeneric and @@ -672,7 +672,7 @@ class TypeMultiplyDefined extends TypeViolation, DisabledCheck { /** * A C# declaration which is expected to have a corresponding CIL declaration, but for some reason does not. */ -class MissingCilDeclaration extends ConsistencyViolation, MissingCSharpCheck { +deprecated class MissingCilDeclaration extends ConsistencyViolation, MissingCSharpCheck { MissingCilDeclaration() { exists(CS::Declaration decl | this = MissingCSharpCheck(decl) | expectedCilDeclaration(decl) and @@ -694,7 +694,7 @@ class MissingCilDeclaration extends ConsistencyViolation, MissingCSharpCheck { /** * Holds if the C# declaration is expected to have a CIl declaration. */ -private predicate expectedCilDeclaration(CS::Declaration decl) { +deprecated private predicate expectedCilDeclaration(CS::Declaration decl) { decl = decl.getUnboundDeclaration() and not decl instanceof CS::ArrayType and decl.getALocation() instanceof CS::Assembly and @@ -730,7 +730,7 @@ private predicate expectedCilDeclaration(CS::Declaration decl) { } /** A member with an invalid name. */ -class MemberWithInvalidName extends DeclarationViolation { +deprecated class MemberWithInvalidName extends DeclarationViolation { MemberWithInvalidName() { exists(string name | name = this.getDeclaration().(Member).getName() | exists(name.indexOf(".")) and @@ -744,7 +744,7 @@ class MemberWithInvalidName extends DeclarationViolation { } } -class ConstructedSourceDeclarationMethod extends MethodViolation { +deprecated class ConstructedSourceDeclarationMethod extends MethodViolation { Method method; ConstructedSourceDeclarationMethod() { @@ -762,7 +762,7 @@ class ConstructedSourceDeclarationMethod extends MethodViolation { } /** A declaration with multiple labels. */ -class DeclarationWithMultipleLabels extends DeclarationViolation { +deprecated class DeclarationWithMultipleLabels extends DeclarationViolation { DeclarationWithMultipleLabels() { exists(Declaration d | this = DeclarationCheck(d) | strictcount(d.getLabel()) > 1) } @@ -773,7 +773,7 @@ class DeclarationWithMultipleLabels extends DeclarationViolation { } /** A declaration without a label. */ -class DeclarationWithoutLabel extends DeclarationViolation { +deprecated class DeclarationWithoutLabel extends DeclarationViolation { DeclarationWithoutLabel() { exists(Declaration d | this = DeclarationCheck(d) | d.isUnboundDeclaration() and diff --git a/csharp/ql/lib/semmle/code/cil/ControlFlow.qll b/csharp/ql/lib/semmle/code/cil/ControlFlow.qll index ec72dea4bc7..a2f5fcffa67 100644 --- a/csharp/ql/lib/semmle/code/cil/ControlFlow.qll +++ b/csharp/ql/lib/semmle/code/cil/ControlFlow.qll @@ -5,7 +5,7 @@ private import CIL /** A node in the control flow graph. */ -class ControlFlowNode extends @cil_controlflow_node { +deprecated class ControlFlowNode extends @cil_controlflow_node { /** Gets a textual representation of this control flow node. */ string toString() { none() } @@ -149,31 +149,31 @@ class ControlFlowNode extends @cil_controlflow_node { * * Handlers are control flow nodes because they push the handled exception onto the stack. */ -class EntryPoint extends ControlFlowNode, @cil_entry_point { +deprecated class EntryPoint extends ControlFlowNode, @cil_entry_point { override int getStackSizeBefore() { result = 0 } } -private newtype TFlowType = +deprecated private newtype TFlowType = TNormalFlow() or TTrueFlow() or TFalseFlow() /** A type of control flow. Either normal flow (`NormalFlow`), true flow (`TrueFlow`) or false flow (`FalseFlow`). */ -abstract class FlowType extends TFlowType { +abstract deprecated class FlowType extends TFlowType { abstract string toString(); } /** Normal control flow. */ -class NormalFlow extends FlowType, TNormalFlow { +deprecated class NormalFlow extends FlowType, TNormalFlow { override string toString() { result = "" } } /** True control flow. */ -class TrueFlow extends FlowType, TTrueFlow { +deprecated class TrueFlow extends FlowType, TTrueFlow { override string toString() { result = "true" } } /** False control flow. */ -class FalseFlow extends FlowType, TFalseFlow { +deprecated class FalseFlow extends FlowType, TFalseFlow { override string toString() { result = "false" } } diff --git a/csharp/ql/lib/semmle/code/cil/CustomModifierReceiver.qll b/csharp/ql/lib/semmle/code/cil/CustomModifierReceiver.qll index 40e121416c7..b18a51702cf 100644 --- a/csharp/ql/lib/semmle/code/cil/CustomModifierReceiver.qll +++ b/csharp/ql/lib/semmle/code/cil/CustomModifierReceiver.qll @@ -12,7 +12,7 @@ private import dotnet * - the type of parameters. * A `CustomModifierReceiver` is therefore either a `Field`, `Property`, `Method`, or `Parameter`. */ -class CustomModifierReceiver extends Declaration, @cil_custom_modifier_receiver { +deprecated class CustomModifierReceiver extends Declaration, @cil_custom_modifier_receiver { /** Holds if this targeted type has `modifier` applied as `modreq`. */ predicate hasRequiredCustomModifier(Type modifier) { cil_custom_modifiers(this, modifier, 1) } diff --git a/csharp/ql/lib/semmle/code/cil/DataFlow.qll b/csharp/ql/lib/semmle/code/cil/DataFlow.qll index 9b0e4556958..9da00db0ade 100644 --- a/csharp/ql/lib/semmle/code/cil/DataFlow.qll +++ b/csharp/ql/lib/semmle/code/cil/DataFlow.qll @@ -9,7 +9,7 @@ private import CIL * * Either an instruction (`Instruction`), a method return (`Method`), or a variable (`Variable`). */ -class DataFlowNode extends @cil_dataflow_node { +deprecated class DataFlowNode extends @cil_dataflow_node { /** Gets a textual representation of this data flow node. */ abstract string toString(); @@ -24,7 +24,7 @@ class DataFlowNode extends @cil_dataflow_node { } /** A node that updates a variable. */ -abstract class VariableUpdate extends DataFlowNode { +abstract deprecated class VariableUpdate extends DataFlowNode { /** Gets the value assigned, if any. */ abstract DataFlowNode getSource(); @@ -35,7 +35,7 @@ abstract class VariableUpdate extends DataFlowNode { abstract predicate updatesAt(BasicBlock bb, int i); } -private class MethodParameterDef extends VariableUpdate, MethodParameter { +deprecated private class MethodParameterDef extends VariableUpdate, MethodParameter { override MethodParameter getSource() { result = this } override MethodParameter getVariable() { result = this } @@ -46,7 +46,7 @@ private class MethodParameterDef extends VariableUpdate, MethodParameter { } } -private class VariableWrite extends VariableUpdate, WriteAccess { +deprecated private class VariableWrite extends VariableUpdate, WriteAccess { override Expr getSource() { result = this.getExpr() } override Variable getVariable() { result = this.getTarget() } @@ -54,7 +54,7 @@ private class VariableWrite extends VariableUpdate, WriteAccess { override predicate updatesAt(BasicBlock bb, int i) { this = bb.getNode(i) } } -private class MethodOutOrRefTarget extends VariableUpdate, Call { +deprecated private class MethodOutOrRefTarget extends VariableUpdate, Call { int parameterIndex; MethodOutOrRefTarget() { this.getTarget().getRawParameter(parameterIndex).hasOutFlag() } diff --git a/csharp/ql/lib/semmle/code/cil/Declaration.qll b/csharp/ql/lib/semmle/code/cil/Declaration.qll index 55c4ab8b578..9c0343fb34c 100644 --- a/csharp/ql/lib/semmle/code/cil/Declaration.qll +++ b/csharp/ql/lib/semmle/code/cil/Declaration.qll @@ -10,7 +10,7 @@ private import semmle.code.csharp.commons.QualifiedName /** * A declaration. Either a member (`Member`) or a variable (`Variable`). */ -class Declaration extends DotNet::Declaration, Element, @cil_declaration { +deprecated class Declaration extends DotNet::Declaration, Element, @cil_declaration { /** Gets an attribute (for example `[Obsolete]`) of this declaration, if any. */ Attribute getAnAttribute() { result.getDeclaration() = this } @@ -42,14 +42,18 @@ class Declaration extends DotNet::Declaration, Element, @cil_declaration { } } -private CS::Declaration toCSharpNonTypeParameter(Declaration d) { result.matchesHandle(d) } +deprecated private CS::Declaration toCSharpNonTypeParameter(Declaration d) { + result.(DotNet::Declaration).matchesHandle(d) +} -private CS::TypeParameter toCSharpTypeParameter(TypeParameter tp) { +deprecated private CS::TypeParameter toCSharpTypeParameter(TypeParameter tp) { toCSharpTypeParameterJoin(tp, result.getIndex(), result.getGeneric()) } pragma[nomagic] -private predicate toCSharpTypeParameterJoin(TypeParameter tp, int i, CS::UnboundGeneric ug) { +deprecated private predicate toCSharpTypeParameterJoin( + TypeParameter tp, int i, CS::UnboundGeneric ug +) { exists(TypeContainer tc | tp.getIndex() = i and tc = tp.getGeneric() and @@ -60,7 +64,7 @@ private predicate toCSharpTypeParameterJoin(TypeParameter tp, int i, CS::Unbound /** * A member of a type. Either a type (`Type`), a method (`Method`), a property (`Property`), or an event (`Event`). */ -class Member extends DotNet::Member, Declaration, @cil_member { +deprecated class Member extends DotNet::Member, Declaration, @cil_member { override predicate isPublic() { cil_public(this) } override predicate isProtected() { cil_protected(this) } @@ -82,7 +86,7 @@ class Member extends DotNet::Member, Declaration, @cil_member { } /** A property. */ -class Property extends DotNet::Property, Member, CustomModifierReceiver, @cil_property { +deprecated class Property extends DotNet::Property, Member, CustomModifierReceiver, @cil_property { override string getName() { cil_property(this, _, result, _) } /** Gets the type of this property. */ @@ -109,7 +113,7 @@ class Property extends DotNet::Property, Member, CustomModifierReceiver, @cil_pr } /** A property that is trivial (wraps a field). */ -class TrivialProperty extends Property { +deprecated class TrivialProperty extends Property { TrivialProperty() { this.getGetter().(TrivialGetter).getField() = this.getSetter().(TrivialSetter).getField() } @@ -119,7 +123,7 @@ class TrivialProperty extends Property { } /** An event. */ -class Event extends DotNet::Event, Member, @cil_event { +deprecated class Event extends DotNet::Event, Member, @cil_event { override string getName() { cil_event(this, _, result, _) } /** Gets the type of this event. */ diff --git a/csharp/ql/lib/semmle/code/cil/Element.qll b/csharp/ql/lib/semmle/code/cil/Element.qll index 0499c429dd0..58e6a76b315 100644 --- a/csharp/ql/lib/semmle/code/cil/Element.qll +++ b/csharp/ql/lib/semmle/code/cil/Element.qll @@ -4,12 +4,12 @@ private import dotnet import semmle.code.csharp.Location /** An element. */ -class Element extends DotNet::Element, @cil_element { +deprecated class Element extends DotNet::Element, @cil_element { override Location getLocation() { result = bestLocation(this) } } cached -private Location bestLocation(Element e) { +deprecated private Location bestLocation(Element e) { result = e.getALocation() and (e.getALocation().getFile().isPdbSourceFile() implies result.getFile().isPdbSourceFile()) } diff --git a/csharp/ql/lib/semmle/code/cil/Generics.qll b/csharp/ql/lib/semmle/code/cil/Generics.qll index faacc2745ae..0a929e8dc6d 100644 --- a/csharp/ql/lib/semmle/code/cil/Generics.qll +++ b/csharp/ql/lib/semmle/code/cil/Generics.qll @@ -7,7 +7,7 @@ private import dotnet * A generic declaration. Either an unbound generic (`UnboundGeneric`) or a * constructed generic (`ConstructedGeneric`). */ -class Generic extends DotNet::Generic, Declaration, TypeContainer { +deprecated class Generic extends DotNet::Generic, Declaration, TypeContainer { Generic() { cil_type_parameter(this, _, _) or cil_type_argument(this, _, _) @@ -15,14 +15,14 @@ class Generic extends DotNet::Generic, Declaration, TypeContainer { } /** An unbound generic type or method. */ -class UnboundGeneric extends Generic, DotNet::UnboundGeneric { +deprecated class UnboundGeneric extends Generic, DotNet::UnboundGeneric { UnboundGeneric() { cil_type_parameter(this, _, _) } final override TypeParameter getTypeParameter(int n) { cil_type_parameter(this, n, result) } } /** A constructed generic type or method. */ -class ConstructedGeneric extends Generic, DotNet::ConstructedGeneric { +deprecated class ConstructedGeneric extends Generic, DotNet::ConstructedGeneric { ConstructedGeneric() { cil_type_argument(this, _, _) } final override Type getTypeArgument(int n) { cil_type_argument(this, n, result) } @@ -30,18 +30,18 @@ class ConstructedGeneric extends Generic, DotNet::ConstructedGeneric { /** Gets the concatenation of the `getName()` of type arguments. */ language[monotonicAggregates] -private string getTypeArgumentsNames(ConstructedGeneric cg) { +deprecated private string getTypeArgumentsNames(ConstructedGeneric cg) { result = strictconcat(Type t, int i | t = cg.getTypeArgument(i) | t.getName(), "," order by i) } /** An unbound generic type. */ -class UnboundGenericType extends UnboundGeneric, Type { } +deprecated class UnboundGenericType extends UnboundGeneric, Type { } /** An unbound generic method. */ -class UnboundGenericMethod extends UnboundGeneric, Method { } +deprecated class UnboundGenericMethod extends UnboundGeneric, Method { } /** A constructed generic type. */ -class ConstructedType extends ConstructedGeneric, Type { +deprecated class ConstructedType extends ConstructedGeneric, Type { final override UnboundGenericType getUnboundGeneric() { result = this.getUnboundType() } override predicate isInterface() { this.getUnboundType().isInterface() } @@ -54,6 +54,6 @@ class ConstructedType extends ConstructedGeneric, Type { } /** A constructed generic method. */ -class ConstructedMethod extends ConstructedGeneric, Method { +deprecated class ConstructedMethod extends ConstructedGeneric, Method { final override UnboundGenericMethod getUnboundGeneric() { result = this.getUnboundMethod() } } diff --git a/csharp/ql/lib/semmle/code/cil/Handler.qll b/csharp/ql/lib/semmle/code/cil/Handler.qll index f0661ccf35e..b408222742d 100644 --- a/csharp/ql/lib/semmle/code/cil/Handler.qll +++ b/csharp/ql/lib/semmle/code/cil/Handler.qll @@ -19,7 +19,7 @@ private import CIL * Either a finally handler (`FinallyHandler`), filter handler (`FilterHandler`), * catch handler (`CatchHandler`), or a fault handler (`FaultHandler`). */ -class Handler extends Element, EntryPoint, @cil_handler { +deprecated class Handler extends Element, EntryPoint, @cil_handler { override MethodImplementation getImplementation() { cil_handler(this, result, _, _, _, _, _) } /** Gets the 0-based index of this handler. Handlers are evaluated in this sequence. */ @@ -56,12 +56,12 @@ class Handler extends Element, EntryPoint, @cil_handler { } /** A handler corresponding to a `finally` block. */ -class FinallyHandler extends Handler, @cil_finally_handler { +deprecated class FinallyHandler extends Handler, @cil_finally_handler { override string toString() { result = "finally {...}" } } /** A handler corresponding to a `where()` clause. */ -class FilterHandler extends Handler, @cil_filter_handler { +deprecated class FilterHandler extends Handler, @cil_filter_handler { override string toString() { result = "where (...)" } /** Gets the filter clause - the start of a sequence of instructions to evaluate the filter function. */ @@ -71,13 +71,13 @@ class FilterHandler extends Handler, @cil_filter_handler { } /** A handler corresponding to a `catch` clause. */ -class CatchHandler extends Handler, @cil_catch_handler { +deprecated class CatchHandler extends Handler, @cil_catch_handler { override string toString() { result = "catch(" + this.getCaughtType().getName() + ") {...}" } override int getPushCount() { result = 1 } } /** A handler for memory faults. */ -class FaultHandler extends Handler, @cil_fault_handler { +deprecated class FaultHandler extends Handler, @cil_fault_handler { override string toString() { result = "fault {...}" } } diff --git a/csharp/ql/lib/semmle/code/cil/Instruction.qll b/csharp/ql/lib/semmle/code/cil/Instruction.qll index fa9753e1f0c..5edba5a15ce 100644 --- a/csharp/ql/lib/semmle/code/cil/Instruction.qll +++ b/csharp/ql/lib/semmle/code/cil/Instruction.qll @@ -3,7 +3,7 @@ private import CIL /** An instruction. */ -class Instruction extends Element, ControlFlowNode, DataFlowNode, @cil_instruction { +deprecated class Instruction extends Element, ControlFlowNode, DataFlowNode, @cil_instruction { override string toString() { result = this.getOpcodeName() } /** Gets a more verbose textual representation of this instruction. */ diff --git a/csharp/ql/lib/semmle/code/cil/InstructionGroups.qll b/csharp/ql/lib/semmle/code/cil/InstructionGroups.qll index 3c2a1646f42..c43c06b72b4 100644 --- a/csharp/ql/lib/semmle/code/cil/InstructionGroups.qll +++ b/csharp/ql/lib/semmle/code/cil/InstructionGroups.qll @@ -9,7 +9,7 @@ private import dotnet /** * An instruction that pushes a value onto the stack. */ -class Expr extends DotNet::Expr, Instruction, @cil_expr { +deprecated class Expr extends DotNet::Expr, Instruction, @cil_expr { override int getPushCount() { result = 1 } override Type getType() { result = Instruction.super.getType() } @@ -24,7 +24,7 @@ class Expr extends DotNet::Expr, Instruction, @cil_expr { } /** An instruction that changes control flow. */ -class Branch extends Instruction, @cil_jump { +deprecated class Branch extends Instruction, @cil_jump { /** Gets the instruction that is jumped to. */ Instruction getTarget() { cil_jump(this, result) } @@ -32,7 +32,7 @@ class Branch extends Instruction, @cil_jump { } /** An instruction that unconditionally jumps to another instruction. */ -class UnconditionalBranch extends Branch, @cil_unconditional_jump { +deprecated class UnconditionalBranch extends Branch, @cil_unconditional_jump { override Instruction getASuccessorType(FlowType t) { t instanceof NormalFlow and result = this.getTarget() } @@ -41,7 +41,7 @@ class UnconditionalBranch extends Branch, @cil_unconditional_jump { } /** An instruction that jumps to a target based on a condition. */ -class ConditionalBranch extends Branch, @cil_conditional_jump { +deprecated class ConditionalBranch extends Branch, @cil_conditional_jump { override Instruction getASuccessorType(FlowType t) { t instanceof TrueFlow and result = this.getTarget() or @@ -52,12 +52,12 @@ class ConditionalBranch extends Branch, @cil_conditional_jump { } /** An expression with two operands. */ -class BinaryExpr extends Expr, @cil_binary_expr { +deprecated class BinaryExpr extends Expr, @cil_binary_expr { override int getPopCount() { result = 2 } } /** An expression with one operand. */ -class UnaryExpr extends Expr, @cil_unary_expr { +deprecated class UnaryExpr extends Expr, @cil_unary_expr { override int getPopCount() { result = 1 } /** Gets the operand of this unary expression. */ @@ -65,12 +65,12 @@ class UnaryExpr extends Expr, @cil_unary_expr { } /** A binary expression that compares two values. */ -class ComparisonOperation extends BinaryExpr, @cil_comparison_operation { +deprecated class ComparisonOperation extends BinaryExpr, @cil_comparison_operation { override BoolType getType() { exists(result) } } /** A binary arithmetic expression. */ -class BinaryArithmeticExpr extends BinaryExpr, @cil_binary_arithmetic_operation { +deprecated class BinaryArithmeticExpr extends BinaryExpr, @cil_binary_arithmetic_operation { override Type getType() { exists(Type t0, Type t1 | t0 = this.getOperandType(0).getUnderlyingType() and @@ -86,28 +86,28 @@ class BinaryArithmeticExpr extends BinaryExpr, @cil_binary_arithmetic_operation } /** A binary bitwise expression. */ -class BinaryBitwiseOperation extends BinaryExpr, @cil_binary_bitwise_operation { +deprecated class BinaryBitwiseOperation extends BinaryExpr, @cil_binary_bitwise_operation { // This is wrong but efficient - should depend on the types of the operands. override IntType getType() { exists(result) } } /** A unary bitwise expression. */ -class UnaryBitwiseOperation extends UnaryExpr, @cil_unary_bitwise_operation { +deprecated class UnaryBitwiseOperation extends UnaryExpr, @cil_unary_bitwise_operation { // This is wrong but efficient - should depend on the types of the operands. override IntType getType() { exists(result) } } /** A unary expression that converts a value from one primitive type to another. */ -class Conversion extends UnaryExpr, @cil_conversion_operation { +deprecated class Conversion extends UnaryExpr, @cil_conversion_operation { /** Gets the expression being converted. */ Expr getExpr() { result = this.getOperand(0) } } /** A branch that leaves the scope of a `Handler`. */ -class Leave extends UnconditionalBranch, @cil_leave_any { } +deprecated class Leave extends UnconditionalBranch, @cil_leave_any { } /** An expression that pushes a literal value onto the stack. */ -class Literal extends DotNet::Literal, Expr, @cil_literal { +deprecated class Literal extends DotNet::Literal, Expr, @cil_literal { /** Gets the pushed value. */ override string getValue() { cil_value(this, result) } @@ -115,37 +115,37 @@ class Literal extends DotNet::Literal, Expr, @cil_literal { } /** An integer literal. */ -class IntLiteral extends Literal, @cil_ldc_i { +deprecated class IntLiteral extends Literal, @cil_ldc_i { override string getExtra() { none() } override IntType getType() { exists(result) } } /** An expression that pushes a `float`/`Single`. */ -class FloatLiteral extends Literal, @cil_ldc_r { } +deprecated class FloatLiteral extends Literal, @cil_ldc_r { } /** An expression that pushes a `null` value onto the stack. */ -class NullLiteral extends Literal, @cil_ldnull { } +deprecated class NullLiteral extends Literal, @cil_ldnull { } /** An expression that pushes a string onto the stack. */ -class StringLiteral extends Literal, @cil_ldstr { } +deprecated class StringLiteral extends Literal, @cil_ldstr { } /** A branch with one operand. */ -class UnaryBranch extends ConditionalBranch, @cil_unary_jump { +deprecated class UnaryBranch extends ConditionalBranch, @cil_unary_jump { override int getPopCount() { result = 1 } override int getPushCount() { result = 0 } } /** A branch with two operands. */ -class BinaryBranch extends ConditionalBranch, @cil_binary_jump { +deprecated class BinaryBranch extends ConditionalBranch, @cil_binary_jump { override int getPopCount() { result = 2 } override int getPushCount() { result = 0 } } /** A call. */ -class Call extends Expr, DotNet::Call, @cil_call_any { +deprecated class Call extends Expr, DotNet::Call, @cil_call_any { /** Gets the method that is called. */ override Method getTarget() { cil_access(this, result) } @@ -198,24 +198,24 @@ class Call extends Expr, DotNet::Call, @cil_call_any { } /** A tail call. */ -class TailCall extends Call { +deprecated class TailCall extends Call { TailCall() { this.isTailCall() } override predicate canFlowNext() { none() } } /** A call to a static target. */ -class StaticCall extends Call { +deprecated class StaticCall extends Call { StaticCall() { not this.isVirtual() } } /** A call to a virtual target. */ -class VirtualCall extends Call { +deprecated class VirtualCall extends Call { VirtualCall() { this.isVirtual() } } /** A read of an array element. */ -class ReadArrayElement extends BinaryExpr, @cil_read_array { +deprecated class ReadArrayElement extends BinaryExpr, @cil_read_array { /** Gets the array being read. */ Expr getArray() { result = this.getOperand(1) } @@ -224,14 +224,14 @@ class ReadArrayElement extends BinaryExpr, @cil_read_array { } /** A write of an array element. */ -class WriteArrayElement extends Instruction, @cil_write_array { +deprecated class WriteArrayElement extends Instruction, @cil_write_array { override int getPushCount() { result = 0 } override int getPopCount() { result = 3 } } /** A `return` statement. */ -class Return extends Instruction, @cil_ret { +deprecated class Return extends Instruction, @cil_ret { /** Gets the expression being returned, if any. */ Expr getExpr() { result = this.getOperand(0) } @@ -239,7 +239,7 @@ class Return extends Instruction, @cil_ret { } /** A `throw` statement. */ -class Throw extends Instruction, DotNet::Throw, @cil_throw_any { +deprecated class Throw extends Instruction, DotNet::Throw, @cil_throw_any { override Expr getExpr() { result = this.getOperand(0) } /** Gets the type of the exception being thrown. */ @@ -249,7 +249,7 @@ class Throw extends Instruction, DotNet::Throw, @cil_throw_any { } /** Stores a value at an address/location. */ -class StoreIndirect extends Instruction, @cil_stind { +deprecated class StoreIndirect extends Instruction, @cil_stind { override int getPopCount() { result = 2 } /** Gets the location to store the value at. */ @@ -260,4 +260,4 @@ class StoreIndirect extends Instruction, @cil_stind { } /** Loads a value from an address/location. */ -class LoadIndirect extends UnaryExpr, @cil_ldind { } +deprecated class LoadIndirect extends UnaryExpr, @cil_ldind { } diff --git a/csharp/ql/lib/semmle/code/cil/Instructions.qll b/csharp/ql/lib/semmle/code/cil/Instructions.qll index 8828e8e4e42..6de4e718416 100644 --- a/csharp/ql/lib/semmle/code/cil/Instructions.qll +++ b/csharp/ql/lib/semmle/code/cil/Instructions.qll @@ -8,7 +8,7 @@ private import CIL private import semmle.code.dotnet.Variable as DotNet -module Opcodes { +deprecated module Opcodes { /** An `ldc.i4.m1` instruction. */ class Ldc_i4_m1 extends IntLiteral, @cil_ldc_i4_m1 { override string getOpcodeName() { result = "ldc.i4.m1" } diff --git a/csharp/ql/lib/semmle/code/cil/Method.qll b/csharp/ql/lib/semmle/code/cil/Method.qll index b2e40ce70ca..cfc38f58202 100644 --- a/csharp/ql/lib/semmle/code/cil/Method.qll +++ b/csharp/ql/lib/semmle/code/cil/Method.qll @@ -12,7 +12,7 @@ private import dotnet /** * An implementation of a method in an assembly. */ -class MethodImplementation extends EntryPoint, @cil_method_implementation { +deprecated class MethodImplementation extends EntryPoint, @cil_method_implementation { /** Gets the method of this implementation. */ Method getMethod() { cil_method_implementation(this, result, _) } @@ -66,7 +66,7 @@ class MethodImplementation extends EntryPoint, @cil_method_implementation { * A method, which corresponds to any callable in C#, including constructors, * destructors, operators, accessors and so on. */ -class Method extends DotNet::Callable, Element, Member, TypeContainer, DataFlowNode, +deprecated class Method extends DotNet::Callable, Element, Member, TypeContainer, DataFlowNode, CustomModifierReceiver, Parameterizable, @cil_method { /** @@ -191,27 +191,27 @@ class Method extends DotNet::Callable, Element, Member, TypeContainer, DataFlowN } /** A destructor/finalizer. */ -class Destructor extends Method, DotNet::Destructor { +deprecated class Destructor extends Method, DotNet::Destructor { Destructor() { this.isFinalizer() } } /** A constructor. */ -class Constructor extends Method, DotNet::Constructor { +deprecated class Constructor extends Method, DotNet::Constructor { Constructor() { this.isConstructor() } } /** A static/class constructor. */ -class StaticConstructor extends Constructor { +deprecated class StaticConstructor extends Constructor { StaticConstructor() { this.isStaticConstructor() } } /** An instance constructor. */ -class InstanceConstructor extends Constructor { +deprecated class InstanceConstructor extends Constructor { InstanceConstructor() { this.isInstanceConstructor() } } /** A method that always returns the `this` parameter. */ -class ChainingMethod extends Method { +deprecated class ChainingMethod extends Method { ChainingMethod() { forex(Return ret | ret = this.getImplementation().getAnInstruction() | ret.getExpr() instanceof ThisAccess @@ -220,13 +220,13 @@ class ChainingMethod extends Method { } /** An accessor. */ -abstract class Accessor extends Method { +abstract deprecated class Accessor extends Method { /** Gets the property declaring this accessor. */ abstract Property getProperty(); } /** A getter. */ -class Getter extends Accessor { +deprecated class Getter extends Accessor { Getter() { cil_getter(_, this) } override Property getProperty() { cil_getter(result, this) } @@ -236,7 +236,7 @@ class Getter extends Accessor { * A method that does nothing but retrieve a field. * Note that this is not necessarily a property getter. */ -class TrivialGetter extends Method { +deprecated class TrivialGetter extends Method { TrivialGetter() { exists(MethodImplementation impl | impl = this.getAnImplementation() | impl.getInstruction(0) instanceof ThisAccess and @@ -252,7 +252,7 @@ class TrivialGetter extends Method { } /** A setter. */ -class Setter extends Accessor { +deprecated class Setter extends Accessor { Setter() { cil_setter(_, this) } override Property getProperty() { cil_setter(result, this) } @@ -269,7 +269,7 @@ class Setter extends Accessor { * A method that does nothing but set a field. * This is not necessarily a property setter. */ -class TrivialSetter extends Method { +deprecated class TrivialSetter extends Method { TrivialSetter() { exists(MethodImplementation impl | impl = this.getAnImplementation() | impl.getInstruction(0) instanceof ThisAccess and @@ -285,10 +285,10 @@ class TrivialSetter extends Method { } /** An alias for `Method` for compatibility with the C# data model. */ -class Callable = Method; +deprecated class Callable = Method; /** An operator. */ -class Operator extends Method { +deprecated class Operator extends Method { Operator() { this.isOperator() } /** Gets the name of the implementing method (for compatibility with C# data model). */ diff --git a/csharp/ql/lib/semmle/code/cil/Parameterizable.qll b/csharp/ql/lib/semmle/code/cil/Parameterizable.qll index 77b16aba025..5c4ef2fb51d 100644 --- a/csharp/ql/lib/semmle/code/cil/Parameterizable.qll +++ b/csharp/ql/lib/semmle/code/cil/Parameterizable.qll @@ -8,7 +8,7 @@ private import dotnet /** * A parameterizable entity, such as `FunctionPointerType` or `Method`. */ -class Parameterizable extends DotNet::Parameterizable, Element, @cil_parameterizable { +deprecated class Parameterizable extends DotNet::Parameterizable, Element, @cil_parameterizable { override Parameter getRawParameter(int n) { cil_parameter(result, this, n, _) } override Parameter getParameter(int n) { cil_parameter(result, this, n, _) } diff --git a/csharp/ql/lib/semmle/code/cil/Ssa.qll b/csharp/ql/lib/semmle/code/cil/Ssa.qll index b9c56763a3d..c1dcad4fef5 100644 --- a/csharp/ql/lib/semmle/code/cil/Ssa.qll +++ b/csharp/ql/lib/semmle/code/cil/Ssa.qll @@ -7,7 +7,7 @@ private import CIL /** * Provides classes for working with static single assignment (SSA) form. */ -module Ssa { +deprecated module Ssa { private import internal.SsaImpl as SsaImpl /** An SSA definition. */ diff --git a/csharp/ql/lib/semmle/code/cil/Stubs.qll b/csharp/ql/lib/semmle/code/cil/Stubs.qll index 7617119e617..45bad86cfb8 100644 --- a/csharp/ql/lib/semmle/code/cil/Stubs.qll +++ b/csharp/ql/lib/semmle/code/cil/Stubs.qll @@ -8,7 +8,7 @@ import CIL * The average number of instructions per method, * below which an assembly is probably a stub. */ -private float stubInstructionThreshold() { result = 5.1 } +deprecated private float stubInstructionThreshold() { result = 5.1 } cached private module Cached { @@ -18,7 +18,7 @@ private module Cached { * Look at the average number of instructions per method. */ cached - predicate assemblyIsStubImpl(Assembly asm) { + deprecated predicate assemblyIsStubImpl(Assembly asm) { exists(int totalInstructions, int totalImplementations | totalInstructions = count(Instruction i | i.getImplementation().getLocation() = asm) and totalImplementations = @@ -28,7 +28,7 @@ private module Cached { } cached - predicate bestImplementation(MethodImplementation mi) { + deprecated predicate bestImplementation(MethodImplementation mi) { exists(Assembly asm | asm = mi.getLocation() and (assemblyIsStubImpl(asm) implies asm.getFile().extractedQlTest()) and @@ -45,13 +45,13 @@ private module Cached { private import Cached -predicate assemblyIsStub = assemblyIsStubImpl/1; +deprecated predicate assemblyIsStub = assemblyIsStubImpl/1; /** * A method implementation that is the "best" one for a particular method, * if there are several potential implementations to choose between, and * excludes implementations that are probably from stub/reference assemblies. */ -class BestImplementation extends MethodImplementation { +deprecated class BestImplementation extends MethodImplementation { BestImplementation() { bestImplementation(this) } } diff --git a/csharp/ql/lib/semmle/code/cil/Type.qll b/csharp/ql/lib/semmle/code/cil/Type.qll index 32337e127e7..370a1437c8c 100644 --- a/csharp/ql/lib/semmle/code/cil/Type.qll +++ b/csharp/ql/lib/semmle/code/cil/Type.qll @@ -11,7 +11,7 @@ private import semmle.code.csharp.commons.QualifiedName * * Either a type (`Type`), a method(`Method`), or a namespace (`Namespace`). */ -class TypeContainer extends DotNet::NamedElement, @cil_type_container { +deprecated class TypeContainer extends DotNet::NamedElement, @cil_type_container { /** Gets the parent of this type container, if any. */ TypeContainer getParent() { none() } @@ -19,7 +19,7 @@ class TypeContainer extends DotNet::NamedElement, @cil_type_container { } /** A namespace. */ -class Namespace extends DotNet::Namespace, TypeContainer, @namespace { +deprecated class Namespace extends DotNet::Namespace, TypeContainer, @namespace { override string toString() { result = this.getFullName() } override Namespace getParent() { result = this.getParentNamespace() } @@ -32,7 +32,7 @@ class Namespace extends DotNet::Namespace, TypeContainer, @namespace { /** * A type. */ -class Type extends DotNet::Type, Declaration, TypeContainer, @cil_type { +deprecated class Type extends DotNet::Type, Declaration, TypeContainer, @cil_type { override TypeContainer getParent() { cil_type(this, _, _, result, _) } override string getName() { cil_type(this, result, _, _, _) } diff --git a/csharp/ql/lib/semmle/code/cil/Types.qll b/csharp/ql/lib/semmle/code/cil/Types.qll index 2cfc09daf99..184bbd21c30 100644 --- a/csharp/ql/lib/semmle/code/cil/Types.qll +++ b/csharp/ql/lib/semmle/code/cil/Types.qll @@ -6,7 +6,7 @@ private import CIL private import dotnet /** A type parameter. */ -class TypeParameter extends DotNet::TypeParameter, Type, @cil_typeparameter { +deprecated class TypeParameter extends DotNet::TypeParameter, Type, @cil_typeparameter { override int getIndex() { cil_type_parameter(_, result, this) } /** Gets the generic type/method declaring this type parameter. */ @@ -33,7 +33,7 @@ class TypeParameter extends DotNet::TypeParameter, Type, @cil_typeparameter { } /** A value or reference type. */ -class ValueOrRefType extends DotNet::ValueOrRefType, Type, @cil_valueorreftype { +deprecated class ValueOrRefType extends DotNet::ValueOrRefType, Type, @cil_valueorreftype { override ValueOrRefType getDeclaringType() { result = this.getParent() } override string getUndecoratedName() { cil_type(this, result, _, _, _) } @@ -44,7 +44,7 @@ class ValueOrRefType extends DotNet::ValueOrRefType, Type, @cil_valueorreftype { } /** An `enum`. */ -class Enum extends ValueOrRefType { +deprecated class Enum extends ValueOrRefType { Enum() { this.isEnum() } override IntegralType getUnderlyingType() { @@ -56,17 +56,17 @@ class Enum extends ValueOrRefType { } /** A `class`. */ -class Class extends ValueOrRefType { +deprecated class Class extends ValueOrRefType { Class() { this.isClass() } } /** An `interface`. */ -class Interface extends ValueOrRefType { +deprecated class Interface extends ValueOrRefType { Interface() { this.isInterface() } } /** An array. */ -class ArrayType extends DotNet::ArrayType, Type, @cil_array_type { +deprecated class ArrayType extends DotNet::ArrayType, Type, @cil_array_type { override Type getElementType() { cil_array_type(this, result, _) } /** Gets the rank of this array. */ @@ -80,7 +80,7 @@ class ArrayType extends DotNet::ArrayType, Type, @cil_array_type { } /** A pointer type. */ -class PointerType extends DotNet::PointerType, PrimitiveType, @cil_pointer_type { +deprecated class PointerType extends DotNet::PointerType, PrimitiveType, @cil_pointer_type { override Type getReferentType() { cil_pointer_type(this, result) } override IntType getUnderlyingType() { any() } @@ -95,31 +95,31 @@ class PointerType extends DotNet::PointerType, PrimitiveType, @cil_pointer_type } /** A primitive type, built into the runtime. */ -abstract class PrimitiveType extends Type { } +abstract deprecated class PrimitiveType extends Type { } /** * A primitive numeric type. * Either an integral type (`IntegralType`) or a floating point type (`FloatingPointType`). */ -abstract class NumericType extends PrimitiveType, ValueOrRefType { } +abstract deprecated class NumericType extends PrimitiveType, ValueOrRefType { } /** A floating point type. Either single precision (`FloatType`) or double precision (`DoubleType`). */ -abstract class FloatingPointType extends NumericType { } +abstract deprecated class FloatingPointType extends NumericType { } /** * An integral numeric type. Either a signed integral type (`SignedIntegralType`) * or an unsigned integral type (`UnsignedIntegralType`). */ -abstract class IntegralType extends NumericType { } +abstract deprecated class IntegralType extends NumericType { } /** A signed integral type. */ -abstract class SignedIntegralType extends IntegralType { } +abstract deprecated class SignedIntegralType extends IntegralType { } /** An unsigned integral type. */ -abstract class UnsignedIntegralType extends IntegralType { } +abstract deprecated class UnsignedIntegralType extends IntegralType { } /** The `void` type, `System.Void`. */ -class VoidType extends PrimitiveType { +deprecated class VoidType extends PrimitiveType { VoidType() { this.isSystemType("Void") } override string toString() { result = "void" } @@ -128,7 +128,7 @@ class VoidType extends PrimitiveType { } /** The type `System.Int32`. */ -class IntType extends SignedIntegralType { +deprecated class IntType extends SignedIntegralType { IntType() { this.isSystemType("Int32") } override string toStringWithTypes() { result = "int" } @@ -139,21 +139,21 @@ class IntType extends SignedIntegralType { } /** The type `System.IntPtr`. */ -class IntPtrType extends PrimitiveType { +deprecated class IntPtrType extends PrimitiveType { IntPtrType() { this.isSystemType("IntPtr") } override IntType getUnderlyingType() { any() } } /** The type `System.UIntPtr`. */ -class UIntPtrType extends PrimitiveType { +deprecated class UIntPtrType extends PrimitiveType { UIntPtrType() { this.isSystemType("UIntPtr") } override IntType getUnderlyingType() { any() } } /** The type `System.UInt32`. */ -class UIntType extends UnsignedIntegralType { +deprecated class UIntType extends UnsignedIntegralType { UIntType() { this.isSystemType("UInt32") } override string toStringWithTypes() { result = "uint" } @@ -164,7 +164,7 @@ class UIntType extends UnsignedIntegralType { } /** The type `System.SByte`. */ -class SByteType extends SignedIntegralType { +deprecated class SByteType extends SignedIntegralType { SByteType() { this.isSystemType("SByte") } override string toStringWithTypes() { result = "sbyte" } @@ -173,7 +173,7 @@ class SByteType extends SignedIntegralType { } /** The type `System.Byte`. */ -class ByteType extends UnsignedIntegralType { +deprecated class ByteType extends UnsignedIntegralType { ByteType() { this.isSystemType("Byte") } override string toStringWithTypes() { result = "byte" } @@ -184,7 +184,7 @@ class ByteType extends UnsignedIntegralType { } /** The type `System.Int16`. */ -class ShortType extends SignedIntegralType { +deprecated class ShortType extends SignedIntegralType { ShortType() { this.isSystemType("Int16") } override string toStringWithTypes() { result = "short" } @@ -193,7 +193,7 @@ class ShortType extends SignedIntegralType { } /** The type `System.UInt16`. */ -class UShortType extends UnsignedIntegralType { +deprecated class UShortType extends UnsignedIntegralType { UShortType() { this.isSystemType("UInt16") } override string toStringWithTypes() { result = "ushort" } @@ -204,7 +204,7 @@ class UShortType extends UnsignedIntegralType { } /** The type `System.Int64`. */ -class LongType extends SignedIntegralType { +deprecated class LongType extends SignedIntegralType { LongType() { this.isSystemType("Int64") } override string toStringWithTypes() { result = "long" } @@ -213,7 +213,7 @@ class LongType extends SignedIntegralType { } /** The type `System.UInt64`. */ -class ULongType extends UnsignedIntegralType { +deprecated class ULongType extends UnsignedIntegralType { ULongType() { this.isSystemType("UInt64") } override string toStringWithTypes() { result = "ulong" } @@ -224,7 +224,7 @@ class ULongType extends UnsignedIntegralType { } /** The type `System.Decimal`. */ -class DecimalType extends SignedIntegralType { +deprecated class DecimalType extends SignedIntegralType { DecimalType() { this.isSystemType("Decimal") } override string toStringWithTypes() { result = "decimal" } @@ -233,21 +233,21 @@ class DecimalType extends SignedIntegralType { } /** The type `System.String`. */ -class StringType extends PrimitiveType, ValueOrRefType { +deprecated class StringType extends PrimitiveType, ValueOrRefType { StringType() { this.isSystemType("String") } override string toStringWithTypes() { result = "string" } } /** The type `System.Object`. */ -class ObjectType extends ValueOrRefType { +deprecated class ObjectType extends ValueOrRefType { ObjectType() { this.isSystemType("Object") } override string toStringWithTypes() { result = "object" } } /** The type `System.Boolean`. */ -class BoolType extends PrimitiveType, ValueOrRefType { +deprecated class BoolType extends PrimitiveType, ValueOrRefType { BoolType() { this.isSystemType("Boolean") } override string toStringWithTypes() { result = "bool" } @@ -256,7 +256,7 @@ class BoolType extends PrimitiveType, ValueOrRefType { } /** The type `System.Double`. */ -class DoubleType extends FloatingPointType { +deprecated class DoubleType extends FloatingPointType { DoubleType() { this.isSystemType("Double") } override string toStringWithTypes() { result = "double" } @@ -265,7 +265,7 @@ class DoubleType extends FloatingPointType { } /** The type `System.Single`. */ -class FloatType extends FloatingPointType { +deprecated class FloatType extends FloatingPointType { FloatType() { this.isSystemType("Single") } override string toStringWithTypes() { result = "float" } @@ -274,7 +274,7 @@ class FloatType extends FloatingPointType { } /** The type `System.Char`. */ -class CharType extends IntegralType { +deprecated class CharType extends IntegralType { CharType() { this.isSystemType("Char") } override string toStringWithTypes() { result = "char" } @@ -285,7 +285,7 @@ class CharType extends IntegralType { } /** The type `System.Type`. */ -class SystemType extends ValueOrRefType { +deprecated class SystemType extends ValueOrRefType { SystemType() { this.isSystemType("Type") } } @@ -296,7 +296,7 @@ class SystemType extends ValueOrRefType { * delegate* * ``` */ -class FunctionPointerType extends Type, CustomModifierReceiver, Parameterizable, +deprecated class FunctionPointerType extends Type, CustomModifierReceiver, Parameterizable, @cil_function_pointer_type { /** Gets the return type of this function pointer. */ diff --git a/csharp/ql/lib/semmle/code/cil/Variable.qll b/csharp/ql/lib/semmle/code/cil/Variable.qll index 7ad9b37c024..99c3d049700 100644 --- a/csharp/ql/lib/semmle/code/cil/Variable.qll +++ b/csharp/ql/lib/semmle/code/cil/Variable.qll @@ -6,7 +6,7 @@ private import CIL private import dotnet /** A variable. Either a stack variable (`StackVariable`) or a field (`Field`). */ -class Variable extends DotNet::Variable, Declaration, DataFlowNode, @cil_variable { +deprecated class Variable extends DotNet::Variable, Declaration, DataFlowNode, @cil_variable { /** Gets the type of this variable. */ override Type getType() { none() } @@ -28,7 +28,7 @@ class Variable extends DotNet::Variable, Declaration, DataFlowNode, @cil_variabl } /** A stack variable. Either a local variable (`LocalVariable`) or a parameter (`Parameter`). */ -class StackVariable extends Variable, @cil_stack_variable { +deprecated class StackVariable extends Variable, @cil_stack_variable { deprecated override predicate hasQualifiedName(string qualifier, string name) { none() } override predicate hasFullyQualifiedName(string qualifier, string name) { none() } @@ -39,7 +39,7 @@ class StackVariable extends Variable, @cil_stack_variable { * * Each method in CIL has a number of typed local variables, in addition to the evaluation stack. */ -class LocalVariable extends StackVariable, @cil_local_variable { +deprecated class LocalVariable extends StackVariable, @cil_local_variable { override string toString() { result = "Local variable " + this.getIndex() + " of method " + @@ -60,7 +60,7 @@ class LocalVariable extends StackVariable, @cil_local_variable { } /** A parameter of a `Method` or `FunctionPointerType`. */ -class Parameter extends DotNet::Parameter, CustomModifierReceiver, @cil_parameter { +deprecated class Parameter extends DotNet::Parameter, CustomModifierReceiver, @cil_parameter { override Parameterizable getDeclaringElement() { cil_parameter(this, result, _, _) } /** Gets the index of this parameter. */ @@ -107,7 +107,7 @@ class Parameter extends DotNet::Parameter, CustomModifierReceiver, @cil_paramete } /** A method parameter. */ -class MethodParameter extends Parameter, StackVariable { +deprecated class MethodParameter extends Parameter, StackVariable { /** Gets the method declaring this parameter. */ override Method getMethod() { this = result.getARawParameter() } @@ -132,7 +132,7 @@ class MethodParameter extends Parameter, StackVariable { } /** A parameter corresponding to `this`. */ -class ThisParameter extends MethodParameter { +deprecated class ThisParameter extends MethodParameter { ThisParameter() { not this.getMethod().isStatic() and this.getIndex() = 0 @@ -140,7 +140,7 @@ class ThisParameter extends MethodParameter { } /** A field. */ -class Field extends DotNet::Field, Variable, Member, CustomModifierReceiver, @cil_field { +deprecated class Field extends DotNet::Field, Variable, Member, CustomModifierReceiver, @cil_field { override string toString() { result = this.getName() } override string toStringWithTypes() { diff --git a/csharp/ql/lib/semmle/code/cil/internal/SsaImpl.qll b/csharp/ql/lib/semmle/code/cil/internal/SsaImpl.qll index 460b40ac227..70e77c66ddb 100644 --- a/csharp/ql/lib/semmle/code/cil/internal/SsaImpl.qll +++ b/csharp/ql/lib/semmle/code/cil/internal/SsaImpl.qll @@ -1,7 +1,7 @@ private import cil private import codeql.ssa.Ssa as SsaImplCommon -private module SsaInput implements SsaImplCommon::InputSig { +deprecated private module SsaInput implements SsaImplCommon::InputSig { class BasicBlock = CIL::BasicBlock; BasicBlock getImmediateBasicBlockDominator(BasicBlock bb) { result = bb.getImmediateDominator() } @@ -29,17 +29,17 @@ private module SsaInput implements SsaImplCommon::InputSig { } } -import SsaImplCommon::Make +deprecated import SsaImplCommon::Make cached private module Cached { private import CIL cached - predicate forceCachingInSameStage() { any() } + deprecated predicate forceCachingInSameStage() { any() } cached - ReadAccess getARead(Definition def) { + deprecated ReadAccess getARead(Definition def) { exists(BasicBlock bb, int i | ssaDefReachesRead(_, def, bb, i) and result = bb.getNode(i) @@ -47,7 +47,7 @@ private module Cached { } cached - ReadAccess getAFirstReadExt(DefinitionExt def) { + deprecated ReadAccess getAFirstReadExt(DefinitionExt def) { exists(BasicBlock bb1, int i1, BasicBlock bb2, int i2 | def.definesAt(_, bb1, i1, _) and adjacentDefReadExt(def, _, bb1, i1, bb2, i2) and @@ -56,7 +56,7 @@ private module Cached { } cached - predicate hasAdjacentReadsExt(DefinitionExt def, ReadAccess first, ReadAccess second) { + deprecated predicate hasAdjacentReadsExt(DefinitionExt def, ReadAccess first, ReadAccess second) { exists(BasicBlock bb1, int i1, BasicBlock bb2, int i2 | first = bb1.getNode(i1) and adjacentDefReadExt(def, _, bb1, i1, bb2, i2) and @@ -65,10 +65,12 @@ private module Cached { } cached - Definition getAPhiInput(PhiNode phi) { phiHasInputFromBlock(phi, result, _) } + deprecated Definition getAPhiInput(PhiNode phi) { phiHasInputFromBlock(phi, result, _) } cached - predicate lastRefBeforeRedefExt(DefinitionExt def, BasicBlock bb, int i, DefinitionExt next) { + deprecated predicate lastRefBeforeRedefExt( + DefinitionExt def, BasicBlock bb, int i, DefinitionExt next + ) { lastRefRedefExt(def, _, bb, i, next) } } diff --git a/csharp/ql/lib/semmle/code/csharp/AnnotatedType.qll b/csharp/ql/lib/semmle/code/csharp/AnnotatedType.qll index b45b743c40c..98447be7e4e 100644 --- a/csharp/ql/lib/semmle/code/csharp/AnnotatedType.qll +++ b/csharp/ql/lib/semmle/code/csharp/AnnotatedType.qll @@ -159,6 +159,11 @@ private module Annotations { getNoFlagsNullability(result) = getChildNullability(annotations.getNullability(), i) } + pragma[nomagic] + private Nullability getChildNullability0(Nullability n, int i) { + nullability_parent(getNullability(result), i, getNullability(n)) + } + /** * Gets the `i`th child of nullability `n`. * Returns `n` if the nullability is not explicitly @@ -167,9 +172,10 @@ private module Annotations { */ bindingset[i] Nullability getChildNullability(Nullability n, int i) { - if nullability_parent(_, i, getNullability(n)) - then nullability_parent(getNullability(result), i, getNullability(n)) - else result = n + result = getChildNullability0(n, i) + or + not exists(getChildNullability0(n, i)) and + result = n } /** @@ -276,6 +282,11 @@ private Annotations::Nullability getElementNullability(@has_type_annotation elem else result instanceof Annotations::NoNullability } +pragma[nomagic] +private predicate isNoFlagsNoNullability(Annotations::TypeAnnotations annotations) { + Annotations::getNoFlagsNullability(annotations) instanceof Annotations::NoNullability +} + private newtype TAnnotatedType = TAnnotatedTypeNullability(Type type, Annotations::TypeAnnotations annotations) { Annotations::elementTypeAnnotations(_, type, annotations) @@ -288,7 +299,7 @@ private newtype TAnnotatedType = Annotations::getNoFlagsNullability(annotations) = getTypeParameterNullability(_, type) or // All types have at least one annotated type - Annotations::getNoFlagsNullability(annotations) instanceof Annotations::NoNullability + isNoFlagsNoNullability(annotations) and exists(type) or exists(AnnotatedArrayType at | type = at.getType().(ArrayType).getElementType() and diff --git a/csharp/ql/lib/semmle/code/csharp/Callable.qll b/csharp/ql/lib/semmle/code/csharp/Callable.qll index 89f29458cc9..9cd365c2ecd 100644 --- a/csharp/ql/lib/semmle/code/csharp/Callable.qll +++ b/csharp/ql/lib/semmle/code/csharp/Callable.qll @@ -8,7 +8,6 @@ import Stmt import Type import exprs.Call private import commons.QualifiedName -private import dotnet private import semmle.code.csharp.ExprOrStmtParent private import semmle.code.csharp.metrics.Complexity private import TypeRef @@ -21,8 +20,73 @@ private import TypeRef * an anonymous function (`AnonymousFunctionExpr`), or a local function * (`LocalFunction`). */ -class Callable extends DotNet::Callable, Parameterizable, ExprOrStmtParent, @callable { - override Type getReturnType() { none() } +class Callable extends Parameterizable, ExprOrStmtParent, @callable { + pragma[noinline] + deprecated private string getDeclaringTypeLabel() { result = this.getDeclaringType().getLabel() } + + pragma[noinline] + deprecated private string getParameterTypeLabelNonGeneric(int p) { + not this instanceof Generic and + result = this.getParameter(p).getType().getLabel() + } + + language[monotonicAggregates] + pragma[nomagic] + deprecated private string getMethodParamListNonGeneric() { + result = + concat(int p | + p in [0 .. this.getNumberOfParameters() - 1] + | + this.getParameterTypeLabelNonGeneric(p), "," order by p + ) + } + + pragma[noinline] + deprecated private string getParameterTypeLabelGeneric(int p) { + this instanceof Generic and + result = this.getParameter(p).getType().getLabel() + } + + language[monotonicAggregates] + pragma[nomagic] + deprecated private string getMethodParamListGeneric() { + result = + concat(int p | + p in [0 .. this.getNumberOfParameters() - 1] + | + this.getParameterTypeLabelGeneric(p), "," order by p + ) + } + + pragma[noinline] + deprecated private string getLabelNonGeneric() { + not this instanceof Generic and + result = + this.getReturnTypeLabel() + " " + this.getDeclaringTypeLabel() + "." + + this.getUndecoratedName() + "(" + this.getMethodParamListNonGeneric() + ")" + } + + pragma[noinline] + deprecated private string getLabelGeneric() { + result = + this.getReturnTypeLabel() + " " + this.getDeclaringTypeLabel() + "." + + this.getUndecoratedName() + getGenericsLabel(this) + "(" + this.getMethodParamListGeneric() + + ")" + } + + deprecated final override string getLabel() { + result = this.getLabelNonGeneric() or + result = this.getLabelGeneric() + } + + deprecated private string getReturnTypeLabel() { + result = this.getReturnType().getLabel() + or + not exists(this.getReturnType()) and result = "System.Void" + } + + /** Gets the return type of this callable. */ + Type getReturnType() { none() } /** Gets the annotated return type of this callable. */ final AnnotatedType getAnnotatedReturnType() { result.appliesTo(this) } @@ -65,7 +129,8 @@ class Callable extends DotNet::Callable, Parameterizable, ExprOrStmtParent, @cal result = this.getExpressionBody() } - override predicate hasBody() { exists(this.getBody()) } + /** Holds if this callable has a body or an implementation. */ + predicate hasBody() { exists(this.getBody()) } /** * Holds if this callable has a non-empty body. That is, either it has @@ -196,7 +261,8 @@ class Callable extends DotNet::Callable, Parameterizable, ExprOrStmtParent, @cal ) } - override predicate canReturn(DotNet::Expr e) { + /** Holds if this callable can return expression `e`. */ + predicate canReturn(Expr e) { exists(ReturnStmt ret | ret.getEnclosingCallable() = this | e = ret.getExpr()) or e = this.getExpressionBody() and @@ -218,8 +284,6 @@ class Callable extends DotNet::Callable, Parameterizable, ExprOrStmtParent, @cal /** Gets a `Call` that has this callable as a target. */ Call getACall() { this = result.getTarget() } - - override Parameter getAParameter() { result = Parameterizable.super.getAParameter() } } /** @@ -325,7 +389,7 @@ class ExtensionMethod extends Method { * } * ``` */ -class Constructor extends DotNet::Constructor, Callable, Member, Attributable, @constructor { +class Constructor extends Callable, Member, Attributable, @constructor { override string getName() { constructors(this, result, _, _) } override Type getReturnType() { @@ -435,7 +499,7 @@ class PrimaryConstructor extends Constructor { * } * ``` */ -class Destructor extends DotNet::Destructor, Callable, Member, Attributable, @destructor { +class Destructor extends Callable, Member, Attributable, @destructor { override string getName() { destructors(this, result, _, _) } override Type getReturnType() { @@ -497,10 +561,33 @@ class Operator extends Callable, Member, Attributable, Overridable, @operator { override Parameter getRawParameter(int i) { result = this.getParameter(i) } } +pragma[nomagic] +private ValueOrRefType getARecordBaseType(ValueOrRefType t) { + exists(Callable c | + c.hasName("$") and + c.getNumberOfParameters() = 0 and + t = c.getDeclaringType() and + result = t + ) + or + result = getARecordBaseType(t).getABaseType() +} + /** A clone method on a record. */ -class RecordCloneMethod extends Method, DotNet::RecordCloneCallable { - override Constructor getConstructor() { - result = DotNet::RecordCloneCallable.super.getConstructor() +class RecordCloneMethod extends Method { + RecordCloneMethod() { + this.hasName("$") and + this.getNumberOfParameters() = 0 and + this.getReturnType() = getARecordBaseType(this.getDeclaringType()) and + this.isPublic() and + not this.isStatic() + } + + /** Gets the constructor that this clone method calls. */ + Constructor getConstructor() { + result.getDeclaringType() = this.getDeclaringType() and + result.getNumberOfParameters() = 1 and + result.getParameter(0).getType() = this.getDeclaringType() } } diff --git a/csharp/ql/lib/semmle/code/csharp/Element.qll b/csharp/ql/lib/semmle/code/csharp/Element.qll index e2f14379472..2c69912c993 100644 --- a/csharp/ql/lib/semmle/code/csharp/Element.qll +++ b/csharp/ql/lib/semmle/code/csharp/Element.qll @@ -4,7 +4,6 @@ import Location private import semmle.code.csharp.ExprOrStmtParent -private import dotnet private import commons.QualifiedName /** @@ -14,18 +13,64 @@ private import commons.QualifiedName * (`NamespaceDeclaration`), a `using` directive (`UsingDirective`), or type * parameter constraints (`TypeParameterConstraints`). */ -class Element extends DotNet::Element, @element { - override string toStringWithTypes() { result = this.toString() } +class Element extends @element { + /** Gets a textual representation of this element. */ + cached + string toString() { none() } + + /** Gets the file containing this element. */ + final File getFile() { result = this.getLocation().getFile() } + + /** Holds if this element is from source code. */ + predicate fromSource() { this.getFile().fromSource() } + + /** Holds if this element is from an assembly. */ + predicate fromLibrary() { this.getFile().fromLibrary() } + + /** + * Gets the "language" of this program element, as defined by the extension of the filename. + * For example, C# has language "cs", and Visual Basic has language "vb". + */ + deprecated final string getLanguage() { result = this.getLocation().getFile().getExtension() } + + /** + * Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs. + * + * If no primary class can be determined, the result is `"???"`. + */ + final string getPrimaryQlClasses() { + result = strictconcat(this.getAPrimaryQlClass(), ",") + or + not exists(this.getAPrimaryQlClass()) and + result = "???" + } + + /** + * Gets the name of a primary CodeQL class to which this element belongs. + * + * For most elements, this is simply the most precise syntactic category to + * which they belong; for example, `AddExpr` is a primary class, but + * `BinaryOperation` is not. + * + * If no primary classes match, this predicate has no result. If multiple + * primary classes match, this predicate can have multiple results. + * + * See also `getPrimaryQlClasses`, which is better to use in most cases. + */ + string getAPrimaryQlClass() { none() } + + /** Gets the full textual representation of this element, including type information. */ + string toStringWithTypes() { result = this.toString() } /** * Gets the location of this element. Where an element has locations in * source and assemblies, choose the source location. If there are multiple * assembly locations, choose only one. */ - final override Location getLocation() { result = bestLocation(this) } + final Location getLocation() { result = bestLocation(this) } /** Gets a location of this element, including sources and assemblies. */ - override Location getALocation() { none() } + Location getALocation() { none() } /** Gets the parent of this element, if any. */ Element getParent() { result.getAChild() = this } @@ -46,3 +91,96 @@ class Element extends DotNet::Element, @element { */ int getIndex() { exists(Element parent | parent.getChild(result) = this) } } + +/** An element that has a name. */ +class NamedElement extends Element, @named_element { + /** Gets the name of this element. */ + cached + string getName() { none() } + + /** Holds if this element has name 'name'. */ + final predicate hasName(string name) { name = this.getName() } + + /** + * Gets the fully qualified name of this element, for example the + * fully qualified name of `M` on line 3 is `N.C.M` in + * + * ```csharp + * namespace N { + * class C { + * void M(int i, string s) { } + * } + * } + * ``` + */ + cached + deprecated final string getQualifiedName() { + exists(string qualifier, string name | this.hasQualifiedName(qualifier, name) | + if qualifier = "" then result = name else result = qualifier + "." + name + ) + } + + /** + * Gets the fully qualified name of this element, for example the + * fully qualified name of `M` on line 3 is `N.C.M` in + * + * ```csharp + * namespace N { + * class C { + * void M(int i, string s) { } + * } + * } + * ``` + * + * Unbound generic types, such as `IList`, are represented as + * ``System.Collections.Generic.IList`1``. + */ + cached + final string getFullyQualifiedName() { + exists(string qualifier, string name | this.hasFullyQualifiedName(qualifier, name) | + if qualifier = "" then result = name else result = qualifier + "." + name + ) + } + + /** + * DEPRECATED: Use `hasFullyQualifiedName` instead. + * + * Holds if this element has the qualified name `qualifier`.`name`. + */ + cached + deprecated predicate hasQualifiedName(string qualifier, string name) { + qualifier = "" and name = this.getName() + } + + /** Holds if this element has the fully qualified name `qualifier`.`name`. */ + cached + predicate hasFullyQualifiedName(string qualifier, string name) { + qualifier = "" and name = this.getName() + } + + /** Gets a unique string label for this element. */ + cached + deprecated string getLabel() { none() } + + /** Holds if `other` has the same metadata handle in the same assembly. */ + deprecated predicate matchesHandle(NamedElement other) { + exists(Assembly asm, int handle | + metadata_handle(this, asm, handle) and + metadata_handle(other, asm, handle) + ) + } + + /** + * Holds if this element was compiled from source code that is also present in the + * database. That is, this element corresponds to another element from source. + */ + deprecated predicate compiledFromSource() { + not this.fromSource() and + exists(NamedElement other | other != this | + this.matchesHandle(other) and + other.fromSource() + ) + } + + override string toString() { result = this.getName() } +} diff --git a/csharp/ql/lib/semmle/code/csharp/Generics.qll b/csharp/ql/lib/semmle/code/csharp/Generics.qll index 858f37eab3c..dd60ed0b0de 100644 --- a/csharp/ql/lib/semmle/code/csharp/Generics.qll +++ b/csharp/ql/lib/semmle/code/csharp/Generics.qll @@ -16,14 +16,13 @@ import Location import Namespace private import commons.QualifiedName -private import dotnet private import TypeRef /** * A generic declaration. Either an unbound generic (`UnboundGeneric`) or a * constructed generic (`ConstructedGeneric`). */ -class Generic extends DotNet::Generic, Declaration, @generic { +class Generic extends Declaration, @generic { Generic() { type_parameters(_, _, this, _) or type_arguments(_, _, this) or @@ -37,16 +36,23 @@ class Generic extends DotNet::Generic, Declaration, @generic { * Either an unbound generic type (`UnboundGenericType`) or an unbound generic method * (`UnboundGenericMethod`). */ -class UnboundGeneric extends DotNet::UnboundGeneric, Generic { +class UnboundGeneric extends Generic { UnboundGeneric() { type_parameters(_, _, this, _) } - final override TypeParameter getTypeParameter(int n) { type_parameters(result, n, this, _) } + /** Gets the `i`th type parameter, if any. */ + final TypeParameter getTypeParameter(int n) { type_parameters(result, n, this, _) } - override ConstructedGeneric getAConstructedGeneric() { result.getUnboundGeneric() = this } + /** Gets a type parameter. */ + TypeParameter getATypeParameter() { result = this.getTypeParameter(_) } - override TypeParameter getATypeParameter() { - result = DotNet::UnboundGeneric.super.getATypeParameter() - } + /** + * Gets one of the constructed versions of this declaration, + * which has been bound to a specific set of types. + */ + ConstructedGeneric getAConstructedGeneric() { result.getUnboundGeneric() = this } + + /** Gets the total number of type parameters. */ + int getNumberOfTypeParameters() { result = count(int i | exists(this.getTypeParameter(i))) } } /** Gets the type parameters as a comma-separated string. */ @@ -67,25 +73,61 @@ private string getTypeParameterBacktick(UnboundGeneric ug) { * Either a constructed generic type (`ConstructedType`) or a constructed * generic method (`ConstructedMethod`). */ -class ConstructedGeneric extends DotNet::ConstructedGeneric, Generic { +class ConstructedGeneric extends Generic { ConstructedGeneric() { type_arguments(_, _, this) or nullable_underlying_type(this, _) } - override UnboundGeneric getUnboundGeneric() { constructed_generic(this, result) } + /** + * Gets the unbound generic declaration from which this declaration was + * constructed. + */ + UnboundGeneric getUnboundGeneric() { constructed_generic(this, result) } override UnboundGeneric getUnboundDeclaration() { result = this.getUnboundGeneric().getUnboundDeclaration() } - override Type getTypeArgument(int i) { none() } + /** Gets the `i`th type argument, if any. */ + Type getTypeArgument(int i) { none() } - override Type getATypeArgument() { result = this.getTypeArgument(_) } + /** Gets a type argument. */ + Type getATypeArgument() { result = this.getTypeArgument(_) } /** Gets the annotated type of type argument `i`. */ final AnnotatedType getAnnotatedTypeArgument(int i) { result.appliesToTypeArgument(this, i) } + + /** Gets the total number of type arguments. */ + final int getNumberOfTypeArguments() { result = count(int i | exists(this.getTypeArgument(i))) } +} + +/** + * INTERNAL: Do not use. + * + * Constructs the label suffix for a generic method or type. + */ +deprecated string getGenericsLabel(Generic g) { + result = "`" + g.(UnboundGeneric).getNumberOfTypeParameters() + or + result = "<" + typeArgs(g) + ">" +} + +pragma[noinline] +deprecated private string getTypeArgumentLabel(ConstructedGeneric generic, int p) { + result = generic.getTypeArgument(p).getLabel() +} + +language[monotonicAggregates] +pragma[nomagic] +deprecated private string typeArgs(ConstructedGeneric generic) { + result = + concat(int p | + p in [0 .. generic.getNumberOfTypeArguments() - 1] + | + getTypeArgumentLabel(generic, p), "," + ) } /** Gets the type arguments as a comma-separated string. */ @@ -95,10 +137,16 @@ private string getTypeArgumentsToString(ConstructedGeneric cg) { strictconcat(Type t, int i | t = cg.getTypeArgument(i) | t.toStringWithTypes(), ", " order by i) } +pragma[nomagic] +private string getTypeArgumentName(ConstructedGeneric cg, int i) { + result = cg.getTypeArgument(i).getName() +} + /** Gets the concatenation of the `getName()` of type arguments. */ language[monotonicAggregates] private string getTypeArgumentsNames(ConstructedGeneric cg) { - result = strictconcat(Type t, int i | t = cg.getTypeArgument(i) | t.getName(), "," order by i) + result = + strictconcat(int i | exists(cg.getTypeArgument(i)) | getTypeArgumentName(cg, i), "," order by i) } /** @@ -154,7 +202,10 @@ class UnboundGenericType extends ValueOrRefType, UnboundGeneric { /** * A type parameter, for example `T` in `List`. */ -class TypeParameter extends DotNet::TypeParameter, Type, @type_parameter { +class TypeParameter extends Type, @type_parameter { + /** Gets the generic type or method declaring this type parameter. */ + UnboundGeneric getDeclaringGeneric() { this = result.getATypeParameter() } + /** Gets the constraints on this type parameter, if any. */ TypeParameterConstraints getConstraints() { result.getTypeParameter() = this } @@ -197,9 +248,9 @@ class TypeParameter extends DotNet::TypeParameter, Type, @type_parameter { // A.B is a partially constructed UnboundGenericClass and // A.B is a ConstructedGenericClass. exists(ConstructedGeneric c, UnboundGeneric u, int tpi | - this = u.getTypeParameter(tpi) and + this = u.getTypeParameter(pragma[only_bind_into](tpi)) and (u = c.getUnboundGeneric() or u = c.getUnboundDeclaration()) and - result = c.getTypeArgument(tpi) + result = c.getTypeArgument(pragma[only_bind_into](tpi)) ) } @@ -210,8 +261,13 @@ class TypeParameter extends DotNet::TypeParameter, Type, @type_parameter { result = this.getASuppliedType().(TypeParameter).getAnUltimatelySuppliedType() } + /** Gets the index of this type parameter. For example the index of `U` in `Func` is 1. */ override int getIndex() { type_parameters(this, result, _, _) } + deprecated final override string getLabel() { result = "!" + this.getIndex() } + + override string getUndecoratedName() { result = "!" + this.getIndex() } + /** Gets the generic that defines this type parameter. */ UnboundGeneric getGeneric() { type_parameters(this, _, result, _) } diff --git a/csharp/ql/lib/semmle/code/csharp/Implements.qll b/csharp/ql/lib/semmle/code/csharp/Implements.qll index 96556293a9d..36cc06c4546 100644 --- a/csharp/ql/lib/semmle/code/csharp/Implements.qll +++ b/csharp/ql/lib/semmle/code/csharp/Implements.qll @@ -108,28 +108,29 @@ private predicate hasMemberCompatibleWithInterfaceMember(ValueOrRefType t, Virtu */ pragma[nomagic] private Virtualizable getACompatibleInterfaceMember(Virtualizable m) { - result = getACompatibleInterfaceMemberAux(m) and - ( + exists(ValueOrRefType declType | result = getACompatibleInterfaceMemberAux(m, declType) | // If there is both an implicit and an explicit compatible member // in the same type, then the explicit implementation must be used - not result = getACompatibleExplicitInterfaceMember(_, m.getDeclaringType()) + not result = getACompatibleExplicitInterfaceMember(_, declType) or - result = getACompatibleExplicitInterfaceMember(m, m.getDeclaringType()) + result = getACompatibleExplicitInterfaceMember(m, declType) ) } pragma[nomagic] private Virtualizable getACompatibleExplicitInterfaceMember(Virtualizable m, ValueOrRefType declType) { - result = getACompatibleInterfaceMemberAux(m) and - declType = m.getDeclaringType() and + result = getACompatibleInterfaceMemberAux(m, declType) and m.implementsExplicitInterface() } pragma[nomagic] -private Virtualizable getACompatibleInterfaceMemberAux(Virtualizable m) { - result = getACompatibleInterfaceAccessor(m) or - result = getACompatibleInterfaceIndexer(m) or - result = getACompatibleRelevantInterfaceMember(m) +private Virtualizable getACompatibleInterfaceMemberAux(Virtualizable m, ValueOrRefType declType) { + ( + result = getACompatibleInterfaceAccessor(m) or + result = getACompatibleInterfaceIndexer(m) or + result = getACompatibleRelevantInterfaceMember(m) + ) and + declType = m.getDeclaringType() } /** @@ -182,13 +183,16 @@ ValueOrRefType getAPossibleImplementor(Interface i) { not result instanceof Interface } +pragma[nomagic] +private Type getParameterType(Parameterizable p, int i) { result = p.getParameter(i).getType() } + private Indexer getACompatibleInterfaceIndexer0(Indexer i, int j) { result = getACompatibleInterfaceIndexerCandidate(i) and convIdentity(i.getType(), result.getType()) and j = -1 or result = getACompatibleInterfaceIndexer0(i, j - 1) and - convIdentity(i.getParameter(j).getType(), result.getParameter(j).getType()) + convIdentity(getParameterType(i, j), getParameterType(result, j)) } /** diff --git a/csharp/ql/lib/semmle/code/csharp/Member.qll b/csharp/ql/lib/semmle/code/csharp/Member.qll index 13b8d1ca4bd..1be091170e3 100644 --- a/csharp/ql/lib/semmle/code/csharp/Member.qll +++ b/csharp/ql/lib/semmle/code/csharp/Member.qll @@ -4,7 +4,6 @@ import Callable import Element import Modifier import Variable -private import dotnet private import Implements private import TypeRef private import commons.QualifiedName @@ -26,8 +25,46 @@ private module FullyQualifiedNameInput implements QualifiedNameInputSig { * * Either a modifiable (`Modifiable`) or an assignable (`Assignable`). */ -class Declaration extends DotNet::Declaration, Element, @declaration { - override ValueOrRefType getDeclaringType() { none() } +class Declaration extends NamedElement, @declaration { + /** Gets the name of this declaration, without additional decoration such as `<...>`. */ + string getUndecoratedName() { none() } + + /** Holds if this element has undecorated name 'name'. */ + final predicate hasUndecoratedName(string name) { name = this.getUndecoratedName() } + + /** + * Gets the unbound version of this declaration, that is, the declaration where + * all type arguments have been removed. For example, in + * + * ```csharp + * class C + * { + * class Nested + * { + * } + * + * void Method() { } + * } + * ``` + * + * we have the following + * + * | Declaration | Unbound declaration | + * |-------------------------|---------------------| + * | `C` | ``C`1`` | + * | ``C`1.Nested`` | ``C`1.Nested`` | + * | `C.Nested` | ``C`1.Nested`` | + * | ``C`1.Method`1`` | ``C`1.Method`1`` | + * | ``C.Method`1`` | ``C`1.Method`1`` | + * | `C.Method` | ``C`1.Method`1`` | + */ + Declaration getUnboundDeclaration() { result = this } + + /** Holds if this declaration is unbound. */ + final predicate isUnboundDeclaration() { this.getUnboundDeclaration() = this } + + /** Gets the type containing this declaration, if any. */ + ValueOrRefType getDeclaringType() { none() } /** Holds if this declaration is unconstructed and in source code. */ final predicate isSourceDeclaration() { this.fromSource() and this.isUnboundDeclaration() } @@ -222,33 +259,27 @@ class Modifiable extends Declaration, @modifiable { } /** A declaration that is a member of a type. */ -class Member extends DotNet::Member, Modifiable, @member { +class Member extends Modifiable, @member { /** Gets an access to this member. */ MemberAccess getAnAccess() { result.getTarget() = this } - override predicate isPublic() { Modifiable.super.isPublic() } - - override predicate isProtected() { Modifiable.super.isProtected() } - - override predicate isPrivate() { Modifiable.super.isPrivate() } - - override predicate isInternal() { Modifiable.super.isInternal() } - - override predicate isSealed() { Modifiable.super.isSealed() } - - override predicate isAbstract() { Modifiable.super.isAbstract() } - - override predicate isStatic() { Modifiable.super.isStatic() } - - override predicate isRequired() { Modifiable.super.isRequired() } - - override predicate isFile() { Modifiable.super.isFile() } - - deprecated final override predicate hasQualifiedName(string namespace, string type, string name) { + /** + * DEPRECATED: Use `hasFullyQualifiedName` instead. + * + * Holds if this member has name `name` and is defined in type `type` + * with namespace `namespace`. + */ + cached + deprecated final predicate hasQualifiedName(string namespace, string type, string name) { QualifiedName::hasQualifiedName(this, namespace, type, name) } - final override predicate hasFullyQualifiedName(string namespace, string type, string name) { + /** + * Holds if this member has name `name` and is defined in type `type` + * with namespace `namespace`. + */ + cached + final predicate hasFullyQualifiedName(string namespace, string type, string name) { QualifiedName::hasQualifiedName(this, namespace, type, name) } } @@ -477,10 +508,24 @@ class Virtualizable extends Overridable, Member, @virtualizable { * A parameterizable declaration. Either a callable (`Callable`), a delegate * type (`DelegateType`), or an indexer (`Indexer`). */ -class Parameterizable extends DotNet::Parameterizable, Declaration, @parameterizable { - override Parameter getRawParameter(int i) { params(result, _, _, i, _, this, _) } +class Parameterizable extends Declaration, @parameterizable { + /** Gets raw parameter `i`, including the `this` parameter at index 0. */ + Parameter getRawParameter(int i) { params(result, _, _, i, _, this, _) } - override Parameter getParameter(int i) { params(result, _, _, i, _, this, _) } + /** Gets the `i`th parameter, excluding the `this` parameter. */ + Parameter getParameter(int i) { params(result, _, _, i, _, this, _) } + + /** Gets the number of parameters of this callable. */ + int getNumberOfParameters() { result = count(this.getAParameter()) } + + /** Holds if this declaration has no parameters. */ + predicate hasNoParameters() { not exists(this.getAParameter()) } + + /** Gets a parameter, if any. */ + Parameter getAParameter() { result = this.getParameter(_) } + + /** Gets a raw parameter (including the qualifier), if any. */ + final Parameter getARawParameter() { result = this.getRawParameter(_) } /** * Gets the type of the parameter, possibly prefixed diff --git a/csharp/ql/lib/semmle/code/csharp/Namespace.qll b/csharp/ql/lib/semmle/code/csharp/Namespace.qll index dddb59af119..002ce444b3f 100644 --- a/csharp/ql/lib/semmle/code/csharp/Namespace.qll +++ b/csharp/ql/lib/semmle/code/csharp/Namespace.qll @@ -1,8 +1,8 @@ /** Provides classes for namespaces. */ +private import semmle.code.csharp.commons.QualifiedName import Element import Type -private import dotnet /** * A type container. Either a namespace (`Namespace`) or a type (`Type`). @@ -18,24 +18,44 @@ class TypeContainer extends Declaration, @type_container { } * } * ``` */ -class Namespace extends DotNet::Namespace, TypeContainer, Declaration, @namespace { +class Namespace extends TypeContainer, Declaration, @namespace { override Namespace getParent() { result = this.getParentNamespace() } - override Namespace getParentNamespace() { parent_namespace(this, result) } + /** + * Gets the parent namespace, if any. For example the parent namespace of `System.IO` + * is `System`. The parent namespace of `System` is the global namespace. + */ + Namespace getParentNamespace() { parent_namespace(this, result) } - override Namespace getAChildNamespace() { parent_namespace(result, this) } + /** + * Gets a child namespace, if any. For example `System.IO` is a child in + * the namespace `System`. + */ + Namespace getAChildNamespace() { parent_namespace(result, this) } override TypeContainer getChild(int i) { i = 0 and parent_namespace(result, this) } + /** + * Holds if this namespace has the qualified name `qualifier`.`name`. + * + * For example if the qualified name is `System.Collections.Generic`, then + * `qualifier`=`System.Collections` and `name`=`Generic`. + */ deprecated override predicate hasQualifiedName(string qualifier, string name) { - DotNet::Namespace.super.hasQualifiedName(qualifier, name) + namespaceHasQualifiedName(this, qualifier, name) } + /** + * Holds if this namespace has the qualified name `qualifier`.`name`. + * + * For example if the qualified name is `System.Collections.Generic`, then + * `qualifier`=`System.Collections` and `name`=`Generic`. + */ override predicate hasFullyQualifiedName(string qualifier, string name) { - DotNet::Namespace.super.hasFullyQualifiedName(qualifier, name) + namespaceHasQualifiedName(this, qualifier, name) } /** @@ -123,7 +143,28 @@ class Namespace extends DotNet::Namespace, TypeContainer, Declaration, @namespac override Location getALocation() { result = this.getADeclaration().getALocation() } - override string toString() { result = DotNet::Namespace.super.toString() } + /** Gets a textual representation of this namespace. */ + override string toString() { result = this.getFullName() } + + /** Holds if this is the global namespace. */ + final predicate isGlobalNamespace() { this.getName() = "" } + + /** Gets the simple name of this namespace, for example `IO` in `System.IO`. */ + final override string getName() { namespaces(this, result) } + + final override string getUndecoratedName() { namespaces(this, result) } + + override string getAPrimaryQlClass() { result = "Namespace" } + + /** + * Get the fully qualified name of this namespace. + */ + string getFullName() { + exists(string namespace, string name | + namespaceHasQualifiedName(this, namespace, name) and + result = getQualifiedName(namespace, name) + ) + } } /** diff --git a/csharp/ql/lib/semmle/code/csharp/PrintAst.qll b/csharp/ql/lib/semmle/code/csharp/PrintAst.qll index ca4b37eb51b..eb5ca6b4727 100644 --- a/csharp/ql/lib/semmle/code/csharp/PrintAst.qll +++ b/csharp/ql/lib/semmle/code/csharp/PrintAst.qll @@ -27,7 +27,8 @@ class PrintAstConfiguration extends TPrintAstConfiguration { } private predicate shouldPrint(Element e, Location l) { - exists(PrintAstConfiguration config | config.shouldPrint(e, l)) + exists(PrintAstConfiguration config | config.shouldPrint(e, l)) and + not e.(Stmt).isCompilerGenerated() } private predicate isImplicitExpression(ControlFlowElement element) { diff --git a/csharp/ql/lib/semmle/code/csharp/Property.qll b/csharp/ql/lib/semmle/code/csharp/Property.qll index bdeb9832d3f..60ea83c3011 100644 --- a/csharp/ql/lib/semmle/code/csharp/Property.qll +++ b/csharp/ql/lib/semmle/code/csharp/Property.qll @@ -5,8 +5,6 @@ import Member import Stmt import Type -private import cil -private import dotnet private import semmle.code.csharp.ExprOrStmtParent private import TypeRef @@ -113,7 +111,7 @@ class DeclarationWithGetSetAccessors extends DeclarationWithAccessors, TopLevelE * } * ``` */ -class Property extends DotNet::Property, DeclarationWithGetSetAccessors, @property { +class Property extends DeclarationWithGetSetAccessors, @property { override string getName() { properties(this, result, _, _, _) } override string getUndecoratedName() { properties(this, result, _, _, _) } @@ -558,8 +556,6 @@ class TrivialProperty extends Property { this.isAutoImplemented() or this.getGetter().trivialGetterField() = this.getSetter().trivialSetterField() - or - exists(CIL::TrivialProperty prop | this.matchesHandle(prop)) } } diff --git a/csharp/ql/lib/semmle/code/csharp/Stmt.qll b/csharp/ql/lib/semmle/code/csharp/Stmt.qll index a37255ab7eb..a7bbfb93861 100644 --- a/csharp/ql/lib/semmle/code/csharp/Stmt.qll +++ b/csharp/ql/lib/semmle/code/csharp/Stmt.qll @@ -43,6 +43,9 @@ class Stmt extends ControlFlowElement, @stmt { * For example converts `{ { return x; } }` to `return x;`. */ Stmt stripSingletonBlocks() { result = this } + + /** Holds if this statement is compiler generated. */ + predicate isCompilerGenerated() { compiler_generated(this) } } /** diff --git a/csharp/ql/lib/semmle/code/csharp/Type.qll b/csharp/ql/lib/semmle/code/csharp/Type.qll index 00a805c0858..1fd8e41642b 100644 --- a/csharp/ql/lib/semmle/code/csharp/Type.qll +++ b/csharp/ql/lib/semmle/code/csharp/Type.qll @@ -7,7 +7,6 @@ import Location import Namespace import Property private import Conversion -private import dotnet private import semmle.code.csharp.metrics.Coupling private import TypeRef private import semmle.code.csharp.frameworks.System @@ -20,7 +19,10 @@ private import semmle.code.csharp.frameworks.system.runtime.CompilerServices * a pointer type (`PointerType`), the arglist type (`ArglistType`), an unknown * type (`UnknownType`), or a type parameter (`TypeParameter`). */ -class Type extends DotNet::Type, Member, TypeContainer, @type { +class Type extends Member, TypeContainer, @type { + /** Gets the name of this type without additional syntax such as `[]` or `*`. */ + override string getUndecoratedName() { none() } + override string getName() { types(this, _, result) } override Type getUnboundDeclaration() { result = this } @@ -56,7 +58,7 @@ private predicate isObjectClass(Class c) { c instanceof ObjectType } * * Either a value type (`ValueType`) or a reference type (`RefType`). */ -class ValueOrRefType extends DotNet::ValueOrRefType, Type, Attributable, @value_or_ref_type { +class ValueOrRefType extends Type, Attributable, @value_or_ref_type { /** Gets the namespace containing this type. */ Namespace getNamespace() { if exists(this.getDeclaringType()) @@ -64,7 +66,8 @@ class ValueOrRefType extends DotNet::ValueOrRefType, Type, Attributable, @value_ else result.getATypeDeclaration() = this } - override Namespace getDeclaringNamespace() { this = result.getATypeDeclaration() } + /** Gets the namespace declaring this type, if any. */ + Namespace getDeclaringNamespace() { this = result.getATypeDeclaration() } override ValueOrRefType getDeclaringType() { none() } @@ -73,6 +76,30 @@ class ValueOrRefType extends DotNet::ValueOrRefType, Type, Attributable, @value_ /** Gets a nested child type, if any. */ NestedType getAChildType() { nested_types(result, this, _) } + deprecated private string getPrefixWithTypes() { + result = this.getDeclaringType().getLabel() + "." + or + if this.getDeclaringNamespace().isGlobalNamespace() + then result = "" + else result = this.getDeclaringNamespace().getFullName() + "." + } + + pragma[noinline] + deprecated private string getLabelNonGeneric() { + not this instanceof Generic and + result = this.getPrefixWithTypes() + this.getUndecoratedName() + } + + pragma[noinline] + deprecated private string getLabelGeneric() { + result = this.getPrefixWithTypes() + this.getUndecoratedName() + getGenericsLabel(this) + } + + deprecated override string getLabel() { + result = this.getLabelNonGeneric() or + result = this.getLabelGeneric() + } + /** * Gets the source namespace declaration in which this type is declared, if any. * This only holds for non-nested types. @@ -120,7 +147,7 @@ class ValueOrRefType extends DotNet::ValueOrRefType, Type, Attributable, @value_ } /** Gets an immediate base type of this type, if any. */ - override ValueOrRefType getABaseType() { + ValueOrRefType getABaseType() { result = this.getBaseClass() or result = this.getABaseInterface() } @@ -360,7 +387,8 @@ class ValueOrRefType extends DotNet::ValueOrRefType, Type, Attributable, @value_ nested_types(this, _, result) } - override predicate isRecord() { this.hasModifier("record") } + /** Holds if this type is a `record`. */ + predicate isRecord() { this.hasModifier("record") } override string toString() { result = Type.super.toString() } } @@ -969,7 +997,7 @@ class FunctionPointerType extends Type, Parameterizable, @function_pointer_type override string getAPrimaryQlClass() { result = "FunctionPointerType" } - override string getLabel() { result = this.getName() } + deprecated override string getLabel() { result = this.getName() } } /** @@ -1064,7 +1092,7 @@ class InlineArrayType extends ValueType, @inline_array_type { /** * An array type, for example `int[]`. */ -class ArrayType extends DotNet::ArrayType, RefType, @array_type { +class ArrayType extends RefType, @array_type { /** * Gets the dimension of this array type. For example `int[][]` is of * dimension 2, while `int[]` is of dimension 1. @@ -1081,13 +1109,15 @@ class ArrayType extends DotNet::ArrayType, RefType, @array_type { predicate isMultiDimensional() { this.getRank() > 1 } /** Gets the element type of this array, for example `int` in `int[]`. */ - override Type getElementType() { + Type getElementType() { array_element_type(this, _, _, result) or not array_element_type(this, _, _, any(Type t)) and array_element_type(this, _, _, getTypeRef(result)) } + deprecated final override string getLabel() { result = this.getElementType().getLabel() + "[]" } + /** Holds if this array type has the same shape (dimension and rank) as `that` array type. */ predicate hasSameShapeAs(ArrayType that) { this.getDimension() = that.getDimension() and @@ -1128,33 +1158,36 @@ class ArrayType extends DotNet::ArrayType, RefType, @array_type { not type_location(this, _) and result = this.getElementType().getALocation() } + + override string getAPrimaryQlClass() { result = "ArrayType" } } /** * A pointer type, for example `char*`. */ -class PointerType extends DotNet::PointerType, Type, @pointer_type { - override Type getReferentType() { +class PointerType extends Type, @pointer_type { + /** Gets the type referred by this pointer type, for example `char` in `char*`. */ + Type getReferentType() { pointer_referent_type(this, result) or not pointer_referent_type(this, any(Type t)) and pointer_referent_type(this, getTypeRef(result)) } - override string toStringWithTypes() { result = DotNet::PointerType.super.toStringWithTypes() } + override string toStringWithTypes() { result = this.getReferentType().toStringWithTypes() + "*" } override Type getChild(int n) { result = this.getReferentType() and n = 0 } final override string getName() { types(this, _, result) } + deprecated final override string getLabel() { result = this.getReferentType().getLabel() + "*" } + final override string getUndecoratedName() { result = this.getReferentType().getUndecoratedName() } override Location getALocation() { result = this.getReferentType().getALocation() } - override string toString() { result = DotNet::PointerType.super.toString() } - override string getAPrimaryQlClass() { result = "PointerType" } } @@ -1238,7 +1271,7 @@ class TupleType extends ValueType, @tuple_type { ")" } - override string getLabel() { result = this.getUnderlyingType().getLabel() } + deprecated override string getLabel() { result = this.getUnderlyingType().getLabel() } override Type getChild(int i) { result = this.getUnderlyingType().getChild(i) } diff --git a/csharp/ql/lib/semmle/code/csharp/Variable.qll b/csharp/ql/lib/semmle/code/csharp/Variable.qll index be52bcbadaf..4bef47056ef 100644 --- a/csharp/ql/lib/semmle/code/csharp/Variable.qll +++ b/csharp/ql/lib/semmle/code/csharp/Variable.qll @@ -7,18 +7,18 @@ import Assignable import Callable import Element import Type -private import dotnet private import semmle.code.csharp.ExprOrStmtParent private import TypeRef /** * A variable. Either a variable with local scope (`LocalScopeVariable`) or a field (`Field`). */ -class Variable extends Assignable, DotNet::Variable, @variable { +class Variable extends Assignable, @variable { override Variable getUnboundDeclaration() { result = this } override VariableAccess getAnAccess() { result.getTarget() = this } + /** Gets the type of this variable. */ override Type getType() { none() } /** Gets the expression used to initialise this variable, if any. */ @@ -87,9 +87,10 @@ class LocalScopeVariable extends Variable, @local_scope_variable { * } * ``` */ -class Parameter extends DotNet::Parameter, LocalScopeVariable, Attributable, TopLevelExprParent, - @parameter -{ +class Parameter extends LocalScopeVariable, Attributable, TopLevelExprParent, @parameter { + /** Gets the raw position of this parameter, including the `this` parameter at index 0. */ + final int getRawPosition() { this = this.getDeclaringElement().getRawParameter(result) } + /** * Gets the position of this parameter. For example, the position of `x` is * 0 and the position of `y` is 1 in @@ -100,7 +101,7 @@ class Parameter extends DotNet::Parameter, LocalScopeVariable, Attributable, Top * } * ``` */ - override int getPosition() { params(this, _, _, result, _, _, _) } + int getPosition() { params(this, _, _, result, _, _, _) } override int getIndex() { result = this.getPosition() } @@ -138,7 +139,7 @@ class Parameter extends DotNet::Parameter, LocalScopeVariable, Attributable, Top * } * ``` */ - override predicate isOut() { params(this, _, _, _, 2, _, _) } + predicate isOut() { params(this, _, _, _, 2, _, _) } /** * Holds if this parameter is a value type that is passed in by reference. @@ -167,6 +168,18 @@ class Parameter extends DotNet::Parameter, LocalScopeVariable, Attributable, Top */ predicate isParams() { params(this, _, _, _, 3, _, _) } + /** + * Holds if this parameter if a ref readonly parameter. + * For example, `p` is a ref readonly parameter in + * + * ```csharp + * void M(ref readonly int p) { + * ... + * } + * ``` + */ + predicate isReadonlyRef() { params(this, _, _, _, 6, _, _) } + /** * Holds this parameter is the first parameter of an extension method. * For example, `list` is the first parameter of the extension method @@ -181,7 +194,7 @@ class Parameter extends DotNet::Parameter, LocalScopeVariable, Attributable, Top predicate hasExtensionMethodModifier() { params(this, _, _, _, 4, _, _) } /** Gets the declaring element of this parameter. */ - override Parameterizable getDeclaringElement() { params(this, _, _, _, _, result, _) } + Parameterizable getDeclaringElement() { params(this, _, _, _, _, result, _) } override Parameter getUnboundDeclaration() { params(this, _, _, _, _, _, result) } @@ -384,9 +397,7 @@ class LocalConstant extends LocalVariable, @local_constant { * } * ``` */ -class Field extends Variable, AssignableMember, Attributable, TopLevelExprParent, DotNet::Field, - @field -{ +class Field extends Variable, AssignableMember, Attributable, TopLevelExprParent, @field { /** * Gets the initial value of this field, if any. For example, the initial * value of `F` on line 2 is `20` in diff --git a/csharp/ql/lib/semmle/code/csharp/commons/Disposal.qll b/csharp/ql/lib/semmle/code/csharp/commons/Disposal.qll index f3c1c7a3c78..5315aa751ea 100644 --- a/csharp/ql/lib/semmle/code/csharp/commons/Disposal.qll +++ b/csharp/ql/lib/semmle/code/csharp/commons/Disposal.qll @@ -3,56 +3,13 @@ */ import csharp -private import cil -private import dotnet -private predicate isDisposeMethod(DotNet::Callable method) { +private predicate isDisposeMethod(Callable method) { method.getName() = "Dispose" and method.getNumberOfParameters() = 0 } -private predicate cilVariableReadFlowsToNode(CIL::Variable variable, DataFlow::Node n) { - n.asExpr() = variable.getARead() - or - exists(DataFlow::Node mid | - cilVariableReadFlowsToNode(variable, mid) and - DataFlow::localFlowStep(mid, n) - ) -} - -private predicate cilVariableReadFlowsTo(CIL::Variable variable, CIL::DataFlowNode n) { - cilVariableReadFlowsToNode(variable, DataFlow::exprNode(n)) -} - -private predicate disposedCilVariable(CIL::Variable variable) { - // `variable` is the `this` parameter on a dispose method. - isDisposeMethod(variable.(CIL::ThisParameter).getMethod()) - or - // `variable` is passed to a method that disposes it. - exists(CIL::Call call, CIL::Parameter param | - cilVariableReadFlowsTo(variable, call.getArgumentForParameter(param)) and - disposedCilVariable(param) - ) - or - // A parameter is disposed if its source declaration is disposed - disposedCilVariable(variable.(CIL::Parameter).getUnboundDeclaration()) - or - // A variable is disposed if it's assigned to another variable - // that may be disposed. - exists(CIL::WriteAccess write | - cilVariableReadFlowsTo(variable, write.getExpr()) and - disposedCilVariable(write.getTarget()) - ) -} - private predicate disposedCSharpVariable(Variable variable) { - // A C# parameter is disposed if its corresponding CIL parameter is disposed - exists(CIL::Method m, CIL::Parameter p, int i | - disposedCilVariable(p) and p = m.getRawParameter(i) - | - variable = any(Callable c2 | c2.matchesHandle(m)).getRawParameter(i) - ) - or // Call to a method that disposes it exists(Call call, int arg, VariableRead read | read.getTarget() = variable and @@ -83,7 +40,4 @@ private predicate disposedCSharpVariable(Variable variable) { * Hold if `variable` might be disposed. * This is a conservative overestimate. */ -predicate mayBeDisposed(DotNet::Variable variable) { - disposedCSharpVariable(variable) or - disposedCilVariable(variable) -} +predicate mayBeDisposed(Variable variable) { disposedCSharpVariable(variable) } diff --git a/csharp/ql/lib/semmle/code/csharp/commons/QualifiedName.qll b/csharp/ql/lib/semmle/code/csharp/commons/QualifiedName.qll index 5e05a865640..eba0fb10c7c 100644 --- a/csharp/ql/lib/semmle/code/csharp/commons/QualifiedName.qll +++ b/csharp/ql/lib/semmle/code/csharp/commons/QualifiedName.qll @@ -1,7 +1,6 @@ /** Provides predicates for working with fully qualified names. */ private import csharp -private import dotnet /** * Holds if namespace `n` has the qualified name `qualifier`.`name`. @@ -9,8 +8,8 @@ private import dotnet * For example if the qualified name is `System.Collections.Generic`, then * `qualifier`=`System.Collections` and `name`=`Generic`. */ -predicate namespaceHasQualifiedName(DotNet::Namespace n, string qualifier, string name) { - if n instanceof DotNet::GlobalNamespace +predicate namespaceHasQualifiedName(Namespace n, string qualifier, string name) { + if n instanceof GlobalNamespace then qualifier = "" and name = "" else ( exists(string pqualifier, string pname | @@ -49,11 +48,20 @@ module QualifiedName { ) } + pragma[nomagic] + private string getTypeArgumentsQualifiedName(ConstructedGeneric cg, int i) { + result = getFullName(cg.getTypeArgument(i)) + } + /** Gets the concatenation of the `getFullName` of type arguments. */ language[monotonicAggregates] private string getTypeArgumentsQualifiedNames(ConstructedGeneric cg) { result = - strictconcat(Type t, int i | t = cg.getTypeArgument(i) | getFullName(t), "," order by i) + strictconcat(int i | + exists(cg.getTypeArgument(i)) + | + getTypeArgumentsQualifiedName(cg, i), "," order by i + ) } /** Holds if declaration `d` has the qualified name `qualifier`.`name`. */ diff --git a/csharp/ql/lib/semmle/code/csharp/commons/StructuralComparison.qll b/csharp/ql/lib/semmle/code/csharp/commons/StructuralComparison.qll index ca009448c10..63e37d56295 100644 --- a/csharp/ql/lib/semmle/code/csharp/commons/StructuralComparison.qll +++ b/csharp/ql/lib/semmle/code/csharp/commons/StructuralComparison.qll @@ -195,8 +195,6 @@ predicate toGvn = toGvnCached/1; /** * Holds if the control flow elements `x` and `y` are structurally equal. */ -pragma[inline] -predicate sameGvn(ControlFlowElement x, ControlFlowElement y) { - pragma[only_bind_into](toGvn(pragma[only_bind_out](x))) = - pragma[only_bind_into](toGvn(pragma[only_bind_out](y))) -} +bindingset[x, y] +pragma[inline_late] +predicate sameGvn(ControlFlowElement x, ControlFlowElement y) { toGvn(x) = toGvn(y) } diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll index 7accdb1fe64..313fabc0235 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll @@ -3,8 +3,6 @@ */ import csharp -private import cil -private import dotnet private import ControlFlow::SuccessorTypes private import semmle.code.csharp.commons.Assertions private import semmle.code.csharp.commons.ComparisonTest @@ -844,8 +842,6 @@ class NullGuardedDataFlowNode extends GuardedDataFlowNode { /** INTERNAL: Do not use. */ module Internal { - private import semmle.code.cil.CallableReturns - newtype TAbstractValue = TBooleanValue(boolean b) { b = true or b = false } or TIntegerValue(int i) { i = any(Expr e).getValue().toInt() } or @@ -856,20 +852,11 @@ module Internal { } or TEmptyCollectionValue(boolean b) { b = true or b = false } - /** A callable that always returns a `null` value. */ - private class NullCallable extends Callable { - NullCallable() { - exists(CIL::Method m | m.matchesHandle(this) | alwaysNullMethod(m) and not m.isVirtual()) - } - } - /** Holds if expression `e` is a `null` value. */ predicate nullValue(Expr e) { e instanceof NullLiteral or e instanceof DefaultValueExpr and e.getType().isRefType() - or - e.(Call).getTarget().getUnboundDeclaration() instanceof NullCallable } /** Holds if expression `e2` is a `null` value whenever `e1` is. */ @@ -890,11 +877,7 @@ module Internal { /** A callable that always returns a non-`null` value. */ private class NonNullCallable extends Callable { - NonNullCallable() { - exists(CIL::Method m | m.matchesHandle(this) | alwaysNotNullMethod(m) and not m.isVirtual()) - or - this = any(SystemObjectClass c).getGetTypeMethod() - } + NonNullCallable() { this = any(SystemObjectClass c).getGetTypeMethod() } } /** Holds if expression `e` is a non-`null` value. */ @@ -1013,12 +996,18 @@ module Internal { * Holds if pre-basic-block `bb` only is reached when guard `g` has abstract value `v`, * not taking implications into account. */ + pragma[nomagic] private predicate preControlsDirect(Guard g, PreBasicBlocks::PreBasicBlock bb, AbstractValue v) { exists(PreBasicBlocks::ConditionBlock cb, ConditionalSuccessor s | cb.controls(bb, s) | v.branch(cb.getLastElement(), s, g) ) } + pragma[nomagic] + private predicate preControlsDefDirect(Guard g, PreSsa::Definition def, AbstractValue v) { + preControlsDirect(g, def.getBasicBlock(), v) + } + /** Holds if pre-basic-block `bb` only is reached when guard `g` has abstract value `v`. */ predicate preControls(Guard g, PreBasicBlocks::PreBasicBlock bb, AbstractValue v) { preControlsDirect(g, bb, v) @@ -1111,36 +1100,47 @@ module Internal { ) } - pragma[noinline] + pragma[nomagic] private predicate conditionalAssign0( Guard guard, AbstractValue vGuard, PreSsa::PhiNode phi, Expr e, PreSsa::Definition upd, - PreBasicBlocks::PreBasicBlock bbGuard + PreBasicBlocks::PreBasicBlock bbGuard, PreBasicBlocks::PreBasicBlock bbPhi ) { e = upd.getDefinition().getSource() and upd = phi.getAnInput() and - preControlsDirect(guard, upd.getBasicBlock(), vGuard) and + preControlsDefDirect(guard, upd, vGuard) and bbGuard.getAnElement() = guard and - bbGuard.strictlyDominates(phi.getBasicBlock()) and - not preControlsDirect(guard, phi.getBasicBlock(), vGuard) + bbPhi = phi.getBasicBlock() } pragma[noinline] private predicate conditionalAssign1( + Guard guard, AbstractValue vGuard, PreSsa::PhiNode phi, Expr e, PreSsa::Definition upd, + PreBasicBlocks::PreBasicBlock bbGuard + ) { + exists(PreBasicBlocks::PreBasicBlock bbPhi | + conditionalAssign0(guard, vGuard, phi, e, upd, bbGuard, bbPhi) and + bbGuard.strictlyDominates(bbPhi) and + not preControlsDefDirect(guard, phi, vGuard) + ) + } + + pragma[noinline] + private predicate conditionalAssign2( Guard guard, AbstractValue vGuard, PreSsa::PhiNode phi, Expr e, PreSsa::Definition upd, PreBasicBlocks::PreBasicBlock bbGuard, PreSsa::Definition other ) { - conditionalAssign0(guard, vGuard, phi, e, upd, bbGuard) and + conditionalAssign1(guard, vGuard, phi, e, upd, bbGuard) and other != upd and other = phi.getAnInput() } pragma[noinline] - private predicate conditionalAssign2( + private predicate conditionalAssign3( Guard guard, AbstractValue vGuard, PreSsa::Definition def, Expr e, PreSsa::Definition upd, PreBasicBlocks::PreBasicBlock bbGuard, PreSsa::Definition other ) { - conditionalAssign1(guard, vGuard, def, e, upd, bbGuard, other) and - preControlsDirect(guard, other.getBasicBlock(), vGuard.getDualValue()) + conditionalAssign2(guard, vGuard, def, e, upd, bbGuard, other) and + preControlsDefDirect(guard, other, vGuard.getDualValue()) } /** Gets the successor block that is reached when guard `g` has abstract value `v`. */ @@ -1153,11 +1153,11 @@ module Internal { } pragma[noinline] - private predicate conditionalAssign3( + private predicate conditionalAssign4( Guard guard, AbstractValue vGuard, PreSsa::Definition def, Expr e, PreSsa::Definition upd, PreBasicBlocks::PreBasicBlock bbGuard, PreSsa::Definition other ) { - conditionalAssign1(guard, vGuard, def, e, upd, bbGuard, other) and + conditionalAssign2(guard, vGuard, def, e, upd, bbGuard, other) and other.getBasicBlock().dominates(bbGuard) and not other.isLiveAtEndOfBlock(getConditionalSuccessor(guard, vGuard)) } @@ -1184,10 +1184,10 @@ module Internal { ) or exists(PreSsa::Definition upd, PreBasicBlocks::PreBasicBlock bbGuard | - conditionalAssign0(guard, vGuard, def, e, upd, bbGuard) + conditionalAssign1(guard, vGuard, def, e, upd, bbGuard) | forall(PreSsa::Definition other | - conditionalAssign1(guard, vGuard, def, e, upd, bbGuard, other) + conditionalAssign2(guard, vGuard, def, e, upd, bbGuard, other) | // For example: // if (guard) @@ -1195,14 +1195,14 @@ module Internal { // else // other = b; // def = phi(upd, other) - conditionalAssign2(guard, vGuard, def, e, upd, bbGuard, other) + conditionalAssign3(guard, vGuard, def, e, upd, bbGuard, other) or // For example: // other = a; // if (guard) // upd = b; // def = phi(other, upd) - conditionalAssign3(guard, vGuard, def, e, upd, bbGuard, other) + conditionalAssign4(guard, vGuard, def, e, upd, bbGuard, other) ) ) } diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Completion.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Completion.qll index cf72b9a6991..a470d0c4b8a 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Completion.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/Completion.qll @@ -49,7 +49,10 @@ private newtype TCompletion = nestedFinallyCompletion(outer, nestLevel) } -pragma[noinline] +pragma[nomagic] +private int getAFinallyNestLevel() { result = any(Statements::TryStmtTree t).nestLevel() } + +pragma[nomagic] private predicate nestedFinallyCompletion(Completion outer, int nestLevel) { ( outer = TReturnCompletion() @@ -64,7 +67,7 @@ private predicate nestedFinallyCompletion(Completion outer, int nestLevel) { or outer = TExitCompletion() ) and - nestLevel = any(Statements::TryStmtTree t).nestLevel() + nestLevel = getAFinallyNestLevel() } pragma[noinline] diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/NonReturning.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/NonReturning.qll index 16d806e72f7..10f92d882b7 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/NonReturning.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/NonReturning.qll @@ -6,8 +6,6 @@ */ import csharp -private import cil -private import semmle.code.cil.CallableReturns private import semmle.code.csharp.ExprOrStmtParent private import semmle.code.csharp.commons.Assertions private import semmle.code.csharp.frameworks.System @@ -39,15 +37,6 @@ private class ThrowingCall extends NonReturningCall { or this.(FailingAssertion).getAssertionFailure().isException(c.getExceptionClass()) or - exists(Callable target, CIL::Method m, CIL::Type ex | - target = this.getTarget() and - not target.hasBody() and - target.matchesHandle(m) and - alwaysThrowsException(m, ex) and - c.getExceptionClass().matchesHandle(ex) and - not m.isVirtual() - ) - or this = any(MethodCall mc | mc.getTarget() diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreBasicBlocks.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreBasicBlocks.qll index 6a507fb8014..08debc21c0d 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreBasicBlocks.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreBasicBlocks.qll @@ -75,8 +75,10 @@ class PreBasicBlock extends ControlFlowElement { predicate immediatelyDominates(PreBasicBlock bb) { bbIDominates(this, bb) } + pragma[inline] predicate strictlyDominates(PreBasicBlock bb) { this.immediatelyDominates+(bb) } + pragma[inline] predicate dominates(PreBasicBlock bb) { bb = this or @@ -97,6 +99,7 @@ class ConditionBlock extends PreBasicBlock { ) } + pragma[nomagic] private predicate immediatelyControls(PreBasicBlock succ, ConditionalCompletion cc) { exists(ControlFlowElement last, Completion c | last = this.getLastElement() and diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreSsa.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreSsa.qll index 42d9c21102a..c7c1de2308b 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreSsa.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/internal/PreSsa.qll @@ -31,9 +31,52 @@ module PreSsa { } predicate implicitEntryDef(Callable c, SsaInput::BasicBlock bb, SsaInput::SourceVariable v) { - not v instanceof LocalScopeVariable and c = v.getACallable() and - scopeFirst(c, bb) + scopeFirst(c, bb) and + ( + not v instanceof LocalScopeVariable + or + v.(SimpleLocalScopeVariable).isReadonlyCapturedBy(c) + ) + } + + /** Holds if `a` is assigned in callable `c`. */ + pragma[nomagic] + private predicate assignableDefinition(Assignable a, Callable c) { + exists(AssignableDefinition def | + def.getTarget() = a and + c = def.getEnclosingCallable() + | + not c instanceof Constructor or + a instanceof LocalScopeVariable + ) + } + + pragma[nomagic] + private predicate assignableUniqueWriter(Assignable a, Callable c) { + c = unique(Callable c0 | assignableDefinition(a, c0) | c0) + } + + /** Holds if `a` is accessed in callable `c`. */ + pragma[nomagic] + private predicate assignableAccess(Assignable a, Callable c) { + exists(AssignableAccess aa | aa.getTarget() = a | c = aa.getEnclosingCallable()) + } + + /** + * A local scope variable that is amenable to SSA analysis. + * + * This is either a local variable that is not captured, or one + * where all writes happen in the defining callable. + */ + class SimpleLocalScopeVariable extends LocalScopeVariable { + SimpleLocalScopeVariable() { assignableUniqueWriter(this, this.getCallable()) } + + /** Holds if this local scope variable is read-only captured by `c`. */ + predicate isReadonlyCapturedBy(Callable c) { + assignableAccess(this, c) and + c != this.getCallable() + } } module SsaInput implements SsaImplCommon::InputSig { @@ -47,40 +90,6 @@ module PreSsa { ExitBasicBlock() { scopeLast(_, this.getLastElement(), _) } } - /** Holds if `a` is assigned in non-constructor callable `c`. */ - pragma[nomagic] - private predicate assignableDefinition(Assignable a, Callable c) { - exists(AssignableDefinition def | def.getTarget() = a | - c = def.getEnclosingCallable() and - not c instanceof Constructor - ) - } - - /** Holds if `a` is accessed in callable `c`. */ - pragma[nomagic] - private predicate assignableAccess(Assignable a, Callable c) { - exists(AssignableAccess aa | aa.getTarget() = a | c = aa.getEnclosingCallable()) - } - - pragma[nomagic] - private predicate assignableNoCapturing(Assignable a, Callable c) { - assignableAccess(a, c) and - /* - * The code below is equivalent to - * ```ql - * not exists(Callable other | assignableDefinition(a, other) | other != c) - * ``` - * but it avoids a Cartesian product in the compiler generated antijoin - * predicate. - */ - - ( - not assignableDefinition(a, _) - or - c = unique(Callable c0 | assignableDefinition(a, c0) | c0) - ) - } - pragma[noinline] private predicate assignableNoComplexQualifiers(Assignable a) { forall(QualifiableExpr qe | qe.(AssignableAccess).getTarget() = a | qe.targetIsThisInstance()) @@ -94,15 +103,22 @@ module PreSsa { private Callable c; SourceVariable() { + assignableAccess(this, c) and ( - this instanceof LocalScopeVariable + this instanceof SimpleLocalScopeVariable or - this = any(Field f | not f.isVolatile()) - or - this = any(TrivialProperty tp | not tp.isOverridableOrImplementable()) - ) and - assignableNoCapturing(this, c) and - assignableNoComplexQualifiers(this) + ( + this = any(Field f | not f.isVolatile()) + or + this = any(TrivialProperty tp | not tp.isOverridableOrImplementable()) + ) and + ( + not assignableDefinition(this, _) + or + assignableUniqueWriter(this, c) + ) and + assignableNoComplexQualifiers(this) + ) } /** Gets a callable in which this simple assignable can be analyzed. */ diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/Nullness.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/Nullness.qll index a281c21b657..53ee9181ec5 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/Nullness.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/Nullness.qll @@ -218,19 +218,6 @@ private predicate isNullDefaultArgument(Ssa::ExplicitDefinition def, AlwaysNullE ) } -/** - * Holds if `edef` is an implicit entry definition for a captured variable that - * may be guarded, because a call to the capturing callable is guarded. - */ -private predicate isMaybeGuardedCapturedDef(Ssa::ImplicitEntryDefinition edef) { - exists(Ssa::ExplicitDefinition def, ControlFlow::Nodes::ElementNode c, G::Guard g, NullValue nv | - def.isCapturedVariableDefinitionFlowIn(edef, c, _) and - g = def.getARead() and - g.controlsNode(c, nv) and - nv.isNonNull() - ) -} - /** Holds if `def` is an SSA definition that may be `null`. */ private predicate defMaybeNull(Ssa::Definition def, string msg, Element reason) { not nonNullDef(def) and @@ -268,7 +255,6 @@ private predicate defMaybeNull(Ssa::Definition def, string msg, Element reason) exists(Dereference d | dereferenceAt(_, _, def, d) | d.hasNullableType() and not def instanceof Ssa::PhiNode and - not isMaybeGuardedCapturedDef(def) and reason = def.getSourceVariable().getAssignable() and msg = "because it has a nullable type" ) @@ -583,14 +569,8 @@ class Dereference extends G::DereferenceableExpr { */ predicate isAlwaysNull(Ssa::SourceVariable v) { this = v.getAnAccess() and - // Exclude fields, properties, and captured variables, as they may not have an - // accurate SSA representation - v.getAssignable() = - any(LocalScopeVariable lsv | - strictcount(Callable c | - c = any(AssignableDefinition ad | ad.getTarget() = lsv).getEnclosingCallable() - ) = 1 - ) and + // Exclude fields and properties, as they may not have an accurate SSA representation + v.getAssignable() instanceof LocalScopeVariable and ( forex(Ssa::Definition def0 | this = def0.getARead() | this.isAlwaysNull0(def0)) or diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll index f77e5f7fd98..673bd1a5638 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll @@ -447,6 +447,8 @@ module Ssa { final AssignableDefinition getADefinition() { result = SsaImpl::getADefinition(this) } /** + * DEPRECATED. + * * Holds if this definition updates a captured local scope variable, and the updated * value may be read from the implicit entry definition `def` using one or more calls * (as indicated by `additionalCalls`), starting from call `c`. @@ -467,13 +469,15 @@ module Ssa { * If this definition is the update of `i` on line 5, then the value may be read inside * `M2` via the call on line 6. */ - final predicate isCapturedVariableDefinitionFlowIn( + deprecated final predicate isCapturedVariableDefinitionFlowIn( ImplicitEntryDefinition def, ControlFlow::Nodes::ElementNode c, boolean additionalCalls ) { - SsaImpl::isCapturedVariableDefinitionFlowIn(this, def, c, additionalCalls) + none() } /** + * DEPRECATED. + * * Holds if this definition updates a captured local scope variable, and the updated * value may be read from the implicit call definition `cdef` using one or more calls * (as indicated by `additionalCalls`). @@ -494,10 +498,10 @@ module Ssa { * If this definition is the update of `i` on line 4, then the value may be read outside * of `M2` via the call on line 5. */ - final predicate isCapturedVariableDefinitionFlowOut( + deprecated final predicate isCapturedVariableDefinitionFlowOut( ImplicitCallDefinition cdef, boolean additionalCalls ) { - SsaImpl::isCapturedVariableDefinitionFlowOut(this, cdef, additionalCalls) + none() } override Element getElement() { result = ad.getElement() } @@ -526,8 +530,6 @@ module Ssa { or SsaImpl::updatesNamedFieldOrProp(bb, i, _, v, _) or - SsaImpl::updatesCapturedVariable(bb, i, _, v, _, _) - or SsaImpl::variableWriteQualifier(bb, i, v, _) ) } @@ -572,10 +574,9 @@ module Ssa { private Call c; ImplicitCallDefinition() { - exists(ControlFlow::BasicBlock bb, SourceVariable v, int i | this.definesAt(v, bb, i) | + exists(ControlFlow::BasicBlock bb, SourceVariable v, int i | + this.definesAt(v, bb, i) and SsaImpl::updatesNamedFieldOrProp(bb, i, c, v, _) - or - SsaImpl::updatesCapturedVariable(bb, i, c, v, _, _) ) } @@ -593,9 +594,6 @@ module Ssa { result.getEnclosingCallable() = setter and result.getTarget() = this.getSourceVariable().getAssignable() ) - or - SsaImpl::updatesCapturedVariable(_, _, this.getCall(), _, result, _) and - result.getTarget() = this.getSourceVariable().getAssignable() } override string toString() { diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/BaseSSA.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/BaseSSA.qll index 0933559347e..f30b1769107 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/BaseSSA.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/BaseSSA.qll @@ -24,7 +24,16 @@ module BaseSsa { ) } + private predicate implicitEntryDef( + Callable c, ControlFlow::BasicBlocks::EntryBlock bb, SsaInput::SourceVariable v + ) { + v.isReadonlyCapturedBy(c) and + c = bb.getCallable() + } + private module SsaInput implements SsaImplCommon::InputSig { + private import semmle.code.csharp.controlflow.internal.PreSsa + class BasicBlock = ControlFlow::BasicBlock; BasicBlock getImmediateBasicBlockDominator(BasicBlock bb) { @@ -35,20 +44,17 @@ module BaseSsa { class ExitBasicBlock = ControlFlow::BasicBlocks::ExitBlock; - pragma[noinline] - private Callable getAnAssigningCallable(LocalScopeVariable v) { - result = any(AssignableDefinition def | def.getTarget() = v).getEnclosingCallable() - } - - class SourceVariable extends LocalScopeVariable { - SourceVariable() { not getAnAssigningCallable(this) != getAnAssigningCallable(this) } - } + class SourceVariable = PreSsa::SimpleLocalScopeVariable; predicate variableWrite(BasicBlock bb, int i, SourceVariable v, boolean certain) { exists(AssignableDefinition def | definitionAt(def, bb, i, v) and if def.isCertain() then certain = true else certain = false ) + or + implicitEntryDef(_, bb, v) and + i = -1 and + certain = true } predicate variableRead(BasicBlock bb, int i, SourceVariable v, boolean certain) { @@ -87,7 +93,15 @@ module BaseSsa { not result instanceof PhiNode } - Location getLocation() { result = this.getDefinition().getLocation() } + Location getLocation() { + result = this.getDefinition().getLocation() + or + exists(Callable c, SsaInput::BasicBlock bb, SsaInput::SourceVariable v | + this.definesAt(v, bb, -1) and + implicitEntryDef(c, bb, v) and + result = c.getLocation() + ) + } } class PhiNode extends SsaImpl::PhiNode, Definition { diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/CallableReturns.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/CallableReturns.qll index 6adb1e376b0..52008bf6c01 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/CallableReturns.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/CallableReturns.qll @@ -3,9 +3,7 @@ */ import csharp -private import cil private import semmle.code.csharp.dataflow.Nullness -private import semmle.code.cil.CallableReturns as CR private predicate finalCallable(Callable c) { not c.(Virtualizable).isVirtual() and @@ -15,19 +13,11 @@ private predicate finalCallable(Callable c) { /** Holds if callable `c` always returns null. */ predicate alwaysNullCallable(Callable c) { finalCallable(c) and - ( - exists(CIL::Method m | m.matchesHandle(c) | CR::alwaysNullMethod(m)) - or - forex(Expr e | c.canReturn(e) | e instanceof AlwaysNullExpr) - ) + forex(Expr e | c.canReturn(e) | e instanceof AlwaysNullExpr) } /** Holds if callable `c` always returns a non-null value. */ predicate alwaysNotNullCallable(Callable c) { finalCallable(c) and - ( - exists(CIL::Method m | m.matchesHandle(c) | CR::alwaysNotNullMethod(m)) - or - forex(Expr e | c.canReturn(e) | e instanceof NonNullExpr) - ) + forex(Expr e | c.canReturn(e) | e instanceof NonNullExpr) } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll index d69327cdfb9..4ff4722cfcc 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll @@ -1,6 +1,4 @@ private import csharp -private import cil -private import dotnet private import DataFlowImplCommon as DataFlowImplCommon private import DataFlowPublic private import DataFlowPrivate @@ -14,61 +12,17 @@ private import semmle.code.csharp.frameworks.system.collections.Generic /** * Gets a source declaration of callable `c` that has a body or has * a flow summary. - * - * If the callable has both CIL and source code, return only the source - * code version. */ -DotNet::Callable getCallableForDataFlow(DotNet::Callable c) { - exists(DotNet::Callable unboundDecl | unboundDecl = c.getUnboundDeclaration() | - result.hasBody() and - if unboundDecl.getFile().fromSource() - then - // C# callable with C# implementation in the database - result = unboundDecl - else - if unboundDecl instanceof CIL::Callable - then - // CIL callable with C# implementation in the database - unboundDecl.matchesHandle(result.(Callable)) - or - // CIL callable without C# implementation in the database - not unboundDecl.matchesHandle(any(Callable k | k.hasBody())) and - result = unboundDecl - else - // C# callable without C# implementation in the database - unboundDecl.matchesHandle(result.(CIL::Callable)) - ) -} - -/** - * Holds if `cfn` corresponds to a call that can reach callable `c` using - * additional calls, and `c` is a callable that either reads or writes to - * a captured variable. - */ -private predicate transitiveCapturedCallTarget(ControlFlow::Nodes::ElementNode cfn, Callable c) { - exists(Ssa::ExplicitDefinition def | - exists(Ssa::ImplicitEntryDefinition edef | - def.isCapturedVariableDefinitionFlowIn(edef, cfn, true) - | - c = edef.getCallable() - ) - or - exists(Ssa::ImplicitCallDefinition cdef | def.isCapturedVariableDefinitionFlowOut(cdef, true) | - cfn = cdef.getControlFlowNode() and - c = def.getEnclosingCallable() - ) - ) +Callable getCallableForDataFlow(Callable c) { + result = c.getUnboundDeclaration() and + result.hasBody() and + result.getFile().fromSource() } newtype TReturnKind = TNormalReturnKind() or TOutReturnKind(int i) { i = any(Parameter p | p.isOut()).getPosition() } or - TRefReturnKind(int i) { i = any(Parameter p | p.isRef()).getPosition() } or - TImplicitCapturedReturnKind(LocalScopeVariable v) { - exists(Ssa::ExplicitDefinition def | def.isCapturedVariableDefinitionFlowOut(_, _) | - v = def.getSourceVariable().getAssignable() - ) - } + TRefReturnKind(int i) { i = any(Parameter p | p.isRef()).getPosition() } /** * A summarized callable where the summary should be used for dataflow analysis. @@ -92,9 +46,10 @@ private module Cached { */ cached newtype TDataFlowCallable = - TDotNetCallable(DotNet::Callable c) { c.isUnboundDeclaration() } or + TCallable(Callable c) { c.isUnboundDeclaration() } or TSummarizedCallable(DataFlowSummarizedCallable sc) or - TFieldOrProperty(FieldOrProperty f) + TFieldOrPropertyCallable(FieldOrProperty f) or + TCapturedVariableCallable(LocalScopeVariable v) { v.isCaptured() } cached newtype TDataFlowCall = @@ -105,13 +60,6 @@ private module Cached { TExplicitDelegateLikeCall(ControlFlow::Nodes::ElementNode cfn, DelegateLikeCall dc) { cfn.getAstNode() = dc } or - TTransitiveCapturedCall(ControlFlow::Nodes::ElementNode cfn) { - transitiveCapturedCallTarget(cfn, _) - } or - TCilCall(CIL::Call call) { - // No need to include calls that are compiled from source - not call.getImplementation().getMethod().compiledFromSource() - } or TSummaryCall(FlowSummary::SummarizedCallable c, FlowSummaryImpl::Private::SummaryNode receiver) { FlowSummaryImpl::Private::summaryCallbackRange(c, receiver) } @@ -120,24 +68,16 @@ private module Cached { cached DataFlowCallable viableCallable(DataFlowCall call) { result = call.getARuntimeTarget() } - private predicate capturedWithFlowIn(LocalScopeVariable v) { - exists(Ssa::ExplicitDefinition def | def.isCapturedVariableDefinitionFlowIn(_, _, _) | - v = def.getSourceVariable().getAssignable() - ) - } - cached newtype TParameterPosition = TPositionalParameterPosition(int i) { i = any(Parameter p).getPosition() } or TThisParameterPosition() or - TImplicitCapturedParameterPosition(LocalScopeVariable v) { capturedWithFlowIn(v) } or TDelegateSelfParameterPosition() cached newtype TArgumentPosition = TPositionalArgumentPosition(int i) { i = any(Parameter p).getPosition() } or TQualifierArgumentPosition() or - TImplicitCapturedArgumentPosition(LocalScopeVariable v) { capturedWithFlowIn(v) } or TDelegateSelfArgumentPosition() } @@ -229,31 +169,21 @@ class RefReturnKind extends OutRefReturnKind, TRefReturnKind { override string toString() { result = "ref parameter " + pos } } -/** A value implicitly returned from a callable using a captured variable. */ -class ImplicitCapturedReturnKind extends ReturnKind, TImplicitCapturedReturnKind { - private LocalScopeVariable v; - - ImplicitCapturedReturnKind() { this = TImplicitCapturedReturnKind(v) } - - /** Gets the captured variable. */ - LocalScopeVariable getVariable() { result = v } - - override string toString() { result = "captured " + v } -} - /** A callable used for data flow. */ class DataFlowCallable extends TDataFlowCallable { /** Gets the underlying source code callable, if any. */ - DotNet::Callable asCallable() { this = TDotNetCallable(result) } + Callable asCallable() { this = TCallable(result) } /** Gets the underlying summarized callable, if any. */ FlowSummary::SummarizedCallable asSummarizedCallable() { this = TSummarizedCallable(result) } /** Gets the underlying field or property, if any. */ - FieldOrProperty asFieldOrProperty() { this = TFieldOrProperty(result) } + FieldOrProperty asFieldOrProperty() { this = TFieldOrPropertyCallable(result) } + + LocalScopeVariable asCapturedVariable() { this = TCapturedVariableCallable(result) } /** Gets the underlying callable. */ - DotNet::Callable getUnderlyingCallable() { + Callable getUnderlyingCallable() { result = this.asCallable() or result = this.asSummarizedCallable() } @@ -262,6 +192,8 @@ class DataFlowCallable extends TDataFlowCallable { result = this.getUnderlyingCallable().toString() or result = this.asFieldOrProperty().toString() + or + result = this.asCapturedVariable().toString() } /** Get the location of this dataflow callable. */ @@ -269,6 +201,8 @@ class DataFlowCallable extends TDataFlowCallable { result = this.getUnderlyingCallable().getLocation() or result = this.asFieldOrProperty().getLocation() + or + result = this.asCapturedVariable().getLocation() } } @@ -276,8 +210,7 @@ class DataFlowCallable extends TDataFlowCallable { abstract class DataFlowCall extends TDataFlowCall { /** * Gets a run-time target of this call. A target is always a source - * declaration, and if the callable has both CIL and source code, only - * the source code version is returned. + * declaration. */ abstract DataFlowCallable getARuntimeTarget(); @@ -291,7 +224,7 @@ abstract class DataFlowCall extends TDataFlowCall { abstract DataFlowCallable getEnclosingCallable(); /** Gets the underlying expression, if any. */ - final DotNet::Expr getExpr() { result = this.getNode().asExpr() } + final Expr getExpr() { result = this.getNode().asExpr() } /** Gets the argument at position `pos` of this call. */ final ArgumentNode getArgument(ArgumentPosition pos) { result.argumentOf(this, pos) } @@ -389,60 +322,6 @@ class ExplicitDelegateLikeDataFlowCall extends DelegateDataFlowCall, TExplicitDe override Location getLocation() { result = cfn.getLocation() } } -/** - * A call that can reach a callable, using one or more additional calls, which - * reads or updates a captured variable. We model such a chain of calls as just - * a single call for performance reasons. - */ -class TransitiveCapturedDataFlowCall extends DataFlowCall, TTransitiveCapturedCall { - private ControlFlow::Nodes::ElementNode cfn; - - TransitiveCapturedDataFlowCall() { this = TTransitiveCapturedCall(cfn) } - - override DataFlowCallable getARuntimeTarget() { - transitiveCapturedCallTarget(cfn, result.asCallable()) - } - - override ControlFlow::Nodes::ElementNode getControlFlowNode() { result = cfn } - - override DataFlow::ExprNode getNode() { none() } - - override DataFlowCallable getEnclosingCallable() { - result.asCallable() = cfn.getEnclosingCallable() - } - - override string toString() { result = "[transitive] " + cfn.toString() } - - override Location getLocation() { result = cfn.getLocation() } -} - -/** A CIL call relevant for data flow. */ -class CilDataFlowCall extends DataFlowCall, TCilCall { - private CIL::Call call; - - CilDataFlowCall() { this = TCilCall(call) } - - /** Gets the underlying CIL call. */ - CIL::Call getCilCall() { result = call } - - override DataFlowCallable getARuntimeTarget() { - // There is no dispatch library for CIL, so do not consider overrides for now - result.getUnderlyingCallable() = getCallableForDataFlow(call.getTarget()) - } - - override ControlFlow::Nodes::ElementNode getControlFlowNode() { none() } - - override DataFlow::ExprNode getNode() { result.getExpr() = call } - - override DataFlowCallable getEnclosingCallable() { - result.asCallable() = call.getEnclosingCallable() - } - - override string toString() { result = call.toString() } - - override Location getLocation() { result = call.getLocation() } -} - /** * A synthesized call inside a callable with a flow summary. * @@ -482,11 +361,6 @@ class ParameterPosition extends TParameterPosition { /** Holds if this position represents a `this` parameter. */ predicate isThisParameter() { this = TThisParameterPosition() } - /** Holds if this position is used to model flow through captured variables. */ - predicate isImplicitCapturedParameterPosition(LocalScopeVariable v) { - this = TImplicitCapturedParameterPosition(v) - } - /** * Holds if this position represents a reference to a delegate itself. * @@ -501,10 +375,6 @@ class ParameterPosition extends TParameterPosition { or this.isThisParameter() and result = "this" or - exists(LocalScopeVariable v | - this.isImplicitCapturedParameterPosition(v) and result = "captured " + v - ) - or this.isDelegateSelf() and result = "delegate self" } @@ -518,11 +388,6 @@ class ArgumentPosition extends TArgumentPosition { /** Holds if this position represents a qualifier. */ predicate isQualifier() { this = TQualifierArgumentPosition() } - /** Holds if this position is used to model flow through captured variables. */ - predicate isImplicitCapturedArgumentPosition(LocalScopeVariable v) { - this = TImplicitCapturedArgumentPosition(v) - } - /** * Holds if this position represents a reference to a delegate itself. * @@ -537,10 +402,6 @@ class ArgumentPosition extends TArgumentPosition { or this.isQualifier() and result = "qualifier" or - exists(LocalScopeVariable v | - this.isImplicitCapturedArgumentPosition(v) and result = "captured " + v - ) - or this.isDelegateSelf() and result = "delegate self" } @@ -552,10 +413,5 @@ predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { or ppos.isThisParameter() and apos.isQualifier() or - exists(LocalScopeVariable v | - ppos.isImplicitCapturedParameterPosition(v) and - apos.isImplicitCapturedArgumentPosition(v) - ) - or ppos.isDelegateSelf() and apos.isDelegateSelf() } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll index 09041d0c3d6..f4aba4fdfd0 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll @@ -1,6 +1,4 @@ private import csharp -private import cil -private import dotnet private import DataFlowPublic private import DataFlowDispatch private import DataFlowImplCommon @@ -18,8 +16,6 @@ private import semmle.code.csharp.frameworks.NHibernate private import semmle.code.csharp.frameworks.Razor private import semmle.code.csharp.frameworks.system.Collections private import semmle.code.csharp.frameworks.system.threading.Tasks -private import semmle.code.cil.Ssa::Ssa as CilSsa -private import semmle.code.cil.internal.SsaImpl as CilSsaImpl private import codeql.util.Unit private import codeql.util.Boolean @@ -57,15 +53,15 @@ abstract class NodeImpl extends Node { /** Do not call: use `getType()` instead. */ cached - abstract DotNet::Type getTypeImpl(); + abstract Type getTypeImpl(); /** Gets the type of this node used for type pruning. */ DataFlowType getDataFlowType() { forceCachingInSameStage() and exists(Type t0 | result.asGvnType() = Gvn::getGlobalValueNumber(t0) | - t0 = getCSharpType(this.getType()) + t0 = this.getType() or - not exists(getCSharpType(this.getType())) and + not exists(this.getType()) and t0 instanceof ObjectType ) } @@ -96,16 +92,12 @@ private DataFlowCallable getEnclosingStaticFieldOrProperty(Expr e) { private class ExprNodeImpl extends ExprNode, NodeImpl { override DataFlowCallable getEnclosingCallableImpl() { - result.asCallable() = - [ - this.getExpr().(CIL::Expr).getEnclosingCallable().(DotNet::Callable), - this.getControlFlowNodeImpl().getEnclosingCallable() - ] + result.asCallable() = this.getControlFlowNodeImpl().getEnclosingCallable() or result = getEnclosingStaticFieldOrProperty(this.asExpr()) } - override DotNet::Type getTypeImpl() { + override Type getTypeImpl() { forceCachingInSameStage() and result = this.getExpr().getType() } @@ -121,37 +113,77 @@ private class ExprNodeImpl extends ExprNode, NodeImpl { override string toStringImpl() { forceCachingInSameStage() and result = this.getControlFlowNodeImpl().toString() - or - exists(CIL::Expr e | - this = TCilExprNode(e) and - result = e.toString() - ) } } +/** + * A node that represents the creation of a local function. + * + * Needed for flow through captured variables, where we treat local functions + * as if they were lambdas. + */ +abstract private class LocalFunctionCreationNode extends NodeImpl, TLocalFunctionCreationNode { + ControlFlow::Nodes::ElementNode cfn; + LocalFunction function; + boolean isPostUpdate; + + LocalFunctionCreationNode() { + this = TLocalFunctionCreationNode(cfn, isPostUpdate) and + function = cfn.getAstNode().(LocalFunctionStmt).getLocalFunction() + } + + LocalFunction getFunction() { result = function } + + ExprNode getAnAccess(boolean inSameCallable) { + isLocalFunctionCallReceiver(_, result.getExpr(), this.getFunction()) and + if result.getEnclosingCallable() = this.getEnclosingCallable() + then inSameCallable = true + else inSameCallable = false + } + + override DataFlowCallable getEnclosingCallableImpl() { + result.asCallable() = cfn.getEnclosingCallable() + } + + override Type getTypeImpl() { none() } + + override DataFlowType getDataFlowType() { result.asDelegate() = function } + + override ControlFlow::Nodes::ElementNode getControlFlowNodeImpl() { none() } + + ControlFlow::Nodes::ElementNode getUnderlyingControlFlowNode() { result = cfn } + + override Location getLocationImpl() { result = cfn.getLocation() } +} + +private class LocalFunctionCreationPreNode extends LocalFunctionCreationNode { + LocalFunctionCreationPreNode() { isPostUpdate = false } + + override string toStringImpl() { result = cfn.toString() } +} + /** Calculation of the relative order in which `this` references are read. */ private module ThisFlow { private class BasicBlock = ControlFlow::BasicBlock; + /** Holds if `e` is a `this` access. */ + predicate thisAccessExpr(Expr e) { e instanceof ThisAccess or e instanceof BaseAccess } + /** Holds if `n` is a `this` access at control flow node `cfn`. */ private predicate thisAccess(Node n, ControlFlow::Node cfn) { n.(InstanceParameterNode).getCallable() = cfn.(ControlFlow::Nodes::EntryNode).getCallable() or - n.asExprAtNode(cfn) = any(Expr e | e instanceof ThisAccess or e instanceof BaseAccess) + thisAccessExpr(n.asExprAtNode(cfn)) or - n = - any(InstanceParameterAccessNode pan | - pan.getUnderlyingControlFlowNode() = cfn and pan.isPreUpdate() - ) + cfn = n.(InstanceParameterAccessPreNode).getUnderlyingControlFlowNode() } private predicate thisAccess(Node n, BasicBlock bb, int i) { thisAccess(n, bb.getNode(i)) or - exists(Parameter p | n.(PrimaryConstructorThisAccessNode).getParameter() = p | + exists(Parameter p | n.(PrimaryConstructorThisAccessPreNode).getParameter() = p | bb.getCallable() = p.getCallable() and - i = p.getPosition() + 1 and - not n instanceof PostUpdateNode + i = p.getPosition() + 1 ) } @@ -215,10 +247,236 @@ predicate hasNodePath(ControlFlowReachabilityConfiguration conf, ExprNode n1, No ) } -/** Gets the CIL data-flow node for `node`, if any. */ -CIL::DataFlowNode asCilDataFlowNode(Node node) { - result = node.asParameter() or - result = node.asExpr() +/** Provides logic related to captured variables. */ +module VariableCapture { + private import codeql.dataflow.VariableCapture as Shared + + private predicate closureFlowStep(ControlFlow::Nodes::ExprNode e1, ControlFlow::Nodes::ExprNode e2) { + e1 = LocalFlow::getALastEvalNode(e2) + or + exists(Ssa::Definition def | + LocalFlow::ssaDefAssigns(def.getAnUltimateDefinition(), e1) and + exists(def.getAReadAtNode(e2)) + ) + } + + private module CaptureInput implements Shared::InputSig { + private import csharp as Cs + private import semmle.code.csharp.controlflow.ControlFlowGraph + private import semmle.code.csharp.controlflow.BasicBlocks as BasicBlocks + private import TaintTrackingPrivate as TaintTrackingPrivate + + class BasicBlock extends BasicBlocks::BasicBlock { + Callable getEnclosingCallable() { result = super.getCallable() } + } + + BasicBlock getImmediateBasicBlockDominator(BasicBlock bb) { + result = bb.getImmediateDominator() + } + + BasicBlock getABasicBlockSuccessor(BasicBlock bb) { result = bb.getASuccessor() } + + private predicate thisAccess(ControlFlow::Node cfn, InstanceCallable c) { + ThisFlow::thisAccessExpr(cfn.getAstNode()) and + cfn.getEnclosingCallable().getEnclosingCallable*() = c + } + + private predicate capturedThisAccess(ControlFlow::Node cfn, InstanceCallable c) { + thisAccess(cfn, c) and + cfn.getEnclosingCallable() != c + } + + private newtype TCapturedVariable = + TCapturedLocalScopeVariable(LocalScopeVariable v) { + v.isCaptured() and not v.(Parameter).getCallable() instanceof PrimaryConstructor + } or + TCapturedThis(Callable c) { capturedThisAccess(_, c) } + + /** A captured local scope variable. Includes captured `this` variables. */ + class CapturedVariable extends TCapturedVariable { + LocalScopeVariable asLocalScopeVariable() { this = TCapturedLocalScopeVariable(result) } + + Callable asThis() { this = TCapturedThis(result) } + + Callable getCallable() { + result = this.asLocalScopeVariable().getCallable() + or + result = this.asThis() + } + + Type getType() { + result = this.asLocalScopeVariable().getType() + or + result = this.asThis().getDeclaringType() + } + + string toString() { + result = this.asLocalScopeVariable().toString() + or + result = "this in " + this.asThis() + } + + Location getLocation() { + result = this.asLocalScopeVariable().getLocation() + or + result = this.asThis().getLocation() + } + } + + abstract class CapturedParameter extends CapturedVariable { + abstract ParameterNodeImpl getParameterNode(); + } + + private class CapturedExplicitParameter extends CapturedParameter, TCapturedLocalScopeVariable { + private Parameter p; + + CapturedExplicitParameter() { p = this.asLocalScopeVariable() } + + override ExplicitParameterNode getParameterNode() { result.asParameter() = p } + } + + private class CapturedThisParameter extends CapturedParameter, TCapturedThis { + override InstanceParameterNode getParameterNode() { + result = TInstanceParameterNode(this.asThis()) + } + } + + class Expr extends ControlFlow::Node { + predicate hasCfgNode(BasicBlock bb, int i) { this = bb.getNode(i) } + } + + class VariableWrite extends Expr { + CapturedVariable v; + AssignableDefinition def; + + VariableWrite() { + def.getTarget() = v.asLocalScopeVariable() and + this = def.getAControlFlowNode() and + // the shared variable capture library inserts implicit parameter definitions + not def instanceof AssignableDefinitions::ImplicitParameterDefinition + } + + ControlFlow::Node getRhs() { LocalFlow::defAssigns(def, this, result) } + + CapturedVariable getVariable() { result = v } + } + + class VariableRead extends Expr { + CapturedVariable v; + + VariableRead() { + this.getAstNode().(AssignableRead).getTarget() = v.asLocalScopeVariable() + or + thisAccess(this, v.asThis()) + } + + CapturedVariable getVariable() { result = v } + } + + class ClosureExpr extends Expr { + Callable c; + + ClosureExpr() { lambdaCreationExpr(this.getAstNode(), c) } + + predicate hasBody(Callable body) { body = c } + + predicate hasAliasedAccess(Expr f) { + closureFlowStep+(this, f) and not closureFlowStep(f, _) + or + isLocalFunctionCallReceiver(_, f.getAstNode(), c) + } + } + + class Callable extends Cs::Callable { + predicate isConstructor() { this instanceof Constructor } + } + } + + class CapturedVariable = CaptureInput::CapturedVariable; + + class ClosureExpr = CaptureInput::ClosureExpr; + + module Flow = Shared::Flow; + + private Flow::ClosureNode asClosureNode(Node n) { + result = n.(CaptureNode).getSynthesizedCaptureNode() + or + result.(Flow::ExprNode).getExpr() = + [ + n.(ExprNode).getControlFlowNode(), + n.(LocalFunctionCreationPreNode).getUnderlyingControlFlowNode() + ] + or + result.(Flow::VariableWriteSourceNode).getVariableWrite().getRhs() = + n.(ExprNode).getControlFlowNode() + or + result.(Flow::ExprPostUpdateNode).getExpr() = + [ + n.(PostUpdateNode).getPreUpdateNode().(ExprNode).getControlFlowNode(), + n.(LocalFunctionCreationPostUpdateNode).getUnderlyingControlFlowNode() + ] + or + result.(Flow::ParameterNode).getParameter().getParameterNode() = n + or + result.(Flow::ThisParameterNode).getCallable() = n.(DelegateSelfReferenceNode).getCallable() + } + + CapturedVariable getCapturedVariableContent(CapturedVariableContent c) { + c = TCapturedVariableContent(result) + } + + predicate storeStep(Node node1, CapturedVariableContent c, Node node2) { + Flow::storeStep(asClosureNode(node1), getCapturedVariableContent(c), asClosureNode(node2)) + } + + predicate readStep(Node node1, CapturedVariableContent c, Node node2) { + Flow::readStep(asClosureNode(node1), getCapturedVariableContent(c), asClosureNode(node2)) + } + + predicate valueStep(Node node1, Node node2) { + Flow::localFlowStep(asClosureNode(node1), asClosureNode(node2)) + } + + predicate clearsContent(Node node, CapturedVariableContent c) { + Flow::clearsContent(asClosureNode(node), getCapturedVariableContent(c)) + } + + class CapturedSsaDefinitionExt extends SsaImpl::DefinitionExt { + CapturedSsaDefinitionExt() { + this.getSourceVariable().getAssignable() = any(CapturedVariable v).asLocalScopeVariable() + } + } + + private predicate flowInsensitiveWriteStep( + ExprNode node1, FlowInsensitiveCapturedVariableNode node2, LocalScopeVariable v + ) { + exists(AssignableDefinition def | + def.getSource() = node1.getExpr() and + def.getTarget() = v and + node2.getVariable() = v + ) + } + + private predicate flowInsensitiveReadStep( + FlowInsensitiveCapturedVariableNode node1, ExprNode node2, LocalScopeVariable v + ) { + node1.getVariable() = v and + node2.getExpr().(VariableRead).getTarget() = v + } + + /** + * Holds if there is control-flow insensitive data-flow from `node1` to `node2` + * involving a captured variable. Only used in lambda flow. + */ + predicate flowInsensitiveStep(Node node1, Node node2) { + exists(LocalScopeVariable v | + flowInsensitiveWriteStep(node1, node2, v) and + flowInsensitiveReadStep(_, _, v) + or + flowInsensitiveReadStep(node1, node2, v) and + flowInsensitiveWriteStep(_, _, v) + ) + } } /** Provides predicates related to local data flow. */ @@ -342,6 +600,18 @@ module LocalFlow { } } + predicate defAssigns(AssignableDefinition def, ControlFlow::Node cfnDef, ControlFlow::Node value) { + any(LocalExprStepConfiguration x).hasDefPath(_, value, def, cfnDef) + } + + predicate ssaDefAssigns(Ssa::ExplicitDefinition ssaDef, ControlFlow::Nodes::ExprNode value) { + exists(AssignableDefinition def, ControlFlow::Node cfnDef | + any(LocalExprStepConfiguration conf).hasDefPath(_, value, def, cfnDef) and + ssaDef.getADefinition() = def and + ssaDef.getControlFlowNode() = cfnDef + ) + } + /** * An uncertain SSA definition. Either an uncertain explicit definition or an * uncertain qualifier definition. @@ -442,94 +712,7 @@ module LocalFlow { ) } - predicate localFlowCapturedVarStep(Node nodeFrom, ImplicitCapturedArgumentNode nodeTo) { - // Flow from SSA definition to implicit captured variable argument - exists(Ssa::ExplicitDefinition def, ControlFlow::Nodes::ElementNode call | - def = getSsaDefinitionExt(nodeFrom) and - def.isCapturedVariableDefinitionFlowIn(_, call, _) and - nodeTo = TImplicitCapturedArgumentNode(call, def.getSourceVariable().getAssignable()) - ) - } - - private module CilFlow { - /** - * Holds if `nodeFrom` is a last node referencing SSA definition `def`, which - * can reach `next`. - */ - private predicate localFlowCilSsaInput( - Node nodeFrom, CilSsaImpl::DefinitionExt def, CilSsaImpl::DefinitionExt next - ) { - exists(CIL::BasicBlock bb, int i | CilSsaImpl::lastRefBeforeRedefExt(def, bb, i, next) | - def.definesAt(_, bb, i, _) and - def = nodeFrom.(CilSsaDefinitionExtNode).getDefinition() and - def != next - or - nodeFrom = TCilExprNode(bb.getNode(i).(CIL::ReadAccess)) - ) - } - - /** - * Holds if there is a local flow step from `nodeFrom` to `nodeTo` involving - * CIL SSA definition `def`. - */ - private predicate localCilSsaFlowStep(CilSsaImpl::DefinitionExt def, Node nodeFrom, Node nodeTo) { - // Flow into SSA definition - exists(CIL::VariableUpdate vu | - vu = def.(CilSsa::Definition).getVariableUpdate() and - vu.getSource() = asCilDataFlowNode(nodeFrom) and - def = nodeTo.(CilSsaDefinitionExtNode).getDefinition() - ) - or - // Flow from SSA definition to first read - def = nodeFrom.(CilSsaDefinitionExtNode).getDefinition() and - nodeTo = TCilExprNode(CilSsaImpl::getAFirstReadExt(def)) - or - // Flow from read to next read - exists(CIL::ReadAccess readFrom, CIL::ReadAccess readTo | - CilSsaImpl::hasAdjacentReadsExt(def, readFrom, readTo) and - nodeTo = TCilExprNode(readTo) and - nodeFrom = TCilExprNode(readFrom) and - nodeFrom != nodeTo - ) - or - // Flow into phi (read) node - exists(CilSsaImpl::DefinitionExt phi | - localFlowCilSsaInput(nodeFrom, def, phi) and - phi = nodeTo.(CilSsaDefinitionExtNode).getDefinition() - | - phi instanceof CilSsa::PhiNode - or - phi instanceof CilSsaImpl::PhiReadNode - ) - } - - private predicate localExactStep(CIL::DataFlowNode src, CIL::DataFlowNode sink) { - src = sink.(CIL::Opcodes::Dup).getAnOperand() - or - src = sink.(CIL::Conversion).getExpr() - or - src = sink.(CIL::WriteAccess).getExpr() - or - src = sink.(CIL::Method).getAnImplementation().getAnInstruction().(CIL::Return) - or - src = sink.(CIL::Return).getExpr() - or - src = sink.(CIL::ConditionalBranch).getAnOperand() - } - - predicate localFlowStepCil(Node nodeFrom, Node nodeTo) { - localExactStep(asCilDataFlowNode(nodeFrom), asCilDataFlowNode(nodeTo)) - or - localCilSsaFlowStep(_, nodeFrom, nodeTo) - } - } - predicate localFlowStepCommon(Node nodeFrom, Node nodeTo) { - exists(SsaImpl::DefinitionExt def | - localSsaFlowStep(def, nodeFrom, nodeTo) and - not usesInstanceField(def) - ) - or hasNodePath(any(LocalExprStepConfiguration x), nodeFrom, nodeTo) or ThisFlow::adjacentThisRefs(nodeFrom, nodeTo) and @@ -537,8 +720,6 @@ module LocalFlow { or ThisFlow::adjacentThisRefs(nodeFrom.(PostUpdateNode).getPreUpdateNode(), nodeTo) or - CilFlow::localFlowStepCil(nodeFrom, nodeTo) - or exists(AssignableDefinition def, ControlFlow::Node cfn, Ssa::ExplicitDefinition ssaDef | ssaDef.getADefinition() = def and ssaDef.getControlFlowNode() = cfn and @@ -554,14 +735,14 @@ module LocalFlow { */ predicate excludeFromExposedRelations(Node n) { n instanceof FlowSummaryNode or - n instanceof ImplicitCapturedArgumentNode + n instanceof CaptureNode } /** * Gets a node that may execute last in `n`, and which, when it executes last, * will be the value of `n`. */ - private ControlFlow::Nodes::ExprNode getALastEvalNode(ControlFlow::Nodes::ExprNode cfn) { + ControlFlow::Nodes::ExprNode getALastEvalNode(ControlFlow::Nodes::ExprNode cfn) { exists(Expr e | any(LocalExprStepConfiguration x).hasExprPath(_, result, e, cfn) | e instanceof ConditionalExpr or e instanceof Cast or @@ -610,7 +791,7 @@ module LocalFlow { exists(SsaImpl::getAReadAtNode(def, node2.(ExprNode).getControlFlowNode())) ) or - delegateCreationStep(node1, node2) + node2 = node1.(LocalFunctionCreationNode).getAnAccess(true) or node1 = unique(FlowSummaryNode n1 | @@ -632,26 +813,32 @@ predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo) { LocalFlow::localFlowStepCommon(nodeFrom, nodeTo) or exists(SsaImpl::DefinitionExt def | + not LocalFlow::usesInstanceField(def) and + not def instanceof VariableCapture::CapturedSsaDefinitionExt + | + LocalFlow::localSsaFlowStep(def, nodeFrom, nodeTo) + or LocalFlow::localSsaFlowStepUseUse(def, nodeFrom, nodeTo) and not FlowSummaryImpl::Private::Steps::prohibitsUseUseFlow(nodeFrom, _) and - not LocalFlow::usesInstanceField(def) and nodeFrom != nodeTo - ) - or - // Flow into phi (read)/uncertain SSA definition node from read - exists(Node read | LocalFlow::localFlowSsaInputFromRead(read, _, nodeTo) | - nodeFrom = read and - not FlowSummaryImpl::Private::Steps::prohibitsUseUseFlow(nodeFrom, _) or - nodeFrom.(PostUpdateNode).getPreUpdateNode() = read + // Flow into phi (read)/uncertain SSA definition node from read + exists(Node read | LocalFlow::localFlowSsaInputFromRead(read, def, nodeTo) | + nodeFrom = read and + not FlowSummaryImpl::Private::Steps::prohibitsUseUseFlow(nodeFrom, _) + or + nodeFrom.(PostUpdateNode).getPreUpdateNode() = read + ) ) or - LocalFlow::localFlowCapturedVarStep(nodeFrom, nodeTo) - or FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom.(FlowSummaryNode).getSummaryNode(), nodeTo.(FlowSummaryNode).getSummaryNode(), true) or nodeTo.(ObjectCreationNode).getPreUpdateNode() = nodeFrom.(ObjectInitializerNode) + or + VariableCapture::valueStep(nodeFrom, nodeTo) + or + nodeTo = nodeFrom.(LocalFunctionCreationNode).getAnAccess(true) } /** @@ -834,13 +1021,6 @@ private predicate arrayStore(Expr e, Expr src, Expr a, boolean postUpdate) { */ private predicate arrayRead(Expr e1, ArrayRead e2) { e1 = e2.getQualifier() } -private Type getCSharpType(DotNet::Type t) { - result = t - or - not t instanceof Type and - result.matchesHandle(t) -} - private class RelevantGvnType extends Gvn::GvnType { RelevantGvnType() { this = any(NodeImpl n).getDataFlowType().asGvnType() } } @@ -881,6 +1061,18 @@ private Gvn::GvnType getANonTypeParameterSubTypeRestricted(RelevantGvnType t) { result = getANonTypeParameterSubType(t) } +/** A callable with an implicit `this` parameter. */ +private class InstanceCallable extends Callable { + InstanceCallable() { + this = any(DataFlowCallable dfc).asCallable() and + not this.(Modifiable).isStatic() and + // local functions and delegate capture `this` and should therefore + // not have a `this` parameter + not this instanceof LocalFunction and + not this instanceof AnonymousFunctionExpr + } +} + /** A collection of cached types and predicates to be evaluated in the same stage. */ cached private module Cached { @@ -900,8 +1092,6 @@ private module Cached { cached newtype TNode = TExprNode(ControlFlow::Nodes::ElementNode cfn) { cfn.getAstNode() instanceof Expr } or - TCilExprNode(CIL::Expr e) { e.getImplementation() instanceof CIL::BestImplementation } or - TCilSsaDefinitionExtNode(CilSsaImpl::DefinitionExt def) or TSsaDefinitionExtNode(SsaImpl::DefinitionExt def) { // Handled by `TExplicitParameterNode` below not def.(Ssa::ExplicitDefinition).getADefinition() instanceof @@ -912,25 +1102,20 @@ private module Cached { // Handled by `TExplicitParameterNode` below not def instanceof AssignableDefinitions::ImplicitParameterDefinition } or - TExplicitParameterNode(DotNet::Parameter p) { + TExplicitParameterNode(Parameter p) { p = any(DataFlowCallable dfc).asCallable().getAParameter() } or - TInstanceParameterNode(Callable c) { - c = any(DataFlowCallable dfc).asCallable() and - not c.(Modifiable).isStatic() - } or + TInstanceParameterNode(InstanceCallable c) or TDelegateSelfReferenceNode(Callable c) { lambdaCreationExpr(_, c) } or + TLocalFunctionCreationNode(ControlFlow::Nodes::ElementNode cfn, Boolean isPostUpdate) { + cfn.getAstNode() instanceof LocalFunctionStmt + } or TYieldReturnNode(ControlFlow::Nodes::ElementNode cfn) { any(Callable c).canYieldReturn(cfn.getAstNode()) } or TAsyncReturnNode(ControlFlow::Nodes::ElementNode cfn) { any(Callable c | c.(Modifiable).isAsync()).canReturn(cfn.getAstNode()) } or - TImplicitCapturedArgumentNode(ControlFlow::Nodes::ElementNode cfn, LocalScopeVariable v) { - exists(Ssa::ExplicitDefinition def | def.isCapturedVariableDefinitionFlowIn(_, cfn, _) | - v = def.getSourceVariable().getAssignable() - ) - } or TMallocNode(ControlFlow::Nodes::ElementNode cfn) { cfn.getAstNode() instanceof ObjectCreation } or TObjectInitializerNode(ControlFlow::Nodes::ElementNode cfn) { cfn.getAstNode().(ObjectCreation).hasInitializer() @@ -953,18 +1138,22 @@ private module Cached { arrayRead(e, read) ) ) + or + lambdaCallExpr(_, cfn) } or TFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn) or TParamsArgumentNode(ControlFlow::Node callCfn) { callCfn = any(Call c | isParamsArg(c, _, _)).getAControlFlowNode() } or TFlowInsensitiveFieldNode(FieldOrProperty f) { f.isFieldLike() } or + TFlowInsensitiveCapturedVariableNode(LocalScopeVariable v) { v.isCaptured() } or TInstanceParameterAccessNode(ControlFlow::Node cfn, Boolean isPostUpdate) { cfn = getAPrimaryConstructorParameterCfn(_) } or TPrimaryConstructorThisAccessNode(Parameter p, Boolean isPostUpdate) { p.getCallable() instanceof PrimaryConstructor - } + } or + TCaptureNode(VariableCapture::Flow::SynthesizedCaptureNode cn) /** * Holds if data flows from `nodeFrom` to `nodeTo` in exactly one local @@ -977,10 +1166,7 @@ private module Cached { LocalFlow::localSsaFlowStepUseUse(_, nodeFrom, nodeTo) and nodeFrom != nodeTo or - exists(SsaImpl::DefinitionExt def | - LocalFlow::localSsaFlowStep(def, nodeFrom, nodeTo) and - LocalFlow::usesInstanceField(def) - ) + LocalFlow::localSsaFlowStep(_, nodeFrom, nodeTo) or // Flow into phi (read)/uncertain SSA definition node from read exists(Node read | LocalFlow::localFlowSsaInputFromRead(read, _, nodeTo) | @@ -1003,7 +1189,8 @@ private module Cached { TSyntheticFieldContent(SyntheticField f) or TPrimaryConstructorParameterContent(Parameter p) { p.getCallable() instanceof PrimaryConstructor - } + } or + TCapturedVariableContent(VariableCapture::CapturedVariable v) cached newtype TContentApprox = @@ -1013,7 +1200,8 @@ private module Cached { TSyntheticFieldApproxContent() or TPrimaryConstructorParameterApproxContent(string firstChar) { firstChar = approximatePrimaryConstructorParameterContent(_) - } + } or + TCapturedVariableContentApprox(VariableCapture::CapturedVariable v) pragma[nomagic] private predicate commonSubTypeGeneral(DataFlowTypeOrUnifiable t1, RelevantGvnType t2) { @@ -1063,8 +1251,6 @@ predicate nodeIsHidden(Node n) { or n instanceof AsyncReturnNode or - n instanceof ImplicitCapturedArgumentNode - or n instanceof MallocNode or n instanceof FlowSummaryNode @@ -1080,28 +1266,10 @@ predicate nodeIsHidden(Node n) { n instanceof PrimaryConstructorThisAccessNode or n = any(AssignableDefinitionNode def | not exists(def.getDefinition().getTargetAccess())) -} - -/** A CIL SSA definition, viewed as a node in a data flow graph. */ -class CilSsaDefinitionExtNode extends NodeImpl, TCilSsaDefinitionExtNode { - CilSsaImpl::DefinitionExt def; - - CilSsaDefinitionExtNode() { this = TCilSsaDefinitionExtNode(def) } - - /** Gets the underlying SSA definition. */ - CilSsaImpl::DefinitionExt getDefinition() { result = def } - - override DataFlowCallable getEnclosingCallableImpl() { - result.asCallable() = def.getBasicBlock().getFirstNode().getImplementation().getMethod() - } - - override CIL::Type getTypeImpl() { result = def.getSourceVariable().getType() } - - override ControlFlow::Node getControlFlowNodeImpl() { none() } - - override Location getLocationImpl() { result = def.getBasicBlock().getLocation() } - - override string toStringImpl() { result = def.toString() } + or + n instanceof DelegateSelfReferenceNode + or + n instanceof CaptureNode } /** An SSA definition, viewed as a node in a data flow graph. */ @@ -1175,7 +1343,7 @@ private module ParameterNodes { * flow graph. */ class ExplicitParameterNode extends ParameterNodeImpl, TExplicitParameterNode { - private DotNet::Parameter parameter; + private Parameter parameter; ExplicitParameterNode() { this = TExplicitParameterNode(parameter) } @@ -1193,7 +1361,7 @@ private module ParameterNodes { result.asCallable() = parameter.getCallable() } - override DotNet::Type getTypeImpl() { result = parameter.getType() } + override Type getTypeImpl() { result = parameter.getType() } override ControlFlow::Node getControlFlowNodeImpl() { none() } @@ -1233,7 +1401,7 @@ private module ParameterNodes { * This is used for improving lambda dispatch, and will eventually also be * used for tracking flow through captured variables. */ - private class DelegateSelfReferenceNode extends ParameterNodeImpl, TDelegateSelfReferenceNode { + class DelegateSelfReferenceNode extends ParameterNodeImpl, TDelegateSelfReferenceNode { private Callable callable; DelegateSelfReferenceNode() { this = TDelegateSelfReferenceNode(callable) } @@ -1250,7 +1418,7 @@ private module ParameterNodes { override Location getLocationImpl() { result = callable.getLocation() } - override DotNet::Type getTypeImpl() { none() } + override Type getTypeImpl() { none() } override DataFlowType getDataFlowType() { callable = result.asDelegate() } @@ -1266,35 +1434,6 @@ private module ParameterNodes { LocalScopeVariable getVariable() { result = v } } - /** - * The value of an implicit captured variable parameter at function entry, - * viewed as a node in a data flow graph. - * - * An implicit parameter is added in order to be able to track flow into - * capturing callables, as if an explicit `ref` parameter had been used: - * - * ```csharp - * void M() { void M() { - * int i = 0; int i = 0; - * void In() { => void In(ref int i0) { // implicit i0 parameter - * Use(i); Use(i0); - * } } - * In(); In(ref i); - * } } - * ``` - */ - class ImplicitCapturedParameterNode extends ParameterNodeImpl, SsaDefinitionExtNode { - ImplicitCapturedParameterNode() { def instanceof SsaCapturedEntryDefinition } - - /** Gets the captured variable that this implicit parameter models. */ - LocalScopeVariable getVariable() { result = def.(SsaCapturedEntryDefinition).getVariable() } - - override predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { - pos.isImplicitCapturedParameterPosition(def.getSourceVariable().getAssignable()) and - c.asCallable() = this.getEnclosingCallable() - } - } - /** A parameter for a library callable with a flow summary. */ class SummaryParameterNode extends ParameterNodeImpl, FlowSummaryNode { private ParameterPosition pos_; @@ -1348,11 +1487,7 @@ private module ArgumentNodes { /** A data-flow node that represents an explicit call argument. */ class ExplicitArgumentNode extends ArgumentNodeImpl { - ExplicitArgumentNode() { - this.asExpr() instanceof Argument - or - this.asExpr() = any(CilDataFlowCall cc).getCilCall().getAnArgument() - } + ExplicitArgumentNode() { this.asExpr() instanceof Argument } override predicate argumentOf(DataFlowCall call, ArgumentPosition pos) { exists(ArgumentConfiguration x, Expr c, Argument arg | @@ -1361,20 +1496,14 @@ private module ArgumentNodes { arg.isArgumentOf(c, pos) and x.hasExprPath(_, this.getControlFlowNode(), _, call.getControlFlowNode()) ) - or - exists(CIL::Call c, CIL::Expr arg | - arg = this.asExpr() and - c = call.getExpr() and - arg = c.getArgument(pos.getPosition()) - ) } } /** A data-flow node that represents a delegate passed into itself. */ - class DelegateSelfArgumentNode extends ArgumentNodeImpl { + class DelegateSelfArgumentNode extends ArgumentNodeImpl, ExprNode { private DataFlowCall call_; - DelegateSelfArgumentNode() { lambdaCallExpr(call_, this) } + DelegateSelfArgumentNode() { lambdaCallExpr(call_, this.getControlFlowNode()) } override predicate argumentOf(DataFlowCall call, ArgumentPosition pos) { call = call_ and @@ -1382,48 +1511,6 @@ private module ArgumentNodes { } } - /** - * The value of a captured variable as an implicit argument of a call, viewed - * as a node in a data flow graph. - * - * An implicit node is added in order to be able to track flow into capturing - * callables, as if an explicit parameter had been used: - * - * ```csharp - * void M() { void M() { - * int i = 0; int i = 0; - * void Out() { i = 1; } => void Out(ref int i0) { i0 = 1; } - * Out(); Out(ref i); // implicit argument - * Use(i); Use(i) - * } } - * ``` - */ - class ImplicitCapturedArgumentNode extends ArgumentNodeImpl, NodeImpl, - TImplicitCapturedArgumentNode - { - private LocalScopeVariable v; - private ControlFlow::Nodes::ElementNode cfn; - - ImplicitCapturedArgumentNode() { this = TImplicitCapturedArgumentNode(cfn, v) } - - override predicate argumentOf(DataFlowCall call, ArgumentPosition pos) { - pos.isImplicitCapturedArgumentPosition(v) and - call.getControlFlowNode() = cfn - } - - override DataFlowCallable getEnclosingCallableImpl() { - result.asCallable() = cfn.getEnclosingCallable() - } - - override Type getTypeImpl() { result = v.getType() } - - override ControlFlow::Node getControlFlowNodeImpl() { none() } - - override Location getLocationImpl() { result = cfn.getLocation() } - - override string toStringImpl() { result = "[implicit argument] " + v } - } - /** * A node that corresponds to the value of an object creation (`new C()`) before * the constructor has run. @@ -1525,7 +1612,7 @@ private module ReturnNodes { */ class ExprReturnNode extends ReturnNode, ExprNode { ExprReturnNode() { - exists(DotNet::Callable c, DotNet::Expr e | e = this.getExpr() | + exists(Callable c, Expr e | e = this.getExpr() | c.canReturn(e) and not c.(Modifiable).isAsync() ) } @@ -1608,45 +1695,6 @@ private module ReturnNodes { override string toStringImpl() { result = expr.toString() } } - /** - * The value of a captured variable as an implicit return from a call, viewed - * as a node in a data flow graph. - * - * An implicit node is added in order to be able to track flow out of capturing - * callables, as if an explicit `ref` parameter had been used: - * - * ```csharp - * void M() { void M() { - * int i = 0; int i = 0; - * void Out() { void Out(ref int i0) { - * i = 1; => i0 = 1; // implicit return - * } } - * Out(); Out(ref i); - * Use(i); Use(i) - * } } - * ``` - */ - class ImplicitCapturedReturnNode extends ReturnNode, SsaDefinitionExtNode { - private Ssa::ExplicitDefinition edef; - - ImplicitCapturedReturnNode() { - edef = this.getDefinitionExt() and - edef.isCapturedVariableDefinitionFlowOut(_, _) - } - - /** - * Holds if the value at this node may flow out to the implicit call definition - * at `node`, using one or more calls. - */ - predicate flowsOutTo(SsaDefinitionExtNode node, boolean additionalCalls) { - edef.isCapturedVariableDefinitionFlowOut(node.getDefinitionExt(), additionalCalls) - } - - override ImplicitCapturedReturnKind getKind() { - result.getVariable() = edef.getSourceVariable().getAssignable() - } - } - private class SummaryReturnNode extends FlowSummaryNode, ReturnNode { private ReturnKind rk; @@ -1698,17 +1746,13 @@ private module OutNodes { } /** - * A data-flow node that reads a value returned directly by a callable, - * either via a C# call or a CIL call. + * A data-flow node that reads a value returned directly by a callable. */ class ExprOutNode extends OutNode, ExprNode { private DataFlowCall call; ExprOutNode() { - exists(DotNet::Expr e | e = this.getExpr() | - call = csharpCall(e, this.getControlFlowNode()) or - call = TCilCall(e) - ) + exists(Expr e | e = this.getExpr() | call = csharpCall(e, this.getControlFlowNode())) } override DataFlowCall getCall(ReturnKind kind) { @@ -1741,32 +1785,6 @@ private module OutNodes { } } - /** - * A data-flow node that reads a value returned implicitly by a callable - * using a captured variable. - */ - class CapturedOutNode extends OutNode, SsaDefinitionExtNode { - private DataFlowCall call; - - CapturedOutNode() { - exists(ImplicitCapturedReturnNode n, boolean additionalCalls, ControlFlow::Node cfn | - n.flowsOutTo(this, additionalCalls) and - cfn = this.getDefinitionExt().(Ssa::Definition).getControlFlowNode() - | - additionalCalls = false and call = csharpCall(_, cfn) - or - additionalCalls = true and - call = TTransitiveCapturedCall(cfn) - ) - } - - override DataFlowCall getCall(ReturnKind kind) { - result = call and - kind.(ImplicitCapturedReturnKind).getVariable() = - this.getDefinitionExt().getSourceVariable().getAssignable() - } - } - /** * A data-flow node that reads a value returned by a callable using an * `out` or `ref` parameter. @@ -1816,7 +1834,7 @@ class FlowSummaryNode extends NodeImpl, TFlowSummaryNode { result = FlowSummaryImpl::Private::summaryNodeType(this.getSummaryNode()) } - override DotNet::Type getTypeImpl() { none() } + override Type getTypeImpl() { none() } override ControlFlow::Node getControlFlowNodeImpl() { none() } @@ -1841,10 +1859,10 @@ class FlowSummaryNode extends NodeImpl, TFlowSummaryNode { * Both models need a pre-update this node, and the latter need an additional post-update this access, * all of which are represented by an `InstanceParameterAccessNode` node. */ -class InstanceParameterAccessNode extends NodeImpl, TInstanceParameterAccessNode { - private ControlFlow::Node cfn; - private boolean isPostUpdate; - private Parameter p; +abstract private class InstanceParameterAccessNode extends NodeImpl, TInstanceParameterAccessNode { + ControlFlow::Node cfn; + boolean isPostUpdate; + Parameter p; InstanceParameterAccessNode() { this = TInstanceParameterAccessNode(cfn, isPostUpdate) and @@ -1861,8 +1879,6 @@ class InstanceParameterAccessNode extends NodeImpl, TInstanceParameterAccessNode override Location getLocationImpl() { result = cfn.getLocation() } - override string toStringImpl() { result = "this" } - /** * Gets the underlying control flow node. */ @@ -1872,11 +1888,12 @@ class InstanceParameterAccessNode extends NodeImpl, TInstanceParameterAccessNode * Gets the primary constructor parameter that this is a this access to. */ Parameter getParameter() { result = p } +} - /** - * Holds if the this parameter access node corresponds to a pre-update node. - */ - predicate isPreUpdate() { isPostUpdate = false } +private class InstanceParameterAccessPreNode extends InstanceParameterAccessNode { + InstanceParameterAccessPreNode() { isPostUpdate = false } + + override string toStringImpl() { result = "this" } } /** @@ -1892,9 +1909,11 @@ class InstanceParameterAccessNode extends NodeImpl, TInstanceParameterAccessNode * ``` * The synthesized (pre/post-update) this access is represented an `PrimaryConstructorThisAccessNode` node. */ -class PrimaryConstructorThisAccessNode extends NodeImpl, TPrimaryConstructorThisAccessNode { - private Parameter p; - private boolean isPostUpdate; +abstract private class PrimaryConstructorThisAccessNode extends NodeImpl, + TPrimaryConstructorThisAccessNode +{ + Parameter p; + boolean isPostUpdate; PrimaryConstructorThisAccessNode() { this = TPrimaryConstructorThisAccessNode(p, isPostUpdate) } @@ -1919,6 +1938,44 @@ class PrimaryConstructorThisAccessNode extends NodeImpl, TPrimaryConstructorThis predicate isPostUpdate() { isPostUpdate = true } } +private class PrimaryConstructorThisAccessPreNode extends PrimaryConstructorThisAccessNode { + PrimaryConstructorThisAccessPreNode() { isPostUpdate = false } + + override string toStringImpl() { result = "this" } +} + +/** + * A synthesized data flow node representing a closure object that tracks + * captured variables. + */ +class CaptureNode extends NodeImpl, TCaptureNode { + VariableCapture::Flow::SynthesizedCaptureNode cn; + + CaptureNode() { this = TCaptureNode(cn) } + + VariableCapture::Flow::SynthesizedCaptureNode getSynthesizedCaptureNode() { result = cn } + + override DataFlowCallable getEnclosingCallableImpl() { + result.asCallable() = cn.getEnclosingCallable() + } + + override Type getTypeImpl() { + exists(VariableCapture::CapturedVariable v | cn.isVariableAccess(v) and result = v.getType()) + } + + override DataFlowType getDataFlowType() { + if cn.isInstanceAccess() + then result.asDelegate() = cn.getEnclosingCallable() + else result = super.getDataFlowType() + } + + override ControlFlow::Node getControlFlowNodeImpl() { none() } + + override Location getLocationImpl() { result = cn.getLocation() } + + override string toStringImpl() { result = cn.toString() } +} + /** A field or a property. */ class FieldOrProperty extends Assignable, Modifiable { FieldOrProperty() { @@ -1938,8 +1995,6 @@ class FieldOrProperty extends Assignable, Modifiable { or p.isAutoImplementedReadOnly() or - p.matchesHandle(any(CIL::TrivialProperty tp)) - or p.getDeclaringType() instanceof AnonymousClass ) ) @@ -2004,6 +2059,30 @@ class FlowInsensitiveFieldNode extends NodeImpl, TFlowInsensitiveFieldNode { override string toStringImpl() { result = "[flow-insensitive] " + f } } +/** + * A data flow node used for control-flow insensitive flow through captured + * variables. + * + * Only used in lambda flow. + */ +class FlowInsensitiveCapturedVariableNode extends NodeImpl, TFlowInsensitiveCapturedVariableNode { + private LocalScopeVariable v; + + FlowInsensitiveCapturedVariableNode() { this = TFlowInsensitiveCapturedVariableNode(v) } + + LocalScopeVariable getVariable() { result = v } + + override DataFlowCallable getEnclosingCallableImpl() { result.asCapturedVariable() = v } + + override Type getTypeImpl() { result = v.getType() } + + override ControlFlow::Node getControlFlowNodeImpl() { none() } + + override Location getLocationImpl() { result = v.getLocation() } + + override string toStringImpl() { result = "[flow-insensitive] " + v } +} + /** * Holds if `pred` can flow to `succ`, by jumping from one callable to * another. Additional steps specified by the configuration are *not* @@ -2026,6 +2105,8 @@ predicate jumpStep(Node pred, Node succ) { or FlowSummaryImpl::Private::Steps::summaryJumpStep(pred.(FlowSummaryNode).getSummaryNode(), succ.(FlowSummaryNode).getSummaryNode()) + or + succ = pred.(LocalFunctionCreationNode).getAnAccess(false) } private class StoreStepConfiguration extends ControlFlowReachabilityConfiguration { @@ -2117,6 +2198,8 @@ predicate storeStep(Node node1, ContentSet c, Node node2) { or FlowSummaryImpl::Private::Steps::summaryStoreStep(node1.(FlowSummaryNode).getSummaryNode(), c, node2.(FlowSummaryNode).getSummaryNode()) + or + VariableCapture::storeStep(node1, c, node2) } private class ReadStepConfiguration extends ControlFlowReachabilityConfiguration { @@ -2208,10 +2291,9 @@ predicate readStep(Node node1, ContentSet c, Node node2) { c = getResultContent() or node1 = - any(InstanceParameterAccessNode n | + any(InstanceParameterAccessPreNode n | n.getUnderlyingControlFlowNode() = node2.(ExprNode).getControlFlowNode() and - n.getParameter() = c.(PrimaryConstructorParameterContent).getParameter() and - n.isPreUpdate() + n.getParameter() = c.(PrimaryConstructorParameterContent).getParameter() ) and node2.asExpr() instanceof ParameterRead or @@ -2247,6 +2329,8 @@ predicate readStep(Node node1, ContentSet c, Node node2) { or FlowSummaryImpl::Private::Steps::summaryReadStep(node1.(FlowSummaryNode).getSummaryNode(), c, node2.(FlowSummaryNode).getSummaryNode()) + or + VariableCapture::readStep(node1, c, node2) } /** @@ -2277,6 +2361,8 @@ predicate clearsContent(Node n, ContentSet c) { ) or n = any(PostUpdateNode n1 | primaryConstructorParameterStore(_, c, n1)).getPreUpdateNode() + or + VariableCapture::clearsContent(n, c) } /** @@ -2325,10 +2411,11 @@ class DataFlowType extends TDataFlowType { * For methods used as method groups in calls there can be multiple * creations associated with the same type. */ - Expr getADelegateCreation() { - exists(Callable callable | - lambdaCreationExpr(result, callable) and - this = TDelegateDataFlowType(callable) + ControlFlowElement getADelegateCreation() { + exists(Callable callable | this = TDelegateDataFlowType(callable) | + lambdaCreationExpr(result, callable) + or + isLocalFunctionCallReceiver(_, result, callable) ) } @@ -2343,14 +2430,12 @@ class DataFlowType extends TDataFlowType { DataFlowType getNodeType(Node n) { result = n.(NodeImpl).getDataFlowType() and not lambdaCreation(n, _, _) and - not delegateCreationStep(_, n) + not isLocalFunctionCallReceiver(_, n.asExpr(), _) or - exists(Node arg | - delegateCreationStep(arg, n) and - result = getNodeType(arg) - ) - or - n.asExpr() = result.getADelegateCreation() + [ + n.asExpr().(ControlFlowElement), + n.(LocalFunctionCreationPreNode).getUnderlyingControlFlowNode().getAstNode() + ] = result.getADelegateCreation() } /** Gets a string representation of a `DataFlowType`. */ @@ -2514,7 +2599,7 @@ module PostUpdateNodes { result = getEnclosingStaticFieldOrProperty(oc) } - override DotNet::Type getTypeImpl() { result = oc.getType() } + override Type getTypeImpl() { result = oc.getType() } override ControlFlow::Nodes::ElementNode getControlFlowNodeImpl() { result = cfn } @@ -2570,11 +2655,11 @@ module PostUpdateNodes { private class InstanceParameterAccessPostUpdateNode extends PostUpdateNode, InstanceParameterAccessNode { - private ControlFlow::Node cfn; + InstanceParameterAccessPostUpdateNode() { isPostUpdate = true } - InstanceParameterAccessPostUpdateNode() { this = TInstanceParameterAccessNode(cfn, true) } - - override Node getPreUpdateNode() { result = TInstanceParameterAccessNode(cfn, false) } + override InstanceParameterAccessPreNode getPreUpdateNode() { + result = TInstanceParameterAccessNode(cfn, false) + } override string toStringImpl() { result = "[post] this" } } @@ -2582,16 +2667,37 @@ module PostUpdateNodes { private class PrimaryConstructorThisAccessPostUpdateNode extends PostUpdateNode, PrimaryConstructorThisAccessNode { - private Parameter p; + PrimaryConstructorThisAccessPostUpdateNode() { isPostUpdate = true } - PrimaryConstructorThisAccessPostUpdateNode() { - this = TPrimaryConstructorThisAccessNode(p, true) + override PrimaryConstructorThisAccessPreNode getPreUpdateNode() { + result = TPrimaryConstructorThisAccessNode(p, false) } - override Node getPreUpdateNode() { result = TPrimaryConstructorThisAccessNode(p, false) } - override string toStringImpl() { result = "[post] this" } } + + class LocalFunctionCreationPostUpdateNode extends LocalFunctionCreationNode, PostUpdateNode { + LocalFunctionCreationPostUpdateNode() { isPostUpdate = true } + + override LocalFunctionCreationPreNode getPreUpdateNode() { + result = TLocalFunctionCreationNode(cfn, false) + } + + override string toStringImpl() { result = "[post] " + cfn } + } + + private class CapturePostUpdateNode extends PostUpdateNode, CaptureNode { + private CaptureNode pre; + + CapturePostUpdateNode() { + VariableCapture::Flow::capturePostUpdateNode(this.getSynthesizedCaptureNode(), + pre.getSynthesizedCaptureNode()) + } + + override CaptureNode getPreUpdateNode() { result = pre } + + override string toStringImpl() { result = "[post] " + cn } + } } private import PostUpdateNodes @@ -2606,7 +2712,7 @@ class CastNode extends Node { } } -class DataFlowExpr = DotNet::Expr; +class DataFlowExpr = Expr; /** Holds if `e` is an expression that always has the same Boolean value `val`. */ private predicate constantBooleanExpr(Expr e, boolean val) { @@ -2645,12 +2751,13 @@ int accessPathLimit() { result = 5 } */ predicate forceHighPrecision(Content c) { c instanceof ElementContent } -private predicate lambdaCreationExpr(Expr creation, Callable c) { +private predicate lambdaCreationExpr(ControlFlowElement creation, Callable c) { c = [ creation.(AnonymousFunctionExpr), - creation.(CallableAccess).getTarget().getUnboundDeclaration(), - creation.(AddressOfExpr).getOperand().(CallableAccess).getTarget().getUnboundDeclaration() + creation.(DelegateCreation).getArgument().(CallableAccess).getTarget().getUnboundDeclaration(), + creation.(AddressOfExpr).getOperand().(CallableAccess).getTarget().getUnboundDeclaration(), + creation.(LocalFunctionStmt).getLocalFunction() ] } @@ -2662,6 +2769,13 @@ predicate lambdaCreation(Node creation, LambdaCallKind kind, DataFlowCallable c) exists(kind) } +private predicate isLocalFunctionCallReceiver( + LocalFunctionCall call, LocalFunctionAccess receiver, LocalFunction f +) { + receiver.getParent() = call and + f = receiver.getTarget().getUnboundDeclaration() +} + private class LambdaConfiguration extends ControlFlowReachabilityConfiguration { LambdaConfiguration() { this = "LambdaConfiguration" } @@ -2677,19 +2791,32 @@ private class LambdaConfiguration extends ControlFlowReachabilityConfiguration { exactScope = false and scope = e2 and isSuccessor = true + or + isLocalFunctionCallReceiver(e2, e1, _) and + exactScope = false and + scope = e2 and + isSuccessor = true } } -private predicate lambdaCallExpr(DataFlowCall call, ExprNode receiver) { +private predicate lambdaCallExpr(DataFlowCall call, ControlFlow::Node receiver) { exists(LambdaConfiguration x, DelegateLikeCall dc | - x.hasExprPath(dc.getExpr(), receiver.getControlFlowNode(), dc, call.getControlFlowNode()) + x.hasExprPath(dc.getExpr(), receiver, dc, call.getControlFlowNode()) + ) + or + // In local function calls, `F()`, we use the local function access `F` + // to represent the receiver. Only needed for flow through captured variables. + exists(LambdaConfiguration x, LocalFunctionCall fc | + x.hasExprPath(fc.getAChild(), receiver, fc, call.getControlFlowNode()) ) } /** Holds if `call` is a lambda call where `receiver` is the lambda expression. */ predicate lambdaCall(DataFlowCall call, LambdaCallKind kind, Node receiver) { ( - lambdaCallExpr(call, receiver) + lambdaCallExpr(call, receiver.(ExprNode).getControlFlowNode()) and + // local function calls can be resolved directly without a flow analysis + not call.getControlFlowNode().getAstNode() instanceof LocalFunctionCall or receiver.(FlowSummaryNode).getSummaryNode() = call.(SummaryCall).getReceiver() ) and @@ -2707,8 +2834,11 @@ private predicate delegateCreationStep(Node nodeFrom, Node nodeTo) { predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preservesValue) { exists(SsaImpl::DefinitionExt def | LocalFlow::localSsaFlowStep(def, nodeFrom, nodeTo) and - LocalFlow::usesInstanceField(def) and preservesValue = true + | + LocalFlow::usesInstanceField(def) + or + def instanceof VariableCapture::CapturedSsaDefinitionExt ) or delegateCreationStep(nodeFrom, nodeTo) and @@ -2737,6 +2867,9 @@ predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preserves fa = nodeTo.asExpr() and fa.(FieldOrPropertyRead).hasNonlocalValue() ) + or + VariableCapture::flowInsensitiveStep(nodeFrom, nodeTo) and + preservesValue = true } /** @@ -2751,6 +2884,9 @@ predicate allowParameterReturnInSelf(ParameterNode p) { parameterNode(p, c, pos) and FlowSummaryImpl::Private::summaryAllowParameterReturnInSelf(c.asSummarizedCallable(), pos) ) + or + VariableCapture::Flow::heuristicAllowInstanceParameterReturnInSelf(p.(DelegateSelfReferenceNode) + .getCallable()) } /** An approximated `Content`. */ @@ -2773,6 +2909,10 @@ class ContentApprox extends TContentApprox { this = TPrimaryConstructorParameterApproxContent(firstChar) and result = "approximated parameter field " + firstChar ) + or + exists(VariableCapture::CapturedVariable v | + this = TCapturedVariableContentApprox(v) and result = "captured " + v + ) } } @@ -2807,6 +2947,8 @@ ContentApprox getContentApprox(Content c) { or result = TPrimaryConstructorParameterApproxContent(approximatePrimaryConstructorParameterContent(c)) + or + result = TCapturedVariableContentApprox(VariableCapture::getCapturedVariableContent(c)) } /** diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll index 2147b2f7d41..bf30fe5112d 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll @@ -1,6 +1,4 @@ private import csharp -private import cil -private import dotnet private import DataFlowDispatch private import DataFlowPrivate private import semmle.code.csharp.controlflow.Guards @@ -12,7 +10,7 @@ private import semmle.code.csharp.Unification */ class Node extends TNode { /** Gets the expression corresponding to this node, if any. */ - DotNet::Expr asExpr() { result = this.(ExprNode).getExpr() } + Expr asExpr() { result = this.(ExprNode).getExpr() } /** * Gets the expression corresponding to this node, at control flow node `cfn`, @@ -23,7 +21,7 @@ class Node extends TNode { } /** Gets the parameter corresponding to this node, if any. */ - DotNet::Parameter asParameter() { result = this.(ParameterNode).getParameter() } + Parameter asParameter() { result = this.(ParameterNode).getParameter() } /** Gets the definition corresponding to this node, if any. */ AssignableDefinition asDefinition() { result = this.asDefinitionAtNode(_) } @@ -37,7 +35,7 @@ class Node extends TNode { } /** Gets the type of this node. */ - final DotNet::Type getType() { result = this.(NodeImpl).getTypeImpl() } + final Type getType() { result = this.(NodeImpl).getTypeImpl() } /** Gets the enclosing callable of this node. */ final Callable getEnclosingCallable() { @@ -67,8 +65,6 @@ class Node extends TNode { } } -private class TExprNode_ = TExprNode or TCilExprNode; - /** * An expression, viewed as a node in a data flow graph. * @@ -76,13 +72,9 @@ private class TExprNode_ = TExprNode or TCilExprNode; * to multiple `ExprNode`s, just like it may correspond to multiple * `ControlFlow::Node`s. */ -class ExprNode extends Node, TExprNode_ { +class ExprNode extends Node, TExprNode { /** Gets the expression corresponding to this node. */ - DotNet::Expr getExpr() { - result = this.getExprAtNode(_) - or - this = TCilExprNode(result) - } + Expr getExpr() { result = this.getExprAtNode(_) } /** * Gets the expression corresponding to this node, at control flow node `cfn`, @@ -94,16 +86,22 @@ class ExprNode extends Node, TExprNode_ { } } +pragma[nomagic] +private predicate isParameterOf0(DataFlowCallable c, ParameterPosition ppos, Parameter p) { + p.getCallable() = c.asCallable() and + p.getPosition() = ppos.getPosition() +} + /** * The value of a parameter at function entry, viewed as a node in a data * flow graph. */ class ParameterNode extends Node instanceof ParameterNodeImpl { /** Gets the parameter corresponding to this node, if any. */ - DotNet::Parameter getParameter() { + Parameter getParameter() { exists(DataFlowCallable c, ParameterPosition ppos | super.isParameterOf(c, ppos) and - result = c.asCallable().getParameter(ppos.getPosition()) + isParameterOf0(c, ppos, result) ) } } @@ -120,12 +118,12 @@ class AssignableDefinitionNode extends Node instanceof AssignableDefinitionNodeI } /** Gets a node corresponding to expression `e`. */ -ExprNode exprNode(DotNet::Expr e) { result.getExpr() = e } +ExprNode exprNode(Expr e) { result.getExpr() = e } /** * Gets the node corresponding to the value of parameter `p` at function entry. */ -ParameterNode parameterNode(DotNet::Parameter p) { result.getParameter() = p } +ParameterNode parameterNode(Parameter p) { result.getParameter() = p } /** Gets a node corresponding to the definition `def`. */ AssignableDefinitionNode assignableDefinitionNode(AssignableDefinition def) { @@ -146,7 +144,7 @@ predicate localFlow(Node source, Node sink) { localFlowStep*(source, sink) } * local (intra-procedural) steps. */ pragma[inline] -predicate localExprFlow(DotNet::Expr e1, DotNet::Expr e2) { localFlow(exprNode(e1), exprNode(e2)) } +predicate localExprFlow(Expr e1, Expr e2) { localFlow(exprNode(e1), exprNode(e2)) } /** * A data flow node that jumps between callables. This can be extended in @@ -258,6 +256,17 @@ class ElementContent extends Content, TElementContent { override Location getLocation() { result instanceof EmptyLocation } } +/** A captured variable. */ +class CapturedVariableContent extends Content, TCapturedVariableContent { + private VariableCapture::CapturedVariable v; + + CapturedVariableContent() { this = TCapturedVariableContent(v) } + + override string toString() { result = "captured " + v } + + override Location getLocation() { result = v.getLocation() } +} + /** * An entity that represents a set of `Content`s. * diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll index 8b7db48140a..9757121566b 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll @@ -5,6 +5,7 @@ import csharp private import codeql.ssa.Ssa as SsaImplCommon private import AssignableDefinitions +private import semmle.code.csharp.controlflow.internal.PreSsa private module SsaInput implements SsaImplCommon::InputSig { class BasicBlock = ControlFlow::BasicBlock; @@ -30,9 +31,6 @@ private module SsaInput implements SsaImplCommon::InputSig { or updatesNamedFieldOrProp(bb, i, _, v, _) and certain = false - or - updatesCapturedVariable(bb, i, _, v, _, _) and - certain = false } /** @@ -724,401 +722,10 @@ private module FieldOrPropsImpl { } } -/** - * As in the SSA construction for fields and properties, SSA construction - * for captured variables relies on implicit update nodes at every call - * site that conceivably could reach an update of the captured variable. - * For example, there is an implicit update of `v` on line 4 in - * - * ```csharp - * int M() { - * int i = 0; - * Action a = () => { i = 1; }; - * a(); // implicit update of `v` - * return i; - * } - * ``` - * - * We find update paths of the form: - * - * ``` - * Call --(callEdge)-->* Callable(update of v) - * ``` - * - * For simplicity, and for performance reasons, we ignore cases where a path - * goes through the callable that introduces `v`; such a path does not - * represent an actual update, as a new copy of `v` is updated. - */ -private module CapturedVariableImpl { - /** - * A local scope variable that is captured, and updated by at least one capturer. - */ - private class CapturedWrittenLocalScopeVariable extends LocalScopeVariable { - CapturedWrittenLocalScopeVariable() { - exists(AssignableDefinition def | def.getTarget() = this | - def.getEnclosingCallable() != this.getCallable() - ) - } - } - - private class CapturedWrittenLocalScopeSourceVariable extends LocalScopeSourceVariable { - CapturedWrittenLocalScopeSourceVariable() { - this.getAssignable() instanceof CapturedWrittenLocalScopeVariable - } - } - - private class CapturedWrittenLocalScopeVariableDefinition extends AssignableDefinition { - CapturedWrittenLocalScopeVariableDefinition() { - this.getTarget() instanceof CapturedWrittenLocalScopeVariable - } - } - - /** - * Holds if `vdef` is an update of captured variable `v` in callable `c` - * that is relevant for SSA construction. - */ - predicate relevantDefinition( - Callable c, CapturedWrittenLocalScopeVariable v, - CapturedWrittenLocalScopeVariableDefinition vdef - ) { - exists(ControlFlow::BasicBlock bb, CapturedWrittenLocalScopeSourceVariable sv | - vdef.getTarget() = v and - vdef.getEnclosingCallable() = c and - sv.getAssignable() = v and - bb.getNode(_) = vdef.getAControlFlowNode() and - c != v.getCallable() - ) - } - - /** - * Holds if `call` occurs in basic block `bb` at index `i`, captured variable - * `v` has an update somewhere, and `v` is likely to be live in `bb` at index - * `i`. - */ - predicate updateCandidate( - ControlFlow::BasicBlock bb, int i, CapturedWrittenLocalScopeSourceVariable v, Call call - ) { - FieldOrPropsImpl::callAt(bb, i, call) and - call.getEnclosingCallable() = v.getEnclosingCallable() and - exists(Assignable a | - a = v.getAssignable() and - relevantDefinition(_, a, _) and - not exists(AssignableDefinitions::OutRefDefinition def | - def.getCall() = call and - def.getTarget() = a - ) - ) - } - - private predicate source( - Call call, CapturedWrittenLocalScopeSourceVariable v, - CapturedWrittenLocalScopeVariable captured, Callable c, boolean libraryDelegateCall - ) { - updateCandidate(_, _, v, call) and - c = getARuntimeTarget(call, libraryDelegateCall) and - captured = v.getAssignable() and - relevantDefinition(_, captured, _) - } - - /** - * Holds if `c` is a relevant part of the call graph for - * `updatesCapturedVariable` based on following edges in forward direction. - */ - private predicate reachableFromSource(Callable c) { - source(_, _, _, c, _) - or - exists(Callable mid | reachableFromSource(mid) | callEdge(mid, c)) - } - - private predicate sink(Callable c, CapturedWrittenLocalScopeVariable captured) { - reachableFromSource(c) and - relevantDefinition(c, captured, _) - } - - private predicate prunedCallable(Callable c) { - sink(c, _) - or - exists(Callable mid | callEdge(c, mid) and prunedCallable(mid)) - } - - private predicate prunedEdge(Callable c1, Callable c2) { - prunedCallable(c1) and - prunedCallable(c2) and - callEdge(c1, c2) - } - - private predicate edgePlus(Callable c1, Callable c2) = fastTC(prunedEdge/2)(c1, c2) - - /** - * Holds if `call` may change the value of captured variable `v`. The actual - * update occurs in `writer`. That is, `writer` can be reached from `call` - * using zero or more additional calls (as indicated by `additionalCalls`). - * One of the intermediate callables may be the callable that introduces `v`, - * in which case `call` is not an actual update. - */ - pragma[noopt] - predicate updatesCapturedVariableWriter( - Call call, CapturedWrittenLocalScopeSourceVariable v, Callable writer, boolean additionalCalls - ) { - exists(Callable src, CapturedWrittenLocalScopeVariable captured, boolean libraryDelegateCall | - source(call, v, captured, src, libraryDelegateCall) and - sink(writer, captured) and - ( - src = writer and additionalCalls = libraryDelegateCall - or - edgePlus(src, writer) and additionalCalls = true - ) - ) - } - - /** - * Holds if captured local scope variable `v` is written inside the callable - * to which `bb` belongs. - * - * In this case a pseudo-read is inserted at the exit node at index `i` in `bb`, - * in order to make the write live. - * - * Example: - * - * ```csharp - * class C { - * void M1() { - * int i = 0; - * void M2() { i = 2; }; - * M2(); - * System.Console.WriteLine(i); - * } - * } - * ``` - * - * The write to `i` inside `M2` on line 4 is live because of the implicit call - * definition on line 5. - */ - predicate capturedExitRead( - ControlFlow::BasicBlock bb, int i, CapturedWrittenLocalScopeSourceVariable v - ) { - exists(ControlFlow::Nodes::AnnotatedExitNode exit | - exit.isNormal() and - variableDefinition(bb.getAPredecessor*(), _, v, _) and - exit = bb.getNode(i) - ) - } -} - -/** - * Liveness analysis to restrict the size of the SSA representation for - * captured variables. - * - * Example: - * - * ```csharp - * void M() { - * int i = 0; - * void M2() { - * System.Console.WriteLine(i); - * } - * M2(); - * } - * ``` - * - * The definition of `i` on line 2 is live, because of the call to `M2` on - * line 6. However, that call is not a direct read of `i`, so we account - * for that by inserting an implicit read of `i` on line 6. - * - * The predicates in this module follow the same structure as those in - * `CapturedVariableImpl`. - */ -private module CapturedVariableLivenessImpl { - /** - * Holds if `c` is a callable that captures local scope variable `v`, and - * `c` may read the value of the captured variable. - */ - private predicate capturerReads(Callable c, LocalScopeVariable v) { - exists(LocalScopeSourceVariable sv | - c = sv.getEnclosingCallable() and - v = sv.getAssignable() and - v.getCallable() != c - | - variableReadActual(_, _, sv) - or - refReadBeforeWrite(_, _, sv) - ) - } - - /** - * A local scope variable that is captured, and read by at least one capturer. - */ - private class CapturedReadLocalScopeVariable extends LocalScopeVariable { - CapturedReadLocalScopeVariable() { capturerReads(_, this) } - } - - private class CapturedReadLocalScopeSourceVariable extends LocalScopeSourceVariable { - CapturedReadLocalScopeSourceVariable() { - this.getAssignable() instanceof CapturedReadLocalScopeVariable - } - } - - /** - * Holds if a write to captured source variable `v` may be read by a - * callable reachable from the call `c`. - */ - private predicate implicitReadCandidate( - CapturedReadLocalScopeSourceVariable v, ControlFlow::Nodes::ElementNode c - ) { - exists(ControlFlow::BasicBlock bb, int i | variableWriteDirect(bb, i, v, _) | - c = bb.getNode(any(int j | j > i)) - or - c = bb.getASuccessor+().getANode() - ) - } - - private predicate source( - ControlFlow::Nodes::ElementNode call, CapturedReadLocalScopeSourceVariable v, - CapturedReadLocalScopeVariable captured, Callable c, boolean libraryDelegateCall - ) { - implicitReadCandidate(v, call) and - c = getARuntimeTarget(call.getAstNode(), libraryDelegateCall) and - captured = v.getAssignable() and - capturerReads(_, captured) - } - - /** - * Holds if `c` is a relevant part of the call graph for - * `readsCapturedVariable` based on following edges in forward direction. - */ - private predicate reachableFromSource(Callable c) { - source(_, _, _, c, _) - or - exists(Callable mid | reachableFromSource(mid) | callEdge(mid, c)) - } - - private predicate sink(Callable c, CapturedReadLocalScopeVariable captured) { - reachableFromSource(c) and - capturerReads(c, captured) - } - - private predicate prunedCallable(Callable c) { - sink(c, _) - or - exists(Callable mid | callEdge(c, mid) and prunedCallable(mid)) - } - - private predicate prunedEdge(Callable c1, Callable c2) { - prunedCallable(c1) and - prunedCallable(c2) and - callEdge(c1, c2) - } - - private predicate edgePlus(Callable c1, Callable c2) = fastTC(prunedEdge/2)(c1, c2) - - /** - * Holds if `call` may read the value of captured variable `v`. The actual - * read occurs in `reader`. That is, `reader` can be reached from `call` - * using zero or more additional calls (as indicated by `additionalCalls`). - * One of the intermediate callables may be a callable that writes to `v`, - * in which case `call` is not an actual read. - */ - pragma[noopt] - private predicate readsCapturedVariable( - ControlFlow::Nodes::ElementNode call, CapturedReadLocalScopeSourceVariable v, Callable reader, - boolean additionalCalls - ) { - exists(Callable src, CapturedReadLocalScopeVariable captured, boolean libraryDelegateCall | - source(call, v, captured, src, libraryDelegateCall) and - sink(reader, captured) and - ( - src = reader and additionalCalls = libraryDelegateCall - or - edgePlus(src, reader) and additionalCalls = true - ) - ) - } - - /** - * Holds if captured local scope variable `v` is written inside the callable - * to which `bb` belongs, and the value may be read via `call` using zero or - * more additional calls (as indicated by `additionalCalls`). - * - * In this case a pseudo-read is inserted at the exit node at index `i` in `bb`, - * in order to make the write live. - * - * Example: - * - * ```csharp - * class C { - * void M1() { - * int i = 0; - * void M2() { i = 2; }; - * M2(); - * System.Console.WriteLine(i); - * } - * } - * ``` - * - * The write to `i` inside `M2` on line 4 is live because of the implicit call - * definition on line 5. - */ - predicate capturedReadOut( - ControlFlow::BasicBlock bb, int i, LocalScopeSourceVariable v, LocalScopeSourceVariable outer, - Call call, boolean additionalCalls - ) { - exists( - ControlFlow::Nodes::AnnotatedExitNode exit, ControlFlow::BasicBlock pred, - AssignableDefinition adef - | - exit.isNormal() and - variableDefinition(pred, _, v, adef) and - updatesCapturedVariable(_, _, call, outer, adef, additionalCalls) and - pred.getASuccessor*() = bb and - exit = bb.getNode(i) - ) - } - - /** - * Holds if a value written to captured local scope variable `outer` may be - * read as `inner` via `call`, at index `i` in basic block `bb`, using one or - * more calls (as indicated by `additionalCalls`). - * - * Example: - * - * ```csharp - * class C { - * void M1() { - * int i = 0; - * void M2() => System.Console.WriteLine(i); - * i = 1; - * M2(); - * } - * } - * ``` - * - * The write to `i` on line 5 is live because of the call to `M2` on line 6, which - * reaches the entry definition for `i` in `M2` on line 4. - */ - predicate capturedReadIn( - ControlFlow::BasicBlock bb, int i, LocalScopeSourceVariable outer, - LocalScopeSourceVariable inner, ControlFlow::Nodes::ElementNode call, boolean additionalCalls - ) { - exists(Callable reader | - implicitReadCandidate(outer, call) and - readsCapturedVariable(call, outer, reader, additionalCalls) and - reader = inner.getEnclosingCallable() and - outer.getAssignable() = inner.getAssignable() and - call = bb.getNode(i) - ) - } -} - -private import CapturedVariableLivenessImpl - private predicate variableReadPseudo(ControlFlow::BasicBlock bb, int i, Ssa::SourceVariable v) { outRefExitRead(bb, i, v) or refReadBeforeWrite(bb, i, v) - or - CapturedVariableImpl::capturedExitRead(bb, i, v) - or - capturedReadIn(bb, i, v, _, _, _) } pragma[noinline] @@ -1223,7 +830,7 @@ cached private module Cached { cached newtype TSourceVariable = - TLocalVar(Callable c, LocalScopeVariable v) { + TLocalVar(Callable c, PreSsa::SimpleLocalScopeVariable v) { c = v.getCallable() or // Local scope variables can be captured @@ -1297,23 +904,6 @@ private module Cached { FieldOrPropsImpl::updatesNamedFieldOrProp(fp, c, setter) } - /** - * Holds if `call` may change the value of captured variable `v`. The actual - * update occurs in `def`. - */ - cached - predicate updatesCapturedVariable( - ControlFlow::BasicBlock bb, int i, Call call, LocalScopeSourceVariable v, - AssignableDefinition def, boolean additionalCalls - ) { - CapturedVariableImpl::updateCandidate(bb, i, v, call) and - exists(Callable writer | - CapturedVariableImpl::relevantDefinition(writer, v.getAssignable(), def) - | - CapturedVariableImpl::updatesCapturedVariableWriter(call, v, writer, additionalCalls) - ) - } - cached predicate variableWriteQualifier( ControlFlow::BasicBlock bb, int i, QualifiedFieldOrPropSourceVariable v, boolean certain @@ -1327,32 +917,6 @@ private module Cached { not updatesNamedFieldOrProp(bb, i, _, v, _) } - cached - predicate isCapturedVariableDefinitionFlowIn( - Ssa::ExplicitDefinition def, Ssa::ImplicitEntryDefinition edef, - ControlFlow::Nodes::ElementNode c, boolean additionalCalls - ) { - exists(Ssa::SourceVariable v, Ssa::Definition def0, ControlFlow::BasicBlock bb, int i | - v = def.getSourceVariable() and - capturedReadIn(_, _, v, edef.getSourceVariable(), c, additionalCalls) and - def = def0.getAnUltimateDefinition() and - Impl::ssaDefReachesRead(_, def0, bb, i) and - capturedReadIn(bb, i, v, _, _, _) and - c = bb.getNode(i) - ) - } - - cached - predicate isCapturedVariableDefinitionFlowOut( - Ssa::ExplicitDefinition def, Ssa::ImplicitCallDefinition cdef, boolean additionalCalls - ) { - exists(Ssa::Definition def0 | - def = def0.getAnUltimateDefinition() and - capturedReadOut(_, _, def0.getSourceVariable(), cdef.getSourceVariable(), cdef.getCall(), - additionalCalls) - ) - } - cached predicate explicitDefinition(WriteDefinition def, Ssa::SourceVariable v, AssignableDefinition ad) { exists(ControlFlow::BasicBlock bb, int i | diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll index ad0d08ef118..d91380a74f5 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll @@ -7,8 +7,6 @@ private import semmle.code.csharp.dataflow.internal.DataFlowPrivate private import semmle.code.csharp.dataflow.internal.ControlFlowReachability private import semmle.code.csharp.dispatch.Dispatch private import semmle.code.csharp.commons.ComparisonTest -private import cil -private import dotnet // import `TaintedMember` definitions from other files to avoid potential reevaluation private import semmle.code.csharp.frameworks.JsonNET private import semmle.code.csharp.frameworks.WCF @@ -33,16 +31,6 @@ predicate defaultTaintSanitizer(DataFlow::Node node) { bindingset[node] predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::ContentSet c) { none() } -private predicate localCilTaintStep(CIL::DataFlowNode src, CIL::DataFlowNode sink) { - src = sink.(CIL::BinaryArithmeticExpr).getAnOperand() or - src = sink.(CIL::Opcodes::Neg).getOperand() or - src = sink.(CIL::UnaryBitwiseOperation).getOperand() -} - -private predicate localTaintStepCil(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { - localCilTaintStep(asCilDataFlowNode(nodeFrom), asCilDataFlowNode(nodeTo)) -} - private class LocalTaintExprStepConfiguration extends ControlFlowReachabilityConfiguration { LocalTaintExprStepConfiguration() { this = "LocalTaintExprStepConfiguration" } @@ -106,8 +94,6 @@ private class LocalTaintExprStepConfiguration extends ControlFlowReachabilityCon private predicate localTaintStepCommon(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { hasNodePath(any(LocalTaintExprStepConfiguration x), nodeFrom, nodeTo) - or - localTaintStepCil(nodeFrom, nodeTo) } cached diff --git a/csharp/ql/lib/semmle/code/csharp/dispatch/OverridableCallable.qll b/csharp/ql/lib/semmle/code/csharp/dispatch/OverridableCallable.qll index 9905f4939b3..282bd98ef34 100644 --- a/csharp/ql/lib/semmle/code/csharp/dispatch/OverridableCallable.qll +++ b/csharp/ql/lib/semmle/code/csharp/dispatch/OverridableCallable.qll @@ -121,12 +121,19 @@ class OverridableCallable extends Callable, Overridable { result = c.getDeclaringType() } + pragma[nomagic] private predicate isDeclaringSubType(ValueOrRefType t) { t = this.getDeclaringType() or exists(ValueOrRefType mid | this.isDeclaringSubType(mid) | t = mid.getASubType()) } + pragma[nomagic] + private predicate isDeclaringSubType(ValueOrRefType t, ValueOrRefType sub) { + this.isDeclaringSubType(t) and + t = sub.getABaseType() + } + pragma[noinline] private Callable getAnOverrider0(ValueOrRefType t) { // A (transitive) overrider @@ -155,10 +162,7 @@ class OverridableCallable extends Callable, Overridable { Callable getAnOverrider(ValueOrRefType t) { result = this.getAnOverrider0(t) or - exists(ValueOrRefType mid | result = this.getAnOverrider(mid) | - t = mid.getABaseType() and - this.isDeclaringSubType(t) - ) + exists(ValueOrRefType mid | result = this.getAnOverrider(mid) | this.isDeclaringSubType(t, mid)) } } diff --git a/csharp/ql/lib/semmle/code/csharp/dispatch/RuntimeCallable.qll b/csharp/ql/lib/semmle/code/csharp/dispatch/RuntimeCallable.qll index 2e62d94a4ab..a11cbc964c1 100644 --- a/csharp/ql/lib/semmle/code/csharp/dispatch/RuntimeCallable.qll +++ b/csharp/ql/lib/semmle/code/csharp/dispatch/RuntimeCallable.qll @@ -5,14 +5,12 @@ */ import csharp -private import cil -private import dotnet /** * A run-time callable. That is, a callable that is neither abstract * nor defined in an interface. */ -class RuntimeCallable extends DotNet::Callable { +class RuntimeCallable extends Callable { RuntimeCallable() { not this.(Modifiable).isAbstract() and ( @@ -23,15 +21,7 @@ class RuntimeCallable extends DotNet::Callable { } /** A run-time method. */ -class RuntimeMethod extends RuntimeCallable { - RuntimeMethod() { - this instanceof Method or - this instanceof CIL::Method - } - - /** Holds if the method is `static`. */ - predicate isStatic() { this.(Method).isStatic() or this.(CIL::Method).isStatic() } -} +class RuntimeMethod extends RuntimeCallable, Method { } /** A run-time instance method. */ class RuntimeInstanceMethod extends RuntimeMethod { diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll index 169658ad107..7a3cf0ea8d9 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll @@ -8,7 +8,6 @@ import Expr private import semmle.code.csharp.dataflow.internal.DataFlowDispatch private import semmle.code.csharp.dataflow.internal.DataFlowImplCommon private import semmle.code.csharp.dispatch.Dispatch -private import dotnet /** * A call. Either a method call (`MethodCall`), a constructor initializer call @@ -16,7 +15,7 @@ private import dotnet * a delegate call (`DelegateCall`), an accessor call (`AccessorCall`), a * constructor call (`ObjectCreation`), or a local function call (`LocalFunctionCall`). */ -class Call extends DotNet::Call, Expr, @call { +class Call extends Expr, @call { /** * Gets the static (compile-time) target of this call. For example, the * static target of `x.M()` on line 9 is `A.M` in @@ -38,13 +37,19 @@ class Call extends DotNet::Call, Expr, @call { * Use `getARuntimeTarget()` instead to get a potential run-time target (will * include `B.M` in the example above). */ - override Callable getTarget() { none() } + Callable getTarget() { none() } - override Expr getArgument(int i) { result = this.getChild(i) and i >= 0 } + /** Gets the `i`th argument to this call, if any. */ + Expr getArgument(int i) { result = this.getChild(i) and i >= 0 } - override Expr getRawArgument(int i) { result = this.getArgument(i) } + /** + * Gets the `i`th "raw" argument to this call, if any. + * For instance methods, argument 0 is the qualifier. + */ + Expr getRawArgument(int i) { result = this.getArgument(i) } - override Expr getAnArgument() { result = this.getArgument(_) } + /** Gets an argument to this call. */ + Expr getAnArgument() { result = this.getArgument(_) } /** Gets the number of arguments of this call. */ int getNumberOfArguments() { result = count(this.getAnArgument()) } @@ -59,7 +64,7 @@ class Call extends DotNet::Call, Expr, @call { * consider default arguments. */ cached - override Expr getArgumentForParameter(DotNet::Parameter p) { + Expr getArgumentForParameter(Parameter p) { // Appears in the positional part of the call result = this.getImplicitArgument(p) or @@ -69,7 +74,7 @@ class Call extends DotNet::Call, Expr, @call { } pragma[noinline] - private Expr getImplicitArgument(DotNet::Parameter p) { + private Expr getImplicitArgument(Parameter p) { this.getTarget().getAParameter() = p and not exists(result.getExplicitArgumentName()) and ( @@ -144,7 +149,7 @@ class Call extends DotNet::Call, Expr, @call { * - Line 16: There is no static target (delegate call) but the delegate `i => { }` * (line 20) is a run-time target. */ - override Callable getARuntimeTarget() { + Callable getARuntimeTarget() { exists(DispatchCall dc | dc.getCall() = this | result = dc.getADynamicTarget()) } diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Expr.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Expr.qll index 77334e709f3..0cd3f36467c 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Expr.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Expr.qll @@ -18,7 +18,6 @@ import semmle.code.csharp.controlflow.ControlFlowElement import semmle.code.csharp.Location import semmle.code.csharp.Stmt import semmle.code.csharp.Type -private import dotnet private import semmle.code.csharp.ExprOrStmtParent private import semmle.code.csharp.frameworks.System private import semmle.code.csharp.TypeRef @@ -38,11 +37,11 @@ private import semmle.code.csharp.TypeRef * interpolated string (`InterpolatedStringExpr`), a qualifiable expression * (`QualifiableExpr`), or a literal (`Literal`). */ -class Expr extends DotNet::Expr, ControlFlowElement, @expr { +class Expr extends ControlFlowElement, @expr { override Location getALocation() { expr_location(this, result) } /** Gets the type of this expression. */ - override Type getType() { + Type getType() { expressions(this, _, result) or not expressions(this, _, any(Type t)) and @@ -53,7 +52,10 @@ class Expr extends DotNet::Expr, ControlFlowElement, @expr { final AnnotatedType getAnnotatedType() { result.appliesTo(this) } /** Gets the value of this expression, if any */ - override string getValue() { expr_value(this, result) } + string getValue() { expr_value(this, result) } + + /** Holds if this expression has a value. */ + final predicate hasValue() { exists(this.getValue()) } /** Gets the enclosing statement of this expression, if any. */ final Stmt getEnclosingStmt() { enclosingStmt(this, result) } @@ -65,7 +67,7 @@ class Expr extends DotNet::Expr, ControlFlowElement, @expr { * Holds if this expression is generated by the compiler and does not appear * explicitly in the source code. */ - predicate isImplicit() { expr_compiler_generated(this) } + predicate isImplicit() { compiler_generated(this) } /** * Gets an expression that is the result of stripping (recursively) all @@ -88,6 +90,10 @@ class Expr extends DotNet::Expr, ControlFlowElement, @expr { */ string getExplicitArgumentName() { expr_argument_name(this, result) } + /** + * Gets the parent of this expression. This is for example the element + * that uses the result of this expression. + */ override Element getParent() { result = ControlFlowElement.super.getParent() } /** Holds if the nullable flow state of this expression is not null. */ @@ -943,13 +949,13 @@ class InterpolatedStringExpr extends Expr, @interpolated_string_expr { * A `throw` element. Either a `throw` expression (`ThrowExpr`) * or a `throw` statement (`ThrowStmt`). */ -class ThrowElement extends ControlFlowElement, DotNet::Throw, @throw_element { +class ThrowElement extends ControlFlowElement, @throw_element { /** * Gets the expression of the exception being thrown, if any. * * For example, `new Exception("Syntax error")` in `throw new Exception("Syntax error");`. */ - override Expr getExpr() { result = this.getChild(0) } + Expr getExpr() { result = this.getChild(0) } /** Gets the type of exception being thrown. */ Class getThrownExceptionType() { diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Literal.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Literal.qll index 34c39d06761..d3258568b92 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Literal.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Literal.qll @@ -5,7 +5,6 @@ */ import Expr -private import dotnet /** * A literal. Either a Boolean literal (`BoolLiteral`), a Unicode character @@ -13,7 +12,7 @@ private import dotnet * point literal (`RealLiteral`), a `string` literal (`StringLiteral`), or a * `null` literal (`NullLiteral`). */ -class Literal extends DotNet::Literal, Expr, @literal_expr { +class Literal extends Expr, @literal_expr { override string toString() { result = this.getValue() } } @@ -43,7 +42,7 @@ class CharLiteral extends Literal, @char_literal_expr { * literal (`LongLiteral`), a `uint` literal (`UIntLiteral`), or a `ulong` * literal (`ULongLiteral`). */ -class IntegerLiteral extends DotNet::IntLiteral, Literal, @integer_literal_expr { } +class IntegerLiteral extends Literal, @integer_literal_expr { } /** * An `int` literal, for example `0`. @@ -105,7 +104,7 @@ class DecimalLiteral extends RealLiteral, @decimal_literal_expr { * A `string` literal. Either a `string` literal (`StringLiteralUtf16`), * or a `u8` literal (`StringLiteralUtf8`). */ -class StringLiteral extends DotNet::StringLiteral, Literal, @string_literal_expr { +class StringLiteral extends Literal, @string_literal_expr { override string toString() { result = "\"" + this.getValue().replaceAll("\"", "\\\"") + "\"" } override string getAPrimaryQlClass() { result = "StringLiteral" } @@ -128,6 +127,6 @@ class StringLiteralUtf8 extends StringLiteral, @utf8_string_literal_expr { /** * A `null` literal. */ -class NullLiteral extends DotNet::NullLiteral, Literal, @null_literal_expr { +class NullLiteral extends Literal, @null_literal_expr { override string getAPrimaryQlClass() { result = "NullLiteral" } } diff --git a/csharp/ql/lib/semmle/code/csharp/frameworks/EntityFramework.qll b/csharp/ql/lib/semmle/code/csharp/frameworks/EntityFramework.qll index b634aa7d1a5..739546dde46 100644 --- a/csharp/ql/lib/semmle/code/csharp/frameworks/EntityFramework.qll +++ b/csharp/ql/lib/semmle/code/csharp/frameworks/EntityFramework.qll @@ -49,6 +49,8 @@ module EntityFramework { StoredFlowSource() { this.asExpr() = any(PropertyRead read | read.getTarget() instanceof MappedProperty) } + + override string getSourceType() { result = "ORM mapped property" } } private class EFClass extends Class { diff --git a/csharp/ql/lib/semmle/code/csharp/frameworks/NHibernate.qll b/csharp/ql/lib/semmle/code/csharp/frameworks/NHibernate.qll index a13c84250c5..74796ccedd1 100644 --- a/csharp/ql/lib/semmle/code/csharp/frameworks/NHibernate.qll +++ b/csharp/ql/lib/semmle/code/csharp/frameworks/NHibernate.qll @@ -91,6 +91,8 @@ module NHibernate { StoredFlowSource() { this.asExpr() = any(PropertyRead read | read.getTarget() instanceof MappedProperty) } + + override string getSourceType() { result = "ORM mapped property" } } /** diff --git a/csharp/ql/lib/semmle/code/csharp/frameworks/system/diagnostics/CodeAnalysis.qll b/csharp/ql/lib/semmle/code/csharp/frameworks/system/diagnostics/CodeAnalysis.qll new file mode 100644 index 00000000000..d0392f8fc3b --- /dev/null +++ b/csharp/ql/lib/semmle/code/csharp/frameworks/system/diagnostics/CodeAnalysis.qll @@ -0,0 +1,15 @@ +/** Provides definitions related to the namespace `System.Diagnostics.CodeAnalysis`. */ + +private import csharp + +/** An attribute of type `System.Diagnostics.CodeAnalysis.ExperimentalAttribute`. */ +class ExperimentalAttribute extends Attribute { + ExperimentalAttribute() { + this.getType().hasFullyQualifiedName("System.Diagnostics.CodeAnalysis", "ExperimentalAttribute") + } + + /** + * Gets the diagnostic ID. + */ + string getId() { result = this.getConstructorArgument(0).getValue() } +} diff --git a/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll index d4fa6401650..858adcc2268 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll @@ -1,7 +1,8 @@ /** Definitions for the Insecure Direct Object Reference query */ import csharp -import semmle.code.csharp.dataflow.flowsources.Remote +import semmle.code.csharp.security.dataflow.flowsources.FlowSources +deprecated import semmle.code.csharp.dataflow.flowsources.Remote import ActionMethods /** @@ -17,7 +18,7 @@ private predicate needsChecks(ActionMethod m) { m.isEdit() and not m.isAdmin() } * that may indicate that it's used as the ID for some resource */ private predicate hasIdParameter(ActionMethod m) { - exists(RemoteFlowSource src | src.getEnclosingCallable() = m | + exists(ThreatModelFlowSource src | src.getEnclosingCallable() = m | src.asParameter().getName().toLowerCase().matches(["%id", "%idx"]) or // handle cases like `Request.QueryString["Id"]` diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll index d41c6b8f811..1256ae5a7ee 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll @@ -3,8 +3,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote -private import semmle.code.csharp.security.dataflow.flowsources.Local +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.codedom.Compiler private import semmle.code.csharp.security.Sanitizers private import semmle.code.csharp.dataflow.internal.ExternalFlow @@ -55,11 +54,22 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig { */ module CodeInjection = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } -/** A source of local user input. */ -class LocalSource extends Source instanceof LocalFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of local user input. + */ +deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } private class SimpleTypeSanitizer extends Sanitizer, SimpleTypeSanitizedExpr { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll index b174405443f..d0b24125ba9 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll @@ -3,7 +3,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.Diagnostics private import semmle.code.csharp.security.Sanitizers private import semmle.code.csharp.dataflow.internal.ExternalFlow @@ -64,8 +64,15 @@ module CommandInjectionConfig implements DataFlow::ConfigSig { */ module CommandInjection = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** Command Injection sinks defined through Models as Data. */ private class ExternalCommandInjectionExprSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll index e919684d751..a8938ecc6c9 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll @@ -6,7 +6,7 @@ import csharp private import semmle.code.csharp.controlflow.Guards private import semmle.code.csharp.controlflow.BasicBlocks -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.System private import semmle.code.csharp.frameworks.system.Net private import semmle.code.csharp.security.SensitiveActions @@ -60,8 +60,15 @@ private module ConditionalBypassConfig implements DataFlow::ConfigSig { */ module ConditionalBypass = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** The result of a reverse dns may be user-controlled. */ class ReverseDnsSource extends Source { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll index 0b53d9d1ca6..03db7fadf81 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll @@ -3,7 +3,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.security.dataflow.flowsinks.ExternalLocationSink private import semmle.code.csharp.security.PrivateData diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll index e1630503da5..3075fe53a87 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll @@ -5,7 +5,7 @@ import csharp private import semmle.code.csharp.commons.QualifiedName -private import semmle.code.csharp.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.System private import semmle.code.csharp.dataflow.FlowSummary @@ -92,19 +92,19 @@ class ExternalApiDataNode extends DataFlow::Node { deprecated class UntrustedDataToExternalApiConfig extends TaintTracking::Configuration { UntrustedDataToExternalApiConfig() { this = "UntrustedDataToExternalAPIConfig" } - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + override predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } override predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } } -/** A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */ +/** A configuration for tracking flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. */ private module RemoteSourceToExternalApiConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } } -/** A module for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */ +/** A module for tracking flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. */ module RemoteSourceToExternalApi = TaintTracking::Global; /** A node representing untrusted data being passed to an external API. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll index 25134fbcb12..58a34f7604b 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll @@ -4,7 +4,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.DirectoryServices private import semmle.code.csharp.frameworks.system.directoryservices.Protocols private import semmle.code.csharp.security.Sanitizers @@ -66,8 +66,15 @@ module LdapInjectionConfig implements DataFlow::ConfigSig { */ module LdapInjection = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreadModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** LDAP sinks defined through Models as Data. */ private class ExternalLdapExprSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll index 800e86457b4..ed6e69f0709 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll @@ -3,7 +3,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.System private import semmle.code.csharp.frameworks.system.text.RegularExpressions private import semmle.code.csharp.security.Sanitizers @@ -57,7 +57,7 @@ private module LogForgingConfig implements DataFlow::ConfigSig { module LogForging = TaintTracking::Global; /** A source of remote user input. */ -private class RemoteSource extends Source instanceof RemoteFlowSource { } +private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } private class HtmlSanitizer extends Sanitizer { HtmlSanitizer() { this.asExpr() instanceof HtmlSanitizedExpr } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll index 676b77b8446..914239bf7d5 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll @@ -4,7 +4,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.Xml private import semmle.code.csharp.security.Sanitizers @@ -62,8 +62,17 @@ private module MissingXmlValidationConfig implements DataFlow::ConfigSig { */ module MissingXmlValidation = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelFlowSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** + * A source supported by the current threat model. + */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** * The input argument to a call to `XmlReader.Create` where the input will not be validated against diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll index 27f70a0d4e4..84d12fca0cc 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll @@ -5,7 +5,7 @@ import csharp private import semmle.code.csharp.dataflow.DataFlow2 -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.text.RegularExpressions private import semmle.code.csharp.security.Sanitizers @@ -55,8 +55,15 @@ private module ReDoSConfig implements DataFlow::ConfigSig { */ module ReDoS = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** * An expression that represents a regular expression with potential exponential behavior. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll index 89baeda92b6..501ede13f29 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll @@ -4,7 +4,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.text.RegularExpressions private import semmle.code.csharp.security.Sanitizers @@ -54,8 +54,15 @@ private module RegexInjectionConfig implements DataFlow::ConfigSig { */ module RegexInjection = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** * A `pattern` argument to a construction of a `Regex`. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll index 336ca17ca75..a66283de02a 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll @@ -3,8 +3,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote -private import semmle.code.csharp.security.dataflow.flowsources.Local +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.Data private import semmle.code.csharp.security.Sanitizers @@ -54,11 +53,22 @@ private module ResourceInjectionConfig implements DataFlow::ConfigSig { */ module ResourceInjection = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } -/** A source of local user input. */ -class LocalSource extends Source instanceof LocalFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of local user input. + */ +deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** An argument to the `ConnectionString` property on a data connection class. */ class SqlConnectionStringSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll index 7500ac7a994..b7b198bbca0 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll @@ -3,8 +3,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote -private import semmle.code.csharp.security.dataflow.flowsources.Local +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.Sql private import semmle.code.csharp.security.Sanitizers private import semmle.code.csharp.dataflow.internal.ExternalFlow @@ -65,11 +64,22 @@ module SqlInjectionConfig implements DataFlow::ConfigSig { */ module SqlInjection = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } -/** A source of local user input. */ -class LocalSource extends Source instanceof LocalFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of local user input. + */ +deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** An SQL expression passed to an API call that executes SQL. */ class SqlInjectionExprSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll index 005a9e96bfa..bbd32b58353 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll @@ -5,7 +5,7 @@ import csharp private import semmle.code.csharp.controlflow.Guards -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.IO private import semmle.code.csharp.frameworks.system.Web private import semmle.code.csharp.security.Sanitizers @@ -56,8 +56,15 @@ private module TaintedPathConfig implements DataFlow::ConfigSig { */ module TaintedPath = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** * A path argument to a `File` method call. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll index cf558b62c43..6de1305a11d 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll @@ -6,7 +6,7 @@ import csharp private import semmle.code.csharp.serialization.Deserializers private import semmle.code.csharp.dataflow.TaintTracking2 -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources /** * A data flow source for unsafe deserialization vulnerabilities. @@ -48,7 +48,7 @@ abstract private class ConstructorOrStaticMethodSink extends Sink { } */ abstract class Sanitizer extends DataFlow::Node { } -private class RemoteSource extends Source instanceof RemoteFlowSource { } +private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** * DEPRECATED: Use `TaintToObjectMethodTracking` instead. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll index 53b4cceb960..9a5ec46cb37 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll @@ -3,7 +3,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.controlflow.Guards private import semmle.code.csharp.frameworks.Format private import semmle.code.csharp.frameworks.system.Web @@ -58,8 +58,15 @@ private module UrlRedirectConfig implements DataFlow::ConfigSig { */ module UrlRedirect = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** URL Redirection sinks defined through Models as Data. */ private class ExternalUrlRedirectExprSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll index e2d347a2268..7e7fd61fb1c 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll @@ -3,7 +3,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.System private import semmle.code.csharp.frameworks.system.text.RegularExpressions private import semmle.code.csharp.security.xml.InsecureXMLQuery as InsecureXml @@ -14,7 +14,7 @@ private import semmle.code.csharp.security.Sanitizers */ abstract class Source extends DataFlow::Node { } -private class RemoteSource extends Source instanceof RemoteFlowSource { } +private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** * A data flow sink for untrusted user input used in XML processing. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll index 57a0d6e9b50..1edddf45f56 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll @@ -3,7 +3,7 @@ */ import csharp -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.frameworks.system.xml.XPath private import semmle.code.csharp.frameworks.system.Xml private import semmle.code.csharp.security.Sanitizers @@ -64,8 +64,15 @@ module XpathInjectionConfig implements DataFlow::ConfigSig { */ module XpathInjection = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** The `xpath` argument to an `XPathExpression.Compile(..)` call. */ class XPathExpressionCompileSink extends Sink { diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll index 1dea41c8a7c..b9fd47689f9 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll @@ -6,7 +6,7 @@ import csharp private import XSSSinks private import semmle.code.csharp.security.Sanitizers -private import semmle.code.csharp.security.dataflow.flowsources.Remote +private import semmle.code.csharp.security.dataflow.flowsources.FlowSources private import semmle.code.csharp.dataflow.DataFlow2 private import semmle.code.csharp.dataflow.TaintTracking2 @@ -179,8 +179,8 @@ module XssTrackingConfig implements DataFlow::ConfigSig { module XssTracking = TaintTracking::Global; -/** A source of remote user input. */ -private class RemoteSource extends Source instanceof RemoteFlowSource { } +/** A source supported by the current threat model. */ +private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } private class SimpleTypeSanitizer extends Sanitizer, SimpleTypeSanitizedExpr { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll index 6da08298fb9..a5ada1cbaf8 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll @@ -14,6 +14,9 @@ abstract class SourceNode extends DataFlow::Node { * Gets a string that represents the source kind with respect to threat modeling. */ abstract string getThreatModel(); + + /** Gets a string that describes the type of this flow source. */ + abstract string getSourceType(); } /** diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Local.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Local.qll index 7ee1d4b744c..9f3f398e5b1 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Local.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Local.qll @@ -6,11 +6,11 @@ import csharp private import semmle.code.csharp.frameworks.system.windows.Forms private import semmle.code.csharp.dataflow.internal.ExternalFlow private import semmle.code.csharp.security.dataflow.flowsources.FlowSources +private import semmle.code.csharp.commons.Util /** A data flow source of local data. */ abstract class LocalFlowSource extends SourceNode { - /** Gets a string that describes the type of this local flow source. */ - abstract string getSourceType(); + override string getSourceType() { result = "local flow source" } override string getThreatModel() { result = "local" } } @@ -30,3 +30,28 @@ class TextFieldSource extends LocalUserInputSource { override string getSourceType() { result = "TextBox text" } } + +/** + * A dataflow source that represents the access of an environment variable. + */ +abstract class EnvironmentVariableSource extends LocalFlowSource { + override string getThreatModel() { result = "environment" } + + override string getSourceType() { result = "environment variable" } +} + +/** + * A dataflow source that represents the access of a command line argument. + */ +abstract class CommandLineArgumentSource extends LocalFlowSource { + override string getThreatModel() { result = "commandargs" } + + override string getSourceType() { result = "command line argument" } +} + +/** + * A data flow source that represents the parameters of the `Main` method of a program. + */ +private class MainMethodArgumentSource extends CommandLineArgumentSource { + MainMethodArgumentSource() { this.asParameter() = any(MainMethod mainMethod).getAParameter() } +} diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Remote.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Remote.qll index 07c230c19c2..dc2fb36c47a 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Remote.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Remote.qll @@ -17,8 +17,7 @@ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources /** A data flow source of remote user input. */ abstract class RemoteFlowSource extends SourceNode { - /** Gets a string that describes the type of this remote flow source. */ - abstract string getSourceType(); + override string getSourceType() { result = "remote flow source" } override string getThreatModel() { result = "remote" } } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Stored.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Stored.qll index 95df5284b1d..2d2ecd0bccb 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Stored.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Stored.qll @@ -21,6 +21,8 @@ abstract class StoredFlowSource extends SourceNode { */ abstract class DatabaseInputSource extends StoredFlowSource { override string getThreatModel() { result = "database" } + + override string getSourceType() { result = "database input" } } /** @@ -76,4 +78,6 @@ class FileStreamStoredFlowSource extends StoredFlowSource { FileStreamStoredFlowSource() { sourceNode(this, "file") } override string getThreatModel() { result = "file" } + + override string getSourceType() { result = "file stream" } } diff --git a/csharp/ql/lib/semmle/code/dotnet/Callable.qll b/csharp/ql/lib/semmle/code/dotnet/Callable.qll index 0a63e5c95cd..f3f65c75a5e 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Callable.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Callable.qll @@ -9,7 +9,7 @@ import Expr import Parameterizable /** A .Net callable. */ -class Callable extends Parameterizable, @dotnet_callable { +deprecated class Callable extends Parameterizable, @dotnet_callable { /** Holds if this callable has a body or an implementation. */ predicate hasBody() { none() } @@ -85,13 +85,13 @@ class Callable extends Parameterizable, @dotnet_callable { } /** A constructor. */ -abstract class Constructor extends Callable { } +abstract deprecated class Constructor extends Callable { } /** A destructor/finalizer. */ -abstract class Destructor extends Callable { } +abstract deprecated class Destructor extends Callable { } pragma[nomagic] -private ValueOrRefType getARecordBaseType(ValueOrRefType t) { +deprecated private ValueOrRefType getARecordBaseType(ValueOrRefType t) { exists(Callable c | c.hasName("$") and c.getNumberOfParameters() = 0 and @@ -103,7 +103,7 @@ private ValueOrRefType getARecordBaseType(ValueOrRefType t) { } /** A clone method on a record. */ -class RecordCloneCallable extends Callable { +deprecated class RecordCloneCallable extends Callable { RecordCloneCallable() { this.getDeclaringType() instanceof ValueOrRefType and this.hasName("$") and diff --git a/csharp/ql/lib/semmle/code/dotnet/Declaration.qll b/csharp/ql/lib/semmle/code/dotnet/Declaration.qll index 464eaab630b..b03f8ae4ba5 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Declaration.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Declaration.qll @@ -7,7 +7,7 @@ import Type private import semmle.code.csharp.commons.QualifiedName /** A declaration. */ -class Declaration extends NamedElement, @dotnet_declaration { +deprecated class Declaration extends NamedElement, @dotnet_declaration { /** Gets the name of this declaration, without additional decoration such as `<...>`. */ string getUndecoratedName() { none() } @@ -50,7 +50,7 @@ class Declaration extends NamedElement, @dotnet_declaration { } /** A member of a type. */ -class Member extends Declaration, @dotnet_member { +deprecated class Member extends Declaration, @dotnet_member { /** Holds if this member is declared `public`. */ predicate isPublic() { none() } @@ -102,7 +102,7 @@ class Member extends Declaration, @dotnet_member { } /** A property. */ -class Property extends Member, @dotnet_property { +deprecated class Property extends Member, @dotnet_property { /** Gets the getter of this property, if any. */ Callable getGetter() { none() } @@ -114,7 +114,7 @@ class Property extends Member, @dotnet_property { } /** An event. */ -class Event extends Member, @dotnet_event { +deprecated class Event extends Member, @dotnet_event { /** Gets the adder of this event, if any. */ Callable getAdder() { none() } diff --git a/csharp/ql/lib/semmle/code/dotnet/Element.qll b/csharp/ql/lib/semmle/code/dotnet/Element.qll index d0ebce3f7e4..96ad2ab1edf 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Element.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Element.qll @@ -8,7 +8,7 @@ import semmle.code.csharp.Location /** * A .Net program element. */ -class Element extends @dotnet_element { +deprecated class Element extends @dotnet_element { /** Gets a textual representation of this element. */ cached string toString() { none() } @@ -69,7 +69,7 @@ class Element extends @dotnet_element { } /** An element that has a name. */ -class NamedElement extends Element, @dotnet_named_element { +deprecated class NamedElement extends Element, @dotnet_named_element { /** Gets the name of this element. */ cached string getName() { none() } diff --git a/csharp/ql/lib/semmle/code/dotnet/Expr.qll b/csharp/ql/lib/semmle/code/dotnet/Expr.qll index 15d658f54c2..47e90d02169 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Expr.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Expr.qll @@ -7,7 +7,7 @@ import Type import Callable /** An expression. */ -class Expr extends Element, @dotnet_expr { +deprecated class Expr extends Element, @dotnet_expr { /** Gets the callable containing this expression. */ Callable getEnclosingCallable() { none() } @@ -28,7 +28,7 @@ class Expr extends Element, @dotnet_expr { } /** A call. */ -class Call extends Expr, @dotnet_call { +deprecated class Call extends Expr, @dotnet_call { /** Gets the target of this call. */ Callable getTarget() { none() } @@ -52,13 +52,13 @@ class Call extends Expr, @dotnet_call { } /** A literal expression. */ -class Literal extends Expr, @dotnet_literal { } +deprecated class Literal extends Expr, @dotnet_literal { } /** A string literal expression. */ -class StringLiteral extends Literal, @dotnet_string_literal { } +deprecated class StringLiteral extends Literal, @dotnet_string_literal { } /** An integer literal expression. */ -class IntLiteral extends Literal, @dotnet_int_literal { } +deprecated class IntLiteral extends Literal, @dotnet_int_literal { } /** A `null` literal expression. */ -class NullLiteral extends Literal, @dotnet_null_literal { } +deprecated class NullLiteral extends Literal, @dotnet_null_literal { } diff --git a/csharp/ql/lib/semmle/code/dotnet/Generics.qll b/csharp/ql/lib/semmle/code/dotnet/Generics.qll index 67b8fb2f5d0..7c20578f4b1 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Generics.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Generics.qll @@ -6,10 +6,10 @@ import Declaration * A generic declaration. Either an unbound generic (`UnboundGeneric`) or a * constructed generic (`ConstructedGeneric`). */ -abstract class Generic extends Declaration, @dotnet_generic { } +abstract deprecated class Generic extends Declaration, @dotnet_generic { } /** An unbound generic. */ -abstract class UnboundGeneric extends Generic { +abstract deprecated class UnboundGeneric extends Generic { /** Gets the `i`th type parameter, if any. */ abstract TypeParameter getTypeParameter(int i); @@ -27,7 +27,7 @@ abstract class UnboundGeneric extends Generic { } /** A constructed generic. */ -abstract class ConstructedGeneric extends Generic { +abstract deprecated class ConstructedGeneric extends Generic { /** Gets the `i`th type argument, if any. */ abstract Type getTypeArgument(int i); @@ -49,20 +49,20 @@ abstract class ConstructedGeneric extends Generic { * * Constructs the label suffix for a generic method or type. */ -string getGenericsLabel(Generic g) { +deprecated string getGenericsLabel(Generic g) { result = "`" + g.(UnboundGeneric).getNumberOfTypeParameters() or result = "<" + typeArgs(g) + ">" } pragma[noinline] -private string getTypeArgumentLabel(ConstructedGeneric generic, int p) { +deprecated private string getTypeArgumentLabel(ConstructedGeneric generic, int p) { result = generic.getTypeArgument(p).getLabel() } language[monotonicAggregates] pragma[nomagic] -private string typeArgs(ConstructedGeneric generic) { +deprecated private string typeArgs(ConstructedGeneric generic) { result = concat(int p | p in [0 .. generic.getNumberOfTypeArguments() - 1] diff --git a/csharp/ql/lib/semmle/code/dotnet/Namespace.qll b/csharp/ql/lib/semmle/code/dotnet/Namespace.qll index 6035016c281..1b307407e9f 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Namespace.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Namespace.qll @@ -6,7 +6,7 @@ private import Declaration private import semmle.code.csharp.commons.QualifiedName /** A namespace. */ -class Namespace extends Declaration, @namespace { +deprecated class Namespace extends Declaration, @namespace { /** * Gets the parent namespace, if any. For example the parent namespace of `System.IO` * is `System`. The parent namespace of `System` is the global namespace. @@ -64,6 +64,6 @@ class Namespace extends Declaration, @namespace { } /** The global namespace. */ -class GlobalNamespace extends Namespace { +deprecated class GlobalNamespace extends Namespace { GlobalNamespace() { this.getName() = "" } } diff --git a/csharp/ql/lib/semmle/code/dotnet/Parameterizable.qll b/csharp/ql/lib/semmle/code/dotnet/Parameterizable.qll index 8a1f9c108ca..49aa10510b3 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Parameterizable.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Parameterizable.qll @@ -9,7 +9,7 @@ import Declaration * A general parameterizable entity, such as a callable, delegate type, accessor, * indexer, or function pointer type. */ -class Parameterizable extends Declaration, @dotnet_parameterizable { +deprecated class Parameterizable extends Declaration, @dotnet_parameterizable { /** Gets raw parameter `i`, including the `this` parameter at index 0. */ Parameter getRawParameter(int i) { none() } diff --git a/csharp/ql/lib/semmle/code/dotnet/Type.qll b/csharp/ql/lib/semmle/code/dotnet/Type.qll index 269e9c5c788..7b94fd06b61 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Type.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Type.qll @@ -11,7 +11,7 @@ import Generics * A type. Either a value or reference type (`ValueOrRefType`), a type parameter (`TypeParameter`), * a pointer type (`PointerType`), or an array type (`ArrayType`). */ -class Type extends Declaration, @dotnet_type { +deprecated class Type extends Declaration, @dotnet_type { /** Gets the name of this type without additional syntax such as `[]` or `*`. */ override string getUndecoratedName() { none() } } @@ -19,7 +19,7 @@ class Type extends Declaration, @dotnet_type { /** * A value or reference type. */ -class ValueOrRefType extends Type, @dotnet_valueorreftype { +deprecated class ValueOrRefType extends Type, @dotnet_valueorreftype { /** Gets the namespace declaring this type, if any. */ Namespace getDeclaringNamespace() { none() } @@ -57,7 +57,7 @@ class ValueOrRefType extends Type, @dotnet_valueorreftype { /** * A type parameter, for example `T` in `System.Nullable`. */ -class TypeParameter extends Type, @dotnet_type_parameter { +deprecated class TypeParameter extends Type, @dotnet_type_parameter { /** Gets the generic type or method declaring this type parameter. */ UnboundGeneric getDeclaringGeneric() { this = result.getATypeParameter() } @@ -70,7 +70,7 @@ class TypeParameter extends Type, @dotnet_type_parameter { } /** A pointer type. */ -class PointerType extends Type, @dotnet_pointer_type { +deprecated class PointerType extends Type, @dotnet_pointer_type { /** Gets the type referred by this pointer type, for example `char` in `char*`. */ Type getReferentType() { none() } @@ -82,7 +82,7 @@ class PointerType extends Type, @dotnet_pointer_type { } /** An array type. */ -class ArrayType extends ValueOrRefType, @dotnet_array_type { +deprecated class ArrayType extends ValueOrRefType, @dotnet_array_type { /** Gets the type of the array element. */ Type getElementType() { none() } diff --git a/csharp/ql/lib/semmle/code/dotnet/Utils.qll b/csharp/ql/lib/semmle/code/dotnet/Utils.qll index 42c5b59a5fb..b69993ce97e 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Utils.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Utils.qll @@ -6,7 +6,7 @@ import Element import Expr /** A throw element. */ -class Throw extends Element, @dotnet_throw { +deprecated class Throw extends Element, @dotnet_throw { /** Gets the expression being thrown, if any. */ Expr getExpr() { none() } } diff --git a/csharp/ql/lib/semmle/code/dotnet/Variable.qll b/csharp/ql/lib/semmle/code/dotnet/Variable.qll index bc21f9756ce..a0cea24e7fd 100644 --- a/csharp/ql/lib/semmle/code/dotnet/Variable.qll +++ b/csharp/ql/lib/semmle/code/dotnet/Variable.qll @@ -4,16 +4,16 @@ import Declaration import Callable /** A .Net variable. */ -class Variable extends Declaration, @dotnet_variable { +deprecated class Variable extends Declaration, @dotnet_variable { /** Gets the type of this variable. */ Type getType() { none() } } /** A .Net field. */ -class Field extends Variable, Member, @dotnet_field { } +deprecated class Field extends Variable, Member, @dotnet_field { } /** A parameter to a .Net callable, property or function pointer type. */ -class Parameter extends Variable, @dotnet_parameter { +deprecated class Parameter extends Variable, @dotnet_parameter { /** Gets the raw position of this parameter, including the `this` parameter at index 0. */ final int getRawPosition() { this = this.getDeclaringElement().getRawParameter(result) } diff --git a/csharp/ql/lib/semmlecode.csharp.dbscheme b/csharp/ql/lib/semmlecode.csharp.dbscheme index c9ee11bd1ee..fd04e45710e 100644 --- a/csharp/ql/lib/semmlecode.csharp.dbscheme +++ b/csharp/ql/lib/semmlecode.csharp.dbscheme @@ -682,8 +682,6 @@ has_modifiers( int id: @modifiable_direct ref, int mod_id: @modifier ref); -compiler_generated(unique int id: @modifiable ref); - /** MEMBERS **/ @member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; @@ -890,7 +888,7 @@ params( string name: string ref, int type_id: @type_or_ref ref, int index: int ref, - int mode: int ref, /* value = 0, ref = 1, out = 2, array = 3, this = 4 */ + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ int parent_id: @parameterizable ref, int unbound_id: @parameter ref); @@ -1271,9 +1269,6 @@ mutator_invocation_mode( unique int id: @operator_invocation_expr ref, int mode: int ref /* prefix = 1, postfix = 2*/); -expr_compiler_generated( - unique int id: @expr ref); - expr_value( unique int id: @expr ref, string value: string ref); @@ -1316,6 +1311,10 @@ lambda_expr_return_type( unique int id: @lambda_expr ref, int type_id: @type_or_ref ref); +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + /** CONTROL/DATA FLOW **/ @control_flow_element = @stmt | @expr; diff --git a/csharp/ql/lib/semmlecode.csharp.dbscheme.stats b/csharp/ql/lib/semmlecode.csharp.dbscheme.stats index e217f9cea60..82714bfe1d0 100644 --- a/csharp/ql/lib/semmlecode.csharp.dbscheme.stats +++ b/csharp/ql/lib/semmlecode.csharp.dbscheme.stats @@ -1,41725 +1,4 @@ - - - @compilation - 1607 - - - @diagnostic - 138224 - - - @extractor_message - 11378 - - - @externalDataElement - 0 - - - @assembly - 14527 - - - @file - 92261 - - - @folder - 34263 - - - @namespace - 206514 - - - @namespace_declaration - 37444 - - - @using_static_directive - 1202 - - - @directive_if - 20769 - - - @using_namespace_directive - 286854 - - - @directive_elif - 293 - - - @directive_else - 6744 - - - @directive_endif - 20338 - - - @directive_region - 38812 - - - @directive_endregion - 38812 - - - @directive_line - 539550 - - - @directive_nullable - 467925 - - - @directive_warning - 23 - - - @directive_error - 45 - - - @directive_undefine - 68 - - - @pragma_checksum - 9570 - - - @directive_define - 83 - - - @pragma_warning - 57623 - - - @typeref - 4008699 - - - @bool_type - 60 - - - @char_type - 60 - - - @decimal_type - 60 - - - @sbyte_type - 60 - - - @short_type - 60 - - - @int_type - 60 - - - @long_type - 60 - - - @byte_type - 60 - - - @ushort_type - 60 - - - @uint_type - 60 - - - @ulong_type - 60 - - - @float_type - 60 - - - @double_type - 60 - - - @enum_type - 163759 - - - @struct_type - 716372 - - - @class_type - 4319716 - - - @interface_type - 2787078 - - - @delegate_type - 834351 - - - @null_type - 60 - - - @type_parameter - 897781 - - - @pointer_type - 11632 - - - @nullable_type - 24628 - - - @array_type - 95572 - - - @void_type - 60 - - - @int_ptr_type - 60 - - - @arglist_type - 25 - - - @unknown_type - 60 - - - @tuple_type - 47199 - - - @function_pointer_type - 47919 - - - @inline_array_type - 21 - - - @uint_ptr_type - 0 - - - @dynamic_type - 25 - - - @attribute_default - 13884733 - - - @attribute_return - 338135 - - - @attribute_assembly - 42996 - - - @attribute_module - 66 - - - @oblivious - 18476 - - - @not_annotated - 6903 - - - @annotated - 4922 - - - @type_mention - 3322420 - - - @type_parameter_constraints - 897781 - - - @location_default - 154005847 - - - @modifier - 1020 - - - @property - 5910563 - - - @indexer - 103350 - - - @getter - 6006897 - - - @setter - 895152 - - - @event - 60800 - - - @add_event_accessor - 60800 - - - @remove_event_accessor - 60800 - - - @operator - 146898 - - - @method - 17406043 - - - @constructor - 5023456 - - - @destructor - 4588 - - - @local_function - 4768 - - - @addressable_field - 9983437 - - - @constant - 3004004 - - - @addressable_local_variable - 617257 - - - @local_constant - 1960 - - - @local_variable_ref - 1708 - - - @parameter - 31463795 - - - @block_stmt - 797317 - - - @expr_stmt - 866006 - - - @if_stmt - 371632 - - - @switch_stmt - 12529 - - - @while_stmt - 23333 - - - @do_stmt - 2314 - - - @for_stmt - 22828 - - - @foreach_stmt - 32474 - - - @break_stmt - 115991 - - - @continue_stmt - 10334 - - - @goto_stmt - 6331 - - - @goto_case_stmt - 1397 - - - @goto_default_stmt - 261 - - - @throw_stmt - 175588 - - - @return_stmt - 374214 - - - @yield_stmt - 7198 - - - @try_stmt - 21811 - - - @checked_stmt - 487 - - - @unchecked_stmt - 194 - - - @lock_stmt - 9587 - - - @using_block_stmt - 9206 - - - @var_decl_stmt - 557023 - - - @const_decl_stmt - 1946 - - - @empty_stmt - 846 - - - @unsafe_stmt - 626 - - - @fixed_stmt - 3152 - - - @label_stmt - 2802 - - - @catch - 30233 - - - @case_stmt - 130471 - - - @local_function_stmt - 4652 - - - @using_decl_stmt - 13937 - - - @bool_literal_expr - 517984 - - - @char_literal_expr - 75977 - - - @decimal_literal_expr - 185559 - - - @int_literal_expr - 4873070 - - - @long_literal_expr - 10293 - - - @uint_literal_expr - 10265 - - - @ulong_literal_expr - 4223 - - - @float_literal_expr - 129369 - - - @double_literal_expr - 67946 - - - @utf16_string_literal_expr - 1936327 - - - @null_literal_expr - 249861 - - - @this_access_expr - 1139940 - - - @base_access_expr - 57393 - - - @local_variable_access_expr - 1800136 - - - @parameter_access_expr - 1043167 - - - @field_access_expr - 1361171 - - - @property_access_expr - 1468688 - - - @method_access_expr - 21420 - - - @event_access_expr - 14995 - - - @indexer_access_expr - 73964 - - - @array_access_expr - 95237 - - - @type_access_expr - 1319868 - - - @typeof_expr - 733326 - - - @method_invocation_expr - 1292925 - - - @delegate_invocation_expr - 14027 - - - @operator_invocation_expr - 53469 - - - @cast_expr - 666635 - - - @object_creation_expr - 232984 - - - @explicit_delegate_creation_expr - 3838 - - - @implicit_delegate_creation_expr - 13629 - - - @array_creation_expr - 842441 - - - @default_expr - 475094 - - - @plus_expr - 1494 - - - @minus_expr - 83947 - - - @bit_not_expr - 2592 - - - @log_not_expr - 69874 - - - @post_incr_expr - 34720 - - - @post_decr_expr - 4264 - - - @pre_incr_expr - 16259 - - - @pre_decr_expr - 1332 - - - @mul_expr - 13674 - - - @div_expr - 4708 - - - @rem_expr - 1733 - - - @add_expr - 89975 - - - @sub_expr - 32231 - - - @lshift_expr - 20397 - - - @rshift_expr - 6358 - - - @lt_expr - 42475 - - - @gt_expr - 26005 - - - @le_expr - 22303 - - - @ge_expr - 13933 - - - @eq_expr - 167777 - - - @ne_expr - 126219 - - - @bit_and_expr - 19733 - - - @bit_xor_expr - 3459 - - - @bit_or_expr - 37840 - - - @log_and_expr - 64040 - - - @log_or_expr - 40879 - - - @is_expr - 27099 - - - @as_expr - 25539 - - - @null_coalescing_expr - 12230 - - - @conditional_expr - 25477 - - - @simple_assign_expr - 1445815 - - - @assign_add_expr - 10985 - - - @assign_sub_expr - 3479 - - - @assign_mul_expr - 448 - - - @assign_div_expr - 224 - - - @assign_rem_expr - 54 - - - @assign_and_expr - 1371 - - - @assign_xor_expr - 1366 - - - @assign_or_expr - 5049 - - - @assign_lshift_expr - 312 - - - @assign_rshift_expr - 476 - - - @object_init_expr - 192703 - - - @collection_init_expr - 17877 - - - @array_init_expr - 836505 - - - @checked_expr - 1516 - - - @unchecked_expr - 2773 - - - @constructor_init_expr - 48759 - - - @add_event_expr - 4425 - - - @remove_event_expr - 2983 - - - @local_var_decl_expr - 619052 - - - @lambda_expr - 246837 - - - @anonymous_method_expr - 485 - - - @pointer_indirection_expr - 8987 - - - @address_of_expr - 3502 - - - @sizeof_expr - 4139 - - - @await_expr - 111125 - - - @nameof_expr - 60898 - - - @interpolated_string_expr - 45841 - - - @unknown_expr - 9 - - - @throw_expr - 6053 - - - @tuple_expr - 10147 - - - @local_function_invocation_expr - 16381 - - - @ref_expr - 3049 - - - @discard_expr - 3701 - - - @range_expr - 1288 - - - @index_expr - 308 - - - @switch_expr - 1803 - - - @recursive_pattern_expr - 4161 - - - @property_pattern_expr - 3675 - - - @positional_pattern_expr - 1021 - - - @switch_case_expr - 13128 - - - @assign_coalesce_expr - 6746 - - - @suppress_nullable_warning_expr - 49307 - - - @lt_pattern_expr - 67 - - - @gt_pattern_expr - 133 - - - @le_pattern_expr - 89 - - - @ge_pattern_expr - 102 - - - @not_pattern_expr - 4720 - - - @and_pattern_expr - 331 - - - @or_pattern_expr - 3131 - - - @function_pointer_invocation_expr - 182 - - - @with_expr - 291 - - - @list_pattern_expr - 291 - - - @slice_pattern_expr - 105 - - - @urshift_expr - 65 - - - @assign_urshift_expr - 2 - - - @utf8_string_literal_expr - 4006 - - - @collection_expr - 1900 - - - @define_symbol_expr - 40315 - - - @par_expr - 0 - - - @namespace_expr - 0 - - - @dynamic_element_access_expr - 222 - - - @dynamic_member_access_expr - 10662 - - - @namespace_access_expr - 117 - - - @spread_element_expr - 15 - - - @xmldtd - 72 - - - @xmlelement - 67055539 - - - @xmlattribute - 45628904 - - - @xmlnamespace - 429 - - - @xmlcomment - 12809 - - - @xmlcharacters - 50180784 - - - @singlelinecomment - 835522 - - - @xmldoccomment - 1480593 - - - @multilinecomment - 102852 - - - @commentblock - 452748 - - - @asp_close_tag - 24357 - - - @asp_code - 1371 - - - @asp_comment - 290 - - - @asp_data_binding - 586 - - - @asp_directive - 3329 - - - @asp_open_tag - 33601 - - - @asp_quoted_string - 58509 - - - @asp_text - 60436 - - - @asp_xml_directive - 1530 - - - @cil_nop - 0 - - - @cil_break - 0 - - - @cil_ldarg_0 - 0 - - - @cil_ldarg_1 - 0 - - - @cil_ldarg_2 - 0 - - - @cil_ldarg_3 - 0 - - - @cil_ldloc_0 - 0 - - - @cil_ldloc_1 - 0 - - - @cil_ldloc_2 - 0 - - - @cil_ldloc_3 - 0 - - - @cil_stloc_0 - 0 - - - @cil_stloc_1 - 0 - - - @cil_stloc_2 - 0 - - - @cil_stloc_3 - 0 - - - @cil_ldarg_s - 0 - - - @cil_ldarga_s - 0 - - - @cil_starg_s - 0 - - - @cil_ldloc_s - 0 - - - @cil_ldloca_s - 0 - - - @cil_stloc_s - 0 - - - @cil_ldnull - 0 - - - @cil_ldc_i4_m1 - 0 - - - @cil_ldc_i4_0 - 0 - - - @cil_ldc_i4_1 - 0 - - - @cil_ldc_i4_2 - 0 - - - @cil_ldc_i4_3 - 0 - - - @cil_ldc_i4_4 - 0 - - - @cil_ldc_i4_5 - 0 - - - @cil_ldc_i4_6 - 0 - - - @cil_ldc_i4_7 - 0 - - - @cil_ldc_i4_8 - 0 - - - @cil_ldc_i4_s - 0 - - - @cil_ldc_i4 - 0 - - - @cil_ldc_i8 - 0 - - - @cil_ldc_r4 - 0 - - - @cil_ldc_r8 - 0 - - - @cil_dup - 0 - - - @cil_pop - 0 - - - @cil_jmp - 0 - - - @cil_call - 0 - - - @cil_calli - 0 - - - @cil_ret - 0 - - - @cil_br_s - 0 - - - @cil_brfalse_s - 0 - - - @cil_brtrue_s - 0 - - - @cil_beq_s - 0 - - - @cil_bge_s - 0 - - - @cil_bgt_s - 0 - - - @cil_ble_s - 0 - - - @cil_blt_s - 0 - - - @cil_bne_un_s - 0 - - - @cil_bge_un_s - 0 - - - @cil_bgt_un_s - 0 - - - @cil_ble_un_s - 0 - - - @cil_blt_un_s - 0 - - - @cil_br - 0 - - - @cil_brfalse - 0 - - - @cil_brtrue - 0 - - - @cil_beq - 0 - - - @cil_bge - 0 - - - @cil_bgt - 0 - - - @cil_ble - 0 - - - @cil_blt - 0 - - - @cil_bne_un - 0 - - - @cil_bge_un - 0 - - - @cil_bgt_un - 0 - - - @cil_ble_un - 0 - - - @cil_blt_un - 0 - - - @cil_switch - 0 - - - @cil_ldind_i1 - 0 - - - @cil_ldind_u1 - 0 - - - @cil_ldind_i2 - 0 - - - @cil_ldind_u2 - 0 - - - @cil_ldind_i4 - 0 - - - @cil_ldind_u4 - 0 - - - @cil_ldind_i8 - 0 - - - @cil_ldind_i - 0 - - - @cil_ldind_r4 - 0 - - - @cil_ldind_r8 - 0 - - - @cil_ldind_ref - 0 - - - @cil_stind_ref - 0 - - - @cil_stind_i1 - 0 - - - @cil_stind_i2 - 0 - - - @cil_stind_i4 - 0 - - - @cil_stind_i8 - 0 - - - @cil_stind_r4 - 0 - - - @cil_stind_r8 - 0 - - - @cil_add - 0 - - - @cil_sub - 0 - - - @cil_mul - 0 - - - @cil_div - 0 - - - @cil_div_un - 0 - - - @cil_rem - 0 - - - @cil_rem_un - 0 - - - @cil_and - 0 - - - @cil_or - 0 - - - @cil_xor - 0 - - - @cil_shl - 0 - - - @cil_shr - 0 - - - @cil_shr_un - 0 - - - @cil_neg - 0 - - - @cil_not - 0 - - - @cil_conv_i1 - 0 - - - @cil_conv_i2 - 0 - - - @cil_conv_i4 - 0 - - - @cil_conv_i8 - 0 - - - @cil_conv_r4 - 0 - - - @cil_conv_r8 - 0 - - - @cil_conv_u4 - 0 - - - @cil_conv_u8 - 0 - - - @cil_callvirt - 0 - - - @cil_cpobj - 0 - - - @cil_ldobj - 0 - - - @cil_ldstr - 0 - - - @cil_newobj - 0 - - - @cil_castclass - 0 - - - @cil_isinst - 0 - - - @cil_conv_r_un - 0 - - - @cil_unbox - 0 - - - @cil_throw - 0 - - - @cil_ldfld - 0 - - - @cil_ldflda - 0 - - - @cil_stfld - 0 - - - @cil_ldsfld - 0 - - - @cil_ldsflda - 0 - - - @cil_stsfld - 0 - - - @cil_stobj - 0 - - - @cil_conv_ovf_i1_un - 0 - - - @cil_conv_ovf_i2_un - 0 - - - @cil_conv_ovf_i4_un - 0 - - - @cil_conv_ovf_i8_un - 0 - - - @cil_conv_ovf_u1_un - 0 - - - @cil_conv_ovf_u2_un - 0 - - - @cil_conv_ovf_u4_un - 0 - - - @cil_conv_ovf_u8_un - 0 - - - @cil_conv_ovf_i_un - 0 - - - @cil_conv_ovf_u_un - 0 - - - @cil_box - 0 - - - @cil_newarr - 0 - - - @cil_ldlen - 0 - - - @cil_ldelema - 0 - - - @cil_ldelem_i1 - 0 - - - @cil_ldelem_u1 - 0 - - - @cil_ldelem_i2 - 0 - - - @cil_ldelem_u2 - 0 - - - @cil_ldelem_i4 - 0 - - - @cil_ldelem_u4 - 0 - - - @cil_ldelem_i8 - 0 - - - @cil_ldelem_i - 0 - - - @cil_ldelem_r4 - 0 - - - @cil_ldelem_r8 - 0 - - - @cil_ldelem_ref - 0 - - - @cil_stelem_i - 0 - - - @cil_stelem_i1 - 0 - - - @cil_stelem_i2 - 0 - - - @cil_stelem_i4 - 0 - - - @cil_stelem_i8 - 0 - - - @cil_stelem_r4 - 0 - - - @cil_stelem_r8 - 0 - - - @cil_stelem_ref - 0 - - - @cil_ldelem - 0 - - - @cil_stelem - 0 - - - @cil_unbox_any - 0 - - - @cil_conv_ovf_i1 - 0 - - - @cil_conv_ovf_u1 - 0 - - - @cil_conv_ovf_i2 - 0 - - - @cil_conv_ovf_u2 - 0 - - - @cil_conv_ovf_i4 - 0 - - - @cil_conv_ovf_u4 - 0 - - - @cil_conv_ovf_i8 - 0 - - - @cil_conv_ovf_u8 - 0 - - - @cil_refanyval - 0 - - - @cil_ckinfinite - 0 - - - @cil_mkrefany - 0 - - - @cil_ldtoken - 0 - - - @cil_conv_u2 - 0 - - - @cil_conv_u1 - 0 - - - @cil_conv_i - 0 - - - @cil_conv_ovf_i - 0 - - - @cil_conv_ovf_u - 0 - - - @cil_add_ovf - 0 - - - @cil_add_ovf_un - 0 - - - @cil_mul_ovf - 0 - - - @cil_mul_ovf_un - 0 - - - @cil_sub_ovf - 0 - - - @cil_sub_ovf_un - 0 - - - @cil_endfinally - 0 - - - @cil_leave - 0 - - - @cil_leave_s - 0 - - - @cil_stind_i - 0 - - - @cil_conv_u - 0 - - - @cil_arglist - 0 - - - @cil_ceq - 0 - - - @cil_cgt - 0 - - - @cil_cgt_un - 0 - - - @cil_clt - 0 - - - @cil_clt_un - 0 - - - @cil_ldftn - 0 - - - @cil_ldvirtftn - 0 - - - @cil_ldarg - 0 - - - @cil_ldarga - 0 - - - @cil_starg - 0 - - - @cil_ldloc - 0 - - - @cil_ldloca - 0 - - - @cil_stloc - 0 - - - @cil_localloc - 0 - - - @cil_endfilter - 0 - - - @cil_unaligned - 0 - - - @cil_volatile - 0 - - - @cil_tail - 0 - - - @cil_initobj - 0 - - - @cil_constrained - 0 - - - @cil_cpblk - 0 - - - @cil_initblk - 0 - - - @cil_rethrow - 0 - - - @cil_sizeof - 0 - - - @cil_refanytype - 0 - - - @cil_readonly - 0 - - - @cil_valueorreftype - 0 - - - @cil_typeparameter - 0 - - - @cil_array_type - 0 - - - @cil_pointer_type - 0 - - - @cil_function_pointer_type - 0 - - - @cil_method - 0 - - - @cil_method_implementation - 0 - - - @cil_parameter - 0 - - - @cil_field - 0 - - - @cil_property - 0 - - - @cil_event - 0 - - - @cil_local_variable - 0 - - - @cil_catch_handler - 0 - - - @cil_filter_handler - 0 - - - @cil_finally_handler - 0 - - - @cil_fault_handler - 0 - - - @cil_attribute - 0 - - - - - compilations - 1607 - - - id - 1607 - - - cwd - 1353 - - - - - id - cwd - - - 12 - - - 1 - 2 - 1607 - - - - - - - cwd - id - - - 12 - - - 1 - 2 - 1208 - - - 2 - 3 - 55 - - - 3 - 7 - 90 - - - - - - - - - compilation_info - 0 - - - id - 0 - - - info_key - 0 - - - info_value - 0 - - - - - id - info_key - - - 12 - - - - - - id - info_value - - - 12 - - - - - - info_key - id - - - 12 - - - - - - info_key - info_value - - - 12 - - - - - - info_value - id - - - 12 - - - - - - info_value - info_key - - - 12 - - - - - - - - compilation_args - 17990 - - - id - 777 - - - num - 166 - - - arg - 2580 - - - - - id - num - - - 12 - - - 7 - 20 - 36 - - - 20 - 21 - 115 - - - 21 - 22 - 277 - - - 22 - 23 - 108 - - - 23 - 24 - 55 - - - 24 - 26 - 59 - - - 26 - 30 - 64 - - - 30 - 93 - 59 - - - - - - - id - arg - - - 12 - - - 7 - 20 - 36 - - - 20 - 21 - 115 - - - 21 - 22 - 279 - - - 22 - 23 - 108 - - - 23 - 24 - 54 - - - 24 - 26 - 59 - - - 26 - 30 - 64 - - - 30 - 93 - 59 - - - - - - - num - id - - - 12 - - - 1 - 2 - 5 - - - 2 - 3 - 73 - - - 4 - 8 - 12 - - - 9 - 15 - 14 - - - 15 - 58 - 12 - - - 69 - 412 - 12 - - - 428 - 430 - 3 - - - 430 - 431 - 18 - - - 431 - 432 - 12 - - - - - - - num - arg - - - 12 - - - 1 - 2 - 5 - - - 2 - 3 - 81 - - - 4 - 8 - 12 - - - 9 - 10 - 7 - - - 10 - 11 - 12 - - - 12 - 16 - 12 - - - 19 - 42 - 12 - - - 53 - 117 - 12 - - - 120 - 274 - 9 - - - - - - - arg - id - - - 12 - - - 1 - 2 - 2111 - - - 2 - 3 - 194 - - - 3 - 16 - 200 - - - 16 - 432 - 73 - - - - - - - arg - num - - - 12 - - - 1 - 2 - 2167 - - - 2 - 3 - 209 - - - 3 - 15 - 196 - - - 16 - 26 - 7 - - - - - - - - - compilation_expanded_args - 593382 - - - id - 1375 - - - num - 6110 - - - arg - 64718 - - - - - id - num - - - 12 - - - 12 - 356 - 121 - - - 356 - 361 - 114 - - - 361 - 365 - 94 - - - 365 - 374 - 114 - - - 374 - 380 - 67 - - - 381 - 394 - 114 - - - 394 - 412 - 107 - - - 412 - 428 - 107 - - - 429 - 443 - 107 - - - 444 - 472 - 107 - - - 472 - 505 - 107 - - - 512 - 558 - 107 - - - 559 - 907 - 101 - - - - - - - id - arg - - - 12 - - - 12 - 356 - 121 - - - 356 - 361 - 114 - - - 361 - 365 - 94 - - - 365 - 374 - 114 - - - 374 - 380 - 67 - - - 381 - 394 - 114 - - - 394 - 412 - 107 - - - 412 - 428 - 107 - - - 429 - 443 - 107 - - - 444 - 472 - 107 - - - 472 - 505 - 107 - - - 512 - 558 - 107 - - - 559 - 907 - 101 - - - - - - - num - id - - - 12 - - - 1 - 4 - 472 - - - 4 - 5 - 478 - - - 5 - 7 - 485 - - - 7 - 11 - 161 - - - 11 - 12 - 411 - - - 12 - 19 - 458 - - - 19 - 45 - 458 - - - 47 - 105 - 458 - - - 105 - 201 - 364 - - - 201 - 202 - 1018 - - - 203 - 204 - 1261 - - - 204 - 205 - 80 - - - - - - - num - arg - - - 12 - - - 1 - 4 - 532 - - - 4 - 5 - 478 - - - 5 - 7 - 492 - - - 7 - 11 - 175 - - - 11 - 12 - 397 - - - 12 - 18 - 451 - - - 18 - 22 - 472 - - - 22 - 28 - 418 - - - 28 - 40 - 492 - - - 40 - 59 - 465 - - - 59 - 63 - 438 - - - 63 - 66 - 458 - - - 66 - 85 - 472 - - - 85 - 198 - 364 - - - - - - - arg - id - - - 12 - - - 1 - 2 - 59241 - - - 2 - 204 - 5456 - - - 204 - 205 - 20 - - - - - - - arg - num - - - 12 - - - 1 - 2 - 59322 - - - 2 - 67 - 5132 - - - 67 - 122 - 263 - - - - - - - - - compilation_compiling_files - 49163 - - - id - 777 - - - num - 3512 - - - file - 33855 - - - - - id - num - - - 12 - - - 1 - 2 - 32 - - - 2 - 3 - 324 - - - 3 - 4 - 57 - - - 4 - 9 - 63 - - - 9 - 21 - 63 - - - 21 - 46 - 59 - - - 47 - 97 - 59 - - - 98 - 173 - 59 - - - 175 - 1947 - 57 - - - - - - - id - file - - - 12 - - - 1 - 2 - 32 - - - 2 - 3 - 324 - - - 3 - 4 - 57 - - - 4 - 9 - 63 - - - 9 - 21 - 63 - - - 21 - 46 - 59 - - - 47 - 97 - 59 - - - 98 - 173 - 59 - - - 175 - 1947 - 57 - - - - - - - num - id - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 918 - - - 3 - 5 - 140 - - - 5 - 6 - 729 - - - 6 - 7 - 83 - - - 7 - 8 - 328 - - - 8 - 9 - 102 - - - 10 - 11 - 315 - - - 11 - 17 - 276 - - - 17 - 29 - 294 - - - 29 - 112 - 265 - - - 113 - 432 - 55 - - - - - - - num - file - - - 12 - - - 1 - 2 - 14 - - - 2 - 3 - 905 - - - 3 - 5 - 144 - - - 5 - 6 - 725 - - - 6 - 7 - 83 - - - 7 - 8 - 328 - - - 8 - 10 - 202 - - - 10 - 13 - 281 - - - 13 - 19 - 274 - - - 19 - 35 - 267 - - - 35 - 140 - 263 - - - 140 - 343 - 21 - - - - - - - file - id - - - 12 - - - 1 - 2 - 21715 - - - 2 - 3 - 10785 - - - 3 - 171 - 1355 - - - - - - - file - num - - - 12 - - - 1 - 2 - 23185 - - - 2 - 3 - 9805 - - - 3 - 32 - 864 - - - - - - - - - compilation_referencing_files - 466138 - - - id - 1375 - - - num - 4491 - - - file - 4876 - - - - - id - num - - - 12 - - - 4 - 303 - 114 - - - 303 - 305 - 40 - - - 305 - 307 - 121 - - - 307 - 310 - 114 - - - 310 - 313 - 107 - - - 314 - 329 - 107 - - - 329 - 330 - 87 - - - 330 - 336 - 121 - - - 336 - 340 - 107 - - - 340 - 349 - 107 - - - 350 - 374 - 107 - - - 374 - 382 - 114 - - - 383 - 626 - 107 - - - 649 - 667 - 13 - - - - - - - id - file - - - 12 - - - 4 - 303 - 114 - - - 303 - 305 - 40 - - - 305 - 307 - 121 - - - 307 - 310 - 114 - - - 310 - 313 - 107 - - - 314 - 329 - 107 - - - 329 - 330 - 87 - - - 330 - 336 - 121 - - - 336 - 340 - 107 - - - 340 - 349 - 107 - - - 350 - 374 - 107 - - - 374 - 382 - 114 - - - 383 - 626 - 107 - - - 649 - 667 - 13 - - - - - - - num - id - - - 12 - - - 1 - 6 - 350 - - - 6 - 7 - 1382 - - - 7 - 49 - 337 - - - 49 - 147 - 337 - - - 152 - 191 - 53 - - - 201 - 202 - 930 - - - 203 - 204 - 1072 - - - 204 - 205 - 26 - - - - - - - num - file - - - 12 - - - 1 - 5 - 370 - - - 5 - 6 - 613 - - - 6 - 7 - 755 - - - 7 - 23 - 370 - - - 23 - 29 - 377 - - - 29 - 33 - 337 - - - 33 - 46 - 350 - - - 46 - 63 - 343 - - - 63 - 69 - 350 - - - 69 - 73 - 411 - - - 73 - 83 - 209 - - - - - - - file - id - - - 12 - - - 1 - 2 - 404 - - - 2 - 6 - 242 - - - 6 - 7 - 505 - - - 7 - 8 - 505 - - - 8 - 10 - 384 - - - 10 - 47 - 391 - - - 47 - 140 - 370 - - - 142 - 184 - 40 - - - 201 - 202 - 930 - - - 203 - 204 - 1099 - - - - - - - file - num - - - 12 - - - 1 - 2 - 418 - - - 2 - 5 - 323 - - - 5 - 6 - 296 - - - 6 - 7 - 593 - - - 7 - 9 - 418 - - - 9 - 19 - 370 - - - 19 - 26 - 418 - - - 26 - 33 - 411 - - - 33 - 40 - 384 - - - 40 - 69 - 370 - - - 69 - 71 - 343 - - - 71 - 74 - 377 - - - 74 - 82 - 148 - - - - - - - - - compilation_time - 11249 - - - id - 1607 - - - num - 2 - - - kind - 17 - - - seconds - 6580 - - - - - id - num - - - 12 - - - 1 - 2 - 1607 - - - - - - - id - kind - - - 12 - - - 7 - 8 - 1607 - - - - - - - id - seconds - - - 12 - - - 6 - 7 - 12 - - - 7 - 8 - 1594 - - - - - - - num - id - - - 12 - - - 641 - 642 - 2 - - - - - - - num - kind - - - 12 - - - 7 - 8 - 2 - - - - - - - num - seconds - - - 12 - - - 2625 - 2626 - 2 - - - - - - - kind - id - - - 12 - - - 641 - 642 - 17 - - - - - - - kind - num - - - 12 - - - 1 - 2 - 17 - - - - - - - kind - seconds - - - 12 - - - 280 - 281 - 2 - - - 290 - 291 - 2 - - - 372 - 373 - 2 - - - 382 - 383 - 2 - - - 639 - 640 - 5 - - - 640 - 641 - 2 - - - - - - - seconds - id - - - 12 - - - 1 - 2 - 5545 - - - 2 - 6 - 589 - - - 6 - 17 - 446 - - - - - - - seconds - num - - - 12 - - - 1 - 2 - 6580 - - - - - - - seconds - kind - - - 12 - - - 1 - 2 - 5648 - - - 2 - 3 - 468 - - - 3 - 5 - 463 - - - - - - - - - diagnostic_for - 138224 - - - diagnostic - 138224 - - - compilation - 1335 - - - file_number - 6 - - - file_number_diagnostic_number - 31165 - - - - - diagnostic - compilation - - - 12 - - - 1 - 2 - 138224 - - - - - - - diagnostic - file_number - - - 12 - - - 1 - 2 - 138224 - - - - - - - diagnostic - file_number_diagnostic_number - - - 12 - - - 1 - 2 - 138224 - - - - - - - compilation - diagnostic - - - 12 - - - 2 - 4 - 40 - - - 4 - 5 - 593 - - - 5 - 7 - 121 - - - 7 - 23 - 114 - - - 24 - 48 - 101 - - - 50 - 88 - 101 - - - 99 - 184 - 101 - - - 222 - 303 - 101 - - - 327 - 4622 - 60 - - - - - - - compilation - file_number - - - 12 - - - 1 - 2 - 1335 - - - - - - - compilation - file_number_diagnostic_number - - - 12 - - - 2 - 4 - 40 - - - 4 - 5 - 593 - - - 5 - 7 - 121 - - - 7 - 23 - 114 - - - 24 - 48 - 101 - - - 50 - 88 - 101 - - - 99 - 184 - 101 - - - 222 - 303 - 101 - - - 327 - 4622 - 60 - - - - - - - file_number - diagnostic - - - 12 - - - 20495 - 20496 - 6 - - - - - - - file_number - compilation - - - 12 - - - 198 - 199 - 6 - - - - - - - file_number - file_number_diagnostic_number - - - 12 - - - 4621 - 4622 - 6 - - - - - - - file_number_diagnostic_number - diagnostic - - - 12 - - - 1 - 2 - 12753 - - - 2 - 3 - 8875 - - - 3 - 4 - 1315 - - - 4 - 5 - 4060 - - - 5 - 15 - 2380 - - - 15 - 199 - 1780 - - - - - - - file_number_diagnostic_number - compilation - - - 12 - - - 1 - 2 - 12753 - - - 2 - 3 - 8875 - - - 3 - 4 - 1315 - - - 4 - 5 - 4060 - - - 5 - 15 - 2380 - - - 15 - 199 - 1780 - - - - - - - file_number_diagnostic_number - file_number - - - 12 - - - 1 - 2 - 31165 - - - - - - - - - diagnostics - 138224 - - - id - 138224 - - - severity - 6 - - - error_tag - 13 - - - error_message - 13 - - - full_error_message - 26 - - - location - 138224 - - - - - id - severity - - - 12 - - - 1 - 2 - 138224 - - - - - - - id - error_tag - - - 12 - - - 1 - 2 - 138224 - - - - - - - id - error_message - - - 12 - - - 1 - 2 - 138224 - - - - - - - id - full_error_message - - - 12 - - - 1 - 2 - 138224 - - - - - - - id - location - - - 12 - - - 1 - 2 - 138224 - - - - - - - severity - id - - - 12 - - - 20495 - 20496 - 6 - - - - - - - severity - error_tag - - - 12 - - - 2 - 3 - 6 - - - - - - - severity - error_message - - - 12 - - - 2 - 3 - 6 - - - - - - - severity - full_error_message - - - 12 - - - 4 - 5 - 6 - - - - - - - severity - location - - - 12 - - - 20495 - 20496 - 6 - - - - - - - error_tag - id - - - 12 - - - 17 - 18 - 6 - - - 20478 - 20479 - 6 - - - - - - - error_tag - severity - - - 12 - - - 1 - 2 - 13 - - - - - - - error_tag - error_message - - - 12 - - - 1 - 2 - 13 - - - - - - - error_tag - full_error_message - - - 12 - - - 1 - 2 - 6 - - - 3 - 4 - 6 - - - - - - - error_tag - location - - - 12 - - - 17 - 18 - 6 - - - 20478 - 20479 - 6 - - - - - - - error_message - id - - - 12 - - - 17 - 18 - 6 - - - 20478 - 20479 - 6 - - - - - - - error_message - severity - - - 12 - - - 1 - 2 - 13 - - - - - - - error_message - error_tag - - - 12 - - - 1 - 2 - 13 - - - - - - - error_message - full_error_message - - - 12 - - - 1 - 2 - 6 - - - 3 - 4 - 6 - - - - - - - error_message - location - - - 12 - - - 17 - 18 - 6 - - - 20478 - 20479 - 6 - - - - - - - full_error_message - id - - - 12 - - - 2 - 3 - 6 - - - 5 - 6 - 6 - - - 10 - 11 - 6 - - - 20478 - 20479 - 6 - - - - - - - full_error_message - severity - - - 12 - - - 1 - 2 - 26 - - - - - - - full_error_message - error_tag - - - 12 - - - 1 - 2 - 26 - - - - - - - full_error_message - error_message - - - 12 - - - 1 - 2 - 26 - - - - - - - full_error_message - location - - - 12 - - - 2 - 3 - 6 - - - 5 - 6 - 6 - - - 10 - 11 - 6 - - - 20478 - 20479 - 6 - - - - - - - location - id - - - 12 - - - 1 - 2 - 138224 - - - - - - - location - severity - - - 12 - - - 1 - 2 - 138224 - - - - - - - location - error_tag - - - 12 - - - 1 - 2 - 138224 - - - - - - - location - error_message - - - 12 - - - 1 - 2 - 138224 - - - - - - - location - full_error_message - - - 12 - - - 1 - 2 - 138224 - - - - - - - - - extractor_messages - 11378 - - - id - 11378 - - - severity - 2 - - - origin - 1 - - - text - 62 - - - entity - 4649 - - - location - 7633 - - - stack_trace - 282 - - - - - id - severity - - - 12 - - - 1 - 2 - 11378 - - - - - - - id - origin - - - 12 - - - 1 - 2 - 11378 - - - - - - - id - text - - - 12 - - - 1 - 2 - 11378 - - - - - - - id - entity - - - 12 - - - 1 - 2 - 11378 - - - - - - - id - location - - - 12 - - - 1 - 2 - 11378 - - - - - - - id - stack_trace - - - 12 - - - 1 - 2 - 11378 - - - - - - - severity - id - - - 12 - - - 171 - 172 - 1 - - - 11207 - 11208 - 1 - - - - - - - severity - origin - - - 12 - - - 1 - 2 - 2 - - - - - - - severity - text - - - 12 - - - 2 - 3 - 1 - - - 60 - 61 - 1 - - - - - - - severity - entity - - - 12 - - - 13 - 14 - 1 - - - 4637 - 4638 - 1 - - - - - - - severity - location - - - 12 - - - 145 - 146 - 1 - - - 7488 - 7489 - 1 - - - - - - - severity - stack_trace - - - 12 - - - 1 - 2 - 1 - - - 281 - 282 - 1 - - - - - - - origin - id - - - 12 - - - 11378 - 11379 - 1 - - - - - - - origin - severity - - - 12 - - - 2 - 3 - 1 - - - - - - - origin - text - - - 12 - - - 62 - 63 - 1 - - - - - - - origin - entity - - - 12 - - - 4649 - 4650 - 1 - - - - - - - origin - location - - - 12 - - - 7633 - 7634 - 1 - - - - - - - origin - stack_trace - - - 12 - - - 282 - 283 - 1 - - - - - - - text - id - - - 12 - - - 1 - 2 - 5 - - - 2 - 3 - 50 - - - 62 - 1999 - 5 - - - 2443 - 4657 - 2 - - - - - - - text - severity - - - 12 - - - 1 - 2 - 62 - - - - - - - text - origin - - - 12 - - - 1 - 2 - 62 - - - - - - - text - entity - - - 12 - - - 1 - 2 - 56 - - - 12 - 1398 - 5 - - - 1631 - 1632 - 1 - - - - - - - text - location - - - 12 - - - 1 - 2 - 55 - - - 36 - 1894 - 5 - - - 2045 - 3033 - 2 - - - - - - - text - stack_trace - - - 12 - - - 1 - 2 - 57 - - - 3 - 193 - 5 - - - - - - - entity - id - - - 12 - - - 1 - 2 - 3385 - - - 2 - 3 - 260 - - - 3 - 4 - 369 - - - 4 - 6 - 91 - - - 6 - 7 - 384 - - - 7 - 214 - 160 - - - - - - - entity - severity - - - 12 - - - 1 - 2 - 4648 - - - 2 - 3 - 1 - - - - - - - entity - origin - - - 12 - - - 1 - 2 - 4649 - - - - - - - entity - text - - - 12 - - - 1 - 2 - 4642 - - - 2 - 56 - 7 - - - - - - - entity - location - - - 12 - - - 1 - 2 - 3986 - - - 2 - 4 - 423 - - - 4 - 164 - 240 - - - - - - - entity - stack_trace - - - 12 - - - 1 - 2 - 4028 - - - 2 - 3 - 518 - - - 3 - 12 - 103 - - - - - - - location - id - - - 12 - - - 1 - 2 - 6201 - - - 2 - 3 - 64 - - - 3 - 4 - 1053 - - - 6 - 7 - 315 - - - - - - - location - severity - - - 12 - - - 1 - 2 - 7633 - - - - - - - location - origin - - - 12 - - - 1 - 2 - 7633 - - - - - - - location - text - - - 12 - - - 1 - 2 - 7633 - - - - - - - location - entity - - - 12 - - - 1 - 2 - 7633 - - - - - - - location - stack_trace - - - 12 - - - 1 - 2 - 7254 - - - 2 - 4 - 379 - - - - - - - stack_trace - id - - - 12 - - - 1 - 2 - 79 - - - 2 - 3 - 44 - - - 3 - 4 - 24 - - - 4 - 6 - 26 - - - 6 - 9 - 23 - - - 9 - 16 - 22 - - - 16 - 34 - 24 - - - 35 - 80 - 22 - - - 85 - 2137 - 18 - - - - - - - stack_trace - severity - - - 12 - - - 1 - 2 - 282 - - - - - - - stack_trace - origin - - - 12 - - - 1 - 2 - 282 - - - - - - - stack_trace - text - - - 12 - - - 1 - 2 - 279 - - - 2 - 37 - 3 - - - - - - - stack_trace - entity - - - 12 - - - 1 - 2 - 95 - - - 2 - 3 - 47 - - - 3 - 4 - 28 - - - 4 - 5 - 15 - - - 5 - 7 - 26 - - - 7 - 17 - 24 - - - 18 - 37 - 24 - - - 37 - 609 - 22 - - - 809 - 810 - 1 - - - - - - - stack_trace - location - - - 12 - - - 1 - 2 - 85 - - - 2 - 3 - 47 - - - 3 - 4 - 23 - - - 4 - 5 - 16 - - - 5 - 7 - 26 - - - 7 - 14 - 22 - - - 14 - 30 - 23 - - - 31 - 62 - 22 - - - 63 - 1135 - 18 - - - - - - - - - compilation_finished - 1607 - - - id - 1607 - - - cpu_seconds - 1110 - - - elapsed_seconds - 1607 - - - - - id - cpu_seconds - - - 12 - - - 1 - 2 - 1607 - - - - - - - id - elapsed_seconds - - - 12 - - - 1 - 2 - 1607 - - - - - - - cpu_seconds - id - - - 12 - - - 1 - 2 - 772 - - - 2 - 3 - 220 - - - 3 - 4 - 87 - - - 4 - 7 - 30 - - - - - - - cpu_seconds - elapsed_seconds - - - 12 - - - 1 - 2 - 772 - - - 2 - 3 - 220 - - - 3 - 4 - 87 - - - 4 - 7 - 30 - - - - - - - elapsed_seconds - id - - - 12 - - - 1 - 2 - 1607 - - - - - - - elapsed_seconds - cpu_seconds - - - 12 - - - 1 - 2 - 1607 - - - - - - - - - compilation_assembly - 1607 - - - id - 1607 - - - assembly - 1607 - - - - - id - assembly - - - 12 - - - 1 - 2 - 1607 - - - - - - - assembly - id - - - 12 - - - 1 - 2 - 1607 - - - - - - - - - externalData - 0 - - - id - 0 - - - path - 0 - - - column - 0 - - - value - 0 - - - - - id - path - - - 12 - - - - - - id - column - - - 12 - - - - - - id - value - - - 12 - - - - - - path - id - - - 12 - - - - - - path - column - - - 12 - - - - - - path - value - - - 12 - - - - - - column - id - - - 12 - - - - - - column - path - - - 12 - - - - - - column - value - - - 12 - - - - - - value - id - - - 12 - - - - - - value - path - - - 12 - - - - - - value - column - - - 12 - - - - - - - - sourceLocationPrefix - 60 - - - prefix - 60 - - - - - - locations_default - 154005847 - - - id - 154005847 - - - file - 85462 - - - beginLine - 373077 - - - beginColumn - 11198 - - - endLine - 387748 - - - endColumn - 15839 - - - - - id - file - - - 12 - - - 1 - 2 - 154005847 - - - - - - - id - beginLine - - - 12 - - - 1 - 2 - 154005847 - - - - - - - id - beginColumn - - - 12 - - - 1 - 2 - 154005847 - - - - - - - id - endLine - - - 12 - - - 1 - 2 - 154005847 - - - - - - - id - endColumn - - - 12 - - - 1 - 2 - 154005847 - - - - - - - file - id - - - 12 - - - 1 - 14 - 6553 - - - 14 - 29 - 6445 - - - 29 - 56 - 6478 - - - 56 - 99 - 6540 - - - 99 - 147 - 6550 - - - 147 - 247 - 6418 - - - 247 - 383 - 6433 - - - 383 - 562 - 6478 - - - 562 - 887 - 6410 - - - 887 - 1560 - 6701 - - - 1561 - 2241 - 6658 - - - 2243 - 4570 - 6623 - - - 4570 - 25909 - 6420 - - - 26296 - 267080 - 749 - - - - - - - file - beginLine - - - 12 - - - 1 - 9 - 7099 - - - 9 - 17 - 6999 - - - 17 - 27 - 6801 - - - 27 - 44 - 6663 - - - 44 - 65 - 6428 - - - 65 - 101 - 6455 - - - 101 - 151 - 6999 - - - 151 - 229 - 6508 - - - 229 - 401 - 6538 - - - 401 - 674 - 6415 - - - 674 - 1032 - 7047 - - - 1032 - 2141 - 6425 - - - 2149 - 121882 - 5079 - - - - - - - file - beginColumn - - - 12 - - - 1 - 6 - 5974 - - - 6 - 10 - 6906 - - - 10 - 18 - 6701 - - - 18 - 27 - 7578 - - - 27 - 38 - 6846 - - - 38 - 51 - 6628 - - - 51 - 64 - 6513 - - - 64 - 82 - 6698 - - - 82 - 106 - 6651 - - - 106 - 126 - 7543 - - - 126 - 167 - 6435 - - - 167 - 229 - 6500 - - - 229 - 2578 - 4482 - - - - - - - file - endLine - - - 12 - - - 1 - 9 - 6954 - - - 9 - 18 - 6596 - - - 18 - 27 - 6703 - - - 27 - 43 - 6606 - - - 43 - 72 - 6523 - - - 72 - 112 - 6530 - - - 112 - 190 - 7237 - - - 190 - 285 - 6901 - - - 285 - 484 - 6593 - - - 484 - 841 - 6410 - - - 841 - 1381 - 7237 - - - 1381 - 2762 - 6433 - - - 2765 - 135652 - 4733 - - - - - - - file - endColumn - - - 12 - - - 1 - 12 - 7044 - - - 12 - 23 - 6831 - - - 23 - 37 - 6616 - - - 37 - 51 - 6490 - - - 51 - 66 - 6533 - - - 66 - 86 - 6726 - - - 86 - 107 - 6555 - - - 107 - 131 - 6633 - - - 131 - 153 - 6839 - - - 153 - 183 - 7049 - - - 183 - 226 - 7117 - - - 226 - 304 - 6423 - - - 304 - 4355 - 4600 - - - - - - - beginLine - id - - - 12 - - - 1 - 2 - 5856 - - - 2 - 3 - 30300 - - - 3 - 6 - 29573 - - - 6 - 7 - 18313 - - - 7 - 9 - 33659 - - - 9 - 11 - 28219 - - - 11 - 15 - 28334 - - - 15 - 21 - 29580 - - - 21 - 29 - 28557 - - - 29 - 47 - 28698 - - - 47 - 84 - 28141 - - - 84 - 146 - 28164 - - - 146 - 946 - 27991 - - - 946 - 61765 - 27687 - - - - - - - beginLine - file - - - 12 - - - 1 - 2 - 39445 - - - 2 - 3 - 14322 - - - 3 - 4 - 51905 - - - 4 - 5 - 40202 - - - 5 - 6 - 18775 - - - 6 - 7 - 17654 - - - 7 - 8 - 20018 - - - 8 - 11 - 32034 - - - 11 - 20 - 29196 - - - 20 - 35 - 29470 - - - 35 - 59 - 28076 - - - 59 - 366 - 28026 - - - 366 - 32788 - 23947 - - - - - - - beginLine - beginColumn - - - 12 - - - 1 - 2 - 22673 - - - 2 - 3 - 54618 - - - 3 - 4 - 40508 - - - 4 - 5 - 27918 - - - 5 - 7 - 32207 - - - 7 - 9 - 24087 - - - 9 - 12 - 28181 - - - 12 - 17 - 31495 - - - 17 - 26 - 29131 - - - 26 - 43 - 28891 - - - 43 - 89 - 28349 - - - 89 - 2349 - 25012 - - - - - - - beginLine - endLine - - - 12 - - - 1 - 2 - 58511 - - - 2 - 3 - 97596 - - - 3 - 4 - 60735 - - - 4 - 5 - 32338 - - - 5 - 6 - 21886 - - - 6 - 8 - 33205 - - - 8 - 11 - 30317 - - - 11 - 16 - 28219 - - - 16 - 1412 - 10266 - - - - - - - beginLine - endColumn - - - 12 - - - 1 - 2 - 6653 - - - 2 - 3 - 38525 - - - 3 - 4 - 21545 - - - 4 - 5 - 20663 - - - 5 - 6 - 27168 - - - 6 - 8 - 31892 - - - 8 - 11 - 29788 - - - 11 - 15 - 28344 - - - 15 - 22 - 31310 - - - 22 - 33 - 28339 - - - 33 - 53 - 28033 - - - 53 - 80 - 28698 - - - 80 - 146 - 28269 - - - 146 - 4143 - 23844 - - - - - - - beginColumn - id - - - 12 - - - 1 - 2 - 3928 - - - 2 - 3 - 857 - - - 3 - 4 - 1985 - - - 4 - 31 - 900 - - - 31 - 72 - 847 - - - 72 - 223 - 842 - - - 223 - 1906 - 842 - - - 1936 - 129644 - 842 - - - 130043 - 9382473 - 152 - - - - - - - beginColumn - file - - - 12 - - - 1 - 2 - 6495 - - - 2 - 17 - 935 - - - 17 - 45 - 847 - - - 45 - 113 - 842 - - - 113 - 403 - 842 - - - 404 - 6301 - 842 - - - 6367 - 33866 - 393 - - - - - - - beginColumn - beginLine - - - 12 - - - 1 - 2 - 6438 - - - 2 - 4 - 900 - - - 4 - 9 - 905 - - - 9 - 28 - 842 - - - 28 - 189 - 842 - - - 190 - 4498 - 842 - - - 4502 - 139673 - 428 - - - - - - - beginColumn - endLine - - - 12 - - - 1 - 2 - 6438 - - - 2 - 4 - 900 - - - 4 - 9 - 905 - - - 9 - 29 - 847 - - - 29 - 198 - 844 - - - 200 - 4659 - 842 - - - 4677 - 139725 - 421 - - - - - - - beginColumn - endColumn - - - 12 - - - 1 - 2 - 4387 - - - 2 - 3 - 1118 - - - 3 - 4 - 2203 - - - 4 - 9 - 962 - - - 9 - 25 - 859 - - - 25 - 97 - 842 - - - 97 - 1240 - 824 - - - - - - - endLine - id - - - 12 - - - 1 - 2 - 26328 - - - 2 - 4 - 28657 - - - 4 - 6 - 29379 - - - 6 - 7 - 14573 - - - 7 - 8 - 21560 - - - 8 - 10 - 32501 - - - 10 - 14 - 31969 - - - 14 - 20 - 29585 - - - 20 - 28 - 29495 - - - 28 - 45 - 29417 - - - 45 - 83 - 29720 - - - 83 - 147 - 29114 - - - 147 - 987 - 29099 - - - 987 - 60323 - 26343 - - - - - - - endLine - file - - - 12 - - - 1 - 2 - 44630 - - - 2 - 3 - 2587 - - - 3 - 4 - 39390 - - - 4 - 5 - 56857 - - - 5 - 7 - 31373 - - - 7 - 8 - 17253 - - - 8 - 9 - 23844 - - - 9 - 13 - 31914 - - - 13 - 26 - 29833 - - - 26 - 45 - 29708 - - - 45 - 78 - 29101 - - - 78 - 500 - 29121 - - - 500 - 32902 - 22132 - - - - - - - endLine - beginLine - - - 12 - - - 1 - 2 - 86407 - - - 2 - 3 - 84928 - - - 3 - 4 - 60986 - - - 4 - 5 - 31814 - - - 5 - 6 - 21342 - - - 6 - 8 - 33285 - - - 8 - 11 - 30377 - - - 11 - 17 - 30786 - - - 17 - 72 - 7819 - - - - - - - endLine - beginColumn - - - 12 - - - 1 - 2 - 31277 - - - 2 - 3 - 44216 - - - 3 - 4 - 46029 - - - 4 - 5 - 28271 - - - 5 - 7 - 35898 - - - 7 - 9 - 25599 - - - 9 - 12 - 30415 - - - 12 - 17 - 33566 - - - 17 - 26 - 29861 - - - 26 - 44 - 30192 - - - 44 - 93 - 29084 - - - 93 - 2350 - 23335 - - - - - - - endLine - endColumn - - - 12 - - - 1 - 2 - 33539 - - - 2 - 3 - 26050 - - - 3 - 4 - 10908 - - - 4 - 5 - 37242 - - - 5 - 6 - 21219 - - - 6 - 8 - 34328 - - - 8 - 11 - 28309 - - - 11 - 16 - 33376 - - - 16 - 24 - 31979 - - - 24 - 38 - 30365 - - - 38 - 62 - 29806 - - - 62 - 102 - 29252 - - - 102 - 183 - 29156 - - - 183 - 4143 - 12214 - - - - - - - endColumn - id - - - 12 - - - 1 - 2 - 10476 - - - 2 - 17 - 1215 - - - 17 - 70 - 1190 - - - 70 - 387 - 1188 - - - 389 - 21752 - 1188 - - - 21853 - 3512891 - 579 - - - - - - - endColumn - file - - - 12 - - - 1 - 2 - 10662 - - - 2 - 18 - 1233 - - - 18 - 72 - 1190 - - - 73 - 337 - 1190 - - - 337 - 11711 - 1190 - - - 11721 - 28029 - 371 - - - - - - - endColumn - beginLine - - - 12 - - - 1 - 2 - 10644 - - - 2 - 6 - 1366 - - - 6 - 20 - 1223 - - - 20 - 227 - 1188 - - - 227 - 25452 - 1188 - - - 25707 - 121783 - 228 - - - - - - - endColumn - beginColumn - - - 12 - - - 1 - 2 - 11171 - - - 2 - 6 - 1413 - - - 6 - 19 - 1238 - - - 19 - 123 - 1193 - - - 123 - 429 - 822 - - - - - - - endColumn - endLine - - - 12 - - - 1 - 2 - 10634 - - - 2 - 6 - 1371 - - - 6 - 19 - 1188 - - - 19 - 203 - 1190 - - - 205 - 22718 - 1188 - - - 22852 - 121781 - 265 - - - - - - - - - locations_mapped - 997878 - - - id - 997878 - - - mapped_to - 757768 - - - - - id - mapped_to - - - 12 - - - 1 - 2 - 997878 - - - - - - - mapped_to - id - - - 12 - - - 1 - 2 - 683587 - - - 2 - 4 - 58533 - - - 4 - 141 - 15646 - - - - - - - - - numlines - 67406913 - - - element_id - 67406743 - - - num_lines - 8225 - - - num_code - 8127 - - - num_comment - 641 - - - - - element_id - num_lines - - - 12 - - - 1 - 2 - 67406610 - - - 2 - 11 - 132 - - - - - - - element_id - num_code - - - 12 - - - 1 - 2 - 67406612 - - - 2 - 11 - 130 - - - - - - - element_id - num_comment - - - 12 - - - 1 - 2 - 67406730 - - - 2 - 3 - 12 - - - - - - - num_lines - element_id - - - 12 - - - 1 - 2 - 2705 - - - 2 - 3 - 1045 - - - 3 - 4 - 406 - - - 4 - 6 - 561 - - - 6 - 9 - 671 - - - 9 - 12 - 711 - - - 12 - 18 - 641 - - - 18 - 41 - 626 - - - 41 - 304 - 619 - - - 310 - 17523363 - 235 - - - - - - - num_lines - num_code - - - 12 - - - 1 - 2 - 6127 - - - 2 - 3 - 704 - - - 3 - 7 - 679 - - - 7 - 35 - 621 - - - 35 - 43 - 92 - - - - - - - num_lines - num_comment - - - 12 - - - 1 - 2 - 6119 - - - 2 - 3 - 722 - - - 3 - 7 - 701 - - - 7 - 30 - 636 - - - 30 - 107 - 45 - - - - - - - num_code - element_id - - - 12 - - - 1 - 2 - 2637 - - - 2 - 3 - 1035 - - - 3 - 4 - 426 - - - 4 - 6 - 576 - - - 6 - 9 - 636 - - - 9 - 12 - 709 - - - 12 - 18 - 654 - - - 18 - 41 - 621 - - - 41 - 324 - 611 - - - 324 - 17558507 - 218 - - - - - - - num_code - num_lines - - - 12 - - - 1 - 2 - 6317 - - - 2 - 3 - 596 - - - 3 - 8 - 629 - - - 8 - 111 - 584 - - - - - - - num_code - num_comment - - - 12 - - - 1 - 2 - 6307 - - - 2 - 3 - 624 - - - 3 - 7 - 611 - - - 7 - 107 - 584 - - - - - - - num_comment - element_id - - - 12 - - - 1 - 2 - 228 - - - 2 - 3 - 77 - - - 3 - 4 - 45 - - - 4 - 8 - 50 - - - 8 - 16 - 50 - - - 16 - 27 - 50 - - - 27 - 64 - 50 - - - 64 - 257 - 50 - - - 305 - 26794617 - 40 - - - - - - - num_comment - num_lines - - - 12 - - - 1 - 2 - 228 - - - 2 - 3 - 80 - - - 3 - 4 - 45 - - - 4 - 8 - 55 - - - 8 - 15 - 50 - - - 15 - 24 - 50 - - - 25 - 54 - 50 - - - 55 - 123 - 50 - - - 136 - 3069 - 32 - - - - - - - num_comment - num_code - - - 12 - - - 1 - 2 - 228 - - - 2 - 3 - 80 - - - 3 - 4 - 45 - - - 4 - 8 - 55 - - - 8 - 15 - 50 - - - 15 - 24 - 50 - - - 24 - 50 - 50 - - - 51 - 114 - 50 - - - 129 - 3063 - 32 - - - - - - - - - assemblies - 14527 - - - id - 14527 - - - file - 14527 - - - fullname - 14107 - - - name - 13867 - - - version - 1680 - - - - - id - file - - - 12 - - - 1 - 2 - 14527 - - - - - - - id - fullname - - - 12 - - - 1 - 2 - 14527 - - - - - - - id - name - - - 12 - - - 1 - 2 - 14527 - - - - - - - id - version - - - 12 - - - 1 - 2 - 14527 - - - - - - - file - id - - - 12 - - - 1 - 2 - 14527 - - - - - - - file - fullname - - - 12 - - - 1 - 2 - 14527 - - - - - - - file - name - - - 12 - - - 1 - 2 - 14527 - - - - - - - file - version - - - 12 - - - 1 - 2 - 14527 - - - - - - - fullname - id - - - 12 - - - 1 - 2 - 13687 - - - 2 - 3 - 420 - - - - - - - fullname - file - - - 12 - - - 1 - 2 - 13687 - - - 2 - 3 - 420 - - - - - - - fullname - name - - - 12 - - - 1 - 2 - 14107 - - - - - - - fullname - version - - - 12 - - - 1 - 2 - 14107 - - - - - - - name - id - - - 12 - - - 1 - 2 - 13267 - - - 2 - 4 - 600 - - - - - - - name - file - - - 12 - - - 1 - 2 - 13267 - - - 2 - 4 - 600 - - - - - - - name - fullname - - - 12 - - - 1 - 2 - 13687 - - - 2 - 4 - 180 - - - - - - - name - version - - - 12 - - - 1 - 2 - 13687 - - - 2 - 4 - 180 - - - - - - - version - id - - - 12 - - - 1 - 2 - 960 - - - 2 - 3 - 120 - - - 3 - 4 - 240 - - - 7 - 8 - 120 - - - 9 - 23 - 120 - - - 32 - 134 - 120 - - - - - - - version - file - - - 12 - - - 1 - 2 - 960 - - - 2 - 3 - 120 - - - 3 - 4 - 240 - - - 7 - 8 - 120 - - - 9 - 23 - 120 - - - 32 - 134 - 120 - - - - - - - version - fullname - - - 12 - - - 1 - 2 - 960 - - - 2 - 3 - 120 - - - 3 - 4 - 240 - - - 7 - 8 - 120 - - - 9 - 23 - 120 - - - 25 - 134 - 120 - - - - - - - version - name - - - 12 - - - 1 - 2 - 960 - - - 2 - 3 - 120 - - - 3 - 4 - 240 - - - 7 - 8 - 120 - - - 9 - 23 - 120 - - - 25 - 134 - 120 - - - - - - - - - files - 92261 - - - id - 92261 - - - name - 92261 - - - - - id - name - - - 12 - - - 1 - 2 - 92261 - - - - - - - name - id - - - 12 - - - 1 - 2 - 92261 - - - - - - - - - folders - 34263 - - - id - 34263 - - - name - 34263 - - - - - id - name - - - 12 - - - 1 - 2 - 34263 - - - - - - - name - id - - - 12 - - - 1 - 2 - 34263 - - - - - - - - - containerparent - 126520 - - - parent - 34263 - - - child - 126520 - - - - - parent - child - - - 12 - - - 1 - 2 - 20883 - - - 2 - 3 - 4735 - - - 3 - 4 - 1724 - - - 4 - 7 - 3108 - - - 7 - 17 - 2599 - - - 17 - 546 - 1210 - - - - - - - child - parent - - - 12 - - - 1 - 2 - 126520 - - - - - - - - - file_extraction_mode - 57602 - - - file - 57602 - - - mode - 6 - - - - - file - mode - - - 12 - - - 1 - 2 - 57602 - - - - - - - mode - file - - - 12 - - - 8541 - 8542 - 6 - - - - - - - - - namespaces - 206514 - - - id - 206514 - - - name - 67590 - - - - - id - name - - - 12 - - - 1 - 2 - 206514 - - - - - - - name - id - - - 12 - - - 1 - 2 - 40636 - - - 2 - 3 - 9485 - - - 3 - 4 - 6748 - - - 4 - 7 - 5267 - - - 7 - 47 - 5082 - - - 47 - 160 - 370 - - - - - - - - - namespace_declarations - 37444 - - - id - 37444 - - - namespace_id - 6649 - - - - - id - namespace_id - - - 12 - - - 1 - 2 - 37444 - - - - - - - namespace_id - id - - - 12 - - - 1 - 2 - 2340 - - - 2 - 3 - 1362 - - - 3 - 4 - 674 - - - 4 - 5 - 465 - - - 5 - 6 - 377 - - - 6 - 9 - 600 - - - 9 - 16 - 526 - - - 16 - 1420 - 303 - - - - - - - - - namespace_declaration_location - 37444 - - - id - 37444 - - - loc - 37444 - - - - - id - loc - - - 12 - - - 1 - 2 - 37444 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 37444 - - - - - - - - - parent_namespace - 8107683 - - - child_id - 8107683 - - - namespace_id - 204930 - - - - - child_id - namespace_id - - - 12 - - - 1 - 2 - 8107683 - - - - - - - namespace_id - child_id - - - 12 - - - 1 - 2 - 43208 - - - 2 - 3 - 28476 - - - 3 - 4 - 19320 - - - 4 - 5 - 13950 - - - 5 - 6 - 11892 - - - 6 - 8 - 17221 - - - 8 - 11 - 16501 - - - 11 - 16 - 15596 - - - 16 - 27 - 15925 - - - 27 - 76 - 15369 - - - 76 - 102770 - 7468 - - - - - - - - - parent_namespace_declaration - 185724 - - - child_id - 184422 - - - namespace_id - 37444 - - - - - child_id - namespace_id - - - 12 - - - 1 - 2 - 184119 - - - 2 - 76 - 303 - - - - - - - namespace_id - child_id - - - 12 - - - 1 - 2 - 25965 - - - 2 - 9 - 2866 - - - 9 - 14 - 2879 - - - 14 - 18 - 3324 - - - 18 - 39 - 2407 - - - - - - - - - using_global - 9371 - - - id - 9371 - - - - - - using_namespace_directives - 286854 - - - id - 286854 - - - namespace_id - 7263 - - - - - id - namespace_id - - - 12 - - - 1 - 2 - 286854 - - - - - - - namespace_id - id - - - 12 - - - 1 - 2 - 2535 - - - 2 - 3 - 910 - - - 3 - 4 - 526 - - - 4 - 6 - 627 - - - 6 - 9 - 593 - - - 9 - 19 - 606 - - - 19 - 39 - 566 - - - 40 - 148 - 546 - - - 149 - 3400 - 350 - - - - - - - - - using_static_directives - 1202 - - - id - 1202 - - - type_id - 134 - - - - - id - type_id - - - 12 - - - 1 - 2 - 1202 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 11 - - - 2 - 3 - 24 - - - 3 - 4 - 24 - - - 4 - 5 - 18 - - - 5 - 7 - 10 - - - 7 - 9 - 11 - - - 9 - 12 - 10 - - - 12 - 16 - 11 - - - 16 - 49 - 11 - - - 56 - 156 - 4 - - - - - - - - - using_directive_location - 286956 - - - id - 286956 - - - loc - 286888 - - - - - id - loc - - - 12 - - - 1 - 2 - 286956 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 286821 - - - 2 - 3 - 67 - - - - - - - - - directive_ifs - 20769 - - - id - 20769 - - - branchTaken - 3 - - - conditionValue - 3 - - - - - id - branchTaken - - - 12 - - - 1 - 2 - 20769 - - - - - - - id - conditionValue - - - 12 - - - 1 - 2 - 20769 - - - - - - - branchTaken - id - - - 12 - - - 5274 - 5275 - 1 - - - 6234 - 6235 - 1 - - - - - - - branchTaken - conditionValue - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 1 - - - - - - - conditionValue - id - - - 12 - - - 5423 - 5424 - 1 - - - 6085 - 6086 - 1 - - - - - - - conditionValue - branchTaken - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 1 - - - - - - - - - directive_elifs - 293 - - - id - 293 - - - branchTaken - 5 - - - conditionValue - 5 - - - parent - 177 - - - index - 17 - - - - - id - branchTaken - - - 12 - - - 1 - 2 - 293 - - - - - - - id - conditionValue - - - 12 - - - 1 - 2 - 293 - - - - - - - id - parent - - - 12 - - - 1 - 2 - 293 - - - - - - - id - index - - - 12 - - - 1 - 2 - 293 - - - - - - - branchTaken - id - - - 12 - - - 21 - 22 - 2 - - - 96 - 97 - 2 - - - - - - - branchTaken - conditionValue - - - 12 - - - 1 - 2 - 5 - - - - - - - branchTaken - parent - - - 12 - - - 18 - 19 - 2 - - - 57 - 58 - 2 - - - - - - - branchTaken - index - - - 12 - - - 3 - 4 - 2 - - - 6 - 7 - 2 - - - - - - - conditionValue - id - - - 12 - - - 21 - 22 - 2 - - - 96 - 97 - 2 - - - - - - - conditionValue - branchTaken - - - 12 - - - 1 - 2 - 5 - - - - - - - conditionValue - parent - - - 12 - - - 18 - 19 - 2 - - - 57 - 58 - 2 - - - - - - - conditionValue - index - - - 12 - - - 3 - 4 - 2 - - - 6 - 7 - 2 - - - - - - - parent - id - - - 12 - - - 1 - 2 - 75 - - - 2 - 3 - 92 - - - 4 - 8 - 10 - - - - - - - parent - branchTaken - - - 12 - - - 1 - 2 - 167 - - - 2 - 3 - 10 - - - - - - - parent - conditionValue - - - 12 - - - 1 - 2 - 167 - - - 2 - 3 - 10 - - - - - - - parent - index - - - 12 - - - 1 - 2 - 75 - - - 2 - 3 - 100 - - - 7 - 8 - 2 - - - - - - - index - id - - - 12 - - - 1 - 2 - 12 - - - 41 - 42 - 2 - - - 71 - 72 - 2 - - - - - - - index - branchTaken - - - 12 - - - 1 - 2 - 12 - - - 2 - 3 - 5 - - - - - - - index - conditionValue - - - 12 - - - 1 - 2 - 12 - - - 2 - 3 - 5 - - - - - - - index - parent - - - 12 - - - 1 - 2 - 12 - - - 41 - 42 - 2 - - - 71 - 72 - 2 - - - - - - - - - directive_elses - 6744 - - - id - 6744 - - - branchTaken - 3 - - - parent - 6746 - - - index - 10 - - - - - id - branchTaken - - - 12 - - - 1 - 2 - 6744 - - - - - - - id - parent - - - 12 - - - 1 - 2 - 6744 - - - - - - - id - index - - - 12 - - - 1 - 2 - 6744 - - - - - - - branchTaken - id - - - 12 - - - 1686 - 1687 - 1 - - - 2051 - 2052 - 1 - - - - - - - branchTaken - parent - - - 12 - - - 1691 - 1692 - 1 - - - 2051 - 2052 - 1 - - - - - - - branchTaken - index - - - 12 - - - 4 - 5 - 1 - - - 5 - 6 - 1 - - - - - - - parent - id - - - 12 - - - 1 - 2 - 6739 - - - 2 - 3 - 7 - - - - - - - parent - branchTaken - - - 12 - - - 1 - 2 - 6739 - - - 2 - 3 - 7 - - - - - - - parent - index - - - 12 - - - 1 - 2 - 6746 - - - - - - - index - id - - - 12 - - - 1 - 2 - 3 - - - 2 - 3 - 1 - - - 3 - 4 - 1 - - - 37 - 38 - 1 - - - 3693 - 3694 - 1 - - - - - - - index - branchTaken - - - 12 - - - 1 - 2 - 5 - - - 2 - 3 - 5 - - - - - - - index - parent - - - 12 - - - 1 - 2 - 3 - - - 2 - 3 - 1 - - - 3 - 4 - 1 - - - 38 - 39 - 1 - - - 3693 - 3694 - 1 - - - - - - - - - directive_endifs - 20338 - - - id - 20338 - - - start - 20769 - - - - - id - start - - - 12 - - - 1 - 2 - 20338 - - - - - - - start - id - - - 12 - - - 1 - 2 - 20769 - - - - - - - - - directive_define_symbols - 40315 - - - id - 40315 - - - name - 887 - - - - - id - name - - - 12 - - - 1 - 2 - 40315 - - - - - - - name - id - - - 12 - - - 1 - 2 - 102 - - - 2 - 3 - 151 - - - 3 - 4 - 45 - - - 4 - 5 - 64 - - - 5 - 7 - 77 - - - 7 - 10 - 66 - - - 10 - 13 - 68 - - - 13 - 21 - 66 - - - 21 - 40 - 66 - - - 40 - 77 - 66 - - - 78 - 174 - 66 - - - 178 - 2403 - 43 - - - - - - - - - directive_regions - 38812 - - - id - 38812 - - - name - 18812 - - - - - id - name - - - 12 - - - 1 - 2 - 38812 - - - - - - - name - id - - - 12 - - - 1 - 2 - 15529 - - - 2 - 3 - 1528 - - - 3 - 14 - 1414 - - - 14 - 111 - 339 - - - - - - - - - directive_endregions - 38812 - - - id - 38812 - - - start - 38812 - - - - - id - start - - - 12 - - - 1 - 2 - 38812 - - - - - - - start - id - - - 12 - - - 1 - 2 - 38812 - - - - - - - - - directive_lines - 539550 - - - id - 539550 - - - kind - 26 - - - - - id - kind - - - 12 - - - 1 - 2 - 539550 - - - - - - - kind - id - - - 12 - - - 8245 - 8246 - 6 - - - 17726 - 17727 - 6 - - - 25971 - 25972 - 6 - - - 28059 - 28060 - 6 - - - - - - - - - directive_line_value - 119549 - - - id - 119549 - - - line - 1706 - - - - - id - line - - - 12 - - - 1 - 2 - 119549 - - - - - - - line - id - - - 12 - - - 1 - 2 - 343 - - - 2 - 3 - 269 - - - 3 - 4 - 121 - - - 4 - 6 - 155 - - - 6 - 9 - 101 - - - 9 - 13 - 141 - - - 13 - 22 - 134 - - - 22 - 38 - 128 - - - 38 - 218 - 134 - - - 219 - 760 - 128 - - - 761 - 1105 - 47 - - - - - - - - - directive_line_file - 175155 - - - id - 175155 - - - file - 9246 - - - - - id - file - - - 12 - - - 1 - 2 - 175155 - - - - - - - file - id - - - 12 - - - 1 - 2 - 1119 - - - 2 - 3 - 1571 - - - 3 - 4 - 1031 - - - 4 - 6 - 809 - - - 6 - 8 - 843 - - - 8 - 11 - 714 - - - 11 - 14 - 775 - - - 14 - 21 - 701 - - - 21 - 36 - 755 - - - 36 - 78 - 694 - - - 78 - 3808 - 229 - - - - - - - - - directive_line_offset - 55606 - - - id - 55606 - - - offset - 60 - - - - - id - offset - - - 12 - - - 1 - 2 - 55606 - - - - - - - offset - id - - - 12 - - - 2 - 3 - 6 - - - 21 - 22 - 6 - - - 36 - 37 - 6 - - - 201 - 202 - 6 - - - 250 - 251 - 6 - - - 456 - 457 - 6 - - - 521 - 522 - 6 - - - 648 - 649 - 6 - - - 6110 - 6111 - 6 - - - - - - - - - directive_line_span - 55606 - - - id - 55606 - - - startLine - 2030 - - - startColumn - 2097 - - - endLine - 2030 - - - endColumn - 2306 - - - - - id - startLine - - - 12 - - - 1 - 2 - 55606 - - - - - - - id - startColumn - - - 12 - - - 1 - 2 - 55606 - - - - - - - id - endLine - - - 12 - - - 1 - 2 - 55606 - - - - - - - id - endColumn - - - 12 - - - 1 - 2 - 55606 - - - - - - - startLine - id - - - 12 - - - 1 - 2 - 519 - - - 2 - 3 - 222 - - - 3 - 5 - 161 - - - 5 - 8 - 175 - - - 8 - 10 - 128 - - - 10 - 15 - 168 - - - 16 - 29 - 161 - - - 30 - 45 - 161 - - - 47 - 93 - 155 - - - 93 - 252 - 155 - - - 262 - 374 - 20 - - - - - - - startLine - startColumn - - - 12 - - - 1 - 2 - 519 - - - 2 - 3 - 229 - - - 3 - 5 - 155 - - - 5 - 7 - 134 - - - 7 - 9 - 128 - - - 9 - 13 - 168 - - - 13 - 23 - 175 - - - 24 - 31 - 161 - - - 32 - 52 - 168 - - - 52 - 81 - 155 - - - 81 - 90 - 33 - - - - - - - startLine - endLine - - - 12 - - - 1 - 2 - 1996 - - - 2 - 3 - 33 - - - - - - - startLine - endColumn - - - 12 - - - 1 - 2 - 519 - - - 2 - 3 - 229 - - - 3 - 5 - 161 - - - 5 - 7 - 114 - - - 7 - 9 - 155 - - - 9 - 14 - 161 - - - 14 - 24 - 161 - - - 24 - 34 - 161 - - - 34 - 58 - 155 - - - 58 - 94 - 161 - - - 94 - 124 - 47 - - - - - - - startColumn - id - - - 12 - - - 1 - 2 - 411 - - - 2 - 3 - 215 - - - 3 - 4 - 121 - - - 4 - 6 - 155 - - - 6 - 8 - 155 - - - 8 - 11 - 134 - - - 11 - 16 - 188 - - - 16 - 27 - 161 - - - 27 - 50 - 168 - - - 50 - 74 - 161 - - - 74 - 142 - 161 - - - 145 - 495 - 60 - - - - - - - startColumn - startLine - - - 12 - - - 1 - 2 - 418 - - - 2 - 3 - 229 - - - 3 - 4 - 128 - - - 4 - 5 - 74 - - - 5 - 6 - 121 - - - 6 - 9 - 182 - - - 9 - 12 - 188 - - - 12 - 19 - 175 - - - 19 - 29 - 168 - - - 29 - 44 - 168 - - - 44 - 58 - 161 - - - 58 - 103 - 80 - - - - - - - startColumn - endLine - - - 12 - - - 1 - 2 - 418 - - - 2 - 3 - 229 - - - 3 - 4 - 128 - - - 4 - 5 - 74 - - - 5 - 6 - 121 - - - 6 - 9 - 182 - - - 9 - 12 - 188 - - - 12 - 19 - 175 - - - 19 - 29 - 168 - - - 29 - 44 - 168 - - - 44 - 58 - 161 - - - 58 - 103 - 80 - - - - - - - startColumn - endColumn - - - 12 - - - 1 - 2 - 458 - - - 2 - 3 - 195 - - - 3 - 4 - 161 - - - 4 - 5 - 148 - - - 5 - 7 - 168 - - - 7 - 9 - 128 - - - 9 - 12 - 182 - - - 12 - 17 - 188 - - - 17 - 27 - 175 - - - 27 - 34 - 161 - - - 35 - 127 - 128 - - - - - - - endLine - id - - - 12 - - - 1 - 2 - 519 - - - 2 - 3 - 222 - - - 3 - 5 - 161 - - - 5 - 8 - 175 - - - 8 - 10 - 128 - - - 10 - 15 - 168 - - - 16 - 29 - 161 - - - 30 - 45 - 161 - - - 47 - 93 - 155 - - - 93 - 251 - 155 - - - 261 - 374 - 20 - - - - - - - endLine - startLine - - - 12 - - - 1 - 2 - 2003 - - - 2 - 4 - 26 - - - - - - - endLine - startColumn - - - 12 - - - 1 - 2 - 519 - - - 2 - 3 - 229 - - - 3 - 5 - 155 - - - 5 - 7 - 134 - - - 7 - 9 - 128 - - - 9 - 13 - 168 - - - 13 - 23 - 175 - - - 24 - 31 - 161 - - - 32 - 52 - 161 - - - 52 - 80 - 155 - - - 80 - 90 - 40 - - - - - - - endLine - endColumn - - - 12 - - - 1 - 2 - 519 - - - 2 - 3 - 229 - - - 3 - 5 - 161 - - - 5 - 7 - 114 - - - 7 - 9 - 155 - - - 9 - 14 - 161 - - - 14 - 24 - 161 - - - 24 - 34 - 161 - - - 34 - 59 - 161 - - - 59 - 94 - 155 - - - 94 - 124 - 47 - - - - - - - endColumn - id - - - 12 - - - 1 - 2 - 438 - - - 2 - 3 - 195 - - - 3 - 4 - 134 - - - 4 - 6 - 161 - - - 6 - 8 - 182 - - - 8 - 13 - 195 - - - 13 - 20 - 188 - - - 20 - 36 - 188 - - - 36 - 51 - 175 - - - 51 - 68 - 175 - - - 68 - 93 - 182 - - - 95 - 183 - 87 - - - - - - - endColumn - startLine - - - 12 - - - 1 - 2 - 465 - - - 2 - 3 - 175 - - - 3 - 4 - 155 - - - 4 - 6 - 209 - - - 6 - 8 - 182 - - - 8 - 12 - 182 - - - 12 - 20 - 209 - - - 20 - 28 - 188 - - - 28 - 39 - 175 - - - 39 - 48 - 175 - - - 48 - 64 - 175 - - - 67 - 69 - 13 - - - - - - - endColumn - startColumn - - - 12 - - - 1 - 2 - 492 - - - 2 - 3 - 222 - - - 3 - 4 - 148 - - - 4 - 5 - 141 - - - 5 - 7 - 202 - - - 7 - 11 - 195 - - - 11 - 15 - 202 - - - 15 - 20 - 195 - - - 20 - 26 - 188 - - - 26 - 29 - 175 - - - 29 - 37 - 141 - - - - - - - endColumn - endLine - - - 12 - - - 1 - 2 - 465 - - - 2 - 3 - 175 - - - 3 - 4 - 155 - - - 4 - 6 - 209 - - - 6 - 8 - 182 - - - 8 - 12 - 182 - - - 12 - 20 - 209 - - - 20 - 28 - 188 - - - 28 - 39 - 175 - - - 39 - 48 - 175 - - - 48 - 64 - 175 - - - 67 - 69 - 13 - - - - - - - - - directive_nullables - 467925 - - - id - 467925 - - - setting - 20 - - - target - 6 - - - - - id - setting - - - 12 - - - 1 - 2 - 467925 - - - - - - - id - target - - - 12 - - - 1 - 2 - 467925 - - - - - - - setting - id - - - 12 - - - 9 - 10 - 6 - - - 34686 - 34687 - 13 - - - - - - - setting - target - - - 12 - - - 1 - 2 - 20 - - - - - - - target - id - - - 12 - - - 69381 - 69382 - 6 - - - - - - - target - setting - - - 12 - - - 3 - 4 - 6 - - - - - - - - - directive_warnings - 23 - - - id - 23 - - - message - 14 - - - - - id - message - - - 12 - - - 1 - 2 - 23 - - - - - - - message - id - - - 12 - - - 1 - 2 - 5 - - - 2 - 3 - 9 - - - - - - - - - directive_errors - 45 - - - id - 45 - - - message - 15 - - - - - id - message - - - 12 - - - 1 - 2 - 45 - - - - - - - message - id - - - 12 - - - 1 - 2 - 7 - - - 2 - 3 - 2 - - - 5 - 6 - 2 - - - 8 - 9 - 2 - - - - - - - - - directive_undefines - 68 - - - id - 68 - - - name - 43 - - - - - id - name - - - 12 - - - 1 - 2 - 68 - - - - - - - name - id - - - 12 - - - 1 - 2 - 30 - - - 2 - 3 - 7 - - - 3 - 4 - 3 - - - 7 - 8 - 1 - - - - - - - - - directive_defines - 83 - - - id - 83 - - - name - 57 - - - - - id - name - - - 12 - - - 1 - 2 - 83 - - - - - - - name - id - - - 12 - - - 1 - 2 - 41 - - - 2 - 3 - 12 - - - 4 - 6 - 3 - - - - - - - - - pragma_checksums - 9570 - - - id - 9570 - - - file - 9570 - - - guid - 6 - - - bytes - 8949 - - - - - id - file - - - 12 - - - 1 - 2 - 9570 - - - - - - - id - guid - - - 12 - - - 1 - 2 - 9570 - - - - - - - id - bytes - - - 12 - - - 1 - 2 - 9570 - - - - - - - file - id - - - 12 - - - 1 - 2 - 9570 - - - - - - - file - guid - - - 12 - - - 1 - 2 - 9570 - - - - - - - file - bytes - - - 12 - - - 1 - 2 - 9570 - - - - - - - guid - id - - - 12 - - - 1419 - 1420 - 6 - - - - - - - guid - file - - - 12 - - - 1419 - 1420 - 6 - - - - - - - guid - bytes - - - 12 - - - 1327 - 1328 - 6 - - - - - - - bytes - id - - - 12 - - - 1 - 2 - 8754 - - - 2 - 21 - 195 - - - - - - - bytes - file - - - 12 - - - 1 - 2 - 8754 - - - 2 - 21 - 195 - - - - - - - bytes - guid - - - 12 - - - 1 - 2 - 8949 - - - - - - - - - pragma_warnings - 57623 - - - id - 57623 - - - kind - 13 - - - - - id - kind - - - 12 - - - 1 - 2 - 57623 - - - - - - - kind - id - - - 12 - - - 4272 - 4273 - 13 - - - - - - - - - pragma_warning_error_codes - 57636 - - - id - 57623 - - - errorCode - 148 - - - index - 13 - - - - - id - errorCode - - - 12 - - - 1 - 2 - 57609 - - - 2 - 3 - 13 - - - - - - - id - index - - - 12 - - - 1 - 2 - 57609 - - - 2 - 3 - 13 - - - - - - - errorCode - id - - - 12 - - - 2 - 3 - 47 - - - 4 - 5 - 33 - - - 6 - 7 - 6 - - - 10 - 11 - 13 - - - 14 - 37 - 13 - - - 84 - 85 - 6 - - - 1338 - 1339 - 13 - - - 2838 - 2839 - 13 - - - - - - - errorCode - index - - - 12 - - - 1 - 2 - 148 - - - - - - - index - id - - - 12 - - - 2 - 3 - 6 - - - 8544 - 8545 - 6 - - - - - - - index - errorCode - - - 12 - - - 1 - 2 - 6 - - - 21 - 22 - 6 - - - - - - - - - preprocessor_directive_location - 1075323 - - - id - 1075323 - - - loc - 1075323 - - - - - id - loc - - - 12 - - - 1 - 2 - 1075323 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 1075323 - - - - - - - - - preprocessor_directive_compilation - 1075323 - - - id - 1075323 - - - compilation - 660 - - - - - id - compilation - - - 12 - - - 1 - 2 - 1075323 - - - - - - - compilation - id - - - 12 - - - 2 - 4 - 47 - - - 4 - 11 - 53 - - - 12 - 72 - 53 - - - 79 - 187 - 53 - - - 199 - 335 - 60 - - - 365 - 465 - 53 - - - 476 - 714 - 53 - - - 761 - 1089 - 53 - - - 1256 - 1553 - 53 - - - 1559 - 2257 - 53 - - - 2312 - 3069 - 53 - - - 3691 - 12998 - 53 - - - 17866 - 27931 - 13 - - - - - - - - - preprocessor_directive_active - 1075323 - - - id - 1075323 - - - active - 13 - - - - - id - active - - - 12 - - - 1 - 2 - 1075323 - - - - - - - active - id - - - 12 - - - 7 - 8 - 6 - - - 159435 - 159436 - 6 - - - - - - - - - types - 9818978 - - - id - 9818978 - - - kind - 617 - - - name - 2815698 - - - - - id - kind - - - 12 - - - 1 - 2 - 9818978 - - - - - - - id - name - - - 12 - - - 1 - 2 - 9818978 - - - - - - - kind - id - - - 12 - - - 1 - 2 - 390 - - - 101 - 250 - 41 - - - 1197 - 2295 - 41 - - - 4645 - 7960 - 41 - - - 34817 - 39988 - 41 - - - 40551 - 135458 - 41 - - - 209946 - 209947 - 20 - - - - - - - kind - name - - - 12 - - - 1 - 2 - 411 - - - 101 - 242 - 41 - - - 1307 - 1615 - 41 - - - 1892 - 2930 - 41 - - - 6876 - 10426 - 41 - - - 13272 - 99339 - 41 - - - - - - - name - id - - - 12 - - - 1 - 2 - 2509722 - - - 2 - 4 - 213901 - - - 4 - 26166 - 92074 - - - - - - - name - kind - - - 12 - - - 1 - 2 - 2793662 - - - 2 - 7 - 22036 - - - - - - - - - typerefs - 4008699 - - - id - 4008699 - - - name - 2703480 - - - - - id - name - - - 12 - - - 1 - 2 - 4008699 - - - - - - - name - id - - - 12 - - - 1 - 2 - 2495813 - - - 2 - 17 - 202811 - - - 17 - 14950 - 4855 - - - - - - - - - typeref_type - 3978165 - - - id - 3978165 - - - typeId - 3978165 - - - - - id - typeId - - - 12 - - - 1 - 2 - 3978165 - - - - - - - typeId - id - - - 12 - - - 1 - 2 - 3978165 - - - - - - - - - array_element_type - 95572 - - - array - 95572 - - - dimension - 61 - - - rank - 61 - - - element - 95263 - - - - - array - dimension - - - 12 - - - 1 - 2 - 95572 - - - - - - - array - rank - - - 12 - - - 1 - 2 - 95572 - - - - - - - array - element - - - 12 - - - 1 - 2 - 95572 - - - - - - - dimension - array - - - 12 - - - 2 - 3 - 20 - - - 66 - 67 - 20 - - - 4577 - 4578 - 20 - - - - - - - dimension - rank - - - 12 - - - 1 - 2 - 41 - - - 3 - 4 - 20 - - - - - - - dimension - element - - - 12 - - - 2 - 3 - 20 - - - 66 - 67 - 20 - - - 4562 - 4563 - 20 - - - - - - - rank - array - - - 12 - - - 4 - 5 - 20 - - - 19 - 20 - 20 - - - 4622 - 4623 - 20 - - - - - - - rank - dimension - - - 12 - - - 1 - 2 - 41 - - - 3 - 4 - 20 - - - - - - - rank - element - - - 12 - - - 4 - 5 - 20 - - - 19 - 20 - 20 - - - 4622 - 4623 - 20 - - - - - - - element - array - - - 12 - - - 1 - 2 - 94996 - - - 2 - 4 - 267 - - - - - - - element - dimension - - - 12 - - - 1 - 2 - 95263 - - - - - - - element - rank - - - 12 - - - 1 - 2 - 94996 - - - 2 - 4 - 267 - - - - - - - - - nullable_underlying_type - 24628 - - - nullable - 24628 - - - underlying - 24628 - - - - - nullable - underlying - - - 12 - - - 1 - 2 - 24628 - - - - - - - underlying - nullable - - - 12 - - - 1 - 2 - 24628 - - - - - - - - - pointer_referent_type - 11632 - - - pointer - 11632 - - - referent - 11632 - - - - - pointer - referent - - - 12 - - - 1 - 2 - 11632 - - - - - - - referent - pointer - - - 12 - - - 1 - 2 - 11632 - - - - - - - - - enum_underlying_type - 163759 - - - enum_id - 163759 - - - underlying_type_id - 164 - - - - - enum_id - underlying_type_id - - - 12 - - - 1 - 2 - 163759 - - - - - - - underlying_type_id - enum_id - - - 12 - - - 8 - 9 - 20 - - - 18 - 19 - 20 - - - 49 - 50 - 20 - - - 105 - 106 - 20 - - - 108 - 109 - 20 - - - 356 - 357 - 20 - - - 413 - 414 - 20 - - - 6902 - 6903 - 20 - - - - - - - - - delegate_return_type - 834351 - - - delegate_id - 834351 - - - return_type_id - 303795 - - - - - delegate_id - return_type_id - - - 12 - - - 1 - 2 - 834351 - - - - - - - return_type_id - delegate_id - - - 12 - - - 1 - 2 - 269763 - - - 2 - 4 - 24464 - - - 4 - 7800 - 9567 - - - - - - - - - function_pointer_return_type - 47919 - - - function_pointer_id - 47919 - - - return_type_id - 10013 - - - - - function_pointer_id - return_type_id - - - 12 - - - 1 - 2 - 47919 - - - - - - - return_type_id - function_pointer_id - - - 12 - - - 1 - 2 - 2933 - - - 2 - 3 - 3236 - - - 3 - 4 - 2326 - - - 4 - 7 - 809 - - - 7 - 569 - 708 - - - - - - - - - extend - 3329732 - - - sub - 3329136 - - - super - 487965 - - - - - sub - super - - - 12 - - - 1 - 2 - 3328539 - - - 2 - 3 - 596 - - - - - - - super - sub - - - 12 - - - 1 - 2 - 330584 - - - 2 - 3 - 75737 - - - 3 - 5 - 43784 - - - 5 - 97 - 36603 - - - 97 - 40552 - 1255 - - - - - - - - - anonymous_types - 6194 - - - id - 6194 - - - - - - implement - 11230469 - - - sub - 3882202 - - - super - 2387833 - - - - - sub - super - - - 12 - - - 1 - 2 - 1315836 - - - 2 - 3 - 1049097 - - - 3 - 4 - 724767 - - - 4 - 6 - 297643 - - - 6 - 9 - 320626 - - - 9 - 31 - 174232 - - - - - - - super - sub - - - 12 - - - 1 - 2 - 1138538 - - - 2 - 3 - 715570 - - - 3 - 5 - 204992 - - - 5 - 6 - 182009 - - - 6 - 109829 - 146722 - - - - - - - - - type_location - 5295009 - - - id - 5063104 - - - loc - 11460 - - - - - id - loc - - - 12 - - - 1 - 2 - 4974816 - - - 2 - 551 - 88288 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 2325 - - - 2 - 12 - 905 - - - 12 - 25 - 864 - - - 25 - 43 - 864 - - - 43 - 77 - 864 - - - 77 - 116 - 884 - - - 116 - 194 - 905 - - - 195 - 315 - 864 - - - 321 - 527 - 864 - - - 528 - 854 - 864 - - - 854 - 3409 - 864 - - - 3696 - 12084 - 390 - - - - - - - - - tuple_underlying_type - 47199 - - - tuple - 47199 - - - struct - 47199 - - - - - tuple - struct - - - 12 - - - 1 - 2 - 47199 - - - - - - - struct - tuple - - - 12 - - - 1 - 2 - 47199 - - - - - - - - - tuple_element - 115839 - - - tuple - 47179 - - - index - 432 - - - field - 115839 - - - - - tuple - index - - - 12 - - - 1 - 2 - 205 - - - 2 - 3 - 38866 - - - 3 - 4 - 4814 - - - 4 - 22 - 3292 - - - - - - - tuple - field - - - 12 - - - 1 - 2 - 205 - - - 2 - 3 - 38866 - - - 3 - 4 - 4814 - - - 4 - 22 - 3292 - - - - - - - index - tuple - - - 12 - - - 2 - 3 - 20 - - - 4 - 5 - 20 - - - 6 - 7 - 20 - - - 8 - 9 - 20 - - - 10 - 11 - 20 - - - 12 - 13 - 20 - - - 14 - 15 - 20 - - - 18 - 19 - 20 - - - 22 - 23 - 20 - - - 26 - 27 - 20 - - - 30 - 31 - 20 - - - 35 - 36 - 20 - - - 43 - 44 - 20 - - - 48 - 49 - 20 - - - 57 - 58 - 20 - - - 69 - 70 - 20 - - - 96 - 97 - 20 - - - 160 - 161 - 20 - - - 394 - 395 - 20 - - - 2283 - 2284 - 20 - - - 2293 - 2294 - 20 - - - - - - - index - field - - - 12 - - - 2 - 3 - 20 - - - 4 - 5 - 20 - - - 6 - 7 - 20 - - - 8 - 9 - 20 - - - 10 - 11 - 20 - - - 12 - 13 - 20 - - - 14 - 15 - 20 - - - 18 - 19 - 20 - - - 22 - 23 - 20 - - - 26 - 27 - 20 - - - 30 - 31 - 20 - - - 35 - 36 - 20 - - - 43 - 44 - 20 - - - 48 - 49 - 20 - - - 57 - 58 - 20 - - - 69 - 70 - 20 - - - 96 - 97 - 20 - - - 160 - 161 - 20 - - - 394 - 395 - 20 - - - 2283 - 2284 - 20 - - - 2293 - 2294 - 20 - - - - - - - field - tuple - - - 12 - - - 1 - 2 - 115839 - - - - - - - field - index - - - 12 - - - 1 - 2 - 115839 - - - - - - - - - attributes - 14223506 - - - id - 14223506 - - - kind - 61 - - - type_id - 14978 - - - target - 12264155 - - - - - id - kind - - - 12 - - - 1 - 2 - 14223506 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 14223506 - - - - - - - id - target - - - 12 - - - 1 - 2 - 14223506 - - - - - - - kind - id - - - 12 - - - 31 - 32 - 20 - - - 16434 - 16435 - 20 - - - 674823 - 674824 - 20 - - - - - - - kind - type_id - - - 12 - - - 9 - 10 - 20 - - - 11 - 12 - 20 - - - 726 - 727 - 20 - - - - - - - kind - target - - - 12 - - - 3 - 4 - 20 - - - 15476 - 15477 - 20 - - - 586278 - 586279 - 20 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 1543 - - - 2 - 3 - 1481 - - - 3 - 4 - 823 - - - 4 - 6 - 1172 - - - 6 - 9 - 1131 - - - 9 - 15 - 1316 - - - 15 - 24 - 1213 - - - 24 - 39 - 1152 - - - 39 - 70 - 1193 - - - 70 - 150 - 1131 - - - 150 - 430 - 1131 - - - 431 - 1781 - 1131 - - - 1807 - 207674 - 555 - - - - - - - type_id - kind - - - 12 - - - 1 - 2 - 14608 - - - 2 - 3 - 370 - - - - - - - type_id - target - - - 12 - - - 1 - 2 - 1728 - - - 2 - 3 - 1481 - - - 3 - 4 - 843 - - - 4 - 6 - 1275 - - - 6 - 9 - 1172 - - - 9 - 15 - 1234 - - - 15 - 24 - 1152 - - - 24 - 40 - 1172 - - - 40 - 70 - 1172 - - - 72 - 153 - 1131 - - - 153 - 442 - 1152 - - - 442 - 2620 - 1131 - - - 2908 - 202968 - 329 - - - - - - - target - id - - - 12 - - - 1 - 2 - 11192302 - - - 2 - 4 - 963421 - - - 4 - 4012 - 108432 - - - - - - - target - kind - - - 12 - - - 1 - 2 - 12146937 - - - 2 - 3 - 117217 - - - - - - - target - type_id - - - 12 - - - 1 - 2 - 11400133 - - - 2 - 29 - 864021 - - - - - - - - - attribute_location - 14224247 - - - id - 14223506 - - - loc - 12098 - - - - - id - loc - - - 12 - - - 1 - 2 - 14222786 - - - 2 - 4 - 720 - - - - - - - loc - id - - - 12 - - - 1 - 10 - 802 - - - 10 - 11 - 1748 - - - 11 - 22 - 925 - - - 22 - 41 - 925 - - - 42 - 74 - 925 - - - 74 - 126 - 925 - - - 126 - 208 - 925 - - - 208 - 325 - 925 - - - 325 - 573 - 925 - - - 593 - 1056 - 925 - - - 1061 - 2081 - 925 - - - 2119 - 11182 - 925 - - - 11260 - 40492 - 288 - - - - - - - - - type_mention - 3322420 - - - id - 3322420 - - - type_id - 93831 - - - parent - 2594238 - - - - - id - type_id - - - 12 - - - 1 - 2 - 3322420 - - - - - - - id - parent - - - 12 - - - 1 - 2 - 3322420 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 17301 - - - 2 - 3 - 18106 - - - 3 - 4 - 10207 - - - 4 - 5 - 7735 - - - 5 - 6 - 4991 - - - 6 - 7 - 6347 - - - 7 - 10 - 7628 - - - 10 - 16 - 7154 - - - 16 - 36 - 7080 - - - 36 - 1547 - 7038 - - - 1553 - 103831 - 240 - - - - - - - type_id - parent - - - 12 - - - 1 - 2 - 29400 - - - 2 - 3 - 15369 - - - 3 - 4 - 7878 - - - 4 - 5 - 6975 - - - 5 - 6 - 4977 - - - 6 - 8 - 7304 - - - 8 - 13 - 7530 - - - 13 - 30 - 7082 - - - 30 - 931 - 7038 - - - 949 - 78000 - 275 - - - - - - - parent - id - - - 12 - - - 1 - 2 - 2213261 - - - 2 - 3 - 271774 - - - 3 - 851 - 109202 - - - - - - - parent - type_id - - - 12 - - - 1 - 2 - 2538267 - - - 2 - 40 - 55971 - - - - - - - - - type_mention_location - 3322420 - - - id - 3322420 - - - loc - 2857079 - - - - - id - loc - - - 12 - - - 1 - 2 - 3322420 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 2673027 - - - 2 - 213 - 184052 - - - - - - - - - type_annotation - 924266 - - - id - 924266 - - - annotation - 61 - - - - - id - annotation - - - 12 - - - 1 - 2 - 924266 - - - - - - - annotation - id - - - 12 - - - 3236 - 3237 - 20 - - - 14983 - 14984 - 20 - - - 26702 - 26703 - 20 - - - - - - - - - nullability - 26089 - - - nullability - 26089 - - - kind - 61 - - - - - nullability - kind - - - 12 - - - 1 - 2 - 26089 - - - - - - - kind - nullability - - - 12 - - - 44 - 45 - 20 - - - 326 - 327 - 20 - - - 898 - 899 - 20 - - - - - - - - - nullability_parent - 83204 - - - nullability - 6183 - - - index - 1020 - - - parent - 24192 - - - - - nullability - index - - - 12 - - - 1 - 2 - 4622 - - - 2 - 3 - 960 - - - 3 - 9 - 480 - - - 17 - 18 - 120 - - - - - - - nullability - parent - - - 12 - - - 1 - 2 - 4022 - - - 2 - 3 - 780 - - - 3 - 5 - 540 - - - 5 - 14 - 480 - - - 19 - 219 - 360 - - - - - - - index - nullability - - - 12 - - - 2 - 3 - 540 - - - 3 - 4 - 240 - - - 5 - 6 - 60 - - - 10 - 11 - 60 - - - 59 - 60 - 60 - - - 70 - 71 - 60 - - - - - - - index - parent - - - 12 - - - 3 - 4 - 60 - - - 6 - 7 - 60 - - - 9 - 10 - 60 - - - 12 - 13 - 60 - - - 15 - 16 - 60 - - - 18 - 19 - 60 - - - 21 - 22 - 60 - - - 24 - 25 - 60 - - - 27 - 28 - 60 - - - 32 - 33 - 60 - - - 44 - 45 - 60 - - - 60 - 61 - 60 - - - 81 - 82 - 60 - - - 119 - 120 - 60 - - - 184 - 185 - 60 - - - 328 - 329 - 60 - - - 403 - 404 - 60 - - - - - - - parent - nullability - - - 12 - - - 1 - 2 - 7143 - - - 2 - 3 - 15488 - - - 3 - 5 - 1560 - - - - - - - parent - index - - - 12 - - - 1 - 2 - 4502 - - - 2 - 3 - 8644 - - - 3 - 4 - 3902 - - - 4 - 5 - 2281 - - - 5 - 7 - 2221 - - - 7 - 14 - 1921 - - - 14 - 18 - 720 - - - - - - - - - type_nullability - 40401386 - - - id - 40393691 - - - nullability - 25739 - - - - - id - nullability - - - 12 - - - 1 - 2 - 40386490 - - - 2 - 5 - 7201 - - - - - - - nullability - id - - - 12 - - - 1 - 2 - 9114 - - - 2 - 3 - 3127 - - - 3 - 4 - 2551 - - - 4 - 5 - 1604 - - - 5 - 6 - 1399 - - - 6 - 9 - 1913 - - - 9 - 14 - 1934 - - - 14 - 41 - 1934 - - - 43 - 1603 - 1934 - - - 2271 - 1725181 - 226 - - - - - - - - - expr_flowstate - 6545248 - - - id - 6545248 - - - state - 4 - - - - - id - state - - - 12 - - - 1 - 2 - 6545248 - - - - - - - state - id - - - 12 - - - 238130 - 238131 - 2 - - - 2566670 - 2566671 - 2 - - - - - - - - - type_parameters - 897781 - - - id - 897781 - - - index - 1800 - - - generic_id - 486441 - - - variance - 180 - - - - - id - index - - - 12 - - - 1 - 2 - 897781 - - - - - - - id - generic_id - - - 12 - - - 1 - 2 - 897781 - - - - - - - id - variance - - - 12 - - - 1 - 2 - 897781 - - - - - - - index - id - - - 12 - - - 1 - 3 - 120 - - - 3 - 5 - 120 - - - 5 - 7 - 120 - - - 7 - 9 - 120 - - - 9 - 14 - 120 - - - 17 - 22 - 120 - - - 27 - 45 - 120 - - - 69 - 98 - 120 - - - 126 - 156 - 120 - - - 184 - 214 - 120 - - - 243 - 276 - 120 - - - 320 - 377 - 120 - - - 429 - 501 - 120 - - - 621 - 913 - 120 - - - 2165 - 8104 - 120 - - - - - - - index - generic_id - - - 12 - - - 1 - 3 - 120 - - - 3 - 5 - 120 - - - 5 - 7 - 120 - - - 7 - 9 - 120 - - - 9 - 14 - 120 - - - 17 - 22 - 120 - - - 27 - 45 - 120 - - - 69 - 98 - 120 - - - 126 - 156 - 120 - - - 184 - 214 - 120 - - - 243 - 276 - 120 - - - 320 - 377 - 120 - - - 429 - 501 - 120 - - - 621 - 913 - 120 - - - 2165 - 8104 - 120 - - - - - - - index - variance - - - 12 - - - 1 - 2 - 780 - - - 2 - 3 - 60 - - - 3 - 4 - 960 - - - - - - - generic_id - id - - - 12 - - - 1 - 2 - 356471 - - - 2 - 3 - 75220 - - - 3 - 9 - 38240 - - - 9 - 31 - 16508 - - - - - - - generic_id - index - - - 12 - - - 1 - 2 - 356471 - - - 2 - 3 - 75220 - - - 3 - 9 - 38240 - - - 9 - 31 - 16508 - - - - - - - generic_id - variance - - - 12 - - - 1 - 2 - 485240 - - - 2 - 3 - 1200 - - - - - - - variance - id - - - 12 - - - 52 - 53 - 60 - - - 289 - 290 - 60 - - - 14614 - 14615 - 60 - - - - - - - variance - index - - - 12 - - - 16 - 17 - 60 - - - 17 - 18 - 60 - - - 30 - 31 - 60 - - - - - - - variance - generic_id - - - 12 - - - 49 - 50 - 60 - - - 50 - 51 - 60 - - - 8024 - 8025 - 60 - - - - - - - - - type_arguments - 6159319 - - - id - 1600702 - - - index - 432 - - - constructed_id - 4581373 - - - - - id - index - - - 12 - - - 1 - 2 - 1361410 - - - 2 - 3 - 218983 - - - 3 - 13 - 20307 - - - - - - - id - constructed_id - - - 12 - - - 1 - 2 - 707031 - - - 2 - 3 - 283075 - - - 3 - 4 - 199375 - - - 4 - 5 - 99481 - - - 5 - 7 - 121826 - - - 7 - 11 - 126476 - - - 11 - 10327 - 63433 - - - - - - - index - id - - - 12 - - - 2 - 3 - 164 - - - 4 - 5 - 20 - - - 9 - 10 - 20 - - - 14 - 15 - 20 - - - 25 - 26 - 20 - - - 44 - 45 - 20 - - - 159 - 160 - 20 - - - 160 - 161 - 20 - - - 205 - 206 - 20 - - - 327 - 328 - 20 - - - 797 - 798 - 20 - - - 3259 - 3260 - 20 - - - 21100 - 21101 - 20 - - - 64692 - 64693 - 20 - - - - - - - index - constructed_id - - - 12 - - - 2 - 3 - 164 - - - 4 - 5 - 20 - - - 9 - 10 - 20 - - - 16 - 17 - 20 - - - 29 - 30 - 20 - - - 65 - 66 - 20 - - - 187 - 188 - 20 - - - 236 - 237 - 20 - - - 311 - 312 - 20 - - - 578 - 579 - 20 - - - 1749 - 1750 - 20 - - - 7001 - 7002 - 20 - - - 66490 - 66491 - 20 - - - 222663 - 222664 - 20 - - - - - - - constructed_id - id - - - 12 - - - 1 - 2 - 3249262 - - - 2 - 3 - 1220181 - - - 3 - 22 - 111930 - - - - - - - constructed_id - index - - - 12 - - - 1 - 2 - 3213317 - - - 2 - 3 - 1224008 - - - 3 - 22 - 144048 - - - - - - - - - constructed_generic - 4581373 - - - constructed - 4581373 - - - generic - 89832 - - - - - constructed - generic - - - 12 - - - 1 - 2 - 4581373 - - - - - - - generic - constructed - - - 12 - - - 1 - 2 - 26130 - - - 2 - 3 - 18723 - - - 3 - 4 - 8888 - - - 4 - 5 - 5596 - - - 5 - 7 - 6563 - - - 7 - 11 - 7036 - - - 11 - 23 - 7160 - - - 23 - 118 - 6769 - - - 126 - 23756 - 2962 - - - - - - - - - type_parameter_constraints - 897781 - - - id - 897781 - - - param_id - 897781 - - - - - id - param_id - - - 12 - - - 1 - 2 - 897781 - - - - - - - param_id - id - - - 12 - - - 1 - 2 - 897781 - - - - - - - - - type_parameter_constraints_location - 0 - - - id - 0 - - - loc - 0 - - - - - id - loc - - - 12 - - - - - - loc - id - - - 12 - - - - - - - - general_type_parameter_constraints - 345670 - - - id - 344368 - - - kind - 17 - - - - - id - kind - - - 12 - - - 1 - 2 - 343067 - - - 2 - 3 - 1301 - - - - - - - kind - id - - - 12 - - - 71 - 72 - 3 - - - 77 - 78 - 3 - - - 684 - 685 - 3 - - - 1350 - 1351 - 3 - - - 93972 - 93973 - 3 - - - - - - - - - specific_type_parameter_constraints - 250875 - - - id - 244702 - - - base_id - 45348 - - - - - id - base_id - - - 12 - - - 1 - 2 - 240114 - - - 2 - 9 - 4588 - - - - - - - base_id - id - - - 12 - - - 1 - 2 - 30533 - - - 2 - 3 - 4012 - - - 3 - 5 - 3806 - - - 5 - 10 - 3806 - - - 10 - 2494 - 3189 - - - - - - - - - specific_type_parameter_nullability - 44237 - - - id - 43990 - - - base_id - 9135 - - - nullability - 205 - - - - - id - base_id - - - 12 - - - 1 - 2 - 43743 - - - 2 - 3 - 246 - - - - - - - id - nullability - - - 12 - - - 1 - 2 - 43990 - - - - - - - base_id - id - - - 12 - - - 1 - 2 - 6234 - - - 2 - 3 - 1172 - - - 3 - 6 - 781 - - - 6 - 24 - 720 - - - 24 - 858 - 226 - - - - - - - base_id - nullability - - - 12 - - - 1 - 2 - 9073 - - - 2 - 3 - 61 - - - - - - - nullability - id - - - 12 - - - 1 - 2 - 61 - - - 3 - 4 - 20 - - - 4 - 5 - 20 - - - 6 - 7 - 20 - - - 16 - 17 - 20 - - - 35 - 36 - 20 - - - 68 - 69 - 20 - - - 2003 - 2004 - 20 - - - - - - - nullability - base_id - - - 12 - - - 1 - 2 - 61 - - - 3 - 4 - 41 - - - 4 - 5 - 20 - - - 8 - 9 - 20 - - - 35 - 36 - 20 - - - 68 - 69 - 20 - - - 323 - 324 - 20 - - - - - - - - - function_pointer_calling_conventions - 47919 - - - id - 47919 - - - kind - 50 - - - - - id - kind - - - 12 - - - 1 - 2 - 47919 - - - - - - - kind - id - - - 12 - - - 3 - 4 - 25 - - - 1892 - 1893 - 25 - - - - - - - - - has_unmanaged_calling_conventions - 0 - - - id - 0 - - - index - 0 - - - conv_id - 0 - - - - - id - index - - - 12 - - - - - - id - conv_id - - - 12 - - - - - - index - id - - - 12 - - - - - - index - conv_id - - - 12 - - - - - - conv_id - id - - - 12 - - - - - - conv_id - index - - - 12 - - - - - - - - modifiers - 1020 - - - id - 1020 - - - name - 1020 - - - - - id - name - - - 12 - - - 1 - 2 - 1020 - - - - - - - name - id - - - 12 - - - 1 - 2 - 1020 - - - - - - - - - has_modifiers - 87000980 - - - id - 57381746 - - - mod_id - 329 - - - - - id - mod_id - - - 12 - - - 1 - 2 - 29262107 - - - 2 - 3 - 26625311 - - - 3 - 5 - 1494327 - - - - - - - mod_id - id - - - 12 - - - 108 - 109 - 20 - - - 229 - 230 - 20 - - - 301 - 302 - 20 - - - 579 - 580 - 20 - - - 2937 - 2938 - 20 - - - 122171 - 122172 - 20 - - - 141164 - 141165 - 20 - - - 146000 - 146001 - 20 - - - 172050 - 172051 - 20 - - - 173508 - 173509 - 20 - - - 187757 - 187758 - 20 - - - 237126 - 237127 - 20 - - - 285248 - 285249 - 20 - - - 391584 - 391585 - 20 - - - 581112 - 581113 - 20 - - - 1786530 - 1786531 - 20 - - - - - - - - - compiler_generated - 479159 - - - id - 479159 - - - - - - exprorstmt_name - 10335 - - - parent_id - 10335 - - - name - 1213 - - - - - parent_id - name - - - 12 - - - 1 - 2 - 10335 - - - - - - - name - parent_id - - - 12 - - - 1 - 2 - 107 - - - 2 - 3 - 280 - - - 3 - 4 - 133 - - - 4 - 5 - 133 - - - 5 - 6 - 86 - - - 6 - 8 - 107 - - - 8 - 9 - 91 - - - 9 - 12 - 60 - - - 12 - 17 - 98 - - - 17 - 43 - 91 - - - 45 - 239 - 25 - - - - - - - - - nested_types - 1913920 - - - id - 1913920 - - - declaring_type_id - 774477 - - - unbound_id - 1613746 - - - - - id - declaring_type_id - - - 12 - - - 1 - 2 - 1913920 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 1913920 - - - - - - - declaring_type_id - id - - - 12 - - - 1 - 2 - 455147 - - - 2 - 3 - 135879 - - - 3 - 4 - 62322 - - - 4 - 6 - 58084 - - - 6 - 22 - 58166 - - - 22 - 391 - 4876 - - - - - - - declaring_type_id - unbound_id - - - 12 - - - 1 - 2 - 456670 - - - 2 - 3 - 136250 - - - 3 - 4 - 61952 - - - 4 - 6 - 58043 - - - 6 - 24 - 58290 - - - 24 - 391 - 3271 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 1556444 - - - 2 - 691 - 57302 - - - - - - - unbound_id - declaring_type_id - - - 12 - - - 1 - 2 - 1565888 - - - 2 - 691 - 47858 - - - - - - - - - properties - 5910563 - - - id - 5910563 - - - name - 1743021 - - - declaring_type_id - 1511302 - - - type_id - 597529 - - - unbound_id - 5336551 - - - - - id - name - - - 12 - - - 1 - 2 - 5910563 - - - - - - - id - declaring_type_id - - - 12 - - - 1 - 2 - 5910563 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 5910563 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 5910563 - - - - - - - name - id - - - 12 - - - 1 - 2 - 1266311 - - - 2 - 3 - 219642 - - - 3 - 6 - 146640 - - - 6 - 9450 - 110428 - - - - - - - name - declaring_type_id - - - 12 - - - 1 - 2 - 1267298 - - - 2 - 3 - 219168 - - - 3 - 6 - 146908 - - - 6 - 5564 - 109646 - - - - - - - name - type_id - - - 12 - - - 1 - 2 - 1585126 - - - 2 - 6 - 137854 - - - 6 - 1544 - 20040 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 1273245 - - - 2 - 3 - 224374 - - - 3 - 6 - 144624 - - - 6 - 8011 - 100778 - - - - - - - declaring_type_id - id - - - 12 - - - 1 - 2 - 549794 - - - 2 - 3 - 348711 - - - 3 - 4 - 196247 - - - 4 - 5 - 130468 - - - 5 - 7 - 125365 - - - 7 - 14 - 113966 - - - 14 - 3362 - 46747 - - - - - - - declaring_type_id - name - - - 12 - - - 1 - 2 - 630059 - - - 2 - 3 - 270298 - - - 3 - 4 - 196659 - - - 4 - 5 - 132628 - - - 5 - 7 - 125201 - - - 7 - 15 - 117361 - - - 15 - 3362 - 39093 - - - - - - - declaring_type_id - type_id - - - 12 - - - 1 - 2 - 636499 - - - 2 - 3 - 426033 - - - 3 - 4 - 180898 - - - 4 - 5 - 100284 - - - 5 - 9 - 124254 - - - 9 - 56 - 43331 - - - - - - - declaring_type_id - unbound_id - - - 12 - - - 1 - 2 - 549794 - - - 2 - 3 - 348711 - - - 3 - 4 - 196247 - - - 4 - 5 - 130468 - - - 5 - 7 - 125365 - - - 7 - 14 - 113966 - - - 14 - 3362 - 46747 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 329617 - - - 2 - 3 - 122711 - - - 3 - 4 - 38805 - - - 4 - 7 - 51541 - - - 7 - 36 - 44957 - - - 36 - 74677 - 9896 - - - - - - - type_id - name - - - 12 - - - 1 - 2 - 477430 - - - 2 - 3 - 66540 - - - 3 - 11 - 44977 - - - 11 - 39359 - 8579 - - - - - - - type_id - declaring_type_id - - - 12 - - - 1 - 2 - 345666 - - - 2 - 3 - 117896 - - - 3 - 4 - 37796 - - - 4 - 7 - 46891 - - - 7 - 66 - 44833 - - - 66 - 22259 - 4444 - - - - - - - type_id - unbound_id - - - 12 - - - 1 - 2 - 331345 - - - 2 - 3 - 125077 - - - 3 - 4 - 38805 - - - 4 - 7 - 50491 - - - 7 - 45 - 44977 - - - 45 - 72507 - 6831 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 5254497 - - - 2 - 1890 - 82054 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 5336551 - - - - - - - unbound_id - declaring_type_id - - - 12 - - - 1 - 2 - 5254497 - - - 2 - 1890 - 82054 - - - - - - - unbound_id - type_id - - - 12 - - - 1 - 2 - 5319391 - - - 2 - 1414 - 17159 - - - - - - - - - property_location - 6046401 - - - id - 5910563 - - - loc - 8579 - - - - - id - loc - - - 12 - - - 1 - 2 - 5818282 - - - 2 - 34 - 92280 - - - - - - - loc - id - - - 12 - - - 1 - 8 - 740 - - - 8 - 15 - 699 - - - 15 - 25 - 658 - - - 25 - 41 - 678 - - - 41 - 58 - 658 - - - 59 - 95 - 658 - - - 98 - 159 - 658 - - - 163 - 249 - 658 - - - 259 - 344 - 658 - - - 346 - 473 - 658 - - - 475 - 933 - 658 - - - 934 - 2733 - 658 - - - 2736 - 13303 - 534 - - - - - - - - - indexers - 103350 - - - id - 103350 - - - name - 205 - - - declaring_type_id - 92630 - - - type_id - 21809 - - - unbound_id - 31315 - - - - - id - name - - - 12 - - - 1 - 2 - 103350 - - - - - - - id - declaring_type_id - - - 12 - - - 1 - 2 - 103350 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 103350 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 103350 - - - - - - - name - id - - - 12 - - - 1 - 2 - 61 - - - 2 - 3 - 41 - - - 3 - 4 - 20 - - - 10 - 11 - 20 - - - 14 - 15 - 20 - - - 16 - 17 - 20 - - - 4973 - 4974 - 20 - - - - - - - name - declaring_type_id - - - 12 - - - 1 - 2 - 82 - - - 2 - 3 - 20 - - - 3 - 4 - 20 - - - 6 - 7 - 20 - - - 14 - 15 - 20 - - - 16 - 17 - 20 - - - 4460 - 4461 - 20 - - - - - - - name - type_id - - - 12 - - - 1 - 2 - 164 - - - 6 - 7 - 20 - - - 1049 - 1050 - 20 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 82 - - - 2 - 3 - 41 - - - 7 - 8 - 20 - - - 10 - 11 - 20 - - - 16 - 17 - 20 - - - 1481 - 1482 - 20 - - - - - - - declaring_type_id - id - - - 12 - - - 1 - 2 - 83577 - - - 2 - 3 - 7612 - - - 3 - 7 - 1440 - - - - - - - declaring_type_id - name - - - 12 - - - 1 - 2 - 92568 - - - 2 - 3 - 61 - - - - - - - declaring_type_id - type_id - - - 12 - - - 1 - 2 - 87651 - - - 2 - 4 - 4979 - - - - - - - declaring_type_id - unbound_id - - - 12 - - - 1 - 2 - 83577 - - - 2 - 3 - 7612 - - - 3 - 7 - 1440 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 10061 - - - 2 - 3 - 6296 - - - 3 - 4 - 3436 - - - 4 - 8 - 1666 - - - 8 - 2702 - 349 - - - - - - - type_id - name - - - 12 - - - 1 - 2 - 21748 - - - 2 - 3 - 61 - - - - - - - type_id - declaring_type_id - - - 12 - - - 1 - 2 - 12715 - - - 2 - 3 - 4156 - - - 3 - 4 - 3189 - - - 4 - 17 - 1646 - - - 23 - 2667 - 102 - - - - - - - type_id - unbound_id - - - 12 - - - 1 - 2 - 10081 - - - 2 - 3 - 6337 - - - 3 - 4 - 3477 - - - 4 - 9 - 1646 - - - 9 - 248 - 267 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 29278 - - - 2 - 1890 - 2036 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 31315 - - - - - - - unbound_id - declaring_type_id - - - 12 - - - 1 - 2 - 29278 - - - 2 - 1890 - 2036 - - - - - - - unbound_id - type_id - - - 12 - - - 1 - 2 - 29896 - - - 2 - 203 - 1419 - - - - - - - - - indexer_location - 104749 - - - id - 103350 - - - loc - 2530 - - - - - id - loc - - - 12 - - - 1 - 2 - 101950 - - - 2 - 3 - 1399 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 884 - - - 2 - 3 - 349 - - - 3 - 5 - 205 - - - 5 - 8 - 185 - - - 8 - 16 - 226 - - - 16 - 23 - 205 - - - 23 - 47 - 205 - - - 50 - 124 - 205 - - - 127 - 3210 - 61 - - - - - - - - - accessors - 6902049 - - - id - 6902049 - - - kind - 41 - - - name - 2155599 - - - declaring_member_id - 6013131 - - - unbound_id - 6177364 - - - - - id - kind - - - 12 - - - 1 - 2 - 6902049 - - - - - - - id - name - - - 12 - - - 1 - 2 - 6902049 - - - - - - - id - declaring_member_id - - - 12 - - - 1 - 2 - 6902049 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 6902049 - - - - - - - kind - id - - - 12 - - - 43506 - 43507 - 20 - - - 291946 - 291947 - 20 - - - - - - - kind - name - - - 12 - - - 17152 - 17153 - 20 - - - 87622 - 87623 - 20 - - - - - - - kind - declaring_member_id - - - 12 - - - 43506 - 43507 - 20 - - - 291946 - 291947 - 20 - - - - - - - kind - unbound_id - - - 12 - - - 39666 - 39667 - 20 - - - 260565 - 260566 - 20 - - - - - - - name - id - - - 12 - - - 1 - 2 - 1548070 - - - 2 - 3 - 284454 - - - 3 - 6 - 187256 - - - 6 - 3848 - 135818 - - - - - - - name - kind - - - 12 - - - 1 - 2 - 2155434 - - - 2 - 3 - 164 - - - - - - - name - declaring_member_id - - - 12 - - - 1 - 2 - 1548070 - - - 2 - 3 - 284454 - - - 3 - 6 - 187256 - - - 6 - 3848 - 135818 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 1560539 - - - 2 - 3 - 291388 - - - 3 - 6 - 181083 - - - 6 - 3822 - 122588 - - - - - - - declaring_member_id - id - - - 12 - - - 1 - 2 - 5124213 - - - 2 - 3 - 888917 - - - - - - - declaring_member_id - kind - - - 12 - - - 1 - 2 - 5124213 - - - 2 - 3 - 888917 - - - - - - - declaring_member_id - name - - - 12 - - - 1 - 2 - 5125139 - - - 2 - 3 - 887991 - - - - - - - declaring_member_id - unbound_id - - - 12 - - - 1 - 2 - 5124213 - - - 2 - 3 - 888917 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 6082223 - - - 2 - 1890 - 95140 - - - - - - - unbound_id - kind - - - 12 - - - 1 - 2 - 6177364 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 6177364 - - - - - - - unbound_id - declaring_member_id - - - 12 - - - 1 - 2 - 6082223 - - - 2 - 1890 - 95140 - - - - - - - - - init_only_accessors - 34504 - - - id - 34504 - - - - - - accessor_location - 7067248 - - - id - 6902049 - - - loc - 8579 - - - - - id - loc - - - 12 - - - 1 - 2 - 6784666 - - - 2 - 34 - 117382 - - - - - - - loc - id - - - 12 - - - 1 - 8 - 617 - - - 8 - 16 - 678 - - - 16 - 27 - 678 - - - 27 - 45 - 678 - - - 45 - 65 - 699 - - - 65 - 108 - 658 - - - 113 - 171 - 658 - - - 173 - 307 - 658 - - - 307 - 405 - 658 - - - 405 - 523 - 658 - - - 527 - 1068 - 658 - - - 1088 - 2613 - 658 - - - 2633 - 15945 - 617 - - - - - - - - - events - 60800 - - - id - 60800 - - - name - 25595 - - - declaring_type_id - 25225 - - - type_id - 15678 - - - unbound_id - 54030 - - - - - id - name - - - 12 - - - 1 - 2 - 60800 - - - - - - - id - declaring_type_id - - - 12 - - - 1 - 2 - 60800 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 60800 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 60800 - - - - - - - name - id - - - 12 - - - 1 - 2 - 14958 - - - 2 - 3 - 5226 - - - 3 - 4 - 2633 - - - 4 - 8 - 2098 - - - 8 - 240 - 678 - - - - - - - name - declaring_type_id - - - 12 - - - 1 - 2 - 14958 - - - 2 - 3 - 5226 - - - 3 - 4 - 2633 - - - 4 - 8 - 2098 - - - 8 - 228 - 678 - - - - - - - name - type_id - - - 12 - - - 1 - 2 - 22838 - - - 2 - 4 - 2098 - - - 4 - 10 - 658 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 15287 - - - 2 - 3 - 5473 - - - 3 - 4 - 2407 - - - 4 - 9 - 1995 - - - 9 - 165 - 432 - - - - - - - declaring_type_id - id - - - 12 - - - 1 - 2 - 13044 - - - 2 - 3 - 5164 - - - 3 - 4 - 2942 - - - 4 - 6 - 2283 - - - 6 - 75 - 1790 - - - - - - - declaring_type_id - name - - - 12 - - - 1 - 2 - 13106 - - - 2 - 3 - 5390 - - - 3 - 4 - 2674 - - - 4 - 6 - 2263 - - - 6 - 75 - 1790 - - - - - - - declaring_type_id - type_id - - - 12 - - - 1 - 2 - 15863 - - - 2 - 3 - 5246 - - - 3 - 4 - 2119 - - - 4 - 13 - 1892 - - - 14 - 52 - 102 - - - - - - - declaring_type_id - unbound_id - - - 12 - - - 1 - 2 - 13044 - - - 2 - 3 - 5164 - - - 3 - 4 - 2942 - - - 4 - 6 - 2283 - - - 6 - 75 - 1790 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 7798 - - - 2 - 3 - 3189 - - - 3 - 4 - 2530 - - - 4 - 7 - 1357 - - - 7 - 678 - 802 - - - - - - - type_id - name - - - 12 - - - 1 - 2 - 12427 - - - 2 - 3 - 1892 - - - 3 - 12 - 1213 - - - 12 - 276 - 144 - - - - - - - type_id - declaring_type_id - - - 12 - - - 1 - 2 - 9320 - - - 2 - 3 - 2695 - - - 3 - 4 - 2530 - - - 4 - 373 - 1131 - - - - - - - type_id - unbound_id - - - 12 - - - 1 - 2 - 7839 - - - 2 - 3 - 3312 - - - 3 - 4 - 2407 - - - 4 - 7 - 1440 - - - 7 - 605 - 678 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 52220 - - - 2 - 25 - 1810 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 54030 - - - - - - - unbound_id - declaring_type_id - - - 12 - - - 1 - 2 - 52220 - - - 2 - 25 - 1810 - - - - - - - unbound_id - type_id - - - 12 - - - 1 - 2 - 53701 - - - 2 - 6 - 329 - - - - - - - - - event_location - 73180 - - - id - 58236 - - - loc - 6675 - - - - - id - loc - - - 12 - - - 1 - 2 - 48677 - - - 2 - 3 - 4172 - - - 3 - 4 - 5386 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 5588 - - - 2 - 7 - 505 - - - 7 - 198 - 505 - - - 292 - 1024 - 75 - - - - - - - - - event_accessors - 121600 - - - id - 121600 - - - kind - 41 - - - name - 52137 - - - declaring_event_id - 60800 - - - unbound_id - 108061 - - - - - id - kind - - - 12 - - - 1 - 2 - 121600 - - - - - - - id - name - - - 12 - - - 1 - 2 - 121600 - - - - - - - id - declaring_event_id - - - 12 - - - 1 - 2 - 121600 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 121600 - - - - - - - kind - id - - - 12 - - - 2955 - 2956 - 41 - - - - - - - kind - name - - - 12 - - - 1267 - 1268 - 41 - - - - - - - kind - declaring_event_id - - - 12 - - - 2955 - 2956 - 41 - - - - - - - kind - unbound_id - - - 12 - - - 2626 - 2627 - 41 - - - - - - - name - id - - - 12 - - - 1 - 2 - 30492 - - - 2 - 3 - 10452 - - - 3 - 4 - 5308 - - - 4 - 8 - 4403 - - - 8 - 208 - 1481 - - - - - - - name - kind - - - 12 - - - 1 - 2 - 52137 - - - - - - - name - declaring_event_id - - - 12 - - - 1 - 2 - 30492 - - - 2 - 3 - 10452 - - - 3 - 4 - 5308 - - - 4 - 8 - 4403 - - - 8 - 208 - 1481 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 31233 - - - 2 - 3 - 11069 - - - 3 - 4 - 5020 - - - 4 - 10 - 4073 - - - 10 - 146 - 740 - - - - - - - declaring_event_id - id - - - 12 - - - 2 - 3 - 60800 - - - - - - - declaring_event_id - kind - - - 12 - - - 2 - 3 - 60800 - - - - - - - declaring_event_id - name - - - 12 - - - 2 - 3 - 60800 - - - - - - - declaring_event_id - unbound_id - - - 12 - - - 2 - 3 - 60800 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 104440 - - - 2 - 25 - 3621 - - - - - - - unbound_id - kind - - - 12 - - - 1 - 2 - 108061 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 108061 - - - - - - - unbound_id - declaring_event_id - - - 12 - - - 1 - 2 - 104440 - - - 2 - 25 - 3621 - - - - - - - - - event_accessor_location - 146361 - - - id - 116472 - - - loc - 6675 - - - - - id - loc - - - 12 - - - 1 - 2 - 97355 - - - 2 - 3 - 8344 - - - 3 - 4 - 10772 - - - - - - - loc - id - - - 12 - - - 2 - 3 - 5588 - - - 4 - 13 - 505 - - - 14 - 395 - 505 - - - 584 - 2047 - 75 - - - - - - - - - operators - 146898 - - - id - 146898 - - - name - 1560 - - - symbol - 1440 - - - declaring_type_id - 31456 - - - type_id - 22452 - - - unbound_id - 119043 - - - - - id - name - - - 12 - - - 1 - 2 - 146898 - - - - - - - id - symbol - - - 12 - - - 1 - 2 - 146898 - - - - - - - id - declaring_type_id - - - 12 - - - 1 - 2 - 146898 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 146898 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 146898 - - - - - - - name - id - - - 12 - - - 1 - 2 - 240 - - - 3 - 4 - 60 - - - 4 - 5 - 120 - - - 6 - 8 - 120 - - - 8 - 20 - 120 - - - 26 - 34 - 120 - - - 36 - 38 - 120 - - - 38 - 39 - 120 - - - 39 - 40 - 120 - - - 41 - 43 - 120 - - - 58 - 323 - 120 - - - 324 - 486 - 120 - - - 834 - 835 - 60 - - - - - - - name - symbol - - - 12 - - - 1 - 2 - 1560 - - - - - - - name - declaring_type_id - - - 12 - - - 1 - 2 - 240 - - - 3 - 4 - 60 - - - 4 - 5 - 120 - - - 6 - 8 - 120 - - - 8 - 9 - 60 - - - 19 - 20 - 120 - - - 22 - 33 - 120 - - - 33 - 34 - 120 - - - 34 - 35 - 180 - - - 39 - 40 - 120 - - - 51 - 97 - 120 - - - 304 - 305 - 60 - - - 308 - 309 - 120 - - - - - - - name - type_id - - - 12 - - - 1 - 2 - 240 - - - 2 - 3 - 360 - - - 3 - 4 - 60 - - - 4 - 5 - 120 - - - 6 - 8 - 120 - - - 8 - 20 - 120 - - - 20 - 23 - 120 - - - 33 - 35 - 120 - - - 39 - 40 - 120 - - - 44 - 140 - 120 - - - 262 - 263 - 60 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 240 - - - 2 - 4 - 120 - - - 4 - 5 - 120 - - - 6 - 8 - 120 - - - 8 - 9 - 180 - - - 19 - 27 - 120 - - - 36 - 38 - 120 - - - 38 - 39 - 120 - - - 41 - 43 - 120 - - - 58 - 321 - 120 - - - 322 - 470 - 120 - - - 483 - 484 - 60 - - - - - - - symbol - id - - - 12 - - - 1 - 2 - 240 - - - 4 - 5 - 120 - - - 6 - 8 - 120 - - - 8 - 27 - 120 - - - 33 - 37 - 120 - - - 37 - 38 - 60 - - - 38 - 39 - 120 - - - 39 - 40 - 120 - - - 41 - 42 - 60 - - - 61 - 62 - 120 - - - 322 - 325 - 120 - - - 485 - 835 - 120 - - - - - - - symbol - name - - - 12 - - - 1 - 2 - 1320 - - - 2 - 3 - 120 - - - - - - - symbol - declaring_type_id - - - 12 - - - 1 - 2 - 240 - - - 4 - 5 - 120 - - - 6 - 8 - 120 - - - 8 - 20 - 120 - - - 22 - 33 - 120 - - - 33 - 34 - 120 - - - 34 - 35 - 180 - - - 39 - 40 - 120 - - - 51 - 97 - 120 - - - 304 - 305 - 60 - - - 308 - 309 - 120 - - - - - - - symbol - type_id - - - 12 - - - 1 - 2 - 240 - - - 2 - 3 - 360 - - - 4 - 5 - 120 - - - 6 - 8 - 120 - - - 8 - 21 - 120 - - - 22 - 34 - 120 - - - 34 - 35 - 60 - - - 39 - 40 - 120 - - - 44 - 140 - 120 - - - 262 - 263 - 60 - - - - - - - symbol - unbound_id - - - 12 - - - 1 - 2 - 240 - - - 2 - 3 - 60 - - - 4 - 5 - 120 - - - 6 - 8 - 120 - - - 8 - 9 - 180 - - - 26 - 37 - 120 - - - 37 - 38 - 60 - - - 38 - 39 - 120 - - - 41 - 42 - 60 - - - 61 - 62 - 120 - - - 320 - 323 - 120 - - - 469 - 484 - 120 - - - - - - - declaring_type_id - id - - - 12 - - - 1 - 2 - 1740 - - - 2 - 3 - 17589 - - - 3 - 4 - 2581 - - - 4 - 6 - 1680 - - - 6 - 7 - 4742 - - - 7 - 27 - 2401 - - - 27 - 73 - 720 - - - - - - - declaring_type_id - name - - - 12 - - - 1 - 2 - 8824 - - - 2 - 3 - 13507 - - - 3 - 4 - 1680 - - - 4 - 5 - 4442 - - - 5 - 14 - 2581 - - - 15 - 24 - 420 - - - - - - - declaring_type_id - symbol - - - 12 - - - 1 - 2 - 8824 - - - 2 - 3 - 13507 - - - 3 - 4 - 1680 - - - 4 - 5 - 4442 - - - 5 - 13 - 2581 - - - 15 - 22 - 420 - - - - - - - declaring_type_id - type_id - - - 12 - - - 1 - 2 - 22452 - - - 2 - 3 - 3962 - - - 3 - 4 - 1860 - - - 4 - 6 - 2401 - - - 8 - 39 - 780 - - - - - - - declaring_type_id - unbound_id - - - 12 - - - 1 - 2 - 1740 - - - 2 - 3 - 17589 - - - 3 - 4 - 2581 - - - 4 - 6 - 1680 - - - 6 - 7 - 4742 - - - 7 - 27 - 2401 - - - 27 - 73 - 720 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 6303 - - - 2 - 3 - 6903 - - - 3 - 4 - 1800 - - - 4 - 6 - 1380 - - - 6 - 7 - 2761 - - - 7 - 14 - 1740 - - - 14 - 731 - 1560 - - - - - - - type_id - name - - - 12 - - - 1 - 2 - 16989 - - - 2 - 4 - 1800 - - - 4 - 5 - 2221 - - - 5 - 18 - 1440 - - - - - - - type_id - symbol - - - 12 - - - 1 - 2 - 16989 - - - 2 - 4 - 1921 - - - 4 - 5 - 2221 - - - 5 - 16 - 1320 - - - - - - - type_id - declaring_type_id - - - 12 - - - 1 - 2 - 19090 - - - 2 - 7 - 1740 - - - 7 - 306 - 1620 - - - - - - - type_id - unbound_id - - - 12 - - - 1 - 2 - 6303 - - - 2 - 3 - 6903 - - - 3 - 4 - 1800 - - - 4 - 6 - 1380 - - - 6 - 7 - 2761 - - - 7 - 14 - 1740 - - - 14 - 727 - 1560 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 116102 - - - 2 - 33 - 2941 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 119043 - - - - - - - unbound_id - symbol - - - 12 - - - 1 - 2 - 119043 - - - - - - - unbound_id - declaring_type_id - - - 12 - - - 1 - 2 - 116102 - - - 2 - 33 - 2941 - - - - - - - unbound_id - type_id - - - 12 - - - 1 - 2 - 116282 - - - 2 - 33 - 2761 - - - - - - - - - operator_location - 238350 - - - id - 94949 - - - loc - 10928 - - - - - id - loc - - - 12 - - - 1 - 2 - 7222 - - - 2 - 3 - 76786 - - - 3 - 10 - 8699 - - - 10 - 23 - 2240 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 9159 - - - 2 - 5 - 870 - - - 5 - 321 - 821 - - - 352 - 34717 - 77 - - - - - - - - - constant_value - 3005300 - - - id - 3004004 - - - value - 955314 - - - - - id - value - - - 12 - - - 1 - 2 - 3003119 - - - 2 - 9 - 884 - - - - - - - value - id - - - 12 - - - 1 - 2 - 763572 - - - 2 - 3 - 102053 - - - 3 - 9 - 73063 - - - 9 - 9057 - 16624 - - - - - - - - - methods - 17406043 - - - id - 17406043 - - - name - 4654272 - - - declaring_type_id - 3635194 - - - type_id - 1167672 - - - unbound_id - 14310911 - - - - - id - name - - - 12 - - - 1 - 2 - 17406043 - - - - - - - id - declaring_type_id - - - 12 - - - 1 - 2 - 17406043 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 17406043 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 17406043 - - - - - - - name - id - - - 12 - - - 1 - 2 - 3332551 - - - 2 - 3 - 557181 - - - 3 - 5 - 372866 - - - 5 - 30 - 349554 - - - 30 - 24636 - 42117 - - - - - - - name - declaring_type_id - - - 12 - - - 1 - 2 - 3459439 - - - 2 - 3 - 498232 - - - 3 - 6 - 416445 - - - 6 - 15129 - 280154 - - - - - - - name - type_id - - - 12 - - - 1 - 2 - 4249739 - - - 2 - 7 - 349410 - - - 7 - 3080 - 55121 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 3392631 - - - 2 - 3 - 574052 - - - 3 - 5 - 366776 - - - 5 - 14243 - 320811 - - - - - - - declaring_type_id - id - - - 12 - - - 1 - 2 - 1267628 - - - 2 - 3 - 822006 - - - 3 - 4 - 350089 - - - 4 - 5 - 236925 - - - 5 - 6 - 207214 - - - 6 - 9 - 321099 - - - 9 - 17 - 281059 - - - 17 - 1325 - 149171 - - - - - - - declaring_type_id - name - - - 12 - - - 1 - 2 - 1315671 - - - 2 - 3 - 850771 - - - 3 - 4 - 360665 - - - 4 - 5 - 283219 - - - 5 - 6 - 241184 - - - 6 - 10 - 303857 - - - 10 - 89 - 272685 - - - 89 - 1325 - 7139 - - - - - - - declaring_type_id - type_id - - - 12 - - - 1 - 2 - 1738083 - - - 2 - 3 - 858651 - - - 3 - 4 - 372887 - - - 4 - 5 - 307560 - - - 5 - 10 - 283672 - - - 10 - 272 - 74338 - - - - - - - declaring_type_id - unbound_id - - - 12 - - - 1 - 2 - 1267628 - - - 2 - 3 - 822006 - - - 3 - 4 - 350089 - - - 4 - 5 - 236925 - - - 5 - 6 - 207214 - - - 6 - 9 - 321099 - - - 9 - 17 - 281059 - - - 17 - 1325 - 149171 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 670798 - - - 2 - 3 - 190219 - - - 3 - 4 - 84050 - - - 4 - 7 - 103123 - - - 7 - 25 - 88000 - - - 25 - 239280 - 31480 - - - - - - - type_id - name - - - 12 - - - 1 - 2 - 817891 - - - 2 - 3 - 156702 - - - 3 - 5 - 96827 - - - 5 - 33 - 87651 - - - 33 - 67058 - 8600 - - - - - - - type_id - declaring_type_id - - - 12 - - - 1 - 2 - 762399 - - - 2 - 3 - 184417 - - - 3 - 4 - 74277 - - - 4 - 9 - 91683 - - - 9 - 76756 - 54895 - - - - - - - type_id - unbound_id - - - 12 - - - 1 - 2 - 673884 - - - 2 - 3 - 191741 - - - 3 - 4 - 84523 - - - 4 - 7 - 102897 - - - 7 - 27 - 87959 - - - 27 - 209281 - 26665 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 13875865 - - - 2 - 4984 - 435045 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 14310911 - - - - - - - unbound_id - declaring_type_id - - - 12 - - - 1 - 2 - 13875865 - - - 2 - 4984 - 435045 - - - - - - - unbound_id - type_id - - - 12 - - - 1 - 2 - 14180813 - - - 2 - 1923 - 130098 - - - - - - - - - method_location - 17716731 - - - id - 17406043 - - - loc - 9012 - - - - - id - loc - - - 12 - - - 1 - 2 - 17203664 - - - 2 - 34 - 202379 - - - - - - - loc - id - - - 12 - - - 1 - 12 - 740 - - - 12 - 45 - 678 - - - 45 - 68 - 699 - - - 69 - 117 - 678 - - - 123 - 189 - 699 - - - 190 - 254 - 678 - - - 258 - 391 - 678 - - - 397 - 615 - 678 - - - 617 - 851 - 678 - - - 858 - 1319 - 678 - - - 1319 - 1995 - 678 - - - 2133 - 4934 - 678 - - - 4958 - 30306 - 678 - - - 32604 - 58862 - 82 - - - - - - - - - constructors - 5023456 - - - id - 5023456 - - - name - 2237756 - - - declaring_type_id - 3721919 - - - unbound_id - 4648902 - - - - - id - name - - - 12 - - - 1 - 2 - 5023456 - - - - - - - id - declaring_type_id - - - 12 - - - 1 - 2 - 5023456 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 5023456 - - - - - - - name - id - - - 12 - - - 1 - 2 - 1580599 - - - 2 - 3 - 438769 - - - 3 - 7 - 180013 - - - 7 - 29898 - 38373 - - - - - - - name - declaring_type_id - - - 12 - - - 1 - 2 - 2032661 - - - 2 - 5 - 178162 - - - 5 - 14950 - 26933 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 1604961 - - - 2 - 3 - 440251 - - - 3 - 8 - 171145 - - - 8 - 29898 - 21398 - - - - - - - declaring_type_id - id - - - 12 - - - 1 - 2 - 2716154 - - - 2 - 3 - 861470 - - - 3 - 55 - 144295 - - - - - - - declaring_type_id - name - - - 12 - - - 1 - 2 - 3721919 - - - - - - - declaring_type_id - unbound_id - - - 12 - - - 1 - 2 - 2716154 - - - 2 - 3 - 861470 - - - 3 - 55 - 144295 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 4603245 - - - 2 - 1890 - 45656 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 4648902 - - - - - - - unbound_id - declaring_type_id - - - 12 - - - 1 - 2 - 4603245 - - - 2 - 1890 - 45656 - - - - - - - - - constructor_location - 5171660 - - - id - 5023456 - - - loc - 9073 - - - - - id - loc - - - 12 - - - 1 - 2 - 4954672 - - - 2 - 306 - 68783 - - - - - - - loc - id - - - 12 - - - 1 - 8 - 699 - - - 8 - 21 - 720 - - - 21 - 34 - 740 - - - 34 - 51 - 761 - - - 51 - 81 - 699 - - - 81 - 109 - 720 - - - 109 - 156 - 740 - - - 156 - 250 - 720 - - - 250 - 365 - 720 - - - 381 - 573 - 699 - - - 575 - 936 - 699 - - - 940 - 3093 - 699 - - - 3321 - 11823 - 452 - - - - - - - - - destructors - 4588 - - - id - 4588 - - - name - 4341 - - - declaring_type_id - 4588 - - - unbound_id - 4485 - - - - - id - name - - - 12 - - - 1 - 2 - 4588 - - - - - - - id - declaring_type_id - - - 12 - - - 1 - 2 - 4588 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 4588 - - - - - - - name - id - - - 12 - - - 1 - 2 - 4156 - - - 2 - 5 - 185 - - - - - - - name - declaring_type_id - - - 12 - - - 1 - 2 - 4156 - - - 2 - 5 - 185 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 4197 - - - 2 - 3 - 144 - - - - - - - declaring_type_id - id - - - 12 - - - 1 - 2 - 4588 - - - - - - - declaring_type_id - name - - - 12 - - - 1 - 2 - 4588 - - - - - - - declaring_type_id - unbound_id - - - 12 - - - 1 - 2 - 4588 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 4444 - - - 3 - 5 - 41 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 4485 - - - - - - - unbound_id - declaring_type_id - - - 12 - - - 1 - 2 - 4444 - - - 3 - 5 - 41 - - - - - - - - - destructor_location - 4650 - - - id - 4588 - - - loc - 1090 - - - - - id - loc - - - 12 - - - 1 - 2 - 4526 - - - 2 - 3 - 61 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 555 - - - 2 - 3 - 82 - - - 3 - 4 - 205 - - - 4 - 8 - 82 - - - 8 - 13 - 82 - - - 16 - 48 - 82 - - - - - - - - - overrides - 3995078 - - - id - 3990366 - - - base_id - 1238308 - - - - - id - base_id - - - 12 - - - 1 - 2 - 3985655 - - - 2 - 3 - 4711 - - - - - - - base_id - id - - - 12 - - - 1 - 2 - 835956 - - - 2 - 3 - 192256 - - - 3 - 5 - 107958 - - - 5 - 28 - 93453 - - - 28 - 5964 - 8682 - - - - - - - - - explicitly_implements - 1640844 - - - id - 1640453 - - - interface_id - 107526 - - - - - id - interface_id - - - 12 - - - 1 - 2 - 1640062 - - - 2 - 3 - 390 - - - - - - - interface_id - id - - - 12 - - - 1 - 2 - 54895 - - - 2 - 3 - 17283 - - - 3 - 4 - 6831 - - - 4 - 5 - 6110 - - - 5 - 8 - 9258 - - - 8 - 19 - 8312 - - - 19 - 11268 - 4835 - - - - - - - - - local_functions - 4768 - - - id - 4768 - - - name - 2851 - - - return_type - 605 - - - unbound_id - 4652 - - - - - id - name - - - 12 - - - 1 - 2 - 4768 - - - - - - - id - return_type - - - 12 - - - 1 - 2 - 4768 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 4768 - - - - - - - name - id - - - 12 - - - 1 - 2 - 2385 - - - 2 - 3 - 314 - - - 3 - 437 - 152 - - - - - - - name - return_type - - - 12 - - - 1 - 2 - 2807 - - - 2 - 7 - 44 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 2410 - - - 2 - 3 - 315 - - - 3 - 420 - 126 - - - - - - - return_type - id - - - 12 - - - 1 - 2 - 399 - - - 2 - 3 - 101 - - - 3 - 5 - 50 - - - 5 - 22 - 46 - - - 22 - 2380 - 9 - - - - - - - return_type - name - - - 12 - - - 1 - 2 - 449 - - - 2 - 3 - 76 - - - 3 - 6 - 49 - - - 6 - 859 - 31 - - - - - - - return_type - unbound_id - - - 12 - - - 1 - 2 - 402 - - - 2 - 3 - 101 - - - 3 - 5 - 48 - - - 5 - 23 - 46 - - - 25 - 2319 - 8 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 4609 - - - 2 - 12 - 43 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 4652 - - - - - - - unbound_id - return_type - - - 12 - - - 1 - 2 - 4642 - - - 2 - 5 - 10 - - - - - - - - - local_function_stmts - 4652 - - - fn - 4652 - - - stmt - 4652 - - - - - fn - stmt - - - 12 - - - 1 - 2 - 4652 - - - - - - - stmt - fn - - - 12 - - - 1 - 2 - 4652 - - - - - - - - - fields - 12987441 - - - id - 12987441 - - - kind - 41 - - - name - 5002407 - - - declaring_type_id - 2950960 - - - type_id - 2616467 - - - unbound_id - 12547601 - - - - - id - kind - - - 12 - - - 1 - 2 - 12987441 - - - - - - - id - name - - - 12 - - - 1 - 2 - 12987441 - - - - - - - id - declaring_type_id - - - 12 - - - 1 - 2 - 12987441 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 12987441 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 12987441 - - - - - - - kind - id - - - 12 - - - 146000 - 146001 - 20 - - - 485213 - 485214 - 20 - - - - - - - kind - name - - - 12 - - - 98049 - 98050 - 20 - - - 150560 - 150561 - 20 - - - - - - - kind - declaring_type_id - - - 12 - - - 18259 - 18260 - 20 - - - 131629 - 131630 - 20 - - - - - - - kind - type_id - - - 12 - - - 7897 - 7898 - 20 - - - 122955 - 122956 - 20 - - - - - - - kind - unbound_id - - - 12 - - - 145585 - 145586 - 20 - - - 464251 - 464252 - 20 - - - - - - - name - id - - - 12 - - - 1 - 2 - 3909731 - - - 2 - 3 - 577859 - - - 3 - 8 - 381673 - - - 8 - 15557 - 133143 - - - - - - - name - kind - - - 12 - - - 1 - 2 - 4889592 - - - 2 - 3 - 112814 - - - - - - - name - declaring_type_id - - - 12 - - - 1 - 2 - 3910781 - - - 2 - 3 - 578394 - - - 3 - 8 - 381549 - - - 8 - 15557 - 131682 - - - - - - - name - type_id - - - 12 - - - 1 - 2 - 4380578 - - - 2 - 3 - 372619 - - - 3 - 15557 - 249208 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 3938187 - - - 2 - 3 - 578229 - - - 3 - 9 - 380706 - - - 9 - 15557 - 105284 - - - - - - - declaring_type_id - id - - - 12 - - - 1 - 2 - 806657 - - - 2 - 3 - 748305 - - - 3 - 4 - 411630 - - - 4 - 5 - 257953 - - - 5 - 6 - 174293 - - - 6 - 8 - 222934 - - - 8 - 14 - 227110 - - - 14 - 6823 - 102074 - - - - - - - declaring_type_id - kind - - - 12 - - - 1 - 2 - 2817920 - - - 2 - 3 - 133040 - - - - - - - declaring_type_id - name - - - 12 - - - 1 - 2 - 806842 - - - 2 - 3 - 748285 - - - 3 - 4 - 411610 - - - 4 - 5 - 257994 - - - 5 - 6 - 174273 - - - 6 - 8 - 223057 - - - 8 - 14 - 226966 - - - 14 - 6823 - 101930 - - - - - - - declaring_type_id - type_id - - - 12 - - - 1 - 2 - 1103868 - - - 2 - 3 - 812418 - - - 3 - 4 - 381241 - - - 4 - 5 - 207975 - - - 5 - 7 - 225876 - - - 7 - 612 - 219580 - - - - - - - declaring_type_id - unbound_id - - - 12 - - - 1 - 2 - 806657 - - - 2 - 3 - 748305 - - - 3 - 4 - 411630 - - - 4 - 5 - 257953 - - - 5 - 6 - 174293 - - - 6 - 8 - 222934 - - - 8 - 14 - 227110 - - - 14 - 6823 - 102074 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 1788843 - - - 2 - 3 - 320667 - - - 3 - 5 - 237522 - - - 5 - 15 - 200568 - - - 15 - 68300 - 68865 - - - - - - - type_id - kind - - - 12 - - - 1 - 2 - 2540605 - - - 2 - 3 - 75861 - - - - - - - type_id - name - - - 12 - - - 1 - 2 - 1915649 - - - 2 - 3 - 308898 - - - 3 - 5 - 202111 - - - 5 - 37646 - 189807 - - - - - - - type_id - declaring_type_id - - - 12 - - - 1 - 2 - 1970564 - - - 2 - 3 - 313115 - - - 3 - 6 - 205506 - - - 6 - 23118 - 127279 - - - - - - - type_id - unbound_id - - - 12 - - - 1 - 2 - 1793760 - - - 2 - 3 - 322333 - - - 3 - 5 - 235793 - - - 5 - 15 - 197420 - - - 15 - 67097 - 67158 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 12475176 - - - 2 - 1890 - 72425 - - - - - - - unbound_id - kind - - - 12 - - - 1 - 2 - 12547601 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 12547601 - - - - - - - unbound_id - declaring_type_id - - - 12 - - - 1 - 2 - 12475176 - - - 2 - 1890 - 72425 - - - - - - - unbound_id - type_id - - - 12 - - - 1 - 2 - 12525051 - - - 2 - 1339 - 22550 - - - - - - - - - field_location - 13100894 - - - id - 12872178 - - - loc - 8847 - - - - - id - loc - - - 12 - - - 1 - 2 - 12723624 - - - 2 - 283 - 148554 - - - - - - - loc - id - - - 12 - - - 1 - 13 - 740 - - - 13 - 36 - 678 - - - 38 - 64 - 699 - - - 64 - 107 - 678 - - - 107 - 183 - 678 - - - 183 - 257 - 678 - - - 258 - 361 - 678 - - - 368 - 551 - 678 - - - 555 - 845 - 678 - - - 854 - 1270 - 678 - - - 1296 - 2080 - 678 - - - 2119 - 5642 - 678 - - - 5811 - 25217 - 617 - - - - - - - - - localvars - 618977 - - - id - 618977 - - - kind - 50 - - - name - 113210 - - - implicitly_typed - 50 - - - type_id - 31962 - - - parent_id - 618977 - - - - - id - kind - - - 12 - - - 1 - 2 - 618977 - - - - - - - id - name - - - 12 - - - 1 - 2 - 618977 - - - - - - - id - implicitly_typed - - - 12 - - - 1 - 2 - 618977 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 618977 - - - - - - - id - parent_id - - - 12 - - - 1 - 2 - 618977 - - - - - - - kind - id - - - 12 - - - 68 - 69 - 25 - - - 24410 - 24411 - 25 - - - - - - - kind - name - - - 12 - - - 29 - 30 - 25 - - - 4457 - 4458 - 25 - - - - - - - kind - implicitly_typed - - - 12 - - - 1 - 2 - 25 - - - 2 - 3 - 25 - - - - - - - kind - type_id - - - 12 - - - 7 - 8 - 25 - - - 1262 - 1263 - 25 - - - - - - - kind - parent_id - - - 12 - - - 68 - 69 - 25 - - - 24410 - 24411 - 25 - - - - - - - name - id - - - 12 - - - 1 - 2 - 71663 - - - 2 - 3 - 17852 - - - 3 - 5 - 10443 - - - 5 - 12 - 8749 - - - 12 - 3783 - 4501 - - - - - - - name - kind - - - 12 - - - 1 - 2 - 112982 - - - 2 - 3 - 227 - - - - - - - name - implicitly_typed - - - 12 - - - 1 - 2 - 98442 - - - 2 - 3 - 14767 - - - - - - - name - type_id - - - 12 - - - 1 - 2 - 97835 - - - 2 - 3 - 8420 - - - 3 - 74 - 6953 - - - - - - - name - parent_id - - - 12 - - - 1 - 2 - 71663 - - - 2 - 3 - 17852 - - - 3 - 5 - 10443 - - - 5 - 12 - 8749 - - - 12 - 3783 - 4501 - - - - - - - implicitly_typed - id - - - 12 - - - 5418 - 5419 - 25 - - - 19060 - 19061 - 25 - - - - - - - implicitly_typed - kind - - - 12 - - - 1 - 2 - 25 - - - 2 - 3 - 25 - - - - - - - implicitly_typed - name - - - 12 - - - 2195 - 2196 - 25 - - - 2866 - 2867 - 25 - - - - - - - implicitly_typed - type_id - - - 12 - - - 649 - 650 - 25 - - - 956 - 957 - 25 - - - - - - - implicitly_typed - parent_id - - - 12 - - - 5418 - 5419 - 25 - - - 19060 - 19061 - 25 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 14312 - - - 2 - 3 - 5639 - - - 3 - 4 - 2579 - - - 4 - 6 - 2629 - - - 6 - 10 - 2478 - - - 10 - 26 - 2427 - - - 26 - 7125 - 1896 - - - - - - - type_id - kind - - - 12 - - - 1 - 2 - 31836 - - - 2 - 3 - 126 - - - - - - - type_id - name - - - 12 - - - 1 - 2 - 18737 - - - 2 - 3 - 5057 - - - 3 - 4 - 2199 - - - 4 - 7 - 2781 - - - 7 - 24 - 2427 - - - 24 - 596 - 758 - - - - - - - type_id - implicitly_typed - - - 12 - - - 1 - 2 - 23339 - - - 2 - 3 - 8622 - - - - - - - type_id - parent_id - - - 12 - - - 1 - 2 - 14312 - - - 2 - 3 - 5639 - - - 3 - 4 - 2579 - - - 4 - 6 - 2629 - - - 6 - 10 - 2478 - - - 10 - 26 - 2427 - - - 26 - 7125 - 1896 - - - - - - - parent_id - id - - - 12 - - - 1 - 2 - 618977 - - - - - - - parent_id - kind - - - 12 - - - 1 - 2 - 618977 - - - - - - - parent_id - name - - - 12 - - - 1 - 2 - 618977 - - - - - - - parent_id - implicitly_typed - - - 12 - - - 1 - 2 - 618977 - - - - - - - parent_id - type_id - - - 12 - - - 1 - 2 - 618977 - - - - - - - - - localvar_location - 618977 - - - id - 618977 - - - loc - 618977 - - - - - id - loc - - - 12 - - - 1 - 2 - 618977 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 618977 - - - - - - - - - params - 31463795 - - - id - 31463795 - - - name - 1755593 - - - type_id - 2360159 - - - index - 1419 - - - mode - 123 - - - parent_id - 17474189 - - - unbound_id - 25163555 - - - - - id - name - - - 12 - - - 1 - 2 - 31463795 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 31463795 - - - - - - - id - index - - - 12 - - - 1 - 2 - 31463795 - - - - - - - id - mode - - - 12 - - - 1 - 2 - 31463795 - - - - - - - id - parent_id - - - 12 - - - 1 - 2 - 31463795 - - - - - - - id - unbound_id - - - 12 - - - 1 - 2 - 31463795 - - - - - - - name - id - - - 12 - - - 1 - 2 - 778572 - - - 2 - 3 - 321778 - - - 3 - 4 - 144356 - - - 4 - 6 - 159212 - - - 6 - 10 - 135097 - - - 10 - 26 - 133266 - - - 26 - 82408 - 83309 - - - - - - - name - type_id - - - 12 - - - 1 - 2 - 1424391 - - - 2 - 3 - 172668 - - - 3 - 12 - 132525 - - - 12 - 15932 - 26007 - - - - - - - name - index - - - 12 - - - 1 - 2 - 1213617 - - - 2 - 3 - 297581 - - - 3 - 4 - 115942 - - - 4 - 23 - 128452 - - - - - - - name - mode - - - 12 - - - 1 - 2 - 1598150 - - - 2 - 3 - 132052 - - - 3 - 7 - 25390 - - - - - - - name - parent_id - - - 12 - - - 1 - 2 - 778572 - - - 2 - 3 - 321778 - - - 3 - 4 - 144356 - - - 4 - 6 - 159212 - - - 6 - 10 - 135097 - - - 10 - 26 - 133266 - - - 26 - 82408 - 83309 - - - - - - - name - unbound_id - - - 12 - - - 1 - 2 - 795505 - - - 2 - 3 - 328094 - - - 3 - 4 - 155508 - - - 4 - 5 - 102856 - - - 5 - 8 - 139192 - - - 8 - 19 - 135632 - - - 19 - 69269 - 98802 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 1148640 - - - 2 - 3 - 332909 - - - 3 - 4 - 201144 - - - 4 - 5 - 156002 - - - 5 - 8 - 185034 - - - 8 - 18 - 178532 - - - 18 - 107768 - 157895 - - - - - - - type_id - name - - - 12 - - - 1 - 2 - 1573110 - - - 2 - 3 - 396137 - - - 3 - 4 - 179520 - - - 4 - 12 - 180898 - - - 12 - 11414 - 30492 - - - - - - - type_id - index - - - 12 - - - 1 - 2 - 1703558 - - - 2 - 3 - 413997 - - - 3 - 5 - 179499 - - - 5 - 70 - 63104 - - - - - - - type_id - mode - - - 12 - - - 1 - 2 - 2211872 - - - 2 - 6 - 148286 - - - - - - - type_id - parent_id - - - 12 - - - 1 - 2 - 1179771 - - - 2 - 3 - 314576 - - - 3 - 4 - 201021 - - - 4 - 5 - 156619 - - - 5 - 8 - 183079 - - - 8 - 19 - 178820 - - - 19 - 87339 - 146270 - - - - - - - type_id - unbound_id - - - 12 - - - 1 - 2 - 1156767 - - - 2 - 3 - 333711 - - - 3 - 4 - 213469 - - - 4 - 5 - 154623 - - - 5 - 8 - 193778 - - - 8 - 19 - 180507 - - - 19 - 100456 - 127299 - - - - - - - index - id - - - 12 - - - 2 - 3 - 164 - - - 3 - 4 - 102 - - - 4 - 5 - 246 - - - 5 - 10 - 82 - - - 10 - 13 - 123 - - - 14 - 33 - 123 - - - 38 - 72 - 123 - - - 85 - 224 - 123 - - - 302 - 1682 - 123 - - - 2493 - 36706 - 123 - - - 70171 - 849278 - 82 - - - - - - - index - name - - - 12 - - - 1 - 2 - 164 - - - 2 - 3 - 102 - - - 3 - 4 - 246 - - - 4 - 7 - 61 - - - 8 - 9 - 82 - - - 10 - 19 - 123 - - - 22 - 39 - 123 - - - 42 - 88 - 123 - - - 109 - 327 - 123 - - - 444 - 2590 - 123 - - - 3908 - 33082 - 123 - - - 38091 - 38092 - 20 - - - - - - - index - type_id - - - 12 - - - 1 - 2 - 473 - - - 2 - 5 - 102 - - - 6 - 8 - 102 - - - 8 - 17 - 123 - - - 20 - 36 - 123 - - - 41 - 96 - 123 - - - 104 - 358 - 123 - - - 477 - 2603 - 123 - - - 4110 - 76288 - 123 - - - - - - - index - mode - - - 12 - - - 2 - 3 - 1111 - - - 3 - 5 - 82 - - - 5 - 6 - 205 - - - 6 - 7 - 20 - - - - - - - index - parent_id - - - 12 - - - 2 - 3 - 164 - - - 3 - 4 - 102 - - - 4 - 5 - 246 - - - 5 - 10 - 82 - - - 10 - 13 - 123 - - - 14 - 33 - 123 - - - 38 - 72 - 123 - - - 85 - 224 - 123 - - - 302 - 1682 - 123 - - - 2493 - 36706 - 123 - - - 70171 - 849278 - 82 - - - - - - - index - unbound_id - - - 12 - - - 2 - 3 - 164 - - - 3 - 4 - 102 - - - 4 - 5 - 246 - - - 5 - 10 - 82 - - - 10 - 13 - 123 - - - 14 - 33 - 123 - - - 38 - 72 - 123 - - - 85 - 224 - 123 - - - 298 - 1634 - 123 - - - 2398 - 32495 - 123 - - - 61752 - 666467 - 82 - - - - - - - mode - id - - - 12 - - - 3182 - 3183 - 20 - - - 4460 - 4461 - 20 - - - 14929 - 14930 - 20 - - - 22552 - 22553 - 20 - - - 26702 - 26703 - 20 - - - 1457373 - 1457374 - 20 - - - - - - - mode - name - - - 12 - - - 326 - 327 - 20 - - - 590 - 591 - 20 - - - 2415 - 2416 - 20 - - - 2510 - 2511 - 20 - - - 8449 - 8450 - 20 - - - 80401 - 80402 - 20 - - - - - - - mode - type_id - - - 12 - - - 374 - 375 - 20 - - - 735 - 736 - 20 - - - 3241 - 3242 - 20 - - - 4690 - 4691 - 20 - - - 6825 - 6826 - 20 - - - 107299 - 107300 - 20 - - - - - - - mode - index - - - 12 - - - 1 - 2 - 20 - - - 12 - 13 - 20 - - - 13 - 14 - 20 - - - 15 - 16 - 20 - - - 69 - 70 - 41 - - - - - - - mode - parent_id - - - 12 - - - 2929 - 2930 - 20 - - - 4460 - 4461 - 20 - - - 12530 - 12531 - 20 - - - 18196 - 18197 - 20 - - - 22552 - 22553 - 20 - - - 829094 - 829095 - 20 - - - - - - - mode - unbound_id - - - 12 - - - 2889 - 2890 - 20 - - - 4031 - 4032 - 20 - - - 12465 - 12466 - 20 - - - 22552 - 22553 - 20 - - - 24088 - 24089 - 20 - - - 1156970 - 1156971 - 20 - - - - - - - parent_id - id - - - 12 - - - 1 - 2 - 9861816 - - - 2 - 3 - 4448724 - - - 3 - 4 - 1719854 - - - 4 - 8 - 1312173 - - - 8 - 70 - 131620 - - - - - - - parent_id - name - - - 12 - - - 1 - 2 - 9861795 - - - 2 - 3 - 4448724 - - - 3 - 4 - 1719854 - - - 4 - 8 - 1312194 - - - 8 - 70 - 131620 - - - - - - - parent_id - type_id - - - 12 - - - 1 - 2 - 10470044 - - - 2 - 3 - 4359859 - - - 3 - 4 - 1575867 - - - 4 - 43 - 1068417 - - - - - - - parent_id - index - - - 12 - - - 1 - 2 - 9861816 - - - 2 - 3 - 4448724 - - - 3 - 4 - 1719854 - - - 4 - 8 - 1312173 - - - 8 - 70 - 131620 - - - - - - - parent_id - mode - - - 12 - - - 1 - 2 - 16675453 - - - 2 - 5 - 798735 - - - - - - - parent_id - unbound_id - - - 12 - - - 1 - 2 - 9861816 - - - 2 - 3 - 4448724 - - - 3 - 4 - 1719854 - - - 4 - 8 - 1312173 - - - 8 - 70 - 131620 - - - - - - - unbound_id - id - - - 12 - - - 1 - 2 - 24344223 - - - 2 - 21044 - 819331 - - - - - - - unbound_id - name - - - 12 - - - 1 - 2 - 25163493 - - - 2 - 3 - 61 - - - - - - - unbound_id - type_id - - - 12 - - - 1 - 2 - 24924140 - - - 2 - 11733 - 239415 - - - - - - - unbound_id - index - - - 12 - - - 1 - 2 - 25163555 - - - - - - - unbound_id - mode - - - 12 - - - 1 - 2 - 25163534 - - - 2 - 3 - 20 - - - - - - - unbound_id - parent_id - - - 12 - - - 1 - 2 - 24344223 - - - 2 - 21044 - 819331 - - - - - - - - - param_location - 32044103 - - - id - 31456264 - - - loc - 9114 - - - - - id - loc - - - 12 - - - 1 - 2 - 31081793 - - - 2 - 283 - 374471 - - - - - - - loc - id - - - 12 - - - 1 - 24 - 699 - - - 24 - 64 - 720 - - - 65 - 111 - 699 - - - 111 - 197 - 699 - - - 199 - 289 - 699 - - - 295 - 459 - 699 - - - 464 - 683 - 699 - - - 698 - 1090 - 699 - - - 1100 - 1496 - 699 - - - 1518 - 2241 - 699 - - - 2322 - 4037 - 699 - - - 4172 - 10844 - 699 - - - 11544 - 122370 - 699 - - - - - - - - - scoped_annotation - 382475 - - - id - 382475 - - - kind - 20 - - - - - id - kind - - - 12 - - - 1 - 2 - 382475 - - - - - - - kind - id - - - 12 - - - 18589 - 18590 - 20 - - - - - - - - - statements - 3047725 - - - id - 3047725 - - - kind - 54 - - - - - id - kind - - - 12 - - - 1 - 2 - 3047725 - - - - - - - kind - id - - - 12 - - - 6 - 109 - 3 - - - 145 - 245 - 3 - - - 347 - 366 - 3 - - - 469 - 613 - 3 - - - 862 - 1025 - 3 - - - 1165 - 1263 - 3 - - - 1846 - 1883 - 3 - - - 2826 - 4737 - 3 - - - 5360 - 5866 - 3 - - - 6322 - 6522 - 3 - - - 11476 - 12650 - 3 - - - 34119 - 52069 - 3 - - - 70449 - 144614 - 3 - - - 205916 - 207348 - 3 - - - 441782 - 466315 - 3 - - - - - - - - - stmt_parent - 2600410 - - - stmt - 2600410 - - - index - 6148 - - - parent - 1245017 - - - - - stmt - index - - - 12 - - - 1 - 2 - 2600410 - - - - - - - stmt - parent - - - 12 - - - 1 - 2 - 2600410 - - - - - - - index - stmt - - - 12 - - - 1 - 2 - 1544 - - - 3 - 4 - 1155 - - - 4 - 5 - 564 - - - 5 - 6 - 50 - - - 6 - 7 - 927 - - - 7 - 9 - 512 - - - 9 - 54 - 476 - - - 54 - 79 - 490 - - - 79 - 442744 - 425 - - - - - - - index - parent - - - 12 - - - 1 - 2 - 1544 - - - 3 - 4 - 1155 - - - 4 - 5 - 564 - - - 5 - 6 - 50 - - - 6 - 7 - 927 - - - 7 - 9 - 512 - - - 9 - 54 - 476 - - - 54 - 79 - 490 - - - 79 - 442744 - 425 - - - - - - - parent - stmt - - - 12 - - - 1 - 2 - 802470 - - - 2 - 3 - 236411 - - - 3 - 4 - 77802 - - - 4 - 9 - 99408 - - - 9 - 3407 - 28925 - - - - - - - parent - index - - - 12 - - - 1 - 2 - 802470 - - - 2 - 3 - 236411 - - - 3 - 4 - 77802 - - - 4 - 9 - 99408 - - - 9 - 3407 - 28925 - - - - - - - - - stmt_parent_top_level - 447315 - - - stmt - 447315 - - - index - 1 - - - parent - 422460 - - - - - stmt - index - - - 12 - - - 1 - 2 - 447315 - - - - - - - stmt - parent - - - 12 - - - 1 - 2 - 447315 - - - - - - - index - stmt - - - 12 - - - 247851 - 247852 - 1 - - - - - - - index - parent - - - 12 - - - 234079 - 234080 - 1 - - - - - - - parent - stmt - - - 12 - - - 1 - 2 - 399519 - - - 2 - 5 - 22940 - - - - - - - parent - index - - - 12 - - - 1 - 2 - 422460 - - - - - - - - - stmt_location - 3047718 - - - id - 3047718 - - - loc - 2947201 - - - - - id - loc - - - 12 - - - 1 - 2 - 3047718 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 2852104 - - - 2 - 5 - 95097 - - - - - - - - - catch_type - 30233 - - - catch_id - 30233 - - - type_id - 1460 - - - kind - 22 - - - - - catch_id - type_id - - - 12 - - - 1 - 2 - 30233 - - - - - - - catch_id - kind - - - 12 - - - 1 - 2 - 30233 - - - - - - - type_id - catch_id - - - 12 - - - 1 - 2 - 384 - - - 2 - 3 - 169 - - - 3 - 4 - 135 - - - 4 - 6 - 124 - - - 6 - 9 - 113 - - - 10 - 14 - 113 - - - 14 - 23 - 124 - - - 23 - 54 - 113 - - - 55 - 84 - 124 - - - 87 - 586 - 56 - - - - - - - type_id - kind - - - 12 - - - 1 - 2 - 1460 - - - - - - - kind - catch_id - - - 12 - - - 69 - 70 - 11 - - - 2602 - 2603 - 11 - - - - - - - kind - type_id - - - 12 - - - 1 - 2 - 11 - - - 128 - 129 - 11 - - - - - - - - - foreach_stmt_info - 32428 - - - id - 32428 - - - kind - 11 - - - - - id - kind - - - 12 - - - 1 - 2 - 32428 - - - - - - - kind - id - - - 12 - - - 2865 - 2866 - 11 - - - - - - - - - foreach_stmt_desugar - 162110 - - - id - 32428 - - - symbol - 19966 - - - kind - 56 - - - - - id - symbol - - - 12 - - - 4 - 5 - 33 - - - 5 - 6 - 32394 - - - - - - - id - kind - - - 12 - - - 4 - 5 - 33 - - - 5 - 6 - 32394 - - - - - - - symbol - id - - - 12 - - - 1 - 2 - 8908 - - - 2 - 3 - 3429 - - - 3 - 4 - 1924 - - - 4 - 5 - 1675 - - - 5 - 8 - 1799 - - - 8 - 17 - 1539 - - - 17 - 2863 - 690 - - - - - - - symbol - kind - - - 12 - - - 1 - 2 - 19966 - - - - - - - kind - id - - - 12 - - - 2862 - 2863 - 11 - - - 2865 - 2866 - 45 - - - - - - - kind - symbol - - - 12 - - - 1 - 2 - 11 - - - 275 - 276 - 11 - - - 437 - 438 - 11 - - - 489 - 490 - 11 - - - 562 - 563 - 11 - - - - - - - - - expressions - 12065274 - - - id - 12065274 - - - kind - 282 - - - type_id - 95429 - - - - - id - kind - - - 12 - - - 1 - 2 - 12065274 - - - - - - - id - type_id - - - 12 - - - 1 - 2 - 12065274 - - - - - - - kind - id - - - 12 - - - 1 - 37 - 25 - - - 47 - 133 - 23 - - - 134 - 544 - 23 - - - 570 - 985 - 23 - - - 1041 - 1502 - 23 - - - 1512 - 1811 - 23 - - - 1901 - 3636 - 23 - - - 4438 - 6455 - 23 - - - 7058 - 14022 - 23 - - - 14452 - 28402 - 23 - - - 32648 - 169673 - 23 - - - 172052 - 1144418 - 23 - - - - - - - kind - type_id - - - 12 - - - 1 - 2 - 91 - - - 2 - 7 - 25 - - - 8 - 12 - 23 - - - 12 - 27 - 23 - - - 29 - 102 - 23 - - - 162 - 320 - 23 - - - 320 - 863 - 23 - - - 915 - 4194 - 23 - - - 4905 - 13903 - 23 - - - 16571 - 16572 - 2 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 19361 - - - 2 - 3 - 13919 - - - 3 - 4 - 5455 - - - 4 - 5 - 8090 - - - 5 - 7 - 7637 - - - 7 - 11 - 8729 - - - 11 - 17 - 7698 - - - 17 - 30 - 7273 - - - 30 - 60 - 7182 - - - 60 - 238 - 7161 - - - 238 - 919701 - 2916 - - - - - - - type_id - kind - - - 12 - - - 1 - 2 - 34716 - - - 2 - 3 - 21172 - - - 3 - 4 - 11492 - - - 4 - 5 - 6989 - - - 5 - 6 - 5465 - - - 6 - 8 - 6872 - - - 8 - 13 - 7208 - - - 13 - 60 - 1512 - - - - - - - - - expr_parent - 11682627 - - - expr - 11682627 - - - index - 40690 - - - parent - 7823161 - - - - - expr - index - - - 12 - - - 1 - 2 - 11682627 - - - - - - - expr - parent - - - 12 - - - 1 - 2 - 11682627 - - - - - - - index - expr - - - 12 - - - 2 - 3 - 1 - - - 4 - 5 - 21177 - - - 5 - 6 - 6394 - - - 6 - 9 - 3219 - - - 10 - 11 - 5955 - - - 11 - 66 - 3059 - - - 66 - 3205889 - 882 - - - - - - - index - parent - - - 12 - - - 2 - 3 - 1 - - - 4 - 5 - 21177 - - - 5 - 6 - 6394 - - - 6 - 9 - 3219 - - - 10 - 11 - 5955 - - - 11 - 66 - 3059 - - - 66 - 3205889 - 882 - - - - - - - parent - expr - - - 12 - - - 1 - 2 - 5080905 - - - 2 - 3 - 2351683 - - - 3 - 22534 - 390573 - - - - - - - parent - index - - - 12 - - - 1 - 2 - 5080905 - - - 2 - 3 - 2351683 - - - 3 - 22534 - 390573 - - - - - - - - - expr_parent_top_level - 6487352 - - - expr - 6487352 - - - index - 288 - - - parent - 4784226 - - - - - expr - index - - - 12 - - - 1 - 2 - 6487352 - - - - - - - expr - parent - - - 12 - - - 1 - 2 - 6487352 - - - - - - - index - expr - - - 12 - - - 3 - 4 - 20 - - - 311 - 312 - 20 - - - 1372 - 1373 - 20 - - - 1391 - 1392 - 20 - - - 1528 - 1529 - 20 - - - 1702 - 1703 - 20 - - - 1867 - 1868 - 20 - - - 4112 - 4113 - 20 - - - 5735 - 5736 - 20 - - - 7848 - 7849 - 20 - - - 9279 - 9280 - 20 - - - 15335 - 15336 - 20 - - - 31901 - 31902 - 20 - - - 232913 - 232914 - 20 - - - - - - - index - parent - - - 12 - - - 3 - 4 - 20 - - - 311 - 312 - 20 - - - 1372 - 1373 - 20 - - - 1391 - 1392 - 20 - - - 1528 - 1529 - 20 - - - 1702 - 1703 - 20 - - - 1867 - 1868 - 20 - - - 4112 - 4113 - 20 - - - 5735 - 5736 - 20 - - - 7848 - 7849 - 20 - - - 9279 - 9280 - 20 - - - 15335 - 15336 - 20 - - - 31901 - 31902 - 20 - - - 232522 - 232523 - 20 - - - - - - - parent - expr - - - 12 - - - 1 - 2 - 4124209 - - - 2 - 3 - 343485 - - - 3 - 15 - 316531 - - - - - - - parent - index - - - 12 - - - 1 - 2 - 4127851 - - - 2 - 3 - 340851 - - - 3 - 15 - 315523 - - - - - - - - - implicitly_typed_array_creation - 21805 - - - id - 21805 - - - - - - explicitly_sized_array_creation - 13319 - - - id - 13319 - - - - - - stackalloc_array_creation - 2321 - - - id - 2321 - - - - - - implicitly_typed_object_creation - 14530 - - - id - 14530 - - - - - - mutator_invocation_mode - 14 - - - id - 14 - - - mode - 4 - - - - - id - mode - - - 12 - - - 1 - 2 - 14 - - - - - - - mode - id - - - 12 - - - 2 - 3 - 2 - - - 4 - 5 - 2 - - - - - - - - - expr_compiler_generated - 12064553 - - - id - 12064553 - - - - - - expr_value - 8310351 - - - id - 8310351 - - - value - 718800 - - - - - id - value - - - 12 - - - 1 - 2 - 8310351 - - - - - - - value - id - - - 12 - - - 1 - 2 - 505578 - - - 2 - 3 - 110654 - - - 3 - 4 - 55368 - - - 4 - 80631 - 47199 - - - - - - - - - expr_call - 1966123 - - - caller_id - 1966123 - - - target_id - 257171 - - - - - caller_id - target_id - - - 12 - - - 1 - 2 - 1966123 - - - - - - - target_id - caller_id - - - 12 - - - 1 - 2 - 137518 - - - 2 - 3 - 51107 - - - 3 - 4 - 19300 - - - 4 - 6 - 19323 - - - 6 - 15 - 19385 - - - 15 - 46132 - 10536 - - - - - - - - - expr_access - 4484304 - - - accesser_id - 4484304 - - - target_id - 1084863 - - - - - accesser_id - target_id - - - 12 - - - 1 - 2 - 4484304 - - - - - - - target_id - accesser_id - - - 12 - - - 1 - 2 - 361965 - - - 2 - 3 - 236660 - - - 3 - 4 - 166914 - - - 4 - 5 - 102379 - - - 5 - 7 - 99569 - - - 7 - 15 - 84375 - - - 15 - 15109 - 32998 - - - - - - - - - expr_location - 12065274 - - - id - 12065274 - - - loc - 7880074 - - - - - id - loc - - - 12 - - - 1 - 2 - 12065274 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 6971739 - - - 2 - 3 - 852056 - - - 3 - 163205 - 56279 - - - - - - - - - dynamic_member_name - 22330 - - - id - 22330 - - - name - 2023 - - - - - id - name - - - 12 - - - 1 - 2 - 22330 - - - - - - - name - id - - - 12 - - - 1 - 2 - 620 - - - 2 - 3 - 310 - - - 3 - 4 - 229 - - - 4 - 5 - 168 - - - 5 - 7 - 168 - - - 7 - 11 - 155 - - - 11 - 22 - 155 - - - 22 - 52 - 155 - - - 61 - 437 - 60 - - - - - - - - - conditional_access - 11568 - - - id - 11568 - - - - - - expr_argument - 1774394 - - - id - 1774394 - - - mode - 75 - - - - - id - mode - - - 12 - - - 1 - 2 - 1774394 - - - - - - - mode - id - - - 12 - - - 954 - 955 - 25 - - - 1083 - 1084 - 25 - - - 68133 - 68134 - 25 - - - - - - - - - expr_argument_name - 840195 - - - id - 840195 - - - name - 4732 - - - - - id - name - - - 12 - - - 1 - 2 - 840195 - - - - - - - name - id - - - 12 - - - 1 - 2 - 514 - - - 2 - 3 - 390 - - - 3 - 5 - 390 - - - 5 - 8 - 370 - - - 8 - 12 - 349 - - - 12 - 19 - 432 - - - 19 - 27 - 370 - - - 27 - 57 - 370 - - - 57 - 112 - 432 - - - 130 - 202 - 370 - - - 202 - 478 - 370 - - - 602 - 4039 - 370 - - - - - - - - - lambda_expr_return_type - 92 - - - id - 92 - - - type_id - 37 - - - - - id - type_id - - - 12 - - - 1 - 2 - 92 - - - - - - - type_id - id - - - 12 - - - 1 - 2 - 7 - - - 2 - 3 - 17 - - - 3 - 4 - 5 - - - 4 - 5 - 5 - - - 6 - 7 - 2 - - - - - - - - - xmlEncoding - 51263 - - - id - 51263 - - - encoding - 2 - - - - - id - encoding - - - 12 - - - 1 - 2 - 51263 - - - - - - - encoding - id - - - 12 - - - 20448 - 20449 - 2 - - - - - - - - - xmlDTDs - 72 - - - id - 72 - - - root - 21 - - - publicId - 5 - - - systemId - 18 - - - fileid - 72 - - - - - id - root - - - 12 - - - 1 - 2 - 72 - - - - - - - id - publicId - - - 12 - - - 1 - 2 - 72 - - - - - - - id - systemId - - - 12 - - - 1 - 2 - 72 - - - - - - - id - fileid - - - 12 - - - 1 - 2 - 72 - - - - - - - root - id - - - 12 - - - 1 - 2 - 10 - - - 2 - 3 - 3 - - - 3 - 4 - 3 - - - 4 - 5 - 1 - - - 20 - 21 - 1 - - - - - - - root - publicId - - - 12 - - - 1 - 2 - 21 - - - - - - - root - systemId - - - 12 - - - 1 - 2 - 19 - - - 2 - 3 - 1 - - - - - - - root - fileid - - - 12 - - - 1 - 2 - 10 - - - 2 - 3 - 3 - - - 3 - 4 - 3 - - - 4 - 5 - 1 - - - 20 - 21 - 1 - - - - - - - publicId - id - - - 12 - - - 3 - 4 - 1 - - - 4 - 5 - 1 - - - 33 - 34 - 1 - - - - - - - publicId - root - - - 12 - - - 1 - 2 - 3 - - - 10 - 11 - 1 - - - - - - - publicId - systemId - - - 12 - - - 1 - 2 - 3 - - - 8 - 9 - 1 - - - - - - - publicId - fileid - - - 12 - - - 3 - 4 - 1 - - - 4 - 5 - 1 - - - 33 - 34 - 1 - - - - - - - systemId - id - - - 12 - - - 1 - 2 - 9 - - - 3 - 4 - 3 - - - 4 - 5 - 1 - - - 5 - 6 - 1 - - - 20 - 21 - 1 - - - - - - - systemId - root - - - 12 - - - 1 - 2 - 16 - - - 4 - 5 - 1 - - - - - - - systemId - publicId - - - 12 - - - 1 - 2 - 18 - - - - - - - systemId - fileid - - - 12 - - - 1 - 2 - 9 - - - 3 - 4 - 3 - - - 4 - 5 - 1 - - - 5 - 6 - 1 - - - 20 - 21 - 1 - - - - - - - fileid - id - - - 12 - - - 1 - 2 - 72 - - - - - - - fileid - root - - - 12 - - - 1 - 2 - 72 - - - - - - - fileid - publicId - - - 12 - - - 1 - 2 - 72 - - - - - - - fileid - systemId - - - 12 - - - 1 - 2 - 72 - - - - - - - - - xmlElements - 67055539 - - - id - 67055539 - - - name - 5081 - - - parentid - 27349180 - - - idx - 78608 - - - fileid - 51258 - - - - - id - name - - - 12 - - - 1 - 2 - 67055539 - - - - - - - id - parentid - - - 12 - - - 1 - 2 - 67055539 - - - - - - - id - idx - - - 12 - - - 1 - 2 - 67055539 - - - - - - - id - fileid - - - 12 - - - 1 - 2 - 67055539 - - - - - - - name - id - - - 12 - - - 1 - 2 - 2522 - - - 2 - 3 - 729 - - - 3 - 4 - 230 - - - 4 - 6 - 386 - - - 6 - 18 - 393 - - - 18 - 45 - 383 - - - 45 - 23438 - 383 - - - 29236 - 5652342 - 52 - - - - - - - name - parentid - - - 12 - - - 1 - 2 - 2890 - - - 2 - 3 - 631 - - - 3 - 5 - 411 - - - 5 - 16 - 391 - - - 16 - 48 - 383 - - - 48 - 4842281 - 373 - - - - - - - name - idx - - - 12 - - - 1 - 2 - 3407 - - - 2 - 3 - 787 - - - 3 - 5 - 396 - - - 5 - 20 - 386 - - - 20 - 31356 - 105 - - - - - - - name - fileid - - - 12 - - - 1 - 2 - 3086 - - - 2 - 3 - 579 - - - 3 - 5 - 416 - - - 5 - 17 - 393 - - - 17 - 71 - 383 - - - 75 - 18136 - 223 - - - - - - - parentid - id - - - 12 - - - 1 - 2 - 16073753 - - - 2 - 3 - 5276115 - - - 3 - 4 - 2404943 - - - 4 - 6 - 2304967 - - - 6 - 31356 - 1289399 - - - - - - - parentid - name - - - 12 - - - 1 - 2 - 19031401 - - - 2 - 3 - 4596698 - - - 3 - 4 - 2298745 - - - 4 - 121 - 1422335 - - - - - - - parentid - idx - - - 12 - - - 1 - 2 - 16073753 - - - 2 - 3 - 5276115 - - - 3 - 4 - 2404943 - - - 4 - 6 - 2304967 - - - 6 - 31356 - 1289399 - - - - - - - parentid - fileid - - - 12 - - - 1 - 2 - 27349180 - - - - - - - idx - id - - - 12 - - - 1 - 2 - 35499 - - - 2 - 4 - 6999 - - - 4 - 11 - 4863 - - - 12 - 15 - 3316 - - - 15 - 24 - 6202 - - - 25 - 42 - 5954 - - - 43 - 64 - 5914 - - - 64 - 506 - 5901 - - - 506 - 10908964 - 3956 - - - - - - - idx - name - - - 12 - - - 1 - 2 - 77665 - - - 2 - 820 - 942 - - - - - - - idx - parentid - - - 12 - - - 1 - 2 - 35499 - - - 2 - 4 - 6999 - - - 4 - 11 - 4863 - - - 12 - 15 - 3316 - - - 15 - 24 - 6202 - - - 25 - 42 - 5954 - - - 43 - 64 - 5914 - - - 64 - 506 - 5901 - - - 506 - 10908964 - 3956 - - - - - - - idx - fileid - - - 12 - - - 1 - 2 - 35499 - - - 2 - 4 - 6999 - - - 4 - 11 - 4863 - - - 12 - 15 - 3316 - - - 15 - 24 - 6202 - - - 25 - 42 - 5954 - - - 43 - 64 - 5914 - - - 64 - 506 - 5901 - - - 506 - 20447 - 3956 - - - - - - - fileid - id - - - 12 - - - 1 - 15 - 4344 - - - 15 - 54 - 3951 - - - 54 - 103 - 3991 - - - 103 - 172 - 4379 - - - 173 - 236 - 4048 - - - 237 - 351 - 4562 - - - 351 - 564 - 3885 - - - 564 - 804 - 3850 - - - 806 - 996 - 4221 - - - 997 - 1436 - 4329 - - - 1441 - 2336 - 3860 - - - 2342 - 5717 - 3848 - - - 5804 - 173229 - 1983 - - - - - - - fileid - name - - - 12 - - - 1 - 7 - 4620 - - - 7 - 11 - 4139 - - - 11 - 12 - 5811 - - - 12 - 13 - 4279 - - - 13 - 14 - 5981 - - - 14 - 15 - 7167 - - - 15 - 16 - 4580 - - - 16 - 17 - 4016 - - - 17 - 19 - 4615 - - - 19 - 24 - 4269 - - - 24 - 240 - 1777 - - - - - - - fileid - parentid - - - 12 - - - 1 - 6 - 4166 - - - 6 - 19 - 3973 - - - 19 - 48 - 3855 - - - 48 - 72 - 3928 - - - 72 - 94 - 4209 - - - 94 - 142 - 3850 - - - 142 - 208 - 3921 - - - 209 - 314 - 4374 - - - 314 - 426 - 3848 - - - 426 - 585 - 3848 - - - 592 - 903 - 3845 - - - 904 - 1647 - 3905 - - - 1647 - 45210 - 3529 - - - - - - - fileid - idx - - - 12 - - - 1 - 6 - 3921 - - - 6 - 13 - 3858 - - - 13 - 28 - 3966 - - - 28 - 41 - 3665 - - - 41 - 48 - 4149 - - - 48 - 67 - 3860 - - - 67 - 96 - 3926 - - - 96 - 152 - 3983 - - - 152 - 199 - 3850 - - - 199 - 283 - 4713 - - - 283 - 386 - 3858 - - - 386 - 762 - 4061 - - - 763 - 31356 - 3444 - - - - - - - - - xmlAttrs - 45628904 - - - id - 45628904 - - - elementid - 45269560 - - - name - 1208 - - - value - 1023272 - - - idx - 32 - - - fileid - 50822 - - - - - id - elementid - - - 12 - - - 1 - 2 - 45628904 - - - - - - - id - name - - - 12 - - - 1 - 2 - 45628904 - - - - - - - id - value - - - 12 - - - 1 - 2 - 45628904 - - - - - - - id - idx - - - 12 - - - 1 - 2 - 45628904 - - - - - - - id - fileid - - - 12 - - - 1 - 2 - 45628904 - - - - - - - elementid - id - - - 12 - - - 1 - 2 - 45077900 - - - 2 - 14 - 191660 - - - - - - - elementid - name - - - 12 - - - 1 - 2 - 45077900 - - - 2 - 14 - 191660 - - - - - - - elementid - value - - - 12 - - - 1 - 2 - 45078108 - - - 2 - 13 - 191452 - - - - - - - elementid - idx - - - 12 - - - 1 - 2 - 45077900 - - - 2 - 14 - 191660 - - - - - - - elementid - fileid - - - 12 - - - 1 - 2 - 45269560 - - - - - - - name - id - - - 12 - - - 1 - 2 - 120 - - - 2 - 3 - 145 - - - 3 - 4 - 75 - - - 4 - 5 - 92 - - - 5 - 9 - 102 - - - 9 - 17 - 107 - - - 17 - 23 - 100 - - - 23 - 37 - 95 - - - 38 - 51 - 95 - - - 51 - 126 - 95 - - - 126 - 1237 - 92 - - - 1288 - 11202688 - 85 - - - - - - - name - elementid - - - 12 - - - 1 - 2 - 120 - - - 2 - 3 - 145 - - - 3 - 4 - 75 - - - 4 - 5 - 92 - - - 5 - 9 - 102 - - - 9 - 17 - 107 - - - 17 - 23 - 100 - - - 23 - 37 - 95 - - - 38 - 51 - 95 - - - 51 - 126 - 95 - - - 126 - 1237 - 92 - - - 1288 - 11202688 - 85 - - - - - - - name - value - - - 12 - - - 1 - 2 - 554 - - - 2 - 3 - 172 - - - 3 - 4 - 92 - - - 4 - 6 - 82 - - - 6 - 10 - 110 - - - 10 - 20 - 100 - - - 23 - 47718 - 92 - - - 389503 - 389504 - 2 - - - - - - - name - idx - - - 12 - - - 1 - 2 - 842 - - - 2 - 3 - 245 - - - 3 - 5 - 110 - - - 5 - 7 - 10 - - - - - - - name - fileid - - - 12 - - - 1 - 2 - 358 - - - 2 - 3 - 205 - - - 3 - 4 - 50 - - - 4 - 5 - 130 - - - 5 - 10 - 95 - - - 10 - 19 - 97 - - - 19 - 27 - 110 - - - 27 - 96 - 92 - - - 96 - 18200 - 67 - - - - - - - value - id - - - 12 - - - 1 - 2 - 172777 - - - 2 - 3 - 292834 - - - 3 - 4 - 91955 - - - 4 - 5 - 61901 - - - 5 - 6 - 46741 - - - 6 - 8 - 84359 - - - 8 - 13 - 89335 - - - 13 - 37 - 77108 - - - 37 - 165 - 77294 - - - 165 - 509314 - 28963 - - - - - - - value - elementid - - - 12 - - - 1 - 2 - 172792 - - - 2 - 3 - 292844 - - - 3 - 4 - 91950 - - - 4 - 5 - 61908 - - - 5 - 6 - 46751 - - - 6 - 8 - 84366 - - - 8 - 13 - 89315 - - - 13 - 37 - 77083 - - - 37 - 165 - 77294 - - - 165 - 509314 - 28963 - - - - - - - value - name - - - 12 - - - 1 - 2 - 914005 - - - 2 - 3 - 108644 - - - 3 - 79 - 621 - - - - - - - value - idx - - - 12 - - - 1 - 2 - 1021432 - - - 2 - 11 - 1840 - - - - - - - value - fileid - - - 12 - - - 1 - 2 - 186355 - - - 2 - 3 - 344083 - - - 3 - 4 - 95269 - - - 4 - 5 - 44923 - - - 5 - 6 - 51597 - - - 6 - 8 - 77921 - - - 8 - 15 - 82373 - - - 15 - 68 - 77986 - - - 68 - 10155 - 62761 - - - - - - - idx - id - - - 12 - - - 18 - 19 - 2 - - - 25 - 26 - 2 - - - 53 - 54 - 2 - - - 66 - 67 - 2 - - - 80 - 81 - 2 - - - 167 - 168 - 2 - - - 488 - 489 - 2 - - - 3298 - 3299 - 2 - - - 3710 - 3711 - 2 - - - 5951 - 5952 - 2 - - - 53029 - 53030 - 2 - - - 76449 - 76450 - 2 - - - 18056993 - 18056994 - 2 - - - - - - - idx - elementid - - - 12 - - - 18 - 19 - 2 - - - 25 - 26 - 2 - - - 53 - 54 - 2 - - - 66 - 67 - 2 - - - 80 - 81 - 2 - - - 167 - 168 - 2 - - - 488 - 489 - 2 - - - 3298 - 3299 - 2 - - - 3710 - 3711 - 2 - - - 5951 - 5952 - 2 - - - 53029 - 53030 - 2 - - - 76449 - 76450 - 2 - - - 18056993 - 18056994 - 2 - - - - - - - idx - name - - - 12 - - - 1 - 2 - 2 - - - 2 - 3 - 2 - - - 4 - 5 - 2 - - - 6 - 7 - 5 - - - 10 - 11 - 2 - - - 23 - 24 - 2 - - - 33 - 34 - 2 - - - 51 - 52 - 2 - - - 86 - 87 - 2 - - - 140 - 141 - 2 - - - 155 - 156 - 2 - - - 181 - 182 - 2 - - - - - - - idx - value - - - 12 - - - 2 - 3 - 2 - - - 6 - 7 - 2 - - - 10 - 11 - 2 - - - 17 - 18 - 2 - - - 19 - 20 - 2 - - - 27 - 28 - 2 - - - 35 - 36 - 2 - - - 69 - 70 - 2 - - - 117 - 118 - 2 - - - 206 - 207 - 2 - - - 733 - 734 - 2 - - - 3245 - 3246 - 2 - - - 404557 - 404558 - 2 - - - - - - - idx - fileid - - - 12 - - - 1 - 2 - 2 - - - 2 - 3 - 2 - - - 3 - 4 - 5 - - - 7 - 8 - 2 - - - 31 - 32 - 2 - - - 51 - 52 - 2 - - - 73 - 74 - 2 - - - 126 - 127 - 2 - - - 582 - 583 - 2 - - - 1889 - 1890 - 2 - - - 3098 - 3099 - 2 - - - 20272 - 20273 - 2 - - - - - - - fileid - id - - - 12 - - - 1 - 12 - 3988 - - - 12 - 34 - 4169 - - - 34 - 64 - 3853 - - - 64 - 109 - 4595 - - - 110 - 165 - 4071 - - - 165 - 228 - 3848 - - - 228 - 406 - 3805 - - - 407 - 464 - 4289 - - - 465 - 654 - 3893 - - - 656 - 873 - 3953 - - - 873 - 1602 - 3833 - - - 1605 - 3016 - 3845 - - - 3021 - 96503 - 2675 - - - - - - - fileid - elementid - - - 12 - - - 1 - 10 - 3850 - - - 10 - 30 - 3915 - - - 30 - 61 - 3835 - - - 61 - 105 - 3923 - - - 105 - 146 - 4083 - - - 146 - 221 - 3820 - - - 222 - 343 - 3820 - - - 343 - 446 - 3815 - - - 446 - 623 - 3823 - - - 623 - 788 - 4570 - - - 789 - 1329 - 4384 - - - 1334 - 2799 - 3878 - - - 2814 - 96503 - 3098 - - - - - - - fileid - name - - - 12 - - - 1 - 2 - 3123 - - - 2 - 3 - 19559 - - - 3 - 4 - 13086 - - - 4 - 5 - 6159 - - - 5 - 6 - 4693 - - - 6 - 11 - 3873 - - - 11 - 71 - 325 - - - - - - - fileid - value - - - 12 - - - 1 - 10 - 3838 - - - 10 - 27 - 4078 - - - 27 - 43 - 4199 - - - 43 - 61 - 4266 - - - 61 - 79 - 4354 - - - 79 - 116 - 4322 - - - 116 - 180 - 3895 - - - 181 - 237 - 4154 - - - 237 - 315 - 4031 - - - 316 - 419 - 3858 - - - 422 - 600 - 3833 - - - 601 - 1116 - 3865 - - - 1117 - 31691 - 2123 - - - - - - - fileid - idx - - - 12 - - - 1 - 2 - 43055 - - - 2 - 3 - 3031 - - - 3 - 5 - 4419 - - - 5 - 14 - 315 - - - - - - - - - xmlNs - 7710 - - - id - 429 - - - prefixName - 209 - - - URI - 429 - - - fileid - 5340 - - - - - id - prefixName - - - 12 - - - 1 - 2 - 369 - - - 2 - 3 - 43 - - - 3 - 5 - 16 - - - - - - - id - URI - - - 12 - - - 1 - 2 - 429 - - - - - - - id - fileid - - - 12 - - - 1 - 2 - 216 - - - 2 - 3 - 39 - - - 3 - 4 - 30 - - - 4 - 6 - 30 - - - 6 - 10 - 32 - - - 10 - 23 - 32 - - - 26 - 53 - 32 - - - 60 - 1917 - 14 - - - - - - - prefixName - id - - - 12 - - - 1 - 2 - 167 - - - 2 - 3 - 19 - - - 3 - 7 - 16 - - - 7 - 113 - 5 - - - - - - - prefixName - URI - - - 12 - - - 1 - 2 - 167 - - - 2 - 3 - 19 - - - 3 - 7 - 16 - - - 7 - 113 - 5 - - - - - - - prefixName - fileid - - - 12 - - - 1 - 2 - 99 - - - 2 - 3 - 23 - - - 3 - 4 - 18 - - - 4 - 8 - 16 - - - 8 - 23 - 18 - - - 26 - 27 - 18 - - - 27 - 2848 - 16 - - - - - - - URI - id - - - 12 - - - 1 - 2 - 429 - - - - - - - URI - prefixName - - - 12 - - - 1 - 2 - 369 - - - 2 - 3 - 43 - - - 3 - 5 - 16 - - - - - - - URI - fileid - - - 12 - - - 1 - 2 - 216 - - - 2 - 3 - 39 - - - 3 - 4 - 30 - - - 4 - 6 - 30 - - - 6 - 10 - 32 - - - 10 - 23 - 32 - - - 26 - 53 - 32 - - - 60 - 1917 - 14 - - - - - - - fileid - id - - - 12 - - - 1 - 2 - 4589 - - - 2 - 4 - 420 - - - 4 - 21 - 330 - - - - - - - fileid - prefixName - - - 12 - - - 1 - 2 - 4620 - - - 2 - 3 - 323 - - - 3 - 21 - 397 - - - - - - - fileid - URI - - - 12 - - - 1 - 2 - 4589 - - - 2 - 4 - 420 - - - 4 - 21 - 330 - - - - - - - - - xmlHasNs - 357558 - - - elementId - 357558 - - - nsId - 61 - - - fileid - 1851 - - - - - elementId - nsId - - - 12 - - - 1 - 2 - 357558 - - - - - - - elementId - fileid - - - 12 - - - 1 - 2 - 357558 - - - - - - - nsId - elementId - - - 12 - - - 280 - 281 - 20 - - - 306 - 307 - 20 - - - 16792 - 16793 - 20 - - - - - - - nsId - fileid - - - 12 - - - 3 - 4 - 20 - - - 12 - 13 - 20 - - - 75 - 76 - 20 - - - - - - - fileid - elementId - - - 12 - - - 3 - 4 - 20 - - - 4 - 5 - 205 - - - 7 - 9 - 144 - - - 9 - 14 - 144 - - - 18 - 25 - 144 - - - 35 - 52 - 144 - - - 52 - 73 - 164 - - - 74 - 90 - 144 - - - 95 - 121 - 164 - - - 128 - 155 - 144 - - - 156 - 227 - 144 - - - 233 - 429 - 144 - - - 577 - 6115 - 144 - - - - - - - fileid - nsId - - - 12 - - - 1 - 2 - 1851 - - - - - - - - - xmlComments - 12809 - - - id - 12809 - - - text - 4879 - - - parentid - 9500 - - - fileid - 7255 - - - - - id - text - - - 12 - - - 1 - 2 - 12809 - - - - - - - id - parentid - - - 12 - - - 1 - 2 - 12809 - - - - - - - id - fileid - - - 12 - - - 1 - 2 - 12809 - - - - - - - text - id - - - 12 - - - 1 - 2 - 3642 - - - 2 - 3 - 774 - - - 3 - 9 - 371 - - - 10 - 567 - 91 - - - - - - - text - parentid - - - 12 - - - 1 - 2 - 3654 - - - 2 - 3 - 784 - - - 3 - 13 - 373 - - - 13 - 567 - 67 - - - - - - - text - fileid - - - 12 - - - 1 - 2 - 3687 - - - 2 - 3 - 791 - - - 3 - 20 - 366 - - - 24 - 567 - 35 - - - - - - - parentid - id - - - 12 - - - 1 - 2 - 7992 - - - 2 - 3 - 949 - - - 3 - 104 - 557 - - - - - - - parentid - text - - - 12 - - - 1 - 2 - 7997 - - - 2 - 3 - 954 - - - 3 - 99 - 548 - - - - - - - parentid - fileid - - - 12 - - - 1 - 2 - 9500 - - - - - - - fileid - id - - - 12 - - - 1 - 2 - 5210 - - - 2 - 3 - 1360 - - - 3 - 8 - 574 - - - 8 - 197 - 109 - - - - - - - fileid - text - - - 12 - - - 1 - 2 - 5581 - - - 2 - 3 - 998 - - - 3 - 8 - 569 - - - 8 - 162 - 105 - - - - - - - fileid - parentid - - - 12 - - - 1 - 2 - 5906 - - - 2 - 3 - 1059 - - - 3 - 69 - 289 - - - - - - - - - xmlChars - 50180784 - - - id - 50180784 - - - text - 1818216 - - - parentid - 31634472 - - - idx - 150 - - - isCDATA - 5 - - - fileid - 49067 - - - - - id - text - - - 12 - - - 1 - 2 - 50180784 - - - - - - - id - parentid - - - 12 - - - 1 - 2 - 50180784 - - - - - - - id - idx - - - 12 - - - 1 - 2 - 50180784 - - - - - - - id - isCDATA - - - 12 - - - 1 - 2 - 50180784 - - - - - - - id - fileid - - - 12 - - - 1 - 2 - 50180784 - - - - - - - text - id - - - 12 - - - 1 - 2 - 190086 - - - 2 - 3 - 423589 - - - 3 - 4 - 100439 - - - 4 - 5 - 177322 - - - 5 - 6 - 53806 - - - 6 - 8 - 152869 - - - 8 - 10 - 147478 - - - 10 - 12 - 103307 - - - 12 - 15 - 93299 - - - 15 - 21 - 150863 - - - 21 - 67 - 136894 - - - 67 - 1003068 - 88260 - - - - - - - text - parentid - - - 12 - - - 1 - 2 - 190221 - - - 2 - 3 - 423619 - - - 3 - 4 - 100462 - - - 4 - 5 - 177362 - - - 5 - 6 - 53816 - - - 6 - 8 - 152846 - - - 8 - 10 - 147494 - - - 10 - 12 - 103325 - - - 12 - 15 - 93372 - - - 15 - 21 - 150996 - - - 21 - 67 - 136666 - - - 67 - 1000575 - 88034 - - - - - - - text - idx - - - 12 - - - 1 - 2 - 1784454 - - - 2 - 33 - 33762 - - - - - - - text - isCDATA - - - 12 - - - 1 - 2 - 1818213 - - - 2 - 3 - 2 - - - - - - - text - fileid - - - 12 - - - 1 - 2 - 256810 - - - 2 - 3 - 492750 - - - 3 - 4 - 134141 - - - 4 - 5 - 137247 - - - 5 - 6 - 63550 - - - 6 - 8 - 148887 - - - 8 - 10 - 138656 - - - 10 - 12 - 119803 - - - 12 - 15 - 79127 - - - 15 - 20 - 138215 - - - 20 - 15105 - 109023 - - - - - - - parentid - id - - - 12 - - - 1 - 2 - 19072554 - - - 2 - 3 - 9102321 - - - 3 - 5 - 2902114 - - - 5 - 61 - 557482 - - - - - - - parentid - text - - - 12 - - - 1 - 2 - 19074795 - - - 2 - 3 - 9111041 - - - 3 - 4 - 2305313 - - - 4 - 47 - 1143321 - - - - - - - parentid - idx - - - 12 - - - 1 - 2 - 19072554 - - - 2 - 3 - 9102321 - - - 3 - 5 - 2902114 - - - 5 - 61 - 557482 - - - - - - - parentid - isCDATA - - - 12 - - - 1 - 2 - 31633875 - - - 2 - 3 - 596 - - - - - - - parentid - fileid - - - 12 - - - 1 - 2 - 31634472 - - - - - - - idx - id - - - 12 - - - 1 - 2 - 42 - - - 2 - 3 - 7 - - - 3 - 12 - 12 - - - 143 - 179 - 12 - - - 179 - 671 - 12 - - - 672 - 1026 - 12 - - - 1033 - 2152 - 12 - - - 3032 - 10769 - 12 - - - 16820 - 119828 - 12 - - - 222367 - 12618269 - 12 - - - - - - - idx - text - - - 12 - - - 1 - 2 - 42 - - - 2 - 3 - 7 - - - 3 - 9 - 12 - - - 11 - 20 - 12 - - - 23 - 48 - 12 - - - 48 - 72 - 10 - - - 76 - 119 - 12 - - - 164 - 395 - 12 - - - 487 - 2261 - 12 - - - 3391 - 137772 - 12 - - - 546508 - 546509 - 2 - - - - - - - idx - parentid - - - 12 - - - 1 - 2 - 42 - - - 2 - 3 - 7 - - - 3 - 12 - 12 - - - 143 - 179 - 12 - - - 179 - 671 - 12 - - - 672 - 1026 - 12 - - - 1033 - 2152 - 12 - - - 3032 - 10769 - 12 - - - 16820 - 119828 - 12 - - - 222367 - 12618269 - 12 - - - - - - - idx - isCDATA - - - 12 - - - 1 - 2 - 137 - - - 2 - 3 - 12 - - - - - - - idx - fileid - - - 12 - - - 1 - 2 - 42 - - - 2 - 3 - 7 - - - 3 - 9 - 12 - - - 130 - 161 - 12 - - - 161 - 306 - 7 - - - 309 - 310 - 10 - - - 318 - 485 - 12 - - - 574 - 902 - 12 - - - 1021 - 2926 - 12 - - - 3636 - 14031 - 12 - - - 16349 - 19573 - 7 - - - - - - - isCDATA - id - - - 12 - - - 8497 - 8498 - 2 - - - 20007471 - 20007472 - 2 - - - - - - - isCDATA - text - - - 12 - - - 578 - 579 - 2 - - - 724668 - 724669 - 2 - - - - - - - isCDATA - parentid - - - 12 - - - 8442 - 8443 - 2 - - - 12610064 - 12610065 - 2 - - - - - - - isCDATA - idx - - - 12 - - - 5 - 6 - 2 - - - 60 - 61 - 2 - - - - - - - isCDATA - fileid - - - 12 - - - 91 - 92 - 2 - - - 19572 - 19573 - 2 - - - - - - - fileid - id - - - 12 - - - 1 - 9 - 3773 - - - 9 - 38 - 4083 - - - 38 - 85 - 4011 - - - 88 - 131 - 3783 - - - 133 - 179 - 3765 - - - 179 - 265 - 3986 - - - 266 - 408 - 3753 - - - 409 - 578 - 3828 - - - 578 - 710 - 3895 - - - 712 - 1057 - 3690 - - - 1057 - 1658 - 3680 - - - 1664 - 3328 - 3690 - - - 3346 - 98239 - 3126 - - - - - - - fileid - text - - - 12 - - - 1 - 8 - 3883 - - - 8 - 27 - 3858 - - - 27 - 53 - 3702 - - - 53 - 70 - 4144 - - - 70 - 95 - 3941 - - - 95 - 144 - 4389 - - - 145 - 208 - 4016 - - - 208 - 310 - 4424 - - - 311 - 416 - 4287 - - - 417 - 564 - 3717 - - - 564 - 900 - 4144 - - - 901 - 2855 - 3710 - - - 2857 - 30223 - 847 - - - - - - - fileid - parentid - - - 12 - - - 1 - 9 - 3800 - - - 9 - 31 - 3690 - - - 31 - 56 - 3825 - - - 56 - 84 - 3855 - - - 84 - 111 - 3890 - - - 111 - 166 - 3938 - - - 166 - 273 - 3725 - - - 273 - 394 - 3908 - - - 395 - 509 - 4477 - - - 510 - 699 - 3750 - - - 700 - 1079 - 3697 - - - 1083 - 1973 - 3732 - - - 1984 - 61987 - 2772 - - - - - - - fileid - idx - - - 12 - - - 1 - 2 - 5663 - - - 2 - 3 - 2416 - - - 3 - 4 - 5813 - - - 4 - 5 - 10697 - - - 5 - 6 - 7972 - - - 6 - 7 - 5264 - - - 7 - 9 - 3905 - - - 9 - 12 - 4294 - - - 12 - 61 - 3038 - - - - - - - fileid - isCDATA - - - 12 - - - 1 - 2 - 48839 - - - 2 - 3 - 228 - - - - - - - - - xmllocations - 162926731 - - - xmlElement - 162922041 - - - location - 142828357 - - - - - xmlElement - location - - - 12 - - - 1 - 2 - 162921993 - - - 2 - 1057 - 47 - - - - - - - location - xmlElement - - - 12 - - - 1 - 2 - 123073773 - - - 2 - 3 - 19573590 - - - 3 - 15 - 180993 - - - - - - - - - commentline - 1860741 - - - id - 1860741 - - - kind - 33 - - - text - 694930 - - - rawtext - 701268 - - - - - id - kind - - - 12 - - - 1 - 2 - 1860741 - - - - - - - id - text - - - 12 - - - 1 - 2 - 1860741 - - - - - - - id - rawtext - - - 12 - - - 1 - 2 - 1860741 - - - - - - - kind - id - - - 12 - - - 2462 - 2463 - 11 - - - 31123 - 31124 - 11 - - - 130806 - 130807 - 11 - - - - - - - kind - text - - - 12 - - - 1003 - 1004 - 11 - - - 22421 - 22422 - 11 - - - 38180 - 38181 - 11 - - - - - - - kind - rawtext - - - 12 - - - 1088 - 1089 - 11 - - - 22533 - 22534 - 11 - - - 38334 - 38335 - 11 - - - - - - - text - id - - - 12 - - - 1 - 2 - 581264 - - - 2 - 3 - 64405 - - - 3 - 21238 - 49260 - - - - - - - text - kind - - - 12 - - - 1 - 2 - 692688 - - - 2 - 4 - 2241 - - - - - - - text - rawtext - - - 12 - - - 1 - 2 - 690719 - - - 2 - 40 - 4210 - - - - - - - rawtext - id - - - 12 - - - 1 - 2 - 588146 - - - 2 - 3 - 63714 - - - 3 - 21237 - 49407 - - - - - - - rawtext - kind - - - 12 - - - 1 - 2 - 701268 - - - - - - - rawtext - text - - - 12 - - - 1 - 2 - 701268 - - - - - - - - - commentline_location - 1860741 - - - id - 1860741 - - - loc - 1860741 - - - - - id - loc - - - 12 - - - 1 - 2 - 1860741 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 1860741 - - - - - - - - - commentblock - 452748 - - - id - 452748 - - - - - - commentblock_location - 452748 - - - id - 452748 - - - loc - 452748 - - - - - id - loc - - - 12 - - - 1 - 2 - 452748 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 452748 - - - - - - - - - commentblock_binding - 1636184 - - - id - 452748 - - - entity - 706226 - - - bindtype - 45 - - - - - id - entity - - - 12 - - - 1 - 2 - 28772 - - - 2 - 3 - 104417 - - - 3 - 4 - 319558 - - - - - - - id - bindtype - - - 12 - - - 1 - 3 - 29089 - - - 3 - 4 - 104100 - - - 4 - 5 - 319558 - - - - - - - entity - id - - - 12 - - - 1 - 2 - 498273 - - - 2 - 3 - 169535 - - - 3 - 526 - 38416 - - - - - - - entity - bindtype - - - 12 - - - 1 - 2 - 267400 - - - 2 - 3 - 275934 - - - 3 - 4 - 151312 - - - 4 - 5 - 11579 - - - - - - - bindtype - id - - - 12 - - - 29783 - 29784 - 11 - - - 36938 - 36939 - 11 - - - 38861 - 38862 - 11 - - - 38970 - 38971 - 11 - - - - - - - bindtype - entity - - - 12 - - - 12587 - 12588 - 11 - - - 29493 - 29494 - 11 - - - 36905 - 36906 - 11 - - - 37591 - 37592 - 11 - - - - - - - - - commentblock_child - 2293999 - - - id - 452748 - - - commentline - 1859983 - - - index - 3656 - - - - - id - commentline - - - 12 - - - 1 - 2 - 140797 - - - 2 - 3 - 43747 - - - 3 - 4 - 103829 - - - 4 - 5 - 35303 - - - 5 - 6 - 58462 - - - 6 - 10 - 39525 - - - 10 - 323 - 31081 - - - - - - - id - index - - - 12 - - - 1 - 2 - 4629 - - - 2 - 3 - 137322 - - - 3 - 4 - 49735 - - - 4 - 5 - 98656 - - - 5 - 6 - 34092 - - - 6 - 7 - 58213 - - - 7 - 11 - 39254 - - - 11 - 324 - 30844 - - - - - - - commentline - id - - - 12 - - - 1 - 2 - 1859983 - - - - - - - commentline - index - - - 12 - - - 1 - 2 - 1425967 - - - 2 - 3 - 434015 - - - - - - - index - id - - - 12 - - - 1 - 2 - 1822 - - - 2 - 3 - 373 - - - 3 - 9 - 271 - - - 11 - 19 - 282 - - - 19 - 46 - 282 - - - 51 - 418 - 282 - - - 445 - 11337 - 282 - - - 14348 - 40000 - 56 - - - - - - - index - commentline - - - 12 - - - 1 - 2 - 1822 - - - 2 - 3 - 373 - - - 3 - 9 - 271 - - - 11 - 19 - 282 - - - 19 - 46 - 282 - - - 51 - 418 - 282 - - - 445 - 11337 - 282 - - - 14348 - 40000 - 56 - - - - - - - - - asp_elements - 184013 - - - id - 184013 - - - kind - 16 - - - loc - 184013 - - - - - id - kind - - - 12 - - - 1 - 2 - 184013 - - - - - - - id - loc - - - 12 - - - 1 - 2 - 184013 - - - - - - - kind - id - - - 12 - - - 161 - 162 - 1 - - - 325 - 326 - 1 - - - 760 - 761 - 1 - - - 848 - 849 - 1 - - - 1845 - 1846 - 1 - - - 13496 - 13497 - 1 - - - 18618 - 18619 - 1 - - - 32419 - 32420 - 1 - - - 33487 - 33488 - 1 - - - - - - - kind - loc - - - 12 - - - 161 - 162 - 1 - - - 325 - 326 - 1 - - - 760 - 761 - 1 - - - 848 - 849 - 1 - - - 1845 - 1846 - 1 - - - 13496 - 13497 - 1 - - - 18618 - 18619 - 1 - - - 32419 - 32420 - 1 - - - 33487 - 33488 - 1 - - - - - - - loc - id - - - 12 - - - 1 - 2 - 184013 - - - - - - - loc - kind - - - 12 - - - 1 - 2 - 184013 - - - - - - - - - asp_comment_server - 21 - - - comment - 21 - - - - - - asp_code_inline - 893 - - - code - 893 - - - - - - asp_directive_attribute - 9235 - - - directive - 3328 - - - index - 12 - - - name - 75 - - - value - 9235 - - - - - directive - index - - - 12 - - - 1 - 2 - 832 - - - 2 - 3 - 258 - - - 3 - 4 - 1113 - - - 4 - 5 - 1081 - - - 5 - 8 - 43 - - - - - - - directive - name - - - 12 - - - 1 - 2 - 832 - - - 2 - 3 - 258 - - - 3 - 4 - 1113 - - - 4 - 5 - 1081 - - - 5 - 8 - 43 - - - - - - - directive - value - - - 12 - - - 1 - 2 - 832 - - - 2 - 3 - 258 - - - 3 - 4 - 1113 - - - 4 - 5 - 1081 - - - 5 - 8 - 43 - - - - - - - index - directive - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 1 - - - 24 - 25 - 1 - - - 623 - 624 - 1 - - - 1240 - 1241 - 1 - - - 1383 - 1384 - 1 - - - 1844 - 1845 - 1 - - - - - - - index - name - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 1 - - - 7 - 8 - 3 - - - 19 - 20 - 3 - - - 26 - 27 - 1 - - - - - - - index - value - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 1 - - - 24 - 25 - 1 - - - 623 - 624 - 1 - - - 1240 - 1241 - 1 - - - 1383 - 1384 - 1 - - - 1844 - 1845 - 1 - - - - - - - name - directive - - - 12 - - - 1 - 2 - 18 - - - 2 - 3 - 3 - - - 3 - 4 - 5 - - - 4 - 5 - 7 - - - 5 - 6 - 3 - - - 6 - 7 - 3 - - - 7 - 8 - 5 - - - 9 - 22 - 5 - - - 22 - 24 - 5 - - - 35 - 165 - 5 - - - 496 - 527 - 5 - - - 692 - 713 - 5 - - - 1049 - 1050 - 1 - - - - - - - name - index - - - 12 - - - 1 - 2 - 39 - - - 2 - 3 - 14 - - - 3 - 4 - 14 - - - 4 - 6 - 5 - - - 6 - 7 - 1 - - - - - - - name - value - - - 12 - - - 1 - 2 - 18 - - - 2 - 3 - 3 - - - 3 - 4 - 5 - - - 4 - 5 - 7 - - - 5 - 6 - 3 - - - 6 - 7 - 3 - - - 7 - 8 - 5 - - - 9 - 22 - 5 - - - 22 - 24 - 5 - - - 35 - 165 - 5 - - - 496 - 527 - 5 - - - 692 - 713 - 5 - - - 1049 - 1050 - 1 - - - - - - - value - directive - - - 12 - - - 1 - 2 - 9235 - - - - - - - value - index - - - 12 - - - 1 - 2 - 9235 - - - - - - - value - name - - - 12 - - - 1 - 2 - 9235 - - - - - - - - - asp_directive_name - 3329 - - - directive - 3329 - - - name - 16 - - - - - directive - name - - - 12 - - - 1 - 2 - 3329 - - - - - - - name - directive - - - 12 - - - 2 - 3 - 3 - - - 6 - 7 - 5 - - - 83 - 84 - 1 - - - 195 - 196 - 1 - - - 530 - 531 - 1 - - - 1015 - 1016 - 1 - - - - - - - - - asp_element_body - 147082 - - - element - 147082 - - - body - 12449 - - - - - element - body - - - 12 - - - 1 - 2 - 147082 - - - - - - - body - element - - - 12 - - - 1 - 2 - 8191 - - - 2 - 3 - 1436 - - - 3 - 5 - 922 - - - 5 - 10 - 947 - - - 10 - 1007 - 934 - - - 1095 - 5694 - 16 - - - - - - - - - asp_tag_attribute - 49274 - - - tag - 20204 - - - index - 37 - - - name - 716 - - - attribute - 49274 - - - - - tag - index - - - 12 - - - 1 - 2 - 5724 - - - 2 - 3 - 7269 - - - 3 - 4 - 3266 - - - 4 - 5 - 2008 - - - 5 - 7 - 1586 - - - 7 - 22 - 348 - - - - - - - tag - name - - - 12 - - - 1 - 2 - 5724 - - - 2 - 3 - 7269 - - - 3 - 4 - 3266 - - - 4 - 5 - 2008 - - - 5 - 7 - 1586 - - - 7 - 22 - 348 - - - - - - - tag - attribute - - - 12 - - - 1 - 2 - 5724 - - - 2 - 3 - 7269 - - - 3 - 4 - 3266 - - - 4 - 5 - 2008 - - - 5 - 7 - 1586 - - - 7 - 22 - 348 - - - - - - - index - tag - - - 12 - - - 1 - 2 - 3 - - - 2 - 3 - 3 - - - 3 - 4 - 1 - - - 4 - 5 - 1 - - - 5 - 6 - 1 - - - 8 - 9 - 1 - - - 9 - 10 - 1 - - - 15 - 16 - 1 - - - 26 - 27 - 1 - - - 47 - 48 - 1 - - - 83 - 84 - 1 - - - 137 - 138 - 1 - - - 193 - 194 - 1 - - - 296 - 297 - 1 - - - 1072 - 1073 - 1 - - - 2185 - 2186 - 1 - - - 3995 - 3996 - 1 - - - 8023 - 8024 - 1 - - - 11195 - 11196 - 1 - - - - - - - index - name - - - 12 - - - 1 - 2 - 3 - - - 2 - 3 - 3 - - - 3 - 4 - 1 - - - 4 - 5 - 3 - - - 7 - 8 - 3 - - - 9 - 10 - 1 - - - 18 - 19 - 1 - - - 22 - 23 - 1 - - - 33 - 34 - 1 - - - 47 - 48 - 1 - - - 58 - 59 - 1 - - - 73 - 74 - 1 - - - 106 - 107 - 1 - - - 107 - 108 - 1 - - - 140 - 141 - 1 - - - 159 - 160 - 1 - - - 195 - 196 - 1 - - - - - - - index - attribute - - - 12 - - - 1 - 2 - 3 - - - 2 - 3 - 3 - - - 3 - 4 - 1 - - - 4 - 5 - 1 - - - 5 - 6 - 1 - - - 8 - 9 - 1 - - - 9 - 10 - 1 - - - 15 - 16 - 1 - - - 26 - 27 - 1 - - - 47 - 48 - 1 - - - 83 - 84 - 1 - - - 137 - 138 - 1 - - - 193 - 194 - 1 - - - 296 - 297 - 1 - - - 1072 - 1073 - 1 - - - 2185 - 2186 - 1 - - - 3995 - 3996 - 1 - - - 8023 - 8024 - 1 - - - 11195 - 11196 - 1 - - - - - - - name - tag - - - 12 - - - 1 - 2 - 216 - - - 2 - 3 - 77 - - - 3 - 4 - 39 - - - 4 - 5 - 45 - - - 5 - 8 - 61 - - - 8 - 12 - 55 - - - 12 - 18 - 59 - - - 18 - 35 - 54 - - - 35 - 109 - 54 - - - 110 - 5718 - 52 - - - - - - - name - index - - - 12 - - - 1 - 2 - 335 - - - 2 - 3 - 164 - - - 3 - 4 - 75 - - - 4 - 5 - 34 - - - 5 - 7 - 54 - - - 7 - 13 - 52 - - - - - - - name - attribute - - - 12 - - - 1 - 2 - 216 - - - 2 - 3 - 77 - - - 3 - 4 - 39 - - - 4 - 5 - 45 - - - 5 - 8 - 61 - - - 8 - 12 - 55 - - - 12 - 18 - 59 - - - 18 - 35 - 54 - - - 35 - 109 - 54 - - - 110 - 5718 - 52 - - - - - - - attribute - tag - - - 12 - - - 1 - 2 - 49274 - - - - - - - attribute - index - - - 12 - - - 1 - 2 - 49274 - - - - - - - attribute - name - - - 12 - - - 1 - 2 - 49274 - - - - - - - - - asp_tag_name - 33601 - - - tag - 33601 - - - name - 545 - - - - - tag - name - - - 12 - - - 1 - 2 - 33601 - - - - - - - name - tag - - - 12 - - - 1 - 2 - 138 - - - 2 - 3 - 57 - - - 3 - 5 - 41 - - - 5 - 8 - 48 - - - 8 - 12 - 43 - - - 12 - 19 - 41 - - - 19 - 31 - 45 - - - 32 - 53 - 41 - - - 53 - 161 - 41 - - - 170 - 996 - 41 - - - 1223 - 1970 - 3 - - - - - - - - - asp_tag_isempty - 4203 - - - tag - 4203 - - - - - - cil_instruction - 0 - - - id - 0 - - - opcode - 0 - - - index - 0 - - - impl - 0 - - - - - id - opcode - - - 12 - - - 1 - 2 - 2 - - - - - - - id - index - - - 12 - - - 1 - 2 - 2 - - - - - - - id - impl - - - 12 - - - 1 - 2 - 2 - - - - - - - opcode - id - - - 12 - - - - - - opcode - index - - - 12 - - - - - - opcode - impl - - - 12 - - - - - - index - id - - - 12 - - - - - - index - opcode - - - 12 - - - - - - index - impl - - - 12 - - - - - - impl - id - - - 12 - - - - - - impl - opcode - - - 12 - - - - - - impl - index - - - 12 - - - - - - - - cil_jump - 0 - - - instruction - 0 - - - target - 0 - - - - - instruction - target - - - 12 - - - 1 - 2 - 2 - - - - - - - target - instruction - - - 12 - - - - - - - - cil_access - 0 - - - instruction - 0 - - - target - 0 - - - - - instruction - target - - - 12 - - - 1 - 2 - 2 - - - - - - - target - instruction - - - 12 - - - - - - - - cil_value - 0 - - - instruction - 0 - - - value - 0 - - - - - instruction - value - - - 12 - - - 1 - 2 - 2 - - - - - - - value - instruction - - - 12 - - - - - - - - cil_switch - 0 - - - instruction - 0 - - - index - 0 - - - target - 0 - - - - - instruction - index - - - 12 - - - - - - instruction - target - - - 12 - - - - - - index - instruction - - - 12 - - - - - - index - target - - - 12 - - - - - - target - instruction - - - 12 - - - - - - target - index - - - 12 - - - - - - - - cil_instruction_location - 0 - - - id - 0 - - - loc - 0 - - - - - id - loc - - - 12 - - - 1 - 2 - 2 - - - - - - - loc - id - - - 12 - - - - - - - - cil_type_location - 0 - - - id - 0 - - - loc - 0 - - - - - id - loc - - - 12 - - - - - - loc - id - - - 12 - - - - - - - - cil_method_location - 0 - - - id - 0 - - - loc - 0 - - - - - id - loc - - - 12 - - - - - - loc - id - - - 12 - - - - - - - - cil_type - 0 - - - id - 0 - - - name - 0 - - - kind - 0 - - - parent - 0 - - - sourceDecl - 0 - - - - - id - name - - - 12 - - - 1 - 2 - 2 - - - - - - - id - kind - - - 12 - - - 1 - 2 - 2 - - - - - - - id - parent - - - 12 - - - 1 - 2 - 2 - - - - - - - id - sourceDecl - - - 12 - - - 1 - 2 - 2 - - - - - - - name - id - - - 12 - - - - - - name - kind - - - 12 - - - - - - name - parent - - - 12 - - - - - - name - sourceDecl - - - 12 - - - - - - kind - id - - - 12 - - - - - - kind - name - - - 12 - - - - - - kind - parent - - - 12 - - - - - - kind - sourceDecl - - - 12 - - - - - - parent - id - - - 12 - - - - - - parent - name - - - 12 - - - - - - parent - kind - - - 12 - - - - - - parent - sourceDecl - - - 12 - - - - - - sourceDecl - id - - - 12 - - - - - - sourceDecl - name - - - 12 - - - - - - sourceDecl - kind - - - 12 - - - - - - sourceDecl - parent - - - 12 - - - - - - - - cil_pointer_type - 0 - - - id - 0 - - - pointee - 0 - - - - - id - pointee - - - 12 - - - 1 - 2 - 2 - - - - - - - pointee - id - - - 12 - - - - - - - - cil_array_type - 0 - - - id - 0 - - - element_type - 0 - - - rank - 0 - - - - - id - element_type - - - 12 - - - 1 - 2 - 2 - - - - - - - id - rank - - - 12 - - - 1 - 2 - 2 - - - - - - - element_type - id - - - 12 - - - - - - element_type - rank - - - 12 - - - - - - rank - id - - - 12 - - - - - - rank - element_type - - - 12 - - - - - - - - cil_function_pointer_return_type - 0 - - - id - 0 - - - return_type - 0 - - - - - id - return_type - - - 12 - - - 1 - 2 - 2 - - - - - - - return_type - id - - - 12 - - - - - - - - cil_method - 0 - - - id - 0 - - - name - 0 - - - parent - 0 - - - return_type - 0 - - - - - id - name - - - 12 - - - 1 - 2 - 2 - - - - - - - id - parent - - - 12 - - - 1 - 2 - 2 - - - - - - - id - return_type - - - 12 - - - 1 - 2 - 2 - - - - - - - name - id - - - 12 - - - - - - name - parent - - - 12 - - - - - - name - return_type - - - 12 - - - - - - parent - id - - - 12 - - - - - - parent - name - - - 12 - - - - - - parent - return_type - - - 12 - - - - - - return_type - id - - - 12 - - - - - - return_type - name - - - 12 - - - - - - return_type - parent - - - 12 - - - - - - - - cil_method_source_declaration - 0 - - - method - 0 - - - source - 0 - - - - - method - source - - - 12 - - - 1 - 2 - 2 - - - - - - - source - method - - - 12 - - - - - - - - cil_method_implementation - 0 - - - id - 0 - - - method - 0 - - - location - 0 - - - - - id - method - - - 12 - - - 1 - 2 - 2 - - - - - - - id - location - - - 12 - - - 1 - 2 - 2 - - - - - - - method - id - - - 12 - - - - - - method - location - - - 12 - - - - - - location - id - - - 12 - - - - - - location - method - - - 12 - - - - - - - - cil_implements - 0 - - - id - 0 - - - decl - 0 - - - - - id - decl - - - 12 - - - - - - decl - id - - - 12 - - - - - - - - cil_field - 0 - - - id - 0 - - - parent - 0 - - - name - 0 - - - field_type - 0 - - - - - id - parent - - - 12 - - - 1 - 2 - 2 - - - - - - - id - name - - - 12 - - - 1 - 2 - 2 - - - - - - - id - field_type - - - 12 - - - 1 - 2 - 2 - - - - - - - parent - id - - - 12 - - - - - - parent - name - - - 12 - - - - - - parent - field_type - - - 12 - - - - - - name - id - - - 12 - - - - - - name - parent - - - 12 - - - - - - name - field_type - - - 12 - - - - - - field_type - id - - - 12 - - - - - - field_type - parent - - - 12 - - - - - - field_type - name - - - 12 - - - - - - - - cil_parameter - 0 - - - id - 0 - - - parameterizable - 0 - - - index - 0 - - - param_type - 0 - - - - - id - parameterizable - - - 12 - - - 1 - 2 - 2 - - - - - - - id - index - - - 12 - - - 1 - 2 - 2 - - - - - - - id - param_type - - - 12 - - - 1 - 2 - 2 - - - - - - - parameterizable - id - - - 12 - - - - - - parameterizable - index - - - 12 - - - - - - parameterizable - param_type - - - 12 - - - - - - index - id - - - 12 - - - - - - index - parameterizable - - - 12 - - - - - - index - param_type - - - 12 - - - - - - param_type - id - - - 12 - - - - - - param_type - parameterizable - - - 12 - - - - - - param_type - index - - - 12 - - - - - - - - cil_parameter_in - 0 - - - id - 0 - - - - - - cil_parameter_out - 0 - - - id - 0 - - - - - - cil_setter - 0 - - - prop - 0 - - - method - 0 - - - - - prop - method - - - 12 - - - 1 - 2 - 2 - - - - - - - method - prop - - - 12 - - - - - - - - cil_custom_modifiers - 0 - - - id - 0 - - - modifier - 0 - - - kind - 0 - - - - - id - modifier - - - 12 - - - - - - id - kind - - - 12 - - - - - - modifier - id - - - 12 - - - - - - modifier - kind - - - 12 - - - - - - kind - id - - - 12 - - - - - - kind - modifier - - - 12 - - - - - - - - cil_type_annotation - 0 - - - id - 0 - - - annotation - 0 - - - - - id - annotation - - - 12 - - - - - - annotation - id - - - 12 - - - - - - - - cil_getter - 0 - - - prop - 0 - - - method - 0 - - - - - prop - method - - - 12 - - - 1 - 2 - 2 - - - - - - - method - prop - - - 12 - - - - - - - - cil_adder - 0 - - - event - 0 - - - method - 0 - - - - - event - method - - - 12 - - - 1 - 2 - 2 - - - - - - - method - event - - - 12 - - - - - - - - cil_remover - 0 - - - event - 0 - - - method - 0 - - - - - event - method - - - 12 - - - 1 - 2 - 2 - - - - - - - method - event - - - 12 - - - - - - - - cil_raiser - 0 - - - event - 0 - - - method - 0 - - - - - event - method - - - 12 - - - 1 - 2 - 2 - - - - - - - method - event - - - 12 - - - - - - - - cil_property - 0 - - - id - 0 - - - parent - 0 - - - name - 0 - - - property_type - 0 - - - - - id - parent - - - 12 - - - 1 - 2 - 2 - - - - - - - id - name - - - 12 - - - 1 - 2 - 2 - - - - - - - id - property_type - - - 12 - - - 1 - 2 - 2 - - - - - - - parent - id - - - 12 - - - - - - parent - name - - - 12 - - - - - - parent - property_type - - - 12 - - - - - - name - id - - - 12 - - - - - - name - parent - - - 12 - - - - - - name - property_type - - - 12 - - - - - - property_type - id - - - 12 - - - - - - property_type - parent - - - 12 - - - - - - property_type - name - - - 12 - - - - - - - - cil_event - 0 - - - id - 0 - - - parent - 0 - - - name - 0 - - - event_type - 0 - - - - - id - parent - - - 12 - - - 1 - 2 - 2 - - - - - - - id - name - - - 12 - - - 1 - 2 - 2 - - - - - - - id - event_type - - - 12 - - - 1 - 2 - 2 - - - - - - - parent - id - - - 12 - - - - - - parent - name - - - 12 - - - - - - parent - event_type - - - 12 - - - - - - name - id - - - 12 - - - - - - name - parent - - - 12 - - - - - - name - event_type - - - 12 - - - - - - event_type - id - - - 12 - - - - - - event_type - parent - - - 12 - - - - - - event_type - name - - - 12 - - - - - - - - cil_local_variable - 0 - - - id - 0 - - - impl - 0 - - - index - 0 - - - var_type - 0 - - - - - id - impl - - - 12 - - - 1 - 2 - 2 - - - - - - - id - index - - - 12 - - - 1 - 2 - 2 - - - - - - - id - var_type - - - 12 - - - 1 - 2 - 2 - - - - - - - impl - id - - - 12 - - - - - - impl - index - - - 12 - - - - - - impl - var_type - - - 12 - - - - - - index - id - - - 12 - - - - - - index - impl - - - 12 - - - - - - index - var_type - - - 12 - - - - - - var_type - id - - - 12 - - - - - - var_type - impl - - - 12 - - - - - - var_type - index - - - 12 - - - - - - - - cil_function_pointer_calling_conventions - 0 - - - id - 0 - - - kind - 0 - - - - - id - kind - - - 12 - - - - - - kind - id - - - 12 - - - - - - - - cil_handler - 0 - - - id - 0 - - - impl - 0 - - - index - 0 - - - kind - 0 - - - try_start - 0 - - - try_end - 0 - - - handler_start - 0 - - - - - id - impl - - - 12 - - - 1 - 2 - 2 - - - - - - - id - index - - - 12 - - - 1 - 2 - 2 - - - - - - - id - kind - - - 12 - - - 1 - 2 - 2 - - - - - - - id - try_start - - - 12 - - - 1 - 2 - 2 - - - - - - - id - try_end - - - 12 - - - 1 - 2 - 2 - - - - - - - id - handler_start - - - 12 - - - 1 - 2 - 2 - - - - - - - impl - id - - - 12 - - - - - - impl - index - - - 12 - - - - - - impl - kind - - - 12 - - - - - - impl - try_start - - - 12 - - - - - - impl - try_end - - - 12 - - - - - - impl - handler_start - - - 12 - - - - - - index - id - - - 12 - - - - - - index - impl - - - 12 - - - - - - index - kind - - - 12 - - - - - - index - try_start - - - 12 - - - - - - index - try_end - - - 12 - - - - - - index - handler_start - - - 12 - - - - - - kind - id - - - 12 - - - - - - kind - impl - - - 12 - - - - - - kind - index - - - 12 - - - - - - kind - try_start - - - 12 - - - - - - kind - try_end - - - 12 - - - - - - kind - handler_start - - - 12 - - - - - - try_start - id - - - 12 - - - - - - try_start - impl - - - 12 - - - - - - try_start - index - - - 12 - - - - - - try_start - kind - - - 12 - - - - - - try_start - try_end - - - 12 - - - - - - try_start - handler_start - - - 12 - - - - - - try_end - id - - - 12 - - - - - - try_end - impl - - - 12 - - - - - - try_end - index - - - 12 - - - - - - try_end - kind - - - 12 - - - - - - try_end - try_start - - - 12 - - - - - - try_end - handler_start - - - 12 - - - - - - handler_start - id - - - 12 - - - - - - handler_start - impl - - - 12 - - - - - - handler_start - index - - - 12 - - - - - - handler_start - kind - - - 12 - - - - - - handler_start - try_start - - - 12 - - - - - - handler_start - try_end - - - 12 - - - - - - - - cil_handler_filter - 0 - - - id - 0 - - - filter_start - 0 - - - - - id - filter_start - - - 12 - - - 1 - 2 - 2 - - - - - - - filter_start - id - - - 12 - - - - - - - - cil_handler_type - 0 - - - id - 0 - - - catch_type - 0 - - - - - id - catch_type - - - 12 - - - 1 - 2 - 2 - - - - - - - catch_type - id - - - 12 - - - - - - - - cil_method_stack_size - 0 - - - method - 0 - - - size - 0 - - - - - method - size - - - 12 - - - 1 - 2 - 2 - - - - - - - size - method - - - 12 - - - - - - - - cil_public - 0 - - - id - 0 - - - - - - cil_private - 0 - - - id - 0 - - - - - - cil_protected - 0 - - - id - 0 - - - - - - cil_internal - 0 - - - id - 0 - - - - - - cil_static - 0 - - - id - 0 - - - - - - cil_sealed - 0 - - - id - 0 - - - - - - cil_virtual - 0 - - - id - 0 - - - - - - cil_abstract - 0 - - - id - 0 - - - - - - cil_class - 0 - - - id - 0 - - - - - - cil_interface - 0 - - - id - 0 - - - - - - cil_security - 0 - - - id - 0 - - - - - - cil_requiresecobject - 0 - - - id - 0 - - - - - - cil_specialname - 0 - - - id - 0 - - - - - - cil_newslot - 0 - - - id - 0 - - - - - - cil_base_class - 0 - - - id - 0 - - - base - 0 - - - - - id - base - - - 12 - - - 1 - 2 - 2 - - - - - - - base - id - - - 12 - - - - - - - - cil_base_interface - 0 - - - id - 0 - - - base - 0 - - - - - id - base - - - 12 - - - - - - base - id - - - 12 - - - - - - - - cil_enum_underlying_type - 0 - - - id - 0 - - - underlying - 0 - - - - - id - underlying - - - 12 - - - 1 - 2 - 2 - - - - - - - underlying - id - - - 12 - - - - - - - - cil_type_parameter - 0 - - - unbound - 0 - - - index - 0 - - - param - 0 - - - - - unbound - index - - - 12 - - - - - - unbound - param - - - 12 - - - - - - index - unbound - - - 12 - - - - - - index - param - - - 12 - - - - - - param - unbound - - - 12 - - - - - - param - index - - - 12 - - - - - - - - cil_type_argument - 0 - - - bound - 0 - - - index - 0 - - - t - 0 - - - - - bound - index - - - 12 - - - - - - bound - t - - - 12 - - - - - - index - bound - - - 12 - - - - - - index - t - - - 12 - - - - - - t - bound - - - 12 - - - - - - t - index - - - 12 - - - - - - - - cil_typeparam_covariant - 0 - - - tp - 0 - - - - - - cil_typeparam_contravariant - 0 - - - tp - 0 - - - - - - cil_typeparam_class - 0 - - - tp - 0 - - - - - - cil_typeparam_struct - 0 - - - tp - 0 - - - - - - cil_typeparam_new - 0 - - - tp - 0 - - - - - - cil_typeparam_constraint - 0 - - - tp - 0 - - - supertype - 0 - - - - - tp - supertype - - - 12 - - - - - - supertype - tp - - - 12 - - - - - - - - cil_attribute - 0 - - - attributeid - 0 - - - element - 0 - - - constructor - 0 - - - - - attributeid - element - - - 12 - - - 1 - 2 - 2 - - - - - - - attributeid - constructor - - - 12 - - - 1 - 2 - 2 - - - - - - - element - attributeid - - - 12 - - - - - - element - constructor - - - 12 - - - - - - constructor - attributeid - - - 12 - - - - - - constructor - element - - - 12 - - - - - - - - cil_attribute_named_argument - 0 - - - attribute_id - 0 - - - param - 0 - - - value - 0 - - - - - attribute_id - param - - - 12 - - - - - - attribute_id - value - - - 12 - - - - - - param - attribute_id - - - 12 - - - - - - param - value - - - 12 - - - - - - value - attribute_id - - - 12 - - - - - - value - param - - - 12 - - - - - - - - cil_attribute_positional_argument - 0 - - - attribute_id - 0 - - - index - 0 - - - value - 0 - - - - - attribute_id - index - - - 12 - - - - - - attribute_id - value - - - 12 - - - - - - index - attribute_id - - - 12 - - - - - - index - value - - - 12 - - - - - - value - attribute_id - - - 12 - - - - - - value - index - - - 12 - - - - - - - - metadata_handle - 47748481 - - - entity - 46753394 - - - location - 11316 - - - handle - 2013773 - - - - - entity - location - - - 12 - - - 1 - 2 - 46105352 - - - 2 - 551 - 648041 - - - - - - - entity - handle - - - 12 - - - 1 - 2 - 46140083 - - - 2 - 124 - 613310 - - - - - - - location - entity - - - 12 - - - 1 - 2 - 2201 - - - 2 - 77 - 864 - - - 78 - 189 - 864 - - - 194 - 346 - 864 - - - 356 - 558 - 864 - - - 566 - 910 - 864 - - - 917 - 1459 - 864 - - - 1476 - 2465 - 864 - - - 2493 - 3983 - 864 - - - 4037 - 7491 - 864 - - - 7549 - 28482 - 864 - - - 29128 - 92959 - 473 - - - - - - - location - handle - - - 12 - - - 1 - 2 - 2201 - - - 2 - 77 - 864 - - - 78 - 189 - 864 - - - 194 - 346 - 864 - - - 356 - 558 - 864 - - - 566 - 910 - 864 - - - 917 - 1459 - 864 - - - 1476 - 2465 - 864 - - - 2493 - 3983 - 864 - - - 4037 - 7491 - 864 - - - 7549 - 28482 - 864 - - - 29128 - 92959 - 473 - - - - - - - handle - entity - - - 12 - - - 1 - 2 - 285400 - - - 2 - 3 - 118205 - - - 3 - 5 - 172524 - - - 5 - 7 - 143574 - - - 7 - 9 - 149438 - - - 9 - 11 - 99132 - - - 11 - 14 - 182256 - - - 14 - 19 - 159479 - - - 19 - 25 - 178635 - - - 25 - 35 - 152628 - - - 35 - 48 - 152586 - - - 48 - 120 - 151743 - - - 120 - 401 - 68166 - - - - - - - handle - location - - - 12 - - - 1 - 2 - 285380 - - - 2 - 3 - 118205 - - - 3 - 5 - 172524 - - - 5 - 7 - 143574 - - - 7 - 9 - 149438 - - - 9 - 11 - 99132 - - - 11 - 14 - 182256 - - - 14 - 19 - 159479 - - - 19 - 25 - 178635 - - - 25 - 35 - 152628 - - - 35 - 48 - 152586 - - - 48 - 120 - 151722 - - - 120 - 551 - 68207 - - - - - - - - + + diff --git a/csharp/ql/lib/upgrades/21ede72308c41493f19b37720d8259d5eb307f12/old.dbscheme b/csharp/ql/lib/upgrades/21ede72308c41493f19b37720d8259d5eb307f12/old.dbscheme new file mode 100644 index 00000000000..21ede72308c --- /dev/null +++ b/csharp/ql/lib/upgrades/21ede72308c41493f19b37720d8259d5eb307f12/old.dbscheme @@ -0,0 +1,2099 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + unique int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, array = 3, this = 4 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); + +/* Common Intermediate Language - CIL */ + +case @cil_instruction.opcode of + 0 = @cil_nop +| 1 = @cil_break +| 2 = @cil_ldarg_0 +| 3 = @cil_ldarg_1 +| 4 = @cil_ldarg_2 +| 5 = @cil_ldarg_3 +| 6 = @cil_ldloc_0 +| 7 = @cil_ldloc_1 +| 8 = @cil_ldloc_2 +| 9 = @cil_ldloc_3 +| 10 = @cil_stloc_0 +| 11 = @cil_stloc_1 +| 12 = @cil_stloc_2 +| 13 = @cil_stloc_3 +| 14 = @cil_ldarg_s +| 15 = @cil_ldarga_s +| 16 = @cil_starg_s +| 17 = @cil_ldloc_s +| 18 = @cil_ldloca_s +| 19 = @cil_stloc_s +| 20 = @cil_ldnull +| 21 = @cil_ldc_i4_m1 +| 22 = @cil_ldc_i4_0 +| 23 = @cil_ldc_i4_1 +| 24 = @cil_ldc_i4_2 +| 25 = @cil_ldc_i4_3 +| 26 = @cil_ldc_i4_4 +| 27 = @cil_ldc_i4_5 +| 28 = @cil_ldc_i4_6 +| 29 = @cil_ldc_i4_7 +| 30 = @cil_ldc_i4_8 +| 31 = @cil_ldc_i4_s +| 32 = @cil_ldc_i4 +| 33 = @cil_ldc_i8 +| 34 = @cil_ldc_r4 +| 35 = @cil_ldc_r8 +| 37 = @cil_dup +| 38 = @cil_pop +| 39 = @cil_jmp +| 40 = @cil_call +| 41 = @cil_calli +| 42 = @cil_ret +| 43 = @cil_br_s +| 44 = @cil_brfalse_s +| 45 = @cil_brtrue_s +| 46 = @cil_beq_s +| 47 = @cil_bge_s +| 48 = @cil_bgt_s +| 49 = @cil_ble_s +| 50 = @cil_blt_s +| 51 = @cil_bne_un_s +| 52 = @cil_bge_un_s +| 53 = @cil_bgt_un_s +| 54 = @cil_ble_un_s +| 55 = @cil_blt_un_s +| 56 = @cil_br +| 57 = @cil_brfalse +| 58 = @cil_brtrue +| 59 = @cil_beq +| 60 = @cil_bge +| 61 = @cil_bgt +| 62 = @cil_ble +| 63 = @cil_blt +| 64 = @cil_bne_un +| 65 = @cil_bge_un +| 66 = @cil_bgt_un +| 67 = @cil_ble_un +| 68 = @cil_blt_un +| 69 = @cil_switch +| 70 = @cil_ldind_i1 +| 71 = @cil_ldind_u1 +| 72 = @cil_ldind_i2 +| 73 = @cil_ldind_u2 +| 74 = @cil_ldind_i4 +| 75 = @cil_ldind_u4 +| 76 = @cil_ldind_i8 +| 77 = @cil_ldind_i +| 78 = @cil_ldind_r4 +| 79 = @cil_ldind_r8 +| 80 = @cil_ldind_ref +| 81 = @cil_stind_ref +| 82 = @cil_stind_i1 +| 83 = @cil_stind_i2 +| 84 = @cil_stind_i4 +| 85 = @cil_stind_i8 +| 86 = @cil_stind_r4 +| 87 = @cil_stind_r8 +| 88 = @cil_add +| 89 = @cil_sub +| 90 = @cil_mul +| 91 = @cil_div +| 92 = @cil_div_un +| 93 = @cil_rem +| 94 = @cil_rem_un +| 95 = @cil_and +| 96 = @cil_or +| 97 = @cil_xor +| 98 = @cil_shl +| 99 = @cil_shr +| 100 = @cil_shr_un +| 101 = @cil_neg +| 102 = @cil_not +| 103 = @cil_conv_i1 +| 104 = @cil_conv_i2 +| 105 = @cil_conv_i4 +| 106 = @cil_conv_i8 +| 107 = @cil_conv_r4 +| 108 = @cil_conv_r8 +| 109 = @cil_conv_u4 +| 110 = @cil_conv_u8 +| 111 = @cil_callvirt +| 112 = @cil_cpobj +| 113 = @cil_ldobj +| 114 = @cil_ldstr +| 115 = @cil_newobj +| 116 = @cil_castclass +| 117 = @cil_isinst +| 118 = @cil_conv_r_un +| 121 = @cil_unbox +| 122 = @cil_throw +| 123 = @cil_ldfld +| 124 = @cil_ldflda +| 125 = @cil_stfld +| 126 = @cil_ldsfld +| 127 = @cil_ldsflda +| 128 = @cil_stsfld +| 129 = @cil_stobj +| 130 = @cil_conv_ovf_i1_un +| 131 = @cil_conv_ovf_i2_un +| 132 = @cil_conv_ovf_i4_un +| 133 = @cil_conv_ovf_i8_un +| 134 = @cil_conv_ovf_u1_un +| 135 = @cil_conv_ovf_u2_un +| 136 = @cil_conv_ovf_u4_un +| 137 = @cil_conv_ovf_u8_un +| 138 = @cil_conv_ovf_i_un +| 139 = @cil_conv_ovf_u_un +| 140 = @cil_box +| 141 = @cil_newarr +| 142 = @cil_ldlen +| 143 = @cil_ldelema +| 144 = @cil_ldelem_i1 +| 145 = @cil_ldelem_u1 +| 146 = @cil_ldelem_i2 +| 147 = @cil_ldelem_u2 +| 148 = @cil_ldelem_i4 +| 149 = @cil_ldelem_u4 +| 150 = @cil_ldelem_i8 +| 151 = @cil_ldelem_i +| 152 = @cil_ldelem_r4 +| 153 = @cil_ldelem_r8 +| 154 = @cil_ldelem_ref +| 155 = @cil_stelem_i +| 156 = @cil_stelem_i1 +| 157 = @cil_stelem_i2 +| 158 = @cil_stelem_i4 +| 159 = @cil_stelem_i8 +| 160 = @cil_stelem_r4 +| 161 = @cil_stelem_r8 +| 162 = @cil_stelem_ref +| 163 = @cil_ldelem +| 164 = @cil_stelem +| 165 = @cil_unbox_any +| 179 = @cil_conv_ovf_i1 +| 180 = @cil_conv_ovf_u1 +| 181 = @cil_conv_ovf_i2 +| 182 = @cil_conv_ovf_u2 +| 183 = @cil_conv_ovf_i4 +| 184 = @cil_conv_ovf_u4 +| 185 = @cil_conv_ovf_i8 +| 186 = @cil_conv_ovf_u8 +| 194 = @cil_refanyval +| 195 = @cil_ckinfinite +| 198 = @cil_mkrefany +| 208 = @cil_ldtoken +| 209 = @cil_conv_u2 +| 210 = @cil_conv_u1 +| 211 = @cil_conv_i +| 212 = @cil_conv_ovf_i +| 213 = @cil_conv_ovf_u +| 214 = @cil_add_ovf +| 215 = @cil_add_ovf_un +| 216 = @cil_mul_ovf +| 217 = @cil_mul_ovf_un +| 218 = @cil_sub_ovf +| 219 = @cil_sub_ovf_un +| 220 = @cil_endfinally +| 221 = @cil_leave +| 222 = @cil_leave_s +| 223 = @cil_stind_i +| 224 = @cil_conv_u +| 65024 = @cil_arglist +| 65025 = @cil_ceq +| 65026 = @cil_cgt +| 65027 = @cil_cgt_un +| 65028 = @cil_clt +| 65029 = @cil_clt_un +| 65030 = @cil_ldftn +| 65031 = @cil_ldvirtftn +| 65033 = @cil_ldarg +| 65034 = @cil_ldarga +| 65035 = @cil_starg +| 65036 = @cil_ldloc +| 65037 = @cil_ldloca +| 65038 = @cil_stloc +| 65039 = @cil_localloc +| 65041 = @cil_endfilter +| 65042 = @cil_unaligned +| 65043 = @cil_volatile +| 65044 = @cil_tail +| 65045 = @cil_initobj +| 65046 = @cil_constrained +| 65047 = @cil_cpblk +| 65048 = @cil_initblk +| 65050 = @cil_rethrow +| 65052 = @cil_sizeof +| 65053 = @cil_refanytype +| 65054 = @cil_readonly +; + +// CIL ignored instructions + +@cil_ignore = @cil_nop | @cil_break | @cil_volatile | @cil_unaligned; + +// CIL local/parameter/field access + +@cil_ldarg_any = @cil_ldarg_0 | @cil_ldarg_1 | @cil_ldarg_2 | @cil_ldarg_3 | @cil_ldarg_s | @cil_ldarga_s | @cil_ldarg | @cil_ldarga; +@cil_starg_any = @cil_starg | @cil_starg_s; + +@cil_ldloc_any = @cil_ldloc_0 | @cil_ldloc_1 | @cil_ldloc_2 | @cil_ldloc_3 | @cil_ldloc_s | @cil_ldloca_s | @cil_ldloc | @cil_ldloca; +@cil_stloc_any = @cil_stloc_0 | @cil_stloc_1 | @cil_stloc_2 | @cil_stloc_3 | @cil_stloc_s | @cil_stloc; + +@cil_ldfld_any = @cil_ldfld | @cil_ldsfld | @cil_ldsflda | @cil_ldflda; +@cil_stfld_any = @cil_stfld | @cil_stsfld; + +@cil_local_access = @cil_stloc_any | @cil_ldloc_any; +@cil_arg_access = @cil_starg_any | @cil_ldarg_any; +@cil_read_access = @cil_ldloc_any | @cil_ldarg_any | @cil_ldfld_any; +@cil_write_access = @cil_stloc_any | @cil_starg_any | @cil_stfld_any; + +@cil_stack_access = @cil_local_access | @cil_arg_access; +@cil_field_access = @cil_ldfld_any | @cil_stfld_any; + +@cil_access = @cil_read_access | @cil_write_access; + +// CIL constant/literal instructions + +@cil_ldc_i = @cil_ldc_i4_any | @cil_ldc_i8; + +@cil_ldc_i4_any = @cil_ldc_i4_m1 | @cil_ldc_i4_0 | @cil_ldc_i4_1 | @cil_ldc_i4_2 | @cil_ldc_i4_3 | + @cil_ldc_i4_4 | @cil_ldc_i4_5 | @cil_ldc_i4_6 | @cil_ldc_i4_7 | @cil_ldc_i4_8 | @cil_ldc_i4_s | @cil_ldc_i4; + +@cil_ldc_r = @cil_ldc_r4 | @cil_ldc_r8; + +@cil_literal = @cil_ldnull | @cil_ldc_i | @cil_ldc_r | @cil_ldstr; + +// Control flow + +@cil_conditional_jump = @cil_binary_jump | @cil_unary_jump; +@cil_binary_jump = @cil_beq_s | @cil_bge_s | @cil_bgt_s | @cil_ble_s | @cil_blt_s | + @cil_bne_un_s | @cil_bge_un_s | @cil_bgt_un_s | @cil_ble_un_s | @cil_blt_un_s | + @cil_beq | @cil_bge | @cil_bgt | @cil_ble | @cil_blt | + @cil_bne_un | @cil_bge_un | @cil_bgt_un | @cil_ble_un | @cil_blt_un; +@cil_unary_jump = @cil_brfalse_s | @cil_brtrue_s | @cil_brfalse | @cil_brtrue | @cil_switch; +@cil_unconditional_jump = @cil_br | @cil_br_s | @cil_leave_any; +@cil_leave_any = @cil_leave | @cil_leave_s; +@cil_jump = @cil_unconditional_jump | @cil_conditional_jump; + +// CIL call instructions + +@cil_call_any = @cil_jmp | @cil_call | @cil_calli | @cil_tail | @cil_callvirt | @cil_newobj; + +// CIL expression instructions + +@cil_expr = @cil_literal | @cil_binary_expr | @cil_unary_expr | @cil_call_any | @cil_read_access | + @cil_newarr | @cil_ldtoken | @cil_sizeof | + @cil_ldftn | @cil_ldvirtftn | @cil_localloc | @cil_mkrefany | @cil_refanytype | @cil_arglist | @cil_dup; + +@cil_unary_expr = + @cil_conversion_operation | @cil_unary_arithmetic_operation | @cil_unary_bitwise_operation| + @cil_ldlen | @cil_isinst | @cil_box | @cil_ldobj | @cil_castclass | @cil_unbox_any | + @cil_ldind | @cil_unbox; + +@cil_conversion_operation = + @cil_conv_i1 | @cil_conv_i2 | @cil_conv_i4 | @cil_conv_i8 | + @cil_conv_u1 | @cil_conv_u2 | @cil_conv_u4 | @cil_conv_u8 | + @cil_conv_ovf_i | @cil_conv_ovf_i_un | @cil_conv_ovf_i1 | @cil_conv_ovf_i1_un | + @cil_conv_ovf_i2 | @cil_conv_ovf_i2_un | @cil_conv_ovf_i4 | @cil_conv_ovf_i4_un | + @cil_conv_ovf_i8 | @cil_conv_ovf_i8_un | @cil_conv_ovf_u | @cil_conv_ovf_u_un | + @cil_conv_ovf_u1 | @cil_conv_ovf_u1_un | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_ovf_u4 | @cil_conv_ovf_u4_un | @cil_conv_ovf_u8 | @cil_conv_ovf_u8_un | + @cil_conv_r4 | @cil_conv_r8 | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_i | @cil_conv_u | @cil_conv_r_un; + +@cil_ldind = @cil_ldind_i | @cil_ldind_i1 | @cil_ldind_i2 | @cil_ldind_i4 | @cil_ldind_i8 | + @cil_ldind_r4 | @cil_ldind_r8 | @cil_ldind_ref | @cil_ldind_u1 | @cil_ldind_u2 | @cil_ldind_u4; + +@cil_stind = @cil_stind_i | @cil_stind_i1 | @cil_stind_i2 | @cil_stind_i4 | @cil_stind_i8 | + @cil_stind_r4 | @cil_stind_r8 | @cil_stind_ref; + +@cil_bitwise_operation = @cil_binary_bitwise_operation | @cil_unary_bitwise_operation; + +@cil_binary_bitwise_operation = @cil_and | @cil_or | @cil_xor | @cil_shr | @cil_shr | @cil_shr_un | @cil_shl; + +@cil_binary_arithmetic_operation = @cil_add | @cil_sub | @cil_mul | @cil_div | @cil_div_un | + @cil_rem | @cil_rem_un | @cil_add_ovf | @cil_add_ovf_un | @cil_mul_ovf | @cil_mul_ovf_un | + @cil_sub_ovf | @cil_sub_ovf_un; + +@cil_unary_bitwise_operation = @cil_not; + +@cil_binary_expr = @cil_binary_arithmetic_operation | @cil_binary_bitwise_operation | @cil_read_array | @cil_comparison_operation; + +@cil_unary_arithmetic_operation = @cil_neg; + +@cil_comparison_operation = @cil_cgt_un | @cil_ceq | @cil_cgt | @cil_clt | @cil_clt_un; + +// Elements that retrieve an address of something +@cil_read_ref = @cil_ldloca_s | @cil_ldarga_s | @cil_ldflda | @cil_ldsflda | @cil_ldelema; + +// CIL array instructions + +@cil_read_array = + @cil_ldelem | @cil_ldelema | @cil_ldelem_i1 | @cil_ldelem_ref | @cil_ldelem_i | + @cil_ldelem_i1 | @cil_ldelem_i2 | @cil_ldelem_i4 | @cil_ldelem_i8 | @cil_ldelem_r4 | + @cil_ldelem_r8 | @cil_ldelem_u1 | @cil_ldelem_u2 | @cil_ldelem_u4; + +@cil_write_array = @cil_stelem | @cil_stelem_ref | + @cil_stelem_i | @cil_stelem_i1 | @cil_stelem_i2 | @cil_stelem_i4 | @cil_stelem_i8 | + @cil_stelem_r4 | @cil_stelem_r8; + +@cil_throw_any = @cil_throw | @cil_rethrow; + +#keyset[impl, index] +cil_instruction( + unique int id: @cil_instruction, + int opcode: int ref, + int index: int ref, + int impl: @cil_method_implementation ref); + +cil_jump( + unique int instruction: @cil_jump ref, + int target: @cil_instruction ref); + +cil_access( + unique int instruction: @cil_instruction ref, + int target: @cil_accessible ref); + +cil_value( + unique int instruction: @cil_literal ref, + string value: string ref); + +#keyset[instruction, index] +cil_switch( + int instruction: @cil_switch ref, + int index: int ref, + int target: @cil_instruction ref); + +cil_instruction_location( + unique int id: @cil_instruction ref, + int loc: @location ref); + +cil_type_location( + int id: @cil_type ref, + int loc: @location ref); + +cil_method_location( + int id: @cil_method ref, + int loc: @location ref); + +@cil_namespace = @namespace; + +@cil_type_container = @cil_type | @cil_namespace | @cil_method; + +case @cil_type.kind of + 0 = @cil_valueorreftype +| 1 = @cil_typeparameter +| 2 = @cil_array_type +| 3 = @cil_pointer_type +| 4 = @cil_function_pointer_type +; + +cil_type( + unique int id: @cil_type, + string name: string ref, + int kind: int ref, + int parent: @cil_type_container ref, + int sourceDecl: @cil_type ref); + +cil_pointer_type( + unique int id: @cil_pointer_type ref, + int pointee: @cil_type ref); + +cil_array_type( + unique int id: @cil_array_type ref, + int element_type: @cil_type ref, + int rank: int ref); + +cil_function_pointer_return_type( + unique int id: @cil_function_pointer_type ref, + int return_type: @cil_type ref); + +cil_method( + unique int id: @cil_method, + string name: string ref, + int parent: @cil_type ref, + int return_type: @cil_type ref); + +cil_method_source_declaration( + unique int method: @cil_method ref, + int source: @cil_method ref); + +cil_method_implementation( + unique int id: @cil_method_implementation, + int method: @cil_method ref, + int location: @assembly ref); + +cil_implements( + int id: @cil_method ref, + int decl: @cil_method ref); + +#keyset[parent, name] +cil_field( + unique int id: @cil_field, + int parent: @cil_type ref, + string name: string ref, + int field_type: @cil_type ref); + +@cil_element = @cil_instruction | @cil_declaration | @cil_handler | @cil_attribute | @cil_namespace; +@cil_named_element = @cil_declaration | @cil_namespace; +@cil_declaration = @cil_variable | @cil_method | @cil_type | @cil_member; +@cil_accessible = @cil_declaration; +@cil_variable = @cil_field | @cil_stack_variable; +@cil_stack_variable = @cil_local_variable | @cil_parameter; +@cil_member = @cil_method | @cil_type | @cil_field | @cil_property | @cil_event; +@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field | @cil_function_pointer_type; +@cil_parameterizable = @cil_method | @cil_function_pointer_type; +@cil_has_type_annotation = @cil_stack_variable | @cil_property | @cil_field | @cil_method | @cil_function_pointer_type; + +#keyset[parameterizable, index] +cil_parameter( + unique int id: @cil_parameter, + int parameterizable: @cil_parameterizable ref, + int index: int ref, + int param_type: @cil_type ref); + +cil_parameter_in(unique int id: @cil_parameter ref); +cil_parameter_out(unique int id: @cil_parameter ref); + +cil_setter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +#keyset[id, modifier] +cil_custom_modifiers( + int id: @cil_custom_modifier_receiver ref, + int modifier: @cil_type ref, + int kind: int ref); // modreq: 1, modopt: 0 + +cil_type_annotation( + int id: @cil_has_type_annotation ref, + int annotation: int ref); + +cil_getter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +cil_adder(unique int event: @cil_event ref, + int method: @cil_method ref); + +cil_remover(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_raiser(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_property( + unique int id: @cil_property, + int parent: @cil_type ref, + string name: string ref, + int property_type: @cil_type ref); + +#keyset[parent, name] +cil_event(unique int id: @cil_event, + int parent: @cil_type ref, + string name: string ref, + int event_type: @cil_type ref); + +#keyset[impl, index] +cil_local_variable( + unique int id: @cil_local_variable, + int impl: @cil_method_implementation ref, + int index: int ref, + int var_type: @cil_type ref); + +cil_function_pointer_calling_conventions( + int id: @cil_function_pointer_type ref, + int kind: int ref); + +// CIL handlers (exception handlers etc). + +case @cil_handler.kind of + 0 = @cil_catch_handler +| 1 = @cil_filter_handler +| 2 = @cil_finally_handler +| 4 = @cil_fault_handler +; + +#keyset[impl, index] +cil_handler( + unique int id: @cil_handler, + int impl: @cil_method_implementation ref, + int index: int ref, + int kind: int ref, + int try_start: @cil_instruction ref, + int try_end: @cil_instruction ref, + int handler_start: @cil_instruction ref); + +cil_handler_filter( + unique int id: @cil_handler ref, + int filter_start: @cil_instruction ref); + +cil_handler_type( + unique int id: @cil_handler ref, + int catch_type: @cil_type ref); + +@cil_controlflow_node = @cil_entry_point | @cil_instruction; + +@cil_entry_point = @cil_method_implementation | @cil_handler; + +@cil_dataflow_node = @cil_instruction | @cil_variable | @cil_method; + +cil_method_stack_size( + unique int method: @cil_method_implementation ref, + int size: int ref); + +// CIL modifiers + +cil_public(int id: @cil_member ref); +cil_private(int id: @cil_member ref); +cil_protected(int id: @cil_member ref); +cil_internal(int id: @cil_member ref); +cil_static(int id: @cil_member ref); +cil_sealed(int id: @cil_member ref); +cil_virtual(int id: @cil_method ref); +cil_abstract(int id: @cil_member ref); +cil_class(int id: @cil_type ref); +cil_interface(int id: @cil_type ref); +cil_security(int id: @cil_member ref); +cil_requiresecobject(int id: @cil_method ref); +cil_specialname(int id: @cil_method ref); +cil_newslot(int id: @cil_method ref); + +cil_base_class(unique int id: @cil_type ref, int base: @cil_type ref); +cil_base_interface(int id: @cil_type ref, int base: @cil_type ref); +cil_enum_underlying_type(unique int id: @cil_type ref, int underlying: @cil_type ref); + +#keyset[unbound, index] +cil_type_parameter( + int unbound: @cil_member ref, + int index: int ref, + int param: @cil_typeparameter ref); + +#keyset[bound, index] +cil_type_argument( + int bound: @cil_member ref, + int index: int ref, + int t: @cil_type ref); + +// CIL type parameter constraints + +cil_typeparam_covariant(int tp: @cil_typeparameter ref); +cil_typeparam_contravariant(int tp: @cil_typeparameter ref); +cil_typeparam_class(int tp: @cil_typeparameter ref); +cil_typeparam_struct(int tp: @cil_typeparameter ref); +cil_typeparam_new(int tp: @cil_typeparameter ref); +cil_typeparam_constraint(int tp: @cil_typeparameter ref, int supertype: @cil_type ref); + +// CIL attributes + +cil_attribute( + unique int attributeid: @cil_attribute, + int element: @cil_declaration ref, + int constructor: @cil_method ref); + +#keyset[attribute_id, param] +cil_attribute_named_argument( + int attribute_id: @cil_attribute ref, + string param: string ref, + string value: string ref); + +#keyset[attribute_id, index] +cil_attribute_positional_argument( + int attribute_id: @cil_attribute ref, + int index: int ref, + string value: string ref); + + +// Common .Net data model covering both C# and CIL + +// Common elements +@dotnet_element = @element | @cil_element; +@dotnet_named_element = @named_element | @cil_named_element; +@dotnet_callable = @callable | @cil_method; +@dotnet_variable = @variable | @cil_variable; +@dotnet_field = @field | @cil_field; +@dotnet_parameter = @parameter | @cil_parameter; +@dotnet_declaration = @declaration | @cil_declaration; +@dotnet_member = @member | @cil_member; +@dotnet_event = @event | @cil_event; +@dotnet_property = @property | @cil_property | @indexer; +@dotnet_parameterizable = @parameterizable | @cil_parameterizable; + +// Common types +@dotnet_type = @type | @cil_type; +@dotnet_call = @call | @cil_call_any; +@dotnet_throw = @throw_element | @cil_throw_any; +@dotnet_valueorreftype = @cil_valueorreftype | @value_or_ref_type | @cil_array_type | @void_type; +@dotnet_typeparameter = @type_parameter | @cil_typeparameter; +@dotnet_array_type = @array_type | @cil_array_type; +@dotnet_pointer_type = @pointer_type | @cil_pointer_type; +@dotnet_type_parameter = @type_parameter | @cil_typeparameter; +@dotnet_generic = @dotnet_valueorreftype | @dotnet_callable; + +// Attributes +@dotnet_attribute = @attribute | @cil_attribute; + +// Expressions +@dotnet_expr = @expr | @cil_expr; + +// Literals +@dotnet_literal = @literal_expr | @cil_literal; +@dotnet_string_literal = @string_literal_expr | @cil_ldstr; +@dotnet_int_literal = @integer_literal_expr | @cil_ldc_i; +@dotnet_float_literal = @float_literal_expr | @cil_ldc_r; +@dotnet_null_literal = @null_literal_expr | @cil_ldnull; + +@metadata_entity = @cil_method | @cil_type | @cil_field | @cil_property | @field | @property | + @callable | @value_or_ref_type | @void_type; + +metadata_handle(int entity : @metadata_entity ref, int location: @assembly ref, int handle: int ref) diff --git a/csharp/ql/lib/upgrades/21ede72308c41493f19b37720d8259d5eb307f12/semmlecode.csharp.dbscheme b/csharp/ql/lib/upgrades/21ede72308c41493f19b37720d8259d5eb307f12/semmlecode.csharp.dbscheme new file mode 100644 index 00000000000..fd04e45710e --- /dev/null +++ b/csharp/ql/lib/upgrades/21ede72308c41493f19b37720d8259d5eb307f12/semmlecode.csharp.dbscheme @@ -0,0 +1,2099 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + unique int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); + +/* Common Intermediate Language - CIL */ + +case @cil_instruction.opcode of + 0 = @cil_nop +| 1 = @cil_break +| 2 = @cil_ldarg_0 +| 3 = @cil_ldarg_1 +| 4 = @cil_ldarg_2 +| 5 = @cil_ldarg_3 +| 6 = @cil_ldloc_0 +| 7 = @cil_ldloc_1 +| 8 = @cil_ldloc_2 +| 9 = @cil_ldloc_3 +| 10 = @cil_stloc_0 +| 11 = @cil_stloc_1 +| 12 = @cil_stloc_2 +| 13 = @cil_stloc_3 +| 14 = @cil_ldarg_s +| 15 = @cil_ldarga_s +| 16 = @cil_starg_s +| 17 = @cil_ldloc_s +| 18 = @cil_ldloca_s +| 19 = @cil_stloc_s +| 20 = @cil_ldnull +| 21 = @cil_ldc_i4_m1 +| 22 = @cil_ldc_i4_0 +| 23 = @cil_ldc_i4_1 +| 24 = @cil_ldc_i4_2 +| 25 = @cil_ldc_i4_3 +| 26 = @cil_ldc_i4_4 +| 27 = @cil_ldc_i4_5 +| 28 = @cil_ldc_i4_6 +| 29 = @cil_ldc_i4_7 +| 30 = @cil_ldc_i4_8 +| 31 = @cil_ldc_i4_s +| 32 = @cil_ldc_i4 +| 33 = @cil_ldc_i8 +| 34 = @cil_ldc_r4 +| 35 = @cil_ldc_r8 +| 37 = @cil_dup +| 38 = @cil_pop +| 39 = @cil_jmp +| 40 = @cil_call +| 41 = @cil_calli +| 42 = @cil_ret +| 43 = @cil_br_s +| 44 = @cil_brfalse_s +| 45 = @cil_brtrue_s +| 46 = @cil_beq_s +| 47 = @cil_bge_s +| 48 = @cil_bgt_s +| 49 = @cil_ble_s +| 50 = @cil_blt_s +| 51 = @cil_bne_un_s +| 52 = @cil_bge_un_s +| 53 = @cil_bgt_un_s +| 54 = @cil_ble_un_s +| 55 = @cil_blt_un_s +| 56 = @cil_br +| 57 = @cil_brfalse +| 58 = @cil_brtrue +| 59 = @cil_beq +| 60 = @cil_bge +| 61 = @cil_bgt +| 62 = @cil_ble +| 63 = @cil_blt +| 64 = @cil_bne_un +| 65 = @cil_bge_un +| 66 = @cil_bgt_un +| 67 = @cil_ble_un +| 68 = @cil_blt_un +| 69 = @cil_switch +| 70 = @cil_ldind_i1 +| 71 = @cil_ldind_u1 +| 72 = @cil_ldind_i2 +| 73 = @cil_ldind_u2 +| 74 = @cil_ldind_i4 +| 75 = @cil_ldind_u4 +| 76 = @cil_ldind_i8 +| 77 = @cil_ldind_i +| 78 = @cil_ldind_r4 +| 79 = @cil_ldind_r8 +| 80 = @cil_ldind_ref +| 81 = @cil_stind_ref +| 82 = @cil_stind_i1 +| 83 = @cil_stind_i2 +| 84 = @cil_stind_i4 +| 85 = @cil_stind_i8 +| 86 = @cil_stind_r4 +| 87 = @cil_stind_r8 +| 88 = @cil_add +| 89 = @cil_sub +| 90 = @cil_mul +| 91 = @cil_div +| 92 = @cil_div_un +| 93 = @cil_rem +| 94 = @cil_rem_un +| 95 = @cil_and +| 96 = @cil_or +| 97 = @cil_xor +| 98 = @cil_shl +| 99 = @cil_shr +| 100 = @cil_shr_un +| 101 = @cil_neg +| 102 = @cil_not +| 103 = @cil_conv_i1 +| 104 = @cil_conv_i2 +| 105 = @cil_conv_i4 +| 106 = @cil_conv_i8 +| 107 = @cil_conv_r4 +| 108 = @cil_conv_r8 +| 109 = @cil_conv_u4 +| 110 = @cil_conv_u8 +| 111 = @cil_callvirt +| 112 = @cil_cpobj +| 113 = @cil_ldobj +| 114 = @cil_ldstr +| 115 = @cil_newobj +| 116 = @cil_castclass +| 117 = @cil_isinst +| 118 = @cil_conv_r_un +| 121 = @cil_unbox +| 122 = @cil_throw +| 123 = @cil_ldfld +| 124 = @cil_ldflda +| 125 = @cil_stfld +| 126 = @cil_ldsfld +| 127 = @cil_ldsflda +| 128 = @cil_stsfld +| 129 = @cil_stobj +| 130 = @cil_conv_ovf_i1_un +| 131 = @cil_conv_ovf_i2_un +| 132 = @cil_conv_ovf_i4_un +| 133 = @cil_conv_ovf_i8_un +| 134 = @cil_conv_ovf_u1_un +| 135 = @cil_conv_ovf_u2_un +| 136 = @cil_conv_ovf_u4_un +| 137 = @cil_conv_ovf_u8_un +| 138 = @cil_conv_ovf_i_un +| 139 = @cil_conv_ovf_u_un +| 140 = @cil_box +| 141 = @cil_newarr +| 142 = @cil_ldlen +| 143 = @cil_ldelema +| 144 = @cil_ldelem_i1 +| 145 = @cil_ldelem_u1 +| 146 = @cil_ldelem_i2 +| 147 = @cil_ldelem_u2 +| 148 = @cil_ldelem_i4 +| 149 = @cil_ldelem_u4 +| 150 = @cil_ldelem_i8 +| 151 = @cil_ldelem_i +| 152 = @cil_ldelem_r4 +| 153 = @cil_ldelem_r8 +| 154 = @cil_ldelem_ref +| 155 = @cil_stelem_i +| 156 = @cil_stelem_i1 +| 157 = @cil_stelem_i2 +| 158 = @cil_stelem_i4 +| 159 = @cil_stelem_i8 +| 160 = @cil_stelem_r4 +| 161 = @cil_stelem_r8 +| 162 = @cil_stelem_ref +| 163 = @cil_ldelem +| 164 = @cil_stelem +| 165 = @cil_unbox_any +| 179 = @cil_conv_ovf_i1 +| 180 = @cil_conv_ovf_u1 +| 181 = @cil_conv_ovf_i2 +| 182 = @cil_conv_ovf_u2 +| 183 = @cil_conv_ovf_i4 +| 184 = @cil_conv_ovf_u4 +| 185 = @cil_conv_ovf_i8 +| 186 = @cil_conv_ovf_u8 +| 194 = @cil_refanyval +| 195 = @cil_ckinfinite +| 198 = @cil_mkrefany +| 208 = @cil_ldtoken +| 209 = @cil_conv_u2 +| 210 = @cil_conv_u1 +| 211 = @cil_conv_i +| 212 = @cil_conv_ovf_i +| 213 = @cil_conv_ovf_u +| 214 = @cil_add_ovf +| 215 = @cil_add_ovf_un +| 216 = @cil_mul_ovf +| 217 = @cil_mul_ovf_un +| 218 = @cil_sub_ovf +| 219 = @cil_sub_ovf_un +| 220 = @cil_endfinally +| 221 = @cil_leave +| 222 = @cil_leave_s +| 223 = @cil_stind_i +| 224 = @cil_conv_u +| 65024 = @cil_arglist +| 65025 = @cil_ceq +| 65026 = @cil_cgt +| 65027 = @cil_cgt_un +| 65028 = @cil_clt +| 65029 = @cil_clt_un +| 65030 = @cil_ldftn +| 65031 = @cil_ldvirtftn +| 65033 = @cil_ldarg +| 65034 = @cil_ldarga +| 65035 = @cil_starg +| 65036 = @cil_ldloc +| 65037 = @cil_ldloca +| 65038 = @cil_stloc +| 65039 = @cil_localloc +| 65041 = @cil_endfilter +| 65042 = @cil_unaligned +| 65043 = @cil_volatile +| 65044 = @cil_tail +| 65045 = @cil_initobj +| 65046 = @cil_constrained +| 65047 = @cil_cpblk +| 65048 = @cil_initblk +| 65050 = @cil_rethrow +| 65052 = @cil_sizeof +| 65053 = @cil_refanytype +| 65054 = @cil_readonly +; + +// CIL ignored instructions + +@cil_ignore = @cil_nop | @cil_break | @cil_volatile | @cil_unaligned; + +// CIL local/parameter/field access + +@cil_ldarg_any = @cil_ldarg_0 | @cil_ldarg_1 | @cil_ldarg_2 | @cil_ldarg_3 | @cil_ldarg_s | @cil_ldarga_s | @cil_ldarg | @cil_ldarga; +@cil_starg_any = @cil_starg | @cil_starg_s; + +@cil_ldloc_any = @cil_ldloc_0 | @cil_ldloc_1 | @cil_ldloc_2 | @cil_ldloc_3 | @cil_ldloc_s | @cil_ldloca_s | @cil_ldloc | @cil_ldloca; +@cil_stloc_any = @cil_stloc_0 | @cil_stloc_1 | @cil_stloc_2 | @cil_stloc_3 | @cil_stloc_s | @cil_stloc; + +@cil_ldfld_any = @cil_ldfld | @cil_ldsfld | @cil_ldsflda | @cil_ldflda; +@cil_stfld_any = @cil_stfld | @cil_stsfld; + +@cil_local_access = @cil_stloc_any | @cil_ldloc_any; +@cil_arg_access = @cil_starg_any | @cil_ldarg_any; +@cil_read_access = @cil_ldloc_any | @cil_ldarg_any | @cil_ldfld_any; +@cil_write_access = @cil_stloc_any | @cil_starg_any | @cil_stfld_any; + +@cil_stack_access = @cil_local_access | @cil_arg_access; +@cil_field_access = @cil_ldfld_any | @cil_stfld_any; + +@cil_access = @cil_read_access | @cil_write_access; + +// CIL constant/literal instructions + +@cil_ldc_i = @cil_ldc_i4_any | @cil_ldc_i8; + +@cil_ldc_i4_any = @cil_ldc_i4_m1 | @cil_ldc_i4_0 | @cil_ldc_i4_1 | @cil_ldc_i4_2 | @cil_ldc_i4_3 | + @cil_ldc_i4_4 | @cil_ldc_i4_5 | @cil_ldc_i4_6 | @cil_ldc_i4_7 | @cil_ldc_i4_8 | @cil_ldc_i4_s | @cil_ldc_i4; + +@cil_ldc_r = @cil_ldc_r4 | @cil_ldc_r8; + +@cil_literal = @cil_ldnull | @cil_ldc_i | @cil_ldc_r | @cil_ldstr; + +// Control flow + +@cil_conditional_jump = @cil_binary_jump | @cil_unary_jump; +@cil_binary_jump = @cil_beq_s | @cil_bge_s | @cil_bgt_s | @cil_ble_s | @cil_blt_s | + @cil_bne_un_s | @cil_bge_un_s | @cil_bgt_un_s | @cil_ble_un_s | @cil_blt_un_s | + @cil_beq | @cil_bge | @cil_bgt | @cil_ble | @cil_blt | + @cil_bne_un | @cil_bge_un | @cil_bgt_un | @cil_ble_un | @cil_blt_un; +@cil_unary_jump = @cil_brfalse_s | @cil_brtrue_s | @cil_brfalse | @cil_brtrue | @cil_switch; +@cil_unconditional_jump = @cil_br | @cil_br_s | @cil_leave_any; +@cil_leave_any = @cil_leave | @cil_leave_s; +@cil_jump = @cil_unconditional_jump | @cil_conditional_jump; + +// CIL call instructions + +@cil_call_any = @cil_jmp | @cil_call | @cil_calli | @cil_tail | @cil_callvirt | @cil_newobj; + +// CIL expression instructions + +@cil_expr = @cil_literal | @cil_binary_expr | @cil_unary_expr | @cil_call_any | @cil_read_access | + @cil_newarr | @cil_ldtoken | @cil_sizeof | + @cil_ldftn | @cil_ldvirtftn | @cil_localloc | @cil_mkrefany | @cil_refanytype | @cil_arglist | @cil_dup; + +@cil_unary_expr = + @cil_conversion_operation | @cil_unary_arithmetic_operation | @cil_unary_bitwise_operation| + @cil_ldlen | @cil_isinst | @cil_box | @cil_ldobj | @cil_castclass | @cil_unbox_any | + @cil_ldind | @cil_unbox; + +@cil_conversion_operation = + @cil_conv_i1 | @cil_conv_i2 | @cil_conv_i4 | @cil_conv_i8 | + @cil_conv_u1 | @cil_conv_u2 | @cil_conv_u4 | @cil_conv_u8 | + @cil_conv_ovf_i | @cil_conv_ovf_i_un | @cil_conv_ovf_i1 | @cil_conv_ovf_i1_un | + @cil_conv_ovf_i2 | @cil_conv_ovf_i2_un | @cil_conv_ovf_i4 | @cil_conv_ovf_i4_un | + @cil_conv_ovf_i8 | @cil_conv_ovf_i8_un | @cil_conv_ovf_u | @cil_conv_ovf_u_un | + @cil_conv_ovf_u1 | @cil_conv_ovf_u1_un | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_ovf_u4 | @cil_conv_ovf_u4_un | @cil_conv_ovf_u8 | @cil_conv_ovf_u8_un | + @cil_conv_r4 | @cil_conv_r8 | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_i | @cil_conv_u | @cil_conv_r_un; + +@cil_ldind = @cil_ldind_i | @cil_ldind_i1 | @cil_ldind_i2 | @cil_ldind_i4 | @cil_ldind_i8 | + @cil_ldind_r4 | @cil_ldind_r8 | @cil_ldind_ref | @cil_ldind_u1 | @cil_ldind_u2 | @cil_ldind_u4; + +@cil_stind = @cil_stind_i | @cil_stind_i1 | @cil_stind_i2 | @cil_stind_i4 | @cil_stind_i8 | + @cil_stind_r4 | @cil_stind_r8 | @cil_stind_ref; + +@cil_bitwise_operation = @cil_binary_bitwise_operation | @cil_unary_bitwise_operation; + +@cil_binary_bitwise_operation = @cil_and | @cil_or | @cil_xor | @cil_shr | @cil_shr | @cil_shr_un | @cil_shl; + +@cil_binary_arithmetic_operation = @cil_add | @cil_sub | @cil_mul | @cil_div | @cil_div_un | + @cil_rem | @cil_rem_un | @cil_add_ovf | @cil_add_ovf_un | @cil_mul_ovf | @cil_mul_ovf_un | + @cil_sub_ovf | @cil_sub_ovf_un; + +@cil_unary_bitwise_operation = @cil_not; + +@cil_binary_expr = @cil_binary_arithmetic_operation | @cil_binary_bitwise_operation | @cil_read_array | @cil_comparison_operation; + +@cil_unary_arithmetic_operation = @cil_neg; + +@cil_comparison_operation = @cil_cgt_un | @cil_ceq | @cil_cgt | @cil_clt | @cil_clt_un; + +// Elements that retrieve an address of something +@cil_read_ref = @cil_ldloca_s | @cil_ldarga_s | @cil_ldflda | @cil_ldsflda | @cil_ldelema; + +// CIL array instructions + +@cil_read_array = + @cil_ldelem | @cil_ldelema | @cil_ldelem_i1 | @cil_ldelem_ref | @cil_ldelem_i | + @cil_ldelem_i1 | @cil_ldelem_i2 | @cil_ldelem_i4 | @cil_ldelem_i8 | @cil_ldelem_r4 | + @cil_ldelem_r8 | @cil_ldelem_u1 | @cil_ldelem_u2 | @cil_ldelem_u4; + +@cil_write_array = @cil_stelem | @cil_stelem_ref | + @cil_stelem_i | @cil_stelem_i1 | @cil_stelem_i2 | @cil_stelem_i4 | @cil_stelem_i8 | + @cil_stelem_r4 | @cil_stelem_r8; + +@cil_throw_any = @cil_throw | @cil_rethrow; + +#keyset[impl, index] +cil_instruction( + unique int id: @cil_instruction, + int opcode: int ref, + int index: int ref, + int impl: @cil_method_implementation ref); + +cil_jump( + unique int instruction: @cil_jump ref, + int target: @cil_instruction ref); + +cil_access( + unique int instruction: @cil_instruction ref, + int target: @cil_accessible ref); + +cil_value( + unique int instruction: @cil_literal ref, + string value: string ref); + +#keyset[instruction, index] +cil_switch( + int instruction: @cil_switch ref, + int index: int ref, + int target: @cil_instruction ref); + +cil_instruction_location( + unique int id: @cil_instruction ref, + int loc: @location ref); + +cil_type_location( + int id: @cil_type ref, + int loc: @location ref); + +cil_method_location( + int id: @cil_method ref, + int loc: @location ref); + +@cil_namespace = @namespace; + +@cil_type_container = @cil_type | @cil_namespace | @cil_method; + +case @cil_type.kind of + 0 = @cil_valueorreftype +| 1 = @cil_typeparameter +| 2 = @cil_array_type +| 3 = @cil_pointer_type +| 4 = @cil_function_pointer_type +; + +cil_type( + unique int id: @cil_type, + string name: string ref, + int kind: int ref, + int parent: @cil_type_container ref, + int sourceDecl: @cil_type ref); + +cil_pointer_type( + unique int id: @cil_pointer_type ref, + int pointee: @cil_type ref); + +cil_array_type( + unique int id: @cil_array_type ref, + int element_type: @cil_type ref, + int rank: int ref); + +cil_function_pointer_return_type( + unique int id: @cil_function_pointer_type ref, + int return_type: @cil_type ref); + +cil_method( + unique int id: @cil_method, + string name: string ref, + int parent: @cil_type ref, + int return_type: @cil_type ref); + +cil_method_source_declaration( + unique int method: @cil_method ref, + int source: @cil_method ref); + +cil_method_implementation( + unique int id: @cil_method_implementation, + int method: @cil_method ref, + int location: @assembly ref); + +cil_implements( + int id: @cil_method ref, + int decl: @cil_method ref); + +#keyset[parent, name] +cil_field( + unique int id: @cil_field, + int parent: @cil_type ref, + string name: string ref, + int field_type: @cil_type ref); + +@cil_element = @cil_instruction | @cil_declaration | @cil_handler | @cil_attribute | @cil_namespace; +@cil_named_element = @cil_declaration | @cil_namespace; +@cil_declaration = @cil_variable | @cil_method | @cil_type | @cil_member; +@cil_accessible = @cil_declaration; +@cil_variable = @cil_field | @cil_stack_variable; +@cil_stack_variable = @cil_local_variable | @cil_parameter; +@cil_member = @cil_method | @cil_type | @cil_field | @cil_property | @cil_event; +@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field | @cil_function_pointer_type; +@cil_parameterizable = @cil_method | @cil_function_pointer_type; +@cil_has_type_annotation = @cil_stack_variable | @cil_property | @cil_field | @cil_method | @cil_function_pointer_type; + +#keyset[parameterizable, index] +cil_parameter( + unique int id: @cil_parameter, + int parameterizable: @cil_parameterizable ref, + int index: int ref, + int param_type: @cil_type ref); + +cil_parameter_in(unique int id: @cil_parameter ref); +cil_parameter_out(unique int id: @cil_parameter ref); + +cil_setter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +#keyset[id, modifier] +cil_custom_modifiers( + int id: @cil_custom_modifier_receiver ref, + int modifier: @cil_type ref, + int kind: int ref); // modreq: 1, modopt: 0 + +cil_type_annotation( + int id: @cil_has_type_annotation ref, + int annotation: int ref); + +cil_getter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +cil_adder(unique int event: @cil_event ref, + int method: @cil_method ref); + +cil_remover(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_raiser(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_property( + unique int id: @cil_property, + int parent: @cil_type ref, + string name: string ref, + int property_type: @cil_type ref); + +#keyset[parent, name] +cil_event(unique int id: @cil_event, + int parent: @cil_type ref, + string name: string ref, + int event_type: @cil_type ref); + +#keyset[impl, index] +cil_local_variable( + unique int id: @cil_local_variable, + int impl: @cil_method_implementation ref, + int index: int ref, + int var_type: @cil_type ref); + +cil_function_pointer_calling_conventions( + int id: @cil_function_pointer_type ref, + int kind: int ref); + +// CIL handlers (exception handlers etc). + +case @cil_handler.kind of + 0 = @cil_catch_handler +| 1 = @cil_filter_handler +| 2 = @cil_finally_handler +| 4 = @cil_fault_handler +; + +#keyset[impl, index] +cil_handler( + unique int id: @cil_handler, + int impl: @cil_method_implementation ref, + int index: int ref, + int kind: int ref, + int try_start: @cil_instruction ref, + int try_end: @cil_instruction ref, + int handler_start: @cil_instruction ref); + +cil_handler_filter( + unique int id: @cil_handler ref, + int filter_start: @cil_instruction ref); + +cil_handler_type( + unique int id: @cil_handler ref, + int catch_type: @cil_type ref); + +@cil_controlflow_node = @cil_entry_point | @cil_instruction; + +@cil_entry_point = @cil_method_implementation | @cil_handler; + +@cil_dataflow_node = @cil_instruction | @cil_variable | @cil_method; + +cil_method_stack_size( + unique int method: @cil_method_implementation ref, + int size: int ref); + +// CIL modifiers + +cil_public(int id: @cil_member ref); +cil_private(int id: @cil_member ref); +cil_protected(int id: @cil_member ref); +cil_internal(int id: @cil_member ref); +cil_static(int id: @cil_member ref); +cil_sealed(int id: @cil_member ref); +cil_virtual(int id: @cil_method ref); +cil_abstract(int id: @cil_member ref); +cil_class(int id: @cil_type ref); +cil_interface(int id: @cil_type ref); +cil_security(int id: @cil_member ref); +cil_requiresecobject(int id: @cil_method ref); +cil_specialname(int id: @cil_method ref); +cil_newslot(int id: @cil_method ref); + +cil_base_class(unique int id: @cil_type ref, int base: @cil_type ref); +cil_base_interface(int id: @cil_type ref, int base: @cil_type ref); +cil_enum_underlying_type(unique int id: @cil_type ref, int underlying: @cil_type ref); + +#keyset[unbound, index] +cil_type_parameter( + int unbound: @cil_member ref, + int index: int ref, + int param: @cil_typeparameter ref); + +#keyset[bound, index] +cil_type_argument( + int bound: @cil_member ref, + int index: int ref, + int t: @cil_type ref); + +// CIL type parameter constraints + +cil_typeparam_covariant(int tp: @cil_typeparameter ref); +cil_typeparam_contravariant(int tp: @cil_typeparameter ref); +cil_typeparam_class(int tp: @cil_typeparameter ref); +cil_typeparam_struct(int tp: @cil_typeparameter ref); +cil_typeparam_new(int tp: @cil_typeparameter ref); +cil_typeparam_constraint(int tp: @cil_typeparameter ref, int supertype: @cil_type ref); + +// CIL attributes + +cil_attribute( + unique int attributeid: @cil_attribute, + int element: @cil_declaration ref, + int constructor: @cil_method ref); + +#keyset[attribute_id, param] +cil_attribute_named_argument( + int attribute_id: @cil_attribute ref, + string param: string ref, + string value: string ref); + +#keyset[attribute_id, index] +cil_attribute_positional_argument( + int attribute_id: @cil_attribute ref, + int index: int ref, + string value: string ref); + + +// Common .Net data model covering both C# and CIL + +// Common elements +@dotnet_element = @element | @cil_element; +@dotnet_named_element = @named_element | @cil_named_element; +@dotnet_callable = @callable | @cil_method; +@dotnet_variable = @variable | @cil_variable; +@dotnet_field = @field | @cil_field; +@dotnet_parameter = @parameter | @cil_parameter; +@dotnet_declaration = @declaration | @cil_declaration; +@dotnet_member = @member | @cil_member; +@dotnet_event = @event | @cil_event; +@dotnet_property = @property | @cil_property | @indexer; +@dotnet_parameterizable = @parameterizable | @cil_parameterizable; + +// Common types +@dotnet_type = @type | @cil_type; +@dotnet_call = @call | @cil_call_any; +@dotnet_throw = @throw_element | @cil_throw_any; +@dotnet_valueorreftype = @cil_valueorreftype | @value_or_ref_type | @cil_array_type | @void_type; +@dotnet_typeparameter = @type_parameter | @cil_typeparameter; +@dotnet_array_type = @array_type | @cil_array_type; +@dotnet_pointer_type = @pointer_type | @cil_pointer_type; +@dotnet_type_parameter = @type_parameter | @cil_typeparameter; +@dotnet_generic = @dotnet_valueorreftype | @dotnet_callable; + +// Attributes +@dotnet_attribute = @attribute | @cil_attribute; + +// Expressions +@dotnet_expr = @expr | @cil_expr; + +// Literals +@dotnet_literal = @literal_expr | @cil_literal; +@dotnet_string_literal = @string_literal_expr | @cil_ldstr; +@dotnet_int_literal = @integer_literal_expr | @cil_ldc_i; +@dotnet_float_literal = @float_literal_expr | @cil_ldc_r; +@dotnet_null_literal = @null_literal_expr | @cil_ldnull; + +@metadata_entity = @cil_method | @cil_type | @cil_field | @cil_property | @field | @property | + @callable | @value_or_ref_type | @void_type; + +metadata_handle(int entity : @metadata_entity ref, int location: @assembly ref, int handle: int ref) diff --git a/csharp/ql/lib/upgrades/21ede72308c41493f19b37720d8259d5eb307f12/upgrade.properties b/csharp/ql/lib/upgrades/21ede72308c41493f19b37720d8259d5eb307f12/upgrade.properties new file mode 100644 index 00000000000..51773d6cc81 --- /dev/null +++ b/csharp/ql/lib/upgrades/21ede72308c41493f19b37720d8259d5eb307f12/upgrade.properties @@ -0,0 +1,2 @@ +description: Extract `ref readonly` parameters as having `mode` 6 in the params table. +compatibility: backwards diff --git a/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/compiler_generated.ql b/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/compiler_generated.ql new file mode 100644 index 00000000000..d732cac6730 --- /dev/null +++ b/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/compiler_generated.ql @@ -0,0 +1,7 @@ +class Element extends @element { + Element() { expr_compiler_generated(this) or compiler_generated(this) } + + string toString() { none() } +} + +select any(Element e) diff --git a/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/old.dbscheme b/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/old.dbscheme new file mode 100644 index 00000000000..c9ee11bd1ee --- /dev/null +++ b/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/old.dbscheme @@ -0,0 +1,2100 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + unique int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +compiler_generated(unique int id: @modifiable ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, array = 3, this = 4 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_compiler_generated( + unique int id: @expr ref); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); + +/* Common Intermediate Language - CIL */ + +case @cil_instruction.opcode of + 0 = @cil_nop +| 1 = @cil_break +| 2 = @cil_ldarg_0 +| 3 = @cil_ldarg_1 +| 4 = @cil_ldarg_2 +| 5 = @cil_ldarg_3 +| 6 = @cil_ldloc_0 +| 7 = @cil_ldloc_1 +| 8 = @cil_ldloc_2 +| 9 = @cil_ldloc_3 +| 10 = @cil_stloc_0 +| 11 = @cil_stloc_1 +| 12 = @cil_stloc_2 +| 13 = @cil_stloc_3 +| 14 = @cil_ldarg_s +| 15 = @cil_ldarga_s +| 16 = @cil_starg_s +| 17 = @cil_ldloc_s +| 18 = @cil_ldloca_s +| 19 = @cil_stloc_s +| 20 = @cil_ldnull +| 21 = @cil_ldc_i4_m1 +| 22 = @cil_ldc_i4_0 +| 23 = @cil_ldc_i4_1 +| 24 = @cil_ldc_i4_2 +| 25 = @cil_ldc_i4_3 +| 26 = @cil_ldc_i4_4 +| 27 = @cil_ldc_i4_5 +| 28 = @cil_ldc_i4_6 +| 29 = @cil_ldc_i4_7 +| 30 = @cil_ldc_i4_8 +| 31 = @cil_ldc_i4_s +| 32 = @cil_ldc_i4 +| 33 = @cil_ldc_i8 +| 34 = @cil_ldc_r4 +| 35 = @cil_ldc_r8 +| 37 = @cil_dup +| 38 = @cil_pop +| 39 = @cil_jmp +| 40 = @cil_call +| 41 = @cil_calli +| 42 = @cil_ret +| 43 = @cil_br_s +| 44 = @cil_brfalse_s +| 45 = @cil_brtrue_s +| 46 = @cil_beq_s +| 47 = @cil_bge_s +| 48 = @cil_bgt_s +| 49 = @cil_ble_s +| 50 = @cil_blt_s +| 51 = @cil_bne_un_s +| 52 = @cil_bge_un_s +| 53 = @cil_bgt_un_s +| 54 = @cil_ble_un_s +| 55 = @cil_blt_un_s +| 56 = @cil_br +| 57 = @cil_brfalse +| 58 = @cil_brtrue +| 59 = @cil_beq +| 60 = @cil_bge +| 61 = @cil_bgt +| 62 = @cil_ble +| 63 = @cil_blt +| 64 = @cil_bne_un +| 65 = @cil_bge_un +| 66 = @cil_bgt_un +| 67 = @cil_ble_un +| 68 = @cil_blt_un +| 69 = @cil_switch +| 70 = @cil_ldind_i1 +| 71 = @cil_ldind_u1 +| 72 = @cil_ldind_i2 +| 73 = @cil_ldind_u2 +| 74 = @cil_ldind_i4 +| 75 = @cil_ldind_u4 +| 76 = @cil_ldind_i8 +| 77 = @cil_ldind_i +| 78 = @cil_ldind_r4 +| 79 = @cil_ldind_r8 +| 80 = @cil_ldind_ref +| 81 = @cil_stind_ref +| 82 = @cil_stind_i1 +| 83 = @cil_stind_i2 +| 84 = @cil_stind_i4 +| 85 = @cil_stind_i8 +| 86 = @cil_stind_r4 +| 87 = @cil_stind_r8 +| 88 = @cil_add +| 89 = @cil_sub +| 90 = @cil_mul +| 91 = @cil_div +| 92 = @cil_div_un +| 93 = @cil_rem +| 94 = @cil_rem_un +| 95 = @cil_and +| 96 = @cil_or +| 97 = @cil_xor +| 98 = @cil_shl +| 99 = @cil_shr +| 100 = @cil_shr_un +| 101 = @cil_neg +| 102 = @cil_not +| 103 = @cil_conv_i1 +| 104 = @cil_conv_i2 +| 105 = @cil_conv_i4 +| 106 = @cil_conv_i8 +| 107 = @cil_conv_r4 +| 108 = @cil_conv_r8 +| 109 = @cil_conv_u4 +| 110 = @cil_conv_u8 +| 111 = @cil_callvirt +| 112 = @cil_cpobj +| 113 = @cil_ldobj +| 114 = @cil_ldstr +| 115 = @cil_newobj +| 116 = @cil_castclass +| 117 = @cil_isinst +| 118 = @cil_conv_r_un +| 121 = @cil_unbox +| 122 = @cil_throw +| 123 = @cil_ldfld +| 124 = @cil_ldflda +| 125 = @cil_stfld +| 126 = @cil_ldsfld +| 127 = @cil_ldsflda +| 128 = @cil_stsfld +| 129 = @cil_stobj +| 130 = @cil_conv_ovf_i1_un +| 131 = @cil_conv_ovf_i2_un +| 132 = @cil_conv_ovf_i4_un +| 133 = @cil_conv_ovf_i8_un +| 134 = @cil_conv_ovf_u1_un +| 135 = @cil_conv_ovf_u2_un +| 136 = @cil_conv_ovf_u4_un +| 137 = @cil_conv_ovf_u8_un +| 138 = @cil_conv_ovf_i_un +| 139 = @cil_conv_ovf_u_un +| 140 = @cil_box +| 141 = @cil_newarr +| 142 = @cil_ldlen +| 143 = @cil_ldelema +| 144 = @cil_ldelem_i1 +| 145 = @cil_ldelem_u1 +| 146 = @cil_ldelem_i2 +| 147 = @cil_ldelem_u2 +| 148 = @cil_ldelem_i4 +| 149 = @cil_ldelem_u4 +| 150 = @cil_ldelem_i8 +| 151 = @cil_ldelem_i +| 152 = @cil_ldelem_r4 +| 153 = @cil_ldelem_r8 +| 154 = @cil_ldelem_ref +| 155 = @cil_stelem_i +| 156 = @cil_stelem_i1 +| 157 = @cil_stelem_i2 +| 158 = @cil_stelem_i4 +| 159 = @cil_stelem_i8 +| 160 = @cil_stelem_r4 +| 161 = @cil_stelem_r8 +| 162 = @cil_stelem_ref +| 163 = @cil_ldelem +| 164 = @cil_stelem +| 165 = @cil_unbox_any +| 179 = @cil_conv_ovf_i1 +| 180 = @cil_conv_ovf_u1 +| 181 = @cil_conv_ovf_i2 +| 182 = @cil_conv_ovf_u2 +| 183 = @cil_conv_ovf_i4 +| 184 = @cil_conv_ovf_u4 +| 185 = @cil_conv_ovf_i8 +| 186 = @cil_conv_ovf_u8 +| 194 = @cil_refanyval +| 195 = @cil_ckinfinite +| 198 = @cil_mkrefany +| 208 = @cil_ldtoken +| 209 = @cil_conv_u2 +| 210 = @cil_conv_u1 +| 211 = @cil_conv_i +| 212 = @cil_conv_ovf_i +| 213 = @cil_conv_ovf_u +| 214 = @cil_add_ovf +| 215 = @cil_add_ovf_un +| 216 = @cil_mul_ovf +| 217 = @cil_mul_ovf_un +| 218 = @cil_sub_ovf +| 219 = @cil_sub_ovf_un +| 220 = @cil_endfinally +| 221 = @cil_leave +| 222 = @cil_leave_s +| 223 = @cil_stind_i +| 224 = @cil_conv_u +| 65024 = @cil_arglist +| 65025 = @cil_ceq +| 65026 = @cil_cgt +| 65027 = @cil_cgt_un +| 65028 = @cil_clt +| 65029 = @cil_clt_un +| 65030 = @cil_ldftn +| 65031 = @cil_ldvirtftn +| 65033 = @cil_ldarg +| 65034 = @cil_ldarga +| 65035 = @cil_starg +| 65036 = @cil_ldloc +| 65037 = @cil_ldloca +| 65038 = @cil_stloc +| 65039 = @cil_localloc +| 65041 = @cil_endfilter +| 65042 = @cil_unaligned +| 65043 = @cil_volatile +| 65044 = @cil_tail +| 65045 = @cil_initobj +| 65046 = @cil_constrained +| 65047 = @cil_cpblk +| 65048 = @cil_initblk +| 65050 = @cil_rethrow +| 65052 = @cil_sizeof +| 65053 = @cil_refanytype +| 65054 = @cil_readonly +; + +// CIL ignored instructions + +@cil_ignore = @cil_nop | @cil_break | @cil_volatile | @cil_unaligned; + +// CIL local/parameter/field access + +@cil_ldarg_any = @cil_ldarg_0 | @cil_ldarg_1 | @cil_ldarg_2 | @cil_ldarg_3 | @cil_ldarg_s | @cil_ldarga_s | @cil_ldarg | @cil_ldarga; +@cil_starg_any = @cil_starg | @cil_starg_s; + +@cil_ldloc_any = @cil_ldloc_0 | @cil_ldloc_1 | @cil_ldloc_2 | @cil_ldloc_3 | @cil_ldloc_s | @cil_ldloca_s | @cil_ldloc | @cil_ldloca; +@cil_stloc_any = @cil_stloc_0 | @cil_stloc_1 | @cil_stloc_2 | @cil_stloc_3 | @cil_stloc_s | @cil_stloc; + +@cil_ldfld_any = @cil_ldfld | @cil_ldsfld | @cil_ldsflda | @cil_ldflda; +@cil_stfld_any = @cil_stfld | @cil_stsfld; + +@cil_local_access = @cil_stloc_any | @cil_ldloc_any; +@cil_arg_access = @cil_starg_any | @cil_ldarg_any; +@cil_read_access = @cil_ldloc_any | @cil_ldarg_any | @cil_ldfld_any; +@cil_write_access = @cil_stloc_any | @cil_starg_any | @cil_stfld_any; + +@cil_stack_access = @cil_local_access | @cil_arg_access; +@cil_field_access = @cil_ldfld_any | @cil_stfld_any; + +@cil_access = @cil_read_access | @cil_write_access; + +// CIL constant/literal instructions + +@cil_ldc_i = @cil_ldc_i4_any | @cil_ldc_i8; + +@cil_ldc_i4_any = @cil_ldc_i4_m1 | @cil_ldc_i4_0 | @cil_ldc_i4_1 | @cil_ldc_i4_2 | @cil_ldc_i4_3 | + @cil_ldc_i4_4 | @cil_ldc_i4_5 | @cil_ldc_i4_6 | @cil_ldc_i4_7 | @cil_ldc_i4_8 | @cil_ldc_i4_s | @cil_ldc_i4; + +@cil_ldc_r = @cil_ldc_r4 | @cil_ldc_r8; + +@cil_literal = @cil_ldnull | @cil_ldc_i | @cil_ldc_r | @cil_ldstr; + +// Control flow + +@cil_conditional_jump = @cil_binary_jump | @cil_unary_jump; +@cil_binary_jump = @cil_beq_s | @cil_bge_s | @cil_bgt_s | @cil_ble_s | @cil_blt_s | + @cil_bne_un_s | @cil_bge_un_s | @cil_bgt_un_s | @cil_ble_un_s | @cil_blt_un_s | + @cil_beq | @cil_bge | @cil_bgt | @cil_ble | @cil_blt | + @cil_bne_un | @cil_bge_un | @cil_bgt_un | @cil_ble_un | @cil_blt_un; +@cil_unary_jump = @cil_brfalse_s | @cil_brtrue_s | @cil_brfalse | @cil_brtrue | @cil_switch; +@cil_unconditional_jump = @cil_br | @cil_br_s | @cil_leave_any; +@cil_leave_any = @cil_leave | @cil_leave_s; +@cil_jump = @cil_unconditional_jump | @cil_conditional_jump; + +// CIL call instructions + +@cil_call_any = @cil_jmp | @cil_call | @cil_calli | @cil_tail | @cil_callvirt | @cil_newobj; + +// CIL expression instructions + +@cil_expr = @cil_literal | @cil_binary_expr | @cil_unary_expr | @cil_call_any | @cil_read_access | + @cil_newarr | @cil_ldtoken | @cil_sizeof | + @cil_ldftn | @cil_ldvirtftn | @cil_localloc | @cil_mkrefany | @cil_refanytype | @cil_arglist | @cil_dup; + +@cil_unary_expr = + @cil_conversion_operation | @cil_unary_arithmetic_operation | @cil_unary_bitwise_operation| + @cil_ldlen | @cil_isinst | @cil_box | @cil_ldobj | @cil_castclass | @cil_unbox_any | + @cil_ldind | @cil_unbox; + +@cil_conversion_operation = + @cil_conv_i1 | @cil_conv_i2 | @cil_conv_i4 | @cil_conv_i8 | + @cil_conv_u1 | @cil_conv_u2 | @cil_conv_u4 | @cil_conv_u8 | + @cil_conv_ovf_i | @cil_conv_ovf_i_un | @cil_conv_ovf_i1 | @cil_conv_ovf_i1_un | + @cil_conv_ovf_i2 | @cil_conv_ovf_i2_un | @cil_conv_ovf_i4 | @cil_conv_ovf_i4_un | + @cil_conv_ovf_i8 | @cil_conv_ovf_i8_un | @cil_conv_ovf_u | @cil_conv_ovf_u_un | + @cil_conv_ovf_u1 | @cil_conv_ovf_u1_un | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_ovf_u4 | @cil_conv_ovf_u4_un | @cil_conv_ovf_u8 | @cil_conv_ovf_u8_un | + @cil_conv_r4 | @cil_conv_r8 | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_i | @cil_conv_u | @cil_conv_r_un; + +@cil_ldind = @cil_ldind_i | @cil_ldind_i1 | @cil_ldind_i2 | @cil_ldind_i4 | @cil_ldind_i8 | + @cil_ldind_r4 | @cil_ldind_r8 | @cil_ldind_ref | @cil_ldind_u1 | @cil_ldind_u2 | @cil_ldind_u4; + +@cil_stind = @cil_stind_i | @cil_stind_i1 | @cil_stind_i2 | @cil_stind_i4 | @cil_stind_i8 | + @cil_stind_r4 | @cil_stind_r8 | @cil_stind_ref; + +@cil_bitwise_operation = @cil_binary_bitwise_operation | @cil_unary_bitwise_operation; + +@cil_binary_bitwise_operation = @cil_and | @cil_or | @cil_xor | @cil_shr | @cil_shr | @cil_shr_un | @cil_shl; + +@cil_binary_arithmetic_operation = @cil_add | @cil_sub | @cil_mul | @cil_div | @cil_div_un | + @cil_rem | @cil_rem_un | @cil_add_ovf | @cil_add_ovf_un | @cil_mul_ovf | @cil_mul_ovf_un | + @cil_sub_ovf | @cil_sub_ovf_un; + +@cil_unary_bitwise_operation = @cil_not; + +@cil_binary_expr = @cil_binary_arithmetic_operation | @cil_binary_bitwise_operation | @cil_read_array | @cil_comparison_operation; + +@cil_unary_arithmetic_operation = @cil_neg; + +@cil_comparison_operation = @cil_cgt_un | @cil_ceq | @cil_cgt | @cil_clt | @cil_clt_un; + +// Elements that retrieve an address of something +@cil_read_ref = @cil_ldloca_s | @cil_ldarga_s | @cil_ldflda | @cil_ldsflda | @cil_ldelema; + +// CIL array instructions + +@cil_read_array = + @cil_ldelem | @cil_ldelema | @cil_ldelem_i1 | @cil_ldelem_ref | @cil_ldelem_i | + @cil_ldelem_i1 | @cil_ldelem_i2 | @cil_ldelem_i4 | @cil_ldelem_i8 | @cil_ldelem_r4 | + @cil_ldelem_r8 | @cil_ldelem_u1 | @cil_ldelem_u2 | @cil_ldelem_u4; + +@cil_write_array = @cil_stelem | @cil_stelem_ref | + @cil_stelem_i | @cil_stelem_i1 | @cil_stelem_i2 | @cil_stelem_i4 | @cil_stelem_i8 | + @cil_stelem_r4 | @cil_stelem_r8; + +@cil_throw_any = @cil_throw | @cil_rethrow; + +#keyset[impl, index] +cil_instruction( + unique int id: @cil_instruction, + int opcode: int ref, + int index: int ref, + int impl: @cil_method_implementation ref); + +cil_jump( + unique int instruction: @cil_jump ref, + int target: @cil_instruction ref); + +cil_access( + unique int instruction: @cil_instruction ref, + int target: @cil_accessible ref); + +cil_value( + unique int instruction: @cil_literal ref, + string value: string ref); + +#keyset[instruction, index] +cil_switch( + int instruction: @cil_switch ref, + int index: int ref, + int target: @cil_instruction ref); + +cil_instruction_location( + unique int id: @cil_instruction ref, + int loc: @location ref); + +cil_type_location( + int id: @cil_type ref, + int loc: @location ref); + +cil_method_location( + int id: @cil_method ref, + int loc: @location ref); + +@cil_namespace = @namespace; + +@cil_type_container = @cil_type | @cil_namespace | @cil_method; + +case @cil_type.kind of + 0 = @cil_valueorreftype +| 1 = @cil_typeparameter +| 2 = @cil_array_type +| 3 = @cil_pointer_type +| 4 = @cil_function_pointer_type +; + +cil_type( + unique int id: @cil_type, + string name: string ref, + int kind: int ref, + int parent: @cil_type_container ref, + int sourceDecl: @cil_type ref); + +cil_pointer_type( + unique int id: @cil_pointer_type ref, + int pointee: @cil_type ref); + +cil_array_type( + unique int id: @cil_array_type ref, + int element_type: @cil_type ref, + int rank: int ref); + +cil_function_pointer_return_type( + unique int id: @cil_function_pointer_type ref, + int return_type: @cil_type ref); + +cil_method( + unique int id: @cil_method, + string name: string ref, + int parent: @cil_type ref, + int return_type: @cil_type ref); + +cil_method_source_declaration( + unique int method: @cil_method ref, + int source: @cil_method ref); + +cil_method_implementation( + unique int id: @cil_method_implementation, + int method: @cil_method ref, + int location: @assembly ref); + +cil_implements( + int id: @cil_method ref, + int decl: @cil_method ref); + +#keyset[parent, name] +cil_field( + unique int id: @cil_field, + int parent: @cil_type ref, + string name: string ref, + int field_type: @cil_type ref); + +@cil_element = @cil_instruction | @cil_declaration | @cil_handler | @cil_attribute | @cil_namespace; +@cil_named_element = @cil_declaration | @cil_namespace; +@cil_declaration = @cil_variable | @cil_method | @cil_type | @cil_member; +@cil_accessible = @cil_declaration; +@cil_variable = @cil_field | @cil_stack_variable; +@cil_stack_variable = @cil_local_variable | @cil_parameter; +@cil_member = @cil_method | @cil_type | @cil_field | @cil_property | @cil_event; +@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field | @cil_function_pointer_type; +@cil_parameterizable = @cil_method | @cil_function_pointer_type; +@cil_has_type_annotation = @cil_stack_variable | @cil_property | @cil_field | @cil_method | @cil_function_pointer_type; + +#keyset[parameterizable, index] +cil_parameter( + unique int id: @cil_parameter, + int parameterizable: @cil_parameterizable ref, + int index: int ref, + int param_type: @cil_type ref); + +cil_parameter_in(unique int id: @cil_parameter ref); +cil_parameter_out(unique int id: @cil_parameter ref); + +cil_setter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +#keyset[id, modifier] +cil_custom_modifiers( + int id: @cil_custom_modifier_receiver ref, + int modifier: @cil_type ref, + int kind: int ref); // modreq: 1, modopt: 0 + +cil_type_annotation( + int id: @cil_has_type_annotation ref, + int annotation: int ref); + +cil_getter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +cil_adder(unique int event: @cil_event ref, + int method: @cil_method ref); + +cil_remover(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_raiser(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_property( + unique int id: @cil_property, + int parent: @cil_type ref, + string name: string ref, + int property_type: @cil_type ref); + +#keyset[parent, name] +cil_event(unique int id: @cil_event, + int parent: @cil_type ref, + string name: string ref, + int event_type: @cil_type ref); + +#keyset[impl, index] +cil_local_variable( + unique int id: @cil_local_variable, + int impl: @cil_method_implementation ref, + int index: int ref, + int var_type: @cil_type ref); + +cil_function_pointer_calling_conventions( + int id: @cil_function_pointer_type ref, + int kind: int ref); + +// CIL handlers (exception handlers etc). + +case @cil_handler.kind of + 0 = @cil_catch_handler +| 1 = @cil_filter_handler +| 2 = @cil_finally_handler +| 4 = @cil_fault_handler +; + +#keyset[impl, index] +cil_handler( + unique int id: @cil_handler, + int impl: @cil_method_implementation ref, + int index: int ref, + int kind: int ref, + int try_start: @cil_instruction ref, + int try_end: @cil_instruction ref, + int handler_start: @cil_instruction ref); + +cil_handler_filter( + unique int id: @cil_handler ref, + int filter_start: @cil_instruction ref); + +cil_handler_type( + unique int id: @cil_handler ref, + int catch_type: @cil_type ref); + +@cil_controlflow_node = @cil_entry_point | @cil_instruction; + +@cil_entry_point = @cil_method_implementation | @cil_handler; + +@cil_dataflow_node = @cil_instruction | @cil_variable | @cil_method; + +cil_method_stack_size( + unique int method: @cil_method_implementation ref, + int size: int ref); + +// CIL modifiers + +cil_public(int id: @cil_member ref); +cil_private(int id: @cil_member ref); +cil_protected(int id: @cil_member ref); +cil_internal(int id: @cil_member ref); +cil_static(int id: @cil_member ref); +cil_sealed(int id: @cil_member ref); +cil_virtual(int id: @cil_method ref); +cil_abstract(int id: @cil_member ref); +cil_class(int id: @cil_type ref); +cil_interface(int id: @cil_type ref); +cil_security(int id: @cil_member ref); +cil_requiresecobject(int id: @cil_method ref); +cil_specialname(int id: @cil_method ref); +cil_newslot(int id: @cil_method ref); + +cil_base_class(unique int id: @cil_type ref, int base: @cil_type ref); +cil_base_interface(int id: @cil_type ref, int base: @cil_type ref); +cil_enum_underlying_type(unique int id: @cil_type ref, int underlying: @cil_type ref); + +#keyset[unbound, index] +cil_type_parameter( + int unbound: @cil_member ref, + int index: int ref, + int param: @cil_typeparameter ref); + +#keyset[bound, index] +cil_type_argument( + int bound: @cil_member ref, + int index: int ref, + int t: @cil_type ref); + +// CIL type parameter constraints + +cil_typeparam_covariant(int tp: @cil_typeparameter ref); +cil_typeparam_contravariant(int tp: @cil_typeparameter ref); +cil_typeparam_class(int tp: @cil_typeparameter ref); +cil_typeparam_struct(int tp: @cil_typeparameter ref); +cil_typeparam_new(int tp: @cil_typeparameter ref); +cil_typeparam_constraint(int tp: @cil_typeparameter ref, int supertype: @cil_type ref); + +// CIL attributes + +cil_attribute( + unique int attributeid: @cil_attribute, + int element: @cil_declaration ref, + int constructor: @cil_method ref); + +#keyset[attribute_id, param] +cil_attribute_named_argument( + int attribute_id: @cil_attribute ref, + string param: string ref, + string value: string ref); + +#keyset[attribute_id, index] +cil_attribute_positional_argument( + int attribute_id: @cil_attribute ref, + int index: int ref, + string value: string ref); + + +// Common .Net data model covering both C# and CIL + +// Common elements +@dotnet_element = @element | @cil_element; +@dotnet_named_element = @named_element | @cil_named_element; +@dotnet_callable = @callable | @cil_method; +@dotnet_variable = @variable | @cil_variable; +@dotnet_field = @field | @cil_field; +@dotnet_parameter = @parameter | @cil_parameter; +@dotnet_declaration = @declaration | @cil_declaration; +@dotnet_member = @member | @cil_member; +@dotnet_event = @event | @cil_event; +@dotnet_property = @property | @cil_property | @indexer; +@dotnet_parameterizable = @parameterizable | @cil_parameterizable; + +// Common types +@dotnet_type = @type | @cil_type; +@dotnet_call = @call | @cil_call_any; +@dotnet_throw = @throw_element | @cil_throw_any; +@dotnet_valueorreftype = @cil_valueorreftype | @value_or_ref_type | @cil_array_type | @void_type; +@dotnet_typeparameter = @type_parameter | @cil_typeparameter; +@dotnet_array_type = @array_type | @cil_array_type; +@dotnet_pointer_type = @pointer_type | @cil_pointer_type; +@dotnet_type_parameter = @type_parameter | @cil_typeparameter; +@dotnet_generic = @dotnet_valueorreftype | @dotnet_callable; + +// Attributes +@dotnet_attribute = @attribute | @cil_attribute; + +// Expressions +@dotnet_expr = @expr | @cil_expr; + +// Literals +@dotnet_literal = @literal_expr | @cil_literal; +@dotnet_string_literal = @string_literal_expr | @cil_ldstr; +@dotnet_int_literal = @integer_literal_expr | @cil_ldc_i; +@dotnet_float_literal = @float_literal_expr | @cil_ldc_r; +@dotnet_null_literal = @null_literal_expr | @cil_ldnull; + +@metadata_entity = @cil_method | @cil_type | @cil_field | @cil_property | @field | @property | + @callable | @value_or_ref_type | @void_type; + +metadata_handle(int entity : @metadata_entity ref, int location: @assembly ref, int handle: int ref) diff --git a/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/semmlecode.csharp.dbscheme b/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/semmlecode.csharp.dbscheme new file mode 100644 index 00000000000..21ede72308c --- /dev/null +++ b/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/semmlecode.csharp.dbscheme @@ -0,0 +1,2099 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + unique int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, array = 3, this = 4 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); + +/* Common Intermediate Language - CIL */ + +case @cil_instruction.opcode of + 0 = @cil_nop +| 1 = @cil_break +| 2 = @cil_ldarg_0 +| 3 = @cil_ldarg_1 +| 4 = @cil_ldarg_2 +| 5 = @cil_ldarg_3 +| 6 = @cil_ldloc_0 +| 7 = @cil_ldloc_1 +| 8 = @cil_ldloc_2 +| 9 = @cil_ldloc_3 +| 10 = @cil_stloc_0 +| 11 = @cil_stloc_1 +| 12 = @cil_stloc_2 +| 13 = @cil_stloc_3 +| 14 = @cil_ldarg_s +| 15 = @cil_ldarga_s +| 16 = @cil_starg_s +| 17 = @cil_ldloc_s +| 18 = @cil_ldloca_s +| 19 = @cil_stloc_s +| 20 = @cil_ldnull +| 21 = @cil_ldc_i4_m1 +| 22 = @cil_ldc_i4_0 +| 23 = @cil_ldc_i4_1 +| 24 = @cil_ldc_i4_2 +| 25 = @cil_ldc_i4_3 +| 26 = @cil_ldc_i4_4 +| 27 = @cil_ldc_i4_5 +| 28 = @cil_ldc_i4_6 +| 29 = @cil_ldc_i4_7 +| 30 = @cil_ldc_i4_8 +| 31 = @cil_ldc_i4_s +| 32 = @cil_ldc_i4 +| 33 = @cil_ldc_i8 +| 34 = @cil_ldc_r4 +| 35 = @cil_ldc_r8 +| 37 = @cil_dup +| 38 = @cil_pop +| 39 = @cil_jmp +| 40 = @cil_call +| 41 = @cil_calli +| 42 = @cil_ret +| 43 = @cil_br_s +| 44 = @cil_brfalse_s +| 45 = @cil_brtrue_s +| 46 = @cil_beq_s +| 47 = @cil_bge_s +| 48 = @cil_bgt_s +| 49 = @cil_ble_s +| 50 = @cil_blt_s +| 51 = @cil_bne_un_s +| 52 = @cil_bge_un_s +| 53 = @cil_bgt_un_s +| 54 = @cil_ble_un_s +| 55 = @cil_blt_un_s +| 56 = @cil_br +| 57 = @cil_brfalse +| 58 = @cil_brtrue +| 59 = @cil_beq +| 60 = @cil_bge +| 61 = @cil_bgt +| 62 = @cil_ble +| 63 = @cil_blt +| 64 = @cil_bne_un +| 65 = @cil_bge_un +| 66 = @cil_bgt_un +| 67 = @cil_ble_un +| 68 = @cil_blt_un +| 69 = @cil_switch +| 70 = @cil_ldind_i1 +| 71 = @cil_ldind_u1 +| 72 = @cil_ldind_i2 +| 73 = @cil_ldind_u2 +| 74 = @cil_ldind_i4 +| 75 = @cil_ldind_u4 +| 76 = @cil_ldind_i8 +| 77 = @cil_ldind_i +| 78 = @cil_ldind_r4 +| 79 = @cil_ldind_r8 +| 80 = @cil_ldind_ref +| 81 = @cil_stind_ref +| 82 = @cil_stind_i1 +| 83 = @cil_stind_i2 +| 84 = @cil_stind_i4 +| 85 = @cil_stind_i8 +| 86 = @cil_stind_r4 +| 87 = @cil_stind_r8 +| 88 = @cil_add +| 89 = @cil_sub +| 90 = @cil_mul +| 91 = @cil_div +| 92 = @cil_div_un +| 93 = @cil_rem +| 94 = @cil_rem_un +| 95 = @cil_and +| 96 = @cil_or +| 97 = @cil_xor +| 98 = @cil_shl +| 99 = @cil_shr +| 100 = @cil_shr_un +| 101 = @cil_neg +| 102 = @cil_not +| 103 = @cil_conv_i1 +| 104 = @cil_conv_i2 +| 105 = @cil_conv_i4 +| 106 = @cil_conv_i8 +| 107 = @cil_conv_r4 +| 108 = @cil_conv_r8 +| 109 = @cil_conv_u4 +| 110 = @cil_conv_u8 +| 111 = @cil_callvirt +| 112 = @cil_cpobj +| 113 = @cil_ldobj +| 114 = @cil_ldstr +| 115 = @cil_newobj +| 116 = @cil_castclass +| 117 = @cil_isinst +| 118 = @cil_conv_r_un +| 121 = @cil_unbox +| 122 = @cil_throw +| 123 = @cil_ldfld +| 124 = @cil_ldflda +| 125 = @cil_stfld +| 126 = @cil_ldsfld +| 127 = @cil_ldsflda +| 128 = @cil_stsfld +| 129 = @cil_stobj +| 130 = @cil_conv_ovf_i1_un +| 131 = @cil_conv_ovf_i2_un +| 132 = @cil_conv_ovf_i4_un +| 133 = @cil_conv_ovf_i8_un +| 134 = @cil_conv_ovf_u1_un +| 135 = @cil_conv_ovf_u2_un +| 136 = @cil_conv_ovf_u4_un +| 137 = @cil_conv_ovf_u8_un +| 138 = @cil_conv_ovf_i_un +| 139 = @cil_conv_ovf_u_un +| 140 = @cil_box +| 141 = @cil_newarr +| 142 = @cil_ldlen +| 143 = @cil_ldelema +| 144 = @cil_ldelem_i1 +| 145 = @cil_ldelem_u1 +| 146 = @cil_ldelem_i2 +| 147 = @cil_ldelem_u2 +| 148 = @cil_ldelem_i4 +| 149 = @cil_ldelem_u4 +| 150 = @cil_ldelem_i8 +| 151 = @cil_ldelem_i +| 152 = @cil_ldelem_r4 +| 153 = @cil_ldelem_r8 +| 154 = @cil_ldelem_ref +| 155 = @cil_stelem_i +| 156 = @cil_stelem_i1 +| 157 = @cil_stelem_i2 +| 158 = @cil_stelem_i4 +| 159 = @cil_stelem_i8 +| 160 = @cil_stelem_r4 +| 161 = @cil_stelem_r8 +| 162 = @cil_stelem_ref +| 163 = @cil_ldelem +| 164 = @cil_stelem +| 165 = @cil_unbox_any +| 179 = @cil_conv_ovf_i1 +| 180 = @cil_conv_ovf_u1 +| 181 = @cil_conv_ovf_i2 +| 182 = @cil_conv_ovf_u2 +| 183 = @cil_conv_ovf_i4 +| 184 = @cil_conv_ovf_u4 +| 185 = @cil_conv_ovf_i8 +| 186 = @cil_conv_ovf_u8 +| 194 = @cil_refanyval +| 195 = @cil_ckinfinite +| 198 = @cil_mkrefany +| 208 = @cil_ldtoken +| 209 = @cil_conv_u2 +| 210 = @cil_conv_u1 +| 211 = @cil_conv_i +| 212 = @cil_conv_ovf_i +| 213 = @cil_conv_ovf_u +| 214 = @cil_add_ovf +| 215 = @cil_add_ovf_un +| 216 = @cil_mul_ovf +| 217 = @cil_mul_ovf_un +| 218 = @cil_sub_ovf +| 219 = @cil_sub_ovf_un +| 220 = @cil_endfinally +| 221 = @cil_leave +| 222 = @cil_leave_s +| 223 = @cil_stind_i +| 224 = @cil_conv_u +| 65024 = @cil_arglist +| 65025 = @cil_ceq +| 65026 = @cil_cgt +| 65027 = @cil_cgt_un +| 65028 = @cil_clt +| 65029 = @cil_clt_un +| 65030 = @cil_ldftn +| 65031 = @cil_ldvirtftn +| 65033 = @cil_ldarg +| 65034 = @cil_ldarga +| 65035 = @cil_starg +| 65036 = @cil_ldloc +| 65037 = @cil_ldloca +| 65038 = @cil_stloc +| 65039 = @cil_localloc +| 65041 = @cil_endfilter +| 65042 = @cil_unaligned +| 65043 = @cil_volatile +| 65044 = @cil_tail +| 65045 = @cil_initobj +| 65046 = @cil_constrained +| 65047 = @cil_cpblk +| 65048 = @cil_initblk +| 65050 = @cil_rethrow +| 65052 = @cil_sizeof +| 65053 = @cil_refanytype +| 65054 = @cil_readonly +; + +// CIL ignored instructions + +@cil_ignore = @cil_nop | @cil_break | @cil_volatile | @cil_unaligned; + +// CIL local/parameter/field access + +@cil_ldarg_any = @cil_ldarg_0 | @cil_ldarg_1 | @cil_ldarg_2 | @cil_ldarg_3 | @cil_ldarg_s | @cil_ldarga_s | @cil_ldarg | @cil_ldarga; +@cil_starg_any = @cil_starg | @cil_starg_s; + +@cil_ldloc_any = @cil_ldloc_0 | @cil_ldloc_1 | @cil_ldloc_2 | @cil_ldloc_3 | @cil_ldloc_s | @cil_ldloca_s | @cil_ldloc | @cil_ldloca; +@cil_stloc_any = @cil_stloc_0 | @cil_stloc_1 | @cil_stloc_2 | @cil_stloc_3 | @cil_stloc_s | @cil_stloc; + +@cil_ldfld_any = @cil_ldfld | @cil_ldsfld | @cil_ldsflda | @cil_ldflda; +@cil_stfld_any = @cil_stfld | @cil_stsfld; + +@cil_local_access = @cil_stloc_any | @cil_ldloc_any; +@cil_arg_access = @cil_starg_any | @cil_ldarg_any; +@cil_read_access = @cil_ldloc_any | @cil_ldarg_any | @cil_ldfld_any; +@cil_write_access = @cil_stloc_any | @cil_starg_any | @cil_stfld_any; + +@cil_stack_access = @cil_local_access | @cil_arg_access; +@cil_field_access = @cil_ldfld_any | @cil_stfld_any; + +@cil_access = @cil_read_access | @cil_write_access; + +// CIL constant/literal instructions + +@cil_ldc_i = @cil_ldc_i4_any | @cil_ldc_i8; + +@cil_ldc_i4_any = @cil_ldc_i4_m1 | @cil_ldc_i4_0 | @cil_ldc_i4_1 | @cil_ldc_i4_2 | @cil_ldc_i4_3 | + @cil_ldc_i4_4 | @cil_ldc_i4_5 | @cil_ldc_i4_6 | @cil_ldc_i4_7 | @cil_ldc_i4_8 | @cil_ldc_i4_s | @cil_ldc_i4; + +@cil_ldc_r = @cil_ldc_r4 | @cil_ldc_r8; + +@cil_literal = @cil_ldnull | @cil_ldc_i | @cil_ldc_r | @cil_ldstr; + +// Control flow + +@cil_conditional_jump = @cil_binary_jump | @cil_unary_jump; +@cil_binary_jump = @cil_beq_s | @cil_bge_s | @cil_bgt_s | @cil_ble_s | @cil_blt_s | + @cil_bne_un_s | @cil_bge_un_s | @cil_bgt_un_s | @cil_ble_un_s | @cil_blt_un_s | + @cil_beq | @cil_bge | @cil_bgt | @cil_ble | @cil_blt | + @cil_bne_un | @cil_bge_un | @cil_bgt_un | @cil_ble_un | @cil_blt_un; +@cil_unary_jump = @cil_brfalse_s | @cil_brtrue_s | @cil_brfalse | @cil_brtrue | @cil_switch; +@cil_unconditional_jump = @cil_br | @cil_br_s | @cil_leave_any; +@cil_leave_any = @cil_leave | @cil_leave_s; +@cil_jump = @cil_unconditional_jump | @cil_conditional_jump; + +// CIL call instructions + +@cil_call_any = @cil_jmp | @cil_call | @cil_calli | @cil_tail | @cil_callvirt | @cil_newobj; + +// CIL expression instructions + +@cil_expr = @cil_literal | @cil_binary_expr | @cil_unary_expr | @cil_call_any | @cil_read_access | + @cil_newarr | @cil_ldtoken | @cil_sizeof | + @cil_ldftn | @cil_ldvirtftn | @cil_localloc | @cil_mkrefany | @cil_refanytype | @cil_arglist | @cil_dup; + +@cil_unary_expr = + @cil_conversion_operation | @cil_unary_arithmetic_operation | @cil_unary_bitwise_operation| + @cil_ldlen | @cil_isinst | @cil_box | @cil_ldobj | @cil_castclass | @cil_unbox_any | + @cil_ldind | @cil_unbox; + +@cil_conversion_operation = + @cil_conv_i1 | @cil_conv_i2 | @cil_conv_i4 | @cil_conv_i8 | + @cil_conv_u1 | @cil_conv_u2 | @cil_conv_u4 | @cil_conv_u8 | + @cil_conv_ovf_i | @cil_conv_ovf_i_un | @cil_conv_ovf_i1 | @cil_conv_ovf_i1_un | + @cil_conv_ovf_i2 | @cil_conv_ovf_i2_un | @cil_conv_ovf_i4 | @cil_conv_ovf_i4_un | + @cil_conv_ovf_i8 | @cil_conv_ovf_i8_un | @cil_conv_ovf_u | @cil_conv_ovf_u_un | + @cil_conv_ovf_u1 | @cil_conv_ovf_u1_un | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_ovf_u4 | @cil_conv_ovf_u4_un | @cil_conv_ovf_u8 | @cil_conv_ovf_u8_un | + @cil_conv_r4 | @cil_conv_r8 | @cil_conv_ovf_u2 | @cil_conv_ovf_u2_un | + @cil_conv_i | @cil_conv_u | @cil_conv_r_un; + +@cil_ldind = @cil_ldind_i | @cil_ldind_i1 | @cil_ldind_i2 | @cil_ldind_i4 | @cil_ldind_i8 | + @cil_ldind_r4 | @cil_ldind_r8 | @cil_ldind_ref | @cil_ldind_u1 | @cil_ldind_u2 | @cil_ldind_u4; + +@cil_stind = @cil_stind_i | @cil_stind_i1 | @cil_stind_i2 | @cil_stind_i4 | @cil_stind_i8 | + @cil_stind_r4 | @cil_stind_r8 | @cil_stind_ref; + +@cil_bitwise_operation = @cil_binary_bitwise_operation | @cil_unary_bitwise_operation; + +@cil_binary_bitwise_operation = @cil_and | @cil_or | @cil_xor | @cil_shr | @cil_shr | @cil_shr_un | @cil_shl; + +@cil_binary_arithmetic_operation = @cil_add | @cil_sub | @cil_mul | @cil_div | @cil_div_un | + @cil_rem | @cil_rem_un | @cil_add_ovf | @cil_add_ovf_un | @cil_mul_ovf | @cil_mul_ovf_un | + @cil_sub_ovf | @cil_sub_ovf_un; + +@cil_unary_bitwise_operation = @cil_not; + +@cil_binary_expr = @cil_binary_arithmetic_operation | @cil_binary_bitwise_operation | @cil_read_array | @cil_comparison_operation; + +@cil_unary_arithmetic_operation = @cil_neg; + +@cil_comparison_operation = @cil_cgt_un | @cil_ceq | @cil_cgt | @cil_clt | @cil_clt_un; + +// Elements that retrieve an address of something +@cil_read_ref = @cil_ldloca_s | @cil_ldarga_s | @cil_ldflda | @cil_ldsflda | @cil_ldelema; + +// CIL array instructions + +@cil_read_array = + @cil_ldelem | @cil_ldelema | @cil_ldelem_i1 | @cil_ldelem_ref | @cil_ldelem_i | + @cil_ldelem_i1 | @cil_ldelem_i2 | @cil_ldelem_i4 | @cil_ldelem_i8 | @cil_ldelem_r4 | + @cil_ldelem_r8 | @cil_ldelem_u1 | @cil_ldelem_u2 | @cil_ldelem_u4; + +@cil_write_array = @cil_stelem | @cil_stelem_ref | + @cil_stelem_i | @cil_stelem_i1 | @cil_stelem_i2 | @cil_stelem_i4 | @cil_stelem_i8 | + @cil_stelem_r4 | @cil_stelem_r8; + +@cil_throw_any = @cil_throw | @cil_rethrow; + +#keyset[impl, index] +cil_instruction( + unique int id: @cil_instruction, + int opcode: int ref, + int index: int ref, + int impl: @cil_method_implementation ref); + +cil_jump( + unique int instruction: @cil_jump ref, + int target: @cil_instruction ref); + +cil_access( + unique int instruction: @cil_instruction ref, + int target: @cil_accessible ref); + +cil_value( + unique int instruction: @cil_literal ref, + string value: string ref); + +#keyset[instruction, index] +cil_switch( + int instruction: @cil_switch ref, + int index: int ref, + int target: @cil_instruction ref); + +cil_instruction_location( + unique int id: @cil_instruction ref, + int loc: @location ref); + +cil_type_location( + int id: @cil_type ref, + int loc: @location ref); + +cil_method_location( + int id: @cil_method ref, + int loc: @location ref); + +@cil_namespace = @namespace; + +@cil_type_container = @cil_type | @cil_namespace | @cil_method; + +case @cil_type.kind of + 0 = @cil_valueorreftype +| 1 = @cil_typeparameter +| 2 = @cil_array_type +| 3 = @cil_pointer_type +| 4 = @cil_function_pointer_type +; + +cil_type( + unique int id: @cil_type, + string name: string ref, + int kind: int ref, + int parent: @cil_type_container ref, + int sourceDecl: @cil_type ref); + +cil_pointer_type( + unique int id: @cil_pointer_type ref, + int pointee: @cil_type ref); + +cil_array_type( + unique int id: @cil_array_type ref, + int element_type: @cil_type ref, + int rank: int ref); + +cil_function_pointer_return_type( + unique int id: @cil_function_pointer_type ref, + int return_type: @cil_type ref); + +cil_method( + unique int id: @cil_method, + string name: string ref, + int parent: @cil_type ref, + int return_type: @cil_type ref); + +cil_method_source_declaration( + unique int method: @cil_method ref, + int source: @cil_method ref); + +cil_method_implementation( + unique int id: @cil_method_implementation, + int method: @cil_method ref, + int location: @assembly ref); + +cil_implements( + int id: @cil_method ref, + int decl: @cil_method ref); + +#keyset[parent, name] +cil_field( + unique int id: @cil_field, + int parent: @cil_type ref, + string name: string ref, + int field_type: @cil_type ref); + +@cil_element = @cil_instruction | @cil_declaration | @cil_handler | @cil_attribute | @cil_namespace; +@cil_named_element = @cil_declaration | @cil_namespace; +@cil_declaration = @cil_variable | @cil_method | @cil_type | @cil_member; +@cil_accessible = @cil_declaration; +@cil_variable = @cil_field | @cil_stack_variable; +@cil_stack_variable = @cil_local_variable | @cil_parameter; +@cil_member = @cil_method | @cil_type | @cil_field | @cil_property | @cil_event; +@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field | @cil_function_pointer_type; +@cil_parameterizable = @cil_method | @cil_function_pointer_type; +@cil_has_type_annotation = @cil_stack_variable | @cil_property | @cil_field | @cil_method | @cil_function_pointer_type; + +#keyset[parameterizable, index] +cil_parameter( + unique int id: @cil_parameter, + int parameterizable: @cil_parameterizable ref, + int index: int ref, + int param_type: @cil_type ref); + +cil_parameter_in(unique int id: @cil_parameter ref); +cil_parameter_out(unique int id: @cil_parameter ref); + +cil_setter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +#keyset[id, modifier] +cil_custom_modifiers( + int id: @cil_custom_modifier_receiver ref, + int modifier: @cil_type ref, + int kind: int ref); // modreq: 1, modopt: 0 + +cil_type_annotation( + int id: @cil_has_type_annotation ref, + int annotation: int ref); + +cil_getter(unique int prop: @cil_property ref, + int method: @cil_method ref); + +cil_adder(unique int event: @cil_event ref, + int method: @cil_method ref); + +cil_remover(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_raiser(unique int event: @cil_event ref, int method: @cil_method ref); + +cil_property( + unique int id: @cil_property, + int parent: @cil_type ref, + string name: string ref, + int property_type: @cil_type ref); + +#keyset[parent, name] +cil_event(unique int id: @cil_event, + int parent: @cil_type ref, + string name: string ref, + int event_type: @cil_type ref); + +#keyset[impl, index] +cil_local_variable( + unique int id: @cil_local_variable, + int impl: @cil_method_implementation ref, + int index: int ref, + int var_type: @cil_type ref); + +cil_function_pointer_calling_conventions( + int id: @cil_function_pointer_type ref, + int kind: int ref); + +// CIL handlers (exception handlers etc). + +case @cil_handler.kind of + 0 = @cil_catch_handler +| 1 = @cil_filter_handler +| 2 = @cil_finally_handler +| 4 = @cil_fault_handler +; + +#keyset[impl, index] +cil_handler( + unique int id: @cil_handler, + int impl: @cil_method_implementation ref, + int index: int ref, + int kind: int ref, + int try_start: @cil_instruction ref, + int try_end: @cil_instruction ref, + int handler_start: @cil_instruction ref); + +cil_handler_filter( + unique int id: @cil_handler ref, + int filter_start: @cil_instruction ref); + +cil_handler_type( + unique int id: @cil_handler ref, + int catch_type: @cil_type ref); + +@cil_controlflow_node = @cil_entry_point | @cil_instruction; + +@cil_entry_point = @cil_method_implementation | @cil_handler; + +@cil_dataflow_node = @cil_instruction | @cil_variable | @cil_method; + +cil_method_stack_size( + unique int method: @cil_method_implementation ref, + int size: int ref); + +// CIL modifiers + +cil_public(int id: @cil_member ref); +cil_private(int id: @cil_member ref); +cil_protected(int id: @cil_member ref); +cil_internal(int id: @cil_member ref); +cil_static(int id: @cil_member ref); +cil_sealed(int id: @cil_member ref); +cil_virtual(int id: @cil_method ref); +cil_abstract(int id: @cil_member ref); +cil_class(int id: @cil_type ref); +cil_interface(int id: @cil_type ref); +cil_security(int id: @cil_member ref); +cil_requiresecobject(int id: @cil_method ref); +cil_specialname(int id: @cil_method ref); +cil_newslot(int id: @cil_method ref); + +cil_base_class(unique int id: @cil_type ref, int base: @cil_type ref); +cil_base_interface(int id: @cil_type ref, int base: @cil_type ref); +cil_enum_underlying_type(unique int id: @cil_type ref, int underlying: @cil_type ref); + +#keyset[unbound, index] +cil_type_parameter( + int unbound: @cil_member ref, + int index: int ref, + int param: @cil_typeparameter ref); + +#keyset[bound, index] +cil_type_argument( + int bound: @cil_member ref, + int index: int ref, + int t: @cil_type ref); + +// CIL type parameter constraints + +cil_typeparam_covariant(int tp: @cil_typeparameter ref); +cil_typeparam_contravariant(int tp: @cil_typeparameter ref); +cil_typeparam_class(int tp: @cil_typeparameter ref); +cil_typeparam_struct(int tp: @cil_typeparameter ref); +cil_typeparam_new(int tp: @cil_typeparameter ref); +cil_typeparam_constraint(int tp: @cil_typeparameter ref, int supertype: @cil_type ref); + +// CIL attributes + +cil_attribute( + unique int attributeid: @cil_attribute, + int element: @cil_declaration ref, + int constructor: @cil_method ref); + +#keyset[attribute_id, param] +cil_attribute_named_argument( + int attribute_id: @cil_attribute ref, + string param: string ref, + string value: string ref); + +#keyset[attribute_id, index] +cil_attribute_positional_argument( + int attribute_id: @cil_attribute ref, + int index: int ref, + string value: string ref); + + +// Common .Net data model covering both C# and CIL + +// Common elements +@dotnet_element = @element | @cil_element; +@dotnet_named_element = @named_element | @cil_named_element; +@dotnet_callable = @callable | @cil_method; +@dotnet_variable = @variable | @cil_variable; +@dotnet_field = @field | @cil_field; +@dotnet_parameter = @parameter | @cil_parameter; +@dotnet_declaration = @declaration | @cil_declaration; +@dotnet_member = @member | @cil_member; +@dotnet_event = @event | @cil_event; +@dotnet_property = @property | @cil_property | @indexer; +@dotnet_parameterizable = @parameterizable | @cil_parameterizable; + +// Common types +@dotnet_type = @type | @cil_type; +@dotnet_call = @call | @cil_call_any; +@dotnet_throw = @throw_element | @cil_throw_any; +@dotnet_valueorreftype = @cil_valueorreftype | @value_or_ref_type | @cil_array_type | @void_type; +@dotnet_typeparameter = @type_parameter | @cil_typeparameter; +@dotnet_array_type = @array_type | @cil_array_type; +@dotnet_pointer_type = @pointer_type | @cil_pointer_type; +@dotnet_type_parameter = @type_parameter | @cil_typeparameter; +@dotnet_generic = @dotnet_valueorreftype | @dotnet_callable; + +// Attributes +@dotnet_attribute = @attribute | @cil_attribute; + +// Expressions +@dotnet_expr = @expr | @cil_expr; + +// Literals +@dotnet_literal = @literal_expr | @cil_literal; +@dotnet_string_literal = @string_literal_expr | @cil_ldstr; +@dotnet_int_literal = @integer_literal_expr | @cil_ldc_i; +@dotnet_float_literal = @float_literal_expr | @cil_ldc_r; +@dotnet_null_literal = @null_literal_expr | @cil_ldnull; + +@metadata_entity = @cil_method | @cil_type | @cil_field | @cil_property | @field | @property | + @callable | @value_or_ref_type | @void_type; + +metadata_handle(int entity : @metadata_entity ref, int location: @assembly ref, int handle: int ref) diff --git a/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/upgrade.properties b/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/upgrade.properties new file mode 100644 index 00000000000..1efc867850c --- /dev/null +++ b/csharp/ql/lib/upgrades/c9ee11bd1ee96e925a35cedff000be924634447f/upgrade.properties @@ -0,0 +1,4 @@ +description: Merge `expr_compiler_generated` into `compiler_generated` and add support for compiler generated statements. +compatibility: backwards +compiler_generated.rel: run compiler_generated.qlo +expr_compiler_generated.rel: delete diff --git a/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql b/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql index 4612091743f..2c9ff02349f 100644 --- a/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql +++ b/csharp/ql/src/Dead Code/DeadStoreOfLocal.ql @@ -91,6 +91,8 @@ class RelevantDefinition extends AssignableDefinition { this = any(Ssa::ExplicitDefinition ssaDef).getADefinition() or mayEscape(v) + or + v.isCaptured() ) } diff --git a/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.qhelp b/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.qhelp deleted file mode 100644 index c9b2874372b..00000000000 --- a/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.qhelp +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.ql b/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.ql deleted file mode 100644 index 5f728db8473..00000000000 --- a/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.ql +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @name Uncontrolled command line from stored user input - * @description Using externally controlled strings in a command line may allow a malicious - * user to change the meaning of the command. - * @kind path-problem - * @problem.severity error - * @security-severity 9.8 - * @precision medium - * @id cs/stored-command-line-injection - * @tags correctness - * security - * external/cwe/cwe-078 - * external/cwe/cwe-088 - */ - -import csharp -import semmle.code.csharp.security.dataflow.flowsources.Stored -import semmle.code.csharp.security.dataflow.CommandInjectionQuery -import StoredCommandInjection::PathGraph - -module StoredCommandInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof StoredFlowSource } - - predicate isSink = CommandInjectionConfig::isSink/1; - - predicate isBarrier = CommandInjectionConfig::isBarrier/1; -} - -module StoredCommandInjection = TaintTracking::Global; - -from StoredCommandInjection::PathNode source, StoredCommandInjection::PathNode sink -where StoredCommandInjection::flowPath(source, sink) -select sink.getNode(), source, sink, "This command line depends on a $@.", source.getNode(), - "stored (potentially user-provided) value" diff --git a/csharp/ql/src/Security Features/CWE-079/StoredXSS.qhelp b/csharp/ql/src/Security Features/CWE-079/StoredXSS.qhelp deleted file mode 100644 index 8bd2e14ef08..00000000000 --- a/csharp/ql/src/Security Features/CWE-079/StoredXSS.qhelp +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/csharp/ql/src/Security Features/CWE-079/StoredXSS.ql b/csharp/ql/src/Security Features/CWE-079/StoredXSS.ql deleted file mode 100644 index 140dedfec51..00000000000 --- a/csharp/ql/src/Security Features/CWE-079/StoredXSS.ql +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @name Stored cross-site scripting - * @description Writing input from the database directly to a web page indicates a cross-site - * scripting vulnerability if the data was originally user-provided. - * @kind path-problem - * @problem.severity error - * @security-severity 6.1 - * @precision medium - * @id cs/web/stored-xss - * @tags security - * external/cwe/cwe-079 - * external/cwe/cwe-116 - */ - -import csharp -import semmle.code.csharp.security.dataflow.flowsources.Stored -import semmle.code.csharp.security.dataflow.XSSQuery -import semmle.code.csharp.security.dataflow.XSSSinks -import StoredXss::PathGraph - -module StoredXssTrackingConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof StoredFlowSource } - - predicate isSink = XssTrackingConfig::isSink/1; - - predicate isBarrier = XssTrackingConfig::isBarrier/1; -} - -module StoredXss = TaintTracking::Global; - -from StoredXss::PathNode source, StoredXss::PathNode sink, string explanation -where - StoredXss::flowPath(source, sink) and - if exists(sink.getNode().(Sink).explanation()) - then explanation = " (" + sink.getNode().(Sink).explanation() + ")" - else explanation = "" -select sink.getNode(), source, sink, - "This HTML or JavaScript write" + explanation + " depends on a $@.", source.getNode(), - "stored (potentially user-provided) value" diff --git a/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.qhelp b/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.qhelp deleted file mode 100644 index 83ec163ed78..00000000000 --- a/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.qhelp +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.ql b/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.ql deleted file mode 100644 index 33c2479147d..00000000000 --- a/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.ql +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @name SQL query built from stored user-controlled sources - * @description Building a SQL query from stored user-controlled sources is vulnerable to insertion - * of malicious SQL code by the user. - * @kind path-problem - * @problem.severity error - * @security-severity 8.8 - * @precision medium - * @id cs/second-order-sql-injection - * @tags security - * external/cwe/cwe-089 - */ - -import csharp -import semmle.code.csharp.security.dataflow.SqlInjectionQuery -import semmle.code.csharp.security.dataflow.flowsources.Stored -import StoredSqlInjection::PathGraph - -module StoredSqlInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof StoredFlowSource } - - predicate isSink = SqlInjectionConfig::isSink/1; - - predicate isBarrier = SqlInjectionConfig::isBarrier/1; -} - -module StoredSqlInjection = TaintTracking::Global; - -from StoredSqlInjection::PathNode source, StoredSqlInjection::PathNode sink -where StoredSqlInjection::flowPath(source, sink) -select sink.getNode(), source, sink, "This SQL query depends on a $@.", source.getNode(), - "stored user-provided value" diff --git a/csharp/ql/src/Security Features/CWE-089/SqlInjection.ql b/csharp/ql/src/Security Features/CWE-089/SqlInjection.ql index e3fa7f80bd7..d4d1287561f 100644 --- a/csharp/ql/src/Security Features/CWE-089/SqlInjection.ql +++ b/csharp/ql/src/Security Features/CWE-089/SqlInjection.ql @@ -14,14 +14,9 @@ import csharp import semmle.code.csharp.security.dataflow.SqlInjectionQuery import SqlInjection::PathGraph -import semmle.code.csharp.security.dataflow.flowsources.Remote -import semmle.code.csharp.security.dataflow.flowsources.Local +import semmle.code.csharp.security.dataflow.flowsources.FlowSources -string getSourceType(DataFlow::Node node) { - result = node.(RemoteFlowSource).getSourceType() - or - result = node.(LocalFlowSource).getSourceType() -} +string getSourceType(DataFlow::Node node) { result = node.(SourceNode).getSourceType() } from SqlInjection::PathNode source, SqlInjection::PathNode sink where SqlInjection::flowPath(source, sink) diff --git a/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.qhelp b/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.qhelp deleted file mode 100644 index f547d512fbc..00000000000 --- a/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.qhelp +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.ql b/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.ql deleted file mode 100644 index e5015892fc4..00000000000 --- a/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.ql +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @name LDAP query built from stored user-controlled sources - * @description Building an LDAP query from stored user-controlled sources is vulnerable to - * insertion of malicious LDAP code by the user. - * @kind path-problem - * @problem.severity error - * @security-severity 9.8 - * @precision medium - * @id cs/stored-ldap-injection - * @tags security - * external/cwe/cwe-090 - */ - -import csharp -import semmle.code.csharp.security.dataflow.LDAPInjectionQuery -import semmle.code.csharp.security.dataflow.flowsources.Stored -import StoredLdapInjection::PathGraph - -module StoredLdapInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof StoredFlowSource } - - predicate isSink = LdapInjectionConfig::isSink/1; - - predicate isBarrier = LdapInjectionConfig::isBarrier/1; -} - -module StoredLdapInjection = TaintTracking::Global; - -from StoredLdapInjection::PathNode source, StoredLdapInjection::PathNode sink -where StoredLdapInjection::flowPath(source, sink) -select sink.getNode(), source, sink, "This LDAP query depends on a $@.", source.getNode(), - "stored (potentially user-provided) value" diff --git a/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql b/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql index 7402a45edde..042e2aa9f17 100644 --- a/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql +++ b/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql @@ -12,7 +12,7 @@ */ import csharp -import semmle.code.csharp.security.dataflow.flowsources.Remote +import semmle.code.csharp.security.dataflow.flowsources.FlowSources import semmle.code.csharp.frameworks.system.Xml import XmlInjection::PathGraph @@ -20,7 +20,7 @@ import XmlInjection::PathGraph * A taint-tracking configuration for untrusted user input used in XML. */ module XmlInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall mc | diff --git a/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql b/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql index daaaba7517d..9d30366af8f 100644 --- a/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql +++ b/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql @@ -13,7 +13,7 @@ */ import csharp -import semmle.code.csharp.security.dataflow.flowsources.Remote +import semmle.code.csharp.security.dataflow.flowsources.FlowSources import semmle.code.csharp.commons.Util import AssemblyPathInjection::PathGraph @@ -21,10 +21,7 @@ import AssemblyPathInjection::PathGraph * A taint-tracking configuration for untrusted user input used to load a DLL. */ module AssemblyPathInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { - source instanceof RemoteFlowSource or - source.asExpr() = any(MainMethod main).getParameter(0).getAnAccess() - } + predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } predicate isSink(DataFlow::Node sink) { exists(MethodCall mc, string name, int arg | diff --git a/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql b/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql index e8b9aa0a53f..657fdd0e183 100644 --- a/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql +++ b/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql @@ -12,16 +12,13 @@ */ import csharp -import semmle.code.csharp.security.dataflow.flowsources.Remote -import semmle.code.csharp.security.dataflow.flowsources.Local +import semmle.code.csharp.security.dataflow.flowsources.FlowSources import semmle.code.csharp.frameworks.Format import FormatString::PathGraph module FormatStringConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { - source instanceof RemoteFlowSource - or - source instanceof LocalFlowSource + source instanceof ThreatModelFlowSource or source instanceof LocalFlowSource } predicate isSink(DataFlow::Node sink) { @@ -31,11 +28,7 @@ module FormatStringConfig implements DataFlow::ConfigSig { module FormatString = TaintTracking::Global; -string getSourceType(DataFlow::Node node) { - result = node.(RemoteFlowSource).getSourceType() - or - result = node.(LocalFlowSource).getSourceType() -} +string getSourceType(DataFlow::Node node) { result = node.(SourceNode).getSourceType() } from FormatString::PathNode source, FormatString::PathNode sink where FormatString::flowPath(source, sink) diff --git a/csharp/ql/src/Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql b/csharp/ql/src/Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql index c7a5579cf33..ad5c0a71227 100644 --- a/csharp/ql/src/Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql +++ b/csharp/ql/src/Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql @@ -15,6 +15,12 @@ import csharp import semmle.code.csharp.security.dataflow.UnsafeDeserializationQuery import Flow::PathGraph +bindingset[e1, e2] +pragma[inline_late] +private predicate sameParent(DataFlow::Node e1, DataFlow::Node e2) { + e1.asExpr().getParent() = e2.asExpr().getParent() +} + module Flow = DataFlow::MergePathGraph3 - - - \ No newline at end of file diff --git a/csharp/ql/src/Security Features/CWE-643/StoredXPathInjection.ql b/csharp/ql/src/Security Features/CWE-643/StoredXPathInjection.ql deleted file mode 100644 index 3042997ec7a..00000000000 --- a/csharp/ql/src/Security Features/CWE-643/StoredXPathInjection.ql +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @name Stored XPath injection - * @description Building an XPath expression from stored data which may have been provided by the - * user is vulnerable to insertion of malicious code by the user. - * @kind path-problem - * @problem.severity error - * @security-severity 9.8 - * @precision medium - * @id cs/xml/stored-xpath-injection - * @tags security - * external/cwe/cwe-643 - */ - -import csharp -import semmle.code.csharp.security.dataflow.flowsources.Stored -import semmle.code.csharp.security.dataflow.XPathInjectionQuery -import StoredXpathInjection::PathGraph - -module StoredXpathInjectionConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source instanceof StoredFlowSource } - - predicate isSink = XpathInjectionConfig::isSink/1; - - predicate isBarrier = XpathInjectionConfig::isBarrier/1; -} - -module StoredXpathInjection = TaintTracking::Global; - -from StoredXpathInjection::PathNode source, StoredXpathInjection::PathNode sink -where StoredXpathInjection::flowPath(source, sink) -select sink.getNode(), source, sink, "This XPath expression depends on a $@.", source.getNode(), - "stored (potentially user-provided) value" diff --git a/csharp/ql/src/Telemetry/TestLibrary.qll b/csharp/ql/src/Telemetry/TestLibrary.qll index deca6d79bec..f157dd27f92 100644 --- a/csharp/ql/src/Telemetry/TestLibrary.qll +++ b/csharp/ql/src/Telemetry/TestLibrary.qll @@ -1,5 +1,4 @@ private import csharp -private import dotnet pragma[nomagic] private predicate isTestNamespace(Namespace ns) { diff --git a/csharp/ql/src/change-notes/2024-02-06-threat-models.md b/csharp/ql/src/change-notes/2024-02-06-threat-models.md new file mode 100644 index 00000000000..69ac4e4dc17 --- /dev/null +++ b/csharp/ql/src/change-notes/2024-02-06-threat-models.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Most data flow queries that track flow from *remote* flow sources now use the current *threat model* configuration instead. This doesn't lead to any changes in the produced alerts (as the default configuration is *remote* flow sources) unless the threat model configuration is changed. The changed queries are `cs/code-injection`, `cs/command-line-injection`, `cs/user-controlled-bypass`, `cs/count-untrusted-data-external-api`, `cs/untrusted-data-to-external-api`, `cs/ldap-injection`, `cs/log-forging`, `cs/xml/missing-validation`, `cs/redos`, `cs/regex-injection`, `cs/resource-injection`, `cs/sql-injection`, `cs/path-injection`, `cs/unsafe-deserialization-untrusted-input`, `cs/web/unvalidated-url-redirection`, `cs/xml/insecure-dtd-handling`, `cs/xml/xpath-injection`, `cs/web/xss`, and `cs/uncontrolled-format-string`. \ No newline at end of file diff --git a/csharp/ql/src/change-notes/2024-03-06-remove-default-local-sources.md b/csharp/ql/src/change-notes/2024-03-06-remove-default-local-sources.md new file mode 100644 index 00000000000..19494571ad1 --- /dev/null +++ b/csharp/ql/src/change-notes/2024-03-06-remove-default-local-sources.md @@ -0,0 +1,5 @@ +--- +category: minorAnalysis +--- +* Data flow queries that track flow from *local* flow sources now use the current *threat model* configuration instead. This may lead to changes in the produced alerts if the threat model configuration only uses *remote* flow sources. The changed queries are `cs/code-injection`, `cs/resource-injection`, `cs/sql-injection`, and `cs/uncontrolled-format-string`. + diff --git a/csharp/ql/src/change-notes/2024-03-11-remove-stored-query-variants.md b/csharp/ql/src/change-notes/2024-03-11-remove-stored-query-variants.md new file mode 100644 index 00000000000..f86836b1219 --- /dev/null +++ b/csharp/ql/src/change-notes/2024-03-11-remove-stored-query-variants.md @@ -0,0 +1,5 @@ +--- +category: majorAnalysis +--- +* The `Stored` variants of some queries (`cs/stored-command-line-injection`, `cs/web/stored-xss`, `cs/stored-ldap-injection`, `cs/xml/stored-xpath-injection`. `cs/second-order-sql-injection`) have been removed. If you were using these queries, their results can be restored by enabling the `file` and `database` threat models in your threat model configuration. + diff --git a/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll b/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll index 3810ff6f76a..e3459dfb1ac 100644 --- a/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll +++ b/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll @@ -1,7 +1,7 @@ import csharp import semmle.code.csharp.frameworks.system.Net import semmle.code.csharp.frameworks.System -import semmle.code.csharp.security.dataflow.flowsources.Remote +import semmle.code.csharp.security.dataflow.flowsources.FlowSources import semmle.code.csharp.security.Sanitizers //If this leaves experimental this should probably go in semmle.code.csharp.frameworks.system.Net @@ -68,8 +68,15 @@ private module TaintedWebClientConfig implements DataFlow::ConfigSig { */ module TaintedWebClient = TaintTracking::Global; -/** A source of remote user input. */ -class RemoteSource extends Source instanceof RemoteFlowSource { } +/** + * DEPRECATED: Use `ThreatModelSource` instead. + * + * A source of remote user input. + */ +deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } + +/** A source supported by the current threat model. */ +class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** * A path argument to a `WebClient` method call that has an address argument. diff --git a/csharp/ql/src/experimental/CWE-918/RequestForgery.qll b/csharp/ql/src/experimental/CWE-918/RequestForgery.qll index 29d4fa9094b..e1c6875d952 100644 --- a/csharp/ql/src/experimental/CWE-918/RequestForgery.qll +++ b/csharp/ql/src/experimental/CWE-918/RequestForgery.qll @@ -5,7 +5,7 @@ module RequestForgery { import semmle.code.csharp.frameworks.System import semmle.code.csharp.frameworks.system.Web import semmle.code.csharp.frameworks.Format - import semmle.code.csharp.security.dataflow.flowsources.Remote + import semmle.code.csharp.security.dataflow.flowsources.FlowSources /** * A data flow source for server side request forgery vulnerabilities. @@ -91,10 +91,9 @@ module RequestForgery { module RequestForgeryFlow = DataFlow::Global; /** - * A remote data flow source taken as a source - * for Server Side Request Forgery(SSRF) Vulnerabilities. + * A dataflow source for Server Side Request Forgery(SSRF) Vulnerabilities. */ - private class RemoteFlowSourceAsSource extends Source instanceof RemoteFlowSource { } + private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } /** * An url argument to a `HttpRequestMessage` constructor call diff --git a/csharp/ql/src/experimental/ir/IR.qll b/csharp/ql/src/experimental/ir/IR.qll deleted file mode 100644 index 24eaa1efd85..00000000000 --- a/csharp/ql/src/experimental/ir/IR.qll +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Most queries should operate on the aliased SSA IR, so that's what we expose - * publicly as the "IR". - */ - -import implementation.unaliased_ssa.IR diff --git a/csharp/ql/src/experimental/ir/IRConfiguration.qll b/csharp/ql/src/experimental/ir/IRConfiguration.qll deleted file mode 100644 index b5b7d7de7c2..00000000000 --- a/csharp/ql/src/experimental/ir/IRConfiguration.qll +++ /dev/null @@ -1 +0,0 @@ -import implementation.IRConfiguration diff --git a/csharp/ql/src/experimental/ir/IRConsistency.ql b/csharp/ql/src/experimental/ir/IRConsistency.ql deleted file mode 100644 index 6344b237dfd..00000000000 --- a/csharp/ql/src/experimental/ir/IRConsistency.ql +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @name IR Consistency Check - * @description Performs consistency checks on the Intermediate Representation. This query should have no results. - * @kind table - * @id cs/ir-consistency-check - */ - -import implementation.raw.IRConsistency diff --git a/csharp/ql/src/experimental/ir/PrintIR.ql b/csharp/ql/src/experimental/ir/PrintIR.ql deleted file mode 100644 index 3bc50831fd2..00000000000 --- a/csharp/ql/src/experimental/ir/PrintIR.ql +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @name Print IR - * @description Outputs a representation of the IR graph - * @id cs/print-ir - * @kind graph - */ - -import implementation.unaliased_ssa.PrintIR diff --git a/csharp/ql/src/experimental/ir/PrintIR.qll b/csharp/ql/src/experimental/ir/PrintIR.qll deleted file mode 100644 index 711c134210c..00000000000 --- a/csharp/ql/src/experimental/ir/PrintIR.qll +++ /dev/null @@ -1 +0,0 @@ -import implementation.unaliased_ssa.PrintIR diff --git a/csharp/ql/src/experimental/ir/Util.qll b/csharp/ql/src/experimental/ir/Util.qll deleted file mode 100644 index 77280f5046f..00000000000 --- a/csharp/ql/src/experimental/ir/Util.qll +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Temporary file that has stubs for various functionalities in the IR conversion. - */ - -import csharp - -class ArrayInitWithMod extends ArrayInitializer { - predicate isInitialized(int entry) { entry in [0 .. this.getNumberOfElements() - 1] } - - predicate isValueInitialized(int elementIndex) { - this.isInitialized(elementIndex) and - not exists(this.getElement(elementIndex)) - } -} - -class ObjectInitializerMod extends ObjectInitializer { - private predicate isInitialized(Field field) { - not field.isReadOnly() and // TODO: Is this the only instance whena field can not be init? - this.getAMemberInitializer().getTargetVariable() = field - } - - predicate isValueInitialized(Field field) { - this.isInitialized(field) and - not field = this.getAMemberInitializer().getInitializedMember() - } -} - -// TODO: See if we need to adapt this for C# -abstract class SideEffectFunction extends Callable { - /** - * Holds if the function never reads from memory that was defined before entry to the function. - * This memory could be from global variables, or from other memory that was reachable from a - * pointer that was passed into the function. - */ - abstract predicate neverReadsMemory(); - - /** - * Holds if the function never writes to memory that remains allocated after the function - * returns. This memory could be from global variables, or from other memory that was reachable - * from a pointer that was passed into the function. - */ - abstract predicate neverWritesMemory(); -} diff --git a/csharp/ql/src/experimental/ir/ValueNumbering.qll b/csharp/ql/src/experimental/ir/ValueNumbering.qll deleted file mode 100644 index f6cdc912a12..00000000000 --- a/csharp/ql/src/experimental/ir/ValueNumbering.qll +++ /dev/null @@ -1 +0,0 @@ -import implementation.unaliased_ssa.gvn.ValueNumbering diff --git a/csharp/ql/src/experimental/ir/implementation/EdgeKind.qll b/csharp/ql/src/experimental/ir/implementation/EdgeKind.qll deleted file mode 100644 index 91e1fe03e23..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/EdgeKind.qll +++ /dev/null @@ -1,139 +0,0 @@ -/** - * Provides classes that specify the conditions under which control flows along a given edge. - */ - -private import internal.EdgeKindInternal - -private newtype TEdgeKind = - TGotoEdge() or // Single successor (including fall-through) - TTrueEdge() or // 'true' edge of conditional branch - TFalseEdge() or // 'false' edge of conditional branch - TExceptionEdge() or // Thrown exception - TDefaultEdge() or // 'default' label of switch - TCaseEdge(string minValue, string maxValue) { - // Case label of switch - Language::hasCaseEdge(minValue, maxValue) - } - -/** - * Represents the kind of an edge in the IR control flow graph. Each - * `Instruction` or `IRBlock` has at most one successor of any single - * `EdgeKind`. - */ -abstract class EdgeKind extends TEdgeKind { - /** Gets a textual representation of this edge kind. */ - abstract string toString(); -} - -/** - * A "goto" edge, representing the unconditional successor of an `Instruction` - * or `IRBlock`. - */ -class GotoEdge extends EdgeKind, TGotoEdge { - final override string toString() { result = "Goto" } -} - -/** - * A "true" edge, representing the successor of a conditional branch when the - * condition is non-zero. - */ -class TrueEdge extends EdgeKind, TTrueEdge { - final override string toString() { result = "True" } -} - -/** - * A "false" edge, representing the successor of a conditional branch when the - * condition is zero. - */ -class FalseEdge extends EdgeKind, TFalseEdge { - final override string toString() { result = "False" } -} - -/** - * An "exception" edge, representing the successor of an instruction when that - * instruction's evaluation throws an exception. - */ -class ExceptionEdge extends EdgeKind, TExceptionEdge { - final override string toString() { result = "Exception" } -} - -/** - * A "default" edge, representing the successor of a `Switch` instruction when - * none of the case values matches the condition value. - */ -class DefaultEdge extends EdgeKind, TDefaultEdge { - final override string toString() { result = "Default" } -} - -/** - * A "case" edge, representing the successor of a `Switch` instruction when the - * the condition value matches a corresponding `case` label. - */ -class CaseEdge extends EdgeKind, TCaseEdge { - string minValue; - string maxValue; - - CaseEdge() { this = TCaseEdge(minValue, maxValue) } - - final override string toString() { - if minValue = maxValue - then result = "Case[" + minValue + "]" - else result = "Case[" + minValue + ".." + maxValue + "]" - } - - /** - * Gets the smallest value of the switch expression for which control will flow along this edge. - */ - final string getMinValue() { result = minValue } - - /** - * Gets the largest value of the switch expression for which control will flow along this edge. - */ - final string getMaxValue() { result = maxValue } -} - -/** - * Predicates to access the single instance of each `EdgeKind` class. - */ -module EdgeKind { - /** - * Gets the single instance of the `GotoEdge` class. - */ - GotoEdge gotoEdge() { result = TGotoEdge() } - - /** - * Gets the single instance of the `TrueEdge` class. - */ - TrueEdge trueEdge() { result = TTrueEdge() } - - /** - * Gets the single instance of the `FalseEdge` class. - */ - FalseEdge falseEdge() { result = TFalseEdge() } - - /** - * Gets the single instance of the `ExceptionEdge` class. - */ - ExceptionEdge exceptionEdge() { result = TExceptionEdge() } - - /** - * Gets the single instance of the `DefaultEdge` class. - */ - DefaultEdge defaultEdge() { result = TDefaultEdge() } - - /** - * Gets the `CaseEdge` representing a `case` label with the specified lower and upper bounds. - * For example: - * ``` - * switch (x) { - * case 1: // Edge kind is `caseEdge("1", "1")` - * return x; - * case 2...8: // Edge kind is `caseEdge("2", "8")` - * return x - 1; - * default: // Edge kind is `defaultEdge()` - * return 0; - * } - * ``` - */ - CaseEdge caseEdge(string minValue, string maxValue) { result = TCaseEdge(minValue, maxValue) } -} diff --git a/csharp/ql/src/experimental/ir/implementation/IRConfiguration.qll b/csharp/ql/src/experimental/ir/implementation/IRConfiguration.qll deleted file mode 100644 index 90cdb9e0f5f..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/IRConfiguration.qll +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Module used to configure the IR generation process. - */ - -private import internal.IRConfigurationInternal - -private newtype TIRConfiguration = MkIRConfiguration() - -/** - * The query can extend this class to control which functions have IR generated for them. - */ -class IRConfiguration extends TIRConfiguration { - /** Gets a textual representation of this element. */ - string toString() { result = "IRConfiguration" } - - /** - * Holds if IR should be created for function `func`. By default, holds for all functions. - */ - predicate shouldCreateIRForFunction(Language::Declaration func) { any() } - - /** - * Holds if the strings used as part of an IR dump should be generated for function `func`. - * - * This predicate is overridden in `PrintIR.qll` to avoid the expense of generating a large number - * of debug strings for IR that will not be dumped. We still generate the actual IR for these - * functions, however, to preserve the results of any interprocedural analysis. - */ - predicate shouldEvaluateDebugStringsForFunction(Language::Declaration func) { any() } -} - -private newtype TIREscapeAnalysisConfiguration = MkIREscapeAnalysisConfiguration() - -/** - * The query can extend this class to control what escape analysis is used when generating SSA. - */ -class IREscapeAnalysisConfiguration extends TIREscapeAnalysisConfiguration { - /** Gets a textual representation of this element. */ - string toString() { result = "IREscapeAnalysisConfiguration" } - - /** - * Holds if the escape analysis done by SSA construction should be sound. By default, the SSA is - * built assuming that no variable's address ever escapes. - */ - predicate useSoundEscapeAnalysis() { none() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/IRType.qll b/csharp/ql/src/experimental/ir/implementation/IRType.qll deleted file mode 100644 index 9fbcf8c4a3b..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/IRType.qll +++ /dev/null @@ -1,349 +0,0 @@ -/** - * Minimal, language-neutral type system for the IR. - */ - -private import internal.IRTypeInternal - -cached -private newtype TIRType = - TIRVoidType() or - TIRUnknownType() or - TIRErrorType() { Language::hasErrorType() } or - TIRBooleanType(int byteSize) { Language::hasBooleanType(byteSize) } or - TIRSignedIntegerType(int byteSize) { Language::hasSignedIntegerType(byteSize) } or - TIRUnsignedIntegerType(int byteSize) { Language::hasUnsignedIntegerType(byteSize) } or - TIRFloatingPointType(int byteSize, int base, Language::TypeDomain domain) { - Language::hasFloatingPointType(byteSize, base, domain) - } or - TIRAddressType(int byteSize) { Language::hasAddressType(byteSize) } or - TIRFunctionAddressType(int byteSize) { Language::hasFunctionAddressType(byteSize) } or - TIROpaqueType(Language::OpaqueTypeTag tag, int byteSize) { - Language::hasOpaqueType(tag, byteSize) - } - -/** - * The language-neutral type of an IR `Instruction`, `Operand`, or `IRVariable`. - * The interface to `IRType` and its subclasses is the same across all languages for which the IR - * is supported, so analyses that expect to be used for multiple languages should generally use - * `IRType` rather than a language-specific type. - * - * Many types from the language-specific type system will map to a single canonical `IRType`. Two - * types that map to the same `IRType` are considered equivalent by the IR. As an example, in C++, - * all pointer types map to the same instance of `IRAddressType`. - */ -class IRType extends TIRType { - /** Gets a textual representation of this type. */ - string toString() { none() } - - /** - * Gets a string that uniquely identifies this `IRType`. This string is often the same as the - * result of `IRType.toString()`, but for some types it may be more verbose to ensure uniqueness. - */ - string getIdentityString() { result = this.toString() } - - /** - * Gets the size of the type, in bytes, if known. - * - * This will hold for all `IRType` objects except `IRUnknownType`. - */ - // This predicate is overridden with `pragma[noinline]` in every leaf subclass. - // This allows callers to ask for things like _the_ floating-point type of - // size 4 without getting a join that first finds all types of size 4 and - // _then_ restricts them to floating-point types. - int getByteSize() { none() } - - /** - * Gets a single instance of `LanguageType` that maps to this `IRType`. - */ - Language::LanguageType getCanonicalLanguageType() { none() } -} - -/** - * An unknown type. Generally used to represent results and operands that access an unknown set of - * memory locations, such as the side effects of a function call. - */ -class IRUnknownType extends IRType, TIRUnknownType { - final override string toString() { result = "unknown" } - - final override int getByteSize() { none() } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalUnknownType() - } -} - -/** - * A void type, which has no values. Used to represent the result type of an instruction that does - * not produce a result. - */ -class IRVoidType extends IRType, TIRVoidType { - final override string toString() { result = "void" } - - final override int getByteSize() { result = 0 } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalVoidType() - } -} - -/** - * An error type. Used when an error in the source code prevents the extractor from determining the - * proper type. - */ -class IRErrorType extends IRType, TIRErrorType { - final override string toString() { result = "error" } - - final override int getByteSize() { result = 0 } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalErrorType() - } -} - -private class IRSizedType extends IRType { - int byteSize; - - IRSizedType() { - this = TIRBooleanType(byteSize) or - this = TIRSignedIntegerType(byteSize) or - this = TIRUnsignedIntegerType(byteSize) or - this = TIRFloatingPointType(byteSize, _, _) or - this = TIRAddressType(byteSize) or - this = TIRFunctionAddressType(byteSize) or - this = TIROpaqueType(_, byteSize) - } - // Don't override `getByteSize()` here. The optimizer seems to generate better code when this is - // overridden only in the leaf classes. -} - -/** - * A Boolean type, which can hold the values `true` (non-zero) or `false` (zero). - */ -class IRBooleanType extends IRSizedType, TIRBooleanType { - final override string toString() { result = "bool" + byteSize.toString() } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalBooleanType(byteSize) - } - - pragma[noinline] - final override int getByteSize() { result = byteSize } -} - -/** - * A numeric type. This includes `IRSignedIntegerType`, `IRUnsignedIntegerType`, and - * `IRFloatingPointType`. - */ -class IRNumericType extends IRSizedType { - IRNumericType() { - this = TIRSignedIntegerType(byteSize) or - this = TIRUnsignedIntegerType(byteSize) or - this = TIRFloatingPointType(byteSize, _, _) - } - // Don't override `getByteSize()` here. The optimizer seems to generate better code when this is - // overridden only in the leaf classes. -} - -/** - * An integer type. This includes `IRSignedIntegerType` and `IRUnsignedIntegerType`. - */ -class IRIntegerType extends IRNumericType { - IRIntegerType() { - this = TIRSignedIntegerType(byteSize) or - this = TIRUnsignedIntegerType(byteSize) - } - - /** Holds if this integer type is signed. */ - predicate isSigned() { none() } - - /** Holds if this integer type is unsigned. */ - predicate isUnsigned() { none() } - // Don't override `getByteSize()` here. The optimizer seems to generate better code when this is - // overridden only in the leaf classes. -} - -/** - * A signed two's-complement integer. Also used to represent enums whose underlying type is a signed - * integer, as well as character types whose representation is signed. - */ -class IRSignedIntegerType extends IRIntegerType, TIRSignedIntegerType { - final override string toString() { result = "int" + byteSize.toString() } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalSignedIntegerType(byteSize) - } - - pragma[noinline] - final override int getByteSize() { result = byteSize } - - override predicate isSigned() { any() } -} - -/** - * An unsigned two's-complement integer. Also used to represent enums whose underlying type is an - * unsigned integer, as well as character types whose representation is unsigned. - */ -class IRUnsignedIntegerType extends IRIntegerType, TIRUnsignedIntegerType { - final override string toString() { result = "uint" + byteSize.toString() } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalUnsignedIntegerType(byteSize) - } - - pragma[noinline] - final override int getByteSize() { result = byteSize } - - override predicate isUnsigned() { any() } -} - -/** - * A floating-point type. - */ -class IRFloatingPointType extends IRNumericType, TIRFloatingPointType { - final private int base; - final private Language::TypeDomain domain; - - IRFloatingPointType() { this = TIRFloatingPointType(_, base, domain) } - - final override string toString() { - result = this.getDomainPrefix() + this.getBaseString() + byteSize.toString() - } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalFloatingPointType(byteSize, base, domain) - } - - pragma[noinline] - final override int getByteSize() { result = byteSize } - - /** Gets the numeric base of the type. Can be either 2 (binary) or 10 (decimal). */ - final int getBase() { result = base } - - /** - * Gets the type domain of the type. Can be `RealDomain`, `ComplexDomain`, or `ImaginaryDomain`. - */ - final Language::TypeDomain getDomain() { result = domain } - - private string getBaseString() { - base = 2 and result = "float" - or - base = 10 and result = "decimal" - } - - private string getDomainPrefix() { - domain instanceof Language::RealDomain and result = "" - or - domain instanceof Language::ComplexDomain and result = "c" - or - domain instanceof Language::ImaginaryDomain and result = "i" - } -} - -/** - * An address type, representing the memory address of data. Used to represent pointers, references, - * and lvalues, include those that are garbage collected. - * - * The address of a function is represented by the separate `IRFunctionAddressType`. - */ -class IRAddressType extends IRSizedType, TIRAddressType { - final override string toString() { result = "addr" + byteSize.toString() } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalAddressType(byteSize) - } - - pragma[noinline] - final override int getByteSize() { result = byteSize } -} - -/** - * An address type, representing the memory address of code. Used to represent function pointers, - * function references, and the target of a direct function call. - */ -class IRFunctionAddressType extends IRSizedType, TIRFunctionAddressType { - final override string toString() { result = "func" + byteSize.toString() } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalFunctionAddressType(byteSize) - } - - pragma[noinline] - final override int getByteSize() { result = byteSize } -} - -/** - * A type with known size that does not fit any of the other kinds of type. Used to represent - * classes, structs, unions, fixed-size arrays, pointers-to-member, and more. - */ -class IROpaqueType extends IRSizedType, TIROpaqueType { - Language::OpaqueTypeTag tag; - - IROpaqueType() { this = TIROpaqueType(tag, byteSize) } - - final override string toString() { - result = "opaque" + byteSize.toString() + "{" + tag.toString() + "}" - } - - final override string getIdentityString() { - result = "opaque" + byteSize.toString() + "{" + Language::getOpaqueTagIdentityString(tag) + "}" - } - - final override Language::LanguageType getCanonicalLanguageType() { - result = Language::getCanonicalOpaqueType(tag, byteSize) - } - - /** - * Gets the "tag" that differentiates this type from other incompatible opaque types that have the - * same size. - */ - final Language::OpaqueTypeTag getTag() { result = tag } - - pragma[noinline] - final override int getByteSize() { result = byteSize } -} - -/** - * INTERNAL: Do not use. - * Query predicates used to check invariants that should hold for all `IRType` objects. To run all - * consistency queries for the IR, including the ones below, run - * "semmle/code/cpp/IR/IRConsistency.ql". - */ -module IRTypeConsistency { - /** - * Holds if the type has no result for `IRType.getCanonicalLanguageType()`. - */ - query predicate missingCanonicalLanguageType(IRType type, string message) { - not exists(type.getCanonicalLanguageType()) and - message = "Type does not have a canonical `LanguageType`" - } - - /** - * Holds if the type has more than one result for `IRType.getCanonicalLanguageType()`. - */ - query predicate multipleCanonicalLanguageTypes(IRType type, string message) { - strictcount(type.getCanonicalLanguageType()) > 1 and - message = - "Type has multiple canonical `LanguageType`s: " + - concat(type.getCanonicalLanguageType().toString(), ", ") - } - - /** - * Holds if the type has no result for `LanguageType.getIRType()`. - */ - query predicate missingIRType(Language::LanguageType type, string message) { - not exists(type.getIRType()) and - message = "`LanguageType` does not have a corresponding `IRType`." - } - - /** - * Holds if the type has more than one result for `LanguageType.getIRType()`. - */ - query predicate multipleIRTypes(Language::LanguageType type, string message) { - strictcount(type.getIRType()) > 1 and - message = - "`LanguageType` " + type + " has multiple `IRType`s: " + - concat(type.getIRType().toString(), ", ") - } - - import Language::LanguageTypeConsistency -} diff --git a/csharp/ql/src/experimental/ir/implementation/MemoryAccessKind.qll b/csharp/ql/src/experimental/ir/implementation/MemoryAccessKind.qll deleted file mode 100644 index 5e11a310e2f..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/MemoryAccessKind.qll +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Provides classes that describe how a particular `Instruction` or its operands access memory. - */ - -private import IRConfiguration - -private newtype TMemoryAccessKind = - TIndirectMemoryAccess() or - TBufferMemoryAccess() or - TEntireAllocationMemoryAccess() or - TEscapedMemoryAccess() or - TNonLocalMemoryAccess() or - TPhiMemoryAccess() or - TUnmodeledMemoryAccess() or - TChiTotalMemoryAccess() or - TChiPartialMemoryAccess() - -/** - * Describes the set of memory locations memory accessed by a memory operand or - * memory result. - */ -class MemoryAccessKind extends TMemoryAccessKind { - /** Gets a textual representation of this access kind. */ - string toString() { none() } - - /** - * Holds if the operand or result accesses memory pointed to by the `AddressOperand` on the - * same instruction. - */ - predicate usesAddressOperand() { none() } -} - -/** - * The operand or result accesses memory at the address specified by the `AddressOperand` on the - * same instruction. - */ -class IndirectMemoryAccess extends MemoryAccessKind, TIndirectMemoryAccess { - override string toString() { result = "indirect" } - - final override predicate usesAddressOperand() { any() } -} - -/** - * The operand or result accesses memory starting at the address specified by the `AddressOperand` - * on the same instruction, accessing a number of consecutive elements given by the - * `BufferSizeOperand`. - */ -class BufferMemoryAccess extends MemoryAccessKind, TBufferMemoryAccess { - override string toString() { result = "buffer" } - - final override predicate usesAddressOperand() { any() } -} - -/** - * The operand or results accesses all memory in the contiguous allocation that contains the address - * specified by the `AddressOperand` on the same instruction. - */ -class EntireAllocationMemoryAccess extends MemoryAccessKind, TEntireAllocationMemoryAccess { - override string toString() { result = "alloc" } - - final override predicate usesAddressOperand() { any() } -} - -/** - * The operand or result accesses all memory whose address has escaped. - */ -class EscapedMemoryAccess extends MemoryAccessKind, TEscapedMemoryAccess { - override string toString() { result = "escaped" } -} - -/** - * The operand or result access all memory whose address has escaped, other than data on the stack - * frame of the current function. - */ -class NonLocalMemoryAccess extends MemoryAccessKind, TNonLocalMemoryAccess { - override string toString() { result = "nonlocal" } -} - -/** - * The operand is a Phi operand, which accesses the same memory as its - * definition. - */ -class PhiMemoryAccess extends MemoryAccessKind, TPhiMemoryAccess { - override string toString() { result = "phi" } -} - -/** - * The operand is a ChiTotal operand, which accesses the same memory as its - * definition. - */ -class ChiTotalMemoryAccess extends MemoryAccessKind, TChiTotalMemoryAccess { - override string toString() { result = "chi(total)" } -} - -/** - * The operand is a ChiPartial operand, which accesses the same memory as its - * definition. - */ -class ChiPartialMemoryAccess extends MemoryAccessKind, TChiPartialMemoryAccess { - override string toString() { result = "chi(partial)" } -} diff --git a/csharp/ql/src/experimental/ir/implementation/Opcode.qll b/csharp/ql/src/experimental/ir/implementation/Opcode.qll deleted file mode 100644 index c473969467d..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/Opcode.qll +++ /dev/null @@ -1,1272 +0,0 @@ -/** - * Provides `Opcode`s that specify the operation performed by an `Instruction`, as well as metadata - * about those opcodes, such as operand kinds and memory accesses. - */ - -private import internal.OpcodeImports as Imports -private import internal.OperandTag -import Imports::MemoryAccessKind - -private newtype TOpcode = - TNoOp() or - TUninitialized() or - TError() or - TInitializeParameter() or - TInitializeIndirection() or - TInitializeThis() or - TEnterFunction() or - TExitFunction() or - TReturnValue() or - TReturnVoid() or - TReturnIndirection() or - TCopyValue() or - TLoad() or - TStore() or - TAdd() or - TSub() or - TMul() or - TDiv() or - TRem() or - TNegate() or - TShiftLeft() or - TShiftRight() or - TUnsignedShiftRight() or - TBitAnd() or - TBitOr() or - TBitXor() or - TBitComplement() or - TLogicalNot() or - TCompareEQ() or - TCompareNE() or - TCompareLT() or - TCompareGT() or - TCompareLE() or - TCompareGE() or - TPointerAdd() or - TPointerSub() or - TPointerDiff() or - TConvert() or - TConvertToNonVirtualBase() or - TConvertToVirtualBase() or - TConvertToDerived() or - TCheckedConvertOrNull() or - TCheckedConvertOrThrow() or - TCompleteObjectAddress() or - TVariableAddress() or - TFieldAddress() or - TFunctionAddress() or - TVirtualDeleteFunctionAddress() or - TElementsAddress() or - TConstant() or - TStringConstant() or - TConditionalBranch() or - TSwitch() or - TCall() or - TCatchByType() or - TCatchAny() or - TThrowValue() or - TReThrow() or - TUnwind() or - TAliasedDefinition() or - TInitializeNonLocal() or - TAliasedUse() or - TPhi() or - TBuiltIn() or - TVarArgsStart() or - TVarArgsEnd() or - TVarArg() or - TNextVarArg() or - TCallSideEffect() or - TCallReadSideEffect() or - TIndirectReadSideEffect() or - TIndirectMustWriteSideEffect() or - TIndirectMayWriteSideEffect() or - TBufferReadSideEffect() or - TBufferMustWriteSideEffect() or - TBufferMayWriteSideEffect() or - TSizedBufferReadSideEffect() or - TSizedBufferMustWriteSideEffect() or - TSizedBufferMayWriteSideEffect() or - TInitializeDynamicAllocation() or - TChi() or - TInlineAsm() or - TUnreached() or - TNewObj() - -/** - * An opcode that specifies the operation performed by an `Instruction`. - */ -class Opcode extends TOpcode { - /** Gets a textual representation of this element. */ - string toString() { result = "UnknownOpcode" } - - /** - * Gets the kind of memory access performed by this instruction's result. - * Holds only for opcodes with a memory result. - */ - MemoryAccessKind getWriteMemoryAccess() { none() } - - /** - * Gets the kind of memory access performed by this instruction's `MemoryOperand`. Holds only for - * opcodes that read from memory. - */ - MemoryAccessKind getReadMemoryAccess() { none() } - - /** - * Holds if the instruction has an `AddressOperand`. - */ - predicate hasAddressOperand() { none() } - - /** - * Holds if the instruction has a `BufferSizeOperand`. - */ - predicate hasBufferSizeOperand() { none() } - - /** - * Holds if the instruction's write memory access is a `may` write, as opposed to a `must` write. - */ - predicate hasMayWriteMemoryAccess() { none() } - - /** - * Holds if the instruction's read memory access is a `may` read, as opposed to a `must` read. - */ - predicate hasMayReadMemoryAccess() { none() } - - /** - * Holds if the instruction must have an operand with the specified `OperandTag`. - */ - final predicate hasOperand(OperandTag tag) { - this.hasOperandInternal(tag) - or - this.hasAddressOperand() and tag instanceof AddressOperandTag - or - this.hasBufferSizeOperand() and tag instanceof BufferSizeOperandTag - } - - /** - * Holds if the instruction must have an operand with the specified `OperandTag`, ignoring - * `AddressOperandTag` and `BufferSizeOperandTag`. - */ - predicate hasOperandInternal(OperandTag tag) { none() } -} - -/** - * The `Opcode` for a `UnaryInstruction`. - * - * See the `UnaryInstruction` documentation for more details. - */ -abstract class UnaryOpcode extends Opcode { - final override predicate hasOperandInternal(OperandTag tag) { tag instanceof UnaryOperandTag } -} - -/** - * The `Opcode` for a `BinaryInstruction`. - * - * See the `BinaryInstruction` documentation for more details. - */ -abstract class BinaryOpcode extends Opcode { - final override predicate hasOperandInternal(OperandTag tag) { - tag instanceof LeftOperandTag or - tag instanceof RightOperandTag - } -} - -/** - * The `Opcode` for a `PointerArithmeticInstruction`. - * - * See the `PointerArithmeticInstruction` documentation for more details. - */ -abstract class PointerArithmeticOpcode extends BinaryOpcode { } - -/** - * The `Opcode` for a `PointerOffsetInstruction`. - * - * See the `PointerOffsetInstruction` documentation for more details. - */ -abstract class PointerOffsetOpcode extends PointerArithmeticOpcode { } - -/** - * The `Opcode` for an `ArithmeticInstruction`. - * - * See the `ArithmeticInstruction` documentation for more details. - */ -abstract class ArithmeticOpcode extends Opcode { } - -/** - * The `Opcode` for a `BinaryArithmeticInstruction`. - * - * See the `BinaryArithmeticInstruction` documentation for more details. - */ -abstract class BinaryArithmeticOpcode extends BinaryOpcode, ArithmeticOpcode { } - -/** - * The `Opcode` for a `UnaryArithmeticInstruction`. - * - * See the `UnaryArithmeticInstruction` documentation for more details. - */ -abstract class UnaryArithmeticOpcode extends UnaryOpcode, ArithmeticOpcode { } - -/** - * The `Opcode` for a `BitwiseInstruction`. - * - * See the `BitwiseInstruction` documentation for more details. - */ -abstract class BitwiseOpcode extends Opcode { } - -/** - * The `Opcode` for a `BinaryBitwiseInstruction`. - * - * See the `BinaryBitwiseInstruction` documentation for more details. - */ -abstract class BinaryBitwiseOpcode extends BinaryOpcode, BitwiseOpcode { } - -/** - * The `Opcode` for a `UnaryBitwiseInstruction`. - * - * See the `UnaryBitwiseInstruction` documentation for more details. - */ -abstract class UnaryBitwiseOpcode extends UnaryOpcode, BitwiseOpcode { } - -/** - * The `Opcode` for a `CompareInstruction`. - * - * See the `CompareInstruction` documentation for more details. - */ -abstract class CompareOpcode extends BinaryOpcode { } - -/** - * The `Opcode` for a `RelationalInstruction`. - * - * See the `RelationalInstruction` documentation for more details. - */ -abstract class RelationalOpcode extends CompareOpcode { } - -/** - * The `Opcode` for a `CopyInstruction`. - * - * See the `CopyInstruction` documentation for more details. - */ -abstract class CopyOpcode extends Opcode { } - -/** - * The `Opcode` for a `ConvertToBaseInstruction`. - * - * See the `ConvertToBaseInstruction` documentation for more details. - */ -abstract class ConvertToBaseOpcode extends UnaryOpcode { } - -/** - * The `Opcode` for a `ReturnInstruction`. - * - * See the `ReturnInstruction` documentation for more details. - */ -abstract class ReturnOpcode extends Opcode { } - -/** - * The `Opcode` for a `ThrowInstruction`. - * - * See the `ThrowInstruction` documentation for more details. - */ -abstract class ThrowOpcode extends Opcode { } - -/** - * The `Opcode` for a `CatchInstruction`. - * - * See the `CatchInstruction` documentation for more details. - */ -abstract class CatchOpcode extends Opcode { } - -abstract private class OpcodeWithCondition extends Opcode { - final override predicate hasOperandInternal(OperandTag tag) { tag instanceof ConditionOperandTag } -} - -/** - * The `Opcode` for a `BuiltInOperationInstruction`. - * - * See the `BuiltInOperationInstruction` documentation for more details. - */ -abstract class BuiltInOperationOpcode extends Opcode { } - -/** - * The `Opcode` for a `SideEffectInstruction`. - * - * See the `SideEffectInstruction` documentation for more details. - */ -abstract class SideEffectOpcode extends Opcode { } - -/** - * An opcode that accesses a single memory location via an `AddressOperand`. - */ -abstract class IndirectMemoryAccessOpcode extends Opcode { - final override predicate hasAddressOperand() { any() } -} - -/** - * An opcode that writes to a single memory location via an `AddressOperand`. - */ -abstract class IndirectWriteOpcode extends IndirectMemoryAccessOpcode { - final override MemoryAccessKind getWriteMemoryAccess() { result instanceof IndirectMemoryAccess } -} - -/** - * An opcode that reads from a single memory location via an `AddressOperand`. - */ -abstract class IndirectReadOpcode extends IndirectMemoryAccessOpcode { - final override MemoryAccessKind getReadMemoryAccess() { result instanceof IndirectMemoryAccess } -} - -/** - * An opcode that accesses a memory buffer. - */ -abstract class BufferAccessOpcode extends Opcode { - final override predicate hasAddressOperand() { any() } -} - -/** - * An opcode that accesses a memory buffer of unknown size. - */ -abstract class UnsizedBufferAccessOpcode extends BufferAccessOpcode { } - -/** - * An opcode that writes to a memory buffer of unknown size. - */ -abstract class UnsizedBufferWriteOpcode extends UnsizedBufferAccessOpcode { - final override MemoryAccessKind getWriteMemoryAccess() { result instanceof BufferMemoryAccess } -} - -/** - * An opcode that reads from a memory buffer of unknown size. - */ -abstract class UnsizedBufferReadOpcode extends UnsizedBufferAccessOpcode { - final override MemoryAccessKind getReadMemoryAccess() { result instanceof BufferMemoryAccess } -} - -/** - * An opcode that access an entire memory allocation. - */ -abstract class EntireAllocationAccessOpcode extends Opcode { - final override predicate hasAddressOperand() { any() } -} - -/** - * An opcode that write to an entire memory allocation. - */ -abstract class EntireAllocationWriteOpcode extends EntireAllocationAccessOpcode { - final override MemoryAccessKind getWriteMemoryAccess() { - result instanceof EntireAllocationMemoryAccess - } -} - -/** - * An opcode that reads from an entire memory allocation. - */ -abstract class EntireAllocationReadOpcode extends EntireAllocationAccessOpcode { - final override MemoryAccessKind getReadMemoryAccess() { - result instanceof EntireAllocationMemoryAccess - } -} - -/** - * An opcode that accesses a memory buffer whose size is determined by a `BufferSizeOperand`. - */ -abstract class SizedBufferAccessOpcode extends BufferAccessOpcode { - final override predicate hasBufferSizeOperand() { any() } -} - -/** - * An opcode that writes to a memory buffer whose size is determined by a `BufferSizeOperand`. - */ -abstract class SizedBufferWriteOpcode extends SizedBufferAccessOpcode { - final override MemoryAccessKind getWriteMemoryAccess() { - result instanceof BufferMemoryAccess //TODO: SizedBufferMemoryAccess - } -} - -/** - * An opcode that reads from a memory buffer whose size is determined by a `BufferSizeOperand`. - */ -abstract class SizedBufferReadOpcode extends SizedBufferAccessOpcode { - final override MemoryAccessKind getReadMemoryAccess() { - result instanceof BufferMemoryAccess //TODO: SizedBufferMemoryAccess - } -} - -/** - * An opcode that might write to any escaped memory location. - */ -abstract class EscapedWriteOpcode extends Opcode { - final override MemoryAccessKind getWriteMemoryAccess() { result instanceof EscapedMemoryAccess } -} - -/** - * An opcode that might read from any escaped memory location. - */ -abstract class EscapedReadOpcode extends Opcode { - final override MemoryAccessKind getReadMemoryAccess() { result instanceof EscapedMemoryAccess } -} - -/** - * An opcode whose write memory access is a `may` write, as opposed to a `must` write. - */ -abstract class MayWriteOpcode extends Opcode { - final override predicate hasMayWriteMemoryAccess() { any() } -} - -/** - * An opcode whose read memory access is a `may` read, as opposed to a `must` read. - */ -abstract class MayReadOpcode extends Opcode { - final override predicate hasMayReadMemoryAccess() { any() } -} - -/** - * An opcode that reads a value from memory. - */ -abstract class OpcodeWithLoad extends IndirectReadOpcode { - final override predicate hasOperandInternal(OperandTag tag) { tag instanceof LoadOperandTag } -} - -/** - * The `Opcode` for a `ReadSideEffectInstruction`. - * - * See the `ReadSideEffectInstruction` documentation for more details. - */ -abstract class ReadSideEffectOpcode extends SideEffectOpcode { - final override predicate hasOperandInternal(OperandTag tag) { - tag instanceof SideEffectOperandTag - } -} - -/** - * The `Opcode` for a `WriteSideEffectInstruction`. - * - * See the `WriteSideEffectInstruction` documentation for more details. - */ -abstract class WriteSideEffectOpcode extends SideEffectOpcode { } - -/** - * Provides `Opcode`s that specify the operation performed by an `Instruction`. - */ -module Opcode { - /** - * The `Opcode` for a `NoOpInstruction`. - * - * See the `NoOpInstruction` documentation for more details. - */ - class NoOp extends Opcode, TNoOp { - final override string toString() { result = "NoOp" } - } - - /** - * The `Opcode` for an `UninitializedInstruction`. - * - * See the `UninitializedInstruction` documentation for more details. - */ - class Uninitialized extends IndirectWriteOpcode, TUninitialized { - final override string toString() { result = "Uninitialized" } - } - - /** - * The `Opcode` for an `ErrorInstruction`. - * - * See the `ErrorInstruction` documentation for more details. - */ - class Error extends Opcode, TError { - final override string toString() { result = "Error" } - } - - /** - * The `Opcode` for an `InitializeParameterInstruction`. - * - * See the `InitializeParameterInstruction` documentation for more details. - */ - class InitializeParameter extends IndirectWriteOpcode, TInitializeParameter { - final override string toString() { result = "InitializeParameter" } - } - - /** - * The `Opcode` for an `InitializeIndirectionInstruction`. - * - * See the `InitializeIndirectionInstruction` documentation for more details. - */ - class InitializeIndirection extends EntireAllocationWriteOpcode, TInitializeIndirection { - final override string toString() { result = "InitializeIndirection" } - } - - /** - * The `Opcode` for an `InitializeThisInstruction`. - * - * See the `InitializeThisInstruction` documentation for more details. - */ - class InitializeThis extends Opcode, TInitializeThis { - final override string toString() { result = "InitializeThis" } - } - - /** - * The `Opcode` for an `EnterFunctionInstruction`. - * - * See the `EnterFunctionInstruction` documentation for more details. - */ - class EnterFunction extends Opcode, TEnterFunction { - final override string toString() { result = "EnterFunction" } - } - - /** - * The `Opcode` for an `ExitFunctionInstruction`. - * - * See the `ExitFunctionInstruction` documentation for more details. - */ - class ExitFunction extends Opcode, TExitFunction { - final override string toString() { result = "ExitFunction" } - } - - /** - * The `Opcode` for a `ReturnValueInstruction`. - * - * See the `ReturnValueInstruction` documentation for more details. - */ - class ReturnValue extends ReturnOpcode, OpcodeWithLoad, TReturnValue { - final override string toString() { result = "ReturnValue" } - } - - /** - * The `Opcode` for a `ReturnVoidInstruction`. - * - * See the `ReturnVoidInstruction` documentation for more details. - */ - class ReturnVoid extends ReturnOpcode, TReturnVoid { - final override string toString() { result = "ReturnVoid" } - } - - /** - * The `Opcode` for a `ReturnIndirectionInstruction`. - * - * See the `ReturnIndirectionInstruction` documentation for more details. - */ - class ReturnIndirection extends EntireAllocationReadOpcode, TReturnIndirection { - final override string toString() { result = "ReturnIndirection" } - - final override predicate hasOperandInternal(OperandTag tag) { - tag instanceof SideEffectOperandTag - } - } - - /** - * The `Opcode` for a `CopyValueInstruction`. - * - * See the `CopyValueInstruction` documentation for more details. - */ - class CopyValue extends UnaryOpcode, CopyOpcode, TCopyValue { - final override string toString() { result = "CopyValue" } - } - - /** - * The `Opcode` for a `LoadInstruction`. - * - * See the `LoadInstruction` documentation for more details. - */ - class Load extends CopyOpcode, OpcodeWithLoad, TLoad { - final override string toString() { result = "Load" } - } - - /** - * The `Opcode` for a `StoreInstruction`. - * - * See the `StoreInstruction` documentation for more details. - */ - class Store extends CopyOpcode, IndirectWriteOpcode, TStore { - final override string toString() { result = "Store" } - - final override predicate hasOperandInternal(OperandTag tag) { - tag instanceof StoreValueOperandTag - } - } - - /** - * The `Opcode` for an `AddInstruction`. - * - * See the `AddInstruction` documentation for more details. - */ - class Add extends BinaryArithmeticOpcode, TAdd { - final override string toString() { result = "Add" } - } - - /** - * The `Opcode` for a `SubInstruction`. - * - * See the `SubInstruction` documentation for more details. - */ - class Sub extends BinaryArithmeticOpcode, TSub { - final override string toString() { result = "Sub" } - } - - /** - * The `Opcode` for a `MulInstruction`. - * - * See the `MulInstruction` documentation for more details. - */ - class Mul extends BinaryArithmeticOpcode, TMul { - final override string toString() { result = "Mul" } - } - - /** - * The `Opcode` for a `DivInstruction`. - * - * See the `DivInstruction` documentation for more details. - */ - class Div extends BinaryArithmeticOpcode, TDiv { - final override string toString() { result = "Div" } - } - - /** - * The `Opcode` for a `RemInstruction`. - * - * See the `RemInstruction` documentation for more details. - */ - class Rem extends BinaryArithmeticOpcode, TRem { - final override string toString() { result = "Rem" } - } - - /** - * The `Opcode` for a `NegateInstruction`. - * - * See the `NegateInstruction` documentation for more details. - */ - class Negate extends UnaryArithmeticOpcode, TNegate { - final override string toString() { result = "Negate" } - } - - /** - * The `Opcode` for a `ShiftLeftInstruction`. - * - * See the `ShiftLeftInstruction` documentation for more details. - */ - class ShiftLeft extends BinaryBitwiseOpcode, TShiftLeft { - final override string toString() { result = "ShiftLeft" } - } - - /** - * The `Opcode` for a `ShiftRightInstruction`. - * - * See the `ShiftRightInstruction` documentation for more details. - */ - class ShiftRight extends BinaryBitwiseOpcode, TShiftRight { - final override string toString() { result = "ShiftRight" } - } - - /** - * The `Opcode` for a `UnsignedShiftRightInstruction`. - * - * See the `UnsignedShiftRightInstruction` documentation for more details. - */ - class UnsignedShiftRight extends BinaryBitwiseOpcode, TUnsignedShiftRight { - final override string toString() { result = "UnsignedShiftRight" } - } - - /** - * The `Opcode` for a `BitAndInstruction`. - * - * See the `BitAndInstruction` documentation for more details. - */ - class BitAnd extends BinaryBitwiseOpcode, TBitAnd { - final override string toString() { result = "BitAnd" } - } - - /** - * The `Opcode` for a `BitOrInstruction`. - * - * See the `BitOrInstruction` documentation for more details. - */ - class BitOr extends BinaryBitwiseOpcode, TBitOr { - final override string toString() { result = "BitOr" } - } - - /** - * The `Opcode` for a `BitXorInstruction`. - * - * See the `BitXorInstruction` documentation for more details. - */ - class BitXor extends BinaryBitwiseOpcode, TBitXor { - final override string toString() { result = "BitXor" } - } - - /** - * The `Opcode` for a `BitComplementInstruction`. - * - * See the `BitComplementInstruction` documentation for more details. - */ - class BitComplement extends UnaryBitwiseOpcode, TBitComplement { - final override string toString() { result = "BitComplement" } - } - - /** - * The `Opcode` for a `LogicalNotInstruction`. - * - * See the `LogicalNotInstruction` documentation for more details. - */ - class LogicalNot extends UnaryOpcode, TLogicalNot { - final override string toString() { result = "LogicalNot" } - } - - /** - * The `Opcode` for a `CompareEQInstruction`. - * - * See the `CompareEQInstruction` documentation for more details. - */ - class CompareEQ extends CompareOpcode, TCompareEQ { - final override string toString() { result = "CompareEQ" } - } - - /** - * The `Opcode` for a `CompareNEInstruction`. - * - * See the `CompareNEInstruction` documentation for more details. - */ - class CompareNE extends CompareOpcode, TCompareNE { - final override string toString() { result = "CompareNE" } - } - - /** - * The `Opcode` for a `CompareLTInstruction`. - * - * See the `CompareLTInstruction` documentation for more details. - */ - class CompareLT extends RelationalOpcode, TCompareLT { - final override string toString() { result = "CompareLT" } - } - - /** - * The `Opcode` for a `CompareGTInstruction`. - * - * See the `CompareGTInstruction` documentation for more details. - */ - class CompareGT extends RelationalOpcode, TCompareGT { - final override string toString() { result = "CompareGT" } - } - - /** - * The `Opcode` for a `CompareLEInstruction`. - * - * See the `CompareLEInstruction` documentation for more details. - */ - class CompareLE extends RelationalOpcode, TCompareLE { - final override string toString() { result = "CompareLE" } - } - - /** - * The `Opcode` for a `CompareGEInstruction`. - * - * See the `CompareGEInstruction` documentation for more details. - */ - class CompareGE extends RelationalOpcode, TCompareGE { - final override string toString() { result = "CompareGE" } - } - - /** - * The `Opcode` for a `PointerAddInstruction`. - * - * See the `PointerAddInstruction` documentation for more details. - */ - class PointerAdd extends PointerOffsetOpcode, TPointerAdd { - final override string toString() { result = "PointerAdd" } - } - - /** - * The `Opcode` for a `PointerSubInstruction`. - * - * See the `PointerSubInstruction` documentation for more details. - */ - class PointerSub extends PointerOffsetOpcode, TPointerSub { - final override string toString() { result = "PointerSub" } - } - - /** - * The `Opcode` for a `PointerDiffInstruction`. - * - * See the `PointerDiffInstruction` documentation for more details. - */ - class PointerDiff extends PointerArithmeticOpcode, TPointerDiff { - final override string toString() { result = "PointerDiff" } - } - - /** - * The `Opcode` for a `ConvertInstruction`. - * - * See the `ConvertInstruction` documentation for more details. - */ - class Convert extends UnaryOpcode, TConvert { - final override string toString() { result = "Convert" } - } - - /** - * The `Opcode` for a `ConvertToNonVirtualBaseInstruction`. - * - * See the `ConvertToNonVirtualBaseInstruction` documentation for more details. - */ - class ConvertToNonVirtualBase extends ConvertToBaseOpcode, TConvertToNonVirtualBase { - final override string toString() { result = "ConvertToNonVirtualBase" } - } - - /** - * The `Opcode` for a `ConvertToVirtualBaseInstruction`. - * - * See the `ConvertToVirtualBaseInstruction` documentation for more details. - */ - class ConvertToVirtualBase extends ConvertToBaseOpcode, TConvertToVirtualBase { - final override string toString() { result = "ConvertToVirtualBase" } - } - - /** - * The `Opcode` for a `ConvertToDerivedInstruction`. - * - * See the `ConvertToDerivedInstruction` documentation for more details. - */ - class ConvertToDerived extends UnaryOpcode, TConvertToDerived { - final override string toString() { result = "ConvertToDerived" } - } - - /** - * The `Opcode` for a `CheckedConvertOrNullInstruction`. - * - * See the `CheckedConvertOrNullInstruction` documentation for more details. - */ - class CheckedConvertOrNull extends UnaryOpcode, TCheckedConvertOrNull { - final override string toString() { result = "CheckedConvertOrNull" } - } - - /** - * The `Opcode` for a `CheckedConvertOrThrowInstruction`. - * - * See the `CheckedConvertOrThrowInstruction` documentation for more details. - */ - class CheckedConvertOrThrow extends UnaryOpcode, TCheckedConvertOrThrow { - final override string toString() { result = "CheckedConvertOrThrow" } - } - - /** - * The `Opcode` for a `CompleteObjectAddressInstruction`. - * - * See the `CompleteObjectAddressInstruction` documentation for more details. - */ - class CompleteObjectAddress extends UnaryOpcode, TCompleteObjectAddress { - final override string toString() { result = "CompleteObjectAddress" } - } - - /** - * The `Opcode` for a `VariableAddressInstruction`. - * - * See the `VariableAddressInstruction` documentation for more details. - */ - class VariableAddress extends Opcode, TVariableAddress { - final override string toString() { result = "VariableAddress" } - } - - /** - * The `Opcode` for a `FieldAddressInstruction`. - * - * See the `FieldAddressInstruction` documentation for more details. - */ - class FieldAddress extends UnaryOpcode, TFieldAddress { - final override string toString() { result = "FieldAddress" } - } - - /** - * The `Opcode` for an `ElementsAddressInstruction`. - * - * See the `ElementsAddressInstruction` documentation for more details. - */ - class ElementsAddress extends UnaryOpcode, TElementsAddress { - final override string toString() { result = "ElementsAddress" } - } - - /** - * The `Opcode` for a `FunctionAddressInstruction`. - * - * See the `FunctionAddressInstruction` documentation for more details. - */ - class FunctionAddress extends Opcode, TFunctionAddress { - final override string toString() { result = "FunctionAddress" } - } - - /** - * The `Opcode` for a `VirtualDeleteFunctionAddress`. - * - * See the `VirtualDeleteFunctionAddressInstruction` documentation for more details. - */ - class VirtualDeleteFunctionAddress extends Opcode, TVirtualDeleteFunctionAddress { - final override string toString() { result = "VirtualDeleteFunctionAddress" } - } - - /** - * The `Opcode` for a `ConstantInstruction`. - * - * See the `ConstantInstruction` documentation for more details. - */ - class Constant extends Opcode, TConstant { - final override string toString() { result = "Constant" } - } - - /** - * The `Opcode` for a `StringConstantInstruction`. - * - * See the `StringConstantInstruction` documentation for more details. - */ - class StringConstant extends Opcode, TStringConstant { - final override string toString() { result = "StringConstant" } - } - - /** - * The `Opcode` for a `ConditionalBranchInstruction`. - * - * See the `ConditionalBranchInstruction` documentation for more details. - */ - class ConditionalBranch extends OpcodeWithCondition, TConditionalBranch { - final override string toString() { result = "ConditionalBranch" } - } - - /** - * The `Opcode` for a `SwitchInstruction`. - * - * See the `SwitchInstruction` documentation for more details. - */ - class Switch extends OpcodeWithCondition, TSwitch { - final override string toString() { result = "Switch" } - } - - /** - * The `Opcode` for a `CallInstruction`. - * - * See the `CallInstruction` documentation for more details. - */ - class Call extends Opcode, TCall { - final override string toString() { result = "Call" } - - final override predicate hasOperandInternal(OperandTag tag) { - tag instanceof CallTargetOperandTag - } - } - - /** - * The `Opcode` for a `CatchByTypeInstruction`. - * - * See the `CatchByTypeInstruction` documentation for more details. - */ - class CatchByType extends CatchOpcode, TCatchByType { - final override string toString() { result = "CatchByType" } - } - - /** - * The `Opcode` for a `CatchAnyInstruction`. - * - * See the `CatchAnyInstruction` documentation for more details. - */ - class CatchAny extends CatchOpcode, TCatchAny { - final override string toString() { result = "CatchAny" } - } - - /** - * The `Opcode` for a `ThrowValueInstruction`. - * - * See the `ThrowValueInstruction` documentation for more details. - */ - class ThrowValue extends ThrowOpcode, OpcodeWithLoad, TThrowValue { - final override string toString() { result = "ThrowValue" } - } - - /** - * The `Opcode` for a `ReThrowInstruction`. - * - * See the `ReThrowInstruction` documentation for more details. - */ - class ReThrow extends ThrowOpcode, TReThrow { - final override string toString() { result = "ReThrow" } - } - - /** - * The `Opcode` for an `UnwindInstruction`. - * - * See the `UnwindInstruction` documentation for more details. - */ - class Unwind extends Opcode, TUnwind { - final override string toString() { result = "Unwind" } - } - - /** - * The `Opcode` for an `AliasedDefinitionInstruction`. - * - * See the `AliasedDefinitionInstruction` documentation for more details. - */ - class AliasedDefinition extends Opcode, TAliasedDefinition { - final override string toString() { result = "AliasedDefinition" } - - final override MemoryAccessKind getWriteMemoryAccess() { result instanceof EscapedMemoryAccess } - } - - /** - * The `Opcode` for an `InitializeNonLocalInstruction`. - * - * See the `InitializeNonLocalInstruction` documentation for more details. - */ - class InitializeNonLocal extends Opcode, TInitializeNonLocal { - final override string toString() { result = "InitializeNonLocal" } - - final override MemoryAccessKind getWriteMemoryAccess() { - result instanceof NonLocalMemoryAccess - } - } - - /** - * The `Opcode` for an `AliasedUseInstruction`. - * - * See the `AliasedUseInstruction` documentation for more details. - */ - class AliasedUse extends Opcode, TAliasedUse { - final override string toString() { result = "AliasedUse" } - - final override MemoryAccessKind getReadMemoryAccess() { result instanceof NonLocalMemoryAccess } - - final override predicate hasOperandInternal(OperandTag tag) { - tag instanceof SideEffectOperandTag - } - } - - /** - * The `Opcode` for a `PhiInstruction`. - * - * See the `PhiInstruction` documentation for more details. - */ - class Phi extends Opcode, TPhi { - final override string toString() { result = "Phi" } - - final override MemoryAccessKind getWriteMemoryAccess() { result instanceof PhiMemoryAccess } - } - - /** - * The `Opcode` for a `BuiltInInstruction`. - * - * See the `BuiltInInstruction` documentation for more details. - */ - class BuiltIn extends BuiltInOperationOpcode, TBuiltIn { - final override string toString() { result = "BuiltIn" } - } - - /** - * The `Opcode` for a `VarArgsStartInstruction`. - * - * See the `VarArgsStartInstruction` documentation for more details. - */ - class VarArgsStart extends UnaryOpcode, TVarArgsStart { - final override string toString() { result = "VarArgsStart" } - } - - /** - * The `Opcode` for a `VarArgsEndInstruction`. - * - * See the `VarArgsEndInstruction` documentation for more details. - */ - class VarArgsEnd extends UnaryOpcode, TVarArgsEnd { - final override string toString() { result = "VarArgsEnd" } - } - - /** - * The `Opcode` for a `VarArgInstruction`. - * - * See the `VarArgInstruction` documentation for more details. - */ - class VarArg extends UnaryOpcode, TVarArg { - final override string toString() { result = "VarArg" } - } - - /** - * The `Opcode` for a `NextVarArgInstruction`. - * - * See the `NextVarArgInstruction` documentation for more details. - */ - class NextVarArg extends UnaryOpcode, TNextVarArg { - final override string toString() { result = "NextVarArg" } - } - - /** - * The `Opcode` for a `CallSideEffectInstruction`. - * - * See the `CallSideEffectInstruction` documentation for more details. - */ - class CallSideEffect extends WriteSideEffectOpcode, EscapedWriteOpcode, MayWriteOpcode, - ReadSideEffectOpcode, EscapedReadOpcode, MayReadOpcode, TCallSideEffect - { - final override string toString() { result = "CallSideEffect" } - } - - /** - * The `Opcode` for a `CallReadSideEffectInstruction`. - * - * See the `CallReadSideEffectInstruction` documentation for more details. - */ - class CallReadSideEffect extends ReadSideEffectOpcode, EscapedReadOpcode, MayReadOpcode, - TCallReadSideEffect - { - final override string toString() { result = "CallReadSideEffect" } - } - - /** - * The `Opcode` for an `IndirectReadSideEffectInstruction`. - * - * See the `IndirectReadSideEffectInstruction` documentation for more details. - */ - class IndirectReadSideEffect extends ReadSideEffectOpcode, IndirectReadOpcode, - TIndirectReadSideEffect - { - final override string toString() { result = "IndirectReadSideEffect" } - } - - /** - * The `Opcode` for an `IndirectMustWriteSideEffectInstruction`. - * - * See the `IndirectMustWriteSideEffectInstruction` documentation for more details. - */ - class IndirectMustWriteSideEffect extends WriteSideEffectOpcode, IndirectWriteOpcode, - TIndirectMustWriteSideEffect - { - final override string toString() { result = "IndirectMustWriteSideEffect" } - } - - /** - * The `Opcode` for an `IndirectMayWriteSideEffectInstruction`. - * - * See the `IndirectMayWriteSideEffectInstruction` documentation for more details. - */ - class IndirectMayWriteSideEffect extends WriteSideEffectOpcode, IndirectWriteOpcode, - MayWriteOpcode, TIndirectMayWriteSideEffect - { - final override string toString() { result = "IndirectMayWriteSideEffect" } - } - - /** - * The `Opcode` for a `BufferReadSideEffectInstruction`. - * - * See the `BufferReadSideEffectInstruction` documentation for more details. - */ - class BufferReadSideEffect extends ReadSideEffectOpcode, UnsizedBufferReadOpcode, - TBufferReadSideEffect - { - final override string toString() { result = "BufferReadSideEffect" } - } - - /** - * The `Opcode` for a `BufferMustWriteSideEffectInstruction`. - * - * See the `BufferMustWriteSideEffectInstruction` documentation for more details. - */ - class BufferMustWriteSideEffect extends WriteSideEffectOpcode, UnsizedBufferWriteOpcode, - TBufferMustWriteSideEffect - { - final override string toString() { result = "BufferMustWriteSideEffect" } - } - - /** - * The `Opcode` for a `BufferMayWriteSideEffectInstruction`. - * - * See the `BufferMayWriteSideEffectInstruction` documentation for more details. - */ - class BufferMayWriteSideEffect extends WriteSideEffectOpcode, UnsizedBufferWriteOpcode, - MayWriteOpcode, TBufferMayWriteSideEffect - { - final override string toString() { result = "BufferMayWriteSideEffect" } - } - - /** - * The `Opcode` for a `SizedBufferReadSideEffectInstruction`. - * - * See the `SizedBufferReadSideEffectInstruction` documentation for more details. - */ - class SizedBufferReadSideEffect extends ReadSideEffectOpcode, SizedBufferReadOpcode, - TSizedBufferReadSideEffect - { - final override string toString() { result = "SizedBufferReadSideEffect" } - } - - /** - * The `Opcode` for a `SizedBufferMustWriteSideEffectInstruction`. - * - * See the `SizedBufferMustWriteSideEffectInstruction` documentation for more details. - */ - class SizedBufferMustWriteSideEffect extends WriteSideEffectOpcode, SizedBufferWriteOpcode, - TSizedBufferMustWriteSideEffect - { - final override string toString() { result = "SizedBufferMustWriteSideEffect" } - } - - /** - * The `Opcode` for a `SizedBufferMayWriteSideEffectInstruction`. - * - * See the `SizedBufferMayWriteSideEffectInstruction` documentation for more details. - */ - class SizedBufferMayWriteSideEffect extends WriteSideEffectOpcode, SizedBufferWriteOpcode, - MayWriteOpcode, TSizedBufferMayWriteSideEffect - { - final override string toString() { result = "SizedBufferMayWriteSideEffect" } - } - - /** - * The `Opcode` for an `InitializeDynamicAllocationInstruction`. - * - * See the `InitializeDynamicAllocationInstruction` documentation for more details. - */ - class InitializeDynamicAllocation extends SideEffectOpcode, EntireAllocationWriteOpcode, - TInitializeDynamicAllocation - { - final override string toString() { result = "InitializeDynamicAllocation" } - } - - /** - * The `Opcode` for a `ChiInstruction`. - * - * See the `ChiInstruction` documentation for more details. - */ - class Chi extends Opcode, TChi { - final override string toString() { result = "Chi" } - - final override predicate hasOperandInternal(OperandTag tag) { - tag instanceof ChiTotalOperandTag - or - tag instanceof ChiPartialOperandTag - } - - final override MemoryAccessKind getWriteMemoryAccess() { - result instanceof ChiTotalMemoryAccess - } - } - - /** - * The `Opcode` for an `InlineAsmInstruction`. - * - * See the `InlineAsmInstruction` documentation for more details. - */ - class InlineAsm extends Opcode, EscapedWriteOpcode, MayWriteOpcode, EscapedReadOpcode, - MayReadOpcode, TInlineAsm - { - final override string toString() { result = "InlineAsm" } - - final override predicate hasOperandInternal(OperandTag tag) { - tag instanceof SideEffectOperandTag - } - } - - /** - * The `Opcode` for an `UnreachedInstruction`. - * - * See the `UnreachedInstruction` documentation for more details. - */ - class Unreached extends Opcode, TUnreached { - final override string toString() { result = "Unreached" } - } - - /** - * The `Opcode` for a `NewObjInstruction`. - * - * See the `NewObjInstruction` documentation for more details. - */ - class NewObj extends Opcode, TNewObj { - final override string toString() { result = "NewObj" } - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/TempVariableTag.qll b/csharp/ql/src/experimental/ir/implementation/TempVariableTag.qll deleted file mode 100644 index 5f230de560d..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/TempVariableTag.qll +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Defines the public interface to temporary variable tags, which describe the reason a particular - * `IRTempVariable` was generated. - */ - -private import internal.TempVariableTagInternal -private import Imports::TempVariableTag - -/** - * A reason that a particular IR temporary variable was generated. For example, it could be - * generated to hold the return value of a function, or to hold the result of a `?:` operator - * computed on each branch. The set of possible `TempVariableTag`s is language-dependent. - */ -class TempVariableTag extends TTempVariableTag { - /** Gets a textual representation of this tag. */ - string toString() { result = getTempVariableTagId(this) } -} diff --git a/csharp/ql/src/experimental/ir/implementation/UseSoundEscapeAnalysis.qll b/csharp/ql/src/experimental/ir/implementation/UseSoundEscapeAnalysis.qll deleted file mode 100644 index b9b1dc243b1..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/UseSoundEscapeAnalysis.qll +++ /dev/null @@ -1,9 +0,0 @@ -import IRConfiguration - -/** - * Overrides the default IR configuration to use sound escape analysis, instead of assuming that - * variable addresses never escape. - */ -class SoundEscapeAnalysisConfiguration extends IREscapeAnalysisConfiguration { - override predicate useSoundEscapeAnalysis() { any() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/internal/AliasedSSAStub.qll b/csharp/ql/src/experimental/ir/implementation/internal/AliasedSSAStub.qll deleted file mode 100644 index 1efb7137147..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/AliasedSSAStub.qll +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Provides a stub implementation of the required aliased SSA interface until we implement aliased - * SSA construction for C#. - */ - -private import IRFunctionBase -private import TInstruction - -module Ssa { - class MemoryLocation = boolean; - - predicate hasPhiInstruction(TRawInstruction blockStartInstr, MemoryLocation memoryLocation) { - none() - } - - predicate hasChiInstruction(TRawInstruction primaryInstruction) { none() } - - predicate hasUnreachedInstruction(IRFunctionBase irFunc) { none() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/internal/EdgeKindInternal.qll b/csharp/ql/src/experimental/ir/implementation/internal/EdgeKindInternal.qll deleted file mode 100644 index ebcc9573bce..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/EdgeKindInternal.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language diff --git a/csharp/ql/src/experimental/ir/implementation/internal/IRConfigurationInternal.qll b/csharp/ql/src/experimental/ir/implementation/internal/IRConfigurationInternal.qll deleted file mode 100644 index ebcc9573bce..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/IRConfigurationInternal.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language diff --git a/csharp/ql/src/experimental/ir/implementation/internal/IRFunctionBase.qll b/csharp/ql/src/experimental/ir/implementation/internal/IRFunctionBase.qll deleted file mode 100644 index 571b0a12f49..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/IRFunctionBase.qll +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Provides a base class, `IRFunctionBase`, for the stage-independent portions of `IRFunction`. - */ - -private import IRFunctionBaseInternal - -private newtype TIRFunction = - TFunctionIRFunction(Language::Function func) { IRConstruction::Raw::functionHasIR(func) } or - TVarInitIRFunction(Language::Variable var) { IRConstruction::Raw::varHasIRFunc(var) } - -/** - * The IR for a function. This base class contains only the predicates that are the same between all - * phases of the IR. Each instantiation of `IRFunction` extends this class. - */ -class IRFunctionBase extends TIRFunction { - Language::Declaration decl; - - IRFunctionBase() { - this = TFunctionIRFunction(decl) - or - this = TVarInitIRFunction(decl) - } - - /** Gets a textual representation of this element. */ - final string toString() { result = "IR: " + decl.toString() } - - /** Gets the function whose IR is represented. */ - final Language::Declaration getFunction() { result = decl } - - /** Gets the location of the function. */ - final Language::Location getLocation() { result = decl.getLocation() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/internal/IRFunctionBaseInternal.qll b/csharp/ql/src/experimental/ir/implementation/internal/IRFunctionBaseInternal.qll deleted file mode 100644 index f2da59bbb1d..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/IRFunctionBaseInternal.qll +++ /dev/null @@ -1,2 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language -import experimental.ir.implementation.raw.internal.IRConstruction as IRConstruction diff --git a/csharp/ql/src/experimental/ir/implementation/internal/IRTypeInternal.qll b/csharp/ql/src/experimental/ir/implementation/internal/IRTypeInternal.qll deleted file mode 100644 index ebcc9573bce..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/IRTypeInternal.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language diff --git a/csharp/ql/src/experimental/ir/implementation/internal/OpcodeImports.qll b/csharp/ql/src/experimental/ir/implementation/internal/OpcodeImports.qll deleted file mode 100644 index 8bacf51d8a2..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/OpcodeImports.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.implementation.MemoryAccessKind as MemoryAccessKind diff --git a/csharp/ql/src/experimental/ir/implementation/internal/OperandTag.qll b/csharp/ql/src/experimental/ir/implementation/internal/OperandTag.qll deleted file mode 100644 index f2e23b01a13..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/OperandTag.qll +++ /dev/null @@ -1,300 +0,0 @@ -/** - * Defines the set of possible `OperandTag`s, which are used to identify the role each `Operand` - * plays in the evaluation of its `Instruction`. - */ - -private import OperandTagInternal - -private newtype TOperandTag = - TAddressOperand() or - TBufferSizeOperand() or - TSideEffectOperand() or - TLoadOperand() or - TStoreValueOperand() or - TUnaryOperand() or - TLeftOperand() or - TRightOperand() or - TConditionOperand() or - TCallTargetOperand() or - TThisArgumentOperand() or - TPositionalArgumentOperand(int argIndex) { Language::hasPositionalArgIndex(argIndex) } or - TChiTotalOperand() or - TChiPartialOperand() or - TAsmOperand(int index) { Language::hasAsmOperandIndex(index) } - -/** - * Identifies the kind of operand on an instruction. Each `Instruction` has at - * most one operand of any single `OperandTag`. The set of `OperandTag`s used by - * an `Instruction` is determined by the instruction's opcode. - */ -abstract class OperandTag extends TOperandTag { - /** Gets a textual representation of this operand tag */ - abstract string toString(); - - /** - * Gets an integer that represents where this this operand will appear in the operand list of an - * instruction when the IR is printed. - */ - abstract int getSortOrder(); - - /** - * Gets a label that will appear before the operand when the IR is printed. - */ - final string getLabel() { - if this.alwaysPrintLabel() then result = this.getId() + ":" else result = "" - } - - /** - * Gets an identifier that uniquely identifies this operand within its instruction. - */ - abstract string getId(); - - /** - * Holds if the operand should always be prefixed with its label in the dump of its instruction. - */ - predicate alwaysPrintLabel() { none() } -} - -/** - * An operand that consumes a memory result (e.g. the `LoadOperand` on a `Load` instruction). - */ -abstract class MemoryOperandTag extends OperandTag { } - -/** - * An operand that consumes a register (non-memory) result. - */ -abstract class RegisterOperandTag extends OperandTag { } - -/** - * A memory operand whose type may be different from the result type of its definition instruction. - */ -abstract class TypedOperandTag extends MemoryOperandTag { } - -// Note: individual subtypes are listed in the order that the operands should -// appear in the operand list of the instruction when the IR is printed. -/** - * The address operand of an instruction that loads or stores a value from - * memory (e.g. `Load`, `Store`, `InitializeParameter`, `IndirectReadSideEffect`). - */ -class AddressOperandTag extends RegisterOperandTag, TAddressOperand { - final override string toString() { result = "Address" } - - final override int getSortOrder() { result = 0 } - - final override predicate alwaysPrintLabel() { any() } - - final override string getId() { result = "&" } -} - -AddressOperandTag addressOperand() { result = TAddressOperand() } - -/** - * The buffer size operand of an instruction that represents a read or write of - * a buffer. - */ -class BufferSizeOperandTag extends RegisterOperandTag, TBufferSizeOperand { - final override string toString() { result = "BufferSize" } - - final override int getSortOrder() { result = 1 } - - final override string getId() { result = "size" } -} - -BufferSizeOperandTag bufferSizeOperand() { result = TBufferSizeOperand() } - -/** - * The operand representing the read side effect of a `SideEffectInstruction`. - */ -class SideEffectOperandTag extends TypedOperandTag, TSideEffectOperand { - final override string toString() { result = "SideEffect" } - - final override int getSortOrder() { result = 2 } - - final override string getId() { result = "side_effect" } -} - -SideEffectOperandTag sideEffectOperand() { result = TSideEffectOperand() } - -/** - * The source value operand of an instruction that loads a value from memory (e.g. `Load`, - * `ReturnValue`, `ThrowValue`). - */ -class LoadOperandTag extends TypedOperandTag, TLoadOperand { - final override string toString() { result = "Load" } - - final override int getSortOrder() { result = 3 } - - final override string getId() { result = "load" } -} - -LoadOperandTag loadOperand() { result = TLoadOperand() } - -/** - * The source value operand of a `Store` instruction. - */ -class StoreValueOperandTag extends RegisterOperandTag, TStoreValueOperand { - final override string toString() { result = "StoreValue" } - - final override int getSortOrder() { result = 4 } - - final override string getId() { result = "store" } -} - -StoreValueOperandTag storeValueOperand() { result = TStoreValueOperand() } - -/** - * The sole operand of a unary instruction (e.g. `Convert`, `Negate`, `Copy`). - */ -class UnaryOperandTag extends RegisterOperandTag, TUnaryOperand { - final override string toString() { result = "Unary" } - - final override int getSortOrder() { result = 5 } - - final override string getId() { result = "unary" } -} - -UnaryOperandTag unaryOperand() { result = TUnaryOperand() } - -/** - * The left operand of a binary instruction (e.g. `Add`, `CompareEQ`). - */ -class LeftOperandTag extends RegisterOperandTag, TLeftOperand { - final override string toString() { result = "Left" } - - final override int getSortOrder() { result = 6 } - - final override string getId() { result = "left" } -} - -LeftOperandTag leftOperand() { result = TLeftOperand() } - -/** - * The right operand of a binary instruction (e.g. `Add`, `CompareEQ`). - */ -class RightOperandTag extends RegisterOperandTag, TRightOperand { - final override string toString() { result = "Right" } - - final override int getSortOrder() { result = 7 } - - final override string getId() { result = "right" } -} - -RightOperandTag rightOperand() { result = TRightOperand() } - -/** - * The condition operand of a `ConditionalBranch` or `Switch` instruction. - */ -class ConditionOperandTag extends RegisterOperandTag, TConditionOperand { - final override string toString() { result = "Condition" } - - final override int getSortOrder() { result = 8 } - - final override string getId() { result = "cond" } -} - -ConditionOperandTag conditionOperand() { result = TConditionOperand() } - -/** - * The operand representing the target function of an `Call` instruction. - */ -class CallTargetOperandTag extends RegisterOperandTag, TCallTargetOperand { - final override string toString() { result = "CallTarget" } - - final override int getSortOrder() { result = 10 } - - final override predicate alwaysPrintLabel() { any() } - - final override string getId() { result = "func" } -} - -CallTargetOperandTag callTargetOperand() { result = TCallTargetOperand() } - -/** - * An operand representing an argument to a function call. This includes both - * positional arguments (represented by `PositionalArgumentOperand`) and the - * implicit `this` argument, if any (represented by `ThisArgumentOperand`). - */ -abstract class ArgumentOperandTag extends RegisterOperandTag { } - -/** - * An operand representing the implicit 'this' argument to a member function - * call. - */ -class ThisArgumentOperandTag extends ArgumentOperandTag, TThisArgumentOperand { - ThisArgumentOperandTag() { this = TThisArgumentOperand() } - - final override string toString() { result = "Arg(this)" } - - final override int getSortOrder() { result = 11 } - - final override predicate alwaysPrintLabel() { any() } - - final override string getId() { result = "this" } -} - -ThisArgumentOperandTag thisArgumentOperand() { result = TThisArgumentOperand() } - -/** - * An operand representing an argument to a function call. - */ -class PositionalArgumentOperandTag extends ArgumentOperandTag, TPositionalArgumentOperand { - int argIndex; - - PositionalArgumentOperandTag() { this = TPositionalArgumentOperand(argIndex) } - - final override string toString() { result = "Arg(" + argIndex + ")" } - - final override int getSortOrder() { result = 12 + argIndex } - - final override predicate alwaysPrintLabel() { any() } - - final int getArgIndex() { result = argIndex } - - final override string getId() { result = argIndex.toString() } -} - -PositionalArgumentOperandTag positionalArgumentOperand(int argIndex) { - result = TPositionalArgumentOperand(argIndex) -} - -abstract class ChiOperandTag extends MemoryOperandTag { } - -class ChiTotalOperandTag extends ChiOperandTag, TChiTotalOperand { - final override string toString() { result = "ChiTotal" } - - final override int getSortOrder() { result = 13 } - - final override predicate alwaysPrintLabel() { any() } - - final override string getId() { result = "total" } -} - -ChiTotalOperandTag chiTotalOperand() { result = TChiTotalOperand() } - -class ChiPartialOperandTag extends ChiOperandTag, TChiPartialOperand { - final override string toString() { result = "ChiPartial" } - - final override int getSortOrder() { result = 14 } - - final override predicate alwaysPrintLabel() { any() } - - final override string getId() { result = "partial" } -} - -ChiPartialOperandTag chiPartialOperand() { result = TChiPartialOperand() } - -class AsmOperandTag extends RegisterOperandTag, TAsmOperand { - int index; - - AsmOperandTag() { this = TAsmOperand(index) } - - final override string toString() { result = "AsmOperand(" + index + ")" } - - final override int getSortOrder() { result = 15 + index } - - final override predicate alwaysPrintLabel() { any() } - - final override string getId() { result = index.toString() } -} - -AsmOperandTag asmOperand(int index) { result = TAsmOperand(index) } diff --git a/csharp/ql/src/experimental/ir/implementation/internal/OperandTagInternal.qll b/csharp/ql/src/experimental/ir/implementation/internal/OperandTagInternal.qll deleted file mode 100644 index ebcc9573bce..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/OperandTagInternal.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language diff --git a/csharp/ql/src/experimental/ir/implementation/internal/TIRVariable.qll b/csharp/ql/src/experimental/ir/implementation/internal/TIRVariable.qll deleted file mode 100644 index fe72263249f..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/TIRVariable.qll +++ /dev/null @@ -1,23 +0,0 @@ -private import TIRVariableInternal -private import Imports::TempVariableTag - -newtype TIRVariable = - TIRUserVariable(Language::Variable var, Language::LanguageType type, Language::Declaration func) { - Construction::hasUserVariable(func, var, type) - } or - TIRTempVariable( - Language::Declaration func, Language::AST ast, TempVariableTag tag, Language::LanguageType type - ) { - Construction::hasTempVariable(func, ast, tag, type) - } or - TIRDynamicInitializationFlag( - Language::Declaration func, Language::Variable var, Language::LanguageType type - ) { - Construction::hasDynamicInitializationFlag(func, var, type) - } or - TIRStringLiteral( - Language::Declaration func, Language::AST ast, Language::LanguageType type, - Language::StringLiteral literal - ) { - Construction::hasStringLiteral(func, ast, type, literal) - } diff --git a/csharp/ql/src/experimental/ir/implementation/internal/TIRVariableInternal.qll b/csharp/ql/src/experimental/ir/implementation/internal/TIRVariableInternal.qll deleted file mode 100644 index e2b2c408a4f..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/TIRVariableInternal.qll +++ /dev/null @@ -1,7 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language -import experimental.ir.implementation.raw.internal.IRConstruction::Raw as Construction -private import experimental.ir.implementation.TempVariableTag as TempVariableTag_ - -module Imports { - module TempVariableTag = TempVariableTag_; -} diff --git a/csharp/ql/src/experimental/ir/implementation/internal/TInstruction.qll b/csharp/ql/src/experimental/ir/implementation/internal/TInstruction.qll deleted file mode 100644 index bb3eb683653..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/TInstruction.qll +++ /dev/null @@ -1,106 +0,0 @@ -private import TInstructionInternal -private import IRFunctionBase -private import TInstructionImports as Imports -private import Imports::IRType -private import Imports::Opcode - -/** - * An IR instruction. `TInstruction` is shared across all phases of the IR. There are individual - * branches of this type for instructions created directly from the AST (`TRawInstruction`) and for - * instructions added by each stage of SSA construction (`T*PhiInstruction`, `T*ChiInstruction`, - * `T*UnreachedInstruction`). Each stage then defines a `TStageInstruction` type that is a union of - * all of the branches that can appear in that particular stage. The public `Instruction` class for - * each phase extends the `TStageInstruction` type for that stage. - */ -cached -newtype TInstruction = - TRawInstruction( - IRConstruction::Raw::InstructionTag1 tag1, IRConstruction::Raw::InstructionTag2 tag2 - ) { - IRConstruction::Raw::hasInstruction(tag1, tag2) - } or - TRawUnreachedInstruction(IRFunctionBase irFunc) { - IRConstruction::hasUnreachedInstruction(irFunc) - } or - TUnaliasedSsaPhiInstruction( - TRawInstruction blockStartInstr, UnaliasedSsa::Ssa::MemoryLocation memoryLocation - ) { - UnaliasedSsa::Ssa::hasPhiInstruction(blockStartInstr, memoryLocation) - } or - TUnaliasedSsaChiInstruction(TRawInstruction primaryInstruction) { none() } or - TUnaliasedSsaUnreachedInstruction(IRFunctionBase irFunc) { - UnaliasedSsa::Ssa::hasUnreachedInstruction(irFunc) - } or - TAliasedSsaPhiInstruction( - TRawInstruction blockStartInstr, AliasedSsa::Ssa::MemoryLocation memoryLocation - ) { - AliasedSsa::Ssa::hasPhiInstruction(blockStartInstr, memoryLocation) - } or - TAliasedSsaChiInstruction(TRawInstruction primaryInstruction) { - AliasedSsa::Ssa::hasChiInstruction(primaryInstruction) - } or - TAliasedSsaUnreachedInstruction(IRFunctionBase irFunc) { - AliasedSsa::Ssa::hasUnreachedInstruction(irFunc) - } - -/** - * Provides wrappers for the constructors of each branch of `TInstruction` that is used by the - * unaliased SSA stage. - * These wrappers are not parameterized because it is not possible to invoke an IPA constructor via - * a class alias. - */ -module UnaliasedSsaInstructions { - class TPhiInstruction = TUnaliasedSsaPhiInstruction; - - TPhiInstruction phiInstruction( - TRawInstruction blockStartInstr, UnaliasedSsa::Ssa::MemoryLocation memoryLocation - ) { - result = TUnaliasedSsaPhiInstruction(blockStartInstr, memoryLocation) - } - - TRawInstruction reusedPhiInstruction(TRawInstruction blockStartInstr) { none() } - - class TChiInstruction = TUnaliasedSsaChiInstruction; - - TChiInstruction chiInstruction(TRawInstruction primaryInstruction) { - result = TUnaliasedSsaChiInstruction(primaryInstruction) - } - - class TUnreachedInstruction = TUnaliasedSsaUnreachedInstruction; - - TUnreachedInstruction unreachedInstruction(IRFunctionBase irFunc) { - result = TUnaliasedSsaUnreachedInstruction(irFunc) - } -} - -/** - * Provides wrappers for the constructors of each branch of `TInstruction` that is used by the - * aliased SSA stage. - * These wrappers are not parameterized because it is not possible to invoke an IPA constructor via - * a class alias. - */ -module AliasedSsaInstructions { - class TPhiInstruction = TAliasedSsaPhiInstruction or TUnaliasedSsaPhiInstruction; - - TPhiInstruction phiInstruction( - TRawInstruction blockStartInstr, AliasedSsa::Ssa::MemoryLocation memoryLocation - ) { - result = TAliasedSsaPhiInstruction(blockStartInstr, memoryLocation) - } - - TPhiInstruction reusedPhiInstruction(TRawInstruction blockStartInstr) { - result = TUnaliasedSsaPhiInstruction(blockStartInstr, _) - } - - class TChiInstruction = TAliasedSsaChiInstruction; - - TChiInstruction chiInstruction(TRawInstruction primaryInstruction) { - result = TAliasedSsaChiInstruction(primaryInstruction) - } - - class TUnreachedInstruction = TAliasedSsaUnreachedInstruction; - - TUnreachedInstruction unreachedInstruction(IRFunctionBase irFunc) { - result = TAliasedSsaUnreachedInstruction(irFunc) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/internal/TInstructionImports.qll b/csharp/ql/src/experimental/ir/implementation/internal/TInstructionImports.qll deleted file mode 100644 index 6200f2a2796..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/TInstructionImports.qll +++ /dev/null @@ -1,2 +0,0 @@ -import experimental.ir.implementation.IRType as IRType -import experimental.ir.implementation.Opcode as Opcode diff --git a/csharp/ql/src/experimental/ir/implementation/internal/TInstructionInternal.qll b/csharp/ql/src/experimental/ir/implementation/internal/TInstructionInternal.qll deleted file mode 100644 index 3778e532cef..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/TInstructionInternal.qll +++ /dev/null @@ -1,4 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language -import experimental.ir.implementation.raw.internal.IRConstruction as IRConstruction -import experimental.ir.implementation.unaliased_ssa.internal.SSAConstruction as UnaliasedSsa -import AliasedSSAStub as AliasedSsa diff --git a/csharp/ql/src/experimental/ir/implementation/internal/TOperand.qll b/csharp/ql/src/experimental/ir/implementation/internal/TOperand.qll deleted file mode 100644 index cf8a6a9b7b1..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/TOperand.qll +++ /dev/null @@ -1,150 +0,0 @@ -private import TInstruction -private import OperandTag -private import experimental.ir.implementation.raw.internal.IRConstruction as RawConstruction -private import experimental.ir.implementation.unaliased_ssa.internal.SSAConstruction as UnaliasedConstruction -private import experimental.ir.implementation.raw.IR as Raw -private import experimental.ir.implementation.unaliased_ssa.IR as Unaliased -private import experimental.ir.internal.Overlap - -/** - * Provides the newtype used to represent operands across all phases of the IR. - */ -private module Internal { - /** - * An IR operand. `TOperand` is shared across all phases of the IR. There are branches of this - * type for operands created directly from the AST (`TRegisterOperand` and `TNonSSAMemoryOperand`), - * for operands computed by each stage of SSA construction (`T*PhiOperand` and - * `TAliasedChiOperand`), and a placehold branch for operands that do not exist in a given - * stage of IR construction (`TNoOperand`). - */ - cached - newtype TOperand = - // RAW - TRegisterOperand(TRawInstruction useInstr, RegisterOperandTag tag, TRawInstruction defInstr) { - defInstr = RawConstruction::getRegisterOperandDefinition(useInstr, tag) and - not RawConstruction::isInCycle(useInstr) and - strictcount(RawConstruction::getRegisterOperandDefinition(useInstr, tag)) = 1 - } or - // Placeholder for Phi and Chi operands in stages that don't have the corresponding instructions - TNoOperand() { none() } or - // Can be "removed" later when there's unreachable code - // These operands can be reused across all three stages. They just get different defs. - TNonSsaMemoryOperand(Raw::Instruction useInstr, MemoryOperandTag tag) { - // Has no definition in raw but will get definitions later - useInstr.getOpcode().hasOperand(tag) - } or - TUnaliasedPhiOperand( - Unaliased::PhiInstruction useInstr, Unaliased::Instruction defInstr, - Unaliased::IRBlock predecessorBlock, Overlap overlap - ) { - defInstr = UnaliasedConstruction::getPhiOperandDefinition(useInstr, predecessorBlock, overlap) - } -} - -/** - * Reexports some branches from `TOperand` so they can be used in stage modules without importing - * `TOperand` itself. - */ -private module Shared { - class TRegisterOperand = Internal::TRegisterOperand; - - /** - * Returns the register operand with the specified parameters. - */ - TRegisterOperand registerOperand( - TRawInstruction useInstr, RegisterOperandTag tag, TRawInstruction defInstr - ) { - result = Internal::TRegisterOperand(useInstr, tag, defInstr) - } - - class TNonSsaMemoryOperand = Internal::TNonSsaMemoryOperand; - - /** - * Returns the non-Phi memory operand with the specified parameters. - */ - TNonSsaMemoryOperand nonSsaMemoryOperand(TRawInstruction useInstr, MemoryOperandTag tag) { - result = Internal::TNonSsaMemoryOperand(useInstr, tag) - } -} - -/** - * Provides wrappers for the constructors of each branch of `TOperand` that is used by the - * raw IR stage. - * These wrappers are not parameterized because it is not possible to invoke an IPA constructor via - * a class alias. - */ -module RawOperands { - import Shared - - class TPhiOperand = Internal::TNoOperand; - - class TChiOperand = Internal::TNoOperand; - - class TNonPhiMemoryOperand = TNonSsaMemoryOperand or TChiOperand; - - /** - * Returns the Phi operand with the specified parameters. - */ - TPhiOperand phiOperand( - Raw::PhiInstruction useInstr, Raw::Instruction defInstr, Raw::IRBlock predecessorBlock, - Overlap overlap - ) { - none() - } - - /** - * Returns the Phi operand with the specified parameters. - */ - TPhiOperand reusedPhiOperand( - Raw::PhiInstruction useInstr, Raw::Instruction defInstr, Raw::IRBlock predecessorBlock, - Overlap overlap - ) { - none() - } - - /** - * Returns the Chi operand with the specified parameters. - */ - TChiOperand chiOperand(Raw::Instruction useInstr, ChiOperandTag tag) { none() } -} - -/** - * Provides wrappers for the constructors of each branch of `TOperand` that is used by the - * unaliased SSA stage. - * These wrappers are not parameterized because it is not possible to invoke an IPA constructor via - * a class alias. - */ -module UnaliasedSsaOperands { - import Shared - - class TPhiOperand = Internal::TUnaliasedPhiOperand; - - class TChiOperand = Internal::TNoOperand; - - class TNonPhiMemoryOperand = TNonSsaMemoryOperand or TChiOperand; - - /** - * Returns the Phi operand with the specified parameters. - */ - TPhiOperand phiOperand( - Unaliased::PhiInstruction useInstr, Unaliased::Instruction defInstr, - Unaliased::IRBlock predecessorBlock, Overlap overlap - ) { - result = Internal::TUnaliasedPhiOperand(useInstr, defInstr, predecessorBlock, overlap) - } - - /** - * Returns the Phi operand with the specified parameters. - */ - TPhiOperand reusedPhiOperand( - Unaliased::PhiInstruction useInstr, Unaliased::Instruction defInstr, - Unaliased::IRBlock predecessorBlock, Overlap overlap - ) { - none() - } - - /** - * Returns the Chi operand with the specified parameters. - */ - TChiOperand chiOperand(Unaliased::Instruction useInstr, ChiOperandTag tag) { none() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/internal/TempVariableTagInternal.qll b/csharp/ql/src/experimental/ir/implementation/internal/TempVariableTagInternal.qll deleted file mode 100644 index 6d9f3e1e2db..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/internal/TempVariableTagInternal.qll +++ /dev/null @@ -1,6 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language -private import experimental.ir.internal.TempVariableTag as TempVariableTag_ - -module Imports { - module TempVariableTag = TempVariableTag_; -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/IR.qll b/csharp/ql/src/experimental/ir/implementation/raw/IR.qll deleted file mode 100644 index 79873d8366e..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/IR.qll +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Provides classes that describe the Intermediate Representation (IR) of the program. - * - * The IR is a representation of the semantics of the program, with very little dependence on the - * syntax that was used to write the program. For example, in C++, the statements `i += 1;`, `i++`, - * and `++i` all have the same semantic effect, but appear in the AST as three different types of - * `Expr` node. In the IR, all three statements are broken down into a sequence of fundamental - * operations similar to: - * - * ``` - * r1(int*) = VariableAddress[i] // Compute the address of variable `i` - * r2(int) = Load &:r1, m0 // Load the value of `i` - * r3(int) = Constant[1] // An integer constant with the value `1` - * r4(int) = Add r2, r3 // Add `1` to the value of `i` - * r5(int) = Store &r1, r4 // Store the new value back into the variable `i` - * ``` - * - * This allows IR-based analysis to focus on the fundamental operations, rather than having to be - * concerned with the various ways of expressing those operations in source code. - * - * The key classes in the IR are: - * - * - `IRFunction` - Contains the IR for an entire function definition, including all of that - * function's `Instruction`s, `IRBlock`s, and `IRVariables`. - * - `Instruction` - A single operation in the IR. An instruction specifies the operation to be - * performed, the operands that produce the inputs to that operation, and the type of the result - * of the operation. Control flows from an `Instruction` to one of a set of successor - * `Instruction`s. - * - `Operand` - An input value of an `Instruction`. All inputs of an `Instruction` are explicitly - * represented as `Operand`s, even if the input was implicit in the source code. An `Operand` has - * a link to the `Instruction` that consumes its value (its "use") and a link to the `Instruction` - * that produces its value (its "definition"). - * - `IRVariable` - A variable accessed by the IR for a particular function. An `IRVariable` is - * created for each variable directly accessed by the function. In addition, `IRVariable`s are - * created to represent certain temporary storage locations that do not have explicitly declared - * variables in the source code, such as the return value of the function. - * - `IRBlock` - A "basic block" in the control flow graph of a function. An `IRBlock` contains a - * sequence of instructions such that control flow can only enter the block at the first - * instruction, and can only leave the block from the last instruction. - * - `IRType` - The type of a value accessed in the IR. Unlike the `Type` class in the AST, `IRType` - * is language-neutral. For example, in C++, `unsigned int`, `char32_t`, and `wchar_t` might all - * be represented as the `IRType` `uint4`, a four-byte unsigned integer. - */ - -import IRFunction -import Instruction -import IRBlock -import IRVariable -import Operand -private import internal.IRImports as Imports -import Imports::EdgeKind -import Imports::IRType -import Imports::MemoryAccessKind - -private newtype TIRPropertyProvider = MkIRPropertyProvider() - -/** - * A class that provides additional properties to be dumped for IR instructions and blocks when using - * the PrintIR module. Libraries that compute additional facts about IR elements can extend the - * single instance of this class to specify the additional properties computed by the library. - */ -class IRPropertyProvider extends TIRPropertyProvider { - /** Gets a textual representation of this element. */ - string toString() { result = "IRPropertyProvider" } - - /** - * Gets the value of the property named `key` for the specified instruction. - */ - string getInstructionProperty(Instruction instruction, string key) { none() } - - /** - * Gets the value of the property named `key` for the specified block. - */ - string getBlockProperty(IRBlock block, string key) { none() } - - /** - * Gets the value of the property named `key` for the specified operand. - */ - string getOperandProperty(Operand operand, string key) { none() } - - /** - * Holds if the instruction `instr` should be included when printing - * the IR instructions. - */ - predicate shouldPrintInstruction(Instruction instr) { any() } - - /** - * Holds if the operand `operand` should be included when printing the an - * instruction's operand list. - */ - predicate shouldPrintOperand(Operand operand) { any() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/IRBlock.qll b/csharp/ql/src/experimental/ir/implementation/raw/IRBlock.qll deleted file mode 100644 index 50395db47e7..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/IRBlock.qll +++ /dev/null @@ -1,356 +0,0 @@ -/** - * Provides classes describing basic blocks in the IR of a function. - */ - -private import internal.IRInternal -import Instruction -private import internal.IRBlockImports as Imports -import Imports::EdgeKind -private import Cached - -/** - * Holds if `block` is a block in `func` and `sortOverride`, `sortKey1`, and `sortKey2` are the - * sort keys of the block (derived from its first instruction) - */ -pragma[nomagic] -private predicate blockSortKeys( - IRFunction func, IRBlockBase block, int sortOverride, int sortKey1, int sortKey2 -) { - block.getEnclosingIRFunction() = func and - block.getFirstInstruction().hasSortKeys(sortKey1, sortKey2) and - // Ensure that the block containing `EnterFunction` always comes first. - if block.getFirstInstruction() instanceof EnterFunctionInstruction - then sortOverride = 0 - else sortOverride = 1 -} - -/** - * A basic block in the IR. A basic block consists of a sequence of `Instructions` with the only - * incoming edges at the beginning of the sequence and the only outgoing edges at the end of the - * sequence. - * - * This class does not contain any members that query the predecessor or successor edges of the - * block. This allows different classes that extend `IRBlockBase` to expose different subsets of - * edges (e.g. ignoring unreachable edges). - * - * Most consumers should use the class `IRBlock`. - */ -class IRBlockBase extends TIRBlock { - /** Gets a textual representation of this block. */ - final string toString() { result = getFirstInstruction(this).toString() } - - /** Gets the source location of the first non-`Phi` instruction in this block. */ - final Language::Location getLocation() { result = this.getFirstInstruction().getLocation() } - - /** - * INTERNAL: Do not use. - * - * Gets the zero-based index of the block within its function. - * - * This predicate is used by debugging and printing code only. - */ - int getDisplayIndex() { - exists(IRConfiguration::IRConfiguration config | - config.shouldEvaluateDebugStringsForFunction(this.getEnclosingFunction()) - ) and - exists(IRFunction func | - this = - rank[result + 1](IRBlock funcBlock, int sortOverride, int sortKey1, int sortKey2 | - blockSortKeys(func, funcBlock, sortOverride, sortKey1, sortKey2) - | - funcBlock order by sortOverride, sortKey1, sortKey2 - ) - ) - } - - /** - * Gets the `index`th non-`Phi` instruction in this block. - */ - final Instruction getInstruction(int index) { result = getInstruction(this, index) } - - /** - * Get the `Phi` instructions that appear at the start of this block. - */ - final PhiInstruction getAPhiInstruction() { - Construction::getPhiInstructionBlockStart(result) = this.getFirstInstruction() - } - - /** - * Gets an instruction in this block. This includes `Phi` instructions. - */ - final Instruction getAnInstruction() { - result = this.getInstruction(_) or - result = this.getAPhiInstruction() - } - - /** - * Gets the first non-`Phi` instruction in this block. - */ - final Instruction getFirstInstruction() { result = getFirstInstruction(this) } - - /** - * Gets the last instruction in this block. - */ - final Instruction getLastInstruction() { - result = this.getInstruction(this.getInstructionCount() - 1) - } - - /** - * Gets the number of non-`Phi` instructions in this block. - */ - final int getInstructionCount() { result = getInstructionCount(this) } - - /** - * Gets the `IRFunction` that contains this block. - */ - final IRFunction getEnclosingIRFunction() { - result = getFirstInstruction(this).getEnclosingIRFunction() - } - - /** - * Gets the `Function` that contains this block. - */ - final Language::Declaration getEnclosingFunction() { - result = getFirstInstruction(this).getEnclosingFunction() - } -} - -/** - * A basic block with additional information about its predecessor and successor edges. Each edge - * corresponds to the control flow between the last instruction of one block and the first - * instruction of another block. - */ -class IRBlock extends IRBlockBase { - /** - * Gets a block to which control flows directly from this block. - */ - final IRBlock getASuccessor() { blockSuccessor(this, result) } - - /** - * Gets a block from which control flows directly to this block. - */ - final IRBlock getAPredecessor() { blockSuccessor(result, this) } - - /** - * Gets the block to which control flows directly from this block along an edge of kind `kind`. - */ - final IRBlock getSuccessor(EdgeKind kind) { blockSuccessor(this, result, kind) } - - /** - * Gets the block to which control flows directly from this block along a back edge of kind - * `kind`. - */ - final IRBlock getBackEdgeSuccessor(EdgeKind kind) { backEdgeSuccessor(this, result, kind) } - - /** - * Holds if this block immediately dominates `block`. - * - * Block `A` immediate dominates block `B` if block `A` strictly dominates block `B` and block `B` - * is a direct successor of block `A`. - */ - final predicate immediatelyDominates(IRBlock block) { blockImmediatelyDominates(this, block) } - - /** - * Holds if this block strictly dominates `block`. - * - * Block `A` strictly dominates block `B` if block `A` dominates block `B` and blocks `A` and `B` - * are not the same block. - */ - final predicate strictlyDominates(IRBlock block) { blockImmediatelyDominates+(this, block) } - - /** - * Holds if this block dominates `block`. - * - * Block `A` dominates block `B` if any control flow path from the entry block of the function to - * block `B` must pass through block `A`. A block always dominates itself. - */ - final predicate dominates(IRBlock block) { this.strictlyDominates(block) or this = block } - - /** - * Gets a block on the dominance frontier of this block. - * - * The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not - * dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`. - */ - pragma[noinline] - final IRBlock dominanceFrontier() { - this.getASuccessor() = result and - not this.immediatelyDominates(result) - or - exists(IRBlock prev | result = prev.dominanceFrontier() | - this.immediatelyDominates(prev) and - not this.immediatelyDominates(result) - ) - } - - /** - * Holds if this block immediately post-dominates `block`. - * - * Block `A` immediate post-dominates block `B` if block `A` strictly post-dominates block `B` and - * block `B` is a direct successor of block `A`. - */ - final predicate immediatelyPostDominates(IRBlock block) { - blockImmediatelyPostDominates(this, block) - } - - /** - * Holds if this block strictly post-dominates `block`. - * - * Block `A` strictly post-dominates block `B` if block `A` post-dominates block `B` and blocks `A` - * and `B` are not the same block. - */ - final predicate strictlyPostDominates(IRBlock block) { - blockImmediatelyPostDominates+(this, block) - } - - /** - * Holds if this block is a post-dominator of `block`. - * - * Block `A` post-dominates block `B` if any control flow path from `B` to the exit block of the - * function must pass through block `A`. A block always post-dominates itself. - */ - final predicate postDominates(IRBlock block) { this.strictlyPostDominates(block) or this = block } - - /** - * Gets a block on the post-dominance frontier of this block. - * - * The post-dominance frontier of block `A` is the set of blocks `B` such that block `A` does not - * post-dominate block `B`, but block `A` does post-dominate an immediate successor of block `B`. - */ - pragma[noinline] - final IRBlock postDominanceFrontier() { - this.getAPredecessor() = result and - not this.immediatelyPostDominates(result) - or - exists(IRBlock prev | result = prev.postDominanceFrontier() | - this.immediatelyPostDominates(prev) and - not this.immediatelyPostDominates(result) - ) - } - - /** - * Holds if this block is reachable from the entry block of its function. - */ - final predicate isReachableFromFunctionEntry() { - this = this.getEnclosingIRFunction().getEntryBlock() or - this.getAPredecessor().isReachableFromFunctionEntry() - } -} - -private predicate startsBasicBlock(Instruction instr) { - not instr instanceof PhiInstruction and - not adjacentInBlock(_, instr) -} - -/** Holds if `i2` follows `i1` in a `IRBlock`. */ -private predicate adjacentInBlock(Instruction i1, Instruction i2) { - // - i2 must be the only successor of i1 - i2 = unique(Instruction i | i = i1.getASuccessor()) and - // - i1 must be the only predecessor of i2 - i1 = unique(Instruction i | i.getASuccessor() = i2) and - // - The edge between the two must be a GotoEdge. We just check that one - // exists since we've already checked that it's unique. - exists(GotoEdge edgeKind | exists(i1.getSuccessor(edgeKind))) and - // - The edge must not be a back edge. This means we get the same back edges - // in the basic-block graph as we do in the raw CFG. - not exists(Construction::getInstructionBackEdgeSuccessor(i1, _)) - // This predicate could be simplified to remove one of the `unique`s if we - // were willing to rely on the CFG being well-formed and thus never having - // more than one successor to an instruction that has a `GotoEdge` out of it. -} - -private predicate isEntryBlock(TIRBlock block) { - block = MkIRBlock(any(EnterFunctionInstruction enter)) -} - -cached -private module Cached { - cached - newtype TIRBlock = MkIRBlock(Instruction firstInstr) { startsBasicBlock(firstInstr) } - - /** Holds if `i` is the `index`th instruction the block starting with `first`. */ - private Instruction getInstructionFromFirst(Instruction first, int index) = - shortestDistances(startsBasicBlock/1, adjacentInBlock/2)(first, result, index) - - /** Holds if `i` is the `index`th instruction in `block`. */ - cached - Instruction getInstruction(TIRBlock block, int index) { - result = getInstructionFromFirst(getFirstInstruction(block), index) - } - - cached - int getInstructionCount(TIRBlock block) { result = strictcount(getInstruction(block, _)) } - - cached - predicate blockSuccessor(TIRBlock pred, TIRBlock succ, EdgeKind kind) { - exists(Instruction predLast, Instruction succFirst | - predLast = getInstruction(pred, getInstructionCount(pred) - 1) and - succFirst = predLast.getSuccessor(kind) and - succ = MkIRBlock(succFirst) - ) - } - - pragma[noinline] - private predicate blockIdentity(TIRBlock b1, TIRBlock b2) { b1 = b2 } - - pragma[noopt] - cached - predicate backEdgeSuccessor(TIRBlock pred, TIRBlock succ, EdgeKind kind) { - backEdgeSuccessorRaw(pred, succ, kind) - or - // See the QLDoc on `backEdgeSuccessorRaw`. - exists(TIRBlock pred2 | - // Joining with `blockIdentity` is a performance trick to get - // `forwardEdgeRaw` on the RHS of a join, where it's fast. - blockIdentity(pred, pred2) and - forwardEdgeRaw+(pred, pred2) - ) and - blockSuccessor(pred, succ, kind) - } - - /** - * Holds if there is an edge from `pred` to `succ` that is not a back edge. - */ - private predicate forwardEdgeRaw(TIRBlock pred, TIRBlock succ) { - exists(EdgeKind kind | - blockSuccessor(pred, succ, kind) and - not backEdgeSuccessorRaw(pred, succ, kind) - ) - } - - /** - * Holds if the `kind`-edge from `pred` to `succ` is a back edge according to - * `Construction`. - * - * There could be loops of non-back-edges if there is a flaw in the IR - * construction or back-edge detection, and this could cause non-termination - * of subsequent analysis. To prevent that, a subsequent predicate further - * classifies all edges as back edges if they are involved in a loop of - * non-back-edges. - */ - private predicate backEdgeSuccessorRaw(TIRBlock pred, TIRBlock succ, EdgeKind kind) { - exists(Instruction predLast, Instruction succFirst | - predLast = getInstruction(pred, getInstructionCount(pred) - 1) and - succFirst = Construction::getInstructionBackEdgeSuccessor(predLast, kind) and - succ = MkIRBlock(succFirst) - ) - } - - cached - predicate blockSuccessor(TIRBlock pred, TIRBlock succ) { blockSuccessor(pred, succ, _) } - - cached - predicate blockImmediatelyDominates(TIRBlock dominator, TIRBlock block) = - idominance(isEntryBlock/1, blockSuccessor/2)(_, dominator, block) -} - -private Instruction getFirstInstruction(TIRBlock block) { block = MkIRBlock(result) } - -private predicate blockFunctionExit(IRBlock exit) { - exit.getLastInstruction() instanceof ExitFunctionInstruction -} - -private predicate blockPredecessor(IRBlock src, IRBlock pred) { src.getAPredecessor() = pred } - -private predicate blockImmediatelyPostDominates(IRBlock postDominator, IRBlock block) = - idominance(blockFunctionExit/1, blockPredecessor/2)(_, postDominator, block) diff --git a/csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.ql b/csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.ql deleted file mode 100644 index 342e84a2b5e..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.ql +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @name Raw IR Consistency Check - * @description Performs consistency checks on the Intermediate Representation. This query should have no results. - * @kind table - * @id cs/raw-ir-consistency-check - */ - -import IRConsistency diff --git a/csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.qll b/csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.qll deleted file mode 100644 index edc785dfabe..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/IRConsistency.qll +++ /dev/null @@ -1,549 +0,0 @@ -private import IR -import InstructionConsistency // module is below -import IRTypeConsistency // module is in IRType.qll -import internal.IRConsistencyImports - -module InstructionConsistency { - private import internal.InstructionImports as Imports - private import Imports::OperandTag - private import Imports::Overlap - private import internal.IRInternal - - private newtype TOptionalIRFunction = - TPresentIRFunction(IRFunction irFunc) or - TMissingIRFunction() - - /** - * An `IRFunction` that might not exist. This is used so that we can produce consistency failures - * for IR that also incorrectly lacks a `getEnclosingIRFunction()`. - */ - abstract private class OptionalIRFunction extends TOptionalIRFunction { - abstract string toString(); - - abstract Language::Location getLocation(); - } - - class PresentIRFunction extends OptionalIRFunction, TPresentIRFunction { - private IRFunction irFunc; - - PresentIRFunction() { this = TPresentIRFunction(irFunc) } - - override string toString() { - result = concat(LanguageDebug::getIdentityString(irFunc.getFunction()), "; ") - } - - override Language::Location getLocation() { - // To avoid an overwhelming number of results when the extractor merges functions with the - // same name, just pick a single location. - result = - min(Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString()) - } - - IRFunction getIRFunction() { result = irFunc } - } - - private class MissingIRFunction extends OptionalIRFunction, TMissingIRFunction { - override string toString() { result = "" } - - override Language::Location getLocation() { result instanceof Language::UnknownDefaultLocation } - } - - private OptionalIRFunction getInstructionIRFunction(Instruction instr) { - result = TPresentIRFunction(instr.getEnclosingIRFunction()) - or - not exists(instr.getEnclosingIRFunction()) and result = TMissingIRFunction() - } - - pragma[inline] - private OptionalIRFunction getInstructionIRFunction(Instruction instr, string irFuncText) { - result = getInstructionIRFunction(instr) and - irFuncText = result.toString() - } - - private OptionalIRFunction getOperandIRFunction(Operand operand) { - result = TPresentIRFunction(operand.getEnclosingIRFunction()) - or - not exists(operand.getEnclosingIRFunction()) and result = TMissingIRFunction() - } - - pragma[inline] - private OptionalIRFunction getOperandIRFunction(Operand operand, string irFuncText) { - result = getOperandIRFunction(operand) and - irFuncText = result.toString() - } - - private OptionalIRFunction getBlockIRFunction(IRBlock block) { - result = TPresentIRFunction(block.getEnclosingIRFunction()) - or - not exists(block.getEnclosingIRFunction()) and result = TMissingIRFunction() - } - - /** - * Holds if instruction `instr` is missing an expected operand with tag `tag`. - */ - query predicate missingOperand( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(OperandTag tag | - instr.getOpcode().hasOperand(tag) and - not exists(NonPhiOperand operand | - operand = instr.getAnOperand() and - operand.getOperandTag() = tag - ) and - message = - "Instruction '" + instr.getOpcode().toString() + - "' is missing an expected operand with tag '" + tag.toString() + "' in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if instruction `instr` has an unexpected operand with tag `tag`. - */ - query predicate unexpectedOperand( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(OperandTag tag | - exists(NonPhiOperand operand | - operand = instr.getAnOperand() and - operand.getOperandTag() = tag - ) and - not instr.getOpcode().hasOperand(tag) and - not (instr instanceof CallInstruction and tag instanceof ArgumentOperandTag) and - not ( - instr instanceof BuiltInOperationInstruction and tag instanceof PositionalArgumentOperandTag - ) and - not (instr instanceof InlineAsmInstruction and tag instanceof AsmOperandTag) and - message = - "Instruction '" + instr.toString() + "' has unexpected operand '" + tag.toString() + - "' in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if instruction `instr` has multiple operands with tag `tag`. - */ - query predicate duplicateOperand( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(OperandTag tag, int operandCount | - operandCount = - strictcount(NonPhiOperand operand | - operand = instr.getAnOperand() and - operand.getOperandTag() = tag - ) and - operandCount > 1 and - message = - "Instruction has " + operandCount + " operands with tag '" + tag.toString() + "'" + - " in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if `Phi` instruction `instr` is missing an operand corresponding to - * the predecessor block `pred`. - */ - query predicate missingPhiOperand( - PhiInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(IRBlock pred | - pred = instr.getBlock().getAPredecessor() and - not exists(PhiInputOperand operand | - operand = instr.getAnOperand() and - operand.getPredecessorBlock() = pred - ) and - message = - "Instruction '" + instr.toString() + "' is missing an operand for predecessor block '" + - pred.toString() + "' in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - query predicate missingOperandType( - Operand operand, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(Instruction use | - not exists(operand.getType()) and - use = operand.getUse() and - message = - "Operand '" + operand.toString() + "' of instruction '" + use.getOpcode().toString() + - "' is missing a type in function '$@'." and - irFunc = getOperandIRFunction(operand, irFuncText) - ) - } - - query predicate duplicateChiOperand( - ChiInstruction chi, string message, OptionalIRFunction irFunc, string irFuncText - ) { - chi.getTotal() = chi.getPartial() and - message = - "Chi instruction for " + chi.getPartial().toString() + - " has duplicate operands in function '$@'." and - irFunc = getInstructionIRFunction(chi, irFuncText) - } - - query predicate sideEffectWithoutPrimary( - SideEffectInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - not exists(instr.getPrimaryInstruction()) and - message = - "Side effect instruction '" + instr + "' is missing a primary instruction in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - /** - * Holds if an instruction, other than `ExitFunction`, has no successors. - */ - query predicate instructionWithoutSuccessor( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - not exists(instr.getASuccessor()) and - not instr instanceof ExitFunctionInstruction and - // Phi instructions aren't linked into the instruction-level flow graph. - not instr instanceof PhiInstruction and - not instr instanceof UnreachedInstruction and - message = "Instruction '" + instr.toString() + "' has no successors in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - /** - * Holds if there are multiple edges of the same kind from `source`. - */ - query predicate ambiguousSuccessors( - Instruction source, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(EdgeKind kind, int n | - n = strictcount(Instruction t | source.getSuccessor(kind) = t) and - n > 1 and - message = - "Instruction '" + source.toString() + "' has " + n.toString() + " successors of kind '" + - kind.toString() + "' in function '$@'." and - irFunc = getInstructionIRFunction(source, irFuncText) - ) - } - - /** - * Holds if `instr` is part of a loop even though the AST of `instr`'s enclosing function - * contains no element that can cause loops. - */ - query predicate unexplainedLoop( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(Language::Function f | - exists(IRBlock block | - instr.getBlock() = block and - block.getEnclosingFunction() = f and - block.getASuccessor+() = block - ) and - not Language::hasPotentialLoop(f) and - message = - "Instruction '" + instr.toString() + "' is part of an unexplained loop in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if a `Phi` instruction is present in a block with fewer than two - * predecessors. - */ - query predicate unnecessaryPhiInstruction( - PhiInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(int n | - n = count(instr.getBlock().getAPredecessor()) and - n < 2 and - message = - "Instruction '" + instr.toString() + "' is in a block with only " + n.toString() + - " predecessors in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if a memory operand is connected to a definition with an unmodeled result. - */ - query predicate memoryOperandDefinitionIsUnmodeled( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(MemoryOperand operand, Instruction def | - operand = instr.getAnOperand() and - def = operand.getAnyDef() and - not def.isResultModeled() and - message = - "Memory operand definition on instruction '" + instr.toString() + - "' has unmodeled result in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if operand `operand` consumes a value that was defined in - * a different function. - */ - query predicate operandAcrossFunctions( - Operand operand, string message, OptionalIRFunction useIRFunc, string useIRFuncText, - OptionalIRFunction defIRFunc, string defIRFuncText - ) { - exists(Instruction useInstr, Instruction defInstr | - operand.getUse() = useInstr and - operand.getAnyDef() = defInstr and - useIRFunc = getInstructionIRFunction(useInstr, useIRFuncText) and - defIRFunc = getInstructionIRFunction(defInstr, defIRFuncText) and - useIRFunc != defIRFunc and - message = - "Operand '" + operand.toString() + "' is used on instruction '" + useInstr.toString() + - "' in function '$@', but is defined on instruction '" + defInstr.toString() + - "' in function '$@'." - ) - } - - /** - * Holds if instruction `instr` is not in exactly one block. - */ - query predicate instructionWithoutUniqueBlock( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(int blockCount | - blockCount = count(instr.getBlock()) and - blockCount != 1 and - message = - "Instruction '" + instr.toString() + "' is a member of " + blockCount.toString() + - " blocks in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - private predicate forwardEdge(IRBlock b1, IRBlock b2) { - b1.getASuccessor() = b2 and - not b1.getBackEdgeSuccessor(_) = b2 - } - - /** - * Holds if `f` contains a loop in which no edge is a back edge. - * - * This check ensures we don't have too _few_ back edges. - */ - query predicate containsLoopOfForwardEdges(IRFunction f, string message) { - exists(IRBlock block | - forwardEdge+(block, block) and - block.getEnclosingIRFunction() = f and - message = "Function contains a loop consisting of only forward edges." - ) - } - - /** - * Holds if `block` is reachable from its function entry point but would not - * be reachable by traversing only forward edges. This check is skipped for - * functions containing `goto` statements as the property does not generally - * hold there. - * - * This check ensures we don't have too _many_ back edges. - */ - query predicate lostReachability( - IRBlock block, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(IRFunction f, IRBlock entry | - entry = f.getEntryBlock() and - entry.getASuccessor+() = block and - not forwardEdge+(entry, block) and - not Language::hasGoto(f.getFunction()) and - message = - "Block '" + block.toString() + - "' is not reachable by traversing only forward edges in function '$@'." and - irFunc = TPresentIRFunction(f) and - irFuncText = irFunc.toString() - ) - } - - /** - * Holds if the number of back edges differs between the `Instruction` graph - * and the `IRBlock` graph. - */ - query predicate backEdgeCountMismatch(OptionalIRFunction irFunc, string message) { - exists(int fromInstr, int fromBlock | - fromInstr = - count(Instruction i1, Instruction i2 | - getInstructionIRFunction(i1) = irFunc and i1.getBackEdgeSuccessor(_) = i2 - ) and - fromBlock = - count(IRBlock b1, IRBlock b2 | - getBlockIRFunction(b1) = irFunc and b1.getBackEdgeSuccessor(_) = b2 - ) and - fromInstr != fromBlock and - message = - "The instruction graph for function '" + irFunc.toString() + "' contains " + - fromInstr.toString() + " back edges, but the block graph contains " + fromBlock.toString() - + " back edges." - ) - } - - /** - * Gets the point in the function at which the specified operand is evaluated. For most operands, - * this is at the instruction that consumes the use. For a `PhiInputOperand`, the effective point - * of evaluation is at the end of the corresponding predecessor block. - */ - private predicate pointOfEvaluation(Operand operand, IRBlock block, int index) { - block = operand.(PhiInputOperand).getPredecessorBlock() and - index = block.getInstructionCount() - or - exists(Instruction use | - use = operand.(NonPhiOperand).getUse() and - block.getInstruction(index) = use - ) - } - - /** - * Holds if `useOperand` has a definition that does not dominate the use. - */ - query predicate useNotDominatedByDefinition( - Operand useOperand, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(IRBlock useBlock, int useIndex, Instruction defInstr, IRBlock defBlock, int defIndex | - pointOfEvaluation(useOperand, useBlock, useIndex) and - defInstr = useOperand.getAnyDef() and - ( - defInstr instanceof PhiInstruction and - defBlock = defInstr.getBlock() and - defIndex = -1 - or - defBlock.getInstruction(defIndex) = defInstr - ) and - not ( - defBlock.strictlyDominates(useBlock) - or - defBlock = useBlock and - defIndex < useIndex - ) and - message = - "Operand '" + useOperand.toString() + - "' is not dominated by its definition in function '$@'." and - irFunc = getOperandIRFunction(useOperand, irFuncText) - ) - } - - query predicate switchInstructionWithoutDefaultEdge( - SwitchInstruction switchInstr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - not exists(switchInstr.getDefaultSuccessor()) and - message = - "SwitchInstruction " + switchInstr.toString() + " without a DefaultEdge in function '$@'." and - irFunc = getInstructionIRFunction(switchInstr, irFuncText) - } - - /** - * Holds if `instr` is on the chain of chi/phi instructions for all aliased - * memory. - */ - private predicate isOnAliasedDefinitionChain(Instruction instr) { - instr instanceof AliasedDefinitionInstruction - or - isOnAliasedDefinitionChain(instr.(ChiInstruction).getTotal()) - or - isOnAliasedDefinitionChain(instr.(PhiInstruction).getAnInputOperand().getAnyDef()) - } - - private predicate shouldBeConflated(Instruction instr) { - isOnAliasedDefinitionChain(instr) - or - instr.getOpcode() instanceof Opcode::InitializeNonLocal - } - - query predicate notMarkedAsConflated( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - shouldBeConflated(instr) and - not instr.isResultConflated() and - message = - "Instruction '" + instr.toString() + - "' should be marked as having a conflated result in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - query predicate wronglyMarkedAsConflated( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - instr.isResultConflated() and - not shouldBeConflated(instr) and - message = - "Instruction '" + instr.toString() + - "' should not be marked as having a conflated result in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - query predicate invalidOverlap( - MemoryOperand useOperand, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(Overlap overlap | - overlap = useOperand.getDefinitionOverlap() and - overlap instanceof MayPartiallyOverlap and - message = - "MemoryOperand '" + useOperand.toString() + "' has a `getDefinitionOverlap()` of '" + - overlap.toString() + "'." and - irFunc = getOperandIRFunction(useOperand, irFuncText) - ) - } - - query predicate nonUniqueEnclosingIRFunction( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(int irFuncCount | - irFuncCount = count(instr.getEnclosingIRFunction()) and - irFuncCount != 1 and - message = - "Instruction '" + instr.toString() + "' has " + irFuncCount.toString() + - " results for `getEnclosingIRFunction()` in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if the object address operand for the given `FieldAddress` instruction does not have an - * address type. - */ - query predicate fieldAddressOnNonPointer( - FieldAddressInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - not instr.getObjectAddressOperand().getIRType() instanceof IRAddressType and - message = - "FieldAddress instruction '" + instr.toString() + - "' has an object address operand that is not an address, in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - /** - * Holds if the `this` argument operand for the given `Call` instruction does not have an address - * type. - */ - query predicate thisArgumentIsNonPointer( - CallInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(ThisArgumentOperand thisOperand | thisOperand = instr.getThisArgumentOperand() | - not thisOperand.getIRType() instanceof IRAddressType - ) and - message = - "Call instruction '" + instr.toString() + - "' has a `this` argument operand that is not an address, in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - query predicate nonUniqueIRVariable( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(VariableInstruction vi, IRVariable v1, IRVariable v2 | - instr = vi and vi.getIRVariable() = v1 and vi.getIRVariable() = v2 and v1 != v2 - ) and - message = - "Variable instruction '" + instr.toString() + - "' has multiple associated variables, in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - or - instr.getOpcode() instanceof Opcode::VariableAddress and - not instr instanceof VariableInstruction and - message = - "Variable address instruction '" + instr.toString() + - "' has no associated variable, in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/IRFunction.qll b/csharp/ql/src/experimental/ir/implementation/raw/IRFunction.qll deleted file mode 100644 index 354ba41e3d1..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/IRFunction.qll +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Provides the class `IRFunction`, which represents the Intermediate Representation for the - * definition of a function. - */ - -private import internal.IRInternal -private import internal.IRFunctionImports as Imports -import Imports::IRFunctionBase -import Instruction - -/** - * The IR for a function. - */ -class IRFunction extends IRFunctionBase { - /** - * Gets the entry point for this function. - */ - pragma[noinline] - final EnterFunctionInstruction getEnterFunctionInstruction() { - result.getEnclosingIRFunction() = this - } - - /** - * Gets the exit point for this function. - */ - pragma[noinline] - final ExitFunctionInstruction getExitFunctionInstruction() { - result.getEnclosingIRFunction() = this - } - - /** - * Gets the single return instruction for this function. - */ - pragma[noinline] - final ReturnInstruction getReturnInstruction() { result.getEnclosingIRFunction() = this } - - /** - * Gets the variable used to hold the return value of this function. If this - * function does not return a value, this predicate does not hold. - */ - pragma[noinline] - final IRReturnVariable getReturnVariable() { result.getEnclosingIRFunction() = this } - - /** - * Gets the block containing the entry point of this function. - */ - pragma[noinline] - final IRBlock getEntryBlock() { - result.getFirstInstruction() = this.getEnterFunctionInstruction() - } - - /** - * Gets all instructions in this function. - */ - final Instruction getAnInstruction() { result.getEnclosingIRFunction() = this } - - /** - * Gets all blocks in this function. - */ - final IRBlock getABlock() { result.getEnclosingIRFunction() = this } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/IRVariable.qll b/csharp/ql/src/experimental/ir/implementation/raw/IRVariable.qll deleted file mode 100644 index b31c7898ba7..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/IRVariable.qll +++ /dev/null @@ -1,337 +0,0 @@ -/** - * Provides classes that represent variables accessed by the IR. - */ - -private import internal.IRInternal -import IRFunction -private import internal.IRVariableImports as Imports -import Imports::TempVariableTag -private import Imports::IRUtilities -private import Imports::TTempVariableTag -private import Imports::TIRVariable -private import Imports::IRType - -/** - * A variable referenced by the IR for a function. - * - * The variable may be a user-declared variable (`IRUserVariable`) or a temporary variable generated - * by the AST-to-IR translation (`IRTempVariable`). - */ -class IRVariable extends TIRVariable { - Language::Declaration func; - - IRVariable() { - this = TIRUserVariable(_, _, func) or - this = TIRTempVariable(func, _, _, _) or - this = TIRStringLiteral(func, _, _, _) or - this = TIRDynamicInitializationFlag(func, _, _) - } - - /** Gets a textual representation of this element. */ - string toString() { none() } - - /** - * Holds if this variable's value cannot be changed within a function. Currently used for string - * literals, but could also apply to `const` global and static variables. - */ - predicate isReadOnly() { none() } - - /** - * Gets the type of the variable. - */ - final Language::Type getType() { this.getLanguageType().hasType(result, false) } - - /** - * Gets the language-neutral type of the variable. - */ - final IRType getIRType() { result = this.getLanguageType().getIRType() } - - /** - * Gets the type of the variable. - */ - Language::LanguageType getLanguageType() { none() } - - /** - * Gets the AST node that declared this variable, or that introduced this - * variable as part of the AST-to-IR translation. - */ - Language::AST getAst() { none() } - - /** DEPRECATED: Alias for getAst */ - deprecated Language::AST getAST() { result = this.getAst() } - - /** - * Gets an identifier string for the variable. This identifier is unique - * within the function. - */ - string getUniqueId() { none() } - - /** - * Gets the source location of this variable. - */ - final Language::Location getLocation() { result = this.getAst().getLocation() } - - /** - * Gets the IR for the function that references this variable. - */ - final IRFunction getEnclosingIRFunction() { result.getFunction() = func } - - /** - * Gets the function that references this variable. - */ - final Language::Declaration getEnclosingFunction() { result = func } -} - -/** - * A user-declared variable referenced by the IR for a function. - */ -class IRUserVariable extends IRVariable, TIRUserVariable { - Language::Variable var; - Language::LanguageType type; - - IRUserVariable() { this = TIRUserVariable(var, type, func) } - - final override string toString() { result = this.getVariable().toString() } - - final override Language::AST getAst() { result = var } - - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - - final override string getUniqueId() { - result = this.getVariable().toString() + " " + this.getVariable().getLocation().toString() - } - - final override Language::LanguageType getLanguageType() { result = type } - - /** - * Gets the original user-declared variable. - */ - Language::Variable getVariable() { result = var } -} - -/** - * A variable (user-declared or temporary) that is allocated on the stack. This includes all - * parameters, non-static local variables, and temporary variables. - */ -class IRAutomaticVariable extends IRVariable { - IRAutomaticVariable() { - exists(Language::Variable var | - this = TIRUserVariable(var, _, func) and - Language::isVariableAutomatic(var) - ) - or - this = TIRTempVariable(func, _, _, _) - } -} - -/** - * A user-declared variable that is allocated on the stack. This includes all parameters and - * non-static local variables. - */ -class IRAutomaticUserVariable extends IRUserVariable, IRAutomaticVariable { - override Language::AutomaticVariable var; - - final override Language::AutomaticVariable getVariable() { result = var } -} - -/** - * A user-declared variable that is not allocated on the stack. This includes all global variables, - * namespace-scope variables, static fields, and static local variables. - */ -class IRStaticUserVariable extends IRUserVariable { - override Language::StaticVariable var; - - IRStaticUserVariable() { not Language::isVariableAutomatic(var) } - - final override Language::StaticVariable getVariable() { result = var } -} - -/** - * A variable that is not user-declared. This includes temporary variables generated as part of IR - * construction, as well as string literals. - */ -class IRGeneratedVariable extends IRVariable { - Language::AST ast; - Language::LanguageType type; - - IRGeneratedVariable() { - this = TIRTempVariable(func, ast, _, type) or - this = TIRStringLiteral(func, ast, type, _) or - this = TIRDynamicInitializationFlag(func, ast, type) - } - - final override Language::LanguageType getLanguageType() { result = type } - - final override Language::AST getAst() { result = ast } - - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - - override string toString() { result = this.getBaseString() + this.getLocationString() } - - override string getUniqueId() { none() } - - /** - * INTERNAL: Do not use. - * - * Gets a string containing the source code location of the AST that generated this variable. - * - * This is used by debugging and printing code only. - */ - final string getLocationString() { - result = - ast.getLocation().getStartLine().toString() + ":" + - ast.getLocation().getStartColumn().toString() - } - - /** - * INTERNAL: Do not use. - * - * Gets the string that is combined with the location of the variable to generate the string - * representation of this variable. - * - * This is used by debugging and printing code only. - */ - string getBaseString() { none() } -} - -/** - * A temporary variable introduced by IR construction. The most common examples are the variable - * generated to hold the return value of a function, or the variable generated to hold the result of - * a condition operator (`a ? b : c`). - */ -class IRTempVariable extends IRGeneratedVariable, IRAutomaticVariable, TIRTempVariable { - TempVariableTag tag; - - IRTempVariable() { this = TIRTempVariable(func, ast, tag, type) } - - final override string getUniqueId() { - result = "Temp: " + Construction::getTempVariableUniqueId(this) - } - - /** - * Gets the "tag" object that differentiates this temporary variable from other temporary - * variables generated for the same AST. - */ - final TempVariableTag getTag() { result = tag } - - override string getBaseString() { result = "#temp" } -} - -/** - * A temporary variable generated to hold the return value of a function. - */ -class IRReturnVariable extends IRTempVariable { - IRReturnVariable() { tag = ReturnValueTempVar() } - - final override string toString() { result = "#return" } -} - -/** - * A temporary variable generated to hold the exception thrown by a `ThrowValue` instruction. - */ -class IRThrowVariable extends IRTempVariable { - IRThrowVariable() { tag = ThrowTempVar() } - - final override string getBaseString() { result = "#throw" } -} - -/** - * A temporary variable generated to hold the contents of all arguments passed to the `...` of a - * function that accepts a variable number of arguments. - */ -class IREllipsisVariable extends IRTempVariable, IRParameter { - IREllipsisVariable() { tag = EllipsisTempVar() } - - final override string toString() { result = "#ellipsis" } - - final override int getIndex() { result = func.(Language::Function).getNumberOfParameters() } -} - -/** - * A temporary variable generated to hold the `this` pointer. - */ -class IRThisVariable extends IRTempVariable, IRParameter { - IRThisVariable() { tag = ThisTempVar() } - - final override string toString() { result = "#this" } - - final override int getIndex() { result = -1 } -} - -/** - * A variable generated to represent the contents of a string literal. This variable acts much like - * a read-only global variable. - */ -class IRStringLiteral extends IRGeneratedVariable, TIRStringLiteral { - Language::StringLiteral literal; - - IRStringLiteral() { this = TIRStringLiteral(func, ast, type, literal) } - - final override predicate isReadOnly() { any() } - - final override string getUniqueId() { - result = "String: " + this.getLocationString() + "=" + Language::getStringLiteralText(literal) - } - - final override string getBaseString() { result = "#string" } - - /** - * Gets the AST of the string literal represented by this `IRStringLiteral`. - */ - final Language::StringLiteral getLiteral() { result = literal } -} - -/** - * A variable generated to track whether a specific non-stack variable has been initialized. This is - * used to model the runtime initialization of static local variables in C++, as well as static - * fields in C#. - */ -class IRDynamicInitializationFlag extends IRGeneratedVariable, TIRDynamicInitializationFlag { - Language::Variable var; - - IRDynamicInitializationFlag() { - this = TIRDynamicInitializationFlag(func, var, type) and ast = var - } - - final override string toString() { result = var.toString() + "#init" } - - /** - * Gets variable whose initialization is guarded by this flag. - */ - final Language::Variable getVariable() { result = var } - - final override string getUniqueId() { - result = - "Init: " + this.getVariable().toString() + " " + this.getVariable().getLocation().toString() - } - - final override string getBaseString() { result = "#init:" + var.toString() + ":" } -} - -/** - * An IR variable which acts like a function parameter, including positional parameters and the - * temporary variables generated for `this` and ellipsis parameters. - */ -class IRParameter extends IRAutomaticVariable { - IRParameter() { - this.(IRAutomaticUserVariable).getVariable() instanceof Language::Parameter - or - this = TIRTempVariable(_, _, ThisTempVar(), _) - or - this = TIRTempVariable(_, _, EllipsisTempVar(), _) - } - - /** - * Gets the zero-based index of this parameter. The `this` parameter has index -1. - */ - int getIndex() { none() } -} - -/** - * An IR variable representing a positional parameter. - */ -class IRPositionalParameter extends IRParameter, IRAutomaticUserVariable { - final override int getIndex() { result = this.getVariable().(Language::Parameter).getIndex() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/Instruction.qll b/csharp/ql/src/experimental/ir/implementation/raw/Instruction.qll deleted file mode 100644 index 189ffce2903..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/Instruction.qll +++ /dev/null @@ -1,2231 +0,0 @@ -/** - * Provides classes that represent the individual instructions in the IR for a function. - */ - -private import internal.IRInternal -import IRFunction -import IRBlock -import IRVariable -import Operand -private import internal.InstructionImports as Imports -import Imports::EdgeKind -import Imports::IRType -import Imports::MemoryAccessKind -import Imports::Opcode -private import Imports::OperandTag - -/** - * Gets an `Instruction` that is contained in `IRFunction`, and has a location with the specified - * `File` and line number. Used for assigning register names when printing IR. - */ -private Instruction getAnInstructionAtLine(IRFunction irFunc, Language::File file, int line) { - exists(IRConfiguration::IRConfiguration config | - config.shouldEvaluateDebugStringsForFunction(irFunc.getFunction()) - ) and - exists(Language::Location location | - irFunc = result.getEnclosingIRFunction() and - location = result.getLocation() and - file = location.getFile() and - line = location.getStartLine() - ) -} - -/** - * A single instruction in the IR. - */ -class Instruction extends Construction::TStageInstruction { - Instruction() { - // The base `TStageInstruction` type is a superset of the actual instructions appearing in this - // stage. This call lets the stage filter out the ones that are not reused from raw IR. - Construction::hasInstruction(this) - } - - /** Gets a textual representation of this element. */ - final string toString() { result = this.getOpcode().toString() + ": " + this.getAst().toString() } - - /** - * Gets a string showing the result, opcode, and operands of the instruction, equivalent to what - * would be printed by PrintIR.ql. For example: - * - * `mu0_28(int) = Store r0_26, r0_27` - */ - final string getDumpString() { - result = - this.getResultString() + " = " + this.getOperationString() + " " + this.getOperandsString() - } - - private predicate shouldGenerateDumpStrings() { - exists(IRConfiguration::IRConfiguration config | - config.shouldEvaluateDebugStringsForFunction(this.getEnclosingFunction()) - ) - } - - /** - * Gets a string describing the operation of this instruction. This includes - * the opcode and the immediate value, if any. For example: - * - * VariableAddress[x] - */ - final string getOperationString() { - this.shouldGenerateDumpStrings() and - if exists(this.getImmediateString()) - then - result = - this.getOperationPrefix() + this.getOpcode().toString() + "[" + this.getImmediateString() + - "]" - else result = this.getOperationPrefix() + this.getOpcode().toString() - } - - /** - * Gets a string describing the immediate value of this instruction, if any. - */ - string getImmediateString() { none() } - - private string getOperationPrefix() { - this.shouldGenerateDumpStrings() and - if this instanceof SideEffectInstruction then result = "^" else result = "" - } - - private string getResultPrefix() { - this.shouldGenerateDumpStrings() and - if this.getResultIRType() instanceof IRVoidType - then result = "v" - else - if this.hasMemoryResult() - then if this.isResultModeled() then result = "m" else result = "mu" - else result = "r" - } - - /** - * Gets the zero-based index of this instruction within its block. This is - * used by debugging and printing code only. - */ - int getDisplayIndexInBlock() { - this.shouldGenerateDumpStrings() and - exists(IRBlock block | - this = block.getInstruction(result) - or - this = - rank[-result - 1](PhiInstruction phiInstr | - phiInstr = block.getAPhiInstruction() - | - phiInstr order by phiInstr.getUniqueId() - ) - ) - } - - private int getLineRank() { - this.shouldGenerateDumpStrings() and - exists(IRFunction enclosing, Language::File file, int line | - this = - rank[result](Instruction instr | - instr = getAnInstructionAtLine(enclosing, file, line) - | - instr order by instr.getBlock().getDisplayIndex(), instr.getDisplayIndexInBlock() - ) - ) - } - - /** - * Gets a human-readable string that uniquely identifies this instruction - * within the function. This string is used to refer to this instruction when - * printing IR dumps. - * - * Example: `r1_1` - */ - string getResultId() { - this.shouldGenerateDumpStrings() and - result = - this.getResultPrefix() + this.getAst().getLocation().getStartLine() + "_" + this.getLineRank() - } - - /** - * Gets a string describing the result of this instruction, suitable for - * display in IR dumps. This consists of the result ID plus the type of the - * result. - * - * Example: `r1_1(int*)` - */ - final string getResultString() { - this.shouldGenerateDumpStrings() and - result = this.getResultId() + "(" + this.getResultLanguageType().getDumpString() + ")" - } - - /** - * Gets a string describing the operands of this instruction, suitable for - * display in IR dumps. - * - * Example: `func:r3_4, this:r3_5` - */ - string getOperandsString() { - this.shouldGenerateDumpStrings() and - result = - concat(Operand operand | - operand = this.getAnOperand() - | - operand.getDumpString(), ", " order by operand.getDumpSortOrder() - ) - } - - /** - * Gets a string identifier for this function that is unique among all - * instructions in the same function. - * - * This is used for sorting IR output for tests, and is likely to be - * inefficient for any other use. - */ - final string getUniqueId() { result = Construction::getInstructionUniqueId(this) } - - /** - * INTERNAL: Do not use. - * - * Gets two sort keys for this instruction - used to order instructions for printing - * in test outputs. - */ - final predicate hasSortKeys(int key1, int key2) { - Construction::instructionHasSortKeys(this, key1, key2) - } - - /** - * Gets the basic block that contains this instruction. - */ - final IRBlock getBlock() { result.getAnInstruction() = this } - - /** - * Gets the function that contains this instruction. - */ - final Language::Declaration getEnclosingFunction() { - result = this.getEnclosingIRFunction().getFunction() - } - - /** - * Gets the IRFunction object that contains the IR for this instruction. - */ - final IRFunction getEnclosingIRFunction() { - result = Construction::getInstructionEnclosingIRFunction(this) - } - - /** - * Gets the AST that caused this instruction to be generated. - */ - final Language::AST getAst() { result = Construction::getInstructionAst(this) } - - /** - * Gets the location of the source code for this instruction. - */ - final Language::Location getLocation() { result = this.getAst().getLocation() } - - /** - * Gets the `Expr` whose result is computed by this instruction, if any. The `Expr` may be a - * conversion. - */ - final Language::Expr getConvertedResultExpression() { - result = Raw::getInstructionConvertedResultExpression(this) - } - - /** - * Gets the unconverted form of the `Expr` whose result is computed by this instruction, if any. - */ - final Language::Expr getUnconvertedResultExpression() { - result = Raw::getInstructionUnconvertedResultExpression(this) - } - - /** - * Gets the language-specific type of the result produced by this instruction. - * - * Most consumers of the IR should use `getResultIRType()` instead. `getResultIRType()` uses a - * less complex, language-neutral type system in which all semantically equivalent types share the - * same `IRType` instance. For example, in C++, four different `Instruction`s might have three - * different values for `getResultLanguageType()`: `unsigned int`, `char32_t`, and `wchar_t`, - * whereas all four instructions would have the same value for `getResultIRType()`, `uint4`. - */ - final Language::LanguageType getResultLanguageType() { - result = Construction::getInstructionResultType(this) - } - - /** - * Gets the type of the result produced by this instruction. If the instruction does not produce - * a result, its result type will be `IRVoidType`. - */ - cached - final IRType getResultIRType() { result = this.getResultLanguageType().getIRType() } - - /** - * Gets the type of the result produced by this instruction. If the - * instruction does not produce a result, its result type will be `VoidType`. - * - * If `isGLValue()` holds, then the result type of this instruction should be - * thought of as "pointer to `getResultType()`". - */ - final Language::Type getResultType() { - exists(Language::LanguageType resultType | - resultType = this.getResultLanguageType() and - ( - resultType.hasUnspecifiedType(result, _) - or - not resultType.hasUnspecifiedType(_, _) and result instanceof Language::UnknownType - ) - ) - } - - /** - * Holds if the result produced by this instruction is a glvalue. If this - * holds, the result of the instruction represents the address of a location, - * and the type of the location is given by `getResultType()`. If this does - * not hold, the result of the instruction represents a value whose type is - * given by `getResultType()`. - * - * For example, the statement `y = x;` generates the following IR: - * ``` - * r1_0(glval: int) = VariableAddress[x] - * r1_1(int) = Load r1_0, mu0_1 - * r1_2(glval: int) = VariableAddress[y] - * mu1_3(int) = Store r1_2, r1_1 - * ``` - * - * The result of each `VariableAddress` instruction is a glvalue of type - * `int`, representing the address of the corresponding integer variable. The - * result of the `Load` instruction is a prvalue of type `int`, representing - * the integer value loaded from variable `x`. - */ - final predicate isGLValue() { this.getResultLanguageType().hasType(_, true) } - - /** - * Gets the size of the result produced by this instruction, in bytes. If the - * result does not have a known constant size, this predicate does not hold. - * - * If `this.isGLValue()` holds for this instruction, the value of - * `getResultSize()` will always be the size of a pointer. - */ - final int getResultSize() { result = this.getResultLanguageType().getByteSize() } - - /** - * Gets the opcode that specifies the operation performed by this instruction. - */ - pragma[inline] - final Opcode getOpcode() { Construction::getInstructionOpcode(result, this) } - - /** - * Gets all direct uses of the result of this instruction. The result can be - * an `Operand` for which `isDefinitionInexact` holds. - */ - final Operand getAUse() { result.getAnyDef() = this } - - /** - * Gets all of this instruction's operands. - */ - final Operand getAnOperand() { result.getUse() = this } - - /** - * Holds if this instruction produces a memory result. - */ - final predicate hasMemoryResult() { exists(this.getResultMemoryAccess()) } - - /** - * Gets the kind of memory access performed by this instruction's result. - * Holds only for instructions with a memory result. - */ - pragma[inline] - final MemoryAccessKind getResultMemoryAccess() { - result = this.getOpcode().getWriteMemoryAccess() - } - - /** - * Holds if the memory access performed by this instruction's result will not always write to - * every bit in the memory location. This is most commonly used for memory accesses that may or - * may not actually occur depending on runtime state (for example, the write side effect of an - * output parameter that is not written to on all paths), or for accesses where the memory - * location is a conservative estimate of the memory that might actually be accessed at runtime - * (for example, the global side effects of a function call). - */ - pragma[inline] - final predicate hasResultMayMemoryAccess() { this.getOpcode().hasMayWriteMemoryAccess() } - - /** - * Gets the operand that holds the memory address to which this instruction stores its - * result, if any. For example, in `m3 = Store r1, r2`, the result of `getResultAddressOperand()` - * is `r1`. - */ - final AddressOperand getResultAddressOperand() { - this.getResultMemoryAccess().usesAddressOperand() and - result.getUse() = this - } - - /** - * Gets the instruction that holds the exact memory address to which this instruction stores its - * result, if any. For example, in `m3 = Store r1, r2`, the result of `getResultAddressOperand()` - * is the instruction that defines `r1`. - */ - final Instruction getResultAddress() { result = this.getResultAddressOperand().getDef() } - - /** - * Holds if the result of this instruction is precisely modeled in SSA. Always - * holds for a register result. For a memory result, a modeled result is - * connected to its actual uses. An unmodeled result has no uses. - * - * For example: - * ``` - * int x = 1; - * int *p = &x; - * int y = *p; - * ``` - * In non-aliased SSA, `x` will not be modeled because it has its address - * taken. In that case, `isResultModeled()` would not hold for the result of - * the `Store` to `x`. - */ - final predicate isResultModeled() { - // Register results are always in SSA form. - not this.hasMemoryResult() or - Construction::hasModeledMemoryResult(this) - } - - /** - * Holds if this is an instruction with a memory result that represents a - * conflation of more than one memory allocation. - * - * This happens in practice when dereferencing a pointer that cannot be - * tracked back to a single local allocation. Such memory is instead modeled - * as originating on the `AliasedDefinitionInstruction` at the entry of the - * function. - */ - final predicate isResultConflated() { Construction::hasConflatedMemoryResult(this) } - - /** - * Gets the successor of this instruction along the control flow edge - * specified by `kind`. - */ - final Instruction getSuccessor(EdgeKind kind) { - result = Construction::getInstructionSuccessor(this, kind) - } - - /** - * Gets the a _back-edge successor_ of this instruction along the control - * flow edge specified by `kind`. A back edge in the control-flow graph is - * intuitively the edge that goes back around a loop. If all back edges are - * removed from the control-flow graph, it becomes acyclic. - */ - final Instruction getBackEdgeSuccessor(EdgeKind kind) { - // We don't take these edges from - // `Construction::getInstructionBackEdgeSuccessor` since that relation has - // not been treated to remove any loops that might be left over due to - // flaws in the IR construction or back-edge detection. - exists(IRBlock block | - block = this.getBlock() and - this = block.getLastInstruction() and - result = block.getBackEdgeSuccessor(kind).getFirstInstruction() - ) - } - - /** - * Gets all direct successors of this instruction. - */ - final Instruction getASuccessor() { result = this.getSuccessor(_) } - - /** - * Gets a predecessor of this instruction such that the predecessor reaches - * this instruction along the control flow edge specified by `kind`. - */ - final Instruction getPredecessor(EdgeKind kind) { result.getSuccessor(kind) = this } - - /** - * Gets all direct predecessors of this instruction. - */ - final Instruction getAPredecessor() { result = this.getPredecessor(_) } -} - -/** - * An instruction that refers to a variable. - * - * This class is used for any instruction whose operation fundamentally depends on a specific - * variable. For example, it is used for `VariableAddress`, which returns the address of a specific - * variable, and `InitializeParameter`, which returns the value that was passed to the specified - * parameter by the caller. `VariableInstruction` is not used for `Load` or `Store` instructions - * that happen to load from or store to a particular variable; in those cases, the memory location - * being accessed is specified by the `AddressOperand` on the instruction, which may or may not be - * defined by the result of a `VariableAddress` instruction. - */ -class VariableInstruction extends Instruction { - IRVariable var; - - VariableInstruction() { var = Raw::getInstructionVariable(this) } - - override string getImmediateString() { result = var.toString() } - - /** - * Gets the variable that this instruction references. - */ - final IRVariable getIRVariable() { result = var } - - /** - * Gets the AST variable that this instruction's IR variable refers to, if one exists. - */ - final Language::Variable getAstVariable() { result = var.(IRUserVariable).getVariable() } -} - -/** - * An instruction that refers to a field of a class, struct, or union. - * - * This class is used for any instruction whose operation fundamentally depends on a specific - * field. For example, it is used for `FieldAddress`, which computes the address of a specific - * field on an object. `FieldInstruction` is not used for `Load` or `Store` instructions that happen - * to load from or store to a particular field; in those cases, the memory location being accessed - * is specified by the `AddressOperand` on the instruction, which may or may not be defined by the - * result of a `FieldAddress` instruction. - */ -class FieldInstruction extends Instruction { - Language::Field field; - - FieldInstruction() { field = Raw::getInstructionField(this) } - - final override string getImmediateString() { result = field.toString() } - - /** - * Gets the field that this instruction references. - */ - final Language::Field getField() { result = field } -} - -/** - * An instruction that refers to a function. - * - * This class is used for any instruction whose operation fundamentally depends on a specific - * function. For example, it is used for `FunctionAddress`, which returns the address of a specific - * function. `FunctionInstruction` is not used for `Call` instructions that happen to call a - * particular function; in that case, the function being called is specified by the - * `CallTargetOperand` on the instruction, which may or may not be defined by the result of a - * `FunctionAddress` instruction. - */ -class FunctionInstruction extends Instruction { - Language::Function funcSymbol; - - FunctionInstruction() { funcSymbol = Raw::getInstructionFunction(this) } - - final override string getImmediateString() { result = funcSymbol.toString() } - - /** - * Gets the function that this instruction references. - */ - final Language::Function getFunctionSymbol() { result = funcSymbol } -} - -/** - * An instruction whose result is a compile-time constant value. - */ -class ConstantValueInstruction extends Instruction { - string value; - - ConstantValueInstruction() { value = Raw::getInstructionConstantValue(this) } - - final override string getImmediateString() { result = value } - - /** - * Gets the constant value of this instruction's result. - */ - final string getValue() { result = value } -} - -/** - * An instruction that refers to an argument of a `Call` instruction. - * - * This instruction is used for side effects of a `Call` instruction that read or write memory - * pointed to by one of the arguments of the call. - */ -class IndexedInstruction extends Instruction { - int index; - - IndexedInstruction() { index = Raw::getInstructionIndex(this) } - - final override string getImmediateString() { result = index.toString() } - - /** - * Gets the zero-based index of the argument that this instruction references. - */ - final int getIndex() { result = index } -} - -/** - * An instruction representing the entry point to a function. - * - * Each `IRFunction` has exactly one `EnterFunction` instruction. Execution of the function begins - * at this instruction. This instruction has no predecessors. - */ -class EnterFunctionInstruction extends Instruction { - EnterFunctionInstruction() { this.getOpcode() instanceof Opcode::EnterFunction } -} - -/** - * An instruction that returns the address of a variable. - * - * This instruction returns the address of a local variable, parameter, static field, - * namespace-scope variable, or global variable. For the address of a non-static field of a class, - * struct, or union, see `FieldAddressInstruction`. - */ -class VariableAddressInstruction extends VariableInstruction { - VariableAddressInstruction() { this.getOpcode() instanceof Opcode::VariableAddress } -} - -/** - * An instruction that returns the address of a function. - * - * This instruction returns the address of a function, including non-member functions, static member - * functions, and non-static member functions. - * - * The result has an `IRFunctionAddress` type. - */ -class FunctionAddressInstruction extends FunctionInstruction { - FunctionAddressInstruction() { this.getOpcode() instanceof Opcode::FunctionAddress } -} - -/** - * An instruction that returns the address of a "virtual" delete function. - * - * This function, which does not actually exist in the source code, is used to - * delete objects of a class with a virtual destructor. In that case the deacllocation - * function is selected at runtime based on the dynamic type of the object. So this - * function dynamically dispatches to the correct deallocation function. - * It also should pass in the required extra arguments to the deallocation function - * which may differ dynamically depending on the type of the object. - */ -class VirtualDeleteFunctionAddressInstruction extends Instruction { - VirtualDeleteFunctionAddressInstruction() { - this.getOpcode() instanceof Opcode::VirtualDeleteFunctionAddress - } -} - -/** - * An instruction that initializes a parameter of the enclosing function with the value of the - * corresponding argument passed by the caller. - * - * Each parameter of a function will have exactly one `InitializeParameter` instruction that - * initializes that parameter. - */ -class InitializeParameterInstruction extends VariableInstruction { - InitializeParameterInstruction() { this.getOpcode() instanceof Opcode::InitializeParameter } - - /** - * Gets the parameter initialized by this instruction. - */ - final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() } - - /** - * Holds if this instruction initializes the parameter with index `index`, or - * if `index` is `-1` and this instruction initializes `this`. - */ - pragma[noinline] - final predicate hasIndex(int index) { - index >= 0 and index = this.getParameter().getIndex() - or - index = -1 and this.getIRVariable() instanceof IRThisVariable - } -} - -/** - * An instruction that initializes all memory that existed before this function was called. - * - * This instruction provides a definition for memory that, because it was actually allocated and - * initialized elsewhere, would not otherwise have a definition in this function. - */ -class InitializeNonLocalInstruction extends Instruction { - InitializeNonLocalInstruction() { this.getOpcode() instanceof Opcode::InitializeNonLocal } -} - -/** - * An instruction that initializes the memory pointed to by a parameter of the enclosing function - * with the value of that memory on entry to the function. - */ -class InitializeIndirectionInstruction extends VariableInstruction { - InitializeIndirectionInstruction() { this.getOpcode() instanceof Opcode::InitializeIndirection } - - /** - * Gets the parameter initialized by this instruction. - */ - final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() } - - /** - * Holds if this instruction initializes the memory pointed to by the parameter with - * index `index`, or if `index` is `-1` and this instruction initializes the memory - * pointed to by `this`. - */ - pragma[noinline] - final predicate hasIndex(int index) { - index >= 0 and index = this.getParameter().getIndex() - or - index = -1 and this.getIRVariable() instanceof IRThisVariable - } -} - -/** - * An instruction that initializes the `this` pointer parameter of the enclosing function. - */ -class InitializeThisInstruction extends Instruction { - InitializeThisInstruction() { this.getOpcode() instanceof Opcode::InitializeThis } -} - -/** - * An instruction that computes the address of a non-static field of an object. - */ -class FieldAddressInstruction extends FieldInstruction { - FieldAddressInstruction() { this.getOpcode() instanceof Opcode::FieldAddress } - - /** - * Gets the operand that provides the address of the object containing the field. - */ - final UnaryOperand getObjectAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the object containing the field. - */ - final Instruction getObjectAddress() { result = this.getObjectAddressOperand().getDef() } -} - -/** - * An instruction that computes the address of the first element of a managed array. - * - * This instruction is used for element access to C# arrays. - */ -class ElementsAddressInstruction extends UnaryInstruction { - ElementsAddressInstruction() { this.getOpcode() instanceof Opcode::ElementsAddress } - - /** - * Gets the operand that provides the address of the array object. - */ - final UnaryOperand getArrayObjectAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the array object. - */ - final Instruction getArrayObjectAddress() { - result = this.getArrayObjectAddressOperand().getDef() - } -} - -/** - * An instruction that produces a well-defined but unknown result and has - * unknown side effects, including side effects that are not conservatively - * modeled in the SSA graph. - * - * This type of instruction appears when there is an `ErrorExpr` in the AST, - * meaning that the extractor could not understand the expression and therefore - * produced a partial AST. Queries that give alerts when some action is _not_ - * taken may want to ignore any function that contains an `ErrorInstruction`. - */ -class ErrorInstruction extends Instruction { - ErrorInstruction() { this.getOpcode() instanceof Opcode::Error } -} - -/** - * An instruction that returns an uninitialized value. - * - * This instruction is used to provide an initial definition for a stack variable that does not have - * an initializer, or whose initializer only partially initializes the variable. - */ -class UninitializedInstruction extends VariableInstruction { - UninitializedInstruction() { this.getOpcode() instanceof Opcode::Uninitialized } - - /** - * Gets the variable that is uninitialized. - */ - final Language::Variable getLocalVariable() { result = var.(IRUserVariable).getVariable() } -} - -/** - * An instruction that has no effect. - * - * This instruction is typically inserted to ensure that a particular AST is associated with at - * least one instruction, even when the AST has no semantic effect. - */ -class NoOpInstruction extends Instruction { - NoOpInstruction() { this.getOpcode() instanceof Opcode::NoOp } -} - -/** - * An instruction that returns control to the caller of the function. - * - * This instruction represents the normal (non-exception) return from a function, either from an - * explicit `return` statement or from control flow reaching the end of the function's body. - * - * Each function has exactly one `ReturnInstruction`. Each `return` statement in a function is - * represented as an initialization of the temporary variable that holds the return value, with - * control then flowing to the common `ReturnInstruction` for that function. Exception: A function - * that never returns will not have a `ReturnInstruction`. - * - * The `ReturnInstruction` for a function will have a control-flow successor edge to a block - * containing the `ExitFunction` instruction for that function. - * - * There are two different return instructions: `ReturnValueInstruction`, for returning a value from - * a non-`void`-returning function, and `ReturnVoidInstruction`, for returning from a - * `void`-returning function. - */ -class ReturnInstruction extends Instruction { - ReturnInstruction() { this.getOpcode() instanceof ReturnOpcode } -} - -/** - * An instruction that returns control to the caller of the function, without returning a value. - */ -class ReturnVoidInstruction extends ReturnInstruction { - ReturnVoidInstruction() { this.getOpcode() instanceof Opcode::ReturnVoid } -} - -/** - * An instruction that returns control to the caller of the function, including a return value. - */ -class ReturnValueInstruction extends ReturnInstruction { - ReturnValueInstruction() { this.getOpcode() instanceof Opcode::ReturnValue } - - /** - * Gets the operand that provides the value being returned by the function. - */ - final LoadOperand getReturnValueOperand() { result = this.getAnOperand() } - - /** - * Gets the operand that provides the address of the value being returned by the function. - */ - final AddressOperand getReturnAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the value being returned by the function, if an - * exact definition is available. - */ - final Instruction getReturnValue() { result = this.getReturnValueOperand().getDef() } - - /** - * Gets the instruction whose result provides the address of the value being returned by the function. - */ - final Instruction getReturnAddress() { result = this.getReturnAddressOperand().getDef() } -} - -/** - * An instruction that represents the use of the value pointed to by a parameter of the function - * after the function returns control to its caller. - * - * This instruction does not itself return control to the caller. It merely represents the potential - * for a caller to use the memory pointed to by the parameter sometime after the call returns. This - * is the counterpart to the `InitializeIndirection` instruction, which represents the possibility - * that the caller initialized the memory pointed to by the parameter before the call. - */ -class ReturnIndirectionInstruction extends VariableInstruction { - ReturnIndirectionInstruction() { this.getOpcode() instanceof Opcode::ReturnIndirection } - - /** - * Gets the operand that provides the value of the pointed-to memory. - */ - final SideEffectOperand getSideEffectOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the value of the pointed-to memory, if an exact - * definition is available. - */ - final Instruction getSideEffect() { result = this.getSideEffectOperand().getDef() } - - /** - * Gets the operand that provides the address of the pointed-to memory. - */ - final AddressOperand getSourceAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the pointed-to memory. - */ - final Instruction getSourceAddress() { result = this.getSourceAddressOperand().getDef() } - - /** - * Gets the parameter for which this instruction reads the final pointed-to value within the - * function. - */ - final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() } - - /** - * Holds if this instruction is the return indirection for `this`. - */ - final predicate isThisIndirection() { var instanceof IRThisVariable } - - /** - * Holds if this instruction is the return indirection for the parameter with index `index`, or - * if this instruction is the return indirection for `this` and `index` is `-1`. - */ - pragma[noinline] - final predicate hasIndex(int index) { - index >= 0 and index = this.getParameter().getIndex() - or - index = -1 and this.isThisIndirection() - } -} - -/** - * An instruction that returns a copy of its operand. - * - * There are several different copy instructions, depending on the source and destination of the - * copy operation: - * - `CopyValueInstruction` - Copies a register operand to a register result. - * - `LoadInstruction` - Copies a memory operand to a register result. - * - `StoreInstruction` - Copies a register operand to a memory result. - */ -class CopyInstruction extends Instruction { - CopyInstruction() { this.getOpcode() instanceof CopyOpcode } - - /** - * Gets the operand that provides the input value of the copy. - */ - Operand getSourceValueOperand() { none() } - - /** - * Gets the instruction whose result provides the input value of the copy, if an exact definition - * is available. - */ - final Instruction getSourceValue() { result = this.getSourceValueOperand().getDef() } -} - -/** - * An instruction that returns a register result containing a copy of its register operand. - */ -class CopyValueInstruction extends CopyInstruction, UnaryInstruction { - CopyValueInstruction() { this.getOpcode() instanceof Opcode::CopyValue } - - final override UnaryOperand getSourceValueOperand() { result = this.getAnOperand() } -} - -/** - * Gets a string describing the location pointed to by the specified address operand. - */ -private string getAddressOperandDescription(AddressOperand operand) { - result = operand.getDef().(VariableAddressInstruction).getIRVariable().toString() - or - not operand.getDef() instanceof VariableAddressInstruction and - result = "?" -} - -/** - * An instruction that returns a register result containing a copy of its memory operand. - */ -class LoadInstruction extends CopyInstruction { - LoadInstruction() { this.getOpcode() instanceof Opcode::Load } - - final override string getImmediateString() { - result = getAddressOperandDescription(this.getSourceAddressOperand()) - } - - /** - * Gets the operand that provides the address of the value being loaded. - */ - final AddressOperand getSourceAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the value being loaded. - */ - final Instruction getSourceAddress() { result = this.getSourceAddressOperand().getDef() } - - final override LoadOperand getSourceValueOperand() { result = this.getAnOperand() } -} - -/** - * An instruction that returns a memory result containing a copy of its register operand. - */ -class StoreInstruction extends CopyInstruction { - StoreInstruction() { this.getOpcode() instanceof Opcode::Store } - - final override string getImmediateString() { - result = getAddressOperandDescription(this.getDestinationAddressOperand()) - } - - /** - * Gets the operand that provides the address of the location to which the value will be stored. - */ - final AddressOperand getDestinationAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the location to which the value will - * be stored, if an exact definition is available. - */ - final Instruction getDestinationAddress() { - result = this.getDestinationAddressOperand().getDef() - } - - final override StoreValueOperand getSourceValueOperand() { result = this.getAnOperand() } -} - -/** - * An instruction that branches to one of two successor instructions based on the value of a Boolean - * operand. - */ -class ConditionalBranchInstruction extends Instruction { - ConditionalBranchInstruction() { this.getOpcode() instanceof Opcode::ConditionalBranch } - - /** - * Gets the operand that provides the Boolean condition controlling the branch. - */ - final ConditionOperand getConditionOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the Boolean condition controlling the branch. - */ - final Instruction getCondition() { result = this.getConditionOperand().getDef() } - - /** - * Gets the instruction to which control will flow if the condition is true. - */ - final Instruction getTrueSuccessor() { result = this.getSuccessor(EdgeKind::trueEdge()) } - - /** - * Gets the instruction to which control will flow if the condition is false. - */ - final Instruction getFalseSuccessor() { result = this.getSuccessor(EdgeKind::falseEdge()) } -} - -/** - * An instruction representing the exit point of a function. - * - * Each `IRFunction` has exactly one `ExitFunction` instruction, unless the function neither returns - * nor throws an exception. Control flows to the `ExitFunction` instruction from both normal returns - * (`ReturnVoid`, `ReturnValue`) and propagated exceptions (`Unwind`). This instruction has no - * successors. - */ -class ExitFunctionInstruction extends Instruction { - ExitFunctionInstruction() { this.getOpcode() instanceof Opcode::ExitFunction } -} - -/** - * An instruction whose result is a constant value. - */ -class ConstantInstruction extends ConstantValueInstruction { - ConstantInstruction() { this.getOpcode() instanceof Opcode::Constant } -} - -/** - * An instruction whose result is a constant value of integer or Boolean type. - */ -class IntegerConstantInstruction extends ConstantInstruction { - IntegerConstantInstruction() { - exists(IRType resultType | - resultType = this.getResultIRType() and - (resultType instanceof IRIntegerType or resultType instanceof IRBooleanType) - ) - } -} - -/** - * An instruction whose result is a constant value of floating-point type. - */ -class FloatConstantInstruction extends ConstantInstruction { - FloatConstantInstruction() { this.getResultIRType() instanceof IRFloatingPointType } -} - -/** - * An instruction whose result is the address of a string literal. - */ -class StringConstantInstruction extends VariableInstruction { - override IRStringLiteral var; - - final override string getImmediateString() { - result = Language::getStringLiteralText(this.getValue()) - } - - /** - * Gets the string literal whose address is returned by this instruction. - */ - final Language::StringLiteral getValue() { result = var.getLiteral() } -} - -/** - * An instruction whose result is computed from two operands. - */ -class BinaryInstruction extends Instruction { - BinaryInstruction() { this.getOpcode() instanceof BinaryOpcode } - - /** - * Gets the left operand of this binary instruction. - */ - final LeftOperand getLeftOperand() { result = this.getAnOperand() } - - /** - * Gets the right operand of this binary instruction. - */ - final RightOperand getRightOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the value of the left operand of this binary - * instruction. - */ - final Instruction getLeft() { result = this.getLeftOperand().getDef() } - - /** - * Gets the instruction whose result provides the value of the right operand of this binary - * instruction. - */ - final Instruction getRight() { result = this.getRightOperand().getDef() } - - /** - * Holds if this instruction's operands are `op1` and `op2`, in either order. - */ - final predicate hasOperands(Operand op1, Operand op2) { - op1 = this.getLeftOperand() and op2 = this.getRightOperand() - or - op1 = this.getRightOperand() and op2 = this.getLeftOperand() - } -} - -/** - * An instruction that computes the result of an arithmetic operation. - */ -class ArithmeticInstruction extends Instruction { - ArithmeticInstruction() { this.getOpcode() instanceof ArithmeticOpcode } -} - -/** - * An instruction that performs an arithmetic operation on two numeric operands. - */ -class BinaryArithmeticInstruction extends ArithmeticInstruction, BinaryInstruction { } - -/** - * An instruction whose result is computed by performing an arithmetic operation on a single - * numeric operand. - */ -class UnaryArithmeticInstruction extends ArithmeticInstruction, UnaryInstruction { } - -/** - * An instruction that computes the sum of two numeric operands. - * - * Both operands must have the same numeric type, which will also be the result type. The result of - * integer overflow is the infinite-precision result modulo 2^n. Floating-point addition is - * performed according to IEEE-754. - */ -class AddInstruction extends BinaryArithmeticInstruction { - AddInstruction() { this.getOpcode() instanceof Opcode::Add } -} - -/** - * An instruction that computes the difference of two numeric operands. - * - * Both operands must have the same numeric type, which will also be the result type. The result of - * integer overflow is the infinite-precision result modulo 2^n. Floating-point subtraction is performed - * according to IEEE-754. - */ -class SubInstruction extends BinaryArithmeticInstruction { - SubInstruction() { this.getOpcode() instanceof Opcode::Sub } -} - -/** - * An instruction that computes the product of two numeric operands. - * - * Both operands must have the same numeric type, which will also be the result type. The result of - * integer overflow is the infinite-precision result modulo 2^n. Floating-point multiplication is - * performed according to IEEE-754. - */ -class MulInstruction extends BinaryArithmeticInstruction { - MulInstruction() { this.getOpcode() instanceof Opcode::Mul } -} - -/** - * An instruction that computes the quotient of two numeric operands. - * - * Both operands must have the same numeric type, which will also be the result type. The result of - * division by zero or integer overflow is undefined. Floating-point division is performed according - * to IEEE-754. - */ -class DivInstruction extends BinaryArithmeticInstruction { - DivInstruction() { this.getOpcode() instanceof Opcode::Div } -} - -/** - * An instruction that computes the remainder of two integer operands. - * - * Both operands must have the same integer type, which will also be the result type. The result of - * division by zero or integer overflow is undefined. - */ -class RemInstruction extends BinaryArithmeticInstruction { - RemInstruction() { this.getOpcode() instanceof Opcode::Rem } -} - -/** - * An instruction that negates a single numeric operand. - * - * The operand must have a numeric type, which will also be the result type. The result of integer - * negation uses two's complement, and is computed modulo 2^n. The result of floating-point negation - * is performed according to IEEE-754. - */ -class NegateInstruction extends UnaryArithmeticInstruction { - NegateInstruction() { this.getOpcode() instanceof Opcode::Negate } -} - -/** - * An instruction that computes the result of a bitwise operation. - */ -class BitwiseInstruction extends Instruction { - BitwiseInstruction() { this.getOpcode() instanceof BitwiseOpcode } -} - -/** - * An instruction that performs a bitwise operation on two integer operands. - */ -class BinaryBitwiseInstruction extends BitwiseInstruction, BinaryInstruction { } - -/** - * An instruction that performs a bitwise operation on a single integer operand. - */ -class UnaryBitwiseInstruction extends BitwiseInstruction, UnaryInstruction { } - -/** - * An instruction that computes the bitwise "and" of two integer operands. - * - * Both operands must have the same integer type, which will also be the result type. - */ -class BitAndInstruction extends BinaryBitwiseInstruction { - BitAndInstruction() { this.getOpcode() instanceof Opcode::BitAnd } -} - -/** - * An instruction that computes the bitwise "or" of two integer operands. - * - * Both operands must have the same integer type, which will also be the result type. - */ -class BitOrInstruction extends BinaryBitwiseInstruction { - BitOrInstruction() { this.getOpcode() instanceof Opcode::BitOr } -} - -/** - * An instruction that computes the bitwise "xor" of two integer operands. - * - * Both operands must have the same integer type, which will also be the result type. - */ -class BitXorInstruction extends BinaryBitwiseInstruction { - BitXorInstruction() { this.getOpcode() instanceof Opcode::BitXor } -} - -/** - * An instruction that shifts its left operand to the left by the number of bits specified by its - * right operand. - * - * Both operands must have an integer type. The result has the same type as the left operand. The - * rightmost bits are zero-filled. - */ -class ShiftLeftInstruction extends BinaryBitwiseInstruction { - ShiftLeftInstruction() { this.getOpcode() instanceof Opcode::ShiftLeft } -} - -/** - * An instruction that shifts its left operand to the right by the number of bits specified by its - * right operand. - * - * Both operands must have an integer type. The result has the same type as the left operand. If the - * left operand has an unsigned integer type, the leftmost bits are zero-filled. If the left operand - * has a signed integer type, the leftmost bits are filled by duplicating the most significant bit - * of the left operand. - */ -class ShiftRightInstruction extends BinaryBitwiseInstruction { - ShiftRightInstruction() { this.getOpcode() instanceof Opcode::ShiftRight } -} - -/** - * An instruction that shifts its left operand to the right by the number of bits specified by its - * right operand. - * - * Both operands must have an integer type. The result has the same type as the left operand. - * The leftmost bits are zero-filled. - */ -class UnsignedShiftRightInstruction extends BinaryBitwiseInstruction { - UnsignedShiftRightInstruction() { this.getOpcode() instanceof Opcode::UnsignedShiftRight } -} - -/** - * An instruction that performs a binary arithmetic operation involving at least one pointer - * operand. - */ -class PointerArithmeticInstruction extends BinaryInstruction { - int elementSize; - - PointerArithmeticInstruction() { - this.getOpcode() instanceof PointerArithmeticOpcode and - elementSize = Raw::getInstructionElementSize(this) - } - - final override string getImmediateString() { result = elementSize.toString() } - - /** - * Gets the size of the elements pointed to by the pointer operands, in bytes. - * - * When adding an integer offset to a pointer (`PointerAddInstruction`) or subtracting an integer - * offset from a pointer (`PointerSubInstruction`), the integer offset is multiplied by the - * element size to compute the actual number of bytes added to or subtracted from the pointer - * address. When computing the integer difference between two pointers (`PointerDiffInstruction`), - * the result is computed by computing the difference between the two pointer byte addresses, then - * dividing that byte count by the element size. - */ - final int getElementSize() { result = elementSize } -} - -/** - * An instruction that adds or subtracts an integer offset from a pointer. - */ -class PointerOffsetInstruction extends PointerArithmeticInstruction { - PointerOffsetInstruction() { this.getOpcode() instanceof PointerOffsetOpcode } -} - -/** - * An instruction that adds an integer offset to a pointer. - * - * The result is the byte address computed by adding the value of the right (integer) operand, - * multiplied by the element size, to the value of the left (pointer) operand. The result of pointer - * overflow is undefined. - */ -class PointerAddInstruction extends PointerOffsetInstruction { - PointerAddInstruction() { this.getOpcode() instanceof Opcode::PointerAdd } -} - -/** - * An instruction that subtracts an integer offset from a pointer. - * - * The result is the byte address computed by subtracting the value of the right (integer) operand, - * multiplied by the element size, from the value of the left (pointer) operand. The result of - * pointer underflow is undefined. - */ -class PointerSubInstruction extends PointerOffsetInstruction { - PointerSubInstruction() { this.getOpcode() instanceof Opcode::PointerSub } -} - -/** - * An instruction that computes the difference between two pointers. - * - * Both operands must have the same pointer type. The result must have an integer type whose size is - * the same as that of the pointer operands. The result is computed by subtracting the byte address - * in the right operand from the byte address in the left operand, and dividing by the element size. - * If the difference in byte addresses is not divisible by the element size, the result is - * undefined. - */ -class PointerDiffInstruction extends PointerArithmeticInstruction { - PointerDiffInstruction() { this.getOpcode() instanceof Opcode::PointerDiff } -} - -/** - * An instruction whose result is computed from a single operand. - */ -class UnaryInstruction extends Instruction { - UnaryInstruction() { this.getOpcode() instanceof UnaryOpcode } - - /** - * Gets the sole operand of this instruction. - */ - final UnaryOperand getUnaryOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the sole operand of this instruction. - */ - final Instruction getUnary() { result = this.getUnaryOperand().getDef() } -} - -/** - * An instruction that converts the value of its operand to a value of a different type. - */ -class ConvertInstruction extends UnaryInstruction { - ConvertInstruction() { this.getOpcode() instanceof Opcode::Convert } -} - -/** - * An instruction that converts the address of a polymorphic object to the address of a different - * subobject of the same polymorphic object, returning a null address if the dynamic type of the - * object is not compatible with the result type. - * - * If the operand holds a null address, the result is a null address. - * - * This instruction is used to represent a C++ `dynamic_cast<>` to a pointer type, or a C# `is` or - * `as` expression. - */ -class CheckedConvertOrNullInstruction extends UnaryInstruction { - CheckedConvertOrNullInstruction() { this.getOpcode() instanceof Opcode::CheckedConvertOrNull } -} - -/** - * An instruction that converts the address of a polymorphic object to the address of a different - * subobject of the same polymorphic object, throwing an exception if the dynamic type of the object - * is not compatible with the result type. - * - * If the operand holds a null address, the result is a null address. - * - * This instruction is used to represent a C++ `dynamic_cast<>` to a reference type, or a C# cast - * expression. - */ -class CheckedConvertOrThrowInstruction extends UnaryInstruction { - CheckedConvertOrThrowInstruction() { this.getOpcode() instanceof Opcode::CheckedConvertOrThrow } -} - -/** - * An instruction that returns the address of the complete object that contains the subobject - * pointed to by its operand. - * - * If the operand holds a null address, the result is a null address. - * - * This instruction is used to represent `dynamic_cast` in C++, which returns the pointer to - * the most-derived object. - */ -class CompleteObjectAddressInstruction extends UnaryInstruction { - CompleteObjectAddressInstruction() { this.getOpcode() instanceof Opcode::CompleteObjectAddress } -} - -/** - * An instruction that converts the address of an object to the address of a different subobject of - * the same object, without any type checking at runtime. - */ -class InheritanceConversionInstruction extends UnaryInstruction { - Language::Class baseClass; - Language::Class derivedClass; - - InheritanceConversionInstruction() { - Raw::getInstructionInheritance(this, baseClass, derivedClass) - } - - final override string getImmediateString() { - result = derivedClass.toString() + " : " + baseClass.toString() - } - - /** - * Gets the `ClassDerivation` for the inheritance relationship between - * the base and derived classes. This predicate does not hold if the - * conversion is to an indirect virtual base class. - */ - final Language::ClassDerivation getDerivation() { - result.getBaseClass() = baseClass and result.getDerivedClass() = derivedClass - } - - /** - * Gets the base class of the conversion. This will be either a direct - * base class of the derived class, or a virtual base class of the - * derived class. - */ - final Language::Class getBaseClass() { result = baseClass } - - /** - * Gets the derived class of the conversion. - */ - final Language::Class getDerivedClass() { result = derivedClass } -} - -/** - * An instruction that converts from the address of a derived class to the address of a base class. - */ -class ConvertToBaseInstruction extends InheritanceConversionInstruction { - ConvertToBaseInstruction() { this.getOpcode() instanceof ConvertToBaseOpcode } -} - -/** - * An instruction that converts from the address of a derived class to the address of a direct - * non-virtual base class. - * - * If the operand holds a null address, the result is a null address. - */ -class ConvertToNonVirtualBaseInstruction extends ConvertToBaseInstruction { - ConvertToNonVirtualBaseInstruction() { - this.getOpcode() instanceof Opcode::ConvertToNonVirtualBase - } -} - -/** - * An instruction that converts from the address of a derived class to the address of a virtual base - * class. - * - * If the operand holds a null address, the result is a null address. - */ -class ConvertToVirtualBaseInstruction extends ConvertToBaseInstruction { - ConvertToVirtualBaseInstruction() { this.getOpcode() instanceof Opcode::ConvertToVirtualBase } -} - -/** - * An instruction that converts from the address of a base class to the address of a direct - * non-virtual derived class. - * - * If the operand holds a null address, the result is a null address. - */ -class ConvertToDerivedInstruction extends InheritanceConversionInstruction { - ConvertToDerivedInstruction() { this.getOpcode() instanceof Opcode::ConvertToDerived } -} - -/** - * An instruction that computes the bitwise complement of its operand. - * - * The operand must have an integer type, which will also be the result type. - */ -class BitComplementInstruction extends UnaryBitwiseInstruction { - BitComplementInstruction() { this.getOpcode() instanceof Opcode::BitComplement } -} - -/** - * An instruction that computes the logical complement of its operand. - * - * The operand must have a Boolean type, which will also be the result type. - */ -class LogicalNotInstruction extends UnaryInstruction { - LogicalNotInstruction() { this.getOpcode() instanceof Opcode::LogicalNot } -} - -/** - * An instruction that compares two numeric operands. - */ -class CompareInstruction extends BinaryInstruction { - CompareInstruction() { this.getOpcode() instanceof CompareOpcode } -} - -/** - * An instruction that returns a `true` result if its operands are equal. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if `left == right`, and `false` if `left != right` or the two operands are - * unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareEQInstruction extends CompareInstruction { - CompareEQInstruction() { this.getOpcode() instanceof Opcode::CompareEQ } -} - -/** - * An instruction that returns a `true` result if its operands are not equal. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if `left != right` or if the two operands are unordered, and `false` if - * `left == right`. Floating-point comparison is performed according to IEEE-754. - */ -class CompareNEInstruction extends CompareInstruction { - CompareNEInstruction() { this.getOpcode() instanceof Opcode::CompareNE } -} - -/** - * An instruction that does a relative comparison of two values, such as `<` or `>=`. - */ -class RelationalInstruction extends CompareInstruction { - RelationalInstruction() { this.getOpcode() instanceof RelationalOpcode } - - /** - * Gets the operand on the "greater" (or "greater-or-equal") side - * of this relational instruction, that is, the side that is larger - * if the overall instruction evaluates to `true`; for example on - * `x <= 20` this is the `20`, and on `y > 0` it is `y`. - */ - Instruction getGreater() { none() } - - /** - * Gets the operand on the "lesser" (or "lesser-or-equal") side - * of this relational instruction, that is, the side that is smaller - * if the overall instruction evaluates to `true`; for example on - * `x <= 20` this is `x`, and on `y > 0` it is the `0`. - */ - Instruction getLesser() { none() } - - /** - * Holds if this relational instruction is strict (is not an "or-equal" instruction). - */ - predicate isStrict() { none() } -} - -/** - * An instruction that returns a `true` result if its left operand is less than its right operand. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if the `left < right`, and `false` if `left >= right` or if the two operands - * are unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareLTInstruction extends RelationalInstruction { - CompareLTInstruction() { this.getOpcode() instanceof Opcode::CompareLT } - - override Instruction getLesser() { result = this.getLeft() } - - override Instruction getGreater() { result = this.getRight() } - - override predicate isStrict() { any() } -} - -/** - * An instruction that returns a `true` result if its left operand is greater than its right operand. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if the `left > right`, and `false` if `left <= right` or if the two operands - * are unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareGTInstruction extends RelationalInstruction { - CompareGTInstruction() { this.getOpcode() instanceof Opcode::CompareGT } - - override Instruction getLesser() { result = this.getRight() } - - override Instruction getGreater() { result = this.getLeft() } - - override predicate isStrict() { any() } -} - -/** - * An instruction that returns a `true` result if its left operand is less than or equal to its - * right operand. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if the `left <= right`, and `false` if `left > right` or if the two operands - * are unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareLEInstruction extends RelationalInstruction { - CompareLEInstruction() { this.getOpcode() instanceof Opcode::CompareLE } - - override Instruction getLesser() { result = this.getLeft() } - - override Instruction getGreater() { result = this.getRight() } - - override predicate isStrict() { none() } -} - -/** - * An instruction that returns a `true` result if its left operand is greater than or equal to its - * right operand. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if the `left >= right`, and `false` if `left < right` or if the two operands - * are unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareGEInstruction extends RelationalInstruction { - CompareGEInstruction() { this.getOpcode() instanceof Opcode::CompareGE } - - override Instruction getLesser() { result = this.getRight() } - - override Instruction getGreater() { result = this.getLeft() } - - override predicate isStrict() { none() } -} - -/** - * An instruction that branches to one of multiple successor instructions based on the value of an - * integer operand. - * - * This instruction will have zero or more successors whose edge kind is `CaseEdge`, each - * representing the branch that will be taken if the controlling expression is within the range - * specified for that case edge. The range of a case edge must be disjoint from the range of each - * other case edge. - * - * The instruction may optionally have a successor edge whose edge kind is `DefaultEdge`, - * representing the branch that will be taken if the controlling expression is not within the range - * of any case edge. - */ -class SwitchInstruction extends Instruction { - SwitchInstruction() { this.getOpcode() instanceof Opcode::Switch } - - /** Gets the operand that provides the integer value controlling the switch. */ - final ConditionOperand getExpressionOperand() { result = this.getAnOperand() } - - /** Gets the instruction whose result provides the integer value controlling the switch. */ - final Instruction getExpression() { result = this.getExpressionOperand().getDef() } - - /** Gets the successor instructions along the case edges of the switch. */ - final Instruction getACaseSuccessor() { exists(CaseEdge edge | result = this.getSuccessor(edge)) } - - /** Gets the successor instruction along the default edge of the switch, if any. */ - final Instruction getDefaultSuccessor() { result = this.getSuccessor(EdgeKind::defaultEdge()) } -} - -/** - * An instruction that calls a function. - */ -class CallInstruction extends Instruction { - CallInstruction() { this.getOpcode() instanceof Opcode::Call } - - final override string getImmediateString() { - result = this.getStaticCallTarget().toString() - or - not exists(this.getStaticCallTarget()) and result = "?" - } - - /** - * Gets the operand the specifies the target function of the call. - */ - final CallTargetOperand getCallTargetOperand() { result = this.getAnOperand() } - - /** - * Gets the `Instruction` that computes the target function of the call. This is usually a - * `FunctionAddress` instruction, but can also be an arbitrary instruction that produces a - * function pointer. - */ - final Instruction getCallTarget() { result = this.getCallTargetOperand().getDef() } - - /** - * Gets all of the argument operands of the call, including the `this` pointer, if any. - */ - final ArgumentOperand getAnArgumentOperand() { result = this.getAnOperand() } - - /** - * Gets the `Function` that the call targets, if this is statically known. - */ - final Language::Function getStaticCallTarget() { - result = this.getCallTarget().(FunctionAddressInstruction).getFunctionSymbol() - } - - /** - * Gets all of the arguments of the call, including the `this` pointer, if any. - */ - final Instruction getAnArgument() { result = this.getAnArgumentOperand().getDef() } - - /** - * Gets the `this` pointer argument operand of the call, if any. - */ - final ThisArgumentOperand getThisArgumentOperand() { result = this.getAnOperand() } - - /** - * Gets the `this` pointer argument of the call, if any. - */ - final Instruction getThisArgument() { result = this.getThisArgumentOperand().getDef() } - - /** - * Gets the argument operand at the specified index. - */ - pragma[noinline] - final PositionalArgumentOperand getPositionalArgumentOperand(int index) { - result = this.getAnOperand() and - result.getIndex() = index - } - - /** - * Gets the argument at the specified index. - */ - pragma[noinline] - final Instruction getPositionalArgument(int index) { - result = this.getPositionalArgumentOperand(index).getDef() - } - - /** - * Gets the argument operand at the specified index, or `this` if `index` is `-1`. - */ - pragma[noinline] - final ArgumentOperand getArgumentOperand(int index) { - index >= 0 and result = this.getPositionalArgumentOperand(index) - or - index = -1 and result = this.getThisArgumentOperand() - } - - /** - * Gets the argument at the specified index, or `this` if `index` is `-1`. - */ - pragma[noinline] - final Instruction getArgument(int index) { result = this.getArgumentOperand(index).getDef() } - - /** - * Gets the number of arguments of the call, including the `this` pointer, if any. - */ - final int getNumberOfArguments() { result = count(this.getAnArgumentOperand()) } - - /** - * Holds if the result is a side effect for the argument at the specified index, or `this` if - * `index` is `-1`. - * - * This helper predicate makes it easy to join on both of these columns at once, avoiding - * pathological join orders in case the argument index should get joined first. - */ - pragma[noinline] - final SideEffectInstruction getAParameterSideEffect(int index) { - this = result.getPrimaryInstruction() and - index = result.(IndexedInstruction).getIndex() - } -} - -/** - * An instruction representing a side effect of a function call. - */ -class SideEffectInstruction extends Instruction { - SideEffectInstruction() { this.getOpcode() instanceof SideEffectOpcode } - - /** - * Gets the instruction whose execution causes this side effect. - */ - final Instruction getPrimaryInstruction() { - result = Construction::getPrimaryInstructionForSideEffect(this) - } -} - -/** - * An instruction representing the side effect of a function call on any memory that might be - * accessed by that call. - */ -class CallSideEffectInstruction extends SideEffectInstruction { - CallSideEffectInstruction() { this.getOpcode() instanceof Opcode::CallSideEffect } -} - -/** - * An instruction representing the side effect of a function call on any memory - * that might be read by that call. - * - * This instruction is emitted instead of `CallSideEffectInstruction` when it is certain that the - * call target cannot write to escaped memory. - */ -class CallReadSideEffectInstruction extends SideEffectInstruction { - CallReadSideEffectInstruction() { this.getOpcode() instanceof Opcode::CallReadSideEffect } -} - -/** - * An instruction representing a read side effect of a function call on a - * specific parameter. - */ -class ReadSideEffectInstruction extends SideEffectInstruction, IndexedInstruction { - ReadSideEffectInstruction() { this.getOpcode() instanceof ReadSideEffectOpcode } - - /** Gets the operand for the value that will be read from this instruction, if known. */ - final SideEffectOperand getSideEffectOperand() { result = this.getAnOperand() } - - /** Gets the value that will be read from this instruction, if known. */ - final Instruction getSideEffect() { result = this.getSideEffectOperand().getDef() } - - /** Gets the operand for the address from which this instruction may read. */ - final AddressOperand getArgumentOperand() { result = this.getAnOperand() } - - /** Gets the address from which this instruction may read. */ - final Instruction getArgumentDef() { result = this.getArgumentOperand().getDef() } -} - -/** - * An instruction representing the read of an indirect parameter within a function call. - */ -class IndirectReadSideEffectInstruction extends ReadSideEffectInstruction { - IndirectReadSideEffectInstruction() { this.getOpcode() instanceof Opcode::IndirectReadSideEffect } -} - -/** - * An instruction representing the read of an indirect buffer parameter within a function call. - */ -class BufferReadSideEffectInstruction extends ReadSideEffectInstruction { - BufferReadSideEffectInstruction() { this.getOpcode() instanceof Opcode::BufferReadSideEffect } -} - -/** - * An instruction representing the read of an indirect buffer parameter within a function call. - */ -class SizedBufferReadSideEffectInstruction extends ReadSideEffectInstruction { - SizedBufferReadSideEffectInstruction() { - this.getOpcode() instanceof Opcode::SizedBufferReadSideEffect - } - - /** - * Gets the operand that holds the number of bytes read from the buffer. - */ - final BufferSizeOperand getBufferSizeOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the number of bytes read from the buffer. - */ - final Instruction getBufferSize() { result = this.getBufferSizeOperand().getDef() } -} - -/** - * An instruction representing a write side effect of a function call on a - * specific parameter. - */ -class WriteSideEffectInstruction extends SideEffectInstruction, IndexedInstruction { - WriteSideEffectInstruction() { this.getOpcode() instanceof WriteSideEffectOpcode } - - /** - * Get the operand that holds the address of the memory to be written. - */ - final AddressOperand getDestinationAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the memory to be written. - */ - Instruction getDestinationAddress() { result = this.getDestinationAddressOperand().getDef() } -} - -/** - * An instruction representing the write of an indirect parameter within a function call. - */ -class IndirectMustWriteSideEffectInstruction extends WriteSideEffectInstruction { - IndirectMustWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::IndirectMustWriteSideEffect - } -} - -/** - * An instruction representing the write of an indirect buffer parameter within a function call. The - * entire buffer is overwritten. - */ -class BufferMustWriteSideEffectInstruction extends WriteSideEffectInstruction { - BufferMustWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::BufferMustWriteSideEffect - } -} - -/** - * An instruction representing the write of an indirect buffer parameter within a function call. The - * entire buffer is overwritten. - */ -class SizedBufferMustWriteSideEffectInstruction extends WriteSideEffectInstruction { - SizedBufferMustWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::SizedBufferMustWriteSideEffect - } - - /** - * Gets the operand that holds the number of bytes written to the buffer. - */ - final BufferSizeOperand getBufferSizeOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the number of bytes written to the buffer. - */ - final Instruction getBufferSize() { result = this.getBufferSizeOperand().getDef() } -} - -/** - * An instruction representing the potential write of an indirect parameter within a function call. - * - * Unlike `IndirectWriteSideEffectInstruction`, the location might not be completely overwritten. - * written. - */ -class IndirectMayWriteSideEffectInstruction extends WriteSideEffectInstruction { - IndirectMayWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::IndirectMayWriteSideEffect - } -} - -/** - * An instruction representing the write of an indirect buffer parameter within a function call. - * - * Unlike `BufferWriteSideEffectInstruction`, the buffer might not be completely overwritten. - */ -class BufferMayWriteSideEffectInstruction extends WriteSideEffectInstruction { - BufferMayWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::BufferMayWriteSideEffect - } -} - -/** - * An instruction representing the write of an indirect buffer parameter within a function call. - * - * Unlike `BufferWriteSideEffectInstruction`, the buffer might not be completely overwritten. - */ -class SizedBufferMayWriteSideEffectInstruction extends WriteSideEffectInstruction { - SizedBufferMayWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::SizedBufferMayWriteSideEffect - } - - /** - * Gets the operand that holds the number of bytes written to the buffer. - */ - final BufferSizeOperand getBufferSizeOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the number of bytes written to the buffer. - */ - final Instruction getBufferSize() { result = this.getBufferSizeOperand().getDef() } -} - -/** - * An instruction representing the initial value of newly allocated memory, such as the result of a - * call to `malloc`. - */ -class InitializeDynamicAllocationInstruction extends SideEffectInstruction { - InitializeDynamicAllocationInstruction() { - this.getOpcode() instanceof Opcode::InitializeDynamicAllocation - } - - /** - * Gets the operand that represents the address of the allocation this instruction is initializing. - */ - final AddressOperand getAllocationAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the address for the allocation this instruction is initializing. - */ - final Instruction getAllocationAddress() { result = this.getAllocationAddressOperand().getDef() } -} - -/** - * An instruction representing a GNU or MSVC inline assembly statement. - */ -class InlineAsmInstruction extends Instruction { - InlineAsmInstruction() { this.getOpcode() instanceof Opcode::InlineAsm } -} - -/** - * An instruction that throws an exception. - */ -class ThrowInstruction extends Instruction { - ThrowInstruction() { this.getOpcode() instanceof ThrowOpcode } -} - -/** - * An instruction that throws a new exception. - */ -class ThrowValueInstruction extends ThrowInstruction { - ThrowValueInstruction() { this.getOpcode() instanceof Opcode::ThrowValue } - - /** - * Gets the address operand of the exception thrown by this instruction. - */ - final AddressOperand getExceptionAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the address of the exception thrown by this instruction. - */ - final Instruction getExceptionAddress() { result = this.getExceptionAddressOperand().getDef() } - - /** - * Gets the operand for the exception thrown by this instruction. - */ - final LoadOperand getExceptionOperand() { result = this.getAnOperand() } - - /** - * Gets the exception thrown by this instruction. - */ - final Instruction getException() { result = this.getExceptionOperand().getDef() } -} - -/** - * An instruction that re-throws the current exception. - */ -class ReThrowInstruction extends ThrowInstruction { - ReThrowInstruction() { this.getOpcode() instanceof Opcode::ReThrow } -} - -/** - * An instruction that exits the current function by propagating an exception. - */ -class UnwindInstruction extends Instruction { - UnwindInstruction() { this.getOpcode() instanceof Opcode::Unwind } -} - -/** - * An instruction that starts a `catch` handler. - */ -class CatchInstruction extends Instruction { - CatchInstruction() { this.getOpcode() instanceof CatchOpcode } -} - -/** - * An instruction that catches an exception of a specific type. - */ -class CatchByTypeInstruction extends CatchInstruction { - Language::LanguageType exceptionType; - - CatchByTypeInstruction() { - this.getOpcode() instanceof Opcode::CatchByType and - exceptionType = Raw::getInstructionExceptionType(this) - } - - final override string getImmediateString() { result = exceptionType.toString() } - - /** - * Gets the type of exception to be caught. - */ - final Language::LanguageType getExceptionType() { result = exceptionType } -} - -/** - * An instruction that catches any exception. - */ -class CatchAnyInstruction extends CatchInstruction { - CatchAnyInstruction() { this.getOpcode() instanceof Opcode::CatchAny } -} - -/** - * An instruction that initializes all escaped memory. - */ -class AliasedDefinitionInstruction extends Instruction { - AliasedDefinitionInstruction() { this.getOpcode() instanceof Opcode::AliasedDefinition } -} - -/** - * An instruction that consumes all escaped memory on exit from the function. - */ -class AliasedUseInstruction extends Instruction { - AliasedUseInstruction() { this.getOpcode() instanceof Opcode::AliasedUse } -} - -/** - * An instruction representing the choice of one of multiple input values based on control flow. - * - * A `PhiInstruction` is inserted at the beginning of a block whenever two different definitions of - * the same variable reach that block. The `PhiInstruction` will have one operand corresponding to - * each control flow predecessor of the block, with that operand representing the version of the - * variable that flows from that predecessor. The result value of the `PhiInstruction` will be - * a copy of whichever operand corresponds to the actual predecessor that entered the block at - * runtime. - */ -class PhiInstruction extends Instruction { - PhiInstruction() { this.getOpcode() instanceof Opcode::Phi } - - /** - * Gets all of the instruction's `PhiInputOperand`s, representing the values that flow from each predecessor block. - */ - final PhiInputOperand getAnInputOperand() { result = this.getAnOperand() } - - /** - * Gets an instruction that defines the input to one of the operands of this - * instruction. It's possible for more than one operand to have the same - * defining instruction, so this predicate will have the same number of - * results as `getAnInputOperand()` or fewer. - */ - pragma[noinline] - final Instruction getAnInput() { result = this.getAnInputOperand().getDef() } - - /** - * Gets the input operand representing the value that flows from the specified predecessor block. - */ - final PhiInputOperand getInputOperand(IRBlock predecessorBlock) { - result = this.getAnOperand() and - result.getPredecessorBlock() = predecessorBlock - } -} - -/** - * An instruction representing the effect that a write to a memory may have on potential aliases of - * that memory. - * - * A `ChiInstruction` is inserted immediately after an instruction that writes to memory. The - * `ChiInstruction` has two operands. The first operand, given by `getTotalOperand()`, represents - * the previous state of all of the memory that might be aliased by the memory write. The second - * operand, given by `getPartialOperand()`, represents the memory that was actually modified by the - * memory write. The result of the `ChiInstruction` represents the same memory as - * `getTotalOperand()`, updated to include the changes due to the value that was actually stored by - * the memory write. - * - * As an example, suppose that variable `p` and `q` are pointers that may or may not point to the - * same memory: - * ``` - * *p = 5; - * x = *q; - * ``` - * - * The IR would look like: - * ``` - * r1_1 = VariableAddress[p] - * r1_2 = Load r1_1, m0_0 // Load the value of `p` - * r1_3 = Constant[5] - * m1_4 = Store r1_2, r1_3 // Store to `*p` - * m1_5 = ^Chi m0_1, m1_4 // Side effect of the previous Store on aliased memory - * r1_6 = VariableAddress[x] - * r1_7 = VariableAddress[q] - * r1_8 = Load r1_7, m0_2 // Load the value of `q` - * r1_9 = Load r1_8, m1_5 // Load the value of `*q` - * m1_10 = Store r1_6, r1_9 // Store to x - * ``` - * - * Note the `Chi` instruction after the store to `*p`. The indicates that the previous contents of - * aliased memory (`m0_1`) are merged with the new value written by the store (`m1_4`), producing a - * new version of aliased memory (`m1_5`). On the subsequent load from `*q`, the source operand of - * `*q` is `m1_5`, indicating that the store to `*p` may (or may not) have updated the memory - * pointed to by `q`. - * - * For more information about how `Chi` instructions are used to model memory side effects, see - * https://link.springer.com/content/pdf/10.1007%2F3-540-61053-7_66.pdf. - */ -class ChiInstruction extends Instruction { - ChiInstruction() { this.getOpcode() instanceof Opcode::Chi } - - /** - * Gets the operand that represents the previous state of all memory that might be aliased by the - * memory write. - */ - final ChiTotalOperand getTotalOperand() { result = this.getAnOperand() } - - /** - * Gets the operand that represents the previous state of all memory that might be aliased by the - * memory write. - */ - final Instruction getTotal() { result = this.getTotalOperand().getDef() } - - /** - * Gets the operand that represents the new value written by the memory write. - */ - final ChiPartialOperand getPartialOperand() { result = this.getAnOperand() } - - /** - * Gets the operand that represents the new value written by the memory write. - */ - final Instruction getPartial() { result = this.getPartialOperand().getDef() } - - /** - * Holds if the `ChiPartialOperand` totally, but not exactly, overlaps with the `ChiTotalOperand`. - * This means that the `ChiPartialOperand` will not override the entire memory associated with the - * `ChiTotalOperand`. - */ - final predicate isPartialUpdate() { Construction::chiOnlyPartiallyUpdatesLocation(this) } -} - -/** - * An instruction representing unreachable code. - * - * This instruction is inserted in place of the original target instruction of a `ConditionalBranch` - * or `Switch` instruction where that particular edge is infeasible. - */ -class UnreachedInstruction extends Instruction { - UnreachedInstruction() { this.getOpcode() instanceof Opcode::Unreached } -} - -/** - * An instruction representing a built-in operation. - * - * This is used to represent a variety of intrinsic operations provided by the compiler - * implementation, such as vector arithmetic. - */ -class BuiltInOperationInstruction extends Instruction { - Language::BuiltInOperation operation; - - BuiltInOperationInstruction() { - this.getOpcode() instanceof BuiltInOperationOpcode and - operation = Raw::getInstructionBuiltInOperation(this) - } - - /** - * Gets the language-specific `BuiltInOperation` object that specifies the operation that is - * performed by this instruction. - */ - final Language::BuiltInOperation getBuiltInOperation() { result = operation } -} - -/** - * An instruction representing a built-in operation that does not have a specific opcode. The - * actual operation is specified by the `getBuiltInOperation()` predicate. - */ -class BuiltInInstruction extends BuiltInOperationInstruction { - BuiltInInstruction() { this.getOpcode() instanceof Opcode::BuiltIn } - - final override string getImmediateString() { result = this.getBuiltInOperation().toString() } -} - -/** - * An instruction that returns a `va_list` to access the arguments passed to the `...` parameter. - * - * The operand specifies the address of the `IREllipsisVariable` used to represent the `...` - * parameter. The result is a `va_list` that initially refers to the first argument that was passed - * to the `...` parameter. - */ -class VarArgsStartInstruction extends UnaryInstruction { - VarArgsStartInstruction() { this.getOpcode() instanceof Opcode::VarArgsStart } -} - -/** - * An instruction that cleans up a `va_list` after it is no longer in use. - * - * The operand specifies the address of the `va_list` to clean up. This instruction does not return - * a result. - */ -class VarArgsEndInstruction extends UnaryInstruction { - VarArgsEndInstruction() { this.getOpcode() instanceof Opcode::VarArgsEnd } -} - -/** - * An instruction that returns the address of the argument currently pointed to by a `va_list`. - * - * The operand is the `va_list` that points to the argument. The result is the address of the - * argument. - */ -class VarArgInstruction extends UnaryInstruction { - VarArgInstruction() { this.getOpcode() instanceof Opcode::VarArg } -} - -/** - * An instruction that modifies a `va_list` to point to the next argument that was passed to the - * `...` parameter. - * - * The operand is the current `va_list`. The result is an updated `va_list` that points to the next - * argument of the `...` parameter. - */ -class NextVarArgInstruction extends UnaryInstruction { - NextVarArgInstruction() { this.getOpcode() instanceof Opcode::NextVarArg } -} - -/** - * An instruction that allocates a new object on the managed heap. - * - * This instruction is used to represent the allocation of a new object in C# using the `new` - * expression. This instruction does not invoke a constructor for the object. Instead, there will be - * a subsequent `Call` instruction to invoke the appropriate constructor directory, passing the - * result of the `NewObj` as the `this` argument. - * - * The result is the address of the newly allocated object. - */ -class NewObjInstruction extends Instruction { - NewObjInstruction() { this.getOpcode() instanceof Opcode::NewObj } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/Operand.qll b/csharp/ql/src/experimental/ir/implementation/raw/Operand.qll deleted file mode 100644 index c1743acdbae..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/Operand.qll +++ /dev/null @@ -1,499 +0,0 @@ -/** - * Provides classes that represent the input values of IR instructions. - */ - -private import internal.IRInternal -private import Instruction -private import IRBlock -private import internal.OperandImports as Imports -private import Imports::MemoryAccessKind -private import Imports::IRType -private import Imports::Overlap -private import Imports::OperandTag -private import Imports::TOperand -private import internal.OperandInternal - -/** - * An operand of an `Instruction` in this stage of the IR. Implemented as a union of the branches - * of `TOperand` that are used in this stage. - */ -private class TStageOperand = - TRegisterOperand or TNonSsaMemoryOperand or TPhiOperand or TChiOperand; - -/** - * A known location. Testing `loc instanceof KnownLocation` will account for non existing locations, as - * opposed to testing `not loc isntanceof UnknownLocation` - */ -private class KnownLocation extends Language::Location { - KnownLocation() { not this instanceof Language::UnknownLocation } -} - -/** - * An operand of an `Instruction`. The operand represents a use of the result of one instruction - * (the defining instruction) in another instruction (the use instruction) - */ -class Operand extends TStageOperand { - cached - Operand() { - // Ensure that the operand does not refer to instructions from earlier stages that are unreachable here - exists(Instruction use, Instruction def | this = registerOperand(use, _, def)) - or - exists(Instruction use | this = nonSsaMemoryOperand(use, _)) - or - exists(Instruction use, Instruction def, IRBlock predecessorBlock | - this = phiOperand(use, def, predecessorBlock, _) or - this = reusedPhiOperand(use, def, predecessorBlock, _) - ) - or - this = chiOperand(_, _) - } - - /** Gets a textual representation of this element. */ - string toString() { result = "Operand" } - - /** - * Gets the location of the source code for this operand. - * By default this is where the operand is used, but some subclasses may override this - * using `getAnyDef()` if it makes more sense. - */ - Language::Location getLocation() { result = this.getUse().getLocation() } - - /** - * Gets the function that contains this operand. - */ - final IRFunction getEnclosingIRFunction() { result = this.getUse().getEnclosingIRFunction() } - - /** - * Gets the `Instruction` that consumes this operand. - */ - Instruction getUse() { none() } - - /** - * Gets the `Instruction` whose result is the value of the operand. Unlike - * `getDef`, this also has a result when `isDefinitionInexact` holds, which - * means that the resulting instruction may only _partially_ or _potentially_ - * be the value of this operand. - */ - Instruction getAnyDef() { none() } - - /** - * Gets the `Instruction` whose result is the value of the operand. Unlike - * `getAnyDef`, this also has no result when `isDefinitionInexact` holds, - * which means that the resulting instruction must always be exactly the be - * the value of this operand. - */ - final Instruction getDef() { - result = this.getAnyDef() and - this.getDefinitionOverlap() instanceof MustExactlyOverlap - } - - /** - * Gets the overlap relationship between the operand's definition and its use. - */ - Overlap getDefinitionOverlap() { none() } - - /** - * Holds if the result of the definition instruction does not exactly overlap this use. - */ - final predicate isDefinitionInexact() { - not this.getDefinitionOverlap() instanceof MustExactlyOverlap - } - - /** - * Gets a prefix to use when dumping the operand in an operand list. - */ - string getDumpLabel() { result = "" } - - /** - * Gets a string that uniquely identifies this operand on its use instruction. - */ - string getDumpId() { result = "" } - - /** - * Gets a string describing this operand, suitable for display in IR dumps. This consists of the - * result ID of the instruction consumed by the operand, plus a label identifying the operand - * kind. - * - * For example: `this:r3_5` - */ - final string getDumpString() { - result = this.getDumpLabel() + this.getInexactSpecifier() + this.getDefinitionId() - } - - /** - * Gets a string containing the identifier of the definition of this use, or `m?` if the - * definition is not modeled in SSA. - */ - private string getDefinitionId() { - result = this.getAnyDef().getResultId() - or - not exists(this.getAnyDef()) and result = "m?" - } - - /** - * Gets a string prefix to prepend to the operand's definition ID in an IR dump, specifying whether the operand is - * an exact or inexact use of its definition. For an inexact use, the prefix is "~". For an exact use, the prefix is - * the empty string. - */ - private string getInexactSpecifier() { - if this.isDefinitionInexact() then result = "~" else result = "" - } - - /** - * Get the order in which the operand should be sorted in the operand list. - */ - int getDumpSortOrder() { result = -1 } - - /** - * Gets the type of the value consumed by this operand. This is usually the same as the - * result type of the definition instruction consumed by this operand. For register operands, - * this is always the case. For some memory operands, the operand type may be different from - * the definition type, such as in the case of a partial read or a read from a pointer that - * has been cast to a different type. - */ - Language::LanguageType getLanguageType() { result = this.getAnyDef().getResultLanguageType() } - - /** - * Gets the language-neutral type of the value consumed by this operand. This is usually the same - * as the result type of the definition instruction consumed by this operand. For register - * operands, this is always the case. For some memory operands, the operand type may be different - * from the definition type, such as in the case of a partial read or a read from a pointer that - * has been cast to a different type. - */ - final IRType getIRType() { result = this.getLanguageType().getIRType() } - - /** - * Gets the type of the value consumed by this operand. This is usually the same as the - * result type of the definition instruction consumed by this operand. For register operands, - * this is always the case. For some memory operands, the operand type may be different from - * the definition type, such as in the case of a partial read or a read from a pointer that - * has been cast to a different type. - */ - final Language::Type getType() { this.getLanguageType().hasType(result, _) } - - /** - * Holds if the value consumed by this operand is a glvalue. If this - * holds, the value of the operand represents the address of a location, - * and the type of the location is given by `getType()`. If this does - * not hold, the value of the operand represents a value whose type is - * given by `getType()`. - */ - final predicate isGLValue() { this.getLanguageType().hasType(_, true) } - - /** - * Gets the size of the value consumed by this operand, in bytes. If the operand does not have - * a known constant size, this predicate does not hold. - */ - final int getSize() { result = this.getLanguageType().getByteSize() } -} - -/** - * An operand that consumes a memory result (e.g. the `LoadOperand` on a `Load` instruction). - */ -class MemoryOperand extends Operand { - cached - MemoryOperand() { - this instanceof TNonSsaMemoryOperand or - this instanceof TPhiOperand or - this instanceof TChiOperand - } - - /** - * Gets the kind of memory access performed by the operand. - */ - MemoryAccessKind getMemoryAccess() { result = this.getUse().getOpcode().getReadMemoryAccess() } - - /** - * Holds if the memory access performed by this operand will not always read from every bit in the - * memory location. This is most commonly used for memory accesses that may or may not actually - * occur depending on runtime state (for example, the write side effect of an output parameter - * that is not written to on all paths), or for accesses where the memory location is a - * conservative estimate of the memory that might actually be accessed at runtime (for example, - * the global side effects of a function call). - */ - predicate hasMayReadMemoryAccess() { this.getUse().getOpcode().hasMayReadMemoryAccess() } - - /** - * Returns the operand that holds the memory address from which the current operand loads its - * value, if any. For example, in `r3 = Load r1, m2`, the result of `getAddressOperand()` for `m2` - * is `r1`. - */ - final AddressOperand getAddressOperand() { - this.getMemoryAccess().usesAddressOperand() and - result.getUse() = this.getUse() - } -} - -/** - * An operand that is not an operand of a `PhiInstruction`. - */ -class NonPhiOperand extends Operand { - Instruction useInstr; - OperandTag tag; - - NonPhiOperand() { - this = registerOperand(useInstr, tag, _) or - this = nonSsaMemoryOperand(useInstr, tag) or - this = chiOperand(useInstr, tag) - } - - final override Instruction getUse() { result = useInstr } - - final override string getDumpLabel() { result = tag.getLabel() } - - final override string getDumpId() { result = tag.getId() } - - final override int getDumpSortOrder() { result = tag.getSortOrder() } - - /** - * Gets the `OperandTag` that specifies how this operand is used by its `Instruction`. - */ - final OperandTag getOperandTag() { result = tag } -} - -/** - * An operand that consumes a register (non-memory) result. - */ -class RegisterOperand extends NonPhiOperand, TRegisterOperand { - override RegisterOperandTag tag; - Instruction defInstr; - - cached - RegisterOperand() { this = registerOperand(useInstr, tag, defInstr) } - - final override string toString() { result = tag.toString() } - - // most `RegisterOperands` have a more meaningful location at the definition - // the only exception are specific cases of `ThisArgumentOperand` - override Language::Location getLocation() { result = this.getAnyDef().getLocation() } - - final override Instruction getAnyDef() { result = defInstr } - - final override Overlap getDefinitionOverlap() { - // All register results overlap exactly with their uses. - result instanceof MustExactlyOverlap - } -} - -/** - * A memory operand other than the operand of a `Phi` instruction. - */ -class NonPhiMemoryOperand extends NonPhiOperand, MemoryOperand, TNonPhiMemoryOperand { - override MemoryOperandTag tag; - - cached - NonPhiMemoryOperand() { - this = nonSsaMemoryOperand(useInstr, tag) - or - this = chiOperand(useInstr, tag) - } - - final override string toString() { result = tag.toString() } - - final override Instruction getAnyDef() { - result = unique(Instruction defInstr | this.hasDefinition(defInstr, _)) - } - - final override Overlap getDefinitionOverlap() { this.hasDefinition(_, result) } - - pragma[noinline] - private predicate hasDefinition(Instruction defInstr, Overlap overlap) { - defInstr = Construction::getMemoryOperandDefinition(useInstr, tag, overlap) and - not Construction::isInCycle(useInstr) and - strictcount(Construction::getMemoryOperandDefinition(useInstr, tag, _)) = 1 - } - - /** - * Holds if the operand totally overlaps with its definition and consumes the - * bit range `[startBitOffset, endBitOffset)` relative to the start address of the definition. - */ - predicate getUsedInterval(int startBitOffset, int endBitOffset) { - Construction::getUsedInterval(this, startBitOffset, endBitOffset) - } -} - -/** - * A memory operand whose type may be different from the type of the result of its definition. - */ -class TypedOperand extends NonPhiMemoryOperand { - override TypedOperandTag tag; - - final override Language::LanguageType getLanguageType() { - result = Construction::getInstructionOperandType(useInstr, tag) - } -} - -/** - * The address operand of an instruction that loads or stores a value from - * memory (e.g. `Load`, `Store`). - */ -class AddressOperand extends RegisterOperand { - override AddressOperandTag tag; -} - -/** - * The buffer size operand of an instruction that represents a read or write of - * a buffer. - */ -class BufferSizeOperand extends RegisterOperand { - override BufferSizeOperandTag tag; -} - -/** - * The source value operand of an instruction that loads a value from memory (e.g. `Load`, - * `ReturnValue`, `ThrowValue`). - */ -class LoadOperand extends TypedOperand { - override LoadOperandTag tag; -} - -/** - * The source value operand of a `Store` instruction. - */ -class StoreValueOperand extends RegisterOperand { - override StoreValueOperandTag tag; -} - -/** - * The sole operand of a unary instruction (e.g. `Convert`, `Negate`, `Copy`). - */ -class UnaryOperand extends RegisterOperand { - override UnaryOperandTag tag; -} - -/** - * The left operand of a binary instruction (e.g. `Add`, `CompareEQ`). - */ -class LeftOperand extends RegisterOperand { - override LeftOperandTag tag; -} - -/** - * The right operand of a binary instruction (e.g. `Add`, `CompareEQ`). - */ -class RightOperand extends RegisterOperand { - override RightOperandTag tag; -} - -/** - * The condition operand of a `ConditionalBranch` or `Switch` instruction. - */ -class ConditionOperand extends RegisterOperand { - override ConditionOperandTag tag; -} - -/** - * The operand representing the target function of an `Call` instruction. - */ -class CallTargetOperand extends RegisterOperand { - override CallTargetOperandTag tag; -} - -/** - * An operand representing an argument to a function call. This includes both - * positional arguments (represented by `PositionalArgumentOperand`) and the - * implicit `this` argument, if any (represented by `ThisArgumentOperand`). - */ -class ArgumentOperand extends RegisterOperand { - override ArgumentOperandTag tag; - - /** Gets the `CallInstruction` for which this is an argument. */ - CallInstruction getCall() { result.getAnArgumentOperand() = this } -} - -/** - * An operand representing the implicit `this` argument to a member function - * call. - */ -class ThisArgumentOperand extends ArgumentOperand { - override ThisArgumentOperandTag tag; - - // in most cases the def location makes more sense, but in some corner cases it - // has an unknown location: in those cases we fall back to the use location - override Language::Location getLocation() { - if this.getAnyDef().getLocation() instanceof KnownLocation - then result = this.getAnyDef().getLocation() - else result = this.getUse().getLocation() - } -} - -/** - * An operand representing an argument to a function call. - */ -class PositionalArgumentOperand extends ArgumentOperand { - override PositionalArgumentOperandTag tag; - - /** - * Gets the zero-based index of the argument. - */ - final int getIndex() { result = tag.getArgIndex() } -} - -/** - * An operand representing memory read as a side effect of evaluating another instruction. - */ -class SideEffectOperand extends TypedOperand { - override SideEffectOperandTag tag; -} - -/** - * An operand of a `PhiInstruction`. - */ -class PhiInputOperand extends MemoryOperand, TPhiOperand { - PhiInstruction useInstr; - Instruction defInstr; - IRBlock predecessorBlock; - Overlap overlap; - - cached - PhiInputOperand() { - this = phiOperand(useInstr, defInstr, predecessorBlock, overlap) - or - this = reusedPhiOperand(useInstr, defInstr, predecessorBlock, overlap) - } - - override string toString() { result = "Phi" } - - final override PhiInstruction getUse() { result = useInstr } - - final override Instruction getAnyDef() { result = defInstr } - - final override Overlap getDefinitionOverlap() { result = overlap } - - final override int getDumpSortOrder() { - result = 11 + this.getPredecessorBlock().getDisplayIndex() - } - - final override string getDumpLabel() { - result = "from " + this.getPredecessorBlock().getDisplayIndex().toString() + ":" - } - - final override string getDumpId() { - result = this.getPredecessorBlock().getDisplayIndex().toString() - } - - /** - * Gets the predecessor block from which this value comes. - */ - final IRBlock getPredecessorBlock() { result = predecessorBlock } - - final override MemoryAccessKind getMemoryAccess() { result instanceof PhiMemoryAccess } -} - -/** - * The total operand of a Chi node, representing the previous value of the memory. - */ -class ChiTotalOperand extends NonPhiMemoryOperand { - override ChiTotalOperandTag tag; - - final override MemoryAccessKind getMemoryAccess() { result instanceof ChiTotalMemoryAccess } -} - -/** - * The partial operand of a Chi node, representing the value being written to part of the memory. - */ -class ChiPartialOperand extends NonPhiMemoryOperand { - override ChiPartialOperandTag tag; - - final override MemoryAccessKind getMemoryAccess() { result instanceof ChiPartialMemoryAccess } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/PrintIR.ql b/csharp/ql/src/experimental/ir/implementation/raw/PrintIR.ql deleted file mode 100644 index ac77496f283..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/PrintIR.ql +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @name Print Raw IR - * @description Outputs a representation of the Raw IR graph - * @id cs/print-raw-ir - * @kind graph - */ - -import PrintIR diff --git a/csharp/ql/src/experimental/ir/implementation/raw/PrintIR.qll b/csharp/ql/src/experimental/ir/implementation/raw/PrintIR.qll deleted file mode 100644 index c4b18d9cb61..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/PrintIR.qll +++ /dev/null @@ -1,342 +0,0 @@ -/** - * Outputs a representation of the IR as a control flow graph. - * - * This file contains the actual implementation of `PrintIR.ql`. For test cases and very small - * databases, `PrintIR.ql` can be run directly to dump the IR for the entire database. For most - * uses, however, it is better to write a query that imports `PrintIR.qll`, extends - * `PrintIRConfiguration`, and overrides `shouldPrintDeclaration()` to select a subset of declarations - * to dump. - */ - -private import internal.IRInternal -private import IR -private import internal.PrintIRImports as Imports -import Imports::IRConfiguration - -private newtype TPrintIRConfiguration = MkPrintIRConfiguration() - -/** - * The query can extend this class to control which declarations are printed. - */ -class PrintIRConfiguration extends TPrintIRConfiguration { - /** Gets a textual representation of this configuration. */ - string toString() { result = "PrintIRConfiguration" } - - /** - * Holds if the IR for `func` should be printed. By default, holds for all - * functions, global and namespace variables, and static local variables. - */ - predicate shouldPrintDeclaration(Language::Declaration decl) { any() } -} - -/** - * Override of `IRConfiguration` to only evaluate debug strings for the functions that are to be dumped. - */ -private class FilteredIRConfiguration extends IRConfiguration { - override predicate shouldEvaluateDebugStringsForFunction(Language::Declaration func) { - shouldPrintDeclaration(func) - } -} - -private predicate shouldPrintDeclaration(Language::Declaration decl) { - exists(PrintIRConfiguration config | config.shouldPrintDeclaration(decl)) -} - -private predicate shouldPrintInstruction(Instruction i) { - exists(IRPropertyProvider provider | provider.shouldPrintInstruction(i)) -} - -private predicate shouldPrintOperand(Operand operand) { - exists(IRPropertyProvider provider | provider.shouldPrintOperand(operand)) -} - -private string getAdditionalInstructionProperty(Instruction instr, string key) { - exists(IRPropertyProvider provider | result = provider.getInstructionProperty(instr, key)) -} - -private string getAdditionalBlockProperty(IRBlock block, string key) { - exists(IRPropertyProvider provider | result = provider.getBlockProperty(block, key)) -} - -/** - * Gets the properties of an operand from any active property providers. - */ -private string getAdditionalOperandProperty(Operand operand, string key) { - exists(IRPropertyProvider provider | result = provider.getOperandProperty(operand, key)) -} - -/** - * Gets a string listing the properties of the operand and their corresponding values. If the - * operand has no properties, this predicate has no result. - */ -private string getOperandPropertyListString(Operand operand) { - result = - strictconcat(string key, string value | - value = getAdditionalOperandProperty(operand, key) - | - key + ":" + value, ", " - ) -} - -/** - * Gets a string listing the properties of the operand and their corresponding values. The list is - * surrounded by curly braces. If the operand has no properties, this predicate returns an empty - * string. - */ -private string getOperandPropertyString(Operand operand) { - result = "{" + getOperandPropertyListString(operand) + "}" - or - not exists(getOperandPropertyListString(operand)) and result = "" -} - -private newtype TPrintableIRNode = - TPrintableIRFunction(IRFunction irFunc) { shouldPrintDeclaration(irFunc.getFunction()) } or - TPrintableIRBlock(IRBlock block) { shouldPrintDeclaration(block.getEnclosingFunction()) } or - TPrintableInstruction(Instruction instr) { - shouldPrintInstruction(instr) and shouldPrintDeclaration(instr.getEnclosingFunction()) - } - -/** - * A node to be emitted in the IR graph. - */ -abstract private class PrintableIRNode extends TPrintableIRNode { - abstract string toString(); - - /** - * Gets the location to be emitted for the node. - */ - abstract Language::Location getLocation(); - - /** - * Gets the label to be emitted for the node. - */ - abstract string getLabel(); - - /** - * Gets the order in which the node appears in its parent node. - */ - abstract int getOrder(); - - /** - * Gets the parent of this node. - */ - abstract PrintableIRNode getParent(); - - /** - * Gets the kind of graph represented by this node ("graph" or "tree"). - */ - string getGraphKind() { none() } - - /** - * Holds if this node should always be rendered as text, even in a graphical - * viewer. - */ - predicate forceText() { none() } - - /** - * Gets the value of the node property with the specified key. - */ - string getProperty(string key) { - key = "semmle.label" and result = this.getLabel() - or - key = "semmle.order" and result = this.getOrder().toString() - or - key = "semmle.graphKind" and result = this.getGraphKind() - or - key = "semmle.forceText" and this.forceText() and result = "true" - } -} - -/** - * An IR graph node representing a `IRFunction` object. - */ -private class PrintableIRFunction extends PrintableIRNode, TPrintableIRFunction { - IRFunction irFunc; - - PrintableIRFunction() { this = TPrintableIRFunction(irFunc) } - - override string toString() { result = irFunc.toString() } - - override Language::Location getLocation() { result = irFunc.getLocation() } - - override string getLabel() { - result = Imports::LanguageDebug::getIdentityString(irFunc.getFunction()) - } - - override int getOrder() { - this = - rank[result + 1](PrintableIRFunction orderedFunc, Language::Location location | - location = orderedFunc.getIRFunction().getLocation() - | - orderedFunc - order by - location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), - orderedFunc.getLabel() - ) - } - - final override PrintableIRNode getParent() { none() } - - final IRFunction getIRFunction() { result = irFunc } -} - -/** - * An IR graph node representing an `IRBlock` object. - */ -private class PrintableIRBlock extends PrintableIRNode, TPrintableIRBlock { - IRBlock block; - - PrintableIRBlock() { this = TPrintableIRBlock(block) } - - override string toString() { result = this.getLabel() } - - override Language::Location getLocation() { result = block.getLocation() } - - override string getLabel() { result = "Block " + block.getDisplayIndex().toString() } - - override int getOrder() { result = block.getDisplayIndex() } - - final override string getGraphKind() { result = "tree" } - - final override predicate forceText() { any() } - - final override PrintableIRFunction getParent() { - result.getIRFunction() = block.getEnclosingIRFunction() - } - - override string getProperty(string key) { - result = PrintableIRNode.super.getProperty(key) or - result = getAdditionalBlockProperty(block, key) - } - - final IRBlock getBlock() { result = block } -} - -/** - * An IR graph node representing an `Instruction`. - */ -private class PrintableInstruction extends PrintableIRNode, TPrintableInstruction { - Instruction instr; - - PrintableInstruction() { this = TPrintableInstruction(instr) } - - override string toString() { result = instr.toString() } - - override Language::Location getLocation() { result = instr.getLocation() } - - override string getLabel() { - exists(IRBlock block | - instr = block.getAnInstruction() and - exists( - string resultString, string operationString, string operandsString, int resultWidth, - int operationWidth - | - resultString = instr.getResultString() and - operationString = instr.getOperationString() and - operandsString = this.getOperandsString() and - columnWidths(block, resultWidth, operationWidth) and - result = - resultString + getPaddingString(resultWidth - resultString.length()) + " = " + - operationString + getPaddingString(operationWidth - operationString.length()) + " : " + - operandsString - ) - ) - } - - override int getOrder() { result = instr.getDisplayIndexInBlock() } - - final override PrintableIRBlock getParent() { result.getBlock() = instr.getBlock() } - - final Instruction getInstruction() { result = instr } - - override string getProperty(string key) { - result = PrintableIRNode.super.getProperty(key) or - result = getAdditionalInstructionProperty(instr, key) - } - - /** - * Gets the string representation of the operand list. This is the same as - * `Instruction::getOperandsString()`, except that each operand is annotated with any properties - * provided by active `IRPropertyProvider` instances. - */ - private string getOperandsString() { - result = - concat(Operand operand | - operand = instr.getAnOperand() and - shouldPrintOperand(operand) - | - operand.getDumpString() + getOperandPropertyString(operand), ", " - order by - operand.getDumpSortOrder() - ) - } -} - -private predicate columnWidths(IRBlock block, int resultWidth, int operationWidth) { - resultWidth = max(Instruction instr | instr.getBlock() = block | instr.getResultString().length()) and - operationWidth = - max(Instruction instr | instr.getBlock() = block | instr.getOperationString().length()) -} - -private int maxColumnWidth() { - result = - max(Instruction instr, int width | - width = instr.getResultString().length() or - width = instr.getOperationString().length() or - width = instr.getOperandsString().length() - | - width - ) -} - -private string getPaddingString(int n) { - n = 0 and result = "" - or - n > 0 and n <= maxColumnWidth() and result = getPaddingString(n - 1) + " " -} - -/** - * Holds if `node` belongs to the output graph, and its property `key` has the given `value`. - */ -query predicate nodes(PrintableIRNode node, string key, string value) { - value = node.getProperty(key) -} - -private int getSuccessorIndex(IRBlock pred, IRBlock succ) { - succ = - rank[result + 1](IRBlock aSucc, EdgeKind kind | - aSucc = pred.getSuccessor(kind) - | - aSucc order by kind.toString() - ) -} - -/** - * Holds if the output graph contains an edge from `pred` to `succ`, and that edge's property `key` - * has the given `value`. - */ -query predicate edges(PrintableIRBlock pred, PrintableIRBlock succ, string key, string value) { - exists(EdgeKind kind, IRBlock predBlock, IRBlock succBlock | - predBlock = pred.getBlock() and - succBlock = succ.getBlock() and - predBlock.getSuccessor(kind) = succBlock and - ( - ( - key = "semmle.label" and - if predBlock.getBackEdgeSuccessor(kind) = succBlock - then value = kind.toString() + " (back edge)" - else value = kind.toString() - ) - or - key = "semmle.order" and - value = getSuccessorIndex(predBlock, succBlock).toString() - ) - ) -} - -/** - * Holds if `parent` is the parent node of `child` in the output graph. - */ -query predicate parents(PrintableIRNode child, PrintableIRNode parent) { - parent = child.getParent() -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/constant/ConstantAnalysis.qll b/csharp/ql/src/experimental/ir/implementation/raw/constant/ConstantAnalysis.qll deleted file mode 100644 index aac2e679a97..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/constant/ConstantAnalysis.qll +++ /dev/null @@ -1,62 +0,0 @@ -private import internal.ConstantAnalysisInternal -private import experimental.ir.internal.IntegerPartial -private import IR - -language[monotonicAggregates] -int getConstantValue(Instruction instr) { - result = instr.(IntegerConstantInstruction).getValue().toInt() - or - result = getBinaryInstructionValue(instr) - or - result = neg(getConstantValue(instr.(NegateInstruction).getUnary())) - or - result = getConstantValue(instr.(CopyInstruction).getSourceValue()) - or - exists(PhiInstruction phi | - phi = instr and - result = max(Instruction def | def = phi.getAnInput() | getConstantValueToPhi(def)) and - result = min(Instruction def | def = phi.getAnInput() | getConstantValueToPhi(def)) - ) -} - -pragma[noinline] -int getConstantValueToPhi(Instruction def) { - exists(PhiInstruction phi | - result = getConstantValue(def) and - def = phi.getAnInput() - ) -} - -pragma[noinline] -private predicate binaryInstructionOperands(BinaryInstruction instr, int left, int right) { - left = getConstantValue(instr.getLeft()) and - right = getConstantValue(instr.getRight()) -} - -pragma[noinline] -private int getBinaryInstructionValue(BinaryInstruction instr) { - exists(int left, int right | - binaryInstructionOperands(instr, left, right) and - ( - instr instanceof AddInstruction and result = add(left, right) - or - instr instanceof SubInstruction and result = sub(left, right) - or - instr instanceof MulInstruction and result = mul(left, right) - or - instr instanceof DivInstruction and result = div(left, right) - or - instr instanceof CompareEQInstruction and result = compareEQ(left, right) - or - instr instanceof CompareNEInstruction and result = compareNE(left, right) - or - instr instanceof CompareLTInstruction and result = compareLT(left, right) - or - instr instanceof CompareGTInstruction and result = compareGT(left, right) - or - instr instanceof CompareLEInstruction and result = compareLE(left, right) - or - instr instanceof CompareGEInstruction and result = compareGE(left, right) - ) - ) -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/constant/PrintConstantAnalysis.qll b/csharp/ql/src/experimental/ir/implementation/raw/constant/PrintConstantAnalysis.qll deleted file mode 100644 index 53f9295be4f..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/constant/PrintConstantAnalysis.qll +++ /dev/null @@ -1,11 +0,0 @@ -private import internal.ConstantAnalysisInternal -private import experimental.ir.internal.IntegerConstant -private import ConstantAnalysis -import IR - -private class ConstantAnalysisPropertyProvider extends IRPropertyProvider { - override string getInstructionProperty(Instruction instr, string key) { - key = "ConstantValue" and - result = getValue(getConstantValue(instr)).toString() - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/constant/internal/ConstantAnalysisInternal.qll b/csharp/ql/src/experimental/ir/implementation/raw/constant/internal/ConstantAnalysisInternal.qll deleted file mode 100644 index 6e2340af7ea..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/constant/internal/ConstantAnalysisInternal.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.implementation.raw.IR as IR diff --git a/csharp/ql/src/experimental/ir/implementation/raw/gvn/PrintValueNumbering.qll b/csharp/ql/src/experimental/ir/implementation/raw/gvn/PrintValueNumbering.qll deleted file mode 100644 index a7fb1b3c07e..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/gvn/PrintValueNumbering.qll +++ /dev/null @@ -1,17 +0,0 @@ -private import internal.ValueNumberingImports -private import ValueNumbering - -/** - * Provides additional information about value numbering in IR dumps. - */ -class ValueNumberPropertyProvider extends IRPropertyProvider { - override string getInstructionProperty(Instruction instr, string key) { - exists(ValueNumber vn | - vn = valueNumber(instr) and - key = "valnum" and - if strictcount(vn.getAnInstruction()) > 1 - then result = vn.getDebugString() - else result = "unique" - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/gvn/ValueNumbering.qll b/csharp/ql/src/experimental/ir/implementation/raw/gvn/ValueNumbering.qll deleted file mode 100644 index 2a46e16c52f..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/gvn/ValueNumbering.qll +++ /dev/null @@ -1,90 +0,0 @@ -private import internal.ValueNumberingInternal -private import internal.ValueNumberingImports - -/** - * The value number assigned to a particular set of instructions that produce equivalent results. - */ -class ValueNumber extends TValueNumber { - final string toString() { result = "GVN" } - - final string getDebugString() { - result = strictconcat(this.getAnInstruction().getResultId(), ", ") - } - - final Language::Location getLocation() { - if - exists(Instruction i | - i = this.getAnInstruction() and not i.getLocation() instanceof Language::UnknownLocation - ) - then - result = - min(Language::Location l | - l = this.getAnInstruction().getLocation() and not l instanceof Language::UnknownLocation - | - l - order by - l.getFile().getAbsolutePath(), l.getStartLine(), l.getStartColumn(), l.getEndLine(), - l.getEndColumn() - ) - else result instanceof Language::UnknownDefaultLocation - } - - /** - * Gets the instructions that have been assigned this value number. This will always produce at - * least one result. - */ - final Instruction getAnInstruction() { this = valueNumber(result) } - - /** - * Gets one of the instructions that was assigned this value number. The chosen instruction is - * deterministic but arbitrary. Intended for use only in debugging. - */ - final Instruction getExampleInstruction() { - result = - min(Instruction instr | - instr = this.getAnInstruction() - | - instr order by instr.getBlock().getDisplayIndex(), instr.getDisplayIndexInBlock() - ) - } - - /** - * Gets an `Operand` whose definition is exact and has this value number. - */ - final Operand getAUse() { this = valueNumber(result.getDef()) } - - final string getKind() { - this instanceof TVariableAddressValueNumber and result = "VariableAddress" - or - this instanceof TInitializeParameterValueNumber and result = "InitializeParameter" - or - this instanceof TConstantValueNumber and result = "Constant" - or - this instanceof TStringConstantValueNumber and result = "StringConstant" - or - this instanceof TFieldAddressValueNumber and result = "FieldAddress" - or - this instanceof TBinaryValueNumber and result = "Binary" - or - this instanceof TPointerArithmeticValueNumber and result = "PointerArithmetic" - or - this instanceof TUnaryValueNumber and result = "Unary" - or - this instanceof TInheritanceConversionValueNumber and result = "InheritanceConversion" - or - this instanceof TLoadTotalOverlapValueNumber and result = "LoadTotalOverlap" - or - this instanceof TUniqueValueNumber and result = "Unique" - } -} - -/** - * Gets the value number assigned to `instr`, if any. Returns at most one result. - */ -ValueNumber valueNumber(Instruction instr) { result = tvalueNumber(instr) } - -/** - * Gets the value number assigned to the exact definition of `op`, if any. - * Returns at most one result. - */ -ValueNumber valueNumberOfOperand(Operand op) { result = tvalueNumberOfOperand(op) } diff --git a/csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingImports.qll b/csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingImports.qll deleted file mode 100644 index 34bd754692d..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingImports.qll +++ /dev/null @@ -1,3 +0,0 @@ -import experimental.ir.internal.Overlap -import experimental.ir.internal.IRCSharpLanguage as Language -import experimental.ir.implementation.unaliased_ssa.IR diff --git a/csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll b/csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll deleted file mode 100644 index ec003891774..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/gvn/internal/ValueNumberingInternal.qll +++ /dev/null @@ -1,356 +0,0 @@ -private import ValueNumberingImports - -newtype TValueNumber = - TVariableAddressValueNumber(IRFunction irFunc, Language::AST ast) { - variableAddressValueNumber(_, irFunc, ast) - } or - TInitializeParameterValueNumber(IRFunction irFunc, Language::AST var) { - initializeParameterValueNumber(_, irFunc, var) - } or - TConstantValueNumber(IRFunction irFunc, IRType type, string value) { - constantValueNumber(_, irFunc, type, value) - } or - TStringConstantValueNumber(IRFunction irFunc, IRType type, string value) { - stringConstantValueNumber(_, irFunc, type, value) - } or - TFieldAddressValueNumber(IRFunction irFunc, Language::Field field, TValueNumber objectAddress) { - fieldAddressValueNumber(_, irFunc, field, objectAddress) - } or - TBinaryValueNumber( - IRFunction irFunc, Opcode opcode, TValueNumber leftOperand, TValueNumber rightOperand - ) { - binaryValueNumber(_, irFunc, opcode, leftOperand, rightOperand) - } or - TPointerArithmeticValueNumber( - IRFunction irFunc, Opcode opcode, int elementSize, TValueNumber leftOperand, - TValueNumber rightOperand - ) { - pointerArithmeticValueNumber(_, irFunc, opcode, elementSize, leftOperand, rightOperand) - } or - TUnaryValueNumber(IRFunction irFunc, Opcode opcode, TValueNumber operand) { - unaryValueNumber(_, irFunc, opcode, operand) - } or - TInheritanceConversionValueNumber( - IRFunction irFunc, Opcode opcode, Language::Class baseClass, Language::Class derivedClass, - TValueNumber operand - ) { - inheritanceConversionValueNumber(_, irFunc, opcode, baseClass, derivedClass, operand) - } or - TLoadTotalOverlapValueNumber( - IRFunction irFunc, IRType type, TValueNumber memOperand, TValueNumber operand - ) { - loadTotalOverlapValueNumber(_, irFunc, type, memOperand, operand) - } or - TUniqueValueNumber(IRFunction irFunc, Instruction instr) { uniqueValueNumber(instr, irFunc) } - -/** - * A `CopyInstruction` whose source operand's value is congruent to the definition of that source - * operand. - * For example: - * ``` - * Point p = { 1, 2 }; - * Point q = p; - * int a = p.x; - * ``` - * The use of `p` on line 2 is linked to the definition of `p` on line 1, and is congruent to that - * definition because it accesses the exact same memory. - * The use of `p.x` on line 3 is linked to the definition of `p` on line 1 as well, but is not - * congruent to that definition because `p.x` accesses only a subset of the memory defined by `p`. - */ -class CongruentCopyInstruction extends CopyInstruction { - CongruentCopyInstruction() { - this.getSourceValueOperand().getDefinitionOverlap() instanceof MustExactlyOverlap - } -} - -class LoadTotalOverlapInstruction extends LoadInstruction { - LoadTotalOverlapInstruction() { - this.getSourceValueOperand().getDefinitionOverlap() instanceof MustTotallyOverlap - } -} - -/** - * Holds if this library knows how to assign a value number to the specified instruction, other than - * a `unique` value number that is never shared by multiple instructions. - */ -private predicate numberableInstruction(Instruction instr) { - instr instanceof VariableAddressInstruction - or - instr instanceof InitializeParameterInstruction - or - instr instanceof ConstantInstruction - or - instr instanceof StringConstantInstruction - or - instr instanceof FieldAddressInstruction - or - instr instanceof BinaryInstruction - or - instr instanceof UnaryInstruction and not instr instanceof CopyInstruction - or - instr instanceof PointerArithmeticInstruction - or - instr instanceof CongruentCopyInstruction - or - instr instanceof LoadTotalOverlapInstruction -} - -private predicate filteredNumberableInstruction(Instruction instr) { - // count rather than strictcount to handle missing AST elements - // separate instanceof and inline casts to avoid failed casts with a count of 0 - instr instanceof VariableAddressInstruction and - count(instr.(VariableAddressInstruction).getIRVariable().getAst()) != 1 - or - instr instanceof ConstantInstruction and - count(instr.getResultIRType()) != 1 - or - instr instanceof FieldAddressInstruction and - count(instr.(FieldAddressInstruction).getField()) != 1 - or - instr instanceof InheritanceConversionInstruction and - ( - count(instr.(InheritanceConversionInstruction).getBaseClass()) != 1 or - count(instr.(InheritanceConversionInstruction).getDerivedClass()) != 1 - ) -} - -private predicate variableAddressValueNumber( - VariableAddressInstruction instr, IRFunction irFunc, Language::AST ast -) { - instr.getEnclosingIRFunction() = irFunc and - // The underlying AST element is used as value-numbering key instead of the - // `IRVariable` to work around a problem where a variable or expression with - // multiple types gives rise to multiple `IRVariable`s. - unique( | | instr.getIRVariable().getAst()) = ast -} - -private predicate initializeParameterValueNumber( - InitializeParameterInstruction instr, IRFunction irFunc, Language::AST var -) { - instr.getEnclosingIRFunction() = irFunc and - // The underlying AST element is used as value-numbering key instead of the - // `IRVariable` to work around a problem where a variable or expression with - // multiple types gives rise to multiple `IRVariable`s. - instr.getIRVariable().getAst() = var -} - -private predicate constantValueNumber( - ConstantInstruction instr, IRFunction irFunc, IRType type, string value -) { - instr.getEnclosingIRFunction() = irFunc and - unique( | | instr.getResultIRType()) = type and - instr.getValue() = value -} - -private predicate stringConstantValueNumber( - StringConstantInstruction instr, IRFunction irFunc, IRType type, string value -) { - instr.getEnclosingIRFunction() = irFunc and - instr.getResultIRType() = type and - instr.getValue().getValue() = value -} - -private predicate fieldAddressValueNumber( - FieldAddressInstruction instr, IRFunction irFunc, Language::Field field, - TValueNumber objectAddress -) { - instr.getEnclosingIRFunction() = irFunc and - unique( | | instr.getField()) = field and - tvalueNumber(instr.getObjectAddress()) = objectAddress -} - -pragma[nomagic] -private predicate binaryValueNumber0( - BinaryInstruction instr, IRFunction irFunc, Opcode opcode, boolean isLeft, - TValueNumber valueNumber -) { - not instr instanceof PointerArithmeticInstruction and - instr.getEnclosingIRFunction() = irFunc and - instr.getOpcode() = opcode and - ( - isLeft = true and - tvalueNumber(instr.getLeft()) = valueNumber - or - isLeft = false and - tvalueNumber(instr.getRight()) = valueNumber - ) -} - -private predicate binaryValueNumber( - BinaryInstruction instr, IRFunction irFunc, Opcode opcode, TValueNumber leftOperand, - TValueNumber rightOperand -) { - binaryValueNumber0(instr, irFunc, opcode, true, leftOperand) and - binaryValueNumber0(instr, irFunc, opcode, false, rightOperand) -} - -pragma[nomagic] -private predicate pointerArithmeticValueNumber0( - PointerArithmeticInstruction instr, IRFunction irFunc, Opcode opcode, int elementSize, - boolean isLeft, TValueNumber valueNumber -) { - instr.getEnclosingIRFunction() = irFunc and - instr.getOpcode() = opcode and - instr.getElementSize() = elementSize and - ( - isLeft = true and - tvalueNumber(instr.getLeft()) = valueNumber - or - isLeft = false and - tvalueNumber(instr.getRight()) = valueNumber - ) -} - -private predicate pointerArithmeticValueNumber( - PointerArithmeticInstruction instr, IRFunction irFunc, Opcode opcode, int elementSize, - TValueNumber leftOperand, TValueNumber rightOperand -) { - pointerArithmeticValueNumber0(instr, irFunc, opcode, elementSize, true, leftOperand) and - pointerArithmeticValueNumber0(instr, irFunc, opcode, elementSize, false, rightOperand) -} - -private predicate unaryValueNumber( - UnaryInstruction instr, IRFunction irFunc, Opcode opcode, TValueNumber operand -) { - instr.getEnclosingIRFunction() = irFunc and - not instr instanceof InheritanceConversionInstruction and - not instr instanceof CopyInstruction and - not instr instanceof FieldAddressInstruction and - instr.getOpcode() = opcode and - tvalueNumber(instr.getUnary()) = operand -} - -private predicate inheritanceConversionValueNumber( - InheritanceConversionInstruction instr, IRFunction irFunc, Opcode opcode, - Language::Class baseClass, Language::Class derivedClass, TValueNumber operand -) { - instr.getEnclosingIRFunction() = irFunc and - instr.getOpcode() = opcode and - tvalueNumber(instr.getUnary()) = operand and - unique( | | instr.getBaseClass()) = baseClass and - unique( | | instr.getDerivedClass()) = derivedClass -} - -pragma[nomagic] -private predicate loadTotalOverlapValueNumber0( - LoadTotalOverlapInstruction instr, IRFunction irFunc, IRType type, TValueNumber valueNumber, - boolean isAddress -) { - instr.getEnclosingIRFunction() = irFunc and - instr.getResultIRType() = type and - ( - isAddress = true and - tvalueNumberOfOperand(instr.getSourceAddressOperand()) = valueNumber - or - isAddress = false and - tvalueNumber(instr.getSourceValueOperand().getAnyDef()) = valueNumber - ) -} - -private predicate loadTotalOverlapValueNumber( - LoadTotalOverlapInstruction instr, IRFunction irFunc, IRType type, TValueNumber memOperand, - TValueNumber operand -) { - loadTotalOverlapValueNumber0(instr, irFunc, type, operand, true) and - loadTotalOverlapValueNumber0(instr, irFunc, type, memOperand, false) -} - -/** - * Holds if `instr` should be assigned a unique value number because this library does not know how - * to determine if two instances of that instruction are equivalent. - */ -private predicate uniqueValueNumber(Instruction instr, IRFunction irFunc) { - instr.getEnclosingIRFunction() = irFunc and - not instr.getResultIRType() instanceof IRVoidType and - ( - not numberableInstruction(instr) - or - filteredNumberableInstruction(instr) - ) -} - -/** - * Gets the value number assigned to `instr`, if any. Returns at most one result. - */ -cached -TValueNumber tvalueNumber(Instruction instr) { - result = nonUniqueValueNumber(instr) - or - exists(IRFunction irFunc | - uniqueValueNumber(instr, irFunc) and - result = TUniqueValueNumber(irFunc, instr) - ) -} - -/** - * Gets the value number assigned to the exact definition of `op`, if any. - * Returns at most one result. - */ -TValueNumber tvalueNumberOfOperand(Operand op) { result = tvalueNumber(op.getDef()) } - -/** - * Gets the value number assigned to `instr`, if any, unless that instruction is assigned a unique - * value number. - */ -private TValueNumber nonUniqueValueNumber(Instruction instr) { - exists(IRFunction irFunc | - irFunc = instr.getEnclosingIRFunction() and - ( - exists(Language::AST ast | - variableAddressValueNumber(instr, irFunc, ast) and - result = TVariableAddressValueNumber(irFunc, ast) - ) - or - exists(Language::AST var | - initializeParameterValueNumber(instr, irFunc, var) and - result = TInitializeParameterValueNumber(irFunc, var) - ) - or - exists(string value, IRType type | - constantValueNumber(instr, irFunc, type, value) and - result = TConstantValueNumber(irFunc, type, value) - ) - or - exists(IRType type, string value | - stringConstantValueNumber(instr, irFunc, type, value) and - result = TStringConstantValueNumber(irFunc, type, value) - ) - or - exists(Language::Field field, TValueNumber objectAddress | - fieldAddressValueNumber(instr, irFunc, field, objectAddress) and - result = TFieldAddressValueNumber(irFunc, field, objectAddress) - ) - or - exists(Opcode opcode, TValueNumber leftOperand, TValueNumber rightOperand | - binaryValueNumber(instr, irFunc, opcode, leftOperand, rightOperand) and - result = TBinaryValueNumber(irFunc, opcode, leftOperand, rightOperand) - ) - or - exists(Opcode opcode, TValueNumber operand | - unaryValueNumber(instr, irFunc, opcode, operand) and - result = TUnaryValueNumber(irFunc, opcode, operand) - ) - or - exists( - Opcode opcode, Language::Class baseClass, Language::Class derivedClass, TValueNumber operand - | - inheritanceConversionValueNumber(instr, irFunc, opcode, baseClass, derivedClass, operand) and - result = TInheritanceConversionValueNumber(irFunc, opcode, baseClass, derivedClass, operand) - ) - or - exists(Opcode opcode, int elementSize, TValueNumber leftOperand, TValueNumber rightOperand | - pointerArithmeticValueNumber(instr, irFunc, opcode, elementSize, leftOperand, rightOperand) and - result = - TPointerArithmeticValueNumber(irFunc, opcode, elementSize, leftOperand, rightOperand) - ) - or - exists(IRType type, TValueNumber memOperand, TValueNumber operand | - loadTotalOverlapValueNumber(instr, irFunc, type, memOperand, operand) and - result = TLoadTotalOverlapValueNumber(irFunc, type, memOperand, operand) - ) - or - // The value number of a copy is just the value number of its source value. - result = tvalueNumber(instr.(CongruentCopyInstruction).getSourceValue()) - ) - ) -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRBlockImports.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/IRBlockImports.qll deleted file mode 100644 index c80761a68cf..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRBlockImports.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.implementation.EdgeKind as EdgeKind diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRConsistencyImports.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/IRConsistencyImports.qll deleted file mode 100644 index f43546fe76d..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRConsistencyImports.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguageDebug as LanguageDebug diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRConstruction.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/IRConstruction.qll deleted file mode 100644 index 5811f2ff946..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRConstruction.qll +++ /dev/null @@ -1,435 +0,0 @@ -import csharp -import experimental.ir.implementation.raw.IR -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.implementation.internal.IRFunctionBase -private import experimental.ir.implementation.internal.TInstruction -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.Overlap -private import experimental.ir.internal.TempVariableTag -private import InstructionTag -private import TranslatedCondition -private import TranslatedElement -private import TranslatedExpr -private import TranslatedStmt -private import desugar.Foreach -private import TranslatedFunction -private import experimental.ir.internal.IRCSharpLanguage as Language - -TranslatedElement getInstructionTranslatedElement(Instruction instruction) { - instruction = TRawInstruction(result, _) -} - -InstructionTag getInstructionTag(Instruction instruction) { - instruction = TRawInstruction(_, result) -} - -pragma[noinline] -private predicate instructionOrigin( - Instruction instruction, TranslatedElement element, InstructionTag tag -) { - element = getInstructionTranslatedElement(instruction) and - tag = getInstructionTag(instruction) -} - -class TStageInstruction = TRawInstruction; - -/** - * Provides the portion of the parameterized IR interface that is used to construct the initial - * "raw" stage of the IR. The other stages of the IR do not expose these predicates. - */ -cached -module Raw { - class InstructionTag1 = TranslatedElement; - - class InstructionTag2 = InstructionTag; - - cached - predicate functionHasIR(Callable callable) { exists(getTranslatedFunction(callable)) } - - cached - predicate varHasIRFunc(Field field) { none() } - - cached - predicate hasInstruction(TranslatedElement element, InstructionTag tag) { - element.hasInstruction(_, tag, _) - } - - cached - predicate hasUserVariable(Callable callable, Variable var, CSharpType type) { - getTranslatedFunction(callable).hasUserVariable(var, type) - } - - cached - predicate hasTempVariable( - Callable callable, Language::AST ast, TempVariableTag tag, CSharpType type - ) { - exists(TranslatedElement element | - element.getAst() = ast and - callable = element.getFunction() and - element.hasTempVariable(tag, type) - ) - } - - cached - predicate hasStringLiteral( - Callable callable, Language::AST ast, CSharpType type, StringLiteral literal - ) { - literal = ast and - literal.getEnclosingCallable() = callable and - getTypeForPRValue(literal.getType()) = type - } - - cached - predicate hasDynamicInitializationFlag(Callable callable, Language::Variable var, CSharpType type) { - none() - } - - cached - Expr getInstructionConvertedResultExpression(Instruction instruction) { - exists(TranslatedExpr translatedExpr | - translatedExpr = getTranslatedExpr(result) and - instruction = translatedExpr.getResult() - ) - } - - cached - Expr getInstructionUnconvertedResultExpression(Instruction instruction) { - exists(Expr converted, TranslatedExpr translatedExpr | result = converted.stripCasts() | - translatedExpr = getTranslatedExpr(converted) and - instruction = translatedExpr.getResult() - ) - } - - cached - IRVariable getInstructionVariable(Instruction instruction) { - exists(TranslatedElement element, InstructionTag tag | - element = getInstructionTranslatedElement(instruction) and - tag = getInstructionTag(instruction) and - ( - result = element.getInstructionVariable(tag) or - result.(IRStringLiteral).getAst() = element.getInstructionStringLiteral(tag) - ) - ) - } - - cached - Field getInstructionField(Instruction instruction) { - exists(TranslatedElement element, InstructionTag tag | - instructionOrigin(instruction, element, tag) and - result = element.getInstructionField(tag) - ) - } - - cached - int getInstructionIndex(Instruction instruction) { none() } - - cached - Callable getInstructionFunction(Instruction instruction) { - result = - getInstructionTranslatedElement(instruction) - .getInstructionFunction(getInstructionTag(instruction)) - } - - cached - string getInstructionConstantValue(Instruction instruction) { - result = - getInstructionTranslatedElement(instruction) - .getInstructionConstantValue(getInstructionTag(instruction)) - } - - cached - CSharpType getInstructionExceptionType(Instruction instruction) { - result = - getInstructionTranslatedElement(instruction) - .getInstructionExceptionType(getInstructionTag(instruction)) - } - - cached - predicate getInstructionInheritance(Instruction instruction, Class baseClass, Class derivedClass) { - getInstructionTranslatedElement(instruction) - .getInstructionInheritance(getInstructionTag(instruction), baseClass, derivedClass) - } - - cached - int getInstructionElementSize(Instruction instruction) { - exists(TranslatedElement element, InstructionTag tag | - instructionOrigin(instruction, element, tag) and - result = element.getInstructionElementSize(tag) - ) - } - - cached - Language::BuiltInOperation getInstructionBuiltInOperation(Instruction instr) { none() } -} - -import Cached - -cached -private module Cached { - cached - predicate getInstructionOpcode(Opcode opcode, TRawInstruction instr) { - exists(TranslatedElement element, InstructionTag tag | - instructionOrigin(instr, element, tag) and - element.hasInstruction(opcode, tag, _) - ) - } - - cached - IRFunctionBase getInstructionEnclosingIRFunction(TRawInstruction instr) { - result.getFunction() = getInstructionTranslatedElement(instr).getFunction() - } - - cached - predicate hasInstruction(TRawInstruction instr) { any() } - - cached - predicate hasModeledMemoryResult(Instruction instruction) { none() } - - cached - predicate hasConflatedMemoryResult(Instruction instruction) { - instruction instanceof AliasedDefinitionInstruction - or - instruction.getOpcode() instanceof Opcode::InitializeNonLocal - } - - cached - Instruction getRegisterOperandDefinition(Instruction instruction, RegisterOperandTag tag) { - result = - getInstructionTranslatedElement(instruction) - .getInstructionOperand(getInstructionTag(instruction), tag) - } - - cached - Instruction getMemoryOperandDefinition( - Instruction instruction, MemoryOperandTag tag, Overlap overlap - ) { - overlap instanceof MustTotallyOverlap and - result = - getInstructionTranslatedElement(instruction) - .getInstructionOperand(getInstructionTag(instruction), tag) - } - - /** Gets a non-phi instruction that defines an operand of `instr`. */ - private Instruction getNonPhiOperandDef(Instruction instr) { - result = getRegisterOperandDefinition(instr, _) - or - result = getMemoryOperandDefinition(instr, _, _) - } - - /** - * Holds if the operand totally overlaps with its definition and consumes the - * bit range `[startBitOffset, endBitOffset)`. - */ - cached - predicate getUsedInterval(Operand operand, int startBit, int endBit) { none() } - - cached - predicate chiOnlyPartiallyUpdatesLocation(ChiInstruction chi) { none() } - - /** - * Holds if `instr` is part of a cycle in the operand graph that doesn't go - * through a phi instruction and therefore should be impossible. - * - * If such cycles are present, either due to a programming error in the IR - * generation or due to a malformed database, it can cause infinite loops in - * analyses that assume a cycle-free graph of non-phi operands. Therefore it's - * better to remove these operands than to leave cycles in the operand graph. - */ - pragma[noopt] - cached - predicate isInCycle(Instruction instr) { - instr instanceof Instruction and - getNonPhiOperandDef+(instr) = instr - } - - cached - CSharpType getInstructionOperandType(Instruction instruction, TypedOperandTag tag) { - // For all `LoadInstruction`s, the operand type of the `LoadOperand` is the same as - // the result type of the load. - if instruction instanceof LoadInstruction - then result = instruction.(LoadInstruction).getResultLanguageType() - else - result = - getInstructionTranslatedElement(instruction) - .getInstructionOperandType(getInstructionTag(instruction), tag) - } - - cached - Instruction getPhiOperandDefinition( - PhiInstruction instruction, IRBlock predecessorBlock, Overlap overlap - ) { - none() - } - - cached - Instruction getPhiInstructionBlockStart(PhiInstruction instr) { none() } - - cached - Instruction getInstructionSuccessor(Instruction instruction, EdgeKind kind) { - result = - getInstructionTranslatedElement(instruction) - .getInstructionSuccessor(getInstructionTag(instruction), kind) - } - - // This predicate has pragma[noopt] because otherwise the `getAChild*` calls - // get joined too early. The join order for the loop cases goes like this: - // - Find all loops of that type (tens of thousands). - // - Find all edges into the start of the loop (x 2). - // - Restrict to edges that originate within the loop (/ 2). - pragma[noopt] - cached - Instruction getInstructionBackEdgeSuccessor(Instruction instruction, EdgeKind kind) { - // While loop: - // Any edge from within the body of the loop to the condition of the loop - // is a back edge. This includes edges from `continue` and the fall-through - // edge(s) after the last instruction(s) in the body. - exists(TranslatedWhileStmt s | - s instanceof TranslatedWhileStmt and - result = s.getFirstConditionInstruction() and - exists(TranslatedElement inBody, InstructionTag tag | - result = inBody.getInstructionSuccessor(tag, kind) and - exists(TranslatedElement body | body = s.getBody() | inBody = body.getAChild*()) and - instruction = inBody.getInstruction(tag) - ) - ) - or - // Compiler generated foreach while loop: - // Same as above - exists(TranslatedForeachWhile s | - result = s.getFirstInstruction() and - exists(TranslatedElement inBody, InstructionTag tag | - result = inBody.getInstructionSuccessor(tag, kind) and - exists(TranslatedElement body | body = s.getBody() | inBody = body.getAChild*()) and - instruction = inBody.getInstruction(tag) - ) - ) - or - // Do-while loop: - // The back edge should be the edge(s) from the condition to the - // body. This ensures that it's the back edge that will be pruned in a `do - // { ... } while (0)` statement. Note that all `continue` statements in a - // do-while loop produce forward edges. - exists(TranslatedDoStmt s | - s instanceof TranslatedDoStmt and - exists(TranslatedStmt body | body = s.getBody() | result = body.getFirstInstruction()) and - exists(TranslatedElement inCondition, InstructionTag tag | - result = inCondition.getInstructionSuccessor(tag, kind) and - exists(TranslatedElement condition | condition = s.getCondition() | - inCondition = condition.getAChild*() - ) and - instruction = inCondition.getInstruction(tag) - ) - ) - or - // For loop: - // Any edge from within the body or update of the loop to the condition of - // the loop is a back edge. When there is no loop update expression, this - // includes edges from `continue` and the fall-through edge(s) after the - // last instruction(s) in the body. A for loop may not have a condition, in - // which case `getFirstConditionInstruction` returns the body instead. - exists(TranslatedForStmt s | - s instanceof TranslatedForStmt and - result = s.getFirstConditionInstruction() and - exists(TranslatedElement inLoop, InstructionTag tag | - result = inLoop.getInstructionSuccessor(tag, kind) and - exists(TranslatedElement bodyOrUpdate | - bodyOrUpdate = s.getBody() - or - bodyOrUpdate = s.getUpdate(_) - | - inLoop = bodyOrUpdate.getAChild*() - ) and - instruction = inLoop.getInstruction(tag) - ) - ) - or - // Goto statement: - // As a conservative approximation, any edge out of `goto` is a back edge - // unless it goes strictly forward in the program text. A `goto` whose - // source and target are both inside a macro will be seen as having the - // same location for source and target, so we conservatively assume that - // such a `goto` creates a back edge. - exists(TranslatedElement s, GotoStmt goto | - goto instanceof GotoStmt and - not isStrictlyForwardGoto(goto) and - goto = s.getAst() and - exists(InstructionTag tag | - result = s.getInstructionSuccessor(tag, kind) and - instruction = s.getInstruction(tag) - ) - ) - } - - /** Holds if `goto` jumps strictly forward in the program text. */ - private predicate isStrictlyForwardGoto(GotoLabelStmt goto) { - goto.getLocation().getFile() = goto.getTarget().getLocation().getFile() and - goto.getLocation().getEndLine() < goto.getTarget().getLocation().getStartLine() - } - - cached - Language::AST getInstructionAst(Instruction instruction) { - result = getInstructionTranslatedElement(instruction).getAst() - } - - cached - CSharpType getInstructionResultType(Instruction instruction) { - getInstructionTranslatedElement(instruction) - .hasInstruction(_, getInstructionTag(instruction), result) - } - - cached - ArrayAccess getInstructionArrayAccess(Instruction instruction) { - result = - getInstructionTranslatedElement(instruction) - .getInstructionArrayAccess(getInstructionTag(instruction)) - } - - cached - int getInstructionResultSize(Instruction instruction) { - exists(TranslatedElement element, InstructionTag tag | - instructionOrigin(instruction, element, tag) and - result = element.getInstructionResultSize(tag) - ) - } - - cached - Instruction getPrimaryInstructionForSideEffect(Instruction instruction) { - exists(TranslatedElement element, InstructionTag tag | - instructionOrigin(instruction, element, tag) and - result = element.getPrimaryInstructionForSideEffect(tag) - ) - } -} - -predicate hasUnreachedInstruction(IRFunction func) { none() } - -import CachedForDebugging - -cached -private module CachedForDebugging { - cached - string getTempVariableUniqueId(IRTempVariable var) { - exists(TranslatedElement element | - var = element.getTempVariable(_) and - result = element.getId().toString() + ":" + getTempVariableTagId(var.getTag()) - ) - } - - cached - predicate instructionHasSortKeys(Instruction instruction, int key1, int key2) { - key1 = getInstructionTranslatedElement(instruction).getId() and - getInstructionTag(instruction) = - rank[key2](InstructionTag tag, string tagId | - tagId = getInstructionTagId(tag) - | - tag order by tagId - ) - } - - cached - string getInstructionUniqueId(Instruction instruction) { - result = - getInstructionTranslatedElement(instruction).getId() + ":" + - getInstructionTagId(getInstructionTag(instruction)) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRFunctionImports.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/IRFunctionImports.qll deleted file mode 100644 index 4e9a7d9f3ae..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRFunctionImports.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.implementation.internal.IRFunctionBase as IRFunctionBase diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRImports.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/IRImports.qll deleted file mode 100644 index 14dad7400b2..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRImports.qll +++ /dev/null @@ -1,3 +0,0 @@ -import experimental.ir.implementation.EdgeKind as EdgeKind -import experimental.ir.implementation.IRType as IRType -import experimental.ir.implementation.MemoryAccessKind as MemoryAccessKind diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRInternal.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/IRInternal.qll deleted file mode 100644 index e44184dd76c..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRInternal.qll +++ /dev/null @@ -1,4 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language -import IRConstruction as Construction -import experimental.ir.implementation.IRConfiguration as IRConfiguration -import IRConstruction::Raw as Raw diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRVariableImports.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/IRVariableImports.qll deleted file mode 100644 index bdb4377cbdc..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/IRVariableImports.qll +++ /dev/null @@ -1,5 +0,0 @@ -import experimental.ir.implementation.IRType as IRType -import experimental.ir.implementation.TempVariableTag as TempVariableTag -import experimental.ir.internal.IRUtilities as IRUtilities -import experimental.ir.internal.TempVariableTag as TTempVariableTag -import experimental.ir.implementation.internal.TIRVariable as TIRVariable diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/InstructionImports.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/InstructionImports.qll deleted file mode 100644 index 4bcd2e127c1..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/InstructionImports.qll +++ /dev/null @@ -1,6 +0,0 @@ -import experimental.ir.implementation.EdgeKind as EdgeKind -import experimental.ir.implementation.IRType as IRType -import experimental.ir.implementation.MemoryAccessKind as MemoryAccessKind -import experimental.ir.implementation.Opcode as Opcode -import experimental.ir.implementation.internal.OperandTag as OperandTag -import experimental.ir.internal.Overlap as Overlap diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/InstructionTag.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/InstructionTag.qll deleted file mode 100644 index 3ec2d846254..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/InstructionTag.qll +++ /dev/null @@ -1,204 +0,0 @@ -import csharp -import experimental.ir.Util - -private predicate elementIsInitialized(int elementIndex) { - exists(ArrayInitWithMod initList | initList.isInitialized(elementIndex)) -} - -newtype TInstructionTag = - OnlyInstructionTag() or // Single instruction (not including implicit Load) - InitializeThisTag() or - InitializerVariableAddressTag() or - InitializerLoadStringTag() or - InitializerStoreTag() or - ZeroPadStringConstantTag() or - ZeroPadStringElementIndexTag() or - ZeroPadStringElementAddressTag() or - ZeroPadStringStoreTag() or - AssignOperationLoadTag() or - AssignOperationConvertLeftTag() or - AssignOperationOpTag() or - AssignmentConvertRightTag() or - AssignOperationConvertResultTag() or - AssignmentStoreTag() or - CrementLoadTag() or - CrementConstantTag() or - CrementOpTag() or - CrementStoreTag() or - EnterFunctionTag() or - ReturnValueAddressTag() or - ReturnTag() or - ExitFunctionTag() or - AliasedDefinitionTag() or - AliasedUseTag() or - SwitchBranchTag() or - CallTargetTag() or - CallTag() or - CallSideEffectTag() or - AllocationSizeTag() or - AllocationElementSizeTag() or - AllocationExtentConvertTag() or - ValueConditionConditionalBranchTag() or - ConditionValueTrueTempAddressTag() or - ConditionValueTrueConstantTag() or - ConditionValueTrueStoreTag() or - ConditionValueFalseTempAddressTag() or - ConditionValueFalseConstantTag() or - ConditionValueFalseStoreTag() or - ConditionValueResultTempAddressTag() or - ConditionValueResultLoadTag() or - BoolConversionConstantTag() or - BoolConversionCompareTag() or - LoadTag() or // Implicit load due to lvalue-to-rvalue conversion - AddressTag() or - CatchTag() or - ThrowTag() or - UnwindTag() or - InitializerUninitializedTag() or - InitializerElementIndexTag(int elementIndex) { elementIsInitialized(elementIndex) } or - InitializerElementAddressTag(int elementIndex) { elementIsInitialized(elementIndex) } or - InitializerElementDefaultValueTag(int elementIndex) { elementIsInitialized(elementIndex) } or - InitializerElementDefaultValueStoreTag(int elementIndex) { elementIsInitialized(elementIndex) } or - // Added for C# - NewObjTag() or - // TODO: remove the need for indexing - PointerAddTag(int index) { index in [0 .. 255] } or - ElementsAddressTag(int index) { index in [0 .. 255] } or - ConvertTag() or - GeneratedNeqTag() or - GeneratedConstantTag() or - GeneratedBranchTag() - -class InstructionTag extends TInstructionTag { - final string toString() { result = "Tag" } -} - -/** - * Gets a unique string for the instruction tag. Primarily used for generating - * instruction IDs to ensure stable IR dumps. - */ -string getInstructionTagId(TInstructionTag tag) { - tag = OnlyInstructionTag() and result = "Only" // Single instruction (not including implicit Load) - or - tag = InitializerVariableAddressTag() and result = "InitVarAddr" - or - tag = InitializerLoadStringTag() and result = "InitLoadStr" - or - tag = InitializerStoreTag() and result = "InitStore" - or - tag = InitializerUninitializedTag() and result = "InitUninit" - or - tag = ZeroPadStringConstantTag() and result = "ZeroPadConst" - or - tag = ZeroPadStringElementIndexTag() and result = "ZeroPadElemIndex" - or - tag = ZeroPadStringElementAddressTag() and result = "ZeroPadElemAddr" - or - tag = ZeroPadStringStoreTag() and result = "ZeroPadStore" - or - tag = AssignOperationLoadTag() and result = "AssignOpLoad" - or - tag = AssignOperationConvertLeftTag() and result = "AssignOpConvLeft" - or - tag = AssignmentConvertRightTag() and result = "AssignConvRight" - or - tag = AssignOperationOpTag() and result = "AssignOpOp" - or - tag = AssignOperationConvertResultTag() and result = "AssignOpConvRes" - or - tag = AssignmentStoreTag() and result = "AssignStore" - or - tag = CrementLoadTag() and result = "CrementLoad" - or - tag = CrementConstantTag() and result = "CrementConst" - or - tag = CrementOpTag() and result = "CrementOp" - or - tag = CrementStoreTag() and result = "CrementStore" - or - tag = EnterFunctionTag() and result = "EnterFunc" - or - tag = ReturnValueAddressTag() and result = "RetValAddr" - or - tag = ReturnTag() and result = "Ret" - or - tag = ExitFunctionTag() and result = "ExitFunc" - or - tag = AliasedDefinitionTag() and result = "AliasedDef" - or - tag = AliasedUseTag() and result = "AliasedUse" - or - tag = SwitchBranchTag() and result = "SwitchBranch" - or - tag = CallTargetTag() and result = "CallTarget" - or - tag = CallTag() and result = "Call" - or - tag = CallSideEffectTag() and result = "CallSideEffect" - or - tag = AllocationSizeTag() and result = "AllocSize" - or - tag = AllocationElementSizeTag() and result = "AllocElemSize" - or - tag = AllocationExtentConvertTag() and result = "AllocExtConv" - or - tag = ValueConditionConditionalBranchTag() and result = "ValCondCondBranch" - or - tag = ConditionValueTrueTempAddressTag() and result = "CondValTrueTempAddr" - or - tag = ConditionValueTrueConstantTag() and result = "CondValTrueConst" - or - tag = ConditionValueTrueStoreTag() and result = "CondValTrueStore" - or - tag = ConditionValueFalseTempAddressTag() and result = "CondValFalseTempAddr" - or - tag = ConditionValueFalseConstantTag() and result = "CondValFalseConst" - or - tag = ConditionValueFalseStoreTag() and result = "CondValFalseStore" - or - tag = ConditionValueResultTempAddressTag() and result = "CondValResTempAddr" - or - tag = ConditionValueResultLoadTag() and result = "CondValResLoad" - or - tag = BoolConversionConstantTag() and result = "BoolConvConst" - or - tag = BoolConversionCompareTag() and result = "BoolConvComp" - or - tag = LoadTag() and result = "Load" // Implicit load due to lvalue-to-rvalue conversion - or - tag = CatchTag() and result = "Catch" - or - tag = ThrowTag() and result = "Throw" - or - tag = UnwindTag() and result = "Unwind" - or - // Added for C# - tag = NewObjTag() and result = "NewObj" - or - tag = ElementsAddressTag(_) and result = "ElementsAddress" - or - tag = PointerAddTag(_) and result = "PointerAdd" - or - tag = ConvertTag() and result = "Convert" - or - tag = GeneratedNeqTag() and result = "GeneratedNEQTag" - or - tag = GeneratedConstantTag() and result = "GeneratedConstantTag" - or - tag = GeneratedBranchTag() and result = "GeneratedBranchTag" - or - tag = AddressTag() and result = "AddressTag" - or - exists(int index, string tagName | - ( - tag = InitializerElementIndexTag(index) and tagName = "InitElemIndex" - or - tag = InitializerElementAddressTag(index) and tagName = "InitElemAddr" - or - tag = InitializerElementDefaultValueTag(index) and tagName = "InitElemDefVal" - or - tag = InitializerElementDefaultValueStoreTag(index) and tagName = "InitElemDefValStore" - ) and - result = tagName + "(" + index + ")" - ) -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/OperandImports.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/OperandImports.qll deleted file mode 100644 index 65676caf724..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/OperandImports.qll +++ /dev/null @@ -1,5 +0,0 @@ -import experimental.ir.implementation.MemoryAccessKind as MemoryAccessKind -import experimental.ir.implementation.IRType as IRType -import experimental.ir.internal.Overlap as Overlap -import experimental.ir.implementation.internal.OperandTag as OperandTag -import experimental.ir.implementation.internal.TOperand as TOperand diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/OperandInternal.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/OperandInternal.qll deleted file mode 100644 index 771aeb9033c..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/OperandInternal.qll +++ /dev/null @@ -1,2 +0,0 @@ -private import experimental.ir.implementation.internal.TOperand -import RawOperands diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/PrintIRImports.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/PrintIRImports.qll deleted file mode 100644 index 0c5337d57de..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/PrintIRImports.qll +++ /dev/null @@ -1,2 +0,0 @@ -import experimental.ir.IRConfiguration as IRConfiguration -import experimental.ir.internal.IRCSharpLanguageDebug as LanguageDebug diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedCall.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedCall.qll deleted file mode 100644 index e131a26be65..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedCall.qll +++ /dev/null @@ -1,102 +0,0 @@ -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import InstructionTag -private import TranslatedElement -private import TranslatedExpr -private import TranslatedInitialization -private import experimental.ir.implementation.raw.internal.common.TranslatedCallBase -private import experimental.ir.internal.IRCSharpLanguage as Language - -/** - * The IR translation of a call to a function. The function can be a normal function - * (e.g. `MethodCall`) or a constructor call (e.g. `ObjectCreation`). Notice that the - * AST generated translated calls are tied to an expression (unlike compiler generated ones, - * which can be attached to either a statement or an expression). - */ -abstract class TranslatedCall extends TranslatedExpr, TranslatedCallBase { - final override Instruction getResult() { result = TranslatedCallBase.super.getResult() } -} - -/** - * Represents the IR translation of a direct function call. The call can be one of the following: - * `MethodCall`, `LocalFunctionCall`, `AccessorCall`, `OperatorCall`. - * Note that `DelegateCall`s are not treated here since they need to be desugared. - */ -class TranslatedFunctionCall extends TranslatedNonConstantExpr, TranslatedCall { - override Call expr; - - TranslatedFunctionCall() { - expr instanceof MethodCall or - expr instanceof LocalFunctionCall or - expr instanceof AccessorCall or - expr instanceof OperatorCall - } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and result = expr.getTarget() - } - - override TranslatedExpr getArgument(int index) { - result = getTranslatedExpr(expr.getArgument(index)) - } - - override TranslatedExpr getQualifier() { - expr instanceof QualifiableExpr and - result = getTranslatedExpr(expr.(QualifiableExpr).getQualifier()) - } - - override Instruction getQualifierResult() { - // since `ElementInitializer`s do not have a qualifier, the qualifier's result is retrieved - // from the enclosing initialization context - if expr.getParent() instanceof CollectionInitializer - then result = getTranslatedExpr(expr.getParent()).(InitializationContext).getTargetAddress() - else result = this.getQualifier().getResult() - } - - override Type getCallResultType() { result = expr.getTarget().getReturnType() } - - override predicate hasReadSideEffect() { - not expr.getTarget().(SideEffectFunction).neverReadsMemory() - } - - override predicate hasWriteSideEffect() { - not expr.getTarget().(SideEffectFunction).neverWritesMemory() - } -} - -/** - * Represents the IR translation of a call to a constructor or to a constructor initializer. - * The qualifier of the call is obtained from the constructor call context. - * Note that `DelegateCreation` is not present here, since the call to a delegate constructor is - * compiler generated. - */ -class TranslatedConstructorCall extends TranslatedNonConstantExpr, TranslatedCall { - override Call expr; - - TranslatedConstructorCall() { - expr instanceof ObjectCreation or - expr instanceof ConstructorInitializer - } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and result = expr.getTarget() - } - - override TranslatedExpr getArgument(int index) { - result = getTranslatedExpr(expr.getArgument(index)) - } - - // The qualifier for a constructor call has already been generated - // (the `NewObj` instruction) - override TranslatedExpr getQualifier() { none() } - - override Type getCallResultType() { result instanceof VoidType } - - override Instruction getQualifierResult() { - exists(ConstructorCallContext context | - context = this.getParent() and - result = context.getReceiver() - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedCondition.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedCondition.qll deleted file mode 100644 index afe98fdb410..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedCondition.qll +++ /dev/null @@ -1,164 +0,0 @@ -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.internal.CSharpType -private import InstructionTag -private import TranslatedElement -private import TranslatedExpr -private import common.TranslatedConditionBase -private import experimental.ir.internal.IRCSharpLanguage as Language - -TranslatedCondition getTranslatedCondition(Expr expr) { result.getExpr() = expr } - -abstract class TranslatedCondition extends ConditionBase { - Expr expr; - - final override string toString() { result = expr.toString() } - - final override Language::AST getAst() { result = expr } - - final Expr getExpr() { result = expr } - - final override Callable getFunction() { result = expr.getEnclosingCallable() } - - final Type getResultType() { result = expr.getType() } -} - -abstract class TranslatedFlexibleCondition extends TranslatedCondition, ConditionContext, - TTranslatedFlexibleCondition -{ - TranslatedFlexibleCondition() { this = TTranslatedFlexibleCondition(expr) } - - final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } - - final override Instruction getFirstInstruction() { - result = this.getOperand().getFirstInstruction() - } - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - final override Instruction getChildSuccessor(TranslatedElement child) { none() } - - abstract TranslatedCondition getOperand(); -} - -class TranslatedParenthesisCondition extends TranslatedFlexibleCondition { - override ParenthesizedExpr expr; - - final override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getOperand() and - result = this.getConditionContext().getChildTrueSuccessor(this) - } - - final override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getOperand() and - result = this.getConditionContext().getChildFalseSuccessor(this) - } - - final override TranslatedCondition getOperand() { - result = getTranslatedCondition(expr.getExpr()) - } -} - -class TranslatedNotCondition extends TranslatedFlexibleCondition { - override LogicalNotExpr expr; - - override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getOperand() and - result = this.getConditionContext().getChildFalseSuccessor(this) - } - - override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getOperand() and - result = this.getConditionContext().getChildTrueSuccessor(this) - } - - override TranslatedCondition getOperand() { result = getTranslatedCondition(expr.getOperand()) } -} - -abstract class TranslatedNativeCondition extends TranslatedCondition, TTranslatedNativeCondition { - TranslatedNativeCondition() { this = TTranslatedNativeCondition(expr) } - - final override Instruction getChildSuccessor(TranslatedElement child) { none() } -} - -abstract class TranslatedBinaryLogicalOperation extends TranslatedNativeCondition, ConditionContext { - override BinaryLogicalOperation expr; - - final override TranslatedElement getChild(int id) { - id = 0 and result = this.getLeftOperand() - or - id = 1 and result = this.getRightOperand() - } - - final override Instruction getFirstInstruction() { - result = this.getLeftOperand().getFirstInstruction() - } - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - final TranslatedCondition getLeftOperand() { - result = getTranslatedCondition(expr.getLeftOperand()) - } - - final TranslatedCondition getRightOperand() { - result = getTranslatedCondition(expr.getRightOperand()) - } - - final TranslatedCondition getAnOperand() { - result = this.getLeftOperand() or - result = this.getRightOperand() - } -} - -class TranslatedLogicalAndExpr extends TranslatedBinaryLogicalOperation { - TranslatedLogicalAndExpr() { expr instanceof LogicalAndExpr } - - override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getLeftOperand() and - result = this.getRightOperand().getFirstInstruction() - or - child = this.getRightOperand() and - result = this.getConditionContext().getChildTrueSuccessor(this) - } - - override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getAnOperand() and - result = this.getConditionContext().getChildFalseSuccessor(this) - } -} - -class TranslatedLogicalOrExpr extends TranslatedBinaryLogicalOperation { - override LogicalOrExpr expr; - - override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getAnOperand() and - result = this.getConditionContext().getChildTrueSuccessor(this) - } - - override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getLeftOperand() and - result = this.getRightOperand().getFirstInstruction() - or - child = this.getRightOperand() and - result = this.getConditionContext().getChildFalseSuccessor(this) - } -} - -class TranslatedValueCondition extends TranslatedCondition, ValueConditionBase, - TTranslatedValueCondition -{ - TranslatedValueCondition() { this = TTranslatedValueCondition(expr) } - - override TranslatedExpr getValueExpr() { result = getTranslatedExpr(expr) } - - override Instruction valueExprResult() { result = this.getValueExpr().getResult() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedDeclaration.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedDeclaration.qll deleted file mode 100644 index 23242c75c74..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedDeclaration.qll +++ /dev/null @@ -1,76 +0,0 @@ -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.internal.IRUtilities -private import experimental.ir.implementation.internal.OperandTag -private import InstructionTag -private import TranslatedElement -private import TranslatedExpr -private import TranslatedInitialization -private import experimental.ir.internal.IRCSharpLanguage as Language -private import common.TranslatedDeclarationBase - -/** - * Gets the `TranslatedDeclaration` that represents the declaration - * `entry`. - */ -TranslatedLocalDeclaration getTranslatedLocalDeclaration(LocalVariableDeclExpr declExpr) { - result.getAst() = declExpr -} - -/** - * Represents the IR translation of a declaration within the body of a function. - */ -abstract class TranslatedLocalDeclaration extends TranslatedElement, TTranslatedDeclaration { - LocalVariableDeclExpr expr; - - TranslatedLocalDeclaration() { this = TTranslatedDeclaration(expr) } - - final override Callable getFunction() { result = expr.getEnclosingCallable() } - - final override string toString() { result = expr.toString() } - - final override Language::AST getAst() { result = expr } -} - -/** - * Represents the IR translation of the declaration of a local variable, - * including its initialization, if any. - */ -class TranslatedLocalVariableDeclaration extends TranslatedLocalDeclaration, - LocalVariableDeclarationBase, InitializationContext -{ - LocalVariable var; - - TranslatedLocalVariableDeclaration() { var = expr.getVariable() } - - override Instruction getTargetAddress() { - result = this.getInstruction(InitializerVariableAddressTag()) - } - - override LocalVariable getDeclVar() { result = var } - - override Type getVarType() { result = getVariableType(this.getDeclVar()) } - - override Type getTargetType() { result = getVariableType(var) } - - override IRVariable getInstructionVariable(InstructionTag tag) { - ( - tag = InitializerVariableAddressTag() - or - this.hasUninitializedInstruction() and tag = InitializerStoreTag() - ) and - result = getIRUserVariable(this.getFunction(), this.getDeclVar()) - } - - override TranslatedInitialization getInitialization() { - // First complex initializations - if var.getInitializer() instanceof ArrayCreation - then result = getTranslatedInitialization(var.getInitializer().(ArrayCreation).getInitializer()) - else - if var.getInitializer() instanceof ObjectCreation - then result = getTranslatedInitialization(var.getInitializer()) - else - // then the simple variable initialization - result = getTranslatedInitialization(var.getInitializer()) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedElement.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedElement.qll deleted file mode 100644 index c314d79e3ea..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedElement.qll +++ /dev/null @@ -1,569 +0,0 @@ -import csharp -import experimental.ir.implementation.raw.IR -private import experimental.ir.IRConfiguration -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.TempVariableTag -private import InstructionTag -private import TranslatedCondition -private import TranslatedFunction -private import TranslatedStmt -private import IRConstruction -private import experimental.ir.internal.IRCSharpLanguage as Language -private import desugar.Foreach -private import desugar.Delegate -private import desugar.Lock - -ArrayType getArrayOfDim(int dim, Type type) { - result.getRank() = dim and - result.getElementType() = type -} - -IRUserVariable getIRUserVariable(Language::Function func, Language::Variable var) { - result.getVariable() = var and - result.getEnclosingFunction() = func -} - -IRTempVariable getIRTempVariable(Language::AST ast, TempVariableTag tag) { - result.getAst() = ast and - result.getTag() = tag -} - -private predicate canCreateCompilerGeneratedElement(Element generatedBy, int nth) { - generatedBy instanceof ForeachStmt and nth in [0 .. ForeachElements::noGeneratedElements() - 1] - or - generatedBy instanceof LockStmt and nth in [0 .. LockElements::noGeneratedElements() - 1] - or - generatedBy instanceof DelegateCreation and - nth in [0 .. DelegateElements::noGeneratedElements(generatedBy) - 1] - or - generatedBy instanceof DelegateCall and - nth in [0 .. DelegateElements::noGeneratedElements(generatedBy) - 1] -} - -/** - * Gets the "real" parent of `expr`. This predicate treats conversions as if - * they were explicit nodes in the expression tree, rather than as implicit - * nodes as in the regular AST representation. - */ -private Element getRealParent(Expr expr) { result = expr.getParent() } - -/** - * Holds if `expr` is a constant of a type that can be replaced directly with - * its value in the IR. This does not include address constants as we have no - * means to express those as QL values. - */ -predicate isIRConstant(Expr expr) { exists(expr.getValue()) } - -// Pulled out for performance. See -// https://github.com/github/codeql-coreql-team/issues/1044. -private predicate isOrphan(Expr expr) { not exists(getRealParent(expr)) } - -/** - * Holds if `expr` should be ignored for the purposes of IR generation due to - * some property of `expr` or one of its ancestors. - */ -private predicate ignoreExprAndDescendants(Expr expr) { - // Ignore parentless expressions - isOrphan(expr) - or - // Ignore the constants in SwitchCase, since their values are embedded in the - // CaseEdge. - getRealParent(expr) instanceof CaseStmt - or - // Ignore descendants of constant expressions, since we'll just substitute the - // constant value. - isIRConstant(getRealParent(expr)) - or - // Ignore the local declaration done by a `ForeachStmt` - // since we desugar it - expr instanceof LocalVariableDeclExpr and - expr.getParent() instanceof ForeachStmt - or - // recursive case - ignoreExprAndDescendants(getRealParent(expr)) and - // The two children of an `AssignOperation` should not be ignored, but since they are also - // descendants of an orphan node (the expanded form of the `AssignOperation` is also retrieved by - // the extractor, which is rooted in an AST node without parents) they would be - not expr.getParent() instanceof AssignOperation -} - -/** - * Holds if `expr` (not including its descendants) should be ignored for the - * purposes of IR generation. - */ -private predicate ignoreExprOnly(Expr expr) { - not translateFunction(expr.getEnclosingCallable()) - or - // Ignore size of arrays when translating - expr.getParent() instanceof ArrayCreation and expr.hasValue() - or - // Ignore the child expression of a goto case stmt - expr.getParent() instanceof GotoCaseStmt - or - // Ignore the expression (that is not a declaration) - // that appears in a using block - expr.getParent().(UsingBlockStmt).getExpr() = expr - or - // Ignore the `ThisAccess` when it is used as the qualifier for - // a callable access (e.g. when a member callable is passed as a - // parameter for a delegate creation expression) - expr instanceof ThisAccess and - expr.getParent() instanceof CallableAccess -} - -/** - * Holds if `expr` should be ignored for the purposes of IR generation. - */ -private predicate ignoreExpr(Expr expr) { - ignoreExprOnly(expr) or - ignoreExprAndDescendants(expr) -} - -/** - * Holds if `func` should be translated to IR. - */ -private predicate translateFunction(Callable callable) { - // not isInvalidFunction(callable) - exists(callable.getEntryPoint()) and - callable.fromSource() and - exists(IRConfiguration config | config.shouldCreateIRForFunction(callable)) -} - -/** - * Holds if `stmt` should be translated to IR. - */ -private predicate translateStmt(Stmt stmt) { translateFunction(stmt.getEnclosingCallable()) } - -/** - * Holds if `expr` is most naturally evaluated as control flow, rather than as - * a value. - */ -private predicate isNativeCondition(Expr expr) { - expr instanceof BinaryLogicalOperation and - not isIRConstant(expr) -} - -/** - * Holds if `expr` can be evaluated as either a condition or a value expression, - * depending on context. - */ -private predicate isFlexibleCondition(Expr expr) { - ( - expr instanceof ParenthesizedExpr or - expr instanceof LogicalNotExpr - ) and - usedAsCondition(expr) and - not isIRConstant(expr) -} - -/** - * Holds if `expr` is used in a condition context, i.e. the Boolean result of - * the expression is directly used to determine control flow. - */ -private predicate usedAsCondition(Expr expr) { - exists(BinaryLogicalOperation op | - op.getLeftOperand() = expr or - op.getRightOperand() = expr - ) - or - exists(LoopStmt loop | loop.getCondition() = expr) - or - exists(IfStmt ifStmt | ifStmt.getCondition() = expr) - or - exists(ConditionalExpr condExpr | condExpr.getCondition() = expr) - or - exists(LogicalNotExpr notExpr | - notExpr.getOperand() = expr and - usedAsCondition(notExpr) - ) - or - exists(ParenthesizedExpr paren | - paren.getExpr() = expr and - usedAsCondition(paren) - ) -} - -/** - * Holds if we should have a `Load` instruction for `expr` when generating the IR. - */ -private predicate mayNeedLoad(Expr expr) { - expr instanceof AssignableRead - or - // We need an extra load for the `PointerIndirectionExpr` - expr instanceof PointerIndirectionExpr and - // If the dereferencing happens on the lhs of an - // assignment we shouldn't have a load instruction - not exists(Assignment a | a.getLValue() = expr) -} - -predicate needsLoad(Expr expr) { - mayNeedLoad(expr) and - not ignoreLoad(expr) -} - -/** - * Holds if we should ignore the `Load` instruction for `expr` when generating IR. - */ -private predicate ignoreLoad(Expr expr) { - // No load needed for the qualifier of an array access, - // since we use the instruction `ElementsAddress` - // to get the address of the first element in an array - expr = any(ArrayAccess aa).getQualifier() - or - // Indexer calls returns a reference or a value, - // no need to load it - expr instanceof IndexerCall - or - // No load is needed for the lvalue in an assignment such as: - // Eg. `Object obj = oldObj`; - expr = any(Assignment a).getLValue() and - expr.getType() instanceof RefType - or - // Since the loads for a crement operation is handled by the translation - // of the operation, we ignore the load here - expr.getParent() instanceof MutatorOperation - or - // The `&` operator does not need a load, since the - // address is the final value of the expression - expr.getParent() instanceof AddressOfExpr - or - // A property access does not need a load since it is a call - expr instanceof PropertyAccess - or - // If expr is a variable access used as the qualifier for a field access and - // its target variable is a value type variable, - // ignore the load since the address of a variable that is a value type is - // given by a single `VariableAddress` instruction. - expr = any(FieldAccess fa).getQualifier() and - expr = - any(VariableAccess va | - va.getType().isValueType() and - not va.getTarget() = any(Parameter p | p.isOutOrRef() or p.isIn()) - ) - or - // If expr is passed as an `out,`ref` or `in` argument, - // no load should take place since we pass the address, not the - // value of the variable - expr.(AssignableAccess).isOutOrRefArgument() - or - expr.(AssignableAccess).isInArgument() -} - -newtype TTranslatedElement = - // An expression that is not being consumed as a condition - TTranslatedValueExpr(Expr expr) { - not ignoreExpr(expr) and - not isNativeCondition(expr) and - not isFlexibleCondition(expr) - } or - // A creation expression - TTranslatedCreationExpr(Expr expr) { - not ignoreExpr(expr) and - (expr instanceof ObjectCreation or expr instanceof DelegateCreation) - } or - // A separate element to handle the lvalue-to-rvalue conversion step of an - // expression. - TTranslatedLoad(Expr expr) { - not ignoreExpr(expr) and - needsLoad(expr) - } or - // An expression most naturally translated as control flow. - TTranslatedNativeCondition(Expr expr) { - not ignoreExpr(expr) and - isNativeCondition(expr) - } or - // An expression that can best be translated as control flow given the context - // in which it is used. - TTranslatedFlexibleCondition(Expr expr) { - not ignoreExpr(expr) and - isFlexibleCondition(expr) - } or - // An expression that is not naturally translated as control flow, but is - // consumed in a condition context. This element adapts the original element - // to the condition context. - TTranslatedValueCondition(Expr expr) { - not ignoreExpr(expr) and - not isNativeCondition(expr) and - not isFlexibleCondition(expr) and - usedAsCondition(expr) - } or - // An expression that is naturally translated as control flow, but is used in - // a context where a simple value is expected. This element adapts the - // original condition to the value context. - TTranslatedConditionValue(Expr expr) { - not ignoreExpr(expr) and - isNativeCondition(expr) and - not usedAsCondition(expr) - } or - // An expression used as an initializer. - TTranslatedInitialization(Expr expr) { - not ignoreExpr(expr) and - ( - // Because of their implementation in C#, - // we deal with all the types of initialization separately. - // First only simple local variable initialization (ie. `int x = 0`) - exists(LocalVariableDeclAndInitExpr lvInit | lvInit.getInitializer() = expr) - or - // Then treat more complex ones - expr instanceof ArrayInitializer - or - expr instanceof ObjectInitializer - or - expr = any(ThrowElement throwElement).getExpr() - or - expr = any(CollectionInitializer colInit).getAnElementInitializer() - or - expr = any(ReturnStmt returnStmt).getExpr() - or - expr = any(ArrayInitializer arrInit).getAnElement() - ) - } or - // The initialization of an array element via a member of an initializer list. - TTranslatedExplicitElementInitialization(ArrayInitializer initList, int elementIndex) { - not ignoreExpr(initList) and - exists(initList.getElement(elementIndex)) - } or - // The initialization of a base class from within a constructor. - TTranslatedConstructorInitializer(ConstructorInitializer init) { not ignoreExpr(init) } or - // A statement - TTranslatedStmt(Stmt stmt) { translateStmt(stmt) } or - // A function - TTranslatedFunction(Callable callable) { translateFunction(callable) } or - // A function parameter - TTranslatedParameter(Parameter param) { - exists(Callable func | - func = param.getCallable() and - translateFunction(func) - ) - } or - // A local declaration - TTranslatedDeclaration(LocalVariableDeclExpr entry) { - // foreach var decl and init is treated separately, - // because foreach needs desugaring - not ignoreExprAndDescendants(entry) - } or - // A compiler generated element, generated by `generatedBy` during the - // desugaring process - TTranslatedCompilerGeneratedElement(Element generatedBy, int index) { - canCreateCompilerGeneratedElement(generatedBy, index) - } - -/** - * Represents an AST node for which IR needs to be generated. - * - * In most cases, there is a single `TranslatedElement` for each AST node. - * However, when a single AST node performs two separable operations (e.g. - * a `VariableAccess` that is also a load), there may be multiple - * `TranslatedElement` nodes for a single AST node. - */ -abstract class TranslatedElement extends TTranslatedElement { - abstract string toString(); - - /** - * Gets the AST node being translated. - */ - abstract Language::AST getAst(); - - /** - * Get the first instruction to be executed in the evaluation of this element. - */ - abstract Instruction getFirstInstruction(); - - /** - * Get the immediate child elements of this element. - */ - final TranslatedElement getAChild() { result = this.getChild(_) } - - /** - * Gets the immediate child element of this element. The `id` is unique - * among all children of this element, but the values are not necessarily - * consecutive. - */ - abstract TranslatedElement getChild(int id); - - /** - * Gets the an identifier string for the element. This id is unique within - * the scope of the element's function. - */ - int getId() { result = this.getUniqueId() } - - private TranslatedElement getChildByRank(int rankIndex) { - result = - rank[rankIndex + 1](TranslatedElement child, int id | - child = this.getChild(id) - | - child order by id - ) - } - - language[monotonicAggregates] - private int getDescendantCount() { - result = - 1 + sum(TranslatedElement child | child = this.getChildByRank(_) | child.getDescendantCount()) - } - - private int getUniqueId() { - if not exists(this.getParent()) - then result = 0 - else - exists(TranslatedElement parent | - parent = this.getParent() and - if this = parent.getChildByRank(0) - then result = 1 + parent.getUniqueId() - else - exists(int childIndex, TranslatedElement previousChild | - this = parent.getChildByRank(childIndex) and - previousChild = parent.getChildByRank(childIndex - 1) and - result = previousChild.getUniqueId() + previousChild.getDescendantCount() - ) - ) - } - - /** - * Holds if this element generates an instruction with opcode `opcode` and - * result type `resultType`. `tag` must be unique for each instruction - * generated from the same AST node (not just from the same - * `TranslatedElement`). - * If the instruction does not return a result, `resultType` should be - * `VoidType`. - */ - abstract predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType); - - /** - * Gets the `Function` that contains this element. - */ - abstract Callable getFunction(); - - /** - * Gets the successor instruction of the instruction that was generated by - * this element for tag `tag`. The successor edge kind is specified by `kind`. - */ - abstract Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind); - - /** - * Gets the successor instruction to which control should flow after the - * child element specified by `child` has finished execution. - */ - abstract Instruction getChildSuccessor(TranslatedElement child); - - /** - * Gets the instruction to which control should flow if an exception is thrown - * within this element. This will generally return first `catch` block of the - * nearest enclosing `try`, or the `Unwind` instruction for the function if - * there is no enclosing `try`. - */ - Instruction getExceptionSuccessorInstruction() { - result = this.getParent().getExceptionSuccessorInstruction() - } - - /** - * Gets the primary instruction for the side effect instruction that was - * generated by this element for tag `tag`. - */ - Instruction getPrimaryInstructionForSideEffect(InstructionTag tag) { none() } - - /** - * Holds if this element generates a temporary variable with type `type`. - * `tag` must be unique for each variable generated from the same AST node - * (not just from the same `TranslatedElement`). - */ - predicate hasTempVariable(TempVariableTag tag, CSharpType type) { none() } - - /** - * If the instruction specified by `tag` is a `FunctionInstruction`, gets the - * `Function` for that instruction. - */ - Callable getInstructionFunction(InstructionTag tag) { none() } - - /** - * If the instruction specified by `tag` is a `VariableInstruction`, gets the - * `IRVariable` for that instruction. - */ - IRVariable getInstructionVariable(InstructionTag tag) { none() } - - /** - * If the instruction specified by `tag` is a `FieldInstruction`, gets the - * `Field` for that instruction. - */ - Field getInstructionField(InstructionTag tag) { none() } - - /** - * If the instruction specified by `tag` is an `IndexedElementInstruction`, - * gets the `ArrayAccess` of that instruction. - */ - ArrayAccess getInstructionArrayAccess(InstructionTag tag) { none() } - - /** - * If the instruction specified by `tag` is a `ConstantValueInstruction`, gets - * the constant value for that instruction. - */ - string getInstructionConstantValue(InstructionTag tag) { none() } - - /** - * If the instruction specified by `tag` is a `PointerArithmeticInstruction`, - * gets the size of the type pointed to by the pointer. - */ - int getInstructionElementSize(InstructionTag tag) { none() } - - /** - * If the instruction specified by `tag` has a result of type `UnknownType`, - * gets the size of the result in bytes. If the result does not have a known - * constant size, this predicate does not hold. - */ - int getInstructionResultSize(InstructionTag tag) { none() } - - /** - * If the instruction specified by `tag` is a `StringConstantInstruction`, - * gets the `StringLiteral` for that instruction. - */ - StringLiteral getInstructionStringLiteral(InstructionTag tag) { none() } - - /** - * If the instruction specified by `tag` is a `CatchByTypeInstruction`, - * gets the type of the exception to be caught. - */ - CSharpType getInstructionExceptionType(InstructionTag tag) { none() } - - /** - * If the instruction specified by `tag` is an `InheritanceConversionInstruction`, - * gets the inheritance relationship for that instruction. - */ - predicate getInstructionInheritance(InstructionTag tag, Class baseClass, Class derivedClass) { - none() - } - - /** - * Gets the instruction whose result is consumed as an operand of the - * instruction specified by `tag`, with the operand specified by `operandTag`. - */ - Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { none() } - - /** - * Gets the type of the memory operand specified by `operandTag` on the the instruction specified by `tag`. - */ - CSharpType getInstructionOperandType(InstructionTag tag, TypedOperandTag operandTag) { none() } - - /** - * Gets the instruction generated by this element with tag `tag`. - */ - final Instruction getInstruction(InstructionTag tag) { - getInstructionTranslatedElement(result) = this and - getInstructionTag(result) = tag - } - - /** - * Gets the temporary variable generated by this element with tag `tag`. - */ - final IRTempVariable getTempVariable(TempVariableTag tag) { - result.getAst() = this.getAst() and - result.getTag() = tag and - this.hasTempVariable(tag, _) - } - - /** - * Gets the parent element of this element. - */ - final TranslatedElement getParent() { result.getAChild() = this } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedExpr.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedExpr.qll deleted file mode 100644 index 68070261227..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedExpr.qll +++ /dev/null @@ -1,2095 +0,0 @@ -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.internal.TempVariableTag -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.IRUtilities -private import InstructionTag -private import TranslatedCondition -private import TranslatedDeclaration -private import TranslatedElement -private import TranslatedFunction -private import TranslatedInitialization -private import common.TranslatedConditionBase -private import common.TranslatedCallBase -private import common.TranslatedExprBase -private import desugar.Delegate -private import desugar.internal.TranslatedCompilerGeneratedCall -import TranslatedCall -private import experimental.ir.internal.IRCSharpLanguage as Language - -/** - * Gets the TranslatedExpr for the specified expression. If `expr` is a load, - * the result is the TranslatedExpr for the load portion. - */ -TranslatedExpr getTranslatedExpr(Expr expr) { - result.getExpr() = expr and - result.producesExprResult() and - // When a constructor call is needed, we fetch it manually. - // This is because of how we translate object creations: the translated expression - // and the translated constructor call are attached to the same element. - (expr instanceof ObjectCreation implies not result instanceof TranslatedConstructorCall) -} - -/** - * The IR translation of some part of an expression. - * A single `Expr` may consist of multiple `TranslatedExpr` objects. Every - * `Expr` has a single `TranslatedCoreExpr`, which produces the result of the - * expression before any implicit lvalue-to-rvalue conversion. Any expression - * with an lvalue-to-rvalue conversion will also have a `TranslatedLoad` to - * perform that conversion on the original result. A few expressions have - * additional `TranslatedExpr` objects that compute intermediate values, such - * as the `TranslatedAllocatorCall` and `TranslatedAllocationSize` within the - * translation of a `NewExpr`. - */ -abstract class TranslatedExpr extends TranslatedExprBase { - Expr expr; - - /** - * Holds if this `TranslatedExpr` produces the final result of the original - * expression from the AST. - * - * For example, in `y = x;`, the TranslatedLoad for the VariableAccess `x` - * produces the result of that VariableAccess expression, but the - * TranslatedVariableAccess for `x` does not. The TranslatedVariableAccess - * for `y` does produce its result, however, because there is no load on `y`. - */ - abstract predicate producesExprResult(); - - /** - * Gets the type of the result produced by this expression. - */ - final Type getResultType() { result = expr.getType() } - - final override Language::AST getAst() { result = expr } - - final override Callable getFunction() { result = expr.getEnclosingCallable() } - - /** - * Gets the expression from which this `TranslatedExpr` is generated. - */ - final Expr getExpr() { result = expr } - - /** - * Gets the `TranslatedFunction` containing this expression. - */ - final TranslatedFunction getEnclosingFunction() { - result = getTranslatedFunction(expr.getEnclosingCallable()) - } -} - -/** - * The IR translation of the "core" part of an expression. This is the part of - * the expression that produces the result value of the expression, before any - * lvalue-to-rvalue conversion on the result. Every expression has a single - * `TranslatedCoreExpr`. - */ -abstract class TranslatedCoreExpr extends TranslatedExpr { - final override string toString() { result = expr.toString() } - - /** - * All exprs produce a final value, apart from reads. They first need an access, - * then a load. - */ - final override predicate producesExprResult() { - // If the expr needs a load, its translation does not produce the final value. - not needsLoad(expr) - } - - final CSharpType getResultCSharpType() { - if this.isResultLValue() = true - then result = getTypeForGLValue(expr.getType()) - else result = getTypeForPRValue(expr.getType()) - } - - /** - * Returns `true` if the result of this `TranslatedExpr` is a lvalue, or - * `false` if the result is a rvalue. - * - * This predicate returns a `boolean` value instead of just a being a plain - * predicate because all of the subclass predicates that call it require a - * `boolean` value. - */ - final boolean isResultLValue() { - if not this.producesExprResult() then result = true else result = false - } -} - -class TranslatedConditionValue extends TranslatedCoreExpr, ConditionContext, - TTranslatedConditionValue -{ - TranslatedConditionValue() { this = TTranslatedConditionValue(expr) } - - override TranslatedElement getChild(int id) { id = 0 and result = this.getCondition() } - - override Instruction getFirstInstruction() { result = this.getCondition().getFirstInstruction() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - ( - tag = ConditionValueTrueTempAddressTag() or - tag = ConditionValueFalseTempAddressTag() or - tag = ConditionValueResultTempAddressTag() - ) and - opcode instanceof Opcode::VariableAddress and - resultType = getTypeForGLValue(expr.getType()) - or - ( - tag = ConditionValueTrueConstantTag() or - tag = ConditionValueFalseConstantTag() - ) and - opcode instanceof Opcode::Constant and - resultType = this.getResultCSharpType() - or - ( - tag = ConditionValueTrueStoreTag() or - tag = ConditionValueFalseStoreTag() - ) and - opcode instanceof Opcode::Store and - resultType = this.getResultCSharpType() - or - tag = ConditionValueResultLoadTag() and - opcode instanceof Opcode::Load and - resultType = this.getResultCSharpType() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - kind instanceof GotoEdge and - ( - tag = ConditionValueTrueTempAddressTag() and - result = this.getInstruction(ConditionValueTrueConstantTag()) - or - tag = ConditionValueTrueConstantTag() and - result = this.getInstruction(ConditionValueTrueStoreTag()) - or - tag = ConditionValueTrueStoreTag() and - result = this.getInstruction(ConditionValueResultTempAddressTag()) - or - tag = ConditionValueFalseTempAddressTag() and - result = this.getInstruction(ConditionValueFalseConstantTag()) - or - tag = ConditionValueFalseConstantTag() and - result = this.getInstruction(ConditionValueFalseStoreTag()) - or - tag = ConditionValueFalseStoreTag() and - result = this.getInstruction(ConditionValueResultTempAddressTag()) - or - tag = ConditionValueResultTempAddressTag() and - result = this.getInstruction(ConditionValueResultLoadTag()) - or - tag = ConditionValueResultLoadTag() and - result = this.getParent().getChildSuccessor(this) - ) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = ConditionValueTrueStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getInstruction(ConditionValueTrueTempAddressTag()) - or - operandTag instanceof StoreValueOperandTag and - result = this.getInstruction(ConditionValueTrueConstantTag()) - ) - or - tag = ConditionValueFalseStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getInstruction(ConditionValueFalseTempAddressTag()) - or - operandTag instanceof StoreValueOperandTag and - result = this.getInstruction(ConditionValueFalseConstantTag()) - ) - or - tag = ConditionValueResultLoadTag() and - operandTag instanceof AddressOperandTag and - result = this.getInstruction(ConditionValueResultTempAddressTag()) - } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = ConditionValueTempVar() and - type = this.getResultCSharpType() - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - ( - tag = ConditionValueTrueTempAddressTag() or - tag = ConditionValueFalseTempAddressTag() or - tag = ConditionValueResultTempAddressTag() - ) and - result = this.getTempVariable(ConditionValueTempVar()) - } - - override string getInstructionConstantValue(InstructionTag tag) { - tag = ConditionValueTrueConstantTag() and result = "1" - or - tag = ConditionValueFalseConstantTag() and result = "0" - } - - override Instruction getResult() { result = this.getInstruction(ConditionValueResultLoadTag()) } - - override Instruction getChildSuccessor(TranslatedElement child) { none() } - - override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getCondition() and - result = this.getInstruction(ConditionValueTrueTempAddressTag()) - } - - override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getCondition() and - result = this.getInstruction(ConditionValueFalseTempAddressTag()) - } - - private TranslatedCondition getCondition() { result = getTranslatedCondition(expr) } -} - -/** - * IR translation of an implicit lvalue-to-rvalue conversion on the result of - * an expression. - */ -class TranslatedLoad extends TranslatedExpr, TTranslatedLoad { - TranslatedLoad() { this = TTranslatedLoad(expr) } - - override string toString() { result = "Load of " + expr.toString() } - - override Instruction getFirstInstruction() { result = this.getOperand().getFirstInstruction() } - - override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = LoadTag() and - opcode instanceof Opcode::Load and - if this.producesExprResult() - then resultType = getTypeForPRValue(expr.getType()) - else resultType = getTypeForGLValue(expr.getType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = LoadTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getOperand() and result = this.getInstruction(LoadTag()) - } - - override Instruction getResult() { result = this.getInstruction(LoadTag()) } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = LoadTag() and - operandTag instanceof AddressOperandTag and - result = this.getOperand().getResult() - } - - final override predicate producesExprResult() { - // A load always produces the result of the expression. - any() - } - - private TranslatedCoreExpr getOperand() { result.getExpr() = expr } -} - -abstract class TranslatedCrementOperation extends TranslatedNonConstantExpr { - override MutatorOperation expr; - - final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } - - final override string getInstructionConstantValue(InstructionTag tag) { - tag = CrementConstantTag() and - exists(Type resultType | - resultType = this.getResultType() and - ( - resultType instanceof IntegralType and result = "1" - or - resultType instanceof FloatingPointType and result = "1.0" - or - resultType instanceof PointerType and result = "1" - ) - ) - } - - private Type getConstantType() { - exists(Type resultType | - resultType = this.getResultType() and - ( - resultType instanceof IntegralType and result = this.getResultType() - or - resultType instanceof FloatingPointType and result = this.getResultType() - or - resultType instanceof PointerType and result = any(IntType t) - ) - ) - } - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = CrementLoadTag() and - opcode instanceof Opcode::Load and - resultType = getTypeForPRValue(expr.getType()) - or - tag = CrementConstantTag() and - opcode instanceof Opcode::Constant and - resultType = getTypeForPRValue(this.getConstantType()) - or - tag = CrementOpTag() and - opcode = this.getOpcode() and - resultType = getTypeForPRValue(expr.getType()) - or - tag = CrementStoreTag() and - opcode instanceof Opcode::Store and - resultType = getTypeForPRValue(expr.getType()) - } - - final override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = CrementLoadTag() and - operandTag instanceof AddressOperandTag and - result = this.getOperand().getResult() - or - tag = CrementOpTag() and - ( - operandTag instanceof LeftOperandTag and - result = this.getInstruction(CrementLoadTag()) - or - operandTag instanceof RightOperandTag and - result = this.getInstruction(CrementConstantTag()) - ) - or - tag = CrementStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getOperand().getResult() - or - operandTag instanceof StoreValueOperandTag and - result = this.getInstruction(CrementOpTag()) - ) - } - - final override Instruction getFirstInstruction() { - result = this.getOperand().getFirstInstruction() - } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - kind instanceof GotoEdge and - ( - tag = CrementLoadTag() and - result = this.getInstruction(CrementConstantTag()) - or - tag = CrementConstantTag() and - result = this.getInstruction(CrementOpTag()) - or - tag = CrementOpTag() and - result = this.getInstruction(CrementStoreTag()) - or - tag = CrementStoreTag() and - result = this.getParent().getChildSuccessor(this) - ) - } - - final override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getOperand() and result = this.getInstruction(CrementLoadTag()) - } - - final override int getInstructionElementSize(InstructionTag tag) { - tag = CrementOpTag() and - ( - this.getOpcode() instanceof Opcode::PointerAdd or - this.getOpcode() instanceof Opcode::PointerSub - ) and - result = Language::getTypeSize(this.getResultType().(PointerType).getReferentType()) - } - - final TranslatedExpr getOperand() { result = getTranslatedExpr(expr.getOperand()) } - - final Opcode getOpcode() { - exists(Type resultType | - resultType = this.getResultType() and - ( - ( - expr instanceof IncrementOperation and - if resultType instanceof PointerType - then result instanceof Opcode::PointerAdd - else result instanceof Opcode::Add - ) - or - ( - expr instanceof DecrementOperation and - if resultType instanceof PointerType - then result instanceof Opcode::PointerSub - else result instanceof Opcode::Sub - ) - ) - ) - } -} - -class TranslatedPrefixCrementOperation extends TranslatedCrementOperation { - TranslatedPrefixCrementOperation() { - expr instanceof PreIncrExpr or - expr instanceof PreDecrExpr - } - - override Instruction getResult() { result = this.getInstruction(CrementOpTag()) } -} - -class TranslatedPostfixCrementOperation extends TranslatedCrementOperation { - TranslatedPostfixCrementOperation() { - expr instanceof PostIncrExpr or - expr instanceof PostDecrExpr - } - - override Instruction getResult() { result = this.getInstruction(CrementLoadTag()) } -} - -class TranslatedObjectInitializerExpr extends TranslatedNonConstantExpr, InitializationContext { - override ObjectInitializer expr; - - override Instruction getResult() { none() } - - override Instruction getFirstInstruction() { result = this.getChild(0).getFirstInstruction() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override TranslatedElement getChild(int id) { - result = getTranslatedExpr(expr.getMemberInitializer(id)) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int index | - child = this.getChild(index) and - if exists(this.getChild(index + 1)) - then result = this.getChild(index + 1).getFirstInstruction() - else result = this.getParent().getChildSuccessor(this) - ) - } - - override Instruction getTargetAddress() { - // The target address is the address of the newly allocated object, - // which can be retrieved from the parent `TranslatedObjectCreation`. - result = this.getParent().getInstruction(NewObjTag()) - } - - override Type getTargetType() { - result = this.getParent().getInstruction(NewObjTag()).getResultType() - } -} - -class TranslatedCollectionInitializer extends TranslatedNonConstantExpr, InitializationContext { - override CollectionInitializer expr; - - override Instruction getResult() { none() } - - override Instruction getFirstInstruction() { result = this.getChild(0).getFirstInstruction() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override TranslatedElement getChild(int id) { - result = getTranslatedExpr(expr.getElementInitializer(id)) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int index | - child = this.getChild(index) and - ( - result = this.getChild(index + 1).getFirstInstruction() - or - not exists(this.getChild(index + 1)) and - result = this.getParent().getChildSuccessor(this) - ) - ) - } - - override Instruction getTargetAddress() { - // The target address is the address of the newly allocated object, - // which can be retrieved from the parent `TranslatedObjectCreation`. - result = this.getParent().getInstruction(NewObjTag()) - } - - override Type getTargetType() { - result = this.getParent().getInstruction(NewObjTag()).getResultType() - } -} - -/** - * The translation of an array access expression. The `ElementsAddress` - * instruction, given the address of an array, return the address - * of the element at index 0 of that array. To correctly treat the - * multidimensional case, we generate the address incrementally. For example, - * the address of a[1][1] will produce the instructions: - * r0_1(Int32[,]) = VariableAddress[a] : - * r0_2(Int32[,]) = ElementsAddress : r0_1 - * r0_3(Int32) = Constant[1] : - * r0_4(Int32[,]) = PointerAdd[4] : r0_2, r0_3 - * r0_5(Int32[]) = ElementsAddress : r0_4 - * r0_6(Int32) = Constant[1] : - * r0_7(Int32[]) = PointerAdd[4] : r0_5, r0_6 - * - * To support this incremental address calculation, - * the `ElementsAddress` and `PointerAdd` instructions are indexed (so that - * we correctly find the successor of instructions). - */ -class TranslatedArrayAccess extends TranslatedNonConstantExpr { - override ArrayAccess expr; - - override Instruction getFirstInstruction() { - result = this.getBaseOperand().getFirstInstruction() - } - - final override TranslatedElement getChild(int id) { - id = -1 and result = this.getBaseOperand() - or - result = this.getOffsetOperand(id) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - exists(int index | - this.inBounds(index) and - kind instanceof GotoEdge and - ( - // The successor of a `PointerAdd` is an `ElementsAddress` if - // that `PointerAdd` is not the last `PointerAdd` instruction. - tag = PointerAddTag(index) and - result = this.getInstruction(ElementsAddressTag(index + 1)) - or - // The successor of the last `PointerAdd` instruction is - // the successor of the `TranslatedArrayAccess`. - tag = PointerAddTag(this.getRank() - 1) and - result = this.getParent().getChildSuccessor(this) - or - // The successor of an `ElementsAddress` instruction is - // an offset expression. - tag = ElementsAddressTag(index) and - result = this.getOffsetOperand(index).getFirstInstruction() - ) - ) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - // The base address of the array is followed by the first - // `ElementsAddress` instruction. - child = this.getBaseOperand() and - result = this.getInstruction(ElementsAddressTag(0)) - or - // The successor of an offset expression is a `PointerAdd` expression. - child = this.getOffsetOperand(child.getAst().getIndex()) and - child.getAst().getIndex() >= 0 and - result = this.getInstruction(PointerAddTag(child.getAst().getIndex())) - } - - override Instruction getResult() { - result = this.getInstruction(PointerAddTag(this.getRank() - 1)) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - exists(int index | - this.inBounds(index) and - tag = PointerAddTag(index) and - opcode instanceof Opcode::PointerAdd and - resultType = getTypeForPRValue(getArrayOfDim(this.getRank() - index, expr.getType())) - ) - or - exists(int index | - this.inBounds(index) and - tag = ElementsAddressTag(index) and - opcode instanceof Opcode::ElementsAddress and - resultType = getTypeForPRValue(getArrayOfDim(this.getRank() - index, expr.getType())) - ) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - exists(int index | - this.inBounds(index) and - tag = PointerAddTag(index) and - ( - operandTag instanceof LeftOperandTag and - result = this.getInstruction(ElementsAddressTag(index)) - or - operandTag instanceof RightOperandTag and - result = this.getOffsetOperand(index).getResult() - ) - ) - or - tag = ElementsAddressTag(0) and - ( - operandTag instanceof UnaryOperandTag and - result = this.getBaseOperand().getResult() - ) - or - exists(int index | - this.inBounds(index) and - index > 0 and - tag = ElementsAddressTag(index) and - ( - operandTag instanceof UnaryOperandTag and - result = this.getInstruction(PointerAddTag(index - 1)) - ) - ) - } - - override int getInstructionElementSize(InstructionTag tag) { - exists(int index | - this.inBounds(index) and - tag = PointerAddTag(index) and - result = Language::getTypeSize(expr.getQualifier().getType().(ArrayType).getElementType()) - ) - } - - private TranslatedExpr getBaseOperand() { result = getTranslatedExpr(expr.getQualifier()) } - - private TranslatedExpr getOffsetOperand(int index) { - this.inBounds(index) and - result = getTranslatedExpr(expr.getChild(index)) - } - - private predicate inBounds(int index) { index in [0 .. this.getRank() - 1] } - - private int getRank() { result = count(expr.getIndex(_)) } -} - -abstract class TranslatedPointerOps extends TranslatedNonConstantExpr { - override UnaryOperation expr; - - final override Instruction getFirstInstruction() { - result = this.getOperand().getFirstInstruction() - } - - final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - final override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getOperand() and result = this.getParent().getChildSuccessor(this) - } - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - final override Instruction getResult() { result = this.getOperand().getResult() } - - final override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - none() - } - - abstract TranslatedExpr getOperand(); -} - -class TranslatedPointerIndirectionExpr extends TranslatedPointerOps { - override PointerIndirectionExpr expr; - - override TranslatedExpr getOperand() { result = getTranslatedExpr(expr.getOperand()) } -} - -class TranslatedAddressExpr extends TranslatedPointerOps { - override AddressOfExpr expr; - - override TranslatedExpr getOperand() { result = getTranslatedExpr(expr.getOperand()) } -} - -class TranslatedThisExpr extends TranslatedNonConstantExpr { - override ThisAccess expr; - - final override TranslatedElement getChild(int id) { none() } - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = OnlyInstructionTag() and - opcode instanceof Opcode::CopyValue and - resultType = getTypeForPRValue(expr.getType()) - } - - final override Instruction getResult() { result = this.getInstruction(OnlyInstructionTag()) } - - final override Instruction getFirstInstruction() { - result = this.getInstruction(OnlyInstructionTag()) - } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - kind instanceof GotoEdge and - tag = OnlyInstructionTag() and - result = this.getParent().getChildSuccessor(this) - } - - final override Instruction getChildSuccessor(TranslatedElement child) { none() } - - final override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = OnlyInstructionTag() and - operandTag instanceof UnaryOperandTag and - result = this.getInitializeThisInstruction() - } - - private Instruction getInitializeThisInstruction() { - result = getTranslatedFunction(expr.getEnclosingCallable()).getInitializeThisInstruction() - } -} - -abstract class TranslatedVariableAccess extends TranslatedNonConstantExpr { - override VariableAccess expr; - - final override TranslatedElement getChild(int id) { - id = 0 and result = this.getQualifier() // Might not exist - } - - final TranslatedExpr getQualifier() { - expr instanceof QualifiableExpr and - result = getTranslatedExpr(expr.(QualifiableExpr).getQualifier()) - } - - override Instruction getResult() { - if this.needsExtraLoad() - then result = this.getInstruction(LoadTag()) - else result = this.getInstruction(AddressTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - this.needsExtraLoad() and - tag = LoadTag() and - opcode instanceof Opcode::Load and - resultType = getTypeForPRValue(expr.getType()) - } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = AddressTag() and - ( - if this.needsExtraLoad() - then result = this.getInstruction(LoadTag()) - else result = this.getParent().getChildSuccessor(this) - ) and - kind instanceof GotoEdge - or - this.needsExtraLoad() and - tag = LoadTag() and - kind instanceof GotoEdge and - result = this.getParent().getChildSuccessor(this) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - this.needsExtraLoad() and - tag = LoadTag() and - operandTag instanceof AddressOperandTag and - result = this.getInstruction(AddressTag()) - } - - final override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getQualifier() and result = this.getInstruction(AddressTag()) - } - - /** - * Some variable accesses need an extra load, eg. ref parameters, - * out parameters - */ - final private predicate needsExtraLoad() { - ( - expr.getTarget().(Parameter).isOutOrRef() or - expr.getTarget().(Parameter).isIn() - ) and - (expr.getParent() instanceof FieldAccess implies expr.getType().isRefType()) - } -} - -class TranslatedNonFieldVariableAccess extends TranslatedVariableAccess { - TranslatedNonFieldVariableAccess() { - not expr instanceof FieldAccess and - // If the parent expression is a `LocalVariableDeclAndInitExpr`, - // then translate only the variables that are initializers (on the RHS) - // and not the LHS (the address of the LHS is generated during - // the translation of the initialization). - ( - expr.getParent() instanceof LocalVariableDeclAndInitExpr - implies - expr = expr.getParent().(LocalVariableDeclAndInitExpr).getInitializer() - ) - or - // Static field accesses should be modeled as `TranslatedNonFieldAccess` - expr.(FieldAccess).getTarget().isStatic() - } - - override Instruction getFirstInstruction() { - if exists(this.getQualifier()) - then result = this.getQualifier().getFirstInstruction() - else result = this.getInstruction(AddressTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - TranslatedVariableAccess.super.hasInstruction(opcode, tag, resultType) - or - tag = AddressTag() and - opcode instanceof Opcode::VariableAddress and - resultType = getTypeForGLValue(this.getResultType()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = AddressTag() and - result = getIRUserVariable(expr.getEnclosingCallable(), expr.getTarget()) - } -} - -class TranslatedFieldAccess extends TranslatedVariableAccess { - override FieldAccess expr; - - TranslatedFieldAccess() { - // Static field accesses should be modeled as `TranslatedNonFieldAccess` - not expr.getTarget().isStatic() - } - - override Instruction getFirstInstruction() { - // If there is a qualifier - if exists(this.getQualifier()) - then result = this.getQualifier().getFirstInstruction() - else - // it means that the access is part of an `ObjectInitializer` expression - // so the instructions for the qualifier have been generated previously. - result = this.getInstruction(AddressTag()) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - result = TranslatedVariableAccess.super.getInstructionOperand(tag, operandTag) - or - tag = AddressTag() and - operandTag instanceof UnaryOperandTag and - // A normal field access always has a qualifier - if exists(this.getQualifier()) - then result = this.getQualifier().getResult() - else - // This field access is part of an `ObjectInitializer` - // so the translated element of the initializer - // (which is the parent of the parent of the translated field access), - // being an `InitializationContext`, knows the target address of this field access. - result = this.getParent().getParent().(InitializationContext).getTargetAddress() - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = AddressTag() and - opcode instanceof Opcode::FieldAddress and - resultType = getTypeForGLValue(expr.getType()) - } - - override Field getInstructionField(InstructionTag tag) { - tag = AddressTag() and - result = expr.getTarget() - } -} - -class TranslatedFunctionAccess extends TranslatedNonConstantExpr { - override CallableAccess expr; - - override TranslatedElement getChild(int id) { none() } - - override Instruction getFirstInstruction() { result = this.getInstruction(OnlyInstructionTag()) } - - override Instruction getResult() { result = this.getInstruction(OnlyInstructionTag()) } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = OnlyInstructionTag() and - opcode instanceof Opcode::FunctionAddress and - resultType = getTypeForGLValue(expr.getType()) - } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = OnlyInstructionTag() and - result = expr.getTarget() - } - - override Instruction getChildSuccessor(TranslatedElement child) { none() } -} - -/** - * IR translation of an expression whose value is not known at compile time. - */ -abstract class TranslatedNonConstantExpr extends TranslatedCoreExpr, TTranslatedValueExpr { - TranslatedNonConstantExpr() { - this = TTranslatedValueExpr(expr) and - not isIRConstant(expr) - } -} - -/** - * IR translation of an expression with a compile-time constant value. This - * includes not only literals, but also "integral constant expressions" (e.g. - * `1 + 2`). - */ -abstract class TranslatedConstantExpr extends TranslatedCoreExpr, TTranslatedValueExpr { - TranslatedConstantExpr() { - this = TTranslatedValueExpr(expr) and - isIRConstant(expr) - } - - final override Instruction getFirstInstruction() { - result = this.getInstruction(OnlyInstructionTag()) - } - - final override TranslatedElement getChild(int id) { none() } - - final override Instruction getResult() { result = this.getInstruction(OnlyInstructionTag()) } - - final override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - none() - } - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = OnlyInstructionTag() and - opcode = this.getOpcode() and - resultType = getTypeForPRValue(expr.getType()) - } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - } - - final override Instruction getChildSuccessor(TranslatedElement child) { none() } - - abstract Opcode getOpcode(); -} - -class TranslatedArithmeticLiteral extends TranslatedConstantExpr { - TranslatedArithmeticLiteral() { not expr instanceof StringLiteral } - - override string getInstructionConstantValue(InstructionTag tag) { - tag = OnlyInstructionTag() and - result = expr.getValue() - } - - override Opcode getOpcode() { result instanceof Opcode::Constant } -} - -class TranslatedStringLiteral extends TranslatedConstantExpr { - override StringLiteral expr; - - override StringLiteral getInstructionStringLiteral(InstructionTag tag) { - tag = OnlyInstructionTag() and - result = expr - } - - override Opcode getOpcode() { result instanceof Opcode::StringConstant } -} - -/** - * IR translation of an expression that performs a single operation on its - * operands and returns the result. - */ -abstract class TranslatedSingleInstructionExpr extends TranslatedNonConstantExpr { - /** - * Gets the `Opcode` of the operation to be performed. - */ - abstract Opcode getOpcode(); - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - opcode = this.getOpcode() and - tag = OnlyInstructionTag() and - resultType = this.getResultCSharpType() - } - - final override Instruction getResult() { result = this.getInstruction(OnlyInstructionTag()) } -} - -class TranslatedUnaryExpr extends TranslatedSingleInstructionExpr { - TranslatedUnaryExpr() { - expr instanceof LogicalNotExpr or - expr instanceof ComplementExpr or - expr instanceof UnaryPlusExpr or - expr instanceof UnaryMinusExpr - } - - final override Instruction getFirstInstruction() { - result = this.getOperand().getFirstInstruction() - } - - final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - } - - final override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getOperand() and result = this.getInstruction(OnlyInstructionTag()) - } - - final override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = OnlyInstructionTag() and - result = this.getOperand().getResult() and - operandTag instanceof UnaryOperandTag - } - - final override Opcode getOpcode() { - expr instanceof LogicalNotExpr and result instanceof Opcode::LogicalNot - or - expr instanceof ComplementExpr and result instanceof Opcode::BitComplement - or - expr instanceof UnaryPlusExpr and result instanceof Opcode::CopyValue - or - expr instanceof UnaryMinusExpr and result instanceof Opcode::Negate - } - - private TranslatedExpr getOperand() { - result = getTranslatedExpr(expr.(UnaryOperation).getOperand()) - } -} - -/** - * Represents the translation of a cast expression that generates a - * single `Convert` instruction. - */ -class TranslatedCast extends TranslatedNonConstantExpr { - override Cast expr; - - override Instruction getFirstInstruction() { result = this.getOperand().getFirstInstruction() } - - final override TranslatedElement getChild(int id) { id = 0 and result = this.getOperand() } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = ConvertTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getOperand() and result = this.getInstruction(ConvertTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - ( - tag = ConvertTag() and - opcode = this.getOpcode() and - resultType = getTypeForPRValue(expr.getType()) - ) - } - - override Instruction getResult() { result = this.getInstruction(ConvertTag()) } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - ( - tag = ConvertTag() and - operandTag instanceof UnaryOperandTag and - result = this.getOperand().getResult() - ) - } - - private TranslatedExpr getOperand() { result = getTranslatedExpr(expr.getExpr()) } - - private Opcode getOpcode() { - expr instanceof CastExpr and result instanceof Opcode::CheckedConvertOrThrow - or - expr instanceof AsExpr and result instanceof Opcode::CheckedConvertOrNull - } -} - -private Opcode binaryBitwiseOpcode(BinaryBitwiseOperation expr) { - expr instanceof LeftShiftExpr and result instanceof Opcode::ShiftLeft - or - expr instanceof RightShiftExpr and result instanceof Opcode::ShiftRight - or - expr instanceof UnsignedRightShiftExpr and result instanceof Opcode::UnsignedShiftRight - or - expr instanceof BitwiseAndExpr and result instanceof Opcode::BitAnd - or - expr instanceof BitwiseOrExpr and result instanceof Opcode::BitOr - or - expr instanceof BitwiseXorExpr and result instanceof Opcode::BitXor -} - -private Opcode binaryArithmeticOpcode(BinaryArithmeticOperation expr) { - expr instanceof AddExpr and result instanceof Opcode::Add - or - expr instanceof SubExpr and result instanceof Opcode::Sub - or - expr instanceof MulExpr and result instanceof Opcode::Mul - or - expr instanceof DivExpr and result instanceof Opcode::Div - or - expr instanceof RemExpr and result instanceof Opcode::Rem -} - -private Opcode comparisonOpcode(ComparisonOperation expr) { - expr instanceof EQExpr and result instanceof Opcode::CompareEQ - or - expr instanceof NEExpr and result instanceof Opcode::CompareNE - or - expr instanceof LTExpr and result instanceof Opcode::CompareLT - or - expr instanceof GTExpr and result instanceof Opcode::CompareGT - or - expr instanceof LEExpr and result instanceof Opcode::CompareLE - or - expr instanceof GEExpr and result instanceof Opcode::CompareGE -} - -/** - * IR translation of a simple binary operation. - */ -class TranslatedBinaryOperation extends TranslatedSingleInstructionExpr { - TranslatedBinaryOperation() { - expr instanceof BinaryArithmeticOperation or - expr instanceof BinaryBitwiseOperation or - expr instanceof ComparisonOperation - } - - override Instruction getFirstInstruction() { - result = this.getLeftOperand().getFirstInstruction() - } - - final override TranslatedElement getChild(int id) { - id = 0 and result = this.getLeftOperand() - or - id = 1 and result = this.getRightOperand() - } - - final override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = OnlyInstructionTag() and - if this.swapOperandsOnOp() - then ( - operandTag instanceof RightOperandTag and - result = this.getLeftOperand().getResult() - or - operandTag instanceof LeftOperandTag and - result = this.getRightOperand().getResult() - ) else ( - operandTag instanceof LeftOperandTag and - result = this.getLeftOperand().getResult() - or - operandTag instanceof RightOperandTag and - result = this.getRightOperand().getResult() - ) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getLeftOperand() and - result = this.getRightOperand().getFirstInstruction() - or - child = this.getRightOperand() and - result = this.getInstruction(OnlyInstructionTag()) - } - - override Opcode getOpcode() { - result = binaryArithmeticOpcode(expr) or - result = binaryBitwiseOpcode(expr) or - result = comparisonOpcode(expr) - } - - override int getInstructionElementSize(InstructionTag tag) { - tag = OnlyInstructionTag() and - exists(Opcode opcode | - opcode = this.getOpcode() and - ( - opcode instanceof Opcode::PointerAdd or - opcode instanceof Opcode::PointerSub or - opcode instanceof Opcode::PointerDiff - ) and - result = Language::getTypeSize(this.getPointerOperand().getResultType()) - ) - } - - private TranslatedExpr getPointerOperand() { - if this.swapOperandsOnOp() - then result = this.getRightOperand() - else result = this.getLeftOperand() - } - - private predicate swapOperandsOnOp() { - // Swap the operands on a pointer add 'i + p', so that the pointer operand - // always comes first. Note that we still evaluate the operands - // left-to-right. - exists(AddExpr ptrAdd, Type rightType | - ptrAdd = expr and - rightType = ptrAdd.getRightOperand().getType() and - rightType instanceof PointerType - ) - } - - private TranslatedExpr getLeftOperand() { - result = getTranslatedExpr(expr.(BinaryOperation).getLeftOperand()) - } - - private TranslatedExpr getRightOperand() { - result = getTranslatedExpr(expr.(BinaryOperation).getRightOperand()) - } -} - -abstract class TranslatedAssignment extends TranslatedNonConstantExpr { - override Assignment expr; - - final override TranslatedElement getChild(int id) { - id = 0 and result = this.getLeftOperand() - or - id = 1 and result = this.getRightOperand() - } - - final override Instruction getFirstInstruction() { - // Evaluation is right-to-left - result = this.getRightOperand().getFirstInstruction() - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - ( - this.needsConversion() and - tag = AssignmentConvertRightTag() and - // For now only use `Opcode::Convert` to - // crudely represent conversions. Could - // be useful to represent the whole chain of conversions - opcode instanceof Opcode::Convert and - resultType = getTypeForPRValue(expr.getLValue().getType()) - ) - } - - final override Instruction getResult() { result = this.getStoredValue() } - - abstract Instruction getStoredValue(); - - final TranslatedExpr getLeftOperand() { result = getTranslatedExpr(expr.getLValue()) } - - final TranslatedExpr getRightOperand() { result = getTranslatedExpr(expr.getRValue()) } - - final predicate needsConversion() { expr.getLValue().getType() != expr.getRValue().getType() } -} - -class TranslatedAssignExpr extends TranslatedAssignment { - TranslatedAssignExpr() { - expr instanceof AssignExpr and - // if the lvalue is an accessor call, ignore assignment - // since the assignment expr is desugared into a function call - not expr.getLValue() instanceof AccessorCall - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = AssignmentStoreTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - or - this.needsConversion() and - tag = AssignmentConvertRightTag() and - result = this.getLeftOperand().getFirstInstruction() and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { - // Operands are evaluated right-to-left. - ( - child = this.getRightOperand() and - if this.needsConversion() - then result = this.getInstruction(AssignmentConvertRightTag()) - else result = this.getLeftOperand().getFirstInstruction() - ) - or - child = this.getLeftOperand() and - result = this.getInstruction(AssignmentStoreTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - TranslatedAssignment.super.hasInstruction(opcode, tag, resultType) - or - tag = AssignmentStoreTag() and - opcode instanceof Opcode::Store and - resultType = getTypeForPRValue(expr.getType()) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = AssignmentStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getLeftOperand().getResult() - or - ( - operandTag instanceof StoreValueOperandTag and - if this.needsConversion() - then result = this.getInstruction(AssignmentConvertRightTag()) - else result = this.getRightOperand().getResult() - ) - ) - or - tag = AssignmentConvertRightTag() and - operandTag instanceof UnaryOperandTag and - result = this.getRightOperand().getResult() - } - - override Instruction getStoredValue() { result = this.getRightOperand().getResult() } -} - -class TranslatedAssignOperation extends TranslatedAssignment { - override AssignOperation expr; - - TranslatedAssignOperation() { - // Assignments to events is handled differently - not expr.getLValue() instanceof EventAccess - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - kind instanceof GotoEdge and - ( - ( - tag = AssignOperationLoadTag() and - if this.leftOperandNeedsConversion() - then result = this.getInstruction(AssignOperationConvertLeftTag()) - else result = this.getInstruction(AssignOperationOpTag()) - ) - or - tag = AssignOperationConvertLeftTag() and - result = this.getInstruction(AssignOperationOpTag()) - or - ( - tag = AssignOperationOpTag() and - if this.leftOperandNeedsConversion() - then result = this.getInstruction(AssignOperationConvertResultTag()) - else result = this.getInstruction(AssignmentStoreTag()) - ) - or - tag = AssignOperationConvertResultTag() and - result = this.getInstruction(AssignmentStoreTag()) - or - tag = AssignmentStoreTag() and - result = this.getParent().getChildSuccessor(this) - ) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - // Operands are evaluated right-to-left. - child = this.getRightOperand() and - result = this.getLeftOperand().getFirstInstruction() - or - child = this.getLeftOperand() and - result = this.getInstruction(AssignOperationLoadTag()) - } - - override Instruction getStoredValue() { - if this.leftOperandNeedsConversion() - then result = this.getInstruction(AssignOperationConvertResultTag()) - else result = this.getInstruction(AssignOperationOpTag()) - } - - private Type getConvertedLeftOperandType() { - if - expr instanceof AssignLeftShiftExpr or - expr instanceof AssignRightShiftExpr or - expr instanceof AssignUnsighedRightShiftExpr - then result = this.getLeftOperand().getResultType() - else - // The right operand has already been converted to the type of the op. - result = this.getRightOperand().getResultType() - } - - private predicate leftOperandNeedsConversion() { - this.getConvertedLeftOperandType() != this.getLeftOperand().getResultType() - } - - private Opcode getOpcode() { - expr instanceof AssignAddExpr and - ( - if expr.getRValue().getType() instanceof PointerType - then result instanceof Opcode::PointerAdd - else result instanceof Opcode::Add - ) - or - expr instanceof AssignSubExpr and - ( - if expr.getRValue().getType() instanceof PointerType - then result instanceof Opcode::PointerSub - else result instanceof Opcode::Sub - ) - or - expr instanceof AssignMulExpr and result instanceof Opcode::Mul - or - expr instanceof AssignDivExpr and result instanceof Opcode::Div - or - expr instanceof AssignRemExpr and result instanceof Opcode::Rem - or - expr instanceof AssignAndExpr and result instanceof Opcode::BitAnd - or - expr instanceof AssignOrExpr and result instanceof Opcode::BitOr - or - expr instanceof AssignXorExpr and result instanceof Opcode::BitXor - or - expr instanceof AssignLeftShiftExpr and result instanceof Opcode::ShiftLeft - or - expr instanceof AssignRightShiftExpr and result instanceof Opcode::ShiftRight - or - expr instanceof AssignUnsighedRightShiftExpr and result instanceof Opcode::UnsignedShiftRight - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = AssignOperationLoadTag() and - opcode instanceof Opcode::Load and - resultType = getTypeForPRValue(this.getLeftOperand().getResultType()) - or - tag = AssignOperationOpTag() and - opcode = this.getOpcode() and - resultType = getTypeForPRValue(this.getConvertedLeftOperandType()) - or - tag = AssignmentStoreTag() and - opcode instanceof Opcode::Store and - resultType = getTypeForPRValue(expr.getType()) - or - this.leftOperandNeedsConversion() and - opcode instanceof Opcode::Convert and - ( - tag = AssignOperationConvertLeftTag() and - resultType = getTypeForPRValue(this.getConvertedLeftOperandType()) - or - tag = AssignOperationConvertResultTag() and - resultType = getTypeForPRValue(this.getLeftOperand().getResultType()) - ) - } - - override int getInstructionElementSize(InstructionTag tag) { - tag = AssignOperationOpTag() and - exists(Opcode opcode | - opcode = this.getOpcode() and - ( - opcode instanceof Opcode::PointerAdd or - opcode instanceof Opcode::PointerSub - ) - ) and - result = Language::getTypeSize(this.getResultType().(PointerType).getReferentType()) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = AssignOperationLoadTag() and - operandTag instanceof AddressOperandTag and - result = this.getLeftOperand().getResult() - or - this.leftOperandNeedsConversion() and - tag = AssignOperationConvertLeftTag() and - operandTag instanceof UnaryOperandTag and - result = this.getInstruction(AssignOperationLoadTag()) - or - tag = AssignOperationOpTag() and - ( - ( - operandTag instanceof LeftOperandTag and - if this.leftOperandNeedsConversion() - then result = this.getInstruction(AssignOperationConvertLeftTag()) - else result = this.getInstruction(AssignOperationLoadTag()) - ) - or - operandTag instanceof RightOperandTag and - result = this.getRightOperand().getResult() - ) - or - this.leftOperandNeedsConversion() and - tag = AssignOperationConvertResultTag() and - operandTag instanceof UnaryOperandTag and - result = this.getInstruction(AssignOperationOpTag()) - or - tag = AssignmentStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getLeftOperand().getResult() - or - operandTag instanceof StoreValueOperandTag and - result = this.getStoredValue() - ) - } -} - -/** - * Abstract class implemented by any `TranslatedElement` that has a child - * expression that is a call to a constructor, in order to - * provide a pointer to the object being constructed. - */ -abstract class ConstructorCallContext extends TranslatedElement { - /** - * Gets the instruction whose result value is the address of the object to be - * constructed. - */ - abstract Instruction getReceiver(); -} - -class TranslatedConditionalExpr extends TranslatedNonConstantExpr, ConditionContext { - override ConditionalExpr expr; - - final override TranslatedElement getChild(int id) { - id = 0 and result = this.getCondition() - or - id = 1 and result = this.getThen() - or - id = 2 and result = this.getElse() - } - - override Instruction getFirstInstruction() { result = this.getCondition().getFirstInstruction() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - not this.resultIsVoid() and - ( - ( - not this.thenIsVoid() and tag = ConditionValueTrueTempAddressTag() - or - not this.elseIsVoid() and tag = ConditionValueFalseTempAddressTag() - or - tag = ConditionValueResultTempAddressTag() - ) and - opcode instanceof Opcode::VariableAddress and - resultType = getTypeForGLValue(this.getResultType()) - or - ( - not this.thenIsVoid() and tag = ConditionValueTrueStoreTag() - or - not this.elseIsVoid() and tag = ConditionValueFalseStoreTag() - ) and - opcode instanceof Opcode::Store and - resultType = getTypeForPRValue(this.getResultType()) - or - tag = ConditionValueResultLoadTag() and - opcode instanceof Opcode::Load and - resultType = this.getResultCSharpType() - ) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - not this.resultIsVoid() and - kind instanceof GotoEdge and - ( - not this.thenIsVoid() and - ( - tag = ConditionValueTrueTempAddressTag() and - result = this.getInstruction(ConditionValueTrueStoreTag()) - or - tag = ConditionValueTrueStoreTag() and - result = this.getInstruction(ConditionValueResultTempAddressTag()) - ) - or - not this.elseIsVoid() and - ( - tag = ConditionValueFalseTempAddressTag() and - result = this.getInstruction(ConditionValueFalseStoreTag()) - or - tag = ConditionValueFalseStoreTag() and - result = this.getInstruction(ConditionValueResultTempAddressTag()) - ) - or - tag = ConditionValueResultTempAddressTag() and - result = this.getInstruction(ConditionValueResultLoadTag()) - or - tag = ConditionValueResultLoadTag() and - result = this.getParent().getChildSuccessor(this) - ) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - not this.resultIsVoid() and - ( - not this.thenIsVoid() and - tag = ConditionValueTrueStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getInstruction(ConditionValueTrueTempAddressTag()) - or - operandTag instanceof StoreValueOperandTag and - result = this.getThen().getResult() - ) - or - not this.elseIsVoid() and - tag = ConditionValueFalseStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getInstruction(ConditionValueFalseTempAddressTag()) - or - operandTag instanceof StoreValueOperandTag and - result = this.getElse().getResult() - ) - or - tag = ConditionValueResultLoadTag() and - operandTag instanceof AddressOperandTag and - result = this.getInstruction(ConditionValueResultTempAddressTag()) - ) - } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - not this.resultIsVoid() and - tag = ConditionValueTempVar() and - type = getTypeForPRValue(this.getResultType()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - not this.resultIsVoid() and - ( - tag = ConditionValueTrueTempAddressTag() or - tag = ConditionValueFalseTempAddressTag() or - tag = ConditionValueResultTempAddressTag() - ) and - result = this.getTempVariable(ConditionValueTempVar()) - } - - override Instruction getResult() { - not this.resultIsVoid() and - result = this.getInstruction(ConditionValueResultLoadTag()) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - ( - child = this.getThen() and - if this.thenIsVoid() - then result = this.getParent().getChildSuccessor(this) - else result = this.getInstruction(ConditionValueTrueTempAddressTag()) - ) - or - ( - child = this.getElse() and - if this.elseIsVoid() - then result = this.getParent().getChildSuccessor(this) - else result = this.getInstruction(ConditionValueFalseTempAddressTag()) - ) - } - - override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getCondition() and - result = this.getThen().getFirstInstruction() - } - - override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getCondition() and - result = this.getElse().getFirstInstruction() - } - - private TranslatedCondition getCondition() { - result = getTranslatedCondition(expr.getCondition()) - } - - private TranslatedExpr getThen() { result = getTranslatedExpr(expr.getThen()) } - - private TranslatedExpr getElse() { result = getTranslatedExpr(expr.getElse()) } - - private predicate thenIsVoid() { - this.getThen().getResultType() instanceof VoidType - or - // A `ThrowExpr.getType()` incorrectly returns the type of exception being - // thrown, rather than `void`. Handle that case here. - expr.getThen() instanceof ThrowExpr - } - - private predicate elseIsVoid() { - this.getElse().getResultType() instanceof VoidType - or - // A `ThrowExpr.getType()` incorrectly returns the type of exception being - // thrown, rather than `void`. Handle that case here. - expr.getElse() instanceof ThrowExpr - } - - private predicate resultIsVoid() { this.getResultType() instanceof VoidType } -} - -/** - * The IR translation of an `IsExpr`. - */ -// TODO: Once `TranslatedInitialization.qll` is refactored, -// get rid of the initialization here. -// TODO: Refactor the generated instructions since it's pretty cluttered. -class TranslatedIsExpr extends TranslatedNonConstantExpr { - override IsExpr expr; - - override Instruction getFirstInstruction() { result = this.getIsExpr().getFirstInstruction() } - - final override TranslatedElement getChild(int id) { - id = 0 and result = this.getIsExpr() - or - id = 1 and result = this.getPatternVarDecl() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = ConvertTag() and - kind instanceof GotoEdge and - result = this.getInstruction(GeneratedConstantTag()) - or - this.hasVar() and - tag = InitializerStoreTag() and - kind instanceof GotoEdge and - result = this.getParent().getChildSuccessor(this) - or - ( - tag = GeneratedNeqTag() and - kind instanceof GotoEdge and - if this.hasVar() - then result = this.getInstruction(GeneratedBranchTag()) - else result = this.getParent().getChildSuccessor(this) - ) - or - // If a var is declared, we only do the initialization - // if the `IsExpr` is evaluated to `true`. - this.hasVar() and - tag = GeneratedBranchTag() and - ( - kind instanceof TrueEdge and - result = this.getInstruction(InitializerStoreTag()) - or - kind instanceof FalseEdge and - result = this.getParent().getChildSuccessor(this) - ) - or - tag = GeneratedConstantTag() and - kind instanceof GotoEdge and - if this.hasVar() - then result = this.getPatternVarDecl().getFirstInstruction() - else result = this.getInstruction(GeneratedNeqTag()) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getIsExpr() and - result = this.getInstruction(ConvertTag()) - or - this.hasVar() and - child = this.getPatternVarDecl() and - result = this.getInstruction(GeneratedNeqTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - this.hasVar() and - tag = InitializerStoreTag() and - opcode instanceof Opcode::Store and - resultType = getTypeForPRValue(expr.getPattern().getType()) - or - tag = ConvertTag() and - opcode instanceof Opcode::CheckedConvertOrNull and - resultType = getTypeForPRValue(expr.getPattern().getType()) - or - tag = GeneratedNeqTag() and - opcode instanceof Opcode::CompareNE and - resultType = getTypeForPRValue(expr.getType()) - or - tag = GeneratedConstantTag() and - opcode instanceof Opcode::Constant and - resultType = getTypeForPRValue(expr.getPattern().getType()) - or - this.hasVar() and - tag = GeneratedBranchTag() and - opcode instanceof Opcode::ConditionalBranch and - resultType = getVoidType() - } - - override string getInstructionConstantValue(InstructionTag tag) { - tag = GeneratedConstantTag() and - // Review: "0" or "null"? - result = "0" - } - - override Instruction getResult() { result = this.getInstruction(GeneratedNeqTag()) } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = ConvertTag() and - operandTag instanceof UnaryOperandTag and - result = this.getIsExpr().getResult() - or - this.hasVar() and - tag = InitializerStoreTag() and - ( - operandTag instanceof StoreValueOperandTag and - result = this.getInstruction(ConvertTag()) - or - operandTag instanceof AddressOperandTag and - result = this.getPatternVarDecl().getTargetAddress() - ) - or - tag = GeneratedNeqTag() and - ( - operandTag instanceof LeftOperandTag and - result = this.getInstruction(ConvertTag()) - or - operandTag instanceof RightOperandTag and - result = this.getInstruction(GeneratedConstantTag()) - ) - or - this.hasVar() and - tag = GeneratedBranchTag() and - operandTag instanceof ConditionOperandTag and - result = this.getInstruction(GeneratedNeqTag()) - } - - private TranslatedExpr getIsExpr() { result = getTranslatedExpr(expr.getExpr()) } - - private predicate hasVar() { exists(this.getPatternVarDecl()) } - - private TranslatedLocalVariableDeclaration getPatternVarDecl() { - result = getTranslatedLocalDeclaration(expr.getPattern()) - } -} - -/** - * The IR translation of a lambda expression. This initializes a temporary variable whose type is that of the lambda, - * using the initializer list that represents the captures of the lambda. - */ -class TranslatedLambdaExpr extends TranslatedNonConstantExpr, InitializationContext { - override LambdaExpr expr; - - final override Instruction getFirstInstruction() { - result = this.getInstruction(InitializerVariableAddressTag()) - } - - final override TranslatedElement getChild(int id) { id = 0 and result = this.getInitialization() } - - override Instruction getResult() { result = this.getInstruction(LoadTag()) } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = InitializerVariableAddressTag() and - kind instanceof GotoEdge and - result = this.getInstruction(InitializerStoreTag()) - or - tag = InitializerStoreTag() and - kind instanceof GotoEdge and - ( - result = this.getInitialization().getFirstInstruction() - or - not this.hasInitializer() and result = this.getInstruction(LoadTag()) - ) - or - tag = LoadTag() and - kind instanceof GotoEdge and - result = this.getParent().getChildSuccessor(this) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getInitialization() and - result = this.getInstruction(LoadTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = InitializerVariableAddressTag() and - opcode instanceof Opcode::VariableAddress and - resultType = getTypeForGLValue(expr.getType()) - or - tag = InitializerStoreTag() and - opcode instanceof Opcode::Uninitialized and - resultType = getTypeForPRValue(expr.getType()) - or - tag = LoadTag() and - opcode instanceof Opcode::Load and - resultType = getTypeForPRValue(expr.getType()) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = InitializerStoreTag() and - operandTag instanceof AddressOperandTag and - result = this.getInstruction(InitializerVariableAddressTag()) - or - tag = LoadTag() and - operandTag instanceof AddressOperandTag and - result = this.getInstruction(InitializerVariableAddressTag()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - ( - tag = InitializerVariableAddressTag() or - tag = InitializerStoreTag() - ) and - result = this.getTempVariable(LambdaTempVar()) - } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = LambdaTempVar() and - type = getTypeForPRValue(this.getResultType()) - } - - final override Instruction getTargetAddress() { - result = this.getInstruction(InitializerVariableAddressTag()) - } - - final override Type getTargetType() { result = this.getResultType() } - - private predicate hasInitializer() { exists(this.getInitialization()) } - - private TranslatedInitialization getInitialization() { - result = getTranslatedInitialization(expr.getChild(0)) - } -} - -/** - * The translation of a `DelegateCall`. Since this type of call needs - * desugaring, we treat it as a special case. The AST node of the - * call expression will be the parent to a compiler generated call. - */ -class TranslatedDelegateCall extends TranslatedNonConstantExpr { - override DelegateCall expr; - - final override Instruction getFirstInstruction() { - result = this.getInvokeCall().getFirstInstruction() - } - - final override TranslatedElement getChild(int id) { id = 0 and result = this.getInvokeCall() } - - override Instruction getResult() { result = this.getInvokeCall().getResult() } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getInvokeCall() and - result = this.getParent().getChildSuccessor(this) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { none() } - - private TranslatedCompilerGeneratedCall getInvokeCall() { - result = DelegateElements::getInvoke(expr) - } -} - -/** - * Represents the IR translation of creation expression. Can be the translation of an - * `ObjectCreation` or a `DelegateCreation`. - * The `NewObj` instruction denotes the fact that during initialization a new - * object is allocated, which is then initialized by the constructor. - */ -abstract class TranslatedCreation extends TranslatedCoreExpr, TTranslatedCreationExpr, - ConstructorCallContext -{ - TranslatedCreation() { this = TTranslatedCreationExpr(expr) } - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getConstructorCall() - or - id = 1 and result = this.getInitializerExpr() - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - // Instruction that allocated space for a new object, - // and returns its address - tag = NewObjTag() and - opcode instanceof Opcode::NewObj and - resultType = getTypeForPRValue(expr.getType()) - or - this.needsLoad() and - tag = LoadTag() and - opcode instanceof Opcode::Load and - resultType = getTypeForPRValue(expr.getType()) - } - - final override Instruction getFirstInstruction() { result = this.getInstruction(NewObjTag()) } - - override Instruction getResult() { - if this.needsLoad() - then result = this.getInstruction(LoadTag()) - else result = this.getInstruction(NewObjTag()) - } - - override Instruction getReceiver() { result = this.getInstruction(NewObjTag()) } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - kind instanceof GotoEdge and - tag = NewObjTag() and - result = this.getConstructorCall().getFirstInstruction() - or - this.needsLoad() and - kind instanceof GotoEdge and - tag = LoadTag() and - result = this.getParent().getChildSuccessor(this) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - this.needsLoad() and - tag = LoadTag() and - operandTag instanceof AddressOperandTag and - result = this.getInstruction(NewObjTag()) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - ( - child = this.getConstructorCall() and - if exists(this.getInitializerExpr()) - then result = this.getInitializerExpr().getFirstInstruction() - else result = this.getLoadOrChildSuccessor() - ) - or - child = this.getInitializerExpr() and - result = this.getLoadOrChildSuccessor() - } - - private Instruction getLoadOrChildSuccessor() { - if this.needsLoad() - then result = this.getInstruction(LoadTag()) - else result = this.getParent().getChildSuccessor(this) - } - - abstract TranslatedElement getConstructorCall(); - - abstract TranslatedExpr getInitializerExpr(); - - /** - * If the newly allocated object is a value type, then we need - * to load the newly allocated object before storing it in the variable, - * since `NewObj` returns an address. - */ - abstract predicate needsLoad(); -} - -/** - * Represents the IR translation of an `ObjectCreation`. - */ -class TranslatedObjectCreation extends TranslatedCreation { - override ObjectCreation expr; - - override TranslatedExpr getInitializerExpr() { result = getTranslatedExpr(expr.getInitializer()) } - - override TranslatedConstructorCall getConstructorCall() { - // Since calls are also expressions, we can't - // use the predicate getTranslatedExpr (since that would - // also return `this`). - result.getAst() = this.getAst() - } - - override predicate needsLoad() { expr.getObjectType().isValueType() } -} - -/** - * Represents the IR translation of a `DelegateCreation`. - */ -class TranslatedDelegateCreation extends TranslatedCreation { - override DelegateCreation expr; - - override TranslatedExpr getInitializerExpr() { none() } - - override TranslatedElement getConstructorCall() { - result = DelegateElements::getConstructor(expr) - } - - override predicate needsLoad() { none() } -} - -/** - * Represents the IR translation of an assign operation where the lhs is an event access. - */ -class TranslatedEventAccess extends TranslatedNonConstantExpr { - override AssignOperation expr; - - TranslatedEventAccess() { expr.getLValue() instanceof EventAccess } - - // We only translate the lhs, since the rhs is translated as part of the - // accessor call. - override TranslatedElement getChild(int id) { id = 0 and result = this.getLValue() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - final override Instruction getFirstInstruction() { - result = this.getLValue().getFirstInstruction() - } - - override Instruction getResult() { none() } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getLValue() and - result = this.getParent().getChildSuccessor(this) - } - - private TranslatedExpr getLValue() { result = getTranslatedExpr(expr.getLValue()) } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedFunction.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedFunction.qll deleted file mode 100644 index f0970984d46..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedFunction.qll +++ /dev/null @@ -1,333 +0,0 @@ -import csharp -import experimental.ir.implementation.raw.IR -private import experimental.ir.implementation.Opcode -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.IRUtilities -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.internal.TempVariableTag -private import InstructionTag -private import TranslatedElement -private import TranslatedExpr -private import TranslatedInitialization -private import TranslatedStmt -private import experimental.ir.internal.IRCSharpLanguage as Language - -/** - * Gets the `TranslatedFunction` that represents function `callable`. - */ -TranslatedFunction getTranslatedFunction(Callable callable) { result.getAst() = callable } - -/** - * Represents the IR translation of a function. This is the root element for - * all other elements associated with this function. - */ -class TranslatedFunction extends TranslatedElement, TTranslatedFunction { - Callable callable; - - TranslatedFunction() { this = TTranslatedFunction(callable) } - - final override string toString() { result = callable.toString() } - - final override Language::AST getAst() { result = callable } - - /** - * Gets the function being translated. - */ - final override Callable getFunction() { result = callable } - - final override TranslatedElement getChild(int id) { - id = -2 and result = this.getConstructorInitializer() - or - id = -1 and result = this.getBody() - or - result = this.getParameter(id) - } - - final private TranslatedConstructorInitializer getConstructorInitializer() { - exists(ConstructorInitializer ci | - ci = callable.getAChild() and - result = getTranslatedConstructorInitializer(ci) - ) - } - - final private TranslatedStmt getBody() { result = getTranslatedStmt(callable.getBody()) } - - final private TranslatedParameter getParameter(int index) { - result = getTranslatedParameter(callable.getParameter(index)) - } - - final override Instruction getFirstInstruction() { - result = this.getInstruction(EnterFunctionTag()) - } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - kind instanceof GotoEdge and - ( - tag = EnterFunctionTag() and - result = this.getInstruction(AliasedDefinitionTag()) - or - ( - tag = AliasedDefinitionTag() and - if exists(this.getThisType()) - then result = this.getInstruction(InitializeThisTag()) - else - if exists(this.getParameter(0)) - then result = this.getParameter(0).getFirstInstruction() - else result = this.getBodyOrReturn() - ) - or - ( - tag = InitializeThisTag() and - if exists(this.getParameter(0)) - then result = this.getParameter(0).getFirstInstruction() - else - if exists(this.getConstructorInitializer()) - then result = this.getConstructorInitializer().getFirstInstruction() - else result = this.getBodyOrReturn() - ) - or - tag = ReturnValueAddressTag() and - result = this.getInstruction(ReturnTag()) - or - tag = ReturnTag() and - result = this.getInstruction(AliasedUseTag()) - or - tag = UnwindTag() and - result = this.getInstruction(AliasedUseTag()) - or - tag = AliasedUseTag() and - result = this.getInstruction(ExitFunctionTag()) - ) - } - - final override Instruction getChildSuccessor(TranslatedElement child) { - exists(int paramIndex | - child = this.getParameter(paramIndex) and - if exists(callable.getParameter(paramIndex + 1)) - then result = this.getParameter(paramIndex + 1).getFirstInstruction() - else - if exists(this.getConstructorInitializer()) - then result = this.getConstructorInitializer().getFirstInstruction() - else result = this.getBodyOrReturn() - ) - or - child = this.getConstructorInitializer() and - result = this.getBodyOrReturn() - or - child = this.getBody() and - result = this.getReturnSuccessorInstruction() - } - - private Instruction getBodyOrReturn() { - if exists(this.getBody()) - then result = this.getBody().getFirstInstruction() - else result = this.getReturnSuccessorInstruction() - } - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - ( - tag = EnterFunctionTag() and - opcode instanceof Opcode::EnterFunction and - resultType = getVoidType() - or - tag = AliasedDefinitionTag() and - opcode instanceof Opcode::AliasedDefinition and - resultType = getUnknownType() - or - tag = InitializeThisTag() and - opcode instanceof Opcode::InitializeThis and - resultType = getTypeForGLValue(this.getThisType()) - or - tag = ReturnValueAddressTag() and - opcode instanceof Opcode::VariableAddress and - not this.getReturnType() instanceof VoidType and - resultType = getTypeForGLValue(this.getReturnType()) - or - ( - tag = ReturnTag() and - resultType = getVoidType() and - if this.getReturnType() instanceof VoidType - then opcode instanceof Opcode::ReturnVoid - else opcode instanceof Opcode::ReturnValue - ) - or - tag = UnwindTag() and - opcode instanceof Opcode::Unwind and - resultType = getVoidType() and - ( - // Only generate the `Unwind` instruction if there is any exception - // handling present in the function (compiler generated or not). - exists(TryStmt try | try.getEnclosingCallable() = callable) or - exists(ThrowStmt throw | throw.getEnclosingCallable() = callable) - ) - or - tag = AliasedUseTag() and - opcode instanceof Opcode::AliasedUse and - resultType = getVoidType() - or - tag = ExitFunctionTag() and - opcode instanceof Opcode::ExitFunction and - resultType = getVoidType() - ) - } - - final override Instruction getExceptionSuccessorInstruction() { - result = this.getInstruction(UnwindTag()) - } - - final override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = ReturnTag() and - not this.getReturnType() instanceof VoidType and - operandTag instanceof AddressOperandTag and - result = this.getInstruction(ReturnValueAddressTag()) - } - - final override CSharpType getInstructionOperandType(InstructionTag tag, TypedOperandTag operandTag) { - tag = ReturnTag() and - not this.getReturnType() instanceof VoidType and - operandTag instanceof LoadOperandTag and - result = getTypeForPRValue(this.getReturnType()) - or - tag = AliasedUseTag() and - operandTag instanceof SideEffectOperandTag and - result = getUnknownType() - } - - final override IRVariable getInstructionVariable(InstructionTag tag) { - tag = ReturnValueAddressTag() and - result = this.getReturnVariable() - } - - final override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = ReturnValueTempVar() and - type = getTypeForPRValue(this.getReturnType()) and - not this.getReturnType() instanceof VoidType - } - - /** - * Gets the instruction to which control should flow after a `return` - * statement. In C#, this should be the instruction which generates `VariableAddress[#return]`. - */ - final Instruction getReturnSuccessorInstruction() { - if this.getReturnType() instanceof VoidType - then result = this.getInstruction(ReturnTag()) - else result = this.getInstruction(ReturnValueAddressTag()) - } - - /** - * Gets the variable that represents the return value of this function. - */ - final IRReturnVariable getReturnVariable() { - result = getIRTempVariable(callable, ReturnValueTempVar()) - } - - /** - * Gets the single `InitializeThis` instruction for this function. Holds only - * if the function is an instance member function, constructor, or destructor. - */ - final Instruction getInitializeThisInstruction() { - result = this.getInstruction(InitializeThisTag()) - } - - /** - * Gets the type pointed to by the `this` pointer for this function (i.e. `*this`). - * Holds only if the function is an instance member function, constructor, or destructor. - */ - final Type getThisType() { - // `callable` is a user declared member and it is not static - callable instanceof Member and - not callable.(Member).isStatic() and - result = callable.getDeclaringType() - or - // `callable` is a compiler generated accessor - callable instanceof Accessor and - not callable.(Accessor).isStatic() and - result = callable.getDeclaringType() - } - - /** - * Holds if this function defines or accesses variable `var` with type `type`. This includes all - * parameters and local variables, plus any static fields that are directly accessed by the - * function. - */ - final predicate hasUserVariable(Variable var, CSharpType type) { - ( - var.(Member).isStatic() and - exists(VariableAccess access | - access.getTarget() = var and - access.getEnclosingCallable() = callable - ) - or - var.(LocalScopeVariable).getCallable() = callable - ) and - type = getTypeForPRValue(getVariableType(var)) - } - - final private Type getReturnType() { result = callable.getReturnType() } -} - -/** - * Gets the `TranslatedParameter` that represents parameter `param`. - */ -TranslatedParameter getTranslatedParameter(Parameter param) { result.getAst() = param } - -/** - * Represents the IR translation of a function parameter, including the - * initialization of that parameter with the incoming argument. - */ -class TranslatedParameter extends TranslatedElement, TTranslatedParameter { - Parameter param; - - TranslatedParameter() { this = TTranslatedParameter(param) } - - final override string toString() { result = param.toString() } - - final override Language::AST getAst() { result = param } - - final override Callable getFunction() { result = param.getCallable() } - - final override Instruction getFirstInstruction() { - result = this.getInstruction(InitializerVariableAddressTag()) - } - - final override TranslatedElement getChild(int id) { none() } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - kind instanceof GotoEdge and - ( - tag = InitializerVariableAddressTag() and - result = this.getInstruction(InitializerStoreTag()) - or - tag = InitializerStoreTag() and - result = this.getParent().getChildSuccessor(this) - ) - } - - final override Instruction getChildSuccessor(TranslatedElement child) { none() } - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = InitializerVariableAddressTag() and - opcode instanceof Opcode::VariableAddress and - resultType = getTypeForGLValue(param.getType()) - or - tag = InitializerStoreTag() and - opcode instanceof Opcode::InitializeParameter and - resultType = getTypeForPRValue(param.getType()) - } - - final override IRVariable getInstructionVariable(InstructionTag tag) { - ( - tag = InitializerStoreTag() or - tag = InitializerVariableAddressTag() - ) and - result = getIRUserVariable(this.getFunction(), param) - } - - final override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = InitializerStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getInstruction(InitializerVariableAddressTag()) - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedInitialization.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedInitialization.qll deleted file mode 100644 index c7cb9232d55..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedInitialization.qll +++ /dev/null @@ -1,388 +0,0 @@ -/** - * Class that deals with variable initializations. - * Separated from `TranslatedExpr` for clarity. - */ - -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.internal.CSharpType -private import InstructionTag -private import TranslatedElement -private import TranslatedExpr -private import TranslatedFunction -private import IRInternal -private import desugar.Delegate - -/** - * Gets the `TranslatedInitialization` for the expression `expr`. - */ -TranslatedInitialization getTranslatedInitialization(Expr expr) { result.getExpr() = expr } - -/** - * Base class for any `TranslatedElement` that has an initialization as a child. - * Provides the child with the address and type of the location to be - * initialized. - */ -abstract class InitializationContext extends TranslatedElement { - /** - * Gets the instruction that produces the address of the location to be - * initialized. - */ - abstract Instruction getTargetAddress(); - - /** - * Gets the type of the location to be initialized. - */ - abstract Type getTargetType(); -} - -/** - * Represents the IR translation of any initialization, whether from an - * initializer list or from a direct initializer. - */ -abstract class TranslatedInitialization extends TranslatedElement, TTranslatedInitialization { - Expr expr; - - TranslatedInitialization() { this = TTranslatedInitialization(expr) } - - final override string toString() { result = "init: " + expr.toString() } - - final override Callable getFunction() { result = expr.getEnclosingCallable() } - - final override Language::AST getAst() { result = expr } - - /** - * Gets the expression that is doing the initialization. - */ - final Expr getExpr() { result = expr } - - /** - * Gets the initialization context that describes the location being - * initialized. - */ - final InitializationContext getContext() { result = this.getParent() } - - final TranslatedFunction getEnclosingFunction() { - result = getTranslatedFunction(expr.getEnclosingCallable()) - } -} - -/** - * Represents the IR translation of an initialization from an initializer list. - */ -abstract class TranslatedListInitialization extends TranslatedInitialization, InitializationContext { - override Instruction getFirstInstruction() { - result = this.getChild(0).getFirstInstruction() - or - not exists(this.getChild(0)) and result = this.getParent().getChildSuccessor(this) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int index | - child = this.getChild(index) and - if exists(this.getChild(index + 1)) - then result = this.getChild(index + 1).getFirstInstruction() - else result = this.getParent().getChildSuccessor(this) - ) - } - - final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getTargetAddress() { result = this.getContext().getTargetAddress() } - - override Type getTargetType() { result = this.getContext().getTargetType() } -} - -/** - * Represents the IR translation of an initialization of an array from an - * initializer list. - */ -class TranslatedArrayListInitialization extends TranslatedListInitialization { - override ArrayInitializer expr; - - override TranslatedElement getChild(int id) { - // The children are in initialization order - result = - rank[id + 1](TranslatedElementInitialization init | - init.getInitList() = expr - | - init order by init.getElementIndex() - ) - } -} - -/** - * Represents the IR translation of an initialization from a single initializer - * expression, where the initialization is performed via bitwise copy. - */ -class TranslatedDirectInitialization extends TranslatedInitialization { - TranslatedDirectInitialization() { - not expr instanceof ArrayInitializer and - not expr instanceof ObjectInitializer and - not expr instanceof CollectionInitializer - } - - override TranslatedElement getChild(int id) { id = 0 and result = this.getInitializer() } - - override Instruction getFirstInstruction() { - result = this.getInitializer().getFirstInstruction() - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = InitializerStoreTag() and - opcode instanceof Opcode::Store and - resultType = getTypeForPRValue(this.getContext().getTargetType()) - or - this.needsConversion() and - tag = AssignmentConvertRightTag() and - // For now only use `Opcode::Convert` to - // crudely represent conversions. Could - // be useful to represent the whole chain of conversions - opcode instanceof Opcode::Convert and - resultType = getTypeForPRValue(this.getContext().getTargetType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = InitializerStoreTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - or - this.needsConversion() and - tag = AssignmentConvertRightTag() and - result = this.getInstruction(InitializerStoreTag()) and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getInitializer() and - if this.needsConversion() - then result = this.getInstruction(AssignmentConvertRightTag()) - else result = this.getInstruction(InitializerStoreTag()) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = InitializerStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getParent().(InitializationContext).getTargetAddress() - or - ( - operandTag instanceof AddressOperandTag and - result = this.getContext().getTargetAddress() - or - operandTag instanceof StoreValueOperandTag and - result = this.getInitializer().getResult() - ) - ) - or - tag = AssignmentConvertRightTag() and - operandTag instanceof UnaryOperandTag and - result = this.getInitializer().getResult() - or - tag = AssignmentConvertRightTag() and - operandTag instanceof UnaryOperandTag and - result = this.getInstruction(NewObjTag()) - } - - TranslatedExpr getInitializer() { result = getTranslatedExpr(expr) } - - private predicate needsConversion() { expr.getType() != this.getContext().getTargetType() } -} - -/** - * Represents the IR translation of the initialization of an array element from - * an element of an initializer list. - */ -abstract class TranslatedElementInitialization extends TranslatedElement { - ArrayInitializer initList; - - final override string toString() { - result = initList.toString() + "[" + this.getElementIndex().toString() + "]" - } - - final override Language::AST getAst() { result = initList } - - final override Callable getFunction() { result = initList.getEnclosingCallable() } - - final override Instruction getFirstInstruction() { - result = this.getInstruction(this.getElementIndexTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = this.getElementIndexTag() and - opcode instanceof Opcode::Constant and - resultType = getIntType() - or - tag = this.getElementAddressTag() and - opcode instanceof Opcode::PointerAdd and - resultType = getTypeForGLValue(this.getElementType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = this.getElementIndexTag() and - result = this.getInstruction(this.getElementAddressTag()) and - kind instanceof GotoEdge - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = this.getElementAddressTag() and - ( - operandTag instanceof LeftOperandTag and - result = this.getParent().(InitializationContext).getTargetAddress() - or - operandTag instanceof RightOperandTag and - result = this.getInstruction(this.getElementIndexTag()) - ) - } - - override int getInstructionElementSize(InstructionTag tag) { - tag = this.getElementAddressTag() and - result = Language::getTypeSize(this.getElementType()) - } - - override string getInstructionConstantValue(InstructionTag tag) { - tag = this.getElementIndexTag() and - result = this.getElementIndex().toString() - } - - abstract int getElementIndex(); - - final InstructionTag getElementAddressTag() { - result = InitializerElementAddressTag(this.getElementIndex()) - } - - final InstructionTag getElementIndexTag() { - result = InitializerElementIndexTag(this.getElementIndex()) - } - - final ArrayInitializer getInitList() { result = initList } - - final Type getElementType() { result = initList.getAnElement().getType() } -} - -/** - * Represents the IR translation of the initialization of an array element from - * an explicit element in an initializer list. - */ -class TranslatedExplicitElementInitialization extends TranslatedElementInitialization, - TTranslatedExplicitElementInitialization, InitializationContext -{ - int elementIndex; - - TranslatedExplicitElementInitialization() { - this = TTranslatedExplicitElementInitialization(initList, elementIndex) - } - - override Instruction getTargetAddress() { - result = this.getInstruction(this.getElementAddressTag()) - } - - override Type getTargetType() { result = this.getElementType() } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - result = TranslatedElementInitialization.super.getInstructionSuccessor(tag, kind) - or - tag = this.getElementAddressTag() and - result = this.getInitialization().getFirstInstruction() and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getInitialization() and result = this.getParent().getChildSuccessor(this) - } - - override TranslatedElement getChild(int id) { id = 0 and result = this.getInitialization() } - - override int getElementIndex() { result = elementIndex } - - TranslatedInitialization getInitialization() { - result = getTranslatedInitialization(initList.getElement(elementIndex)) - } -} - -// TODO: Possibly refactor into something simpler -abstract class TranslatedConstructorCallFromConstructor extends TranslatedElement, - ConstructorCallContext -{ - Call call; - - final override Language::AST getAst() { result = call } - - final override TranslatedElement getChild(int id) { - id = 0 and result = this.getConstructorCall() - } - - final override Callable getFunction() { result = call.getEnclosingCallable() } - - final override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getConstructorCall() and - result = this.getParent().getChildSuccessor(this) - } - - final TranslatedExpr getConstructorCall() { result = getTranslatedExpr(call) } -} - -TranslatedConstructorInitializer getTranslatedConstructorInitializer(ConstructorInitializer ci) { - result.getAst() = ci -} - -/** - * Represents the IR translation of a call from a constructor to a base class - * constructor or another constructor in same class . - */ -// Review: do we need the conversion instructions in C#? -class TranslatedConstructorInitializer extends TranslatedConstructorCallFromConstructor, - TTranslatedConstructorInitializer -{ - TranslatedConstructorInitializer() { this = TTranslatedConstructorInitializer(call) } - - override string toString() { result = "constructor init: " + call.toString() } - - override Instruction getFirstInstruction() { - if this.needsConversion() - then result = this.getInstruction(OnlyInstructionTag()) - else result = this.getConstructorCall().getFirstInstruction() - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - this.needsConversion() and - tag = OnlyInstructionTag() and - opcode instanceof Opcode::Convert and - resultType = getTypeForGLValue(call.getTarget().getDeclaringType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - kind instanceof GotoEdge and - result = this.getConstructorCall().getFirstInstruction() - } - - override Instruction getReceiver() { - if this.needsConversion() - then result = this.getInstruction(OnlyInstructionTag()) - else result = getTranslatedFunction(this.getFunction()).getInitializeThisInstruction() - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = OnlyInstructionTag() and - operandTag instanceof UnaryOperandTag and - result = getTranslatedFunction(this.getFunction()).getInitializeThisInstruction() - } - - predicate needsConversion() { - call.getTarget().getDeclaringType() != this.getFunction().getDeclaringType() - } - - override predicate getInstructionInheritance( - InstructionTag tag, Class baseClass, Class derivedClass - ) { - tag = OnlyInstructionTag() and - baseClass = call.getTarget().getDeclaringType() and - derivedClass = this.getFunction().getDeclaringType() - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedStmt.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedStmt.qll deleted file mode 100644 index 71d8c42e170..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/TranslatedStmt.qll +++ /dev/null @@ -1,1092 +0,0 @@ -import csharp -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.TempVariableTag -private import experimental.ir.implementation.internal.OperandTag -private import InstructionTag -private import TranslatedCondition -private import TranslatedDeclaration -private import TranslatedElement -private import TranslatedExpr -private import TranslatedFunction -private import TranslatedInitialization -private import common.TranslatedConditionBase -private import IRInternal -private import experimental.ir.internal.IRUtilities -private import desugar.Foreach -private import desugar.Lock - -TranslatedStmt getTranslatedStmt(Stmt stmt) { result.getAst() = stmt } - -abstract class TranslatedStmt extends TranslatedElement, TTranslatedStmt { - Stmt stmt; - - TranslatedStmt() { this = TTranslatedStmt(stmt) } - - final override string toString() { result = stmt.toString() } - - final override Language::AST getAst() { result = stmt } - - final override Callable getFunction() { result = stmt.getEnclosingCallable() } -} - -class TranslatedEmptyStmt extends TranslatedStmt { - TranslatedEmptyStmt() { - stmt instanceof EmptyStmt or - stmt instanceof LabelStmt or - stmt instanceof CaseStmt - } - - override TranslatedElement getChild(int id) { none() } - - override Instruction getFirstInstruction() { result = this.getInstruction(OnlyInstructionTag()) } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = OnlyInstructionTag() and - opcode instanceof Opcode::NoOp and - resultType = getVoidType() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { none() } -} - -class TranslatedDeclStmt extends TranslatedStmt { - override LocalVariableDeclStmt stmt; - - override TranslatedElement getChild(int id) { result = this.getLocalDeclaration(id) } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getFirstInstruction() { - result = this.getLocalDeclaration(0).getFirstInstruction() - } - - private int getChildCount() { result = count(stmt.getAVariableDeclExpr()) } - - private TranslatedLocalDeclaration getLocalDeclaration(int index) { - result = getTranslatedLocalDeclaration(stmt.getVariableDeclExpr(index)) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int index | - child = this.getLocalDeclaration(index) and - if index = (this.getChildCount() - 1) - then result = this.getParent().getChildSuccessor(this) - else result = this.getLocalDeclaration(index + 1).getFirstInstruction() - ) - } -} - -class TranslatedExprStmt extends TranslatedStmt { - override ExprStmt stmt; - - TranslatedExpr getExpr() { result = getTranslatedExpr(stmt.getExpr()) } - - override TranslatedElement getChild(int id) { id = 0 and result = this.getExpr() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getFirstInstruction() { result = this.getExpr().getFirstInstruction() } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getExpr() and - result = this.getParent().getChildSuccessor(this) - } -} - -/** - * Class that deals with an `ExprStmt` whose child is an `AssignExpr` whose - * lvalue is an accessor call. - * Since we desugar such an expression to function call, - * we ignore the assignment and make the only child of the translated statement - * the accessor call. - */ -class TranslatedExprStmtAccessorSet extends TranslatedExprStmt { - override ExprStmt stmt; - - TranslatedExprStmtAccessorSet() { - stmt.getExpr() instanceof AssignExpr and - stmt.getExpr().(AssignExpr).getLValue() instanceof AccessorCall - } - - override TranslatedExpr getExpr() { - result = getTranslatedExpr(stmt.getExpr().(AssignExpr).getLValue()) - } - - override TranslatedElement getChild(int id) { id = 0 and result = this.getExpr() } - - override Instruction getFirstInstruction() { result = this.getExpr().getFirstInstruction() } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getExpr() and - result = this.getParent().getChildSuccessor(this) - } -} - -abstract class TranslatedReturnStmt extends TranslatedStmt { - override ReturnStmt stmt; - - final TranslatedFunction getEnclosingFunction() { - result = getTranslatedFunction(stmt.getEnclosingCallable()) - } -} - -class TranslatedReturnValueStmt extends TranslatedReturnStmt, InitializationContext { - TranslatedReturnValueStmt() { exists(stmt.getExpr()) } - - override TranslatedElement getChild(int id) { id = 0 and result = this.getInitialization() } - - override Instruction getFirstInstruction() { - result = this.getInstruction(InitializerVariableAddressTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = InitializerVariableAddressTag() and - opcode instanceof Opcode::VariableAddress and - resultType = getTypeForGLValue(this.getEnclosingFunction().getFunction().getReturnType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = InitializerVariableAddressTag() and - result = this.getInitialization().getFirstInstruction() and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getInitialization() and - result = this.getEnclosingFunction().getReturnSuccessorInstruction() - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = InitializerVariableAddressTag() and - result = this.getEnclosingFunction().getReturnVariable() - } - - override Instruction getTargetAddress() { - result = this.getInstruction(InitializerVariableAddressTag()) - } - - override Type getTargetType() { - result = this.getEnclosingFunction().getReturnVariable().getType() - } - - TranslatedInitialization getInitialization() { - result = getTranslatedInitialization(stmt.getExpr()) - } -} - -class TranslatedReturnVoidStmt extends TranslatedReturnStmt { - TranslatedReturnVoidStmt() { not exists(stmt.getExpr()) } - - override TranslatedElement getChild(int id) { none() } - - override Instruction getFirstInstruction() { result = this.getInstruction(OnlyInstructionTag()) } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = OnlyInstructionTag() and - opcode instanceof Opcode::NoOp and - resultType = getVoidType() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - result = this.getEnclosingFunction().getReturnSuccessorInstruction() and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { none() } -} - -/** - * The IR translation of a C++ `try` statement. - */ -// TODO: Make sure that if the exception is uncaught or rethrown -// finally is still executed. -class TranslatedTryStmt extends TranslatedStmt { - override TryStmt stmt; - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getBody() - or - id = 1 and result = this.getFinally() - or - result = this.getCatchClause(id - 2) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getFirstInstruction() { result = this.getBody().getFirstInstruction() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getCatchClause(_) and result = this.getFinally().getFirstInstruction() - or - child = this.getBody() and result = this.getFinally().getFirstInstruction() - or - child = this.getFinally() and result = this.getParent().getChildSuccessor(this) - } - - final Instruction getNextHandler(TranslatedClause clause) { - exists(int index | - clause = this.getCatchClause(index) and - result = this.getCatchClause(index + 1).getFirstInstruction() - ) - or - // The last catch clause flows to the exception successor of the parent - // of the `try`, because the exception successor of the `try` itself is - // the first catch clause. - clause = this.getCatchClause(count(stmt.getACatchClause()) - 1) and - result = this.getParent().getExceptionSuccessorInstruction() - } - - final override Instruction getExceptionSuccessorInstruction() { - result = this.getCatchClause(0).getFirstInstruction() - } - - private TranslatedClause getCatchClause(int index) { - result = getTranslatedStmt(stmt.getCatchClause(index)) - } - - private TranslatedStmt getFinally() { result = getTranslatedStmt(stmt.getFinally()) } - - private TranslatedStmt getBody() { result = getTranslatedStmt(stmt.getBlock()) } -} - -class TranslatedBlock extends TranslatedStmt { - override BlockStmt stmt; - - override TranslatedElement getChild(int id) { result = this.getStmt(id) } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - this.isEmpty() and - opcode instanceof Opcode::NoOp and - tag = OnlyInstructionTag() and - resultType = getVoidType() - } - - override Instruction getFirstInstruction() { - if this.isEmpty() - then result = this.getInstruction(OnlyInstructionTag()) - else result = this.getStmt(0).getFirstInstruction() - } - - private predicate isEmpty() { stmt.isEmpty() } - - private TranslatedStmt getStmt(int index) { result = getTranslatedStmt(stmt.getStmt(index)) } - - private int getStmtCount() { result = count(stmt.getAStmt()) } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int index | - child = this.getStmt(index) and - if index = (this.getStmtCount() - 1) - then result = this.getParent().getChildSuccessor(this) - else result = this.getStmt(index + 1).getFirstInstruction() - ) - } -} - -/** - * The IR translation of a C# `catch` clause. - */ -abstract class TranslatedClause extends TranslatedStmt { - override CatchClause stmt; - - override TranslatedElement getChild(int id) { id = 1 and result = this.getBlock() } - - override Instruction getFirstInstruction() { result = this.getInstruction(CatchTag()) } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getBlock() and result = this.getParent().getChildSuccessor(this) - } - - override Instruction getExceptionSuccessorInstruction() { - // A throw from within a `catch` block flows to the handler for the parent of - // the `try`. - result = this.getParent().getParent().getExceptionSuccessorInstruction() - } - - TranslatedStmt getBlock() { result = getTranslatedStmt(stmt.getBlock()) } -} - -/** - * The IR translation of a C# `catch` block that catches an exception with a - * specific type (e.g. `catch (Exception ex) { ... }`). - */ -class TranslatedCatchByTypeClause extends TranslatedClause { - TranslatedCatchByTypeClause() { stmt instanceof SpecificCatchClause } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = CatchTag() and - opcode instanceof Opcode::CatchByType and - resultType = getVoidType() - } - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getParameter() - or - result = super.getChild(id) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - result = super.getChildSuccessor(child) - or - child = this.getParameter() and result = this.getBlock().getFirstInstruction() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = CatchTag() and - ( - kind instanceof GotoEdge and - result = this.getParameter().getFirstInstruction() - or - kind instanceof ExceptionEdge and - result = this.getParent().(TranslatedTryStmt).getNextHandler(this) - ) - } - - override CSharpType getInstructionExceptionType(InstructionTag tag) { - tag = CatchTag() and - result = getTypeForPRValue(stmt.(SpecificCatchClause).getVariable().getType()) - } - - private TranslatedLocalDeclaration getParameter() { - result = getTranslatedLocalDeclaration(stmt.(SpecificCatchClause).getVariableDeclExpr()) - } -} - -/** - * The IR translation of catch block with no parameters. - */ -class TranslatedGeneralCatchClause extends TranslatedClause { - TranslatedGeneralCatchClause() { stmt instanceof GeneralCatchClause } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = CatchTag() and - opcode instanceof Opcode::CatchAny and - resultType = getVoidType() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = CatchTag() and - kind instanceof GotoEdge and - result = this.getBlock().getFirstInstruction() - } -} - -/** - * The IR translation of a throw statement that throws an exception, - * as opposed to just rethrowing one. - */ -class TranslatedThrowExceptionStmt extends TranslatedStmt, InitializationContext { - override ThrowStmt stmt; - - TranslatedThrowExceptionStmt() { - // Must throw an exception - exists(stmt.getExpr()) - } - - override TranslatedElement getChild(int id) { id = 0 and result = this.getInitialization() } - - override Instruction getFirstInstruction() { - result = this.getInstruction(InitializerVariableAddressTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = ThrowTag() and - opcode instanceof Opcode::ThrowValue and - resultType = getVoidType() - or - tag = InitializerVariableAddressTag() and - opcode instanceof Opcode::VariableAddress and - resultType = getTypeForGLValue(this.getExceptionType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = ThrowTag() and - kind instanceof ExceptionEdge and - result = this.getParent().getExceptionSuccessorInstruction() - or - tag = InitializerVariableAddressTag() and - result = this.getInitialization().getFirstInstruction() and - kind instanceof GotoEdge - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getInitialization() and - result = this.getInstruction(ThrowTag()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = InitializerVariableAddressTag() and - result = getIRTempVariable(stmt, ThrowTempVar()) - } - - final override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = ThrowTempVar() and - type = getTypeForPRValue(this.getExceptionType()) - } - - final override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = ThrowTag() and - operandTag instanceof AddressOperandTag and - result = this.getInstruction(InitializerVariableAddressTag()) - } - - final override CSharpType getInstructionOperandType(InstructionTag tag, TypedOperandTag operandTag) { - tag = ThrowTag() and - operandTag instanceof LoadOperandTag and - result = getTypeForPRValue(this.getExceptionType()) - } - - override Instruction getTargetAddress() { - result = this.getInstruction(InitializerVariableAddressTag()) - } - - override Type getTargetType() { result = this.getExceptionType() } - - TranslatedInitialization getInitialization() { - result = getTranslatedInitialization(stmt.getExpr()) - } - - private Type getExceptionType() { result = stmt.getExpr().getType() } -} - -/** - * The IR translation of a simple throw statement, ie. one that just - * rethrows an exception. - */ -class TranslatedEmptyThrowStmt extends TranslatedStmt { - override ThrowStmt stmt; - - TranslatedEmptyThrowStmt() { not exists(stmt.getExpr()) } - - override TranslatedElement getChild(int id) { none() } - - override Instruction getFirstInstruction() { result = this.getInstruction(ThrowTag()) } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = ThrowTag() and - opcode instanceof Opcode::ReThrow and - resultType = getVoidType() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = ThrowTag() and - kind instanceof ExceptionEdge and - result = this.getParent().getExceptionSuccessorInstruction() - } - - override Instruction getChildSuccessor(TranslatedElement child) { none() } -} - -class TranslatedIfStmt extends TranslatedStmt, ConditionContext { - override IfStmt stmt; - - override Instruction getFirstInstruction() { result = this.getCondition().getFirstInstruction() } - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getCondition() - or - id = 1 and result = this.getThen() - or - id = 2 and result = this.getElse() - } - - private TranslatedCondition getCondition() { - result = getTranslatedCondition(stmt.getCondition()) - } - - private TranslatedStmt getThen() { result = getTranslatedStmt(stmt.getThen()) } - - private TranslatedStmt getElse() { result = getTranslatedStmt(stmt.getElse()) } - - private predicate hasElse() { exists(stmt.getElse()) } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getCondition() and - result = this.getThen().getFirstInstruction() - } - - override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getCondition() and - if this.hasElse() - then result = this.getElse().getFirstInstruction() - else result = this.getParent().getChildSuccessor(this) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - (child = this.getThen() or child = this.getElse()) and - result = this.getParent().getChildSuccessor(this) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } -} - -abstract class TranslatedLoop extends TranslatedStmt, ConditionContext { - override LoopStmt stmt; - - final TranslatedCondition getCondition() { result = getTranslatedCondition(stmt.getCondition()) } - - final TranslatedStmt getBody() { result = getTranslatedStmt(stmt.getBody()) } - - final Instruction getFirstConditionInstruction() { - if this.hasCondition() - then result = this.getCondition().getFirstInstruction() - else result = this.getBody().getFirstInstruction() - } - - final predicate hasCondition() { exists(stmt.getCondition()) } - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getCondition() - or - id = 1 and result = this.getBody() - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - final override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getCondition() and result = this.getBody().getFirstInstruction() - } - - final override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getCondition() and result = this.getParent().getChildSuccessor(this) - } -} - -class TranslatedWhileStmt extends TranslatedLoop { - TranslatedWhileStmt() { stmt instanceof WhileStmt } - - override Instruction getFirstInstruction() { result = this.getFirstConditionInstruction() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getBody() and result = this.getFirstConditionInstruction() - } -} - -class TranslatedDoStmt extends TranslatedLoop { - TranslatedDoStmt() { stmt instanceof DoStmt } - - override Instruction getFirstInstruction() { result = this.getBody().getFirstInstruction() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getBody() and result = this.getFirstConditionInstruction() - } -} - -class TranslatedForStmt extends TranslatedLoop { - override ForStmt stmt; - - override TranslatedElement getChild(int id) { - this.initializerIndex(id) and result = this.getDeclAndInit(id) - or - result = this.getUpdate(this.updateIndex(id)) - or - id = this.initializersNo() + this.updatesNo() and result = this.getCondition() - or - id = this.initializersNo() + this.updatesNo() + 1 and result = this.getBody() - } - - private TranslatedElement getDeclAndInit(int index) { - if stmt.getInitializer(index) instanceof LocalVariableDeclExpr - then result = getTranslatedLocalDeclaration(stmt.getInitializer(index)) - else result = getTranslatedExpr(stmt.getInitializer(index)) - } - - private predicate hasInitialization() { exists(stmt.getAnInitializer()) } - - TranslatedExpr getUpdate(int index) { result = getTranslatedExpr(stmt.getUpdate(index)) } - - private predicate hasUpdate() { exists(stmt.getAnUpdate()) } - - private int initializersNo() { result = count(stmt.getAnInitializer()) } - - private int updatesNo() { result = count(stmt.getAnUpdate()) } - - private predicate initializerIndex(int index) { index in [0 .. this.initializersNo() - 1] } - - private int updateIndex(int index) { - result in [0 .. this.updatesNo() - 1] and - index = this.initializersNo() + result - } - - override Instruction getFirstInstruction() { - if this.hasInitialization() - then result = this.getDeclAndInit(0).getFirstInstruction() - else result = this.getFirstConditionInstruction() - } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int index | - child = this.getDeclAndInit(index) and - index < this.initializersNo() - 1 and - result = this.getDeclAndInit(index + 1).getFirstInstruction() - ) - or - child = this.getDeclAndInit(this.initializersNo() - 1) and - result = this.getFirstConditionInstruction() - or - ( - child = this.getBody() and - if this.hasUpdate() - then result = this.getUpdate(0).getFirstInstruction() - else result = this.getFirstConditionInstruction() - ) - or - exists(int index | - child = this.getUpdate(index) and - result = this.getUpdate(index + 1).getFirstInstruction() - ) - or - child = this.getUpdate(this.updatesNo() - 1) and - result = this.getFirstConditionInstruction() - } -} - -/** - * Base class for the translation of `BreakStmt`s and `GotoStmt`s. - */ -abstract class TranslatedSpecificJump extends TranslatedStmt { - override Instruction getFirstInstruction() { result = this.getInstruction(OnlyInstructionTag()) } - - override TranslatedElement getChild(int id) { none() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = OnlyInstructionTag() and - opcode instanceof Opcode::NoOp and - resultType = getVoidType() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - kind instanceof GotoEdge and - result = this.getTargetInstruction() - } - - override Instruction getChildSuccessor(TranslatedElement child) { none() } - - /** - * Gets the instruction that is the target of the jump. - */ - abstract Instruction getTargetInstruction(); -} - -class TranslatedBreakStmt extends TranslatedSpecificJump { - override BreakStmt stmt; - - override Instruction getTargetInstruction() { result = getEnclosingLoopOrSwitchNextInstr(stmt) } -} - -private Instruction getEnclosingLoopOrSwitchNextInstr(Stmt crtStmt) { - if crtStmt instanceof LoopStmt or crtStmt instanceof SwitchStmt - then result = getTranslatedStmt(crtStmt).getParent().getChildSuccessor(getTranslatedStmt(crtStmt)) - else result = getEnclosingLoopOrSwitchNextInstr(crtStmt.getParent()) -} - -class TranslatedContinueStmt extends TranslatedSpecificJump { - override ContinueStmt stmt; - - override Instruction getTargetInstruction() { result = getEnclosingLoopTargetInstruction(stmt) } -} - -private Instruction getEnclosingLoopTargetInstruction(Stmt crtStmt) { - if crtStmt instanceof ForStmt - then result = getNextForInstruction(crtStmt) - else - if crtStmt instanceof LoopStmt - then result = getTranslatedStmt(crtStmt).getFirstInstruction() - else result = getEnclosingLoopTargetInstruction(crtStmt.getParent()) -} - -private Instruction getNextForInstruction(ForStmt for) { - if exists(for.getUpdate(0)) - then result = getTranslatedStmt(for).(TranslatedForStmt).getUpdate(0).getFirstInstruction() - else - if exists(for.getCondition()) - then result = getTranslatedStmt(for).(TranslatedForStmt).getCondition().getFirstInstruction() - else result = getTranslatedStmt(for).(TranslatedForStmt).getBody().getFirstInstruction() -} - -class TranslatedGotoLabelStmt extends TranslatedSpecificJump { - override GotoLabelStmt stmt; - - override Instruction getTargetInstruction() { - result = getTranslatedStmt(stmt.getTarget()).getFirstInstruction() - } -} - -class TranslatedGotoCaseStmt extends TranslatedSpecificJump { - override GotoCaseStmt stmt; - - override Instruction getTargetInstruction() { - result = getCase(stmt, stmt.getExpr()).getFirstInstruction() - } -} - -private TranslatedStmt getCase(Stmt crtStmt, Expr expr) { - if crtStmt instanceof SwitchStmt - then - exists(CaseStmt caseStmt | - caseStmt = crtStmt.(SwitchStmt).getACase() and - // We check for the constant value of the expression - // since we can't check for equality between `PatternExpr` and `Expr` - caseStmt.getPattern().getValue() = expr.getValue() and - result = getTranslatedStmt(caseStmt) - ) - else result = getCase(crtStmt.getParent(), expr) -} - -class TranslatedGotoDefaultStmt extends TranslatedSpecificJump { - override GotoDefaultStmt stmt; - - override Instruction getTargetInstruction() { - result = getDefaultCase(stmt).getFirstInstruction() - } -} - -private TranslatedStmt getDefaultCase(Stmt crtStmt) { - if crtStmt instanceof SwitchStmt - then - exists(CaseStmt caseStmt | - caseStmt = crtStmt.(SwitchStmt).getDefaultCase() and - result = getTranslatedStmt(caseStmt) - ) - else result = getDefaultCase(crtStmt.getParent()) -} - -class TranslatedSwitchStmt extends TranslatedStmt { - override SwitchStmt stmt; - - private TranslatedExpr getSwitchExpr() { result = getTranslatedExpr(stmt.getExpr()) } - - override Instruction getFirstInstruction() { result = this.getSwitchExpr().getFirstInstruction() } - - override TranslatedElement getChild(int id) { - if id = -1 - then - // The switch expression. - result = getTranslatedExpr(stmt.getChild(0)) - else - if id = 0 - then - // The first case's body. - result = getTranslatedStmt(stmt.getChild(0)) - else - // The subsequent case's bodies. - result = getTranslatedStmt(stmt.getChild(id)) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = SwitchBranchTag() and - opcode instanceof Opcode::Switch and - resultType = getVoidType() - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = SwitchBranchTag() and - operandTag instanceof ConditionOperandTag and - result = this.getSwitchExpr().getResult() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = SwitchBranchTag() and - exists(CaseStmt caseStmt | - caseStmt = stmt.getACase() and - kind = this.getCaseEdge(caseStmt) and - result = getTranslatedStmt(caseStmt).getFirstInstruction() - ) - or - not exists(stmt.getDefaultCase()) and - tag = SwitchBranchTag() and - kind instanceof DefaultEdge and - result = this.getParent().getChildSuccessor(this) - } - - private EdgeKind getCaseEdge(CaseStmt caseStmt) { - if caseStmt instanceof DefaultCase - then result instanceof DefaultEdge - else - exists(CaseEdge edge | - result = edge and - hasCaseEdge(caseStmt, edge.getMinValue(), edge.getMinValue()) - ) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getSwitchExpr() and result = this.getInstruction(SwitchBranchTag()) - or - exists(int index, int numStmts | - numStmts = count(stmt.getAChild()) and - child = getTranslatedStmt(stmt.getChild(index)) and - if index = (numStmts - 1) - then result = this.getParent().getChildSuccessor(this) - else result = getTranslatedStmt(stmt.getChild(index + 1)).getFirstInstruction() - ) - } -} - -class TranslatedEnumeratorForeach extends TranslatedLoop { - override ForeachStmt stmt; - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getTempEnumDecl() - or - id = 1 and result = this.getTry() - } - - override Instruction getFirstInstruction() { - result = this.getTempEnumDecl().getFirstInstruction() - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getTempEnumDecl() and - result = this.getTry().getFirstInstruction() - or - child = this.getTry() and - result = this.getParent().getChildSuccessor(this) - } - - private TranslatedElement getTry() { result = ForeachElements::getTry(stmt) } - - private TranslatedElement getTempEnumDecl() { result = ForeachElements::getEnumDecl(stmt) } -} - -class TranslatedUnsafeStmt extends TranslatedStmt { - override UnsafeStmt stmt; - - override TranslatedElement getChild(int id) { id = 0 and result = this.getBlock() } - - override Instruction getFirstInstruction() { result = this.getBlock().getFirstInstruction() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getBlock() and - result = this.getParent().getChildSuccessor(this) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - private TranslatedStmt getBlock() { result = getTranslatedStmt(stmt.getBlock()) } -} - -// TODO: does not reflect the fixed part, just treats the stmt -// as some declarations followed by the body -class TranslatedFixedStmt extends TranslatedStmt { - override FixedStmt stmt; - - override TranslatedElement getChild(int id) { - result = this.getDecl(id) - or - id = this.noDecls() and result = this.getBody() - } - - override Instruction getFirstInstruction() { result = this.getDecl(0).getFirstInstruction() } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int id | - child = this.getDecl(id) and - id < this.noDecls() - 1 and - result = this.getDecl(id + 1).getFirstInstruction() - ) - or - child = this.getDecl(this.noDecls() - 1) and result = this.getBody().getFirstInstruction() - or - child = this.getBody() and result = this.getParent().getChildSuccessor(this) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - private TranslatedLocalDeclaration getDecl(int id) { - result = getTranslatedLocalDeclaration(stmt.getVariableDeclExpr(id)) - } - - private int noDecls() { result = count(stmt.getAVariableDeclExpr()) } - - private TranslatedStmt getBody() { result = getTranslatedStmt(stmt.getBody()) } -} - -class TranslatedLockStmt extends TranslatedStmt { - override LockStmt stmt; - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getLockedVarDecl() - or - id = 1 and result = this.getLockWasTakenDecl() - or - id = 2 and result = this.getTry() - } - - override Instruction getFirstInstruction() { - result = this.getLockedVarDecl().getFirstInstruction() - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getLockedVarDecl() and - result = this.getLockWasTakenDecl().getFirstInstruction() - or - child = this.getLockWasTakenDecl() and - result = this.getTry().getFirstInstruction() - or - child = this.getTry() and - result = this.getParent().getChildSuccessor(this) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - private TranslatedElement getTry() { result = LockElements::getTry(stmt) } - - private TranslatedElement getLockedVarDecl() { result = LockElements::getLockedVarDecl(stmt) } - - private TranslatedElement getLockWasTakenDecl() { - result = LockElements::getLockWasTakenDecl(stmt) - } -} - -// TODO: Should be modeled using the desugaring framework for a -// more exact translation. -class TranslatedCheckedUncheckedStmt extends TranslatedStmt { - TranslatedCheckedUncheckedStmt() { - stmt instanceof CheckedStmt or - stmt instanceof UncheckedStmt - } - - override TranslatedElement getChild(int id) { id = 0 and result = this.getBody() } - - override Instruction getFirstInstruction() { result = this.getBody().getFirstInstruction() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getBody() and - result = this.getParent().getChildSuccessor(this) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - private TranslatedElement getBody() { - result = getTranslatedStmt(stmt.(CheckedStmt).getBlock()) or - result = getTranslatedStmt(stmt.(UncheckedStmt).getBlock()) - } -} - -// TODO: Should be modeled using the desugaring framework for a -// more exact translation. -class TranslatedUsingBlockStmt extends TranslatedStmt { - override UsingBlockStmt stmt; - - override TranslatedElement getChild(int id) { - result = this.getDecl(id) - or - id = this.getNumberOfDecls() and result = this.getBody() - } - - override Instruction getFirstInstruction() { - if this.getNumberOfDecls() > 0 - then result = this.getDecl(0).getFirstInstruction() - else result = this.getBody().getFirstInstruction() - } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int id | - child = this.getDecl(id) and - result = this.getDecl(id + 1).getFirstInstruction() - ) - or - child = this.getDecl(this.getNumberOfDecls() - 1) and - result = this.getBody().getFirstInstruction() - or - child = this.getBody() and result = this.getParent().getChildSuccessor(this) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - private TranslatedLocalDeclaration getDecl(int id) { - result = getTranslatedLocalDeclaration(stmt.getVariableDeclExpr(id)) - } - - private int getNumberOfDecls() { result = count(stmt.getAVariableDeclExpr()) } - - private TranslatedStmt getBody() { result = getTranslatedStmt(stmt.getBody()) } -} - -// TODO: Should be modeled using the desugaring framework for a -// more exact translation. -class TranslatedUsingDeclStmt extends TranslatedStmt { - override UsingDeclStmt stmt; - - override TranslatedElement getChild(int id) { result = this.getDecl(id) } - - override Instruction getFirstInstruction() { result = this.getDecl(0).getFirstInstruction() } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int id | - child = this.getDecl(id) and - id < this.noDecls() - 1 and - result = this.getDecl(id + 1).getFirstInstruction() - ) - or - child = this.getDecl(this.noDecls() - 1) and result = this.getParent().getChildSuccessor(this) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - private TranslatedLocalDeclaration getDecl(int id) { - result = getTranslatedLocalDeclaration(stmt.getVariableDeclExpr(id)) - } - - private int noDecls() { result = count(stmt.getAVariableDeclExpr()) } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedCallBase.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedCallBase.qll deleted file mode 100644 index 6243663f1cc..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedCallBase.qll +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Contains an abstract class that serves as a Base for classes that deal with the translation of calls - * (both AST generated and compiler generated). - */ - -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.implementation.raw.internal.InstructionTag -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.TranslatedExpr -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.IRCSharpLanguage as Language -private import TranslatedExprBase - -abstract class TranslatedCallBase extends TranslatedElement { - final override TranslatedElement getChild(int id) { - // We choose the child's id in the order of evaluation. - // Note: some calls do need qualifiers, though instructions for them have already - // been generated; eg. a constructor does not need to generate a qualifier, - // though the `this` argument exists and is the result of the instruction - // that allocated the new object. For those calls, `getQualifier()` should - // be void. - id = -1 and result = this.getQualifier() - or - result = this.getArgument(id) - } - - final override Instruction getFirstInstruction() { - if exists(this.getQualifier()) - then result = this.getQualifier().getFirstInstruction() - else result = this.getInstruction(CallTargetTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = CallTag() and - opcode instanceof Opcode::Call and - resultType = getTypeForPRValue(this.getCallResultType()) - or - this.hasSideEffect() and - tag = CallSideEffectTag() and - ( - if this.hasWriteSideEffect() - then ( - opcode instanceof Opcode::CallSideEffect and - resultType = getUnknownType() - ) else ( - opcode instanceof Opcode::CallReadSideEffect and - resultType = getUnknownType() - ) - ) - or - tag = CallTargetTag() and - opcode instanceof Opcode::FunctionAddress and - // Since the DB does not have a function type, - // we just use the UnknownType - resultType = getFunctionAddressType() - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getQualifier() and - result = this.getInstruction(CallTargetTag()) - or - exists(int argIndex | - child = this.getArgument(argIndex) and - if exists(this.getArgument(argIndex + 1)) - then result = this.getArgument(argIndex + 1).getFirstInstruction() - else result = this.getInstruction(CallTag()) - ) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - kind instanceof GotoEdge and - ( - ( - tag = CallTag() and - if this.hasSideEffect() - then result = this.getInstruction(CallSideEffectTag()) - else result = this.getParent().getChildSuccessor(this) - ) - or - this.hasSideEffect() and - tag = CallSideEffectTag() and - result = this.getParent().getChildSuccessor(this) - or - tag = CallTargetTag() and - kind instanceof GotoEdge and - result = this.getFirstArgumentOrCallInstruction() - ) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = CallTag() and - ( - operandTag instanceof CallTargetOperandTag and - result = this.getInstruction(CallTargetTag()) - or - operandTag instanceof ThisArgumentOperandTag and - result = this.getQualifierResult() - or - exists(PositionalArgumentOperandTag argTag | - argTag = operandTag and - result = this.getArgument(argTag.getArgIndex()).getResult() - ) - ) - } - - final override CSharpType getInstructionOperandType(InstructionTag tag, TypedOperandTag operandTag) { - tag = CallSideEffectTag() and - this.hasSideEffect() and - operandTag instanceof SideEffectOperandTag and - result = getUnknownType() - } - - Instruction getResult() { result = this.getInstruction(CallTag()) } - - /** - * Gets the result type of the call. - */ - abstract Type getCallResultType(); - - /** - * Holds if the call has a `this` argument. - */ - predicate hasQualifier() { exists(this.getQualifier()) } - - /** - * Gets the expr for the qualifier of the call. - */ - abstract TranslatedExprBase getQualifier(); - - /** - * Gets the instruction whose result value is the `this` argument of the call. - * In general, this is just the result of `getQualifier()`, but it can be - * overridden by a subclass for cases where there is a `this` argument that is - * not computed from a child expression (e.g. a constructor call). - */ - abstract Instruction getQualifierResult(); - - /** - * Gets the argument with the specified `index`. Does not include the `this` - * argument. We use `TranslatedExprBase` so that we can give both `TranslatedExpr` args, - * in the case of AST generated arguments, or `TranslatedCompilerElement` args in the case of - * compiler generated arguments. - */ - abstract TranslatedExprBase getArgument(int index); - - /** - * If there are any arguments, gets the first instruction of the first - * argument. Otherwise, returns the call instruction. - */ - final Instruction getFirstArgumentOrCallInstruction() { - if this.hasArguments() - then result = this.getArgument(0).getFirstInstruction() - else result = this.getInstruction(CallTag()) - } - - /** - * Holds if the call has any arguments, not counting the `this` argument. - */ - final predicate hasArguments() { exists(this.getArgument(0)) } - - predicate hasReadSideEffect() { any() } - - predicate hasWriteSideEffect() { any() } - - private predicate hasSideEffect() { this.hasReadSideEffect() or this.hasWriteSideEffect() } - - override Instruction getPrimaryInstructionForSideEffect(InstructionTag tag) { - this.hasSideEffect() and - tag = CallSideEffectTag() and - result = this.getResult() - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedConditionBase.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedConditionBase.qll deleted file mode 100644 index ec12b31f986..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedConditionBase.qll +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Contains several abstract classes that serve as Bases. - */ - -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.implementation.raw.internal.InstructionTag -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.TranslatedExpr -private import experimental.ir.implementation.raw.internal.TranslatedCondition -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.IRCSharpLanguage as Language - -/** - * Represents the context of the condition, ie. provides - * information about the instruction that follows a conditional branch. - */ -abstract class ConditionContext extends TranslatedElement { - abstract Instruction getChildTrueSuccessor(ConditionBase child); - - abstract Instruction getChildFalseSuccessor(ConditionBase child); -} - -/** - * Abstract class that serves as a Base for the classes that deal with both the AST generated conditions - * and the compiler generated ones (captures the common patterns). - */ -abstract class ConditionBase extends TranslatedElement { - final ConditionContext getConditionContext() { result = this.getParent() } -} - -/** - * Abstract class that serves as a Base for the classes that deal with both the AST generated _value_ conditions - * and the compiler generated ones (captures the common patterns). - */ -abstract class ValueConditionBase extends ConditionBase { - override TranslatedElement getChild(int id) { id = 0 and result = this.getValueExpr() } - - override Instruction getFirstInstruction() { result = this.getValueExpr().getFirstInstruction() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = ValueConditionConditionalBranchTag() and - opcode instanceof Opcode::ConditionalBranch and - resultType = getVoidType() - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getValueExpr() and - result = this.getInstruction(ValueConditionConditionalBranchTag()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = ValueConditionConditionalBranchTag() and - ( - kind instanceof TrueEdge and - result = this.getConditionContext().getChildTrueSuccessor(this) - or - kind instanceof FalseEdge and - result = this.getConditionContext().getChildFalseSuccessor(this) - ) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - tag = ValueConditionConditionalBranchTag() and - operandTag instanceof ConditionOperandTag and - result = this.valueExprResult() - } - - /** - * Gets the instruction that represents the result of the value expression. - */ - abstract Instruction valueExprResult(); - - /** - * Gets the `TranslatedElements that represents the value expression. - */ - abstract TranslatedElement getValueExpr(); -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedDeclarationBase.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedDeclarationBase.qll deleted file mode 100644 index a4e6501d0e4..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedDeclarationBase.qll +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Contains an abstract class that serves as a Base for the classes that deal with both the AST - * generated declarations and the compiler generated ones (captures the common patterns). - */ - -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.internal.IRUtilities -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.implementation.raw.internal.InstructionTag -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.TranslatedExpr -private import experimental.ir.implementation.raw.internal.TranslatedInitialization -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.IRCSharpLanguage as Language - -abstract class LocalVariableDeclarationBase extends TranslatedElement { - override TranslatedElement getChild(int id) { id = 0 and result = this.getInitialization() } - - override Instruction getFirstInstruction() { result = this.getVarAddress() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = InitializerVariableAddressTag() and - opcode instanceof Opcode::VariableAddress and - resultType = getTypeForGLValue(this.getVarType()) - or - this.hasUninitializedInstruction() and - tag = InitializerStoreTag() and - opcode instanceof Opcode::Uninitialized and - resultType = getTypeForPRValue(this.getVarType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - ( - tag = InitializerVariableAddressTag() and - kind instanceof GotoEdge and - if this.hasUninitializedInstruction() - then result = this.getInstruction(InitializerStoreTag()) - else result = this.getInitialization().getFirstInstruction() - ) - or - this.hasUninitializedInstruction() and - kind instanceof GotoEdge and - tag = InitializerStoreTag() and - ( - result = this.getInitialization().getFirstInstruction() - or - not exists(this.getInitialization()) and result = this.getParent().getChildSuccessor(this) - ) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getInitialization() and result = this.getParent().getChildSuccessor(this) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - this.hasUninitializedInstruction() and - tag = InitializerStoreTag() and - operandTag instanceof AddressOperandTag and - result = this.getVarAddress() - } - - /** - * Holds if the declaration should have an `Uninitialized` instruction. - * Compiler generated elements should override this predicate and - * make it empty, since we always initialize the vars declared during the - * desugaring process. - */ - predicate hasUninitializedInstruction() { - not exists(this.getInitialization()) or - this.getInitialization() instanceof TranslatedListInitialization - } - - Instruction getVarAddress() { result = this.getInstruction(InitializerVariableAddressTag()) } - - /** - * Gets the declared variable. For compiler generated elements, this - * should be empty (since we treat temp vars differently). - */ - abstract LocalVariable getDeclVar(); - - /** - * Gets the type of the declared variable. - */ - abstract Type getVarType(); - - /** - * Gets the initialization, if there is one. - * For compiler generated elements we don't treat the initialization - * as a different step, but do it during the declaration. - */ - abstract TranslatedElement getInitialization(); -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedExprBase.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedExprBase.qll deleted file mode 100644 index ec6a8c0ab00..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/common/TranslatedExprBase.qll +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Contains an abstract class that serves as a Base for classes that deal with the translation of exprs - * (both AST generated and compiler generated). - */ - -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.internal.IRCSharpLanguage as Language - -abstract class TranslatedExprBase extends TranslatedElement { - /** - * Gets the instruction that produces the result of the expression. - */ - abstract Instruction getResult(); -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Common.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Common.qll deleted file mode 100644 index d9c7910be4c..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Common.qll +++ /dev/null @@ -1,235 +0,0 @@ -/** - * Exposes several patterns for the compiler generated code, so as to improve code sharing between files that - * deal with the desugaring process. - * For example, we expose the `try ... finally` pattern, which is shared by the desugaring of both the - * `ForeachStmt`, `UsingStmt` and `LockStmt`. - */ - -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.TempVariableTag -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.TranslatedFunction -private import experimental.ir.implementation.raw.internal.InstructionTag -private import internal.TranslatedCompilerGeneratedStmt -private import internal.TranslatedCompilerGeneratedExpr -private import internal.TranslatedCompilerGeneratedCondition -private import internal.TranslatedCompilerGeneratedCall -private import internal.TranslatedCompilerGeneratedElement -private import internal.TranslatedCompilerGeneratedDeclaration -private import experimental.ir.implementation.raw.internal.common.TranslatedConditionBase -private import experimental.ir.implementation.raw.internal.common.TranslatedExprBase -private import experimental.ir.internal.IRCSharpLanguage as Language - -/** - * The general form of a compiler generated try stmt. - * The concrete implementation needs to specify the body of the try and the - * finally block. - */ -abstract class TranslatedCompilerGeneratedTry extends TranslatedCompilerGeneratedStmt { - override Stmt generatedBy; - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getBody() - or - id = 1 and result = this.getFinally() - } - - override Instruction getFirstInstruction() { result = this.getBody().getFirstInstruction() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getBody() and result = this.getFinally().getFirstInstruction() - or - child = this.getFinally() and result = this.getParent().getChildSuccessor(this) - } - - override Instruction getExceptionSuccessorInstruction() { - result = this.getParent().getExceptionSuccessorInstruction() - } - - /** - * Gets the finally block. - */ - abstract TranslatedElement getFinally(); - - /** - * Gets the body of the try stmt. - */ - abstract TranslatedElement getBody(); -} - -/** - * The general form of a compiler generated constant expression. - * The concrete implementation needs to specify the immediate operand that represents the constant. - */ -abstract class TranslatedCompilerGeneratedConstant extends TranslatedCompilerGeneratedExpr { - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - opcode instanceof Opcode::Constant and - tag = OnlyInstructionTag() and - resultType = getTypeForPRValue(this.getResultType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - tag = OnlyInstructionTag() and - kind instanceof GotoEdge and - result = this.getParent().getChildSuccessor(this) - } - - override Instruction getFirstInstruction() { result = this.getInstruction(OnlyInstructionTag()) } - - override TranslatedElement getChild(int id) { none() } - - override Instruction getChildSuccessor(TranslatedElement child) { none() } -} - -/** - * The general form of a compiler generated block stmt. - * The concrete implementation needs to specify the statements that - * compose the block. - */ -abstract class TranslatedCompilerGeneratedBlock extends TranslatedCompilerGeneratedStmt { - override TranslatedElement getChild(int id) { result = this.getStmt(id) } - - override Instruction getFirstInstruction() { result = this.getStmt(0).getFirstInstruction() } - - abstract TranslatedElement getStmt(int index); - - private int getStmtCount() { result = count(this.getStmt(_)) } - - override Instruction getChildSuccessor(TranslatedElement child) { - exists(int index | - child = this.getStmt(index) and - if index = (this.getStmtCount() - 1) - then result = this.getParent().getChildSuccessor(this) - else result = this.getStmt(index + 1).getFirstInstruction() - ) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } -} - -/** - * The general form of a compiler generated if stmt. - * The concrete implementation needs to specify the condition, - * the body of the `then` and the body of the `else`. - */ -abstract class TranslatedCompilerGeneratedIfStmt extends TranslatedCompilerGeneratedStmt, - ConditionContext -{ - override Instruction getFirstInstruction() { result = this.getCondition().getFirstInstruction() } - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getCondition() - or - id = 1 and result = this.getThen() - or - id = 2 and result = this.getElse() - } - - abstract TranslatedCompilerGeneratedValueCondition getCondition(); - - abstract TranslatedCompilerGeneratedElement getThen(); - - abstract TranslatedCompilerGeneratedElement getElse(); - - private predicate hasElse() { exists(this.getElse()) } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getCondition() and - result = this.getThen().getFirstInstruction() - } - - override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getCondition() and - if this.hasElse() - then result = this.getElse().getFirstInstruction() - else result = this.getParent().getChildSuccessor(this) - } - - override Instruction getChildSuccessor(TranslatedElement child) { - (child = this.getThen() or child = this.getElse()) and - result = this.getParent().getChildSuccessor(this) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } -} - -/** - * The general form of a compiler generated variable access. - * The concrete implementation needs to specify the immediate - * operand for the `VariableAddress` instruction and if the - * access needs a `Load` instruction or not (eg. `ref` params do not) - */ -abstract class TranslatedCompilerGeneratedVariableAccess extends TranslatedCompilerGeneratedExpr { - override Instruction getFirstInstruction() { result = this.getInstruction(AddressTag()) } - - override TranslatedElement getChild(int id) { none() } - - override Instruction getChildSuccessor(TranslatedElement child) { none() } - - /** - * Returns the type of the accessed variable. Can be overridden when the return - * type is different than the type of the underlying variable. - */ - Type getVariableType() { result = this.getResultType() } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - tag = AddressTag() and - opcode instanceof Opcode::VariableAddress and - resultType = getTypeForGLValue(this.getVariableType()) - or - this.needsLoad() and - tag = LoadTag() and - opcode instanceof Opcode::Load and - resultType = getTypeForPRValue(this.getVariableType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - this.needsLoad() and - tag = LoadTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - or - ( - tag = AddressTag() and - kind instanceof GotoEdge and - if this.needsLoad() - then result = this.getInstruction(LoadTag()) - else result = this.getParent().getChildSuccessor(this) - ) - } - - override Instruction getResult() { - if this.needsLoad() - then result = this.getInstruction(LoadTag()) - else result = this.getInstruction(AddressTag()) - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - this.needsLoad() and - tag = LoadTag() and - operandTag instanceof AddressOperandTag and - result = this.getInstruction(AddressTag()) - } - - /** - * Holds if the variable access should be followed by a `Load` instruction. - */ - abstract predicate needsLoad(); -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Delegate.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Delegate.qll deleted file mode 100644 index 3f1a1dec646..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Delegate.qll +++ /dev/null @@ -1,109 +0,0 @@ -/** - * File that translates the desugaring of delegate creation and call expressions. - * In particular, in the IR we explicitly allocate a new object and call the delegate's constructor when - * creating a new one. - * For the delegate call, we explicitly call the `Invoke` method. - * More information about the internals: - * https://github.com/dotnet/roslyn/blob/master/src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_DelegateCreationExpression.cs - * This is a rough approximation which will need further refining. - */ - -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.internal.TempVariableTag -private import experimental.ir.implementation.raw.internal.InstructionTag -private import experimental.ir.implementation.raw.internal.TranslatedExpr -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.TranslatedStmt -private import experimental.ir.implementation.raw.internal.TranslatedCondition -private import experimental.ir.internal.IRCSharpLanguage as Language -private import Common -private import internal.TranslatedCompilerGeneratedCall -private import experimental.ir.implementation.raw.internal.common.TranslatedExprBase - -/** - * Module that exposes the functions needed for the translation of the delegate creation and call expressions. - */ -module DelegateElements { - TranslatedDelegateConstructorCall getConstructor(DelegateCreation generatedBy) { - result.getAst() = generatedBy - } - - TranslatedDelegateInvokeCall getInvoke(DelegateCall generatedBy) { result.getAst() = generatedBy } - - int noGeneratedElements(Element generatedBy) { - ( - generatedBy instanceof DelegateCreation or - generatedBy instanceof DelegateCall - ) and - result = 2 - } -} - -/** - * The translation of the constructor call that happens as part of the delegate creation. - */ -private class TranslatedDelegateConstructorCall extends TranslatedCompilerGeneratedCall, - TTranslatedCompilerGeneratedElement -{ - override DelegateCreation generatedBy; - - TranslatedDelegateConstructorCall() { this = TTranslatedCompilerGeneratedElement(generatedBy, 0) } - - final override Type getCallResultType() { result instanceof VoidType } - - override TranslatedExpr getArgument(int index) { - index = 0 and result = getTranslatedExpr(generatedBy.getArgument()) - } - - override TranslatedExprBase getQualifier() { none() } - - override Instruction getQualifierResult() { - exists(ConstructorCallContext context | - context = this.getParent() and - result = context.getReceiver() - ) - } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and - exists(Callable internal | - internal.getName() = generatedBy.getDelegateType().getName() and - internal.isCompilerGenerated() and - internal.getFile() = generatedBy.getFile() and - result = internal - ) - } -} - -/** - * The translation of the invoke call that happens as part of the desugaring of the delegate call. - */ -private class TranslatedDelegateInvokeCall extends TranslatedCompilerGeneratedCall, - TTranslatedCompilerGeneratedElement -{ - override DelegateCall generatedBy; - - TranslatedDelegateInvokeCall() { this = TTranslatedCompilerGeneratedElement(generatedBy, 1) } - - final override Type getCallResultType() { result instanceof VoidType } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and - exists(Callable internal | - internal.getName() = "Invoke" and - internal.isCompilerGenerated() and - internal.getFile() = generatedBy.getFile() and - result = internal - ) - } - - override TranslatedExprBase getQualifier() { result = getTranslatedExpr(generatedBy.getExpr()) } - - override Instruction getQualifierResult() { result = this.getQualifier().getResult() } - - override TranslatedExpr getArgument(int index) { - result = getTranslatedExpr(generatedBy.getArgument(index)) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Foreach.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Foreach.qll deleted file mode 100644 index e49f579ecdf..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Foreach.qll +++ /dev/null @@ -1,457 +0,0 @@ -/** - * File that provides the desugaring of a `Foreach` stmt. - * Since Roslyn rewrites it in quite a few ways, - * for now only desugar it to a "canonical" form. - * Also we only deal with foreach stmts where there is only - * one declaration (see below). - * For example the code: - * ```csharp - * foreach(var item in some_enumerable) { - * // body - * } - * ``` - * gets desugared to: - * ```csharp - * Enumerator e = some_enumerable.GetEnumerator(); - * try - * { - * while(e.MoveNext()) - * { - * int current = e.Current; - * //body - * } - * } - * finally - * { - * e.Dispose(); - * } - * ``` - * More info about the desugaring process for `foreach` stmts: - * https://github.com/dotnet/roslyn/blob/master/src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_ForEachStatement.cs - * A TODO is to not call `Dispose` no matter what, but desugar the `finally` as an `AsExpr` (cast to IDisposable), - * the call to `Dispose` being made only if the result of the `AsExpr` is not null. - * This is a rough approximation which will need further refining. - */ - -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.TempVariableTag -private import experimental.ir.implementation.raw.internal.InstructionTag -private import experimental.ir.implementation.raw.internal.TranslatedExpr -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.TranslatedStmt -private import experimental.ir.implementation.raw.internal.common.TranslatedConditionBase -private import experimental.ir.implementation.raw.internal.common.TranslatedExprBase -private import experimental.ir.internal.IRCSharpLanguage as Language -private import Common -private import internal.TranslatedCompilerGeneratedStmt -private import internal.TranslatedCompilerGeneratedCall -private import internal.TranslatedCompilerGeneratedDeclaration -private import internal.TranslatedCompilerGeneratedCondition -private import internal.TranslatedCompilerGeneratedElement - -/** - * Module that exposes the functions needed for the translation of the `foreach` stmt. - */ -module ForeachElements { - TranslatedForeachTry getTry(ForeachStmt generatedBy) { result.getAst() = generatedBy } - - TranslatedForeachEnumerator getEnumDecl(ForeachStmt generatedBy) { result.getAst() = generatedBy } - - int noGeneratedElements() { result = 13 } -} - -private class TranslatedForeachTry extends TranslatedCompilerGeneratedTry, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachTry() { this = TTranslatedCompilerGeneratedElement(generatedBy, 0) } - - override TranslatedElement getFinally() { - exists(TranslatedForeachFinally ff | - ff.getAst() = generatedBy and - result = ff - ) - } - - override TranslatedElement getBody() { - exists(TranslatedForeachWhile fw | - fw.getAst() = generatedBy and - result = fw - ) - } -} - -/** - * The translation of the finally block. - */ -private class TranslatedForeachFinally extends TranslatedCompilerGeneratedBlock, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachFinally() { this = TTranslatedCompilerGeneratedElement(generatedBy, 1) } - - override TranslatedElement getStmt(int index) { - index = 0 and - exists(TranslatedForeachDispose fd | - fd.getAst() = generatedBy and - result = fd - ) - } -} - -/** - * The compiler generated while loop. - * Note that this class is not private since it is needed in `IRConstruction.qll`, - * to correctly mark which edges should be back edges. - */ -class TranslatedForeachWhile extends TranslatedCompilerGeneratedStmt, ConditionContext, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachWhile() { this = TTranslatedCompilerGeneratedElement(generatedBy, 2) } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - none() - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { none() } - - override Instruction getFirstInstruction() { result = this.getCondition().getFirstInstruction() } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getInit() and result = this.getBody().getFirstInstruction() - or - child = this.getBody() and result = this.getCondition().getFirstInstruction() - } - - override TranslatedElement getChild(int id) { - id = 0 and result = this.getCondition() - or - id = 1 and result = this.getInit() - or - id = 2 and result = this.getBody() - } - - final override Instruction getChildTrueSuccessor(ConditionBase child) { - child = this.getCondition() and result = this.getInit().getFirstInstruction() - } - - final override Instruction getChildFalseSuccessor(ConditionBase child) { - child = this.getCondition() and result = this.getParent().getChildSuccessor(this) - } - - TranslatedStmt getBody() { result = getTranslatedStmt(generatedBy.getBody()) } - - TranslatedElement getInit() { - exists(TranslatedForeachIterVar iv | - iv.getAst() = generatedBy and - result = iv - ) - } - - ValueConditionBase getCondition() { - exists(TranslatedForeachWhileCondition cond | - cond.getAst() = generatedBy and - result = cond - ) - } -} - -/** - * The translation of the call to the `MoveNext` method, used as a condition for the while. - */ -private class TranslatedForeachMoveNext extends TranslatedCompilerGeneratedCall, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachMoveNext() { this = TTranslatedCompilerGeneratedElement(generatedBy, 3) } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and - result = generatedBy.getMoveNext() - } - - override Type getCallResultType() { result instanceof BoolType } - - override TranslatedExpr getArgument(int id) { none() } - - override TranslatedExprBase getQualifier() { - exists(TranslatedMoveNextEnumAcc acc | - acc.getAst() = generatedBy and - result = acc - ) - } - - override Instruction getQualifierResult() { result = this.getQualifier().getResult() } -} - -/** - * The translation of the call to retrieve the enumerator. - */ -private class TranslatedForeachGetEnumerator extends TranslatedCompilerGeneratedCall, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachGetEnumerator() { this = TTranslatedCompilerGeneratedElement(generatedBy, 4) } - - final override Type getCallResultType() { - result = this.getInstructionFunction(CallTargetTag()).getReturnType() - } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and - result = generatedBy.getGetEnumerator() - } - - override TranslatedExpr getArgument(int id) { none() } - - override TranslatedExprBase getQualifier() { - result = getTranslatedExpr(generatedBy.getIterableExpr()) - } - - override Instruction getQualifierResult() { result = this.getQualifier().getResult() } -} - -/** - * The translation of the call to the getter method of the `Current` property of the enumerator. - */ -private class TranslatedForeachCurrent extends TranslatedCompilerGeneratedCall, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachCurrent() { this = TTranslatedCompilerGeneratedElement(generatedBy, 5) } - - override Type getCallResultType() { result = generatedBy.getElementType() } - - override TranslatedExpr getArgument(int id) { none() } - - override TranslatedExprBase getQualifier() { - exists(TranslatedForeachCurrentEnumAcc acc | - acc.getAst() = generatedBy and - result = acc - ) - } - - override Instruction getQualifierResult() { result = this.getQualifier().getResult() } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and - result = generatedBy.getCurrent().getGetter() - } -} - -/** - * The translation of the call to dispose (inside the finally block) - */ -private class TranslatedForeachDispose extends TranslatedCompilerGeneratedCall, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachDispose() { this = TTranslatedCompilerGeneratedElement(generatedBy, 6) } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and - result = generatedBy.getDispose() - } - - final override Type getCallResultType() { result instanceof VoidType } - - override TranslatedExpr getArgument(int id) { none() } - - override TranslatedExprBase getQualifier() { - exists(TranslatedForeachDisposeEnumAcc acc | - acc.getAst() = generatedBy and - result = acc - ) - } - - override Instruction getQualifierResult() { result = this.getQualifier().getResult() } -} - -/** - * The condition for the while, ie. a call to MoveNext. - */ -private class TranslatedForeachWhileCondition extends TranslatedCompilerGeneratedValueCondition, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachWhileCondition() { this = TTranslatedCompilerGeneratedElement(generatedBy, 7) } - - override TranslatedCompilerGeneratedCall getValueExpr() { - exists(TranslatedForeachMoveNext mn | - mn.getAst() = generatedBy and - result = mn - ) - } - - override Instruction valueExprResult() { result = this.getValueExpr().getResult() } -} - -/** - * Class that represents that translation of the declaration that happens before the `try ... finally` block (the - * declaration of the `temporary` enumerator variable) - */ -private class TranslatedForeachEnumerator extends TranslatedCompilerGeneratedDeclaration, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachEnumerator() { this = TTranslatedCompilerGeneratedElement(generatedBy, 8) } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = ForeachEnumTempVar() and - type = getTypeForPRValue(this.getInitialization().getCallResultType()) - } - - override IRTempVariable getIRVariable() { - result = getIRTempVariable(generatedBy, ForeachEnumTempVar()) - } - - override TranslatedCompilerGeneratedCall getInitialization() { - exists(TranslatedForeachGetEnumerator ge | - ge.getAst() = generatedBy and - result = ge - ) - } - - override Instruction getInitializationResult() { result = this.getInitialization().getResult() } -} - -/** - * Class that represents that translation of the declaration that's happening inside the body of the while. - */ -private class TranslatedForeachIterVar extends TranslatedCompilerGeneratedDeclaration, - TTranslatedCompilerGeneratedElement -{ - override ForeachStmt generatedBy; - - TranslatedForeachIterVar() { this = TTranslatedCompilerGeneratedElement(generatedBy, 9) } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = InitializerVariableAddressTag() and - result = this.getIRVariable() - } - - override IRVariable getIRVariable() { - result = getIRUserVariable(this.getFunction(), generatedBy.getAVariable()) - } - - override TranslatedCompilerGeneratedCall getInitialization() { - exists(TranslatedForeachCurrent crtProp | - crtProp.getAst() = generatedBy and - result = crtProp - ) - } - - override Instruction getInitializationResult() { result = this.getInitialization().getResult() } -} - -/** - * Class that represents that translation of access to the temporary enumerator variable. Used as the qualifier - * for the call to `MoveNext`. - */ -private class TranslatedMoveNextEnumAcc extends TTranslatedCompilerGeneratedElement, - TranslatedCompilerGeneratedVariableAccess -{ - override ForeachStmt generatedBy; - - TranslatedMoveNextEnumAcc() { this = TTranslatedCompilerGeneratedElement(generatedBy, 10) } - - override Type getResultType() { result instanceof BoolType } - - override Type getVariableType() { - exists(TranslatedForeachGetEnumerator ge | - ge.getAst() = generatedBy and - result = ge.getCallResultType() - ) - } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = ForeachEnumTempVar() and - type = getTypeForPRValue(this.getVariableType()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = AddressTag() and - result = this.getTempVariable(ForeachEnumTempVar()) - } - - override predicate needsLoad() { any() } -} - -/** - * Class that represents that translation of access to the temporary enumerator variable. Used as the qualifier - * for the call to the getter of the property `Current`. - */ -private class TranslatedForeachCurrentEnumAcc extends TTranslatedCompilerGeneratedElement, - TranslatedCompilerGeneratedVariableAccess -{ - override ForeachStmt generatedBy; - - TranslatedForeachCurrentEnumAcc() { this = TTranslatedCompilerGeneratedElement(generatedBy, 11) } - - override Type getResultType() { result instanceof BoolType } - - override Type getVariableType() { - exists(TranslatedForeachGetEnumerator ge | - ge.getAst() = generatedBy and - result = ge.getCallResultType() - ) - } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = ForeachEnumTempVar() and - type = getTypeForPRValue(this.getVariableType()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = AddressTag() and - result = this.getTempVariable(ForeachEnumTempVar()) - } - - override predicate needsLoad() { any() } -} - -/** - * Class that represents that translation of access to the temporary enumerator variable. Used as the qualifier - * for the call to `Dispose`. - */ -private class TranslatedForeachDisposeEnumAcc extends TTranslatedCompilerGeneratedElement, - TranslatedCompilerGeneratedVariableAccess -{ - override ForeachStmt generatedBy; - - TranslatedForeachDisposeEnumAcc() { this = TTranslatedCompilerGeneratedElement(generatedBy, 12) } - - override Type getResultType() { result instanceof BoolType } - - override Type getVariableType() { - exists(TranslatedForeachGetEnumerator ge | - ge.getAst() = generatedBy and - result = ge.getCallResultType() - ) - } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = ForeachEnumTempVar() and - type = getTypeForPRValue(this.getVariableType()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = AddressTag() and - result = this.getTempVariable(ForeachEnumTempVar()) - } - - override predicate needsLoad() { any() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Lock.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Lock.qll deleted file mode 100644 index 40ca922b325..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Lock.qll +++ /dev/null @@ -1,426 +0,0 @@ -/** - * File that provides the desugaring of a `lock` stmt. - * The statement: - * ```csharp - * lock (anExpr) ... - * ``` - * gets desugared to: - * ```csharp - * SomeRefType lockedVar = anExpr; - * bool __lockWasTaken = false; - * try { - * System.Threading.Monitor.Enter(lockedVar, ref __lockWasTaken); - * ... - * } - * finally { - * if (__lockWasTaken) System.Threading.Monitor.Exit(lockedVar); - * } - * ``` - */ - -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.TempVariableTag -private import experimental.ir.implementation.raw.internal.TranslatedExpr -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.TranslatedStmt -private import experimental.ir.implementation.raw.internal.common.TranslatedExprBase -private import experimental.ir.implementation.raw.internal.common.TranslatedConditionBase -private import experimental.ir.implementation.raw.internal.InstructionTag -private import experimental.ir.internal.IRCSharpLanguage as Language -private import Common -private import internal.TranslatedCompilerGeneratedStmt -private import internal.TranslatedCompilerGeneratedCall -private import internal.TranslatedCompilerGeneratedDeclaration -private import internal.TranslatedCompilerGeneratedCondition -private import internal.TranslatedCompilerGeneratedElement -private import internal.TranslatedCompilerGeneratedExpr - -/** - * Module that exposes the functions needed for the translation of the `lock` stmt. - */ -module LockElements { - TranslatedLockedVarDecl getLockedVarDecl(LockStmt generatedBy) { result.getAst() = generatedBy } - - TranslatedLockTry getTry(LockStmt generatedBy) { result.getAst() = generatedBy } - - TranslatedLockWasTakenDecl getLockWasTakenDecl(LockStmt generatedBy) { - result.getAst() = generatedBy - } - - int noGeneratedElements() { result = 14 } -} - -/** - * The translation of the `try` stmt. - */ -private class TranslatedLockTry extends TranslatedCompilerGeneratedTry, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedLockTry() { this = TTranslatedCompilerGeneratedElement(generatedBy, 0) } - - override TranslatedElement getFinally() { - exists(TranslatedLockFinally fin | - fin.getAst() = generatedBy and - result = fin - ) - } - - override TranslatedElement getBody() { - exists(TranslatedLockTryBody ltb | - ltb.getAst() = generatedBy and - result = ltb - ) - } -} - -/** - * The translation of the `lock` stmt's body. - */ -private class TranslatedLockTryBody extends TranslatedCompilerGeneratedBlock, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedLockTryBody() { this = TTranslatedCompilerGeneratedElement(generatedBy, 1) } - - override TranslatedElement getStmt(int index) { - index = 0 and - exists(TranslatedMonitorEnter me | - me.getAst() = generatedBy and - result = me - ) - or - index = 1 and - result = getTranslatedStmt(generatedBy.getBlock()) - } -} - -/** - * The translation of the finally block. - */ -private class TranslatedLockFinally extends TranslatedCompilerGeneratedBlock, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedLockFinally() { this = TTranslatedCompilerGeneratedElement(generatedBy, 2) } - - override TranslatedElement getStmt(int index) { - index = 0 and - exists(TranslatedFinallyIf fif | - fif.getAst() = generatedBy and - result = fif - ) - } -} - -/** - * The translation of the call to dispose (inside the finally block) - */ -private class TranslatedMonitorExit extends TranslatedCompilerGeneratedCall, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedMonitorExit() { this = TTranslatedCompilerGeneratedElement(generatedBy, 3) } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and - exists(Callable exit | - exit.hasFullyQualifiedName("System.Threading.Monitor", "Exit") and - result = exit - ) - } - - final override Type getCallResultType() { result instanceof VoidType } - - override TranslatedExprBase getArgument(int id) { - id = 0 and - exists(TranslatedMonitorExitVarAcc var | - var.getAst() = generatedBy and - result = var - ) - } - - override TranslatedExprBase getQualifier() { none() } - - override Instruction getQualifierResult() { none() } -} - -/** - * The translation of the call to dispose (inside the finally block) - */ -private class TranslatedMonitorEnter extends TranslatedCompilerGeneratedCall, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedMonitorEnter() { this = TTranslatedCompilerGeneratedElement(generatedBy, 4) } - - override Callable getInstructionFunction(InstructionTag tag) { - tag = CallTargetTag() and - exists(Callable dispose | - dispose.hasFullyQualifiedName("System.Threading.Monitor", "Enter") and - result = dispose - ) - } - - final override Type getCallResultType() { result instanceof VoidType } - - override TranslatedExprBase getArgument(int id) { - id = 0 and - exists(TranslatedMonitorEnterVarAcc var | - var.getAst() = generatedBy and - result = var - ) - or - id = 1 and - exists(TranslatedLockWasTakenRefArg refArg | - refArg.getAst() = generatedBy and - result = refArg - ) - } - - override TranslatedExprBase getQualifier() { none() } - - override Instruction getQualifierResult() { none() } -} - -/** - * The translation of the condition of the `if` present in the `finally` clause. - */ -private class TranslatedIfCondition extends TranslatedCompilerGeneratedValueCondition, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedIfCondition() { this = TTranslatedCompilerGeneratedElement(generatedBy, 5) } - - override TranslatedCompilerGeneratedExpr getValueExpr() { - exists(TranslatedLockWasTakenCondVarAcc condVar | - condVar.getAst() = generatedBy and - result = condVar - ) - } - - override Instruction valueExprResult() { result = this.getValueExpr().getResult() } -} - -/** - * The translation of the `if` stmt present in the `finally` clause. - */ -private class TranslatedFinallyIf extends TranslatedCompilerGeneratedIfStmt, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedFinallyIf() { this = TTranslatedCompilerGeneratedElement(generatedBy, 6) } - - override TranslatedCompilerGeneratedValueCondition getCondition() { - exists(TranslatedIfCondition cond | - cond.getAst() = generatedBy and - result = cond - ) - } - - override TranslatedCompilerGeneratedCall getThen() { - exists(TranslatedMonitorExit me | - me.getAst() = generatedBy and - result = me - ) - } - - override TranslatedCompilerGeneratedCall getElse() { none() } -} - -/** - * Represents the translation of the constant that is part of the initialization for the - * bool temp variable. - */ -private class TranslatedWasTakenConst extends TranslatedCompilerGeneratedConstant, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedWasTakenConst() { this = TTranslatedCompilerGeneratedElement(generatedBy, 7) } - - override string getInstructionConstantValue(InstructionTag tag) { - tag = OnlyInstructionTag() and - result = "false" - } - - override Instruction getResult() { result = this.getInstruction(OnlyInstructionTag()) } - - override Type getResultType() { result instanceof BoolType } -} - -/** - * Represents the translation of the `lockWasTaken` temp variable declaration. - */ -private class TranslatedLockWasTakenDecl extends TranslatedCompilerGeneratedDeclaration, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedLockWasTakenDecl() { this = TTranslatedCompilerGeneratedElement(generatedBy, 8) } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = LockWasTakenTemp() and - type = getBoolType() - } - - override IRTempVariable getIRVariable() { - result = getIRTempVariable(generatedBy, LockWasTakenTemp()) - } - - override TranslatedCompilerGeneratedExpr getInitialization() { - exists(TranslatedWasTakenConst const | - const.getAst() = generatedBy and - result = const - ) - } - - override Type getVarType() { result = this.getInitialization().getResultType() } - - override Instruction getInitializationResult() { result = this.getInitialization().getResult() } -} - -/** - * Represents the translation of the declaration of the temp variable that is initialized to the - * expression being locked. - */ -private class TranslatedLockedVarDecl extends TranslatedCompilerGeneratedDeclaration, - TTranslatedCompilerGeneratedElement -{ - override LockStmt generatedBy; - - TranslatedLockedVarDecl() { this = TTranslatedCompilerGeneratedElement(generatedBy, 9) } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = LockedVarTemp() and - type = getTypeForPRValue(generatedBy.getExpr().getType()) - } - - override IRTempVariable getIRVariable() { - result = getIRTempVariable(generatedBy, LockedVarTemp()) - } - - override TranslatedExprBase getInitialization() { - result = getTranslatedExpr(generatedBy.getExpr()) - } - - override Type getVarType() { result = generatedBy.getExpr().getType() } - - override Instruction getInitializationResult() { result = this.getInitialization().getResult() } -} - -/** - * Represents the translation of access to the temp variable that is initialized to the - * expression being locked. - * Used as an argument for the `MonitorEnter` call. - */ -private class TranslatedMonitorEnterVarAcc extends TTranslatedCompilerGeneratedElement, - TranslatedCompilerGeneratedVariableAccess -{ - override LockStmt generatedBy; - - TranslatedMonitorEnterVarAcc() { this = TTranslatedCompilerGeneratedElement(generatedBy, 10) } - - override Type getResultType() { result = generatedBy.getExpr().getType() } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = LockedVarTemp() and - type = getTypeForPRValue(this.getResultType()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = AddressTag() and - result = this.getTempVariable(LockedVarTemp()) - } - - override predicate needsLoad() { any() } -} - -/** - * Represents the translation of access to the temp variable that is initialized to the - * expression being locked. - * Used as an argument for the `MonitorExit` call. - */ -private class TranslatedMonitorExitVarAcc extends TTranslatedCompilerGeneratedElement, - TranslatedCompilerGeneratedVariableAccess -{ - override LockStmt generatedBy; - - TranslatedMonitorExitVarAcc() { this = TTranslatedCompilerGeneratedElement(generatedBy, 11) } - - override Type getResultType() { result = generatedBy.getExpr().getType() } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = AddressTag() and - result = this.getTempVariable(LockedVarTemp()) - } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = LockedVarTemp() and - type = getTypeForPRValue(this.getResultType()) - } - - override predicate needsLoad() { any() } -} - -/** - * Represents that translation of access to the temporary bool variable. - * Used as an argument for the `MonitorEnter` call. - */ -private class TranslatedLockWasTakenCondVarAcc extends TTranslatedCompilerGeneratedElement, - TranslatedCompilerGeneratedVariableAccess -{ - override LockStmt generatedBy; - - TranslatedLockWasTakenCondVarAcc() { this = TTranslatedCompilerGeneratedElement(generatedBy, 12) } - - override Type getResultType() { result instanceof BoolType } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = LockWasTakenTemp() and - type = getTypeForPRValue(this.getResultType()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = AddressTag() and - result = this.getTempVariable(LockWasTakenTemp()) - } - - override predicate needsLoad() { any() } -} - -/** - * That represents that translation of access to the temporary bool variable. Its value is used - * as the `if` condition in the finally clause. - */ -private class TranslatedLockWasTakenRefArg extends TTranslatedCompilerGeneratedElement, - TranslatedCompilerGeneratedVariableAccess -{ - override LockStmt generatedBy; - - TranslatedLockWasTakenRefArg() { this = TTranslatedCompilerGeneratedElement(generatedBy, 13) } - - override Type getResultType() { result instanceof BoolType } - - override predicate hasTempVariable(TempVariableTag tag, CSharpType type) { - tag = LockWasTakenTemp() and - type = getTypeForPRValue(this.getResultType()) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = AddressTag() and - result = this.getTempVariable(LockWasTakenTemp()) - } - - override predicate needsLoad() { none() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Using.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Using.qll deleted file mode 100644 index 8b137891791..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/Using.qll +++ /dev/null @@ -1 +0,0 @@ - diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedCall.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedCall.qll deleted file mode 100644 index d1834f90c1c..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedCall.qll +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Contains an abstract class that is the super class of the classes that deal with compiler generated calls. - */ - -import csharp -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.TranslatedFunction -private import experimental.ir.implementation.raw.internal.common.TranslatedCallBase -private import TranslatedCompilerGeneratedElement -private import experimental.ir.internal.IRCSharpLanguage as Language - -abstract class TranslatedCompilerGeneratedCall extends TranslatedCallBase, - TranslatedCompilerGeneratedElement -{ - final override string toString() { - result = "compiler generated call (" + generatedBy.toString() + ")" - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedCondition.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedCondition.qll deleted file mode 100644 index 57fdc12121c..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedCondition.qll +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Contains an abstract class that is the super class of the classes that deal with compiler generated conditions. - */ - -import csharp -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.common.TranslatedConditionBase -private import TranslatedCompilerGeneratedElement -private import experimental.ir.internal.IRCSharpLanguage as Language - -abstract class TranslatedCompilerGeneratedValueCondition extends TranslatedCompilerGeneratedElement, - ValueConditionBase -{ - final override string toString() { - result = "compiler generated condition (" + generatedBy.toString() + ")" - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedDeclaration.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedDeclaration.qll deleted file mode 100644 index 2a3ace143c8..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedDeclaration.qll +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Contains an abstract class, which is the super class of all the classes that represent compiler - * generated declarations. It extends the Base for declarations by incorporating a `Store` instruction, since - * we treat the initialization as part of the declaration for compiler generated declarations. - */ - -import csharp -private import experimental.ir.implementation.Opcode -private import experimental.ir.implementation.internal.OperandTag -private import experimental.ir.implementation.raw.internal.InstructionTag -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.implementation.raw.internal.TranslatedFunction -private import experimental.ir.implementation.raw.internal.common.TranslatedDeclarationBase -private import TranslatedCompilerGeneratedElement -private import experimental.ir.internal.CSharpType -private import experimental.ir.internal.IRCSharpLanguage as Language - -abstract class TranslatedCompilerGeneratedDeclaration extends LocalVariableDeclarationBase, - TranslatedCompilerGeneratedElement -{ - final override string toString() { - result = "compiler generated declaration (" + generatedBy.toString() + ")" - } - - override Instruction getChildSuccessor(TranslatedElement child) { - child = this.getInitialization() and result = this.getInstruction(InitializerStoreTag()) - } - - override predicate hasInstruction(Opcode opcode, InstructionTag tag, CSharpType resultType) { - LocalVariableDeclarationBase.super.hasInstruction(opcode, tag, resultType) - or - // we can reuse the initializer store tag - // since compiler generated declarations - // do not have the `Uninitialized` instruction - tag = InitializerStoreTag() and - opcode instanceof Opcode::Store and - resultType = getTypeForPRValue(this.getVarType()) - } - - override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) { - result = LocalVariableDeclarationBase.super.getInstructionSuccessor(tag, kind) - or - tag = InitializerStoreTag() and - result = this.getParent().getChildSuccessor(this) and - kind instanceof GotoEdge - } - - override Instruction getInstructionOperand(InstructionTag tag, OperandTag operandTag) { - result = LocalVariableDeclarationBase.super.getInstructionOperand(tag, operandTag) - or - tag = InitializerStoreTag() and - ( - operandTag instanceof AddressOperandTag and - result = this.getInstruction(InitializerVariableAddressTag()) - or - operandTag instanceof StoreValueOperandTag and - result = this.getInitializationResult() - ) - } - - override IRVariable getInstructionVariable(InstructionTag tag) { - tag = InitializerVariableAddressTag() and - result = this.getIRVariable() - } - - // A compiler generated declaration does not have an associated `LocalVariable` - // element - override LocalVariable getDeclVar() { none() } - - override Type getVarType() { result = this.getIRVariable().getType() } - - /** - * Gets the IR variable that corresponds to the declaration. - */ - abstract IRVariable getIRVariable(); - - /** - * Gets result (instruction) of the initialization expression. - */ - abstract Instruction getInitializationResult(); -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedElement.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedElement.qll deleted file mode 100644 index 2e5908b8194..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedElement.qll +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The abstract super class of every `TranslatedCompilerX` class. It has one member field, `generatedBy`, - * which represents the element that generated the compiler generated element. - */ - -private import experimental.ir.implementation.raw.internal.TranslatedElement -private import experimental.ir.internal.IRCSharpLanguage as Language - -abstract class TranslatedCompilerGeneratedElement extends TranslatedElement, - TTranslatedCompilerGeneratedElement -{ - // The element that generates generated the compiler element can - // only be a stmt or an expr - ControlFlowElement generatedBy; - - override string toString() { - result = "compiler generated element (" + generatedBy.toString() + ")" - } - - final override Callable getFunction() { result = generatedBy.getEnclosingCallable() } - - final override Language::AST getAst() { result = generatedBy } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedExpr.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedExpr.qll deleted file mode 100644 index 3c5a60cf812..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedExpr.qll +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Contains an abstract class, which is the super class of all the classes that represent compiler - * generated expressions. - */ - -import csharp -private import TranslatedCompilerGeneratedElement -private import experimental.ir.implementation.raw.Instruction -private import experimental.ir.implementation.raw.internal.common.TranslatedExprBase -private import experimental.ir.internal.IRCSharpLanguage as Language - -abstract class TranslatedCompilerGeneratedExpr extends TranslatedCompilerGeneratedElement, - TranslatedExprBase -{ - override string toString() { result = "compiler generated expr (" + generatedBy.toString() + ")" } - - abstract Type getResultType(); -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedStmt.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedStmt.qll deleted file mode 100644 index 70955e02c9b..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/desugar/internal/TranslatedCompilerGeneratedStmt.qll +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Contains an abstract class, which is the super class of all the classes that represent compiler - * generated statements. - */ - -import csharp -private import TranslatedCompilerGeneratedElement -private import experimental.ir.internal.IRCSharpLanguage as Language - -abstract class TranslatedCompilerGeneratedStmt extends TranslatedCompilerGeneratedElement { - final override string toString() { - result = "compiler generated stmt (" + generatedBy.toString() + ")" - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/Dominance.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/Dominance.qll deleted file mode 100644 index cddc3e23d7e..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/Dominance.qll +++ /dev/null @@ -1,22 +0,0 @@ -private import DominanceInternal - -predicate blockImmediatelyDominates(Graph::Block dominator, Graph::Block block) = - idominance(Graph::isEntryBlock/1, Graph::blockSuccessor/2)(_, dominator, block) - -predicate blockStrictlyDominates(Graph::Block dominator, Graph::Block block) { - blockImmediatelyDominates+(dominator, block) -} - -predicate blockDominates(Graph::Block dominator, Graph::Block block) { - blockStrictlyDominates(dominator, block) or dominator = block -} - -Graph::Block getDominanceFrontier(Graph::Block dominator) { - Graph::blockSuccessor(dominator, result) and - not blockImmediatelyDominates(dominator, result) - or - exists(Graph::Block prev | result = getDominanceFrontier(prev) | - blockImmediatelyDominates(dominator, prev) and - not blockImmediatelyDominates(dominator, result) - ) -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/DominanceInternal.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/DominanceInternal.qll deleted file mode 100644 index aaa4cc7bd53..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/DominanceInternal.qll +++ /dev/null @@ -1,7 +0,0 @@ -private import ReachableBlock as Reachability - -module Graph { - import Reachability::Graph - - class Block = Reachability::ReachableBlock; -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/PrintDominance.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/PrintDominance.qll deleted file mode 100644 index f26565bc278..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/PrintDominance.qll +++ /dev/null @@ -1,22 +0,0 @@ -private import DominanceInternal -private import ReachableBlockInternal -private import Dominance -import IR - -private class DominancePropertyProvider extends IRPropertyProvider { - override string getBlockProperty(IRBlock block, string key) { - exists(IRBlock dominator | - blockImmediatelyDominates(dominator, block) and - key = "ImmediateDominator" and - result = "Block " + dominator.getDisplayIndex().toString() - ) - or - key = "DominanceFrontier" and - result = - strictconcat(IRBlock frontierBlock | - frontierBlock = getDominanceFrontier(block) - | - frontierBlock.getDisplayIndex().toString(), ", " order by frontierBlock.getDisplayIndex() - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/PrintReachableBlock.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/PrintReachableBlock.qll deleted file mode 100644 index 6befad72336..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/PrintReachableBlock.qll +++ /dev/null @@ -1,17 +0,0 @@ -private import ReachableBlockInternal -private import ReachableBlock -import IR - -private class ReachableBlockPropertyProvider extends IRPropertyProvider { - override string getBlockProperty(IRBlock block, string key) { - not block instanceof ReachableBlock and - key = "Unreachable" and - result = "true" - or - exists(EdgeKind kind | - isInfeasibleEdge(block, kind) and - key = "Infeasible(" + kind.toString() + ")" and - result = "true" - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/ReachableBlock.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/ReachableBlock.qll deleted file mode 100644 index 25a53bbefe8..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/ReachableBlock.qll +++ /dev/null @@ -1,53 +0,0 @@ -private import ReachableBlockInternal -private import IR -private import ConstantAnalysis - -predicate isInfeasibleInstructionSuccessor(Instruction instr, EdgeKind kind) { - exists(int conditionValue | - conditionValue = getConstantValue(instr.(ConditionalBranchInstruction).getCondition()) and - if conditionValue = 0 then kind instanceof TrueEdge else kind instanceof FalseEdge - ) -} - -pragma[noinline] -predicate isInfeasibleEdge(IRBlockBase block, EdgeKind kind) { - isInfeasibleInstructionSuccessor(block.getLastInstruction(), kind) -} - -private IRBlock getAFeasiblePredecessorBlock(IRBlock successor) { - exists(EdgeKind kind | - result.getSuccessor(kind) = successor and - not isInfeasibleEdge(result, kind) - ) -} - -private predicate isBlockReachable(IRBlock block) { - exists(IRFunction f | getAFeasiblePredecessorBlock*(block) = f.getEntryBlock()) -} - -/** - * An IR block that is reachable from the entry block of the function, considering only feasible - * edges. - */ -class ReachableBlock extends IRBlockBase { - ReachableBlock() { isBlockReachable(this) } - - final ReachableBlock getAFeasiblePredecessor() { result = getAFeasiblePredecessorBlock(this) } - - final ReachableBlock getAFeasibleSuccessor() { this = getAFeasiblePredecessorBlock(result) } -} - -/** - * An instruction that is contained in a reachable block. - */ -class ReachableInstruction extends Instruction { - ReachableInstruction() { this.getBlock() instanceof ReachableBlock } -} - -module Graph { - predicate isEntryBlock(ReachableBlock block) { exists(IRFunction f | block = f.getEntryBlock()) } - - predicate blockSuccessor(ReachableBlock pred, ReachableBlock succ) { - succ = pred.getAFeasibleSuccessor() - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/ReachableBlockInternal.qll b/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/ReachableBlockInternal.qll deleted file mode 100644 index 93131e2abb5..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/raw/internal/reachability/ReachableBlockInternal.qll +++ /dev/null @@ -1,2 +0,0 @@ -import experimental.ir.implementation.raw.IR as IR -import experimental.ir.implementation.raw.constant.ConstantAnalysis as ConstantAnalysis diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IR.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IR.qll deleted file mode 100644 index 79873d8366e..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IR.qll +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Provides classes that describe the Intermediate Representation (IR) of the program. - * - * The IR is a representation of the semantics of the program, with very little dependence on the - * syntax that was used to write the program. For example, in C++, the statements `i += 1;`, `i++`, - * and `++i` all have the same semantic effect, but appear in the AST as three different types of - * `Expr` node. In the IR, all three statements are broken down into a sequence of fundamental - * operations similar to: - * - * ``` - * r1(int*) = VariableAddress[i] // Compute the address of variable `i` - * r2(int) = Load &:r1, m0 // Load the value of `i` - * r3(int) = Constant[1] // An integer constant with the value `1` - * r4(int) = Add r2, r3 // Add `1` to the value of `i` - * r5(int) = Store &r1, r4 // Store the new value back into the variable `i` - * ``` - * - * This allows IR-based analysis to focus on the fundamental operations, rather than having to be - * concerned with the various ways of expressing those operations in source code. - * - * The key classes in the IR are: - * - * - `IRFunction` - Contains the IR for an entire function definition, including all of that - * function's `Instruction`s, `IRBlock`s, and `IRVariables`. - * - `Instruction` - A single operation in the IR. An instruction specifies the operation to be - * performed, the operands that produce the inputs to that operation, and the type of the result - * of the operation. Control flows from an `Instruction` to one of a set of successor - * `Instruction`s. - * - `Operand` - An input value of an `Instruction`. All inputs of an `Instruction` are explicitly - * represented as `Operand`s, even if the input was implicit in the source code. An `Operand` has - * a link to the `Instruction` that consumes its value (its "use") and a link to the `Instruction` - * that produces its value (its "definition"). - * - `IRVariable` - A variable accessed by the IR for a particular function. An `IRVariable` is - * created for each variable directly accessed by the function. In addition, `IRVariable`s are - * created to represent certain temporary storage locations that do not have explicitly declared - * variables in the source code, such as the return value of the function. - * - `IRBlock` - A "basic block" in the control flow graph of a function. An `IRBlock` contains a - * sequence of instructions such that control flow can only enter the block at the first - * instruction, and can only leave the block from the last instruction. - * - `IRType` - The type of a value accessed in the IR. Unlike the `Type` class in the AST, `IRType` - * is language-neutral. For example, in C++, `unsigned int`, `char32_t`, and `wchar_t` might all - * be represented as the `IRType` `uint4`, a four-byte unsigned integer. - */ - -import IRFunction -import Instruction -import IRBlock -import IRVariable -import Operand -private import internal.IRImports as Imports -import Imports::EdgeKind -import Imports::IRType -import Imports::MemoryAccessKind - -private newtype TIRPropertyProvider = MkIRPropertyProvider() - -/** - * A class that provides additional properties to be dumped for IR instructions and blocks when using - * the PrintIR module. Libraries that compute additional facts about IR elements can extend the - * single instance of this class to specify the additional properties computed by the library. - */ -class IRPropertyProvider extends TIRPropertyProvider { - /** Gets a textual representation of this element. */ - string toString() { result = "IRPropertyProvider" } - - /** - * Gets the value of the property named `key` for the specified instruction. - */ - string getInstructionProperty(Instruction instruction, string key) { none() } - - /** - * Gets the value of the property named `key` for the specified block. - */ - string getBlockProperty(IRBlock block, string key) { none() } - - /** - * Gets the value of the property named `key` for the specified operand. - */ - string getOperandProperty(Operand operand, string key) { none() } - - /** - * Holds if the instruction `instr` should be included when printing - * the IR instructions. - */ - predicate shouldPrintInstruction(Instruction instr) { any() } - - /** - * Holds if the operand `operand` should be included when printing the an - * instruction's operand list. - */ - predicate shouldPrintOperand(Operand operand) { any() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRBlock.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRBlock.qll deleted file mode 100644 index 50395db47e7..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRBlock.qll +++ /dev/null @@ -1,356 +0,0 @@ -/** - * Provides classes describing basic blocks in the IR of a function. - */ - -private import internal.IRInternal -import Instruction -private import internal.IRBlockImports as Imports -import Imports::EdgeKind -private import Cached - -/** - * Holds if `block` is a block in `func` and `sortOverride`, `sortKey1`, and `sortKey2` are the - * sort keys of the block (derived from its first instruction) - */ -pragma[nomagic] -private predicate blockSortKeys( - IRFunction func, IRBlockBase block, int sortOverride, int sortKey1, int sortKey2 -) { - block.getEnclosingIRFunction() = func and - block.getFirstInstruction().hasSortKeys(sortKey1, sortKey2) and - // Ensure that the block containing `EnterFunction` always comes first. - if block.getFirstInstruction() instanceof EnterFunctionInstruction - then sortOverride = 0 - else sortOverride = 1 -} - -/** - * A basic block in the IR. A basic block consists of a sequence of `Instructions` with the only - * incoming edges at the beginning of the sequence and the only outgoing edges at the end of the - * sequence. - * - * This class does not contain any members that query the predecessor or successor edges of the - * block. This allows different classes that extend `IRBlockBase` to expose different subsets of - * edges (e.g. ignoring unreachable edges). - * - * Most consumers should use the class `IRBlock`. - */ -class IRBlockBase extends TIRBlock { - /** Gets a textual representation of this block. */ - final string toString() { result = getFirstInstruction(this).toString() } - - /** Gets the source location of the first non-`Phi` instruction in this block. */ - final Language::Location getLocation() { result = this.getFirstInstruction().getLocation() } - - /** - * INTERNAL: Do not use. - * - * Gets the zero-based index of the block within its function. - * - * This predicate is used by debugging and printing code only. - */ - int getDisplayIndex() { - exists(IRConfiguration::IRConfiguration config | - config.shouldEvaluateDebugStringsForFunction(this.getEnclosingFunction()) - ) and - exists(IRFunction func | - this = - rank[result + 1](IRBlock funcBlock, int sortOverride, int sortKey1, int sortKey2 | - blockSortKeys(func, funcBlock, sortOverride, sortKey1, sortKey2) - | - funcBlock order by sortOverride, sortKey1, sortKey2 - ) - ) - } - - /** - * Gets the `index`th non-`Phi` instruction in this block. - */ - final Instruction getInstruction(int index) { result = getInstruction(this, index) } - - /** - * Get the `Phi` instructions that appear at the start of this block. - */ - final PhiInstruction getAPhiInstruction() { - Construction::getPhiInstructionBlockStart(result) = this.getFirstInstruction() - } - - /** - * Gets an instruction in this block. This includes `Phi` instructions. - */ - final Instruction getAnInstruction() { - result = this.getInstruction(_) or - result = this.getAPhiInstruction() - } - - /** - * Gets the first non-`Phi` instruction in this block. - */ - final Instruction getFirstInstruction() { result = getFirstInstruction(this) } - - /** - * Gets the last instruction in this block. - */ - final Instruction getLastInstruction() { - result = this.getInstruction(this.getInstructionCount() - 1) - } - - /** - * Gets the number of non-`Phi` instructions in this block. - */ - final int getInstructionCount() { result = getInstructionCount(this) } - - /** - * Gets the `IRFunction` that contains this block. - */ - final IRFunction getEnclosingIRFunction() { - result = getFirstInstruction(this).getEnclosingIRFunction() - } - - /** - * Gets the `Function` that contains this block. - */ - final Language::Declaration getEnclosingFunction() { - result = getFirstInstruction(this).getEnclosingFunction() - } -} - -/** - * A basic block with additional information about its predecessor and successor edges. Each edge - * corresponds to the control flow between the last instruction of one block and the first - * instruction of another block. - */ -class IRBlock extends IRBlockBase { - /** - * Gets a block to which control flows directly from this block. - */ - final IRBlock getASuccessor() { blockSuccessor(this, result) } - - /** - * Gets a block from which control flows directly to this block. - */ - final IRBlock getAPredecessor() { blockSuccessor(result, this) } - - /** - * Gets the block to which control flows directly from this block along an edge of kind `kind`. - */ - final IRBlock getSuccessor(EdgeKind kind) { blockSuccessor(this, result, kind) } - - /** - * Gets the block to which control flows directly from this block along a back edge of kind - * `kind`. - */ - final IRBlock getBackEdgeSuccessor(EdgeKind kind) { backEdgeSuccessor(this, result, kind) } - - /** - * Holds if this block immediately dominates `block`. - * - * Block `A` immediate dominates block `B` if block `A` strictly dominates block `B` and block `B` - * is a direct successor of block `A`. - */ - final predicate immediatelyDominates(IRBlock block) { blockImmediatelyDominates(this, block) } - - /** - * Holds if this block strictly dominates `block`. - * - * Block `A` strictly dominates block `B` if block `A` dominates block `B` and blocks `A` and `B` - * are not the same block. - */ - final predicate strictlyDominates(IRBlock block) { blockImmediatelyDominates+(this, block) } - - /** - * Holds if this block dominates `block`. - * - * Block `A` dominates block `B` if any control flow path from the entry block of the function to - * block `B` must pass through block `A`. A block always dominates itself. - */ - final predicate dominates(IRBlock block) { this.strictlyDominates(block) or this = block } - - /** - * Gets a block on the dominance frontier of this block. - * - * The dominance frontier of block `A` is the set of blocks `B` such that block `A` does not - * dominate block `B`, but block `A` does dominate an immediate predecessor of block `B`. - */ - pragma[noinline] - final IRBlock dominanceFrontier() { - this.getASuccessor() = result and - not this.immediatelyDominates(result) - or - exists(IRBlock prev | result = prev.dominanceFrontier() | - this.immediatelyDominates(prev) and - not this.immediatelyDominates(result) - ) - } - - /** - * Holds if this block immediately post-dominates `block`. - * - * Block `A` immediate post-dominates block `B` if block `A` strictly post-dominates block `B` and - * block `B` is a direct successor of block `A`. - */ - final predicate immediatelyPostDominates(IRBlock block) { - blockImmediatelyPostDominates(this, block) - } - - /** - * Holds if this block strictly post-dominates `block`. - * - * Block `A` strictly post-dominates block `B` if block `A` post-dominates block `B` and blocks `A` - * and `B` are not the same block. - */ - final predicate strictlyPostDominates(IRBlock block) { - blockImmediatelyPostDominates+(this, block) - } - - /** - * Holds if this block is a post-dominator of `block`. - * - * Block `A` post-dominates block `B` if any control flow path from `B` to the exit block of the - * function must pass through block `A`. A block always post-dominates itself. - */ - final predicate postDominates(IRBlock block) { this.strictlyPostDominates(block) or this = block } - - /** - * Gets a block on the post-dominance frontier of this block. - * - * The post-dominance frontier of block `A` is the set of blocks `B` such that block `A` does not - * post-dominate block `B`, but block `A` does post-dominate an immediate successor of block `B`. - */ - pragma[noinline] - final IRBlock postDominanceFrontier() { - this.getAPredecessor() = result and - not this.immediatelyPostDominates(result) - or - exists(IRBlock prev | result = prev.postDominanceFrontier() | - this.immediatelyPostDominates(prev) and - not this.immediatelyPostDominates(result) - ) - } - - /** - * Holds if this block is reachable from the entry block of its function. - */ - final predicate isReachableFromFunctionEntry() { - this = this.getEnclosingIRFunction().getEntryBlock() or - this.getAPredecessor().isReachableFromFunctionEntry() - } -} - -private predicate startsBasicBlock(Instruction instr) { - not instr instanceof PhiInstruction and - not adjacentInBlock(_, instr) -} - -/** Holds if `i2` follows `i1` in a `IRBlock`. */ -private predicate adjacentInBlock(Instruction i1, Instruction i2) { - // - i2 must be the only successor of i1 - i2 = unique(Instruction i | i = i1.getASuccessor()) and - // - i1 must be the only predecessor of i2 - i1 = unique(Instruction i | i.getASuccessor() = i2) and - // - The edge between the two must be a GotoEdge. We just check that one - // exists since we've already checked that it's unique. - exists(GotoEdge edgeKind | exists(i1.getSuccessor(edgeKind))) and - // - The edge must not be a back edge. This means we get the same back edges - // in the basic-block graph as we do in the raw CFG. - not exists(Construction::getInstructionBackEdgeSuccessor(i1, _)) - // This predicate could be simplified to remove one of the `unique`s if we - // were willing to rely on the CFG being well-formed and thus never having - // more than one successor to an instruction that has a `GotoEdge` out of it. -} - -private predicate isEntryBlock(TIRBlock block) { - block = MkIRBlock(any(EnterFunctionInstruction enter)) -} - -cached -private module Cached { - cached - newtype TIRBlock = MkIRBlock(Instruction firstInstr) { startsBasicBlock(firstInstr) } - - /** Holds if `i` is the `index`th instruction the block starting with `first`. */ - private Instruction getInstructionFromFirst(Instruction first, int index) = - shortestDistances(startsBasicBlock/1, adjacentInBlock/2)(first, result, index) - - /** Holds if `i` is the `index`th instruction in `block`. */ - cached - Instruction getInstruction(TIRBlock block, int index) { - result = getInstructionFromFirst(getFirstInstruction(block), index) - } - - cached - int getInstructionCount(TIRBlock block) { result = strictcount(getInstruction(block, _)) } - - cached - predicate blockSuccessor(TIRBlock pred, TIRBlock succ, EdgeKind kind) { - exists(Instruction predLast, Instruction succFirst | - predLast = getInstruction(pred, getInstructionCount(pred) - 1) and - succFirst = predLast.getSuccessor(kind) and - succ = MkIRBlock(succFirst) - ) - } - - pragma[noinline] - private predicate blockIdentity(TIRBlock b1, TIRBlock b2) { b1 = b2 } - - pragma[noopt] - cached - predicate backEdgeSuccessor(TIRBlock pred, TIRBlock succ, EdgeKind kind) { - backEdgeSuccessorRaw(pred, succ, kind) - or - // See the QLDoc on `backEdgeSuccessorRaw`. - exists(TIRBlock pred2 | - // Joining with `blockIdentity` is a performance trick to get - // `forwardEdgeRaw` on the RHS of a join, where it's fast. - blockIdentity(pred, pred2) and - forwardEdgeRaw+(pred, pred2) - ) and - blockSuccessor(pred, succ, kind) - } - - /** - * Holds if there is an edge from `pred` to `succ` that is not a back edge. - */ - private predicate forwardEdgeRaw(TIRBlock pred, TIRBlock succ) { - exists(EdgeKind kind | - blockSuccessor(pred, succ, kind) and - not backEdgeSuccessorRaw(pred, succ, kind) - ) - } - - /** - * Holds if the `kind`-edge from `pred` to `succ` is a back edge according to - * `Construction`. - * - * There could be loops of non-back-edges if there is a flaw in the IR - * construction or back-edge detection, and this could cause non-termination - * of subsequent analysis. To prevent that, a subsequent predicate further - * classifies all edges as back edges if they are involved in a loop of - * non-back-edges. - */ - private predicate backEdgeSuccessorRaw(TIRBlock pred, TIRBlock succ, EdgeKind kind) { - exists(Instruction predLast, Instruction succFirst | - predLast = getInstruction(pred, getInstructionCount(pred) - 1) and - succFirst = Construction::getInstructionBackEdgeSuccessor(predLast, kind) and - succ = MkIRBlock(succFirst) - ) - } - - cached - predicate blockSuccessor(TIRBlock pred, TIRBlock succ) { blockSuccessor(pred, succ, _) } - - cached - predicate blockImmediatelyDominates(TIRBlock dominator, TIRBlock block) = - idominance(isEntryBlock/1, blockSuccessor/2)(_, dominator, block) -} - -private Instruction getFirstInstruction(TIRBlock block) { block = MkIRBlock(result) } - -private predicate blockFunctionExit(IRBlock exit) { - exit.getLastInstruction() instanceof ExitFunctionInstruction -} - -private predicate blockPredecessor(IRBlock src, IRBlock pred) { src.getAPredecessor() = pred } - -private predicate blockImmediatelyPostDominates(IRBlock postDominator, IRBlock block) = - idominance(blockFunctionExit/1, blockPredecessor/2)(_, postDominator, block) diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.ql b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.ql deleted file mode 100644 index 909a7a5fc24..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.ql +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @name SSA IR Consistency Check - * @description Performs consistency checks on the Intermediate Representation. This query should have no results. - * @kind table - * @id cpp/ssa-ir-consistency-check - */ - -import IRConsistency diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.qll deleted file mode 100644 index edc785dfabe..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRConsistency.qll +++ /dev/null @@ -1,549 +0,0 @@ -private import IR -import InstructionConsistency // module is below -import IRTypeConsistency // module is in IRType.qll -import internal.IRConsistencyImports - -module InstructionConsistency { - private import internal.InstructionImports as Imports - private import Imports::OperandTag - private import Imports::Overlap - private import internal.IRInternal - - private newtype TOptionalIRFunction = - TPresentIRFunction(IRFunction irFunc) or - TMissingIRFunction() - - /** - * An `IRFunction` that might not exist. This is used so that we can produce consistency failures - * for IR that also incorrectly lacks a `getEnclosingIRFunction()`. - */ - abstract private class OptionalIRFunction extends TOptionalIRFunction { - abstract string toString(); - - abstract Language::Location getLocation(); - } - - class PresentIRFunction extends OptionalIRFunction, TPresentIRFunction { - private IRFunction irFunc; - - PresentIRFunction() { this = TPresentIRFunction(irFunc) } - - override string toString() { - result = concat(LanguageDebug::getIdentityString(irFunc.getFunction()), "; ") - } - - override Language::Location getLocation() { - // To avoid an overwhelming number of results when the extractor merges functions with the - // same name, just pick a single location. - result = - min(Language::Location loc | loc = irFunc.getLocation() | loc order by loc.toString()) - } - - IRFunction getIRFunction() { result = irFunc } - } - - private class MissingIRFunction extends OptionalIRFunction, TMissingIRFunction { - override string toString() { result = "" } - - override Language::Location getLocation() { result instanceof Language::UnknownDefaultLocation } - } - - private OptionalIRFunction getInstructionIRFunction(Instruction instr) { - result = TPresentIRFunction(instr.getEnclosingIRFunction()) - or - not exists(instr.getEnclosingIRFunction()) and result = TMissingIRFunction() - } - - pragma[inline] - private OptionalIRFunction getInstructionIRFunction(Instruction instr, string irFuncText) { - result = getInstructionIRFunction(instr) and - irFuncText = result.toString() - } - - private OptionalIRFunction getOperandIRFunction(Operand operand) { - result = TPresentIRFunction(operand.getEnclosingIRFunction()) - or - not exists(operand.getEnclosingIRFunction()) and result = TMissingIRFunction() - } - - pragma[inline] - private OptionalIRFunction getOperandIRFunction(Operand operand, string irFuncText) { - result = getOperandIRFunction(operand) and - irFuncText = result.toString() - } - - private OptionalIRFunction getBlockIRFunction(IRBlock block) { - result = TPresentIRFunction(block.getEnclosingIRFunction()) - or - not exists(block.getEnclosingIRFunction()) and result = TMissingIRFunction() - } - - /** - * Holds if instruction `instr` is missing an expected operand with tag `tag`. - */ - query predicate missingOperand( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(OperandTag tag | - instr.getOpcode().hasOperand(tag) and - not exists(NonPhiOperand operand | - operand = instr.getAnOperand() and - operand.getOperandTag() = tag - ) and - message = - "Instruction '" + instr.getOpcode().toString() + - "' is missing an expected operand with tag '" + tag.toString() + "' in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if instruction `instr` has an unexpected operand with tag `tag`. - */ - query predicate unexpectedOperand( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(OperandTag tag | - exists(NonPhiOperand operand | - operand = instr.getAnOperand() and - operand.getOperandTag() = tag - ) and - not instr.getOpcode().hasOperand(tag) and - not (instr instanceof CallInstruction and tag instanceof ArgumentOperandTag) and - not ( - instr instanceof BuiltInOperationInstruction and tag instanceof PositionalArgumentOperandTag - ) and - not (instr instanceof InlineAsmInstruction and tag instanceof AsmOperandTag) and - message = - "Instruction '" + instr.toString() + "' has unexpected operand '" + tag.toString() + - "' in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if instruction `instr` has multiple operands with tag `tag`. - */ - query predicate duplicateOperand( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(OperandTag tag, int operandCount | - operandCount = - strictcount(NonPhiOperand operand | - operand = instr.getAnOperand() and - operand.getOperandTag() = tag - ) and - operandCount > 1 and - message = - "Instruction has " + operandCount + " operands with tag '" + tag.toString() + "'" + - " in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if `Phi` instruction `instr` is missing an operand corresponding to - * the predecessor block `pred`. - */ - query predicate missingPhiOperand( - PhiInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(IRBlock pred | - pred = instr.getBlock().getAPredecessor() and - not exists(PhiInputOperand operand | - operand = instr.getAnOperand() and - operand.getPredecessorBlock() = pred - ) and - message = - "Instruction '" + instr.toString() + "' is missing an operand for predecessor block '" + - pred.toString() + "' in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - query predicate missingOperandType( - Operand operand, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(Instruction use | - not exists(operand.getType()) and - use = operand.getUse() and - message = - "Operand '" + operand.toString() + "' of instruction '" + use.getOpcode().toString() + - "' is missing a type in function '$@'." and - irFunc = getOperandIRFunction(operand, irFuncText) - ) - } - - query predicate duplicateChiOperand( - ChiInstruction chi, string message, OptionalIRFunction irFunc, string irFuncText - ) { - chi.getTotal() = chi.getPartial() and - message = - "Chi instruction for " + chi.getPartial().toString() + - " has duplicate operands in function '$@'." and - irFunc = getInstructionIRFunction(chi, irFuncText) - } - - query predicate sideEffectWithoutPrimary( - SideEffectInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - not exists(instr.getPrimaryInstruction()) and - message = - "Side effect instruction '" + instr + "' is missing a primary instruction in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - /** - * Holds if an instruction, other than `ExitFunction`, has no successors. - */ - query predicate instructionWithoutSuccessor( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - not exists(instr.getASuccessor()) and - not instr instanceof ExitFunctionInstruction and - // Phi instructions aren't linked into the instruction-level flow graph. - not instr instanceof PhiInstruction and - not instr instanceof UnreachedInstruction and - message = "Instruction '" + instr.toString() + "' has no successors in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - /** - * Holds if there are multiple edges of the same kind from `source`. - */ - query predicate ambiguousSuccessors( - Instruction source, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(EdgeKind kind, int n | - n = strictcount(Instruction t | source.getSuccessor(kind) = t) and - n > 1 and - message = - "Instruction '" + source.toString() + "' has " + n.toString() + " successors of kind '" + - kind.toString() + "' in function '$@'." and - irFunc = getInstructionIRFunction(source, irFuncText) - ) - } - - /** - * Holds if `instr` is part of a loop even though the AST of `instr`'s enclosing function - * contains no element that can cause loops. - */ - query predicate unexplainedLoop( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(Language::Function f | - exists(IRBlock block | - instr.getBlock() = block and - block.getEnclosingFunction() = f and - block.getASuccessor+() = block - ) and - not Language::hasPotentialLoop(f) and - message = - "Instruction '" + instr.toString() + "' is part of an unexplained loop in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if a `Phi` instruction is present in a block with fewer than two - * predecessors. - */ - query predicate unnecessaryPhiInstruction( - PhiInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(int n | - n = count(instr.getBlock().getAPredecessor()) and - n < 2 and - message = - "Instruction '" + instr.toString() + "' is in a block with only " + n.toString() + - " predecessors in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if a memory operand is connected to a definition with an unmodeled result. - */ - query predicate memoryOperandDefinitionIsUnmodeled( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(MemoryOperand operand, Instruction def | - operand = instr.getAnOperand() and - def = operand.getAnyDef() and - not def.isResultModeled() and - message = - "Memory operand definition on instruction '" + instr.toString() + - "' has unmodeled result in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if operand `operand` consumes a value that was defined in - * a different function. - */ - query predicate operandAcrossFunctions( - Operand operand, string message, OptionalIRFunction useIRFunc, string useIRFuncText, - OptionalIRFunction defIRFunc, string defIRFuncText - ) { - exists(Instruction useInstr, Instruction defInstr | - operand.getUse() = useInstr and - operand.getAnyDef() = defInstr and - useIRFunc = getInstructionIRFunction(useInstr, useIRFuncText) and - defIRFunc = getInstructionIRFunction(defInstr, defIRFuncText) and - useIRFunc != defIRFunc and - message = - "Operand '" + operand.toString() + "' is used on instruction '" + useInstr.toString() + - "' in function '$@', but is defined on instruction '" + defInstr.toString() + - "' in function '$@'." - ) - } - - /** - * Holds if instruction `instr` is not in exactly one block. - */ - query predicate instructionWithoutUniqueBlock( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(int blockCount | - blockCount = count(instr.getBlock()) and - blockCount != 1 and - message = - "Instruction '" + instr.toString() + "' is a member of " + blockCount.toString() + - " blocks in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - private predicate forwardEdge(IRBlock b1, IRBlock b2) { - b1.getASuccessor() = b2 and - not b1.getBackEdgeSuccessor(_) = b2 - } - - /** - * Holds if `f` contains a loop in which no edge is a back edge. - * - * This check ensures we don't have too _few_ back edges. - */ - query predicate containsLoopOfForwardEdges(IRFunction f, string message) { - exists(IRBlock block | - forwardEdge+(block, block) and - block.getEnclosingIRFunction() = f and - message = "Function contains a loop consisting of only forward edges." - ) - } - - /** - * Holds if `block` is reachable from its function entry point but would not - * be reachable by traversing only forward edges. This check is skipped for - * functions containing `goto` statements as the property does not generally - * hold there. - * - * This check ensures we don't have too _many_ back edges. - */ - query predicate lostReachability( - IRBlock block, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(IRFunction f, IRBlock entry | - entry = f.getEntryBlock() and - entry.getASuccessor+() = block and - not forwardEdge+(entry, block) and - not Language::hasGoto(f.getFunction()) and - message = - "Block '" + block.toString() + - "' is not reachable by traversing only forward edges in function '$@'." and - irFunc = TPresentIRFunction(f) and - irFuncText = irFunc.toString() - ) - } - - /** - * Holds if the number of back edges differs between the `Instruction` graph - * and the `IRBlock` graph. - */ - query predicate backEdgeCountMismatch(OptionalIRFunction irFunc, string message) { - exists(int fromInstr, int fromBlock | - fromInstr = - count(Instruction i1, Instruction i2 | - getInstructionIRFunction(i1) = irFunc and i1.getBackEdgeSuccessor(_) = i2 - ) and - fromBlock = - count(IRBlock b1, IRBlock b2 | - getBlockIRFunction(b1) = irFunc and b1.getBackEdgeSuccessor(_) = b2 - ) and - fromInstr != fromBlock and - message = - "The instruction graph for function '" + irFunc.toString() + "' contains " + - fromInstr.toString() + " back edges, but the block graph contains " + fromBlock.toString() - + " back edges." - ) - } - - /** - * Gets the point in the function at which the specified operand is evaluated. For most operands, - * this is at the instruction that consumes the use. For a `PhiInputOperand`, the effective point - * of evaluation is at the end of the corresponding predecessor block. - */ - private predicate pointOfEvaluation(Operand operand, IRBlock block, int index) { - block = operand.(PhiInputOperand).getPredecessorBlock() and - index = block.getInstructionCount() - or - exists(Instruction use | - use = operand.(NonPhiOperand).getUse() and - block.getInstruction(index) = use - ) - } - - /** - * Holds if `useOperand` has a definition that does not dominate the use. - */ - query predicate useNotDominatedByDefinition( - Operand useOperand, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(IRBlock useBlock, int useIndex, Instruction defInstr, IRBlock defBlock, int defIndex | - pointOfEvaluation(useOperand, useBlock, useIndex) and - defInstr = useOperand.getAnyDef() and - ( - defInstr instanceof PhiInstruction and - defBlock = defInstr.getBlock() and - defIndex = -1 - or - defBlock.getInstruction(defIndex) = defInstr - ) and - not ( - defBlock.strictlyDominates(useBlock) - or - defBlock = useBlock and - defIndex < useIndex - ) and - message = - "Operand '" + useOperand.toString() + - "' is not dominated by its definition in function '$@'." and - irFunc = getOperandIRFunction(useOperand, irFuncText) - ) - } - - query predicate switchInstructionWithoutDefaultEdge( - SwitchInstruction switchInstr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - not exists(switchInstr.getDefaultSuccessor()) and - message = - "SwitchInstruction " + switchInstr.toString() + " without a DefaultEdge in function '$@'." and - irFunc = getInstructionIRFunction(switchInstr, irFuncText) - } - - /** - * Holds if `instr` is on the chain of chi/phi instructions for all aliased - * memory. - */ - private predicate isOnAliasedDefinitionChain(Instruction instr) { - instr instanceof AliasedDefinitionInstruction - or - isOnAliasedDefinitionChain(instr.(ChiInstruction).getTotal()) - or - isOnAliasedDefinitionChain(instr.(PhiInstruction).getAnInputOperand().getAnyDef()) - } - - private predicate shouldBeConflated(Instruction instr) { - isOnAliasedDefinitionChain(instr) - or - instr.getOpcode() instanceof Opcode::InitializeNonLocal - } - - query predicate notMarkedAsConflated( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - shouldBeConflated(instr) and - not instr.isResultConflated() and - message = - "Instruction '" + instr.toString() + - "' should be marked as having a conflated result in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - query predicate wronglyMarkedAsConflated( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - instr.isResultConflated() and - not shouldBeConflated(instr) and - message = - "Instruction '" + instr.toString() + - "' should not be marked as having a conflated result in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - query predicate invalidOverlap( - MemoryOperand useOperand, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(Overlap overlap | - overlap = useOperand.getDefinitionOverlap() and - overlap instanceof MayPartiallyOverlap and - message = - "MemoryOperand '" + useOperand.toString() + "' has a `getDefinitionOverlap()` of '" + - overlap.toString() + "'." and - irFunc = getOperandIRFunction(useOperand, irFuncText) - ) - } - - query predicate nonUniqueEnclosingIRFunction( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(int irFuncCount | - irFuncCount = count(instr.getEnclosingIRFunction()) and - irFuncCount != 1 and - message = - "Instruction '" + instr.toString() + "' has " + irFuncCount.toString() + - " results for `getEnclosingIRFunction()` in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - ) - } - - /** - * Holds if the object address operand for the given `FieldAddress` instruction does not have an - * address type. - */ - query predicate fieldAddressOnNonPointer( - FieldAddressInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - not instr.getObjectAddressOperand().getIRType() instanceof IRAddressType and - message = - "FieldAddress instruction '" + instr.toString() + - "' has an object address operand that is not an address, in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - /** - * Holds if the `this` argument operand for the given `Call` instruction does not have an address - * type. - */ - query predicate thisArgumentIsNonPointer( - CallInstruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(ThisArgumentOperand thisOperand | thisOperand = instr.getThisArgumentOperand() | - not thisOperand.getIRType() instanceof IRAddressType - ) and - message = - "Call instruction '" + instr.toString() + - "' has a `this` argument operand that is not an address, in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } - - query predicate nonUniqueIRVariable( - Instruction instr, string message, OptionalIRFunction irFunc, string irFuncText - ) { - exists(VariableInstruction vi, IRVariable v1, IRVariable v2 | - instr = vi and vi.getIRVariable() = v1 and vi.getIRVariable() = v2 and v1 != v2 - ) and - message = - "Variable instruction '" + instr.toString() + - "' has multiple associated variables, in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - or - instr.getOpcode() instanceof Opcode::VariableAddress and - not instr instanceof VariableInstruction and - message = - "Variable address instruction '" + instr.toString() + - "' has no associated variable, in function '$@'." and - irFunc = getInstructionIRFunction(instr, irFuncText) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRFunction.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRFunction.qll deleted file mode 100644 index 354ba41e3d1..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRFunction.qll +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Provides the class `IRFunction`, which represents the Intermediate Representation for the - * definition of a function. - */ - -private import internal.IRInternal -private import internal.IRFunctionImports as Imports -import Imports::IRFunctionBase -import Instruction - -/** - * The IR for a function. - */ -class IRFunction extends IRFunctionBase { - /** - * Gets the entry point for this function. - */ - pragma[noinline] - final EnterFunctionInstruction getEnterFunctionInstruction() { - result.getEnclosingIRFunction() = this - } - - /** - * Gets the exit point for this function. - */ - pragma[noinline] - final ExitFunctionInstruction getExitFunctionInstruction() { - result.getEnclosingIRFunction() = this - } - - /** - * Gets the single return instruction for this function. - */ - pragma[noinline] - final ReturnInstruction getReturnInstruction() { result.getEnclosingIRFunction() = this } - - /** - * Gets the variable used to hold the return value of this function. If this - * function does not return a value, this predicate does not hold. - */ - pragma[noinline] - final IRReturnVariable getReturnVariable() { result.getEnclosingIRFunction() = this } - - /** - * Gets the block containing the entry point of this function. - */ - pragma[noinline] - final IRBlock getEntryBlock() { - result.getFirstInstruction() = this.getEnterFunctionInstruction() - } - - /** - * Gets all instructions in this function. - */ - final Instruction getAnInstruction() { result.getEnclosingIRFunction() = this } - - /** - * Gets all blocks in this function. - */ - final IRBlock getABlock() { result.getEnclosingIRFunction() = this } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRVariable.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRVariable.qll deleted file mode 100644 index b31c7898ba7..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/IRVariable.qll +++ /dev/null @@ -1,337 +0,0 @@ -/** - * Provides classes that represent variables accessed by the IR. - */ - -private import internal.IRInternal -import IRFunction -private import internal.IRVariableImports as Imports -import Imports::TempVariableTag -private import Imports::IRUtilities -private import Imports::TTempVariableTag -private import Imports::TIRVariable -private import Imports::IRType - -/** - * A variable referenced by the IR for a function. - * - * The variable may be a user-declared variable (`IRUserVariable`) or a temporary variable generated - * by the AST-to-IR translation (`IRTempVariable`). - */ -class IRVariable extends TIRVariable { - Language::Declaration func; - - IRVariable() { - this = TIRUserVariable(_, _, func) or - this = TIRTempVariable(func, _, _, _) or - this = TIRStringLiteral(func, _, _, _) or - this = TIRDynamicInitializationFlag(func, _, _) - } - - /** Gets a textual representation of this element. */ - string toString() { none() } - - /** - * Holds if this variable's value cannot be changed within a function. Currently used for string - * literals, but could also apply to `const` global and static variables. - */ - predicate isReadOnly() { none() } - - /** - * Gets the type of the variable. - */ - final Language::Type getType() { this.getLanguageType().hasType(result, false) } - - /** - * Gets the language-neutral type of the variable. - */ - final IRType getIRType() { result = this.getLanguageType().getIRType() } - - /** - * Gets the type of the variable. - */ - Language::LanguageType getLanguageType() { none() } - - /** - * Gets the AST node that declared this variable, or that introduced this - * variable as part of the AST-to-IR translation. - */ - Language::AST getAst() { none() } - - /** DEPRECATED: Alias for getAst */ - deprecated Language::AST getAST() { result = this.getAst() } - - /** - * Gets an identifier string for the variable. This identifier is unique - * within the function. - */ - string getUniqueId() { none() } - - /** - * Gets the source location of this variable. - */ - final Language::Location getLocation() { result = this.getAst().getLocation() } - - /** - * Gets the IR for the function that references this variable. - */ - final IRFunction getEnclosingIRFunction() { result.getFunction() = func } - - /** - * Gets the function that references this variable. - */ - final Language::Declaration getEnclosingFunction() { result = func } -} - -/** - * A user-declared variable referenced by the IR for a function. - */ -class IRUserVariable extends IRVariable, TIRUserVariable { - Language::Variable var; - Language::LanguageType type; - - IRUserVariable() { this = TIRUserVariable(var, type, func) } - - final override string toString() { result = this.getVariable().toString() } - - final override Language::AST getAst() { result = var } - - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - - final override string getUniqueId() { - result = this.getVariable().toString() + " " + this.getVariable().getLocation().toString() - } - - final override Language::LanguageType getLanguageType() { result = type } - - /** - * Gets the original user-declared variable. - */ - Language::Variable getVariable() { result = var } -} - -/** - * A variable (user-declared or temporary) that is allocated on the stack. This includes all - * parameters, non-static local variables, and temporary variables. - */ -class IRAutomaticVariable extends IRVariable { - IRAutomaticVariable() { - exists(Language::Variable var | - this = TIRUserVariable(var, _, func) and - Language::isVariableAutomatic(var) - ) - or - this = TIRTempVariable(func, _, _, _) - } -} - -/** - * A user-declared variable that is allocated on the stack. This includes all parameters and - * non-static local variables. - */ -class IRAutomaticUserVariable extends IRUserVariable, IRAutomaticVariable { - override Language::AutomaticVariable var; - - final override Language::AutomaticVariable getVariable() { result = var } -} - -/** - * A user-declared variable that is not allocated on the stack. This includes all global variables, - * namespace-scope variables, static fields, and static local variables. - */ -class IRStaticUserVariable extends IRUserVariable { - override Language::StaticVariable var; - - IRStaticUserVariable() { not Language::isVariableAutomatic(var) } - - final override Language::StaticVariable getVariable() { result = var } -} - -/** - * A variable that is not user-declared. This includes temporary variables generated as part of IR - * construction, as well as string literals. - */ -class IRGeneratedVariable extends IRVariable { - Language::AST ast; - Language::LanguageType type; - - IRGeneratedVariable() { - this = TIRTempVariable(func, ast, _, type) or - this = TIRStringLiteral(func, ast, type, _) or - this = TIRDynamicInitializationFlag(func, ast, type) - } - - final override Language::LanguageType getLanguageType() { result = type } - - final override Language::AST getAst() { result = ast } - - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - - override string toString() { result = this.getBaseString() + this.getLocationString() } - - override string getUniqueId() { none() } - - /** - * INTERNAL: Do not use. - * - * Gets a string containing the source code location of the AST that generated this variable. - * - * This is used by debugging and printing code only. - */ - final string getLocationString() { - result = - ast.getLocation().getStartLine().toString() + ":" + - ast.getLocation().getStartColumn().toString() - } - - /** - * INTERNAL: Do not use. - * - * Gets the string that is combined with the location of the variable to generate the string - * representation of this variable. - * - * This is used by debugging and printing code only. - */ - string getBaseString() { none() } -} - -/** - * A temporary variable introduced by IR construction. The most common examples are the variable - * generated to hold the return value of a function, or the variable generated to hold the result of - * a condition operator (`a ? b : c`). - */ -class IRTempVariable extends IRGeneratedVariable, IRAutomaticVariable, TIRTempVariable { - TempVariableTag tag; - - IRTempVariable() { this = TIRTempVariable(func, ast, tag, type) } - - final override string getUniqueId() { - result = "Temp: " + Construction::getTempVariableUniqueId(this) - } - - /** - * Gets the "tag" object that differentiates this temporary variable from other temporary - * variables generated for the same AST. - */ - final TempVariableTag getTag() { result = tag } - - override string getBaseString() { result = "#temp" } -} - -/** - * A temporary variable generated to hold the return value of a function. - */ -class IRReturnVariable extends IRTempVariable { - IRReturnVariable() { tag = ReturnValueTempVar() } - - final override string toString() { result = "#return" } -} - -/** - * A temporary variable generated to hold the exception thrown by a `ThrowValue` instruction. - */ -class IRThrowVariable extends IRTempVariable { - IRThrowVariable() { tag = ThrowTempVar() } - - final override string getBaseString() { result = "#throw" } -} - -/** - * A temporary variable generated to hold the contents of all arguments passed to the `...` of a - * function that accepts a variable number of arguments. - */ -class IREllipsisVariable extends IRTempVariable, IRParameter { - IREllipsisVariable() { tag = EllipsisTempVar() } - - final override string toString() { result = "#ellipsis" } - - final override int getIndex() { result = func.(Language::Function).getNumberOfParameters() } -} - -/** - * A temporary variable generated to hold the `this` pointer. - */ -class IRThisVariable extends IRTempVariable, IRParameter { - IRThisVariable() { tag = ThisTempVar() } - - final override string toString() { result = "#this" } - - final override int getIndex() { result = -1 } -} - -/** - * A variable generated to represent the contents of a string literal. This variable acts much like - * a read-only global variable. - */ -class IRStringLiteral extends IRGeneratedVariable, TIRStringLiteral { - Language::StringLiteral literal; - - IRStringLiteral() { this = TIRStringLiteral(func, ast, type, literal) } - - final override predicate isReadOnly() { any() } - - final override string getUniqueId() { - result = "String: " + this.getLocationString() + "=" + Language::getStringLiteralText(literal) - } - - final override string getBaseString() { result = "#string" } - - /** - * Gets the AST of the string literal represented by this `IRStringLiteral`. - */ - final Language::StringLiteral getLiteral() { result = literal } -} - -/** - * A variable generated to track whether a specific non-stack variable has been initialized. This is - * used to model the runtime initialization of static local variables in C++, as well as static - * fields in C#. - */ -class IRDynamicInitializationFlag extends IRGeneratedVariable, TIRDynamicInitializationFlag { - Language::Variable var; - - IRDynamicInitializationFlag() { - this = TIRDynamicInitializationFlag(func, var, type) and ast = var - } - - final override string toString() { result = var.toString() + "#init" } - - /** - * Gets variable whose initialization is guarded by this flag. - */ - final Language::Variable getVariable() { result = var } - - final override string getUniqueId() { - result = - "Init: " + this.getVariable().toString() + " " + this.getVariable().getLocation().toString() - } - - final override string getBaseString() { result = "#init:" + var.toString() + ":" } -} - -/** - * An IR variable which acts like a function parameter, including positional parameters and the - * temporary variables generated for `this` and ellipsis parameters. - */ -class IRParameter extends IRAutomaticVariable { - IRParameter() { - this.(IRAutomaticUserVariable).getVariable() instanceof Language::Parameter - or - this = TIRTempVariable(_, _, ThisTempVar(), _) - or - this = TIRTempVariable(_, _, EllipsisTempVar(), _) - } - - /** - * Gets the zero-based index of this parameter. The `this` parameter has index -1. - */ - int getIndex() { none() } -} - -/** - * An IR variable representing a positional parameter. - */ -class IRPositionalParameter extends IRParameter, IRAutomaticUserVariable { - final override int getIndex() { result = this.getVariable().(Language::Parameter).getIndex() } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Instruction.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Instruction.qll deleted file mode 100644 index 189ffce2903..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Instruction.qll +++ /dev/null @@ -1,2231 +0,0 @@ -/** - * Provides classes that represent the individual instructions in the IR for a function. - */ - -private import internal.IRInternal -import IRFunction -import IRBlock -import IRVariable -import Operand -private import internal.InstructionImports as Imports -import Imports::EdgeKind -import Imports::IRType -import Imports::MemoryAccessKind -import Imports::Opcode -private import Imports::OperandTag - -/** - * Gets an `Instruction` that is contained in `IRFunction`, and has a location with the specified - * `File` and line number. Used for assigning register names when printing IR. - */ -private Instruction getAnInstructionAtLine(IRFunction irFunc, Language::File file, int line) { - exists(IRConfiguration::IRConfiguration config | - config.shouldEvaluateDebugStringsForFunction(irFunc.getFunction()) - ) and - exists(Language::Location location | - irFunc = result.getEnclosingIRFunction() and - location = result.getLocation() and - file = location.getFile() and - line = location.getStartLine() - ) -} - -/** - * A single instruction in the IR. - */ -class Instruction extends Construction::TStageInstruction { - Instruction() { - // The base `TStageInstruction` type is a superset of the actual instructions appearing in this - // stage. This call lets the stage filter out the ones that are not reused from raw IR. - Construction::hasInstruction(this) - } - - /** Gets a textual representation of this element. */ - final string toString() { result = this.getOpcode().toString() + ": " + this.getAst().toString() } - - /** - * Gets a string showing the result, opcode, and operands of the instruction, equivalent to what - * would be printed by PrintIR.ql. For example: - * - * `mu0_28(int) = Store r0_26, r0_27` - */ - final string getDumpString() { - result = - this.getResultString() + " = " + this.getOperationString() + " " + this.getOperandsString() - } - - private predicate shouldGenerateDumpStrings() { - exists(IRConfiguration::IRConfiguration config | - config.shouldEvaluateDebugStringsForFunction(this.getEnclosingFunction()) - ) - } - - /** - * Gets a string describing the operation of this instruction. This includes - * the opcode and the immediate value, if any. For example: - * - * VariableAddress[x] - */ - final string getOperationString() { - this.shouldGenerateDumpStrings() and - if exists(this.getImmediateString()) - then - result = - this.getOperationPrefix() + this.getOpcode().toString() + "[" + this.getImmediateString() + - "]" - else result = this.getOperationPrefix() + this.getOpcode().toString() - } - - /** - * Gets a string describing the immediate value of this instruction, if any. - */ - string getImmediateString() { none() } - - private string getOperationPrefix() { - this.shouldGenerateDumpStrings() and - if this instanceof SideEffectInstruction then result = "^" else result = "" - } - - private string getResultPrefix() { - this.shouldGenerateDumpStrings() and - if this.getResultIRType() instanceof IRVoidType - then result = "v" - else - if this.hasMemoryResult() - then if this.isResultModeled() then result = "m" else result = "mu" - else result = "r" - } - - /** - * Gets the zero-based index of this instruction within its block. This is - * used by debugging and printing code only. - */ - int getDisplayIndexInBlock() { - this.shouldGenerateDumpStrings() and - exists(IRBlock block | - this = block.getInstruction(result) - or - this = - rank[-result - 1](PhiInstruction phiInstr | - phiInstr = block.getAPhiInstruction() - | - phiInstr order by phiInstr.getUniqueId() - ) - ) - } - - private int getLineRank() { - this.shouldGenerateDumpStrings() and - exists(IRFunction enclosing, Language::File file, int line | - this = - rank[result](Instruction instr | - instr = getAnInstructionAtLine(enclosing, file, line) - | - instr order by instr.getBlock().getDisplayIndex(), instr.getDisplayIndexInBlock() - ) - ) - } - - /** - * Gets a human-readable string that uniquely identifies this instruction - * within the function. This string is used to refer to this instruction when - * printing IR dumps. - * - * Example: `r1_1` - */ - string getResultId() { - this.shouldGenerateDumpStrings() and - result = - this.getResultPrefix() + this.getAst().getLocation().getStartLine() + "_" + this.getLineRank() - } - - /** - * Gets a string describing the result of this instruction, suitable for - * display in IR dumps. This consists of the result ID plus the type of the - * result. - * - * Example: `r1_1(int*)` - */ - final string getResultString() { - this.shouldGenerateDumpStrings() and - result = this.getResultId() + "(" + this.getResultLanguageType().getDumpString() + ")" - } - - /** - * Gets a string describing the operands of this instruction, suitable for - * display in IR dumps. - * - * Example: `func:r3_4, this:r3_5` - */ - string getOperandsString() { - this.shouldGenerateDumpStrings() and - result = - concat(Operand operand | - operand = this.getAnOperand() - | - operand.getDumpString(), ", " order by operand.getDumpSortOrder() - ) - } - - /** - * Gets a string identifier for this function that is unique among all - * instructions in the same function. - * - * This is used for sorting IR output for tests, and is likely to be - * inefficient for any other use. - */ - final string getUniqueId() { result = Construction::getInstructionUniqueId(this) } - - /** - * INTERNAL: Do not use. - * - * Gets two sort keys for this instruction - used to order instructions for printing - * in test outputs. - */ - final predicate hasSortKeys(int key1, int key2) { - Construction::instructionHasSortKeys(this, key1, key2) - } - - /** - * Gets the basic block that contains this instruction. - */ - final IRBlock getBlock() { result.getAnInstruction() = this } - - /** - * Gets the function that contains this instruction. - */ - final Language::Declaration getEnclosingFunction() { - result = this.getEnclosingIRFunction().getFunction() - } - - /** - * Gets the IRFunction object that contains the IR for this instruction. - */ - final IRFunction getEnclosingIRFunction() { - result = Construction::getInstructionEnclosingIRFunction(this) - } - - /** - * Gets the AST that caused this instruction to be generated. - */ - final Language::AST getAst() { result = Construction::getInstructionAst(this) } - - /** - * Gets the location of the source code for this instruction. - */ - final Language::Location getLocation() { result = this.getAst().getLocation() } - - /** - * Gets the `Expr` whose result is computed by this instruction, if any. The `Expr` may be a - * conversion. - */ - final Language::Expr getConvertedResultExpression() { - result = Raw::getInstructionConvertedResultExpression(this) - } - - /** - * Gets the unconverted form of the `Expr` whose result is computed by this instruction, if any. - */ - final Language::Expr getUnconvertedResultExpression() { - result = Raw::getInstructionUnconvertedResultExpression(this) - } - - /** - * Gets the language-specific type of the result produced by this instruction. - * - * Most consumers of the IR should use `getResultIRType()` instead. `getResultIRType()` uses a - * less complex, language-neutral type system in which all semantically equivalent types share the - * same `IRType` instance. For example, in C++, four different `Instruction`s might have three - * different values for `getResultLanguageType()`: `unsigned int`, `char32_t`, and `wchar_t`, - * whereas all four instructions would have the same value for `getResultIRType()`, `uint4`. - */ - final Language::LanguageType getResultLanguageType() { - result = Construction::getInstructionResultType(this) - } - - /** - * Gets the type of the result produced by this instruction. If the instruction does not produce - * a result, its result type will be `IRVoidType`. - */ - cached - final IRType getResultIRType() { result = this.getResultLanguageType().getIRType() } - - /** - * Gets the type of the result produced by this instruction. If the - * instruction does not produce a result, its result type will be `VoidType`. - * - * If `isGLValue()` holds, then the result type of this instruction should be - * thought of as "pointer to `getResultType()`". - */ - final Language::Type getResultType() { - exists(Language::LanguageType resultType | - resultType = this.getResultLanguageType() and - ( - resultType.hasUnspecifiedType(result, _) - or - not resultType.hasUnspecifiedType(_, _) and result instanceof Language::UnknownType - ) - ) - } - - /** - * Holds if the result produced by this instruction is a glvalue. If this - * holds, the result of the instruction represents the address of a location, - * and the type of the location is given by `getResultType()`. If this does - * not hold, the result of the instruction represents a value whose type is - * given by `getResultType()`. - * - * For example, the statement `y = x;` generates the following IR: - * ``` - * r1_0(glval: int) = VariableAddress[x] - * r1_1(int) = Load r1_0, mu0_1 - * r1_2(glval: int) = VariableAddress[y] - * mu1_3(int) = Store r1_2, r1_1 - * ``` - * - * The result of each `VariableAddress` instruction is a glvalue of type - * `int`, representing the address of the corresponding integer variable. The - * result of the `Load` instruction is a prvalue of type `int`, representing - * the integer value loaded from variable `x`. - */ - final predicate isGLValue() { this.getResultLanguageType().hasType(_, true) } - - /** - * Gets the size of the result produced by this instruction, in bytes. If the - * result does not have a known constant size, this predicate does not hold. - * - * If `this.isGLValue()` holds for this instruction, the value of - * `getResultSize()` will always be the size of a pointer. - */ - final int getResultSize() { result = this.getResultLanguageType().getByteSize() } - - /** - * Gets the opcode that specifies the operation performed by this instruction. - */ - pragma[inline] - final Opcode getOpcode() { Construction::getInstructionOpcode(result, this) } - - /** - * Gets all direct uses of the result of this instruction. The result can be - * an `Operand` for which `isDefinitionInexact` holds. - */ - final Operand getAUse() { result.getAnyDef() = this } - - /** - * Gets all of this instruction's operands. - */ - final Operand getAnOperand() { result.getUse() = this } - - /** - * Holds if this instruction produces a memory result. - */ - final predicate hasMemoryResult() { exists(this.getResultMemoryAccess()) } - - /** - * Gets the kind of memory access performed by this instruction's result. - * Holds only for instructions with a memory result. - */ - pragma[inline] - final MemoryAccessKind getResultMemoryAccess() { - result = this.getOpcode().getWriteMemoryAccess() - } - - /** - * Holds if the memory access performed by this instruction's result will not always write to - * every bit in the memory location. This is most commonly used for memory accesses that may or - * may not actually occur depending on runtime state (for example, the write side effect of an - * output parameter that is not written to on all paths), or for accesses where the memory - * location is a conservative estimate of the memory that might actually be accessed at runtime - * (for example, the global side effects of a function call). - */ - pragma[inline] - final predicate hasResultMayMemoryAccess() { this.getOpcode().hasMayWriteMemoryAccess() } - - /** - * Gets the operand that holds the memory address to which this instruction stores its - * result, if any. For example, in `m3 = Store r1, r2`, the result of `getResultAddressOperand()` - * is `r1`. - */ - final AddressOperand getResultAddressOperand() { - this.getResultMemoryAccess().usesAddressOperand() and - result.getUse() = this - } - - /** - * Gets the instruction that holds the exact memory address to which this instruction stores its - * result, if any. For example, in `m3 = Store r1, r2`, the result of `getResultAddressOperand()` - * is the instruction that defines `r1`. - */ - final Instruction getResultAddress() { result = this.getResultAddressOperand().getDef() } - - /** - * Holds if the result of this instruction is precisely modeled in SSA. Always - * holds for a register result. For a memory result, a modeled result is - * connected to its actual uses. An unmodeled result has no uses. - * - * For example: - * ``` - * int x = 1; - * int *p = &x; - * int y = *p; - * ``` - * In non-aliased SSA, `x` will not be modeled because it has its address - * taken. In that case, `isResultModeled()` would not hold for the result of - * the `Store` to `x`. - */ - final predicate isResultModeled() { - // Register results are always in SSA form. - not this.hasMemoryResult() or - Construction::hasModeledMemoryResult(this) - } - - /** - * Holds if this is an instruction with a memory result that represents a - * conflation of more than one memory allocation. - * - * This happens in practice when dereferencing a pointer that cannot be - * tracked back to a single local allocation. Such memory is instead modeled - * as originating on the `AliasedDefinitionInstruction` at the entry of the - * function. - */ - final predicate isResultConflated() { Construction::hasConflatedMemoryResult(this) } - - /** - * Gets the successor of this instruction along the control flow edge - * specified by `kind`. - */ - final Instruction getSuccessor(EdgeKind kind) { - result = Construction::getInstructionSuccessor(this, kind) - } - - /** - * Gets the a _back-edge successor_ of this instruction along the control - * flow edge specified by `kind`. A back edge in the control-flow graph is - * intuitively the edge that goes back around a loop. If all back edges are - * removed from the control-flow graph, it becomes acyclic. - */ - final Instruction getBackEdgeSuccessor(EdgeKind kind) { - // We don't take these edges from - // `Construction::getInstructionBackEdgeSuccessor` since that relation has - // not been treated to remove any loops that might be left over due to - // flaws in the IR construction or back-edge detection. - exists(IRBlock block | - block = this.getBlock() and - this = block.getLastInstruction() and - result = block.getBackEdgeSuccessor(kind).getFirstInstruction() - ) - } - - /** - * Gets all direct successors of this instruction. - */ - final Instruction getASuccessor() { result = this.getSuccessor(_) } - - /** - * Gets a predecessor of this instruction such that the predecessor reaches - * this instruction along the control flow edge specified by `kind`. - */ - final Instruction getPredecessor(EdgeKind kind) { result.getSuccessor(kind) = this } - - /** - * Gets all direct predecessors of this instruction. - */ - final Instruction getAPredecessor() { result = this.getPredecessor(_) } -} - -/** - * An instruction that refers to a variable. - * - * This class is used for any instruction whose operation fundamentally depends on a specific - * variable. For example, it is used for `VariableAddress`, which returns the address of a specific - * variable, and `InitializeParameter`, which returns the value that was passed to the specified - * parameter by the caller. `VariableInstruction` is not used for `Load` or `Store` instructions - * that happen to load from or store to a particular variable; in those cases, the memory location - * being accessed is specified by the `AddressOperand` on the instruction, which may or may not be - * defined by the result of a `VariableAddress` instruction. - */ -class VariableInstruction extends Instruction { - IRVariable var; - - VariableInstruction() { var = Raw::getInstructionVariable(this) } - - override string getImmediateString() { result = var.toString() } - - /** - * Gets the variable that this instruction references. - */ - final IRVariable getIRVariable() { result = var } - - /** - * Gets the AST variable that this instruction's IR variable refers to, if one exists. - */ - final Language::Variable getAstVariable() { result = var.(IRUserVariable).getVariable() } -} - -/** - * An instruction that refers to a field of a class, struct, or union. - * - * This class is used for any instruction whose operation fundamentally depends on a specific - * field. For example, it is used for `FieldAddress`, which computes the address of a specific - * field on an object. `FieldInstruction` is not used for `Load` or `Store` instructions that happen - * to load from or store to a particular field; in those cases, the memory location being accessed - * is specified by the `AddressOperand` on the instruction, which may or may not be defined by the - * result of a `FieldAddress` instruction. - */ -class FieldInstruction extends Instruction { - Language::Field field; - - FieldInstruction() { field = Raw::getInstructionField(this) } - - final override string getImmediateString() { result = field.toString() } - - /** - * Gets the field that this instruction references. - */ - final Language::Field getField() { result = field } -} - -/** - * An instruction that refers to a function. - * - * This class is used for any instruction whose operation fundamentally depends on a specific - * function. For example, it is used for `FunctionAddress`, which returns the address of a specific - * function. `FunctionInstruction` is not used for `Call` instructions that happen to call a - * particular function; in that case, the function being called is specified by the - * `CallTargetOperand` on the instruction, which may or may not be defined by the result of a - * `FunctionAddress` instruction. - */ -class FunctionInstruction extends Instruction { - Language::Function funcSymbol; - - FunctionInstruction() { funcSymbol = Raw::getInstructionFunction(this) } - - final override string getImmediateString() { result = funcSymbol.toString() } - - /** - * Gets the function that this instruction references. - */ - final Language::Function getFunctionSymbol() { result = funcSymbol } -} - -/** - * An instruction whose result is a compile-time constant value. - */ -class ConstantValueInstruction extends Instruction { - string value; - - ConstantValueInstruction() { value = Raw::getInstructionConstantValue(this) } - - final override string getImmediateString() { result = value } - - /** - * Gets the constant value of this instruction's result. - */ - final string getValue() { result = value } -} - -/** - * An instruction that refers to an argument of a `Call` instruction. - * - * This instruction is used for side effects of a `Call` instruction that read or write memory - * pointed to by one of the arguments of the call. - */ -class IndexedInstruction extends Instruction { - int index; - - IndexedInstruction() { index = Raw::getInstructionIndex(this) } - - final override string getImmediateString() { result = index.toString() } - - /** - * Gets the zero-based index of the argument that this instruction references. - */ - final int getIndex() { result = index } -} - -/** - * An instruction representing the entry point to a function. - * - * Each `IRFunction` has exactly one `EnterFunction` instruction. Execution of the function begins - * at this instruction. This instruction has no predecessors. - */ -class EnterFunctionInstruction extends Instruction { - EnterFunctionInstruction() { this.getOpcode() instanceof Opcode::EnterFunction } -} - -/** - * An instruction that returns the address of a variable. - * - * This instruction returns the address of a local variable, parameter, static field, - * namespace-scope variable, or global variable. For the address of a non-static field of a class, - * struct, or union, see `FieldAddressInstruction`. - */ -class VariableAddressInstruction extends VariableInstruction { - VariableAddressInstruction() { this.getOpcode() instanceof Opcode::VariableAddress } -} - -/** - * An instruction that returns the address of a function. - * - * This instruction returns the address of a function, including non-member functions, static member - * functions, and non-static member functions. - * - * The result has an `IRFunctionAddress` type. - */ -class FunctionAddressInstruction extends FunctionInstruction { - FunctionAddressInstruction() { this.getOpcode() instanceof Opcode::FunctionAddress } -} - -/** - * An instruction that returns the address of a "virtual" delete function. - * - * This function, which does not actually exist in the source code, is used to - * delete objects of a class with a virtual destructor. In that case the deacllocation - * function is selected at runtime based on the dynamic type of the object. So this - * function dynamically dispatches to the correct deallocation function. - * It also should pass in the required extra arguments to the deallocation function - * which may differ dynamically depending on the type of the object. - */ -class VirtualDeleteFunctionAddressInstruction extends Instruction { - VirtualDeleteFunctionAddressInstruction() { - this.getOpcode() instanceof Opcode::VirtualDeleteFunctionAddress - } -} - -/** - * An instruction that initializes a parameter of the enclosing function with the value of the - * corresponding argument passed by the caller. - * - * Each parameter of a function will have exactly one `InitializeParameter` instruction that - * initializes that parameter. - */ -class InitializeParameterInstruction extends VariableInstruction { - InitializeParameterInstruction() { this.getOpcode() instanceof Opcode::InitializeParameter } - - /** - * Gets the parameter initialized by this instruction. - */ - final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() } - - /** - * Holds if this instruction initializes the parameter with index `index`, or - * if `index` is `-1` and this instruction initializes `this`. - */ - pragma[noinline] - final predicate hasIndex(int index) { - index >= 0 and index = this.getParameter().getIndex() - or - index = -1 and this.getIRVariable() instanceof IRThisVariable - } -} - -/** - * An instruction that initializes all memory that existed before this function was called. - * - * This instruction provides a definition for memory that, because it was actually allocated and - * initialized elsewhere, would not otherwise have a definition in this function. - */ -class InitializeNonLocalInstruction extends Instruction { - InitializeNonLocalInstruction() { this.getOpcode() instanceof Opcode::InitializeNonLocal } -} - -/** - * An instruction that initializes the memory pointed to by a parameter of the enclosing function - * with the value of that memory on entry to the function. - */ -class InitializeIndirectionInstruction extends VariableInstruction { - InitializeIndirectionInstruction() { this.getOpcode() instanceof Opcode::InitializeIndirection } - - /** - * Gets the parameter initialized by this instruction. - */ - final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() } - - /** - * Holds if this instruction initializes the memory pointed to by the parameter with - * index `index`, or if `index` is `-1` and this instruction initializes the memory - * pointed to by `this`. - */ - pragma[noinline] - final predicate hasIndex(int index) { - index >= 0 and index = this.getParameter().getIndex() - or - index = -1 and this.getIRVariable() instanceof IRThisVariable - } -} - -/** - * An instruction that initializes the `this` pointer parameter of the enclosing function. - */ -class InitializeThisInstruction extends Instruction { - InitializeThisInstruction() { this.getOpcode() instanceof Opcode::InitializeThis } -} - -/** - * An instruction that computes the address of a non-static field of an object. - */ -class FieldAddressInstruction extends FieldInstruction { - FieldAddressInstruction() { this.getOpcode() instanceof Opcode::FieldAddress } - - /** - * Gets the operand that provides the address of the object containing the field. - */ - final UnaryOperand getObjectAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the object containing the field. - */ - final Instruction getObjectAddress() { result = this.getObjectAddressOperand().getDef() } -} - -/** - * An instruction that computes the address of the first element of a managed array. - * - * This instruction is used for element access to C# arrays. - */ -class ElementsAddressInstruction extends UnaryInstruction { - ElementsAddressInstruction() { this.getOpcode() instanceof Opcode::ElementsAddress } - - /** - * Gets the operand that provides the address of the array object. - */ - final UnaryOperand getArrayObjectAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the array object. - */ - final Instruction getArrayObjectAddress() { - result = this.getArrayObjectAddressOperand().getDef() - } -} - -/** - * An instruction that produces a well-defined but unknown result and has - * unknown side effects, including side effects that are not conservatively - * modeled in the SSA graph. - * - * This type of instruction appears when there is an `ErrorExpr` in the AST, - * meaning that the extractor could not understand the expression and therefore - * produced a partial AST. Queries that give alerts when some action is _not_ - * taken may want to ignore any function that contains an `ErrorInstruction`. - */ -class ErrorInstruction extends Instruction { - ErrorInstruction() { this.getOpcode() instanceof Opcode::Error } -} - -/** - * An instruction that returns an uninitialized value. - * - * This instruction is used to provide an initial definition for a stack variable that does not have - * an initializer, or whose initializer only partially initializes the variable. - */ -class UninitializedInstruction extends VariableInstruction { - UninitializedInstruction() { this.getOpcode() instanceof Opcode::Uninitialized } - - /** - * Gets the variable that is uninitialized. - */ - final Language::Variable getLocalVariable() { result = var.(IRUserVariable).getVariable() } -} - -/** - * An instruction that has no effect. - * - * This instruction is typically inserted to ensure that a particular AST is associated with at - * least one instruction, even when the AST has no semantic effect. - */ -class NoOpInstruction extends Instruction { - NoOpInstruction() { this.getOpcode() instanceof Opcode::NoOp } -} - -/** - * An instruction that returns control to the caller of the function. - * - * This instruction represents the normal (non-exception) return from a function, either from an - * explicit `return` statement or from control flow reaching the end of the function's body. - * - * Each function has exactly one `ReturnInstruction`. Each `return` statement in a function is - * represented as an initialization of the temporary variable that holds the return value, with - * control then flowing to the common `ReturnInstruction` for that function. Exception: A function - * that never returns will not have a `ReturnInstruction`. - * - * The `ReturnInstruction` for a function will have a control-flow successor edge to a block - * containing the `ExitFunction` instruction for that function. - * - * There are two different return instructions: `ReturnValueInstruction`, for returning a value from - * a non-`void`-returning function, and `ReturnVoidInstruction`, for returning from a - * `void`-returning function. - */ -class ReturnInstruction extends Instruction { - ReturnInstruction() { this.getOpcode() instanceof ReturnOpcode } -} - -/** - * An instruction that returns control to the caller of the function, without returning a value. - */ -class ReturnVoidInstruction extends ReturnInstruction { - ReturnVoidInstruction() { this.getOpcode() instanceof Opcode::ReturnVoid } -} - -/** - * An instruction that returns control to the caller of the function, including a return value. - */ -class ReturnValueInstruction extends ReturnInstruction { - ReturnValueInstruction() { this.getOpcode() instanceof Opcode::ReturnValue } - - /** - * Gets the operand that provides the value being returned by the function. - */ - final LoadOperand getReturnValueOperand() { result = this.getAnOperand() } - - /** - * Gets the operand that provides the address of the value being returned by the function. - */ - final AddressOperand getReturnAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the value being returned by the function, if an - * exact definition is available. - */ - final Instruction getReturnValue() { result = this.getReturnValueOperand().getDef() } - - /** - * Gets the instruction whose result provides the address of the value being returned by the function. - */ - final Instruction getReturnAddress() { result = this.getReturnAddressOperand().getDef() } -} - -/** - * An instruction that represents the use of the value pointed to by a parameter of the function - * after the function returns control to its caller. - * - * This instruction does not itself return control to the caller. It merely represents the potential - * for a caller to use the memory pointed to by the parameter sometime after the call returns. This - * is the counterpart to the `InitializeIndirection` instruction, which represents the possibility - * that the caller initialized the memory pointed to by the parameter before the call. - */ -class ReturnIndirectionInstruction extends VariableInstruction { - ReturnIndirectionInstruction() { this.getOpcode() instanceof Opcode::ReturnIndirection } - - /** - * Gets the operand that provides the value of the pointed-to memory. - */ - final SideEffectOperand getSideEffectOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the value of the pointed-to memory, if an exact - * definition is available. - */ - final Instruction getSideEffect() { result = this.getSideEffectOperand().getDef() } - - /** - * Gets the operand that provides the address of the pointed-to memory. - */ - final AddressOperand getSourceAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the pointed-to memory. - */ - final Instruction getSourceAddress() { result = this.getSourceAddressOperand().getDef() } - - /** - * Gets the parameter for which this instruction reads the final pointed-to value within the - * function. - */ - final Language::Parameter getParameter() { result = var.(IRUserVariable).getVariable() } - - /** - * Holds if this instruction is the return indirection for `this`. - */ - final predicate isThisIndirection() { var instanceof IRThisVariable } - - /** - * Holds if this instruction is the return indirection for the parameter with index `index`, or - * if this instruction is the return indirection for `this` and `index` is `-1`. - */ - pragma[noinline] - final predicate hasIndex(int index) { - index >= 0 and index = this.getParameter().getIndex() - or - index = -1 and this.isThisIndirection() - } -} - -/** - * An instruction that returns a copy of its operand. - * - * There are several different copy instructions, depending on the source and destination of the - * copy operation: - * - `CopyValueInstruction` - Copies a register operand to a register result. - * - `LoadInstruction` - Copies a memory operand to a register result. - * - `StoreInstruction` - Copies a register operand to a memory result. - */ -class CopyInstruction extends Instruction { - CopyInstruction() { this.getOpcode() instanceof CopyOpcode } - - /** - * Gets the operand that provides the input value of the copy. - */ - Operand getSourceValueOperand() { none() } - - /** - * Gets the instruction whose result provides the input value of the copy, if an exact definition - * is available. - */ - final Instruction getSourceValue() { result = this.getSourceValueOperand().getDef() } -} - -/** - * An instruction that returns a register result containing a copy of its register operand. - */ -class CopyValueInstruction extends CopyInstruction, UnaryInstruction { - CopyValueInstruction() { this.getOpcode() instanceof Opcode::CopyValue } - - final override UnaryOperand getSourceValueOperand() { result = this.getAnOperand() } -} - -/** - * Gets a string describing the location pointed to by the specified address operand. - */ -private string getAddressOperandDescription(AddressOperand operand) { - result = operand.getDef().(VariableAddressInstruction).getIRVariable().toString() - or - not operand.getDef() instanceof VariableAddressInstruction and - result = "?" -} - -/** - * An instruction that returns a register result containing a copy of its memory operand. - */ -class LoadInstruction extends CopyInstruction { - LoadInstruction() { this.getOpcode() instanceof Opcode::Load } - - final override string getImmediateString() { - result = getAddressOperandDescription(this.getSourceAddressOperand()) - } - - /** - * Gets the operand that provides the address of the value being loaded. - */ - final AddressOperand getSourceAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the value being loaded. - */ - final Instruction getSourceAddress() { result = this.getSourceAddressOperand().getDef() } - - final override LoadOperand getSourceValueOperand() { result = this.getAnOperand() } -} - -/** - * An instruction that returns a memory result containing a copy of its register operand. - */ -class StoreInstruction extends CopyInstruction { - StoreInstruction() { this.getOpcode() instanceof Opcode::Store } - - final override string getImmediateString() { - result = getAddressOperandDescription(this.getDestinationAddressOperand()) - } - - /** - * Gets the operand that provides the address of the location to which the value will be stored. - */ - final AddressOperand getDestinationAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the location to which the value will - * be stored, if an exact definition is available. - */ - final Instruction getDestinationAddress() { - result = this.getDestinationAddressOperand().getDef() - } - - final override StoreValueOperand getSourceValueOperand() { result = this.getAnOperand() } -} - -/** - * An instruction that branches to one of two successor instructions based on the value of a Boolean - * operand. - */ -class ConditionalBranchInstruction extends Instruction { - ConditionalBranchInstruction() { this.getOpcode() instanceof Opcode::ConditionalBranch } - - /** - * Gets the operand that provides the Boolean condition controlling the branch. - */ - final ConditionOperand getConditionOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the Boolean condition controlling the branch. - */ - final Instruction getCondition() { result = this.getConditionOperand().getDef() } - - /** - * Gets the instruction to which control will flow if the condition is true. - */ - final Instruction getTrueSuccessor() { result = this.getSuccessor(EdgeKind::trueEdge()) } - - /** - * Gets the instruction to which control will flow if the condition is false. - */ - final Instruction getFalseSuccessor() { result = this.getSuccessor(EdgeKind::falseEdge()) } -} - -/** - * An instruction representing the exit point of a function. - * - * Each `IRFunction` has exactly one `ExitFunction` instruction, unless the function neither returns - * nor throws an exception. Control flows to the `ExitFunction` instruction from both normal returns - * (`ReturnVoid`, `ReturnValue`) and propagated exceptions (`Unwind`). This instruction has no - * successors. - */ -class ExitFunctionInstruction extends Instruction { - ExitFunctionInstruction() { this.getOpcode() instanceof Opcode::ExitFunction } -} - -/** - * An instruction whose result is a constant value. - */ -class ConstantInstruction extends ConstantValueInstruction { - ConstantInstruction() { this.getOpcode() instanceof Opcode::Constant } -} - -/** - * An instruction whose result is a constant value of integer or Boolean type. - */ -class IntegerConstantInstruction extends ConstantInstruction { - IntegerConstantInstruction() { - exists(IRType resultType | - resultType = this.getResultIRType() and - (resultType instanceof IRIntegerType or resultType instanceof IRBooleanType) - ) - } -} - -/** - * An instruction whose result is a constant value of floating-point type. - */ -class FloatConstantInstruction extends ConstantInstruction { - FloatConstantInstruction() { this.getResultIRType() instanceof IRFloatingPointType } -} - -/** - * An instruction whose result is the address of a string literal. - */ -class StringConstantInstruction extends VariableInstruction { - override IRStringLiteral var; - - final override string getImmediateString() { - result = Language::getStringLiteralText(this.getValue()) - } - - /** - * Gets the string literal whose address is returned by this instruction. - */ - final Language::StringLiteral getValue() { result = var.getLiteral() } -} - -/** - * An instruction whose result is computed from two operands. - */ -class BinaryInstruction extends Instruction { - BinaryInstruction() { this.getOpcode() instanceof BinaryOpcode } - - /** - * Gets the left operand of this binary instruction. - */ - final LeftOperand getLeftOperand() { result = this.getAnOperand() } - - /** - * Gets the right operand of this binary instruction. - */ - final RightOperand getRightOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the value of the left operand of this binary - * instruction. - */ - final Instruction getLeft() { result = this.getLeftOperand().getDef() } - - /** - * Gets the instruction whose result provides the value of the right operand of this binary - * instruction. - */ - final Instruction getRight() { result = this.getRightOperand().getDef() } - - /** - * Holds if this instruction's operands are `op1` and `op2`, in either order. - */ - final predicate hasOperands(Operand op1, Operand op2) { - op1 = this.getLeftOperand() and op2 = this.getRightOperand() - or - op1 = this.getRightOperand() and op2 = this.getLeftOperand() - } -} - -/** - * An instruction that computes the result of an arithmetic operation. - */ -class ArithmeticInstruction extends Instruction { - ArithmeticInstruction() { this.getOpcode() instanceof ArithmeticOpcode } -} - -/** - * An instruction that performs an arithmetic operation on two numeric operands. - */ -class BinaryArithmeticInstruction extends ArithmeticInstruction, BinaryInstruction { } - -/** - * An instruction whose result is computed by performing an arithmetic operation on a single - * numeric operand. - */ -class UnaryArithmeticInstruction extends ArithmeticInstruction, UnaryInstruction { } - -/** - * An instruction that computes the sum of two numeric operands. - * - * Both operands must have the same numeric type, which will also be the result type. The result of - * integer overflow is the infinite-precision result modulo 2^n. Floating-point addition is - * performed according to IEEE-754. - */ -class AddInstruction extends BinaryArithmeticInstruction { - AddInstruction() { this.getOpcode() instanceof Opcode::Add } -} - -/** - * An instruction that computes the difference of two numeric operands. - * - * Both operands must have the same numeric type, which will also be the result type. The result of - * integer overflow is the infinite-precision result modulo 2^n. Floating-point subtraction is performed - * according to IEEE-754. - */ -class SubInstruction extends BinaryArithmeticInstruction { - SubInstruction() { this.getOpcode() instanceof Opcode::Sub } -} - -/** - * An instruction that computes the product of two numeric operands. - * - * Both operands must have the same numeric type, which will also be the result type. The result of - * integer overflow is the infinite-precision result modulo 2^n. Floating-point multiplication is - * performed according to IEEE-754. - */ -class MulInstruction extends BinaryArithmeticInstruction { - MulInstruction() { this.getOpcode() instanceof Opcode::Mul } -} - -/** - * An instruction that computes the quotient of two numeric operands. - * - * Both operands must have the same numeric type, which will also be the result type. The result of - * division by zero or integer overflow is undefined. Floating-point division is performed according - * to IEEE-754. - */ -class DivInstruction extends BinaryArithmeticInstruction { - DivInstruction() { this.getOpcode() instanceof Opcode::Div } -} - -/** - * An instruction that computes the remainder of two integer operands. - * - * Both operands must have the same integer type, which will also be the result type. The result of - * division by zero or integer overflow is undefined. - */ -class RemInstruction extends BinaryArithmeticInstruction { - RemInstruction() { this.getOpcode() instanceof Opcode::Rem } -} - -/** - * An instruction that negates a single numeric operand. - * - * The operand must have a numeric type, which will also be the result type. The result of integer - * negation uses two's complement, and is computed modulo 2^n. The result of floating-point negation - * is performed according to IEEE-754. - */ -class NegateInstruction extends UnaryArithmeticInstruction { - NegateInstruction() { this.getOpcode() instanceof Opcode::Negate } -} - -/** - * An instruction that computes the result of a bitwise operation. - */ -class BitwiseInstruction extends Instruction { - BitwiseInstruction() { this.getOpcode() instanceof BitwiseOpcode } -} - -/** - * An instruction that performs a bitwise operation on two integer operands. - */ -class BinaryBitwiseInstruction extends BitwiseInstruction, BinaryInstruction { } - -/** - * An instruction that performs a bitwise operation on a single integer operand. - */ -class UnaryBitwiseInstruction extends BitwiseInstruction, UnaryInstruction { } - -/** - * An instruction that computes the bitwise "and" of two integer operands. - * - * Both operands must have the same integer type, which will also be the result type. - */ -class BitAndInstruction extends BinaryBitwiseInstruction { - BitAndInstruction() { this.getOpcode() instanceof Opcode::BitAnd } -} - -/** - * An instruction that computes the bitwise "or" of two integer operands. - * - * Both operands must have the same integer type, which will also be the result type. - */ -class BitOrInstruction extends BinaryBitwiseInstruction { - BitOrInstruction() { this.getOpcode() instanceof Opcode::BitOr } -} - -/** - * An instruction that computes the bitwise "xor" of two integer operands. - * - * Both operands must have the same integer type, which will also be the result type. - */ -class BitXorInstruction extends BinaryBitwiseInstruction { - BitXorInstruction() { this.getOpcode() instanceof Opcode::BitXor } -} - -/** - * An instruction that shifts its left operand to the left by the number of bits specified by its - * right operand. - * - * Both operands must have an integer type. The result has the same type as the left operand. The - * rightmost bits are zero-filled. - */ -class ShiftLeftInstruction extends BinaryBitwiseInstruction { - ShiftLeftInstruction() { this.getOpcode() instanceof Opcode::ShiftLeft } -} - -/** - * An instruction that shifts its left operand to the right by the number of bits specified by its - * right operand. - * - * Both operands must have an integer type. The result has the same type as the left operand. If the - * left operand has an unsigned integer type, the leftmost bits are zero-filled. If the left operand - * has a signed integer type, the leftmost bits are filled by duplicating the most significant bit - * of the left operand. - */ -class ShiftRightInstruction extends BinaryBitwiseInstruction { - ShiftRightInstruction() { this.getOpcode() instanceof Opcode::ShiftRight } -} - -/** - * An instruction that shifts its left operand to the right by the number of bits specified by its - * right operand. - * - * Both operands must have an integer type. The result has the same type as the left operand. - * The leftmost bits are zero-filled. - */ -class UnsignedShiftRightInstruction extends BinaryBitwiseInstruction { - UnsignedShiftRightInstruction() { this.getOpcode() instanceof Opcode::UnsignedShiftRight } -} - -/** - * An instruction that performs a binary arithmetic operation involving at least one pointer - * operand. - */ -class PointerArithmeticInstruction extends BinaryInstruction { - int elementSize; - - PointerArithmeticInstruction() { - this.getOpcode() instanceof PointerArithmeticOpcode and - elementSize = Raw::getInstructionElementSize(this) - } - - final override string getImmediateString() { result = elementSize.toString() } - - /** - * Gets the size of the elements pointed to by the pointer operands, in bytes. - * - * When adding an integer offset to a pointer (`PointerAddInstruction`) or subtracting an integer - * offset from a pointer (`PointerSubInstruction`), the integer offset is multiplied by the - * element size to compute the actual number of bytes added to or subtracted from the pointer - * address. When computing the integer difference between two pointers (`PointerDiffInstruction`), - * the result is computed by computing the difference between the two pointer byte addresses, then - * dividing that byte count by the element size. - */ - final int getElementSize() { result = elementSize } -} - -/** - * An instruction that adds or subtracts an integer offset from a pointer. - */ -class PointerOffsetInstruction extends PointerArithmeticInstruction { - PointerOffsetInstruction() { this.getOpcode() instanceof PointerOffsetOpcode } -} - -/** - * An instruction that adds an integer offset to a pointer. - * - * The result is the byte address computed by adding the value of the right (integer) operand, - * multiplied by the element size, to the value of the left (pointer) operand. The result of pointer - * overflow is undefined. - */ -class PointerAddInstruction extends PointerOffsetInstruction { - PointerAddInstruction() { this.getOpcode() instanceof Opcode::PointerAdd } -} - -/** - * An instruction that subtracts an integer offset from a pointer. - * - * The result is the byte address computed by subtracting the value of the right (integer) operand, - * multiplied by the element size, from the value of the left (pointer) operand. The result of - * pointer underflow is undefined. - */ -class PointerSubInstruction extends PointerOffsetInstruction { - PointerSubInstruction() { this.getOpcode() instanceof Opcode::PointerSub } -} - -/** - * An instruction that computes the difference between two pointers. - * - * Both operands must have the same pointer type. The result must have an integer type whose size is - * the same as that of the pointer operands. The result is computed by subtracting the byte address - * in the right operand from the byte address in the left operand, and dividing by the element size. - * If the difference in byte addresses is not divisible by the element size, the result is - * undefined. - */ -class PointerDiffInstruction extends PointerArithmeticInstruction { - PointerDiffInstruction() { this.getOpcode() instanceof Opcode::PointerDiff } -} - -/** - * An instruction whose result is computed from a single operand. - */ -class UnaryInstruction extends Instruction { - UnaryInstruction() { this.getOpcode() instanceof UnaryOpcode } - - /** - * Gets the sole operand of this instruction. - */ - final UnaryOperand getUnaryOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the sole operand of this instruction. - */ - final Instruction getUnary() { result = this.getUnaryOperand().getDef() } -} - -/** - * An instruction that converts the value of its operand to a value of a different type. - */ -class ConvertInstruction extends UnaryInstruction { - ConvertInstruction() { this.getOpcode() instanceof Opcode::Convert } -} - -/** - * An instruction that converts the address of a polymorphic object to the address of a different - * subobject of the same polymorphic object, returning a null address if the dynamic type of the - * object is not compatible with the result type. - * - * If the operand holds a null address, the result is a null address. - * - * This instruction is used to represent a C++ `dynamic_cast<>` to a pointer type, or a C# `is` or - * `as` expression. - */ -class CheckedConvertOrNullInstruction extends UnaryInstruction { - CheckedConvertOrNullInstruction() { this.getOpcode() instanceof Opcode::CheckedConvertOrNull } -} - -/** - * An instruction that converts the address of a polymorphic object to the address of a different - * subobject of the same polymorphic object, throwing an exception if the dynamic type of the object - * is not compatible with the result type. - * - * If the operand holds a null address, the result is a null address. - * - * This instruction is used to represent a C++ `dynamic_cast<>` to a reference type, or a C# cast - * expression. - */ -class CheckedConvertOrThrowInstruction extends UnaryInstruction { - CheckedConvertOrThrowInstruction() { this.getOpcode() instanceof Opcode::CheckedConvertOrThrow } -} - -/** - * An instruction that returns the address of the complete object that contains the subobject - * pointed to by its operand. - * - * If the operand holds a null address, the result is a null address. - * - * This instruction is used to represent `dynamic_cast` in C++, which returns the pointer to - * the most-derived object. - */ -class CompleteObjectAddressInstruction extends UnaryInstruction { - CompleteObjectAddressInstruction() { this.getOpcode() instanceof Opcode::CompleteObjectAddress } -} - -/** - * An instruction that converts the address of an object to the address of a different subobject of - * the same object, without any type checking at runtime. - */ -class InheritanceConversionInstruction extends UnaryInstruction { - Language::Class baseClass; - Language::Class derivedClass; - - InheritanceConversionInstruction() { - Raw::getInstructionInheritance(this, baseClass, derivedClass) - } - - final override string getImmediateString() { - result = derivedClass.toString() + " : " + baseClass.toString() - } - - /** - * Gets the `ClassDerivation` for the inheritance relationship between - * the base and derived classes. This predicate does not hold if the - * conversion is to an indirect virtual base class. - */ - final Language::ClassDerivation getDerivation() { - result.getBaseClass() = baseClass and result.getDerivedClass() = derivedClass - } - - /** - * Gets the base class of the conversion. This will be either a direct - * base class of the derived class, or a virtual base class of the - * derived class. - */ - final Language::Class getBaseClass() { result = baseClass } - - /** - * Gets the derived class of the conversion. - */ - final Language::Class getDerivedClass() { result = derivedClass } -} - -/** - * An instruction that converts from the address of a derived class to the address of a base class. - */ -class ConvertToBaseInstruction extends InheritanceConversionInstruction { - ConvertToBaseInstruction() { this.getOpcode() instanceof ConvertToBaseOpcode } -} - -/** - * An instruction that converts from the address of a derived class to the address of a direct - * non-virtual base class. - * - * If the operand holds a null address, the result is a null address. - */ -class ConvertToNonVirtualBaseInstruction extends ConvertToBaseInstruction { - ConvertToNonVirtualBaseInstruction() { - this.getOpcode() instanceof Opcode::ConvertToNonVirtualBase - } -} - -/** - * An instruction that converts from the address of a derived class to the address of a virtual base - * class. - * - * If the operand holds a null address, the result is a null address. - */ -class ConvertToVirtualBaseInstruction extends ConvertToBaseInstruction { - ConvertToVirtualBaseInstruction() { this.getOpcode() instanceof Opcode::ConvertToVirtualBase } -} - -/** - * An instruction that converts from the address of a base class to the address of a direct - * non-virtual derived class. - * - * If the operand holds a null address, the result is a null address. - */ -class ConvertToDerivedInstruction extends InheritanceConversionInstruction { - ConvertToDerivedInstruction() { this.getOpcode() instanceof Opcode::ConvertToDerived } -} - -/** - * An instruction that computes the bitwise complement of its operand. - * - * The operand must have an integer type, which will also be the result type. - */ -class BitComplementInstruction extends UnaryBitwiseInstruction { - BitComplementInstruction() { this.getOpcode() instanceof Opcode::BitComplement } -} - -/** - * An instruction that computes the logical complement of its operand. - * - * The operand must have a Boolean type, which will also be the result type. - */ -class LogicalNotInstruction extends UnaryInstruction { - LogicalNotInstruction() { this.getOpcode() instanceof Opcode::LogicalNot } -} - -/** - * An instruction that compares two numeric operands. - */ -class CompareInstruction extends BinaryInstruction { - CompareInstruction() { this.getOpcode() instanceof CompareOpcode } -} - -/** - * An instruction that returns a `true` result if its operands are equal. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if `left == right`, and `false` if `left != right` or the two operands are - * unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareEQInstruction extends CompareInstruction { - CompareEQInstruction() { this.getOpcode() instanceof Opcode::CompareEQ } -} - -/** - * An instruction that returns a `true` result if its operands are not equal. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if `left != right` or if the two operands are unordered, and `false` if - * `left == right`. Floating-point comparison is performed according to IEEE-754. - */ -class CompareNEInstruction extends CompareInstruction { - CompareNEInstruction() { this.getOpcode() instanceof Opcode::CompareNE } -} - -/** - * An instruction that does a relative comparison of two values, such as `<` or `>=`. - */ -class RelationalInstruction extends CompareInstruction { - RelationalInstruction() { this.getOpcode() instanceof RelationalOpcode } - - /** - * Gets the operand on the "greater" (or "greater-or-equal") side - * of this relational instruction, that is, the side that is larger - * if the overall instruction evaluates to `true`; for example on - * `x <= 20` this is the `20`, and on `y > 0` it is `y`. - */ - Instruction getGreater() { none() } - - /** - * Gets the operand on the "lesser" (or "lesser-or-equal") side - * of this relational instruction, that is, the side that is smaller - * if the overall instruction evaluates to `true`; for example on - * `x <= 20` this is `x`, and on `y > 0` it is the `0`. - */ - Instruction getLesser() { none() } - - /** - * Holds if this relational instruction is strict (is not an "or-equal" instruction). - */ - predicate isStrict() { none() } -} - -/** - * An instruction that returns a `true` result if its left operand is less than its right operand. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if the `left < right`, and `false` if `left >= right` or if the two operands - * are unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareLTInstruction extends RelationalInstruction { - CompareLTInstruction() { this.getOpcode() instanceof Opcode::CompareLT } - - override Instruction getLesser() { result = this.getLeft() } - - override Instruction getGreater() { result = this.getRight() } - - override predicate isStrict() { any() } -} - -/** - * An instruction that returns a `true` result if its left operand is greater than its right operand. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if the `left > right`, and `false` if `left <= right` or if the two operands - * are unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareGTInstruction extends RelationalInstruction { - CompareGTInstruction() { this.getOpcode() instanceof Opcode::CompareGT } - - override Instruction getLesser() { result = this.getRight() } - - override Instruction getGreater() { result = this.getLeft() } - - override predicate isStrict() { any() } -} - -/** - * An instruction that returns a `true` result if its left operand is less than or equal to its - * right operand. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if the `left <= right`, and `false` if `left > right` or if the two operands - * are unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareLEInstruction extends RelationalInstruction { - CompareLEInstruction() { this.getOpcode() instanceof Opcode::CompareLE } - - override Instruction getLesser() { result = this.getLeft() } - - override Instruction getGreater() { result = this.getRight() } - - override predicate isStrict() { none() } -} - -/** - * An instruction that returns a `true` result if its left operand is greater than or equal to its - * right operand. - * - * Both operands must have the same numeric or address type. The result must have a Boolean type. - * The result is `true` if the `left >= right`, and `false` if `left < right` or if the two operands - * are unordered. Floating-point comparison is performed according to IEEE-754. - */ -class CompareGEInstruction extends RelationalInstruction { - CompareGEInstruction() { this.getOpcode() instanceof Opcode::CompareGE } - - override Instruction getLesser() { result = this.getRight() } - - override Instruction getGreater() { result = this.getLeft() } - - override predicate isStrict() { none() } -} - -/** - * An instruction that branches to one of multiple successor instructions based on the value of an - * integer operand. - * - * This instruction will have zero or more successors whose edge kind is `CaseEdge`, each - * representing the branch that will be taken if the controlling expression is within the range - * specified for that case edge. The range of a case edge must be disjoint from the range of each - * other case edge. - * - * The instruction may optionally have a successor edge whose edge kind is `DefaultEdge`, - * representing the branch that will be taken if the controlling expression is not within the range - * of any case edge. - */ -class SwitchInstruction extends Instruction { - SwitchInstruction() { this.getOpcode() instanceof Opcode::Switch } - - /** Gets the operand that provides the integer value controlling the switch. */ - final ConditionOperand getExpressionOperand() { result = this.getAnOperand() } - - /** Gets the instruction whose result provides the integer value controlling the switch. */ - final Instruction getExpression() { result = this.getExpressionOperand().getDef() } - - /** Gets the successor instructions along the case edges of the switch. */ - final Instruction getACaseSuccessor() { exists(CaseEdge edge | result = this.getSuccessor(edge)) } - - /** Gets the successor instruction along the default edge of the switch, if any. */ - final Instruction getDefaultSuccessor() { result = this.getSuccessor(EdgeKind::defaultEdge()) } -} - -/** - * An instruction that calls a function. - */ -class CallInstruction extends Instruction { - CallInstruction() { this.getOpcode() instanceof Opcode::Call } - - final override string getImmediateString() { - result = this.getStaticCallTarget().toString() - or - not exists(this.getStaticCallTarget()) and result = "?" - } - - /** - * Gets the operand the specifies the target function of the call. - */ - final CallTargetOperand getCallTargetOperand() { result = this.getAnOperand() } - - /** - * Gets the `Instruction` that computes the target function of the call. This is usually a - * `FunctionAddress` instruction, but can also be an arbitrary instruction that produces a - * function pointer. - */ - final Instruction getCallTarget() { result = this.getCallTargetOperand().getDef() } - - /** - * Gets all of the argument operands of the call, including the `this` pointer, if any. - */ - final ArgumentOperand getAnArgumentOperand() { result = this.getAnOperand() } - - /** - * Gets the `Function` that the call targets, if this is statically known. - */ - final Language::Function getStaticCallTarget() { - result = this.getCallTarget().(FunctionAddressInstruction).getFunctionSymbol() - } - - /** - * Gets all of the arguments of the call, including the `this` pointer, if any. - */ - final Instruction getAnArgument() { result = this.getAnArgumentOperand().getDef() } - - /** - * Gets the `this` pointer argument operand of the call, if any. - */ - final ThisArgumentOperand getThisArgumentOperand() { result = this.getAnOperand() } - - /** - * Gets the `this` pointer argument of the call, if any. - */ - final Instruction getThisArgument() { result = this.getThisArgumentOperand().getDef() } - - /** - * Gets the argument operand at the specified index. - */ - pragma[noinline] - final PositionalArgumentOperand getPositionalArgumentOperand(int index) { - result = this.getAnOperand() and - result.getIndex() = index - } - - /** - * Gets the argument at the specified index. - */ - pragma[noinline] - final Instruction getPositionalArgument(int index) { - result = this.getPositionalArgumentOperand(index).getDef() - } - - /** - * Gets the argument operand at the specified index, or `this` if `index` is `-1`. - */ - pragma[noinline] - final ArgumentOperand getArgumentOperand(int index) { - index >= 0 and result = this.getPositionalArgumentOperand(index) - or - index = -1 and result = this.getThisArgumentOperand() - } - - /** - * Gets the argument at the specified index, or `this` if `index` is `-1`. - */ - pragma[noinline] - final Instruction getArgument(int index) { result = this.getArgumentOperand(index).getDef() } - - /** - * Gets the number of arguments of the call, including the `this` pointer, if any. - */ - final int getNumberOfArguments() { result = count(this.getAnArgumentOperand()) } - - /** - * Holds if the result is a side effect for the argument at the specified index, or `this` if - * `index` is `-1`. - * - * This helper predicate makes it easy to join on both of these columns at once, avoiding - * pathological join orders in case the argument index should get joined first. - */ - pragma[noinline] - final SideEffectInstruction getAParameterSideEffect(int index) { - this = result.getPrimaryInstruction() and - index = result.(IndexedInstruction).getIndex() - } -} - -/** - * An instruction representing a side effect of a function call. - */ -class SideEffectInstruction extends Instruction { - SideEffectInstruction() { this.getOpcode() instanceof SideEffectOpcode } - - /** - * Gets the instruction whose execution causes this side effect. - */ - final Instruction getPrimaryInstruction() { - result = Construction::getPrimaryInstructionForSideEffect(this) - } -} - -/** - * An instruction representing the side effect of a function call on any memory that might be - * accessed by that call. - */ -class CallSideEffectInstruction extends SideEffectInstruction { - CallSideEffectInstruction() { this.getOpcode() instanceof Opcode::CallSideEffect } -} - -/** - * An instruction representing the side effect of a function call on any memory - * that might be read by that call. - * - * This instruction is emitted instead of `CallSideEffectInstruction` when it is certain that the - * call target cannot write to escaped memory. - */ -class CallReadSideEffectInstruction extends SideEffectInstruction { - CallReadSideEffectInstruction() { this.getOpcode() instanceof Opcode::CallReadSideEffect } -} - -/** - * An instruction representing a read side effect of a function call on a - * specific parameter. - */ -class ReadSideEffectInstruction extends SideEffectInstruction, IndexedInstruction { - ReadSideEffectInstruction() { this.getOpcode() instanceof ReadSideEffectOpcode } - - /** Gets the operand for the value that will be read from this instruction, if known. */ - final SideEffectOperand getSideEffectOperand() { result = this.getAnOperand() } - - /** Gets the value that will be read from this instruction, if known. */ - final Instruction getSideEffect() { result = this.getSideEffectOperand().getDef() } - - /** Gets the operand for the address from which this instruction may read. */ - final AddressOperand getArgumentOperand() { result = this.getAnOperand() } - - /** Gets the address from which this instruction may read. */ - final Instruction getArgumentDef() { result = this.getArgumentOperand().getDef() } -} - -/** - * An instruction representing the read of an indirect parameter within a function call. - */ -class IndirectReadSideEffectInstruction extends ReadSideEffectInstruction { - IndirectReadSideEffectInstruction() { this.getOpcode() instanceof Opcode::IndirectReadSideEffect } -} - -/** - * An instruction representing the read of an indirect buffer parameter within a function call. - */ -class BufferReadSideEffectInstruction extends ReadSideEffectInstruction { - BufferReadSideEffectInstruction() { this.getOpcode() instanceof Opcode::BufferReadSideEffect } -} - -/** - * An instruction representing the read of an indirect buffer parameter within a function call. - */ -class SizedBufferReadSideEffectInstruction extends ReadSideEffectInstruction { - SizedBufferReadSideEffectInstruction() { - this.getOpcode() instanceof Opcode::SizedBufferReadSideEffect - } - - /** - * Gets the operand that holds the number of bytes read from the buffer. - */ - final BufferSizeOperand getBufferSizeOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the number of bytes read from the buffer. - */ - final Instruction getBufferSize() { result = this.getBufferSizeOperand().getDef() } -} - -/** - * An instruction representing a write side effect of a function call on a - * specific parameter. - */ -class WriteSideEffectInstruction extends SideEffectInstruction, IndexedInstruction { - WriteSideEffectInstruction() { this.getOpcode() instanceof WriteSideEffectOpcode } - - /** - * Get the operand that holds the address of the memory to be written. - */ - final AddressOperand getDestinationAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the address of the memory to be written. - */ - Instruction getDestinationAddress() { result = this.getDestinationAddressOperand().getDef() } -} - -/** - * An instruction representing the write of an indirect parameter within a function call. - */ -class IndirectMustWriteSideEffectInstruction extends WriteSideEffectInstruction { - IndirectMustWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::IndirectMustWriteSideEffect - } -} - -/** - * An instruction representing the write of an indirect buffer parameter within a function call. The - * entire buffer is overwritten. - */ -class BufferMustWriteSideEffectInstruction extends WriteSideEffectInstruction { - BufferMustWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::BufferMustWriteSideEffect - } -} - -/** - * An instruction representing the write of an indirect buffer parameter within a function call. The - * entire buffer is overwritten. - */ -class SizedBufferMustWriteSideEffectInstruction extends WriteSideEffectInstruction { - SizedBufferMustWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::SizedBufferMustWriteSideEffect - } - - /** - * Gets the operand that holds the number of bytes written to the buffer. - */ - final BufferSizeOperand getBufferSizeOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the number of bytes written to the buffer. - */ - final Instruction getBufferSize() { result = this.getBufferSizeOperand().getDef() } -} - -/** - * An instruction representing the potential write of an indirect parameter within a function call. - * - * Unlike `IndirectWriteSideEffectInstruction`, the location might not be completely overwritten. - * written. - */ -class IndirectMayWriteSideEffectInstruction extends WriteSideEffectInstruction { - IndirectMayWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::IndirectMayWriteSideEffect - } -} - -/** - * An instruction representing the write of an indirect buffer parameter within a function call. - * - * Unlike `BufferWriteSideEffectInstruction`, the buffer might not be completely overwritten. - */ -class BufferMayWriteSideEffectInstruction extends WriteSideEffectInstruction { - BufferMayWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::BufferMayWriteSideEffect - } -} - -/** - * An instruction representing the write of an indirect buffer parameter within a function call. - * - * Unlike `BufferWriteSideEffectInstruction`, the buffer might not be completely overwritten. - */ -class SizedBufferMayWriteSideEffectInstruction extends WriteSideEffectInstruction { - SizedBufferMayWriteSideEffectInstruction() { - this.getOpcode() instanceof Opcode::SizedBufferMayWriteSideEffect - } - - /** - * Gets the operand that holds the number of bytes written to the buffer. - */ - final BufferSizeOperand getBufferSizeOperand() { result = this.getAnOperand() } - - /** - * Gets the instruction whose result provides the number of bytes written to the buffer. - */ - final Instruction getBufferSize() { result = this.getBufferSizeOperand().getDef() } -} - -/** - * An instruction representing the initial value of newly allocated memory, such as the result of a - * call to `malloc`. - */ -class InitializeDynamicAllocationInstruction extends SideEffectInstruction { - InitializeDynamicAllocationInstruction() { - this.getOpcode() instanceof Opcode::InitializeDynamicAllocation - } - - /** - * Gets the operand that represents the address of the allocation this instruction is initializing. - */ - final AddressOperand getAllocationAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the address for the allocation this instruction is initializing. - */ - final Instruction getAllocationAddress() { result = this.getAllocationAddressOperand().getDef() } -} - -/** - * An instruction representing a GNU or MSVC inline assembly statement. - */ -class InlineAsmInstruction extends Instruction { - InlineAsmInstruction() { this.getOpcode() instanceof Opcode::InlineAsm } -} - -/** - * An instruction that throws an exception. - */ -class ThrowInstruction extends Instruction { - ThrowInstruction() { this.getOpcode() instanceof ThrowOpcode } -} - -/** - * An instruction that throws a new exception. - */ -class ThrowValueInstruction extends ThrowInstruction { - ThrowValueInstruction() { this.getOpcode() instanceof Opcode::ThrowValue } - - /** - * Gets the address operand of the exception thrown by this instruction. - */ - final AddressOperand getExceptionAddressOperand() { result = this.getAnOperand() } - - /** - * Gets the address of the exception thrown by this instruction. - */ - final Instruction getExceptionAddress() { result = this.getExceptionAddressOperand().getDef() } - - /** - * Gets the operand for the exception thrown by this instruction. - */ - final LoadOperand getExceptionOperand() { result = this.getAnOperand() } - - /** - * Gets the exception thrown by this instruction. - */ - final Instruction getException() { result = this.getExceptionOperand().getDef() } -} - -/** - * An instruction that re-throws the current exception. - */ -class ReThrowInstruction extends ThrowInstruction { - ReThrowInstruction() { this.getOpcode() instanceof Opcode::ReThrow } -} - -/** - * An instruction that exits the current function by propagating an exception. - */ -class UnwindInstruction extends Instruction { - UnwindInstruction() { this.getOpcode() instanceof Opcode::Unwind } -} - -/** - * An instruction that starts a `catch` handler. - */ -class CatchInstruction extends Instruction { - CatchInstruction() { this.getOpcode() instanceof CatchOpcode } -} - -/** - * An instruction that catches an exception of a specific type. - */ -class CatchByTypeInstruction extends CatchInstruction { - Language::LanguageType exceptionType; - - CatchByTypeInstruction() { - this.getOpcode() instanceof Opcode::CatchByType and - exceptionType = Raw::getInstructionExceptionType(this) - } - - final override string getImmediateString() { result = exceptionType.toString() } - - /** - * Gets the type of exception to be caught. - */ - final Language::LanguageType getExceptionType() { result = exceptionType } -} - -/** - * An instruction that catches any exception. - */ -class CatchAnyInstruction extends CatchInstruction { - CatchAnyInstruction() { this.getOpcode() instanceof Opcode::CatchAny } -} - -/** - * An instruction that initializes all escaped memory. - */ -class AliasedDefinitionInstruction extends Instruction { - AliasedDefinitionInstruction() { this.getOpcode() instanceof Opcode::AliasedDefinition } -} - -/** - * An instruction that consumes all escaped memory on exit from the function. - */ -class AliasedUseInstruction extends Instruction { - AliasedUseInstruction() { this.getOpcode() instanceof Opcode::AliasedUse } -} - -/** - * An instruction representing the choice of one of multiple input values based on control flow. - * - * A `PhiInstruction` is inserted at the beginning of a block whenever two different definitions of - * the same variable reach that block. The `PhiInstruction` will have one operand corresponding to - * each control flow predecessor of the block, with that operand representing the version of the - * variable that flows from that predecessor. The result value of the `PhiInstruction` will be - * a copy of whichever operand corresponds to the actual predecessor that entered the block at - * runtime. - */ -class PhiInstruction extends Instruction { - PhiInstruction() { this.getOpcode() instanceof Opcode::Phi } - - /** - * Gets all of the instruction's `PhiInputOperand`s, representing the values that flow from each predecessor block. - */ - final PhiInputOperand getAnInputOperand() { result = this.getAnOperand() } - - /** - * Gets an instruction that defines the input to one of the operands of this - * instruction. It's possible for more than one operand to have the same - * defining instruction, so this predicate will have the same number of - * results as `getAnInputOperand()` or fewer. - */ - pragma[noinline] - final Instruction getAnInput() { result = this.getAnInputOperand().getDef() } - - /** - * Gets the input operand representing the value that flows from the specified predecessor block. - */ - final PhiInputOperand getInputOperand(IRBlock predecessorBlock) { - result = this.getAnOperand() and - result.getPredecessorBlock() = predecessorBlock - } -} - -/** - * An instruction representing the effect that a write to a memory may have on potential aliases of - * that memory. - * - * A `ChiInstruction` is inserted immediately after an instruction that writes to memory. The - * `ChiInstruction` has two operands. The first operand, given by `getTotalOperand()`, represents - * the previous state of all of the memory that might be aliased by the memory write. The second - * operand, given by `getPartialOperand()`, represents the memory that was actually modified by the - * memory write. The result of the `ChiInstruction` represents the same memory as - * `getTotalOperand()`, updated to include the changes due to the value that was actually stored by - * the memory write. - * - * As an example, suppose that variable `p` and `q` are pointers that may or may not point to the - * same memory: - * ``` - * *p = 5; - * x = *q; - * ``` - * - * The IR would look like: - * ``` - * r1_1 = VariableAddress[p] - * r1_2 = Load r1_1, m0_0 // Load the value of `p` - * r1_3 = Constant[5] - * m1_4 = Store r1_2, r1_3 // Store to `*p` - * m1_5 = ^Chi m0_1, m1_4 // Side effect of the previous Store on aliased memory - * r1_6 = VariableAddress[x] - * r1_7 = VariableAddress[q] - * r1_8 = Load r1_7, m0_2 // Load the value of `q` - * r1_9 = Load r1_8, m1_5 // Load the value of `*q` - * m1_10 = Store r1_6, r1_9 // Store to x - * ``` - * - * Note the `Chi` instruction after the store to `*p`. The indicates that the previous contents of - * aliased memory (`m0_1`) are merged with the new value written by the store (`m1_4`), producing a - * new version of aliased memory (`m1_5`). On the subsequent load from `*q`, the source operand of - * `*q` is `m1_5`, indicating that the store to `*p` may (or may not) have updated the memory - * pointed to by `q`. - * - * For more information about how `Chi` instructions are used to model memory side effects, see - * https://link.springer.com/content/pdf/10.1007%2F3-540-61053-7_66.pdf. - */ -class ChiInstruction extends Instruction { - ChiInstruction() { this.getOpcode() instanceof Opcode::Chi } - - /** - * Gets the operand that represents the previous state of all memory that might be aliased by the - * memory write. - */ - final ChiTotalOperand getTotalOperand() { result = this.getAnOperand() } - - /** - * Gets the operand that represents the previous state of all memory that might be aliased by the - * memory write. - */ - final Instruction getTotal() { result = this.getTotalOperand().getDef() } - - /** - * Gets the operand that represents the new value written by the memory write. - */ - final ChiPartialOperand getPartialOperand() { result = this.getAnOperand() } - - /** - * Gets the operand that represents the new value written by the memory write. - */ - final Instruction getPartial() { result = this.getPartialOperand().getDef() } - - /** - * Holds if the `ChiPartialOperand` totally, but not exactly, overlaps with the `ChiTotalOperand`. - * This means that the `ChiPartialOperand` will not override the entire memory associated with the - * `ChiTotalOperand`. - */ - final predicate isPartialUpdate() { Construction::chiOnlyPartiallyUpdatesLocation(this) } -} - -/** - * An instruction representing unreachable code. - * - * This instruction is inserted in place of the original target instruction of a `ConditionalBranch` - * or `Switch` instruction where that particular edge is infeasible. - */ -class UnreachedInstruction extends Instruction { - UnreachedInstruction() { this.getOpcode() instanceof Opcode::Unreached } -} - -/** - * An instruction representing a built-in operation. - * - * This is used to represent a variety of intrinsic operations provided by the compiler - * implementation, such as vector arithmetic. - */ -class BuiltInOperationInstruction extends Instruction { - Language::BuiltInOperation operation; - - BuiltInOperationInstruction() { - this.getOpcode() instanceof BuiltInOperationOpcode and - operation = Raw::getInstructionBuiltInOperation(this) - } - - /** - * Gets the language-specific `BuiltInOperation` object that specifies the operation that is - * performed by this instruction. - */ - final Language::BuiltInOperation getBuiltInOperation() { result = operation } -} - -/** - * An instruction representing a built-in operation that does not have a specific opcode. The - * actual operation is specified by the `getBuiltInOperation()` predicate. - */ -class BuiltInInstruction extends BuiltInOperationInstruction { - BuiltInInstruction() { this.getOpcode() instanceof Opcode::BuiltIn } - - final override string getImmediateString() { result = this.getBuiltInOperation().toString() } -} - -/** - * An instruction that returns a `va_list` to access the arguments passed to the `...` parameter. - * - * The operand specifies the address of the `IREllipsisVariable` used to represent the `...` - * parameter. The result is a `va_list` that initially refers to the first argument that was passed - * to the `...` parameter. - */ -class VarArgsStartInstruction extends UnaryInstruction { - VarArgsStartInstruction() { this.getOpcode() instanceof Opcode::VarArgsStart } -} - -/** - * An instruction that cleans up a `va_list` after it is no longer in use. - * - * The operand specifies the address of the `va_list` to clean up. This instruction does not return - * a result. - */ -class VarArgsEndInstruction extends UnaryInstruction { - VarArgsEndInstruction() { this.getOpcode() instanceof Opcode::VarArgsEnd } -} - -/** - * An instruction that returns the address of the argument currently pointed to by a `va_list`. - * - * The operand is the `va_list` that points to the argument. The result is the address of the - * argument. - */ -class VarArgInstruction extends UnaryInstruction { - VarArgInstruction() { this.getOpcode() instanceof Opcode::VarArg } -} - -/** - * An instruction that modifies a `va_list` to point to the next argument that was passed to the - * `...` parameter. - * - * The operand is the current `va_list`. The result is an updated `va_list` that points to the next - * argument of the `...` parameter. - */ -class NextVarArgInstruction extends UnaryInstruction { - NextVarArgInstruction() { this.getOpcode() instanceof Opcode::NextVarArg } -} - -/** - * An instruction that allocates a new object on the managed heap. - * - * This instruction is used to represent the allocation of a new object in C# using the `new` - * expression. This instruction does not invoke a constructor for the object. Instead, there will be - * a subsequent `Call` instruction to invoke the appropriate constructor directory, passing the - * result of the `NewObj` as the `this` argument. - * - * The result is the address of the newly allocated object. - */ -class NewObjInstruction extends Instruction { - NewObjInstruction() { this.getOpcode() instanceof Opcode::NewObj } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Operand.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Operand.qll deleted file mode 100644 index c1743acdbae..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/Operand.qll +++ /dev/null @@ -1,499 +0,0 @@ -/** - * Provides classes that represent the input values of IR instructions. - */ - -private import internal.IRInternal -private import Instruction -private import IRBlock -private import internal.OperandImports as Imports -private import Imports::MemoryAccessKind -private import Imports::IRType -private import Imports::Overlap -private import Imports::OperandTag -private import Imports::TOperand -private import internal.OperandInternal - -/** - * An operand of an `Instruction` in this stage of the IR. Implemented as a union of the branches - * of `TOperand` that are used in this stage. - */ -private class TStageOperand = - TRegisterOperand or TNonSsaMemoryOperand or TPhiOperand or TChiOperand; - -/** - * A known location. Testing `loc instanceof KnownLocation` will account for non existing locations, as - * opposed to testing `not loc isntanceof UnknownLocation` - */ -private class KnownLocation extends Language::Location { - KnownLocation() { not this instanceof Language::UnknownLocation } -} - -/** - * An operand of an `Instruction`. The operand represents a use of the result of one instruction - * (the defining instruction) in another instruction (the use instruction) - */ -class Operand extends TStageOperand { - cached - Operand() { - // Ensure that the operand does not refer to instructions from earlier stages that are unreachable here - exists(Instruction use, Instruction def | this = registerOperand(use, _, def)) - or - exists(Instruction use | this = nonSsaMemoryOperand(use, _)) - or - exists(Instruction use, Instruction def, IRBlock predecessorBlock | - this = phiOperand(use, def, predecessorBlock, _) or - this = reusedPhiOperand(use, def, predecessorBlock, _) - ) - or - this = chiOperand(_, _) - } - - /** Gets a textual representation of this element. */ - string toString() { result = "Operand" } - - /** - * Gets the location of the source code for this operand. - * By default this is where the operand is used, but some subclasses may override this - * using `getAnyDef()` if it makes more sense. - */ - Language::Location getLocation() { result = this.getUse().getLocation() } - - /** - * Gets the function that contains this operand. - */ - final IRFunction getEnclosingIRFunction() { result = this.getUse().getEnclosingIRFunction() } - - /** - * Gets the `Instruction` that consumes this operand. - */ - Instruction getUse() { none() } - - /** - * Gets the `Instruction` whose result is the value of the operand. Unlike - * `getDef`, this also has a result when `isDefinitionInexact` holds, which - * means that the resulting instruction may only _partially_ or _potentially_ - * be the value of this operand. - */ - Instruction getAnyDef() { none() } - - /** - * Gets the `Instruction` whose result is the value of the operand. Unlike - * `getAnyDef`, this also has no result when `isDefinitionInexact` holds, - * which means that the resulting instruction must always be exactly the be - * the value of this operand. - */ - final Instruction getDef() { - result = this.getAnyDef() and - this.getDefinitionOverlap() instanceof MustExactlyOverlap - } - - /** - * Gets the overlap relationship between the operand's definition and its use. - */ - Overlap getDefinitionOverlap() { none() } - - /** - * Holds if the result of the definition instruction does not exactly overlap this use. - */ - final predicate isDefinitionInexact() { - not this.getDefinitionOverlap() instanceof MustExactlyOverlap - } - - /** - * Gets a prefix to use when dumping the operand in an operand list. - */ - string getDumpLabel() { result = "" } - - /** - * Gets a string that uniquely identifies this operand on its use instruction. - */ - string getDumpId() { result = "" } - - /** - * Gets a string describing this operand, suitable for display in IR dumps. This consists of the - * result ID of the instruction consumed by the operand, plus a label identifying the operand - * kind. - * - * For example: `this:r3_5` - */ - final string getDumpString() { - result = this.getDumpLabel() + this.getInexactSpecifier() + this.getDefinitionId() - } - - /** - * Gets a string containing the identifier of the definition of this use, or `m?` if the - * definition is not modeled in SSA. - */ - private string getDefinitionId() { - result = this.getAnyDef().getResultId() - or - not exists(this.getAnyDef()) and result = "m?" - } - - /** - * Gets a string prefix to prepend to the operand's definition ID in an IR dump, specifying whether the operand is - * an exact or inexact use of its definition. For an inexact use, the prefix is "~". For an exact use, the prefix is - * the empty string. - */ - private string getInexactSpecifier() { - if this.isDefinitionInexact() then result = "~" else result = "" - } - - /** - * Get the order in which the operand should be sorted in the operand list. - */ - int getDumpSortOrder() { result = -1 } - - /** - * Gets the type of the value consumed by this operand. This is usually the same as the - * result type of the definition instruction consumed by this operand. For register operands, - * this is always the case. For some memory operands, the operand type may be different from - * the definition type, such as in the case of a partial read or a read from a pointer that - * has been cast to a different type. - */ - Language::LanguageType getLanguageType() { result = this.getAnyDef().getResultLanguageType() } - - /** - * Gets the language-neutral type of the value consumed by this operand. This is usually the same - * as the result type of the definition instruction consumed by this operand. For register - * operands, this is always the case. For some memory operands, the operand type may be different - * from the definition type, such as in the case of a partial read or a read from a pointer that - * has been cast to a different type. - */ - final IRType getIRType() { result = this.getLanguageType().getIRType() } - - /** - * Gets the type of the value consumed by this operand. This is usually the same as the - * result type of the definition instruction consumed by this operand. For register operands, - * this is always the case. For some memory operands, the operand type may be different from - * the definition type, such as in the case of a partial read or a read from a pointer that - * has been cast to a different type. - */ - final Language::Type getType() { this.getLanguageType().hasType(result, _) } - - /** - * Holds if the value consumed by this operand is a glvalue. If this - * holds, the value of the operand represents the address of a location, - * and the type of the location is given by `getType()`. If this does - * not hold, the value of the operand represents a value whose type is - * given by `getType()`. - */ - final predicate isGLValue() { this.getLanguageType().hasType(_, true) } - - /** - * Gets the size of the value consumed by this operand, in bytes. If the operand does not have - * a known constant size, this predicate does not hold. - */ - final int getSize() { result = this.getLanguageType().getByteSize() } -} - -/** - * An operand that consumes a memory result (e.g. the `LoadOperand` on a `Load` instruction). - */ -class MemoryOperand extends Operand { - cached - MemoryOperand() { - this instanceof TNonSsaMemoryOperand or - this instanceof TPhiOperand or - this instanceof TChiOperand - } - - /** - * Gets the kind of memory access performed by the operand. - */ - MemoryAccessKind getMemoryAccess() { result = this.getUse().getOpcode().getReadMemoryAccess() } - - /** - * Holds if the memory access performed by this operand will not always read from every bit in the - * memory location. This is most commonly used for memory accesses that may or may not actually - * occur depending on runtime state (for example, the write side effect of an output parameter - * that is not written to on all paths), or for accesses where the memory location is a - * conservative estimate of the memory that might actually be accessed at runtime (for example, - * the global side effects of a function call). - */ - predicate hasMayReadMemoryAccess() { this.getUse().getOpcode().hasMayReadMemoryAccess() } - - /** - * Returns the operand that holds the memory address from which the current operand loads its - * value, if any. For example, in `r3 = Load r1, m2`, the result of `getAddressOperand()` for `m2` - * is `r1`. - */ - final AddressOperand getAddressOperand() { - this.getMemoryAccess().usesAddressOperand() and - result.getUse() = this.getUse() - } -} - -/** - * An operand that is not an operand of a `PhiInstruction`. - */ -class NonPhiOperand extends Operand { - Instruction useInstr; - OperandTag tag; - - NonPhiOperand() { - this = registerOperand(useInstr, tag, _) or - this = nonSsaMemoryOperand(useInstr, tag) or - this = chiOperand(useInstr, tag) - } - - final override Instruction getUse() { result = useInstr } - - final override string getDumpLabel() { result = tag.getLabel() } - - final override string getDumpId() { result = tag.getId() } - - final override int getDumpSortOrder() { result = tag.getSortOrder() } - - /** - * Gets the `OperandTag` that specifies how this operand is used by its `Instruction`. - */ - final OperandTag getOperandTag() { result = tag } -} - -/** - * An operand that consumes a register (non-memory) result. - */ -class RegisterOperand extends NonPhiOperand, TRegisterOperand { - override RegisterOperandTag tag; - Instruction defInstr; - - cached - RegisterOperand() { this = registerOperand(useInstr, tag, defInstr) } - - final override string toString() { result = tag.toString() } - - // most `RegisterOperands` have a more meaningful location at the definition - // the only exception are specific cases of `ThisArgumentOperand` - override Language::Location getLocation() { result = this.getAnyDef().getLocation() } - - final override Instruction getAnyDef() { result = defInstr } - - final override Overlap getDefinitionOverlap() { - // All register results overlap exactly with their uses. - result instanceof MustExactlyOverlap - } -} - -/** - * A memory operand other than the operand of a `Phi` instruction. - */ -class NonPhiMemoryOperand extends NonPhiOperand, MemoryOperand, TNonPhiMemoryOperand { - override MemoryOperandTag tag; - - cached - NonPhiMemoryOperand() { - this = nonSsaMemoryOperand(useInstr, tag) - or - this = chiOperand(useInstr, tag) - } - - final override string toString() { result = tag.toString() } - - final override Instruction getAnyDef() { - result = unique(Instruction defInstr | this.hasDefinition(defInstr, _)) - } - - final override Overlap getDefinitionOverlap() { this.hasDefinition(_, result) } - - pragma[noinline] - private predicate hasDefinition(Instruction defInstr, Overlap overlap) { - defInstr = Construction::getMemoryOperandDefinition(useInstr, tag, overlap) and - not Construction::isInCycle(useInstr) and - strictcount(Construction::getMemoryOperandDefinition(useInstr, tag, _)) = 1 - } - - /** - * Holds if the operand totally overlaps with its definition and consumes the - * bit range `[startBitOffset, endBitOffset)` relative to the start address of the definition. - */ - predicate getUsedInterval(int startBitOffset, int endBitOffset) { - Construction::getUsedInterval(this, startBitOffset, endBitOffset) - } -} - -/** - * A memory operand whose type may be different from the type of the result of its definition. - */ -class TypedOperand extends NonPhiMemoryOperand { - override TypedOperandTag tag; - - final override Language::LanguageType getLanguageType() { - result = Construction::getInstructionOperandType(useInstr, tag) - } -} - -/** - * The address operand of an instruction that loads or stores a value from - * memory (e.g. `Load`, `Store`). - */ -class AddressOperand extends RegisterOperand { - override AddressOperandTag tag; -} - -/** - * The buffer size operand of an instruction that represents a read or write of - * a buffer. - */ -class BufferSizeOperand extends RegisterOperand { - override BufferSizeOperandTag tag; -} - -/** - * The source value operand of an instruction that loads a value from memory (e.g. `Load`, - * `ReturnValue`, `ThrowValue`). - */ -class LoadOperand extends TypedOperand { - override LoadOperandTag tag; -} - -/** - * The source value operand of a `Store` instruction. - */ -class StoreValueOperand extends RegisterOperand { - override StoreValueOperandTag tag; -} - -/** - * The sole operand of a unary instruction (e.g. `Convert`, `Negate`, `Copy`). - */ -class UnaryOperand extends RegisterOperand { - override UnaryOperandTag tag; -} - -/** - * The left operand of a binary instruction (e.g. `Add`, `CompareEQ`). - */ -class LeftOperand extends RegisterOperand { - override LeftOperandTag tag; -} - -/** - * The right operand of a binary instruction (e.g. `Add`, `CompareEQ`). - */ -class RightOperand extends RegisterOperand { - override RightOperandTag tag; -} - -/** - * The condition operand of a `ConditionalBranch` or `Switch` instruction. - */ -class ConditionOperand extends RegisterOperand { - override ConditionOperandTag tag; -} - -/** - * The operand representing the target function of an `Call` instruction. - */ -class CallTargetOperand extends RegisterOperand { - override CallTargetOperandTag tag; -} - -/** - * An operand representing an argument to a function call. This includes both - * positional arguments (represented by `PositionalArgumentOperand`) and the - * implicit `this` argument, if any (represented by `ThisArgumentOperand`). - */ -class ArgumentOperand extends RegisterOperand { - override ArgumentOperandTag tag; - - /** Gets the `CallInstruction` for which this is an argument. */ - CallInstruction getCall() { result.getAnArgumentOperand() = this } -} - -/** - * An operand representing the implicit `this` argument to a member function - * call. - */ -class ThisArgumentOperand extends ArgumentOperand { - override ThisArgumentOperandTag tag; - - // in most cases the def location makes more sense, but in some corner cases it - // has an unknown location: in those cases we fall back to the use location - override Language::Location getLocation() { - if this.getAnyDef().getLocation() instanceof KnownLocation - then result = this.getAnyDef().getLocation() - else result = this.getUse().getLocation() - } -} - -/** - * An operand representing an argument to a function call. - */ -class PositionalArgumentOperand extends ArgumentOperand { - override PositionalArgumentOperandTag tag; - - /** - * Gets the zero-based index of the argument. - */ - final int getIndex() { result = tag.getArgIndex() } -} - -/** - * An operand representing memory read as a side effect of evaluating another instruction. - */ -class SideEffectOperand extends TypedOperand { - override SideEffectOperandTag tag; -} - -/** - * An operand of a `PhiInstruction`. - */ -class PhiInputOperand extends MemoryOperand, TPhiOperand { - PhiInstruction useInstr; - Instruction defInstr; - IRBlock predecessorBlock; - Overlap overlap; - - cached - PhiInputOperand() { - this = phiOperand(useInstr, defInstr, predecessorBlock, overlap) - or - this = reusedPhiOperand(useInstr, defInstr, predecessorBlock, overlap) - } - - override string toString() { result = "Phi" } - - final override PhiInstruction getUse() { result = useInstr } - - final override Instruction getAnyDef() { result = defInstr } - - final override Overlap getDefinitionOverlap() { result = overlap } - - final override int getDumpSortOrder() { - result = 11 + this.getPredecessorBlock().getDisplayIndex() - } - - final override string getDumpLabel() { - result = "from " + this.getPredecessorBlock().getDisplayIndex().toString() + ":" - } - - final override string getDumpId() { - result = this.getPredecessorBlock().getDisplayIndex().toString() - } - - /** - * Gets the predecessor block from which this value comes. - */ - final IRBlock getPredecessorBlock() { result = predecessorBlock } - - final override MemoryAccessKind getMemoryAccess() { result instanceof PhiMemoryAccess } -} - -/** - * The total operand of a Chi node, representing the previous value of the memory. - */ -class ChiTotalOperand extends NonPhiMemoryOperand { - override ChiTotalOperandTag tag; - - final override MemoryAccessKind getMemoryAccess() { result instanceof ChiTotalMemoryAccess } -} - -/** - * The partial operand of a Chi node, representing the value being written to part of the memory. - */ -class ChiPartialOperand extends NonPhiMemoryOperand { - override ChiPartialOperandTag tag; - - final override MemoryAccessKind getMemoryAccess() { result instanceof ChiPartialMemoryAccess } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/PrintIR.ql b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/PrintIR.ql deleted file mode 100644 index 83e2e37234b..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/PrintIR.ql +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @name Print SSA IR - * @description Outputs a representation of the SSA IR graph - * @id cpp/print-ssa-ir - * @kind graph - */ - -import PrintIR diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/PrintIR.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/PrintIR.qll deleted file mode 100644 index c4b18d9cb61..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/PrintIR.qll +++ /dev/null @@ -1,342 +0,0 @@ -/** - * Outputs a representation of the IR as a control flow graph. - * - * This file contains the actual implementation of `PrintIR.ql`. For test cases and very small - * databases, `PrintIR.ql` can be run directly to dump the IR for the entire database. For most - * uses, however, it is better to write a query that imports `PrintIR.qll`, extends - * `PrintIRConfiguration`, and overrides `shouldPrintDeclaration()` to select a subset of declarations - * to dump. - */ - -private import internal.IRInternal -private import IR -private import internal.PrintIRImports as Imports -import Imports::IRConfiguration - -private newtype TPrintIRConfiguration = MkPrintIRConfiguration() - -/** - * The query can extend this class to control which declarations are printed. - */ -class PrintIRConfiguration extends TPrintIRConfiguration { - /** Gets a textual representation of this configuration. */ - string toString() { result = "PrintIRConfiguration" } - - /** - * Holds if the IR for `func` should be printed. By default, holds for all - * functions, global and namespace variables, and static local variables. - */ - predicate shouldPrintDeclaration(Language::Declaration decl) { any() } -} - -/** - * Override of `IRConfiguration` to only evaluate debug strings for the functions that are to be dumped. - */ -private class FilteredIRConfiguration extends IRConfiguration { - override predicate shouldEvaluateDebugStringsForFunction(Language::Declaration func) { - shouldPrintDeclaration(func) - } -} - -private predicate shouldPrintDeclaration(Language::Declaration decl) { - exists(PrintIRConfiguration config | config.shouldPrintDeclaration(decl)) -} - -private predicate shouldPrintInstruction(Instruction i) { - exists(IRPropertyProvider provider | provider.shouldPrintInstruction(i)) -} - -private predicate shouldPrintOperand(Operand operand) { - exists(IRPropertyProvider provider | provider.shouldPrintOperand(operand)) -} - -private string getAdditionalInstructionProperty(Instruction instr, string key) { - exists(IRPropertyProvider provider | result = provider.getInstructionProperty(instr, key)) -} - -private string getAdditionalBlockProperty(IRBlock block, string key) { - exists(IRPropertyProvider provider | result = provider.getBlockProperty(block, key)) -} - -/** - * Gets the properties of an operand from any active property providers. - */ -private string getAdditionalOperandProperty(Operand operand, string key) { - exists(IRPropertyProvider provider | result = provider.getOperandProperty(operand, key)) -} - -/** - * Gets a string listing the properties of the operand and their corresponding values. If the - * operand has no properties, this predicate has no result. - */ -private string getOperandPropertyListString(Operand operand) { - result = - strictconcat(string key, string value | - value = getAdditionalOperandProperty(operand, key) - | - key + ":" + value, ", " - ) -} - -/** - * Gets a string listing the properties of the operand and their corresponding values. The list is - * surrounded by curly braces. If the operand has no properties, this predicate returns an empty - * string. - */ -private string getOperandPropertyString(Operand operand) { - result = "{" + getOperandPropertyListString(operand) + "}" - or - not exists(getOperandPropertyListString(operand)) and result = "" -} - -private newtype TPrintableIRNode = - TPrintableIRFunction(IRFunction irFunc) { shouldPrintDeclaration(irFunc.getFunction()) } or - TPrintableIRBlock(IRBlock block) { shouldPrintDeclaration(block.getEnclosingFunction()) } or - TPrintableInstruction(Instruction instr) { - shouldPrintInstruction(instr) and shouldPrintDeclaration(instr.getEnclosingFunction()) - } - -/** - * A node to be emitted in the IR graph. - */ -abstract private class PrintableIRNode extends TPrintableIRNode { - abstract string toString(); - - /** - * Gets the location to be emitted for the node. - */ - abstract Language::Location getLocation(); - - /** - * Gets the label to be emitted for the node. - */ - abstract string getLabel(); - - /** - * Gets the order in which the node appears in its parent node. - */ - abstract int getOrder(); - - /** - * Gets the parent of this node. - */ - abstract PrintableIRNode getParent(); - - /** - * Gets the kind of graph represented by this node ("graph" or "tree"). - */ - string getGraphKind() { none() } - - /** - * Holds if this node should always be rendered as text, even in a graphical - * viewer. - */ - predicate forceText() { none() } - - /** - * Gets the value of the node property with the specified key. - */ - string getProperty(string key) { - key = "semmle.label" and result = this.getLabel() - or - key = "semmle.order" and result = this.getOrder().toString() - or - key = "semmle.graphKind" and result = this.getGraphKind() - or - key = "semmle.forceText" and this.forceText() and result = "true" - } -} - -/** - * An IR graph node representing a `IRFunction` object. - */ -private class PrintableIRFunction extends PrintableIRNode, TPrintableIRFunction { - IRFunction irFunc; - - PrintableIRFunction() { this = TPrintableIRFunction(irFunc) } - - override string toString() { result = irFunc.toString() } - - override Language::Location getLocation() { result = irFunc.getLocation() } - - override string getLabel() { - result = Imports::LanguageDebug::getIdentityString(irFunc.getFunction()) - } - - override int getOrder() { - this = - rank[result + 1](PrintableIRFunction orderedFunc, Language::Location location | - location = orderedFunc.getIRFunction().getLocation() - | - orderedFunc - order by - location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), - orderedFunc.getLabel() - ) - } - - final override PrintableIRNode getParent() { none() } - - final IRFunction getIRFunction() { result = irFunc } -} - -/** - * An IR graph node representing an `IRBlock` object. - */ -private class PrintableIRBlock extends PrintableIRNode, TPrintableIRBlock { - IRBlock block; - - PrintableIRBlock() { this = TPrintableIRBlock(block) } - - override string toString() { result = this.getLabel() } - - override Language::Location getLocation() { result = block.getLocation() } - - override string getLabel() { result = "Block " + block.getDisplayIndex().toString() } - - override int getOrder() { result = block.getDisplayIndex() } - - final override string getGraphKind() { result = "tree" } - - final override predicate forceText() { any() } - - final override PrintableIRFunction getParent() { - result.getIRFunction() = block.getEnclosingIRFunction() - } - - override string getProperty(string key) { - result = PrintableIRNode.super.getProperty(key) or - result = getAdditionalBlockProperty(block, key) - } - - final IRBlock getBlock() { result = block } -} - -/** - * An IR graph node representing an `Instruction`. - */ -private class PrintableInstruction extends PrintableIRNode, TPrintableInstruction { - Instruction instr; - - PrintableInstruction() { this = TPrintableInstruction(instr) } - - override string toString() { result = instr.toString() } - - override Language::Location getLocation() { result = instr.getLocation() } - - override string getLabel() { - exists(IRBlock block | - instr = block.getAnInstruction() and - exists( - string resultString, string operationString, string operandsString, int resultWidth, - int operationWidth - | - resultString = instr.getResultString() and - operationString = instr.getOperationString() and - operandsString = this.getOperandsString() and - columnWidths(block, resultWidth, operationWidth) and - result = - resultString + getPaddingString(resultWidth - resultString.length()) + " = " + - operationString + getPaddingString(operationWidth - operationString.length()) + " : " + - operandsString - ) - ) - } - - override int getOrder() { result = instr.getDisplayIndexInBlock() } - - final override PrintableIRBlock getParent() { result.getBlock() = instr.getBlock() } - - final Instruction getInstruction() { result = instr } - - override string getProperty(string key) { - result = PrintableIRNode.super.getProperty(key) or - result = getAdditionalInstructionProperty(instr, key) - } - - /** - * Gets the string representation of the operand list. This is the same as - * `Instruction::getOperandsString()`, except that each operand is annotated with any properties - * provided by active `IRPropertyProvider` instances. - */ - private string getOperandsString() { - result = - concat(Operand operand | - operand = instr.getAnOperand() and - shouldPrintOperand(operand) - | - operand.getDumpString() + getOperandPropertyString(operand), ", " - order by - operand.getDumpSortOrder() - ) - } -} - -private predicate columnWidths(IRBlock block, int resultWidth, int operationWidth) { - resultWidth = max(Instruction instr | instr.getBlock() = block | instr.getResultString().length()) and - operationWidth = - max(Instruction instr | instr.getBlock() = block | instr.getOperationString().length()) -} - -private int maxColumnWidth() { - result = - max(Instruction instr, int width | - width = instr.getResultString().length() or - width = instr.getOperationString().length() or - width = instr.getOperandsString().length() - | - width - ) -} - -private string getPaddingString(int n) { - n = 0 and result = "" - or - n > 0 and n <= maxColumnWidth() and result = getPaddingString(n - 1) + " " -} - -/** - * Holds if `node` belongs to the output graph, and its property `key` has the given `value`. - */ -query predicate nodes(PrintableIRNode node, string key, string value) { - value = node.getProperty(key) -} - -private int getSuccessorIndex(IRBlock pred, IRBlock succ) { - succ = - rank[result + 1](IRBlock aSucc, EdgeKind kind | - aSucc = pred.getSuccessor(kind) - | - aSucc order by kind.toString() - ) -} - -/** - * Holds if the output graph contains an edge from `pred` to `succ`, and that edge's property `key` - * has the given `value`. - */ -query predicate edges(PrintableIRBlock pred, PrintableIRBlock succ, string key, string value) { - exists(EdgeKind kind, IRBlock predBlock, IRBlock succBlock | - predBlock = pred.getBlock() and - succBlock = succ.getBlock() and - predBlock.getSuccessor(kind) = succBlock and - ( - ( - key = "semmle.label" and - if predBlock.getBackEdgeSuccessor(kind) = succBlock - then value = kind.toString() + " (back edge)" - else value = kind.toString() - ) - or - key = "semmle.order" and - value = getSuccessorIndex(predBlock, succBlock).toString() - ) - ) -} - -/** - * Holds if `parent` is the parent node of `child` in the output graph. - */ -query predicate parents(PrintableIRNode child, PrintableIRNode parent) { - parent = child.getParent() -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/constant/ConstantAnalysis.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/constant/ConstantAnalysis.qll deleted file mode 100644 index c50e8385c99..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/constant/ConstantAnalysis.qll +++ /dev/null @@ -1,54 +0,0 @@ -private import internal.ConstantAnalysisInternal -private import experimental.ir.internal.IntegerPartial -private import IR - -language[monotonicAggregates] -int getConstantValue(Instruction instr) { - result = instr.(IntegerConstantInstruction).getValue().toInt() - or - result = getBinaryInstructionValue(instr) - or - result = neg(getConstantValue(instr.(NegateInstruction).getUnary())) - or - result = getConstantValue(instr.(CopyInstruction).getSourceValue()) - or - exists(PhiInstruction phi | - phi = instr and - result = max(Operand op | op = phi.getAnInputOperand() | getConstantValue(op.getDef())) and - result = min(Operand op | op = phi.getAnInputOperand() | getConstantValue(op.getDef())) - ) -} - -pragma[noinline] -private predicate binaryInstructionOperands(BinaryInstruction instr, int left, int right) { - left = getConstantValue(instr.getLeft()) and - right = getConstantValue(instr.getRight()) -} - -pragma[noinline] -private int getBinaryInstructionValue(BinaryInstruction instr) { - exists(int left, int right | - binaryInstructionOperands(instr, left, right) and - ( - instr instanceof AddInstruction and result = add(left, right) - or - instr instanceof SubInstruction and result = sub(left, right) - or - instr instanceof MulInstruction and result = mul(left, right) - or - instr instanceof DivInstruction and result = div(left, right) - or - instr instanceof CompareEQInstruction and result = compareEQ(left, right) - or - instr instanceof CompareNEInstruction and result = compareNE(left, right) - or - instr instanceof CompareLTInstruction and result = compareLT(left, right) - or - instr instanceof CompareGTInstruction and result = compareGT(left, right) - or - instr instanceof CompareLEInstruction and result = compareLE(left, right) - or - instr instanceof CompareGEInstruction and result = compareGE(left, right) - ) - ) -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/constant/PrintConstantAnalysis.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/constant/PrintConstantAnalysis.qll deleted file mode 100644 index 53f9295be4f..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/constant/PrintConstantAnalysis.qll +++ /dev/null @@ -1,11 +0,0 @@ -private import internal.ConstantAnalysisInternal -private import experimental.ir.internal.IntegerConstant -private import ConstantAnalysis -import IR - -private class ConstantAnalysisPropertyProvider extends IRPropertyProvider { - override string getInstructionProperty(Instruction instr, string key) { - key = "ConstantValue" and - result = getValue(getConstantValue(instr)).toString() - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/constant/internal/ConstantAnalysisInternal.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/constant/internal/ConstantAnalysisInternal.qll deleted file mode 100644 index c70b240fe42..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/constant/internal/ConstantAnalysisInternal.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.implementation.unaliased_ssa.IR as IR diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll deleted file mode 100644 index a7fb1b3c07e..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/PrintValueNumbering.qll +++ /dev/null @@ -1,17 +0,0 @@ -private import internal.ValueNumberingImports -private import ValueNumbering - -/** - * Provides additional information about value numbering in IR dumps. - */ -class ValueNumberPropertyProvider extends IRPropertyProvider { - override string getInstructionProperty(Instruction instr, string key) { - exists(ValueNumber vn | - vn = valueNumber(instr) and - key = "valnum" and - if strictcount(vn.getAnInstruction()) > 1 - then result = vn.getDebugString() - else result = "unique" - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll deleted file mode 100644 index 2a46e16c52f..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/ValueNumbering.qll +++ /dev/null @@ -1,90 +0,0 @@ -private import internal.ValueNumberingInternal -private import internal.ValueNumberingImports - -/** - * The value number assigned to a particular set of instructions that produce equivalent results. - */ -class ValueNumber extends TValueNumber { - final string toString() { result = "GVN" } - - final string getDebugString() { - result = strictconcat(this.getAnInstruction().getResultId(), ", ") - } - - final Language::Location getLocation() { - if - exists(Instruction i | - i = this.getAnInstruction() and not i.getLocation() instanceof Language::UnknownLocation - ) - then - result = - min(Language::Location l | - l = this.getAnInstruction().getLocation() and not l instanceof Language::UnknownLocation - | - l - order by - l.getFile().getAbsolutePath(), l.getStartLine(), l.getStartColumn(), l.getEndLine(), - l.getEndColumn() - ) - else result instanceof Language::UnknownDefaultLocation - } - - /** - * Gets the instructions that have been assigned this value number. This will always produce at - * least one result. - */ - final Instruction getAnInstruction() { this = valueNumber(result) } - - /** - * Gets one of the instructions that was assigned this value number. The chosen instruction is - * deterministic but arbitrary. Intended for use only in debugging. - */ - final Instruction getExampleInstruction() { - result = - min(Instruction instr | - instr = this.getAnInstruction() - | - instr order by instr.getBlock().getDisplayIndex(), instr.getDisplayIndexInBlock() - ) - } - - /** - * Gets an `Operand` whose definition is exact and has this value number. - */ - final Operand getAUse() { this = valueNumber(result.getDef()) } - - final string getKind() { - this instanceof TVariableAddressValueNumber and result = "VariableAddress" - or - this instanceof TInitializeParameterValueNumber and result = "InitializeParameter" - or - this instanceof TConstantValueNumber and result = "Constant" - or - this instanceof TStringConstantValueNumber and result = "StringConstant" - or - this instanceof TFieldAddressValueNumber and result = "FieldAddress" - or - this instanceof TBinaryValueNumber and result = "Binary" - or - this instanceof TPointerArithmeticValueNumber and result = "PointerArithmetic" - or - this instanceof TUnaryValueNumber and result = "Unary" - or - this instanceof TInheritanceConversionValueNumber and result = "InheritanceConversion" - or - this instanceof TLoadTotalOverlapValueNumber and result = "LoadTotalOverlap" - or - this instanceof TUniqueValueNumber and result = "Unique" - } -} - -/** - * Gets the value number assigned to `instr`, if any. Returns at most one result. - */ -ValueNumber valueNumber(Instruction instr) { result = tvalueNumber(instr) } - -/** - * Gets the value number assigned to the exact definition of `op`, if any. - * Returns at most one result. - */ -ValueNumber valueNumberOfOperand(Operand op) { result = tvalueNumberOfOperand(op) } diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll deleted file mode 100644 index 34bd754692d..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingImports.qll +++ /dev/null @@ -1,3 +0,0 @@ -import experimental.ir.internal.Overlap -import experimental.ir.internal.IRCSharpLanguage as Language -import experimental.ir.implementation.unaliased_ssa.IR diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll deleted file mode 100644 index ec003891774..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/gvn/internal/ValueNumberingInternal.qll +++ /dev/null @@ -1,356 +0,0 @@ -private import ValueNumberingImports - -newtype TValueNumber = - TVariableAddressValueNumber(IRFunction irFunc, Language::AST ast) { - variableAddressValueNumber(_, irFunc, ast) - } or - TInitializeParameterValueNumber(IRFunction irFunc, Language::AST var) { - initializeParameterValueNumber(_, irFunc, var) - } or - TConstantValueNumber(IRFunction irFunc, IRType type, string value) { - constantValueNumber(_, irFunc, type, value) - } or - TStringConstantValueNumber(IRFunction irFunc, IRType type, string value) { - stringConstantValueNumber(_, irFunc, type, value) - } or - TFieldAddressValueNumber(IRFunction irFunc, Language::Field field, TValueNumber objectAddress) { - fieldAddressValueNumber(_, irFunc, field, objectAddress) - } or - TBinaryValueNumber( - IRFunction irFunc, Opcode opcode, TValueNumber leftOperand, TValueNumber rightOperand - ) { - binaryValueNumber(_, irFunc, opcode, leftOperand, rightOperand) - } or - TPointerArithmeticValueNumber( - IRFunction irFunc, Opcode opcode, int elementSize, TValueNumber leftOperand, - TValueNumber rightOperand - ) { - pointerArithmeticValueNumber(_, irFunc, opcode, elementSize, leftOperand, rightOperand) - } or - TUnaryValueNumber(IRFunction irFunc, Opcode opcode, TValueNumber operand) { - unaryValueNumber(_, irFunc, opcode, operand) - } or - TInheritanceConversionValueNumber( - IRFunction irFunc, Opcode opcode, Language::Class baseClass, Language::Class derivedClass, - TValueNumber operand - ) { - inheritanceConversionValueNumber(_, irFunc, opcode, baseClass, derivedClass, operand) - } or - TLoadTotalOverlapValueNumber( - IRFunction irFunc, IRType type, TValueNumber memOperand, TValueNumber operand - ) { - loadTotalOverlapValueNumber(_, irFunc, type, memOperand, operand) - } or - TUniqueValueNumber(IRFunction irFunc, Instruction instr) { uniqueValueNumber(instr, irFunc) } - -/** - * A `CopyInstruction` whose source operand's value is congruent to the definition of that source - * operand. - * For example: - * ``` - * Point p = { 1, 2 }; - * Point q = p; - * int a = p.x; - * ``` - * The use of `p` on line 2 is linked to the definition of `p` on line 1, and is congruent to that - * definition because it accesses the exact same memory. - * The use of `p.x` on line 3 is linked to the definition of `p` on line 1 as well, but is not - * congruent to that definition because `p.x` accesses only a subset of the memory defined by `p`. - */ -class CongruentCopyInstruction extends CopyInstruction { - CongruentCopyInstruction() { - this.getSourceValueOperand().getDefinitionOverlap() instanceof MustExactlyOverlap - } -} - -class LoadTotalOverlapInstruction extends LoadInstruction { - LoadTotalOverlapInstruction() { - this.getSourceValueOperand().getDefinitionOverlap() instanceof MustTotallyOverlap - } -} - -/** - * Holds if this library knows how to assign a value number to the specified instruction, other than - * a `unique` value number that is never shared by multiple instructions. - */ -private predicate numberableInstruction(Instruction instr) { - instr instanceof VariableAddressInstruction - or - instr instanceof InitializeParameterInstruction - or - instr instanceof ConstantInstruction - or - instr instanceof StringConstantInstruction - or - instr instanceof FieldAddressInstruction - or - instr instanceof BinaryInstruction - or - instr instanceof UnaryInstruction and not instr instanceof CopyInstruction - or - instr instanceof PointerArithmeticInstruction - or - instr instanceof CongruentCopyInstruction - or - instr instanceof LoadTotalOverlapInstruction -} - -private predicate filteredNumberableInstruction(Instruction instr) { - // count rather than strictcount to handle missing AST elements - // separate instanceof and inline casts to avoid failed casts with a count of 0 - instr instanceof VariableAddressInstruction and - count(instr.(VariableAddressInstruction).getIRVariable().getAst()) != 1 - or - instr instanceof ConstantInstruction and - count(instr.getResultIRType()) != 1 - or - instr instanceof FieldAddressInstruction and - count(instr.(FieldAddressInstruction).getField()) != 1 - or - instr instanceof InheritanceConversionInstruction and - ( - count(instr.(InheritanceConversionInstruction).getBaseClass()) != 1 or - count(instr.(InheritanceConversionInstruction).getDerivedClass()) != 1 - ) -} - -private predicate variableAddressValueNumber( - VariableAddressInstruction instr, IRFunction irFunc, Language::AST ast -) { - instr.getEnclosingIRFunction() = irFunc and - // The underlying AST element is used as value-numbering key instead of the - // `IRVariable` to work around a problem where a variable or expression with - // multiple types gives rise to multiple `IRVariable`s. - unique( | | instr.getIRVariable().getAst()) = ast -} - -private predicate initializeParameterValueNumber( - InitializeParameterInstruction instr, IRFunction irFunc, Language::AST var -) { - instr.getEnclosingIRFunction() = irFunc and - // The underlying AST element is used as value-numbering key instead of the - // `IRVariable` to work around a problem where a variable or expression with - // multiple types gives rise to multiple `IRVariable`s. - instr.getIRVariable().getAst() = var -} - -private predicate constantValueNumber( - ConstantInstruction instr, IRFunction irFunc, IRType type, string value -) { - instr.getEnclosingIRFunction() = irFunc and - unique( | | instr.getResultIRType()) = type and - instr.getValue() = value -} - -private predicate stringConstantValueNumber( - StringConstantInstruction instr, IRFunction irFunc, IRType type, string value -) { - instr.getEnclosingIRFunction() = irFunc and - instr.getResultIRType() = type and - instr.getValue().getValue() = value -} - -private predicate fieldAddressValueNumber( - FieldAddressInstruction instr, IRFunction irFunc, Language::Field field, - TValueNumber objectAddress -) { - instr.getEnclosingIRFunction() = irFunc and - unique( | | instr.getField()) = field and - tvalueNumber(instr.getObjectAddress()) = objectAddress -} - -pragma[nomagic] -private predicate binaryValueNumber0( - BinaryInstruction instr, IRFunction irFunc, Opcode opcode, boolean isLeft, - TValueNumber valueNumber -) { - not instr instanceof PointerArithmeticInstruction and - instr.getEnclosingIRFunction() = irFunc and - instr.getOpcode() = opcode and - ( - isLeft = true and - tvalueNumber(instr.getLeft()) = valueNumber - or - isLeft = false and - tvalueNumber(instr.getRight()) = valueNumber - ) -} - -private predicate binaryValueNumber( - BinaryInstruction instr, IRFunction irFunc, Opcode opcode, TValueNumber leftOperand, - TValueNumber rightOperand -) { - binaryValueNumber0(instr, irFunc, opcode, true, leftOperand) and - binaryValueNumber0(instr, irFunc, opcode, false, rightOperand) -} - -pragma[nomagic] -private predicate pointerArithmeticValueNumber0( - PointerArithmeticInstruction instr, IRFunction irFunc, Opcode opcode, int elementSize, - boolean isLeft, TValueNumber valueNumber -) { - instr.getEnclosingIRFunction() = irFunc and - instr.getOpcode() = opcode and - instr.getElementSize() = elementSize and - ( - isLeft = true and - tvalueNumber(instr.getLeft()) = valueNumber - or - isLeft = false and - tvalueNumber(instr.getRight()) = valueNumber - ) -} - -private predicate pointerArithmeticValueNumber( - PointerArithmeticInstruction instr, IRFunction irFunc, Opcode opcode, int elementSize, - TValueNumber leftOperand, TValueNumber rightOperand -) { - pointerArithmeticValueNumber0(instr, irFunc, opcode, elementSize, true, leftOperand) and - pointerArithmeticValueNumber0(instr, irFunc, opcode, elementSize, false, rightOperand) -} - -private predicate unaryValueNumber( - UnaryInstruction instr, IRFunction irFunc, Opcode opcode, TValueNumber operand -) { - instr.getEnclosingIRFunction() = irFunc and - not instr instanceof InheritanceConversionInstruction and - not instr instanceof CopyInstruction and - not instr instanceof FieldAddressInstruction and - instr.getOpcode() = opcode and - tvalueNumber(instr.getUnary()) = operand -} - -private predicate inheritanceConversionValueNumber( - InheritanceConversionInstruction instr, IRFunction irFunc, Opcode opcode, - Language::Class baseClass, Language::Class derivedClass, TValueNumber operand -) { - instr.getEnclosingIRFunction() = irFunc and - instr.getOpcode() = opcode and - tvalueNumber(instr.getUnary()) = operand and - unique( | | instr.getBaseClass()) = baseClass and - unique( | | instr.getDerivedClass()) = derivedClass -} - -pragma[nomagic] -private predicate loadTotalOverlapValueNumber0( - LoadTotalOverlapInstruction instr, IRFunction irFunc, IRType type, TValueNumber valueNumber, - boolean isAddress -) { - instr.getEnclosingIRFunction() = irFunc and - instr.getResultIRType() = type and - ( - isAddress = true and - tvalueNumberOfOperand(instr.getSourceAddressOperand()) = valueNumber - or - isAddress = false and - tvalueNumber(instr.getSourceValueOperand().getAnyDef()) = valueNumber - ) -} - -private predicate loadTotalOverlapValueNumber( - LoadTotalOverlapInstruction instr, IRFunction irFunc, IRType type, TValueNumber memOperand, - TValueNumber operand -) { - loadTotalOverlapValueNumber0(instr, irFunc, type, operand, true) and - loadTotalOverlapValueNumber0(instr, irFunc, type, memOperand, false) -} - -/** - * Holds if `instr` should be assigned a unique value number because this library does not know how - * to determine if two instances of that instruction are equivalent. - */ -private predicate uniqueValueNumber(Instruction instr, IRFunction irFunc) { - instr.getEnclosingIRFunction() = irFunc and - not instr.getResultIRType() instanceof IRVoidType and - ( - not numberableInstruction(instr) - or - filteredNumberableInstruction(instr) - ) -} - -/** - * Gets the value number assigned to `instr`, if any. Returns at most one result. - */ -cached -TValueNumber tvalueNumber(Instruction instr) { - result = nonUniqueValueNumber(instr) - or - exists(IRFunction irFunc | - uniqueValueNumber(instr, irFunc) and - result = TUniqueValueNumber(irFunc, instr) - ) -} - -/** - * Gets the value number assigned to the exact definition of `op`, if any. - * Returns at most one result. - */ -TValueNumber tvalueNumberOfOperand(Operand op) { result = tvalueNumber(op.getDef()) } - -/** - * Gets the value number assigned to `instr`, if any, unless that instruction is assigned a unique - * value number. - */ -private TValueNumber nonUniqueValueNumber(Instruction instr) { - exists(IRFunction irFunc | - irFunc = instr.getEnclosingIRFunction() and - ( - exists(Language::AST ast | - variableAddressValueNumber(instr, irFunc, ast) and - result = TVariableAddressValueNumber(irFunc, ast) - ) - or - exists(Language::AST var | - initializeParameterValueNumber(instr, irFunc, var) and - result = TInitializeParameterValueNumber(irFunc, var) - ) - or - exists(string value, IRType type | - constantValueNumber(instr, irFunc, type, value) and - result = TConstantValueNumber(irFunc, type, value) - ) - or - exists(IRType type, string value | - stringConstantValueNumber(instr, irFunc, type, value) and - result = TStringConstantValueNumber(irFunc, type, value) - ) - or - exists(Language::Field field, TValueNumber objectAddress | - fieldAddressValueNumber(instr, irFunc, field, objectAddress) and - result = TFieldAddressValueNumber(irFunc, field, objectAddress) - ) - or - exists(Opcode opcode, TValueNumber leftOperand, TValueNumber rightOperand | - binaryValueNumber(instr, irFunc, opcode, leftOperand, rightOperand) and - result = TBinaryValueNumber(irFunc, opcode, leftOperand, rightOperand) - ) - or - exists(Opcode opcode, TValueNumber operand | - unaryValueNumber(instr, irFunc, opcode, operand) and - result = TUnaryValueNumber(irFunc, opcode, operand) - ) - or - exists( - Opcode opcode, Language::Class baseClass, Language::Class derivedClass, TValueNumber operand - | - inheritanceConversionValueNumber(instr, irFunc, opcode, baseClass, derivedClass, operand) and - result = TInheritanceConversionValueNumber(irFunc, opcode, baseClass, derivedClass, operand) - ) - or - exists(Opcode opcode, int elementSize, TValueNumber leftOperand, TValueNumber rightOperand | - pointerArithmeticValueNumber(instr, irFunc, opcode, elementSize, leftOperand, rightOperand) and - result = - TPointerArithmeticValueNumber(irFunc, opcode, elementSize, leftOperand, rightOperand) - ) - or - exists(IRType type, TValueNumber memOperand, TValueNumber operand | - loadTotalOverlapValueNumber(instr, irFunc, type, memOperand, operand) and - result = TLoadTotalOverlapValueNumber(irFunc, type, memOperand, operand) - ) - or - // The value number of a copy is just the value number of its source value. - result = tvalueNumber(instr.(CongruentCopyInstruction).getSourceValue()) - ) - ) -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll deleted file mode 100644 index 23a7c1e77fd..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll +++ /dev/null @@ -1,474 +0,0 @@ -private import AliasAnalysisInternal -private import InputIR -private import AliasAnalysisImports - -private class IntValue = Ints::IntValue; - -/** - * If `instr` is a `SideEffectInstruction`, gets the primary `CallInstruction` that caused the side - * effect. If `instr` is a `CallInstruction`, gets that same `CallInstruction`. - */ -private CallInstruction getPrimaryCall(Instruction instr) { - result = instr - or - result = instr.(SideEffectInstruction).getPrimaryInstruction() -} - -/** - * Holds if `operand` serves as an input argument (or indirection) to `call`, in the position - * specified by `input`. - */ -private predicate isCallInput( - CallInstruction call, Operand operand, AliasModels::FunctionInput input -) { - call = getPrimaryCall(operand.getUse()) and - ( - exists(int index | - input.isParameterOrQualifierAddress(index) and - operand = call.getArgumentOperand(index) - ) - or - exists(int index, ReadSideEffectInstruction read | - input.isParameterDerefOrQualifierObject(index) and - read = call.getAParameterSideEffect(index) and - operand = read.getSideEffectOperand() - ) - ) -} - -/** - * Holds if `instr` serves as a return value or output argument indirection for `call`, in the - * position specified by `output`. - */ -private predicate isCallOutput( - CallInstruction call, Instruction instr, AliasModels::FunctionOutput output -) { - call = getPrimaryCall(instr) and - ( - output.isReturnValue() and instr = call - or - exists(int index, WriteSideEffectInstruction write | - output.isParameterDerefOrQualifierObject(index) and - write = call.getAParameterSideEffect(index) and - instr = write - ) - ) -} - -/** - * Holds if the address in `operand` flows directly to the result of `resultInstr` due to modeled - * address flow through a function call. - */ -private predicate hasAddressFlowThroughCall(Operand operand, Instruction resultInstr) { - exists( - CallInstruction call, AliasModels::FunctionInput input, AliasModels::FunctionOutput output - | - call.getStaticCallTarget().(AliasModels::AliasFunction).hasAddressFlow(input, output) and - isCallInput(call, operand, input) and - isCallOutput(call, resultInstr, output) - ) -} - -/** - * Holds if the operand `tag` of instruction `instr` is used in a way that does - * not result in any address held in that operand from escaping beyond the - * instruction. - */ -private predicate operandIsConsumedWithoutEscaping(Operand operand) { - // The source/destination address of a Load/Store does not escape (but the - // loaded/stored value could). - operand instanceof AddressOperand - or - exists(Instruction instr | - instr = operand.getUse() and - ( - // Neither operand of a Compare escapes. - instr instanceof CompareInstruction - or - // Neither operand of a PointerDiff escapes. - instr instanceof PointerDiffInstruction - or - // Converting an address to a `bool` does not escape the address. - instr.(ConvertInstruction).getResultIRType() instanceof IRBooleanType - or - instr instanceof CallInstruction and - not exists(IREscapeAnalysisConfiguration config | config.useSoundEscapeAnalysis()) - ) - ) - or - // Some standard function arguments never escape - isNeverEscapesArgument(operand) -} - -private predicate operandEscapesDomain(Operand operand) { - not operandIsConsumedWithoutEscaping(operand) and - not operandIsPropagated(operand, _, _) and - not isArgumentForParameter(_, operand, _) and - not isOnlyEscapesViaReturnArgument(operand) and - not operand.getUse() instanceof ReturnValueInstruction and - not operand.getUse() instanceof ReturnIndirectionInstruction and - not operand instanceof PhiInputOperand -} - -/** - * If the result of instruction `instr` is an integer constant, returns the - * value of that constant. Otherwise, returns unknown. - */ -IntValue getConstantValue(Instruction instr) { - if instr instanceof IntegerConstantInstruction - then result = instr.(IntegerConstantInstruction).getValue().toInt() - else result = Ints::unknown() -} - -/** - * Computes the offset, in bits, by which the result of `instr` differs from the - * pointer argument to `instr`, if that offset is a constant. Otherwise, returns - * unknown. - */ -IntValue getPointerBitOffset(PointerOffsetInstruction instr) { - exists(IntValue bitOffset | - bitOffset = Ints::mul(Ints::mul(getConstantValue(instr.getRight()), instr.getElementSize()), 8) and - ( - instr instanceof PointerAddInstruction and result = bitOffset - or - instr instanceof PointerSubInstruction and result = Ints::neg(bitOffset) - ) - ) -} - -/** - * Holds if any address held in operand `operand` is propagated to the result of `instr`, offset by - * the number of bits in `bitOffset`. If the address is propagated, but the offset is not known to - * be a constant, then `bitOffset` is `unknown()`. - */ -private predicate operandIsPropagated(Operand operand, IntValue bitOffset, Instruction instr) { - // Some functions are known to propagate an argument - hasAddressFlowThroughCall(operand, instr) and - bitOffset = 0 - or - instr = operand.getUse() and - ( - // Converting to a non-virtual base class adds the offset of the base class. - exists(ConvertToNonVirtualBaseInstruction convert | - convert = instr and - bitOffset = Ints::mul(convert.getDerivation().getByteOffset(), 8) - ) - or - // Conversion using dynamic_cast results in an unknown offset - instr instanceof CheckedConvertOrNullInstruction and - bitOffset = Ints::unknown() - or - // Converting to a derived class subtracts the offset of the base class. - exists(ConvertToDerivedInstruction convert | - convert = instr and - bitOffset = Ints::neg(Ints::mul(convert.getDerivation().getByteOffset(), 8)) - ) - or - // Converting to a virtual base class adds an unknown offset. - instr instanceof ConvertToVirtualBaseInstruction and - bitOffset = Ints::unknown() - or - // Conversion to another pointer type propagates the source address. - exists(ConvertInstruction convert, IRType resultType | - convert = instr and - resultType = convert.getResultIRType() and - resultType instanceof IRAddressType and - bitOffset = 0 - ) - or - // Adding an integer to or subtracting an integer from a pointer propagates - // the address with an offset. - exists(PointerOffsetInstruction ptrOffset | - ptrOffset = instr and - operand = ptrOffset.getLeftOperand() and - bitOffset = getPointerBitOffset(ptrOffset) - ) - or - // Computing a field address from a pointer propagates the address plus the - // offset of the field. - bitOffset = Language::getFieldBitOffset(instr.(FieldAddressInstruction).getField()) - or - // A copy propagates the source value. - operand = instr.(CopyInstruction).getSourceValueOperand() and bitOffset = 0 - ) -} - -private predicate operandEscapesNonReturn(Operand operand) { - exists(Instruction instr | - // The address is propagated to the result of the instruction, and that result itself is returned - operandIsPropagated(operand, _, instr) and resultEscapesNonReturn(instr) - ) - or - // The operand is used in a function call which returns it, and the return value is then returned - exists(CallInstruction ci, Instruction init | - isArgumentForParameter(ci, operand, init) and - ( - resultMayReachReturn(init) and - resultEscapesNonReturn(ci) - or - resultEscapesNonReturn(init) - ) - ) - or - isOnlyEscapesViaReturnArgument(operand) and resultEscapesNonReturn(operand.getUse()) - or - operand instanceof PhiInputOperand and - resultEscapesNonReturn(operand.getUse()) - or - operandEscapesDomain(operand) -} - -private predicate operandMayReachReturn(Operand operand) { - exists(Instruction instr | - // The address is propagated to the result of the instruction, and that result itself is returned - operandIsPropagated(operand, _, instr) and - resultMayReachReturn(instr) - ) - or - // The operand is used in a function call which returns it, and the return value is then returned - exists(CallInstruction ci, Instruction init | - isArgumentForParameter(ci, operand, init) and - resultMayReachReturn(init) and - resultMayReachReturn(ci) - ) - or - // The address is returned - operand.getUse() instanceof ReturnValueInstruction - or - isOnlyEscapesViaReturnArgument(operand) and resultMayReachReturn(operand.getUse()) - or - operand instanceof PhiInputOperand and - resultMayReachReturn(operand.getUse()) -} - -private predicate operandReturned(Operand operand, IntValue bitOffset) { - // The address is propagated to the result of the instruction, and that result itself is returned - exists(Instruction instr, IntValue bitOffset1, IntValue bitOffset2 | - operandIsPropagated(operand, bitOffset1, instr) and - resultReturned(instr, bitOffset2) and - bitOffset = Ints::add(bitOffset1, bitOffset2) - ) - or - // The operand is used in a function call which returns it, and the return value is then returned - exists(CallInstruction ci, Instruction init, IntValue bitOffset1, IntValue bitOffset2 | - isArgumentForParameter(ci, operand, init) and - resultReturned(init, bitOffset1) and - resultReturned(ci, bitOffset2) and - bitOffset = Ints::add(bitOffset1, bitOffset2) - ) - or - // The address is returned - operand.getUse() instanceof ReturnValueInstruction and - bitOffset = 0 - or - isOnlyEscapesViaReturnArgument(operand) and - resultReturned(operand.getUse(), _) and - bitOffset = Ints::unknown() -} - -pragma[nomagic] -private predicate initializeParameterInstructionHasVariable( - IRVariable var, InitializeParameterInstruction init -) { - init.getIRVariable() = var -} - -private predicate instructionInitializesThisInFunction( - Language::Function f, InitializeParameterInstruction init -) { - initializeParameterInstructionHasVariable(any(IRThisVariable var), pragma[only_bind_into](init)) and - init.getEnclosingFunction() = f -} - -private predicate isArgumentForParameter( - CallInstruction ci, Operand operand, InitializeParameterInstruction init -) { - exists(Language::Function f | - ci = operand.getUse() and - f = ci.getStaticCallTarget() and - ( - init.getParameter() = f.getParameter(operand.(PositionalArgumentOperand).getIndex()) - or - instructionInitializesThisInFunction(f, init) and - operand instanceof ThisArgumentOperand - ) and - not Language::isFunctionVirtual(f) and - not f instanceof AliasModels::AliasFunction - ) -} - -private predicate isOnlyEscapesViaReturnArgument(Operand operand) { - exists(AliasModels::AliasFunction f | - f = operand.getUse().(CallInstruction).getStaticCallTarget() and - ( - f.parameterEscapesOnlyViaReturn(operand.(PositionalArgumentOperand).getIndex()) - or - f.parameterEscapesOnlyViaReturn(-1) and - operand instanceof ThisArgumentOperand - ) - ) -} - -private predicate isNeverEscapesArgument(Operand operand) { - exists(AliasModels::AliasFunction f | - f = operand.getUse().(CallInstruction).getStaticCallTarget() and - ( - f.parameterNeverEscapes(operand.(PositionalArgumentOperand).getIndex()) - or - f.parameterNeverEscapes(-1) and - operand instanceof ThisArgumentOperand - ) - ) -} - -private predicate resultReturned(Instruction instr, IntValue bitOffset) { - operandReturned(instr.getAUse(), bitOffset) -} - -private predicate resultMayReachReturn(Instruction instr) { operandMayReachReturn(instr.getAUse()) } - -/** - * Holds if any address held in the result of instruction `instr` escapes - * outside the domain of the analysis. - */ -private predicate resultEscapesNonReturn(Instruction instr) { - // The result escapes if it has at least one use that escapes. - operandEscapesNonReturn(instr.getAUse()) - or - // The result also escapes if it is not modeled in SSA, because we do not know where it might be - // used. - not instr.isResultModeled() -} - -/** - * Holds if the address of `allocation` escapes outside the domain of the analysis. This can occur - * either because the allocation's address is taken within the function and escapes, or because the - * allocation is marked as always escaping via `alwaysEscapes()`. - */ -predicate allocationEscapes(Configuration::Allocation allocation) { - allocation.alwaysEscapes() - or - exists(IREscapeAnalysisConfiguration config | - config.useSoundEscapeAnalysis() and resultEscapesNonReturn(allocation.getABaseInstruction()) - ) - or - Configuration::phaseNeedsSoundEscapeAnalysis() and - resultEscapesNonReturn(allocation.getABaseInstruction()) -} - -/** - * Equivalent to `operandIsPropagated()`, but includes interprocedural propagation. - */ -private predicate operandIsPropagatedIncludingByCall( - Operand operand, IntValue bitOffset, Instruction instr -) { - operandIsPropagated(operand, bitOffset, instr) - or - exists(CallInstruction call, Instruction init | - isArgumentForParameter(call, operand, init) and - resultReturned(init, bitOffset) and - instr = call - ) -} - -/** - * Holds if `addrOperand` is at offset `bitOffset` from the value of instruction `base`. The offset - * may be `unknown()`. - */ -private predicate hasBaseAndOffset(AddressOperand addrOperand, Instruction base, IntValue bitOffset) { - base = addrOperand.getDef() and bitOffset = 0 // Base case - or - exists( - Instruction middle, int previousBitOffset, Operand middleOperand, IntValue additionalBitOffset - | - // We already have an offset from `middle`. - hasBaseAndOffset(addrOperand, middle, previousBitOffset) and - // `middle` is propagated from `base`. - operandIsPropagatedIncludingByCall(middleOperand, additionalBitOffset, middle) and - base = middleOperand.getDef() and - bitOffset = Ints::add(previousBitOffset, additionalBitOffset) - ) -} - -/** - * Holds if `addrOperand` is at constant offset `bitOffset` from the value of instruction `base`. - * Only holds for the `base` with the longest chain of propagation to `addrOperand`. - */ -predicate addressOperandBaseAndConstantOffset( - AddressOperand addrOperand, Instruction base, int bitOffset -) { - hasBaseAndOffset(addrOperand, base, bitOffset) and - Ints::hasValue(bitOffset) and - not exists(Instruction previousBase, int previousBitOffset | - hasBaseAndOffset(addrOperand, previousBase, previousBitOffset) and - previousBase = base.getAnOperand().getDef() and - Ints::hasValue(previousBitOffset) - ) -} - -/** - * Gets the allocation into which `addrOperand` points, if known. - */ -Configuration::Allocation getAddressOperandAllocation(AddressOperand addrOperand) { - addressOperandAllocationAndOffset(addrOperand, result, _) -} - -/** - * Holds if `addrOperand` is at offset `bitOffset` from a base instruction of `allocation`. The - * offset may be `unknown()`. - */ -predicate addressOperandAllocationAndOffset( - AddressOperand addrOperand, Configuration::Allocation allocation, IntValue bitOffset -) { - exists(Instruction base | - allocation.getABaseInstruction() = base and - hasBaseAndOffset(addrOperand, base, bitOffset) and - not exists(Instruction previousBase | - hasBaseAndOffset(addrOperand, pragma[only_bind_out](previousBase), _) and - previousBase = base.getAnOperand().getDef() - ) - ) -} - -/** - * Predicates used only for printing annotated IR dumps. These should not be used in production - * queries. - */ -module Print { - string getOperandProperty(Operand operand, string key) { - key = "alloc" and - result = - strictconcat(Configuration::Allocation allocation, IntValue bitOffset | - addressOperandAllocationAndOffset(operand, allocation, bitOffset) - | - allocation.toString() + Ints::getBitOffsetString(bitOffset), ", " - ) - or - key = "prop" and - result = - strictconcat(Instruction destInstr, IntValue bitOffset, string value | - operandIsPropagatedIncludingByCall(operand, bitOffset, destInstr) and - if destInstr = operand.getUse() - then value = "@" + Ints::getBitOffsetString(bitOffset) + "->result" - else value = "@" + Ints::getBitOffsetString(bitOffset) + "->" + destInstr.getResultId() - | - value, ", " - ) - } - - string getInstructionProperty(Instruction instr, string key) { - key = "prop" and - result = - strictconcat(IntValue bitOffset, Operand sourceOperand, string value | - operandIsPropagatedIncludingByCall(sourceOperand, bitOffset, instr) and - if instr = sourceOperand.getUse() - then value = sourceOperand.getDumpId() + Ints::getBitOffsetString(bitOffset) + "->@" - else - value = - sourceOperand.getUse().getResultId() + "." + sourceOperand.getDumpId() + - Ints::getBitOffsetString(bitOffset) + "->@" - | - value, ", " - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysisImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysisImports.qll deleted file mode 100644 index 78dcdc95af0..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysisImports.qll +++ /dev/null @@ -1,269 +0,0 @@ -private import csharp -import experimental.ir.implementation.IRConfiguration -import experimental.ir.internal.IntegerConstant as Ints - -module AliasModels { - class ParameterIndex = int; - - /** - * An input to a function. This can be: - * - The value of one of the function's parameters - * - The value pointed to by one of function's pointer or reference parameters - * - The value of the function's `this` pointer - * - The value pointed to by the function's `this` pointer - */ - abstract class FunctionInput extends string { - FunctionInput() { none() } - - /** - * Holds if this is the input value of the parameter with index `index`. - * - * Example: - * ``` - * void func(int n, char* p, float& r); - * ``` - * - `isParameter(0)` holds for the `FunctionInput` that represents the value of `n` (with type - * `int`) on entry to the function. - * - `isParameter(1)` holds for the `FunctionInput` that represents the value of `p` (with type - * `char*`) on entry to the function. - * - `isParameter(2)` holds for the `FunctionInput` that represents the "value" of the reference - * `r` (with type `float&`) on entry to the function, _not_ the value of the referred-to - * `float`. - */ - predicate isParameter(ParameterIndex index) { none() } - - /** - * Holds if this is the input value pointed to by a pointer parameter to a function, or the input - * value referred to by a reference parameter to a function, where the parameter has index - * `index`. - * - * Example: - * ``` - * void func(int n, char* p, float& r); - * ``` - * - `isParameterDeref(1)` holds for the `FunctionInput` that represents the value of `*p` (with - * type `char`) on entry to the function. - * - `isParameterDeref(2)` holds for the `FunctionInput` that represents the value of `r` (with type - * `float`) on entry to the function. - * - There is no `FunctionInput` for which `isParameterDeref(0)` holds, because `n` is neither a - * pointer nor a reference. - */ - predicate isParameterDeref(ParameterIndex index) { none() } - - /** - * Holds if this is the input value pointed to by the `this` pointer of an instance member - * function. - * - * Example: - * ``` - * struct C { - * void mfunc(int n, char* p, float& r) const; - * }; - * ``` - * - `isQualifierObject()` holds for the `FunctionInput` that represents the value of `*this` - * (with type `C const`) on entry to the function. - */ - predicate isQualifierObject() { none() } - - /** - * Holds if this is the input value of the `this` pointer of an instance member function. - * - * Example: - * ``` - * struct C { - * void mfunc(int n, char* p, float& r) const; - * }; - * ``` - * - `isQualifierAddress()` holds for the `FunctionInput` that represents the value of `this` - * (with type `C const *`) on entry to the function. - */ - predicate isQualifierAddress() { none() } - - /** - * Holds if `i >= 0` and `isParameter(i)` holds for this value, or - * if `i = -1` and `isQualifierAddress()` holds for this value. - */ - final predicate isParameterOrQualifierAddress(ParameterIndex i) { - i >= 0 and this.isParameter(i) - or - i = -1 and this.isQualifierAddress() - } - - /** - * Holds if this is the input value pointed to by the return value of a - * function, if the function returns a pointer, or the input value referred - * to by the return value of a function, if the function returns a reference. - * - * Example: - * ``` - * char* getPointer(); - * float& getReference(); - * int getInt(); - * ``` - * - `isReturnValueDeref()` holds for the `FunctionInput` that represents the - * value of `*getPointer()` (with type `char`). - * - `isReturnValueDeref()` holds for the `FunctionInput` that represents the - * value of `getReference()` (with type `float`). - * - There is no `FunctionInput` of `getInt()` for which - * `isReturnValueDeref()` holds because the return type of `getInt()` is - * neither a pointer nor a reference. - * - * Note that data flows in through function return values are relatively - * rare, but they do occur when a function returns a reference to itself, - * part of itself, or one of its other inputs. - */ - predicate isReturnValueDeref() { none() } - - /** - * Holds if `i >= 0` and `isParameterDeref(i)` holds for this value, or - * if `i = -1` and `isQualifierObject()` holds for this value. - */ - final predicate isParameterDerefOrQualifierObject(ParameterIndex i) { - i >= 0 and this.isParameterDeref(i) - or - i = -1 and this.isQualifierObject() - } - } - - /** - * An output from a function. This can be: - * - The value pointed to by one of function's pointer or reference parameters - * - The value pointed to by the function's `this` pointer - * - The function's return value - * - The value pointed to by the function's return value, if the return value is a pointer or - * reference - */ - abstract class FunctionOutput extends string { - FunctionOutput() { none() } - - /** - * Holds if this is the output value pointed to by a pointer parameter to a function, or the - * output value referred to by a reference parameter to a function, where the parameter has - * index `index`. - * - * Example: - * ``` - * void func(int n, char* p, float& r); - * ``` - * - `isParameterDeref(1)` holds for the `FunctionOutput` that represents the value of `*p` (with - * type `char`) on return from the function. - * - `isParameterDeref(2)` holds for the `FunctionOutput` that represents the value of `r` (with - * type `float`) on return from the function. - * - There is no `FunctionOutput` for which `isParameterDeref(0)` holds, because `n` is neither a - * pointer nor a reference. - */ - predicate isParameterDeref(ParameterIndex index) { none() } - - /** - * Holds if this is the output value pointed to by the `this` pointer of an instance member - * function. - * - * Example: - * ``` - * struct C { - * void mfunc(int n, char* p, float& r); - * }; - * ``` - * - `isQualifierObject()` holds for the `FunctionOutput` that represents the value of `*this` - * (with type `C`) on return from the function. - */ - predicate isQualifierObject() { none() } - - /** - * Holds if this is the value returned by a function. - * - * Example: - * ``` - * int getInt(); - * char* getPointer(); - * float& getReference(); - * ``` - * - `isReturnValue()` holds for the `FunctionOutput` that represents the value returned by - * `getInt()` (with type `int`). - * - `isReturnValue()` holds for the `FunctionOutput` that represents the value returned by - * `getPointer()` (with type `char*`). - * - `isReturnValue()` holds for the `FunctionOutput` that represents the "value" of the reference - * returned by `getReference()` (with type `float&`), _not_ the value of the referred-to - * `float`. - */ - predicate isReturnValue() { none() } - - /** - * Holds if this is the output value pointed to by the return value of a function, if the function - * returns a pointer, or the output value referred to by the return value of a function, if the - * function returns a reference. - * - * Example: - * ``` - * char* getPointer(); - * float& getReference(); - * int getInt(); - * ``` - * - `isReturnValueDeref()` holds for the `FunctionOutput` that represents the value of - * `*getPointer()` (with type `char`). - * - `isReturnValueDeref()` holds for the `FunctionOutput` that represents the value of - * `getReference()` (with type `float`). - * - There is no `FunctionOutput` of `getInt()` for which `isReturnValueDeref()` holds because the - * return type of `getInt()` is neither a pointer nor a reference. - */ - predicate isReturnValueDeref() { none() } - - /** - * Holds if `i >= 0` and `isParameterDeref(i)` holds for this is the value, or - * if `i = -1` and `isQualifierObject()` holds for this value. - */ - final predicate isParameterDerefOrQualifierObject(ParameterIndex i) { - i >= 0 and this.isParameterDeref(i) - or - i = -1 and this.isQualifierObject() - } - } - - /** - * Models the aliasing behavior of a library function. - */ - abstract class AliasFunction extends Callable { - /** - * Holds if the address passed to the parameter at the specified index is never retained after - * the function returns. - * - * Example: - * ```csharp - * int* g; - * int* func(int* p, int* q, int* r, int* s, int n) { - * *s = 1; // `s` does not escape. - * g = p; // Stored in global. `p` escapes. - * if (rand()) { - * return q; // `q` escapes via the return value. - * } - * else { - * return r + n; // `r` escapes via the return value, even though an offset has been added. - * } - * } - * ``` - * - * For the above function, the following terms hold: - * - `parameterEscapesOnlyViaReturn(1)` - * - `parameterEscapesOnlyViaReturn(2)` - * - `parameterNeverEscapes(3)` - */ - abstract predicate parameterNeverEscapes(int index); - - /** - * Holds if the address passed to the parameter at the specified index escapes via the return - * value of the function, but does not otherwise escape. See the comment for - * `parameterNeverEscapes` for an example. - */ - abstract predicate parameterEscapesOnlyViaReturn(int index); - - /** - * Holds if the function always returns the value of the parameter at the specified index. - */ - abstract predicate parameterIsAlwaysReturned(int index); - - /** - * Holds if the address passed in via `input` is always propagated to `output`. - */ - abstract predicate hasAddressFlow(FunctionInput input, FunctionOutput output); - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysisInternal.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysisInternal.qll deleted file mode 100644 index f3f2d14ab43..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysisInternal.qll +++ /dev/null @@ -1,3 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language -import experimental.ir.implementation.raw.IR as InputIR -import AliasConfiguration as Configuration diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll deleted file mode 100644 index 110e673e1d2..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasConfiguration.qll +++ /dev/null @@ -1,18 +0,0 @@ -private import AliasConfigurationImports - -/** - * A memory allocation that can be tracked by the SimpleSSA alias analysis. - * All automatic variables are tracked. - */ -class Allocation extends IRAutomaticVariable { - VariableAddressInstruction getABaseInstruction() { result.getIRVariable() = this } - - final string getAllocationString() { result = this.toString() } - - predicate alwaysEscapes() { - // An automatic variable only escapes if its address is taken and escapes. - none() - } -} - -predicate phaseNeedsSoundEscapeAnalysis() { any() } diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasConfigurationImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasConfigurationImports.qll deleted file mode 100644 index fc29c0d77dd..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasConfigurationImports.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.implementation.raw.IR diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll deleted file mode 100644 index c80761a68cf..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRBlockImports.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.implementation.EdgeKind as EdgeKind diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRConsistencyImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRConsistencyImports.qll deleted file mode 100644 index f43546fe76d..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRConsistencyImports.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguageDebug as LanguageDebug diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRFunctionImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRFunctionImports.qll deleted file mode 100644 index 4e9a7d9f3ae..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRFunctionImports.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.implementation.internal.IRFunctionBase as IRFunctionBase diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRImports.qll deleted file mode 100644 index 14dad7400b2..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRImports.qll +++ /dev/null @@ -1,3 +0,0 @@ -import experimental.ir.implementation.EdgeKind as EdgeKind -import experimental.ir.implementation.IRType as IRType -import experimental.ir.implementation.MemoryAccessKind as MemoryAccessKind diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRInternal.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRInternal.qll deleted file mode 100644 index eaf33e0800f..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRInternal.qll +++ /dev/null @@ -1,4 +0,0 @@ -import experimental.ir.internal.IRCSharpLanguage as Language -import SSAConstruction as Construction -import experimental.ir.implementation.IRConfiguration as IRConfiguration -import experimental.ir.implementation.raw.internal.IRConstruction::Raw as Raw diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRVariableImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRVariableImports.qll deleted file mode 100644 index bdb4377cbdc..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/IRVariableImports.qll +++ /dev/null @@ -1,5 +0,0 @@ -import experimental.ir.implementation.IRType as IRType -import experimental.ir.implementation.TempVariableTag as TempVariableTag -import experimental.ir.internal.IRUtilities as IRUtilities -import experimental.ir.internal.TempVariableTag as TTempVariableTag -import experimental.ir.implementation.internal.TIRVariable as TIRVariable diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/InstructionImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/InstructionImports.qll deleted file mode 100644 index 4bcd2e127c1..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/InstructionImports.qll +++ /dev/null @@ -1,6 +0,0 @@ -import experimental.ir.implementation.EdgeKind as EdgeKind -import experimental.ir.implementation.IRType as IRType -import experimental.ir.implementation.MemoryAccessKind as MemoryAccessKind -import experimental.ir.implementation.Opcode as Opcode -import experimental.ir.implementation.internal.OperandTag as OperandTag -import experimental.ir.internal.Overlap as Overlap diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/OperandImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/OperandImports.qll deleted file mode 100644 index 65676caf724..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/OperandImports.qll +++ /dev/null @@ -1,5 +0,0 @@ -import experimental.ir.implementation.MemoryAccessKind as MemoryAccessKind -import experimental.ir.implementation.IRType as IRType -import experimental.ir.internal.Overlap as Overlap -import experimental.ir.implementation.internal.OperandTag as OperandTag -import experimental.ir.implementation.internal.TOperand as TOperand diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/OperandInternal.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/OperandInternal.qll deleted file mode 100644 index e522599abe9..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/OperandInternal.qll +++ /dev/null @@ -1,2 +0,0 @@ -private import experimental.ir.implementation.internal.TOperand -import UnaliasedSsaOperands diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintIRImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintIRImports.qll deleted file mode 100644 index 0c5337d57de..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintIRImports.qll +++ /dev/null @@ -1,2 +0,0 @@ -import experimental.ir.IRConfiguration as IRConfiguration -import experimental.ir.internal.IRCSharpLanguageDebug as LanguageDebug diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintSSA.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintSSA.qll deleted file mode 100644 index c7487872512..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/PrintSSA.qll +++ /dev/null @@ -1,157 +0,0 @@ -private import SSAConstructionInternal -private import OldIR -private import Alias -private import SSAConstruction -private import DebugSsa - -bindingset[offset] -private string getKeySuffixForOffset(int offset) { - offset >= 0 and - if offset % 2 = 0 then result = "" else result = "_Chi" -} - -bindingset[offset] -private int getIndexForOffset(int offset) { offset >= 0 and result = offset / 2 } - -/** - * Property provide that dumps the memory access of each result. Useful for debugging SSA - * construction. - */ -class PropertyProvider extends IRPropertyProvider { - override string getInstructionProperty(Instruction instruction, string key) { - key = "ResultMemoryLocation" and - result = - strictconcat(MemoryLocation loc | - loc = getResultMemoryLocation(instruction) - | - loc.toString(), "," - ) - or - key = "ResultVirtualVariable" and - result = - strictconcat(MemoryLocation loc | - loc = getResultMemoryLocation(instruction) - | - loc.getVirtualVariable().toString(), "," - ) - or - key = "OperandMemoryLocation" and - result = - strictconcat(MemoryLocation loc | - loc = getOperandMemoryLocation(instruction.getAnOperand()) - | - loc.toString(), "," - ) - or - key = "OperandVirtualVariable" and - result = - strictconcat(MemoryLocation loc | - loc = getOperandMemoryLocation(instruction.getAnOperand()) - | - loc.getVirtualVariable().toString(), "," - ) - or - exists(MemoryLocation useLocation, IRBlock defBlock, int defRank, int defOffset | - hasDefinitionAtRank(useLocation, _, defBlock, defRank, defOffset) and - defBlock.getInstruction(getIndexForOffset(defOffset)) = instruction and - key = "DefinitionRank" + getKeySuffixForOffset(defOffset) + "[" + useLocation.toString() + "]" and - result = defRank.toString() - ) - or - exists(MemoryLocation useLocation, IRBlock useBlock, int useRank | - hasUseAtRank(useLocation, useBlock, useRank, instruction) and - key = "UseRank[" + useLocation.toString() + "]" and - result = useRank.toString() - ) - or - exists(MemoryLocation useLocation, IRBlock defBlock, int defRank, int defOffset | - hasDefinitionAtRank(useLocation, _, defBlock, defRank, defOffset) and - defBlock.getInstruction(getIndexForOffset(defOffset)) = instruction and - key = - "DefinitionReachesUse" + getKeySuffixForOffset(defOffset) + "[" + useLocation.toString() + - "]" and - result = - strictconcat(IRBlock useBlock, int useRank, int useIndex | - exists(Instruction useInstruction | - hasUseAtRank(useLocation, useBlock, useRank, useInstruction) and - useBlock.getInstruction(useIndex) = useInstruction and - definitionReachesUse(useLocation, defBlock, defRank, useBlock, useRank) - ) - | - useBlock.getDisplayIndex().toString() + "_" + useIndex, ", " - order by - useBlock.getDisplayIndex(), useIndex - ) - ) - } - - override string getBlockProperty(IRBlock block, string key) { - exists(MemoryLocation useLocation, int defRank, int defIndex | - hasDefinitionAtRank(useLocation, _, block, defRank, defIndex) and - defIndex = -1 and - key = "DefinitionRank(Phi)[" + useLocation.toString() + "]" and - result = defRank.toString() - ) - or - exists(MemoryLocation useLocation, MemoryLocation defLocation, int defRank, int defIndex | - hasDefinitionAtRank(useLocation, defLocation, block, defRank, defIndex) and - defIndex = -1 and - key = "DefinitionReachesUse(Phi)[" + useLocation.toString() + "]" and - result = - strictconcat(IRBlock useBlock, int useRank, int useIndex | - exists(Instruction useInstruction | - hasUseAtRank(useLocation, useBlock, useRank, useInstruction) and - useBlock.getInstruction(useIndex) = useInstruction and - definitionReachesUse(useLocation, block, defRank, useBlock, useRank) and - exists(getOverlap(defLocation, useLocation)) - ) - | - useBlock.getDisplayIndex().toString() + "_" + useIndex, ", " - order by - useBlock.getDisplayIndex(), useIndex - ) - ) - or - exists( - MemoryLocation useLocation, IRBlock predBlock, IRBlock defBlock, int defIndex, Overlap overlap - | - hasPhiOperandDefinition(_, useLocation, block, predBlock, defBlock, defIndex) and - key = - "PhiUse[" + useLocation.toString() + " from " + predBlock.getDisplayIndex().toString() + "]" and - result = - defBlock.getDisplayIndex().toString() + "_" + defIndex + " (" + overlap.toString() + ")" - ) - or - key = "LiveOnEntry" and - result = - strictconcat(MemoryLocation useLocation | - locationLiveOnEntryToBlock(useLocation, block) - | - useLocation.toString(), ", " order by useLocation.toString() - ) - or - key = "LiveOnExit" and - result = - strictconcat(MemoryLocation useLocation | - locationLiveOnExitFromBlock(useLocation, block) - | - useLocation.toString(), ", " order by useLocation.toString() - ) - or - key = "DefsLiveOnEntry" and - result = - strictconcat(MemoryLocation defLocation | - definitionLiveOnEntryToBlock(defLocation, block) - | - defLocation.toString(), ", " order by defLocation.toString() - ) - or - key = "DefsLiveOnExit" and - result = - strictconcat(MemoryLocation defLocation | - definitionLiveOnExitFromBlock(defLocation, block) - | - defLocation.toString(), ", " order by defLocation.toString() - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.ql b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.ql deleted file mode 100644 index d4d8e29fb31..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.ql +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @name Unaliased SSA Consistency Check - * @description Performs consistency checks on the SSA construction. This query should have no results. - * @kind table - * @id cs/unaliased-ssa-consistency-check - */ - -import SSAConsistency diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll deleted file mode 100644 index 0fb108f0b56..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.qll +++ /dev/null @@ -1,55 +0,0 @@ -import SsaConsistency -import SSAConsistencyImports - -module SsaConsistency { - /** - * Holds if a `MemoryOperand` has more than one `MemoryLocation` assigned by alias analysis. - */ - query predicate multipleOperandMemoryLocations( - OldIR::MemoryOperand operand, string message, OldIR::IRFunction func, string funcText - ) { - exists(int locationCount | - locationCount = strictcount(Alias::getOperandMemoryLocation(operand)) and - locationCount > 1 and - func = operand.getEnclosingIRFunction() and - funcText = LanguageDebug::getIdentityString(func.getFunction()) and - message = - operand.getUse().toString() + " " + "Operand has " + locationCount.toString() + - " memory accesses in function '$@': " + - strictconcat(Alias::getOperandMemoryLocation(operand).toString(), ", ") - ) - } - - /** - * Holds if a `MemoryLocation` does not have an associated `VirtualVariable`. - */ - query predicate missingVirtualVariableForMemoryLocation( - Alias::MemoryLocation location, string message, OldIR::IRFunction func, string funcText - ) { - not exists(location.getVirtualVariable()) and - func = location.getIRFunction() and - funcText = LanguageDebug::getIdentityString(func.getFunction()) and - message = "Memory location has no virtual variable in function '$@'." - } - - /** - * Holds if a `MemoryLocation` is a member of more than one `VirtualVariable`. - */ - query predicate multipleVirtualVariablesForMemoryLocation( - Alias::MemoryLocation location, string message, OldIR::IRFunction func, string funcText - ) { - exists(int vvarCount | - vvarCount = strictcount(location.getVirtualVariable()) and - vvarCount > 1 and - func = location.getIRFunction() and - funcText = LanguageDebug::getIdentityString(func.getFunction()) and - message = - "Memory location has " + vvarCount.toString() + " virtual variables in function '$@': (" + - concat(Alias::VirtualVariable vvar | - vvar = location.getVirtualVariable() - | - vvar.toString(), ", " - ) + ")." - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistencyImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistencyImports.qll deleted file mode 100644 index 70b803a818e..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConsistencyImports.qll +++ /dev/null @@ -1,3 +0,0 @@ -import experimental.ir.implementation.raw.IR as OldIR -import SimpleSSA as Alias -import experimental.ir.internal.IRCSharpLanguageDebug as LanguageDebug diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll deleted file mode 100644 index 209c42726b7..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll +++ /dev/null @@ -1,1056 +0,0 @@ -import SSAConstructionInternal -private import SSAConstructionImports as Imports -private import Imports::Opcode -private import Imports::OperandTag -private import Imports::Overlap -private import Imports::TInstruction -private import Imports::RawIR as RawIR -private import SsaInstructions -private import SsaOperands -private import NewIR - -private class OldBlock = Reachability::ReachableBlock; - -private class OldInstruction = Reachability::ReachableInstruction; - -import Cached - -cached -private module Cached { - cached - predicate hasPhiInstructionCached( - OldInstruction blockStartInstr, Alias::MemoryLocation defLocation - ) { - exists(OldBlock oldBlock | - definitionHasPhiNode(defLocation, oldBlock) and - blockStartInstr = oldBlock.getFirstInstruction() - ) - } - - cached - predicate hasChiInstructionCached(OldInstruction primaryInstruction) { - hasChiNode(_, primaryInstruction) - } - - cached - predicate hasUnreachedInstructionCached(IRFunction irFunc) { - exists(OldIR::Instruction oldInstruction | - irFunc = oldInstruction.getEnclosingIRFunction() and - ( - Reachability::isInfeasibleInstructionSuccessor(oldInstruction, _) - or - oldInstruction.getOpcode() instanceof Opcode::Unreached - ) - ) - } - - class TStageInstruction = - TRawInstruction or TPhiInstruction or TChiInstruction or TUnreachedInstruction; - - /** - * If `oldInstruction` is a `Phi` instruction that has exactly one reachable predecessor block, - * this predicate returns the `PhiInputOperand` corresponding to that predecessor block. - * Otherwise, this predicate does not hold. - */ - private OldIR::PhiInputOperand getDegeneratePhiOperand(OldInstruction oldInstruction) { - result = - unique(OldIR::PhiInputOperand operand | - operand = oldInstruction.(OldIR::PhiInstruction).getAnInputOperand() and - operand.getPredecessorBlock() instanceof OldBlock - ) - } - - cached - predicate hasInstruction(TStageInstruction instr) { - instr instanceof TRawInstruction and instr instanceof OldInstruction - or - instr = phiInstruction(_, _) - or - instr = reusedPhiInstruction(_) and - // Check that the phi instruction is *not* degenerate, but we can't use - // getDegeneratePhiOperand in the first stage with phi instructions - not exists( - unique(OldIR::PhiInputOperand operand | - operand = instr.(OldIR::PhiInstruction).getAnInputOperand() and - operand.getPredecessorBlock() instanceof OldBlock - ) - ) - or - instr instanceof TChiInstruction - or - instr instanceof TUnreachedInstruction - } - - cached - IRBlock getNewBlock(OldBlock oldBlock) { - exists(Instruction newEnd, OldIR::Instruction oldEnd | - ( - result.getLastInstruction() = newEnd and - not newEnd instanceof ChiInstruction - or - newEnd = result.getLastInstruction().(ChiInstruction).getAPredecessor() // does this work? - ) and - ( - oldBlock.getLastInstruction() = oldEnd and - not oldEnd instanceof OldIR::ChiInstruction - or - oldEnd = oldBlock.getLastInstruction().(OldIR::ChiInstruction).getAPredecessor() // does this work? - ) and - oldEnd = getNewInstruction(newEnd) - ) - } - - /** - * Gets the block from the old IR that corresponds to `newBlock`. - */ - private OldBlock getOldBlock(IRBlock newBlock) { getNewBlock(result) = newBlock } - - /** - * Holds if this iteration of SSA can model the def/use information for the result of - * `oldInstruction`, either because alias analysis has determined a memory location for that - * result, or because a previous iteration of the IR already computed that def/use information - * completely. - */ - private predicate canModelResultForOldInstruction(OldInstruction oldInstruction) { - // We're modeling the result's memory location ourselves. - exists(Alias::getResultMemoryLocation(oldInstruction)) - or - // This result was already modeled by a previous iteration of SSA. - Alias::canReuseSsaForOldResult(oldInstruction) - } - - cached - predicate hasModeledMemoryResult(Instruction instruction) { - canModelResultForOldInstruction(getOldInstruction(instruction)) or - instruction instanceof PhiInstruction or // Phis always have modeled results - instruction instanceof ChiInstruction // Chis always have modeled results - } - - cached - predicate hasConflatedMemoryResult(Instruction instruction) { - instruction instanceof AliasedDefinitionInstruction - or - instruction.getOpcode() instanceof Opcode::InitializeNonLocal - or - // Chi instructions track virtual variables, and therefore a chi instruction is - // conflated if it's associated with the aliased virtual variable. - exists(OldInstruction oldInstruction | instruction = getChi(oldInstruction) | - Alias::getResultMemoryLocation(oldInstruction).getVirtualVariable() instanceof - Alias::AliasedVirtualVariable - ) - or - // Phi instructions track locations, and therefore a phi instruction is - // conflated if it's associated with a conflated location. - exists(Alias::MemoryLocation location | - instruction = getPhi(_, location) and - not exists(location.getAllocation()) - ) - } - - pragma[noopt] - private predicate hasMemoryOperandDefinition( - OldInstruction oldInstruction, OldIR::NonPhiMemoryOperand oldOperand, Overlap overlap, - Instruction instr - ) { - oldOperand = oldInstruction.getAnOperand() and - oldOperand instanceof OldIR::NonPhiMemoryOperand and - exists( - OldBlock useBlock, int useRank, Alias::MemoryLocation useLocation, - Alias::MemoryLocation defLocation, OldBlock defBlock, int defRank, int defOffset, - Alias::MemoryLocation actualDefLocation - | - useLocation = Alias::getOperandMemoryLocation(oldOperand) and - hasUseAtRank(useLocation, useBlock, useRank, oldInstruction) and - definitionReachesUse(useLocation, defBlock, defRank, useBlock, useRank) and - hasDefinitionAtRank(useLocation, defLocation, defBlock, defRank, defOffset) and - instr = getDefinitionOrChiInstruction(defBlock, defOffset, defLocation, actualDefLocation) and - overlap = Alias::getOverlap(actualDefLocation, useLocation) - ) - } - - /** - * Gets the new definition instruction for `oldOperand` based on `oldOperand`'s definition in the - * old IR. Usually, this will just get the old definition of `oldOperand` and map it to the - * corresponding new instruction. However, if the old definition of `oldOperand` is a `Phi` - * instruction that is now degenerate due all but one of its predecessor branches being - * unreachable, this predicate will recurse through any degenerate `Phi` instructions to find the - * true definition. - */ - private Instruction getNewDefinitionFromOldSsa(OldIR::MemoryOperand oldOperand, Overlap overlap) { - exists(Overlap originalOverlap | - originalOverlap = oldOperand.getDefinitionOverlap() and - ( - result = getNewInstruction(oldOperand.getAnyDef()) and - overlap = originalOverlap - or - exists(OldIR::PhiInputOperand phiOperand, Overlap phiOperandOverlap | - phiOperand = getDegeneratePhiOperand(oldOperand.getAnyDef()) and - result = getNewDefinitionFromOldSsa(phiOperand, phiOperandOverlap) and - overlap = - combineOverlap(pragma[only_bind_out](phiOperandOverlap), - pragma[only_bind_out](originalOverlap)) - ) - ) - ) - } - - cached - private Instruction getMemoryOperandDefinition0( - Instruction instruction, MemoryOperandTag tag, Overlap overlap - ) { - exists(OldInstruction oldInstruction, OldIR::NonPhiMemoryOperand oldOperand | - oldInstruction = getOldInstruction(instruction) and - oldOperand = oldInstruction.getAnOperand() and - tag = oldOperand.getOperandTag() and - hasMemoryOperandDefinition(oldInstruction, oldOperand, overlap, result) - ) - or - instruction = getChi(getOldInstruction(result)) and - tag instanceof ChiPartialOperandTag and - overlap instanceof MustExactlyOverlap - or - tag instanceof ChiTotalOperandTag and - result = getChiInstructionTotalOperand(instruction) and - overlap instanceof MustExactlyOverlap - } - - cached - Instruction getMemoryOperandDefinition( - Instruction instruction, MemoryOperandTag tag, Overlap overlap - ) { - // getMemoryOperandDefinition0 currently has a bug where it can match with multiple overlaps. - // This predicate ensures that the chosen overlap is the most conservative if there's any doubt. - result = getMemoryOperandDefinition0(instruction, tag, overlap) and - not ( - overlap instanceof MustExactlyOverlap and - exists(MustTotallyOverlap o | exists(getMemoryOperandDefinition0(instruction, tag, o))) - ) - or - exists(OldIR::NonPhiMemoryOperand oldOperand | - result = getNewDefinitionFromOldSsa(oldOperand, overlap) and - oldOperand.getUse() = instruction and - tag = oldOperand.getOperandTag() - ) - } - - /** - * Holds if `operand` totally overlaps with its definition and consumes the bit range - * `[startBitOffset, endBitOffset)`. - */ - cached - predicate getUsedInterval(NonPhiMemoryOperand operand, int startBitOffset, int endBitOffset) { - exists(Alias::MemoryLocation location, OldIR::NonPhiMemoryOperand oldOperand | - oldOperand = operand.getUse().(OldInstruction).getAnOperand() and - location = Alias::getOperandMemoryLocation(oldOperand) and - startBitOffset = Alias::getStartBitOffset(location) and - endBitOffset = Alias::getEndBitOffset(location) - ) - } - - /** - * Holds if the `ChiPartialOperand` only partially overlaps with the `ChiTotalOperand`. - * This means that the `ChiPartialOperand` will not override the entire memory associated - * with the `ChiTotalOperand`. - */ - cached - predicate chiOnlyPartiallyUpdatesLocation(ChiInstruction chi) { - exists(Alias::MemoryLocation location, OldInstruction oldInstruction | - oldInstruction = getOldInstruction(chi.getPartial()) and - location = Alias::getResultMemoryLocation(oldInstruction) - | - Alias::getStartBitOffset(location) != 0 or - Alias::getEndBitOffset(location) != 8 * location.getType().getByteSize() - ) - } - - /** - * Holds if `instr` is part of a cycle in the operand graph that doesn't go - * through a phi instruction and therefore should be impossible. - * - * For performance reasons, this predicate is not implemented (never holds) - * for the SSA stages of the IR. - */ - cached - predicate isInCycle(Instruction instr) { none() } - - cached - Language::LanguageType getInstructionOperandType(Instruction instr, TypedOperandTag tag) { - exists(OldInstruction oldInstruction, OldIR::TypedOperand oldOperand | - oldInstruction = getOldInstruction(instr) and - oldOperand = oldInstruction.getAnOperand() and - tag = oldOperand.getOperandTag() and - result = oldOperand.getLanguageType() - ) - } - - /** - * Gets the new definition instruction for the operand of `instr` that flows from the block - * `newPredecessorBlock`, based on that operand's definition in the old IR. - */ - private Instruction getNewPhiOperandDefinitionFromOldSsa( - Instruction instr, IRBlock newPredecessorBlock, Overlap overlap - ) { - exists(OldIR::PhiInstruction oldPhi, OldIR::PhiInputOperand oldOperand | - oldPhi = getOldInstruction(instr) and - oldOperand = oldPhi.getInputOperand(getOldBlock(newPredecessorBlock)) and - result = getNewDefinitionFromOldSsa(oldOperand, overlap) - ) - } - - pragma[noopt] - cached - Instruction getPhiOperandDefinition( - Instruction instr, IRBlock newPredecessorBlock, Overlap overlap - ) { - exists( - Alias::MemoryLocation defLocation, Alias::MemoryLocation useLocation, OldBlock phiBlock, - OldBlock predBlock, OldBlock defBlock, int defOffset, Alias::MemoryLocation actualDefLocation - | - hasPhiOperandDefinition(defLocation, useLocation, phiBlock, predBlock, defBlock, defOffset) and - instr = getPhi(phiBlock, useLocation) and - newPredecessorBlock = getNewBlock(predBlock) and - result = getDefinitionOrChiInstruction(defBlock, defOffset, defLocation, actualDefLocation) and - overlap = Alias::getOverlap(actualDefLocation, useLocation) - ) - or - result = getNewPhiOperandDefinitionFromOldSsa(instr, newPredecessorBlock, overlap) - } - - cached - Instruction getChiInstructionTotalOperand(ChiInstruction chiInstr) { - exists( - Alias::VirtualVariable vvar, OldInstruction oldInstr, OldBlock defBlock, int defRank, - int defOffset, OldBlock useBlock, int useRank - | - chiInstr = getChi(oldInstr) and - vvar = Alias::getResultMemoryLocation(oldInstr).getVirtualVariable() and - hasDefinitionAtRank(vvar, _, defBlock, defRank, defOffset) and - hasUseAtRank(vvar, useBlock, useRank, oldInstr) and - definitionReachesUse(vvar, defBlock, defRank, useBlock, useRank) and - result = getDefinitionOrChiInstruction(defBlock, defOffset, vvar, _) - ) - } - - cached - Instruction getPhiInstructionBlockStart(PhiInstruction instr) { - exists(OldBlock oldBlock | - ( - instr = getPhi(oldBlock, _) - or - // Any `Phi` that we propagated from the previous iteration stays in the same block. - getOldInstruction(instr).getBlock() = oldBlock - ) and - result = getNewInstruction(oldBlock.getFirstInstruction()) - ) - } - - /* - * This adds Chi nodes to the instruction successor relation; if an instruction has a Chi node, - * that node is its successor in the new successor relation, and the Chi node's successors are - * the new instructions generated from the successors of the old instruction - */ - - cached - Instruction getInstructionSuccessor(Instruction instruction, EdgeKind kind) { - if hasChiNode(_, getOldInstruction(instruction)) - then - result = getChi(getOldInstruction(instruction)) and - kind instanceof GotoEdge - else - exists(OldInstruction oldInstruction | - ( - oldInstruction = getOldInstruction(instruction) - or - instruction = getChi(oldInstruction) - ) and - ( - if Reachability::isInfeasibleInstructionSuccessor(oldInstruction, kind) - then result = unreachedInstruction(instruction.getEnclosingIRFunction()) - else result = getNewInstruction(oldInstruction.getSuccessor(kind)) - ) - ) - } - - cached - Instruction getInstructionBackEdgeSuccessor(Instruction instruction, EdgeKind kind) { - exists(OldInstruction oldInstruction | - not Reachability::isInfeasibleInstructionSuccessor(oldInstruction, kind) and - // There is only one case for the translation into `result` because the - // SSA construction never inserts extra instructions _before_ an existing - // instruction. - getOldInstruction(result) = oldInstruction.getBackEdgeSuccessor(kind) and - // There are two cases for the translation into `instruction` because the - // SSA construction might have inserted a chi node _after_ - // `oldInstruction`, in which case the back edge should come out of the - // chi node instead. - if hasChiNode(_, oldInstruction) - then instruction = getChi(oldInstruction) - else instruction = getNewInstruction(oldInstruction) - ) - } - - cached - Language::AST getInstructionAst(Instruction instr) { - result = getOldInstruction(instr).getAst() - or - exists(RawIR::Instruction blockStartInstr | - instr = phiInstruction(blockStartInstr, _) and - result = blockStartInstr.getAst() - ) - or - exists(RawIR::Instruction primaryInstr | - instr = chiInstruction(primaryInstr) and - result = primaryInstr.getAst() - ) - or - exists(IRFunctionBase irFunc | - instr = unreachedInstruction(irFunc) and result = irFunc.getFunction() - ) - } - - cached - Language::LanguageType getInstructionResultType(Instruction instr) { - result = instr.(RawIR::Instruction).getResultLanguageType() - or - exists(Alias::MemoryLocation defLocation | - instr = phiInstruction(_, defLocation) and - result = defLocation.getType() - ) - or - exists(Instruction primaryInstr, Alias::VirtualVariable vvar | - instr = chiInstruction(primaryInstr) and - hasChiNode(vvar, primaryInstr) and - result = vvar.getType() - ) - or - instr = reusedPhiInstruction(_) and - result = instr.(OldInstruction).getResultLanguageType() - or - instr = unreachedInstruction(_) and result = Language::getVoidType() - } - - /** - * Holds if `opcode` is the opcode that specifies the operation performed by `instr`. - * - * The parameters are ordered such that they produce a clean join (with no need for reordering) - * in the characteristic predicates of the `Instruction` subclasses. - */ - cached - predicate getInstructionOpcode(Opcode opcode, Instruction instr) { - opcode = getOldInstruction(instr).getOpcode() - or - instr = phiInstruction(_, _) and opcode instanceof Opcode::Phi - or - instr = chiInstruction(_) and opcode instanceof Opcode::Chi - or - instr = unreachedInstruction(_) and opcode instanceof Opcode::Unreached - } - - cached - IRFunctionBase getInstructionEnclosingIRFunction(Instruction instr) { - result = getOldInstruction(instr).getEnclosingIRFunction() - or - exists(OldInstruction blockStartInstr | - instr = phiInstruction(blockStartInstr, _) and - result = blockStartInstr.getEnclosingIRFunction() - ) - or - exists(OldInstruction primaryInstr | - instr = chiInstruction(primaryInstr) and result = primaryInstr.getEnclosingIRFunction() - ) - or - instr = unreachedInstruction(result) - } - - cached - Instruction getPrimaryInstructionForSideEffect(Instruction instruction) { - exists(OldIR::SideEffectInstruction oldInstruction | - oldInstruction = getOldInstruction(instruction) and - result = getNewInstruction(oldInstruction.getPrimaryInstruction()) - ) - or - exists(OldIR::Instruction oldInstruction | - instruction = getChi(oldInstruction) and - result = getNewInstruction(oldInstruction) - ) - } -} - -private Instruction getNewInstruction(OldInstruction instr) { getOldInstruction(result) = instr } - -private OldInstruction getOldInstruction(Instruction instr) { instr = result } - -private ChiInstruction getChi(OldInstruction primaryInstr) { result = chiInstruction(primaryInstr) } - -private PhiInstruction getPhi(OldBlock defBlock, Alias::MemoryLocation defLocation) { - result = phiInstruction(defBlock.getFirstInstruction(), defLocation) -} - -/** - * Holds if instruction `def` needs to have a `Chi` instruction inserted after it, to account for a partial definition - * of a virtual variable. The `Chi` instruction provides a definition of the entire virtual variable of which the - * original definition location is a member. - */ -private predicate hasChiNode(Alias::VirtualVariable vvar, OldInstruction def) { - exists(Alias::MemoryLocation defLocation | - defLocation = Alias::getResultMemoryLocation(def) and - defLocation.getVirtualVariable() = vvar and - // If the definition totally (or exactly) overlaps the virtual variable, then there's no need for a `Chi` - // instruction. - Alias::getOverlap(defLocation, vvar) instanceof MayPartiallyOverlap - ) -} - -private import PhiInsertion - -/** - * Module to handle insertion of `Phi` instructions at the correct blocks. We insert a `Phi` instruction at the - * beginning of a block for a given location when that block is on the dominance frontier of a definition of the - * location and there is a use of that location reachable from that block without an intervening definition of the - * location. - * Within the approach outlined above, we treat a location slightly differently depending on whether or not it is a - * virtual variable. For a virtual variable, we will insert a `Phi` instruction on the dominance frontier if there is - * a use of any member location of that virtual variable that is reachable from the `Phi` instruction. For a location - * that is not a virtual variable, we insert a `Phi` instruction only if there is an exactly-overlapping use of the - * location reachable from the `Phi` instruction. This ensures that we insert a `Phi` instruction for a non-virtual - * variable only if doing so would allow dataflow analysis to get a more precise result than if we just used a `Phi` - * instruction for the virtual variable as a whole. - */ -private module PhiInsertion { - /** - * Holds if `phiBlock` is a block in the dominance frontier of a block that has a definition of the - * memory location `defLocation`. - */ - pragma[noinline] - private predicate dominanceFrontierOfDefinition( - Alias::MemoryLocation defLocation, OldBlock phiBlock - ) { - exists(OldBlock defBlock | - phiBlock = Dominance::getDominanceFrontier(defBlock) and - definitionHasDefinitionInBlock(defLocation, defBlock) - ) - } - - /** - * Holds if a `Phi` instruction needs to be inserted for location `defLocation` at the beginning of block `phiBlock`. - */ - predicate definitionHasPhiNode(Alias::MemoryLocation defLocation, OldBlock phiBlock) { - dominanceFrontierOfDefinition(defLocation, phiBlock) and - /* We can also eliminate those nodes where the definition is not live on any incoming edge */ - definitionLiveOnEntryToBlock(defLocation, phiBlock) - } - - /** - * Holds if the memory location `defLocation` has a definition in block `block`, either because of an existing - * instruction, a `Phi` node, or a `Chi` node. - */ - private predicate definitionHasDefinitionInBlock(Alias::MemoryLocation defLocation, OldBlock block) { - definitionHasPhiNode(defLocation, block) - or - exists(OldInstruction def, Alias::MemoryLocation resultLocation | - def.getBlock() = block and - resultLocation = Alias::getResultMemoryLocation(def) and - ( - defLocation = resultLocation - or - // For a virtual variable, any definition of a member location will either generate a `Chi` node that defines - // the virtual variable, or will totally overlap the virtual variable. Either way, treat this as a definition of - // the virtual variable. - defLocation = resultLocation.getVirtualVariable() - ) - ) - } - - /** - * Holds if there is a use at (`block`, `index`) that could consume the result of a `Phi` instruction for - * `defLocation`. - */ - private predicate definitionHasUse(Alias::MemoryLocation defLocation, OldBlock block, int index) { - exists(OldInstruction use | - block.getInstruction(index) = use and - if defLocation instanceof Alias::VirtualVariable - then ( - exists(Alias::MemoryLocation useLocation | - // For a virtual variable, any use of a location that is a member of the virtual variable counts as a use. - useLocation = Alias::getOperandMemoryLocation(use.getAnOperand()) and - defLocation = useLocation.getVirtualVariable() - ) - or - // A `Chi` instruction consumes the enclosing virtual variable of its use location. - hasChiNode(defLocation, use) - ) else ( - // For other locations, only an exactly-overlapping use of the same location counts as a use. - defLocation = Alias::getOperandMemoryLocation(use.getAnOperand()) and - Alias::getOverlap(defLocation, defLocation) instanceof MustExactlyOverlap - ) - ) - } - - /** - * Holds if the location `defLocation` is redefined at (`block`, `index`). A location is considered "redefined" if - * there is a definition that would prevent a previous definition of `defLocation` from being consumed as the operand - * of a `Phi` node that occurs after the redefinition. - */ - private predicate definitionHasRedefinition( - Alias::MemoryLocation defLocation, OldBlock block, int index - ) { - exists(OldInstruction redef, Alias::MemoryLocation redefLocation | - block.getInstruction(index) = redef and - redefLocation = Alias::getResultMemoryLocation(redef) and - if defLocation instanceof Alias::VirtualVariable - then - // For a virtual variable, the definition may be consumed by any use of a location that is a member of the - // virtual variable. Thus, the definition is live until a subsequent redefinition of the entire virtual - // variable. - exists(Overlap overlap | - overlap = Alias::getOverlap(redefLocation, defLocation) and - not overlap instanceof MayPartiallyOverlap - ) - else - // For other locations, the definition may only be consumed by an exactly-overlapping use of the same location. - // Thus, the definition is live until a subsequent definition of any location that may overlap the original - // definition location. - exists(Alias::getOverlap(redefLocation, defLocation)) - ) - } - - /** - * Holds if the definition `defLocation` is live on entry to block `block`. The definition is live if there is at - * least one use of that definition before any intervening instruction that redefines the definition location. - */ - predicate definitionLiveOnEntryToBlock(Alias::MemoryLocation defLocation, OldBlock block) { - exists(int firstAccess | - definitionHasUse(defLocation, block, firstAccess) and - firstAccess = - min(int index | - definitionHasUse(defLocation, block, index) - or - definitionHasRedefinition(defLocation, block, index) - ) - ) - or - definitionLiveOnExitFromBlock(defLocation, block) and - not definitionHasRedefinition(defLocation, block, _) - } - - /** - * Holds if the definition `defLocation` is live on exit from block `block`. The definition is live on exit if it is - * live on entry to any of the successors of `block`. - */ - pragma[noinline] - predicate definitionLiveOnExitFromBlock(Alias::MemoryLocation defLocation, OldBlock block) { - definitionLiveOnEntryToBlock(defLocation, block.getAFeasibleSuccessor()) - } -} - -private import DefUse - -/** - * Module containing the predicates that connect uses to their reaching definition. The reaching definitions are - * computed separately for each unique use `MemoryLocation`. An instruction is treated as a definition of a use location - * if the defined location overlaps the use location in any way. Thus, a single instruction may serve as a definition - * for multiple use locations, since a single definition location may overlap many use locations. - * - * Definitions and uses are identified by a block and an integer "offset". An offset of -1 indicates the definition - * from a `Phi` instruction at the beginning of the block. An offset of 2*i indicates a definition or use on the - * instruction at index `i` in the block. An offset of 2*i+1 indicates a definition or use on the `Chi` instruction that - * will be inserted immediately after the instruction at index `i` in the block. - * - * For a given use location, each definition and use is also assigned a "rank" within its block. The rank is simply the - * one-based index of that definition or use within the list of definitions and uses of that location within the block, - * ordered by offset. The rank allows the various reachability predicates to be computed more efficiently than they - * would if based solely on offset, since the set of possible ranks is dense while the set of possible offsets is - * potentially very sparse. - */ -module DefUse { - /** - * Gets the `Instruction` for the definition at offset `defOffset` in block `defBlock`. - */ - Instruction getDefinitionOrChiInstruction( - OldBlock defBlock, int defOffset, Alias::MemoryLocation defLocation, - Alias::MemoryLocation actualDefLocation - ) { - exists(OldInstruction oldInstr, int oldOffset | - oldInstr = defBlock.getInstruction(oldOffset) and - oldOffset >= 0 - | - // An odd offset corresponds to the `Chi` instruction. - defOffset = oldOffset * 2 + 1 and - result = getChi(oldInstr) and - ( - defLocation = Alias::getResultMemoryLocation(oldInstr) or - defLocation = Alias::getResultMemoryLocation(oldInstr).getVirtualVariable() - ) and - actualDefLocation = defLocation.getVirtualVariable() - or - // An even offset corresponds to the original instruction. - defOffset = oldOffset * 2 and - result = getNewInstruction(oldInstr) and - ( - defLocation = Alias::getResultMemoryLocation(oldInstr) or - defLocation = Alias::getResultMemoryLocation(oldInstr).getVirtualVariable() - ) and - actualDefLocation = defLocation - ) - or - defOffset = -1 and - hasDefinition(_, defLocation, defBlock, defOffset) and - result = getPhi(defBlock, defLocation) and - actualDefLocation = defLocation - } - - /** - * Gets the rank index of a hypothetical use one instruction past the end of - * the block. This index can be used to determine if a definition reaches the - * end of the block, even if the definition is the last instruction in the - * block. - */ - private int exitRank(Alias::MemoryLocation useLocation, OldBlock block) { - result = max(int rankIndex | defUseRank(useLocation, block, rankIndex, _)) + 1 - } - - /** - * Holds if a definition that overlaps `useLocation` at (`defBlock`, `defRank`) reaches the use of `useLocation` at - * (`useBlock`, `useRank`) without any intervening definitions that overlap `useLocation`, where `defBlock` and - * `useBlock` are the same block. - */ - private predicate definitionReachesUseWithinBlock( - Alias::MemoryLocation useLocation, OldBlock defBlock, int defRank, OldBlock useBlock, - int useRank - ) { - defBlock = useBlock and - hasDefinitionAtRank(useLocation, _, defBlock, defRank, _) and - hasUseAtRank(useLocation, useBlock, useRank, _) and - definitionReachesRank(useLocation, defBlock, defRank, useRank) - } - - /** - * Holds if a definition that overlaps `useLocation` at (`defBlock`, `defRank`) reaches the use of `useLocation` at - * (`useBlock`, `useRank`) without any intervening definitions that overlap `useLocation`. - */ - predicate definitionReachesUse( - Alias::MemoryLocation useLocation, OldBlock defBlock, int defRank, OldBlock useBlock, - int useRank - ) { - hasUseAtRank(useLocation, useBlock, useRank, _) and - ( - definitionReachesUseWithinBlock(useLocation, defBlock, defRank, useBlock, useRank) - or - definitionReachesEndOfBlock(useLocation, defBlock, defRank, useBlock.getAFeasiblePredecessor()) and - not definitionReachesUseWithinBlock(useLocation, useBlock, _, useBlock, useRank) - ) - } - - /** - * Holds if the definition that overlaps `useLocation` at `(block, defRank)` reaches the rank - * index `reachesRank` in block `block`. - */ - private predicate definitionReachesRank( - Alias::MemoryLocation useLocation, OldBlock block, int defRank, int reachesRank - ) { - // The def always reaches the next use, even if there is also a def on the - // use instruction. - hasDefinitionAtRank(useLocation, _, block, defRank, _) and - reachesRank = defRank + 1 - or - // If the def reached the previous rank, it also reaches the current rank, - // unless there was another def at the previous rank. - exists(int prevRank | - reachesRank = prevRank + 1 and - definitionReachesRank(useLocation, block, defRank, prevRank) and - not prevRank = exitRank(useLocation, block) and - not hasDefinitionAtRank(useLocation, _, block, prevRank, _) - ) - } - - /** - * Holds if the definition that overlaps `useLocation` at `(defBlock, defRank)` reaches the end of - * block `block` without any intervening definitions that overlap `useLocation`. - */ - predicate definitionReachesEndOfBlock( - Alias::MemoryLocation useLocation, OldBlock defBlock, int defRank, OldBlock block - ) { - hasDefinitionAtRank(useLocation, _, defBlock, defRank, _) and - ( - // If we're looking at the def's own block, just see if it reaches the exit - // rank of the block. - block = defBlock and - locationLiveOnExitFromBlock(useLocation, defBlock) and - definitionReachesRank(useLocation, defBlock, defRank, exitRank(useLocation, defBlock)) - or - exists(OldBlock idom | - definitionReachesEndOfBlock(useLocation, defBlock, defRank, idom) and - noDefinitionsSinceIDominator(useLocation, idom, block) - ) - ) - } - - pragma[noinline] - private predicate noDefinitionsSinceIDominator( - Alias::MemoryLocation useLocation, OldBlock idom, OldBlock block - ) { - Dominance::blockImmediatelyDominates(idom, block) and // It is sufficient to traverse the dominator graph, cf. discussion above. - locationLiveOnExitFromBlock(useLocation, block) and - not hasDefinition(useLocation, _, block, _) - } - - /** - * Holds if the specified `useLocation` is live on entry to `block`. This holds if there is a use of `useLocation` - * that is reachable from the start of `block` without passing through a definition that overlaps `useLocation`. - * Note that even a partially-overlapping definition blocks liveness, because such a definition will insert a `Chi` - * instruction whose result totally overlaps the location. - */ - predicate locationLiveOnEntryToBlock(Alias::MemoryLocation useLocation, OldBlock block) { - definitionHasPhiNode(useLocation, block) - or - exists(int firstAccess | - hasUse(useLocation, block, firstAccess, _) and - firstAccess = - min(int offset | - hasUse(useLocation, block, offset, _) - or - hasNonPhiDefinition(useLocation, _, block, offset) - ) - ) - or - locationLiveOnExitFromBlock(useLocation, block) and - not hasNonPhiDefinition(useLocation, _, block, _) - } - - /** - * Holds if the specified `useLocation` is live on exit from `block`. - */ - pragma[noinline] - predicate locationLiveOnExitFromBlock(Alias::MemoryLocation useLocation, OldBlock block) { - locationLiveOnEntryToBlock(useLocation, block.getAFeasibleSuccessor()) - } - - /** - * Holds if there is a definition at offset `offset` in block `block` that overlaps memory location `useLocation`. - * This predicate does not include definitions for Phi nodes. - */ - private predicate hasNonPhiDefinition( - Alias::MemoryLocation useLocation, Alias::MemoryLocation defLocation, OldBlock block, int offset - ) { - exists(OldInstruction def, Overlap overlap, int index | - defLocation = Alias::getResultMemoryLocation(def) and - block.getInstruction(index) = def and - overlap = Alias::getOverlap(defLocation, useLocation) and - if overlap instanceof MayPartiallyOverlap - then offset = (index * 2) + 1 // The use will be connected to the definition on the `Chi` instruction. - else offset = index * 2 // The use will be connected to the definition on the original instruction. - ) - } - - /** - * Holds if there is a definition at offset `offset` in block `block` that overlaps memory location `useLocation`. - * This predicate includes definitions for Phi nodes (at offset -1). - */ - private predicate hasDefinition( - Alias::MemoryLocation useLocation, Alias::MemoryLocation defLocation, OldBlock block, int offset - ) { - ( - // If there is a Phi node for the use location itself, treat that as a definition at offset -1. - offset = -1 and - if definitionHasPhiNode(useLocation, block) - then defLocation = useLocation - else ( - definitionHasPhiNode(defLocation, block) and - defLocation = useLocation.getVirtualVariable() and - // Handle the unusual case where a virtual variable does not overlap one of its member - // locations. For example, a definition of the virtual variable representing all aliased - // memory does not overlap a use of a string literal, because the contents of a string - // literal can never be redefined. The string literal's location could still be a member of - // the `AliasedVirtualVariable` due to something like: - // ``` - // char s[10]; - // strcpy(s, p); - // const char* p = b ? "SomeLiteral" : s; - // return p[3]; - // ``` - // In the above example, `p[3]` may access either the string literal or the local variable - // `s`, so both of those locations must be members of the `AliasedVirtualVariable`. - exists(Alias::getOverlap(defLocation, useLocation)) - ) - ) - or - hasNonPhiDefinition(useLocation, defLocation, block, offset) - } - - /** - * Holds if there is a definition at offset `offset` in block `block` that overlaps memory location `useLocation`. - * `rankIndex` is the rank of the definition as computed by `defUseRank()`. - */ - predicate hasDefinitionAtRank( - Alias::MemoryLocation useLocation, Alias::MemoryLocation defLocation, OldBlock block, - int rankIndex, int offset - ) { - hasDefinition(useLocation, defLocation, block, offset) and - defUseRank(useLocation, block, rankIndex, offset) - } - - /** - * Holds if there is a use of `useLocation` on instruction `use` at offset `offset` in block `block`. - */ - private predicate hasUse( - Alias::MemoryLocation useLocation, OldBlock block, int offset, OldInstruction use - ) { - exists(int index | - block.getInstruction(index) = use and - ( - // A direct use of the location. - useLocation = Alias::getOperandMemoryLocation(use.getAnOperand()) and offset = index * 2 - or - // A `Chi` instruction will include a use of the virtual variable. - hasChiNode(useLocation, use) and offset = (index * 2) + 1 - ) - ) - } - - /** - * Holds if there is a use of memory location `useLocation` on instruction `use` in block `block`. `rankIndex` is the - * rank of the use use as computed by `defUseRank`. - */ - predicate hasUseAtRank( - Alias::MemoryLocation useLocation, OldBlock block, int rankIndex, OldInstruction use - ) { - exists(int offset | - hasUse(useLocation, block, offset, use) and - defUseRank(useLocation, block, rankIndex, offset) - ) - } - - /** - * Holds if there is a definition at offset `offset` in block `block` that overlaps memory location `useLocation`, or - * a use of `useLocation` at offset `offset` in block `block`. `rankIndex` is the sequence number of the definition - * or use within `block`, counting only uses of `useLocation` and definitions that overlap `useLocation`. - */ - private predicate defUseRank( - Alias::MemoryLocation useLocation, OldBlock block, int rankIndex, int offset - ) { - offset = - rank[rankIndex](int j | - hasDefinition(useLocation, _, block, j) or hasUse(useLocation, block, j, _) - ) - } - - /** - * Holds if the `Phi` instruction for location `useLocation` at the beginning of block `phiBlock` has an operand along - * the incoming edge from `predBlock`, where that operand's definition is at offset `defOffset` in block `defBlock`. - */ - pragma[noopt] - predicate hasPhiOperandDefinition( - Alias::MemoryLocation defLocation, Alias::MemoryLocation useLocation, OldBlock phiBlock, - OldBlock predBlock, OldBlock defBlock, int defOffset - ) { - exists(int defRank | - definitionHasPhiNode(useLocation, phiBlock) and - predBlock = phiBlock.getAFeasiblePredecessor() and - definitionReachesEndOfBlock(useLocation, defBlock, defRank, predBlock) and - hasDefinitionAtRank(useLocation, defLocation, defBlock, defRank, defOffset) and - exists(Alias::getOverlap(defLocation, useLocation)) - ) - } -} - -predicate canReuseSsaForMemoryResult(Instruction instruction) { - exists(OldInstruction oldInstruction | - oldInstruction = getOldInstruction(instruction) and - ( - // The previous iteration said it was reusable, so we should mark it as reusable as well. - Alias::canReuseSsaForOldResult(oldInstruction) - or - // The current alias analysis says it is reusable. - Alias::getResultMemoryLocation(oldInstruction).canReuseSsa() - ) - ) - or - exists(Alias::MemoryLocation defLocation | - // This is a `Phi` for a reusable location, so the result of the `Phi` is reusable as well. - instruction = phiInstruction(_, defLocation) and - defLocation.canReuseSsa() - ) - // We don't support reusing SSA for any location that could create a `Chi` instruction. -} - -/** - * Expose some of the internal predicates to PrintSSA.qll. We do this by publicly importing those modules in the - * `DebugSsa` module, which is then imported by PrintSSA. - */ -module DebugSsa { - import PhiInsertion - import DefUse -} - -import CachedForDebugging - -cached -private module CachedForDebugging { - cached - string getTempVariableUniqueId(IRTempVariable var) { - result = getOldTempVariable(var).getUniqueId() - } - - cached - string getInstructionUniqueId(Instruction instr) { - exists(OldInstruction oldInstr | - oldInstr = getOldInstruction(instr) and - result = "NonSSA: " + oldInstr.getUniqueId() - ) - or - exists(Alias::MemoryLocation location, OldBlock phiBlock, string specificity | - instr = getPhi(phiBlock, location) and - result = - "Phi Block(" + phiBlock.getFirstInstruction().getUniqueId() + ")[" + specificity + "]: " + - location.getUniqueId() and - if location instanceof Alias::VirtualVariable - then - // Sort Phi nodes for virtual variables before Phi nodes for member locations. - specificity = "g" - else specificity = "s" - ) - or - instr = unreachedInstruction(_) and - result = "Unreached" - } - - private OldIR::IRTempVariable getOldTempVariable(IRTempVariable var) { - result.getEnclosingFunction() = var.getEnclosingFunction() and - result.getAst() = var.getAst() and - result.getTag() = var.getTag() - } - - cached - predicate instructionHasSortKeys(Instruction instr, int key1, int key2) { - exists(OldInstruction oldInstr | - oldInstr = getOldInstruction(instr) and - oldInstr.hasSortKeys(key1, key2) - ) - or - instr instanceof TUnreachedInstruction and - key1 = maxValue() and - key2 = maxValue() - } - - /** - * Returns the value of the maximum representable integer. - */ - cached - int maxValue() { result = 2147483647 } -} - -/** - * Provides the portion of the parameterized IR interface that is used to construct the SSA stages - * of the IR. The raw stage of the IR does not expose these predicates. - * These predicates are all just aliases for predicates defined in the `Cached` module. This ensures - * that all of SSA construction will be evaluated in the same stage. - */ -module Ssa { - class MemoryLocation = Alias::MemoryLocation; - - predicate hasPhiInstruction = Cached::hasPhiInstructionCached/2; - - predicate hasChiInstruction = Cached::hasChiInstructionCached/1; - - predicate hasUnreachedInstruction = Cached::hasUnreachedInstructionCached/1; -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstructionImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstructionImports.qll deleted file mode 100644 index bf9b18d0b17..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstructionImports.qll +++ /dev/null @@ -1,5 +0,0 @@ -import experimental.ir.implementation.Opcode as Opcode -import experimental.ir.implementation.internal.OperandTag as OperandTag -import experimental.ir.internal.Overlap as Overlap -import experimental.ir.implementation.internal.TInstruction as TInstruction -import experimental.ir.implementation.raw.IR as RawIR diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstructionInternal.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstructionInternal.qll deleted file mode 100644 index cad1a3dd2de..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstructionInternal.qll +++ /dev/null @@ -1,9 +0,0 @@ -import experimental.ir.implementation.raw.IR as OldIR -import experimental.ir.implementation.raw.internal.reachability.ReachableBlock as Reachability -import experimental.ir.implementation.raw.internal.reachability.Dominance as Dominance -import experimental.ir.implementation.unaliased_ssa.IR as NewIR -import experimental.ir.implementation.raw.internal.IRConstruction as RawStage -import experimental.ir.implementation.internal.TInstruction::UnaliasedSsaInstructions as SsaInstructions -import experimental.ir.internal.IRCSharpLanguage as Language -import SimpleSSA as Alias -import experimental.ir.implementation.internal.TOperand::UnaliasedSsaOperands as SsaOperands diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll deleted file mode 100644 index 5c33ecf5f99..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll +++ /dev/null @@ -1,111 +0,0 @@ -import AliasAnalysis -private import SimpleSSAImports -import SimpleSSAPublicImports -private import AliasConfiguration - -private predicate isTotalAccess(Allocation var, AddressOperand addrOperand, IRType type) { - exists(Instruction constantBase, int bitOffset | - addressOperandBaseAndConstantOffset(addrOperand, constantBase, bitOffset) and - bitOffset = 0 and - constantBase = var.getABaseInstruction() and - type = var.getIRType() - ) -} - -/** - * Holds if the specified variable should be modeled in SSA form. For unaliased SSA, we only model a - * variable if its address never escapes and all reads and writes of that variable access the entire - * variable using the original type of the variable. - */ -predicate isVariableModeled(Allocation var) { - not allocationEscapes(var) and - forall(Instruction instr, AddressOperand addrOperand, IRType type | - addrOperand = instr.getResultAddressOperand() and - type = instr.getResultIRType() and - var = getAddressOperandAllocation(addrOperand) - | - isTotalAccess(var, addrOperand, type) and not instr.hasResultMayMemoryAccess() - ) and - forall(MemoryOperand memOperand, AddressOperand addrOperand, IRType type | - addrOperand = memOperand.getAddressOperand() and - type = memOperand.getIRType() and - var = getAddressOperandAllocation(addrOperand) - | - isTotalAccess(var, addrOperand, type) and not memOperand.hasMayReadMemoryAccess() - ) -} - -/** - * Holds if the SSA use/def chain for the specified variable can be safely reused by later - * iterations of SSA construction. This will hold only if we modeled the variable soundly, so that - * subsequent iterations will recompute SSA for any variable that we assumed did not escape, but - * actually would have escaped if we had used a sound escape analysis. - */ -predicate canReuseSsaForVariable(IRAutomaticVariable var) { - isVariableModeled(var) and - not allocationEscapes(var) -} - -private newtype TMemoryLocation = MkMemoryLocation(Allocation var) { isVariableModeled(var) } - -private MemoryLocation getMemoryLocation(Allocation var) { result.getAllocation() = var } - -class MemoryLocation extends TMemoryLocation { - Allocation var; - - MemoryLocation() { this = MkMemoryLocation(var) } - - final string toString() { result = var.getAllocationString() } - - final Allocation getAllocation() { result = var } - - final Language::Location getLocation() { result = var.getLocation() } - - final IRFunction getIRFunction() { result = var.getEnclosingIRFunction() } - - final VirtualVariable getVirtualVariable() { result = this } - - final Language::LanguageType getType() { result = var.getLanguageType() } - - final string getUniqueId() { result = var.getUniqueId() } - - final predicate canReuseSsa() { canReuseSsaForVariable(var) } - - /** DEPRECATED: Alias for canReuseSsa */ - deprecated predicate canReuseSSA() { this.canReuseSsa() } -} - -predicate canReuseSsaForOldResult(Instruction instr) { none() } - -/** - * Represents a set of `MemoryLocation`s that cannot overlap with - * `MemoryLocation`s outside of the set. The `VirtualVariable` will be - * represented by a `MemoryLocation` that totally overlaps all other - * `MemoryLocations` in the set. - */ -class VirtualVariable extends MemoryLocation { } - -/** A virtual variable that groups all escaped memory within a function. */ -class AliasedVirtualVariable extends VirtualVariable { - AliasedVirtualVariable() { none() } -} - -Overlap getOverlap(MemoryLocation def, MemoryLocation use) { - def = use and result instanceof MustExactlyOverlap - or - none() // Avoid compiler error in SSAConstruction -} - -MemoryLocation getResultMemoryLocation(Instruction instr) { - result = getMemoryLocation(getAddressOperandAllocation(instr.getResultAddressOperand())) -} - -MemoryLocation getOperandMemoryLocation(MemoryOperand operand) { - result = getMemoryLocation(getAddressOperandAllocation(operand.getAddressOperand())) -} - -/** Gets the start bit offset of a `MemoryLocation`, if any. */ -int getStartBitOffset(MemoryLocation location) { none() } - -/** Gets the end bit offset of a `MemoryLocation`, if any. */ -int getEndBitOffset(MemoryLocation location) { none() } diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSAImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSAImports.qll deleted file mode 100644 index 80a1c7c36fd..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSAImports.qll +++ /dev/null @@ -1,4 +0,0 @@ -import experimental.ir.implementation.raw.IR -import experimental.ir.internal.IntegerConstant as Ints -import experimental.ir.implementation.internal.OperandTag -import experimental.ir.internal.IRCSharpLanguage as Language diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSAPublicImports.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSAPublicImports.qll deleted file mode 100644 index 047d4923039..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SimpleSSAPublicImports.qll +++ /dev/null @@ -1 +0,0 @@ -import experimental.ir.internal.Overlap diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/Dominance.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/Dominance.qll deleted file mode 100644 index cddc3e23d7e..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/Dominance.qll +++ /dev/null @@ -1,22 +0,0 @@ -private import DominanceInternal - -predicate blockImmediatelyDominates(Graph::Block dominator, Graph::Block block) = - idominance(Graph::isEntryBlock/1, Graph::blockSuccessor/2)(_, dominator, block) - -predicate blockStrictlyDominates(Graph::Block dominator, Graph::Block block) { - blockImmediatelyDominates+(dominator, block) -} - -predicate blockDominates(Graph::Block dominator, Graph::Block block) { - blockStrictlyDominates(dominator, block) or dominator = block -} - -Graph::Block getDominanceFrontier(Graph::Block dominator) { - Graph::blockSuccessor(dominator, result) and - not blockImmediatelyDominates(dominator, result) - or - exists(Graph::Block prev | result = getDominanceFrontier(prev) | - blockImmediatelyDominates(dominator, prev) and - not blockImmediatelyDominates(dominator, result) - ) -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll deleted file mode 100644 index aaa4cc7bd53..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/DominanceInternal.qll +++ /dev/null @@ -1,7 +0,0 @@ -private import ReachableBlock as Reachability - -module Graph { - import Reachability::Graph - - class Block = Reachability::ReachableBlock; -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/PrintDominance.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/PrintDominance.qll deleted file mode 100644 index f26565bc278..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/PrintDominance.qll +++ /dev/null @@ -1,22 +0,0 @@ -private import DominanceInternal -private import ReachableBlockInternal -private import Dominance -import IR - -private class DominancePropertyProvider extends IRPropertyProvider { - override string getBlockProperty(IRBlock block, string key) { - exists(IRBlock dominator | - blockImmediatelyDominates(dominator, block) and - key = "ImmediateDominator" and - result = "Block " + dominator.getDisplayIndex().toString() - ) - or - key = "DominanceFrontier" and - result = - strictconcat(IRBlock frontierBlock | - frontierBlock = getDominanceFrontier(block) - | - frontierBlock.getDisplayIndex().toString(), ", " order by frontierBlock.getDisplayIndex() - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/PrintReachableBlock.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/PrintReachableBlock.qll deleted file mode 100644 index 6befad72336..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/PrintReachableBlock.qll +++ /dev/null @@ -1,17 +0,0 @@ -private import ReachableBlockInternal -private import ReachableBlock -import IR - -private class ReachableBlockPropertyProvider extends IRPropertyProvider { - override string getBlockProperty(IRBlock block, string key) { - not block instanceof ReachableBlock and - key = "Unreachable" and - result = "true" - or - exists(EdgeKind kind | - isInfeasibleEdge(block, kind) and - key = "Infeasible(" + kind.toString() + ")" and - result = "true" - ) - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/ReachableBlock.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/ReachableBlock.qll deleted file mode 100644 index 25a53bbefe8..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/ReachableBlock.qll +++ /dev/null @@ -1,53 +0,0 @@ -private import ReachableBlockInternal -private import IR -private import ConstantAnalysis - -predicate isInfeasibleInstructionSuccessor(Instruction instr, EdgeKind kind) { - exists(int conditionValue | - conditionValue = getConstantValue(instr.(ConditionalBranchInstruction).getCondition()) and - if conditionValue = 0 then kind instanceof TrueEdge else kind instanceof FalseEdge - ) -} - -pragma[noinline] -predicate isInfeasibleEdge(IRBlockBase block, EdgeKind kind) { - isInfeasibleInstructionSuccessor(block.getLastInstruction(), kind) -} - -private IRBlock getAFeasiblePredecessorBlock(IRBlock successor) { - exists(EdgeKind kind | - result.getSuccessor(kind) = successor and - not isInfeasibleEdge(result, kind) - ) -} - -private predicate isBlockReachable(IRBlock block) { - exists(IRFunction f | getAFeasiblePredecessorBlock*(block) = f.getEntryBlock()) -} - -/** - * An IR block that is reachable from the entry block of the function, considering only feasible - * edges. - */ -class ReachableBlock extends IRBlockBase { - ReachableBlock() { isBlockReachable(this) } - - final ReachableBlock getAFeasiblePredecessor() { result = getAFeasiblePredecessorBlock(this) } - - final ReachableBlock getAFeasibleSuccessor() { this = getAFeasiblePredecessorBlock(result) } -} - -/** - * An instruction that is contained in a reachable block. - */ -class ReachableInstruction extends Instruction { - ReachableInstruction() { this.getBlock() instanceof ReachableBlock } -} - -module Graph { - predicate isEntryBlock(ReachableBlock block) { exists(IRFunction f | block = f.getEntryBlock()) } - - predicate blockSuccessor(ReachableBlock pred, ReachableBlock succ) { - succ = pred.getAFeasibleSuccessor() - } -} diff --git a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/ReachableBlockInternal.qll b/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/ReachableBlockInternal.qll deleted file mode 100644 index e435289cbfc..00000000000 --- a/csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/reachability/ReachableBlockInternal.qll +++ /dev/null @@ -1,2 +0,0 @@ -import experimental.ir.implementation.unaliased_ssa.IR as IR -import experimental.ir.implementation.unaliased_ssa.constant.ConstantAnalysis as ConstantAnalysis diff --git a/csharp/ql/src/experimental/ir/internal/CSharpType.qll b/csharp/ql/src/experimental/ir/internal/CSharpType.qll deleted file mode 100644 index 1cf87b8fbbb..00000000000 --- a/csharp/ql/src/experimental/ir/internal/CSharpType.qll +++ /dev/null @@ -1,365 +0,0 @@ -private import csharp -private import experimental.ir.implementation.IRType -private import IRCSharpLanguage as Language - -int getTypeSize(Type type) { - // REVIEW: Is this complete? - result = type.(SimpleType).getSize() - or - result = getTypeSize(type.(Enum).getUnderlyingType()) - or - // TODO: Generate a reasonable size - type instanceof Struct and result = 16 - or - type instanceof RefType and result = getPointerSize() - or - type instanceof PointerType and result = getPointerSize() - or - result = getTypeSize(type.(TupleType).getUnderlyingType()) - or - // TODO: Add room for extra field - result = getTypeSize(type.(NullableType).getUnderlyingType()) - or - type instanceof VoidType and result = 0 -} - -int getPointerSize() { result = 8 } - -/** - * Holds if an `IRErrorType` should exist. - */ -predicate hasErrorType() { exists(UnknownType t) } - -/** - * Holds if an `IRBooleanType` with the specified `byteSize` should exist. - */ -predicate hasBooleanType(int byteSize) { byteSize = getTypeSize(any(BoolType type)) } - -private predicate isSignedIntegerType(ValueType type) { - type instanceof SignedIntegralType or - type.(Enum).getUnderlyingType() instanceof SignedIntegralType -} - -private predicate isUnsignedIntegerType(ValueType type) { - type instanceof UnsignedIntegralType or - type instanceof CharType or - type.(Enum).getUnderlyingType() instanceof UnsignedIntegralType -} - -/** - * Holds if an `IRSignedIntegerType` with the specified `byteSize` should exist. - */ -predicate hasSignedIntegerType(int byteSize) { - byteSize = getTypeSize(any(ValueType type | isSignedIntegerType(type))) -} - -/** - * Holds if an `IRUnsignedIntegerType` with the specified `byteSize` should exist. - */ -predicate hasUnsignedIntegerType(int byteSize) { - byteSize = getTypeSize(any(ValueType type | isUnsignedIntegerType(type))) -} - -/** - * Holds if an `IRFloatingPointType` with the specified size, base, and type domain should exist. - */ -predicate hasFloatingPointType(int byteSize, int base, Language::TypeDomain domain) { - byteSize = any(FloatingPointType type).getSize() and - base = 2 and - domain instanceof Language::RealDomain -} - -private predicate isPointerIshType(Type type) { - type instanceof PointerType or - type instanceof RefType -} - -/** - * Holds if an `IRAddressType` with the specified `byteSize` should exist. - */ -predicate hasAddressType(int byteSize) { - // This covers all pointers, all references, and because it also looks at `NullType`, it - // should always return a result that makes sense for arbitrary glvalues as well. - byteSize = getTypeSize(any(Type type | isPointerIshType(type))) -} - -/** - * Holds if an `IRFunctionAddressType` with the specified `byteSize` should exist. - */ -predicate hasFunctionAddressType(int byteSize) { byteSize = getTypeSize(any(NullType type)) } - -private predicate isOpaqueType(ValueOrRefType type) { - type instanceof Struct or - type instanceof NullableType or - type instanceof DecimalType -} - -/** - * Holds if an `IROpaqueType` with the specified `tag` and `byteSize` should exist. - */ -predicate hasOpaqueType(Type tag, int byteSize) { - isOpaqueType(tag) and byteSize = getTypeSize(tag) -} - -private Type getRepresentationType(Type type) { - result = type.(Enum).getUnderlyingType() - or - result = type.(TupleType).getUnderlyingType() - or - not type instanceof Enum and not type instanceof TupleType and result = type -} - -/** - * Gets the `IRType` that represents a prvalue of the specified `Type`. - */ -private IRType getIRTypeForPRValue(Type type) { - exists(Type repType | repType = getRepresentationType(type) | - exists(IROpaqueType opaqueType | opaqueType = result | - opaqueType.getByteSize() = getTypeSize(repType) and - opaqueType.getTag() = repType - ) - or - result.(IRBooleanType).getByteSize() = repType.(BoolType).getSize() - or - isSignedIntegerType(repType) and - result.(IRSignedIntegerType).getByteSize() = getTypeSize(repType) - or - isUnsignedIntegerType(repType) and - result.(IRUnsignedIntegerType).getByteSize() = getTypeSize(repType) - or - result.(IRFloatingPointType).getByteSize() = repType.(FloatingPointType).getSize() - or - isPointerIshType(repType) and result.(IRAddressType).getByteSize() = getTypeSize(repType) - or - repType instanceof VoidType and result instanceof IRVoidType - or - repType instanceof UnknownType and result instanceof IRErrorType - ) -} - -string getOpaqueTagIdentityString(Type tag) { result = tag.getFullyQualifiedName() } - -cached -private newtype TCSharpType = - TPRValueType(Type type) { exists(getIRTypeForPRValue(type)) } or - TGLValueAddressType(Type type) { any() } or - TFunctionAddressType() or - TUnknownType() - -class CSharpType extends TCSharpType { - abstract string toString(); - - /** Gets a string used in IR dumps */ - string getDumpString() { result = this.toString() } - - /** Gets the size of the type in bytes, if known. */ - final int getByteSize() { result = this.getIRType().getByteSize() } - - /** - * Gets the `IRType` that represents this `CSharpType`. Many different `CSharpType`s can map to a - * single `IRType`. - */ - cached - abstract IRType getIRType(); - - /** - * Holds if the `CSharpType` represents a prvalue of type `Type` (if `isGLValue` is `false`), or - * if it represents a glvalue of type `Type` (if `isGLValue` is `true`). - */ - abstract predicate hasType(Type type, boolean isGLValue); - - final predicate hasUnspecifiedType(Type type, boolean isGLValue) { this.hasType(type, isGLValue) } -} - -/** - * A `CSharpType` that wraps an existing `Type` (either as a prvalue or a glvalue). - */ -private class CSharpWrappedType extends CSharpType { - Type cstype; - - CSharpWrappedType() { - this = TPRValueType(cstype) or - this = TGLValueAddressType(cstype) - } - - abstract override string toString(); - - abstract override IRType getIRType(); - - abstract override predicate hasType(Type type, boolean isGLValue); -} - -/** - * A `CSharpType` that represents a prvalue of an existing `Type`. - */ -private class CSharpPRValueType extends CSharpWrappedType, TPRValueType { - final override string toString() { result = cstype.toString() } - - final override IRType getIRType() { result = getIRTypeForPRValue(cstype) } - - final override predicate hasType(Type type, boolean isGLValue) { - type = cstype and - isGLValue = false - } -} - -/** - * A `CSharpType` that represents a glvalue of an existing `Type`. - */ -private class CSharpGLValueAddressType extends CSharpWrappedType, TGLValueAddressType { - final override string toString() { result = "glval<" + cstype.toString() + ">" } - - final override IRAddressType getIRType() { result.getByteSize() = getPointerSize() } - - final override predicate hasType(Type type, boolean isGLValue) { - type = cstype and - isGLValue = true - } -} - -/** - * A `CSharpType` that represents a function address. - */ -private class CSharpFunctionAddressType extends CSharpType, TFunctionAddressType { - final override string toString() { result = "" } - - final override IRFunctionAddressType getIRType() { result.getByteSize() = getPointerSize() } - - final override predicate hasType(Type type, boolean isGLValue) { - type instanceof VoidType and isGLValue = true - } -} - -/** - * A `CSharpType` that represents an unknown type. - */ -private class CSharpUnknownType extends CSharpType, TUnknownType { - final override string toString() { result = "" } - - final override IRUnknownType getIRType() { any() } - - final override predicate hasType(Type type, boolean isGLValue) { - type instanceof VoidType and isGLValue = false - } -} - -/** - * Gets the single instance of `CSharpUnknownType`. - */ -CSharpUnknownType getUnknownType() { any() } - -/** - * Gets the `CSharpType` that represents a prvalue of type `void`. - */ -CSharpPRValueType getVoidType() { exists(VoidType voidType | result.hasType(voidType, false)) } - -/** - * Gets the `CSharpType` that represents a prvalue of type `type`. - */ -CSharpPRValueType getTypeForPRValue(Type type) { result.hasType(type, false) } - -/** - * Gets the `CSharpType` that represents a glvalue of type `type`. - */ -CSharpGLValueAddressType getTypeForGLValue(Type type) { result.hasType(type, true) } - -/** - * Gets the `CSharpType` that represents a prvalue of type `int`. - */ -CSharpPRValueType getIntType() { result.hasType(any(IntType t), false) } - -/** - * Gets the `CSharpType` that represents a prvalue of type `bool`. - */ -CSharpPRValueType getBoolType() { result.hasType(any(BoolType t), false) } - -/** - * Gets the `CSharpType` that represents a prvalue of `NullType`. - */ -CSharpPRValueType getNullType() { result.hasType(any(NullType t), false) } - -/** - * Gets the `CSharpType` that represents a function address. - */ -CSharpFunctionAddressType getFunctionAddressType() { any() } - -/** - * Gets the `CSharpType` that is the canonical type for an `IRBooleanType` with the specified - * `byteSize`. - */ -CSharpPRValueType getCanonicalBooleanType(int byteSize) { - exists(BoolType type | result = TPRValueType(type) and byteSize = type.getSize()) -} - -/** - * Gets the `CSharpType` that is the canonical type for an `IRSignedIntegerType` with the specified - * `byteSize`. - */ -CSharpPRValueType getCanonicalSignedIntegerType(int byteSize) { - result = TPRValueType(any(SignedIntegralType t | t.getSize() = byteSize)) -} - -/** - * Gets the `CSharpType` that is the canonical type for an `IRUnsignedIntegerType` with the specified - * `byteSize`. - */ -CSharpPRValueType getCanonicalUnsignedIntegerType(int byteSize) { - result = TPRValueType(any(UnsignedIntegralType t | t.getSize() = byteSize)) -} - -/** - * Gets the `CSharpType` that is the canonical type for an `IRFloatingPointType` with the specified - * size, base, and type domain. - */ -CSharpPRValueType getCanonicalFloatingPointType(int byteSize, int base, Language::TypeDomain domain) { - base = 2 and - domain instanceof Language::RealDomain and - result = TPRValueType(any(FloatingPointType type | type.getSize() = byteSize)) -} - -/** - * Gets the `CSharpType` that is the canonical type for an `IRAddressType` with the specified - * `byteSize`. - */ -CSharpPRValueType getCanonicalAddressType(int byteSize) { - // We just use `NullType`, since it should be unique. - result = TPRValueType(any(NullType type | getTypeSize(type) = byteSize)) -} - -/** - * Gets the `CSharpType` that is the canonical type for an `IRFunctionAddressType` with the specified - * `byteSize`. - */ -CSharpFunctionAddressType getCanonicalFunctionAddressType(int byteSize) { - result.getByteSize() = byteSize -} - -/** - * Gets the `CSharpType` that is the canonical type for `IRErrorType`. - */ -CSharpPRValueType getCanonicalErrorType() { result = TPRValueType(any(UnknownType type)) } - -/** - * Gets the `CSharpType` that is the canonical type for `IRUnknownType`. - */ -CSharpUnknownType getCanonicalUnknownType() { any() } - -/** - * Gets the `CSharpType` that is the canonical type for `IRVoidType`. - */ -CSharpPRValueType getCanonicalVoidType() { result = TPRValueType(any(VoidType type)) } - -/** - * Gets the `CSharpType` that is the canonical type for an `IROpaqueType` with the specified `tag` and - * `byteSize`. - */ -CSharpPRValueType getCanonicalOpaqueType(Type tag, int byteSize) { - isOpaqueType(tag) and - result = TPRValueType(tag) and - getTypeSize(tag) = byteSize -} - -module LanguageTypeConsistency { - // Nothing interesting here for C# yet, but the module still has to exist because it is imported - // by `IRTypeConsistency`. -} diff --git a/csharp/ql/src/experimental/ir/internal/IRCSharpLanguage.qll b/csharp/ql/src/experimental/ir/internal/IRCSharpLanguage.qll deleted file mode 100644 index f0137b9b5ce..00000000000 --- a/csharp/ql/src/experimental/ir/internal/IRCSharpLanguage.qll +++ /dev/null @@ -1,162 +0,0 @@ -private import csharp as CSharp -private import IRUtilities -import CSharpType - -class LanguageType = CSharpType; - -class OpaqueTypeTag = CSharp::ValueOrRefType; - -class Function = CSharp::Callable; - -class GlobalVariable extends CSharp::Field { - GlobalVariable() { this.isStatic() } -} - -class Declaration = CSharp::Declaration; - -class Location = CSharp::Location; - -class UnknownLocation = CSharp::EmptyLocation; - -class UnknownDefaultLocation = CSharp::EmptyLocation; - -class File = CSharp::File; - -class AST = CSharp::Element; - -class Type = CSharp::Type; - -class UnknownType = CSharp::NullType; - -class VoidType = CSharp::VoidType; - -class IntegralType = CSharp::IntegralType; - -class FloatingPointType = CSharp::FloatingPointType; - -private newtype TTypeDomain = TRealDomain() - -/** - * The type domain of a floating-point type. One of `RealDomain`, `ComplexDomain`, or - * `ImaginaryDomain`. - */ -class TypeDomain extends TTypeDomain { - /** Gets a textual representation of this type domain. */ - string toString() { none() } -} - -/** - * The type domain of a floating-point type that represents a real number. - */ -class RealDomain extends TypeDomain, TRealDomain { - final override string toString() { result = "real" } -} - -/** - * The type domain of a floating-point type that represents a complex number. Not currently used in - * C#. - */ -class ComplexDomain extends TypeDomain { - ComplexDomain() { none() } - - final override string toString() { result = "complex" } -} - -/** - * The type domain of a floating-point type that represents an imaginary number. Not currently used - * in C#. - */ -class ImaginaryDomain extends TypeDomain { - ImaginaryDomain() { none() } - - final override string toString() { result = "imaginary" } -} - -private newtype TClassDerivation = - // Note that this is the `Class` type exported from this module, not CSharp::Class. - MkClassDerivation(Class base, Class derived) { derived.getABaseType() = base } - -private newtype TBuiltInOperation = NoOp() - -class BuiltInOperation extends TBuiltInOperation { - string toString() { result = "BuiltInOp" } -} - -class ClassDerivation extends MkClassDerivation { - Class baseClass; - Class derivedClass; - - ClassDerivation() { this = MkClassDerivation(baseClass, derivedClass) } - - string toString() { result = "ClassDerivation" } - - final Class getBaseClass() { result = baseClass } - - final Class getDerivedClass() { result = derivedClass } - - final int getByteOffset() { - // Inheritance never requires adjusting the `this` pointer in C#. - result = 0 - } -} - -class StringLiteral = CSharp::StringLiteral; - -class Variable = CSharp::Variable; - -class AutomaticVariable = CSharp::LocalScopeVariable; - -class StaticVariable = CSharp::Variable; - -class Parameter = CSharp::Parameter; - -class Field = CSharp::Field; - -// TODO: Remove necessity for these. -class Expr = CSharp::Expr; - -class Class = CSharp::ValueOrRefType; // Used for inheritance conversions - -predicate hasCaseEdge(string minValue, string maxValue) { - // TODO: Need to handle pattern matching - hasCaseEdge(_, minValue, maxValue) -} - -predicate hasPositionalArgIndex(int argIndex) { - exists(CSharp::MethodCall call | exists(call.getArgument(argIndex))) - or - // Quick fix so that generated calls (`Invoke` etc) will have the - // correct number of parameters; it is an overestimation, - // since we don't care about all the callables, so it - // should be restricted more - argIndex in [0 .. any(CSharp::Callable c).getNumberOfParameters() - 1] -} - -predicate hasAsmOperandIndex(int operandIndex) { none() } - -predicate isVariableAutomatic(Variable var) { var instanceof CSharp::LocalScopeVariable } - -string getStringLiteralText(StringLiteral s) { - // REVIEW: Is this the right escaping? - result = s.toString() -} - -predicate hasPotentialLoop(Function f) { - exists(CSharp::LoopStmt l | l.getEnclosingCallable() = f) or - exists(CSharp::GotoStmt s | s.getEnclosingCallable() = f) -} - -predicate hasGoto(Function f) { exists(CSharp::GotoStmt s | s.getEnclosingCallable() = f) } - -/** - * Gets the offset of field `field` in bits. - */ -int getFieldBitOffset(Field f) { - //REVIEW: Implement this once layout has been synthesized. - none() -} - -/** - * Holds if the specified `Function` can be overridden in a derived class. - */ -predicate isFunctionVirtual(Function f) { f.(CSharp::Overridable).isOverridableOrImplementable() } diff --git a/csharp/ql/src/experimental/ir/internal/IRCSharpLanguageDebug.qll b/csharp/ql/src/experimental/ir/internal/IRCSharpLanguageDebug.qll deleted file mode 100644 index 3ee0328dd90..00000000000 --- a/csharp/ql/src/experimental/ir/internal/IRCSharpLanguageDebug.qll +++ /dev/null @@ -1,5 +0,0 @@ -private import csharp as CSharp - -class Function = CSharp::Callable; - -string getIdentityString(Function func) { result = func.getLabel() } diff --git a/csharp/ql/src/experimental/ir/internal/IRGuards.qll b/csharp/ql/src/experimental/ir/internal/IRGuards.qll deleted file mode 100644 index 91e2208c6f7..00000000000 --- a/csharp/ql/src/experimental/ir/internal/IRGuards.qll +++ /dev/null @@ -1,670 +0,0 @@ -import csharp -import semmle.code.csharp.controlflow.BasicBlocks -import experimental.ir.IR - -/** - * Holds if `block` consists of an `UnreachedInstruction`. - * - * We avoiding reporting an unreached block as being controlled by a guard. The unreached block - * has the AST for the `Function` itself, which tends to confuse mapping between the AST `BasicBlock` - * and the `IRBlock`. - */ -private predicate isUnreachedBlock(IRBlock block) { - block.getFirstInstruction() instanceof UnreachedInstruction -} - -/** - * A Boolean condition in the AST that guards one or more basic blocks. This includes - * operands of logical operators but not switch statements. - */ -cached -class GuardCondition extends Expr { - cached - GuardCondition() { - exists(IRGuardCondition ir | this = ir.getUnconvertedResultExpression()) - or - // no binary operators in the IR - this.(BinaryLogicalOperation).getAnOperand() instanceof GuardCondition - or - // the IR short-circuits if(!x) - // don't produce a guard condition for `y = !x` and other non-short-circuited cases - not exists(Instruction inst | this = inst.getAst()) and - exists(IRGuardCondition ir | this.(LogicalNotExpr).getOperand() = ir.getAst()) - } - - /** - * Holds if this condition controls `block`, meaning that `block` is only - * entered if the value of this condition is `testIsTrue`. - * - * Illustration: - * - * ``` - * [ (testIsTrue) ] - * [ this ----------------succ ---- controlled ] - * [ | | ] - * [ (testIsFalse) | ------ ... ] - * [ other ] - * ``` - * - * The predicate holds if all paths to `controlled` go via the `testIsTrue` - * edge of the control-flow graph. In other words, the `testIsTrue` edge - * must dominate `controlled`. This means that `controlled` must be - * dominated by both `this` and `succ` (the target of the `testIsTrue` - * edge). It also means that any other edge into `succ` must be a back-edge - * from a node which is dominated by `succ`. - * - * The short-circuit boolean operations have slightly surprising behavior - * here: because the operation itself only dominates one branch (due to - * being short-circuited) then it will only control blocks dominated by the - * true (for `&&`) or false (for `||`) branch. - */ - cached - predicate controls(BasicBlock controlled, boolean testIsTrue) { none() } - - /** Holds if (determined by this guard) `left < right + k` evaluates to `isLessThan` if this expression evaluates to `testIsTrue`. */ - cached - predicate comparesLt(Expr left, Expr right, int k, boolean isLessThan, boolean testIsTrue) { - none() - } - - /** - * Holds if (determined by this guard) `left < right + k` must be `isLessThan` in `block`. - * If `isLessThan = false` then this implies `left >= right + k`. - */ - cached - predicate ensuresLt(Expr left, Expr right, int k, BasicBlock block, boolean isLessThan) { none() } - - /** Holds if (determined by this guard) `left == right + k` evaluates to `areEqual` if this expression evaluates to `testIsTrue`. */ - cached - predicate comparesEq(Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue) { - none() - } - - /** - * Holds if (determined by this guard) `left == right + k` must be `areEqual` in `block`. - * If `areEqual = false` then this implies `left != right + k`. - */ - cached - predicate ensuresEq(Expr left, Expr right, int k, BasicBlock block, boolean areEqual) { none() } -} - -/** - * Holds if the truth of the binary logical expression `blo` having value `wholeIsTrue` - * implies that the truth of the child expression `part` has truth value `partIsTrue`. - * - * For example if the binary operation: - * ```csharp - * x && y - * ``` - * is true, `x` and `y` must also be true, so `impliesValue(x, true, true)` and - * `impliesValue(y, true, true)` hold. - */ -private predicate impliesValue( - BinaryLogicalOperation blo, Expr part, boolean partIsTrue, boolean wholeIsTrue -) { - blo instanceof LogicalAndExpr and - ( - wholeIsTrue = true and partIsTrue = true and part = blo.getAnOperand() - or - wholeIsTrue = true and - impliesValue(blo.getAnOperand(), part, partIsTrue, true) - ) - or - blo instanceof LogicalOrExpr and - ( - wholeIsTrue = false and partIsTrue = false and part = blo.getAnOperand() - or - wholeIsTrue = false and - impliesValue(blo.getAnOperand(), part, partIsTrue, false) - ) -} - -/** - * A binary logical operator in the AST that guards one or more basic blocks. - */ -private class GuardConditionFromBinaryLogicalOperator extends GuardCondition { - GuardConditionFromBinaryLogicalOperator() { - this.(BinaryLogicalOperation).getAnOperand() instanceof GuardCondition - } - - override predicate controls(BasicBlock controlled, boolean testIsTrue) { - exists(BinaryLogicalOperation binop, GuardCondition lhs, GuardCondition rhs | - this = binop and - lhs = binop.getLeftOperand() and - rhs = binop.getRightOperand() and - lhs.controls(controlled, testIsTrue) and - rhs.controls(controlled, testIsTrue) - ) - } - - override predicate comparesLt(Expr left, Expr right, int k, boolean isLessThan, boolean testIsTrue) { - exists(boolean partIsTrue, GuardCondition part | - impliesValue(this, part, partIsTrue, testIsTrue) - | - part.comparesLt(left, right, k, isLessThan, partIsTrue) - ) - } - - override predicate ensuresLt(Expr left, Expr right, int k, BasicBlock block, boolean isLessThan) { - exists(boolean testIsTrue | - this.comparesLt(left, right, k, isLessThan, testIsTrue) and this.controls(block, testIsTrue) - ) - } - - override predicate comparesEq(Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue) { - exists(boolean partIsTrue, GuardCondition part | - impliesValue(this, part, partIsTrue, testIsTrue) - | - part.comparesEq(left, right, k, areEqual, partIsTrue) - ) - } - - override predicate ensuresEq(Expr left, Expr right, int k, BasicBlock block, boolean areEqual) { - exists(boolean testIsTrue | - this.comparesEq(left, right, k, areEqual, testIsTrue) and this.controls(block, testIsTrue) - ) - } -} - -/** - * A `!` operator in the AST that guards one or more basic blocks, and does not have a corresponding - * IR instruction. - */ -private class GuardConditionFromShortCircuitNot extends GuardCondition, LogicalNotExpr { - GuardConditionFromShortCircuitNot() { - not exists(Instruction inst | this = inst.getAst()) and - exists(IRGuardCondition ir | this.getOperand() = ir.getAst()) - } - - override predicate controls(BasicBlock controlled, boolean testIsTrue) { - this.getOperand().(GuardCondition).controls(controlled, testIsTrue.booleanNot()) - } - - override predicate comparesLt(Expr left, Expr right, int k, boolean isLessThan, boolean testIsTrue) { - this.getOperand() - .(GuardCondition) - .comparesLt(left, right, k, isLessThan, testIsTrue.booleanNot()) - } - - override predicate ensuresLt(Expr left, Expr right, int k, BasicBlock block, boolean isLessThan) { - this.getOperand().(GuardCondition).ensuresLt(left, right, k, block, isLessThan.booleanNot()) - } - - override predicate comparesEq(Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue) { - this.getOperand().(GuardCondition).comparesEq(left, right, k, areEqual, testIsTrue.booleanNot()) - } - - override predicate ensuresEq(Expr left, Expr right, int k, BasicBlock block, boolean areEqual) { - this.getOperand().(GuardCondition).ensuresEq(left, right, k, block, areEqual.booleanNot()) - } -} - -/** - * A Boolean condition in the AST that guards one or more basic blocks and has a corresponding IR - * instruction. - */ -private class GuardConditionFromIR extends GuardCondition { - IRGuardCondition ir; - - GuardConditionFromIR() { this = ir.getUnconvertedResultExpression() } - - override predicate controls(BasicBlock controlled, boolean testIsTrue) { - // This condition must determine the flow of control; that is, this - // node must be a top-level condition. - this.controlsBlock1(controlled, testIsTrue) - } - - /** Holds if (determined by this guard) `left < right + k` evaluates to `isLessThan` if this expression evaluates to `testIsTrue`. */ - override predicate comparesLt(Expr left, Expr right, int k, boolean isLessThan, boolean testIsTrue) { - exists(Instruction li, Instruction ri | - li.getUnconvertedResultExpression() = left and - ri.getUnconvertedResultExpression() = right and - ir.comparesLt(li.getAUse(), ri.getAUse(), k, isLessThan, testIsTrue) - ) - } - - /** - * Holds if (determined by this guard) `left < right + k` must be `isLessThan` in `block`. - * If `isLessThan = false` then this implies `left >= right + k`. - */ - override predicate ensuresLt(Expr left, Expr right, int k, BasicBlock block, boolean isLessThan) { - exists(Instruction li, Instruction ri, boolean testIsTrue | - li.getUnconvertedResultExpression() = left and - ri.getUnconvertedResultExpression() = right and - ir.comparesLt(li.getAUse(), ri.getAUse(), k, isLessThan, testIsTrue) and - this.controls(block, testIsTrue) - ) - } - - /** Holds if (determined by this guard) `left == right + k` evaluates to `areEqual` if this expression evaluates to `testIsTrue`. */ - override predicate comparesEq(Expr left, Expr right, int k, boolean areEqual, boolean testIsTrue) { - exists(Instruction li, Instruction ri | - li.getUnconvertedResultExpression() = left and - ri.getUnconvertedResultExpression() = right and - ir.comparesEq(li.getAUse(), ri.getAUse(), k, areEqual, testIsTrue) - ) - } - - /** - * Holds if (determined by this guard) `left == right + k` must be `areEqual` in `block`. - * If `areEqual = false` then this implies `left != right + k`. - */ - override predicate ensuresEq(Expr left, Expr right, int k, BasicBlock block, boolean areEqual) { - exists(Instruction li, Instruction ri, boolean testIsTrue | - li.getUnconvertedResultExpression() = left and - ri.getUnconvertedResultExpression() = right and - ir.comparesEq(li.getAUse(), ri.getAUse(), k, areEqual, testIsTrue) and - this.controls(block, testIsTrue) - ) - } - - /** - * Holds if this condition controls `block`, meaning that `block` is only - * entered if the value of this condition is `testIsTrue`. This helper - * predicate does not necessarily hold for binary logical operations like - * `&&` and `||`. See the detailed explanation on predicate `controls`. - */ - private predicate controlsBlock1(BasicBlock controlled, boolean testIsTrue) { - exists(IRBlock irb | - forex(IRGuardCondition inst | inst = ir | inst.controls(irb, testIsTrue)) and - irb.getAnInstruction().getAst().(ControlFlowElement).getAControlFlowNode().getBasicBlock() = - controlled and - not isUnreachedBlock(irb) - ) - } -} - -/** - * A Boolean condition in the IR that guards one or more basic blocks. This includes - * operands of logical operators but not switch statements. Note that `&&` and `||` - * don't have an explicit representation in the IR, and therefore will not appear as - * IRGuardConditions. - */ -cached -class IRGuardCondition extends Instruction { - ConditionalBranchInstruction branch; - - cached - IRGuardCondition() { branch = get_branch_for_condition(this) } - - /** - * Holds if this condition controls `block`, meaning that `block` is only - * entered if the value of this condition is `testIsTrue`. - * - * Illustration: - * - * ``` - * [ (testIsTrue) ] - * [ this ----------------succ ---- controlled ] - * [ | | ] - * [ (testIsFalse) | ------ ... ] - * [ other ] - * ``` - * - * The predicate holds if all paths to `controlled` go via the `testIsTrue` - * edge of the control-flow graph. In other words, the `testIsTrue` edge - * must dominate `controlled`. This means that `controlled` must be - * dominated by both `this` and `succ` (the target of the `testIsTrue` - * edge). It also means that any other edge into `succ` must be a back-edge - * from a node which is dominated by `succ`. - * - * The short-circuit boolean operations have slightly surprising behavior - * here: because the operation itself only dominates one branch (due to - * being short-circuited) then it will only control blocks dominated by the - * true (for `&&`) or false (for `||`) branch. - */ - cached - predicate controls(IRBlock controlled, boolean testIsTrue) { - // This condition must determine the flow of control; that is, this - // node must be a top-level condition. - this.controlsBlock(controlled, testIsTrue) - or - exists(IRGuardCondition ne | - this = ne.(LogicalNotInstruction).getUnary() and - ne.controls(controlled, testIsTrue.booleanNot()) - ) - } - - cached - predicate controlsEdge(IRBlock pred, IRBlock succ, boolean testIsTrue) { - pred.getASuccessor() = succ and - this.controls(pred, testIsTrue) - or - this.hasBranchEdge(succ, testIsTrue) and - branch.getCondition() = this and - branch.getBlock() = pred - } - - /** - * Holds if `branch` jumps directly to `succ` when this condition is `testIsTrue`. - * - * This predicate is intended to help with situations in which an inference can only be made - * based on an edge between a block with multiple successors and a block with multiple - * predecessors. For example, in the following situation, an inference can be made about the - * value of `x` at the end of the `if` statement, but there is no block which is controlled by - * the `if` statement when `x >= y`. - * ```csharp - * if (x < y) { - * x = y; - * } - * return x; - * ``` - */ - private predicate hasBranchEdge(IRBlock succ, boolean testIsTrue) { - branch.getCondition() = this and - ( - testIsTrue = true and - succ.getFirstInstruction() = branch.getTrueSuccessor() - or - testIsTrue = false and - succ.getFirstInstruction() = branch.getFalseSuccessor() - ) - } - - /** Holds if (determined by this guard) `left < right + k` evaluates to `isLessThan` if this expression evaluates to `testIsTrue`. */ - cached - predicate comparesLt(Operand left, Operand right, int k, boolean isLessThan, boolean testIsTrue) { - compares_lt(this, left, right, k, isLessThan, testIsTrue) - } - - /** - * Holds if (determined by this guard) `left < right + k` must be `isLessThan` in `block`. - * If `isLessThan = false` then this implies `left >= right + k`. - */ - cached - predicate ensuresLt(Operand left, Operand right, int k, IRBlock block, boolean isLessThan) { - exists(boolean testIsTrue | - compares_lt(this, left, right, k, isLessThan, testIsTrue) and this.controls(block, testIsTrue) - ) - } - - /** - * Holds if (determined by this guard) `left < right + k` must be `isLessThan` on the edge from - * `pred` to `succ`. If `isLessThan = false` then this implies `left >= right + k`. - */ - cached - predicate ensuresLtEdge( - Operand left, Operand right, int k, IRBlock pred, IRBlock succ, boolean isLessThan - ) { - exists(boolean testIsTrue | - compares_lt(this, left, right, k, isLessThan, testIsTrue) and - this.controlsEdge(pred, succ, testIsTrue) - ) - } - - /** Holds if (determined by this guard) `left == right + k` evaluates to `areEqual` if this expression evaluates to `testIsTrue`. */ - cached - predicate comparesEq(Operand left, Operand right, int k, boolean areEqual, boolean testIsTrue) { - compares_eq(this, left, right, k, areEqual, testIsTrue) - } - - /** - * Holds if (determined by this guard) `left == right + k` must be `areEqual` in `block`. - * If `areEqual = false` then this implies `left != right + k`. - */ - cached - predicate ensuresEq(Operand left, Operand right, int k, IRBlock block, boolean areEqual) { - exists(boolean testIsTrue | - compares_eq(this, left, right, k, areEqual, testIsTrue) and this.controls(block, testIsTrue) - ) - } - - /** - * Holds if (determined by this guard) `left == right + k` must be `areEqual` on the edge from - * `pred` to `succ`. If `areEqual = false` then this implies `left != right + k`. - */ - cached - predicate ensuresEqEdge( - Operand left, Operand right, int k, IRBlock pred, IRBlock succ, boolean areEqual - ) { - exists(boolean testIsTrue | - compares_eq(this, left, right, k, areEqual, testIsTrue) and - this.controlsEdge(pred, succ, testIsTrue) - ) - } - - /** - * Holds if this condition controls `block`, meaning that `block` is only - * entered if the value of this condition is `testIsTrue`. This helper - * predicate does not necessarily hold for binary logical operations like - * `&&` and `||`. See the detailed explanation on predicate `controls`. - */ - private predicate controlsBlock(IRBlock controlled, boolean testIsTrue) { - not isUnreachedBlock(controlled) and - exists(IRBlock branchBlock | branchBlock.getAnInstruction() = branch | - exists(IRBlock succ | - testIsTrue = true and succ.getFirstInstruction() = branch.getTrueSuccessor() - or - testIsTrue = false and succ.getFirstInstruction() = branch.getFalseSuccessor() - | - branch.getCondition() = this and - succ.dominates(controlled) and - forall(IRBlock pred | pred.getASuccessor() = succ | - pred = branchBlock or succ.dominates(pred) or not pred.isReachableFromFunctionEntry() - ) - ) - ) - } -} - -private ConditionalBranchInstruction get_branch_for_condition(Instruction guard) { - result.getCondition() = guard - or - exists(LogicalNotInstruction cond | - result = get_branch_for_condition(cond) and cond.getUnary() = guard - ) -} - -/** - * Holds if `left == right + k` is `areEqual` given that test is `testIsTrue`. - * - * Beware making mistaken logical implications here relating `areEqual` and `testIsTrue`. - */ -private predicate compares_eq( - Instruction test, Operand left, Operand right, int k, boolean areEqual, boolean testIsTrue -) { - /* The simple case where the test *is* the comparison so areEqual = testIsTrue xor eq. */ - exists(boolean eq | simple_comparison_eq(test, left, right, k, eq) | - areEqual = true and testIsTrue = eq - or - areEqual = false and testIsTrue = eq.booleanNot() - ) - or - // I think this is handled by forwarding in controlsBlock. - //or - //logical_comparison_eq(test, left, right, k, areEqual, testIsTrue) - /* a == b + k => b == a - k */ - exists(int mk | k = -mk | compares_eq(test, right, left, mk, areEqual, testIsTrue)) - or - complex_eq(test, left, right, k, areEqual, testIsTrue) - or - /* (x is true => (left == right + k)) => (!x is false => (left == right + k)) */ - exists(boolean isFalse | testIsTrue = isFalse.booleanNot() | - compares_eq(test.(LogicalNotInstruction).getUnary(), left, right, k, areEqual, isFalse) - ) -} - -/** Rearrange various simple comparisons into `left == right + k` form. */ -private predicate simple_comparison_eq( - CompareInstruction cmp, Operand left, Operand right, int k, boolean areEqual -) { - left = cmp.getLeftOperand() and - cmp instanceof CompareEQInstruction and - right = cmp.getRightOperand() and - k = 0 and - areEqual = true - or - left = cmp.getLeftOperand() and - cmp instanceof CompareNEInstruction and - right = cmp.getRightOperand() and - k = 0 and - areEqual = false -} - -private predicate complex_eq( - CompareInstruction cmp, Operand left, Operand right, int k, boolean areEqual, boolean testIsTrue -) { - sub_eq(cmp, left, right, k, areEqual, testIsTrue) - or - add_eq(cmp, left, right, k, areEqual, testIsTrue) -} - -/* - * Simplification of inequality expressions - * Simplify conditions in the source to the canonical form l < r + k. - */ - -/** Holds if `left < right + k` evaluates to `isLt` given that test is `testIsTrue`. */ -private predicate compares_lt( - Instruction test, Operand left, Operand right, int k, boolean isLt, boolean testIsTrue -) { - /* In the simple case, the test is the comparison, so isLt = testIsTrue */ - simple_comparison_lt(test, left, right, k) and isLt = true and testIsTrue = true - or - simple_comparison_lt(test, left, right, k) and isLt = false and testIsTrue = false - or - complex_lt(test, left, right, k, isLt, testIsTrue) - or - /* (not (left < right + k)) => (left >= right + k) */ - exists(boolean isGe | isLt = isGe.booleanNot() | - compares_ge(test, left, right, k, isGe, testIsTrue) - ) - or - /* (x is true => (left < right + k)) => (!x is false => (left < right + k)) */ - exists(boolean isFalse | testIsTrue = isFalse.booleanNot() | - compares_lt(test.(LogicalNotInstruction).getUnary(), left, right, k, isLt, isFalse) - ) -} - -/** `(a < b + k) => (b > a - k) => (b >= a + (1-k))` */ -private predicate compares_ge( - Instruction test, Operand left, Operand right, int k, boolean isGe, boolean testIsTrue -) { - exists(int onemk | k = 1 - onemk | compares_lt(test, right, left, onemk, isGe, testIsTrue)) -} - -/** Rearrange various simple comparisons into `left < right + k` form. */ -private predicate simple_comparison_lt(CompareInstruction cmp, Operand left, Operand right, int k) { - left = cmp.getLeftOperand() and - cmp instanceof CompareLTInstruction and - right = cmp.getRightOperand() and - k = 0 - or - left = cmp.getLeftOperand() and - cmp instanceof CompareLEInstruction and - right = cmp.getRightOperand() and - k = 1 - or - right = cmp.getLeftOperand() and - cmp instanceof CompareGTInstruction and - left = cmp.getRightOperand() and - k = 0 - or - right = cmp.getLeftOperand() and - cmp instanceof CompareGEInstruction and - left = cmp.getRightOperand() and - k = 1 -} - -private predicate complex_lt( - CompareInstruction cmp, Operand left, Operand right, int k, boolean isLt, boolean testIsTrue -) { - sub_lt(cmp, left, right, k, isLt, testIsTrue) - or - add_lt(cmp, left, right, k, isLt, testIsTrue) -} - -// left - x < right + c => left < right + (c+x) -// left < (right - x) + c => left < right + (c-x) -private predicate sub_lt( - CompareInstruction cmp, Operand left, Operand right, int k, boolean isLt, boolean testIsTrue -) { - exists(SubInstruction lhs, int c, int x | - compares_lt(cmp, lhs.getAUse(), right, c, isLt, testIsTrue) and - left = lhs.getLeftOperand() and - x = int_value(lhs.getRight()) and - k = c + x - ) - or - exists(SubInstruction rhs, int c, int x | - compares_lt(cmp, left, rhs.getAUse(), c, isLt, testIsTrue) and - right = rhs.getLeftOperand() and - x = int_value(rhs.getRight()) and - k = c - x - ) -} - -// left + x < right + c => left < right + (c-x) -// left < (right + x) + c => left < right + (c+x) -private predicate add_lt( - CompareInstruction cmp, Operand left, Operand right, int k, boolean isLt, boolean testIsTrue -) { - exists(AddInstruction lhs, int c, int x | - compares_lt(cmp, lhs.getAUse(), right, c, isLt, testIsTrue) and - ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) - or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) - or - exists(AddInstruction rhs, int c, int x | - compares_lt(cmp, left, rhs.getAUse(), c, isLt, testIsTrue) and - ( - right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) - or - right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) - ) and - k = c + x - ) -} - -// left - x == right + c => left == right + (c+x) -// left == (right - x) + c => left == right + (c-x) -private predicate sub_eq( - CompareInstruction cmp, Operand left, Operand right, int k, boolean areEqual, boolean testIsTrue -) { - exists(SubInstruction lhs, int c, int x | - compares_eq(cmp, lhs.getAUse(), right, c, areEqual, testIsTrue) and - left = lhs.getLeftOperand() and - x = int_value(lhs.getRight()) and - k = c + x - ) - or - exists(SubInstruction rhs, int c, int x | - compares_eq(cmp, left, rhs.getAUse(), c, areEqual, testIsTrue) and - right = rhs.getLeftOperand() and - x = int_value(rhs.getRight()) and - k = c - x - ) -} - -// left + x == right + c => left == right + (c-x) -// left == (right + x) + c => left == right + (c+x) -private predicate add_eq( - CompareInstruction cmp, Operand left, Operand right, int k, boolean areEqual, boolean testIsTrue -) { - exists(AddInstruction lhs, int c, int x | - compares_eq(cmp, lhs.getAUse(), right, c, areEqual, testIsTrue) and - ( - left = lhs.getLeftOperand() and x = int_value(lhs.getRight()) - or - left = lhs.getRightOperand() and x = int_value(lhs.getLeft()) - ) and - k = c - x - ) - or - exists(AddInstruction rhs, int c, int x | - compares_eq(cmp, left, rhs.getAUse(), c, areEqual, testIsTrue) and - ( - right = rhs.getLeftOperand() and x = int_value(rhs.getRight()) - or - right = rhs.getRightOperand() and x = int_value(rhs.getLeft()) - ) and - k = c + x - ) -} - -/** The int value of integer constant expression. */ -private int int_value(Instruction i) { result = i.(IntegerConstantInstruction).getValue().toInt() } diff --git a/csharp/ql/src/experimental/ir/internal/IRUtilities.qll b/csharp/ql/src/experimental/ir/internal/IRUtilities.qll deleted file mode 100644 index 1aeace91377..00000000000 --- a/csharp/ql/src/experimental/ir/internal/IRUtilities.qll +++ /dev/null @@ -1,16 +0,0 @@ -private import csharp - -/** - * Get the actual type of the specified variable, as opposed to the declared - * type. - */ -Type getVariableType(Variable v) { - // C# doesn't seem to have any cases where the variable's actual type differs - // from its declared type. - result = v.getType() -} - -predicate hasCaseEdge(CaseStmt caseStmt, string minValue, string maxValue) { - minValue = caseStmt.getPattern().getValue() and - maxValue = minValue -} diff --git a/csharp/ql/src/experimental/ir/internal/IntegerConstant.qll b/csharp/ql/src/experimental/ir/internal/IntegerConstant.qll deleted file mode 100644 index 4af31745ab2..00000000000 --- a/csharp/ql/src/experimental/ir/internal/IntegerConstant.qll +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Provides predicates for manipulating integer constants that are tracked by constant folding and - * similar analyses. - */ - -/** - * An alias used to represent the constant value of an integer, if one can be determined. If no - * single constant value can be determined, or if the constant value is out of the representable - * range, it will be represented as the special value `unknown()`. This allows `IntValue` to be used - * in contexts where there must always be a value for the `IntValue`, even if no constant value is - * known. - */ -class IntValue = int; - -/** - * Returns the value of the maximum representable integer. - */ -int maxValue() { result = 2147483647 } - -/** - * Returns the value of the minimum representable integer. - */ -int minValue() { result = -2147483647 } - -/** - * Returns a value representing an unknown integer. - */ -IntValue unknown() { result = -2147483648 } - -/** - * Holds if `n` has a known value. - */ -bindingset[n] -predicate hasValue(IntValue n) { n != unknown() } - -/** - * Returns a string representation of `n`. If `n` does not have a known value, the result is "??". - */ -bindingset[n] -string intValueToString(IntValue n) { if hasValue(n) then result = n.toString() else result = "??" } - -/** - * Holds if the value `f` is within the range of representable integers. - */ -bindingset[f] -pragma[inline] -private predicate isRepresentable(float f) { f >= minValue() and f <= maxValue() } - -/** - * Gets the value of `n`. Holds only if `n` has a known value. - */ -bindingset[n] -int getValue(IntValue n) { hasValue(n) and result = n } - -/** - * Returns `a + b`. If either input is unknown, or if the addition overflows, - * the result is unknown. - */ -bindingset[a, b] -IntValue add(IntValue a, IntValue b) { - if hasValue(a) and hasValue(b) and isRepresentable(a.(float) + b.(float)) - then result = a + b - else result = unknown() -} - -/** - * Returns `a - b`. If either input is unknown, or if the subtraction overflows, - * the result is unknown. - */ -bindingset[a, b] -IntValue sub(IntValue a, IntValue b) { - if hasValue(a) and hasValue(b) and isRepresentable(a.(float) - b.(float)) - then result = a - b - else result = unknown() -} - -/** - * Returns `a * b`. If the multiplication overflows, the result is unknown. If - * either input is unknown and the other input is non-zero, the result is - * unknown. - */ -bindingset[a, b] -IntValue mul(IntValue a, IntValue b) { - if a = 0 or b = 0 - then result = 0 - else - if hasValue(a) and hasValue(b) and isRepresentable(a.(float) * b.(float)) - then result = a * b - else result = unknown() -} - -/** - * Returns `a / b`. If either input is unknown, or if `b` is zero, the result is - * unknown. - */ -bindingset[a, b] -IntValue div(IntValue a, IntValue b) { - // Normally, integer division has to worry about overflow for INT_MIN/-1. - // However, since we use INT_MIN to represent an unknown value anyway, we only - // have to worry about division by zero. - if hasValue(a) and hasValue(b) and b != 0 then result = a / b else result = unknown() -} - -/** - * Returns `a == b`. If either input is unknown, the result is unknown. - */ -bindingset[a, b] -IntValue compareEQ(IntValue a, IntValue b) { - if hasValue(a) and hasValue(b) - then if a = b then result = 1 else result = 0 - else result = unknown() -} - -/** - * Returns `a != b`. If either input is unknown, the result is unknown. - */ -bindingset[a, b] -IntValue compareNE(IntValue a, IntValue b) { - if hasValue(a) and hasValue(b) - then if a != b then result = 1 else result = 0 - else result = unknown() -} - -/** - * Returns `a < b`. If either input is unknown, the result is unknown. - */ -bindingset[a, b] -IntValue compareLT(IntValue a, IntValue b) { - if hasValue(a) and hasValue(b) - then if a < b then result = 1 else result = 0 - else result = unknown() -} - -/** - * Returns `a > b`. If either input is unknown, the result is unknown. - */ -bindingset[a, b] -IntValue compareGT(IntValue a, IntValue b) { - if hasValue(a) and hasValue(b) - then if a > b then result = 1 else result = 0 - else result = unknown() -} - -/** - * Returns `a <= b`. If either input is unknown, the result is unknown. - */ -bindingset[a, b] -IntValue compareLE(IntValue a, IntValue b) { - if hasValue(a) and hasValue(b) - then if a <= b then result = 1 else result = 0 - else result = unknown() -} - -/** - * Returns `a >= b`. If either input is unknown, the result is unknown. - */ -bindingset[a, b] -IntValue compareGE(IntValue a, IntValue b) { - if hasValue(a) and hasValue(b) - then if a >= b then result = 1 else result = 0 - else result = unknown() -} - -/** - * Return `-a`. If `a` is unknown, the result is unknown. - */ -bindingset[a] -IntValue neg(IntValue a) { - result = -a // -INT_MIN = INT_MIN, so this preserves unknown -} - -/** - * Holds if `a` is equal to `b`. Does not hold if either `a` or `b` is unknown. - */ -bindingset[a, b] -predicate isEQ(IntValue a, IntValue b) { hasValue(a) and hasValue(b) and a = b } - -/** - * Holds if `a` is not equal to `b`. Does not hold if either `a` or `b` is unknown. - */ -bindingset[a, b] -predicate isNE(IntValue a, IntValue b) { hasValue(a) and hasValue(b) and a != b } - -/** - * Holds if `a` is less than `b`. Does not hold if either `a` or `b` is unknown. - */ -bindingset[a, b] -predicate isLT(IntValue a, IntValue b) { hasValue(a) and hasValue(b) and a < b } - -/** - * Holds if `a` is less than or equal to `b`. Does not hold if either `a` or `b` is unknown. - */ -bindingset[a, b] -predicate isLE(IntValue a, IntValue b) { hasValue(a) and hasValue(b) and a <= b } - -/** - * Holds if `a` is greater than `b`. Does not hold if either `a` or `b` is unknown. - */ -bindingset[a, b] -predicate isGT(IntValue a, IntValue b) { hasValue(a) and hasValue(b) and a > b } - -/** - * Holds if `a` is greater than or equal to `b`. Does not hold if either `a` or `b` is unknown. - */ -bindingset[a, b] -predicate isGE(IntValue a, IntValue b) { hasValue(a) and hasValue(b) and a >= b } - -/** - * Converts the bit count in `bits` to a byte count and a bit count in the form - * "bytes:bits". If `bits` represents an integer number of bytes, the ":bits" section is omitted. - * If `bits` does not have a known value, the result is "?". - */ -bindingset[bits] -string bitsToBytesAndBits(IntValue bits) { - exists(int bytes, int leftoverBits | - hasValue(bits) and - bytes = bits / 8 and - leftoverBits = bits % 8 and - if leftoverBits = 0 then result = bytes.toString() else result = bytes + ":" + leftoverBits - ) - or - not hasValue(bits) and result = "?" -} - -/** - * Gets a printable string for a bit offset with possibly unknown value. - */ -bindingset[bitOffset] -string getBitOffsetString(IntValue bitOffset) { - if hasValue(bitOffset) - then - if bitOffset >= 0 - then result = "+" + bitsToBytesAndBits(bitOffset) - else result = "-" + bitsToBytesAndBits(neg(bitOffset)) - else result = "+?" -} diff --git a/csharp/ql/src/experimental/ir/internal/IntegerInterval.qll b/csharp/ql/src/experimental/ir/internal/IntegerInterval.qll deleted file mode 100644 index 4f8f4b4e672..00000000000 --- a/csharp/ql/src/experimental/ir/internal/IntegerInterval.qll +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Support for integer intervals. - * An interval is represented as by its inclusive lower bound, `start`, and its exclusive upper bound, `end`. - * Either or both of `start` and `end` may have an unknown value. - */ - -import Overlap -private import IntegerConstant - -/** - * Gets the overlap relationship between the definition interval [`defStart`, `defEnd`) and the use interval - * [`useStart`, `useEnd`). - */ -bindingset[defStart, defEnd, useStart, useEnd] -Overlap getOverlap(IntValue defStart, IntValue defEnd, IntValue useStart, IntValue useEnd) { - if isEQ(defStart, useStart) and isEQ(defEnd, useEnd) - then result instanceof MustExactlyOverlap - else - if isLE(defStart, useStart) and isGE(defEnd, useEnd) - then result instanceof MustTotallyOverlap - else ( - not isLE(defEnd, useStart) and - not isGE(defStart, useEnd) and - result instanceof MayPartiallyOverlap - ) -} - -/** - * Gets a string representation of the interval [`start`, `end`). - */ -bindingset[start, end] -string getIntervalString(IntValue start, IntValue end) { - // We represent an interval has half-open, so print it as "[start..end)". - result = "[" + bitsToBytesAndBits(start) + ".." + bitsToBytesAndBits(end) + ")" -} diff --git a/csharp/ql/src/experimental/ir/internal/IntegerPartial.qll b/csharp/ql/src/experimental/ir/internal/IntegerPartial.qll deleted file mode 100644 index 0e24f283b17..00000000000 --- a/csharp/ql/src/experimental/ir/internal/IntegerPartial.qll +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Provides basic arithmetic operations that have no result if their result - * would overflow a 32-bit two's complement integer. - */ - -/** - * Gets the value of the maximum representable integer. - */ -int maxValue() { result = 2147483647 } - -/** - * Gets the value of the minimum representable integer. - */ -int minValue() { result = -2147483648 } - -/** - * Holds if the value `f` is within the range of representable integers. - */ -bindingset[f] -pragma[inline] -private predicate isRepresentable(float f) { f >= minValue() and f <= maxValue() } - -/** - * Returns `a + b`. If the addition overflows, there is no result. - */ -bindingset[a, b] -int add(int a, int b) { - isRepresentable(a.(float) + b.(float)) and - result = a + b -} - -/** - * Returns `a - b`. If the subtraction overflows, there is no result. - */ -bindingset[a, b] -int sub(int a, int b) { - isRepresentable(a.(float) - b.(float)) and - result = a - b -} - -/** - * Returns `a * b`. If the multiplication overflows, there is no result. If - * either input is not given, and the other input is non-zero, there is no - * result. - */ -bindingset[a, b] -int mul(int a, int b) { - a = 0 and - result = 0 - or - b = 0 and - result = 0 - or - isRepresentable(a.(float) * b.(float)) and - result = a * b -} - -/** - * Returns `a / b`. If the division overflows, there is no result. - */ -bindingset[a, b] -int div(int a, int b) { - b != 0 and - (a != minValue() or b != -1) and - result = a / b -} - -/** Returns `a == b`. */ -bindingset[a, b] -int compareEQ(int a, int b) { if a = b then result = 1 else result = 0 } - -/** Returns `a != b`. */ -bindingset[a, b] -int compareNE(int a, int b) { if a != b then result = 1 else result = 0 } - -/** Returns `a < b`. */ -bindingset[a, b] -int compareLT(int a, int b) { if a < b then result = 1 else result = 0 } - -/** Returns `a > b`. */ -bindingset[a, b] -int compareGT(int a, int b) { if a > b then result = 1 else result = 0 } - -/** Returns `a <= b`. */ -bindingset[a, b] -int compareLE(int a, int b) { if a <= b then result = 1 else result = 0 } - -/** Returns `a >= b`. */ -bindingset[a, b] -int compareGE(int a, int b) { if a >= b then result = 1 else result = 0 } - -/** - * Returns `-a`. If the negation would overflow, there is no result. - */ -bindingset[a] -int neg(int a) { - a != minValue() and - result = -a -} diff --git a/csharp/ql/src/experimental/ir/internal/Overlap.qll b/csharp/ql/src/experimental/ir/internal/Overlap.qll deleted file mode 100644 index ca643b56cbb..00000000000 --- a/csharp/ql/src/experimental/ir/internal/Overlap.qll +++ /dev/null @@ -1,70 +0,0 @@ -private newtype TOverlap = - TMayPartiallyOverlap() or - TMustTotallyOverlap() or - TMustExactlyOverlap() - -/** - * Represents a possible overlap between two memory ranges. - */ -abstract class Overlap extends TOverlap { - abstract string toString(); - - /** - * Gets a value representing how precise this overlap is. The higher the value, the more precise - * the overlap. The precision values are ordered as - * follows, from most to least precise: - * `MustExactlyOverlap` - * `MustTotallyOverlap` - * `MayPartiallyOverlap` - */ - abstract int getPrecision(); -} - -/** - * Represents a partial overlap between two memory ranges, which may or may not - * actually occur in practice. - */ -class MayPartiallyOverlap extends Overlap, TMayPartiallyOverlap { - final override string toString() { result = "MayPartiallyOverlap" } - - final override int getPrecision() { result = 0 } -} - -/** - * Represents an overlap in which the first memory range is known to include all - * bits of the second memory range, but may be larger or have a different type. - */ -class MustTotallyOverlap extends Overlap, TMustTotallyOverlap { - final override string toString() { result = "MustTotallyOverlap" } - - final override int getPrecision() { result = 1 } -} - -/** - * Represents an overlap between two memory ranges that have the same extent and - * the same type. - */ -class MustExactlyOverlap extends Overlap, TMustExactlyOverlap { - final override string toString() { result = "MustExactlyOverlap" } - - final override int getPrecision() { result = 2 } -} - -/** - * Gets the `Overlap` that best represents the relationship between two memory locations `a` and - * `c`, where `getOverlap(a, b) = previousOverlap` and `getOverlap(b, c) = newOverlap`, for some - * intermediate memory location `b`. - */ -Overlap combineOverlap(Overlap previousOverlap, Overlap newOverlap) { - // Note that it's possible that two less precise overlaps could combine to result in a more - // precise overlap. For example, both `previousOverlap` and `newOverlap` could be - // `MustTotallyOverlap` even though the actual relationship between `a` and `c` is - // `MustExactlyOverlap`. We will still return `MustTotallyOverlap` as the best conservative - // approximation we can make without additional input information. - result = - min(Overlap overlap | - overlap = [previousOverlap, newOverlap] - | - overlap order by overlap.getPrecision() - ) -} diff --git a/csharp/ql/src/experimental/ir/internal/TempVariableTag.qll b/csharp/ql/src/experimental/ir/internal/TempVariableTag.qll deleted file mode 100644 index 8950c2cd8a8..00000000000 --- a/csharp/ql/src/experimental/ir/internal/TempVariableTag.qll +++ /dev/null @@ -1,32 +0,0 @@ -import csharp - -newtype TTempVariableTag = - ConditionValueTempVar() or - ReturnValueTempVar() or - ThrowTempVar() or - LambdaTempVar() or - ForeachEnumTempVar() or - LockedVarTemp() or - LockWasTakenTemp() or - EllipsisTempVar() or - ThisTempVar() - -string getTempVariableTagId(TTempVariableTag tag) { - tag = ConditionValueTempVar() and result = "CondVal" - or - tag = ReturnValueTempVar() and result = "Ret" - or - tag = ThrowTempVar() and result = "Throw" - or - tag = LambdaTempVar() and result = "Lambda" - or - tag = ForeachEnumTempVar() and result = "ForeachEnum" - or - tag = LockedVarTemp() and result = "LockedVarTemp" - or - tag = LockWasTakenTemp() and result = "LockWasTakenTemp" - or - tag = EllipsisTempVar() and result = "Ellipsis" - or - tag = ThisTempVar() and result = "This" -} diff --git a/csharp/ql/src/experimental/ir/rangeanalysis/Bound.qll b/csharp/ql/src/experimental/ir/rangeanalysis/Bound.qll deleted file mode 100644 index 295c76a025d..00000000000 --- a/csharp/ql/src/experimental/ir/rangeanalysis/Bound.qll +++ /dev/null @@ -1,79 +0,0 @@ -import csharp -private import experimental.ir.IR -private import experimental.ir.ValueNumbering - -private newtype TBound = - TBoundZero() or - TBoundValueNumber(ValueNumber vn) { - exists(Instruction i | - vn.getAnInstruction() = i and - ( - i.getResultType() instanceof IntegralType or - i.getResultType() instanceof PointerType - ) and - not vn.getAnInstruction() instanceof ConstantInstruction - | - i instanceof PhiInstruction - or - i instanceof InitializeParameterInstruction - or - i instanceof CallInstruction - or - i instanceof VariableAddressInstruction - or - i instanceof FieldAddressInstruction - or - i.(LoadInstruction).getSourceAddress() instanceof VariableAddressInstruction - or - i.(LoadInstruction).getSourceAddress() instanceof FieldAddressInstruction - or - i.getAUse() instanceof ArgumentOperand - ) - } - -/** - * A bound that may be inferred for an expression plus/minus an integer delta. - */ -abstract class Bound extends TBound { - abstract string toString(); - - /** Gets an expression that equals this bound plus `delta`. */ - abstract Instruction getInstruction(int delta); - - /** Gets an expression that equals this bound. */ - Instruction getInstruction() { result = this.getInstruction(0) } - - abstract Location getLocation(); -} - -/** - * The bound that corresponds to the integer 0. This is used to represent all - * integer bounds as bounds are always accompanied by an added integer delta. - */ -class ZeroBound extends Bound, TBoundZero { - override string toString() { result = "0" } - - override Instruction getInstruction(int delta) { - result.(ConstantValueInstruction).getValue().toInt() = delta - } - - override Location getLocation() { result instanceof EmptyLocation } -} - -/** - * A bound corresponding to the value of an `Instruction`. - */ -class ValueNumberBound extends Bound, TBoundValueNumber { - ValueNumber vn; - - ValueNumberBound() { this = TBoundValueNumber(vn) } - - /** Gets the SSA variable that equals this bound. */ - override Instruction getInstruction(int delta) { - this = TBoundValueNumber(valueNumber(result)) and delta = 0 - } - - override string toString() { result = vn.getExampleInstruction().toString() } - - override Location getLocation() { result = vn.getLocation() } -} diff --git a/csharp/ql/src/experimental/ir/rangeanalysis/RangeAnalysis.qll b/csharp/ql/src/experimental/ir/rangeanalysis/RangeAnalysis.qll deleted file mode 100644 index 1febf611652..00000000000 --- a/csharp/ql/src/experimental/ir/rangeanalysis/RangeAnalysis.qll +++ /dev/null @@ -1,633 +0,0 @@ -/** - * Provides classes and predicates for range analysis. - * - * An inferred bound can either be a specific integer or a `ValueNumber` - * representing the abstract value of a set of `Instruction`s. - * - * If an inferred bound relies directly on a condition, then this condition is - * reported as the reason for the bound. - */ - -/* - * This library tackles range analysis as a flow problem. Consider e.g.: - * ```csharp - * len = arr.length; - * if (x < len) { ... y = x-1; ... y ... } - * ``` - * In this case we would like to infer `y <= arr.length - 2`, and this is - * accomplished by tracking the bound through a sequence of steps: - * ``` - * arr.length --> len = .. --> x < len --> x-1 --> y = .. --> y - * ``` - * - * In its simplest form the step relation `I1 --> I2` relates two `Instruction`s - * such that `I1 <= B` implies `I2 <= B` for any `B` (with a second separate - * step relation handling lower bounds). Examples of such steps include - * assignments `I2 = I1` and conditions `x <= I1` where `I2` is a use of `x` - * guarded by the condition. - * - * In order to handle subtractions and additions with constants, and strict - * comparisons, the step relation is augmented with an integer delta. With this - * generalization `I1 --(delta)--> I2` relates two `Instruction`s and an integer - * such that `I1 <= B` implies `I2 <= B + delta` for any `B`. This corresponds - * to the predicate `boundFlowStep`. - * - * The complete range analysis is then implemented as the transitive closure of - * the step relation summing the deltas along the way. If `I1` transitively - * steps to `I2`, `delta` is the sum of deltas along the path, and `B` is an - * interesting bound equal to the value of `I1` then `I2 <= B + delta`. This - * corresponds to the predicate `boundedInstruction`. - * - * Bounds come in two forms: either they are relative to zero (and thus provide - * a constant bound), or they are relative to some program value. This value is - * represented by the `ValueNumber` class, each instance of which represents a - * set of `Instructions` that must have the same value. - * - * Phi nodes need a little bit of extra handling. Consider `x0 = phi(x1, x2)`. - * There are essentially two cases: - * - If `x1 <= B + d1` and `x2 <= B + d2` then `x0 <= B + max(d1,d2)`. - * - If `x1 <= B + d1` and `x2 <= x0 + d2` with `d2 <= 0` then `x0 <= B + d1`. - * The first case is for whenever a bound can be proven without taking looping - * into account. The second case is relevant when `x2` comes from a back-edge - * where we can prove that the variable has been non-increasing through the - * loop-iteration as this means that any upper bound that holds prior to the - * loop also holds for the variable during the loop. - * This generalizes to a phi node with `n` inputs, so if - * `x0 = phi(x1, ..., xn)` and `xi <= B + delta` for one of the inputs, then we - * also have `x0 <= B + delta` if we can prove either: - * - `xj <= B + d` with `d <= delta` or - * - `xj <= x0 + d` with `d <= 0` - * for each input `xj`. - * - * As all inferred bounds can be related directly to a path in the source code - * the only source of non-termination is if successive redundant (and thereby - * increasingly worse) bounds are calculated along a loop in the source code. - * We prevent this by weakening the bound to a small finite set of bounds when - * a path follows a second back-edge (we postpone weakening till the second - * back-edge as a precise bound might require traversing a loop once). - */ - -import csharp -private import experimental.ir.IR -private import experimental.ir.internal.IRGuards -private import experimental.ir.ValueNumbering -private import RangeUtils -private import SignAnalysis -import Bound - -cached -private module RangeAnalysisCache { - cached - module RangeAnalysisPublic { - /** - * Holds if `b + delta` is a valid bound for `i`. - * - `upper = true` : `i <= b + delta` - * - `upper = false` : `i >= b + delta` - * - * The reason for the bound is given by `reason` and may be either a condition - * or `NoReason` if the bound was proven directly without the use of a bounding - * condition. - */ - cached - predicate boundedInstruction(Instruction i, Bound b, int delta, boolean upper, Reason reason) { - boundedInstruction(i, b, delta, upper, _, _, reason) - } - - /** - * Holds if `b + delta` is a valid bound for `op`. - * - `upper = true` : `op <= b + delta` - * - `upper = false` : `op >= b + delta` - * - * The reason for the bound is given by `reason` and may be either a condition - * or `NoReason` if the bound was proven directly without the use of a bounding - * condition. - */ - cached - predicate boundedOperand(Operand op, Bound b, int delta, boolean upper, Reason reason) { - boundedNonPhiOperand(op, b, delta, upper, _, _, reason) - or - boundedPhiOperand(op, b, delta, upper, _, _, reason) - } - } - - /** - * Holds if `guard = boundFlowCond(_, _, _, _, _) or guard = eqFlowCond(_, _, _, _, _)`. - */ - cached - predicate possibleReason(IRGuardCondition guard) { - guard = boundFlowCond(_, _, _, _, _) - or - guard = eqFlowCond(_, _, _, _, _) - } -} - -private import RangeAnalysisCache -import RangeAnalysisPublic - -/** - * Gets a condition that tests whether `vn` equals `bound + delta`. - * - * If the condition evaluates to `testIsTrue`: - * - `isEq = true` : `vn == bound + delta` - * - `isEq = false` : `vn != bound + delta` - */ -private IRGuardCondition eqFlowCond( - ValueNumber vn, Operand bound, int delta, boolean isEq, boolean testIsTrue -) { - result.comparesEq(vn.getAUse(), bound, delta, isEq, testIsTrue) -} - -/** - * Holds if `op1 + delta` is a valid bound for `op2`. - * - `upper = true` : `op2 <= op1 + delta` - * - `upper = false` : `op2 >= op1 + delta` - */ -private predicate boundFlowStepSsa( - NonPhiOperand op2, Operand op1, int delta, boolean upper, Reason reason -) { - exists(IRGuardCondition guard, boolean testIsTrue | - guard = boundFlowCond(valueNumberOfOperand(op2), op1, delta, upper, testIsTrue) and - guard.controls(op2.getUse().getBlock(), testIsTrue) and - reason = TCondReason(guard) - ) -} - -/** - * Gets a condition that tests whether `vn` is bounded by `bound + delta`. - * - * If the condition evaluates to `testIsTrue`: - * - `upper = true` : `vn <= bound + delta` - * - `upper = false` : `vn >= bound + delta` - */ -private IRGuardCondition boundFlowCond( - ValueNumber vn, NonPhiOperand bound, int delta, boolean upper, boolean testIsTrue -) { - exists(int d | - result.comparesLt(vn.getAUse(), bound, d, upper, testIsTrue) and - // `comparesLt` provides bounds of the form `x < y + k` or `x >= y + k`, but we need - // `x <= y + k` so we strengthen here. `testIsTrue` has the same semantics in `comparesLt` as - // it does here, so we don't need to account for it. - if upper = true then delta = d - 1 else delta = d - ) - or - result = eqFlowCond(vn, bound, delta, true, testIsTrue) and - (upper = true or upper = false) -} - -private newtype TReason = - TNoReason() or - TCondReason(IRGuardCondition guard) { possibleReason(guard) } - -/** - * A reason for an inferred bound. This can either be `CondReason` if the bound - * is due to a specific condition, or `NoReason` if the bound is inferred - * without going through a bounding condition. - */ -abstract class Reason extends TReason { - abstract string toString(); -} - -class NoReason extends Reason, TNoReason { - override string toString() { result = "NoReason" } -} - -class CondReason extends Reason, TCondReason { - IRGuardCondition getCond() { this = TCondReason(result) } - - override string toString() { result = this.getCond().toString() } -} - -/** - * Holds if a cast from `fromtyp` to `totyp` can be ignored for the purpose of - * range analysis. - */ -pragma[inline] -private predicate safeCast(IntegralType fromtyp, IntegralType totyp) { - fromtyp.getSize() < totyp.getSize() and - ( - fromtyp instanceof UnsignedIntegralType - or - totyp instanceof SignedIntegralType - ) - or - fromtyp.getSize() <= totyp.getSize() and - ( - fromtyp instanceof SignedIntegralType and - totyp instanceof SignedIntegralType - or - fromtyp instanceof UnsignedIntegralType and - totyp instanceof UnsignedIntegralType - ) -} - -private class SafeCastInstruction extends ConvertInstruction { - SafeCastInstruction() { - safeCast(this.getResultType(), this.getUnary().getResultType()) - or - this.getResultType() instanceof PointerType and - this.getUnary().getResultType() instanceof PointerType - } -} - -/** - * Holds if `typ` is a small integral type with the given lower and upper bounds. - */ -private predicate typeBound(IntegralType typ, int lowerbound, int upperbound) { - typ instanceof SignedIntegralType and - typ.getSize() = 1 and - lowerbound = typ.minValue() and - upperbound = typ.maxValue() - or - typ instanceof UnsignedIntegralType and - typ.getSize() = 1 and - lowerbound = typ.minValue() and - upperbound = typ.maxValue() - or - typ instanceof SignedIntegralType and - typ.getSize() = 2 and - lowerbound = typ.minValue() and - upperbound = typ.maxValue() - or - typ instanceof UnsignedIntegralType and - typ.getSize() = 2 and - lowerbound = typ.minValue() and - upperbound = typ.maxValue() -} - -/** - * A cast to a small integral type that may overflow or underflow. - */ -private class NarrowingCastInstruction extends ConvertInstruction { - NarrowingCastInstruction() { - not this instanceof SafeCastInstruction and - typeBound(this.getResultType(), _, _) - } - - /** Gets the lower bound of the resulting type. */ - int getLowerBound() { typeBound(this.getResultType(), result, _) } - - /** Gets the upper bound of the resulting type. */ - int getUpperBound() { typeBound(this.getResultType(), _, result) } -} - -/** - * Holds if `op + delta` is a valid bound for `i`. - * - `upper = true` : `i <= op + delta` - * - `upper = false` : `i >= op + delta` - */ -private predicate boundFlowStep(Instruction i, NonPhiOperand op, int delta, boolean upper) { - valueFlowStep(i, op, delta) and - (upper = true or upper = false) - or - i.(SafeCastInstruction).getAnOperand() = op and - delta = 0 and - (upper = true or upper = false) - or - exists(Operand x | - i.(AddInstruction).getAnOperand() = op and - i.(AddInstruction).getAnOperand() = x and - op != x - | - not exists(getValue(getConstantValue(op.getUse()))) and - not exists(getValue(getConstantValue(x.getUse()))) and - if strictlyPositive(x) - then upper = false and delta = 1 - else - if positive(x) - then upper = false and delta = 0 - else - if strictlyNegative(x) - then upper = true and delta = -1 - else - if negative(x) - then upper = true and delta = 0 - else none() - ) - or - exists(Operand x | - exists(SubInstruction sub | - i = sub and - sub.getLeftOperand() = op and - sub.getRightOperand() = x - ) - | - // `x` with constant value is covered by valueFlowStep - not exists(getValue(getConstantValue(x.getUse()))) and - if strictlyPositive(x) - then upper = true and delta = -1 - else - if positive(x) - then upper = true and delta = 0 - else - if strictlyNegative(x) - then upper = false and delta = 1 - else - if negative(x) - then upper = false and delta = 0 - else none() - ) - or - i.(RemInstruction).getRightOperand() = op and positive(op) and delta = -1 and upper = true - or - i.(RemInstruction).getLeftOperand() = op and positive(op) and delta = 0 and upper = true - or - i.(BitAndInstruction).getAnOperand() = op and positive(op) and delta = 0 and upper = true - or - i.(BitOrInstruction).getAnOperand() = op and - positiveInstruction(i) and - delta = 0 and - upper = false - // TODO: min, max, rand -} - -private predicate boundFlowStepMul(Instruction i1, Operand op, int factor) { - exists(Instruction c, int k | k = getValue(getConstantValue(c)) and k > 0 | - i1.(MulInstruction).hasOperands(op, c.getAUse()) and factor = k - or - exists(ShiftLeftInstruction i | - i = i1 and i.getLeftOperand() = op and i.getRightOperand() = c.getAUse() and factor = 2.pow(k) - ) - ) -} - -private predicate boundFlowStepDiv(Instruction i1, Operand op, int factor) { - exists(Instruction c, int k | k = getValue(getConstantValue(c)) and k > 0 | - exists(DivInstruction i | - i = i1 and i.getLeftOperand() = op and i.getRight() = c and factor = k - ) - or - exists(ShiftRightInstruction i | - i = i1 and i.getLeftOperand() = op and i.getRight() = c and factor = 2.pow(k) - ) - ) -} - -/** - * Holds if `b` is a valid bound for `op` - */ -pragma[noinline] -private predicate boundedNonPhiOperand( - NonPhiOperand op, Bound b, int delta, boolean upper, boolean fromBackEdge, int origdelta, - Reason reason -) { - exists(NonPhiOperand op2, int d1, int d2 | - boundFlowStepSsa(op, op2, d1, upper, reason) and - boundedNonPhiOperand(op2, b, d2, upper, fromBackEdge, origdelta, _) and - delta = d1 + d2 - ) - or - boundedInstruction(op.getDef(), b, delta, upper, fromBackEdge, origdelta, reason) - or - exists(int d, Reason r1, Reason r2 | - boundedNonPhiOperand(op, b, d, upper, fromBackEdge, origdelta, r2) - | - unequalOperand(op, b, d, r1) and - ( - upper = true and delta = d - 1 - or - upper = false and delta = d + 1 - ) and - ( - reason = r1 - or - reason = r2 and not r2 instanceof NoReason - ) - ) -} - -/** - * Holds if `op1 + delta` is a valid bound for `op2`. - * - `upper = true` : `op2 <= op1 + delta` - * - `upper = false` : `op2 >= op1 + delta` - */ -private predicate boundFlowStepPhi( - PhiInputOperand op2, Operand op1, int delta, boolean upper, Reason reason -) { - op2.getDef().(CopyInstruction).getSourceValueOperand() = op1 and - (upper = true or upper = false) and - reason = TNoReason() and - delta = 0 - or - exists(IRGuardCondition guard, boolean testIsTrue | - guard = boundFlowCond(valueNumberOfOperand(op2), op1, delta, upper, testIsTrue) and - guard.controlsEdge(op2.getPredecessorBlock(), op2.getUse().getBlock(), testIsTrue) and - reason = TCondReason(guard) - ) -} - -private predicate boundedPhiOperand( - PhiInputOperand op, Bound b, int delta, boolean upper, boolean fromBackEdge, int origdelta, - Reason reason -) { - exists(NonPhiOperand op2, int d1, int d2, Reason r1, Reason r2 | - boundFlowStepPhi(op, op2, d1, upper, r1) and - boundedNonPhiOperand(op2, b, d2, upper, fromBackEdge, origdelta, r2) and - delta = d1 + d2 and - (if r1 instanceof NoReason then reason = r2 else reason = r1) - ) - or - boundedInstruction(op.getDef(), b, delta, upper, fromBackEdge, origdelta, reason) - or - exists(int d, Reason r1, Reason r2 | - boundedInstruction(op.getDef(), b, d, upper, fromBackEdge, origdelta, r2) - | - unequalOperand(op, b, d, r1) and - ( - upper = true and delta = d - 1 - or - upper = false and delta = d + 1 - ) and - ( - reason = r1 - or - reason = r2 and not r2 instanceof NoReason - ) - ) -} - -/** Holds if `op2 != op1 + delta` at `pos`. */ -private predicate unequalFlowStep(Operand op2, Operand op1, int delta, Reason reason) { - exists(IRGuardCondition guard, boolean testIsTrue | - guard = eqFlowCond(valueNumberOfOperand(op2), op1, delta, false, testIsTrue) and - guard.controls(op2.getUse().getBlock(), testIsTrue) and - reason = TCondReason(guard) - ) -} - -/** - * Holds if `op != b + delta` at `pos`. - */ -private predicate unequalOperand(Operand op, Bound b, int delta, Reason reason) { - exists(Operand op2, int d1, int d2 | - unequalFlowStep(op, op2, d1, reason) and - boundedNonPhiOperand(op2, b, d2, true, _, _, _) and - boundedNonPhiOperand(op2, b, d2, false, _, _, _) and - delta = d1 + d2 - ) -} - -private predicate boundedPhiCandValidForEdge( - PhiInstruction phi, Bound b, int delta, boolean upper, boolean fromBackEdge, int origdelta, - Reason reason, PhiInputOperand op -) { - boundedPhiCand(phi, upper, b, delta, fromBackEdge, origdelta, reason) and - ( - exists(int d | boundedPhiInp1(phi, op, b, d, upper) | upper = true and d <= delta) - or - exists(int d | boundedPhiInp1(phi, op, b, d, upper) | upper = false and d >= delta) - or - selfBoundedPhiInp(phi, op, upper) - ) -} - -/** Weakens a delta to lie in the range `[-1..1]`. */ -bindingset[delta, upper] -private int weakenDelta(boolean upper, int delta) { - delta in [-1 .. 1] and result = delta - or - upper = true and result = -1 and delta < -1 - or - upper = false and result = 1 and delta > 1 -} - -private predicate boundedPhiInp( - PhiInstruction phi, PhiInputOperand op, Bound b, int delta, boolean upper, boolean fromBackEdge, - int origdelta, Reason reason -) { - phi.getAnOperand() = op and - exists(int d, boolean fromBackEdge0 | - boundedPhiOperand(op, b, d, upper, fromBackEdge0, origdelta, reason) - or - b.(ValueNumberBound).getInstruction() = op.getDef() and - d = 0 and - (upper = true or upper = false) and - fromBackEdge0 = false and - origdelta = 0 and - reason = TNoReason() - | - if backEdge(phi, op) - then - fromBackEdge = true and - ( - fromBackEdge0 = true and delta = weakenDelta(upper, d - origdelta) + origdelta - or - fromBackEdge0 = false and delta = d - ) - else ( - delta = d and fromBackEdge = fromBackEdge0 - ) - ) -} - -pragma[noinline] -private predicate boundedPhiInp1( - PhiInstruction phi, PhiInputOperand op, Bound b, int delta, boolean upper -) { - boundedPhiInp(phi, op, b, delta, upper, _, _, _) -} - -private predicate selfBoundedPhiInp(PhiInstruction phi, PhiInputOperand op, boolean upper) { - exists(int d, ValueNumberBound phibound | - phibound.getInstruction() = phi and - boundedPhiInp(phi, op, phibound, d, upper, _, _, _) and - ( - upper = true and d <= 0 - or - upper = false and d >= 0 - ) - ) -} - -pragma[noinline] -private predicate boundedPhiCand( - PhiInstruction phi, boolean upper, Bound b, int delta, boolean fromBackEdge, int origdelta, - Reason reason -) { - boundedPhiInp(phi, _, b, delta, upper, fromBackEdge, origdelta, reason) -} - -/** - * Holds if the value being cast has an upper (for `upper = true`) or lower - * (for `upper = false`) bound within the bounds of the resulting type. - * For `upper = true` this means that the cast will not overflow and for - * `upper = false` this means that the cast will not underflow. - */ -private predicate safeNarrowingCast(NarrowingCastInstruction cast, boolean upper) { - exists(int bound | - boundedNonPhiOperand(cast.getAnOperand(), any(ZeroBound zb), bound, upper, _, _, _) - | - upper = true and bound <= cast.getUpperBound() - or - upper = false and bound >= cast.getLowerBound() - ) -} - -pragma[noinline] -private predicate boundedCastExpr( - NarrowingCastInstruction cast, Bound b, int delta, boolean upper, boolean fromBackEdge, - int origdelta, Reason reason -) { - boundedNonPhiOperand(cast.getAnOperand(), b, delta, upper, fromBackEdge, origdelta, reason) -} - -/** - * Holds if `b + delta` is a valid bound for `i`. - * - `upper = true` : `i <= b + delta` - * - `upper = false` : `i >= b + delta` - */ -private predicate boundedInstruction( - Instruction i, Bound b, int delta, boolean upper, boolean fromBackEdge, int origdelta, - Reason reason -) { - i instanceof PhiInstruction and - forex(PhiInputOperand op | op = i.getAnOperand() | - boundedPhiCandValidForEdge(i, b, delta, upper, fromBackEdge, origdelta, reason, op) - ) - or - i = b.getInstruction(delta) and - (upper = true or upper = false) and - fromBackEdge = false and - origdelta = delta and - reason = TNoReason() - or - exists(Operand mid, int d1, int d2 | - boundFlowStep(i, mid, d1, upper) and - boundedNonPhiOperand(mid, b, d2, upper, fromBackEdge, origdelta, reason) and - delta = d1 + d2 and - not exists(getValue(getConstantValue(i))) - ) - or - exists(Operand mid, int factor, int d | - boundFlowStepMul(i, mid, factor) and - boundedNonPhiOperand(mid, b, d, upper, fromBackEdge, origdelta, reason) and - b instanceof ZeroBound and - delta = d * factor and - not exists(getValue(getConstantValue(i))) - ) - or - exists(Operand mid, int factor, int d | - boundFlowStepDiv(i, mid, factor) and - boundedNonPhiOperand(mid, b, d, upper, fromBackEdge, origdelta, reason) and - d >= 0 and - b instanceof ZeroBound and - delta = d / factor and - not exists(getValue(getConstantValue(i))) - ) - or - exists(NarrowingCastInstruction cast | - cast = i and - safeNarrowingCast(cast, upper.booleanNot()) and - boundedCastExpr(cast, b, delta, upper, fromBackEdge, origdelta, reason) - ) - or - exists(PropertyAccess pa | - i.(CallInstruction).getAst() = pa and - pa.getProperty().getName() = "Length" and - b instanceof ZeroBound and - delta = origdelta and - (upper = true or upper = false) and - fromBackEdge = false and - delta = getArrayDim(pa.getQualifier().(VariableAccess).getTarget()) and - reason = TNoReason() - ) -} diff --git a/csharp/ql/src/experimental/ir/rangeanalysis/RangeUtils.qll b/csharp/ql/src/experimental/ir/rangeanalysis/RangeUtils.qll deleted file mode 100644 index b7fdfc3546f..00000000000 --- a/csharp/ql/src/experimental/ir/rangeanalysis/RangeUtils.qll +++ /dev/null @@ -1,96 +0,0 @@ -import csharp -private import experimental.ir.IR -// TODO: move this dependency -import experimental.ir.internal.IntegerConstant - -// TODO: move this out of test code -language[monotonicAggregates] -IntValue getConstantValue(Instruction instr) { - result = instr.(IntegerConstantInstruction).getValue().toInt() - or - exists(BinaryInstruction binInstr, IntValue left, IntValue right | - binInstr = instr and - left = getConstantValue(binInstr.getLeft()) and - right = getConstantValue(binInstr.getRight()) and - ( - binInstr instanceof AddInstruction and result = add(left, right) - or - binInstr instanceof SubInstruction and result = sub(left, right) - or - binInstr instanceof MulInstruction and result = mul(left, right) - or - binInstr instanceof DivInstruction and result = div(left, right) - ) - ) - or - result = getConstantValue(instr.(CopyInstruction).getSourceValue()) - or - exists(PhiInstruction phi | - phi = instr and - result = - max(PhiInputOperand operand | - operand = phi.getAnOperand() - | - getConstantValue(operand.getDef()) - ) and - result = - min(PhiInputOperand operand | - operand = phi.getAnOperand() - | - getConstantValue(operand.getDef()) - ) - ) -} - -/** - * Gets the dimension of the array (either the declared size, or the - * size of the initializer); if no size is declared and no initializer used, - * the predicate does not hold. - */ -IntValue getArrayDim(Variable arr) { - exists(ArrayCreation ac | - arr.getInitializer() = ac and - if exists(ac.getLengthArgument(0)) - then result = ac.getLengthArgument(0).getValue().toInt() - else result = ac.getInitializer().getNumberOfElements() - ) -} - -predicate valueFlowStep(Instruction i, Operand op, int delta) { - i.(CopyInstruction).getSourceValueOperand() = op and delta = 0 - or - exists(Operand x | - i.(AddInstruction).getAnOperand() = op and - i.(AddInstruction).getAnOperand() = x and - op != x - | - delta = getValue(getConstantValue(x.getDef())) - ) - or - exists(Operand x | - i.(SubInstruction).getLeftOperand() = op and - i.(SubInstruction).getRightOperand() = x - | - delta = -getValue(getConstantValue(x.getDef())) - ) - or - exists(Operand x | - i.(PointerAddInstruction).getAnOperand() = op and - i.(PointerAddInstruction).getAnOperand() = x and - op != x - | - delta = i.(PointerAddInstruction).getElementSize() * getValue(getConstantValue(x.getDef())) - ) - or - exists(Operand x | - i.(PointerSubInstruction).getLeftOperand() = op and - i.(PointerSubInstruction).getRightOperand() = x - | - delta = i.(PointerSubInstruction).getElementSize() * -getValue(getConstantValue(x.getDef())) - ) -} - -predicate backEdge(PhiInstruction phi, PhiInputOperand op) { - phi.getAnOperand() = op and - phi.getBlock() = op.getPredecessorBlock().getBackEdgeSuccessor(_) -} diff --git a/csharp/ql/src/experimental/ir/rangeanalysis/SignAnalysis.qll b/csharp/ql/src/experimental/ir/rangeanalysis/SignAnalysis.qll deleted file mode 100644 index b74f7c90db5..00000000000 --- a/csharp/ql/src/experimental/ir/rangeanalysis/SignAnalysis.qll +++ /dev/null @@ -1,585 +0,0 @@ -/** - * Provides sign analysis to determine whether expression are always positive - * or negative. - * - * The analysis is implemented as an abstract interpretation over the - * three-valued domain `{negative, zero, positive}`. - */ - -import csharp -private import experimental.ir.IR -private import experimental.ir.internal.IRGuards -private import experimental.ir.ValueNumbering -private import SignAnalysisCached - -private newtype TSign = - TNeg() or - TZero() or - TPos() - -private class Sign extends TSign { - string toString() { - result = "-" and this = TNeg() - or - result = "0" and this = TZero() - or - result = "+" and this = TPos() - } - - Sign inc() { - this = TNeg() and result = TNeg() - or - this = TNeg() and result = TZero() - or - this = TZero() and result = TPos() - or - this = TPos() and result = TPos() - } - - Sign dec() { result.inc() = this } - - Sign neg() { - this = TNeg() and result = TPos() - or - this = TZero() and result = TZero() - or - this = TPos() and result = TNeg() - } - - Sign bitnot() { - this = TNeg() and result = TPos() - or - this = TNeg() and result = TZero() - or - this = TZero() and result = TNeg() - or - this = TPos() and result = TNeg() - } - - Sign add(Sign s) { - this = TZero() and result = s - or - s = TZero() and result = this - or - this = s and this = result - or - this = TPos() and s = TNeg() - or - this = TNeg() and s = TPos() - } - - Sign mul(Sign s) { - result = TZero() and this = TZero() - or - result = TZero() and s = TZero() - or - result = TNeg() and this = TPos() and s = TNeg() - or - result = TNeg() and this = TNeg() and s = TPos() - or - result = TPos() and this = TPos() and s = TPos() - or - result = TPos() and this = TNeg() and s = TNeg() - } - - Sign div(Sign s) { - result = TZero() and s = TNeg() - or - result = TZero() and s = TPos() - or - result = TNeg() and this = TPos() and s = TNeg() - or - result = TNeg() and this = TNeg() and s = TPos() - or - result = TPos() and this = TPos() and s = TPos() - or - result = TPos() and this = TNeg() and s = TNeg() - } - - Sign rem(Sign s) { - result = TZero() and s = TNeg() - or - result = TZero() and s = TPos() - or - result = this and s = TNeg() - or - result = this and s = TPos() - } - - Sign bitand(Sign s) { - result = TZero() and this = TZero() - or - result = TZero() and s = TZero() - or - result = TZero() and this = TPos() - or - result = TZero() and s = TPos() - or - result = TNeg() and this = TNeg() and s = TNeg() - or - result = TPos() and this = TNeg() and s = TPos() - or - result = TPos() and this = TPos() and s = TNeg() - or - result = TPos() and this = TPos() and s = TPos() - } - - Sign bitor(Sign s) { - result = TZero() and this = TZero() and s = TZero() - or - result = TNeg() and this = TNeg() - or - result = TNeg() and s = TNeg() - or - result = TPos() and this = TPos() and s = TZero() - or - result = TPos() and this = TZero() and s = TPos() - or - result = TPos() and this = TPos() and s = TPos() - } - - Sign bitxor(Sign s) { - result = TZero() and this = s - or - result = this and s = TZero() - or - result = s and this = TZero() - or - result = TPos() and this = TPos() and s = TPos() - or - result = TNeg() and this = TNeg() and s = TPos() - or - result = TNeg() and this = TPos() and s = TNeg() - or - result = TPos() and this = TNeg() and s = TNeg() - } - - Sign lshift(Sign s) { - result = TZero() and this = TZero() - or - result = this and s = TZero() - or - this != TZero() and s != TZero() - } - - Sign rshift(Sign s) { - result = TZero() and this = TZero() - or - result = this and s = TZero() - or - result = TNeg() and this = TNeg() - or - result != TNeg() and this = TPos() and s != TZero() - } - - Sign urshift(Sign s) { - result = TZero() and this = TZero() - or - result = this and s = TZero() - or - result != TZero() and this = TNeg() and s != TZero() - or - result != TNeg() and this = TPos() and s != TZero() - } -} - -private Sign certainInstructionSign(Instruction inst) { - exists(int i | inst.(IntegerConstantInstruction).getValue().toInt() = i | - i < 0 and result = TNeg() - or - i = 0 and result = TZero() - or - i > 0 and result = TPos() - ) - or - exists(float f | f = inst.(FloatConstantInstruction).getValue().toFloat() | - f < 0 and result = TNeg() - or - f = 0 and result = TZero() - or - f > 0 and result = TPos() - ) -} - -private newtype CastKind = - TWiden() or - TSame() or - TNarrow() - -private CastKind getCastKind(ConvertInstruction ci) { - exists(int fromSize, int toSize | - toSize = ci.getResultSize() and - fromSize = ci.getUnary().getResultSize() - | - fromSize < toSize and - result = TWiden() - or - fromSize = toSize and - result = TSame() - or - fromSize > toSize and - result = TNarrow() - ) -} - -private predicate bindBool(boolean bool) { - bool = true or - bool = false -} - -private Sign castSign(Sign s, boolean fromSigned, boolean toSigned, CastKind ck) { - result = TZero() and - ( - bindBool(fromSigned) and - bindBool(toSigned) and - s = TZero() - or - bindBool(fromSigned) and - bindBool(toSigned) and - ck = TNarrow() - ) - or - result = TPos() and - ( - bindBool(fromSigned) and - bindBool(toSigned) and - s = TPos() - or - bindBool(fromSigned) and - bindBool(toSigned) and - s = TNeg() and - ck = TNarrow() - or - fromSigned = true and - toSigned = false and - s = TNeg() - ) - or - result = TNeg() and - ( - fromSigned = true and - toSigned = true and - s = TNeg() - or - fromSigned = false and - toSigned = true and - s = TPos() and - ck != TWiden() - ) -} - -/** Holds if the sign of `e` is too complicated to determine. */ -private predicate unknownSign(Instruction i) { - // REVIEW: This should probably be a list of the instructions that we _do_ understand, rather than - // the ones we don't understand. Currently, if we try to compute the sign of an instruction that - // we don't understand, and it isn't on this list, we incorrectly compute the sign as "none" - // instead of "+,0,-". - // Even better, we could track the state of each instruction as a power set of {non-negative, - // non-positive, non-zero}, which would mean that the representation of the sign of an unknown - // value would be the empty set. - ( - i instanceof UninitializedInstruction - or - i instanceof InitializeParameterInstruction - or - i instanceof BuiltInOperationInstruction - or - i instanceof CallInstruction - or - i instanceof ChiInstruction - ) -} - -/** - * Holds if `lowerbound` is a lower bound for `bounded`. This is restricted - * to only include bounds for which we might determine a sign. - */ -private predicate lowerBound( - IRGuardCondition comp, Operand lowerbound, Operand bounded, boolean isStrict -) { - exists(int adjustment, Operand compared | - valueNumberOfOperand(bounded) = valueNumberOfOperand(compared) and - ( - isStrict = true and - adjustment = 0 - or - isStrict = false and - adjustment = 1 - ) and - comp.ensuresLt(lowerbound, compared, adjustment, bounded.getUse().getBlock(), true) - ) -} - -/** - * Holds if `upperbound` is an upper bound for `bounded` at `pos`. This is restricted - * to only include bounds for which we might determine a sign. - */ -private predicate upperBound( - IRGuardCondition comp, Operand upperbound, Operand bounded, boolean isStrict -) { - exists(int adjustment, Operand compared | - valueNumberOfOperand(bounded) = valueNumberOfOperand(compared) and - ( - isStrict = true and - adjustment = 0 - or - isStrict = false and - adjustment = 1 - ) and - comp.ensuresLt(compared, upperbound, adjustment, bounded.getUse().getBlock(), true) - ) -} - -/** - * Holds if `eqbound` is an equality/inequality for `bounded` at `pos`. This is - * restricted to only include bounds for which we might determine a sign. The - * boolean `isEq` gives the polarity: - * - `isEq = true` : `bounded = eqbound` - * - `isEq = false` : `bounded != eqbound` - */ -private predicate eqBound(IRGuardCondition guard, Operand eqbound, Operand bounded, boolean isEq) { - exists(Operand compared | - valueNumberOfOperand(bounded) = valueNumberOfOperand(compared) and - guard.ensuresEq(compared, eqbound, 0, bounded.getUse().getBlock(), isEq) - ) -} - -/** - * Holds if `bound` is a bound for `v` at `pos` that needs to be positive in - * order for `v` to be positive. - */ -private predicate posBound(IRGuardCondition comp, Operand bound, Operand op) { - upperBound(comp, bound, op, _) or - eqBound(comp, bound, op, true) -} - -/** - * Holds if `bound` is a bound for `v` at `pos` that needs to be negative in - * order for `v` to be negative. - */ -private predicate negBound(IRGuardCondition comp, Operand bound, Operand op) { - lowerBound(comp, bound, op, _) or - eqBound(comp, bound, op, true) -} - -/** - * Holds if `bound` is a bound for `v` at `pos` that can restrict whether `v` - * can be zero. - */ -private predicate zeroBound(IRGuardCondition comp, Operand bound, Operand op) { - lowerBound(comp, bound, op, _) or - upperBound(comp, bound, op, _) or - eqBound(comp, bound, op, _) -} - -/** Holds if `bound` allows `v` to be positive at `pos`. */ -private predicate posBoundOk(IRGuardCondition comp, Operand bound, Operand op) { - posBound(comp, bound, op) and TPos() = operandSign(bound) -} - -/** Holds if `bound` allows `v` to be negative at `pos`. */ -private predicate negBoundOk(IRGuardCondition comp, Operand bound, Operand op) { - negBound(comp, bound, op) and TNeg() = operandSign(bound) -} - -/** Holds if `bound` allows `v` to be zero at `pos`. */ -private predicate zeroBoundOk(IRGuardCondition comp, Operand bound, Operand op) { - lowerBound(comp, bound, op, _) and TNeg() = operandSign(bound) - or - lowerBound(comp, bound, op, false) and TZero() = operandSign(bound) - or - upperBound(comp, bound, op, _) and TPos() = operandSign(bound) - or - upperBound(comp, bound, op, false) and TZero() = operandSign(bound) - or - eqBound(comp, bound, op, true) and TZero() = operandSign(bound) - or - eqBound(comp, bound, op, false) and TZero() != operandSign(bound) -} - -private Sign binaryOpLhsSign(BinaryInstruction i) { result = operandSign(i.getLeftOperand()) } - -private Sign binaryOpRhsSign(BinaryInstruction i) { result = operandSign(i.getRightOperand()) } - -pragma[noinline] -private predicate binaryOpSigns(BinaryInstruction i, Sign lhs, Sign rhs) { - lhs = binaryOpLhsSign(i) and - rhs = binaryOpRhsSign(i) -} - -private Sign unguardedOperandSign(Operand operand) { - result = instructionSign(operand.getDef()) and - not hasGuard(operand, result) -} - -private Sign guardedOperandSign(Operand operand) { - result = instructionSign(operand.getDef()) and - hasGuard(operand, result) -} - -private Sign guardedOperandSignOk(Operand operand) { - result = TPos() and - forex(IRGuardCondition guard, Operand bound | posBound(guard, bound, operand) | - posBoundOk(guard, bound, operand) - ) - or - result = TNeg() and - forex(IRGuardCondition guard, Operand bound | negBound(guard, bound, operand) | - negBoundOk(guard, bound, operand) - ) - or - result = TZero() and - forex(IRGuardCondition guard, Operand bound | zeroBound(guard, bound, operand) | - zeroBoundOk(guard, bound, operand) - ) -} - -/** - * Holds if there is a bound that might restrict whether `v` has the sign `s` - * at `pos`. - */ -private predicate hasGuard(Operand op, Sign s) { - s = TPos() and posBound(_, _, op) - or - s = TNeg() and negBound(_, _, op) - or - s = TZero() and zeroBound(_, _, op) -} - -cached -module SignAnalysisCached { - /** - * Gets a sign that `operand` may have at `pos`, taking guards into account. - */ - cached - Sign operandSign(Operand operand) { - result = unguardedOperandSign(operand) - or - result = guardedOperandSign(operand) and - result = guardedOperandSignOk(operand) - or - // `result` is unconstrained if the definition is inexact. Then any sign is possible. - operand.isDefinitionInexact() - } - - cached - Sign instructionSign(Instruction i) { - result = certainInstructionSign(i) - or - not exists(certainInstructionSign(i)) and - not ( - result = TNeg() and - i.getResultType() instanceof UnsignedIntegralType - ) and - ( - unknownSign(i) - or - exists(ConvertInstruction ci, Instruction prior, boolean fromSigned, boolean toSigned | - i = ci and - prior = ci.getUnary() and - ( - if ci.getResultType() instanceof SignedIntegralType - then toSigned = true - else toSigned = false - ) and - ( - if prior.getResultType() instanceof SignedIntegralType - then fromSigned = true - else fromSigned = false - ) and - result = castSign(operandSign(ci.getAnOperand()), fromSigned, toSigned, getCastKind(ci)) - ) - or - result = operandSign(i.(CopyInstruction).getSourceValueOperand()) - or - result = operandSign(i.(BitComplementInstruction).getAnOperand()).bitnot() - or - result = operandSign(i.(NegateInstruction).getAnOperand()).neg() - or - exists(Sign s1, Sign s2 | binaryOpSigns(i, s1, s2) | - i instanceof AddInstruction and result = s1.add(s2) - or - i instanceof SubInstruction and result = s1.add(s2.neg()) - or - i instanceof MulInstruction and result = s1.mul(s2) - or - i instanceof DivInstruction and result = s1.div(s2) - or - i instanceof RemInstruction and result = s1.rem(s2) - or - i instanceof BitAndInstruction and result = s1.bitand(s2) - or - i instanceof BitOrInstruction and result = s1.bitor(s2) - or - i instanceof BitXorInstruction and result = s1.bitxor(s2) - or - i instanceof ShiftLeftInstruction and result = s1.lshift(s2) - or - i instanceof ShiftRightInstruction and - i.getResultType().(IntegralType) instanceof SignedIntegralType and - result = s1.rshift(s2) - or - i instanceof ShiftRightInstruction and - not i.getResultType().(IntegralType) instanceof SignedIntegralType and - result = s1.urshift(s2) - or - i instanceof UnsignedShiftRightInstruction and result = s1.urshift(s2) - ) - or - // use hasGuard here? - result = operandSign(i.(PhiInstruction).getAnOperand()) - ) - } -} - -/** Holds if `i` can be positive and cannot be negative. */ -predicate positiveInstruction(Instruction i) { - instructionSign(i) = TPos() and - not instructionSign(i) = TNeg() -} - -/** Holds if `i` at `pos` can be positive at and cannot be negative. */ -predicate positive(Operand op) { - operandSign(op) = TPos() and - not operandSign(op) = TNeg() -} - -/** Holds if `i` can be negative and cannot be positive. */ -predicate negativeInstruction(Instruction i) { - instructionSign(i) = TNeg() and - not instructionSign(i) = TPos() -} - -/** Holds if `i` at `pos` can be negative and cannot be positive. */ -predicate negative(Operand op) { - operandSign(op) = TNeg() and - not operandSign(op) = TPos() -} - -/** Holds if `i` is strictly positive. */ -predicate strictlyPositiveInstruction(Instruction i) { - instructionSign(i) = TPos() and - not instructionSign(i) = TNeg() and - not instructionSign(i) = TZero() -} - -/** Holds if `i` is strictly positive at `pos`. */ -predicate strictlyPositive(Operand op) { - operandSign(op) = TPos() and - not operandSign(op) = TNeg() and - not operandSign(op) = TZero() -} - -/** Holds if `i` is strictly negative. */ -predicate strictlyNegativeInstruction(Instruction i) { - instructionSign(i) = TNeg() and - not instructionSign(i) = TPos() and - not instructionSign(i) = TZero() -} - -/** Holds if `i` is strictly negative at `pos`. */ -predicate strictlyNegative(Operand op) { - operandSign(op) = TNeg() and - not operandSign(op) = TPos() and - not operandSign(op) = TZero() -} diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll index 618cd114171..bc994491d6e 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll @@ -3,7 +3,6 @@ */ private import csharp as CS -private import dotnet private import semmle.code.csharp.commons.Util as Util private import semmle.code.csharp.commons.Collections as Collections private import semmle.code.csharp.dataflow.internal.DataFlowDispatch @@ -62,7 +61,7 @@ predicate isRelevantForTypeBasedFlowModels = isRelevantForModels/1; * In the Standard library and 3rd party libraries it the callables that can be called * from outside the library itself. */ -class TargetApiSpecific extends DotNet::Callable { +class TargetApiSpecific extends CS::Callable { TargetApiSpecific() { this.fromSource() and this.isUnboundDeclaration() diff --git a/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll b/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll index bfc654a839b..dfb4c210edc 100644 --- a/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll +++ b/csharp/ql/src/utils/modelgenerator/internal/CaptureTypeBasedSummaryModels.qll @@ -1,5 +1,4 @@ private import csharp -private import dotnet private import semmle.code.csharp.frameworks.system.collections.Generic as GenericCollections private import semmle.code.csharp.dataflow.internal.DataFlowPrivate private import semmle.code.csharp.frameworks.system.linq.Expressions @@ -21,14 +20,14 @@ private predicate genericCollectionType(ValueOrRefType t, TypeParameter tp) { /** * Holds if `tp` is a type parameter of the immediate type declaring `callable`. */ -private predicate classTypeParameter(DotNet::Callable callable, TypeParameter tp) { +private predicate classTypeParameter(Callable callable, TypeParameter tp) { callable.getDeclaringType().(UnboundGeneric).getATypeParameter() = tp } /** * Holds if `tp` is type parameter of `callable` or the type declaring `callable`. */ -private predicate localTypeParameter(DotNet::Callable callable, TypeParameter tp) { +private predicate localTypeParameter(Callable callable, TypeParameter tp) { classTypeParameter(callable, tp) or callable.(UnboundGeneric).getATypeParameter() = tp } @@ -37,7 +36,7 @@ private predicate localTypeParameter(DotNet::Callable callable, TypeParameter tp * Holds if `callable` has a parameter of type `tp` * or collection parameterized over type `tp`. */ -private predicate parameter(DotNet::Callable callable, string input, TypeParameter tp) { +private predicate parameter(Callable callable, string input, TypeParameter tp) { exists(Parameter p | input = Specific::parameterAccess(p) and p = callable.getAParameter() and @@ -62,7 +61,7 @@ private string getSyntheticField(TypeParameter tp) { * Gets a models as data string representation of, how a value of type `tp` * can be read or stored implicitly in relation to `callable`. */ -private string implicit(DotNet::Callable callable, TypeParameter tp) { +private string implicit(Callable callable, TypeParameter tp) { classTypeParameter(callable, tp) and not callable.(Modifiable).isStatic() and exists(string access | @@ -77,7 +76,7 @@ private string implicit(DotNet::Callable callable, TypeParameter tp) { /** * Holds if `callable` has a delegate parameter `dt` at parameter position `position`. */ -private predicate delegate(DotNet::Callable callable, DelegateType dt, int position) { +private predicate delegate(Callable callable, DelegateType dt, int position) { exists(Parameter p | p = callable.getAParameter() and dt = p.getType().(SystemLinqExpressions::DelegateExtType).getDelegateType() and @@ -93,7 +92,7 @@ private predicate delegate(DotNet::Callable callable, DelegateType dt, int posit * in every disjunction. */ bindingset[callable] -private string getAccess(DotNet::Callable callable, Type return, TypeParameter tp) { +private string getAccess(Callable callable, Type return, TypeParameter tp) { return = tp and result = "" or genericCollectionType(return, tp) and result = ".Element" @@ -111,7 +110,7 @@ private string getAccess(DotNet::Callable callable, Type return, TypeParameter t * Holds if `input` is a models as data string representation of, how a value of type `tp` * (or a generic parameterized over `tp`) can be generated by a delegate parameter of `callable`. */ -private predicate delegateSource(DotNet::Callable callable, string input, TypeParameter tp) { +private predicate delegateSource(Callable callable, string input, TypeParameter tp) { exists(DelegateType dt, int position, Type return, string access | delegate(callable, dt, position) and return = dt.getReturnType() and @@ -129,7 +128,7 @@ private predicate delegateSource(DotNet::Callable callable, string input, TypePa * (2) The parameters of `callable`. * (3) Any delegate parameters of `callable`. */ -private predicate input(DotNet::Callable callable, string input, TypeParameter tp) { +private predicate input(Callable callable, string input, TypeParameter tp) { input = implicit(callable, tp) or parameter(callable, input, tp) @@ -141,7 +140,7 @@ private predicate input(DotNet::Callable callable, string input, TypeParameter t * Holds if `callable` returns a value of type `tp` (or a generic parameterized over `tp`) and `output` * is a models as data string representation of, how data is routed to the return. */ -private predicate returns(DotNet::Callable callable, TypeParameter tp, string output) { +private predicate returns(Callable callable, TypeParameter tp, string output) { exists(Type return, string access | return = callable.getReturnType() | access = getAccess(callable, return, tp) and output = "ReturnValue" + access @@ -153,7 +152,7 @@ private predicate returns(DotNet::Callable callable, TypeParameter tp, string ou * and `output` is the models as data string representation of, how data is routed to * the delegate parameter. */ -private predicate delegateSink(DotNet::Callable callable, TypeParameter tp, string output) { +private predicate delegateSink(Callable callable, TypeParameter tp, string output) { exists(DelegateType dt, int position, Parameter p | delegate(callable, dt, position) and p = dt.getAParameter() and @@ -170,7 +169,7 @@ private predicate delegateSink(DotNet::Callable callable, TypeParameter tp, stri * (2) The return of `callable`. * (3) Any delegate parameters of `callable`. */ -private predicate output(DotNet::Callable callable, TypeParameter tp, string output) { +private predicate output(Callable callable, TypeParameter tp, string output) { output = implicit(callable, tp) or returns(callable, tp, output) diff --git a/csharp/ql/test/experimental/ir/ir/PrintAst.expected b/csharp/ql/test/experimental/ir/ir/PrintAst.expected deleted file mode 100644 index 242dd277135..00000000000 --- a/csharp/ql/test/experimental/ir/ir/PrintAst.expected +++ /dev/null @@ -1,1379 +0,0 @@ -array.cs: -# 1| [Class] ArrayTest -# 2| 5: [Method] one_dim_init_acc -# 2| -1: [TypeMention] Void -# 3| 4: [BlockStmt] {...} -# 4| 0: [LocalVariableDeclStmt] ... ...; -# 4| 0: [LocalVariableDeclAndInitExpr] Int32[] one_dim = ... -# 4| -1: [TypeMention] Int32[] -# 4| 1: [TypeMention] int -# 4| 0: [LocalVariableAccess] access to local variable one_dim -# 4| 1: [ArrayCreation] array creation of type Int32[] -# 4| -1: [ArrayInitializer] { ..., ... } -# 4| 0: [IntLiteral] 100 -# 4| 1: [IntLiteral] 101 -# 4| 2: [IntLiteral] 102 -# 5| 1: [ExprStmt] ...; -# 5| 0: [AssignExpr] ... = ... -# 5| 0: [ArrayAccess] access to array element -# 5| -1: [LocalVariableAccess] access to local variable one_dim -# 5| 0: [IntLiteral] 0 -# 5| 1: [IntLiteral] 1000 -# 6| 2: [ExprStmt] ...; -# 6| 0: [AssignExpr] ... = ... -# 6| 0: [ArrayAccess] access to array element -# 6| -1: [LocalVariableAccess] access to local variable one_dim -# 6| 0: [IntLiteral] 1 -# 6| 1: [ArrayAccess] access to array element -# 6| -1: [LocalVariableAccess] access to local variable one_dim -# 6| 0: [IntLiteral] 0 -# 7| 3: [ExprStmt] ...; -# 7| 0: [AssignExpr] ... = ... -# 7| 0: [ArrayAccess] access to array element -# 7| -1: [LocalVariableAccess] access to local variable one_dim -# 7| 0: [IntLiteral] 1 -# 7| 1: [IntLiteral] 1003 -# 9| 4: [LocalVariableDeclStmt] ... ...; -# 9| 0: [LocalVariableDeclAndInitExpr] Int32 i = ... -# 9| -1: [TypeMention] int -# 9| 0: [LocalVariableAccess] access to local variable i -# 9| 1: [IntLiteral] 0 -# 10| 5: [ExprStmt] ...; -# 10| 0: [AssignExpr] ... = ... -# 10| 0: [ArrayAccess] access to array element -# 10| -1: [LocalVariableAccess] access to local variable one_dim -# 10| 0: [LocalVariableAccess] access to local variable i -# 10| 1: [IntLiteral] 0 -# 13| 6: [Method] twod_and_init_acc -# 13| -1: [TypeMention] Void -# 14| 4: [BlockStmt] {...} -# 15| 0: [LocalVariableDeclStmt] ... ...; -# 15| 0: [LocalVariableDeclAndInitExpr] Int32[,] a = ... -# 15| -1: [TypeMention] Int32[,] -# 15| 1: [TypeMention] int -# 15| 0: [LocalVariableAccess] access to local variable a -# 15| 1: [ArrayCreation] array creation of type Int32[,] -# 15| -1: [ArrayInitializer] { ..., ... } -# 15| 0: [ArrayInitializer] { ..., ... } -# 15| 0: [IntLiteral] 100 -# 15| 1: [IntLiteral] 101 -# 15| 1: [ArrayInitializer] { ..., ... } -# 15| 0: [IntLiteral] 102 -# 15| 1: [IntLiteral] 103 -# 16| 1: [LocalVariableDeclStmt] ... ...; -# 16| 0: [LocalVariableDeclAndInitExpr] Int32[,] b = ... -# 16| -1: [TypeMention] Int32[,] -# 16| 1: [TypeMention] int -# 16| 0: [LocalVariableAccess] access to local variable b -# 16| 1: [ArrayCreation] array creation of type Int32[,] -# 16| -1: [TypeMention] Int32[,] -# 16| 1: [TypeMention] int -# 16| 0: [IntLiteral] 5 -# 16| 1: [IntLiteral] 5 -# 17| 2: [LocalVariableDeclStmt] ... ...; -# 17| 0: [LocalVariableDeclAndInitExpr] Int32[,] c = ... -# 17| -1: [TypeMention] Int32[,] -# 17| 1: [TypeMention] int -# 17| 0: [LocalVariableAccess] access to local variable c -# 17| 1: [ArrayCreation] array creation of type Int32[,] -# 17| -2: [TypeMention] Int32[,] -# 17| 1: [TypeMention] int -# 17| -1: [ArrayInitializer] { ..., ... } -# 17| 0: [ArrayInitializer] { ..., ... } -# 17| 0: [IntLiteral] 100 -# 17| 1: [IntLiteral] 101 -# 17| 1: [ArrayInitializer] { ..., ... } -# 17| 0: [IntLiteral] 102 -# 17| 1: [IntLiteral] 103 -# 17| 0: [IntLiteral] 2 -# 17| 1: [IntLiteral] 2 -# 18| 3: [LocalVariableDeclStmt] ... ...; -# 18| 0: [LocalVariableDeclAndInitExpr] Int32[,] d = ... -# 18| -1: [TypeMention] Int32[,] -# 18| 1: [TypeMention] int -# 18| 0: [LocalVariableAccess] access to local variable d -# 18| 1: [ArrayCreation] array creation of type Int32[,] -# 18| -2: [TypeMention] Int32[,] -# 18| 1: [TypeMention] int -# 18| -1: [ArrayInitializer] { ..., ... } -# 18| 0: [ArrayInitializer] { ..., ... } -# 18| 0: [IntLiteral] 100 -# 18| 1: [IntLiteral] 101 -# 18| 1: [ArrayInitializer] { ..., ... } -# 18| 0: [IntLiteral] 102 -# 18| 1: [IntLiteral] 103 -# 19| 4: [LocalVariableDeclStmt] ... ...; -# 19| 0: [LocalVariableDeclAndInitExpr] Int32[,] e = ... -# 19| -1: [TypeMention] Int32[,] -# 19| 1: [TypeMention] int -# 19| 0: [LocalVariableAccess] access to local variable e -# 19| 1: [LocalVariableAccess] access to local variable a -# 20| 5: [ExprStmt] ...; -# 20| 0: [AssignExpr] ... = ... -# 20| 0: [ArrayAccess] access to array element -# 20| -1: [LocalVariableAccess] access to local variable e -# 20| 0: [IntLiteral] 1 -# 20| 1: [IntLiteral] 1 -# 20| 1: [UnaryMinusExpr] -... -# 20| 0: [IntLiteral] 1 -assignop.cs: -# 3| [Class] AssignOp -# 5| 5: [Method] Main -# 5| -1: [TypeMention] Void -# 6| 4: [BlockStmt] {...} -# 7| 0: [LocalVariableDeclStmt] ... ...; -# 7| 0: [LocalVariableDeclAndInitExpr] Int32 a = ... -# 7| -1: [TypeMention] int -# 7| 0: [LocalVariableAccess] access to local variable a -# 7| 1: [IntLiteral] 1 -# 8| 1: [LocalVariableDeclStmt] ... ...; -# 8| 0: [LocalVariableDeclAndInitExpr] Int32 c = ... -# 8| -1: [TypeMention] int -# 8| 0: [LocalVariableAccess] access to local variable c -# 8| 1: [IntLiteral] 1 -# 10| 2: [ExprStmt] ...; -# 10| 0: [AssignAddExpr] ... += ... -# 10| 0: [LocalVariableAccess] access to local variable c -# 10| 1: [LocalVariableAccess] access to local variable a -# 11| 3: [ExprStmt] ...; -# 11| 0: [AssignSubExpr] ... -= ... -# 11| 0: [LocalVariableAccess] access to local variable c -# 11| 1: [LocalVariableAccess] access to local variable a -# 12| 4: [ExprStmt] ...; -# 12| 0: [AssignMulExpr] ... *= ... -# 12| 0: [LocalVariableAccess] access to local variable c -# 12| 1: [LocalVariableAccess] access to local variable a -# 13| 5: [ExprStmt] ...; -# 13| 0: [AssignDivExpr] ... /= ... -# 13| 0: [LocalVariableAccess] access to local variable c -# 13| 1: [LocalVariableAccess] access to local variable a -# 14| 6: [ExprStmt] ...; -# 14| 0: [AssignRemExpr] ... %= ... -# 14| 0: [LocalVariableAccess] access to local variable c -# 14| 1: [LocalVariableAccess] access to local variable a -# 15| 7: [ExprStmt] ...; -# 15| 0: [AssignLeftShiftExpr] ... <<= ... -# 15| 0: [LocalVariableAccess] access to local variable c -# 15| 1: [IntLiteral] 2 -# 16| 8: [ExprStmt] ...; -# 16| 0: [AssignRightShiftExpr] ... >>= ... -# 16| 0: [LocalVariableAccess] access to local variable c -# 16| 1: [IntLiteral] 2 -# 17| 9: [ExprStmt] ...; -# 17| 0: [AssignAndExpr] ... &= ... -# 17| 0: [LocalVariableAccess] access to local variable c -# 17| 1: [IntLiteral] 2 -# 18| 10: [ExprStmt] ...; -# 18| 0: [AssignXorExpr] ... ^= ... -# 18| 0: [LocalVariableAccess] access to local variable c -# 18| 1: [IntLiteral] 2 -# 19| 11: [ExprStmt] ...; -# 19| 0: [AssignOrExpr] ... |= ... -# 19| 0: [LocalVariableAccess] access to local variable c -# 19| 1: [IntLiteral] 2 -# 20| 12: [ExprStmt] ...; -# 20| 0: [AssignUnsighedRightShiftExpr] ... >>>= ... -# 20| 0: [LocalVariableAccess] access to local variable c -# 20| 1: [IntLiteral] 2 -casts.cs: -# 1| [Class] Casts_A -# 5| [Class] Casts_B -#-----| 3: (Base types) -# 5| 0: [TypeMention] Casts_A -# 9| [Class] Casts -# 11| 5: [Method] Main -# 11| -1: [TypeMention] Void -# 12| 4: [BlockStmt] {...} -# 13| 0: [LocalVariableDeclStmt] ... ...; -# 13| 0: [LocalVariableDeclAndInitExpr] Casts_A Aobj = ... -# 13| -1: [TypeMention] Casts_A -# 13| 0: [LocalVariableAccess] access to local variable Aobj -# 13| 1: [ObjectCreation] object creation of type Casts_A -# 13| 0: [TypeMention] Casts_A -# 14| 1: [LocalVariableDeclStmt] ... ...; -# 14| 0: [LocalVariableDeclAndInitExpr] Casts_B bobjCE = ... -# 14| -1: [TypeMention] Casts_B -# 14| 0: [LocalVariableAccess] access to local variable bobjCE -# 14| 1: [CastExpr] (...) ... -# 14| 0: [TypeAccess] access to type Casts_B -# 14| 0: [TypeMention] Casts_B -# 14| 1: [LocalVariableAccess] access to local variable Aobj -# 15| 2: [LocalVariableDeclStmt] ... ...; -# 15| 0: [LocalVariableDeclAndInitExpr] Casts_B bobjAS = ... -# 15| -1: [TypeMention] Casts_B -# 15| 0: [LocalVariableAccess] access to local variable bobjAS -# 15| 1: [AsExpr] ... as ... -# 15| 0: [LocalVariableAccess] access to local variable Aobj -# 15| 1: [TypeAccess] access to type Casts_B -# 15| 0: [TypeMention] Casts_B -collections.cs: -# 3| [Class] Collections -# 5| 5: [Class] MyClass -# 7| 5: [Field] a -# 7| -1: [TypeMention] string -# 8| 6: [Field] b -# 8| -1: [TypeMention] string -# 11| 6: [Method] Main -# 11| -1: [TypeMention] Void -# 12| 4: [BlockStmt] {...} -# 13| 0: [LocalVariableDeclStmt] ... ...; -# 13| 0: [LocalVariableDeclAndInitExpr] Dictionary dict = ... -# 13| -1: [TypeMention] Dictionary -# 13| 0: [LocalVariableAccess] access to local variable dict -# 13| 1: [ObjectCreation] object creation of type Dictionary -# 13| -2: [TypeMention] Dictionary -# 13| 1: [TypeMention] int -# 13| 2: [TypeMention] MyClass -# 14| -1: [CollectionInitializer] { ..., ... } -# 15| 0: [ElementInitializer] call to method Add -# 15| 0: [IntLiteral] 0 -# 15| 1: [ObjectCreation] object creation of type MyClass -# 15| -2: [TypeMention] MyClass -# 15| -1: [ObjectInitializer] { ..., ... } -# 15| 0: [MemberInitializer] ... = ... -# 15| 0: [FieldAccess] access to field a -# 15| 1: [StringLiteralUtf16] "Hello" -# 15| 1: [MemberInitializer] ... = ... -# 15| 0: [FieldAccess] access to field b -# 15| 1: [StringLiteralUtf16] "World" -# 16| 1: [ElementInitializer] call to method Add -# 16| 0: [IntLiteral] 1 -# 16| 1: [ObjectCreation] object creation of type MyClass -# 16| -2: [TypeMention] MyClass -# 16| -1: [ObjectInitializer] { ..., ... } -# 16| 0: [MemberInitializer] ... = ... -# 16| 0: [FieldAccess] access to field a -# 16| 1: [StringLiteralUtf16] "Foo" -# 16| 1: [MemberInitializer] ... = ... -# 16| 0: [FieldAccess] access to field b -# 16| 1: [StringLiteralUtf16] "Bar" -constructor_init.cs: -# 1| [Class] BaseClass -# 3| 4: [Field] num -# 3| -1: [TypeMention] int -# 5| 5: [InstanceConstructor] BaseClass -# 6| 4: [BlockStmt] {...} -# 9| 6: [InstanceConstructor] BaseClass -#-----| 2: (Parameters) -# 9| 0: [Parameter] i -# 9| -1: [TypeMention] int -# 10| 4: [BlockStmt] {...} -# 11| 0: [ExprStmt] ...; -# 11| 0: [AssignExpr] ... = ... -# 11| 0: [FieldAccess] access to field num -# 11| 1: [ParameterAccess] access to parameter i -# 15| [Class] DerivedClass -#-----| 3: (Base types) -# 15| 0: [TypeMention] BaseClass -# 17| 4: [InstanceConstructor] DerivedClass -# 17| 3: [ConstructorInitializer] call to constructor BaseClass -# 18| 4: [BlockStmt] {...} -# 21| 5: [InstanceConstructor] DerivedClass -#-----| 2: (Parameters) -# 21| 0: [Parameter] i -# 21| -1: [TypeMention] int -# 21| 3: [ConstructorInitializer] call to constructor BaseClass -# 21| 0: [ParameterAccess] access to parameter i -# 22| 4: [BlockStmt] {...} -# 25| 6: [InstanceConstructor] DerivedClass -#-----| 2: (Parameters) -# 25| 0: [Parameter] i -# 25| -1: [TypeMention] int -# 25| 1: [Parameter] j -# 25| -1: [TypeMention] int -# 25| 3: [ConstructorInitializer] call to constructor DerivedClass -# 25| 0: [ParameterAccess] access to parameter i -# 26| 4: [BlockStmt] {...} -# 29| 7: [Method] Main -# 29| -1: [TypeMention] Void -# 30| 4: [BlockStmt] {...} -# 31| 0: [LocalVariableDeclStmt] ... ...; -# 31| 0: [LocalVariableDeclAndInitExpr] DerivedClass obj1 = ... -# 31| -1: [TypeMention] DerivedClass -# 31| 0: [LocalVariableAccess] access to local variable obj1 -# 31| 1: [ObjectCreation] object creation of type DerivedClass -# 31| 0: [TypeMention] DerivedClass -# 32| 1: [LocalVariableDeclStmt] ... ...; -# 32| 0: [LocalVariableDeclAndInitExpr] DerivedClass obj2 = ... -# 32| -1: [TypeMention] DerivedClass -# 32| 0: [LocalVariableAccess] access to local variable obj2 -# 32| 1: [ObjectCreation] object creation of type DerivedClass -# 32| -1: [TypeMention] DerivedClass -# 32| 0: [IntLiteral] 1 -# 33| 2: [LocalVariableDeclStmt] ... ...; -# 33| 0: [LocalVariableDeclAndInitExpr] DerivedClass obj3 = ... -# 33| -1: [TypeMention] DerivedClass -# 33| 0: [LocalVariableAccess] access to local variable obj3 -# 33| 1: [ObjectCreation] object creation of type DerivedClass -# 33| -1: [TypeMention] DerivedClass -# 33| 0: [IntLiteral] 1 -# 33| 1: [IntLiteral] 2 -crement.cs: -# 1| [Class] CrementOpsTest -# 3| 5: [Method] Main -# 3| -1: [TypeMention] Void -# 4| 4: [BlockStmt] {...} -# 5| 0: [LocalVariableDeclStmt] ... ...; -# 5| 0: [LocalVariableDeclAndInitExpr] Int32 x = ... -# 5| -1: [TypeMention] int -# 5| 0: [LocalVariableAccess] access to local variable x -# 5| 1: [IntLiteral] 10 -# 6| 1: [LocalVariableDeclStmt] ... ...; -# 6| 0: [LocalVariableDeclAndInitExpr] Int32 a = ... -# 6| -1: [TypeMention] int -# 6| 0: [LocalVariableAccess] access to local variable a -# 6| 1: [PostIncrExpr] ...++ -# 6| 0: [LocalVariableAccess] access to local variable x -# 7| 2: [LocalVariableDeclStmt] ... ...; -# 7| 0: [LocalVariableDeclAndInitExpr] Int32 b = ... -# 7| -1: [TypeMention] int -# 7| 0: [LocalVariableAccess] access to local variable b -# 7| 1: [PreDecrExpr] --... -# 7| 0: [LocalVariableAccess] access to local variable x -# 8| 3: [LocalVariableDeclStmt] ... ...; -# 8| 0: [LocalVariableDeclAndInitExpr] Int32 c = ... -# 8| -1: [TypeMention] int -# 8| 0: [LocalVariableAccess] access to local variable c -# 8| 1: [PreIncrExpr] ++... -# 8| 0: [LocalVariableAccess] access to local variable x -# 9| 4: [ExprStmt] ...; -# 9| 0: [AssignExpr] ... = ... -# 9| 0: [LocalVariableAccess] access to local variable x -# 9| 1: [PostDecrExpr] ...-- -# 9| 0: [LocalVariableAccess] access to local variable x -delegates.cs: -# 3| [Class] Delegates -# 4| 5: [DelegateType] Del -#-----| 2: (Parameters) -# 4| 0: [Parameter] num -# 4| -1: [TypeMention] int -# 6| 6: [Method] returns -# 6| -1: [TypeMention] int -#-----| 2: (Parameters) -# 6| 0: [Parameter] ret -# 6| -1: [TypeMention] int -# 7| 4: [BlockStmt] {...} -# 8| 0: [ReturnStmt] return ...; -# 8| 0: [ParameterAccess] access to parameter ret -# 11| 7: [Method] Main -# 11| -1: [TypeMention] Void -# 11| 4: [BlockStmt] {...} -# 12| 0: [LocalVariableDeclStmt] ... ...; -# 12| 0: [LocalVariableDeclAndInitExpr] Del del1 = ... -# 12| -1: [TypeMention] Del -# 12| 0: [LocalVariableAccess] access to local variable del1 -# 12| 1: [ExplicitDelegateCreation] delegate creation of type Del -# 12| -1: [TypeMention] Del -# 12| 0: [MethodAccess] access to method returns -# 13| 1: [ExprStmt] ...; -# 13| 0: [DelegateCall] delegate call -# 13| -1: [LocalVariableAccess] access to local variable del1 -# 13| 0: [IntLiteral] 5 -events.cs: -# 1| [Class] Events -# 3| 4: [DelegateType] MyDel -#-----| 2: (Parameters) -# 3| 0: [Parameter] str -# 3| -1: [TypeMention] string -# 4| 5: [Field] Inst -# 4| -1: [TypeMention] MyDel -# 6| 6: [Event] MyEvent -# 6| -1: [TypeMention] MyDel -# 6| 3: [AddEventAccessor] add_MyEvent -#-----| 2: (Parameters) -# 6| 0: [Parameter] value -# 6| 4: [RemoveEventAccessor] remove_MyEvent -#-----| 2: (Parameters) -# 6| 0: [Parameter] value -# 8| 7: [InstanceConstructor] Events -# 9| 4: [BlockStmt] {...} -# 10| 0: [ExprStmt] ...; -# 10| 0: [AssignExpr] ... = ... -# 10| 0: [FieldAccess] access to field Inst -# 10| -1: [ThisAccess] this access -# 10| 1: [ExplicitDelegateCreation] delegate creation of type MyDel -# 10| -1: [TypeMention] MyDel -# 10| 0: [MethodAccess] access to method Fun -# 10| -1: [ThisAccess] this access -# 13| 8: [Method] AddEvent -# 13| -1: [TypeMention] Void -# 14| 4: [BlockStmt] {...} -# 15| 0: [ExprStmt] ...; -# 15| 0: [AddEventExpr] ... += ... -# 15| 0: [EventAccess,EventCall] access to event MyEvent -# 15| -1: [ThisAccess] this access -# 15| 1: [FieldAccess] access to field Inst -# 15| -1: [ThisAccess] this access -# 18| 9: [Method] RemoveEvent -# 18| -1: [TypeMention] Void -# 19| 4: [BlockStmt] {...} -# 20| 0: [ExprStmt] ...; -# 20| 0: [RemoveEventExpr] ... -= ... -# 20| 0: [EventAccess,EventCall] access to event MyEvent -# 20| -1: [ThisAccess] this access -# 20| 1: [FieldAccess] access to field Inst -# 20| -1: [ThisAccess] this access -# 23| 10: [Method] Fun -# 23| -1: [TypeMention] string -#-----| 2: (Parameters) -# 23| 0: [Parameter] str -# 23| -1: [TypeMention] string -# 24| 4: [BlockStmt] {...} -# 25| 0: [ReturnStmt] return ...; -# 25| 0: [ParameterAccess] access to parameter str -# 28| 11: [Method] Main -# 28| -1: [TypeMention] Void -#-----| 2: (Parameters) -# 28| 0: [Parameter] args -# 28| -1: [TypeMention] String[] -# 28| 1: [TypeMention] string -# 29| 4: [BlockStmt] {...} -# 30| 0: [LocalVariableDeclStmt] ... ...; -# 30| 0: [LocalVariableDeclAndInitExpr] Events obj = ... -# 30| -1: [TypeMention] Events -# 30| 0: [LocalVariableAccess] access to local variable obj -# 30| 1: [ObjectCreation] object creation of type Events -# 30| 0: [TypeMention] Events -# 31| 1: [ExprStmt] ...; -# 31| 0: [MethodCall] call to method AddEvent -# 31| -1: [LocalVariableAccess] access to local variable obj -# 32| 2: [LocalVariableDeclStmt] ... ...; -# 32| 0: [LocalVariableDeclAndInitExpr] String result = ... -# 32| -1: [TypeMention] string -# 32| 0: [LocalVariableAccess] access to local variable result -# 32| 1: [DelegateCall] delegate call -# 32| -1: [LocalVariableAccess] access to local variable obj -# 32| 0: [StringLiteralUtf16] "string" -# 33| 3: [ExprStmt] ...; -# 33| 0: [MethodCall] call to method RemoveEvent -# 33| -1: [LocalVariableAccess] access to local variable obj -foreach.cs: -# 3| [Class] ForEach -# 4| 5: [Method] Main -# 4| -1: [TypeMention] Void -# 4| 4: [BlockStmt] {...} -# 5| 0: [LocalVariableDeclStmt] ... ...; -# 5| 0: [LocalVariableDeclAndInitExpr] Int32[] a_array = ... -# 5| -1: [TypeMention] Int32[] -# 5| 1: [TypeMention] int -# 5| 0: [LocalVariableAccess] access to local variable a_array -# 5| 1: [ArrayCreation] array creation of type Int32[] -# 5| -2: [TypeMention] Int32[] -# 5| 1: [TypeMention] int -# 5| -1: [ArrayInitializer] { ..., ... } -# 5| 0: [IntLiteral] 1 -# 5| 1: [IntLiteral] 2 -# 5| 2: [IntLiteral] 3 -# 5| 3: [IntLiteral] 4 -# 5| 4: [IntLiteral] 5 -# 5| 5: [IntLiteral] 6 -# 5| 6: [IntLiteral] 7 -# 7| 1: [ForeachStmt] foreach (... ... in ...) ... -# 7| 0: [LocalVariableDeclExpr] Int32 items -# 7| 0: [TypeMention] int -# 7| 1: [LocalVariableAccess] access to local variable a_array -# 8| 2: [BlockStmt] {...} -# 9| 0: [LocalVariableDeclStmt] ... ...; -# 9| 0: [LocalVariableDeclAndInitExpr] Int32 x = ... -# 9| -1: [TypeMention] int -# 9| 0: [LocalVariableAccess] access to local variable x -# 9| 1: [LocalVariableAccess] access to local variable items -func_with_param_call.cs: -# 3| [Class] test_call_with_param -# 5| 5: [Method] f -# 5| -1: [TypeMention] int -#-----| 2: (Parameters) -# 5| 0: [Parameter] x -# 5| -1: [TypeMention] int -# 5| 1: [Parameter] y -# 5| -1: [TypeMention] int -# 6| 4: [BlockStmt] {...} -# 7| 0: [ReturnStmt] return ...; -# 7| 0: [AddExpr] ... + ... -# 7| 0: [ParameterAccess] access to parameter x -# 7| 1: [ParameterAccess] access to parameter y -# 10| 6: [Method] g -# 10| -1: [TypeMention] int -# 11| 4: [BlockStmt] {...} -# 12| 0: [ReturnStmt] return ...; -# 12| 0: [MethodCall] call to method f -# 12| 0: [IntLiteral] 2 -# 12| 1: [IntLiteral] 3 -indexers.cs: -# 1| [Class] Indexers -# 3| 5: [Class] MyClass -# 5| 5: [Field] address -# 5| -1: [TypeMention] String[] -# 5| 1: [TypeMention] string -# 5| 1: [AssignExpr] ... = ... -# 5| 0: [FieldAccess] access to field address -# 5| 1: [ArrayCreation] array creation of type String[] -# 5| -1: [TypeMention] String[] -# 5| 1: [TypeMention] string -# 5| 0: [IntLiteral] 2 -# 6| 6: [Indexer] Item -# 6| -1: [TypeMention] string -#-----| 1: (Parameters) -# 6| 0: [Parameter] index -# 6| -1: [TypeMention] int -# 8| 3: [Getter] get_Item -#-----| 2: (Parameters) -# 6| 0: [Parameter] index -# 9| 4: [BlockStmt] {...} -# 10| 0: [ReturnStmt] return ...; -# 10| 0: [ArrayAccess] access to array element -# 10| -1: [FieldAccess] access to field address -# 10| 0: [ParameterAccess] access to parameter index -# 12| 4: [Setter] set_Item -#-----| 2: (Parameters) -# 6| 0: [Parameter] index -# 12| 1: [Parameter] value -# 13| 4: [BlockStmt] {...} -# 14| 0: [ExprStmt] ...; -# 14| 0: [AssignExpr] ... = ... -# 14| 0: [ArrayAccess] access to array element -# 14| -1: [FieldAccess] access to field address -# 14| 0: [ParameterAccess] access to parameter index -# 14| 1: [ParameterAccess] access to parameter value -# 19| 6: [Method] Main -# 19| -1: [TypeMention] Void -# 20| 4: [BlockStmt] {...} -# 21| 0: [LocalVariableDeclStmt] ... ...; -# 21| 0: [LocalVariableDeclAndInitExpr] MyClass inst = ... -# 21| -1: [TypeMention] MyClass -# 21| 0: [LocalVariableAccess] access to local variable inst -# 21| 1: [ObjectCreation] object creation of type MyClass -# 21| 0: [TypeMention] MyClass -# 22| 1: [ExprStmt] ...; -# 22| 0: [AssignExpr] ... = ... -# 22| 0: [IndexerCall] access to indexer -# 22| -1: [LocalVariableAccess] access to local variable inst -# 22| 0: [IntLiteral] 0 -# 22| 1: [StringLiteralUtf16] "str1" -# 23| 2: [ExprStmt] ...; -# 23| 0: [AssignExpr] ... = ... -# 23| 0: [IndexerCall] access to indexer -# 23| -1: [LocalVariableAccess] access to local variable inst -# 23| 0: [IntLiteral] 1 -# 23| 1: [StringLiteralUtf16] "str1" -# 24| 3: [ExprStmt] ...; -# 24| 0: [AssignExpr] ... = ... -# 24| 0: [IndexerCall] access to indexer -# 24| -1: [LocalVariableAccess] access to local variable inst -# 24| 0: [IntLiteral] 1 -# 24| 1: [IndexerCall] access to indexer -# 24| -1: [LocalVariableAccess] access to local variable inst -# 24| 0: [IntLiteral] 0 -inheritance_polymorphism.cs: -# 1| [Class] A -# 3| 5: [Method] function -# 3| -1: [TypeMention] int -# 4| 4: [BlockStmt] {...} -# 5| 0: [ReturnStmt] return ...; -# 5| 0: [IntLiteral] 0 -# 9| [Class] B -#-----| 3: (Base types) -# 9| 0: [TypeMention] A -# 13| [Class] C -#-----| 3: (Base types) -# 13| 0: [TypeMention] B -# 15| 5: [Method] function -# 15| -1: [TypeMention] int -# 16| 4: [BlockStmt] {...} -# 17| 0: [ReturnStmt] return ...; -# 17| 0: [IntLiteral] 1 -# 21| [Class] Program -# 23| 5: [Method] Main -# 23| -1: [TypeMention] Void -# 24| 4: [BlockStmt] {...} -# 25| 0: [LocalVariableDeclStmt] ... ...; -# 25| 0: [LocalVariableDeclAndInitExpr] B objB = ... -# 25| -1: [TypeMention] B -# 25| 0: [LocalVariableAccess] access to local variable objB -# 25| 1: [ObjectCreation] object creation of type B -# 25| 0: [TypeMention] B -# 26| 1: [ExprStmt] ...; -# 26| 0: [MethodCall] call to method function -# 26| -1: [LocalVariableAccess] access to local variable objB -# 29| 2: [LocalVariableDeclStmt] ... ...; -# 29| 0: [LocalVariableDeclExpr] A objA -# 29| 0: [TypeMention] A -# 30| 3: [ExprStmt] ...; -# 30| 0: [AssignExpr] ... = ... -# 30| 0: [LocalVariableAccess] access to local variable objA -# 30| 1: [LocalVariableAccess] access to local variable objB -# 31| 4: [ExprStmt] ...; -# 31| 0: [MethodCall] call to method function -# 31| -1: [LocalVariableAccess] access to local variable objA -# 33| 5: [LocalVariableDeclStmt] ... ...; -# 33| 0: [LocalVariableDeclAndInitExpr] A objC = ... -# 33| -1: [TypeMention] A -# 33| 0: [LocalVariableAccess] access to local variable objC -# 33| 1: [ObjectCreation] object creation of type C -# 33| 0: [TypeMention] C -# 34| 6: [ExprStmt] ...; -# 34| 0: [MethodCall] call to method function -# 34| -1: [LocalVariableAccess] access to local variable objC -inoutref.cs: -# 1| [Class] MyClass -# 2| 5: [Field] fld -# 2| -1: [TypeMention] int -# 5| [Struct] MyStruct -# 6| 5: [Field] fld -# 6| -1: [TypeMention] int -# 9| [Class] InOutRef -# 11| 5: [Method] set -# 11| -1: [TypeMention] Void -#-----| 2: (Parameters) -# 11| 0: [Parameter] o1 -# 11| -1: [TypeMention] MyClass -# 11| 1: [Parameter] o2 -# 11| -1: [TypeMention] MyClass -# 12| 4: [BlockStmt] {...} -# 13| 0: [ExprStmt] ...; -# 13| 0: [AssignExpr] ... = ... -# 13| 0: [ParameterAccess] access to parameter o1 -# 13| 1: [ParameterAccess] access to parameter o2 -# 16| 6: [Method] F -# 16| -1: [TypeMention] Void -#-----| 2: (Parameters) -# 16| 0: [Parameter] a -# 16| -1: [TypeMention] int -# 16| 1: [Parameter] b -# 16| -1: [TypeMention] MyStruct -# 16| 2: [Parameter] b1 -# 16| -1: [TypeMention] MyStruct -# 16| 3: [Parameter] c -# 16| -1: [TypeMention] MyClass -# 16| 4: [Parameter] c1 -# 16| -1: [TypeMention] MyClass -# 17| 4: [BlockStmt] {...} -# 18| 0: [ExprStmt] ...; -# 18| 0: [AssignExpr] ... = ... -# 18| 0: [FieldAccess] access to field fld -# 18| -1: [ParameterAccess] access to parameter b -# 18| 1: [IntLiteral] 0 -# 19| 1: [ExprStmt] ...; -# 19| 0: [AssignExpr] ... = ... -# 19| 0: [ParameterAccess] access to parameter a -# 19| 1: [FieldAccess] access to field fld -# 19| -1: [ParameterAccess] access to parameter b -# 21| 2: [ExprStmt] ...; -# 21| 0: [AssignExpr] ... = ... -# 21| 0: [FieldAccess] access to field fld -# 21| -1: [ParameterAccess] access to parameter c -# 21| 1: [IntLiteral] 10 -# 22| 3: [ExprStmt] ...; -# 22| 0: [AssignExpr] ... = ... -# 22| 0: [ParameterAccess] access to parameter a -# 22| 1: [FieldAccess] access to field fld -# 22| -1: [ParameterAccess] access to parameter c -# 24| 4: [ExprStmt] ...; -# 24| 0: [AssignExpr] ... = ... -# 24| 0: [ParameterAccess] access to parameter b -# 24| 1: [ParameterAccess] access to parameter b1 -# 26| 5: [ExprStmt] ...; -# 26| 0: [MethodCall] call to method set -# 26| 0: [ParameterAccess] access to parameter c -# 26| 1: [ParameterAccess] access to parameter c1 -# 29| 7: [Method] Main -# 29| -1: [TypeMention] Void -# 30| 4: [BlockStmt] {...} -# 31| 0: [LocalVariableDeclStmt] ... ...; -# 31| 0: [LocalVariableDeclAndInitExpr] Int32 a = ... -# 31| -1: [TypeMention] int -# 31| 0: [LocalVariableAccess] access to local variable a -# 31| 1: [IntLiteral] 0 -# 32| 1: [LocalVariableDeclStmt] ... ...; -# 32| 0: [LocalVariableDeclAndInitExpr] MyStruct b = ... -# 32| -1: [TypeMention] MyStruct -# 32| 0: [LocalVariableAccess] access to local variable b -# 32| 1: [ObjectCreation] object creation of type MyStruct -# 32| 0: [TypeMention] MyStruct -# 33| 2: [LocalVariableDeclStmt] ... ...; -# 33| 0: [LocalVariableDeclAndInitExpr] MyClass c = ... -# 33| -1: [TypeMention] MyClass -# 33| 0: [LocalVariableAccess] access to local variable c -# 33| 1: [ObjectCreation] object creation of type MyClass -# 33| 0: [TypeMention] MyClass -# 34| 3: [ExprStmt] ...; -# 34| 0: [MethodCall] call to method F -# 34| 0: [LocalVariableAccess] access to local variable a -# 34| 1: [LocalVariableAccess] access to local variable b -# 34| 2: [LocalVariableAccess] access to local variable b -# 34| 3: [LocalVariableAccess] access to local variable c -# 34| 4: [LocalVariableAccess] access to local variable c -# 36| 4: [LocalVariableDeclStmt] ... ...; -# 36| 0: [LocalVariableDeclAndInitExpr] Int32 x = ... -# 36| -1: [TypeMention] int -# 36| 0: [LocalVariableAccess] access to local variable x -# 36| 1: [FieldAccess] access to field fld -# 36| -1: [LocalVariableAccess] access to local variable b -isexpr.cs: -# 1| [Class] Is_A -# 3| 5: [Field] x -# 3| -1: [TypeMention] int -# 6| [Class] IsExpr -# 8| 5: [Method] Main -# 8| -1: [TypeMention] Void -# 9| 4: [BlockStmt] {...} -# 10| 0: [LocalVariableDeclStmt] ... ...; -# 10| 0: [LocalVariableDeclAndInitExpr] Is_A obj = ... -# 10| -1: [TypeMention] Is_A -# 10| 0: [LocalVariableAccess] access to local variable obj -# 10| 1: [NullLiteral] null -# 12| 1: [LocalVariableDeclStmt] ... ...; -# 12| 0: [LocalVariableDeclAndInitExpr] Object o = ... -# 12| -1: [TypeMention] object -# 12| 0: [LocalVariableAccess] access to local variable o -# 12| 1: [LocalVariableAccess] access to local variable obj -# 13| 2: [IfStmt] if (...) ... -# 13| 0: [IsExpr] ... is ... -# 13| 0: [LocalVariableAccess] access to local variable o -# 13| 1: [VariablePatternExpr] Is_A tmp -# 13| 0: [TypeMention] Is_A -# 14| 1: [BlockStmt] {...} -# 15| 0: [LocalVariableDeclStmt] ... ...; -# 15| 0: [LocalVariableDeclAndInitExpr] Int32 res = ... -# 15| -1: [TypeMention] int -# 15| 0: [LocalVariableAccess] access to local variable res -# 15| 1: [FieldAccess] access to field x -# 15| -1: [LocalVariableAccess] access to local variable tmp -# 17| 3: [IfStmt] if (...) ... -# 17| 0: [IsExpr] ... is ... -# 17| 0: [LocalVariableAccess] access to local variable o -# 17| 1: [TypeAccessPatternExpr] access to type Is_A -# 17| 0: [TypeMention] Is_A -# 18| 1: [BlockStmt] {...} -jumps.cs: -# 3| [Class] Jumps -# 5| 5: [Method] Main -# 5| -1: [TypeMention] Void -# 6| 4: [BlockStmt] {...} -# 7| 0: [ForStmt] for (...;...;...) ... -# 7| -1: [LocalVariableDeclAndInitExpr] Int32 i = ... -# 7| -1: [TypeMention] int -# 7| 0: [LocalVariableAccess] access to local variable i -# 7| 1: [IntLiteral] 1 -# 7| 0: [LEExpr] ... <= ... -# 7| 0: [LocalVariableAccess] access to local variable i -# 7| 1: [IntLiteral] 10 -# 7| 1: [PostIncrExpr] ...++ -# 7| 0: [LocalVariableAccess] access to local variable i -# 8| 2: [BlockStmt] {...} -# 9| 0: [IfStmt] if (...) ... -# 9| 0: [EQExpr] ... == ... -# 9| 0: [LocalVariableAccess] access to local variable i -# 9| 1: [IntLiteral] 3 -# 10| 1: [ContinueStmt] continue; -# 11| 2: [IfStmt] if (...) ... -# 11| 0: [EQExpr] ... == ... -# 11| 0: [LocalVariableAccess] access to local variable i -# 11| 1: [IntLiteral] 5 -# 12| 1: [BreakStmt] break; -# 13| 1: [ExprStmt] ...; -# 13| 0: [MethodCall] call to method WriteLine -# 13| -1: [TypeAccess] access to type Console -# 13| 0: [TypeMention] Console -# 13| 0: [StringLiteralUtf16] "BreakAndContinue" -# 16| 1: [ForStmt] for (...;...;...) ... -# 16| -1: [LocalVariableDeclAndInitExpr] Int32 i = ... -# 16| -1: [TypeMention] int -# 16| 0: [LocalVariableAccess] access to local variable i -# 16| 1: [IntLiteral] 0 -# 16| 0: [LTExpr] ... < ... -# 16| 0: [LocalVariableAccess] access to local variable i -# 16| 1: [IntLiteral] 10 -# 17| 1: [BlockStmt] {...} -# 18| 0: [ExprStmt] ...; -# 18| 0: [PostIncrExpr] ...++ -# 18| 0: [LocalVariableAccess] access to local variable i -# 19| 1: [ContinueStmt] continue; -# 22| 2: [LocalVariableDeclStmt] ... ...; -# 22| 0: [LocalVariableDeclAndInitExpr] Int32 a = ... -# 22| -1: [TypeMention] int -# 22| 0: [LocalVariableAccess] access to local variable a -# 22| 1: [IntLiteral] 0 -# 23| 3: [WhileStmt] while (...) ... -# 23| 0: [BoolLiteral] true -# 24| 1: [BlockStmt] {...} -# 25| 0: [ExprStmt] ...; -# 25| 0: [PostIncrExpr] ...++ -# 25| 0: [LocalVariableAccess] access to local variable a -# 26| 1: [IfStmt] if (...) ... -# 26| 0: [EQExpr] ... == ... -# 26| 0: [LocalVariableAccess] access to local variable a -# 26| 1: [IntLiteral] 5 -# 27| 1: [ContinueStmt] continue; -# 28| 2: [IfStmt] if (...) ... -# 28| 0: [EQExpr] ... == ... -# 28| 0: [LocalVariableAccess] access to local variable a -# 28| 1: [IntLiteral] 10 -# 29| 1: [BreakStmt] break; -# 32| 4: [ForStmt] for (...;...;...) ... -# 32| -1: [LocalVariableDeclAndInitExpr] Int32 i = ... -# 32| -1: [TypeMention] int -# 32| 0: [LocalVariableAccess] access to local variable i -# 32| 1: [IntLiteral] 1 -# 32| 0: [LEExpr] ... <= ... -# 32| 0: [LocalVariableAccess] access to local variable i -# 32| 1: [IntLiteral] 10 -# 32| 1: [PostIncrExpr] ...++ -# 32| 0: [LocalVariableAccess] access to local variable i -# 33| 2: [BlockStmt] {...} -# 34| 0: [IfStmt] if (...) ... -# 34| 0: [EQExpr] ... == ... -# 34| 0: [LocalVariableAccess] access to local variable i -# 34| 1: [IntLiteral] 5 -# 35| 1: [GotoLabelStmt] goto ...; -# 37| 5: [LabelStmt] done: -# 38| 6: [ExprStmt] ...; -# 38| 0: [MethodCall] call to method WriteLine -# 38| -1: [TypeAccess] access to type Console -# 38| 0: [TypeMention] Console -# 38| 0: [StringLiteralUtf16] "Done" -lock.cs: -# 3| [Class] LockTest -# 5| 5: [Method] A -# 5| -1: [TypeMention] Void -# 6| 4: [BlockStmt] {...} -# 7| 0: [LocalVariableDeclStmt] ... ...; -# 7| 0: [LocalVariableDeclAndInitExpr] Object object = ... -# 7| -1: [TypeMention] object -# 7| 0: [LocalVariableAccess] access to local variable object -# 7| 1: [ObjectCreation] object creation of type Object -# 7| 0: [TypeMention] object -# 8| 1: [LockStmt] lock (...) {...} -# 8| 0: [LocalVariableAccess] access to local variable object -# 9| 1: [BlockStmt] {...} -# 10| 0: [ExprStmt] ...; -# 10| 0: [MethodCall] call to method WriteLine -# 10| -1: [TypeAccess] access to type Console -# 10| 0: [TypeMention] Console -# 10| 0: [MethodCall] call to method ToString -# 10| -1: [LocalVariableAccess] access to local variable object -obj_creation.cs: -# 1| [Class] ObjCreation -# 3| 5: [Class] MyClass -# 5| 4: [Field] x -# 5| -1: [TypeMention] int -# 7| 5: [InstanceConstructor] MyClass -# 8| 4: [BlockStmt] {...} -# 11| 6: [InstanceConstructor] MyClass -#-----| 2: (Parameters) -# 11| 0: [Parameter] _x -# 11| -1: [TypeMention] int -# 12| 4: [BlockStmt] {...} -# 13| 0: [ExprStmt] ...; -# 13| 0: [AssignExpr] ... = ... -# 13| 0: [FieldAccess] access to field x -# 13| 1: [ParameterAccess] access to parameter _x -# 17| 6: [Method] SomeFun -# 17| -1: [TypeMention] Void -#-----| 2: (Parameters) -# 17| 0: [Parameter] x -# 17| -1: [TypeMention] MyClass -# 18| 4: [BlockStmt] {...} -# 21| 7: [Method] Main -# 21| -1: [TypeMention] Void -# 22| 4: [BlockStmt] {...} -# 23| 0: [LocalVariableDeclStmt] ... ...; -# 23| 0: [LocalVariableDeclAndInitExpr] MyClass obj = ... -# 23| -1: [TypeMention] MyClass -# 23| 0: [LocalVariableAccess] access to local variable obj -# 23| 1: [ObjectCreation] object creation of type MyClass -# 23| -1: [TypeMention] MyClass -# 23| 0: [IntLiteral] 100 -# 24| 1: [LocalVariableDeclStmt] ... ...; -# 24| 0: [LocalVariableDeclAndInitExpr] MyClass obj_initlist = ... -# 24| -1: [TypeMention] MyClass -# 24| 0: [LocalVariableAccess] access to local variable obj_initlist -# 24| 1: [ObjectCreation] object creation of type MyClass -# 24| -2: [TypeMention] MyClass -# 24| -1: [ObjectInitializer] { ..., ... } -# 24| 0: [MemberInitializer] ... = ... -# 24| 0: [FieldAccess] access to field x -# 24| 1: [IntLiteral] 101 -# 25| 2: [LocalVariableDeclStmt] ... ...; -# 25| 0: [LocalVariableDeclAndInitExpr] Int32 a = ... -# 25| -1: [TypeMention] int -# 25| 0: [LocalVariableAccess] access to local variable a -# 25| 1: [FieldAccess] access to field x -# 25| -1: [LocalVariableAccess] access to local variable obj -# 27| 3: [ExprStmt] ...; -# 27| 0: [MethodCall] call to method SomeFun -# 27| 0: [ObjectCreation] object creation of type MyClass -# 27| -1: [TypeMention] MyClass -# 27| 0: [IntLiteral] 100 -pointers.cs: -# 1| [Class] Pointers -# 3| 5: [Method] addone -# 3| -1: [TypeMention] Void -#-----| 2: (Parameters) -# 3| 0: [Parameter] arr -# 3| -1: [TypeMention] Int32[] -# 3| 1: [TypeMention] int -# 4| 4: [BlockStmt] {...} -# 5| 0: [LocalVariableDeclStmt] ... ...; -# 5| 0: [LocalVariableDeclAndInitExpr] Int32 length = ... -# 5| -1: [TypeMention] int -# 5| 0: [LocalVariableAccess] access to local variable length -# 5| 1: [PropertyCall] access to property Length -# 5| -1: [ParameterAccess] access to parameter arr -# 6| 1: [FixedStmt] fixed(...) { ... } -# 6| -1: [LocalVariableDeclAndInitExpr] Int32* b = ... -# 6| -1: [TypeMention] int* -# 6| 1: [TypeMention] int -# 6| 0: [LocalVariableAccess] access to local variable b -# 6| 1: [CastExpr] (...) ... -# 6| 1: [ParameterAccess] access to parameter arr -# 7| 0: [BlockStmt] {...} -# 8| 0: [LocalVariableDeclStmt] ... ...; -# 8| 0: [LocalVariableDeclAndInitExpr] Int32* p = ... -# 8| -1: [TypeMention] int* -# 8| 1: [TypeMention] int -# 8| 0: [LocalVariableAccess] access to local variable p -# 8| 1: [LocalVariableAccess] access to local variable b -# 9| 1: [ForStmt] for (...;...;...) ... -# 9| -1: [LocalVariableDeclAndInitExpr] Int32 i = ... -# 9| -1: [TypeMention] int -# 9| 0: [LocalVariableAccess] access to local variable i -# 9| 1: [IntLiteral] 0 -# 9| 0: [LTExpr] ... < ... -# 9| 0: [LocalVariableAccess] access to local variable i -# 9| 1: [LocalVariableAccess] access to local variable length -# 9| 1: [PostIncrExpr] ...++ -# 9| 0: [LocalVariableAccess] access to local variable i -# 10| 2: [ExprStmt] ...; -# 10| 0: [AssignAddExpr] ... += ... -# 10| 0: [PointerIndirectionExpr] *... -# 10| 0: [PostIncrExpr] ...++ -# 10| 0: [LocalVariableAccess] access to local variable p -# 10| 1: [IntLiteral] 1 -# 14| 6: [Class] MyClass -# 16| 5: [Field] fld1 -# 16| -1: [TypeMention] int -# 17| 6: [Field] fld2 -# 17| -1: [TypeMention] int -# 20| 7: [Struct] MyStruct -# 22| 5: [Field] fld -# 22| -1: [TypeMention] int -# 25| 8: [Method] Main -# 25| -1: [TypeMention] Void -# 25| 4: [BlockStmt] {...} -# 26| 0: [LocalVariableDeclStmt] ... ...; -# 26| 0: [LocalVariableDeclAndInitExpr] MyClass o = ... -# 26| -1: [TypeMention] MyClass -# 26| 0: [LocalVariableAccess] access to local variable o -# 26| 1: [ObjectCreation] object creation of type MyClass -# 26| 0: [TypeMention] MyClass -# 27| 1: [LocalVariableDeclStmt] ... ...; -# 27| 0: [LocalVariableDeclAndInitExpr] MyStruct s = ... -# 27| -1: [TypeMention] MyStruct -# 27| 0: [LocalVariableAccess] access to local variable s -# 27| 1: [ObjectCreation] object creation of type MyStruct -# 27| 0: [TypeMention] MyStruct -# 28| 2: [UnsafeStmt] unsafe {...} -# 29| 0: [BlockStmt] {...} -# 30| 0: [FixedStmt] fixed(...) { ... } -# 30| -2: [LocalVariableDeclAndInitExpr] Int32* q = ... -# 30| -1: [TypeMention] int* -# 30| 1: [TypeMention] int -# 30| 0: [LocalVariableAccess] access to local variable q -# 30| 1: [AddressOfExpr] &... -# 30| 0: [FieldAccess] access to field fld2 -# 30| -1: [LocalVariableAccess] access to local variable o -# 30| -1: [LocalVariableDeclAndInitExpr] Int32* p = ... -# 30| -1: [TypeMention] int* -# 30| 1: [TypeMention] int -# 30| 0: [LocalVariableAccess] access to local variable p -# 30| 1: [AddressOfExpr] &... -# 30| 0: [FieldAccess] access to field fld1 -# 30| -1: [LocalVariableAccess] access to local variable o -# 31| 0: [BlockStmt] {...} -# 32| 0: [ExprStmt] ...; -# 32| 0: [AssignExpr] ... = ... -# 32| 0: [PointerIndirectionExpr] *... -# 32| 0: [LocalVariableAccess] access to local variable p -# 32| 1: [IntLiteral] 0 -# 33| 1: [ExprStmt] ...; -# 33| 0: [AssignExpr] ... = ... -# 33| 0: [PointerIndirectionExpr] *... -# 33| 0: [LocalVariableAccess] access to local variable q -# 33| 1: [IntLiteral] 0 -# 34| 2: [LocalVariableDeclStmt] ... ...; -# 34| 0: [LocalVariableDeclAndInitExpr] MyStruct* r = ... -# 34| -1: [TypeMention] MyStruct* -# 34| 1: [TypeMention] MyStruct -# 34| 0: [LocalVariableAccess] access to local variable r -# 34| 1: [AddressOfExpr] &... -# 34| 0: [LocalVariableAccess] access to local variable s -# 35| 3: [ExprStmt] ...; -# 35| 0: [AssignExpr] ... = ... -# 35| 0: [FieldAccess] access to field fld -# 35| -1: [PointerIndirectionExpr] *... -# 35| 0: [LocalVariableAccess] access to local variable r -# 35| 1: [IntLiteral] 0 -# 39| 3: [LocalVariableDeclStmt] ... ...; -# 39| 0: [LocalVariableDeclAndInitExpr] Int32[] arr = ... -# 39| -1: [TypeMention] Int32[] -# 39| 1: [TypeMention] int -# 39| 0: [LocalVariableAccess] access to local variable arr -# 39| 1: [ArrayCreation] array creation of type Int32[] -# 39| -1: [ArrayInitializer] { ..., ... } -# 39| 0: [IntLiteral] 1 -# 39| 1: [IntLiteral] 2 -# 39| 2: [IntLiteral] 3 -# 40| 4: [ExprStmt] ...; -# 40| 0: [MethodCall] call to method addone -# 40| 0: [LocalVariableAccess] access to local variable arr -prop.cs: -# 1| [Class] PropClass -# 3| 5: [Field] prop -# 3| -1: [TypeMention] int -# 5| 6: [Property] Prop -# 5| -1: [TypeMention] int -# 7| 3: [Getter] get_Prop -# 8| 4: [BlockStmt] {...} -# 9| 0: [ReturnStmt] return ...; -# 9| 0: [MethodCall] call to method func -# 12| 4: [Setter] set_Prop -#-----| 2: (Parameters) -# 12| 0: [Parameter] value -# 13| 4: [BlockStmt] {...} -# 14| 0: [ExprStmt] ...; -# 14| 0: [AssignExpr] ... = ... -# 14| 0: [FieldAccess] access to field prop -# 14| 1: [ParameterAccess] access to parameter value -# 18| 7: [Method] func -# 18| -1: [TypeMention] int -# 19| 4: [BlockStmt] {...} -# 20| 0: [ReturnStmt] return ...; -# 20| 0: [IntLiteral] 0 -# 24| [Class] Prog -# 26| 5: [Method] Main -# 26| -1: [TypeMention] Void -# 27| 4: [BlockStmt] {...} -# 28| 0: [LocalVariableDeclStmt] ... ...; -# 28| 0: [LocalVariableDeclAndInitExpr] PropClass obj = ... -# 28| -1: [TypeMention] PropClass -# 28| 0: [LocalVariableAccess] access to local variable obj -# 28| 1: [ObjectCreation] object creation of type PropClass -# 28| 0: [TypeMention] PropClass -# 29| 1: [ExprStmt] ...; -# 29| 0: [AssignExpr] ... = ... -# 29| 0: [PropertyCall] access to property Prop -# 29| -1: [LocalVariableAccess] access to local variable obj -# 29| 1: [IntLiteral] 5 -# 30| 2: [LocalVariableDeclStmt] ... ...; -# 30| 0: [LocalVariableDeclAndInitExpr] Int32 x = ... -# 30| -1: [TypeMention] int -# 30| 0: [LocalVariableAccess] access to local variable x -# 30| 1: [PropertyCall] access to property Prop -# 30| -1: [LocalVariableAccess] access to local variable obj -simple_call.cs: -# 3| [Class] test_simple_call -# 5| 5: [Method] f -# 5| -1: [TypeMention] int -# 6| 4: [BlockStmt] {...} -# 7| 0: [ReturnStmt] return ...; -# 7| 0: [IntLiteral] 0 -# 10| 6: [Method] g -# 10| -1: [TypeMention] int -# 11| 4: [BlockStmt] {...} -# 12| 0: [ReturnStmt] return ...; -# 12| 0: [MethodCall] call to method f -simple_function.cs: -# 3| [Class] test_simple_function -# 5| 5: [Method] f -# 5| -1: [TypeMention] int -# 6| 4: [BlockStmt] {...} -# 7| 0: [ReturnStmt] return ...; -# 7| 0: [IntLiteral] 0 -stmts.cs: -# 3| [Class] test_stmts -# 5| 5: [Method] ifStmt -# 5| -1: [TypeMention] int -#-----| 2: (Parameters) -# 5| 0: [Parameter] x -# 5| -1: [TypeMention] int -# 6| 4: [BlockStmt] {...} -# 7| 0: [IfStmt] if (...) ... -# 7| 0: [EQExpr] ... == ... -# 7| 0: [ParameterAccess] access to parameter x -# 7| 1: [IntLiteral] 5 -# 8| 1: [ReturnStmt] return ...; -# 8| 0: [IntLiteral] 0 -# 10| 2: [ReturnStmt] return ...; -# 10| 0: [IntLiteral] 1 -# 13| 6: [Method] whileStmt -# 13| -1: [TypeMention] Void -#-----| 2: (Parameters) -# 13| 0: [Parameter] x -# 13| -1: [TypeMention] int -# 14| 4: [BlockStmt] {...} -# 15| 0: [LocalVariableDeclStmt] ... ...; -# 15| 0: [LocalVariableDeclAndInitExpr] Int32 i = ... -# 15| -1: [TypeMention] int -# 15| 0: [LocalVariableAccess] access to local variable i -# 15| 1: [IntLiteral] 0 -# 16| 1: [WhileStmt] while (...) ... -# 16| 0: [LTExpr] ... < ... -# 16| 0: [LocalVariableAccess] access to local variable i -# 16| 1: [IntLiteral] 10 -# 17| 1: [BlockStmt] {...} -# 18| 0: [ExprStmt] ...; -# 18| 0: [AssignExpr] ... = ... -# 18| 0: [ParameterAccess] access to parameter x -# 18| 1: [AddExpr] ... + ... -# 18| 0: [ParameterAccess] access to parameter x -# 18| 1: [IntLiteral] 1 -# 22| 7: [Method] switchStmt -# 22| -1: [TypeMention] int -# 23| 4: [BlockStmt] {...} -# 24| 0: [LocalVariableDeclStmt] ... ...; -# 24| 0: [LocalVariableDeclAndInitExpr] Object caseSwitch = ... -# 24| -1: [TypeMention] object -# 24| 0: [LocalVariableAccess] access to local variable caseSwitch -# 24| 1: [ObjectCreation] object creation of type Object -# 24| 0: [TypeMention] object -# 25| 1: [LocalVariableDeclStmt] ... ...; -# 25| 0: [LocalVariableDeclAndInitExpr] Int32 select = ... -# 25| -1: [TypeMention] int -# 25| 0: [LocalVariableAccess] access to local variable select -# 25| 1: [IntLiteral] 0 -# 27| 2: [SwitchStmt] switch (...) {...} -# 27| 0: [LocalVariableAccess] access to local variable caseSwitch -# 29| 0: [ConstCase] case ...: -# 29| 0: [ConstantPatternExpr,UnaryMinusExpr] -... -# 29| 0: [IntLiteral] 1 -# 30| 1: [GotoCaseStmt] goto case ...; -# 30| 0: [BoolLiteral] true -# 31| 2: [ConstCase] case ...: -# 31| 0: [ConstantPatternExpr,IntLiteral] 0 -# 32| 3: [GotoCaseStmt] goto case ...; -# 32| 0: [StringLiteralUtf16] "123" -# 33| 4: [ConstCase] case ...: -# 33| 0: [ConstantPatternExpr,StringLiteralUtf16] "123" -# 34| 5: [ExprStmt] ...; -# 34| 0: [AssignExpr] ... = ... -# 34| 0: [LocalVariableAccess] access to local variable select -# 34| 1: [IntLiteral] 100 -# 35| 6: [BreakStmt] break; -# 36| 7: [ConstCase] case ...: -# 36| 0: [BoolLiteral,ConstantPatternExpr] true -# 37| 8: [ExprStmt] ...; -# 37| 0: [AssignExpr] ... = ... -# 37| 0: [LocalVariableAccess] access to local variable select -# 37| 1: [IntLiteral] 101 -# 38| 9: [GotoDefaultStmt] goto default; -# 39| 10: [DefaultCase] default: -# 40| 11: [ReturnStmt] return ...; -# 40| 0: [LocalVariableAccess] access to local variable select -# 42| 3: [ReturnStmt] return ...; -# 42| 0: [IntLiteral] 0 -# 45| 8: [Method] tryCatchFinally -# 45| -1: [TypeMention] Void -# 46| 4: [BlockStmt] {...} -# 47| 0: [LocalVariableDeclStmt] ... ...; -# 47| 0: [LocalVariableDeclAndInitExpr] Int32 x = ... -# 47| -1: [TypeMention] int -# 47| 0: [LocalVariableAccess] access to local variable x -# 47| 1: [IntLiteral] 5 -# 48| 1: [TryStmt] try {...} ... -# 63| -1: [BlockStmt] {...} -# 64| 0: [ExprStmt] ...; -# 64| 0: [AssignExpr] ... = ... -# 64| 0: [LocalVariableAccess] access to local variable x -# 64| 1: [IntLiteral] 2 -# 49| 0: [BlockStmt] {...} -# 50| 0: [IfStmt] if (...) ... -# 50| 0: [NEExpr] ... != ... -# 50| 0: [LocalVariableAccess] access to local variable x -# 50| 1: [IntLiteral] 0 -# 51| 1: [ThrowStmt] throw ...; -# 51| 0: [ObjectCreation] object creation of type Exception -# 51| 0: [TypeMention] Exception -# 52| 1: [ExprStmt] ...; -# 52| 0: [AssignExpr] ... = ... -# 52| 0: [LocalVariableAccess] access to local variable x -# 52| 1: [IntLiteral] 0 -# 54| 1: [SpecificCatchClause] catch (...) {...} -# 54| 0: [LocalVariableDeclExpr] Exception ex -# 54| 0: [TypeMention] Exception -# 55| 1: [BlockStmt] {...} -# 56| 0: [ExprStmt] ...; -# 56| 0: [AssignExpr] ... = ... -# 56| 0: [LocalVariableAccess] access to local variable x -# 56| 1: [IntLiteral] 1 -# 58| 2: [GeneralCatchClause] catch {...} -# 59| 1: [BlockStmt] {...} -# 60| 0: [ThrowStmt] throw ...; -# 68| 9: [Method] forStmt -# 68| -1: [TypeMention] Void -# 69| 4: [BlockStmt] {...} -# 70| 0: [LocalVariableDeclStmt] ... ...; -# 70| 0: [LocalVariableDeclAndInitExpr] Int32 x = ... -# 70| -1: [TypeMention] int -# 70| 0: [LocalVariableAccess] access to local variable x -# 70| 1: [IntLiteral] 0 -# 71| 1: [ForStmt] for (...;...;...) ... -# 71| -2: [LocalVariableDeclAndInitExpr] Int32 j = ... -# 71| -1: [TypeMention] int -# 71| 0: [LocalVariableAccess] access to local variable j -# 71| 1: [IntLiteral] 10 -# 71| -1: [LocalVariableDeclAndInitExpr] Int32 i = ... -# 71| -1: [TypeMention] int -# 71| 0: [LocalVariableAccess] access to local variable i -# 71| 1: [IntLiteral] 0 -# 71| 0: [LTExpr] ... < ... -# 71| 0: [LocalVariableAccess] access to local variable i -# 71| 1: [LocalVariableAccess] access to local variable j -# 71| 1: [PostIncrExpr] ...++ -# 71| 0: [LocalVariableAccess] access to local variable i -# 71| 2: [PostDecrExpr] ...-- -# 71| 0: [LocalVariableAccess] access to local variable j -# 72| 3: [BlockStmt] {...} -# 73| 0: [ExprStmt] ...; -# 73| 0: [AssignExpr] ... = ... -# 73| 0: [LocalVariableAccess] access to local variable x -# 73| 1: [SubExpr] ... - ... -# 73| 0: [LocalVariableAccess] access to local variable x -# 73| 1: [IntLiteral] 1 -# 76| 2: [LocalVariableDeclStmt] ... ...; -# 76| 0: [LocalVariableDeclExpr] Int32 a -# 76| 0: [TypeMention] int -# 76| 1: [LocalVariableDeclAndInitExpr] Int32 b = ... -# 76| -1: [TypeMention] int -# 76| 0: [LocalVariableAccess] access to local variable b -# 76| 1: [IntLiteral] 10 -# 77| 3: [ForStmt] for (...;...;...) ... -# 77| -1: [AssignExpr] ... = ... -# 77| 0: [LocalVariableAccess] access to local variable a -# 77| 1: [IntLiteral] 0 -# 77| 0: [LTExpr] ... < ... -# 77| 0: [LocalVariableAccess] access to local variable a -# 77| 1: [LocalVariableAccess] access to local variable b -# 78| 1: [BlockStmt] {...} -# 79| 0: [ExprStmt] ...; -# 79| 0: [PostIncrExpr] ...++ -# 79| 0: [LocalVariableAccess] access to local variable a -# 82| 4: [ForStmt] for (...;...;...) ... -# 83| 1: [BlockStmt] {...} -# 88| 10: [Method] doWhile -# 88| -1: [TypeMention] Void -# 89| 4: [BlockStmt] {...} -# 90| 0: [LocalVariableDeclStmt] ... ...; -# 90| 0: [LocalVariableDeclAndInitExpr] Int32 x = ... -# 90| -1: [TypeMention] int -# 90| 0: [LocalVariableAccess] access to local variable x -# 90| 1: [IntLiteral] 0 -# 91| 1: [DoStmt] do ... while (...); -# 95| 0: [LTExpr] ... < ... -# 95| 0: [LocalVariableAccess] access to local variable x -# 95| 1: [IntLiteral] 10 -# 92| 1: [BlockStmt] {...} -# 93| 0: [ExprStmt] ...; -# 93| 0: [AssignExpr] ... = ... -# 93| 0: [LocalVariableAccess] access to local variable x -# 93| 1: [AddExpr] ... + ... -# 93| 0: [LocalVariableAccess] access to local variable x -# 93| 1: [IntLiteral] 1 -# 98| 11: [Method] checkedUnchecked -# 98| -1: [TypeMention] Void -# 99| 4: [BlockStmt] {...} -# 100| 0: [LocalVariableDeclStmt] ... ...; -# 100| 0: [LocalVariableDeclAndInitExpr] Int32 num = ... -# 100| -1: [TypeMention] int -# 100| 0: [LocalVariableAccess] access to local variable num -# 100| 1: [MemberConstantAccess] access to constant MaxValue -# 100| -1: [TypeAccess] access to type Int32 -# 100| 0: [TypeMention] int -# 101| 1: [UncheckedStmt] unchecked {...} -# 102| 0: [BlockStmt] {...} -# 103| 0: [ExprStmt] ...; -# 103| 0: [AssignExpr] ... = ... -# 103| 0: [LocalVariableAccess] access to local variable num -# 103| 1: [AddExpr] ... + ... -# 103| 0: [LocalVariableAccess] access to local variable num -# 103| 1: [IntLiteral] 1 -# 105| 2: [CheckedStmt] checked {...} -# 106| 0: [BlockStmt] {...} -# 107| 0: [ExprStmt] ...; -# 107| 0: [AssignExpr] ... = ... -# 107| 0: [LocalVariableAccess] access to local variable num -# 107| 1: [AddExpr] ... + ... -# 107| 0: [LocalVariableAccess] access to local variable num -# 107| 1: [IntLiteral] 1 -using.cs: -# 3| [Class] UsingStmt -# 5| 5: [Class] MyDisposable -#-----| 3: (Base types) -# 5| 1: [TypeMention] IDisposable -# 7| 4: [InstanceConstructor] MyDisposable -# 7| 4: [BlockStmt] {...} -# 8| 5: [Method] DoSomething -# 8| -1: [TypeMention] Void -# 8| 4: [BlockStmt] {...} -# 9| 6: [Method] Dispose -# 9| -1: [TypeMention] Void -# 9| 4: [BlockStmt] {...} -# 12| 6: [Method] Main -# 12| -1: [TypeMention] Void -# 13| 4: [BlockStmt] {...} -# 14| 0: [UsingBlockStmt] using (...) {...} -# 14| -1: [LocalVariableDeclAndInitExpr] MyDisposable o1 = ... -# 14| -1: [TypeMention] MyDisposable -# 14| 0: [LocalVariableAccess] access to local variable o1 -# 14| 1: [ObjectCreation] object creation of type MyDisposable -# 14| 0: [TypeMention] MyDisposable -# 15| 1: [BlockStmt] {...} -# 16| 0: [ExprStmt] ...; -# 16| 0: [MethodCall] call to method DoSomething -# 16| -1: [LocalVariableAccess] access to local variable o1 -# 19| 1: [LocalVariableDeclStmt] ... ...; -# 19| 0: [LocalVariableDeclAndInitExpr] MyDisposable o2 = ... -# 19| -1: [TypeMention] MyDisposable -# 19| 0: [LocalVariableAccess] access to local variable o2 -# 19| 1: [ObjectCreation] object creation of type MyDisposable -# 19| 0: [TypeMention] MyDisposable -# 20| 2: [UsingBlockStmt] using (...) {...} -# 20| 0: [LocalVariableAccess] access to local variable o2 -# 21| 1: [BlockStmt] {...} -# 22| 0: [ExprStmt] ...; -# 22| 0: [MethodCall] call to method DoSomething -# 22| -1: [LocalVariableAccess] access to local variable o2 -# 25| 3: [UsingDeclStmt] using ... ...; -# 25| 0: [LocalVariableDeclAndInitExpr] MyDisposable o3 = ... -# 25| -1: [TypeMention] MyDisposable -# 25| 0: [LocalVariableAccess] access to local variable o3 -# 25| 1: [ObjectCreation] object creation of type MyDisposable -# 25| 0: [TypeMention] MyDisposable -# 26| 4: [ExprStmt] ...; -# 26| 0: [MethodCall] call to method DoSomething -# 26| -1: [LocalVariableAccess] access to local variable o3 -variables.cs: -# 3| [Class] test_variables -# 5| 5: [Method] f -# 5| -1: [TypeMention] Void -# 6| 4: [BlockStmt] {...} -# 7| 0: [LocalVariableDeclStmt] ... ...; -# 7| 0: [LocalVariableDeclExpr] Int32 x -# 7| 0: [TypeMention] int -# 7| 1: [LocalVariableDeclAndInitExpr] Int32 y = ... -# 7| -1: [TypeMention] int -# 7| 0: [LocalVariableAccess] access to local variable y -# 7| 1: [IntLiteral] 5 -# 8| 1: [ExprStmt] ...; -# 8| 0: [AssignExpr] ... = ... -# 8| 0: [LocalVariableAccess] access to local variable x -# 8| 1: [IntLiteral] 4 -# 9| 2: [ExprStmt] ...; -# 9| 0: [AssignExpr] ... = ... -# 9| 0: [LocalVariableAccess] access to local variable x -# 9| 1: [LocalVariableAccess] access to local variable y -# 10| 3: [LocalVariableDeclStmt] ... ...; -# 10| 0: [LocalVariableDeclAndInitExpr] Int32 z = ... -# 10| -1: [TypeMention] int -# 10| 0: [LocalVariableAccess] access to local variable z -# 10| 1: [LocalVariableAccess] access to local variable y diff --git a/csharp/ql/test/experimental/ir/ir/PrintAst.qlref b/csharp/ql/test/experimental/ir/ir/PrintAst.qlref deleted file mode 100644 index f867dd01f9f..00000000000 --- a/csharp/ql/test/experimental/ir/ir/PrintAst.qlref +++ /dev/null @@ -1 +0,0 @@ -shared/PrintAst.ql \ No newline at end of file diff --git a/csharp/ql/test/experimental/ir/ir/array.cs b/csharp/ql/test/experimental/ir/ir/array.cs deleted file mode 100644 index d53a828ff54..00000000000 --- a/csharp/ql/test/experimental/ir/ir/array.cs +++ /dev/null @@ -1,22 +0,0 @@ -public class ArrayTest { - public void one_dim_init_acc() - { - int[] one_dim = {100, 101, 102}; - one_dim[0] = 1000; - one_dim[1] = one_dim[0]; - one_dim[1] = 1003; - - int i = 0; - one_dim[i] = 0; - } - - public void twod_and_init_acc() - { - int[,] a = { {100, 101}, {102, 103} }; - int[,] b = new int[5, 5]; - int[,] c = new int[2, 2] { {100, 101}, {102, 103} }; - int[,] d = new int[,] { {100, 101}, {102, 103} }; - int[,] e = a; - e[1, 1] = -1; - } -} diff --git a/csharp/ql/test/experimental/ir/ir/assignop.cs b/csharp/ql/test/experimental/ir/ir/assignop.cs deleted file mode 100644 index 21fdfccbcf9..00000000000 --- a/csharp/ql/test/experimental/ir/ir/assignop.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; - -class AssignOp -{ - static void Main() - { - int a = 1; - int c = 1; - - c += a; - c -= a; - c *= a; - c /= a; - c %= a; - c <<= 2; - c >>= 2; - c &= 2; - c ^= 2; - c |= 2; - c >>>= 2; - } -} diff --git a/csharp/ql/test/experimental/ir/ir/casts.cs b/csharp/ql/test/experimental/ir/ir/casts.cs deleted file mode 100644 index cd885ce30f2..00000000000 --- a/csharp/ql/test/experimental/ir/ir/casts.cs +++ /dev/null @@ -1,17 +0,0 @@ -public class Casts_A -{ -} - -public class Casts_B : Casts_A -{ -} - -public class Casts -{ - public static void Main() - { - Casts_A Aobj = new Casts_A(); - Casts_B bobjCE = (Casts_B) Aobj; - Casts_B bobjAS = Aobj as Casts_B; - } -} diff --git a/csharp/ql/test/experimental/ir/ir/collections.cs b/csharp/ql/test/experimental/ir/ir/collections.cs deleted file mode 100644 index b8f6c56dd50..00000000000 --- a/csharp/ql/test/experimental/ir/ir/collections.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections.Generic; - -public class Collections -{ - class MyClass - { - public string a; - public string b; - } - - public static void Main() - { - var dict = new Dictionary() - { - { 0, new MyClass { a="Hello", b="World" } }, - { 1, new MyClass { a="Foo", b="Bar" } } - }; - } -} diff --git a/csharp/ql/test/experimental/ir/ir/constructor_init.cs b/csharp/ql/test/experimental/ir/ir/constructor_init.cs deleted file mode 100644 index 25d1c20660e..00000000000 --- a/csharp/ql/test/experimental/ir/ir/constructor_init.cs +++ /dev/null @@ -1,35 +0,0 @@ -public class BaseClass -{ - int num; - - public BaseClass() - { - } - - public BaseClass(int i) - { - num = i; - } -} - -public class DerivedClass : BaseClass -{ - public DerivedClass() : base() - { - } - - public DerivedClass(int i) : base(i) - { - } - - public DerivedClass(int i, int j): this(i) - { - } - - static void Main() - { - DerivedClass obj1 = new DerivedClass(); - DerivedClass obj2 = new DerivedClass(1); - DerivedClass obj3 = new DerivedClass(1, 2); - } -} diff --git a/csharp/ql/test/experimental/ir/ir/crement.cs b/csharp/ql/test/experimental/ir/ir/crement.cs deleted file mode 100644 index 857b2fd804d..00000000000 --- a/csharp/ql/test/experimental/ir/ir/crement.cs +++ /dev/null @@ -1,11 +0,0 @@ -class CrementOpsTest -{ - public static void Main() - { - int x = 10; - int a = x++; - int b = --x; - int c = ++x; - x = x--; - } -} diff --git a/csharp/ql/test/experimental/ir/ir/delegates.cs b/csharp/ql/test/experimental/ir/ir/delegates.cs deleted file mode 100644 index 5f9def1260a..00000000000 --- a/csharp/ql/test/experimental/ir/ir/delegates.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic; - -public class Delegates { - delegate int Del(int num); - - static int returns(int ret) - { - return ret; - } - - public static void Main() { - Del del1 = new Del(returns); - del1(5); - } -} diff --git a/csharp/ql/test/experimental/ir/ir/events.cs b/csharp/ql/test/experimental/ir/ir/events.cs deleted file mode 100644 index 7364b0069f9..00000000000 --- a/csharp/ql/test/experimental/ir/ir/events.cs +++ /dev/null @@ -1,35 +0,0 @@ -class Events -{ - public delegate string MyDel(string str); - public MyDel Inst; - - event MyDel MyEvent; - - public Events() - { - this.Inst = new MyDel(this.Fun); - } - - public void AddEvent() - { - this.MyEvent += this.Inst; - } - - public void RemoveEvent() - { - this.MyEvent -= this.Inst; - } - - public string Fun(string str) - { - return str; - } - - static void Main(string[] args) - { - Events obj = new Events(); - obj.AddEvent(); - string result = obj.MyEvent("string"); - obj.RemoveEvent(); - } -} diff --git a/csharp/ql/test/experimental/ir/ir/foreach.cs b/csharp/ql/test/experimental/ir/ir/foreach.cs deleted file mode 100644 index 2ddf2fa1b1d..00000000000 --- a/csharp/ql/test/experimental/ir/ir/foreach.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; - -class ForEach { - public static void Main() { - int[] a_array = new int[] { 1, 2, 3, 4, 5, 6, 7 }; - - foreach(int items in a_array) - { - int x = items; - } - } -} diff --git a/csharp/ql/test/experimental/ir/ir/func_with_param_call.cs b/csharp/ql/test/experimental/ir/ir/func_with_param_call.cs deleted file mode 100644 index 7bf64c02482..00000000000 --- a/csharp/ql/test/experimental/ir/ir/func_with_param_call.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -public class test_call_with_param -{ - public static int f(int x, int y) - { - return x + y; - } - - public static int g() - { - return f(2, 3); - } -} diff --git a/csharp/ql/test/experimental/ir/ir/indexers.cs b/csharp/ql/test/experimental/ir/ir/indexers.cs deleted file mode 100644 index dfe9c5fa21e..00000000000 --- a/csharp/ql/test/experimental/ir/ir/indexers.cs +++ /dev/null @@ -1,26 +0,0 @@ -class Indexers -{ - public class MyClass - { - private string[] address = new string[2]; - public string this[int index] - { - get - { - return address[index]; - } - set - { - address[index] = value; - } - } - } - - public static void Main() - { - MyClass inst = new MyClass(); - inst[0] = "str1"; - inst[1] = "str1"; - inst[1] = inst[0]; - } -} diff --git a/csharp/ql/test/experimental/ir/ir/inheritance_polymorphism.cs b/csharp/ql/test/experimental/ir/ir/inheritance_polymorphism.cs deleted file mode 100644 index 37fad70eaec..00000000000 --- a/csharp/ql/test/experimental/ir/ir/inheritance_polymorphism.cs +++ /dev/null @@ -1,37 +0,0 @@ -public class A -{ - public virtual int function() - { - return 0; - } -} - -class B : A -{ -} - -class C : B -{ - public override int function() - { - return 1; - } -} - -class Program -{ - static void Main() - { - B objB = new B(); - objB.function(); - - // Check conversion works - A objA; - objA = objB; - objA.function(); - - A objC = new C(); - objC.function(); - } - -} diff --git a/csharp/ql/test/experimental/ir/ir/inoutref.cs b/csharp/ql/test/experimental/ir/ir/inoutref.cs deleted file mode 100644 index 604337da1de..00000000000 --- a/csharp/ql/test/experimental/ir/ir/inoutref.cs +++ /dev/null @@ -1,38 +0,0 @@ -class MyClass { - public int fld; -} - -struct MyStruct { - public int fld; -} - -class InOutRef -{ - static void set(ref MyClass o1, MyClass o2) - { - o1 = o2; - } - - static void F(ref int a, ref MyStruct b, in MyStruct b1, ref MyClass c, in MyClass c1) - { - b.fld = 0; - a = b.fld; - - c.fld = 10; - a = c.fld; - - b = b1; - - set(ref c, c1); - } - - static void Main() - { - int a = 0; - MyStruct b = new MyStruct(); - MyClass c = new MyClass(); - F(ref a, ref b, in b, ref c, in c); - - int x = b.fld; - } -} diff --git a/csharp/ql/test/experimental/ir/ir/isexpr.cs b/csharp/ql/test/experimental/ir/ir/isexpr.cs deleted file mode 100644 index d00a4f9d07f..00000000000 --- a/csharp/ql/test/experimental/ir/ir/isexpr.cs +++ /dev/null @@ -1,22 +0,0 @@ -public class Is_A -{ - public int x; -} - -public class IsExpr -{ - public static void Main() - { - Is_A obj = null; - - object o = obj; - if (o is Is_A tmp) - { - int res = tmp.x; - } - if (o is Is_A) - { - - } - } -} diff --git a/csharp/ql/test/experimental/ir/ir/jumps.cs b/csharp/ql/test/experimental/ir/ir/jumps.cs deleted file mode 100644 index 52b0ba9439e..00000000000 --- a/csharp/ql/test/experimental/ir/ir/jumps.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; - -class Jumps -{ - public static void Main() - { - for (int i = 1; i <= 10; i++) - { - if (i == 3) - continue; - else if (i == 5) - break; - Console.WriteLine("BreakAndContinue"); - } - - for (int i = 0 ; i < 10 ; ) - { - i++; - continue; - } - - int a = 0; - while (true) - { - a++; - if (a == 5) - continue; - if (a == 10) - break; - } - - for (int i = 1; i <= 10; i++) - { - if (i == 5) - goto done; - } - done: - Console.WriteLine("Done"); - } -} diff --git a/csharp/ql/test/experimental/ir/ir/lock.cs b/csharp/ql/test/experimental/ir/ir/lock.cs deleted file mode 100644 index affc9f3f981..00000000000 --- a/csharp/ql/test/experimental/ir/ir/lock.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -class LockTest -{ - static void A() - { - object @object = new object(); - lock (@object) - { - Console.WriteLine(@object.ToString()); - } - } -} diff --git a/csharp/ql/test/experimental/ir/ir/obj_creation.cs b/csharp/ql/test/experimental/ir/ir/obj_creation.cs deleted file mode 100644 index d045f44ed88..00000000000 --- a/csharp/ql/test/experimental/ir/ir/obj_creation.cs +++ /dev/null @@ -1,29 +0,0 @@ -public class ObjCreation -{ - public class MyClass - { - public int x; - - public MyClass() - { - } - - public MyClass(int _x) - { - x = _x; - } - } - - public static void SomeFun(MyClass x) - { - } - - public static void Main() - { - MyClass obj = new MyClass(100); - MyClass obj_initlist = new MyClass { x = 101 }; - int a = obj.x; - - SomeFun(new MyClass(100)); - } -} diff --git a/csharp/ql/test/experimental/ir/ir/options b/csharp/ql/test/experimental/ir/ir/options deleted file mode 100644 index c943386b4b8..00000000000 --- a/csharp/ql/test/experimental/ir/ir/options +++ /dev/null @@ -1 +0,0 @@ -semmle-extractor-options: /langversion:preview diff --git a/csharp/ql/test/experimental/ir/ir/pointers.cs b/csharp/ql/test/experimental/ir/ir/pointers.cs deleted file mode 100644 index c15cbc45176..00000000000 --- a/csharp/ql/test/experimental/ir/ir/pointers.cs +++ /dev/null @@ -1,42 +0,0 @@ -class Pointers -{ - unsafe static void addone(int[] arr) - { - int length = arr.Length; - fixed (int* b = arr) - { - int* p = b; - for(int i = 0; i < length; i++) - *p++ += 1; - } - } - - class MyClass - { - public int fld1; - public int fld2; - } - - struct MyStruct - { - public int fld; - } - - static void Main() { - MyClass o = new MyClass(); - MyStruct s = new MyStruct(); - unsafe - { - fixed(int* p = &o.fld1, q = &o.fld2) - { - *p = 0; - *q = 0; - MyStruct* r = &s; - (*r).fld = 0; - } - } - - int[] arr = {1, 2, 3}; - addone(arr); - } -} diff --git a/csharp/ql/test/experimental/ir/ir/prop.cs b/csharp/ql/test/experimental/ir/ir/prop.cs deleted file mode 100644 index a075703d875..00000000000 --- a/csharp/ql/test/experimental/ir/ir/prop.cs +++ /dev/null @@ -1,32 +0,0 @@ -class PropClass -{ - private static int prop; - - public int Prop - { - get - { - return func(); - } - - set - { - prop = value; - } - } - - private int func() - { - return 0; - } -} - -class Prog -{ - public static void Main() - { - PropClass obj = new PropClass(); - obj.Prop = 5; - int x = obj.Prop; - } -} diff --git a/csharp/ql/test/experimental/ir/ir/raw_ir.expected b/csharp/ql/test/experimental/ir/ir/raw_ir.expected deleted file mode 100644 index 2461e6602b9..00000000000 --- a/csharp/ql/test/experimental/ir/ir/raw_ir.expected +++ /dev/null @@ -1,2008 +0,0 @@ -array.cs: -# 2| System.Void ArrayTest.one_dim_init_acc() -# 2| Block 0 -# 2| v2_1(Void) = EnterFunction : -# 2| mu2_2() = AliasedDefinition : -# 2| r2_3(glval) = InitializeThis : -# 4| r4_1(glval) = VariableAddress[one_dim] : -# 4| mu4_2(Int32[]) = Uninitialized[one_dim] : &:r4_1 -# 4| r4_3(Int32) = Constant[0] : -# 4| r4_4(glval) = PointerAdd[4] : r4_1, r4_3 -# 4| r4_5(Int32) = Constant[100] : -# 4| mu4_6(Int32) = Store[?] : &:r4_4, r4_5 -# 4| r4_7(Int32) = Constant[1] : -# 4| r4_8(glval) = PointerAdd[4] : r4_1, r4_7 -# 4| r4_9(Int32) = Constant[101] : -# 4| mu4_10(Int32) = Store[?] : &:r4_8, r4_9 -# 4| r4_11(Int32) = Constant[2] : -# 4| r4_12(glval) = PointerAdd[4] : r4_1, r4_11 -# 4| r4_13(Int32) = Constant[102] : -# 4| mu4_14(Int32) = Store[?] : &:r4_12, r4_13 -# 5| r5_1(Int32) = Constant[1000] : -# 5| r5_2(glval) = VariableAddress[one_dim] : -# 5| r5_3(Int32[]) = ElementsAddress : r5_2 -# 5| r5_4(Int32) = Constant[0] : -# 5| r5_5(Int32[]) = PointerAdd[4] : r5_3, r5_4 -# 5| mu5_6(Int32) = Store[?] : &:r5_5, r5_1 -# 6| r6_1(glval) = VariableAddress[one_dim] : -# 6| r6_2(Int32[]) = ElementsAddress : r6_1 -# 6| r6_3(Int32) = Constant[0] : -# 6| r6_4(Int32[]) = PointerAdd[4] : r6_2, r6_3 -# 6| r6_5(Int32) = Load[?] : &:r6_4, ~m? -# 6| r6_6(glval) = VariableAddress[one_dim] : -# 6| r6_7(Int32[]) = ElementsAddress : r6_6 -# 6| r6_8(Int32) = Constant[1] : -# 6| r6_9(Int32[]) = PointerAdd[4] : r6_7, r6_8 -# 6| mu6_10(Int32) = Store[?] : &:r6_9, r6_5 -# 7| r7_1(Int32) = Constant[1003] : -# 7| r7_2(glval) = VariableAddress[one_dim] : -# 7| r7_3(Int32[]) = ElementsAddress : r7_2 -# 7| r7_4(Int32) = Constant[1] : -# 7| r7_5(Int32[]) = PointerAdd[4] : r7_3, r7_4 -# 7| mu7_6(Int32) = Store[?] : &:r7_5, r7_1 -# 9| r9_1(glval) = VariableAddress[i] : -# 9| r9_2(Int32) = Constant[0] : -# 9| mu9_3(Int32) = Store[i] : &:r9_1, r9_2 -# 10| r10_1(Int32) = Constant[0] : -# 10| r10_2(glval) = VariableAddress[one_dim] : -# 10| r10_3(Int32[]) = ElementsAddress : r10_2 -# 10| r10_4(glval) = VariableAddress[i] : -# 10| r10_5(Int32) = Load[i] : &:r10_4, ~m? -# 10| r10_6(Int32[]) = PointerAdd[4] : r10_3, r10_5 -# 10| mu10_7(Int32) = Store[?] : &:r10_6, r10_1 -# 2| v2_4(Void) = ReturnVoid : -# 2| v2_5(Void) = AliasedUse : ~m? -# 2| v2_6(Void) = ExitFunction : - -# 13| System.Void ArrayTest.twod_and_init_acc() -# 13| Block 0 -# 13| v13_1(Void) = EnterFunction : -# 13| mu13_2() = AliasedDefinition : -# 13| r13_3(glval) = InitializeThis : -# 15| r15_1(glval) = VariableAddress[a] : -# 15| mu15_2(Int32[,]) = Uninitialized[a] : &:r15_1 -# 15| r15_3(Int32) = Constant[0] : -# 15| r15_4(glval) = PointerAdd[8] : r15_1, r15_3 -# 15| r15_5(Int32) = Constant[0] : -# 15| r15_6(glval) = PointerAdd[4] : r15_4, r15_5 -# 15| r15_7(Int32) = Constant[100] : -# 15| mu15_8(Int32) = Store[?] : &:r15_6, r15_7 -# 15| r15_9(Int32) = Constant[1] : -# 15| r15_10(glval) = PointerAdd[4] : r15_4, r15_9 -# 15| r15_11(Int32) = Constant[101] : -# 15| mu15_12(Int32) = Store[?] : &:r15_10, r15_11 -# 15| r15_13(Int32) = Constant[1] : -# 15| r15_14(glval) = PointerAdd[8] : r15_1, r15_13 -# 15| r15_15(Int32) = Constant[0] : -# 15| r15_16(glval) = PointerAdd[4] : r15_14, r15_15 -# 15| r15_17(Int32) = Constant[102] : -# 15| mu15_18(Int32) = Store[?] : &:r15_16, r15_17 -# 15| r15_19(Int32) = Constant[1] : -# 15| r15_20(glval) = PointerAdd[4] : r15_14, r15_19 -# 15| r15_21(Int32) = Constant[103] : -# 15| mu15_22(Int32) = Store[?] : &:r15_20, r15_21 -# 16| r16_1(glval) = VariableAddress[b] : -# 16| mu16_2(Int32[,]) = Uninitialized[b] : &:r16_1 -# 17| r17_1(glval) = VariableAddress[c] : -# 17| mu17_2(Int32[,]) = Uninitialized[c] : &:r17_1 -# 17| r17_3(Int32) = Constant[0] : -# 17| r17_4(glval) = PointerAdd[8] : r17_1, r17_3 -# 17| r17_5(Int32) = Constant[0] : -# 17| r17_6(glval) = PointerAdd[4] : r17_4, r17_5 -# 17| r17_7(Int32) = Constant[100] : -# 17| mu17_8(Int32) = Store[?] : &:r17_6, r17_7 -# 17| r17_9(Int32) = Constant[1] : -# 17| r17_10(glval) = PointerAdd[4] : r17_4, r17_9 -# 17| r17_11(Int32) = Constant[101] : -# 17| mu17_12(Int32) = Store[?] : &:r17_10, r17_11 -# 17| r17_13(Int32) = Constant[1] : -# 17| r17_14(glval) = PointerAdd[8] : r17_1, r17_13 -# 17| r17_15(Int32) = Constant[0] : -# 17| r17_16(glval) = PointerAdd[4] : r17_14, r17_15 -# 17| r17_17(Int32) = Constant[102] : -# 17| mu17_18(Int32) = Store[?] : &:r17_16, r17_17 -# 17| r17_19(Int32) = Constant[1] : -# 17| r17_20(glval) = PointerAdd[4] : r17_14, r17_19 -# 17| r17_21(Int32) = Constant[103] : -# 17| mu17_22(Int32) = Store[?] : &:r17_20, r17_21 -# 18| r18_1(glval) = VariableAddress[d] : -# 18| mu18_2(Int32[,]) = Uninitialized[d] : &:r18_1 -# 18| r18_3(Int32) = Constant[0] : -# 18| r18_4(glval) = PointerAdd[8] : r18_1, r18_3 -# 18| r18_5(Int32) = Constant[0] : -# 18| r18_6(glval) = PointerAdd[4] : r18_4, r18_5 -# 18| r18_7(Int32) = Constant[100] : -# 18| mu18_8(Int32) = Store[?] : &:r18_6, r18_7 -# 18| r18_9(Int32) = Constant[1] : -# 18| r18_10(glval) = PointerAdd[4] : r18_4, r18_9 -# 18| r18_11(Int32) = Constant[101] : -# 18| mu18_12(Int32) = Store[?] : &:r18_10, r18_11 -# 18| r18_13(Int32) = Constant[1] : -# 18| r18_14(glval) = PointerAdd[8] : r18_1, r18_13 -# 18| r18_15(Int32) = Constant[0] : -# 18| r18_16(glval) = PointerAdd[4] : r18_14, r18_15 -# 18| r18_17(Int32) = Constant[102] : -# 18| mu18_18(Int32) = Store[?] : &:r18_16, r18_17 -# 18| r18_19(Int32) = Constant[1] : -# 18| r18_20(glval) = PointerAdd[4] : r18_14, r18_19 -# 18| r18_21(Int32) = Constant[103] : -# 18| mu18_22(Int32) = Store[?] : &:r18_20, r18_21 -# 19| r19_1(glval) = VariableAddress[e] : -# 19| r19_2(glval) = VariableAddress[a] : -# 19| r19_3(Int32[,]) = Load[a] : &:r19_2, ~m? -# 19| mu19_4(Int32[,]) = Store[e] : &:r19_1, r19_3 -# 20| r20_1(Int32) = Constant[-1] : -# 20| r20_2(glval) = VariableAddress[e] : -# 20| r20_3(Int32[,]) = ElementsAddress : r20_2 -# 20| r20_4(Int32) = Constant[1] : -# 20| r20_5(Int32[,]) = PointerAdd[4] : r20_3, r20_4 -# 20| r20_6(Int32[]) = ElementsAddress : r20_5 -# 20| r20_7(Int32) = Constant[1] : -# 20| r20_8(Int32[]) = PointerAdd[4] : r20_6, r20_7 -# 20| mu20_9(Int32) = Store[?] : &:r20_8, r20_1 -# 13| v13_4(Void) = ReturnVoid : -# 13| v13_5(Void) = AliasedUse : ~m? -# 13| v13_6(Void) = ExitFunction : - -assignop.cs: -# 5| System.Void AssignOp.Main() -# 5| Block 0 -# 5| v5_1(Void) = EnterFunction : -# 5| mu5_2() = AliasedDefinition : -# 7| r7_1(glval) = VariableAddress[a] : -# 7| r7_2(Int32) = Constant[1] : -# 7| mu7_3(Int32) = Store[a] : &:r7_1, r7_2 -# 8| r8_1(glval) = VariableAddress[c] : -# 8| r8_2(Int32) = Constant[1] : -# 8| mu8_3(Int32) = Store[c] : &:r8_1, r8_2 -# 10| r10_1(glval) = VariableAddress[a] : -# 10| r10_2(Int32) = Load[a] : &:r10_1, ~m? -# 10| r10_3(glval) = VariableAddress[c] : -# 10| r10_4(Int32) = Load[c] : &:r10_3, ~m? -# 10| r10_5(Int32) = Add : r10_4, r10_2 -# 10| mu10_6(Int32) = Store[c] : &:r10_3, r10_5 -# 11| r11_1(glval) = VariableAddress[a] : -# 11| r11_2(Int32) = Load[a] : &:r11_1, ~m? -# 11| r11_3(glval) = VariableAddress[c] : -# 11| r11_4(Int32) = Load[c] : &:r11_3, ~m? -# 11| r11_5(Int32) = Sub : r11_4, r11_2 -# 11| mu11_6(Int32) = Store[c] : &:r11_3, r11_5 -# 12| r12_1(glval) = VariableAddress[a] : -# 12| r12_2(Int32) = Load[a] : &:r12_1, ~m? -# 12| r12_3(glval) = VariableAddress[c] : -# 12| r12_4(Int32) = Load[c] : &:r12_3, ~m? -# 12| r12_5(Int32) = Mul : r12_4, r12_2 -# 12| mu12_6(Int32) = Store[c] : &:r12_3, r12_5 -# 13| r13_1(glval) = VariableAddress[a] : -# 13| r13_2(Int32) = Load[a] : &:r13_1, ~m? -# 13| r13_3(glval) = VariableAddress[c] : -# 13| r13_4(Int32) = Load[c] : &:r13_3, ~m? -# 13| r13_5(Int32) = Div : r13_4, r13_2 -# 13| mu13_6(Int32) = Store[c] : &:r13_3, r13_5 -# 14| r14_1(glval) = VariableAddress[a] : -# 14| r14_2(Int32) = Load[a] : &:r14_1, ~m? -# 14| r14_3(glval) = VariableAddress[c] : -# 14| r14_4(Int32) = Load[c] : &:r14_3, ~m? -# 14| r14_5(Int32) = Rem : r14_4, r14_2 -# 14| mu14_6(Int32) = Store[c] : &:r14_3, r14_5 -# 15| r15_1(Int32) = Constant[2] : -# 15| r15_2(glval) = VariableAddress[c] : -# 15| r15_3(Int32) = Load[c] : &:r15_2, ~m? -# 15| r15_4(Int32) = ShiftLeft : r15_3, r15_1 -# 15| mu15_5(Int32) = Store[c] : &:r15_2, r15_4 -# 16| r16_1(Int32) = Constant[2] : -# 16| r16_2(glval) = VariableAddress[c] : -# 16| r16_3(Int32) = Load[c] : &:r16_2, ~m? -# 16| r16_4(Int32) = ShiftRight : r16_3, r16_1 -# 16| mu16_5(Int32) = Store[c] : &:r16_2, r16_4 -# 17| r17_1(Int32) = Constant[2] : -# 17| r17_2(glval) = VariableAddress[c] : -# 17| r17_3(Int32) = Load[c] : &:r17_2, ~m? -# 17| r17_4(Int32) = BitAnd : r17_3, r17_1 -# 17| mu17_5(Int32) = Store[c] : &:r17_2, r17_4 -# 18| r18_1(Int32) = Constant[2] : -# 18| r18_2(glval) = VariableAddress[c] : -# 18| r18_3(Int32) = Load[c] : &:r18_2, ~m? -# 18| r18_4(Int32) = BitXor : r18_3, r18_1 -# 18| mu18_5(Int32) = Store[c] : &:r18_2, r18_4 -# 19| r19_1(Int32) = Constant[2] : -# 19| r19_2(glval) = VariableAddress[c] : -# 19| r19_3(Int32) = Load[c] : &:r19_2, ~m? -# 19| r19_4(Int32) = BitOr : r19_3, r19_1 -# 19| mu19_5(Int32) = Store[c] : &:r19_2, r19_4 -# 20| r20_1(Int32) = Constant[2] : -# 20| r20_2(glval) = VariableAddress[c] : -# 20| r20_3(Int32) = Load[c] : &:r20_2, ~m? -# 20| r20_4(Int32) = UnsignedShiftRight : r20_3, r20_1 -# 20| mu20_5(Int32) = Store[c] : &:r20_2, r20_4 -# 5| v5_3(Void) = ReturnVoid : -# 5| v5_4(Void) = AliasedUse : ~m? -# 5| v5_5(Void) = ExitFunction : - -casts.cs: -# 11| System.Void Casts.Main() -# 11| Block 0 -# 11| v11_1(Void) = EnterFunction : -# 11| mu11_2() = AliasedDefinition : -# 13| r13_1(glval) = VariableAddress[Aobj] : -# 13| r13_2(Casts_A) = NewObj : -# 13| r13_3() = FunctionAddress[Casts_A] : -# 13| v13_4(Void) = Call[Casts_A] : func:r13_3, this:r13_2 -# 13| mu13_5() = ^CallSideEffect : ~m? -# 13| mu13_6(Casts_A) = Store[Aobj] : &:r13_1, r13_2 -# 14| r14_1(glval) = VariableAddress[bobjCE] : -# 14| r14_2(glval) = VariableAddress[Aobj] : -# 14| r14_3(Casts_A) = Load[Aobj] : &:r14_2, ~m? -# 14| r14_4(Casts_B) = CheckedConvertOrThrow : r14_3 -# 14| mu14_5(Casts_B) = Store[bobjCE] : &:r14_1, r14_4 -# 15| r15_1(glval) = VariableAddress[bobjAS] : -# 15| r15_2(glval) = VariableAddress[Aobj] : -# 15| r15_3(Casts_A) = Load[Aobj] : &:r15_2, ~m? -# 15| r15_4(Casts_B) = CheckedConvertOrNull : r15_3 -# 15| mu15_5(Casts_B) = Store[bobjAS] : &:r15_1, r15_4 -# 11| v11_3(Void) = ReturnVoid : -# 11| v11_4(Void) = AliasedUse : ~m? -# 11| v11_5(Void) = ExitFunction : - -collections.cs: -# 11| System.Void Collections.Main() -# 11| Block 0 -# 11| v11_1(Void) = EnterFunction : -# 11| mu11_2() = AliasedDefinition : -# 13| r13_1(glval>) = VariableAddress[dict] : -# 13| r13_2(Dictionary) = NewObj : -# 13| r13_3() = FunctionAddress[Dictionary] : -# 13| v13_4(Void) = Call[Dictionary] : func:r13_3, this:r13_2 -# 13| mu13_5() = ^CallSideEffect : ~m? -# 15| r15_1() = FunctionAddress[Add] : -# 15| r15_2(Int32) = Constant[0] : -# 15| r15_3(MyClass) = NewObj : -# 15| r15_4() = FunctionAddress[MyClass] : -# 15| v15_5(Void) = Call[MyClass] : func:r15_4, this:r15_3 -# 15| mu15_6() = ^CallSideEffect : ~m? -# 15| r15_7(String) = StringConstant["Hello"] : -# 15| r15_8(glval) = FieldAddress[a] : r15_3 -# 15| mu15_9(String) = Store[?] : &:r15_8, r15_7 -# 15| r15_10(String) = StringConstant["World"] : -# 15| r15_11(glval) = FieldAddress[b] : r15_3 -# 15| mu15_12(String) = Store[?] : &:r15_11, r15_10 -# 15| v15_13(Void) = Call[Add] : func:r15_1, this:r13_2, 0:r15_2, 1:r15_3 -# 15| mu15_14() = ^CallSideEffect : ~m? -# 16| r16_1() = FunctionAddress[Add] : -# 16| r16_2(Int32) = Constant[1] : -# 16| r16_3(MyClass) = NewObj : -# 16| r16_4() = FunctionAddress[MyClass] : -# 16| v16_5(Void) = Call[MyClass] : func:r16_4, this:r16_3 -# 16| mu16_6() = ^CallSideEffect : ~m? -# 16| r16_7(String) = StringConstant["Foo"] : -# 16| r16_8(glval) = FieldAddress[a] : r16_3 -# 16| mu16_9(String) = Store[?] : &:r16_8, r16_7 -# 16| r16_10(String) = StringConstant["Bar"] : -# 16| r16_11(glval) = FieldAddress[b] : r16_3 -# 16| mu16_12(String) = Store[?] : &:r16_11, r16_10 -# 16| v16_13(Void) = Call[Add] : func:r16_1, this:r13_2, 0:r16_2, 1:r16_3 -# 16| mu16_14() = ^CallSideEffect : ~m? -# 13| mu13_6(Dictionary) = Store[dict] : &:r13_1, r13_2 -# 11| v11_3(Void) = ReturnVoid : -# 11| v11_4(Void) = AliasedUse : ~m? -# 11| v11_5(Void) = ExitFunction : - -constructor_init.cs: -# 5| System.Void BaseClass..ctor() -# 5| Block 0 -# 5| v5_1(Void) = EnterFunction : -# 5| mu5_2() = AliasedDefinition : -# 5| r5_3(glval) = InitializeThis : -# 5| r5_4(glval) = Convert[BaseClass : Object] : r5_3 -# 5| r5_5() = FunctionAddress[Object] : -# 5| v5_6(Void) = Call[Object] : func:r5_5, this:r5_4 -# 5| mu5_7() = ^CallSideEffect : ~m? -# 6| v6_1(Void) = NoOp : -# 5| v5_8(Void) = ReturnVoid : -# 5| v5_9(Void) = AliasedUse : ~m? -# 5| v5_10(Void) = ExitFunction : - -# 9| System.Void BaseClass..ctor(System.Int32) -# 9| Block 0 -# 9| v9_1(Void) = EnterFunction : -# 9| mu9_2() = AliasedDefinition : -# 9| r9_3(glval) = InitializeThis : -# 9| r9_4(glval) = VariableAddress[i] : -# 9| mu9_5(Int32) = InitializeParameter[i] : &:r9_4 -# 9| r9_6(glval) = Convert[BaseClass : Object] : r9_3 -# 9| r9_7() = FunctionAddress[Object] : -# 9| v9_8(Void) = Call[Object] : func:r9_7, this:r9_6 -# 9| mu9_9() = ^CallSideEffect : ~m? -# 11| r11_1(glval) = VariableAddress[i] : -# 11| r11_2(Int32) = Load[i] : &:r11_1, ~m? -# 11| r11_3(BaseClass) = CopyValue : r9_3 -# 11| r11_4(glval) = FieldAddress[num] : r11_3 -# 11| mu11_5(Int32) = Store[?] : &:r11_4, r11_2 -# 9| v9_10(Void) = ReturnVoid : -# 9| v9_11(Void) = AliasedUse : ~m? -# 9| v9_12(Void) = ExitFunction : - -# 17| System.Void DerivedClass..ctor() -# 17| Block 0 -# 17| v17_1(Void) = EnterFunction : -# 17| mu17_2() = AliasedDefinition : -# 17| r17_3(glval) = InitializeThis : -# 17| r17_4(glval) = Convert[DerivedClass : BaseClass] : r17_3 -# 17| r17_5() = FunctionAddress[BaseClass] : -# 17| v17_6(Void) = Call[BaseClass] : func:r17_5, this:r17_4 -# 17| mu17_7() = ^CallSideEffect : ~m? -# 18| v18_1(Void) = NoOp : -# 17| v17_8(Void) = ReturnVoid : -# 17| v17_9(Void) = AliasedUse : ~m? -# 17| v17_10(Void) = ExitFunction : - -# 21| System.Void DerivedClass..ctor(System.Int32) -# 21| Block 0 -# 21| v21_1(Void) = EnterFunction : -# 21| mu21_2() = AliasedDefinition : -# 21| r21_3(glval) = InitializeThis : -# 21| r21_4(glval) = VariableAddress[i] : -# 21| mu21_5(Int32) = InitializeParameter[i] : &:r21_4 -# 21| r21_6(glval) = Convert[DerivedClass : BaseClass] : r21_3 -# 21| r21_7() = FunctionAddress[BaseClass] : -# 21| r21_8(glval) = VariableAddress[i] : -# 21| r21_9(Int32) = Load[i] : &:r21_8, ~m? -# 21| v21_10(Void) = Call[BaseClass] : func:r21_7, this:r21_6, 0:r21_9 -# 21| mu21_11() = ^CallSideEffect : ~m? -# 22| v22_1(Void) = NoOp : -# 21| v21_12(Void) = ReturnVoid : -# 21| v21_13(Void) = AliasedUse : ~m? -# 21| v21_14(Void) = ExitFunction : - -# 25| System.Void DerivedClass..ctor(System.Int32,System.Int32) -# 25| Block 0 -# 25| v25_1(Void) = EnterFunction : -# 25| mu25_2() = AliasedDefinition : -# 25| r25_3(glval) = InitializeThis : -# 25| r25_4(glval) = VariableAddress[i] : -# 25| mu25_5(Int32) = InitializeParameter[i] : &:r25_4 -# 25| r25_6(glval) = VariableAddress[j] : -# 25| mu25_7(Int32) = InitializeParameter[j] : &:r25_6 -# 25| r25_8() = FunctionAddress[DerivedClass] : -# 25| r25_9(glval) = VariableAddress[i] : -# 25| r25_10(Int32) = Load[i] : &:r25_9, ~m? -# 25| v25_11(Void) = Call[DerivedClass] : func:r25_8, this:r25_3, 0:r25_10 -# 25| mu25_12() = ^CallSideEffect : ~m? -# 26| v26_1(Void) = NoOp : -# 25| v25_13(Void) = ReturnVoid : -# 25| v25_14(Void) = AliasedUse : ~m? -# 25| v25_15(Void) = ExitFunction : - -# 29| System.Void DerivedClass.Main() -# 29| Block 0 -# 29| v29_1(Void) = EnterFunction : -# 29| mu29_2() = AliasedDefinition : -# 31| r31_1(glval) = VariableAddress[obj1] : -# 31| r31_2(DerivedClass) = NewObj : -# 31| r31_3() = FunctionAddress[DerivedClass] : -# 31| v31_4(Void) = Call[DerivedClass] : func:r31_3, this:r31_2 -# 31| mu31_5() = ^CallSideEffect : ~m? -# 31| mu31_6(DerivedClass) = Store[obj1] : &:r31_1, r31_2 -# 32| r32_1(glval) = VariableAddress[obj2] : -# 32| r32_2(DerivedClass) = NewObj : -# 32| r32_3() = FunctionAddress[DerivedClass] : -# 32| r32_4(Int32) = Constant[1] : -# 32| v32_5(Void) = Call[DerivedClass] : func:r32_3, this:r32_2, 0:r32_4 -# 32| mu32_6() = ^CallSideEffect : ~m? -# 32| mu32_7(DerivedClass) = Store[obj2] : &:r32_1, r32_2 -# 33| r33_1(glval) = VariableAddress[obj3] : -# 33| r33_2(DerivedClass) = NewObj : -# 33| r33_3() = FunctionAddress[DerivedClass] : -# 33| r33_4(Int32) = Constant[1] : -# 33| r33_5(Int32) = Constant[2] : -# 33| v33_6(Void) = Call[DerivedClass] : func:r33_3, this:r33_2, 0:r33_4, 1:r33_5 -# 33| mu33_7() = ^CallSideEffect : ~m? -# 33| mu33_8(DerivedClass) = Store[obj3] : &:r33_1, r33_2 -# 29| v29_3(Void) = ReturnVoid : -# 29| v29_4(Void) = AliasedUse : ~m? -# 29| v29_5(Void) = ExitFunction : - -crement.cs: -# 3| System.Void CrementOpsTest.Main() -# 3| Block 0 -# 3| v3_1(Void) = EnterFunction : -# 3| mu3_2() = AliasedDefinition : -# 5| r5_1(glval) = VariableAddress[x] : -# 5| r5_2(Int32) = Constant[10] : -# 5| mu5_3(Int32) = Store[x] : &:r5_1, r5_2 -# 6| r6_1(glval) = VariableAddress[a] : -# 6| r6_2(glval) = VariableAddress[x] : -# 6| r6_3(Int32) = Load[x] : &:r6_2, ~m? -# 6| r6_4(Int32) = Constant[1] : -# 6| r6_5(Int32) = Add : r6_3, r6_4 -# 6| mu6_6(Int32) = Store[x] : &:r6_2, r6_5 -# 6| mu6_7(Int32) = Store[a] : &:r6_1, r6_3 -# 7| r7_1(glval) = VariableAddress[b] : -# 7| r7_2(glval) = VariableAddress[x] : -# 7| r7_3(Int32) = Load[x] : &:r7_2, ~m? -# 7| r7_4(Int32) = Constant[1] : -# 7| r7_5(Int32) = Sub : r7_3, r7_4 -# 7| mu7_6(Int32) = Store[x] : &:r7_2, r7_5 -# 7| mu7_7(Int32) = Store[b] : &:r7_1, r7_5 -# 8| r8_1(glval) = VariableAddress[c] : -# 8| r8_2(glval) = VariableAddress[x] : -# 8| r8_3(Int32) = Load[x] : &:r8_2, ~m? -# 8| r8_4(Int32) = Constant[1] : -# 8| r8_5(Int32) = Add : r8_3, r8_4 -# 8| mu8_6(Int32) = Store[x] : &:r8_2, r8_5 -# 8| mu8_7(Int32) = Store[c] : &:r8_1, r8_5 -# 9| r9_1(glval) = VariableAddress[x] : -# 9| r9_2(Int32) = Load[x] : &:r9_1, ~m? -# 9| r9_3(Int32) = Constant[1] : -# 9| r9_4(Int32) = Sub : r9_2, r9_3 -# 9| mu9_5(Int32) = Store[x] : &:r9_1, r9_4 -# 9| r9_6(glval) = VariableAddress[x] : -# 9| mu9_7(Int32) = Store[x] : &:r9_6, r9_2 -# 3| v3_3(Void) = ReturnVoid : -# 3| v3_4(Void) = AliasedUse : ~m? -# 3| v3_5(Void) = ExitFunction : - -delegates.cs: -# 6| System.Int32 Delegates.returns(System.Int32) -# 6| Block 0 -# 6| v6_1(Void) = EnterFunction : -# 6| mu6_2() = AliasedDefinition : -# 6| r6_3(glval) = VariableAddress[ret] : -# 6| mu6_4(Int32) = InitializeParameter[ret] : &:r6_3 -# 8| r8_1(glval) = VariableAddress[#return] : -# 8| r8_2(glval) = VariableAddress[ret] : -# 8| r8_3(Int32) = Load[ret] : &:r8_2, ~m? -# 8| mu8_4(Int32) = Store[#return] : &:r8_1, r8_3 -# 6| r6_5(glval) = VariableAddress[#return] : -# 6| v6_6(Void) = ReturnValue : &:r6_5, ~m? -# 6| v6_7(Void) = AliasedUse : ~m? -# 6| v6_8(Void) = ExitFunction : - -# 11| System.Void Delegates.Main() -# 11| Block 0 -# 11| v11_1(Void) = EnterFunction : -# 11| mu11_2() = AliasedDefinition : -# 12| r12_1(glval) = VariableAddress[del1] : -# 12| r12_2(Del) = NewObj : -# 12| r12_3() = FunctionAddress[Del] : -# 12| r12_4(glval) = FunctionAddress[returns] : -# 12| v12_5(Void) = Call[Del] : func:r12_3, this:r12_2, 0:r12_4 -# 12| mu12_6() = ^CallSideEffect : ~m? -# 12| mu12_7(Del) = Store[del1] : &:r12_1, r12_2 -# 13| r13_1(glval) = VariableAddress[del1] : -# 13| r13_2(Del) = Load[del1] : &:r13_1, ~m? -# 13| r13_3() = FunctionAddress[Invoke] : -# 13| r13_4(Int32) = Constant[5] : -# 13| v13_5(Void) = Call[Invoke] : func:r13_3, this:r13_2, 0:r13_4 -# 13| mu13_6() = ^CallSideEffect : ~m? -# 11| v11_3(Void) = ReturnVoid : -# 11| v11_4(Void) = AliasedUse : ~m? -# 11| v11_5(Void) = ExitFunction : - -events.cs: -# 8| System.Void Events..ctor() -# 8| Block 0 -# 8| v8_1(Void) = EnterFunction : -# 8| mu8_2() = AliasedDefinition : -# 8| r8_3(glval) = InitializeThis : -# 8| r8_4(glval) = Convert[Events : Object] : r8_3 -# 8| r8_5() = FunctionAddress[Object] : -# 8| v8_6(Void) = Call[Object] : func:r8_5, this:r8_4 -# 8| mu8_7() = ^CallSideEffect : ~m? -# 10| r10_1(MyDel) = NewObj : -# 10| r10_2() = FunctionAddress[MyDel] : -# 10| r10_3(glval) = FunctionAddress[Fun] : -# 10| v10_4(Void) = Call[MyDel] : func:r10_2, this:r10_1, 0:r10_3 -# 10| mu10_5() = ^CallSideEffect : ~m? -# 10| r10_6(Events) = CopyValue : r8_3 -# 10| r10_7(glval) = FieldAddress[Inst] : r10_6 -# 10| mu10_8(MyDel) = Store[?] : &:r10_7, r10_1 -# 8| v8_8(Void) = ReturnVoid : -# 8| v8_9(Void) = AliasedUse : ~m? -# 8| v8_10(Void) = ExitFunction : - -# 13| System.Void Events.AddEvent() -# 13| Block 0 -# 13| v13_1(Void) = EnterFunction : -# 13| mu13_2() = AliasedDefinition : -# 13| r13_3(glval) = InitializeThis : -# 15| r15_1(Events) = CopyValue : r13_3 -# 15| r15_2() = FunctionAddress[add_MyEvent] : -# 15| r15_3(Events) = CopyValue : r13_3 -# 15| r15_4(glval) = FieldAddress[Inst] : r15_3 -# 15| r15_5(MyDel) = Load[?] : &:r15_4, ~m? -# 15| v15_6(Void) = Call[add_MyEvent] : func:r15_2, this:r15_1, 0:r15_5 -# 15| mu15_7() = ^CallSideEffect : ~m? -# 13| v13_4(Void) = ReturnVoid : -# 13| v13_5(Void) = AliasedUse : ~m? -# 13| v13_6(Void) = ExitFunction : - -# 18| System.Void Events.RemoveEvent() -# 18| Block 0 -# 18| v18_1(Void) = EnterFunction : -# 18| mu18_2() = AliasedDefinition : -# 18| r18_3(glval) = InitializeThis : -# 20| r20_1(Events) = CopyValue : r18_3 -# 20| r20_2() = FunctionAddress[remove_MyEvent] : -# 20| r20_3(Events) = CopyValue : r18_3 -# 20| r20_4(glval) = FieldAddress[Inst] : r20_3 -# 20| r20_5(MyDel) = Load[?] : &:r20_4, ~m? -# 20| v20_6(Void) = Call[remove_MyEvent] : func:r20_2, this:r20_1, 0:r20_5 -# 20| mu20_7() = ^CallSideEffect : ~m? -# 18| v18_4(Void) = ReturnVoid : -# 18| v18_5(Void) = AliasedUse : ~m? -# 18| v18_6(Void) = ExitFunction : - -# 23| System.String Events.Fun(System.String) -# 23| Block 0 -# 23| v23_1(Void) = EnterFunction : -# 23| mu23_2() = AliasedDefinition : -# 23| r23_3(glval) = InitializeThis : -# 23| r23_4(glval) = VariableAddress[str] : -# 23| mu23_5(String) = InitializeParameter[str] : &:r23_4 -# 25| r25_1(glval) = VariableAddress[#return] : -# 25| r25_2(glval) = VariableAddress[str] : -# 25| r25_3(String) = Load[str] : &:r25_2, ~m? -# 25| mu25_4(String) = Store[#return] : &:r25_1, r25_3 -# 23| r23_6(glval) = VariableAddress[#return] : -# 23| v23_7(Void) = ReturnValue : &:r23_6, ~m? -# 23| v23_8(Void) = AliasedUse : ~m? -# 23| v23_9(Void) = ExitFunction : - -# 28| System.Void Events.Main(System.String[]) -# 28| Block 0 -# 28| v28_1(Void) = EnterFunction : -# 28| mu28_2() = AliasedDefinition : -# 28| r28_3(glval) = VariableAddress[args] : -# 28| mu28_4(String[]) = InitializeParameter[args] : &:r28_3 -# 30| r30_1(glval) = VariableAddress[obj] : -# 30| r30_2(Events) = NewObj : -# 30| r30_3() = FunctionAddress[Events] : -# 30| v30_4(Void) = Call[Events] : func:r30_3, this:r30_2 -# 30| mu30_5() = ^CallSideEffect : ~m? -# 30| mu30_6(Events) = Store[obj] : &:r30_1, r30_2 -# 31| r31_1(glval) = VariableAddress[obj] : -# 31| r31_2(Events) = Load[obj] : &:r31_1, ~m? -# 31| r31_3() = FunctionAddress[AddEvent] : -# 31| v31_4(Void) = Call[AddEvent] : func:r31_3, this:r31_2 -# 31| mu31_5() = ^CallSideEffect : ~m? -# 32| r32_1(glval) = VariableAddress[result] : -# 32| r32_2(glval) = VariableAddress[obj] : -# 32| r32_3(Events) = Load[obj] : &:r32_2, ~m? -# 32| r32_4() = FunctionAddress[Invoke] : -# 32| r32_5(String) = StringConstant["string"] : -# 32| v32_6(Void) = Call[Invoke] : func:r32_4, this:r32_3, 0:r32_5 -# 32| mu32_7() = ^CallSideEffect : ~m? -# 32| mu32_8(String) = Store[result] : &:r32_1, v32_6 -# 33| r33_1(glval) = VariableAddress[obj] : -# 33| r33_2(Events) = Load[obj] : &:r33_1, ~m? -# 33| r33_3() = FunctionAddress[RemoveEvent] : -# 33| v33_4(Void) = Call[RemoveEvent] : func:r33_3, this:r33_2 -# 33| mu33_5() = ^CallSideEffect : ~m? -# 28| v28_5(Void) = ReturnVoid : -# 28| v28_6(Void) = AliasedUse : ~m? -# 28| v28_7(Void) = ExitFunction : - -foreach.cs: -# 4| System.Void ForEach.Main() -# 4| Block 0 -# 4| v4_1(Void) = EnterFunction : -# 4| mu4_2() = AliasedDefinition : -# 5| r5_1(glval) = VariableAddress[a_array] : -# 5| mu5_2(Int32[]) = Uninitialized[a_array] : &:r5_1 -# 5| r5_3(Int32) = Constant[0] : -# 5| r5_4(glval) = PointerAdd[4] : r5_1, r5_3 -# 5| r5_5(Int32) = Constant[1] : -# 5| mu5_6(Int32) = Store[?] : &:r5_4, r5_5 -# 5| r5_7(Int32) = Constant[1] : -# 5| r5_8(glval) = PointerAdd[4] : r5_1, r5_7 -# 5| r5_9(Int32) = Constant[2] : -# 5| mu5_10(Int32) = Store[?] : &:r5_8, r5_9 -# 5| r5_11(Int32) = Constant[2] : -# 5| r5_12(glval) = PointerAdd[4] : r5_1, r5_11 -# 5| r5_13(Int32) = Constant[3] : -# 5| mu5_14(Int32) = Store[?] : &:r5_12, r5_13 -# 5| r5_15(Int32) = Constant[3] : -# 5| r5_16(glval) = PointerAdd[4] : r5_1, r5_15 -# 5| r5_17(Int32) = Constant[4] : -# 5| mu5_18(Int32) = Store[?] : &:r5_16, r5_17 -# 5| r5_19(Int32) = Constant[4] : -# 5| r5_20(glval) = PointerAdd[4] : r5_1, r5_19 -# 5| r5_21(Int32) = Constant[5] : -# 5| mu5_22(Int32) = Store[?] : &:r5_20, r5_21 -# 5| r5_23(Int32) = Constant[5] : -# 5| r5_24(glval) = PointerAdd[4] : r5_1, r5_23 -# 5| r5_25(Int32) = Constant[6] : -# 5| mu5_26(Int32) = Store[?] : &:r5_24, r5_25 -# 5| r5_27(Int32) = Constant[6] : -# 5| r5_28(glval) = PointerAdd[4] : r5_1, r5_27 -# 5| r5_29(Int32) = Constant[7] : -# 5| mu5_30(Int32) = Store[?] : &:r5_28, r5_29 -# 7| r7_1(glval) = VariableAddress[#temp7:9] : -# 7| r7_2(glval) = VariableAddress[a_array] : -# 7| r7_3(Int32[]) = Load[a_array] : &:r7_2, ~m? -# 7| r7_4() = FunctionAddress[GetEnumerator] : -# 7| r7_5(IEnumerator) = Call[GetEnumerator] : func:r7_4, this:r7_3 -# 7| mu7_6() = ^CallSideEffect : ~m? -# 7| mu7_7(IEnumerator) = Store[#temp7:9] : &:r7_1, r7_5 -#-----| Goto -> Block 1 - -# 7| Block 1 -# 7| r7_8(glval) = VariableAddress[#temp7:9] : -# 7| r7_9(IEnumerator) = Load[#temp7:9] : &:r7_8, ~m? -# 7| r7_10() = FunctionAddress[MoveNext] : -# 7| r7_11(Boolean) = Call[MoveNext] : func:r7_10, this:r7_9 -# 7| mu7_12() = ^CallSideEffect : ~m? -# 7| v7_13(Void) = ConditionalBranch : r7_11 -#-----| False -> Block 3 -#-----| True -> Block 2 - -# 7| Block 2 -# 7| r7_14(glval) = VariableAddress[items] : -# 7| r7_15(glval) = VariableAddress[#temp7:9] : -# 7| r7_16(IEnumerator) = Load[#temp7:9] : &:r7_15, ~m? -# 7| r7_17() = FunctionAddress[get_Current] : -# 7| r7_18(Int32) = Call[get_Current] : func:r7_17, this:r7_16 -# 7| mu7_19() = ^CallSideEffect : ~m? -# 7| mu7_20(Int32) = Store[items] : &:r7_14, r7_18 -# 9| r9_1(glval) = VariableAddress[x] : -# 9| r9_2(glval) = VariableAddress[items] : -# 9| r9_3(Int32) = Load[items] : &:r9_2, ~m? -# 9| mu9_4(Int32) = Store[x] : &:r9_1, r9_3 -#-----| Goto (back edge) -> Block 1 - -# 7| Block 3 -# 7| r7_21(glval) = VariableAddress[#temp7:9] : -# 7| r7_22(IEnumerator) = Load[#temp7:9] : &:r7_21, ~m? -# 7| r7_23() = FunctionAddress[Dispose] : -# 7| v7_24(Void) = Call[Dispose] : func:r7_23, this:r7_22 -# 7| mu7_25() = ^CallSideEffect : ~m? -# 4| v4_3(Void) = ReturnVoid : -# 4| v4_4(Void) = AliasedUse : ~m? -# 4| v4_5(Void) = ExitFunction : - -func_with_param_call.cs: -# 5| System.Int32 test_call_with_param.f(System.Int32,System.Int32) -# 5| Block 0 -# 5| v5_1(Void) = EnterFunction : -# 5| mu5_2() = AliasedDefinition : -# 5| r5_3(glval) = VariableAddress[x] : -# 5| mu5_4(Int32) = InitializeParameter[x] : &:r5_3 -# 5| r5_5(glval) = VariableAddress[y] : -# 5| mu5_6(Int32) = InitializeParameter[y] : &:r5_5 -# 7| r7_1(glval) = VariableAddress[#return] : -# 7| r7_2(glval) = VariableAddress[x] : -# 7| r7_3(Int32) = Load[x] : &:r7_2, ~m? -# 7| r7_4(glval) = VariableAddress[y] : -# 7| r7_5(Int32) = Load[y] : &:r7_4, ~m? -# 7| r7_6(Int32) = Add : r7_3, r7_5 -# 7| mu7_7(Int32) = Store[#return] : &:r7_1, r7_6 -# 5| r5_7(glval) = VariableAddress[#return] : -# 5| v5_8(Void) = ReturnValue : &:r5_7, ~m? -# 5| v5_9(Void) = AliasedUse : ~m? -# 5| v5_10(Void) = ExitFunction : - -# 10| System.Int32 test_call_with_param.g() -# 10| Block 0 -# 10| v10_1(Void) = EnterFunction : -# 10| mu10_2() = AliasedDefinition : -# 12| r12_1(glval) = VariableAddress[#return] : -# 12| r12_2() = FunctionAddress[f] : -# 12| r12_3(Int32) = Constant[2] : -# 12| r12_4(Int32) = Constant[3] : -# 12| r12_5(Int32) = Call[f] : func:r12_2, 0:r12_3, 1:r12_4 -# 12| mu12_6() = ^CallSideEffect : ~m? -# 12| mu12_7(Int32) = Store[#return] : &:r12_1, r12_5 -# 10| r10_3(glval) = VariableAddress[#return] : -# 10| v10_4(Void) = ReturnValue : &:r10_3, ~m? -# 10| v10_5(Void) = AliasedUse : ~m? -# 10| v10_6(Void) = ExitFunction : - -indexers.cs: -# 8| System.String Indexers.MyClass.get_Item(System.Int32) -# 8| Block 0 -# 8| v8_1(Void) = EnterFunction : -# 8| mu8_2() = AliasedDefinition : -# 8| r8_3(glval) = InitializeThis : -# 6| r6_1(glval) = VariableAddress[index] : -# 6| mu6_2(Int32) = InitializeParameter[index] : &:r6_1 -# 10| r10_1(glval) = VariableAddress[#return] : -# 10| r10_2(MyClass) = CopyValue : r8_3 -# 10| r10_3(glval) = FieldAddress[address] : r10_2 -# 10| r10_4(String[]) = ElementsAddress : r10_3 -# 10| r10_5(glval) = VariableAddress[index] : -# 10| r10_6(Int32) = Load[index] : &:r10_5, ~m? -# 10| r10_7(String[]) = PointerAdd[8] : r10_4, r10_6 -# 10| r10_8(String) = Load[?] : &:r10_7, ~m? -# 10| mu10_9(String) = Store[#return] : &:r10_1, r10_8 -# 8| r8_4(glval) = VariableAddress[#return] : -# 8| v8_5(Void) = ReturnValue : &:r8_4, ~m? -# 8| v8_6(Void) = AliasedUse : ~m? -# 8| v8_7(Void) = ExitFunction : - -# 12| System.Void Indexers.MyClass.set_Item(System.Int32,System.String) -# 12| Block 0 -# 12| v12_1(Void) = EnterFunction : -# 12| mu12_2() = AliasedDefinition : -# 12| r12_3(glval) = InitializeThis : -# 6| r6_1(glval) = VariableAddress[index] : -# 6| mu6_2(Int32) = InitializeParameter[index] : &:r6_1 -# 12| r12_4(glval) = VariableAddress[value] : -# 12| mu12_5(String) = InitializeParameter[value] : &:r12_4 -# 14| r14_1(glval) = VariableAddress[value] : -# 14| r14_2(String) = Load[value] : &:r14_1, ~m? -# 14| r14_3(MyClass) = CopyValue : r12_3 -# 14| r14_4(glval) = FieldAddress[address] : r14_3 -# 14| r14_5(String[]) = ElementsAddress : r14_4 -# 14| r14_6(glval) = VariableAddress[index] : -# 14| r14_7(Int32) = Load[index] : &:r14_6, ~m? -# 14| r14_8(String[]) = PointerAdd[8] : r14_5, r14_7 -# 14| mu14_9(String) = Store[?] : &:r14_8, r14_2 -# 12| v12_6(Void) = ReturnVoid : -# 12| v12_7(Void) = AliasedUse : ~m? -# 12| v12_8(Void) = ExitFunction : - -# 19| System.Void Indexers.Main() -# 19| Block 0 -# 19| v19_1(Void) = EnterFunction : -# 19| mu19_2() = AliasedDefinition : -# 21| r21_1(glval) = VariableAddress[inst] : -# 21| r21_2(MyClass) = NewObj : -# 21| r21_3() = FunctionAddress[MyClass] : -# 21| v21_4(Void) = Call[MyClass] : func:r21_3, this:r21_2 -# 21| mu21_5() = ^CallSideEffect : ~m? -# 21| mu21_6(MyClass) = Store[inst] : &:r21_1, r21_2 -# 22| r22_1(glval) = VariableAddress[inst] : -# 22| r22_2(MyClass) = Load[inst] : &:r22_1, ~m? -# 22| r22_3() = FunctionAddress[set_Item] : -# 22| r22_4(Int32) = Constant[0] : -# 22| r22_5(String) = StringConstant["str1"] : -# 22| v22_6(Void) = Call[set_Item] : func:r22_3, this:r22_2, 0:r22_4, 1:r22_5 -# 22| mu22_7() = ^CallSideEffect : ~m? -# 23| r23_1(glval) = VariableAddress[inst] : -# 23| r23_2(MyClass) = Load[inst] : &:r23_1, ~m? -# 23| r23_3() = FunctionAddress[set_Item] : -# 23| r23_4(Int32) = Constant[1] : -# 23| r23_5(String) = StringConstant["str1"] : -# 23| v23_6(Void) = Call[set_Item] : func:r23_3, this:r23_2, 0:r23_4, 1:r23_5 -# 23| mu23_7() = ^CallSideEffect : ~m? -# 24| r24_1(glval) = VariableAddress[inst] : -# 24| r24_2(MyClass) = Load[inst] : &:r24_1, ~m? -# 24| r24_3() = FunctionAddress[set_Item] : -# 24| r24_4(Int32) = Constant[1] : -# 24| r24_5(glval) = VariableAddress[inst] : -# 24| r24_6(MyClass) = Load[inst] : &:r24_5, ~m? -# 24| r24_7() = FunctionAddress[get_Item] : -# 24| r24_8(Int32) = Constant[0] : -# 24| r24_9(String) = Call[get_Item] : func:r24_7, this:r24_6, 0:r24_8 -# 24| mu24_10() = ^CallSideEffect : ~m? -# 24| v24_11(Void) = Call[set_Item] : func:r24_3, this:r24_2, 0:r24_4, 1:r24_9 -# 24| mu24_12() = ^CallSideEffect : ~m? -# 19| v19_3(Void) = ReturnVoid : -# 19| v19_4(Void) = AliasedUse : ~m? -# 19| v19_5(Void) = ExitFunction : - -inheritance_polymorphism.cs: -# 3| System.Int32 A.function() -# 3| Block 0 -# 3| v3_1(Void) = EnterFunction : -# 3| mu3_2() = AliasedDefinition : -# 3| r3_3(glval) = InitializeThis : -# 5| r5_1(glval) = VariableAddress[#return] : -# 5| r5_2(Int32) = Constant[0] : -# 5| mu5_3(Int32) = Store[#return] : &:r5_1, r5_2 -# 3| r3_4(glval) = VariableAddress[#return] : -# 3| v3_5(Void) = ReturnValue : &:r3_4, ~m? -# 3| v3_6(Void) = AliasedUse : ~m? -# 3| v3_7(Void) = ExitFunction : - -# 15| System.Int32 C.function() -# 15| Block 0 -# 15| v15_1(Void) = EnterFunction : -# 15| mu15_2() = AliasedDefinition : -# 15| r15_3(glval) = InitializeThis : -# 17| r17_1(glval) = VariableAddress[#return] : -# 17| r17_2(Int32) = Constant[1] : -# 17| mu17_3(Int32) = Store[#return] : &:r17_1, r17_2 -# 15| r15_4(glval) = VariableAddress[#return] : -# 15| v15_5(Void) = ReturnValue : &:r15_4, ~m? -# 15| v15_6(Void) = AliasedUse : ~m? -# 15| v15_7(Void) = ExitFunction : - -# 23| System.Void Program.Main() -# 23| Block 0 -# 23| v23_1(Void) = EnterFunction : -# 23| mu23_2() = AliasedDefinition : -# 25| r25_1(glval) = VariableAddress[objB] : -# 25| r25_2(B) = NewObj : -# 25| r25_3() = FunctionAddress[B] : -# 25| v25_4(Void) = Call[B] : func:r25_3, this:r25_2 -# 25| mu25_5() = ^CallSideEffect : ~m? -# 25| mu25_6(B) = Store[objB] : &:r25_1, r25_2 -# 26| r26_1(glval) = VariableAddress[objB] : -# 26| r26_2(B) = Load[objB] : &:r26_1, ~m? -# 26| r26_3() = FunctionAddress[function] : -# 26| r26_4(Int32) = Call[function] : func:r26_3, this:r26_2 -# 26| mu26_5() = ^CallSideEffect : ~m? -# 29| r29_1(glval) = VariableAddress[objA] : -# 29| mu29_2(A) = Uninitialized[objA] : &:r29_1 -# 30| r30_1(glval) = VariableAddress[objB] : -# 30| r30_2(B) = Load[objB] : &:r30_1, ~m? -# 30| r30_3(A) = Convert : r30_2 -# 30| r30_4(glval) = VariableAddress[objA] : -# 30| mu30_5(A) = Store[objA] : &:r30_4, r30_3 -# 31| r31_1(glval) = VariableAddress[objA] : -# 31| r31_2(A) = Load[objA] : &:r31_1, ~m? -# 31| r31_3() = FunctionAddress[function] : -# 31| r31_4(Int32) = Call[function] : func:r31_3, this:r31_2 -# 31| mu31_5() = ^CallSideEffect : ~m? -# 33| r33_1(glval) = VariableAddress[objC] : -# 33| r33_2(C) = NewObj : -# 33| r33_3() = FunctionAddress[C] : -# 33| v33_4(Void) = Call[C] : func:r33_3, this:r33_2 -# 33| mu33_5() = ^CallSideEffect : ~m? -# 33| r33_6(A) = Convert : r33_2 -# 33| mu33_7(A) = Store[objC] : &:r33_1, r33_2 -# 34| r34_1(glval) = VariableAddress[objC] : -# 34| r34_2(A) = Load[objC] : &:r34_1, ~m? -# 34| r34_3() = FunctionAddress[function] : -# 34| r34_4(Int32) = Call[function] : func:r34_3, this:r34_2 -# 34| mu34_5() = ^CallSideEffect : ~m? -# 23| v23_3(Void) = ReturnVoid : -# 23| v23_4(Void) = AliasedUse : ~m? -# 23| v23_5(Void) = ExitFunction : - -inoutref.cs: -# 11| System.Void InOutRef.set(MyClass,MyClass) -# 11| Block 0 -# 11| v11_1(Void) = EnterFunction : -# 11| mu11_2() = AliasedDefinition : -# 11| r11_3(glval) = VariableAddress[o1] : -# 11| mu11_4(MyClass) = InitializeParameter[o1] : &:r11_3 -# 11| r11_5(glval) = VariableAddress[o2] : -# 11| mu11_6(MyClass) = InitializeParameter[o2] : &:r11_5 -# 13| r13_1(glval) = VariableAddress[o2] : -# 13| r13_2(MyClass) = Load[o2] : &:r13_1, ~m? -# 13| r13_3(glval) = VariableAddress[o1] : -# 13| r13_4(MyClass) = Load[o1] : &:r13_3, ~m? -# 13| mu13_5(MyClass) = Store[?] : &:r13_4, r13_2 -# 11| v11_7(Void) = ReturnVoid : -# 11| v11_8(Void) = AliasedUse : ~m? -# 11| v11_9(Void) = ExitFunction : - -# 16| System.Void InOutRef.F(System.Int32,MyStruct,MyStruct,MyClass,MyClass) -# 16| Block 0 -# 16| v16_1(Void) = EnterFunction : -# 16| mu16_2() = AliasedDefinition : -# 16| r16_3(glval) = VariableAddress[a] : -# 16| mu16_4(Int32) = InitializeParameter[a] : &:r16_3 -# 16| r16_5(glval) = VariableAddress[b] : -# 16| mu16_6(MyStruct) = InitializeParameter[b] : &:r16_5 -# 16| r16_7(glval) = VariableAddress[b1] : -# 16| mu16_8(MyStruct) = InitializeParameter[b1] : &:r16_7 -# 16| r16_9(glval) = VariableAddress[c] : -# 16| mu16_10(MyClass) = InitializeParameter[c] : &:r16_9 -# 16| r16_11(glval) = VariableAddress[c1] : -# 16| mu16_12(MyClass) = InitializeParameter[c1] : &:r16_11 -# 18| r18_1(Int32) = Constant[0] : -# 18| r18_2(glval) = VariableAddress[b] : -# 18| r18_3(MyStruct) = Load[b] : &:r18_2, ~m? -# 18| r18_4(glval) = FieldAddress[fld] : r18_3 -# 18| mu18_5(Int32) = Store[?] : &:r18_4, r18_1 -# 19| r19_1(glval) = VariableAddress[b] : -# 19| r19_2(MyStruct) = Load[b] : &:r19_1, ~m? -# 19| r19_3(glval) = FieldAddress[fld] : r19_2 -# 19| r19_4(Int32) = Load[?] : &:r19_3, ~m? -# 19| r19_5(glval) = VariableAddress[a] : -# 19| r19_6(Int32) = Load[a] : &:r19_5, ~m? -# 19| mu19_7(Int32) = Store[?] : &:r19_6, r19_4 -# 21| r21_1(Int32) = Constant[10] : -# 21| r21_2(glval) = VariableAddress[c] : -# 21| r21_3(MyClass) = Load[c] : &:r21_2, ~m? -# 21| r21_4(MyClass) = Load[?] : &:r21_3, ~m? -# 21| r21_5(glval) = FieldAddress[fld] : r21_4 -# 21| mu21_6(Int32) = Store[?] : &:r21_5, r21_1 -# 22| r22_1(glval) = VariableAddress[c] : -# 22| r22_2(MyClass) = Load[c] : &:r22_1, ~m? -# 22| r22_3(MyClass) = Load[?] : &:r22_2, ~m? -# 22| r22_4(glval) = FieldAddress[fld] : r22_3 -# 22| r22_5(Int32) = Load[?] : &:r22_4, ~m? -# 22| r22_6(glval) = VariableAddress[a] : -# 22| r22_7(Int32) = Load[a] : &:r22_6, ~m? -# 22| mu22_8(Int32) = Store[?] : &:r22_7, r22_5 -# 24| r24_1(glval) = VariableAddress[b1] : -# 24| r24_2(MyStruct) = Load[b1] : &:r24_1, ~m? -# 24| r24_3(MyStruct) = Load[?] : &:r24_2, ~m? -# 24| r24_4(glval) = VariableAddress[b] : -# 24| r24_5(MyStruct) = Load[b] : &:r24_4, ~m? -# 24| mu24_6(MyStruct) = Store[?] : &:r24_5, r24_3 -# 26| r26_1() = FunctionAddress[set] : -# 26| r26_2(glval) = VariableAddress[c] : -# 26| r26_3(MyClass) = Load[c] : &:r26_2, ~m? -# 26| r26_4(glval) = VariableAddress[c1] : -# 26| r26_5(MyClass) = Load[c1] : &:r26_4, ~m? -# 26| r26_6(MyClass) = Load[?] : &:r26_5, ~m? -# 26| v26_7(Void) = Call[set] : func:r26_1, 0:r26_3, 1:r26_6 -# 26| mu26_8() = ^CallSideEffect : ~m? -# 16| v16_13(Void) = ReturnVoid : -# 16| v16_14(Void) = AliasedUse : ~m? -# 16| v16_15(Void) = ExitFunction : - -# 29| System.Void InOutRef.Main() -# 29| Block 0 -# 29| v29_1(Void) = EnterFunction : -# 29| mu29_2() = AliasedDefinition : -# 31| r31_1(glval) = VariableAddress[a] : -# 31| r31_2(Int32) = Constant[0] : -# 31| mu31_3(Int32) = Store[a] : &:r31_1, r31_2 -# 32| r32_1(glval) = VariableAddress[b] : -# 32| r32_2(MyStruct) = NewObj : -# 32| r32_3() = FunctionAddress[MyStruct] : -# 32| v32_4(Void) = Call[MyStruct] : func:r32_3, this:r32_2 -# 32| mu32_5() = ^CallSideEffect : ~m? -# 32| r32_6(MyStruct) = Load[?] : &:r32_2, ~m? -# 32| mu32_7(MyStruct) = Store[b] : &:r32_1, r32_6 -# 33| r33_1(glval) = VariableAddress[c] : -# 33| r33_2(MyClass) = NewObj : -# 33| r33_3() = FunctionAddress[MyClass] : -# 33| v33_4(Void) = Call[MyClass] : func:r33_3, this:r33_2 -# 33| mu33_5() = ^CallSideEffect : ~m? -# 33| mu33_6(MyClass) = Store[c] : &:r33_1, r33_2 -# 34| r34_1() = FunctionAddress[F] : -# 34| r34_2(glval) = VariableAddress[a] : -# 34| r34_3(glval) = VariableAddress[b] : -# 34| r34_4(glval) = VariableAddress[b] : -# 34| r34_5(glval) = VariableAddress[c] : -# 34| r34_6(glval) = VariableAddress[c] : -# 34| v34_7(Void) = Call[F] : func:r34_1, 0:r34_2, 1:r34_3, 2:r34_4, 3:r34_5, 4:r34_6 -# 34| mu34_8() = ^CallSideEffect : ~m? -# 36| r36_1(glval) = VariableAddress[x] : -# 36| r36_2(glval) = VariableAddress[b] : -# 36| r36_3(glval) = FieldAddress[fld] : r36_2 -# 36| r36_4(Int32) = Load[?] : &:r36_3, ~m? -# 36| mu36_5(Int32) = Store[x] : &:r36_1, r36_4 -# 29| v29_3(Void) = ReturnVoid : -# 29| v29_4(Void) = AliasedUse : ~m? -# 29| v29_5(Void) = ExitFunction : - -isexpr.cs: -# 8| System.Void IsExpr.Main() -# 8| Block 0 -# 8| v8_1(Void) = EnterFunction : -# 8| mu8_2() = AliasedDefinition : -# 10| r10_1(glval) = VariableAddress[obj] : -# 10| r10_2(null) = Constant[null] : -# 10| r10_3(Is_A) = Convert : r10_2 -# 10| mu10_4(Is_A) = Store[obj] : &:r10_1, r10_2 -# 12| r12_1(glval) = VariableAddress[o] : -# 12| r12_2(glval) = VariableAddress[obj] : -# 12| r12_3(Is_A) = Load[obj] : &:r12_2, ~m? -# 12| r12_4(Object) = Convert : r12_3 -# 12| mu12_5(Object) = Store[o] : &:r12_1, r12_3 -# 13| r13_1(glval) = VariableAddress[o] : -# 13| r13_2(Object) = Load[o] : &:r13_1, ~m? -# 13| r13_3(Is_A) = CheckedConvertOrNull : r13_2 -# 13| r13_4(Is_A) = Constant[0] : -# 13| r13_5(glval) = VariableAddress[tmp] : -# 13| mu13_6(Is_A) = Uninitialized[tmp] : &:r13_5 -# 13| r13_7(Boolean) = CompareNE : r13_3, r13_4 -# 13| v13_8(Void) = ConditionalBranch : r13_7 -#-----| False -> Block 2 -#-----| True -> Block 3 - -# 8| Block 1 -# 8| v8_3(Void) = ReturnVoid : -# 8| v8_4(Void) = AliasedUse : ~m? -# 8| v8_5(Void) = ExitFunction : - -# 13| Block 2 -# 13| v13_9(Void) = ConditionalBranch : r13_7 -#-----| False -> Block 5 -#-----| True -> Block 4 - -# 13| Block 3 -# 13| mu13_10(Is_A) = Store[tmp] : &:r13_5, r13_3 -#-----| Goto -> Block 2 - -# 15| Block 4 -# 15| r15_1(glval) = VariableAddress[res] : -# 15| r15_2(glval) = VariableAddress[tmp] : -# 15| r15_3(Is_A) = Load[tmp] : &:r15_2, ~m? -# 15| r15_4(glval) = FieldAddress[x] : r15_3 -# 15| r15_5(Int32) = Load[?] : &:r15_4, ~m? -# 15| mu15_6(Int32) = Store[res] : &:r15_1, r15_5 -#-----| Goto -> Block 5 - -# 17| Block 5 -# 17| r17_1(glval) = VariableAddress[o] : -# 17| r17_2(Object) = Load[o] : &:r17_1, ~m? -# 17| r17_3(Is_A) = CheckedConvertOrNull : r17_2 -# 17| r17_4(Is_A) = Constant[0] : -# 17| r17_5(Boolean) = CompareNE : r17_3, r17_4 -# 17| v17_6(Void) = ConditionalBranch : r17_5 -#-----| False -> Block 1 -#-----| True -> Block 6 - -# 18| Block 6 -# 18| v18_1(Void) = NoOp : -#-----| Goto -> Block 1 - -jumps.cs: -# 5| System.Void Jumps.Main() -# 5| Block 0 -# 5| v5_1(Void) = EnterFunction : -# 5| mu5_2() = AliasedDefinition : -# 7| r7_1(glval) = VariableAddress[i] : -# 7| r7_2(Int32) = Constant[1] : -# 7| mu7_3(Int32) = Store[i] : &:r7_1, r7_2 -#-----| Goto -> Block 2 - -# 7| Block 1 -# 7| r7_4(glval) = VariableAddress[i] : -# 7| r7_5(Int32) = Load[i] : &:r7_4, ~m? -# 7| r7_6(Int32) = Constant[1] : -# 7| r7_7(Int32) = Add : r7_5, r7_6 -# 7| mu7_8(Int32) = Store[i] : &:r7_4, r7_7 -#-----| Goto (back edge) -> Block 2 - -# 7| Block 2 -# 7| r7_9(glval) = VariableAddress[i] : -# 7| r7_10(Int32) = Load[i] : &:r7_9, ~m? -# 7| r7_11(Int32) = Constant[10] : -# 7| r7_12(Boolean) = CompareLE : r7_10, r7_11 -# 7| v7_13(Void) = ConditionalBranch : r7_12 -#-----| False -> Block 8 -#-----| True -> Block 3 - -# 9| Block 3 -# 9| r9_1(glval) = VariableAddress[i] : -# 9| r9_2(Int32) = Load[i] : &:r9_1, ~m? -# 9| r9_3(Int32) = Constant[3] : -# 9| r9_4(Boolean) = CompareEQ : r9_2, r9_3 -# 9| v9_5(Void) = ConditionalBranch : r9_4 -#-----| False -> Block 5 -#-----| True -> Block 4 - -# 10| Block 4 -# 10| v10_1(Void) = NoOp : -#-----| Goto -> Block 1 - -# 11| Block 5 -# 11| r11_1(glval) = VariableAddress[i] : -# 11| r11_2(Int32) = Load[i] : &:r11_1, ~m? -# 11| r11_3(Int32) = Constant[5] : -# 11| r11_4(Boolean) = CompareEQ : r11_2, r11_3 -# 11| v11_5(Void) = ConditionalBranch : r11_4 -#-----| False -> Block 7 -#-----| True -> Block 6 - -# 12| Block 6 -# 12| v12_1(Void) = NoOp : -#-----| Goto -> Block 8 - -# 13| Block 7 -# 13| r13_1() = FunctionAddress[WriteLine] : -# 13| r13_2(String) = StringConstant["BreakAndContinue"] : -# 13| v13_3(Void) = Call[WriteLine] : func:r13_1, 0:r13_2 -# 13| mu13_4() = ^CallSideEffect : ~m? -#-----| Goto -> Block 1 - -# 16| Block 8 -# 16| r16_1(glval) = VariableAddress[i] : -# 16| r16_2(Int32) = Constant[0] : -# 16| mu16_3(Int32) = Store[i] : &:r16_1, r16_2 -#-----| Goto -> Block 9 - -# 16| Block 9 -# 16| r16_4(glval) = VariableAddress[i] : -# 16| r16_5(Int32) = Load[i] : &:r16_4, ~m? -# 16| r16_6(Int32) = Constant[10] : -# 16| r16_7(Boolean) = CompareLT : r16_5, r16_6 -# 16| v16_8(Void) = ConditionalBranch : r16_7 -#-----| False -> Block 11 -#-----| True -> Block 10 - -# 18| Block 10 -# 18| r18_1(glval) = VariableAddress[i] : -# 18| r18_2(Int32) = Load[i] : &:r18_1, ~m? -# 18| r18_3(Int32) = Constant[1] : -# 18| r18_4(Int32) = Add : r18_2, r18_3 -# 18| mu18_5(Int32) = Store[i] : &:r18_1, r18_4 -# 19| v19_1(Void) = NoOp : -#-----| Goto (back edge) -> Block 9 - -# 22| Block 11 -# 22| r22_1(glval) = VariableAddress[a] : -# 22| r22_2(Int32) = Constant[0] : -# 22| mu22_3(Int32) = Store[a] : &:r22_1, r22_2 -#-----| Goto -> Block 12 - -# 23| Block 12 -# 23| r23_1(Boolean) = Constant[true] : -# 23| v23_2(Void) = ConditionalBranch : r23_1 -#-----| False -> Block 17 -#-----| True -> Block 13 - -# 25| Block 13 -# 25| r25_1(glval) = VariableAddress[a] : -# 25| r25_2(Int32) = Load[a] : &:r25_1, ~m? -# 25| r25_3(Int32) = Constant[1] : -# 25| r25_4(Int32) = Add : r25_2, r25_3 -# 25| mu25_5(Int32) = Store[a] : &:r25_1, r25_4 -# 26| r26_1(glval) = VariableAddress[a] : -# 26| r26_2(Int32) = Load[a] : &:r26_1, ~m? -# 26| r26_3(Int32) = Constant[5] : -# 26| r26_4(Boolean) = CompareEQ : r26_2, r26_3 -# 26| v26_5(Void) = ConditionalBranch : r26_4 -#-----| False -> Block 15 -#-----| True -> Block 14 - -# 27| Block 14 -# 27| v27_1(Void) = NoOp : -#-----| Goto (back edge) -> Block 12 - -# 28| Block 15 -# 28| r28_1(glval) = VariableAddress[a] : -# 28| r28_2(Int32) = Load[a] : &:r28_1, ~m? -# 28| r28_3(Int32) = Constant[10] : -# 28| r28_4(Boolean) = CompareEQ : r28_2, r28_3 -# 28| v28_5(Void) = ConditionalBranch : r28_4 -#-----| False (back edge) -> Block 12 -#-----| True -> Block 16 - -# 29| Block 16 -# 29| v29_1(Void) = NoOp : -#-----| Goto -> Block 17 - -# 32| Block 17 -# 32| r32_1(glval) = VariableAddress[i] : -# 32| r32_2(Int32) = Constant[1] : -# 32| mu32_3(Int32) = Store[i] : &:r32_1, r32_2 -#-----| Goto -> Block 19 - -# 32| Block 18 -# 32| r32_4(glval) = VariableAddress[i] : -# 32| r32_5(Int32) = Load[i] : &:r32_4, ~m? -# 32| r32_6(Int32) = Constant[1] : -# 32| r32_7(Int32) = Add : r32_5, r32_6 -# 32| mu32_8(Int32) = Store[i] : &:r32_4, r32_7 -#-----| Goto (back edge) -> Block 19 - -# 32| Block 19 -# 32| r32_9(glval) = VariableAddress[i] : -# 32| r32_10(Int32) = Load[i] : &:r32_9, ~m? -# 32| r32_11(Int32) = Constant[10] : -# 32| r32_12(Boolean) = CompareLE : r32_10, r32_11 -# 32| v32_13(Void) = ConditionalBranch : r32_12 -#-----| False -> Block 22 -#-----| True -> Block 20 - -# 34| Block 20 -# 34| r34_1(glval) = VariableAddress[i] : -# 34| r34_2(Int32) = Load[i] : &:r34_1, ~m? -# 34| r34_3(Int32) = Constant[5] : -# 34| r34_4(Boolean) = CompareEQ : r34_2, r34_3 -# 34| v34_5(Void) = ConditionalBranch : r34_4 -#-----| False -> Block 18 -#-----| True -> Block 21 - -# 35| Block 21 -# 35| v35_1(Void) = NoOp : -#-----| Goto -> Block 22 - -# 37| Block 22 -# 37| v37_1(Void) = NoOp : -# 38| r38_1() = FunctionAddress[WriteLine] : -# 38| r38_2(String) = StringConstant["Done"] : -# 38| v38_3(Void) = Call[WriteLine] : func:r38_1, 0:r38_2 -# 38| mu38_4() = ^CallSideEffect : ~m? -# 5| v5_3(Void) = ReturnVoid : -# 5| v5_4(Void) = AliasedUse : ~m? -# 5| v5_5(Void) = ExitFunction : - -lock.cs: -# 5| System.Void LockTest.A() -# 5| Block 0 -# 5| v5_1(Void) = EnterFunction : -# 5| mu5_2() = AliasedDefinition : -# 7| r7_1(glval) = VariableAddress[object] : -# 7| r7_2(Object) = NewObj : -# 7| r7_3() = FunctionAddress[Object] : -# 7| v7_4(Void) = Call[Object] : func:r7_3, this:r7_2 -# 7| mu7_5() = ^CallSideEffect : ~m? -# 7| mu7_6(Object) = Store[object] : &:r7_1, r7_2 -# 8| r8_1(glval) = VariableAddress[#temp8:9] : -# 8| r8_2(glval) = VariableAddress[object] : -# 8| r8_3(Object) = Load[object] : &:r8_2, ~m? -# 8| mu8_4(Object) = Store[#temp8:9] : &:r8_1, r8_3 -# 8| r8_5(glval) = VariableAddress[#temp8:9] : -# 8| r8_6(Boolean) = Constant[false] : -# 8| mu8_7(Boolean) = Store[#temp8:9] : &:r8_5, r8_6 -# 8| r8_8() = FunctionAddress[Enter] : -# 8| r8_9(glval) = VariableAddress[#temp8:9] : -# 8| r8_10(Object) = Load[#temp8:9] : &:r8_9, ~m? -# 8| r8_11(glval) = VariableAddress[#temp8:9] : -# 8| v8_12(Void) = Call[Enter] : func:r8_8, 0:r8_10, 1:r8_11 -# 8| mu8_13() = ^CallSideEffect : ~m? -# 10| r10_1() = FunctionAddress[WriteLine] : -# 10| r10_2(glval) = VariableAddress[object] : -# 10| r10_3(Object) = Load[object] : &:r10_2, ~m? -# 10| r10_4() = FunctionAddress[ToString] : -# 10| r10_5(String) = Call[ToString] : func:r10_4, this:r10_3 -# 10| mu10_6() = ^CallSideEffect : ~m? -# 10| v10_7(Void) = Call[WriteLine] : func:r10_1, 0:r10_5 -# 10| mu10_8() = ^CallSideEffect : ~m? -# 8| r8_14(glval) = VariableAddress[#temp8:9] : -# 8| r8_15(Boolean) = Load[#temp8:9] : &:r8_14, ~m? -# 8| v8_16(Void) = ConditionalBranch : r8_15 -#-----| False -> Block 1 -#-----| True -> Block 2 - -# 5| Block 1 -# 5| v5_3(Void) = ReturnVoid : -# 5| v5_4(Void) = AliasedUse : ~m? -# 5| v5_5(Void) = ExitFunction : - -# 8| Block 2 -# 8| r8_17() = FunctionAddress[Exit] : -# 8| r8_18(glval) = VariableAddress[#temp8:9] : -# 8| r8_19(Object) = Load[#temp8:9] : &:r8_18, ~m? -# 8| v8_20(Void) = Call[Exit] : func:r8_17, 0:r8_19 -# 8| mu8_21() = ^CallSideEffect : ~m? -#-----| Goto -> Block 1 - -obj_creation.cs: -# 7| System.Void ObjCreation.MyClass..ctor() -# 7| Block 0 -# 7| v7_1(Void) = EnterFunction : -# 7| mu7_2() = AliasedDefinition : -# 7| r7_3(glval) = InitializeThis : -# 7| r7_4(glval) = Convert[MyClass : Object] : r7_3 -# 7| r7_5() = FunctionAddress[Object] : -# 7| v7_6(Void) = Call[Object] : func:r7_5, this:r7_4 -# 7| mu7_7() = ^CallSideEffect : ~m? -# 8| v8_1(Void) = NoOp : -# 7| v7_8(Void) = ReturnVoid : -# 7| v7_9(Void) = AliasedUse : ~m? -# 7| v7_10(Void) = ExitFunction : - -# 11| System.Void ObjCreation.MyClass..ctor(System.Int32) -# 11| Block 0 -# 11| v11_1(Void) = EnterFunction : -# 11| mu11_2() = AliasedDefinition : -# 11| r11_3(glval) = InitializeThis : -# 11| r11_4(glval) = VariableAddress[_x] : -# 11| mu11_5(Int32) = InitializeParameter[_x] : &:r11_4 -# 11| r11_6(glval) = Convert[MyClass : Object] : r11_3 -# 11| r11_7() = FunctionAddress[Object] : -# 11| v11_8(Void) = Call[Object] : func:r11_7, this:r11_6 -# 11| mu11_9() = ^CallSideEffect : ~m? -# 13| r13_1(glval) = VariableAddress[_x] : -# 13| r13_2(Int32) = Load[_x] : &:r13_1, ~m? -# 13| r13_3(MyClass) = CopyValue : r11_3 -# 13| r13_4(glval) = FieldAddress[x] : r13_3 -# 13| mu13_5(Int32) = Store[?] : &:r13_4, r13_2 -# 11| v11_10(Void) = ReturnVoid : -# 11| v11_11(Void) = AliasedUse : ~m? -# 11| v11_12(Void) = ExitFunction : - -# 17| System.Void ObjCreation.SomeFun(ObjCreation.MyClass) -# 17| Block 0 -# 17| v17_1(Void) = EnterFunction : -# 17| mu17_2() = AliasedDefinition : -# 17| r17_3(glval) = VariableAddress[x] : -# 17| mu17_4(MyClass) = InitializeParameter[x] : &:r17_3 -# 18| v18_1(Void) = NoOp : -# 17| v17_5(Void) = ReturnVoid : -# 17| v17_6(Void) = AliasedUse : ~m? -# 17| v17_7(Void) = ExitFunction : - -# 21| System.Void ObjCreation.Main() -# 21| Block 0 -# 21| v21_1(Void) = EnterFunction : -# 21| mu21_2() = AliasedDefinition : -# 23| r23_1(glval) = VariableAddress[obj] : -# 23| r23_2(MyClass) = NewObj : -# 23| r23_3() = FunctionAddress[MyClass] : -# 23| r23_4(Int32) = Constant[100] : -# 23| v23_5(Void) = Call[MyClass] : func:r23_3, this:r23_2, 0:r23_4 -# 23| mu23_6() = ^CallSideEffect : ~m? -# 23| mu23_7(MyClass) = Store[obj] : &:r23_1, r23_2 -# 24| r24_1(glval) = VariableAddress[obj_initlist] : -# 24| r24_2(MyClass) = NewObj : -# 24| r24_3() = FunctionAddress[MyClass] : -# 24| v24_4(Void) = Call[MyClass] : func:r24_3, this:r24_2 -# 24| mu24_5() = ^CallSideEffect : ~m? -# 24| r24_6(Int32) = Constant[101] : -# 24| r24_7(glval) = FieldAddress[x] : r24_2 -# 24| mu24_8(Int32) = Store[?] : &:r24_7, r24_6 -# 24| mu24_9(MyClass) = Store[obj_initlist] : &:r24_1, r24_2 -# 25| r25_1(glval) = VariableAddress[a] : -# 25| r25_2(glval) = VariableAddress[obj] : -# 25| r25_3(MyClass) = Load[obj] : &:r25_2, ~m? -# 25| r25_4(glval) = FieldAddress[x] : r25_3 -# 25| r25_5(Int32) = Load[?] : &:r25_4, ~m? -# 25| mu25_6(Int32) = Store[a] : &:r25_1, r25_5 -# 27| r27_1() = FunctionAddress[SomeFun] : -# 27| r27_2(MyClass) = NewObj : -# 27| r27_3() = FunctionAddress[MyClass] : -# 27| r27_4(Int32) = Constant[100] : -# 27| v27_5(Void) = Call[MyClass] : func:r27_3, this:r27_2, 0:r27_4 -# 27| mu27_6() = ^CallSideEffect : ~m? -# 27| v27_7(Void) = Call[SomeFun] : func:r27_1, 0:r27_2 -# 27| mu27_8() = ^CallSideEffect : ~m? -# 21| v21_3(Void) = ReturnVoid : -# 21| v21_4(Void) = AliasedUse : ~m? -# 21| v21_5(Void) = ExitFunction : - -pointers.cs: -# 3| System.Void Pointers.addone(System.Int32[]) -# 3| Block 0 -# 3| v3_1(Void) = EnterFunction : -# 3| mu3_2() = AliasedDefinition : -# 3| r3_3(glval) = VariableAddress[arr] : -# 3| mu3_4(Int32[]) = InitializeParameter[arr] : &:r3_3 -# 5| r5_1(glval) = VariableAddress[length] : -# 5| r5_2(glval) = VariableAddress[arr] : -# 5| r5_3(Int32[]) = Load[arr] : &:r5_2, ~m? -# 5| r5_4() = FunctionAddress[get_Length] : -# 5| r5_5(Int32) = Call[get_Length] : func:r5_4, this:r5_3 -# 5| mu5_6() = ^CallSideEffect : ~m? -# 5| mu5_7(Int32) = Store[length] : &:r5_1, r5_5 -# 6| r6_1(glval) = VariableAddress[b] : -# 6| r6_2(glval) = VariableAddress[arr] : -# 6| r6_3(Int32[]) = Load[arr] : &:r6_2, ~m? -# 6| r6_4(Int32*) = CheckedConvertOrThrow : r6_3 -# 6| mu6_5(Int32*) = Store[b] : &:r6_1, r6_4 -# 8| r8_1(glval) = VariableAddress[p] : -# 8| r8_2(glval) = VariableAddress[b] : -# 8| r8_3(Int32*) = Load[b] : &:r8_2, ~m? -# 8| mu8_4(Int32*) = Store[p] : &:r8_1, r8_3 -# 9| r9_1(glval) = VariableAddress[i] : -# 9| r9_2(Int32) = Constant[0] : -# 9| mu9_3(Int32) = Store[i] : &:r9_1, r9_2 -#-----| Goto -> Block 2 - -# 3| Block 1 -# 3| v3_5(Void) = ReturnVoid : -# 3| v3_6(Void) = AliasedUse : ~m? -# 3| v3_7(Void) = ExitFunction : - -# 9| Block 2 -# 9| r9_4(glval) = VariableAddress[i] : -# 9| r9_5(Int32) = Load[i] : &:r9_4, ~m? -# 9| r9_6(glval) = VariableAddress[length] : -# 9| r9_7(Int32) = Load[length] : &:r9_6, ~m? -# 9| r9_8(Boolean) = CompareLT : r9_5, r9_7 -# 9| v9_9(Void) = ConditionalBranch : r9_8 -#-----| False -> Block 1 -#-----| True -> Block 3 - -# 10| Block 3 -# 10| r10_1(Int32) = Constant[1] : -# 10| r10_2(glval) = VariableAddress[p] : -# 10| r10_3(Int32*) = Load[p] : &:r10_2, ~m? -# 10| r10_4(Int32) = Constant[1] : -# 10| r10_5(Int32*) = PointerAdd[4] : r10_3, r10_4 -# 10| mu10_6(Int32*) = Store[p] : &:r10_2, r10_5 -# 10| r10_7(Int32) = Load[?] : &:r10_3, ~m? -# 10| r10_8(Int32) = Add : r10_7, r10_1 -# 10| mu10_9(Int32) = Store[?] : &:r10_3, r10_8 -# 9| r9_10(glval) = VariableAddress[i] : -# 9| r9_11(Int32) = Load[i] : &:r9_10, ~m? -# 9| r9_12(Int32) = Constant[1] : -# 9| r9_13(Int32) = Add : r9_11, r9_12 -# 9| mu9_14(Int32) = Store[i] : &:r9_10, r9_13 -#-----| Goto (back edge) -> Block 2 - -# 25| System.Void Pointers.Main() -# 25| Block 0 -# 25| v25_1(Void) = EnterFunction : -# 25| mu25_2() = AliasedDefinition : -# 26| r26_1(glval) = VariableAddress[o] : -# 26| r26_2(MyClass) = NewObj : -# 26| r26_3() = FunctionAddress[MyClass] : -# 26| v26_4(Void) = Call[MyClass] : func:r26_3, this:r26_2 -# 26| mu26_5() = ^CallSideEffect : ~m? -# 26| mu26_6(MyClass) = Store[o] : &:r26_1, r26_2 -# 27| r27_1(glval) = VariableAddress[s] : -# 27| r27_2(MyStruct) = NewObj : -# 27| r27_3() = FunctionAddress[MyStruct] : -# 27| v27_4(Void) = Call[MyStruct] : func:r27_3, this:r27_2 -# 27| mu27_5() = ^CallSideEffect : ~m? -# 27| r27_6(MyStruct) = Load[?] : &:r27_2, ~m? -# 27| mu27_7(MyStruct) = Store[s] : &:r27_1, r27_6 -# 30| r30_1(glval) = VariableAddress[p] : -# 30| r30_2(glval) = VariableAddress[o] : -# 30| r30_3(MyClass) = Load[o] : &:r30_2, ~m? -# 30| r30_4(glval) = FieldAddress[fld1] : r30_3 -# 30| mu30_5(Int32*) = Store[p] : &:r30_1, r30_4 -# 30| r30_6(glval) = VariableAddress[q] : -# 30| r30_7(glval) = VariableAddress[o] : -# 30| r30_8(MyClass) = Load[o] : &:r30_7, ~m? -# 30| r30_9(glval) = FieldAddress[fld2] : r30_8 -# 30| mu30_10(Int32*) = Store[q] : &:r30_6, r30_9 -# 32| r32_1(Int32) = Constant[0] : -# 32| r32_2(glval) = VariableAddress[p] : -# 32| r32_3(Int32*) = Load[p] : &:r32_2, ~m? -# 32| mu32_4(Int32) = Store[?] : &:r32_3, r32_1 -# 33| r33_1(Int32) = Constant[0] : -# 33| r33_2(glval) = VariableAddress[q] : -# 33| r33_3(Int32*) = Load[q] : &:r33_2, ~m? -# 33| mu33_4(Int32) = Store[?] : &:r33_3, r33_1 -# 34| r34_1(glval) = VariableAddress[r] : -# 34| r34_2(glval) = VariableAddress[s] : -# 34| mu34_3(MyStruct*) = Store[r] : &:r34_1, r34_2 -# 35| r35_1(Int32) = Constant[0] : -# 35| r35_2(glval) = VariableAddress[r] : -# 35| r35_3(MyStruct*) = Load[r] : &:r35_2, ~m? -# 35| r35_4(MyStruct) = Load[?] : &:r35_3, ~m? -# 35| r35_5(glval) = FieldAddress[fld] : r35_4 -# 35| mu35_6(Int32) = Store[?] : &:r35_5, r35_1 -# 39| r39_1(glval) = VariableAddress[arr] : -# 39| mu39_2(Int32[]) = Uninitialized[arr] : &:r39_1 -# 39| r39_3(Int32) = Constant[0] : -# 39| r39_4(glval) = PointerAdd[4] : r39_1, r39_3 -# 39| r39_5(Int32) = Constant[1] : -# 39| mu39_6(Int32) = Store[?] : &:r39_4, r39_5 -# 39| r39_7(Int32) = Constant[1] : -# 39| r39_8(glval) = PointerAdd[4] : r39_1, r39_7 -# 39| r39_9(Int32) = Constant[2] : -# 39| mu39_10(Int32) = Store[?] : &:r39_8, r39_9 -# 39| r39_11(Int32) = Constant[2] : -# 39| r39_12(glval) = PointerAdd[4] : r39_1, r39_11 -# 39| r39_13(Int32) = Constant[3] : -# 39| mu39_14(Int32) = Store[?] : &:r39_12, r39_13 -# 40| r40_1() = FunctionAddress[addone] : -# 40| r40_2(glval) = VariableAddress[arr] : -# 40| r40_3(Int32[]) = Load[arr] : &:r40_2, ~m? -# 40| v40_4(Void) = Call[addone] : func:r40_1, 0:r40_3 -# 40| mu40_5() = ^CallSideEffect : ~m? -# 25| v25_3(Void) = ReturnVoid : -# 25| v25_4(Void) = AliasedUse : ~m? -# 25| v25_5(Void) = ExitFunction : - -prop.cs: -# 7| System.Int32 PropClass.get_Prop() -# 7| Block 0 -# 7| v7_1(Void) = EnterFunction : -# 7| mu7_2() = AliasedDefinition : -# 7| r7_3(glval) = InitializeThis : -# 9| r9_1(glval) = VariableAddress[#return] : -# 9| r9_2(PropClass) = CopyValue : r7_3 -# 9| r9_3() = FunctionAddress[func] : -# 9| r9_4(Int32) = Call[func] : func:r9_3, this:r9_2 -# 9| mu9_5() = ^CallSideEffect : ~m? -# 9| mu9_6(Int32) = Store[#return] : &:r9_1, r9_4 -# 7| r7_4(glval) = VariableAddress[#return] : -# 7| v7_5(Void) = ReturnValue : &:r7_4, ~m? -# 7| v7_6(Void) = AliasedUse : ~m? -# 7| v7_7(Void) = ExitFunction : - -# 12| System.Void PropClass.set_Prop(System.Int32) -# 12| Block 0 -# 12| v12_1(Void) = EnterFunction : -# 12| mu12_2() = AliasedDefinition : -# 12| r12_3(glval) = InitializeThis : -# 12| r12_4(glval) = VariableAddress[value] : -# 12| mu12_5(Int32) = InitializeParameter[value] : &:r12_4 -# 14| r14_1(glval) = VariableAddress[value] : -# 14| r14_2(Int32) = Load[value] : &:r14_1, ~m? -# 14| r14_3(glval) = VariableAddress[prop] : -# 14| mu14_4(Int32) = Store[prop] : &:r14_3, r14_2 -# 12| v12_6(Void) = ReturnVoid : -# 12| v12_7(Void) = AliasedUse : ~m? -# 12| v12_8(Void) = ExitFunction : - -# 18| System.Int32 PropClass.func() -# 18| Block 0 -# 18| v18_1(Void) = EnterFunction : -# 18| mu18_2() = AliasedDefinition : -# 18| r18_3(glval) = InitializeThis : -# 20| r20_1(glval) = VariableAddress[#return] : -# 20| r20_2(Int32) = Constant[0] : -# 20| mu20_3(Int32) = Store[#return] : &:r20_1, r20_2 -# 18| r18_4(glval) = VariableAddress[#return] : -# 18| v18_5(Void) = ReturnValue : &:r18_4, ~m? -# 18| v18_6(Void) = AliasedUse : ~m? -# 18| v18_7(Void) = ExitFunction : - -# 26| System.Void Prog.Main() -# 26| Block 0 -# 26| v26_1(Void) = EnterFunction : -# 26| mu26_2() = AliasedDefinition : -# 28| r28_1(glval) = VariableAddress[obj] : -# 28| r28_2(PropClass) = NewObj : -# 28| r28_3() = FunctionAddress[PropClass] : -# 28| v28_4(Void) = Call[PropClass] : func:r28_3, this:r28_2 -# 28| mu28_5() = ^CallSideEffect : ~m? -# 28| mu28_6(PropClass) = Store[obj] : &:r28_1, r28_2 -# 29| r29_1(glval) = VariableAddress[obj] : -# 29| r29_2(PropClass) = Load[obj] : &:r29_1, ~m? -# 29| r29_3() = FunctionAddress[set_Prop] : -# 29| r29_4(Int32) = Constant[5] : -# 29| v29_5(Void) = Call[set_Prop] : func:r29_3, this:r29_2, 0:r29_4 -# 29| mu29_6() = ^CallSideEffect : ~m? -# 30| r30_1(glval) = VariableAddress[x] : -# 30| r30_2(glval) = VariableAddress[obj] : -# 30| r30_3(PropClass) = Load[obj] : &:r30_2, ~m? -# 30| r30_4() = FunctionAddress[get_Prop] : -# 30| r30_5(Int32) = Call[get_Prop] : func:r30_4, this:r30_3 -# 30| mu30_6() = ^CallSideEffect : ~m? -# 30| mu30_7(Int32) = Store[x] : &:r30_1, r30_5 -# 26| v26_3(Void) = ReturnVoid : -# 26| v26_4(Void) = AliasedUse : ~m? -# 26| v26_5(Void) = ExitFunction : - -simple_call.cs: -# 5| System.Int32 test_simple_call.f() -# 5| Block 0 -# 5| v5_1(Void) = EnterFunction : -# 5| mu5_2() = AliasedDefinition : -# 7| r7_1(glval) = VariableAddress[#return] : -# 7| r7_2(Int32) = Constant[0] : -# 7| mu7_3(Int32) = Store[#return] : &:r7_1, r7_2 -# 5| r5_3(glval) = VariableAddress[#return] : -# 5| v5_4(Void) = ReturnValue : &:r5_3, ~m? -# 5| v5_5(Void) = AliasedUse : ~m? -# 5| v5_6(Void) = ExitFunction : - -# 10| System.Int32 test_simple_call.g() -# 10| Block 0 -# 10| v10_1(Void) = EnterFunction : -# 10| mu10_2() = AliasedDefinition : -# 10| r10_3(glval) = InitializeThis : -# 12| r12_1(glval) = VariableAddress[#return] : -# 12| r12_2() = FunctionAddress[f] : -# 12| r12_3(Int32) = Call[f] : func:r12_2 -# 12| mu12_4() = ^CallSideEffect : ~m? -# 12| mu12_5(Int32) = Store[#return] : &:r12_1, r12_3 -# 10| r10_4(glval) = VariableAddress[#return] : -# 10| v10_5(Void) = ReturnValue : &:r10_4, ~m? -# 10| v10_6(Void) = AliasedUse : ~m? -# 10| v10_7(Void) = ExitFunction : - -simple_function.cs: -# 5| System.Int32 test_simple_function.f() -# 5| Block 0 -# 5| v5_1(Void) = EnterFunction : -# 5| mu5_2() = AliasedDefinition : -# 7| r7_1(glval) = VariableAddress[#return] : -# 7| r7_2(Int32) = Constant[0] : -# 7| mu7_3(Int32) = Store[#return] : &:r7_1, r7_2 -# 5| r5_3(glval) = VariableAddress[#return] : -# 5| v5_4(Void) = ReturnValue : &:r5_3, ~m? -# 5| v5_5(Void) = AliasedUse : ~m? -# 5| v5_6(Void) = ExitFunction : - -stmts.cs: -# 5| System.Int32 test_stmts.ifStmt(System.Int32) -# 5| Block 0 -# 5| v5_1(Void) = EnterFunction : -# 5| mu5_2() = AliasedDefinition : -# 5| r5_3(glval) = VariableAddress[x] : -# 5| mu5_4(Int32) = InitializeParameter[x] : &:r5_3 -# 7| r7_1(glval) = VariableAddress[x] : -# 7| r7_2(Int32) = Load[x] : &:r7_1, ~m? -# 7| r7_3(Int32) = Constant[5] : -# 7| r7_4(Boolean) = CompareEQ : r7_2, r7_3 -# 7| v7_5(Void) = ConditionalBranch : r7_4 -#-----| False -> Block 3 -#-----| True -> Block 2 - -# 5| Block 1 -# 5| r5_5(glval) = VariableAddress[#return] : -# 5| v5_6(Void) = ReturnValue : &:r5_5, ~m? -# 5| v5_7(Void) = AliasedUse : ~m? -# 5| v5_8(Void) = ExitFunction : - -# 8| Block 2 -# 8| r8_1(glval) = VariableAddress[#return] : -# 8| r8_2(Int32) = Constant[0] : -# 8| mu8_3(Int32) = Store[#return] : &:r8_1, r8_2 -#-----| Goto -> Block 1 - -# 10| Block 3 -# 10| r10_1(glval) = VariableAddress[#return] : -# 10| r10_2(Int32) = Constant[1] : -# 10| mu10_3(Int32) = Store[#return] : &:r10_1, r10_2 -#-----| Goto -> Block 1 - -# 13| System.Void test_stmts.whileStmt(System.Int32) -# 13| Block 0 -# 13| v13_1(Void) = EnterFunction : -# 13| mu13_2() = AliasedDefinition : -# 13| r13_3(glval) = VariableAddress[x] : -# 13| mu13_4(Int32) = InitializeParameter[x] : &:r13_3 -# 15| r15_1(glval) = VariableAddress[i] : -# 15| r15_2(Int32) = Constant[0] : -# 15| mu15_3(Int32) = Store[i] : &:r15_1, r15_2 -#-----| Goto -> Block 2 - -# 13| Block 1 -# 13| v13_5(Void) = ReturnVoid : -# 13| v13_6(Void) = AliasedUse : ~m? -# 13| v13_7(Void) = ExitFunction : - -# 16| Block 2 -# 16| r16_1(glval) = VariableAddress[i] : -# 16| r16_2(Int32) = Load[i] : &:r16_1, ~m? -# 16| r16_3(Int32) = Constant[10] : -# 16| r16_4(Boolean) = CompareLT : r16_2, r16_3 -# 16| v16_5(Void) = ConditionalBranch : r16_4 -#-----| False -> Block 1 -#-----| True -> Block 3 - -# 18| Block 3 -# 18| r18_1(glval) = VariableAddress[x] : -# 18| r18_2(Int32) = Load[x] : &:r18_1, ~m? -# 18| r18_3(Int32) = Constant[1] : -# 18| r18_4(Int32) = Add : r18_2, r18_3 -# 18| r18_5(glval) = VariableAddress[x] : -# 18| mu18_6(Int32) = Store[x] : &:r18_5, r18_4 -#-----| Goto (back edge) -> Block 2 - -# 22| System.Int32 test_stmts.switchStmt() -# 22| Block 0 -# 22| v22_1(Void) = EnterFunction : -# 22| mu22_2() = AliasedDefinition : -# 24| r24_1(glval) = VariableAddress[caseSwitch] : -# 24| r24_2(Object) = NewObj : -# 24| r24_3() = FunctionAddress[Object] : -# 24| v24_4(Void) = Call[Object] : func:r24_3, this:r24_2 -# 24| mu24_5() = ^CallSideEffect : ~m? -# 24| mu24_6(Object) = Store[caseSwitch] : &:r24_1, r24_2 -# 25| r25_1(glval) = VariableAddress[select] : -# 25| r25_2(Int32) = Constant[0] : -# 25| mu25_3(Int32) = Store[select] : &:r25_1, r25_2 -# 27| r27_1(glval) = VariableAddress[caseSwitch] : -# 27| r27_2(Object) = Load[caseSwitch] : &:r27_1, ~m? -# 27| v27_3(Void) = Switch : r27_2 -#-----| Case[-1] -> Block 2 -#-----| Case[0] -> Block 3 -#-----| Case[123] -> Block 4 -#-----| Case[true] -> Block 5 -#-----| Default -> Block 6 - -# 22| Block 1 -# 22| r22_3(glval) = VariableAddress[#return] : -# 22| v22_4(Void) = ReturnValue : &:r22_3, ~m? -# 22| v22_5(Void) = AliasedUse : ~m? -# 22| v22_6(Void) = ExitFunction : - -# 29| Block 2 -# 29| v29_1(Void) = NoOp : -# 30| v30_1(Void) = NoOp : -#-----| Goto (back edge) -> Block 5 - -# 31| Block 3 -# 31| v31_1(Void) = NoOp : -# 32| v32_1(Void) = NoOp : -#-----| Goto (back edge) -> Block 4 - -# 33| Block 4 -# 33| v33_1(Void) = NoOp : -# 34| r34_1(Int32) = Constant[100] : -# 34| r34_2(glval) = VariableAddress[select] : -# 34| mu34_3(Int32) = Store[select] : &:r34_2, r34_1 -# 35| v35_1(Void) = NoOp : -# 42| r42_1(glval) = VariableAddress[#return] : -# 42| r42_2(Int32) = Constant[0] : -# 42| mu42_3(Int32) = Store[#return] : &:r42_1, r42_2 -#-----| Goto -> Block 1 - -# 36| Block 5 -# 36| v36_1(Void) = NoOp : -# 37| r37_1(Int32) = Constant[101] : -# 37| r37_2(glval) = VariableAddress[select] : -# 37| mu37_3(Int32) = Store[select] : &:r37_2, r37_1 -# 38| v38_1(Void) = NoOp : -#-----| Goto (back edge) -> Block 6 - -# 39| Block 6 -# 39| v39_1(Void) = NoOp : -# 40| r40_1(glval) = VariableAddress[#return] : -# 40| r40_2(glval) = VariableAddress[select] : -# 40| r40_3(Int32) = Load[select] : &:r40_2, ~m? -# 40| mu40_4(Int32) = Store[#return] : &:r40_1, r40_3 -#-----| Goto -> Block 1 - -# 45| System.Void test_stmts.tryCatchFinally() -# 45| Block 0 -# 45| v45_1(Void) = EnterFunction : -# 45| mu45_2() = AliasedDefinition : -# 47| r47_1(glval) = VariableAddress[x] : -# 47| r47_2(Int32) = Constant[5] : -# 47| mu47_3(Int32) = Store[x] : &:r47_1, r47_2 -# 50| r50_1(glval) = VariableAddress[x] : -# 50| r50_2(Int32) = Load[x] : &:r50_1, ~m? -# 50| r50_3(Int32) = Constant[0] : -# 50| r50_4(Boolean) = CompareNE : r50_2, r50_3 -# 50| v50_5(Void) = ConditionalBranch : r50_4 -#-----| False -> Block 4 -#-----| True -> Block 3 - -# 45| Block 1 -# 45| v45_3(Void) = AliasedUse : ~m? -# 45| v45_4(Void) = ExitFunction : - -# 45| Block 2 -# 45| v45_5(Void) = Unwind : -#-----| Goto -> Block 1 - -# 51| Block 3 -# 51| r51_1(glval) = VariableAddress[#throw51:17] : -# 51| r51_2(Exception) = NewObj : -# 51| r51_3() = FunctionAddress[Exception] : -# 51| v51_4(Void) = Call[Exception] : func:r51_3, this:r51_2 -# 51| mu51_5() = ^CallSideEffect : ~m? -# 51| mu51_6(Exception) = Store[#throw51:17] : &:r51_1, r51_2 -# 51| v51_7(Void) = ThrowValue : &:r51_1, ~m? -#-----| Exception -> Block 6 - -# 52| Block 4 -# 52| r52_1(Int32) = Constant[0] : -# 52| r52_2(glval) = VariableAddress[x] : -# 52| mu52_3(Int32) = Store[x] : &:r52_2, r52_1 -#-----| Goto -> Block 5 - -# 64| Block 5 -# 64| r64_1(Int32) = Constant[2] : -# 64| r64_2(glval) = VariableAddress[x] : -# 64| mu64_3(Int32) = Store[x] : &:r64_2, r64_1 -# 45| v45_6(Void) = ReturnVoid : -#-----| Goto -> Block 1 - -# 54| Block 6 -# 54| v54_1(Void) = CatchByType[Exception] : -#-----| Exception -> Block 8 -#-----| Goto -> Block 7 - -# 54| Block 7 -# 54| r54_2(glval) = VariableAddress[ex] : -# 54| mu54_3(Exception) = Uninitialized[ex] : &:r54_2 -# 56| r56_1(Int32) = Constant[1] : -# 56| r56_2(glval) = VariableAddress[x] : -# 56| mu56_3(Int32) = Store[x] : &:r56_2, r56_1 -#-----| Goto -> Block 5 - -# 58| Block 8 -# 58| v58_1(Void) = CatchAny : -# 60| v60_1(Void) = ReThrow : -#-----| Exception -> Block 2 - -# 68| System.Void test_stmts.forStmt() -# 68| Block 0 -# 68| v68_1(Void) = EnterFunction : -# 68| mu68_2() = AliasedDefinition : -# 70| r70_1(glval) = VariableAddress[x] : -# 70| r70_2(Int32) = Constant[0] : -# 70| mu70_3(Int32) = Store[x] : &:r70_1, r70_2 -# 71| r71_1(glval) = VariableAddress[i] : -# 71| r71_2(Int32) = Constant[0] : -# 71| mu71_3(Int32) = Store[i] : &:r71_1, r71_2 -# 71| r71_4(glval) = VariableAddress[j] : -# 71| r71_5(Int32) = Constant[10] : -# 71| mu71_6(Int32) = Store[j] : &:r71_4, r71_5 -#-----| Goto -> Block 2 - -# 68| Block 1 -# 68| v68_3(Void) = ReturnVoid : -# 68| v68_4(Void) = AliasedUse : ~m? -# 68| v68_5(Void) = ExitFunction : - -# 71| Block 2 -# 71| r71_7(glval) = VariableAddress[i] : -# 71| r71_8(Int32) = Load[i] : &:r71_7, ~m? -# 71| r71_9(glval) = VariableAddress[j] : -# 71| r71_10(Int32) = Load[j] : &:r71_9, ~m? -# 71| r71_11(Boolean) = CompareLT : r71_8, r71_10 -# 71| v71_12(Void) = ConditionalBranch : r71_11 -#-----| False -> Block 4 -#-----| True -> Block 3 - -# 73| Block 3 -# 73| r73_1(glval) = VariableAddress[x] : -# 73| r73_2(Int32) = Load[x] : &:r73_1, ~m? -# 73| r73_3(Int32) = Constant[1] : -# 73| r73_4(Int32) = Sub : r73_2, r73_3 -# 73| r73_5(glval) = VariableAddress[x] : -# 73| mu73_6(Int32) = Store[x] : &:r73_5, r73_4 -# 71| r71_13(glval) = VariableAddress[i] : -# 71| r71_14(Int32) = Load[i] : &:r71_13, ~m? -# 71| r71_15(Int32) = Constant[1] : -# 71| r71_16(Int32) = Add : r71_14, r71_15 -# 71| mu71_17(Int32) = Store[i] : &:r71_13, r71_16 -# 71| r71_18(glval) = VariableAddress[j] : -# 71| r71_19(Int32) = Load[j] : &:r71_18, ~m? -# 71| r71_20(Int32) = Constant[1] : -# 71| r71_21(Int32) = Sub : r71_19, r71_20 -# 71| mu71_22(Int32) = Store[j] : &:r71_18, r71_21 -#-----| Goto (back edge) -> Block 2 - -# 76| Block 4 -# 76| r76_1(glval) = VariableAddress[a] : -# 76| mu76_2(Int32) = Uninitialized[a] : &:r76_1 -# 76| r76_3(glval) = VariableAddress[b] : -# 76| r76_4(Int32) = Constant[10] : -# 76| mu76_5(Int32) = Store[b] : &:r76_3, r76_4 -# 77| r77_1(Int32) = Constant[0] : -# 77| r77_2(glval) = VariableAddress[a] : -# 77| mu77_3(Int32) = Store[a] : &:r77_2, r77_1 -#-----| Goto -> Block 5 - -# 77| Block 5 -# 77| r77_4(glval) = VariableAddress[a] : -# 77| r77_5(Int32) = Load[a] : &:r77_4, ~m? -# 77| r77_6(glval) = VariableAddress[b] : -# 77| r77_7(Int32) = Load[b] : &:r77_6, ~m? -# 77| r77_8(Boolean) = CompareLT : r77_5, r77_7 -# 77| v77_9(Void) = ConditionalBranch : r77_8 -#-----| False -> Block 7 -#-----| True -> Block 6 - -# 79| Block 6 -# 79| r79_1(glval) = VariableAddress[a] : -# 79| r79_2(Int32) = Load[a] : &:r79_1, ~m? -# 79| r79_3(Int32) = Constant[1] : -# 79| r79_4(Int32) = Add : r79_2, r79_3 -# 79| mu79_5(Int32) = Store[a] : &:r79_1, r79_4 -#-----| Goto (back edge) -> Block 5 - -# 83| Block 7 -# 83| v83_1(Void) = NoOp : -#-----| Goto (back edge) -> Block 7 - -# 88| System.Void test_stmts.doWhile() -# 88| Block 0 -# 88| v88_1(Void) = EnterFunction : -# 88| mu88_2() = AliasedDefinition : -# 90| r90_1(glval) = VariableAddress[x] : -# 90| r90_2(Int32) = Constant[0] : -# 90| mu90_3(Int32) = Store[x] : &:r90_1, r90_2 -#-----| Goto -> Block 2 - -# 88| Block 1 -# 88| v88_3(Void) = ReturnVoid : -# 88| v88_4(Void) = AliasedUse : ~m? -# 88| v88_5(Void) = ExitFunction : - -# 93| Block 2 -# 93| r93_1(glval) = VariableAddress[x] : -# 93| r93_2(Int32) = Load[x] : &:r93_1, ~m? -# 93| r93_3(Int32) = Constant[1] : -# 93| r93_4(Int32) = Add : r93_2, r93_3 -# 93| r93_5(glval) = VariableAddress[x] : -# 93| mu93_6(Int32) = Store[x] : &:r93_5, r93_4 -# 95| r95_1(glval) = VariableAddress[x] : -# 95| r95_2(Int32) = Load[x] : &:r95_1, ~m? -# 95| r95_3(Int32) = Constant[10] : -# 95| r95_4(Boolean) = CompareLT : r95_2, r95_3 -# 95| v95_5(Void) = ConditionalBranch : r95_4 -#-----| False -> Block 1 -#-----| True (back edge) -> Block 2 - -# 98| System.Void test_stmts.checkedUnchecked() -# 98| Block 0 -# 98| v98_1(Void) = EnterFunction : -# 98| mu98_2() = AliasedDefinition : -# 100| r100_1(glval) = VariableAddress[num] : -# 100| r100_2(Int32) = Constant[2147483647] : -# 100| r100_3(Int32) = Load[?] : &:r100_2, ~m? -# 100| mu100_4(Int32) = Store[num] : &:r100_1, r100_3 -# 103| r103_1(glval) = VariableAddress[num] : -# 103| r103_2(Int32) = Load[num] : &:r103_1, ~m? -# 103| r103_3(Int32) = Constant[1] : -# 103| r103_4(Int32) = Add : r103_2, r103_3 -# 103| r103_5(glval) = VariableAddress[num] : -# 103| mu103_6(Int32) = Store[num] : &:r103_5, r103_4 -# 107| r107_1(glval) = VariableAddress[num] : -# 107| r107_2(Int32) = Load[num] : &:r107_1, ~m? -# 107| r107_3(Int32) = Constant[1] : -# 107| r107_4(Int32) = Add : r107_2, r107_3 -# 107| r107_5(glval) = VariableAddress[num] : -# 107| mu107_6(Int32) = Store[num] : &:r107_5, r107_4 -# 98| v98_3(Void) = ReturnVoid : -# 98| v98_4(Void) = AliasedUse : ~m? -# 98| v98_5(Void) = ExitFunction : - -using.cs: -# 7| System.Void UsingStmt.MyDisposable..ctor() -# 7| Block 0 -# 7| v7_1(Void) = EnterFunction : -# 7| mu7_2() = AliasedDefinition : -# 7| r7_3(glval) = InitializeThis : -# 7| r7_4(glval) = Convert[MyDisposable : Object] : r7_3 -# 7| r7_5() = FunctionAddress[Object] : -# 7| v7_6(Void) = Call[Object] : func:r7_5, this:r7_4 -# 7| mu7_7() = ^CallSideEffect : ~m? -# 7| v7_8(Void) = NoOp : -# 7| v7_9(Void) = ReturnVoid : -# 7| v7_10(Void) = AliasedUse : ~m? -# 7| v7_11(Void) = ExitFunction : - -# 8| System.Void UsingStmt.MyDisposable.DoSomething() -# 8| Block 0 -# 8| v8_1(Void) = EnterFunction : -# 8| mu8_2() = AliasedDefinition : -# 8| r8_3(glval) = InitializeThis : -# 8| v8_4(Void) = NoOp : -# 8| v8_5(Void) = ReturnVoid : -# 8| v8_6(Void) = AliasedUse : ~m? -# 8| v8_7(Void) = ExitFunction : - -# 9| System.Void UsingStmt.MyDisposable.Dispose() -# 9| Block 0 -# 9| v9_1(Void) = EnterFunction : -# 9| mu9_2() = AliasedDefinition : -# 9| r9_3(glval) = InitializeThis : -# 9| v9_4(Void) = NoOp : -# 9| v9_5(Void) = ReturnVoid : -# 9| v9_6(Void) = AliasedUse : ~m? -# 9| v9_7(Void) = ExitFunction : - -# 12| System.Void UsingStmt.Main() -# 12| Block 0 -# 12| v12_1(Void) = EnterFunction : -# 12| mu12_2() = AliasedDefinition : -# 14| r14_1(glval) = VariableAddress[o1] : -# 14| r14_2(MyDisposable) = NewObj : -# 14| r14_3() = FunctionAddress[MyDisposable] : -# 14| v14_4(Void) = Call[MyDisposable] : func:r14_3, this:r14_2 -# 14| mu14_5() = ^CallSideEffect : ~m? -# 14| mu14_6(MyDisposable) = Store[o1] : &:r14_1, r14_2 -# 16| r16_1(glval) = VariableAddress[o1] : -# 16| r16_2(MyDisposable) = Load[o1] : &:r16_1, ~m? -# 16| r16_3() = FunctionAddress[DoSomething] : -# 16| v16_4(Void) = Call[DoSomething] : func:r16_3, this:r16_2 -# 16| mu16_5() = ^CallSideEffect : ~m? -# 19| r19_1(glval) = VariableAddress[o2] : -# 19| r19_2(MyDisposable) = NewObj : -# 19| r19_3() = FunctionAddress[MyDisposable] : -# 19| v19_4(Void) = Call[MyDisposable] : func:r19_3, this:r19_2 -# 19| mu19_5() = ^CallSideEffect : ~m? -# 19| mu19_6(MyDisposable) = Store[o2] : &:r19_1, r19_2 -# 22| r22_1(glval) = VariableAddress[o2] : -# 22| r22_2(MyDisposable) = Load[o2] : &:r22_1, ~m? -# 22| r22_3() = FunctionAddress[DoSomething] : -# 22| v22_4(Void) = Call[DoSomething] : func:r22_3, this:r22_2 -# 22| mu22_5() = ^CallSideEffect : ~m? -# 25| r25_1(glval) = VariableAddress[o3] : -# 25| r25_2(MyDisposable) = NewObj : -# 25| r25_3() = FunctionAddress[MyDisposable] : -# 25| v25_4(Void) = Call[MyDisposable] : func:r25_3, this:r25_2 -# 25| mu25_5() = ^CallSideEffect : ~m? -# 25| mu25_6(MyDisposable) = Store[o3] : &:r25_1, r25_2 -# 26| r26_1(glval) = VariableAddress[o3] : -# 26| r26_2(MyDisposable) = Load[o3] : &:r26_1, ~m? -# 26| r26_3() = FunctionAddress[DoSomething] : -# 26| v26_4(Void) = Call[DoSomething] : func:r26_3, this:r26_2 -# 26| mu26_5() = ^CallSideEffect : ~m? -# 12| v12_3(Void) = ReturnVoid : -# 12| v12_4(Void) = AliasedUse : ~m? -# 12| v12_5(Void) = ExitFunction : - -variables.cs: -# 5| System.Void test_variables.f() -# 5| Block 0 -# 5| v5_1(Void) = EnterFunction : -# 5| mu5_2() = AliasedDefinition : -# 7| r7_1(glval) = VariableAddress[x] : -# 7| mu7_2(Int32) = Uninitialized[x] : &:r7_1 -# 7| r7_3(glval) = VariableAddress[y] : -# 7| r7_4(Int32) = Constant[5] : -# 7| mu7_5(Int32) = Store[y] : &:r7_3, r7_4 -# 8| r8_1(Int32) = Constant[4] : -# 8| r8_2(glval) = VariableAddress[x] : -# 8| mu8_3(Int32) = Store[x] : &:r8_2, r8_1 -# 9| r9_1(glval) = VariableAddress[y] : -# 9| r9_2(Int32) = Load[y] : &:r9_1, ~m? -# 9| r9_3(glval) = VariableAddress[x] : -# 9| mu9_4(Int32) = Store[x] : &:r9_3, r9_2 -# 10| r10_1(glval) = VariableAddress[z] : -# 10| r10_2(glval) = VariableAddress[y] : -# 10| r10_3(Int32) = Load[y] : &:r10_2, ~m? -# 10| mu10_4(Int32) = Store[z] : &:r10_1, r10_3 -# 5| v5_3(Void) = ReturnVoid : -# 5| v5_4(Void) = AliasedUse : ~m? -# 5| v5_5(Void) = ExitFunction : diff --git a/csharp/ql/test/experimental/ir/ir/raw_ir.qlref b/csharp/ql/test/experimental/ir/ir/raw_ir.qlref deleted file mode 100644 index 336afc397f5..00000000000 --- a/csharp/ql/test/experimental/ir/ir/raw_ir.qlref +++ /dev/null @@ -1 +0,0 @@ -experimental/ir/implementation/raw/PrintIR.ql \ No newline at end of file diff --git a/csharp/ql/test/experimental/ir/ir/raw_ir_consistency.expected b/csharp/ql/test/experimental/ir/ir/raw_ir_consistency.expected deleted file mode 100644 index 05ab9037c87..00000000000 --- a/csharp/ql/test/experimental/ir/ir/raw_ir_consistency.expected +++ /dev/null @@ -1,35 +0,0 @@ -missingOperand -unexpectedOperand -duplicateOperand -missingPhiOperand -missingOperandType -duplicateChiOperand -sideEffectWithoutPrimary -instructionWithoutSuccessor -ambiguousSuccessors -unexplainedLoop -unnecessaryPhiInstruction -memoryOperandDefinitionIsUnmodeled -operandAcrossFunctions -instructionWithoutUniqueBlock -containsLoopOfForwardEdges -lostReachability -backEdgeCountMismatch -useNotDominatedByDefinition -switchInstructionWithoutDefaultEdge -notMarkedAsConflated -wronglyMarkedAsConflated -invalidOverlap -nonUniqueEnclosingIRFunction -fieldAddressOnNonPointer -| inoutref.cs:18:9:18:13 | FieldAddress: access to field fld | FieldAddress instruction 'FieldAddress: access to field fld' has an object address operand that is not an address, in function '$@'. | inoutref.cs:16:17:16:17 | System.Void InOutRef.F(System.Int32,MyStruct,MyStruct,MyClass,MyClass) | System.Void InOutRef.F(System.Int32,MyStruct,MyStruct,MyClass,MyClass) | -| inoutref.cs:19:13:19:17 | FieldAddress: access to field fld | FieldAddress instruction 'FieldAddress: access to field fld' has an object address operand that is not an address, in function '$@'. | inoutref.cs:16:17:16:17 | System.Void InOutRef.F(System.Int32,MyStruct,MyStruct,MyClass,MyClass) | System.Void InOutRef.F(System.Int32,MyStruct,MyStruct,MyClass,MyClass) | -| pointers.cs:35:17:35:24 | FieldAddress: access to field fld | FieldAddress instruction 'FieldAddress: access to field fld' has an object address operand that is not an address, in function '$@'. | pointers.cs:25:17:25:20 | System.Void Pointers.Main() | System.Void Pointers.Main() | -thisArgumentIsNonPointer -| inoutref.cs:32:22:32:35 | Call: object creation of type MyStruct | Call instruction 'Call: object creation of type MyStruct' has a `this` argument operand that is not an address, in function '$@'. | inoutref.cs:29:17:29:20 | System.Void InOutRef.Main() | System.Void InOutRef.Main() | -| pointers.cs:27:22:27:35 | Call: object creation of type MyStruct | Call instruction 'Call: object creation of type MyStruct' has a `this` argument operand that is not an address, in function '$@'. | pointers.cs:25:17:25:20 | System.Void Pointers.Main() | System.Void Pointers.Main() | -nonUniqueIRVariable -missingCanonicalLanguageType -multipleCanonicalLanguageTypes -missingIRType -multipleIRTypes diff --git a/csharp/ql/test/experimental/ir/ir/raw_ir_consistency.qlref b/csharp/ql/test/experimental/ir/ir/raw_ir_consistency.qlref deleted file mode 100644 index 3059c9b7b77..00000000000 --- a/csharp/ql/test/experimental/ir/ir/raw_ir_consistency.qlref +++ /dev/null @@ -1 +0,0 @@ -experimental/ir/implementation/raw/IRConsistency.ql \ No newline at end of file diff --git a/csharp/ql/test/experimental/ir/ir/simple_call.cs b/csharp/ql/test/experimental/ir/ir/simple_call.cs deleted file mode 100644 index 7505bd8001c..00000000000 --- a/csharp/ql/test/experimental/ir/ir/simple_call.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -public class test_simple_call -{ - public static int f() - { - return 0; - } - - public int g() - { - return f(); - } -} diff --git a/csharp/ql/test/experimental/ir/ir/simple_function.cs b/csharp/ql/test/experimental/ir/ir/simple_function.cs deleted file mode 100644 index 76dade38fb6..00000000000 --- a/csharp/ql/test/experimental/ir/ir/simple_function.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -public class test_simple_function -{ - public static int f() - { - return 0; - } -} diff --git a/csharp/ql/test/experimental/ir/ir/stmts.cs b/csharp/ql/test/experimental/ir/ir/stmts.cs deleted file mode 100644 index db0b523a434..00000000000 --- a/csharp/ql/test/experimental/ir/ir/stmts.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; - -public class test_stmts -{ - public static int ifStmt(int x) - { - if (x == 5) - return 0; - else - return 1; - } - - public static void whileStmt(int x) - { - int i = 0; - while (i < 10) - { - x = x + 1; - } - } - - public static int switchStmt() - { - object caseSwitch = new object(); - int select = 0; - - switch (caseSwitch) - { - case -1: - goto case true; - case 0: - goto case "123"; - case "123": - select = 100; - break; - case true: - select = 101; - goto default; - default: - return select; - } - return 0; - } - - public static void tryCatchFinally() - { - int x = 5; - try - { - if (x != 0) - throw (new System.Exception()); - x = 0; - } - catch(System.Exception ex) - { - x = 1; - } - catch - { - throw; - } - finally - { - x = 2; - } - } - - public static void forStmt() - { - int x = 0; - for (int i = 0, j = 10; i < j; i++, j--) - { - x = x - 1; - } - - int a, b = 10; - for (a = 0; a < b; ) - { - a++; - } - - for( ; ; ) - { - - } - } - - public static void doWhile() - { - int x = 0; - do - { - x = x + 1; - } - while (x < 10); - } - - public static void checkedUnchecked() - { - int num = Int32.MaxValue; - unchecked - { - num = num + 1; - } - checked - { - num = num + 1; - } - } -} diff --git a/csharp/ql/test/experimental/ir/ir/unaliased_ssa_consistency.expected b/csharp/ql/test/experimental/ir/ir/unaliased_ssa_consistency.expected deleted file mode 100644 index 05ab9037c87..00000000000 --- a/csharp/ql/test/experimental/ir/ir/unaliased_ssa_consistency.expected +++ /dev/null @@ -1,35 +0,0 @@ -missingOperand -unexpectedOperand -duplicateOperand -missingPhiOperand -missingOperandType -duplicateChiOperand -sideEffectWithoutPrimary -instructionWithoutSuccessor -ambiguousSuccessors -unexplainedLoop -unnecessaryPhiInstruction -memoryOperandDefinitionIsUnmodeled -operandAcrossFunctions -instructionWithoutUniqueBlock -containsLoopOfForwardEdges -lostReachability -backEdgeCountMismatch -useNotDominatedByDefinition -switchInstructionWithoutDefaultEdge -notMarkedAsConflated -wronglyMarkedAsConflated -invalidOverlap -nonUniqueEnclosingIRFunction -fieldAddressOnNonPointer -| inoutref.cs:18:9:18:13 | FieldAddress: access to field fld | FieldAddress instruction 'FieldAddress: access to field fld' has an object address operand that is not an address, in function '$@'. | inoutref.cs:16:17:16:17 | System.Void InOutRef.F(System.Int32,MyStruct,MyStruct,MyClass,MyClass) | System.Void InOutRef.F(System.Int32,MyStruct,MyStruct,MyClass,MyClass) | -| inoutref.cs:19:13:19:17 | FieldAddress: access to field fld | FieldAddress instruction 'FieldAddress: access to field fld' has an object address operand that is not an address, in function '$@'. | inoutref.cs:16:17:16:17 | System.Void InOutRef.F(System.Int32,MyStruct,MyStruct,MyClass,MyClass) | System.Void InOutRef.F(System.Int32,MyStruct,MyStruct,MyClass,MyClass) | -| pointers.cs:35:17:35:24 | FieldAddress: access to field fld | FieldAddress instruction 'FieldAddress: access to field fld' has an object address operand that is not an address, in function '$@'. | pointers.cs:25:17:25:20 | System.Void Pointers.Main() | System.Void Pointers.Main() | -thisArgumentIsNonPointer -| inoutref.cs:32:22:32:35 | Call: object creation of type MyStruct | Call instruction 'Call: object creation of type MyStruct' has a `this` argument operand that is not an address, in function '$@'. | inoutref.cs:29:17:29:20 | System.Void InOutRef.Main() | System.Void InOutRef.Main() | -| pointers.cs:27:22:27:35 | Call: object creation of type MyStruct | Call instruction 'Call: object creation of type MyStruct' has a `this` argument operand that is not an address, in function '$@'. | pointers.cs:25:17:25:20 | System.Void Pointers.Main() | System.Void Pointers.Main() | -nonUniqueIRVariable -missingCanonicalLanguageType -multipleCanonicalLanguageTypes -missingIRType -multipleIRTypes diff --git a/csharp/ql/test/experimental/ir/ir/unaliased_ssa_consistency.qlref b/csharp/ql/test/experimental/ir/ir/unaliased_ssa_consistency.qlref deleted file mode 100644 index 65c39482529..00000000000 --- a/csharp/ql/test/experimental/ir/ir/unaliased_ssa_consistency.qlref +++ /dev/null @@ -1 +0,0 @@ -experimental/ir/implementation/unaliased_ssa/IRConsistency.ql diff --git a/csharp/ql/test/experimental/ir/ir/unaliased_ssa_ssa_consistency.expected b/csharp/ql/test/experimental/ir/ir/unaliased_ssa_ssa_consistency.expected deleted file mode 100644 index 21782bd5ef1..00000000000 --- a/csharp/ql/test/experimental/ir/ir/unaliased_ssa_ssa_consistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -multipleOperandMemoryLocations -missingVirtualVariableForMemoryLocation -multipleVirtualVariablesForMemoryLocation diff --git a/csharp/ql/test/experimental/ir/ir/unaliased_ssa_ssa_consistency.qlref b/csharp/ql/test/experimental/ir/ir/unaliased_ssa_ssa_consistency.qlref deleted file mode 100644 index 8d24936ecea..00000000000 --- a/csharp/ql/test/experimental/ir/ir/unaliased_ssa_ssa_consistency.qlref +++ /dev/null @@ -1 +0,0 @@ -experimental/ir/implementation/unaliased_ssa/internal/SSAConsistency.ql \ No newline at end of file diff --git a/csharp/ql/test/experimental/ir/ir/using.cs b/csharp/ql/test/experimental/ir/ir/using.cs deleted file mode 100644 index f81b2f128f1..00000000000 --- a/csharp/ql/test/experimental/ir/ir/using.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; - -class UsingStmt -{ - public class MyDisposable : IDisposable - { - public MyDisposable() { } - public void DoSomething() { } - public void Dispose() { } - } - - static void Main() - { - using (var o1 = new MyDisposable()) - { - o1.DoSomething(); - } - - var o2 = new MyDisposable(); - using (o2) - { - o2.DoSomething(); - } - - using var o3 = new MyDisposable(); - o3.DoSomething(); - } -} diff --git a/csharp/ql/test/experimental/ir/ir/variables.cs b/csharp/ql/test/experimental/ir/ir/variables.cs deleted file mode 100644 index 1855f287190..00000000000 --- a/csharp/ql/test/experimental/ir/ir/variables.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -public class test_variables -{ - public static void f() - { - int x, y = 5; - x = 4; - x = y; - int z = y; - } -} diff --git a/csharp/ql/test/experimental/ir/offbyone/OffByOneRA.expected b/csharp/ql/test/experimental/ir/offbyone/OffByOneRA.expected deleted file mode 100644 index 0c16c9ff134..00000000000 --- a/csharp/ql/test/experimental/ir/offbyone/OffByOneRA.expected +++ /dev/null @@ -1,5 +0,0 @@ -| test.cs:21:17:21:21 | Test2 | test.cs:34:41:34:51 | access to array element | This array access might be out of bounds, as the index might be equal to the array length | -| test.cs:56:17:56:21 | Test4 | test.cs:67:41:67:51 | access to array element | This array access might be out of bounds, as the index might be equal to the array length | -| test.cs:71:17:71:21 | Test5 | test.cs:77:22:77:27 | access to indexer | This array access might be out of bounds, as the index might be equal to the array length | -| test.cs:81:17:81:21 | Test6 | test.cs:90:41:90:55 | access to array element | This array access might be out of bounds, as the index might be equal to the array length | -| test.cs:94:17:94:21 | Test7 | test.cs:104:41:104:50 | access to array element | This array access might be out of bounds, as the index might be equal to the array length + 1 | diff --git a/csharp/ql/test/experimental/ir/offbyone/OffByOneRA.ql b/csharp/ql/test/experimental/ir/offbyone/OffByOneRA.ql deleted file mode 100644 index 38386d47568..00000000000 --- a/csharp/ql/test/experimental/ir/offbyone/OffByOneRA.ql +++ /dev/null @@ -1,50 +0,0 @@ -import csharp -import experimental.ir.IR -import experimental.ir.rangeanalysis.RangeAnalysis -import experimental.ir.rangeanalysis.RangeUtils - -/** - * Holds if the index expression of `aa` is less than or equal to the array length plus `k`. - */ -predicate boundedArrayAccess(ElementAccess aa, int k) { - exists(Instruction index, Instruction usage, Bound b, int delta | - ( - // indexer access - usage.(CallInstruction).getAst() = aa - or - // array access - usage.(PointerAddInstruction).getAst() = aa - ) and - usage.getAnOperand().getDef() = index and - boundedInstruction(index, b, delta, true, _) - | - exists(PropertyAccess pa | - k = delta and - b.getInstruction().getAst() = pa and - pa.getProperty().getName() = "Length" and - pa.(QualifiableExpr).getQualifier().(VariableAccess).getTarget() = - aa.getQualifier().(VariableAccess).getTarget() - ) - or - b instanceof ZeroBound and - k = delta - getArrayDim(aa.getQualifier().(VariableAccess).getTarget()) - ) -} - -/** - * Holds if the index expression is less than or equal to the array length plus `k`, - * but not necessarily less than or equal to the array length plus `k-1`. - */ -predicate bestArrayAccessBound(ElementAccess aa, int k) { - k = min(int k0 | boundedArrayAccess(aa, k0)) -} - -from ElementAccess aa, int k, string msg, string add -where - bestArrayAccessBound(aa, k) and - k >= 0 and - (if k = 0 then add = "" else add = " + " + k) and - msg = - "This array access might be out of bounds, as the index might be equal to the array length" + - add -select aa.getEnclosingCallable(), aa, msg diff --git a/csharp/ql/test/experimental/ir/offbyone/null.cs b/csharp/ql/test/experimental/ir/offbyone/null.cs deleted file mode 100644 index a1d7adf1511..00000000000 --- a/csharp/ql/test/experimental/ir/offbyone/null.cs +++ /dev/null @@ -1,5 +0,0 @@ -class Null { - public static void Main() { - object o = null; - } -} diff --git a/csharp/ql/test/experimental/ir/offbyone/test.cs b/csharp/ql/test/experimental/ir/offbyone/test.cs deleted file mode 100644 index 74bf155420f..00000000000 --- a/csharp/ql/test/experimental/ir/offbyone/test.cs +++ /dev/null @@ -1,107 +0,0 @@ -class ContainerLengthOffByOne -{ - public int[] arr; - public string str; - - public static void Fun(int elem) - { - } - - public void Test1() - { - int len1 = this.arr.Length; - int len2 = len1 + 1; - // OK - for(int i = 0; i < len2 - 1; i++) - { - ContainerLengthOffByOne.Fun(this.arr[i]); - } - } - - public void Test2() - { - int len1 = this.arr.Length; - - int len2; - if (len1 % 2 == 0) - len2 = len1 + 1; - else - len2 = len1; - // Not OK, PHI node where the upper bound - // exceeds the size of the array. - for(int i = 0; i < len2; i++) - { - ContainerLengthOffByOne.Fun(this.arr[i]); - } - } - - public void Test3() - { - int len1 = this.arr.Length; - int len2 = len1 - 1; - - int len3; - if (len2 % 2 == 0) - len3 = len2 + 1; - else - len3 = len2; - // OK, PHI node has bounds that ensure - // we don't get an off by one error. - for(int i = 0; i < len3; i++) - { - ContainerLengthOffByOne.Fun(this.arr[i]); - } - } - - public void Test4() - { - int len1 = this.arr.Length; - - int len2 = len1 + 1; - int len3 = len2 - 1; - int len4 = len3 + 2; - int len5 = len4 - 1; - // Not OK, len5 is off by one. - for(int i = 0; i < len5; i++) - { - ContainerLengthOffByOne.Fun(this.arr[i]); - } - } - - public void Test5() - { - int len = this.str.Length; - // Not OK; test for indexers - for (int i = 0; i <= len; i++) - { - char c = str[i]; - } - } - - public void Test6() - { - int len = this.arr.Length - 2; - int len1 = len + 3; - int len2 = len1 - 1; - // Not OK, off by one - // The test shows that more complex expressions are treated correctly - for (int i = 0; i < len2; i++) - { - ContainerLengthOffByOne.Fun(this.arr[i + 1]); - } - } - - public void Test7() - { - int[] arrInit = { 1, 2, 3 }; - int len = (arrInit.Length * 2 + 2) / 2 * 2; - int len1 = len / 2 - 3 + 4; - // Not OK, len1 == this.arrInit + 1 - // This test shows that array initializer's length - // are used in bounds - for (int i = 0; i < len1; i++) - { - ContainerLengthOffByOne.Fun(arrInit[i]); - } - } -} diff --git a/csharp/ql/test/experimental/ir/rangeanalysis/RangeAnalysis.expected b/csharp/ql/test/experimental/ir/rangeanalysis/RangeAnalysis.expected deleted file mode 100644 index 329bbd3bff0..00000000000 --- a/csharp/ql/test/experimental/ir/rangeanalysis/RangeAnalysis.expected +++ /dev/null @@ -1,18 +0,0 @@ -| test.cs:22:12:22:12 | Store: access to parameter x | test.cs:16:24:16:24 | InitializeParameter: x | 0 | false | NoReason | file://:0:0:0:0 | :0:0:0:0 | -| test.cs:22:12:22:12 | Store: access to parameter x | test.cs:16:31:16:31 | InitializeParameter: y | 0 | false | CompareLT: ... < ... | test.cs:18:9:18:13 | test.cs:18:9:18:13 | -| test.cs:22:12:22:12 | Store: access to parameter x | test.cs:16:31:16:31 | InitializeParameter: y | 0 | false | NoReason | file://:0:0:0:0 | :0:0:0:0 | -| test.cs:36:12:36:12 | Store: access to parameter x | test.cs:26:24:26:24 | InitializeParameter: x | -2 | false | NoReason | file://:0:0:0:0 | :0:0:0:0 | -| test.cs:36:12:36:12 | Store: access to parameter x | test.cs:26:31:26:31 | InitializeParameter: y | -2 | false | CompareLT: ... < ... | test.cs:28:9:28:13 | test.cs:28:9:28:13 | -| test.cs:45:12:45:12 | Load: access to local variable i | file://:0:0:0:0 | 0 | 0 | false | NoReason | file://:0:0:0:0 | :0:0:0:0 | -| test.cs:45:12:45:12 | Load: access to local variable i | test.cs:40:25:40:25 | InitializeParameter: x | -1 | true | CompareLT: ... < ... | test.cs:43:20:43:24 | test.cs:43:20:43:24 | -| test.cs:49:12:49:12 | Load: access to local variable i | file://:0:0:0:0 | 0 | 1 | false | CompareGT: ... > ... | test.cs:47:20:47:24 | test.cs:47:20:47:24 | -| test.cs:49:12:49:12 | Load: access to local variable i | test.cs:40:25:40:25 | InitializeParameter: x | 0 | true | NoReason | file://:0:0:0:0 | :0:0:0:0 | -| test.cs:49:12:49:12 | Load: access to local variable i | test.cs:43:20:43:20 | Phi: access to local variable i | 0 | true | CompareLT: ... < ... | test.cs:43:20:43:24 | test.cs:43:20:43:24 | -| test.cs:53:12:53:12 | Load: access to local variable i | file://:0:0:0:0 | 0 | 0 | false | NoReason | file://:0:0:0:0 | :0:0:0:0 | -| test.cs:53:12:53:12 | Load: access to local variable i | test.cs:40:25:40:25 | InitializeParameter: x | 1 | true | CompareLT: ... < ... | test.cs:51:20:51:28 | test.cs:51:20:51:28 | -| test.cs:53:12:53:12 | Load: access to local variable i | test.cs:43:20:43:20 | Phi: access to local variable i | 1 | true | CompareLT: ... < ... | test.cs:51:20:51:28 | test.cs:51:20:51:28 | -| test.cs:53:12:53:12 | Load: access to local variable i | test.cs:47:20:47:20 | Phi: access to local variable i | 0 | false | CompareGT: ... > ... | test.cs:47:20:47:24 | test.cs:47:20:47:24 | -| test.cs:62:13:62:17 | Load: access to parameter begin | test.cs:58:33:58:37 | InitializeParameter: begin | 0 | false | NoReason | file://:0:0:0:0 | :0:0:0:0 | -| test.cs:74:14:74:14 | Load: access to parameter x | test.cs:68:32:68:32 | InitializeParameter: y | -1 | true | CompareLT: ... < ... | test.cs:72:11:72:15 | test.cs:72:11:72:15 | -| test.cs:74:14:74:14 | Load: access to parameter x | test.cs:68:39:68:39 | InitializeParameter: z | -2 | true | CompareLT: ... < ... | test.cs:72:11:72:15 | test.cs:72:11:72:15 | -| test.cs:81:14:81:14 | Load: access to parameter x | test.cs:68:32:68:32 | InitializeParameter: y | -1 | true | CompareLT: ... < ... | test.cs:77:9:77:13 | test.cs:77:9:77:13 | diff --git a/csharp/ql/test/experimental/ir/rangeanalysis/RangeAnalysis.ql b/csharp/ql/test/experimental/ir/rangeanalysis/RangeAnalysis.ql deleted file mode 100644 index ab62db5e5ff..00000000000 --- a/csharp/ql/test/experimental/ir/rangeanalysis/RangeAnalysis.ql +++ /dev/null @@ -1,25 +0,0 @@ -import experimental.ir.rangeanalysis.RangeAnalysis -import experimental.ir.IR -import experimental.ir.internal.IRGuards -import experimental.ir.ValueNumbering - -query predicate instructionBounds( - Instruction i, Bound b, int delta, boolean upper, Reason reason, Location reasonLoc -) { - ( - i.getAUse() instanceof ArgumentOperand - or - exists(ReturnValueInstruction retInstr | retInstr.getReturnValueOperand() = i.getAUse()) - ) and - ( - upper = true and - delta = min(int d | boundedInstruction(i, b, d, upper, reason)) - or - upper = false and - delta = max(int d | boundedInstruction(i, b, d, upper, reason)) - ) and - not valueNumber(b.getInstruction()) = valueNumber(i) and - if reason instanceof CondReason - then reasonLoc = reason.(CondReason).getCond().getLocation() - else reasonLoc instanceof EmptyLocation -} diff --git a/csharp/ql/test/experimental/ir/rangeanalysis/null.cs b/csharp/ql/test/experimental/ir/rangeanalysis/null.cs deleted file mode 100644 index a1d7adf1511..00000000000 --- a/csharp/ql/test/experimental/ir/rangeanalysis/null.cs +++ /dev/null @@ -1,5 +0,0 @@ -class Null { - public static void Main() { - object o = null; - } -} diff --git a/csharp/ql/test/experimental/ir/rangeanalysis/test.cs b/csharp/ql/test/experimental/ir/rangeanalysis/test.cs deleted file mode 100644 index 018d7b76a59..00000000000 --- a/csharp/ql/test/experimental/ir/rangeanalysis/test.cs +++ /dev/null @@ -1,85 +0,0 @@ -class RangeAnalysis { - static void Sink(int val) - { - } - - static unsafe void Sinkp(int* p) - { - } - - static int Source() - { - return 0; - } - - // Guards, inference, critical edges - static int Test1(int x, int y) - { - if (x < y) - { - x = y; - } - return x; - } - - // Bounds mergers at phi nodes - static int Test2(int x, int y) - { - if (x < y) - { - x = y; - } - else - { - x = x - 2; - } - return x; - } - - // for loops - static void Test3(int x) - { - int y = x; - for(int i = 0; i < x; i++) - { - Sink(i); - } - for(int i = y; i > 0; i--) - { - Sink(i); - } - for(int i = 0; i < y + 2; i++) - { - Sink(i); - } - } - - // pointer bounds - unsafe static void Test4(int *begin, int *end) - { - while (begin < end) - { - Sinkp(begin); - begin++; - } - } - - // bound propagation through conditionals - static void Test5(int x, int y, int z) - { - if (y < z) - { - if (x < y) - { - Sink(x); - } - } - if (x < y) - { - if (y < z) - { - Sink(x); // x < z is not inferred here - } - } - } -} diff --git a/csharp/ql/test/library-tests/attributes/AttributeArguments.expected b/csharp/ql/test/library-tests/attributes/AttributeArguments.expected index dc7bc9330d9..aef0c30408b 100644 --- a/csharp/ql/test/library-tests/attributes/AttributeArguments.expected +++ b/csharp/ql/test/library-tests/attributes/AttributeArguments.expected @@ -23,89 +23,91 @@ arguments | Assembly1.dll:0:0:0:0 | [return: Custom(...)] | 3 | Assembly1.dll:0:0:0:0 | (...) ... | | Assembly1.dll:0:0:0:0 | [return: Custom(...)] | 4 | Assembly1.dll:0:0:0:0 | array creation of type Int32[] | | Assembly1.dll:0:0:0:0 | [return: Custom(...)] | 5 | Assembly1.dll:0:0:0:0 | array creation of type Object[] | -| attributes.cs:10:12:10:24 | [assembly: AssemblyTitle(...)] | 0 | attributes.cs:10:26:10:45 | "C# attributes test" | -| attributes.cs:11:12:11:30 | [assembly: AssemblyDescription(...)] | 0 | attributes.cs:11:32:11:56 | "A test of C# attributes" | -| attributes.cs:12:12:12:32 | [assembly: AssemblyConfiguration(...)] | 0 | attributes.cs:12:34:12:35 | "" | -| attributes.cs:13:12:13:26 | [assembly: AssemblyCompany(...)] | 0 | attributes.cs:13:28:13:39 | "Semmle Plc" | -| attributes.cs:14:12:14:26 | [assembly: AssemblyProduct(...)] | 0 | attributes.cs:14:28:14:34 | "Odasa" | -| attributes.cs:15:12:15:28 | [assembly: AssemblyCopyright(...)] | 0 | attributes.cs:15:30:15:54 | "Copyright \u00a9 Semmle 2018" | -| attributes.cs:16:12:16:28 | [assembly: AssemblyTrademark(...)] | 0 | attributes.cs:16:30:16:31 | "" | -| attributes.cs:17:12:17:26 | [assembly: AssemblyCulture(...)] | 0 | attributes.cs:17:28:17:29 | "" | -| attributes.cs:22:12:22:21 | [assembly: ComVisible(...)] | 0 | attributes.cs:22:23:22:27 | false | -| attributes.cs:25:12:25:15 | [assembly: Guid(...)] | 0 | attributes.cs:25:17:25:54 | "2f70fdd6-14aa-4850-b053-d547adb1f476" | -| attributes.cs:37:12:37:26 | [assembly: AssemblyVersion(...)] | 0 | attributes.cs:37:28:37:36 | "1.0.0.0" | -| attributes.cs:38:12:38:30 | [assembly: AssemblyFileVersion(...)] | 0 | attributes.cs:38:32:38:40 | "1.0.0.0" | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 0 | attributes.cs:40:17:40:17 | 0 | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 1 | attributes.cs:40:20:40:46 | array creation of type Object[] | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 2 | attributes.cs:40:49:40:69 | typeof(...) | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 3 | attributes.cs:40:72:40:76 | (...) ... | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 4 | attributes.cs:40:79:40:82 | null | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 5 | attributes.cs:40:92:40:122 | array creation of type Object[] | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 0 | attributes.cs:41:15:41:15 | 0 | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 1 | attributes.cs:41:18:41:44 | array creation of type Object[] | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 2 | attributes.cs:41:47:41:67 | typeof(...) | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 3 | attributes.cs:41:70:41:74 | (...) ... | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 4 | attributes.cs:41:77:41:80 | null | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 5 | attributes.cs:41:90:41:120 | array creation of type Object[] | -| attributes.cs:43:2:43:22 | [AttributeUsage(...)] | 0 | attributes.cs:43:24:43:50 | access to constant All | -| attributes.cs:46:6:46:16 | [Conditional(...)] | 0 | attributes.cs:46:18:46:25 | "DEBUG2" | -| attributes.cs:54:6:54:16 | [My(...)] | 0 | attributes.cs:54:18:54:22 | false | -| attributes.cs:57:6:57:16 | [My(...)] | 0 | attributes.cs:57:18:57:21 | true | -| attributes.cs:57:6:57:16 | [My(...)] | 1 | attributes.cs:57:28:57:29 | "" | -| attributes.cs:57:6:57:16 | [My(...)] | 2 | attributes.cs:57:36:57:36 | 0 | -| attributes.cs:58:6:58:8 | [My2(...)] | 0 | attributes.cs:58:28:58:32 | false | -| attributes.cs:58:6:58:8 | [My2(...)] | 1 | attributes.cs:58:13:58:16 | true | -| attributes.cs:58:6:58:8 | [My2(...)] | 2 | attributes.cs:58:6:58:8 | 12 | -| attributes.cs:58:6:58:8 | [My2(...)] | 3 | attributes.cs:58:22:58:22 | 1 | -| attributes.cs:58:6:58:8 | [My2(...)] | 4 | attributes.cs:58:39:58:40 | 42 | -| attributes.cs:77:2:77:5 | [Args(...)] | 0 | attributes.cs:77:7:77:8 | 42 | -| attributes.cs:77:2:77:5 | [Args(...)] | 1 | attributes.cs:77:11:77:14 | null | -| attributes.cs:77:2:77:5 | [Args(...)] | 2 | attributes.cs:77:17:77:25 | typeof(...) | -| attributes.cs:77:2:77:5 | [Args(...)] | 3 | attributes.cs:77:28:77:30 | access to constant A | -| attributes.cs:77:2:77:5 | [Args(...)] | 4 | attributes.cs:77:33:77:53 | array creation of type Int32[] | -| attributes.cs:77:2:77:5 | [Args(...)] | 5 | attributes.cs:77:63:77:93 | array creation of type Object[] | -| attributes.cs:80:6:80:9 | [Args(...)] | 0 | attributes.cs:80:11:80:16 | ... + ... | -| attributes.cs:80:6:80:9 | [Args(...)] | 1 | attributes.cs:80:19:80:39 | array creation of type Int32[] | -| attributes.cs:80:6:80:9 | [Args(...)] | 2 | attributes.cs:80:42:80:45 | null | -| attributes.cs:80:6:80:9 | [Args(...)] | 3 | attributes.cs:80:48:80:52 | (...) ... | -| attributes.cs:80:6:80:9 | [Args(...)] | 4 | attributes.cs:80:55:80:58 | null | -| attributes.cs:80:6:80:9 | [Args(...)] | 5 | attributes.cs:80:68:80:98 | array creation of type Object[] | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 0 | attributes.cs:81:19:81:24 | ... + ... | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 1 | attributes.cs:81:27:81:47 | array creation of type Int32[] | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 2 | attributes.cs:81:50:81:53 | null | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 3 | attributes.cs:81:56:81:60 | (...) ... | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 4 | attributes.cs:81:63:81:66 | null | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 5 | attributes.cs:81:76:81:106 | array creation of type Object[] | -| attributes.cs:96:2:96:13 | [My3(...)] | 0 | attributes.cs:96:15:96:15 | 1 | -| attributes.cs:97:10:97:21 | [return: My3(...)] | 0 | attributes.cs:97:23:97:23 | 2 | -| attributes.cs:100:10:100:21 | [return: My3(...)] | 0 | attributes.cs:100:23:100:23 | 3 | -| attributes.cs:101:8:101:19 | [My3(...)] | 0 | attributes.cs:101:21:101:21 | 4 | -| attributes.cs:106:6:106:17 | [My3(...)] | 0 | attributes.cs:106:19:106:19 | 5 | -| attributes.cs:107:14:107:25 | [return: My3(...)] | 0 | attributes.cs:107:27:107:27 | 6 | -| attributes.cs:112:10:112:21 | [My3(...)] | 0 | attributes.cs:112:23:112:23 | 7 | -| attributes.cs:113:18:113:29 | [return: My3(...)] | 0 | attributes.cs:113:31:113:31 | 8 | -| attributes.cs:116:18:116:29 | [My3(...)] | 0 | attributes.cs:116:31:116:31 | 9 | -| attributes.cs:117:17:117:28 | [My3(...)] | 0 | attributes.cs:117:30:117:31 | 10 | -| attributes.cs:124:18:124:29 | [My3(...)] | 0 | attributes.cs:124:31:124:32 | 11 | -| attributes.cs:125:18:125:29 | [return: My3(...)] | 0 | attributes.cs:125:31:125:32 | 12 | -| attributes.cs:128:10:128:21 | [My3(...)] | 0 | attributes.cs:128:23:128:24 | 13 | -| attributes.cs:129:17:129:28 | [My3(...)] | 0 | attributes.cs:129:30:129:31 | 14 | -| attributes.cs:141:6:141:11 | [Params(...)] | 0 | attributes.cs:141:13:141:15 | "a" | -| attributes.cs:141:6:141:11 | [Params(...)] | 1 | attributes.cs:141:18:141:20 | "b" | -| attributes.cs:141:6:141:11 | [Params(...)] | 2 | attributes.cs:141:23:141:23 | 1 | -| attributes.cs:141:6:141:11 | [Params(...)] | 3 | attributes.cs:141:26:141:26 | 2 | -| attributes.cs:141:6:141:11 | [Params(...)] | 4 | attributes.cs:141:29:141:29 | 3 | -| attributes.cs:144:6:144:11 | [Params(...)] | 0 | attributes.cs:144:17:144:19 | "a" | -| attributes.cs:144:6:144:11 | [Params(...)] | 1 | attributes.cs:144:26:144:28 | "b" | -| attributes.cs:144:6:144:11 | [Params(...)] | 2 | attributes.cs:144:31:144:31 | 1 | -| attributes.cs:144:6:144:11 | [Params(...)] | 3 | attributes.cs:144:34:144:34 | 2 | -| attributes.cs:144:6:144:11 | [Params(...)] | 4 | attributes.cs:144:37:144:37 | 3 | -| attributes.cs:147:6:147:11 | [Params(...)] | 0 | attributes.cs:147:35:147:37 | "a" | -| attributes.cs:147:6:147:11 | [Params(...)] | 1 | attributes.cs:147:26:147:28 | "b" | -| attributes.cs:147:6:147:11 | [Params(...)] | 2 | attributes.cs:147:19:147:19 | 1 | -| attributes.cs:150:6:150:11 | [Params(...)] | 0 | attributes.cs:150:45:150:47 | "a" | -| attributes.cs:150:6:150:11 | [Params(...)] | 1 | attributes.cs:150:36:150:38 | "b" | -| attributes.cs:150:6:150:11 | [Params(...)] | 2 | attributes.cs:150:19:150:29 | array creation of type Int32[] | +| attributes.cs:11:12:11:24 | [assembly: AssemblyTitle(...)] | 0 | attributes.cs:11:26:11:45 | "C# attributes test" | +| attributes.cs:12:12:12:30 | [assembly: AssemblyDescription(...)] | 0 | attributes.cs:12:32:12:56 | "A test of C# attributes" | +| attributes.cs:13:12:13:32 | [assembly: AssemblyConfiguration(...)] | 0 | attributes.cs:13:34:13:35 | "" | +| attributes.cs:14:12:14:26 | [assembly: AssemblyCompany(...)] | 0 | attributes.cs:14:28:14:39 | "Semmle Plc" | +| attributes.cs:15:12:15:26 | [assembly: AssemblyProduct(...)] | 0 | attributes.cs:15:28:15:34 | "Odasa" | +| attributes.cs:16:12:16:28 | [assembly: AssemblyCopyright(...)] | 0 | attributes.cs:16:30:16:54 | "Copyright \u00a9 Semmle 2018" | +| attributes.cs:17:12:17:28 | [assembly: AssemblyTrademark(...)] | 0 | attributes.cs:17:30:17:31 | "" | +| attributes.cs:18:12:18:26 | [assembly: AssemblyCulture(...)] | 0 | attributes.cs:18:28:18:29 | "" | +| attributes.cs:23:12:23:21 | [assembly: ComVisible(...)] | 0 | attributes.cs:23:23:23:27 | false | +| attributes.cs:26:12:26:15 | [assembly: Guid(...)] | 0 | attributes.cs:26:17:26:54 | "2f70fdd6-14aa-4850-b053-d547adb1f476" | +| attributes.cs:38:12:38:26 | [assembly: AssemblyVersion(...)] | 0 | attributes.cs:38:28:38:36 | "1.0.0.0" | +| attributes.cs:39:12:39:30 | [assembly: AssemblyFileVersion(...)] | 0 | attributes.cs:39:32:39:40 | "1.0.0.0" | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 0 | attributes.cs:41:17:41:17 | 0 | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 1 | attributes.cs:41:20:41:46 | array creation of type Object[] | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 2 | attributes.cs:41:49:41:69 | typeof(...) | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 3 | attributes.cs:41:72:41:76 | (...) ... | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 4 | attributes.cs:41:79:41:82 | null | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 5 | attributes.cs:41:92:41:122 | array creation of type Object[] | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 0 | attributes.cs:42:15:42:15 | 0 | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 1 | attributes.cs:42:18:42:44 | array creation of type Object[] | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 2 | attributes.cs:42:47:42:67 | typeof(...) | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 3 | attributes.cs:42:70:42:74 | (...) ... | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 4 | attributes.cs:42:77:42:80 | null | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 5 | attributes.cs:42:90:42:120 | array creation of type Object[] | +| attributes.cs:44:2:44:22 | [AttributeUsage(...)] | 0 | attributes.cs:44:24:44:50 | access to constant All | +| attributes.cs:47:6:47:16 | [Conditional(...)] | 0 | attributes.cs:47:18:47:25 | "DEBUG2" | +| attributes.cs:55:6:55:16 | [My(...)] | 0 | attributes.cs:55:18:55:22 | false | +| attributes.cs:58:6:58:16 | [My(...)] | 0 | attributes.cs:58:18:58:21 | true | +| attributes.cs:58:6:58:16 | [My(...)] | 1 | attributes.cs:58:28:58:29 | "" | +| attributes.cs:58:6:58:16 | [My(...)] | 2 | attributes.cs:58:36:58:36 | 0 | +| attributes.cs:59:6:59:8 | [My2(...)] | 0 | attributes.cs:59:28:59:32 | false | +| attributes.cs:59:6:59:8 | [My2(...)] | 1 | attributes.cs:59:13:59:16 | true | +| attributes.cs:59:6:59:8 | [My2(...)] | 2 | attributes.cs:59:6:59:8 | 12 | +| attributes.cs:59:6:59:8 | [My2(...)] | 3 | attributes.cs:59:22:59:22 | 1 | +| attributes.cs:59:6:59:8 | [My2(...)] | 4 | attributes.cs:59:39:59:40 | 42 | +| attributes.cs:78:2:78:5 | [Args(...)] | 0 | attributes.cs:78:7:78:8 | 42 | +| attributes.cs:78:2:78:5 | [Args(...)] | 1 | attributes.cs:78:11:78:14 | null | +| attributes.cs:78:2:78:5 | [Args(...)] | 2 | attributes.cs:78:17:78:25 | typeof(...) | +| attributes.cs:78:2:78:5 | [Args(...)] | 3 | attributes.cs:78:28:78:30 | access to constant A | +| attributes.cs:78:2:78:5 | [Args(...)] | 4 | attributes.cs:78:33:78:53 | array creation of type Int32[] | +| attributes.cs:78:2:78:5 | [Args(...)] | 5 | attributes.cs:78:63:78:93 | array creation of type Object[] | +| attributes.cs:81:6:81:9 | [Args(...)] | 0 | attributes.cs:81:11:81:16 | ... + ... | +| attributes.cs:81:6:81:9 | [Args(...)] | 1 | attributes.cs:81:19:81:39 | array creation of type Int32[] | +| attributes.cs:81:6:81:9 | [Args(...)] | 2 | attributes.cs:81:42:81:45 | null | +| attributes.cs:81:6:81:9 | [Args(...)] | 3 | attributes.cs:81:48:81:52 | (...) ... | +| attributes.cs:81:6:81:9 | [Args(...)] | 4 | attributes.cs:81:55:81:58 | null | +| attributes.cs:81:6:81:9 | [Args(...)] | 5 | attributes.cs:81:68:81:98 | array creation of type Object[] | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 0 | attributes.cs:82:19:82:24 | ... + ... | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 1 | attributes.cs:82:27:82:47 | array creation of type Int32[] | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 2 | attributes.cs:82:50:82:53 | null | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 3 | attributes.cs:82:56:82:60 | (...) ... | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 4 | attributes.cs:82:63:82:66 | null | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 5 | attributes.cs:82:76:82:106 | array creation of type Object[] | +| attributes.cs:97:2:97:13 | [My3(...)] | 0 | attributes.cs:97:15:97:15 | 1 | +| attributes.cs:98:10:98:21 | [return: My3(...)] | 0 | attributes.cs:98:23:98:23 | 2 | +| attributes.cs:101:10:101:21 | [return: My3(...)] | 0 | attributes.cs:101:23:101:23 | 3 | +| attributes.cs:102:8:102:19 | [My3(...)] | 0 | attributes.cs:102:21:102:21 | 4 | +| attributes.cs:107:6:107:17 | [My3(...)] | 0 | attributes.cs:107:19:107:19 | 5 | +| attributes.cs:108:14:108:25 | [return: My3(...)] | 0 | attributes.cs:108:27:108:27 | 6 | +| attributes.cs:113:10:113:21 | [My3(...)] | 0 | attributes.cs:113:23:113:23 | 7 | +| attributes.cs:114:18:114:29 | [return: My3(...)] | 0 | attributes.cs:114:31:114:31 | 8 | +| attributes.cs:117:18:117:29 | [My3(...)] | 0 | attributes.cs:117:31:117:31 | 9 | +| attributes.cs:118:17:118:28 | [My3(...)] | 0 | attributes.cs:118:30:118:31 | 10 | +| attributes.cs:125:18:125:29 | [My3(...)] | 0 | attributes.cs:125:31:125:32 | 11 | +| attributes.cs:126:18:126:29 | [return: My3(...)] | 0 | attributes.cs:126:31:126:32 | 12 | +| attributes.cs:129:10:129:21 | [My3(...)] | 0 | attributes.cs:129:23:129:24 | 13 | +| attributes.cs:130:17:130:28 | [My3(...)] | 0 | attributes.cs:130:30:130:31 | 14 | +| attributes.cs:142:6:142:11 | [Params(...)] | 0 | attributes.cs:142:13:142:15 | "a" | +| attributes.cs:142:6:142:11 | [Params(...)] | 1 | attributes.cs:142:18:142:20 | "b" | +| attributes.cs:142:6:142:11 | [Params(...)] | 2 | attributes.cs:142:23:142:23 | 1 | +| attributes.cs:142:6:142:11 | [Params(...)] | 3 | attributes.cs:142:26:142:26 | 2 | +| attributes.cs:142:6:142:11 | [Params(...)] | 4 | attributes.cs:142:29:142:29 | 3 | +| attributes.cs:145:6:145:11 | [Params(...)] | 0 | attributes.cs:145:17:145:19 | "a" | +| attributes.cs:145:6:145:11 | [Params(...)] | 1 | attributes.cs:145:26:145:28 | "b" | +| attributes.cs:145:6:145:11 | [Params(...)] | 2 | attributes.cs:145:31:145:31 | 1 | +| attributes.cs:145:6:145:11 | [Params(...)] | 3 | attributes.cs:145:34:145:34 | 2 | +| attributes.cs:145:6:145:11 | [Params(...)] | 4 | attributes.cs:145:37:145:37 | 3 | +| attributes.cs:148:6:148:11 | [Params(...)] | 0 | attributes.cs:148:35:148:37 | "a" | +| attributes.cs:148:6:148:11 | [Params(...)] | 1 | attributes.cs:148:26:148:28 | "b" | +| attributes.cs:148:6:148:11 | [Params(...)] | 2 | attributes.cs:148:19:148:19 | 1 | +| attributes.cs:151:6:151:11 | [Params(...)] | 0 | attributes.cs:151:45:151:47 | "a" | +| attributes.cs:151:6:151:11 | [Params(...)] | 1 | attributes.cs:151:36:151:38 | "b" | +| attributes.cs:151:6:151:11 | [Params(...)] | 2 | attributes.cs:151:19:151:29 | array creation of type Int32[] | +| attributes.cs:155:2:155:13 | [Experimental(...)] | 0 | attributes.cs:155:15:155:37 | "MyExperimentalClassId" | +| attributes.cs:158:6:158:17 | [Experimental(...)] | 0 | attributes.cs:158:19:158:42 | "MyExperimentalMethodId" | constructorArguments | Assembly1.dll:0:0:0:0 | [Custom(...)] | 0 | Assembly1.dll:0:0:0:0 | 1 | | Assembly1.dll:0:0:0:0 | [Custom(...)] | 0 | Assembly1.dll:0:0:0:0 | 3 | @@ -127,91 +129,93 @@ constructorArguments | Assembly1.dll:0:0:0:0 | [return: Custom(...)] | 2 | Assembly1.dll:0:0:0:0 | null | | Assembly1.dll:0:0:0:0 | [return: Custom(...)] | 3 | Assembly1.dll:0:0:0:0 | (...) ... | | Assembly1.dll:0:0:0:0 | [return: Custom(...)] | 4 | Assembly1.dll:0:0:0:0 | array creation of type Int32[] | -| attributes.cs:10:12:10:24 | [assembly: AssemblyTitle(...)] | 0 | attributes.cs:10:26:10:45 | "C# attributes test" | -| attributes.cs:11:12:11:30 | [assembly: AssemblyDescription(...)] | 0 | attributes.cs:11:32:11:56 | "A test of C# attributes" | -| attributes.cs:12:12:12:32 | [assembly: AssemblyConfiguration(...)] | 0 | attributes.cs:12:34:12:35 | "" | -| attributes.cs:13:12:13:26 | [assembly: AssemblyCompany(...)] | 0 | attributes.cs:13:28:13:39 | "Semmle Plc" | -| attributes.cs:14:12:14:26 | [assembly: AssemblyProduct(...)] | 0 | attributes.cs:14:28:14:34 | "Odasa" | -| attributes.cs:15:12:15:28 | [assembly: AssemblyCopyright(...)] | 0 | attributes.cs:15:30:15:54 | "Copyright \u00a9 Semmle 2018" | -| attributes.cs:16:12:16:28 | [assembly: AssemblyTrademark(...)] | 0 | attributes.cs:16:30:16:31 | "" | -| attributes.cs:17:12:17:26 | [assembly: AssemblyCulture(...)] | 0 | attributes.cs:17:28:17:29 | "" | -| attributes.cs:22:12:22:21 | [assembly: ComVisible(...)] | 0 | attributes.cs:22:23:22:27 | false | -| attributes.cs:25:12:25:15 | [assembly: Guid(...)] | 0 | attributes.cs:25:17:25:54 | "2f70fdd6-14aa-4850-b053-d547adb1f476" | -| attributes.cs:37:12:37:26 | [assembly: AssemblyVersion(...)] | 0 | attributes.cs:37:28:37:36 | "1.0.0.0" | -| attributes.cs:38:12:38:30 | [assembly: AssemblyFileVersion(...)] | 0 | attributes.cs:38:32:38:40 | "1.0.0.0" | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 0 | attributes.cs:40:17:40:17 | 0 | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 1 | attributes.cs:40:20:40:46 | array creation of type Object[] | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 2 | attributes.cs:40:49:40:69 | typeof(...) | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 3 | attributes.cs:40:72:40:76 | (...) ... | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | 4 | attributes.cs:40:79:40:82 | null | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 0 | attributes.cs:41:15:41:15 | 0 | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 1 | attributes.cs:41:18:41:44 | array creation of type Object[] | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 2 | attributes.cs:41:47:41:67 | typeof(...) | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 3 | attributes.cs:41:70:41:74 | (...) ... | -| attributes.cs:41:10:41:13 | [module: Args(...)] | 4 | attributes.cs:41:77:41:80 | null | -| attributes.cs:43:2:43:22 | [AttributeUsage(...)] | 0 | attributes.cs:43:24:43:50 | access to constant All | -| attributes.cs:46:6:46:16 | [Conditional(...)] | 0 | attributes.cs:46:18:46:25 | "DEBUG2" | -| attributes.cs:54:6:54:16 | [My(...)] | 0 | attributes.cs:54:18:54:22 | false | -| attributes.cs:57:6:57:16 | [My(...)] | 0 | attributes.cs:57:18:57:21 | true | -| attributes.cs:58:6:58:8 | [My2(...)] | 0 | attributes.cs:58:28:58:32 | false | -| attributes.cs:58:6:58:8 | [My2(...)] | 1 | attributes.cs:58:13:58:16 | true | -| attributes.cs:58:6:58:8 | [My2(...)] | 2 | attributes.cs:58:6:58:8 | 12 | -| attributes.cs:58:6:58:8 | [My2(...)] | 3 | attributes.cs:58:22:58:22 | 1 | -| attributes.cs:77:2:77:5 | [Args(...)] | 0 | attributes.cs:77:7:77:8 | 42 | -| attributes.cs:77:2:77:5 | [Args(...)] | 1 | attributes.cs:77:11:77:14 | null | -| attributes.cs:77:2:77:5 | [Args(...)] | 2 | attributes.cs:77:17:77:25 | typeof(...) | -| attributes.cs:77:2:77:5 | [Args(...)] | 3 | attributes.cs:77:28:77:30 | access to constant A | -| attributes.cs:77:2:77:5 | [Args(...)] | 4 | attributes.cs:77:33:77:53 | array creation of type Int32[] | -| attributes.cs:80:6:80:9 | [Args(...)] | 0 | attributes.cs:80:11:80:16 | ... + ... | -| attributes.cs:80:6:80:9 | [Args(...)] | 1 | attributes.cs:80:19:80:39 | array creation of type Int32[] | -| attributes.cs:80:6:80:9 | [Args(...)] | 2 | attributes.cs:80:42:80:45 | null | -| attributes.cs:80:6:80:9 | [Args(...)] | 3 | attributes.cs:80:48:80:52 | (...) ... | -| attributes.cs:80:6:80:9 | [Args(...)] | 4 | attributes.cs:80:55:80:58 | null | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 0 | attributes.cs:81:19:81:24 | ... + ... | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 1 | attributes.cs:81:27:81:47 | array creation of type Int32[] | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 2 | attributes.cs:81:50:81:53 | null | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 3 | attributes.cs:81:56:81:60 | (...) ... | -| attributes.cs:81:14:81:17 | [return: Args(...)] | 4 | attributes.cs:81:63:81:66 | null | -| attributes.cs:96:2:96:13 | [My3(...)] | 0 | attributes.cs:96:15:96:15 | 1 | -| attributes.cs:97:10:97:21 | [return: My3(...)] | 0 | attributes.cs:97:23:97:23 | 2 | -| attributes.cs:100:10:100:21 | [return: My3(...)] | 0 | attributes.cs:100:23:100:23 | 3 | -| attributes.cs:101:8:101:19 | [My3(...)] | 0 | attributes.cs:101:21:101:21 | 4 | -| attributes.cs:106:6:106:17 | [My3(...)] | 0 | attributes.cs:106:19:106:19 | 5 | -| attributes.cs:107:14:107:25 | [return: My3(...)] | 0 | attributes.cs:107:27:107:27 | 6 | -| attributes.cs:112:10:112:21 | [My3(...)] | 0 | attributes.cs:112:23:112:23 | 7 | -| attributes.cs:113:18:113:29 | [return: My3(...)] | 0 | attributes.cs:113:31:113:31 | 8 | -| attributes.cs:116:18:116:29 | [My3(...)] | 0 | attributes.cs:116:31:116:31 | 9 | -| attributes.cs:117:17:117:28 | [My3(...)] | 0 | attributes.cs:117:30:117:31 | 10 | -| attributes.cs:124:18:124:29 | [My3(...)] | 0 | attributes.cs:124:31:124:32 | 11 | -| attributes.cs:125:18:125:29 | [return: My3(...)] | 0 | attributes.cs:125:31:125:32 | 12 | -| attributes.cs:128:10:128:21 | [My3(...)] | 0 | attributes.cs:128:23:128:24 | 13 | -| attributes.cs:129:17:129:28 | [My3(...)] | 0 | attributes.cs:129:30:129:31 | 14 | -| attributes.cs:141:6:141:11 | [Params(...)] | 0 | attributes.cs:141:13:141:15 | "a" | -| attributes.cs:141:6:141:11 | [Params(...)] | 1 | attributes.cs:141:18:141:20 | "b" | -| attributes.cs:141:6:141:11 | [Params(...)] | 2 | attributes.cs:141:23:141:23 | 1 | -| attributes.cs:141:6:141:11 | [Params(...)] | 3 | attributes.cs:141:26:141:26 | 2 | -| attributes.cs:141:6:141:11 | [Params(...)] | 4 | attributes.cs:141:29:141:29 | 3 | -| attributes.cs:144:6:144:11 | [Params(...)] | 0 | attributes.cs:144:17:144:19 | "a" | -| attributes.cs:144:6:144:11 | [Params(...)] | 1 | attributes.cs:144:26:144:28 | "b" | -| attributes.cs:144:6:144:11 | [Params(...)] | 2 | attributes.cs:144:31:144:31 | 1 | -| attributes.cs:144:6:144:11 | [Params(...)] | 3 | attributes.cs:144:34:144:34 | 2 | -| attributes.cs:144:6:144:11 | [Params(...)] | 4 | attributes.cs:144:37:144:37 | 3 | -| attributes.cs:147:6:147:11 | [Params(...)] | 0 | attributes.cs:147:35:147:37 | "a" | -| attributes.cs:147:6:147:11 | [Params(...)] | 1 | attributes.cs:147:26:147:28 | "b" | -| attributes.cs:147:6:147:11 | [Params(...)] | 2 | attributes.cs:147:19:147:19 | 1 | -| attributes.cs:150:6:150:11 | [Params(...)] | 0 | attributes.cs:150:45:150:47 | "a" | -| attributes.cs:150:6:150:11 | [Params(...)] | 1 | attributes.cs:150:36:150:38 | "b" | -| attributes.cs:150:6:150:11 | [Params(...)] | 2 | attributes.cs:150:19:150:29 | array creation of type Int32[] | +| attributes.cs:11:12:11:24 | [assembly: AssemblyTitle(...)] | 0 | attributes.cs:11:26:11:45 | "C# attributes test" | +| attributes.cs:12:12:12:30 | [assembly: AssemblyDescription(...)] | 0 | attributes.cs:12:32:12:56 | "A test of C# attributes" | +| attributes.cs:13:12:13:32 | [assembly: AssemblyConfiguration(...)] | 0 | attributes.cs:13:34:13:35 | "" | +| attributes.cs:14:12:14:26 | [assembly: AssemblyCompany(...)] | 0 | attributes.cs:14:28:14:39 | "Semmle Plc" | +| attributes.cs:15:12:15:26 | [assembly: AssemblyProduct(...)] | 0 | attributes.cs:15:28:15:34 | "Odasa" | +| attributes.cs:16:12:16:28 | [assembly: AssemblyCopyright(...)] | 0 | attributes.cs:16:30:16:54 | "Copyright \u00a9 Semmle 2018" | +| attributes.cs:17:12:17:28 | [assembly: AssemblyTrademark(...)] | 0 | attributes.cs:17:30:17:31 | "" | +| attributes.cs:18:12:18:26 | [assembly: AssemblyCulture(...)] | 0 | attributes.cs:18:28:18:29 | "" | +| attributes.cs:23:12:23:21 | [assembly: ComVisible(...)] | 0 | attributes.cs:23:23:23:27 | false | +| attributes.cs:26:12:26:15 | [assembly: Guid(...)] | 0 | attributes.cs:26:17:26:54 | "2f70fdd6-14aa-4850-b053-d547adb1f476" | +| attributes.cs:38:12:38:26 | [assembly: AssemblyVersion(...)] | 0 | attributes.cs:38:28:38:36 | "1.0.0.0" | +| attributes.cs:39:12:39:30 | [assembly: AssemblyFileVersion(...)] | 0 | attributes.cs:39:32:39:40 | "1.0.0.0" | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 0 | attributes.cs:41:17:41:17 | 0 | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 1 | attributes.cs:41:20:41:46 | array creation of type Object[] | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 2 | attributes.cs:41:49:41:69 | typeof(...) | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 3 | attributes.cs:41:72:41:76 | (...) ... | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | 4 | attributes.cs:41:79:41:82 | null | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 0 | attributes.cs:42:15:42:15 | 0 | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 1 | attributes.cs:42:18:42:44 | array creation of type Object[] | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 2 | attributes.cs:42:47:42:67 | typeof(...) | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 3 | attributes.cs:42:70:42:74 | (...) ... | +| attributes.cs:42:10:42:13 | [module: Args(...)] | 4 | attributes.cs:42:77:42:80 | null | +| attributes.cs:44:2:44:22 | [AttributeUsage(...)] | 0 | attributes.cs:44:24:44:50 | access to constant All | +| attributes.cs:47:6:47:16 | [Conditional(...)] | 0 | attributes.cs:47:18:47:25 | "DEBUG2" | +| attributes.cs:55:6:55:16 | [My(...)] | 0 | attributes.cs:55:18:55:22 | false | +| attributes.cs:58:6:58:16 | [My(...)] | 0 | attributes.cs:58:18:58:21 | true | +| attributes.cs:59:6:59:8 | [My2(...)] | 0 | attributes.cs:59:28:59:32 | false | +| attributes.cs:59:6:59:8 | [My2(...)] | 1 | attributes.cs:59:13:59:16 | true | +| attributes.cs:59:6:59:8 | [My2(...)] | 2 | attributes.cs:59:6:59:8 | 12 | +| attributes.cs:59:6:59:8 | [My2(...)] | 3 | attributes.cs:59:22:59:22 | 1 | +| attributes.cs:78:2:78:5 | [Args(...)] | 0 | attributes.cs:78:7:78:8 | 42 | +| attributes.cs:78:2:78:5 | [Args(...)] | 1 | attributes.cs:78:11:78:14 | null | +| attributes.cs:78:2:78:5 | [Args(...)] | 2 | attributes.cs:78:17:78:25 | typeof(...) | +| attributes.cs:78:2:78:5 | [Args(...)] | 3 | attributes.cs:78:28:78:30 | access to constant A | +| attributes.cs:78:2:78:5 | [Args(...)] | 4 | attributes.cs:78:33:78:53 | array creation of type Int32[] | +| attributes.cs:81:6:81:9 | [Args(...)] | 0 | attributes.cs:81:11:81:16 | ... + ... | +| attributes.cs:81:6:81:9 | [Args(...)] | 1 | attributes.cs:81:19:81:39 | array creation of type Int32[] | +| attributes.cs:81:6:81:9 | [Args(...)] | 2 | attributes.cs:81:42:81:45 | null | +| attributes.cs:81:6:81:9 | [Args(...)] | 3 | attributes.cs:81:48:81:52 | (...) ... | +| attributes.cs:81:6:81:9 | [Args(...)] | 4 | attributes.cs:81:55:81:58 | null | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 0 | attributes.cs:82:19:82:24 | ... + ... | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 1 | attributes.cs:82:27:82:47 | array creation of type Int32[] | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 2 | attributes.cs:82:50:82:53 | null | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 3 | attributes.cs:82:56:82:60 | (...) ... | +| attributes.cs:82:14:82:17 | [return: Args(...)] | 4 | attributes.cs:82:63:82:66 | null | +| attributes.cs:97:2:97:13 | [My3(...)] | 0 | attributes.cs:97:15:97:15 | 1 | +| attributes.cs:98:10:98:21 | [return: My3(...)] | 0 | attributes.cs:98:23:98:23 | 2 | +| attributes.cs:101:10:101:21 | [return: My3(...)] | 0 | attributes.cs:101:23:101:23 | 3 | +| attributes.cs:102:8:102:19 | [My3(...)] | 0 | attributes.cs:102:21:102:21 | 4 | +| attributes.cs:107:6:107:17 | [My3(...)] | 0 | attributes.cs:107:19:107:19 | 5 | +| attributes.cs:108:14:108:25 | [return: My3(...)] | 0 | attributes.cs:108:27:108:27 | 6 | +| attributes.cs:113:10:113:21 | [My3(...)] | 0 | attributes.cs:113:23:113:23 | 7 | +| attributes.cs:114:18:114:29 | [return: My3(...)] | 0 | attributes.cs:114:31:114:31 | 8 | +| attributes.cs:117:18:117:29 | [My3(...)] | 0 | attributes.cs:117:31:117:31 | 9 | +| attributes.cs:118:17:118:28 | [My3(...)] | 0 | attributes.cs:118:30:118:31 | 10 | +| attributes.cs:125:18:125:29 | [My3(...)] | 0 | attributes.cs:125:31:125:32 | 11 | +| attributes.cs:126:18:126:29 | [return: My3(...)] | 0 | attributes.cs:126:31:126:32 | 12 | +| attributes.cs:129:10:129:21 | [My3(...)] | 0 | attributes.cs:129:23:129:24 | 13 | +| attributes.cs:130:17:130:28 | [My3(...)] | 0 | attributes.cs:130:30:130:31 | 14 | +| attributes.cs:142:6:142:11 | [Params(...)] | 0 | attributes.cs:142:13:142:15 | "a" | +| attributes.cs:142:6:142:11 | [Params(...)] | 1 | attributes.cs:142:18:142:20 | "b" | +| attributes.cs:142:6:142:11 | [Params(...)] | 2 | attributes.cs:142:23:142:23 | 1 | +| attributes.cs:142:6:142:11 | [Params(...)] | 3 | attributes.cs:142:26:142:26 | 2 | +| attributes.cs:142:6:142:11 | [Params(...)] | 4 | attributes.cs:142:29:142:29 | 3 | +| attributes.cs:145:6:145:11 | [Params(...)] | 0 | attributes.cs:145:17:145:19 | "a" | +| attributes.cs:145:6:145:11 | [Params(...)] | 1 | attributes.cs:145:26:145:28 | "b" | +| attributes.cs:145:6:145:11 | [Params(...)] | 2 | attributes.cs:145:31:145:31 | 1 | +| attributes.cs:145:6:145:11 | [Params(...)] | 3 | attributes.cs:145:34:145:34 | 2 | +| attributes.cs:145:6:145:11 | [Params(...)] | 4 | attributes.cs:145:37:145:37 | 3 | +| attributes.cs:148:6:148:11 | [Params(...)] | 0 | attributes.cs:148:35:148:37 | "a" | +| attributes.cs:148:6:148:11 | [Params(...)] | 1 | attributes.cs:148:26:148:28 | "b" | +| attributes.cs:148:6:148:11 | [Params(...)] | 2 | attributes.cs:148:19:148:19 | 1 | +| attributes.cs:151:6:151:11 | [Params(...)] | 0 | attributes.cs:151:45:151:47 | "a" | +| attributes.cs:151:6:151:11 | [Params(...)] | 1 | attributes.cs:151:36:151:38 | "b" | +| attributes.cs:151:6:151:11 | [Params(...)] | 2 | attributes.cs:151:19:151:29 | array creation of type Int32[] | +| attributes.cs:155:2:155:13 | [Experimental(...)] | 0 | attributes.cs:155:15:155:37 | "MyExperimentalClassId" | +| attributes.cs:158:6:158:17 | [Experimental(...)] | 0 | attributes.cs:158:19:158:42 | "MyExperimentalMethodId" | namedArguments | Assembly1.dll:0:0:0:0 | [Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] | | Assembly1.dll:0:0:0:0 | [Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] | | Assembly1.dll:0:0:0:0 | [Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] | | Assembly1.dll:0:0:0:0 | [return: Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] | -| attributes.cs:40:12:40:15 | [assembly: Args(...)] | Prop | attributes.cs:40:92:40:122 | array creation of type Object[] | -| attributes.cs:41:10:41:13 | [module: Args(...)] | Prop | attributes.cs:41:90:41:120 | array creation of type Object[] | -| attributes.cs:57:6:57:16 | [My(...)] | x | attributes.cs:57:36:57:36 | 0 | -| attributes.cs:57:6:57:16 | [My(...)] | y | attributes.cs:57:28:57:29 | "" | -| attributes.cs:58:6:58:8 | [My2(...)] | X | attributes.cs:58:39:58:40 | 42 | -| attributes.cs:77:2:77:5 | [Args(...)] | Prop | attributes.cs:77:63:77:93 | array creation of type Object[] | -| attributes.cs:80:6:80:9 | [Args(...)] | Prop | attributes.cs:80:68:80:98 | array creation of type Object[] | -| attributes.cs:81:14:81:17 | [return: Args(...)] | Prop | attributes.cs:81:76:81:106 | array creation of type Object[] | +| attributes.cs:41:12:41:15 | [assembly: Args(...)] | Prop | attributes.cs:41:92:41:122 | array creation of type Object[] | +| attributes.cs:42:10:42:13 | [module: Args(...)] | Prop | attributes.cs:42:90:42:120 | array creation of type Object[] | +| attributes.cs:58:6:58:16 | [My(...)] | x | attributes.cs:58:36:58:36 | 0 | +| attributes.cs:58:6:58:16 | [My(...)] | y | attributes.cs:58:28:58:29 | "" | +| attributes.cs:59:6:59:8 | [My2(...)] | X | attributes.cs:59:39:59:40 | 42 | +| attributes.cs:78:2:78:5 | [Args(...)] | Prop | attributes.cs:78:63:78:93 | array creation of type Object[] | +| attributes.cs:81:6:81:9 | [Args(...)] | Prop | attributes.cs:81:68:81:98 | array creation of type Object[] | +| attributes.cs:82:14:82:17 | [return: Args(...)] | Prop | attributes.cs:82:76:82:106 | array creation of type Object[] | diff --git a/csharp/ql/test/library-tests/attributes/AttributeComments.expected b/csharp/ql/test/library-tests/attributes/AttributeComments.expected index 55c71024afe..e1c01d720fd 100644 --- a/csharp/ql/test/library-tests/attributes/AttributeComments.expected +++ b/csharp/ql/test/library-tests/attributes/AttributeComments.expected @@ -1,4 +1,4 @@ -| attributes.cs:10:12:10:24 | [assembly: AssemblyTitle(...)] | attributes.cs:7:1:9:31 | // ... | -| attributes.cs:22:12:22:21 | [assembly: ComVisible(...)] | attributes.cs:19:1:21:58 | // ... | -| attributes.cs:25:12:25:15 | [assembly: Guid(...)] | attributes.cs:24:1:24:84 | // ... | -| attributes.cs:37:12:37:26 | [assembly: AssemblyVersion(...)] | attributes.cs:27:1:36:39 | // ... | +| attributes.cs:11:12:11:24 | [assembly: AssemblyTitle(...)] | attributes.cs:8:1:10:31 | // ... | +| attributes.cs:23:12:23:21 | [assembly: ComVisible(...)] | attributes.cs:20:1:22:58 | // ... | +| attributes.cs:26:12:26:15 | [assembly: Guid(...)] | attributes.cs:25:1:25:84 | // ... | +| attributes.cs:38:12:38:26 | [assembly: AssemblyVersion(...)] | attributes.cs:28:1:37:39 | // ... | diff --git a/csharp/ql/test/library-tests/attributes/AttributeElements.expected b/csharp/ql/test/library-tests/attributes/AttributeElements.expected index 11291a73338..358877e20cf 100644 --- a/csharp/ql/test/library-tests/attributes/AttributeElements.expected +++ b/csharp/ql/test/library-tests/attributes/AttributeElements.expected @@ -9,44 +9,46 @@ | Assembly1.dll:0:0:0:0 | Assembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | Assembly1.dll:0:0:0:0 | [Debuggable(...)] | System.Diagnostics.DebuggableAttribute | | Assembly1.dll:0:0:0:0 | Assembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | Assembly1.dll:0:0:0:0 | [RuntimeCompatibility(...)] | System.Runtime.CompilerServices.RuntimeCompatibilityAttribute | | Assembly1.dll:0:0:0:0 | Assembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | Assembly1.dll:0:0:0:0 | [TargetFramework(...)] | System.Runtime.Versioning.TargetFrameworkAttribute | -| attributes.cs:44:7:44:9 | Foo | attributes.cs:43:2:43:22 | [AttributeUsage(...)] | System.AttributeUsageAttribute | -| attributes.cs:47:17:47:19 | foo | attributes.cs:46:6:46:16 | [Conditional(...)] | System.Diagnostics.ConditionalAttribute | -| attributes.cs:52:23:52:23 | x | attributes.cs:52:14:52:16 | [Foo(...)] | Foo | -| attributes.cs:55:10:55:11 | M1 | attributes.cs:54:6:54:16 | [My(...)] | MyAttribute | -| attributes.cs:59:10:59:11 | M2 | attributes.cs:57:6:57:16 | [My(...)] | MyAttribute | -| attributes.cs:59:10:59:11 | M2 | attributes.cs:58:6:58:8 | [My2(...)] | My2Attribute | -| attributes.cs:78:14:78:14 | X | attributes.cs:77:2:77:5 | [Args(...)] | ArgsAttribute | -| attributes.cs:82:9:82:18 | SomeMethod | attributes.cs:80:6:80:9 | [Args(...)] | ArgsAttribute | -| attributes.cs:82:9:82:18 | SomeMethod | attributes.cs:81:14:81:17 | [return: Args(...)] | ArgsAttribute | -| attributes.cs:98:14:98:24 | Invoke | attributes.cs:97:10:97:21 | [return: My3(...)] | My3Attribute | -| attributes.cs:98:14:98:24 | My1Delegate | attributes.cs:96:2:96:13 | [My3(...)] | My3Attribute | -| attributes.cs:102:17:102:27 | Invoke | attributes.cs:100:10:100:21 | [return: My3(...)] | My3Attribute | -| attributes.cs:102:17:102:27 | My2Delegate | attributes.cs:101:8:101:19 | [My3(...)] | My3Attribute | -| attributes.cs:108:32:108:32 | + | attributes.cs:106:6:106:17 | [My3(...)] | My3Attribute | -| attributes.cs:108:32:108:32 | + | attributes.cs:107:14:107:25 | [return: My3(...)] | My3Attribute | -| attributes.cs:114:9:114:11 | get_Item | attributes.cs:112:10:112:21 | [My3(...)] | My3Attribute | -| attributes.cs:114:9:114:11 | get_Item | attributes.cs:113:18:113:29 | [return: My3(...)] | My3Attribute | -| attributes.cs:118:9:118:11 | set_Item | attributes.cs:116:18:116:29 | [My3(...)] | My3Attribute | -| attributes.cs:118:9:118:11 | value | attributes.cs:117:17:117:28 | [My3(...)] | My3Attribute | -| attributes.cs:126:9:126:11 | get_Prop1 | attributes.cs:124:18:124:29 | [My3(...)] | My3Attribute | -| attributes.cs:126:9:126:11 | get_Prop1 | attributes.cs:125:18:125:29 | [return: My3(...)] | My3Attribute | -| attributes.cs:130:9:130:11 | set_Prop1 | attributes.cs:128:10:128:21 | [My3(...)] | My3Attribute | -| attributes.cs:130:9:130:11 | value | attributes.cs:129:17:129:28 | [My3(...)] | My3Attribute | -| attributes.cs:142:17:142:18 | M1 | attributes.cs:141:6:141:11 | [Params(...)] | Class1+ParamsAttribute | -| attributes.cs:145:17:145:18 | M2 | attributes.cs:144:6:144:11 | [Params(...)] | Class1+ParamsAttribute | -| attributes.cs:148:17:148:18 | M3 | attributes.cs:147:6:147:11 | [Params(...)] | Class1+ParamsAttribute | -| attributes.cs:151:17:151:18 | M4 | attributes.cs:150:6:150:11 | [Params(...)] | Class1+ParamsAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:10:12:10:24 | [assembly: AssemblyTitle(...)] | System.Reflection.AssemblyTitleAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:11:12:11:30 | [assembly: AssemblyDescription(...)] | System.Reflection.AssemblyDescriptionAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:12:12:12:32 | [assembly: AssemblyConfiguration(...)] | System.Reflection.AssemblyConfigurationAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:13:12:13:26 | [assembly: AssemblyCompany(...)] | System.Reflection.AssemblyCompanyAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:14:12:14:26 | [assembly: AssemblyProduct(...)] | System.Reflection.AssemblyProductAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:15:12:15:28 | [assembly: AssemblyCopyright(...)] | System.Reflection.AssemblyCopyrightAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:16:12:16:28 | [assembly: AssemblyTrademark(...)] | System.Reflection.AssemblyTrademarkAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:17:12:17:26 | [assembly: AssemblyCulture(...)] | System.Reflection.AssemblyCultureAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:22:12:22:21 | [assembly: ComVisible(...)] | System.Runtime.InteropServices.ComVisibleAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:25:12:25:15 | [assembly: Guid(...)] | System.Runtime.InteropServices.GuidAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:37:12:37:26 | [assembly: AssemblyVersion(...)] | System.Reflection.AssemblyVersionAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:38:12:38:30 | [assembly: AssemblyFileVersion(...)] | System.Reflection.AssemblyFileVersionAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:40:12:40:15 | [assembly: Args(...)] | ArgsAttribute | -| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:41:10:41:13 | [module: Args(...)] | ArgsAttribute | +| attributes.cs:45:7:45:9 | Foo | attributes.cs:44:2:44:22 | [AttributeUsage(...)] | System.AttributeUsageAttribute | +| attributes.cs:48:17:48:19 | foo | attributes.cs:47:6:47:16 | [Conditional(...)] | System.Diagnostics.ConditionalAttribute | +| attributes.cs:53:23:53:23 | x | attributes.cs:53:14:53:16 | [Foo(...)] | Foo | +| attributes.cs:56:10:56:11 | M1 | attributes.cs:55:6:55:16 | [My(...)] | MyAttribute | +| attributes.cs:60:10:60:11 | M2 | attributes.cs:58:6:58:16 | [My(...)] | MyAttribute | +| attributes.cs:60:10:60:11 | M2 | attributes.cs:59:6:59:8 | [My2(...)] | My2Attribute | +| attributes.cs:79:14:79:14 | X | attributes.cs:78:2:78:5 | [Args(...)] | ArgsAttribute | +| attributes.cs:83:9:83:18 | SomeMethod | attributes.cs:81:6:81:9 | [Args(...)] | ArgsAttribute | +| attributes.cs:83:9:83:18 | SomeMethod | attributes.cs:82:14:82:17 | [return: Args(...)] | ArgsAttribute | +| attributes.cs:99:14:99:24 | Invoke | attributes.cs:98:10:98:21 | [return: My3(...)] | My3Attribute | +| attributes.cs:99:14:99:24 | My1Delegate | attributes.cs:97:2:97:13 | [My3(...)] | My3Attribute | +| attributes.cs:103:17:103:27 | Invoke | attributes.cs:101:10:101:21 | [return: My3(...)] | My3Attribute | +| attributes.cs:103:17:103:27 | My2Delegate | attributes.cs:102:8:102:19 | [My3(...)] | My3Attribute | +| attributes.cs:109:32:109:32 | + | attributes.cs:107:6:107:17 | [My3(...)] | My3Attribute | +| attributes.cs:109:32:109:32 | + | attributes.cs:108:14:108:25 | [return: My3(...)] | My3Attribute | +| attributes.cs:115:9:115:11 | get_Item | attributes.cs:113:10:113:21 | [My3(...)] | My3Attribute | +| attributes.cs:115:9:115:11 | get_Item | attributes.cs:114:18:114:29 | [return: My3(...)] | My3Attribute | +| attributes.cs:119:9:119:11 | set_Item | attributes.cs:117:18:117:29 | [My3(...)] | My3Attribute | +| attributes.cs:119:9:119:11 | value | attributes.cs:118:17:118:28 | [My3(...)] | My3Attribute | +| attributes.cs:127:9:127:11 | get_Prop1 | attributes.cs:125:18:125:29 | [My3(...)] | My3Attribute | +| attributes.cs:127:9:127:11 | get_Prop1 | attributes.cs:126:18:126:29 | [return: My3(...)] | My3Attribute | +| attributes.cs:131:9:131:11 | set_Prop1 | attributes.cs:129:10:129:21 | [My3(...)] | My3Attribute | +| attributes.cs:131:9:131:11 | value | attributes.cs:130:17:130:28 | [My3(...)] | My3Attribute | +| attributes.cs:143:17:143:18 | M1 | attributes.cs:142:6:142:11 | [Params(...)] | Class1+ParamsAttribute | +| attributes.cs:146:17:146:18 | M2 | attributes.cs:145:6:145:11 | [Params(...)] | Class1+ParamsAttribute | +| attributes.cs:149:17:149:18 | M3 | attributes.cs:148:6:148:11 | [Params(...)] | Class1+ParamsAttribute | +| attributes.cs:152:17:152:18 | M4 | attributes.cs:151:6:151:11 | [Params(...)] | Class1+ParamsAttribute | +| attributes.cs:156:14:156:32 | MyExperimentalClass | attributes.cs:155:2:155:13 | [Experimental(...)] | System.Diagnostics.CodeAnalysis.ExperimentalAttribute | +| attributes.cs:159:17:159:36 | MyExperimentalMethod | attributes.cs:158:6:158:17 | [Experimental(...)] | System.Diagnostics.CodeAnalysis.ExperimentalAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:11:12:11:24 | [assembly: AssemblyTitle(...)] | System.Reflection.AssemblyTitleAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:12:12:12:30 | [assembly: AssemblyDescription(...)] | System.Reflection.AssemblyDescriptionAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:13:12:13:32 | [assembly: AssemblyConfiguration(...)] | System.Reflection.AssemblyConfigurationAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:14:12:14:26 | [assembly: AssemblyCompany(...)] | System.Reflection.AssemblyCompanyAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:15:12:15:26 | [assembly: AssemblyProduct(...)] | System.Reflection.AssemblyProductAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:16:12:16:28 | [assembly: AssemblyCopyright(...)] | System.Reflection.AssemblyCopyrightAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:17:12:17:28 | [assembly: AssemblyTrademark(...)] | System.Reflection.AssemblyTrademarkAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:18:12:18:26 | [assembly: AssemblyCulture(...)] | System.Reflection.AssemblyCultureAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:23:12:23:21 | [assembly: ComVisible(...)] | System.Runtime.InteropServices.ComVisibleAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:26:12:26:15 | [assembly: Guid(...)] | System.Runtime.InteropServices.GuidAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:38:12:38:26 | [assembly: AssemblyVersion(...)] | System.Reflection.AssemblyVersionAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:39:12:39:30 | [assembly: AssemblyFileVersion(...)] | System.Reflection.AssemblyFileVersionAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:41:12:41:15 | [assembly: Args(...)] | ArgsAttribute | +| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:42:10:42:13 | [module: Args(...)] | ArgsAttribute | diff --git a/csharp/ql/test/library-tests/attributes/ExperimentalAttributes.expected b/csharp/ql/test/library-tests/attributes/ExperimentalAttributes.expected new file mode 100644 index 00000000000..dba8c9d047f --- /dev/null +++ b/csharp/ql/test/library-tests/attributes/ExperimentalAttributes.expected @@ -0,0 +1,2 @@ +| attributes.cs:156:14:156:32 | MyExperimentalClass | attributes.cs:155:2:155:13 | [Experimental(...)] | MyExperimentalClassId | +| attributes.cs:159:17:159:36 | MyExperimentalMethod | attributes.cs:158:6:158:17 | [Experimental(...)] | MyExperimentalMethodId | diff --git a/csharp/ql/test/library-tests/attributes/ExperimentalAttributes.ql b/csharp/ql/test/library-tests/attributes/ExperimentalAttributes.ql new file mode 100644 index 00000000000..5cb058f7e9f --- /dev/null +++ b/csharp/ql/test/library-tests/attributes/ExperimentalAttributes.ql @@ -0,0 +1,6 @@ +import csharp +import semmle.code.csharp.frameworks.system.diagnostics.CodeAnalysis + +from Attributable element, ExperimentalAttribute attribute +where attribute = element.getAnAttribute() and attribute.fromSource() +select element, attribute, attribute.getId() diff --git a/csharp/ql/test/library-tests/attributes/PrintAst.expected b/csharp/ql/test/library-tests/attributes/PrintAst.expected index 77be3f7461d..62106d43664 100644 --- a/csharp/ql/test/library-tests/attributes/PrintAst.expected +++ b/csharp/ql/test/library-tests/attributes/PrintAst.expected @@ -1,70 +1,41 @@ attributes.cs: -# 10| [AssemblyAttribute] [assembly: AssemblyTitle(...)] -# 10| -1: [TypeMention] AssemblyTitleAttribute -# 10| 0: [StringLiteralUtf16] "C# attributes test" -# 11| [AssemblyAttribute] [assembly: AssemblyDescription(...)] -# 11| -1: [TypeMention] AssemblyDescriptionAttribute -# 11| 0: [StringLiteralUtf16] "A test of C# attributes" -# 12| [AssemblyAttribute] [assembly: AssemblyConfiguration(...)] -# 12| -1: [TypeMention] AssemblyConfigurationAttribute -# 12| 0: [StringLiteralUtf16] "" -# 13| [AssemblyAttribute] [assembly: AssemblyCompany(...)] -# 13| -1: [TypeMention] AssemblyCompanyAttribute -# 13| 0: [StringLiteralUtf16] "Semmle Plc" -# 14| [AssemblyAttribute] [assembly: AssemblyProduct(...)] -# 14| -1: [TypeMention] AssemblyProductAttribute -# 14| 0: [StringLiteralUtf16] "Odasa" -# 15| [AssemblyAttribute] [assembly: AssemblyCopyright(...)] -# 15| -1: [TypeMention] AssemblyCopyrightAttribute -# 15| 0: [StringLiteralUtf16] "Copyright © Semmle 2018" -# 16| [AssemblyAttribute] [assembly: AssemblyTrademark(...)] -# 16| -1: [TypeMention] AssemblyTrademarkAttribute -# 16| 0: [StringLiteralUtf16] "" -# 17| [AssemblyAttribute] [assembly: AssemblyCulture(...)] -# 17| -1: [TypeMention] AssemblyCultureAttribute +# 11| [AssemblyAttribute] [assembly: AssemblyTitle(...)] +# 11| -1: [TypeMention] AssemblyTitleAttribute +# 11| 0: [StringLiteralUtf16] "C# attributes test" +# 12| [AssemblyAttribute] [assembly: AssemblyDescription(...)] +# 12| -1: [TypeMention] AssemblyDescriptionAttribute +# 12| 0: [StringLiteralUtf16] "A test of C# attributes" +# 13| [AssemblyAttribute] [assembly: AssemblyConfiguration(...)] +# 13| -1: [TypeMention] AssemblyConfigurationAttribute +# 13| 0: [StringLiteralUtf16] "" +# 14| [AssemblyAttribute] [assembly: AssemblyCompany(...)] +# 14| -1: [TypeMention] AssemblyCompanyAttribute +# 14| 0: [StringLiteralUtf16] "Semmle Plc" +# 15| [AssemblyAttribute] [assembly: AssemblyProduct(...)] +# 15| -1: [TypeMention] AssemblyProductAttribute +# 15| 0: [StringLiteralUtf16] "Odasa" +# 16| [AssemblyAttribute] [assembly: AssemblyCopyright(...)] +# 16| -1: [TypeMention] AssemblyCopyrightAttribute +# 16| 0: [StringLiteralUtf16] "Copyright © Semmle 2018" +# 17| [AssemblyAttribute] [assembly: AssemblyTrademark(...)] +# 17| -1: [TypeMention] AssemblyTrademarkAttribute # 17| 0: [StringLiteralUtf16] "" -# 22| [AssemblyAttribute] [assembly: ComVisible(...)] -# 22| -1: [TypeMention] ComVisibleAttribute -# 22| 0: [BoolLiteral] false -# 25| [AssemblyAttribute] [assembly: Guid(...)] -# 25| -1: [TypeMention] GuidAttribute -# 25| 0: [StringLiteralUtf16] "2f70fdd6-14aa-4850-b053-d547adb1f476" -# 37| [AssemblyAttribute] [assembly: AssemblyVersion(...)] -# 37| -1: [TypeMention] AssemblyVersionAttribute -# 37| 0: [StringLiteralUtf16] "1.0.0.0" -# 38| [AssemblyAttribute] [assembly: AssemblyFileVersion(...)] -# 38| -1: [TypeMention] AssemblyFileVersionAttribute +# 18| [AssemblyAttribute] [assembly: AssemblyCulture(...)] +# 18| -1: [TypeMention] AssemblyCultureAttribute +# 18| 0: [StringLiteralUtf16] "" +# 23| [AssemblyAttribute] [assembly: ComVisible(...)] +# 23| -1: [TypeMention] ComVisibleAttribute +# 23| 0: [BoolLiteral] false +# 26| [AssemblyAttribute] [assembly: Guid(...)] +# 26| -1: [TypeMention] GuidAttribute +# 26| 0: [StringLiteralUtf16] "2f70fdd6-14aa-4850-b053-d547adb1f476" +# 38| [AssemblyAttribute] [assembly: AssemblyVersion(...)] +# 38| -1: [TypeMention] AssemblyVersionAttribute # 38| 0: [StringLiteralUtf16] "1.0.0.0" -# 40| [AssemblyAttribute] [assembly: Args(...)] -# 40| -1: [TypeMention] ArgsAttribute -# 40| 0: [IntLiteral] 0 -# 40| 1: [ArrayCreation] array creation of type Object[] -# 40| -2: [TypeMention] Object[] -# 40| 1: [TypeMention] object -# 40| -1: [ArrayInitializer] { ..., ... } -# 40| 0: [CastExpr] (...) ... -# 40| 1: [IntLiteral] 1 -# 40| 1: [CastExpr] (...) ... -# 40| 1: [IntLiteral] 2 -# 40| 2: [NullLiteral] null -# 40| 2: [TypeofExpr] typeof(...) -# 40| 0: [TypeAccess] access to type ArgsAttribute -# 40| 0: [TypeMention] ArgsAttribute -# 40| 3: [CastExpr] (...) ... -# 40| 0: [TypeAccess] access to type E -# 40| 0: [TypeMention] E -# 40| 1: [IntLiteral] 12 -# 40| 4: [NullLiteral] null -# 40| 5: [ArrayCreation] array creation of type Object[] -# 40| -2: [TypeMention] Object[] -# 40| 1: [TypeMention] object -# 40| -1: [ArrayInitializer] { ..., ... } -# 40| 0: [CastExpr] (...) ... -# 40| 1: [IntLiteral] 1 -# 40| 1: [TypeofExpr] typeof(...) -# 40| 0: [TypeAccess] access to type Int32 -# 40| 0: [TypeMention] int -# 41| [ModuleAttribute] [module: Args(...)] +# 39| [AssemblyAttribute] [assembly: AssemblyFileVersion(...)] +# 39| -1: [TypeMention] AssemblyFileVersionAttribute +# 39| 0: [StringLiteralUtf16] "1.0.0.0" +# 41| [AssemblyAttribute] [assembly: Args(...)] # 41| -1: [TypeMention] ArgsAttribute # 41| 0: [IntLiteral] 0 # 41| 1: [ArrayCreation] array creation of type Object[] @@ -93,162 +64,164 @@ attributes.cs: # 41| 1: [TypeofExpr] typeof(...) # 41| 0: [TypeAccess] access to type Int32 # 41| 0: [TypeMention] int -# 44| [Class] Foo +# 42| [ModuleAttribute] [module: Args(...)] +# 42| -1: [TypeMention] ArgsAttribute +# 42| 0: [IntLiteral] 0 +# 42| 1: [ArrayCreation] array creation of type Object[] +# 42| -2: [TypeMention] Object[] +# 42| 1: [TypeMention] object +# 42| -1: [ArrayInitializer] { ..., ... } +# 42| 0: [CastExpr] (...) ... +# 42| 1: [IntLiteral] 1 +# 42| 1: [CastExpr] (...) ... +# 42| 1: [IntLiteral] 2 +# 42| 2: [NullLiteral] null +# 42| 2: [TypeofExpr] typeof(...) +# 42| 0: [TypeAccess] access to type ArgsAttribute +# 42| 0: [TypeMention] ArgsAttribute +# 42| 3: [CastExpr] (...) ... +# 42| 0: [TypeAccess] access to type E +# 42| 0: [TypeMention] E +# 42| 1: [IntLiteral] 12 +# 42| 4: [NullLiteral] null +# 42| 5: [ArrayCreation] array creation of type Object[] +# 42| -2: [TypeMention] Object[] +# 42| 1: [TypeMention] object +# 42| -1: [ArrayInitializer] { ..., ... } +# 42| 0: [CastExpr] (...) ... +# 42| 1: [IntLiteral] 1 +# 42| 1: [TypeofExpr] typeof(...) +# 42| 0: [TypeAccess] access to type Int32 +# 42| 0: [TypeMention] int +# 45| [Class] Foo #-----| 0: (Attributes) -# 43| 1: [DefaultAttribute] [AttributeUsage(...)] -# 43| -1: [TypeMention] AttributeUsageAttribute -# 43| 0: [MemberConstantAccess] access to constant All -# 43| -1: [TypeAccess] access to type AttributeTargets -# 43| 0: [TypeMention] AttributeTargets +# 44| 1: [DefaultAttribute] [AttributeUsage(...)] +# 44| -1: [TypeMention] AttributeUsageAttribute +# 44| 0: [MemberConstantAccess] access to constant All +# 44| -1: [TypeAccess] access to type AttributeTargets +# 44| 0: [TypeMention] AttributeTargets #-----| 3: (Base types) -# 44| 0: [TypeMention] Attribute -# 47| 5: [Method] foo -# 47| -1: [TypeMention] Void +# 45| 0: [TypeMention] Attribute +# 48| 5: [Method] foo +# 48| -1: [TypeMention] Void #-----| 0: (Attributes) -# 46| 1: [DefaultAttribute] [Conditional(...)] -# 46| -1: [TypeMention] ConditionalAttribute -# 46| 0: [StringLiteralUtf16] "DEBUG2" -# 47| 4: [BlockStmt] {...} -# 50| [Class] Bar -# 52| 5: [Method] inc -# 52| -1: [TypeMention] int +# 47| 1: [DefaultAttribute] [Conditional(...)] +# 47| -1: [TypeMention] ConditionalAttribute +# 47| 0: [StringLiteralUtf16] "DEBUG2" +# 48| 4: [BlockStmt] {...} +# 51| [Class] Bar +# 53| 5: [Method] inc +# 53| -1: [TypeMention] int #-----| 2: (Parameters) -# 52| 0: [Parameter] x -# 52| -1: [TypeMention] int +# 53| 0: [Parameter] x +# 53| -1: [TypeMention] int #-----| 0: (Attributes) -# 52| 1: [DefaultAttribute] [Foo(...)] -# 52| 0: [TypeMention] Foo -# 52| 4: [BlockStmt] {...} -# 52| 0: [ReturnStmt] return ...; -# 52| 0: [AddExpr] ... + ... -# 52| 0: [ParameterAccess] access to parameter x -# 52| 1: [IntLiteral] 1 -# 55| 6: [Method] M1 -# 55| -1: [TypeMention] Void +# 53| 1: [DefaultAttribute] [Foo(...)] +# 53| 0: [TypeMention] Foo +# 53| 4: [BlockStmt] {...} +# 53| 0: [ReturnStmt] return ...; +# 53| 0: [AddExpr] ... + ... +# 53| 0: [ParameterAccess] access to parameter x +# 53| 1: [IntLiteral] 1 +# 56| 6: [Method] M1 +# 56| -1: [TypeMention] Void #-----| 0: (Attributes) -# 54| 1: [DefaultAttribute] [My(...)] -# 54| -1: [TypeMention] MyAttribute -# 54| 0: [BoolLiteral] false -# 55| 4: [BlockStmt] {...} -# 59| 7: [Method] M2 -# 59| -1: [TypeMention] Void +# 55| 1: [DefaultAttribute] [My(...)] +# 55| -1: [TypeMention] MyAttribute +# 55| 0: [BoolLiteral] false +# 56| 4: [BlockStmt] {...} +# 60| 7: [Method] M2 +# 60| -1: [TypeMention] Void #-----| 0: (Attributes) -# 57| 1: [DefaultAttribute] [My(...)] -# 57| -1: [TypeMention] MyAttribute -# 57| 0: [BoolLiteral] true -# 57| 1: [StringLiteralUtf16] "" -# 57| 2: [IntLiteral] 0 -# 58| 2: [DefaultAttribute] [My2(...)] -# 58| -1: [TypeMention] My2Attribute -# 58| 0: [BoolLiteral] false -# 58| 1: [BoolLiteral] true -# 58| 3: [IntLiteral] 1 -# 58| 4: [IntLiteral] 42 -# 59| 4: [BlockStmt] {...} -# 62| [Class] MyAttribute +# 58| 1: [DefaultAttribute] [My(...)] +# 58| -1: [TypeMention] MyAttribute +# 58| 0: [BoolLiteral] true +# 58| 1: [StringLiteralUtf16] "" +# 58| 2: [IntLiteral] 0 +# 59| 2: [DefaultAttribute] [My2(...)] +# 59| -1: [TypeMention] My2Attribute +# 59| 0: [BoolLiteral] false +# 59| 1: [BoolLiteral] true +# 59| 3: [IntLiteral] 1 +# 59| 4: [IntLiteral] 42 +# 60| 4: [BlockStmt] {...} +# 63| [Class] MyAttribute #-----| 3: (Base types) -# 62| 0: [TypeMention] Attribute -# 64| 4: [Field] x -# 64| -1: [TypeMention] int -# 65| 5: [Property] y -# 65| -1: [TypeMention] string -# 65| 3: [Getter] get_y -# 65| 4: [Setter] set_y +# 63| 0: [TypeMention] Attribute +# 65| 4: [Field] x +# 65| -1: [TypeMention] int +# 66| 5: [Property] y +# 66| -1: [TypeMention] string +# 66| 3: [Getter] get_y +# 66| 4: [Setter] set_y #-----| 2: (Parameters) -# 65| 0: [Parameter] value -# 66| 6: [InstanceConstructor] MyAttribute +# 66| 0: [Parameter] value +# 67| 6: [InstanceConstructor] MyAttribute #-----| 2: (Parameters) -# 66| 0: [Parameter] b -# 66| -1: [TypeMention] bool -# 66| 4: [BlockStmt] {...} -# 69| [Enum] E -# 69| 5: [Field] A -# 69| 1: [AssignExpr] ... = ... -# 69| 0: [MemberConstantAccess] access to constant A -# 69| 1: [IntLiteral] 42 -# 71| [Class] ArgsAttribute +# 67| 0: [Parameter] b +# 67| -1: [TypeMention] bool +# 67| 4: [BlockStmt] {...} +# 70| [Enum] E +# 70| 5: [Field] A +# 70| 1: [AssignExpr] ... = ... +# 70| 0: [MemberConstantAccess] access to constant A +# 70| 1: [IntLiteral] 42 +# 72| [Class] ArgsAttribute #-----| 3: (Base types) -# 71| 0: [TypeMention] Attribute -# 73| 4: [Property] Prop -# 73| -1: [TypeMention] Object[] -# 73| 1: [TypeMention] object -# 73| 3: [Getter] get_Prop -# 73| 4: [Setter] set_Prop +# 72| 0: [TypeMention] Attribute +# 74| 4: [Property] Prop +# 74| -1: [TypeMention] Object[] +# 74| 1: [TypeMention] object +# 74| 3: [Getter] get_Prop +# 74| 4: [Setter] set_Prop #-----| 2: (Parameters) -# 73| 0: [Parameter] value -# 74| 5: [InstanceConstructor] ArgsAttribute +# 74| 0: [Parameter] value +# 75| 5: [InstanceConstructor] ArgsAttribute #-----| 2: (Parameters) -# 74| 0: [Parameter] i -# 74| -1: [TypeMention] int -# 74| 1: [Parameter] o -# 74| -1: [TypeMention] object -# 74| 2: [Parameter] t -# 74| -1: [TypeMention] Type -# 74| 3: [Parameter] e -# 74| -1: [TypeMention] E -# 74| 4: [Parameter] arr -# 74| -1: [TypeMention] Int32[] -# 74| 1: [TypeMention] int -# 74| 4: [BlockStmt] {...} -# 78| [Class] X +# 75| 0: [Parameter] i +# 75| -1: [TypeMention] int +# 75| 1: [Parameter] o +# 75| -1: [TypeMention] object +# 75| 2: [Parameter] t +# 75| -1: [TypeMention] Type +# 75| 3: [Parameter] e +# 75| -1: [TypeMention] E +# 75| 4: [Parameter] arr +# 75| -1: [TypeMention] Int32[] +# 75| 1: [TypeMention] int +# 75| 4: [BlockStmt] {...} +# 79| [Class] X #-----| 0: (Attributes) -# 77| 1: [DefaultAttribute] [Args(...)] -# 77| -1: [TypeMention] ArgsAttribute -# 77| 0: [IntLiteral] 42 -# 77| 1: [NullLiteral] null -# 77| 2: [TypeofExpr] typeof(...) -# 77| 0: [TypeAccess] access to type X -# 77| 0: [TypeMention] X -# 77| 3: [MemberConstantAccess] access to constant A -# 77| -1: [TypeAccess] access to type E -# 77| 0: [TypeMention] E -# 77| 4: [ArrayCreation] array creation of type Int32[] -# 77| -2: [TypeMention] Int32[] -# 77| 1: [TypeMention] int -# 77| -1: [ArrayInitializer] { ..., ... } -# 77| 0: [IntLiteral] 1 -# 77| 1: [IntLiteral] 2 -# 77| 2: [IntLiteral] 3 -# 77| 5: [ArrayCreation] array creation of type Object[] -# 77| -2: [TypeMention] Object[] -# 77| 1: [TypeMention] object -# 77| -1: [ArrayInitializer] { ..., ... } -# 77| 0: [CastExpr] (...) ... -# 77| 1: [IntLiteral] 1 -# 77| 1: [TypeofExpr] typeof(...) -# 77| 0: [TypeAccess] access to type Int32 -# 77| 0: [TypeMention] int -# 82| 5: [Method] SomeMethod -# 82| -1: [TypeMention] int +# 78| 1: [DefaultAttribute] [Args(...)] +# 78| -1: [TypeMention] ArgsAttribute +# 78| 0: [IntLiteral] 42 +# 78| 1: [NullLiteral] null +# 78| 2: [TypeofExpr] typeof(...) +# 78| 0: [TypeAccess] access to type X +# 78| 0: [TypeMention] X +# 78| 3: [MemberConstantAccess] access to constant A +# 78| -1: [TypeAccess] access to type E +# 78| 0: [TypeMention] E +# 78| 4: [ArrayCreation] array creation of type Int32[] +# 78| -2: [TypeMention] Int32[] +# 78| 1: [TypeMention] int +# 78| -1: [ArrayInitializer] { ..., ... } +# 78| 0: [IntLiteral] 1 +# 78| 1: [IntLiteral] 2 +# 78| 2: [IntLiteral] 3 +# 78| 5: [ArrayCreation] array creation of type Object[] +# 78| -2: [TypeMention] Object[] +# 78| 1: [TypeMention] object +# 78| -1: [ArrayInitializer] { ..., ... } +# 78| 0: [CastExpr] (...) ... +# 78| 1: [IntLiteral] 1 +# 78| 1: [TypeofExpr] typeof(...) +# 78| 0: [TypeAccess] access to type Int32 +# 78| 0: [TypeMention] int +# 83| 5: [Method] SomeMethod +# 83| -1: [TypeMention] int #-----| 0: (Attributes) -# 80| 1: [DefaultAttribute] [Args(...)] -# 80| -1: [TypeMention] ArgsAttribute -# 80| 0: [AddExpr] ... + ... -# 80| 0: [IntLiteral] 42 -# 80| 1: [IntLiteral] 0 -# 80| 1: [ArrayCreation] array creation of type Int32[] -# 80| -2: [TypeMention] Int32[] -# 80| 1: [TypeMention] int -# 80| -1: [ArrayInitializer] { ..., ... } -# 80| 0: [IntLiteral] 1 -# 80| 1: [IntLiteral] 2 -# 80| 2: [IntLiteral] 3 -# 80| 2: [NullLiteral] null -# 80| 3: [CastExpr] (...) ... -# 80| 0: [TypeAccess] access to type E -# 80| 0: [TypeMention] E -# 80| 1: [IntLiteral] 12 -# 80| 4: [NullLiteral] null -# 80| 5: [ArrayCreation] array creation of type Object[] -# 80| -2: [TypeMention] Object[] -# 80| 1: [TypeMention] object -# 80| -1: [ArrayInitializer] { ..., ... } -# 80| 0: [CastExpr] (...) ... -# 80| 1: [IntLiteral] 1 -# 80| 1: [TypeofExpr] typeof(...) -# 80| 0: [TypeAccess] access to type Int32 -# 80| 0: [TypeMention] int -# 81| 2: [ReturnAttribute] [return: Args(...)] +# 81| 1: [DefaultAttribute] [Args(...)] # 81| -1: [TypeMention] ArgsAttribute # 81| 0: [AddExpr] ... + ... # 81| 0: [IntLiteral] 42 @@ -275,189 +248,228 @@ attributes.cs: # 81| 1: [TypeofExpr] typeof(...) # 81| 0: [TypeAccess] access to type Int32 # 81| 0: [TypeMention] int -# 82| 4: [BlockStmt] {...} -# 82| 0: [ReturnStmt] return ...; -# 82| 0: [IntLiteral] 1 -# 85| [Class] My2Attribute +# 82| 2: [ReturnAttribute] [return: Args(...)] +# 82| -1: [TypeMention] ArgsAttribute +# 82| 0: [AddExpr] ... + ... +# 82| 0: [IntLiteral] 42 +# 82| 1: [IntLiteral] 0 +# 82| 1: [ArrayCreation] array creation of type Int32[] +# 82| -2: [TypeMention] Int32[] +# 82| 1: [TypeMention] int +# 82| -1: [ArrayInitializer] { ..., ... } +# 82| 0: [IntLiteral] 1 +# 82| 1: [IntLiteral] 2 +# 82| 2: [IntLiteral] 3 +# 82| 2: [NullLiteral] null +# 82| 3: [CastExpr] (...) ... +# 82| 0: [TypeAccess] access to type E +# 82| 0: [TypeMention] E +# 82| 1: [IntLiteral] 12 +# 82| 4: [NullLiteral] null +# 82| 5: [ArrayCreation] array creation of type Object[] +# 82| -2: [TypeMention] Object[] +# 82| 1: [TypeMention] object +# 82| -1: [ArrayInitializer] { ..., ... } +# 82| 0: [CastExpr] (...) ... +# 82| 1: [IntLiteral] 1 +# 82| 1: [TypeofExpr] typeof(...) +# 82| 0: [TypeAccess] access to type Int32 +# 82| 0: [TypeMention] int +# 83| 4: [BlockStmt] {...} +# 83| 0: [ReturnStmt] return ...; +# 83| 0: [IntLiteral] 1 +# 86| [Class] My2Attribute #-----| 3: (Base types) -# 85| 0: [TypeMention] Attribute -# 87| 4: [Property] X -# 87| -1: [TypeMention] int -# 87| 3: [Getter] get_X -# 87| 4: [Setter] set_X +# 86| 0: [TypeMention] Attribute +# 88| 4: [Property] X +# 88| -1: [TypeMention] int +# 88| 3: [Getter] get_X +# 88| 4: [Setter] set_X #-----| 2: (Parameters) -# 87| 0: [Parameter] value -# 88| 5: [InstanceConstructor] My2Attribute +# 88| 0: [Parameter] value +# 89| 5: [InstanceConstructor] My2Attribute #-----| 2: (Parameters) -# 88| 0: [Parameter] a -# 88| -1: [TypeMention] bool -# 88| 1: [Parameter] b -# 88| -1: [TypeMention] bool -# 88| 2: [Parameter] i -# 88| -1: [TypeMention] int -# 88| 1: [IntLiteral] 12 -# 88| 3: [Parameter] j -# 88| -1: [TypeMention] int -# 88| 1: [IntLiteral] 13 -# 88| 4: [BlockStmt] {...} -# 91| [Class] My3Attribute +# 89| 0: [Parameter] a +# 89| -1: [TypeMention] bool +# 89| 1: [Parameter] b +# 89| -1: [TypeMention] bool +# 89| 2: [Parameter] i +# 89| -1: [TypeMention] int +# 89| 1: [IntLiteral] 12 +# 89| 3: [Parameter] j +# 89| -1: [TypeMention] int +# 89| 1: [IntLiteral] 13 +# 89| 4: [BlockStmt] {...} +# 92| [Class] My3Attribute #-----| 3: (Base types) -# 91| 0: [TypeMention] Attribute -# 93| 4: [InstanceConstructor] My3Attribute +# 92| 0: [TypeMention] Attribute +# 94| 4: [InstanceConstructor] My3Attribute #-----| 2: (Parameters) -# 93| 0: [Parameter] x -# 93| -1: [TypeMention] int -# 93| 4: [BlockStmt] {...} -# 98| [DelegateType] My1Delegate +# 94| 0: [Parameter] x +# 94| -1: [TypeMention] int +# 94| 4: [BlockStmt] {...} +# 99| [DelegateType] My1Delegate #-----| 0: (Attributes) -# 96| 1: [DefaultAttribute] [My3(...)] -# 96| -1: [TypeMention] My3Attribute -# 96| 0: [IntLiteral] 1 +# 97| 1: [DefaultAttribute] [My3(...)] +# 97| -1: [TypeMention] My3Attribute +# 97| 0: [IntLiteral] 1 #-----| 2: (Parameters) -# 98| 0: [Parameter] message -# 98| -1: [TypeMention] string -# 102| [DelegateType] My2Delegate +# 99| 0: [Parameter] message +# 99| -1: [TypeMention] string +# 103| [DelegateType] My2Delegate #-----| 0: (Attributes) -# 101| 1: [DefaultAttribute] [My3(...)] -# 101| -1: [TypeMention] My3Attribute -# 101| 0: [IntLiteral] 4 +# 102| 1: [DefaultAttribute] [My3(...)] +# 102| -1: [TypeMention] My3Attribute +# 102| 0: [IntLiteral] 4 #-----| 2: (Parameters) -# 102| 0: [Parameter] message -# 102| -1: [TypeMention] string -# 104| [Class] MyAttributeUsage -# 108| 5: [AddOperator] + -# 108| -1: [TypeMention] int +# 103| 0: [Parameter] message +# 103| -1: [TypeMention] string +# 105| [Class] MyAttributeUsage +# 109| 5: [AddOperator] + +# 109| -1: [TypeMention] int #-----| 0: (Attributes) -# 106| 1: [DefaultAttribute] [My3(...)] -# 106| -1: [TypeMention] My3Attribute -# 106| 0: [IntLiteral] 5 -# 107| 2: [ReturnAttribute] [return: My3(...)] +# 107| 1: [DefaultAttribute] [My3(...)] # 107| -1: [TypeMention] My3Attribute -# 107| 0: [IntLiteral] 6 +# 107| 0: [IntLiteral] 5 +# 108| 2: [ReturnAttribute] [return: My3(...)] +# 108| -1: [TypeMention] My3Attribute +# 108| 0: [IntLiteral] 6 #-----| 2: (Parameters) -# 108| 0: [Parameter] a -# 108| -1: [TypeMention] MyAttributeUsage -# 108| 1: [Parameter] b -# 108| -1: [TypeMention] MyAttributeUsage -# 108| 4: [IntLiteral] 0 -# 110| 6: [Indexer] Item -# 110| -1: [TypeMention] int +# 109| 0: [Parameter] a +# 109| -1: [TypeMention] MyAttributeUsage +# 109| 1: [Parameter] b +# 109| -1: [TypeMention] MyAttributeUsage +# 109| 4: [IntLiteral] 0 +# 111| 6: [Indexer] Item +# 111| -1: [TypeMention] int #-----| 1: (Parameters) -# 110| 0: [Parameter] x -# 110| -1: [TypeMention] int -# 114| 3: [Getter] get_Item +# 111| 0: [Parameter] x +# 111| -1: [TypeMention] int +# 115| 3: [Getter] get_Item #-----| 0: (Attributes) -# 112| 1: [DefaultAttribute] [My3(...)] -# 112| -1: [TypeMention] My3Attribute -# 112| 0: [IntLiteral] 7 -# 113| 2: [ReturnAttribute] [return: My3(...)] +# 113| 1: [DefaultAttribute] [My3(...)] # 113| -1: [TypeMention] My3Attribute -# 113| 0: [IntLiteral] 8 +# 113| 0: [IntLiteral] 7 +# 114| 2: [ReturnAttribute] [return: My3(...)] +# 114| -1: [TypeMention] My3Attribute +# 114| 0: [IntLiteral] 8 #-----| 2: (Parameters) -# 110| 0: [Parameter] x -# 114| 4: [BlockStmt] {...} -# 114| 0: [ReturnStmt] return ...; -# 114| 0: [AddExpr] ... + ... -# 114| 0: [ParameterAccess] access to parameter x -# 114| 1: [IntLiteral] 1 -# 118| 4: [Setter] set_Item +# 111| 0: [Parameter] x +# 115| 4: [BlockStmt] {...} +# 115| 0: [ReturnStmt] return ...; +# 115| 0: [AddExpr] ... + ... +# 115| 0: [ParameterAccess] access to parameter x +# 115| 1: [IntLiteral] 1 +# 119| 4: [Setter] set_Item #-----| 0: (Attributes) -# 116| 1: [DefaultAttribute] [My3(...)] -# 116| -1: [TypeMention] My3Attribute -# 116| 0: [IntLiteral] 9 +# 117| 1: [DefaultAttribute] [My3(...)] +# 117| -1: [TypeMention] My3Attribute +# 117| 0: [IntLiteral] 9 #-----| 2: (Parameters) -# 110| 0: [Parameter] x -# 118| 1: [Parameter] value +# 111| 0: [Parameter] x +# 119| 1: [Parameter] value #-----| 0: (Attributes) -# 117| 1: [DefaultAttribute] [My3(...)] -# 117| -1: [TypeMention] My3Attribute -# 117| 0: [IntLiteral] 10 -# 118| 4: [BlockStmt] {...} -# 118| 0: [ReturnStmt] return ...; -# 121| 7: [Field] p -# 121| -1: [TypeMention] int -# 122| 8: [Property] Prop1 +# 118| 1: [DefaultAttribute] [My3(...)] +# 118| -1: [TypeMention] My3Attribute +# 118| 0: [IntLiteral] 10 +# 119| 4: [BlockStmt] {...} +# 119| 0: [ReturnStmt] return ...; +# 122| 7: [Field] p # 122| -1: [TypeMention] int -# 126| 3: [Getter] get_Prop1 +# 123| 8: [Property] Prop1 +# 123| -1: [TypeMention] int +# 127| 3: [Getter] get_Prop1 #-----| 0: (Attributes) -# 124| 1: [DefaultAttribute] [My3(...)] -# 124| -1: [TypeMention] My3Attribute -# 124| 0: [IntLiteral] 11 -# 125| 2: [ReturnAttribute] [return: My3(...)] +# 125| 1: [DefaultAttribute] [My3(...)] # 125| -1: [TypeMention] My3Attribute -# 125| 0: [IntLiteral] 12 -# 126| 4: [BlockStmt] {...} -# 126| 0: [ReturnStmt] return ...; -# 126| 0: [FieldAccess] access to field p -# 130| 4: [Setter] set_Prop1 +# 125| 0: [IntLiteral] 11 +# 126| 2: [ReturnAttribute] [return: My3(...)] +# 126| -1: [TypeMention] My3Attribute +# 126| 0: [IntLiteral] 12 +# 127| 4: [BlockStmt] {...} +# 127| 0: [ReturnStmt] return ...; +# 127| 0: [FieldAccess] access to field p +# 131| 4: [Setter] set_Prop1 #-----| 0: (Attributes) -# 128| 1: [DefaultAttribute] [My3(...)] -# 128| -1: [TypeMention] My3Attribute -# 128| 0: [IntLiteral] 13 +# 129| 1: [DefaultAttribute] [My3(...)] +# 129| -1: [TypeMention] My3Attribute +# 129| 0: [IntLiteral] 13 #-----| 2: (Parameters) -# 130| 0: [Parameter] value +# 131| 0: [Parameter] value #-----| 0: (Attributes) -# 129| 1: [DefaultAttribute] [My3(...)] -# 129| -1: [TypeMention] My3Attribute -# 129| 0: [IntLiteral] 14 -# 130| 4: [BlockStmt] {...} -# 130| 0: [ExprStmt] ...; -# 130| 0: [AssignExpr] ... = ... -# 130| 0: [FieldAccess] access to field p -# 130| 1: [ParameterAccess] access to parameter value -# 134| [Class] Class1 -# 136| 5: [Class] ParamsAttribute +# 130| 1: [DefaultAttribute] [My3(...)] +# 130| -1: [TypeMention] My3Attribute +# 130| 0: [IntLiteral] 14 +# 131| 4: [BlockStmt] {...} +# 131| 0: [ExprStmt] ...; +# 131| 0: [AssignExpr] ... = ... +# 131| 0: [FieldAccess] access to field p +# 131| 1: [ParameterAccess] access to parameter value +# 135| [Class] Class1 +# 137| 5: [Class] ParamsAttribute #-----| 3: (Base types) -# 136| 0: [TypeMention] Attribute -# 138| 4: [InstanceConstructor] ParamsAttribute +# 137| 0: [TypeMention] Attribute +# 139| 4: [InstanceConstructor] ParamsAttribute #-----| 2: (Parameters) -# 138| 0: [Parameter] s1 -# 138| -1: [TypeMention] string -# 138| 1: [Parameter] s2 -# 138| -1: [TypeMention] string -# 138| 2: [Parameter] args -# 138| -1: [TypeMention] Int32[] -# 138| 1: [TypeMention] int -# 138| 4: [BlockStmt] {...} -# 142| 6: [Method] M1 -# 142| -1: [TypeMention] Void +# 139| 0: [Parameter] s1 +# 139| -1: [TypeMention] string +# 139| 1: [Parameter] s2 +# 139| -1: [TypeMention] string +# 139| 2: [Parameter] args +# 139| -1: [TypeMention] Int32[] +# 139| 1: [TypeMention] int +# 139| 4: [BlockStmt] {...} +# 143| 6: [Method] M1 +# 143| -1: [TypeMention] Void #-----| 0: (Attributes) -# 141| 1: [DefaultAttribute] [Params(...)] -# 141| -1: [TypeMention] ParamsAttribute -# 141| 0: [StringLiteralUtf16] "a" -# 141| 1: [StringLiteralUtf16] "b" -# 141| 2: [IntLiteral] 1 -# 141| 3: [IntLiteral] 2 -# 141| 4: [IntLiteral] 3 -# 142| 4: [BlockStmt] {...} -# 145| 7: [Method] M2 -# 145| -1: [TypeMention] Void +# 142| 1: [DefaultAttribute] [Params(...)] +# 142| -1: [TypeMention] ParamsAttribute +# 142| 0: [StringLiteralUtf16] "a" +# 142| 1: [StringLiteralUtf16] "b" +# 142| 2: [IntLiteral] 1 +# 142| 3: [IntLiteral] 2 +# 142| 4: [IntLiteral] 3 +# 143| 4: [BlockStmt] {...} +# 146| 7: [Method] M2 +# 146| -1: [TypeMention] Void #-----| 0: (Attributes) -# 144| 1: [DefaultAttribute] [Params(...)] -# 144| -1: [TypeMention] ParamsAttribute -# 144| 0: [StringLiteralUtf16] "a" -# 144| 1: [StringLiteralUtf16] "b" -# 144| 2: [IntLiteral] 1 -# 144| 3: [IntLiteral] 2 -# 144| 4: [IntLiteral] 3 -# 145| 4: [BlockStmt] {...} -# 148| 8: [Method] M3 -# 148| -1: [TypeMention] Void +# 145| 1: [DefaultAttribute] [Params(...)] +# 145| -1: [TypeMention] ParamsAttribute +# 145| 0: [StringLiteralUtf16] "a" +# 145| 1: [StringLiteralUtf16] "b" +# 145| 2: [IntLiteral] 1 +# 145| 3: [IntLiteral] 2 +# 145| 4: [IntLiteral] 3 +# 146| 4: [BlockStmt] {...} +# 149| 8: [Method] M3 +# 149| -1: [TypeMention] Void #-----| 0: (Attributes) -# 147| 1: [DefaultAttribute] [Params(...)] -# 147| -1: [TypeMention] ParamsAttribute -# 147| 0: [StringLiteralUtf16] "a" -# 147| 1: [StringLiteralUtf16] "b" -# 147| 2: [IntLiteral] 1 -# 148| 4: [BlockStmt] {...} -# 151| 9: [Method] M4 -# 151| -1: [TypeMention] Void +# 148| 1: [DefaultAttribute] [Params(...)] +# 148| -1: [TypeMention] ParamsAttribute +# 148| 0: [StringLiteralUtf16] "a" +# 148| 1: [StringLiteralUtf16] "b" +# 148| 2: [IntLiteral] 1 +# 149| 4: [BlockStmt] {...} +# 152| 9: [Method] M4 +# 152| -1: [TypeMention] Void #-----| 0: (Attributes) -# 150| 1: [DefaultAttribute] [Params(...)] -# 150| -1: [TypeMention] ParamsAttribute -# 150| 0: [StringLiteralUtf16] "a" -# 150| 1: [StringLiteralUtf16] "b" -# 150| 2: [ArrayCreation] array creation of type Int32[] -# 150| -1: [ArrayInitializer] { ..., ... } -# 150| 0: [IntLiteral] 1 -# 151| 4: [BlockStmt] {...} +# 151| 1: [DefaultAttribute] [Params(...)] +# 151| -1: [TypeMention] ParamsAttribute +# 151| 0: [StringLiteralUtf16] "a" +# 151| 1: [StringLiteralUtf16] "b" +# 151| 2: [ArrayCreation] array creation of type Int32[] +# 151| -1: [ArrayInitializer] { ..., ... } +# 151| 0: [IntLiteral] 1 +# 152| 4: [BlockStmt] {...} +# 156| [Class] MyExperimentalClass +#-----| 0: (Attributes) +# 155| 1: [DefaultAttribute] [Experimental(...)] +# 155| -1: [TypeMention] ExperimentalAttribute +# 155| 0: [StringLiteralUtf16] "MyExperimentalClassId" +# 159| 5: [Method] MyExperimentalMethod +# 159| -1: [TypeMention] Void +#-----| 0: (Attributes) +# 158| 1: [DefaultAttribute] [Experimental(...)] +# 158| -1: [TypeMention] ExperimentalAttribute +# 158| 0: [StringLiteralUtf16] "MyExperimentalMethodId" +# 159| 4: [BlockStmt] {...} diff --git a/csharp/ql/test/library-tests/attributes/attributes.cs b/csharp/ql/test/library-tests/attributes/attributes.cs index 3f1018c9416..25cbf258ab1 100644 --- a/csharp/ql/test/library-tests/attributes/attributes.cs +++ b/csharp/ql/test/library-tests/attributes/attributes.cs @@ -1,5 +1,6 @@ using System; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -149,4 +150,11 @@ class Class1 [Params(args: new[] { 1 }, s2: "b", s1: "a")] public void M4() { } -} \ No newline at end of file +} + +[Experimental("MyExperimentalClassId")] +public class MyExperimentalClass +{ + [Experimental("MyExperimentalMethodId")] + public void MyExperimentalMethod() { } +} diff --git a/csharp/ql/test/library-tests/cil/attributes/attribute.ql b/csharp/ql/test/library-tests/cil/attributes/attribute.ql index 99ba3c8af5e..76489b3c989 100644 --- a/csharp/ql/test/library-tests/cil/attributes/attribute.ql +++ b/csharp/ql/test/library-tests/cil/attributes/attribute.ql @@ -1,7 +1,7 @@ import semmle.code.cil.Attribute import semmle.code.cil.Declaration -private predicate isOsSpecific(Declaration d) { +deprecated private predicate isOsSpecific(Declaration d) { d.getFullyQualifiedName() .matches("%" + [ @@ -13,7 +13,7 @@ private predicate isOsSpecific(Declaration d) { ] + "%") } -query predicate attrNoArg(string dec, string attr) { +deprecated query predicate attrNoArg(string dec, string attr) { exists(Declaration d, Attribute a | not isOsSpecific(d) and a.getDeclaration() = d and @@ -24,7 +24,7 @@ query predicate attrNoArg(string dec, string attr) { ) } -query predicate attrArgNamed(string dec, string attr, string name, string value) { +deprecated query predicate attrArgNamed(string dec, string attr, string name, string value) { exists(Declaration d, Attribute a | a.getDeclaration() = d and not isOsSpecific(d) and @@ -35,7 +35,7 @@ query predicate attrArgNamed(string dec, string attr, string name, string value) ) } -query predicate attrArgPositional(string dec, string attr, int index, string value) { +deprecated query predicate attrArgPositional(string dec, string attr, int index, string value) { exists(Declaration d, Attribute a | a.getDeclaration() = d and not isOsSpecific(d) and diff --git a/csharp/ql/test/library-tests/cil/consistency/Handles.ql b/csharp/ql/test/library-tests/cil/consistency/Handles.ql index 392d07244e2..73c17c713d7 100644 --- a/csharp/ql/test/library-tests/cil/consistency/Handles.ql +++ b/csharp/ql/test/library-tests/cil/consistency/Handles.ql @@ -3,7 +3,7 @@ import cil import dotnet import semmle.code.csharp.commons.QualifiedName -class MetadataEntity extends DotNet::NamedElement, @metadata_entity { +deprecated class MetadataEntity extends DotNet::NamedElement, @metadata_entity { int getHandle() { metadata_handle(this, _, result) } predicate hasHandle() { exists(this.getHandle()) } @@ -11,7 +11,7 @@ class MetadataEntity extends DotNet::NamedElement, @metadata_entity { Assembly getAssembly() { metadata_handle(this, result, _) } } -query predicate tooManyHandles(string s) { +deprecated query predicate tooManyHandles(string s) { exists(MetadataEntity e, Assembly a, string qualifier, string name | strictcount(int handle | metadata_handle(e, a, handle)) > 1 and e.hasFullyQualifiedName(qualifier, name) and @@ -19,7 +19,7 @@ query predicate tooManyHandles(string s) { ) } -private class UniqueMetadataEntity extends MetadataEntity { +deprecated private class UniqueMetadataEntity extends MetadataEntity { UniqueMetadataEntity() { // Tuple types such as `(,)` and `ValueTuple`2` share the same handle not this instanceof TupleType and @@ -30,7 +30,7 @@ private class UniqueMetadataEntity extends MetadataEntity { } } -query predicate tooManyMatchingHandles(string s) { +deprecated query predicate tooManyMatchingHandles(string s) { exists(UniqueMetadataEntity e, Assembly a, int handle, string qualifier, string name | metadata_handle(e, a, handle) and strictcount(UniqueMetadataEntity e2 | metadata_handle(e2, a, handle)) > 2 and @@ -39,7 +39,7 @@ query predicate tooManyMatchingHandles(string s) { ) } -query predicate missingCil(Element e) { +deprecated query predicate missingCil(Element e) { ( e instanceof Callable or @@ -52,16 +52,16 @@ query predicate missingCil(Element e) { not exists(CIL::Element ce | ce.(MetadataEntity).matchesHandle(e)) } -query predicate csharpLocationViolation(Element e) { +deprecated query predicate csharpLocationViolation(Element e) { e.fromLibrary() and e.(MetadataEntity).hasHandle() and not e.getALocation() = e.(MetadataEntity).getAssembly() } -query predicate matchingObjectMethods(string s1, string s2) { +deprecated query predicate matchingObjectMethods(string s1, string s2) { exists(Callable m1, CIL::Method m2 | m1.getDeclaringType().hasFullyQualifiedName("System", "Object") and - m1.matchesHandle(m2) and + m1.(DotNet::Callable).matchesHandle(m2) and s1 = m1.toStringWithTypes() and s2 = m2.toStringWithTypes() ) diff --git a/csharp/ql/test/library-tests/cil/consistency/consistency.ql b/csharp/ql/test/library-tests/cil/consistency/consistency.ql index 323be193c14..e7ece7c4e6e 100644 --- a/csharp/ql/test/library-tests/cil/consistency/consistency.ql +++ b/csharp/ql/test/library-tests/cil/consistency/consistency.ql @@ -1,5 +1,6 @@ import cil import semmle.code.cil.ConsistencyChecks -from ConsistencyViolation v -select v, v.getMessage() +deprecated query predicate consistencyViolation(ConsistencyViolation v, string message) { + message = v.getMessage() +} diff --git a/csharp/ql/test/library-tests/cil/dataflow/CallableReturns.expected b/csharp/ql/test/library-tests/cil/dataflow/CallableReturns.expected deleted file mode 100644 index 46f4fe51f68..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/CallableReturns.expected +++ /dev/null @@ -1,113 +0,0 @@ -stubs -alwaysNull -| System.Object Dataflow.NullMethods.ReturnsNull2() | 0: ldarg.0, 1: call Dataflow.NullMethods.ReturnsNull, 2: ret | -| System.Object Dataflow.NullMethods.ReturnsNull() | 0: ldnull, 1: ret | -| System.Object Dataflow.NullMethods.ReturnsNullIndirect() | 0: ldarg.0, 1: call Dataflow.NullMethods.ReturnsNull, 2: ret | -| System.Object Dataflow.NullMethods.VirtualReturnsNull() | 0: ldnull, 1: ret | -| System.Object Dataflow.NullMethods.get_NullProperty() | 0: ldnull, 1: ret | -| System.Object Dataflow.NullMethods.get_VirtualNullProperty() | 0: ldnull, 1: ret | -| System.Object System.Collections.EmptyReadOnlyDictionaryInternal.get_Item(System.Object) | 0: ldarg.1, 1: ldstr "key", 2: call System.ArgumentNullException.ThrowIfNull, 3: ldnull, 4: ret | -alwaysNonNull -| System.ArgumentException System.ThrowHelper.GetAddingDuplicateWithKeyArgumentException(System.Object) | -| System.ArgumentException System.ThrowHelper.GetWrongKeyTypeArgumentException(System.Object,System.Type) | -| System.ArgumentException System.ThrowHelper.GetWrongValueTypeArgumentException(System.Object,System.Type) | -| System.Collections.Generic.KeyNotFoundException System.ThrowHelper.GetKeyNotFoundException(System.Object) | -| System.Exception System.ThrowHelper.CreateEndOfFileException() | -| System.Exception System.ThrowHelper.GetArraySegmentCtorValidationFailedException(System.Array,System.Int32,System.Int32) | -| System.InvalidOperationException System.ThrowHelper.GetInvalidOperationException_EnumCurrent(System.Int32) | -| System.Object Dataflow.NonNullMethods.ReturnsNonNull2() | -| System.Object Dataflow.NonNullMethods.ReturnsNonNull() | -| System.Object Dataflow.NonNullMethods.ReturnsNonNullIndirect() | -| System.Object Dataflow.NonNullMethods.get_VirtualNonNull() | -| System.Object Dataflow.NonNullMethods.get_VirtualNonNullProperty() | -| System.Reflection.AmbiguousMatchException System.ThrowHelper.GetAmbiguousMatchException(System.Attribute) | -| System.Reflection.AmbiguousMatchException System.ThrowHelper.GetAmbiguousMatchException(System.Reflection.MemberInfo) | -| System.String Dataflow.NonNullMethods.get_NonNullProperty2() | -| System.String System.ThrowHelper.GetArgumentName(System.ExceptionArgument) | -| System.Text.Encoder System.Text.ASCIIEncoding.GetEncoder() | -| System.Text.Encoder System.Text.Encoding.GetEncoder() | -| System.Text.Encoder System.Text.Latin1Encoding.GetEncoder() | -| System.Text.Encoder System.Text.UTF7Encoding.GetEncoder() | -| System.Text.Encoder System.Text.UTF8Encoding.GetEncoder() | -| System.Text.Encoder System.Text.UTF32Encoding.GetEncoder() | -| System.Text.Encoder System.Text.UnicodeEncoding.GetEncoder() | -alwaysThrows -| System.Object Dataflow.ThrowingMethods.AlwaysThrows() | System.InvalidOperationException | 0: newobj System.InvalidOperationException..ctor, 1: throw | -| System.Object Dataflow.ThrowingMethods.VirtualThrows() | System.Exception | 0: newobj System.Exception..ctor, 1: throw | -| System.Object Dataflow.ThrowingMethods.get_ThrowProperty() | System.Exception | 0: newobj System.Exception..ctor, 1: throw | -| System.Object Dataflow.ThrowingMethods.get_VirtualThrowProperty() | System.Exception | 0: newobj System.Exception..ctor, 1: throw | -| System.Object System.ValueTuple.get_Item(System.Int32) | System.IndexOutOfRangeException | 0: newobj System.IndexOutOfRangeException..ctor, 1: throw | -| System.Void System.Reflection.InvokerEmitUtil.ThrowHelper.Throw_NullReference_InvokeNullRefReturned() | System.NullReferenceException | 0: call System.SR.get_NullReference_InvokeNullRefReturned, 1: newobj System.NullReferenceException..ctor, 2: throw | -| System.Void System.ThrowHelper.ArgumentOutOfRangeException_Enum_Value() | System.ArgumentOutOfRangeException | 0: ldstr "value", 1: call System.SR.get_ArgumentOutOfRange_Enum, 2: newobj System.ArgumentOutOfRangeException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowAccessViolationException() | System.AccessViolationException | 0: newobj System.AccessViolationException..ctor, 1: throw | -| System.Void System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException`1(!0) | System.ArgumentException | 0: ldarg.0, 1: box, 2: call System.ThrowHelper.GetAddingDuplicateWithKeyArgumentException, 3: throw | -| System.Void System.ThrowHelper.ThrowAggregateException(System.Collections.Generic.List) | System.AggregateException | 0: ldarg.0, 1: newobj System.AggregateException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_Arg_CannotBeNaN() | System.ArgumentException | 0: call System.SR.get_Arg_CannotBeNaN, 1: newobj System.ArgumentException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_ArgumentNull_TypedRefType() | System.ArgumentNullException | 0: ldstr "value", 1: call System.SR.get_ArgumentNull_TypedRefType, 2: newobj System.ArgumentNullException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_Argument_IncompatibleArrayType() | System.ArgumentException | 0: call System.SR.get_Argument_IncompatibleArrayType, 1: newobj System.ArgumentException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_BadComparer(System.Object) | System.ArgumentException | 0: call System.SR.get_Arg_BogusIComparer, 1: ldarg.0, 2: call System.SR.Format, 3: newobj System.ArgumentException..ctor, 4: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_CannotExtractScalar(System.ExceptionArgument) | System.ArgumentException | 0: ldc.i4.s 31, 1: ldarg.0, 2: call System.ThrowHelper.GetArgumentException, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_DestinationTooShort() | System.ArgumentException | 0: call System.SR.get_Argument_DestinationTooShort, 1: ldstr "destination", 2: newobj System.ArgumentException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_HandleNotAsync(System.String) | System.ArgumentException | 0: call System.SR.get_Arg_HandleNotAsync, 1: ldarg.0, 2: newobj System.ArgumentException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_HandleNotSync(System.String) | System.ArgumentException | 0: call System.SR.get_Arg_HandleNotSync, 1: ldarg.0, 2: newobj System.ArgumentException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_InvalidHandle(System.String) | System.ArgumentException | 0: call System.SR.get_Arg_InvalidHandle, 1: ldarg.0, 2: newobj System.ArgumentException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_OverlapAlignmentMismatch() | System.ArgumentException | 0: call System.SR.get_Argument_OverlapAlignmentMismatch, 1: newobj System.ArgumentException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowArgumentException_TupleIncorrectType(System.Object) | System.ArgumentException | 0: call System.SR.get_ArgumentException_ValueTupleIncorrectType, 1: ldarg.0, 2: callvirt System.Object.GetType, 3: call System.SR.Format, 4: ldstr "other", 5: newobj System.ArgumentException..ctor, 6: throw | -| System.Void System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument) | System.ArgumentNullException | 0: ldarg.0, 1: call System.ThrowHelper.GetArgumentName, 2: newobj System.ArgumentNullException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRangeException() | System.ArgumentOutOfRangeException | 0: newobj System.ArgumentOutOfRangeException..ctor, 1: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument) | System.ArgumentOutOfRangeException | 0: ldarg.0, 1: call System.ThrowHelper.GetArgumentName, 2: newobj System.ArgumentOutOfRangeException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRangeException_NeedNonNegNum(System.String) | System.ArgumentOutOfRangeException | 0: ldarg.0, 1: call System.SR.get_ArgumentOutOfRange_NeedNonNegNum, 2: newobj System.ArgumentOutOfRangeException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRangeException_PrecisionTooLarge() | System.ArgumentOutOfRangeException | 0: ldstr "precision", 1: call System.SR.get_Argument_PrecisionTooLarge, 2: ldc.i4.s 31, 3: box, 4: call System.SR.Format, 5: newobj System.ArgumentOutOfRangeException..ctor, 6: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRangeException_SymbolDoesNotFit() | System.ArgumentOutOfRangeException | 0: ldstr "symbol", 1: call System.SR.get_Argument_BadFormatSpecifier, 2: newobj System.ArgumentOutOfRangeException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRange_BadHourMinuteSecond() | System.ArgumentOutOfRangeException | 0: ldnull, 1: call System.SR.get_ArgumentOutOfRange_BadHourMinuteSecond, 2: newobj System.ArgumentOutOfRangeException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRange_BadYearMonthDay() | System.ArgumentOutOfRangeException | 0: ldnull, 1: call System.SR.get_ArgumentOutOfRange_BadYearMonthDay, 2: newobj System.ArgumentOutOfRangeException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRange_DayNumber(System.Int32) | System.ArgumentOutOfRangeException | 0: ldstr "dayNumber", 1: ldarg.0, 2: box, 3: call System.SR.get_ArgumentOutOfRange_DayNumber, 4: newobj System.ArgumentOutOfRangeException..ctor, 5: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRange_IndexMustBeLessException() | System.ArgumentOutOfRangeException | 0: ldc.i4.s 31, 1: ldc.i4.1, 2: call System.ThrowHelper.GetArgumentOutOfRangeException, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRange_IndexMustBeLessOrEqualException() | System.ArgumentOutOfRangeException | 0: ldc.i4.s 31, 1: ldc.i4.0, 2: call System.ThrowHelper.GetArgumentOutOfRangeException, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRange_Month(System.Int32) | System.ArgumentOutOfRangeException | 0: ldstr "month", 1: ldarg.0, 2: box, 3: call System.SR.get_ArgumentOutOfRange_Month, 4: newobj System.ArgumentOutOfRangeException..ctor, 5: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRange_Range`1(System.String,!0,!0,!0) | System.ArgumentOutOfRangeException | 0: ldarg.0, 1: ldarg.1, 2: box, 3: call System.SR.get_ArgumentOutOfRange_Range, 4: ldarg.2, 5: box, 6: ldarg.3, 7: box, 8: call System.SR.Format, 9: newobj System.ArgumentOutOfRangeException..ctor, 10: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRange_TimeSpanTooLong() | System.ArgumentOutOfRangeException | 0: ldnull, 1: call System.SR.get_Overflow_TimeSpanTooLong, 2: newobj System.ArgumentOutOfRangeException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowArgumentOutOfRange_Year() | System.ArgumentOutOfRangeException | 0: ldc.i4.s 31, 1: ldc.i4.5, 2: call System.ThrowHelper.GetArgumentOutOfRangeException, 3: throw | -| System.Void System.ThrowHelper.ThrowArraySegmentCtorValidationFailedExceptions(System.Array,System.Int32,System.Int32) | System.Exception | 0: ldarg.0, 1: ldarg.1, 2: ldarg.2, 3: call System.ThrowHelper.GetArraySegmentCtorValidationFailedException, 4: throw | -| System.Void System.ThrowHelper.ThrowArrayTypeMismatchException() | System.ArrayTypeMismatchException | 0: newobj System.ArrayTypeMismatchException..ctor, 1: throw | -| System.Void System.ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count() | System.ArgumentOutOfRangeException | 0: ldc.i4.s 31, 1: ldc.i4.4, 2: call System.ThrowHelper.GetArgumentOutOfRangeException, 3: throw | -| System.Void System.ThrowHelper.ThrowEndOfFileException() | System.Exception | 0: call System.ThrowHelper.CreateEndOfFileException, 1: throw | -| System.Void System.ThrowHelper.ThrowFormatException_BadBoolean(System.ReadOnlySpan) | System.FormatException | 0: call System.SR.get_Format_BadBoolean, 1: ldarg.0, 2: newobj System.String..ctor, 3: call System.SR.Format, 4: newobj System.FormatException..ctor, 5: throw | -| System.Void System.ThrowHelper.ThrowFormatException_BadFormatSpecifier() | System.FormatException | 0: call System.SR.get_Argument_BadFormatSpecifier, 1: newobj System.FormatException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowFormatException_NeedSingleChar() | System.FormatException | 0: call System.SR.get_Format_NeedSingleChar, 1: newobj System.FormatException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowFormatIndexOutOfRange() | System.FormatException | 0: call System.SR.get_Format_IndexOutOfRange, 1: newobj System.FormatException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowFormatInvalidString() | System.FormatException | 0: call System.SR.get_Format_InvalidString, 1: newobj System.FormatException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException() | System.ArgumentOutOfRangeException | 0: ldc.i4.s 31, 1: ldc.i4.s 31, 2: call System.ThrowHelper.GetArgumentOutOfRangeException, 3: throw | -| System.Void System.ThrowHelper.ThrowIndexOutOfRangeException() | System.IndexOutOfRangeException | 0: newobj System.IndexOutOfRangeException..ctor, 1: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException() | System.InvalidOperationException | 0: newobj System.InvalidOperationException..ctor, 1: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_ConcurrentOperationsNotSupported() | System.InvalidOperationException | 0: call System.SR.get_InvalidOperation_ConcurrentOperationsNotSupported, 1: newobj System.InvalidOperationException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_EnumCurrent(System.Int32) | System.InvalidOperationException | 0: ldarg.0, 1: call System.ThrowHelper.GetInvalidOperationException_EnumCurrent, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_HandleIsNotInitialized() | System.InvalidOperationException | 0: call System.SR.get_InvalidOperation_HandleIsNotInitialized, 1: newobj System.InvalidOperationException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_HandleIsNotPinned() | System.InvalidOperationException | 0: call System.SR.get_InvalidOperation_HandleIsNotPinned, 1: newobj System.InvalidOperationException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumEnded() | System.InvalidOperationException | 0: call System.SR.get_InvalidOperation_EnumEnded, 1: newobj System.InvalidOperationException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion() | System.InvalidOperationException | 0: call System.SR.get_InvalidOperation_EnumFailedVersion, 1: newobj System.InvalidOperationException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumNotStarted() | System.InvalidOperationException | 0: call System.SR.get_InvalidOperation_EnumNotStarted, 1: newobj System.InvalidOperationException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen() | System.InvalidOperationException | 0: call System.SR.get_InvalidOperation_EnumOpCantHappen, 1: newobj System.InvalidOperationException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_NoValue() | System.InvalidOperationException | 0: call System.SR.get_InvalidOperation_NoValue, 1: newobj System.InvalidOperationException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidOperationException_InvalidUtf8() | System.InvalidOperationException | 0: call System.SR.get_InvalidOperation_InvalidUtf8, 1: newobj System.InvalidOperationException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(System.Type) | System.ArgumentException | 0: call System.SR.get_Argument_InvalidTypeWithPointersNotSupported, 1: ldarg.0, 2: call System.SR.Format, 3: newobj System.ArgumentException..ctor, 4: throw | -| System.Void System.ThrowHelper.ThrowKeyNotFoundException`1(!0) | System.Collections.Generic.KeyNotFoundException | 0: ldarg.0, 1: box, 2: call System.ThrowHelper.GetKeyNotFoundException, 3: throw | -| System.Void System.ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum() | System.ArgumentOutOfRangeException | 0: ldc.i4.s 31, 1: ldc.i4.s 31, 2: call System.ThrowHelper.GetArgumentOutOfRangeException, 3: throw | -| System.Void System.ThrowHelper.ThrowNotSupportedException() | System.NotSupportedException | 0: newobj System.NotSupportedException..ctor, 1: throw | -| System.Void System.ThrowHelper.ThrowNotSupportedException_UnreadableStream() | System.NotSupportedException | 0: call System.SR.get_NotSupported_UnreadableStream, 1: newobj System.NotSupportedException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowNotSupportedException_UnseekableStream() | System.NotSupportedException | 0: call System.SR.get_NotSupported_UnseekableStream, 1: newobj System.NotSupportedException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowNotSupportedException_UnwritableStream() | System.NotSupportedException | 0: call System.SR.get_NotSupported_UnwritableStream, 1: newobj System.NotSupportedException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowObjectDisposedException(System.Object) | System.ObjectDisposedException | 0: ldarg.0, 1: brtrue.s 4:, 2: ldnull, 3: br.s 7:, 4: ldarg.0, 5: call System.Object.GetType, 6: callvirt System.Type.get_FullName, 7: newobj System.ObjectDisposedException..ctor, 8: throw | -| System.Void System.ThrowHelper.ThrowObjectDisposedException(System.Type) | System.ObjectDisposedException | 0: ldarg.0, 1: brtrue.s 4:, 2: ldnull, 3: br.s 6:, 4: ldarg.0, 5: callvirt System.Type.get_FullName, 6: newobj System.ObjectDisposedException..ctor, 7: throw | -| System.Void System.ThrowHelper.ThrowObjectDisposedException_FileClosed() | System.ObjectDisposedException | 0: ldnull, 1: call System.SR.get_ObjectDisposed_FileClosed, 2: newobj System.ObjectDisposedException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowObjectDisposedException_StreamClosed(System.String) | System.ObjectDisposedException | 0: ldarg.0, 1: call System.SR.get_ObjectDisposed_StreamClosed, 2: newobj System.ObjectDisposedException..ctor, 3: throw | -| System.Void System.ThrowHelper.ThrowOutOfMemoryException() | System.OutOfMemoryException | 0: newobj System.OutOfMemoryException..ctor, 1: throw | -| System.Void System.ThrowHelper.ThrowOutOfMemoryException_StringTooLong() | System.OutOfMemoryException | 0: call System.SR.get_OutOfMemory_StringTooLong, 1: newobj System.OutOfMemoryException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowOverflowException() | System.OverflowException | 0: newobj System.OverflowException..ctor, 1: throw | -| System.Void System.ThrowHelper.ThrowOverflowException_TimeSpanTooLong() | System.OverflowException | 0: call System.SR.get_Overflow_TimeSpanTooLong, 1: newobj System.OverflowException..ctor, 2: throw | -| System.Void System.ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_IndexMustBeLess() | System.ArgumentOutOfRangeException | 0: ldc.i4.8, 1: ldc.i4.1, 2: call System.ThrowHelper.GetArgumentOutOfRangeException, 3: throw | -| System.Void System.ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_IndexMustBeLessOrEqual() | System.ArgumentOutOfRangeException | 0: ldc.i4.8, 1: ldc.i4.0, 2: call System.ThrowHelper.GetArgumentOutOfRangeException, 3: throw | -| System.Void System.ThrowHelper.ThrowUnexpectedStateForKnownCallback(System.Object) | System.ArgumentOutOfRangeException | 0: ldstr "state", 1: ldarg.0, 2: call System.SR.get_Argument_UnexpectedStateForKnownCallback, 3: newobj System.ArgumentOutOfRangeException..ctor, 4: throw | -| System.Void System.ThrowHelper.ThrowValueArgumentOutOfRange_NeedNonNegNumException() | System.ArgumentOutOfRangeException | 0: ldc.i4.7, 1: ldc.i4.s 31, 2: call System.ThrowHelper.GetArgumentOutOfRangeException, 3: throw | -| System.Void System.ThrowHelper.ThrowWrongKeyTypeArgumentException`1(!0,System.Type) | System.ArgumentException | 0: ldarg.0, 1: box, 2: ldarg.1, 3: call System.ThrowHelper.GetWrongKeyTypeArgumentException, 4: throw | -| System.Void System.ThrowHelper.ThrowWrongValueTypeArgumentException`1(!0,System.Type) | System.ArgumentException | 0: ldarg.0, 1: box, 2: ldarg.1, 3: call System.ThrowHelper.GetWrongValueTypeArgumentException, 4: throw | diff --git a/csharp/ql/test/library-tests/cil/dataflow/CallableReturns.ql b/csharp/ql/test/library-tests/cil/dataflow/CallableReturns.ql deleted file mode 100644 index 8e32dd08514..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/CallableReturns.ql +++ /dev/null @@ -1,39 +0,0 @@ -import cil -import semmle.code.cil.CallableReturns - -predicate relevantMethod(CIL::Method m) { - m.getName() = "GetEncoder" and not m.getDeclaringType().getName() = "OSEncoding" - or - m.getName() = "get_Item" - or - m.getDeclaringType().getName() = "ThrowHelper" and - not m.getParameter(_).getType().getName() = "ExceptionResource" - or - m.getLocation().(CIL::Assembly).getName().matches("DataFlow%") -} - -// Check that the assembly hasn't been marked as a stub. -query predicate stubs(string str) { - exists(CIL::Assembly asm | CIL::assemblyIsStub(asm) | str = asm.toString()) -} - -query predicate alwaysNull(string s, string d) { - exists(CIL::Method m | - alwaysNullMethod(m) and - s = m.toStringWithTypes() and - relevantMethod(m) and - d = m.getImplementation().getDisassembly() - ) -} - -query predicate alwaysNonNull(string s) { - exists(CIL::Method m | alwaysNotNullMethod(m) and s = m.toStringWithTypes() and relevantMethod(m)) -} - -query predicate alwaysThrows(string s, string ex, string d) { - exists(CIL::Method m, CIL::Type t | alwaysThrowsException(m, t) and relevantMethod(m) | - s = m.toStringWithTypes() and - ex = t.toStringWithTypes() and - d = m.getImplementation().getDisassembly() - ) -} diff --git a/csharp/ql/test/library-tests/cil/dataflow/ControlFlow.expected b/csharp/ql/test/library-tests/cil/dataflow/ControlFlow.expected deleted file mode 100644 index a21226e8376..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/ControlFlow.expected +++ /dev/null @@ -1,2 +0,0 @@ -| dataflow.cs:55:9:55:18 | call to method DeadCode | -| dataflow.cs:63:9:63:18 | call to method DeadCode | diff --git a/csharp/ql/test/library-tests/cil/dataflow/ControlFlow.ql b/csharp/ql/test/library-tests/cil/dataflow/ControlFlow.ql deleted file mode 100644 index 9b187f66f7a..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/ControlFlow.ql +++ /dev/null @@ -1,6 +0,0 @@ -import csharp - -query predicate deadCode(MethodCall c) { - c.getTarget().getName() = "DeadCode" and - not exists(ControlFlow::Node node | node.getAstNode() = c) -} diff --git a/csharp/ql/test/library-tests/cil/dataflow/DataFlow.cs_ b/csharp/ql/test/library-tests/cil/dataflow/DataFlow.cs_ deleted file mode 100644 index 1f6128f353a..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/DataFlow.cs_ +++ /dev/null @@ -1,178 +0,0 @@ -// Generate DataFlow.dll: `csc /o /target:library DataFlow.cs_ /out:DataFlow.dll` - -using System; - -namespace Dataflow -{ - public class NullMethods - { - public object ReturnsNull() => null; - - public object ReturnsNull2() - { - var x = ReturnsNull(); - return x; - } - - // Does not necessarily return null because of virtual method call. - public object NotReturnsNull() => VirtualReturnsNull(); - - public object ReturnsNullIndirect() => ReturnsNull(); - - public virtual object VirtualReturnsNull() => null; - - public object NullProperty { get => null; } - - public virtual object VirtualNullProperty { get => null; } - } - - public class NonNullMethods - { - public object ReturnsNonNull() => new object(); - - public object ReturnsNonNull2() - { - var x = ReturnsNonNull(); - return x; - } - - public object ReturnsNonNullIndirect() => ReturnsNonNull(); - - public object NonNullProperty { get => 1; } - - public string NonNullProperty2 { get => "not null"; } - - public virtual object VirtualNonNull { get => "not null"; } - - public bool cond = false; - - public string MaybeNull() - { - if (cond) - return null; - else - return "not null"; - } - - public string MaybeNull2() - { - return cond ? null : "not null"; - } - - public virtual object VirtualNonNullProperty { get => "non null"; } - } - - public class ThrowingMethods - { - public static object AlwaysThrows() => throw new InvalidOperationException(); - - public object AlwaysThrowsIndirect() => AlwaysThrows(); - - public virtual object VirtualThrows() => throw new Exception(); - - public object ThrowProperty { get => throw new Exception(); } - public virtual object VirtualThrowProperty { get => throw new Exception(); } - - } - - public class DataFlow - { - public object Taint1(object x) => x; - - public object Taint2(object x) => Taint5(x); - - public string Taint3(string s) - { - var x = s; - Console.WriteLine(s); - return x; - } - - public object Taint5(object x) => Taint6(x); - - private object Taint6(object x) => x; - } - - public class TaintFlow - { - public string Taint1(string a, string b) => a + b; - - public int Taint2(int a, int b) => a + b; - - public int Taint3(int a) => -a; - - public string TaintIndirect(string a, string b) => Taint1(a, b); - } - - public class Properties - { - public int TrivialProperty1 { get; set; } - - int field; - - public int TrivialProperty2 - { - get => field; - set { field = value; } - } - } - - public class ThisAssemblyIsNotAStub - { - public void F() - { - // Ensure that the assembly isn't tagged as a stub - // Need to bump the average instruction count. - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - Console.WriteLine("This is not a stub assembly"); - } - } -} diff --git a/csharp/ql/test/library-tests/cil/dataflow/DataFlow.dll b/csharp/ql/test/library-tests/cil/dataflow/DataFlow.dll deleted file mode 100755 index 2f35b3a3ff2..00000000000 Binary files a/csharp/ql/test/library-tests/cil/dataflow/DataFlow.dll and /dev/null differ diff --git a/csharp/ql/test/library-tests/cil/dataflow/DataFlow.expected b/csharp/ql/test/library-tests/cil/dataflow/DataFlow.expected deleted file mode 100644 index 944815673cd..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/DataFlow.expected +++ /dev/null @@ -1,146 +0,0 @@ -edges -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | provenance | | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | provenance | | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint2 : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | provenance | | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint3 : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | provenance | | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint5 : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | provenance | | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint6 : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | provenance | | -| DataFlow.dll:0:0:0:0 | Parameter 1 of TaintIndirect : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | provenance | | -| DataFlow.dll:0:0:0:0 | Parameter 2 of Taint1 : String | DataFlow.dll:0:0:0:0 | ldarg.2 : String | provenance | | -| DataFlow.dll:0:0:0:0 | Parameter 2 of TaintIndirect : String | DataFlow.dll:0:0:0:0 | ldarg.2 : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint5 : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint6 : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | call : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | call : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | call : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | call : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.2 : String | DataFlow.dll:0:0:0:0 | Parameter 2 of Taint1 : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.2 : String | DataFlow.dll:0:0:0:0 | call : String | provenance | | -| DataFlow.dll:0:0:0:0 | ldarg.2 : String | DataFlow.dll:0:0:0:0 | call : String | provenance | | -| dataflow.cs:16:18:16:26 | "tainted" : String | dataflow.cs:16:18:16:37 | call to method ToString | provenance | | -| dataflow.cs:18:27:18:27 | 2 : Int32 | dataflow.cs:18:18:18:31 | call to method Max | provenance | | -| dataflow.cs:18:30:18:30 | 3 : Int32 | dataflow.cs:18:18:18:31 | call to method Max | provenance | | -| dataflow.cs:19:29:19:31 | 0.5 : Double | dataflow.cs:19:18:19:32 | call to method Round | provenance | | -| dataflow.cs:20:45:20:53 | "tainted" : String | dataflow.cs:20:18:20:54 | call to method GetFullPath | provenance | | -| dataflow.cs:27:44:27:46 | 1 : Double | dataflow.cs:27:18:27:52 | call to method IEEERemainder | provenance | | -| dataflow.cs:27:49:27:51 | 2 : Double | dataflow.cs:27:18:27:52 | call to method IEEERemainder | provenance | | -| dataflow.cs:38:34:38:37 | "d1" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | provenance | | -| dataflow.cs:38:34:38:37 | "d1" : String | dataflow.cs:38:18:38:38 | call to method Taint1 | provenance | | -| dataflow.cs:39:34:39:37 | "d2" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint2 : String | provenance | | -| dataflow.cs:39:34:39:37 | "d2" : String | dataflow.cs:39:18:39:38 | call to method Taint2 | provenance | | -| dataflow.cs:40:34:40:37 | "d3" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint3 : String | provenance | | -| dataflow.cs:40:34:40:37 | "d3" : String | dataflow.cs:40:18:40:38 | call to method Taint3 | provenance | | -| dataflow.cs:44:28:44:32 | "t1a" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | provenance | | -| dataflow.cs:44:28:44:32 | "t1a" : String | dataflow.cs:44:18:44:40 | call to method Taint1 | provenance | | -| dataflow.cs:44:35:44:39 | "t1b" : String | DataFlow.dll:0:0:0:0 | Parameter 2 of Taint1 : String | provenance | | -| dataflow.cs:44:35:44:39 | "t1b" : String | dataflow.cs:44:18:44:40 | call to method Taint1 | provenance | | -| dataflow.cs:47:35:47:38 | "t6" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of TaintIndirect : String | provenance | | -| dataflow.cs:47:35:47:38 | "t6" : String | dataflow.cs:47:18:47:45 | call to method TaintIndirect | provenance | | -| dataflow.cs:47:41:47:44 | "t6" : String | DataFlow.dll:0:0:0:0 | Parameter 2 of TaintIndirect : String | provenance | | -| dataflow.cs:47:41:47:44 | "t6" : String | dataflow.cs:47:18:47:45 | call to method TaintIndirect | provenance | | -| dataflow.cs:72:21:72:34 | call to method NullFunction : null | dataflow.cs:72:21:72:52 | ... ?? ... | provenance | | -| dataflow.cs:72:39:72:52 | call to method IndirectNull : null | dataflow.cs:72:21:72:52 | ... ?? ... | provenance | | -| dataflow.cs:87:31:87:44 | call to method NullFunction : null | dataflow.cs:87:24:87:51 | ... ? ... : ... | provenance | | -| dataflow.cs:100:30:100:33 | null : null | dataflow.cs:72:39:72:52 | call to method IndirectNull : null | provenance | | -| dataflow.cs:100:30:100:33 | null : null | dataflow.cs:106:20:106:33 | call to method IndirectNull | provenance | | -| dataflow.cs:100:30:100:33 | null : null | dataflow.cs:106:20:106:33 | call to method IndirectNull : null | provenance | | -| dataflow.cs:106:16:106:16 | access to local variable x : null | dataflow.cs:108:16:108:16 | access to local variable x : null | provenance | | -| dataflow.cs:106:20:106:33 | call to method IndirectNull : null | dataflow.cs:106:16:106:16 | access to local variable x : null | provenance | | -| dataflow.cs:107:19:107:19 | access to local variable x : null | dataflow.cs:108:16:108:16 | access to local variable x : null | provenance | | -| dataflow.cs:107:23:107:26 | null : null | dataflow.cs:107:19:107:19 | access to local variable x : null | provenance | | -| dataflow.cs:108:16:108:16 | access to local variable x : null | dataflow.cs:72:21:72:34 | call to method NullFunction : null | provenance | | -| dataflow.cs:108:16:108:16 | access to local variable x : null | dataflow.cs:87:31:87:44 | call to method NullFunction : null | provenance | | -nodes -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | semmle.label | Parameter 1 of Taint1 : String | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | semmle.label | Parameter 1 of Taint1 : String | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint2 : String | semmle.label | Parameter 1 of Taint2 : String | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint3 : String | semmle.label | Parameter 1 of Taint3 : String | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint5 : String | semmle.label | Parameter 1 of Taint5 : String | -| DataFlow.dll:0:0:0:0 | Parameter 1 of Taint6 : String | semmle.label | Parameter 1 of Taint6 : String | -| DataFlow.dll:0:0:0:0 | Parameter 1 of TaintIndirect : String | semmle.label | Parameter 1 of TaintIndirect : String | -| DataFlow.dll:0:0:0:0 | Parameter 2 of Taint1 : String | semmle.label | Parameter 2 of Taint1 : String | -| DataFlow.dll:0:0:0:0 | Parameter 2 of TaintIndirect : String | semmle.label | Parameter 2 of TaintIndirect : String | -| DataFlow.dll:0:0:0:0 | call : String | semmle.label | call : String | -| DataFlow.dll:0:0:0:0 | call : String | semmle.label | call : String | -| DataFlow.dll:0:0:0:0 | call : String | semmle.label | call : String | -| DataFlow.dll:0:0:0:0 | call : String | semmle.label | call : String | -| DataFlow.dll:0:0:0:0 | call : String | semmle.label | call : String | -| DataFlow.dll:0:0:0:0 | call : String | semmle.label | call : String | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | semmle.label | ldarg.1 : String | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | semmle.label | ldarg.1 : String | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | semmle.label | ldarg.1 : String | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | semmle.label | ldarg.1 : String | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | semmle.label | ldarg.1 : String | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | semmle.label | ldarg.1 : String | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | semmle.label | ldarg.1 : String | -| DataFlow.dll:0:0:0:0 | ldarg.2 : String | semmle.label | ldarg.2 : String | -| DataFlow.dll:0:0:0:0 | ldarg.2 : String | semmle.label | ldarg.2 : String | -| dataflow.cs:16:18:16:26 | "tainted" : String | semmle.label | "tainted" : String | -| dataflow.cs:16:18:16:37 | call to method ToString | semmle.label | call to method ToString | -| dataflow.cs:18:18:18:31 | call to method Max | semmle.label | call to method Max | -| dataflow.cs:18:27:18:27 | 2 : Int32 | semmle.label | 2 : Int32 | -| dataflow.cs:18:30:18:30 | 3 : Int32 | semmle.label | 3 : Int32 | -| dataflow.cs:19:18:19:32 | call to method Round | semmle.label | call to method Round | -| dataflow.cs:19:29:19:31 | 0.5 : Double | semmle.label | 0.5 : Double | -| dataflow.cs:20:18:20:54 | call to method GetFullPath | semmle.label | call to method GetFullPath | -| dataflow.cs:20:45:20:53 | "tainted" : String | semmle.label | "tainted" : String | -| dataflow.cs:27:18:27:52 | call to method IEEERemainder | semmle.label | call to method IEEERemainder | -| dataflow.cs:27:44:27:46 | 1 : Double | semmle.label | 1 : Double | -| dataflow.cs:27:49:27:51 | 2 : Double | semmle.label | 2 : Double | -| dataflow.cs:38:18:38:38 | call to method Taint1 | semmle.label | call to method Taint1 | -| dataflow.cs:38:34:38:37 | "d1" : String | semmle.label | "d1" : String | -| dataflow.cs:39:18:39:38 | call to method Taint2 | semmle.label | call to method Taint2 | -| dataflow.cs:39:34:39:37 | "d2" : String | semmle.label | "d2" : String | -| dataflow.cs:40:18:40:38 | call to method Taint3 | semmle.label | call to method Taint3 | -| dataflow.cs:40:34:40:37 | "d3" : String | semmle.label | "d3" : String | -| dataflow.cs:44:18:44:40 | call to method Taint1 | semmle.label | call to method Taint1 | -| dataflow.cs:44:28:44:32 | "t1a" : String | semmle.label | "t1a" : String | -| dataflow.cs:44:35:44:39 | "t1b" : String | semmle.label | "t1b" : String | -| dataflow.cs:47:18:47:45 | call to method TaintIndirect | semmle.label | call to method TaintIndirect | -| dataflow.cs:47:35:47:38 | "t6" : String | semmle.label | "t6" : String | -| dataflow.cs:47:41:47:44 | "t6" : String | semmle.label | "t6" : String | -| dataflow.cs:72:21:72:34 | call to method NullFunction : null | semmle.label | call to method NullFunction : null | -| dataflow.cs:72:21:72:52 | ... ?? ... | semmle.label | ... ?? ... | -| dataflow.cs:72:39:72:52 | call to method IndirectNull : null | semmle.label | call to method IndirectNull : null | -| dataflow.cs:87:24:87:51 | ... ? ... : ... | semmle.label | ... ? ... : ... | -| dataflow.cs:87:31:87:44 | call to method NullFunction : null | semmle.label | call to method NullFunction : null | -| dataflow.cs:100:30:100:33 | null : null | semmle.label | null : null | -| dataflow.cs:106:16:106:16 | access to local variable x : null | semmle.label | access to local variable x : null | -| dataflow.cs:106:20:106:33 | call to method IndirectNull | semmle.label | call to method IndirectNull | -| dataflow.cs:106:20:106:33 | call to method IndirectNull : null | semmle.label | call to method IndirectNull : null | -| dataflow.cs:107:19:107:19 | access to local variable x : null | semmle.label | access to local variable x : null | -| dataflow.cs:107:23:107:26 | null : null | semmle.label | null : null | -| dataflow.cs:108:16:108:16 | access to local variable x : null | semmle.label | access to local variable x : null | -subpaths -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | DataFlow.dll:0:0:0:0 | call : String | DataFlow.dll:0:0:0:0 | call : String | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint5 : String | DataFlow.dll:0:0:0:0 | call : String | DataFlow.dll:0:0:0:0 | call : String | -| DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint6 : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | DataFlow.dll:0:0:0:0 | call : String | -| DataFlow.dll:0:0:0:0 | ldarg.2 : String | DataFlow.dll:0:0:0:0 | Parameter 2 of Taint1 : String | DataFlow.dll:0:0:0:0 | call : String | DataFlow.dll:0:0:0:0 | call : String | -| dataflow.cs:38:34:38:37 | "d1" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | dataflow.cs:38:18:38:38 | call to method Taint1 | -| dataflow.cs:39:34:39:37 | "d2" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint2 : String | DataFlow.dll:0:0:0:0 | call : String | dataflow.cs:39:18:39:38 | call to method Taint2 | -| dataflow.cs:40:34:40:37 | "d3" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint3 : String | DataFlow.dll:0:0:0:0 | ldarg.1 : String | dataflow.cs:40:18:40:38 | call to method Taint3 | -| dataflow.cs:44:28:44:32 | "t1a" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of Taint1 : String | DataFlow.dll:0:0:0:0 | call : String | dataflow.cs:44:18:44:40 | call to method Taint1 | -| dataflow.cs:44:35:44:39 | "t1b" : String | DataFlow.dll:0:0:0:0 | Parameter 2 of Taint1 : String | DataFlow.dll:0:0:0:0 | call : String | dataflow.cs:44:18:44:40 | call to method Taint1 | -| dataflow.cs:47:35:47:38 | "t6" : String | DataFlow.dll:0:0:0:0 | Parameter 1 of TaintIndirect : String | DataFlow.dll:0:0:0:0 | call : String | dataflow.cs:47:18:47:45 | call to method TaintIndirect | -| dataflow.cs:47:41:47:44 | "t6" : String | DataFlow.dll:0:0:0:0 | Parameter 2 of TaintIndirect : String | DataFlow.dll:0:0:0:0 | call : String | dataflow.cs:47:18:47:45 | call to method TaintIndirect | -#select -| dataflow.cs:16:18:16:26 | "tainted" : String | dataflow.cs:16:18:16:37 | call to method ToString | dataflow.cs:16:18:16:37 | call to method ToString | $@ | dataflow.cs:16:18:16:37 | call to method ToString | call to method ToString | -| dataflow.cs:18:27:18:27 | 2 : Int32 | dataflow.cs:18:18:18:31 | call to method Max | dataflow.cs:18:18:18:31 | call to method Max | $@ | dataflow.cs:18:18:18:31 | call to method Max | call to method Max | -| dataflow.cs:18:30:18:30 | 3 : Int32 | dataflow.cs:18:18:18:31 | call to method Max | dataflow.cs:18:18:18:31 | call to method Max | $@ | dataflow.cs:18:18:18:31 | call to method Max | call to method Max | -| dataflow.cs:19:29:19:31 | 0.5 : Double | dataflow.cs:19:18:19:32 | call to method Round | dataflow.cs:19:18:19:32 | call to method Round | $@ | dataflow.cs:19:18:19:32 | call to method Round | call to method Round | -| dataflow.cs:20:45:20:53 | "tainted" : String | dataflow.cs:20:18:20:54 | call to method GetFullPath | dataflow.cs:20:18:20:54 | call to method GetFullPath | $@ | dataflow.cs:20:18:20:54 | call to method GetFullPath | call to method GetFullPath | -| dataflow.cs:27:44:27:46 | 1 : Double | dataflow.cs:27:18:27:52 | call to method IEEERemainder | dataflow.cs:27:18:27:52 | call to method IEEERemainder | $@ | dataflow.cs:27:18:27:52 | call to method IEEERemainder | call to method IEEERemainder | -| dataflow.cs:27:49:27:51 | 2 : Double | dataflow.cs:27:18:27:52 | call to method IEEERemainder | dataflow.cs:27:18:27:52 | call to method IEEERemainder | $@ | dataflow.cs:27:18:27:52 | call to method IEEERemainder | call to method IEEERemainder | -| dataflow.cs:38:34:38:37 | "d1" : String | dataflow.cs:38:18:38:38 | call to method Taint1 | dataflow.cs:38:18:38:38 | call to method Taint1 | $@ | dataflow.cs:38:18:38:38 | call to method Taint1 | call to method Taint1 | -| dataflow.cs:39:34:39:37 | "d2" : String | dataflow.cs:39:18:39:38 | call to method Taint2 | dataflow.cs:39:18:39:38 | call to method Taint2 | $@ | dataflow.cs:39:18:39:38 | call to method Taint2 | call to method Taint2 | -| dataflow.cs:40:34:40:37 | "d3" : String | dataflow.cs:40:18:40:38 | call to method Taint3 | dataflow.cs:40:18:40:38 | call to method Taint3 | $@ | dataflow.cs:40:18:40:38 | call to method Taint3 | call to method Taint3 | -| dataflow.cs:44:28:44:32 | "t1a" : String | dataflow.cs:44:18:44:40 | call to method Taint1 | dataflow.cs:44:18:44:40 | call to method Taint1 | $@ | dataflow.cs:44:18:44:40 | call to method Taint1 | call to method Taint1 | -| dataflow.cs:44:35:44:39 | "t1b" : String | dataflow.cs:44:18:44:40 | call to method Taint1 | dataflow.cs:44:18:44:40 | call to method Taint1 | $@ | dataflow.cs:44:18:44:40 | call to method Taint1 | call to method Taint1 | -| dataflow.cs:47:35:47:38 | "t6" : String | dataflow.cs:47:18:47:45 | call to method TaintIndirect | dataflow.cs:47:18:47:45 | call to method TaintIndirect | $@ | dataflow.cs:47:18:47:45 | call to method TaintIndirect | call to method TaintIndirect | -| dataflow.cs:47:41:47:44 | "t6" : String | dataflow.cs:47:18:47:45 | call to method TaintIndirect | dataflow.cs:47:18:47:45 | call to method TaintIndirect | $@ | dataflow.cs:47:18:47:45 | call to method TaintIndirect | call to method TaintIndirect | -| dataflow.cs:100:30:100:33 | null : null | dataflow.cs:72:21:72:52 | ... ?? ... | dataflow.cs:72:21:72:52 | ... ?? ... | $@ | dataflow.cs:72:21:72:52 | ... ?? ... | ... ?? ... | -| dataflow.cs:100:30:100:33 | null : null | dataflow.cs:87:24:87:51 | ... ? ... : ... | dataflow.cs:87:24:87:51 | ... ? ... : ... | $@ | dataflow.cs:87:24:87:51 | ... ? ... : ... | ... ? ... : ... | -| dataflow.cs:100:30:100:33 | null : null | dataflow.cs:106:20:106:33 | call to method IndirectNull | dataflow.cs:106:20:106:33 | call to method IndirectNull | $@ | dataflow.cs:106:20:106:33 | call to method IndirectNull | call to method IndirectNull | -| dataflow.cs:107:23:107:26 | null : null | dataflow.cs:72:21:72:52 | ... ?? ... | dataflow.cs:72:21:72:52 | ... ?? ... | $@ | dataflow.cs:72:21:72:52 | ... ?? ... | ... ?? ... | -| dataflow.cs:107:23:107:26 | null : null | dataflow.cs:87:24:87:51 | ... ? ... : ... | dataflow.cs:87:24:87:51 | ... ? ... : ... | $@ | dataflow.cs:87:24:87:51 | ... ? ... : ... | ... ? ... : ... | diff --git a/csharp/ql/test/library-tests/cil/dataflow/DataFlow.ql b/csharp/ql/test/library-tests/cil/dataflow/DataFlow.ql deleted file mode 100644 index 609717b8340..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/DataFlow.ql +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @kind path-problem - */ - -import csharp -import Flow::PathGraph - -private predicate relevantPathNode(Flow::PathNode n) { - exists(File f | f = n.getNode().getLocation().getFile() | - f.fromSource() - or - f.getBaseName() = "DataFlow.dll" - ) -} - -query predicate edges(Flow::PathNode a, Flow::PathNode b, string key, string val) { - Flow::PathGraph::edges(a, b, key, val) and - relevantPathNode(a) and - relevantPathNode(b) -} - -query predicate nodes(Flow::PathNode n, string key, string val) { - Flow::PathGraph::nodes(n, key, val) and - relevantPathNode(n) -} - -query predicate subpaths( - Flow::PathNode arg, Flow::PathNode par, Flow::PathNode ret, Flow::PathNode out -) { - Flow::PathGraph::subpaths(arg, par, ret, out) and - relevantPathNode(arg) and - relevantPathNode(par) and - relevantPathNode(ret) and - relevantPathNode(out) -} - -module FlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source.asExpr() instanceof Literal } - - predicate isSink(DataFlow::Node sink) { - exists(LocalVariable decl | sink.asExpr() = decl.getInitializer()) - } -} - -module Flow = DataFlow::Global; - -from Flow::PathNode source, Flow::PathNode sink -where Flow::flowPath(source, sink) -select source, sink, sink, "$@", sink, sink.toString() diff --git a/csharp/ql/test/library-tests/cil/dataflow/DataFlowUnoptimized.cs_ b/csharp/ql/test/library-tests/cil/dataflow/DataFlowUnoptimized.cs_ deleted file mode 100644 index 7ef1e6fee18..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/DataFlowUnoptimized.cs_ +++ /dev/null @@ -1,24 +0,0 @@ -// Generate DataFlowUnoptimized.dll: `csc /target:library DataFlowUnoptimized.cs_ /out:DataFlowUnoptimized.dll` - -using System; - -namespace DataflowUnoptimized -{ - public class MaybeNullMethods - { - public bool cond = false; - - public string MaybeNull() - { - if (cond) - return null; - else - return "not null"; - } - - public string MaybeNull2() - { - return cond ? null : "not null"; - } - } -} diff --git a/csharp/ql/test/library-tests/cil/dataflow/DataFlowUnoptimized.dll b/csharp/ql/test/library-tests/cil/dataflow/DataFlowUnoptimized.dll deleted file mode 100644 index b290ece7065..00000000000 Binary files a/csharp/ql/test/library-tests/cil/dataflow/DataFlowUnoptimized.dll and /dev/null differ diff --git a/csharp/ql/test/library-tests/cil/dataflow/Nullness.expected b/csharp/ql/test/library-tests/cil/dataflow/Nullness.expected deleted file mode 100644 index e434ebf9c48..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/Nullness.expected +++ /dev/null @@ -1,42 +0,0 @@ -alwaysNull -| dataflow.cs:68:21:68:35 | default(...) | -| dataflow.cs:72:21:72:34 | call to method NullFunction | -| dataflow.cs:72:21:72:52 | ... ?? ... | -| dataflow.cs:72:39:72:52 | call to method IndirectNull | -| dataflow.cs:76:21:76:45 | call to method ReturnsNull | -| dataflow.cs:77:21:77:46 | call to method ReturnsNull2 | -| dataflow.cs:78:21:78:44 | access to property NullProperty | -| dataflow.cs:87:31:87:44 | call to method NullFunction | -alwaysNotNull -| dataflow.cs:69:13:69:20 | access to local variable nonNull1 | -| dataflow.cs:69:13:69:35 | Int32 nonNull1 = ... | -| dataflow.cs:69:24:69:35 | default(...) | -| dataflow.cs:69:32:69:34 | access to type Int32 | -| dataflow.cs:70:27:70:30 | this access | -| dataflow.cs:70:27:70:40 | call to method GetType | -| dataflow.cs:71:30:71:33 | true | -| dataflow.cs:71:30:71:44 | call to method ToString | -| dataflow.cs:72:21:72:34 | this access | -| dataflow.cs:72:39:72:52 | this access | -| dataflow.cs:75:27:75:52 | object creation of type NullMethods | -| dataflow.cs:76:21:76:31 | access to local variable nullMethods | -| dataflow.cs:77:21:77:31 | access to local variable nullMethods | -| dataflow.cs:78:21:78:31 | access to local variable nullMethods | -| dataflow.cs:81:23:81:51 | object creation of type NonNullMethods | -| dataflow.cs:82:24:82:30 | access to local variable nonNull | -| dataflow.cs:82:24:82:47 | call to method ReturnsNonNull | -| dataflow.cs:83:24:83:30 | access to local variable nonNull | -| dataflow.cs:83:24:83:55 | call to method ReturnsNonNullIndirect | -| dataflow.cs:84:24:84:30 | access to local variable nonNull | -| dataflow.cs:87:24:87:27 | access to field cond | -| dataflow.cs:87:24:87:27 | this access | -| dataflow.cs:87:31:87:44 | this access | -| dataflow.cs:87:48:87:51 | this access | -| dataflow.cs:88:24:88:34 | access to local variable nullMethods | -| dataflow.cs:89:24:89:34 | access to local variable nullMethods | -| dataflow.cs:90:26:90:32 | access to local variable nonNull | -| dataflow.cs:93:25:93:31 | access to local variable nonNull | -| dataflow.cs:94:26:94:32 | access to local variable nonNull | -| dataflow.cs:95:32:95:73 | object creation of type MaybeNullMethods | -| dataflow.cs:96:21:96:36 | access to local variable maybeNullMethods | -| dataflow.cs:97:22:97:37 | access to local variable maybeNullMethods | diff --git a/csharp/ql/test/library-tests/cil/dataflow/Nullness.ql b/csharp/ql/test/library-tests/cil/dataflow/Nullness.ql deleted file mode 100644 index bf29ab5d9ee..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/Nullness.ql +++ /dev/null @@ -1,10 +0,0 @@ -import csharp -import semmle.code.csharp.dataflow.Nullness - -query predicate alwaysNull(AlwaysNullExpr expr) { - expr.getEnclosingCallable().getName() = "Nullness" -} - -query predicate alwaysNotNull(NonNullExpr expr) { - expr.getEnclosingCallable().getName() = "Nullness" -} diff --git a/csharp/ql/test/library-tests/cil/dataflow/TaintTracking.expected b/csharp/ql/test/library-tests/cil/dataflow/TaintTracking.expected deleted file mode 100644 index ef25cee2190..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/TaintTracking.expected +++ /dev/null @@ -1,28 +0,0 @@ -| dataflow.cs:9:18:9:22 | "123" | dataflow.cs:9:18:9:37 | call to method CompareTo | -| dataflow.cs:9:34:9:36 | "b" | dataflow.cs:9:18:9:37 | call to method CompareTo | -| dataflow.cs:16:18:16:26 | "tainted" | dataflow.cs:16:18:16:37 | call to method ToString | -| dataflow.cs:18:27:18:27 | 2 | dataflow.cs:18:18:18:31 | call to method Max | -| dataflow.cs:18:30:18:30 | 3 | dataflow.cs:18:18:18:31 | call to method Max | -| dataflow.cs:19:29:19:31 | 0.5 | dataflow.cs:19:18:19:32 | call to method Round | -| dataflow.cs:20:45:20:53 | "tainted" | dataflow.cs:20:18:20:54 | call to method GetFullPath | -| dataflow.cs:24:37:24:37 | 1 | dataflow.cs:24:18:24:56 | call to method DivRem | -| dataflow.cs:24:40:24:40 | 2 | dataflow.cs:24:18:24:56 | call to method DivRem | -| dataflow.cs:27:44:27:46 | 1 | dataflow.cs:27:18:27:52 | call to method IEEERemainder | -| dataflow.cs:27:49:27:51 | 2 | dataflow.cs:27:18:27:52 | call to method IEEERemainder | -| dataflow.cs:30:60:30:60 | 1 | dataflow.cs:30:18:30:80 | call to method DivRem | -| dataflow.cs:30:63:30:63 | 2 | dataflow.cs:30:18:30:80 | call to method DivRem | -| dataflow.cs:38:34:38:37 | "d1" | dataflow.cs:38:18:38:38 | call to method Taint1 | -| dataflow.cs:39:34:39:37 | "d2" | dataflow.cs:39:18:39:38 | call to method Taint2 | -| dataflow.cs:40:34:40:37 | "d3" | dataflow.cs:40:18:40:38 | call to method Taint3 | -| dataflow.cs:44:28:44:32 | "t1a" | dataflow.cs:44:18:44:40 | call to method Taint1 | -| dataflow.cs:44:35:44:39 | "t1b" | dataflow.cs:44:18:44:40 | call to method Taint1 | -| dataflow.cs:45:28:45:28 | 2 | dataflow.cs:45:18:45:32 | call to method Taint2 | -| dataflow.cs:45:31:45:31 | 3 | dataflow.cs:45:18:45:32 | call to method Taint2 | -| dataflow.cs:46:28:46:28 | 1 | dataflow.cs:46:18:46:29 | call to method Taint3 | -| dataflow.cs:47:35:47:38 | "t6" | dataflow.cs:47:18:47:45 | call to method TaintIndirect | -| dataflow.cs:47:41:47:44 | "t6" | dataflow.cs:47:18:47:45 | call to method TaintIndirect | -| dataflow.cs:100:30:100:33 | null | dataflow.cs:72:21:72:52 | ... ?? ... | -| dataflow.cs:100:30:100:33 | null | dataflow.cs:87:24:87:51 | ... ? ... : ... | -| dataflow.cs:100:30:100:33 | null | dataflow.cs:106:20:106:33 | call to method IndirectNull | -| dataflow.cs:107:23:107:26 | null | dataflow.cs:72:21:72:52 | ... ?? ... | -| dataflow.cs:107:23:107:26 | null | dataflow.cs:87:24:87:51 | ... ? ... : ... | diff --git a/csharp/ql/test/library-tests/cil/dataflow/TaintTracking.ql b/csharp/ql/test/library-tests/cil/dataflow/TaintTracking.ql deleted file mode 100644 index f8939387c9c..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/TaintTracking.ql +++ /dev/null @@ -1,21 +0,0 @@ -import csharp -// Test that all the copies of the taint tracking library can be imported -// simultaneously without errors. -import semmle.code.csharp.dataflow.TaintTracking2 -import semmle.code.csharp.dataflow.TaintTracking3 -import semmle.code.csharp.dataflow.TaintTracking4 -import semmle.code.csharp.dataflow.TaintTracking5 - -module FlowConfig implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node source) { source.asExpr() instanceof Literal } - - predicate isSink(DataFlow::Node sink) { - exists(LocalVariable decl | sink.asExpr() = decl.getInitializer()) - } -} - -module Flow = TaintTracking::Global; - -from DataFlow::Node source, DataFlow::Node sink -where Flow::flow(source, sink) -select source, sink diff --git a/csharp/ql/test/library-tests/cil/dataflow/TrivialProperties.expected b/csharp/ql/test/library-tests/cil/dataflow/TrivialProperties.expected deleted file mode 100644 index 2e6cde7a690..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/TrivialProperties.expected +++ /dev/null @@ -1,11 +0,0 @@ -| Dataflow.Properties.TrivialProperty1 | -| Dataflow.Properties.TrivialProperty2 | -| System.Collections.DictionaryEntry.Key | -| System.Collections.DictionaryEntry.Value | -| System.Reflection.AssemblyName.CodeBase | -| System.Reflection.AssemblyName.CultureInfo | -| System.Reflection.AssemblyName.HashAlgorithm | -| System.Reflection.AssemblyName.Name | -| System.Reflection.AssemblyName.RawFlags | -| System.Reflection.AssemblyName.Version | -| System.Reflection.AssemblyName.VersionCompatibility | diff --git a/csharp/ql/test/library-tests/cil/dataflow/TrivialProperties.ql b/csharp/ql/test/library-tests/cil/dataflow/TrivialProperties.ql deleted file mode 100644 index 90992bfa668..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/TrivialProperties.ql +++ /dev/null @@ -1,15 +0,0 @@ -import csharp -import semmle.code.csharp.commons.QualifiedName - -from TrivialProperty prop, string namespace, string type, string name -where - prop.getDeclaringType().hasFullyQualifiedName(namespace, type) and - ( - namespace = "System.Reflection" and type = "AssemblyName" - or - namespace = "System.Collections" and type = "DictionaryEntry" - or - namespace = "Dataflow" and type = "Properties" - ) and - prop.hasFullyQualifiedName(namespace, type, name) -select getQualifiedName(namespace, type, name) diff --git a/csharp/ql/test/library-tests/cil/dataflow/dataflow.cs b/csharp/ql/test/library-tests/cil/dataflow/dataflow.cs deleted file mode 100644 index af26fc0ed12..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/dataflow.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; - -class Test -{ - static void Main(string[] args) - { - // Indirect call to method - var c1 = "abc".Contains("a"); // Calls string.IndexOf() - var c2 = "123".CompareTo("b"); // Calls string.Compare() - var c3 = Tuple.Create("c", "d", "e"); // Calls Tuple constructor - } - - void DataFlowThroughFramework() - { - // Dataflow through call - var f1 = "tainted".ToString(); - var f2 = Math.Abs(12); - var f3 = Math.Max(2, 3); - var f4 = Math.Round(0.5); - var f5 = System.IO.Path.GetFullPath("tainted"); - - // Tainted dataflow (there is no untainted dataflow path) - int remainder; - var t1 = System.Math.DivRem(1, 2, out remainder); - - // Tainted indirect call to method (there is no untainted dataflow path) - var t2 = System.Math.IEEERemainder(1.0, 2.0); - - // Miscellaneous examples - var m1 = System.Math.DivRem(Math.Abs(-1), Math.Max(1, 2), out remainder); - var m2 = "tainted".ToString().Contains("t"); - } - - void DataFlowThroughAssembly() - { - // Dataflow through test assembly - var dataflow = new Dataflow.DataFlow(); - var d1 = dataflow.Taint1("d1"); - var d2 = dataflow.Taint2("d2"); - var d3 = dataflow.Taint3("d3"); - - // Taint tracking - var tt = new Dataflow.TaintFlow(); - var t1 = tt.Taint1("t1a", "t1b"); - var t2 = tt.Taint2(2, 3); - var t3 = tt.Taint3(1); - var t4 = tt.TaintIndirect("t6", "t6"); - } - - void DeadCode() { } - - void CilAlwaysThrows() - { - System.Reflection.Assembly.LoadFrom("", null, System.Configuration.Assemblies.AssemblyHashAlgorithm.SHA1); // Throws NotSupportedException - DeadCode(); - } - - void Throw() => throw new InvalidCastException(); - - void CsAlwaysThrows() - { - Throw(); - DeadCode(); - } - - void Nullness() - { - var @null = default(object); - var nonNull1 = default(int); - var nullFromCil = this.GetType().DeclaringMethod; - var nonNullFromCil = true.ToString(); - var null2 = NullFunction() ?? IndirectNull(); - - // Null from dataflow assembly - var nullMethods = new Dataflow.NullMethods(); - var null3 = nullMethods.ReturnsNull(); // Null - var null4 = nullMethods.ReturnsNull2(); - var null5 = nullMethods.NullProperty; - - // NotNull - var nonNull = new Dataflow.NonNullMethods(); - var nonNull2 = nonNull.ReturnsNonNull(); - var nonNull3 = nonNull.ReturnsNonNullIndirect(); - var nonNull4 = nonNull.NonNullProperty; - - // The following are not always null: - var notNull1 = cond ? NullFunction() : this; - var notNull2 = nullMethods.VirtualReturnsNull(); - var notNull3 = nullMethods.VirtualNullProperty; - var notNonNull = nonNull.VirtualNonNull; - - // The following are maybe null - var maybeNull = nonNull.MaybeNull(); - var maybeNull2 = nonNull.MaybeNull2(); - var maybeNullMethods = new DataflowUnoptimized.MaybeNullMethods(); - maybeNull = maybeNullMethods.MaybeNull(); - maybeNull2 = maybeNullMethods.MaybeNull2(); - } - - object IndirectNull() => null; - - bool cond; - - object NullFunction() - { - object x = IndirectNull(); - if (cond) x = null; - return x; - } -} diff --git a/csharp/ql/test/library-tests/cil/dataflow/options b/csharp/ql/test/library-tests/cil/dataflow/options deleted file mode 100644 index 8511aa162b8..00000000000 --- a/csharp/ql/test/library-tests/cil/dataflow/options +++ /dev/null @@ -1 +0,0 @@ -semmle-extractor-options: --cil diff --git a/csharp/ql/test/library-tests/cil/enums/enums.ql b/csharp/ql/test/library-tests/cil/enums/enums.ql index 675aa69a91c..07a63dbc847 100644 --- a/csharp/ql/test/library-tests/cil/enums/enums.ql +++ b/csharp/ql/test/library-tests/cil/enums/enums.ql @@ -9,8 +9,11 @@ predicate osSpecific(string qualifier, string name) { ) } -from Enum e, string qualifier, string name -where - e.hasFullyQualifiedName(qualifier, name) and - not osSpecific(qualifier, name) -select getQualifiedName(qualifier, name), e.getUnderlyingType().toStringWithTypes() +deprecated query predicate enums(string qualifiedName, string type) { + exists(Enum e, string qualifier, string name | + e.hasFullyQualifiedName(qualifier, name) and + not osSpecific(qualifier, name) and + qualifiedName = getQualifiedName(qualifier, name) and + type = e.getUnderlyingType().toStringWithTypes() + ) +} diff --git a/csharp/ql/test/library-tests/cil/functionPointers/functionPointers.ql b/csharp/ql/test/library-tests/cil/functionPointers/functionPointers.ql index 5a22a65d5c0..e6a9219bf6c 100644 --- a/csharp/ql/test/library-tests/cil/functionPointers/functionPointers.ql +++ b/csharp/ql/test/library-tests/cil/functionPointers/functionPointers.ql @@ -3,16 +3,20 @@ import semmle.code.cil.Type import semmle.code.csharp.commons.QualifiedName bindingset[kind] -private string getKind(int kind) { if kind = 1 then result = "modreq" else result = "modopt" } +deprecated private string getKind(int kind) { + if kind = 1 then result = "modreq" else result = "modopt" +} bindingset[t, e] -private string getAnnotatedType(Type t, Element e) { +deprecated private string getAnnotatedType(Type t, Element e) { cil_type_annotation(e, 32) and result = t.toString() + "&" or not cil_type_annotation(e, 32) and result = t.toString() } -query predicate fnptr(string fnptr, int paramCount, string returnType, int callingConvention) { +deprecated query predicate fnptr( + string fnptr, int paramCount, string returnType, int callingConvention +) { exists(FunctionPointerType fn | fnptr = fn.toString() | paramCount = fn.getNumberOfParameters() and returnType = getAnnotatedType(fn.getReturnType(), fn) and @@ -20,13 +24,13 @@ query predicate fnptr(string fnptr, int paramCount, string returnType, int calli ) } -query predicate params(string fnptr, int i, string param, string t) { +deprecated query predicate params(string fnptr, int i, string param, string t) { exists(FunctionPointerType fn, Parameter p | fnptr = fn.toString() and param = p.toString() | fn.getParameter(i) = p and t = getAnnotatedType(p.getType(), p) ) } -query predicate modifiers(string fnptr, string modifier, string sKind) { +deprecated query predicate modifiers(string fnptr, string modifier, string sKind) { exists(Type modType, int kind, FunctionPointerType fn, string qualifier, string name | fnptr = fn.toString() | diff --git a/csharp/ql/test/library-tests/cil/init-only-prop/customModifiers.ql b/csharp/ql/test/library-tests/cil/init-only-prop/customModifiers.ql index ad4f9fd6cb5..3eeb5cf0697 100644 --- a/csharp/ql/test/library-tests/cil/init-only-prop/customModifiers.ql +++ b/csharp/ql/test/library-tests/cil/init-only-prop/customModifiers.ql @@ -2,14 +2,16 @@ import semmle.code.cil.Type import semmle.code.csharp.commons.QualifiedName bindingset[kind] -private string getKind(int kind) { if kind = 1 then result = "modreq" else result = "modopt" } +deprecated private string getKind(int kind) { + if kind = 1 then result = "modreq" else result = "modopt" +} -from string receiver, string modifier, int kind -where - exists(Type modType, CustomModifierReceiver cmr, string qualifier, string name | +deprecated query predicate customModifiers(string receiver, string modifier, string kind) { + exists(Type modType, CustomModifierReceiver cmr, string qualifier, string name, int k | receiver = cmr.toString() and - cil_custom_modifiers(cmr, modType, kind) and + cil_custom_modifiers(cmr, modType, k) and modType.hasFullyQualifiedName(qualifier, name) and - modifier = getQualifiedName(qualifier, name) + modifier = getQualifiedName(qualifier, name) and + kind = getKind(k) ) -select receiver, modifier, getKind(kind) +} diff --git a/csharp/ql/test/library-tests/cil/init-only-prop/setters.ql b/csharp/ql/test/library-tests/cil/init-only-prop/setters.ql index b5721e243dd..06ab21392e3 100644 --- a/csharp/ql/test/library-tests/cil/init-only-prop/setters.ql +++ b/csharp/ql/test/library-tests/cil/init-only-prop/setters.ql @@ -1,8 +1,11 @@ import semmle.code.cil.Method import semmle.code.csharp.Location -private string getType(Setter s) { if s.isInitOnly() then result = "init" else result = "set" } +deprecated private string getType(Setter s) { + if s.isInitOnly() then result = "init" else result = "set" +} -from Setter s -where s.getLocation().(Assembly).getName() = "cil-init-prop" -select s, getType(s) +deprecated query predicate setters(Setter s, string type) { + s.getLocation().(Assembly).getName() = "cil-init-prop" and + type = getType(s) +} diff --git a/csharp/ql/test/library-tests/cil/pdbs/InstructionLocations.ql b/csharp/ql/test/library-tests/cil/pdbs/InstructionLocations.ql index 672e682752f..32170537789 100644 --- a/csharp/ql/test/library-tests/cil/pdbs/InstructionLocations.ql +++ b/csharp/ql/test/library-tests/cil/pdbs/InstructionLocations.ql @@ -2,13 +2,16 @@ import cil // Used only because native PDBs are only supported on Windows. // They are included as tests but disabled here. -predicate filterMethod(CIL::Method m) { +deprecated predicate filterMethod(CIL::Method m) { m.getDeclaringType().getNamespace().getName() = "EmbeddedPdb" or m.getDeclaringType().getNamespace().getName() = "PortablePdb" } -from CIL::Instruction instruction, CIL::Location location -where - location = instruction.getLocation() and - filterMethod(instruction.getImplementation().getMethod()) -select location.toString(), instruction.toStringExtra() +deprecated query predicate instructionLocations(string loc, string extra) { + exists(CIL::Instruction instruction, CIL::Location location | + location = instruction.getLocation() and + filterMethod(instruction.getImplementation().getMethod()) and + loc = location.toString() and + extra = instruction.toStringExtra() + ) +} diff --git a/csharp/ql/test/library-tests/cil/pdbs/MethodLocations.ql b/csharp/ql/test/library-tests/cil/pdbs/MethodLocations.ql index 5fa3d09d940..a301741f0cf 100644 --- a/csharp/ql/test/library-tests/cil/pdbs/MethodLocations.ql +++ b/csharp/ql/test/library-tests/cil/pdbs/MethodLocations.ql @@ -2,15 +2,18 @@ import cil // Used only because native PDBs are only supported on Windows. // They are included as tests but disabled here. -predicate filterMethod(CIL::Method m) { +deprecated predicate filterMethod(CIL::Method m) { m.getDeclaringType().getNamespace().getName() = "EmbeddedPdb" or m.getDeclaringType().getNamespace().getName() = "PortablePdb" } -from CIL::Method method, CIL::Location location, boolean primaryLocation -where - location = method.getALocation() and - exists(CIL::Location l | l = method.getALocation() | l.getFile().isPdbSourceFile()) and - (if location = method.getLocation() then primaryLocation = true else primaryLocation = false) and - filterMethod(method) -select method.toStringWithTypes(), location.toString(), primaryLocation +deprecated query predicate methodLocations(string m, string loc, boolean primaryLocation) { + exists(CIL::Method method, CIL::Location location | + location = method.getALocation() and + exists(CIL::Location l | l = method.getALocation() | l.getFile().isPdbSourceFile()) and + (if location = method.getLocation() then primaryLocation = true else primaryLocation = false) and + filterMethod(method) and + m = method.toStringWithTypes() and + loc = location.toString() + ) +} diff --git a/csharp/ql/test/library-tests/cil/pdbs/Stubs.ql b/csharp/ql/test/library-tests/cil/pdbs/Stubs.ql index 23d873c0399..cfe897f1069 100644 --- a/csharp/ql/test/library-tests/cil/pdbs/Stubs.ql +++ b/csharp/ql/test/library-tests/cil/pdbs/Stubs.ql @@ -1,5 +1,3 @@ import cil::CIL -from Assembly asm -where assemblyIsStub(asm) -select asm +deprecated query predicate stubs(Assembly asm) { assemblyIsStub(asm) } diff --git a/csharp/ql/test/library-tests/cil/regressions/ConstructedMethods.ql b/csharp/ql/test/library-tests/cil/regressions/ConstructedMethods.ql index 912536aeb3a..d472708bb5e 100644 --- a/csharp/ql/test/library-tests/cil/regressions/ConstructedMethods.ql +++ b/csharp/ql/test/library-tests/cil/regressions/ConstructedMethods.ql @@ -1,7 +1,9 @@ import cil::CIL -from UnboundGenericMethod f, ConstructedMethod fc -where +deprecated query predicate constructedMethods( + UnboundGenericMethod f, ConstructedMethod fc, Type typeArgument +) { fc.getUnboundMethod() = f and - f.hasFullyQualifiedName("Methods", "Class1", "F") -select f, fc, fc.getTypeArgument(0) + f.hasFullyQualifiedName("Methods", "Class1", "F") and + typeArgument = fc.getTypeArgument(0) +} diff --git a/csharp/ql/test/library-tests/cil/typeAnnotations/typeAnnotations.ql b/csharp/ql/test/library-tests/cil/typeAnnotations/typeAnnotations.ql index cf93110bc65..d5f2ee7f7c3 100644 --- a/csharp/ql/test/library-tests/cil/typeAnnotations/typeAnnotations.ql +++ b/csharp/ql/test/library-tests/cil/typeAnnotations/typeAnnotations.ql @@ -2,7 +2,7 @@ import cil import semmle.code.csharp.commons.QualifiedName import semmle.code.cil.Type -private string elementType(Element e, string toString) { +deprecated private string elementType(Element e, string toString) { exists(string namespace, string type, string name | toString = getQualifiedName(namespace, type, name) | @@ -48,7 +48,7 @@ private string elementType(Element e, string toString) { toString = e.toString() } -private predicate exclude(string s) { +deprecated private predicate exclude(string s) { s in [ "Parameter 0 of Interop.libobjc.NSOperatingSystemVersion_objc_msgSend_stret", "Parameter 1 of Interop.procfs.TryParseStatusFile", @@ -77,17 +77,18 @@ private predicate exclude(string s) { ] } -from Element e, int i, string toString, string type -where - cil_type_annotation(e, i) and - type = elementType(e, toString) and - not exclude(toString) and - ( - not e instanceof Parameter - or - not exists(Type t | - t = e.(Parameter).getDeclaringElement().(Method).getDeclaringType() and - t.hasFullyQualifiedName("System", "Environment") - ) // There are OS specific methods in this class +deprecated query predicate typeAnnotation(string toString, string type, int i) { + exists(Element e | + cil_type_annotation(e, i) and + type = elementType(e, toString) and + not exclude(toString) and + ( + not e instanceof Parameter + or + not exists(Type t | + t = e.(Parameter).getDeclaringElement().(Method).getDeclaringType() and + t.hasFullyQualifiedName("System", "Environment") + ) // There are OS specific methods in this class + ) ) -select toString, type, i +} diff --git a/csharp/ql/test/library-tests/commons/Disposal/Class1.cs_ b/csharp/ql/test/library-tests/commons/Disposal/Class1.cs_ deleted file mode 100644 index ed948c053d0..00000000000 --- a/csharp/ql/test/library-tests/commons/Disposal/Class1.cs_ +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -namespace DisposalTests -{ - public class MyType : IDisposable - { - public void Dispose() - { - } - } - - public class Class1 : IDisposable - { - public void DisposesParameter(IDisposable p1, IDisposable p2) - { - p1.Dispose(); - } - - public void CapturesDisposable(MyType p1, MyType p2) - { - field1 = p1; - field2 = p2; - } - - public void DisposesSelf() - { - Dispose(); - } - - MyType field1, field2; - - public void Dispose() - { - field1.Dispose(); - } - - public static void Dispose(IDisposable d) - { - d.Dispose(); - } - } -} diff --git a/csharp/ql/test/library-tests/commons/Disposal/Disposal.cs b/csharp/ql/test/library-tests/commons/Disposal/Disposal.cs index 4bbd4acc9f4..88e67c2cc95 100644 --- a/csharp/ql/test/library-tests/commons/Disposal/Disposal.cs +++ b/csharp/ql/test/library-tests/commons/Disposal/Disposal.cs @@ -14,11 +14,11 @@ class Disposal : IDisposable Close(); } - public Disposal(IDisposable p1, object p2, System.IO.TextWriter fs) + public Disposal(IDisposable p1, object p2, System.IO.TextWriter fs, IDisposable p3) { field1 = p1; - if(p2 is IDisposable d) + if (p2 is IDisposable d) d.Dispose(); - DisposalTests.Class1.Dispose(fs); + fs.Dispose(); } } diff --git a/csharp/ql/test/library-tests/commons/Disposal/DisposalTests.dll b/csharp/ql/test/library-tests/commons/Disposal/DisposalTests.dll deleted file mode 100644 index f731c5af9e1..00000000000 Binary files a/csharp/ql/test/library-tests/commons/Disposal/DisposalTests.dll and /dev/null differ diff --git a/csharp/ql/test/library-tests/commons/Disposal/DisposedFields.expected b/csharp/ql/test/library-tests/commons/Disposal/DisposedFields.expected deleted file mode 100644 index d3d33271d45..00000000000 --- a/csharp/ql/test/library-tests/commons/Disposal/DisposedFields.expected +++ /dev/null @@ -1 +0,0 @@ -| DisposalTests.Class1.field1 | diff --git a/csharp/ql/test/library-tests/commons/Disposal/DisposedFields.ql b/csharp/ql/test/library-tests/commons/Disposal/DisposedFields.ql deleted file mode 100644 index b9990bb7cdf..00000000000 --- a/csharp/ql/test/library-tests/commons/Disposal/DisposedFields.ql +++ /dev/null @@ -1,10 +0,0 @@ -import cil -import semmle.code.csharp.commons.Disposal -import semmle.code.csharp.commons.QualifiedName - -from CIL::Field field, string qualifier, string name -where - mayBeDisposed(field) and - field.getDeclaringType().hasFullyQualifiedName("DisposalTests", "Class1") and - field.hasFullyQualifiedName(qualifier, name) -select getQualifiedName(qualifier, name) diff --git a/csharp/ql/test/library-tests/commons/Disposal/DisposedParameter.expected b/csharp/ql/test/library-tests/commons/Disposal/DisposedParameter.expected index 33bd2568eca..459d4f55d76 100644 --- a/csharp/ql/test/library-tests/commons/Disposal/DisposedParameter.expected +++ b/csharp/ql/test/library-tests/commons/Disposal/DisposedParameter.expected @@ -1,6 +1,3 @@ -| CapturesDisposable(MyType, MyType) | 0 | -| Dispose(IDisposable) | 0 | -| DisposesParameter(IDisposable, IDisposable) | 0 | -| System.Void DisposalTests.Class1.CapturesDisposable(DisposalTests.MyType,DisposalTests.MyType) | 0 | -| System.Void DisposalTests.Class1.Dispose(System.IDisposable) | 0 | -| System.Void DisposalTests.Class1.DisposesParameter(System.IDisposable,System.IDisposable) | 0 | +| Disposal(IDisposable, object, TextWriter, IDisposable) | 0 | +| Disposal(IDisposable, object, TextWriter, IDisposable) | 1 | +| Disposal(IDisposable, object, TextWriter, IDisposable) | 2 | diff --git a/csharp/ql/test/library-tests/commons/Disposal/DisposedParameter.ql b/csharp/ql/test/library-tests/commons/Disposal/DisposedParameter.ql index 259b9dd11a8..634f4674d7d 100644 --- a/csharp/ql/test/library-tests/commons/Disposal/DisposedParameter.ql +++ b/csharp/ql/test/library-tests/commons/Disposal/DisposedParameter.ql @@ -1,9 +1,9 @@ -import dotnet +import csharp import semmle.code.csharp.commons.Disposal -from DotNet::Callable c, DotNet::Parameter param, int p +from Callable c, Parameter param, int p where mayBeDisposed(param) and param = c.getParameter(p) and - c.getDeclaringType().hasFullyQualifiedName("DisposalTests", "Class1") + c.getDeclaringType().hasFullyQualifiedName("", "Disposal") select c.toStringWithTypes(), p diff --git a/csharp/ql/test/library-tests/commons/Disposal/DisposedVariables.expected b/csharp/ql/test/library-tests/commons/Disposal/DisposedVariables.expected index e3c8b6886cb..39b670bb070 100644 --- a/csharp/ql/test/library-tests/commons/Disposal/DisposedVariables.expected +++ b/csharp/ql/test/library-tests/commons/Disposal/DisposedVariables.expected @@ -2,4 +2,4 @@ | Disposal.cs:17:33:17:34 | p1 | | Disposal.cs:17:44:17:45 | p2 | | Disposal.cs:17:69:17:70 | fs | -| Disposal.cs:20:30:20:30 | d | +| Disposal.cs:20:31:20:31 | d | diff --git a/csharp/ql/test/library-tests/commons/Disposal/UndisposedParameter.expected b/csharp/ql/test/library-tests/commons/Disposal/UndisposedParameter.expected index fb648f8e6f8..b176eb9e7cd 100644 --- a/csharp/ql/test/library-tests/commons/Disposal/UndisposedParameter.expected +++ b/csharp/ql/test/library-tests/commons/Disposal/UndisposedParameter.expected @@ -1,4 +1 @@ -| CapturesDisposable(MyType, MyType) | 1 | -| DisposesParameter(IDisposable, IDisposable) | 1 | -| System.Void DisposalTests.Class1.CapturesDisposable(DisposalTests.MyType,DisposalTests.MyType) | 1 | -| System.Void DisposalTests.Class1.DisposesParameter(System.IDisposable,System.IDisposable) | 1 | +| Disposal(IDisposable, object, TextWriter, IDisposable) | 3 | diff --git a/csharp/ql/test/library-tests/commons/Disposal/UndisposedParameter.ql b/csharp/ql/test/library-tests/commons/Disposal/UndisposedParameter.ql index 59e6c91013b..72203a8495a 100644 --- a/csharp/ql/test/library-tests/commons/Disposal/UndisposedParameter.ql +++ b/csharp/ql/test/library-tests/commons/Disposal/UndisposedParameter.ql @@ -1,10 +1,9 @@ -import dotnet +import csharp import semmle.code.csharp.commons.Disposal -import cil -from DotNet::Callable c, DotNet::Parameter param, int p +from Callable c, Parameter param, int p where not mayBeDisposed(param) and param = c.getParameter(p) and - c.getDeclaringType().hasFullyQualifiedName("DisposalTests", "Class1") + c.getDeclaringType().hasFullyQualifiedName("", "Disposal") select c.toStringWithTypes(), p diff --git a/csharp/ql/test/library-tests/commons/Disposal/options b/csharp/ql/test/library-tests/commons/Disposal/options index 3b212f77b23..a2a85ca7788 100644 --- a/csharp/ql/test/library-tests/commons/Disposal/options +++ b/csharp/ql/test/library-tests/commons/Disposal/options @@ -1 +1 @@ -semmle-extractor-options: --cil /r:System.Net.Http.dll /r:System.Runtime.Extensions.dll /r:System.Private.Xml.dll +semmle-extractor-options: /r:System.Net.Http.dll /r:System.Runtime.Extensions.dll /r:System.Private.Xml.dll diff --git a/csharp/ql/test/library-tests/constructors/PrintAst.expected b/csharp/ql/test/library-tests/constructors/PrintAst.expected index c917d5c7fa1..fc5c19ac2df 100644 --- a/csharp/ql/test/library-tests/constructors/PrintAst.expected +++ b/csharp/ql/test/library-tests/constructors/PrintAst.expected @@ -25,7 +25,6 @@ constructors.cs: # 23| -1: [TypeMention] object # 23| 1: [Parameter] s # 23| -1: [TypeMention] string -# 23| 4: [BlockStmt] {...} # 25| 5: [InstanceConstructor] C1 #-----| 2: (Parameters) # 25| 0: [Parameter] o @@ -48,4 +47,3 @@ constructors.cs: # 28| 3: [ConstructorInitializer] call to constructor C1 # 28| 0: [ParameterAccess] access to parameter o # 28| 1: [ParameterAccess] access to parameter s -# 28| 4: [BlockStmt] {...} diff --git a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.ql b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.ql index dd6c58d68f7..62805d6e6c9 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.ql +++ b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.ql @@ -4,6 +4,9 @@ import csharp import Common -import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl::TestOutput -private class MyRelevantNode extends RelevantNode, SourceControlFlowNode { } +private class MyRelevantNode extends SourceControlFlowNode { + string getOrderDisambiguation() { result = "" } +} + +import semmle.code.csharp.controlflow.internal.ControlFlowGraphImpl::TestOutput diff --git a/csharp/ql/test/library-tests/csharp11/cil/genericAttribute.ql b/csharp/ql/test/library-tests/csharp11/cil/genericAttribute.ql index 1b80efa1d89..d386bb8ce0e 100644 --- a/csharp/ql/test/library-tests/csharp11/cil/genericAttribute.ql +++ b/csharp/ql/test/library-tests/csharp11/cil/genericAttribute.ql @@ -1,9 +1,14 @@ import semmle.code.cil.CIL -private string getTypeArguments(GenericAttribute a) { +deprecated private string getTypeArguments(GenericAttribute a) { result = "(" + concat(Type t | t = a.getATypeArgument() | t.getName(), ",") + ")" } -from GenericAttribute a -where a.getFile().getStem() = "assembly" -select a, a.getType().getName(), a.getNumberOfTypeArguments(), getTypeArguments(a) +deprecated query predicate genericAttribute( + GenericAttribute a, string name, int numArgs, string args +) { + a.getFile().getStem() = "assembly" and + name = a.getType().getName() and + numArgs = a.getNumberOfTypeArguments() and + args = getTypeArguments(a) +} diff --git a/csharp/ql/test/library-tests/csharp11/cil/refField.ql b/csharp/ql/test/library-tests/csharp11/cil/refField.ql index 32d7b295d62..3474beb4913 100644 --- a/csharp/ql/test/library-tests/csharp11/cil/refField.ql +++ b/csharp/ql/test/library-tests/csharp11/cil/refField.ql @@ -1,5 +1,5 @@ import cil -query predicate cilfields(CIL::Field f, string type) { +deprecated query predicate cilfields(CIL::Field f, string type) { f.isRef() and type = f.getType().toString() and f.getDeclaringType().getName() = "RefStruct" } diff --git a/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected b/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected index d0e636b1258..ec78d10b35f 100644 --- a/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected +++ b/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected @@ -143,7 +143,6 @@ | CSharp7.cs:137:29:137:38 | (...) => ... | CSharp7.cs:137:24:137:25 | access to local variable f5 | | CSharp7.cs:137:34:137:34 | access to parameter x | CSharp7.cs:137:34:137:38 | ... + ... | | CSharp7.cs:137:38:137:38 | 1 | CSharp7.cs:137:34:137:38 | ... + ... | -| CSharp7.cs:139:9:139:51 | this | CSharp7.cs:139:38:139:39 | this access | | CSharp7.cs:139:20:139:20 | x | CSharp7.cs:139:26:139:26 | access to parameter x | | CSharp7.cs:139:26:139:26 | access to parameter x | CSharp7.cs:139:26:139:30 | ... > ... | | CSharp7.cs:139:26:139:26 | access to parameter x | CSharp7.cs:139:41:139:41 | access to parameter x | @@ -151,24 +150,18 @@ | CSharp7.cs:139:34:139:46 | ... + ... | CSharp7.cs:139:26:139:50 | ... ? ... : ... | | CSharp7.cs:139:38:139:46 | call to local function f7 | CSharp7.cs:139:34:139:46 | ... + ... | | CSharp7.cs:139:50:139:50 | 0 | CSharp7.cs:139:26:139:50 | ... ? ... : ... | -| CSharp7.cs:141:9:141:31 | this | CSharp7.cs:141:26:141:27 | this access | | CSharp7.cs:141:20:141:20 | x | CSharp7.cs:141:29:141:29 | access to parameter x | -| CSharp7.cs:143:9:147:9 | this | CSharp7.cs:146:20:146:21 | this access | -| CSharp7.cs:145:13:145:35 | this | CSharp7.cs:145:30:145:31 | this access | | CSharp7.cs:145:24:145:24 | x | CSharp7.cs:145:33:145:33 | access to parameter x | | CSharp7.cs:149:20:152:9 | (...) => ... | CSharp7.cs:149:16:149:16 | access to local variable a | | CSharp7.cs:157:10:157:17 | this | CSharp7.cs:169:9:169:9 | this access | | CSharp7.cs:160:18:160:18 | t | CSharp7.cs:160:24:160:24 | access to parameter t | -| CSharp7.cs:162:9:167:9 | this | CSharp7.cs:165:13:165:16 | this access | | CSharp7.cs:162:26:162:26 | u | CSharp7.cs:166:22:166:22 | access to parameter u | -| CSharp7.cs:164:13:164:43 | this | CSharp7.cs:164:37:164:40 | this access | | CSharp7.cs:165:13:165:16 | this access | CSharp7.cs:166:20:166:20 | this access | | CSharp7.cs:169:9:169:9 | this access | CSharp7.cs:170:9:170:9 | this access | | CSharp7.cs:173:10:173:19 | this | CSharp7.cs:180:21:180:21 | this access | | CSharp7.cs:175:16:175:18 | access to local variable src | CSharp7.cs:175:16:175:30 | SSA def(src) | | CSharp7.cs:175:16:175:30 | SSA def(src) | CSharp7.cs:180:23:180:25 | access to local variable src | | CSharp7.cs:175:22:175:30 | "tainted" | CSharp7.cs:175:16:175:18 | access to local variable src | -| CSharp7.cs:176:9:176:40 | this | CSharp7.cs:176:31:176:31 | this access | | CSharp7.cs:176:25:176:25 | s | CSharp7.cs:176:33:176:33 | access to parameter s | | CSharp7.cs:176:31:176:34 | call to local function g | CSharp7.cs:176:31:176:39 | ... + ... | | CSharp7.cs:176:38:176:39 | "" | CSharp7.cs:176:31:176:39 | ... + ... | diff --git a/csharp/ql/test/library-tests/csharp9/PrintAst.expected b/csharp/ql/test/library-tests/csharp9/PrintAst.expected index a46ffa3257b..eacbfd8fd45 100644 --- a/csharp/ql/test/library-tests/csharp9/PrintAst.expected +++ b/csharp/ql/test/library-tests/csharp9/PrintAst.expected @@ -884,7 +884,6 @@ Record.cs: # 27| -1: [TypeMention] string # 27| 1: [Parameter] LastName # 27| -1: [TypeMention] string -# 27| 4: [BlockStmt] {...} # 27| 16: [Property] FirstName # 27| 3: [Getter] get_FirstName # 27| 4: [Setter] set_FirstName @@ -917,7 +916,6 @@ Record.cs: # 30| 3: [ConstructorInitializer] call to constructor Person1 # 30| 0: [ParameterAccess] access to parameter FirstName # 30| 1: [ParameterAccess] access to parameter LastName -# 29| 4: [BlockStmt] {...} # 29| 17: [Property] Subject # 29| 3: [Getter] get_Subject # 29| 4: [Setter] set_Subject @@ -945,7 +943,6 @@ Record.cs: # 33| 3: [ConstructorInitializer] call to constructor Person1 # 33| 0: [ParameterAccess] access to parameter FirstName # 33| 1: [ParameterAccess] access to parameter LastName -# 32| 4: [BlockStmt] {...} # 32| 17: [Property] Level # 32| 3: [Getter] get_Level # 32| 4: [Setter] set_Level @@ -966,7 +963,6 @@ Record.cs: #-----| 2: (Parameters) # 35| 0: [Parameter] Name # 35| -1: [TypeMention] string -# 35| 4: [BlockStmt] {...} # 35| 16: [Property] Name # 35| 3: [Getter] get_Name # 35| 4: [Setter] set_Name @@ -993,7 +989,6 @@ Record.cs: # 41| -1: [TypeMention] string # 41| 3: [ConstructorInitializer] call to constructor Pet # 41| 0: [ParameterAccess] access to parameter Name -# 41| 4: [BlockStmt] {...} # 41| 15: [Property] EqualityContract # 41| 3: [Getter] get_EqualityContract # 43| 16: [Method] WagTail @@ -1035,7 +1030,6 @@ Record.cs: #-----| 2: (Parameters) # 54| 0: [Parameter] A # 54| -1: [TypeMention] string -# 54| 4: [BlockStmt] {...} # 54| 16: [Property] A # 54| 3: [Getter] get_A # 54| 4: [Setter] set_A @@ -1060,7 +1054,6 @@ Record.cs: # 56| -1: [TypeMention] string # 56| 3: [ConstructorInitializer] call to constructor R1 # 56| 0: [ParameterAccess] access to parameter A -# 56| 4: [BlockStmt] {...} # 56| 17: [Property] B # 56| 3: [Getter] get_B # 56| 4: [Setter] set_B diff --git a/csharp/ql/test/library-tests/dataflow/collections/CollectionFlow.expected b/csharp/ql/test/library-tests/dataflow/collections/CollectionFlow.expected index 4230fdcc5a1..7a71e3d37cb 100644 --- a/csharp/ql/test/library-tests/dataflow/collections/CollectionFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/collections/CollectionFlow.expected @@ -4,12 +4,6 @@ edges | CollectionFlow.cs:14:52:14:53 | access to parameter ts : A[] [element] : A | CollectionFlow.cs:14:52:14:56 | access to array element | provenance | | | CollectionFlow.cs:14:52:14:53 | access to parameter ts : null [element] : A | CollectionFlow.cs:14:52:14:56 | access to array element | provenance | | | CollectionFlow.cs:16:49:16:52 | list : List [element] : A | CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | provenance | | -| CollectionFlow.cs:16:49:16:52 | list : List [element] : A | CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | provenance | | -| CollectionFlow.cs:16:49:16:52 | list : List [element] : A | CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | provenance | | -| CollectionFlow.cs:16:49:16:52 | list : List [element] : A | CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | provenance | | -| CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | CollectionFlow.cs:16:63:16:69 | access to indexer | provenance | | -| CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | CollectionFlow.cs:16:63:16:69 | access to indexer | provenance | | -| CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | CollectionFlow.cs:16:63:16:69 | access to indexer | provenance | | | CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | CollectionFlow.cs:16:63:16:69 | access to indexer | provenance | | | CollectionFlow.cs:18:61:18:64 | dict : Dictionary [element, property Value] : A | CollectionFlow.cs:18:75:18:78 | access to parameter dict : Dictionary [element, property Value] : A | provenance | | | CollectionFlow.cs:18:75:18:78 | access to parameter dict : Dictionary [element, property Value] : A | CollectionFlow.cs:18:75:18:81 | access to indexer | provenance | | @@ -21,12 +15,6 @@ edges | CollectionFlow.cs:22:41:22:42 | access to parameter ts : A[] [element] : A | CollectionFlow.cs:22:41:22:45 | access to array element : A | provenance | | | CollectionFlow.cs:22:41:22:42 | access to parameter ts : null [element] : A | CollectionFlow.cs:22:41:22:45 | access to array element : A | provenance | | | CollectionFlow.cs:24:43:24:46 | list : List [element] : A | CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | provenance | | -| CollectionFlow.cs:24:43:24:46 | list : List [element] : A | CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | provenance | | -| CollectionFlow.cs:24:43:24:46 | list : List [element] : A | CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | provenance | | -| CollectionFlow.cs:24:43:24:46 | list : List [element] : A | CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | provenance | | -| CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | CollectionFlow.cs:24:52:24:58 | access to indexer : A | provenance | | -| CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | CollectionFlow.cs:24:52:24:58 | access to indexer : A | provenance | | -| CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | CollectionFlow.cs:24:52:24:58 | access to indexer : A | provenance | | | CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | CollectionFlow.cs:24:52:24:58 | access to indexer : A | provenance | | | CollectionFlow.cs:26:58:26:61 | dict : Dictionary [element, property Value] : A | CollectionFlow.cs:26:67:26:70 | access to parameter dict : Dictionary [element, property Value] : A | provenance | | | CollectionFlow.cs:26:67:26:70 | access to parameter dict : Dictionary [element, property Value] : A | CollectionFlow.cs:26:67:26:73 | access to indexer : A | provenance | | @@ -324,12 +312,6 @@ nodes | CollectionFlow.cs:14:52:14:53 | access to parameter ts : null [element] : A | semmle.label | access to parameter ts : null [element] : A | | CollectionFlow.cs:14:52:14:56 | access to array element | semmle.label | access to array element | | CollectionFlow.cs:16:49:16:52 | list : List [element] : A | semmle.label | list : List [element] : A | -| CollectionFlow.cs:16:49:16:52 | list : List [element] : A | semmle.label | list : List [element] : A | -| CollectionFlow.cs:16:49:16:52 | list : List [element] : A | semmle.label | list : List [element] : A | -| CollectionFlow.cs:16:49:16:52 | list : List [element] : A | semmle.label | list : List [element] : A | -| CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | semmle.label | access to parameter list : List [element] : A | -| CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | semmle.label | access to parameter list : List [element] : A | -| CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | semmle.label | access to parameter list : List [element] : A | | CollectionFlow.cs:16:63:16:66 | access to parameter list : List [element] : A | semmle.label | access to parameter list : List [element] : A | | CollectionFlow.cs:16:63:16:69 | access to indexer | semmle.label | access to indexer | | CollectionFlow.cs:18:61:18:64 | dict : Dictionary [element, property Value] : A | semmle.label | dict : Dictionary [element, property Value] : A | @@ -346,16 +328,7 @@ nodes | CollectionFlow.cs:22:41:22:45 | access to array element : A | semmle.label | access to array element : A | | CollectionFlow.cs:22:41:22:45 | access to array element : A | semmle.label | access to array element : A | | CollectionFlow.cs:24:43:24:46 | list : List [element] : A | semmle.label | list : List [element] : A | -| CollectionFlow.cs:24:43:24:46 | list : List [element] : A | semmle.label | list : List [element] : A | -| CollectionFlow.cs:24:43:24:46 | list : List [element] : A | semmle.label | list : List [element] : A | -| CollectionFlow.cs:24:43:24:46 | list : List [element] : A | semmle.label | list : List [element] : A | | CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | semmle.label | access to parameter list : List [element] : A | -| CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | semmle.label | access to parameter list : List [element] : A | -| CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | semmle.label | access to parameter list : List [element] : A | -| CollectionFlow.cs:24:52:24:55 | access to parameter list : List [element] : A | semmle.label | access to parameter list : List [element] : A | -| CollectionFlow.cs:24:52:24:58 | access to indexer : A | semmle.label | access to indexer : A | -| CollectionFlow.cs:24:52:24:58 | access to indexer : A | semmle.label | access to indexer : A | -| CollectionFlow.cs:24:52:24:58 | access to indexer : A | semmle.label | access to indexer : A | | CollectionFlow.cs:24:52:24:58 | access to indexer : A | semmle.label | access to indexer : A | | CollectionFlow.cs:26:58:26:61 | dict : Dictionary [element, property Value] : A | semmle.label | dict : Dictionary [element, property Value] : A | | CollectionFlow.cs:26:67:26:70 | access to parameter dict : Dictionary [element, property Value] : A | semmle.label | access to parameter dict : Dictionary [element, property Value] : A | diff --git a/csharp/ql/test/library-tests/dataflow/defuse/defUseEquivalence.ql b/csharp/ql/test/library-tests/dataflow/defuse/defUseEquivalence.ql index 729d19f6d1e..1ff95c93b22 100644 --- a/csharp/ql/test/library-tests/dataflow/defuse/defUseEquivalence.ql +++ b/csharp/ql/test/library-tests/dataflow/defuse/defUseEquivalence.ql @@ -1,7 +1,10 @@ import csharp +private import semmle.code.csharp.controlflow.internal.PreSsa /** "Naive" def-use implementation. */ -predicate defReaches(AssignableDefinition def, LocalScopeVariable v, ControlFlow::Node cfn) { +predicate defReaches( + AssignableDefinition def, PreSsa::SimpleLocalScopeVariable v, ControlFlow::Node cfn +) { def.getTarget() = v and cfn = def.getAControlFlowNode().getASuccessor() or exists(ControlFlow::Node mid | defReaches(def, v, mid) | diff --git a/csharp/ql/test/library-tests/dataflow/defuse/parameterUseEquivalence.ql b/csharp/ql/test/library-tests/dataflow/defuse/parameterUseEquivalence.ql index e83eba4dd7c..79e0e318e7a 100644 --- a/csharp/ql/test/library-tests/dataflow/defuse/parameterUseEquivalence.ql +++ b/csharp/ql/test/library-tests/dataflow/defuse/parameterUseEquivalence.ql @@ -1,8 +1,10 @@ import csharp +private import semmle.code.csharp.controlflow.internal.PreSsa /** "Naive" parameter-use implementation. */ predicate parameterReaches(Parameter p, ControlFlow::Node cfn) { - cfn = p.getCallable().getEntryPoint().getASuccessor() + cfn = p.getCallable().getEntryPoint().getASuccessor() and + p instanceof PreSsa::SimpleLocalScopeVariable or exists(ControlFlow::Node mid | parameterReaches(p, mid) | not mid = diff --git a/csharp/ql/test/library-tests/dataflow/defuse/useUseEquivalence.ql b/csharp/ql/test/library-tests/dataflow/defuse/useUseEquivalence.ql index e09c3d15caa..c32fc80c782 100644 --- a/csharp/ql/test/library-tests/dataflow/defuse/useUseEquivalence.ql +++ b/csharp/ql/test/library-tests/dataflow/defuse/useUseEquivalence.ql @@ -1,7 +1,10 @@ import csharp +private import semmle.code.csharp.controlflow.internal.PreSsa /** "Naive" use-use implementation. */ -predicate useReaches(LocalScopeVariableRead read, LocalScopeVariable v, ControlFlow::Node cfn) { +predicate useReaches( + LocalScopeVariableRead read, PreSsa::SimpleLocalScopeVariable v, ControlFlow::Node cfn +) { read.getTarget() = v and cfn = read.getAControlFlowNode().getASuccessor() or exists(ControlFlow::Node mid | useReaches(read, v, mid) | diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.cs b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.cs new file mode 100644 index 00000000000..c0961e0169b --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using Microsoft.Extensions.Configuration; + +namespace CommandArgs +{ + public class CommandArgsUse + { + public static void M1() + { + string result = Environment.GetCommandLineArgs()[0]; + } + + public static void M2() + { + string result = Environment.CommandLine; + } + + public static void Main(string[] args) + { + var builder = new ConfigurationBuilder(); + builder.AddCommandLine(args); + var config = builder.Build(); + var arg1 = config["arg1"]; + Sink(arg1); + } + + public static void AddCommandLine2() + { + var config = new ConfigurationBuilder() + .AddCommandLine(Environment.GetCommandLineArgs()) + .Build(); + var arg1 = config["arg1"]; + Sink(arg1); + } + + static void Sink(object o) { } + } +} \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.expected b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.expected new file mode 100644 index 00000000000..2a2c1c40b2b --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.expected @@ -0,0 +1,4 @@ +| CommandArgs.cs:11:29:11:60 | call to method GetCommandLineArgs | +| CommandArgs.cs:16:29:16:51 | access to property CommandLine | +| CommandArgs.cs:19:42:19:45 | args | +| CommandArgs.cs:31:33:31:64 | call to method GetCommandLineArgs | diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ext.yml b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ext.yml new file mode 100644 index 00000000000..a92dbf39d06 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ext.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["commandargs", true, 0] \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ql b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ql new file mode 100644 index 00000000000..aa89a4c3455 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandArgs.ql @@ -0,0 +1,6 @@ +import csharp +import semmle.code.csharp.security.dataflow.flowsources.FlowSources + +from DataFlow::Node source +where source instanceof ThreatModelFlowSource +select source diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.expected b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.expected new file mode 100644 index 00000000000..e404205dd15 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.expected @@ -0,0 +1,2 @@ +| CommandArgs.cs:25:18:25:21 | access to local variable arg1 | CommandArgs.cs:19:42:19:45 | args | +| CommandArgs.cs:34:18:34:21 | access to local variable arg1 | CommandArgs.cs:31:33:31:64 | call to method GetCommandLineArgs | diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ext.yml b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ext.yml new file mode 100644 index 00000000000..a92dbf39d06 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ext.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["commandargs", true, 0] \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ql b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ql new file mode 100644 index 00000000000..731043cf470 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/CommandLineFlow.ql @@ -0,0 +1,16 @@ +import csharp +import semmle.code.csharp.security.dataflow.flowsources.FlowSources + +module CommandLineFlowConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } + + predicate isSink(DataFlow::Node sink) { + exists(MethodCall mc | mc.getTarget().hasName("Sink") | sink.asExpr() = mc.getArgument(0)) + } +} + +module CommandLineFlow = TaintTracking::Global; + +from DataFlow::Node source, DataFlow::Node sink +where CommandLineFlow::flow(source, sink) +select sink, source diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/options b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/options new file mode 100644 index 00000000000..13f94236f19 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/commandargs/options @@ -0,0 +1,3 @@ +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj +semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariableFlow.expected b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariableFlow.expected new file mode 100644 index 00000000000..323cb705182 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariableFlow.expected @@ -0,0 +1,2 @@ +| EnvironmentVariables.cs:34:18:34:21 | access to local variable path | EnvironmentVariables.cs:30:26:31:42 | call to method AddEnvironmentVariables | +| EnvironmentVariables.cs:44:18:44:21 | access to local variable path | EnvironmentVariables.cs:41:13:41:19 | [post] access to local variable builder | diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariableFlow.ql b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariableFlow.ql new file mode 100644 index 00000000000..fc6923f8778 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariableFlow.ql @@ -0,0 +1,16 @@ +import csharp +import semmle.code.csharp.dataflow.internal.ExternalFlow + +module EnvironmentVariableFlowConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { sourceNode(source, "environment") } + + predicate isSink(DataFlow::Node sink) { + exists(MethodCall mc | mc.getTarget().hasName("Sink") | sink.asExpr() = mc.getArgument(0)) + } +} + +module EnvironmentVariableFlow = TaintTracking::Global; + +from DataFlow::Node source, DataFlow::Node sink +where EnvironmentVariableFlow::flow(source, sink) +select sink, source diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariables.cs b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariables.cs new file mode 100644 index 00000000000..a685106b7f2 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariables.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections; +using Microsoft.Extensions.Configuration; + +namespace EnvironmentVariables +{ + class EnvironmentVariables + { + public static void GetEnvironmentVariable(string environmnetVariable) + { + string value = Environment.GetEnvironmentVariable(environmnetVariable); + string valueFromRegistry = Environment.GetEnvironmentVariable(environmnetVariable, EnvironmentVariableTarget.Machine); + string valueFromProcess = Environment.GetEnvironmentVariable(environmnetVariable, EnvironmentVariableTarget.Process); + } + + public static void GetEnvironmentVariables() + { + IDictionary environmentVariables = Environment.GetEnvironmentVariables(); + IDictionary environmentVariablesFromRegistry = Environment.GetEnvironmentVariables(EnvironmentVariableTarget.Machine); + IDictionary environmentVariablesFromProcess = Environment.GetEnvironmentVariables(EnvironmentVariableTarget.Process); + } + + public static void ExpandEnvironmentVariables(string environmentVariable) + { + string expanded = Environment.ExpandEnvironmentVariables("%PATH%"); + } + + public static void TaintedConfiguration() + { + var config = new ConfigurationBuilder() + .AddEnvironmentVariables() + .Build(); + var path = config["PATH"]; + Sink(path); + } + + public static void TaintedConfigurationWithPrefix() + { + var builder = new ConfigurationBuilder(); + + builder.AddEnvironmentVariables("prefix"); + var config = builder.Build(); + var path = config["PATH"]; + Sink(path); + } + + static void Sink(object o) { } + } +} \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariables.expected b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariables.expected new file mode 100644 index 00000000000..0400998a4ce --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariables.expected @@ -0,0 +1,11 @@ +| EnvironmentVariables.cs:11:28:11:82 | call to method GetEnvironmentVariable | +| EnvironmentVariables.cs:12:40:12:129 | call to method GetEnvironmentVariable | +| EnvironmentVariables.cs:13:39:13:128 | call to method GetEnvironmentVariable | +| EnvironmentVariables.cs:18:48:18:84 | call to method GetEnvironmentVariables | +| EnvironmentVariables.cs:19:60:19:129 | call to method GetEnvironmentVariables | +| EnvironmentVariables.cs:20:59:20:128 | call to method GetEnvironmentVariables | +| EnvironmentVariables.cs:25:31:25:78 | call to method ExpandEnvironmentVariables | +| EnvironmentVariables.cs:30:26:30:51 | [post] object creation of type ConfigurationBuilder | +| EnvironmentVariables.cs:30:26:31:42 | call to method AddEnvironmentVariables | +| EnvironmentVariables.cs:41:13:41:19 | [post] access to local variable builder | +| EnvironmentVariables.cs:41:13:41:53 | call to method AddEnvironmentVariables | diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariables.ql b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariables.ql new file mode 100644 index 00000000000..b9d2a000f42 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/EnvironmentVariables.ql @@ -0,0 +1,6 @@ +import csharp +import semmle.code.csharp.dataflow.internal.ExternalFlow + +from DataFlow::Node source +where sourceNode(source, "environment") +select source diff --git a/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/options b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/options new file mode 100644 index 00000000000..13f94236f19 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/flowsources/local/environment/options @@ -0,0 +1,3 @@ +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj +semmle-extractor-options: ${testdir}/../../../../../resources/stubs/System.Web.cs diff --git a/csharp/ql/test/library-tests/dataflow/global/Capture.cs b/csharp/ql/test/library-tests/dataflow/global/Capture.cs index bfa0da36c90..1cdec868892 100644 --- a/csharp/ql/test/library-tests/dataflow/global/Capture.cs +++ b/csharp/ql/test/library-tests/dataflow/global/Capture.cs @@ -111,10 +111,12 @@ class Capture string sink40 = ""; void CaptureOutMultipleLambdas() { - RunAction(() => { + RunAction(() => + { sink40 = "taint source"; }); - RunAction(() => { + RunAction(() => + { nonSink0 = "not tainted"; }); }; @@ -197,10 +199,161 @@ class Capture Check(nonSink0); } + void M1(string s) + { + Action a = () => + { + Check(s); + }; + a(); + } + + void M2() => M1("taint source"); + + Action M3(string s) + { + return () => + { + Check(s); + }; + } + + void M4() => M3("taint source")(); + + void M5() => RunAction(M3("taint source")); + + void M6() + { + List xs = new List { 0, 1, 2 }; + var x = "taint source"; + xs.ForEach(_ => + { + Check(x); + x = "taint source"; + }); + Check(x); + } + + public string Field; + + void M7() + { + var c = new Capture(); + c.Field = "taint source"; + + Action a = () => + { + Check(c.Field); + c.Field = "taint source"; + }; + a(); + + Check(c.Field); + } + + void M7(bool b) + { + var c = new Capture(); + if (b) + { + c = null; + } + + Action a = () => + { + c.Field = "taint source"; + }; + a(); + + Check(c.Field); + } + + void M8() + { + RunAction(x => Check(x), "taint source"); + } + + void M9() + { + var x = "taint source"; + + Action middle = () => + { + Action inner = () => + { + Check(x); + x = "taint source"; + }; + inner(); + }; + + middle(); + + Check(x); + } + + void M10() + { + this.Field = "taint source"; + + Action a = () => + { + Check(this.Field); + this.Field = "taint source"; + }; + a(); + + Check(this.Field); + } + + void M11() + { + var x = "taint source"; + Check(x); + x = "safe"; + Check(x); + + Action a = () => + { + x = "taint source"; + Check(x); + x = "safe"; + Check(x); + }; + a(); + } + + void M12() + { + var x = "taint source"; + + void CapturedLocalFunction() => Check(x); + + void CapturingLocalFunction() => CapturedLocalFunction(); + + CapturingLocalFunction(); + } + + void M13() + { + var x = "taint source"; + + Action capturedLambda = () => Check(x); + + Action capturingLambda = () => capturedLambda(); + + capturingLambda(); + } + static void Check(T x) { } static void RunAction(Action a) { a.Invoke(); } + + static void RunAction(Action a, T x) + { + a(x); + } } diff --git a/csharp/ql/test/library-tests/dataflow/global/DataFlow.expected b/csharp/ql/test/library-tests/dataflow/global/DataFlow.expected index c57da19dc66..2e3cf9e831c 100644 --- a/csharp/ql/test/library-tests/dataflow/global/DataFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/global/DataFlow.expected @@ -5,13 +5,29 @@ | Capture.cs:72:15:72:20 | access to local variable sink30 | | Capture.cs:84:15:84:20 | access to local variable sink31 | | Capture.cs:93:15:93:20 | access to local variable sink32 | -| Capture.cs:122:15:122:20 | access to local variable sink40 | -| Capture.cs:133:15:133:20 | access to local variable sink33 | -| Capture.cs:145:15:145:20 | access to local variable sink34 | -| Capture.cs:154:15:154:20 | access to local variable sink35 | -| Capture.cs:161:15:161:20 | access to local variable sink36 | -| Capture.cs:169:15:169:20 | access to local variable sink37 | -| Capture.cs:195:15:195:20 | access to local variable sink38 | +| Capture.cs:124:15:124:20 | access to local variable sink40 | +| Capture.cs:135:15:135:20 | access to local variable sink33 | +| Capture.cs:147:15:147:20 | access to local variable sink34 | +| Capture.cs:156:15:156:20 | access to local variable sink35 | +| Capture.cs:163:15:163:20 | access to local variable sink36 | +| Capture.cs:171:15:171:20 | access to local variable sink37 | +| Capture.cs:197:15:197:20 | access to local variable sink38 | +| Capture.cs:206:19:206:19 | access to parameter s | +| Capture.cs:217:19:217:19 | access to parameter s | +| Capture.cs:231:19:231:19 | access to local variable x | +| Capture.cs:234:15:234:15 | access to local variable x | +| Capture.cs:246:19:246:25 | access to field Field | +| Capture.cs:251:15:251:21 | access to field Field | +| Capture.cs:268:15:268:21 | access to field Field | +| Capture.cs:273:30:273:30 | access to parameter x | +| Capture.cs:284:23:284:23 | access to local variable x | +| Capture.cs:292:15:292:15 | access to local variable x | +| Capture.cs:301:19:301:28 | access to field Field | +| Capture.cs:306:15:306:24 | access to field Field | +| Capture.cs:312:15:312:15 | access to local variable x | +| Capture.cs:319:19:319:19 | access to local variable x | +| Capture.cs:330:47:330:47 | access to local variable x | +| Capture.cs:341:45:341:45 | access to local variable x | | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | | GlobalDataFlow.cs:27:15:27:32 | access to property SinkProperty0 | | GlobalDataFlow.cs:45:50:45:59 | access to parameter sinkParam2 | diff --git a/csharp/ql/test/library-tests/dataflow/global/DataFlowPath.expected b/csharp/ql/test/library-tests/dataflow/global/DataFlowPath.expected index 3e7fca0c3e3..c994ff441b4 100644 --- a/csharp/ql/test/library-tests/dataflow/global/DataFlowPath.expected +++ b/csharp/ql/test/library-tests/dataflow/global/DataFlowPath.expected @@ -1,35 +1,173 @@ edges -| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:11:17:11:22 | access to local variable sink27 : String | provenance | | -| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:20:21:20:26 | access to local variable sink28 : String | provenance | | -| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:29:17:29:22 | access to local variable sink29 : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:9:9:13:9 | CaptureIn1(...) : CaptureIn1 [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:14:9:14:18 | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:16:9:24:9 | CaptureIn2(...) : CaptureIn2 [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:27:43:32:9 | (...) => ... : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:33:30:33:39 | access to local variable captureIn3 : Func [captured tainted] : String | provenance | | | Capture.cs:7:20:7:26 | tainted : String | Capture.cs:61:36:61:42 | access to parameter tainted : String | provenance | | +| Capture.cs:9:9:13:9 | CaptureIn1(...) : CaptureIn1 [captured tainted] : String | Capture.cs:14:9:14:18 | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | provenance | | | Capture.cs:11:17:11:22 | access to local variable sink27 : String | Capture.cs:12:19:12:24 | access to local variable sink27 | provenance | | +| Capture.cs:11:26:11:32 | access to parameter tainted : String | Capture.cs:11:17:11:22 | access to local variable sink27 : String | provenance | | +| Capture.cs:14:9:14:18 | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | Capture.cs:11:26:11:32 | access to parameter tainted : String | provenance | | +| Capture.cs:16:9:24:9 | CaptureIn2(...) : CaptureIn2 [captured tainted] : String | Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | provenance | | +| Capture.cs:18:13:22:13 | M(...) : M [captured tainted] : String | Capture.cs:23:13:23:13 | access to local function M : M [captured tainted] : String | provenance | | | Capture.cs:20:21:20:26 | access to local variable sink28 : String | Capture.cs:21:23:21:28 | access to local variable sink28 | provenance | | +| Capture.cs:20:30:20:36 | access to parameter tainted : String | Capture.cs:20:21:20:26 | access to local variable sink28 : String | provenance | | +| Capture.cs:23:13:23:13 | access to local function M : M [captured tainted] : String | Capture.cs:20:30:20:36 | access to parameter tainted : String | provenance | | +| Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | Capture.cs:18:13:22:13 | M(...) : M [captured tainted] : String | provenance | | +| Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | Capture.cs:23:13:23:13 | access to local function M : M [captured tainted] : String | provenance | | +| Capture.cs:27:30:27:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | Capture.cs:33:30:33:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:27:43:32:9 | (...) => ... : (...) => ... [captured tainted] : String | Capture.cs:27:30:27:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | provenance | | | Capture.cs:29:17:29:22 | access to local variable sink29 : String | Capture.cs:30:19:30:24 | access to local variable sink29 | provenance | | -| Capture.cs:50:50:50:55 | sink39 : String | Capture.cs:57:27:57:32 | access to parameter sink39 | provenance | | +| Capture.cs:29:26:29:32 | access to parameter tainted : String | Capture.cs:29:17:29:22 | access to local variable sink29 : String | provenance | | +| Capture.cs:33:30:33:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | Capture.cs:29:26:29:32 | access to parameter tainted : String | provenance | | +| Capture.cs:33:30:33:39 | access to local variable captureIn3 : Func [captured tainted] : String | Capture.cs:29:26:29:32 | access to parameter tainted : String | provenance | | +| Capture.cs:50:50:50:55 | sink39 : String | Capture.cs:52:23:59:13 | (...) => ... : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:52:23:59:13 | (...) => ... : (...) => ... [captured sink39] : String | Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:55:27:58:17 | (...) => ... : (...) => ... [captured sink39] : String | Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | provenance | | | Capture.cs:61:36:61:42 | access to parameter tainted : String | Capture.cs:50:50:50:55 | sink39 : String | provenance | | -| Capture.cs:69:13:69:18 | access to local variable sink30 : String | Capture.cs:72:15:72:20 | access to local variable sink30 | provenance | | -| Capture.cs:69:22:69:35 | "taint source" : String | Capture.cs:69:13:69:18 | access to local variable sink30 : String | provenance | | -| Capture.cs:79:17:79:22 | access to local variable sink31 : String | Capture.cs:84:15:84:20 | access to local variable sink31 | provenance | | -| Capture.cs:79:26:79:39 | "taint source" : String | Capture.cs:79:17:79:22 | access to local variable sink31 : String | provenance | | -| Capture.cs:89:13:89:18 | access to local variable sink32 : String | Capture.cs:93:15:93:20 | access to local variable sink32 | provenance | | -| Capture.cs:89:22:89:35 | "taint source" : String | Capture.cs:89:13:89:18 | access to local variable sink32 : String | provenance | | -| Capture.cs:115:17:115:22 | access to local variable sink40 : String | Capture.cs:122:15:122:20 | access to local variable sink40 | provenance | | -| Capture.cs:115:26:115:39 | "taint source" : String | Capture.cs:115:17:115:22 | access to local variable sink40 : String | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:133:15:133:20 | access to local variable sink33 | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:145:15:145:20 | access to local variable sink34 | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:154:15:154:20 | access to local variable sink35 | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:160:22:160:38 | call to local function CaptureThrough4 : String | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:168:25:168:31 | access to parameter tainted : String | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:194:25:194:31 | access to parameter tainted : String | provenance | | -| Capture.cs:160:13:160:18 | access to local variable sink36 : String | Capture.cs:161:15:161:20 | access to local variable sink36 | provenance | | -| Capture.cs:160:22:160:38 | call to local function CaptureThrough4 : String | Capture.cs:160:13:160:18 | access to local variable sink36 : String | provenance | | -| Capture.cs:168:25:168:31 | access to parameter tainted : String | Capture.cs:169:15:169:20 | access to local variable sink37 | provenance | | -| Capture.cs:188:26:188:26 | s : String | Capture.cs:191:20:191:22 | call to local function M : String | provenance | | -| Capture.cs:194:13:194:18 | access to local variable sink38 : String | Capture.cs:195:15:195:20 | access to local variable sink38 | provenance | | -| Capture.cs:194:22:194:32 | call to local function Id : String | Capture.cs:194:13:194:18 | access to local variable sink38 : String | provenance | | -| Capture.cs:194:25:194:31 | access to parameter tainted : String | Capture.cs:188:26:188:26 | s : String | provenance | | -| Capture.cs:194:25:194:31 | access to parameter tainted : String | Capture.cs:194:22:194:32 | call to local function Id : String | provenance | | +| Capture.cs:69:22:69:35 | "taint source" : String | Capture.cs:71:9:71:19 | [post] access to local function CaptureOut1 : CaptureOut1 [captured sink30] : String | provenance | | +| Capture.cs:71:9:71:19 | [post] access to local function CaptureOut1 : CaptureOut1 [captured sink30] : String | Capture.cs:72:15:72:20 | access to local variable sink30 | provenance | | +| Capture.cs:79:26:79:39 | "taint source" : String | Capture.cs:81:13:81:13 | [post] access to local function M : M [captured sink31] : String | provenance | | +| Capture.cs:81:13:81:13 | [post] access to local function M : M [captured sink31] : String | Capture.cs:83:9:83:19 | [post] access to local function CaptureOut2 : CaptureOut2 [captured sink31] : String | provenance | | +| Capture.cs:83:9:83:19 | [post] access to local function CaptureOut2 : CaptureOut2 [captured sink31] : String | Capture.cs:84:15:84:20 | access to local variable sink31 | provenance | | +| Capture.cs:89:22:89:35 | "taint source" : String | Capture.cs:92:30:92:40 | [post] access to local variable captureOut3 : (...) => ... [captured sink32] : String | provenance | | +| Capture.cs:92:30:92:40 | [post] access to local variable captureOut3 : (...) => ... [captured sink32] : String | Capture.cs:93:15:93:20 | access to local variable sink32 | provenance | | +| Capture.cs:114:23:117:13 | [post] (...) => ... : (...) => ... [captured sink40] : String | Capture.cs:123:9:123:33 | [post] access to local function CaptureOutMultipleLambdas : CaptureOutMultipleLambdas [captured sink40] : String | provenance | | +| Capture.cs:116:26:116:39 | "taint source" : String | Capture.cs:352:9:352:9 | [post] access to parameter a : (...) => ... [captured sink40] : String | provenance | | +| Capture.cs:123:9:123:33 | [post] access to local function CaptureOutMultipleLambdas : CaptureOutMultipleLambdas [captured sink40] : String | Capture.cs:124:15:124:20 | access to local variable sink40 | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:130:9:133:9 | CaptureThrough1(...) : CaptureThrough1 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:134:9:134:23 | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:138:9:145:9 | CaptureThrough2(...) : CaptureThrough2 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:146:9:146:23 | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:150:48:154:9 | (...) => ... : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:155:30:155:44 | access to local variable captureThrough3 : Func [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:158:9:161:9 | CaptureThrough4(...) : CaptureThrough4 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:162:22:162:36 | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:170:25:170:31 | access to parameter tainted : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:196:25:196:31 | access to parameter tainted : String | provenance | | +| Capture.cs:130:9:133:9 | CaptureThrough1(...) : CaptureThrough1 [captured tainted] : String | Capture.cs:134:9:134:23 | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | provenance | | +| Capture.cs:134:9:134:23 | [post] access to local function CaptureThrough1 : CaptureThrough1 [captured sink33] : String | Capture.cs:135:15:135:20 | access to local variable sink33 | provenance | | +| Capture.cs:134:9:134:23 | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | Capture.cs:134:9:134:23 | [post] access to local function CaptureThrough1 : CaptureThrough1 [captured sink33] : String | provenance | | +| Capture.cs:138:9:145:9 | CaptureThrough2(...) : CaptureThrough2 [captured tainted] : String | Capture.cs:146:9:146:23 | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | provenance | | +| Capture.cs:146:9:146:23 | [post] access to local function CaptureThrough2 : CaptureThrough2 [captured sink34] : String | Capture.cs:147:15:147:20 | access to local variable sink34 | provenance | | +| Capture.cs:146:9:146:23 | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | Capture.cs:146:9:146:23 | [post] access to local function CaptureThrough2 : CaptureThrough2 [captured sink34] : String | provenance | | +| Capture.cs:150:30:150:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | Capture.cs:155:30:155:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:150:48:154:9 | (...) => ... : (...) => ... [captured tainted] : String | Capture.cs:150:30:150:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:155:30:155:44 | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | Capture.cs:156:15:156:20 | access to local variable sink35 | provenance | | +| Capture.cs:155:30:155:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | Capture.cs:155:30:155:44 | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | provenance | | +| Capture.cs:155:30:155:44 | access to local variable captureThrough3 : Func [captured tainted] : String | Capture.cs:155:30:155:44 | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | provenance | | +| Capture.cs:158:9:161:9 | CaptureThrough4(...) : CaptureThrough4 [captured tainted] : String | Capture.cs:162:22:162:36 | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | provenance | | +| Capture.cs:162:13:162:18 | access to local variable sink36 : String | Capture.cs:163:15:163:20 | access to local variable sink36 | provenance | | +| Capture.cs:162:22:162:36 | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | Capture.cs:162:22:162:38 | call to local function CaptureThrough4 : String | provenance | | +| Capture.cs:162:22:162:38 | call to local function CaptureThrough4 : String | Capture.cs:162:13:162:18 | access to local variable sink36 : String | provenance | | +| Capture.cs:166:37:166:37 | p : String | Capture.cs:168:22:168:22 | access to parameter p : String | provenance | | +| Capture.cs:170:9:170:23 | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | Capture.cs:171:15:171:20 | access to local variable sink37 | provenance | | +| Capture.cs:170:25:170:31 | access to parameter tainted : String | Capture.cs:166:37:166:37 | p : String | provenance | | +| Capture.cs:170:25:170:31 | access to parameter tainted : String | Capture.cs:170:9:170:23 | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | provenance | | +| Capture.cs:190:26:190:26 | s : String | Capture.cs:192:13:192:28 | M(...) : M [captured s] : String | provenance | | +| Capture.cs:190:26:190:26 | s : String | Capture.cs:193:20:193:20 | access to local function M : M [captured s] : String | provenance | | +| Capture.cs:192:13:192:28 | M(...) : M [captured s] : String | Capture.cs:193:20:193:20 | access to local function M : M [captured s] : String | provenance | | +| Capture.cs:193:20:193:20 | access to local function M : M [captured s] : String | Capture.cs:193:20:193:22 | call to local function M : String | provenance | | +| Capture.cs:196:13:196:18 | access to local variable sink38 : String | Capture.cs:197:15:197:20 | access to local variable sink38 | provenance | | +| Capture.cs:196:22:196:32 | call to local function Id : String | Capture.cs:196:13:196:18 | access to local variable sink38 : String | provenance | | +| Capture.cs:196:25:196:31 | access to parameter tainted : String | Capture.cs:190:26:190:26 | s : String | provenance | | +| Capture.cs:196:25:196:31 | access to parameter tainted : String | Capture.cs:196:22:196:32 | call to local function Id : String | provenance | | +| Capture.cs:202:20:202:20 | s : String | Capture.cs:204:20:207:9 | (...) => ... : (...) => ... [captured s] : String | provenance | | +| Capture.cs:202:20:202:20 | s : String | Capture.cs:208:9:208:9 | access to local variable a : Action [captured s] : String | provenance | | +| Capture.cs:204:16:204:16 | access to local variable a : (...) => ... [captured s] : String | Capture.cs:208:9:208:9 | access to local variable a : (...) => ... [captured s] : String | provenance | | +| Capture.cs:204:20:207:9 | (...) => ... : (...) => ... [captured s] : String | Capture.cs:204:16:204:16 | access to local variable a : (...) => ... [captured s] : String | provenance | | +| Capture.cs:208:9:208:9 | access to local variable a : (...) => ... [captured s] : String | Capture.cs:206:19:206:19 | access to parameter s | provenance | | +| Capture.cs:208:9:208:9 | access to local variable a : Action [captured s] : String | Capture.cs:206:19:206:19 | access to parameter s | provenance | | +| Capture.cs:211:21:211:34 | "taint source" : String | Capture.cs:202:20:202:20 | s : String | provenance | | +| Capture.cs:213:22:213:22 | s : String | Capture.cs:215:16:218:9 | (...) => ... : (...) => ... [captured s] : String | provenance | | +| Capture.cs:221:18:221:35 | call to method M3 : (...) => ... [captured s] : String | Capture.cs:217:19:217:19 | access to parameter s | provenance | | +| Capture.cs:221:21:221:34 | "taint source" : String | Capture.cs:213:22:213:22 | s : String | provenance | | +| Capture.cs:221:21:221:34 | "taint source" : String | Capture.cs:221:18:221:35 | call to method M3 : (...) => ... [captured s] : String | provenance | | +| Capture.cs:223:28:223:45 | call to method M3 : (...) => ... [captured s] : String | Capture.cs:350:34:350:34 | a : (...) => ... [captured s] : String | provenance | | +| Capture.cs:223:31:223:44 | "taint source" : String | Capture.cs:213:22:213:22 | s : String | provenance | | +| Capture.cs:223:31:223:44 | "taint source" : String | Capture.cs:223:28:223:45 | call to method M3 : (...) => ... [captured s] : String | provenance | | +| Capture.cs:228:17:228:30 | "taint source" : String | Capture.cs:229:20:233:9 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:228:17:228:30 | "taint source" : String | Capture.cs:234:15:234:15 | access to local variable x | provenance | | +| Capture.cs:229:20:233:9 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:231:19:231:19 | access to local variable x | provenance | | +| Capture.cs:229:20:233:9 | [post] (...) => ... : (...) => ... [captured x] : String | Capture.cs:234:15:234:15 | access to local variable x | provenance | | +| Capture.cs:232:17:232:30 | "taint source" : String | Capture.cs:229:20:233:9 | [post] (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:244:20:248:9 | (...) => ... : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:249:9:249:9 | access to local variable a : Action [captured c, field Field] : String | provenance | | +| Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:251:15:251:15 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:242:19:242:32 | "taint source" : String | Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:244:16:244:16 | access to local variable a : (...) => ... [captured c, field Field] : String | Capture.cs:249:9:249:9 | access to local variable a : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:244:20:248:9 | (...) => ... : (...) => ... [captured c, field Field] : String | Capture.cs:244:16:244:16 | access to local variable a : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:246:19:246:19 | access to local variable c : Capture [field Field] : String | Capture.cs:246:19:246:25 | access to field Field | provenance | | +| Capture.cs:247:13:247:13 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:249:9:249:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:247:23:247:36 | "taint source" : String | Capture.cs:247:13:247:13 | [post] access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:249:9:249:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | Capture.cs:251:15:251:15 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:249:9:249:9 | access to local variable a : (...) => ... [captured c, field Field] : String | Capture.cs:246:19:246:19 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:249:9:249:9 | access to local variable a : Action [captured c, field Field] : String | Capture.cs:246:19:246:19 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:251:15:251:15 | access to local variable c : Capture [field Field] : String | Capture.cs:251:15:251:21 | access to field Field | provenance | | +| Capture.cs:264:13:264:13 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:266:9:266:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:264:23:264:36 | "taint source" : String | Capture.cs:264:13:264:13 | [post] access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:266:9:266:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | Capture.cs:268:15:268:15 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:268:15:268:15 | access to local variable c : Capture [field Field] : String | Capture.cs:268:15:268:21 | access to field Field | provenance | | +| Capture.cs:273:19:273:19 | x : String | Capture.cs:273:30:273:30 | access to parameter x | provenance | | +| Capture.cs:273:34:273:47 | "taint source" : String | Capture.cs:355:45:355:45 | x : String | provenance | | +| Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:280:25:288:9 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:290:9:290:14 | access to local variable middle : Action [captured x] : String | provenance | | +| Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:292:15:292:15 | access to local variable x | provenance | | +| Capture.cs:280:16:280:21 | access to local variable middle : (...) => ... [captured x] : String | Capture.cs:290:9:290:14 | access to local variable middle : (...) => ... [captured x] : String | provenance | | +| Capture.cs:280:25:288:9 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:280:16:280:21 | access to local variable middle : (...) => ... [captured x] : String | provenance | | +| Capture.cs:282:20:282:24 | access to local variable inner : (...) => ... [captured x] : String | Capture.cs:287:13:287:17 | access to local variable inner : (...) => ... [captured x] : String | provenance | | +| Capture.cs:282:28:286:13 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:282:20:282:24 | access to local variable inner : (...) => ... [captured x] : String | provenance | | +| Capture.cs:285:21:285:34 | "taint source" : String | Capture.cs:287:13:287:17 | [post] access to local variable inner : (...) => ... [captured x] : String | provenance | | +| Capture.cs:287:13:287:17 | [post] access to local variable inner : (...) => ... [captured x] : String | Capture.cs:290:9:290:14 | [post] access to local variable middle : (...) => ... [captured x] : String | provenance | | +| Capture.cs:287:13:287:17 | access to local variable inner : (...) => ... [captured x] : String | Capture.cs:284:23:284:23 | access to local variable x | provenance | | +| Capture.cs:287:13:287:17 | access to local variable inner : Action [captured x] : String | Capture.cs:284:23:284:23 | access to local variable x | provenance | | +| Capture.cs:290:9:290:14 | [post] access to local variable middle : (...) => ... [captured x] : String | Capture.cs:292:15:292:15 | access to local variable x | provenance | | +| Capture.cs:290:9:290:14 | access to local variable middle : (...) => ... [captured x] : String | Capture.cs:282:28:286:13 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:290:9:290:14 | access to local variable middle : (...) => ... [captured x] : String | Capture.cs:287:13:287:17 | access to local variable inner : Action [captured x] : String | provenance | | +| Capture.cs:290:9:290:14 | access to local variable middle : Action [captured x] : String | Capture.cs:282:28:286:13 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:290:9:290:14 | access to local variable middle : Action [captured x] : String | Capture.cs:287:13:287:17 | access to local variable inner : Action [captured x] : String | provenance | | +| Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | Capture.cs:299:20:303:9 | (...) => ... : (...) => ... [captured this in M10, field Field] : String | provenance | | +| Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | Capture.cs:304:9:304:9 | access to local variable a : Action [captured this in M10, field Field] : String | provenance | | +| Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | Capture.cs:306:15:306:18 | this access : Capture [field Field] : String | provenance | | +| Capture.cs:297:22:297:35 | "taint source" : String | Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | provenance | | +| Capture.cs:299:16:299:16 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | Capture.cs:304:9:304:9 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | provenance | | +| Capture.cs:299:20:303:9 | (...) => ... : (...) => ... [captured this in M10, field Field] : String | Capture.cs:299:16:299:16 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | provenance | | +| Capture.cs:301:19:301:22 | this access : Capture [field Field] : String | Capture.cs:301:19:301:28 | access to field Field | provenance | | +| Capture.cs:302:13:302:16 | [post] this access : Capture [field Field] : String | Capture.cs:304:9:304:9 | [post] access to local variable a : (...) => ... [captured this in M10, field Field] : String | provenance | | +| Capture.cs:302:26:302:39 | "taint source" : String | Capture.cs:302:13:302:16 | [post] this access : Capture [field Field] : String | provenance | | +| Capture.cs:304:9:304:9 | [post] access to local variable a : (...) => ... [captured this in M10, field Field] : String | Capture.cs:306:15:306:18 | this access : Capture [field Field] : String | provenance | | +| Capture.cs:304:9:304:9 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | Capture.cs:301:19:301:22 | this access : Capture [field Field] : String | provenance | | +| Capture.cs:304:9:304:9 | access to local variable a : Action [captured this in M10, field Field] : String | Capture.cs:301:19:301:22 | this access : Capture [field Field] : String | provenance | | +| Capture.cs:306:15:306:18 | this access : Capture [field Field] : String | Capture.cs:306:15:306:24 | access to field Field | provenance | | +| Capture.cs:311:17:311:30 | "taint source" : String | Capture.cs:312:15:312:15 | access to local variable x | provenance | | +| Capture.cs:318:17:318:30 | "taint source" : String | Capture.cs:319:19:319:19 | access to local variable x | provenance | | +| Capture.cs:328:17:328:30 | "taint source" : String | Capture.cs:330:9:330:49 | CapturedLocalFunction(...) : CapturedLocalFunction [captured x] : String | provenance | | +| Capture.cs:328:17:328:30 | "taint source" : String | Capture.cs:332:9:332:65 | CapturingLocalFunction(...) : CapturingLocalFunction [captured x] : String | provenance | | +| Capture.cs:328:17:328:30 | "taint source" : String | Capture.cs:334:9:334:30 | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | provenance | | +| Capture.cs:330:9:330:49 | CapturedLocalFunction(...) : CapturedLocalFunction [captured x] : String | Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | provenance | | +| Capture.cs:332:9:332:65 | CapturingLocalFunction(...) : CapturingLocalFunction [captured x] : String | Capture.cs:334:9:334:30 | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | provenance | | +| Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | Capture.cs:330:47:330:47 | access to local variable x | provenance | | +| Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | Capture.cs:330:47:330:47 | access to local variable x | provenance | | +| Capture.cs:334:9:334:30 | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | provenance | | +| Capture.cs:339:17:339:30 | "taint source" : String | Capture.cs:341:33:341:46 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:341:33:341:46 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:343:34:343:55 | (...) => ... : (...) => ... [captured capturedLambda, captured x] : String | provenance | | +| Capture.cs:341:33:341:46 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:345:9:345:23 | access to local variable capturingLambda : Action [captured capturedLambda, captured x] : String | provenance | | +| Capture.cs:343:16:343:30 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | Capture.cs:345:9:345:23 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | provenance | | +| Capture.cs:343:34:343:55 | (...) => ... : (...) => ... [captured capturedLambda, captured x] : String | Capture.cs:343:16:343:30 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | provenance | | +| Capture.cs:343:40:343:53 | access to local variable capturedLambda : (...) => ... [captured x] : String | Capture.cs:341:45:341:45 | access to local variable x | provenance | | +| Capture.cs:345:9:345:23 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | Capture.cs:343:40:343:53 | access to local variable capturedLambda : (...) => ... [captured x] : String | provenance | | +| Capture.cs:345:9:345:23 | access to local variable capturingLambda : Action [captured capturedLambda, captured x] : String | Capture.cs:343:40:343:53 | access to local variable capturedLambda : (...) => ... [captured x] : String | provenance | | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured s] : String | Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured s] : String | provenance | | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:352:9:352:9 | [post] access to parameter a : (...) => ... [captured sink40] : String | Capture.cs:114:23:117:13 | [post] (...) => ... : (...) => ... [captured sink40] : String | provenance | | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured s] : String | Capture.cs:217:19:217:19 | access to parameter s | provenance | | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | Capture.cs:55:27:58:17 | (...) => ... : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | Capture.cs:57:27:57:32 | access to parameter sink39 | provenance | | +| Capture.cs:355:45:355:45 | x : String | Capture.cs:357:11:357:11 | access to parameter x : String | provenance | | +| Capture.cs:357:11:357:11 | access to parameter x : String | Capture.cs:273:19:273:19 | x : String | provenance | | | GlobalDataFlow.cs:18:9:18:23 | access to field SinkField0 : String | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | provenance | | | GlobalDataFlow.cs:18:9:18:23 | access to field SinkField0 : String | GlobalDataFlow.cs:26:9:26:26 | access to property SinkProperty0 : String | provenance | | | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:18:9:18:23 | access to field SinkField0 : String | provenance | | @@ -381,42 +519,173 @@ edges | Splitting.cs:48:36:48:49 | "taint source" : String | Splitting.cs:48:13:48:13 | access to local variable s : String | provenance | | nodes | Capture.cs:7:20:7:26 | tainted : String | semmle.label | tainted : String | +| Capture.cs:9:9:13:9 | CaptureIn1(...) : CaptureIn1 [captured tainted] : String | semmle.label | CaptureIn1(...) : CaptureIn1 [captured tainted] : String | | Capture.cs:11:17:11:22 | access to local variable sink27 : String | semmle.label | access to local variable sink27 : String | +| Capture.cs:11:26:11:32 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | | Capture.cs:12:19:12:24 | access to local variable sink27 | semmle.label | access to local variable sink27 | +| Capture.cs:14:9:14:18 | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | semmle.label | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | +| Capture.cs:16:9:24:9 | CaptureIn2(...) : CaptureIn2 [captured tainted] : String | semmle.label | CaptureIn2(...) : CaptureIn2 [captured tainted] : String | +| Capture.cs:18:13:22:13 | M(...) : M [captured tainted] : String | semmle.label | M(...) : M [captured tainted] : String | | Capture.cs:20:21:20:26 | access to local variable sink28 : String | semmle.label | access to local variable sink28 : String | +| Capture.cs:20:30:20:36 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | | Capture.cs:21:23:21:28 | access to local variable sink28 | semmle.label | access to local variable sink28 | +| Capture.cs:23:13:23:13 | access to local function M : M [captured tainted] : String | semmle.label | access to local function M : M [captured tainted] : String | +| Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | semmle.label | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | +| Capture.cs:27:30:27:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | semmle.label | access to local variable captureIn3 : (...) => ... [captured tainted] : String | +| Capture.cs:27:43:32:9 | (...) => ... : (...) => ... [captured tainted] : String | semmle.label | (...) => ... : (...) => ... [captured tainted] : String | | Capture.cs:29:17:29:22 | access to local variable sink29 : String | semmle.label | access to local variable sink29 : String | +| Capture.cs:29:26:29:32 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | | Capture.cs:30:19:30:24 | access to local variable sink29 | semmle.label | access to local variable sink29 | +| Capture.cs:33:30:33:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | semmle.label | access to local variable captureIn3 : (...) => ... [captured tainted] : String | +| Capture.cs:33:30:33:39 | access to local variable captureIn3 : Func [captured tainted] : String | semmle.label | access to local variable captureIn3 : Func [captured tainted] : String | | Capture.cs:50:50:50:55 | sink39 : String | semmle.label | sink39 : String | +| Capture.cs:52:23:59:13 | (...) => ... : (...) => ... [captured sink39] : String | semmle.label | (...) => ... : (...) => ... [captured sink39] : String | +| Capture.cs:55:27:58:17 | (...) => ... : (...) => ... [captured sink39] : String | semmle.label | (...) => ... : (...) => ... [captured sink39] : String | | Capture.cs:57:27:57:32 | access to parameter sink39 | semmle.label | access to parameter sink39 | | Capture.cs:61:36:61:42 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | -| Capture.cs:69:13:69:18 | access to local variable sink30 : String | semmle.label | access to local variable sink30 : String | | Capture.cs:69:22:69:35 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:71:9:71:19 | [post] access to local function CaptureOut1 : CaptureOut1 [captured sink30] : String | semmle.label | [post] access to local function CaptureOut1 : CaptureOut1 [captured sink30] : String | | Capture.cs:72:15:72:20 | access to local variable sink30 | semmle.label | access to local variable sink30 | -| Capture.cs:79:17:79:22 | access to local variable sink31 : String | semmle.label | access to local variable sink31 : String | | Capture.cs:79:26:79:39 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:81:13:81:13 | [post] access to local function M : M [captured sink31] : String | semmle.label | [post] access to local function M : M [captured sink31] : String | +| Capture.cs:83:9:83:19 | [post] access to local function CaptureOut2 : CaptureOut2 [captured sink31] : String | semmle.label | [post] access to local function CaptureOut2 : CaptureOut2 [captured sink31] : String | | Capture.cs:84:15:84:20 | access to local variable sink31 | semmle.label | access to local variable sink31 | -| Capture.cs:89:13:89:18 | access to local variable sink32 : String | semmle.label | access to local variable sink32 : String | | Capture.cs:89:22:89:35 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:92:30:92:40 | [post] access to local variable captureOut3 : (...) => ... [captured sink32] : String | semmle.label | [post] access to local variable captureOut3 : (...) => ... [captured sink32] : String | | Capture.cs:93:15:93:20 | access to local variable sink32 | semmle.label | access to local variable sink32 | -| Capture.cs:115:17:115:22 | access to local variable sink40 : String | semmle.label | access to local variable sink40 : String | -| Capture.cs:115:26:115:39 | "taint source" : String | semmle.label | "taint source" : String | -| Capture.cs:122:15:122:20 | access to local variable sink40 | semmle.label | access to local variable sink40 | -| Capture.cs:125:25:125:31 | tainted : String | semmle.label | tainted : String | -| Capture.cs:133:15:133:20 | access to local variable sink33 | semmle.label | access to local variable sink33 | -| Capture.cs:145:15:145:20 | access to local variable sink34 | semmle.label | access to local variable sink34 | -| Capture.cs:154:15:154:20 | access to local variable sink35 | semmle.label | access to local variable sink35 | -| Capture.cs:160:13:160:18 | access to local variable sink36 : String | semmle.label | access to local variable sink36 : String | -| Capture.cs:160:22:160:38 | call to local function CaptureThrough4 : String | semmle.label | call to local function CaptureThrough4 : String | -| Capture.cs:161:15:161:20 | access to local variable sink36 | semmle.label | access to local variable sink36 | -| Capture.cs:168:25:168:31 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | -| Capture.cs:169:15:169:20 | access to local variable sink37 | semmle.label | access to local variable sink37 | -| Capture.cs:188:26:188:26 | s : String | semmle.label | s : String | -| Capture.cs:191:20:191:22 | call to local function M : String | semmle.label | call to local function M : String | -| Capture.cs:194:13:194:18 | access to local variable sink38 : String | semmle.label | access to local variable sink38 : String | -| Capture.cs:194:22:194:32 | call to local function Id : String | semmle.label | call to local function Id : String | -| Capture.cs:194:25:194:31 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | -| Capture.cs:195:15:195:20 | access to local variable sink38 | semmle.label | access to local variable sink38 | +| Capture.cs:114:23:117:13 | [post] (...) => ... : (...) => ... [captured sink40] : String | semmle.label | [post] (...) => ... : (...) => ... [captured sink40] : String | +| Capture.cs:116:26:116:39 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:123:9:123:33 | [post] access to local function CaptureOutMultipleLambdas : CaptureOutMultipleLambdas [captured sink40] : String | semmle.label | [post] access to local function CaptureOutMultipleLambdas : CaptureOutMultipleLambdas [captured sink40] : String | +| Capture.cs:124:15:124:20 | access to local variable sink40 | semmle.label | access to local variable sink40 | +| Capture.cs:127:25:127:31 | tainted : String | semmle.label | tainted : String | +| Capture.cs:130:9:133:9 | CaptureThrough1(...) : CaptureThrough1 [captured tainted] : String | semmle.label | CaptureThrough1(...) : CaptureThrough1 [captured tainted] : String | +| Capture.cs:134:9:134:23 | [post] access to local function CaptureThrough1 : CaptureThrough1 [captured sink33] : String | semmle.label | [post] access to local function CaptureThrough1 : CaptureThrough1 [captured sink33] : String | +| Capture.cs:134:9:134:23 | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | semmle.label | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | +| Capture.cs:135:15:135:20 | access to local variable sink33 | semmle.label | access to local variable sink33 | +| Capture.cs:138:9:145:9 | CaptureThrough2(...) : CaptureThrough2 [captured tainted] : String | semmle.label | CaptureThrough2(...) : CaptureThrough2 [captured tainted] : String | +| Capture.cs:146:9:146:23 | [post] access to local function CaptureThrough2 : CaptureThrough2 [captured sink34] : String | semmle.label | [post] access to local function CaptureThrough2 : CaptureThrough2 [captured sink34] : String | +| Capture.cs:146:9:146:23 | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | semmle.label | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | +| Capture.cs:147:15:147:20 | access to local variable sink34 | semmle.label | access to local variable sink34 | +| Capture.cs:150:30:150:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | semmle.label | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | +| Capture.cs:150:48:154:9 | (...) => ... : (...) => ... [captured tainted] : String | semmle.label | (...) => ... : (...) => ... [captured tainted] : String | +| Capture.cs:155:30:155:44 | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | semmle.label | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | +| Capture.cs:155:30:155:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | semmle.label | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | +| Capture.cs:155:30:155:44 | access to local variable captureThrough3 : Func [captured tainted] : String | semmle.label | access to local variable captureThrough3 : Func [captured tainted] : String | +| Capture.cs:156:15:156:20 | access to local variable sink35 | semmle.label | access to local variable sink35 | +| Capture.cs:158:9:161:9 | CaptureThrough4(...) : CaptureThrough4 [captured tainted] : String | semmle.label | CaptureThrough4(...) : CaptureThrough4 [captured tainted] : String | +| Capture.cs:162:13:162:18 | access to local variable sink36 : String | semmle.label | access to local variable sink36 : String | +| Capture.cs:162:22:162:36 | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | semmle.label | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | +| Capture.cs:162:22:162:38 | call to local function CaptureThrough4 : String | semmle.label | call to local function CaptureThrough4 : String | +| Capture.cs:163:15:163:20 | access to local variable sink36 | semmle.label | access to local variable sink36 | +| Capture.cs:166:37:166:37 | p : String | semmle.label | p : String | +| Capture.cs:168:22:168:22 | access to parameter p : String | semmle.label | access to parameter p : String | +| Capture.cs:170:9:170:23 | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | semmle.label | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | +| Capture.cs:170:25:170:31 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | +| Capture.cs:171:15:171:20 | access to local variable sink37 | semmle.label | access to local variable sink37 | +| Capture.cs:190:26:190:26 | s : String | semmle.label | s : String | +| Capture.cs:192:13:192:28 | M(...) : M [captured s] : String | semmle.label | M(...) : M [captured s] : String | +| Capture.cs:193:20:193:20 | access to local function M : M [captured s] : String | semmle.label | access to local function M : M [captured s] : String | +| Capture.cs:193:20:193:22 | call to local function M : String | semmle.label | call to local function M : String | +| Capture.cs:196:13:196:18 | access to local variable sink38 : String | semmle.label | access to local variable sink38 : String | +| Capture.cs:196:22:196:32 | call to local function Id : String | semmle.label | call to local function Id : String | +| Capture.cs:196:25:196:31 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | +| Capture.cs:197:15:197:20 | access to local variable sink38 | semmle.label | access to local variable sink38 | +| Capture.cs:202:20:202:20 | s : String | semmle.label | s : String | +| Capture.cs:204:16:204:16 | access to local variable a : (...) => ... [captured s] : String | semmle.label | access to local variable a : (...) => ... [captured s] : String | +| Capture.cs:204:20:207:9 | (...) => ... : (...) => ... [captured s] : String | semmle.label | (...) => ... : (...) => ... [captured s] : String | +| Capture.cs:206:19:206:19 | access to parameter s | semmle.label | access to parameter s | +| Capture.cs:208:9:208:9 | access to local variable a : (...) => ... [captured s] : String | semmle.label | access to local variable a : (...) => ... [captured s] : String | +| Capture.cs:208:9:208:9 | access to local variable a : Action [captured s] : String | semmle.label | access to local variable a : Action [captured s] : String | +| Capture.cs:211:21:211:34 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:213:22:213:22 | s : String | semmle.label | s : String | +| Capture.cs:215:16:218:9 | (...) => ... : (...) => ... [captured s] : String | semmle.label | (...) => ... : (...) => ... [captured s] : String | +| Capture.cs:217:19:217:19 | access to parameter s | semmle.label | access to parameter s | +| Capture.cs:221:18:221:35 | call to method M3 : (...) => ... [captured s] : String | semmle.label | call to method M3 : (...) => ... [captured s] : String | +| Capture.cs:221:21:221:34 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:223:28:223:45 | call to method M3 : (...) => ... [captured s] : String | semmle.label | call to method M3 : (...) => ... [captured s] : String | +| Capture.cs:223:31:223:44 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:228:17:228:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:229:20:233:9 | (...) => ... : (...) => ... [captured x] : String | semmle.label | (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:229:20:233:9 | [post] (...) => ... : (...) => ... [captured x] : String | semmle.label | [post] (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:231:19:231:19 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:232:17:232:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:234:15:234:15 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | semmle.label | [post] access to local variable c : Capture [field Field] : String | +| Capture.cs:242:19:242:32 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:244:16:244:16 | access to local variable a : (...) => ... [captured c, field Field] : String | semmle.label | access to local variable a : (...) => ... [captured c, field Field] : String | +| Capture.cs:244:20:248:9 | (...) => ... : (...) => ... [captured c, field Field] : String | semmle.label | (...) => ... : (...) => ... [captured c, field Field] : String | +| Capture.cs:246:19:246:19 | access to local variable c : Capture [field Field] : String | semmle.label | access to local variable c : Capture [field Field] : String | +| Capture.cs:246:19:246:25 | access to field Field | semmle.label | access to field Field | +| Capture.cs:247:13:247:13 | [post] access to local variable c : Capture [field Field] : String | semmle.label | [post] access to local variable c : Capture [field Field] : String | +| Capture.cs:247:23:247:36 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:249:9:249:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | semmle.label | [post] access to local variable a : (...) => ... [captured c, field Field] : String | +| Capture.cs:249:9:249:9 | access to local variable a : (...) => ... [captured c, field Field] : String | semmle.label | access to local variable a : (...) => ... [captured c, field Field] : String | +| Capture.cs:249:9:249:9 | access to local variable a : Action [captured c, field Field] : String | semmle.label | access to local variable a : Action [captured c, field Field] : String | +| Capture.cs:251:15:251:15 | access to local variable c : Capture [field Field] : String | semmle.label | access to local variable c : Capture [field Field] : String | +| Capture.cs:251:15:251:21 | access to field Field | semmle.label | access to field Field | +| Capture.cs:264:13:264:13 | [post] access to local variable c : Capture [field Field] : String | semmle.label | [post] access to local variable c : Capture [field Field] : String | +| Capture.cs:264:23:264:36 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:266:9:266:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | semmle.label | [post] access to local variable a : (...) => ... [captured c, field Field] : String | +| Capture.cs:268:15:268:15 | access to local variable c : Capture [field Field] : String | semmle.label | access to local variable c : Capture [field Field] : String | +| Capture.cs:268:15:268:21 | access to field Field | semmle.label | access to field Field | +| Capture.cs:273:19:273:19 | x : String | semmle.label | x : String | +| Capture.cs:273:30:273:30 | access to parameter x | semmle.label | access to parameter x | +| Capture.cs:273:34:273:47 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:278:17:278:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:280:16:280:21 | access to local variable middle : (...) => ... [captured x] : String | semmle.label | access to local variable middle : (...) => ... [captured x] : String | +| Capture.cs:280:25:288:9 | (...) => ... : (...) => ... [captured x] : String | semmle.label | (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:282:20:282:24 | access to local variable inner : (...) => ... [captured x] : String | semmle.label | access to local variable inner : (...) => ... [captured x] : String | +| Capture.cs:282:28:286:13 | (...) => ... : (...) => ... [captured x] : String | semmle.label | (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:284:23:284:23 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:285:21:285:34 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:287:13:287:17 | [post] access to local variable inner : (...) => ... [captured x] : String | semmle.label | [post] access to local variable inner : (...) => ... [captured x] : String | +| Capture.cs:287:13:287:17 | access to local variable inner : (...) => ... [captured x] : String | semmle.label | access to local variable inner : (...) => ... [captured x] : String | +| Capture.cs:287:13:287:17 | access to local variable inner : Action [captured x] : String | semmle.label | access to local variable inner : Action [captured x] : String | +| Capture.cs:290:9:290:14 | [post] access to local variable middle : (...) => ... [captured x] : String | semmle.label | [post] access to local variable middle : (...) => ... [captured x] : String | +| Capture.cs:290:9:290:14 | access to local variable middle : (...) => ... [captured x] : String | semmle.label | access to local variable middle : (...) => ... [captured x] : String | +| Capture.cs:290:9:290:14 | access to local variable middle : Action [captured x] : String | semmle.label | access to local variable middle : Action [captured x] : String | +| Capture.cs:292:15:292:15 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | semmle.label | [post] this access : Capture [field Field] : String | +| Capture.cs:297:22:297:35 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:299:16:299:16 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | semmle.label | access to local variable a : (...) => ... [captured this in M10, field Field] : String | +| Capture.cs:299:20:303:9 | (...) => ... : (...) => ... [captured this in M10, field Field] : String | semmle.label | (...) => ... : (...) => ... [captured this in M10, field Field] : String | +| Capture.cs:301:19:301:22 | this access : Capture [field Field] : String | semmle.label | this access : Capture [field Field] : String | +| Capture.cs:301:19:301:28 | access to field Field | semmle.label | access to field Field | +| Capture.cs:302:13:302:16 | [post] this access : Capture [field Field] : String | semmle.label | [post] this access : Capture [field Field] : String | +| Capture.cs:302:26:302:39 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:304:9:304:9 | [post] access to local variable a : (...) => ... [captured this in M10, field Field] : String | semmle.label | [post] access to local variable a : (...) => ... [captured this in M10, field Field] : String | +| Capture.cs:304:9:304:9 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | semmle.label | access to local variable a : (...) => ... [captured this in M10, field Field] : String | +| Capture.cs:304:9:304:9 | access to local variable a : Action [captured this in M10, field Field] : String | semmle.label | access to local variable a : Action [captured this in M10, field Field] : String | +| Capture.cs:306:15:306:18 | this access : Capture [field Field] : String | semmle.label | this access : Capture [field Field] : String | +| Capture.cs:306:15:306:24 | access to field Field | semmle.label | access to field Field | +| Capture.cs:311:17:311:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:312:15:312:15 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:318:17:318:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:319:19:319:19 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:328:17:328:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:330:9:330:49 | CapturedLocalFunction(...) : CapturedLocalFunction [captured x] : String | semmle.label | CapturedLocalFunction(...) : CapturedLocalFunction [captured x] : String | +| Capture.cs:330:47:330:47 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:332:9:332:65 | CapturingLocalFunction(...) : CapturingLocalFunction [captured x] : String | semmle.label | CapturingLocalFunction(...) : CapturingLocalFunction [captured x] : String | +| Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | semmle.label | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | +| Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | semmle.label | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | +| Capture.cs:334:9:334:30 | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | semmle.label | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | +| Capture.cs:339:17:339:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:341:33:341:46 | (...) => ... : (...) => ... [captured x] : String | semmle.label | (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:341:45:341:45 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:343:16:343:30 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | semmle.label | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | +| Capture.cs:343:34:343:55 | (...) => ... : (...) => ... [captured capturedLambda, captured x] : String | semmle.label | (...) => ... : (...) => ... [captured capturedLambda, captured x] : String | +| Capture.cs:343:40:343:53 | access to local variable capturedLambda : (...) => ... [captured x] : String | semmle.label | access to local variable capturedLambda : (...) => ... [captured x] : String | +| Capture.cs:345:9:345:23 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | semmle.label | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | +| Capture.cs:345:9:345:23 | access to local variable capturingLambda : Action [captured capturedLambda, captured x] : String | semmle.label | access to local variable capturingLambda : Action [captured capturedLambda, captured x] : String | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured s] : String | semmle.label | a : (...) => ... [captured s] : String | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | semmle.label | a : (...) => ... [captured sink39] : String | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | semmle.label | a : (...) => ... [captured sink39] : String | +| Capture.cs:352:9:352:9 | [post] access to parameter a : (...) => ... [captured sink40] : String | semmle.label | [post] access to parameter a : (...) => ... [captured sink40] : String | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured s] : String | semmle.label | access to parameter a : (...) => ... [captured s] : String | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | semmle.label | access to parameter a : (...) => ... [captured sink39] : String | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | semmle.label | access to parameter a : (...) => ... [captured sink39] : String | +| Capture.cs:355:45:355:45 | x : String | semmle.label | x : String | +| Capture.cs:357:11:357:11 | access to parameter x : String | semmle.label | access to parameter x : String | | GlobalDataFlow.cs:18:9:18:23 | access to field SinkField0 : String | semmle.label | access to field SinkField0 : String | | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | semmle.label | "taint source" : String | | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | semmle.label | access to field SinkField0 | @@ -720,7 +989,10 @@ nodes | Splitting.cs:50:19:50:19 | access to local variable s | semmle.label | access to local variable s | | Splitting.cs:52:19:52:19 | access to local variable s | semmle.label | access to local variable s | subpaths -| Capture.cs:194:25:194:31 | access to parameter tainted : String | Capture.cs:188:26:188:26 | s : String | Capture.cs:191:20:191:22 | call to local function M : String | Capture.cs:194:22:194:32 | call to local function Id : String | +| Capture.cs:170:25:170:31 | access to parameter tainted : String | Capture.cs:166:37:166:37 | p : String | Capture.cs:168:22:168:22 | access to parameter p : String | Capture.cs:170:9:170:23 | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | +| Capture.cs:196:25:196:31 | access to parameter tainted : String | Capture.cs:190:26:190:26 | s : String | Capture.cs:193:20:193:22 | call to local function M : String | Capture.cs:196:22:196:32 | call to local function Id : String | +| Capture.cs:221:21:221:34 | "taint source" : String | Capture.cs:213:22:213:22 | s : String | Capture.cs:215:16:218:9 | (...) => ... : (...) => ... [captured s] : String | Capture.cs:221:18:221:35 | call to method M3 : (...) => ... [captured s] : String | +| Capture.cs:223:31:223:44 | "taint source" : String | Capture.cs:213:22:213:22 | s : String | Capture.cs:215:16:218:9 | (...) => ... : (...) => ... [captured s] : String | Capture.cs:223:28:223:45 | call to method M3 : (...) => ... [captured s] : String | | GlobalDataFlow.cs:71:28:71:45 | access to property SinkProperty0 : String | GlobalDataFlow.cs:298:26:298:26 | x : String | GlobalDataFlow.cs:301:16:301:41 | ... ? ... : ... : String | GlobalDataFlow.cs:71:21:71:46 | call to method Return : String | | GlobalDataFlow.cs:73:94:73:98 | access to local variable sink0 : String | GlobalDataFlow.cs:298:26:298:26 | x : String | GlobalDataFlow.cs:301:16:301:41 | ... ? ... : ... : String | GlobalDataFlow.cs:73:29:73:101 | call to method Invoke : String | | GlobalDataFlow.cs:76:19:76:23 | access to local variable sink1 : String | GlobalDataFlow.cs:304:32:304:32 | x : String | GlobalDataFlow.cs:306:9:306:9 | access to parameter y : String | GlobalDataFlow.cs:76:30:76:34 | access to local variable sink2 : String | @@ -745,6 +1017,13 @@ subpaths | Splitting.cs:32:15:32:15 | [b (line 24): true] access to local variable x | Splitting.cs:24:28:24:34 | tainted : String | Splitting.cs:32:15:32:15 | [b (line 24): true] access to local variable x | [b (line 24): true] access to local variable x | | Splitting.cs:9:15:9:15 | [b (line 3): false] access to local variable x | Splitting.cs:3:28:3:34 | tainted : String | Splitting.cs:9:15:9:15 | [b (line 3): false] access to local variable x | [b (line 3): false] access to local variable x | | Splitting.cs:9:15:9:15 | [b (line 3): true] access to local variable x | Splitting.cs:3:28:3:34 | tainted : String | Splitting.cs:9:15:9:15 | [b (line 3): true] access to local variable x | [b (line 3): true] access to local variable x | +| Capture.cs:246:19:246:25 | access to field Field | Capture.cs:242:19:242:32 | "taint source" : String | Capture.cs:246:19:246:25 | access to field Field | access to field Field | +| Capture.cs:251:15:251:21 | access to field Field | Capture.cs:242:19:242:32 | "taint source" : String | Capture.cs:251:15:251:21 | access to field Field | access to field Field | +| Capture.cs:251:15:251:21 | access to field Field | Capture.cs:247:23:247:36 | "taint source" : String | Capture.cs:251:15:251:21 | access to field Field | access to field Field | +| Capture.cs:268:15:268:21 | access to field Field | Capture.cs:264:23:264:36 | "taint source" : String | Capture.cs:268:15:268:21 | access to field Field | access to field Field | +| Capture.cs:301:19:301:28 | access to field Field | Capture.cs:297:22:297:35 | "taint source" : String | Capture.cs:301:19:301:28 | access to field Field | access to field Field | +| Capture.cs:306:15:306:24 | access to field Field | Capture.cs:297:22:297:35 | "taint source" : String | Capture.cs:306:15:306:24 | access to field Field | access to field Field | +| Capture.cs:306:15:306:24 | access to field Field | Capture.cs:302:26:302:39 | "taint source" : String | Capture.cs:306:15:306:24 | access to field Field | access to field Field | | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | access to field SinkField0 | | GlobalDataFlow.cs:491:15:491:22 | access to field field | GlobalDataFlow.cs:483:20:483:33 | "taint source" : String | GlobalDataFlow.cs:491:15:491:22 | access to field field | access to field field | | GlobalDataFlow.cs:492:15:492:22 | access to field field | GlobalDataFlow.cs:483:20:483:33 | "taint source" : String | GlobalDataFlow.cs:492:15:492:22 | access to field field | access to field field | @@ -785,14 +1064,14 @@ subpaths | Capture.cs:72:15:72:20 | access to local variable sink30 | Capture.cs:69:22:69:35 | "taint source" : String | Capture.cs:72:15:72:20 | access to local variable sink30 | access to local variable sink30 | | Capture.cs:84:15:84:20 | access to local variable sink31 | Capture.cs:79:26:79:39 | "taint source" : String | Capture.cs:84:15:84:20 | access to local variable sink31 | access to local variable sink31 | | Capture.cs:93:15:93:20 | access to local variable sink32 | Capture.cs:89:22:89:35 | "taint source" : String | Capture.cs:93:15:93:20 | access to local variable sink32 | access to local variable sink32 | -| Capture.cs:133:15:133:20 | access to local variable sink33 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:133:15:133:20 | access to local variable sink33 | access to local variable sink33 | -| Capture.cs:145:15:145:20 | access to local variable sink34 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:145:15:145:20 | access to local variable sink34 | access to local variable sink34 | -| Capture.cs:154:15:154:20 | access to local variable sink35 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:154:15:154:20 | access to local variable sink35 | access to local variable sink35 | -| Capture.cs:161:15:161:20 | access to local variable sink36 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:161:15:161:20 | access to local variable sink36 | access to local variable sink36 | -| Capture.cs:169:15:169:20 | access to local variable sink37 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:169:15:169:20 | access to local variable sink37 | access to local variable sink37 | -| Capture.cs:195:15:195:20 | access to local variable sink38 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:195:15:195:20 | access to local variable sink38 | access to local variable sink38 | +| Capture.cs:135:15:135:20 | access to local variable sink33 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:135:15:135:20 | access to local variable sink33 | access to local variable sink33 | +| Capture.cs:147:15:147:20 | access to local variable sink34 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:147:15:147:20 | access to local variable sink34 | access to local variable sink34 | +| Capture.cs:156:15:156:20 | access to local variable sink35 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:156:15:156:20 | access to local variable sink35 | access to local variable sink35 | +| Capture.cs:163:15:163:20 | access to local variable sink36 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:163:15:163:20 | access to local variable sink36 | access to local variable sink36 | +| Capture.cs:171:15:171:20 | access to local variable sink37 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:171:15:171:20 | access to local variable sink37 | access to local variable sink37 | +| Capture.cs:197:15:197:20 | access to local variable sink38 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:197:15:197:20 | access to local variable sink38 | access to local variable sink38 | | GlobalDataFlow.cs:140:15:140:19 | access to local variable sink4 | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:140:15:140:19 | access to local variable sink4 | access to local variable sink4 | -| Capture.cs:122:15:122:20 | access to local variable sink40 | Capture.cs:115:26:115:39 | "taint source" : String | Capture.cs:122:15:122:20 | access to local variable sink40 | access to local variable sink40 | +| Capture.cs:124:15:124:20 | access to local variable sink40 | Capture.cs:116:26:116:39 | "taint source" : String | Capture.cs:124:15:124:20 | access to local variable sink40 | access to local variable sink40 | | GlobalDataFlow.cs:243:15:243:20 | access to local variable sink41 | GlobalDataFlow.cs:241:35:241:48 | "taint source" : String | GlobalDataFlow.cs:243:15:243:20 | access to local variable sink41 | access to local variable sink41 | | GlobalDataFlow.cs:245:15:245:20 | access to local variable sink42 | GlobalDataFlow.cs:241:35:241:48 | "taint source" : String | GlobalDataFlow.cs:245:15:245:20 | access to local variable sink42 | access to local variable sink42 | | GlobalDataFlow.cs:461:15:461:20 | access to local variable sink45 | GlobalDataFlow.cs:457:35:457:48 | "taint source" : String | GlobalDataFlow.cs:461:15:461:20 | access to local variable sink45 | access to local variable sink45 | @@ -801,8 +1080,21 @@ subpaths | GlobalDataFlow.cs:161:15:161:19 | access to local variable sink7 | GlobalDataFlow.cs:346:13:346:26 | "taint source" : String | GlobalDataFlow.cs:161:15:161:19 | access to local variable sink7 | access to local variable sink7 | | GlobalDataFlow.cs:164:15:164:19 | access to local variable sink8 | GlobalDataFlow.cs:351:13:351:26 | "taint source" : String | GlobalDataFlow.cs:164:15:164:19 | access to local variable sink8 | access to local variable sink8 | | GlobalDataFlow.cs:185:15:185:19 | access to local variable sink9 | GlobalDataFlow.cs:183:35:183:48 | "taint source" : String | GlobalDataFlow.cs:185:15:185:19 | access to local variable sink9 | access to local variable sink9 | +| Capture.cs:231:19:231:19 | access to local variable x | Capture.cs:228:17:228:30 | "taint source" : String | Capture.cs:231:19:231:19 | access to local variable x | access to local variable x | +| Capture.cs:234:15:234:15 | access to local variable x | Capture.cs:228:17:228:30 | "taint source" : String | Capture.cs:234:15:234:15 | access to local variable x | access to local variable x | +| Capture.cs:234:15:234:15 | access to local variable x | Capture.cs:232:17:232:30 | "taint source" : String | Capture.cs:234:15:234:15 | access to local variable x | access to local variable x | +| Capture.cs:284:23:284:23 | access to local variable x | Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:284:23:284:23 | access to local variable x | access to local variable x | +| Capture.cs:292:15:292:15 | access to local variable x | Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:292:15:292:15 | access to local variable x | access to local variable x | +| Capture.cs:292:15:292:15 | access to local variable x | Capture.cs:285:21:285:34 | "taint source" : String | Capture.cs:292:15:292:15 | access to local variable x | access to local variable x | +| Capture.cs:312:15:312:15 | access to local variable x | Capture.cs:311:17:311:30 | "taint source" : String | Capture.cs:312:15:312:15 | access to local variable x | access to local variable x | +| Capture.cs:319:19:319:19 | access to local variable x | Capture.cs:318:17:318:30 | "taint source" : String | Capture.cs:319:19:319:19 | access to local variable x | access to local variable x | +| Capture.cs:330:47:330:47 | access to local variable x | Capture.cs:328:17:328:30 | "taint source" : String | Capture.cs:330:47:330:47 | access to local variable x | access to local variable x | +| Capture.cs:341:45:341:45 | access to local variable x | Capture.cs:339:17:339:30 | "taint source" : String | Capture.cs:341:45:341:45 | access to local variable x | access to local variable x | | Splitting.cs:11:19:11:19 | access to local variable x | Splitting.cs:3:28:3:34 | tainted : String | Splitting.cs:11:19:11:19 | access to local variable x | access to local variable x | | Splitting.cs:34:19:34:19 | access to local variable x | Splitting.cs:24:28:24:34 | tainted : String | Splitting.cs:34:19:34:19 | access to local variable x | access to local variable x | +| Capture.cs:206:19:206:19 | access to parameter s | Capture.cs:211:21:211:34 | "taint source" : String | Capture.cs:206:19:206:19 | access to parameter s | access to parameter s | +| Capture.cs:217:19:217:19 | access to parameter s | Capture.cs:221:21:221:34 | "taint source" : String | Capture.cs:217:19:217:19 | access to parameter s | access to parameter s | +| Capture.cs:217:19:217:19 | access to parameter s | Capture.cs:223:31:223:44 | "taint source" : String | Capture.cs:217:19:217:19 | access to parameter s | access to parameter s | | GlobalDataFlow.cs:469:32:469:32 | access to parameter s | GlobalDataFlow.cs:473:28:473:41 | "taint source" : String | GlobalDataFlow.cs:469:32:469:32 | access to parameter s | access to parameter s | | Capture.cs:57:27:57:32 | access to parameter sink39 | Capture.cs:7:20:7:26 | tainted : String | Capture.cs:57:27:57:32 | access to parameter sink39 | access to parameter sink39 | | GlobalDataFlow.cs:260:15:260:24 | access to parameter sinkParam0 | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:260:15:260:24 | access to parameter sinkParam0 | access to parameter sinkParam0 | @@ -817,5 +1109,6 @@ subpaths | GlobalDataFlow.cs:290:15:290:24 | access to parameter sinkParam7 | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:290:15:290:24 | access to parameter sinkParam7 | access to parameter sinkParam7 | | GlobalDataFlow.cs:317:15:317:24 | access to parameter sinkParam8 | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:317:15:317:24 | access to parameter sinkParam8 | access to parameter sinkParam8 | | GlobalDataFlow.cs:323:15:323:24 | access to parameter sinkParam9 | GlobalDataFlow.cs:211:46:211:59 | "taint source" : String | GlobalDataFlow.cs:323:15:323:24 | access to parameter sinkParam9 | access to parameter sinkParam9 | +| Capture.cs:273:30:273:30 | access to parameter x | Capture.cs:273:34:273:47 | "taint source" : String | Capture.cs:273:30:273:30 | access to parameter x | access to parameter x | | GlobalDataFlow.cs:27:15:27:32 | access to property SinkProperty0 | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:27:15:27:32 | access to property SinkProperty0 | access to property SinkProperty0 | | Splitting.cs:21:21:21:33 | call to method Return | Splitting.cs:24:28:24:34 | tainted : String | Splitting.cs:21:21:21:33 | call to method Return | call to method Return | diff --git a/csharp/ql/test/library-tests/dataflow/global/GetAnOutNode.expected b/csharp/ql/test/library-tests/dataflow/global/GetAnOutNode.expected index 8f6175b67ce..ff1e94029b4 100644 --- a/csharp/ql/test/library-tests/dataflow/global/GetAnOutNode.expected +++ b/csharp/ql/test/library-tests/dataflow/global/GetAnOutNode.expected @@ -1,23 +1,19 @@ | Capture.cs:5:7:5:13 | call to constructor Object | normal | Capture.cs:5:7:5:13 | call to constructor Object | | Capture.cs:33:9:33:40 | call to method Select | normal | Capture.cs:33:9:33:40 | call to method Select | | Capture.cs:33:9:33:50 | call to method ToArray | normal | Capture.cs:33:9:33:50 | call to method ToArray | -| Capture.cs:71:9:71:21 | call to local function CaptureOut1 | captured sink30 | Capture.cs:71:9:71:21 | SSA call def(sink30) | -| Capture.cs:83:9:83:21 | [transitive] call to local function CaptureOut2 | captured sink31 | Capture.cs:83:9:83:21 | SSA call def(sink31) | -| Capture.cs:92:9:92:41 | [transitive] call to method Select | captured sink32 | Capture.cs:92:9:92:41 | SSA call def(sink32) | | Capture.cs:92:9:92:41 | call to method Select | normal | Capture.cs:92:9:92:41 | call to method Select | | Capture.cs:92:9:92:51 | call to method ToArray | normal | Capture.cs:92:9:92:51 | call to method ToArray | -| Capture.cs:121:9:121:35 | [transitive] call to local function CaptureOutMultipleLambdas | captured nonSink0 | Capture.cs:121:9:121:35 | SSA call def(nonSink0) | -| Capture.cs:121:9:121:35 | [transitive] call to local function CaptureOutMultipleLambdas | captured sink40 | Capture.cs:121:9:121:35 | SSA call def(sink40) | -| Capture.cs:132:9:132:25 | call to local function CaptureThrough1 | captured sink33 | Capture.cs:132:9:132:25 | SSA call def(sink33) | -| Capture.cs:144:9:144:25 | [transitive] call to local function CaptureThrough2 | captured sink34 | Capture.cs:144:9:144:25 | SSA call def(sink34) | -| Capture.cs:153:9:153:45 | [transitive] call to method Select | captured sink35 | Capture.cs:153:9:153:45 | SSA call def(sink35) | -| Capture.cs:153:9:153:45 | call to method Select | normal | Capture.cs:153:9:153:45 | call to method Select | -| Capture.cs:153:9:153:55 | call to method ToArray | normal | Capture.cs:153:9:153:55 | call to method ToArray | -| Capture.cs:160:22:160:38 | call to local function CaptureThrough4 | normal | Capture.cs:160:22:160:38 | call to local function CaptureThrough4 | -| Capture.cs:168:9:168:32 | call to local function CaptureThrough5 | captured sink37 | Capture.cs:168:9:168:32 | SSA call def(sink37) | -| Capture.cs:191:20:191:22 | call to local function M | normal | Capture.cs:191:20:191:22 | call to local function M | -| Capture.cs:194:22:194:32 | call to local function Id | normal | Capture.cs:194:22:194:32 | call to local function Id | -| Capture.cs:196:20:196:25 | call to local function Id | normal | Capture.cs:196:20:196:25 | call to local function Id | +| Capture.cs:155:9:155:45 | call to method Select | normal | Capture.cs:155:9:155:45 | call to method Select | +| Capture.cs:155:9:155:55 | call to method ToArray | normal | Capture.cs:155:9:155:55 | call to method ToArray | +| Capture.cs:162:22:162:38 | call to local function CaptureThrough4 | normal | Capture.cs:162:22:162:38 | call to local function CaptureThrough4 | +| Capture.cs:193:20:193:22 | call to local function M | normal | Capture.cs:193:20:193:22 | call to local function M | +| Capture.cs:196:22:196:32 | call to local function Id | normal | Capture.cs:196:22:196:32 | call to local function Id | +| Capture.cs:198:20:198:25 | call to local function Id | normal | Capture.cs:198:20:198:25 | call to local function Id | +| Capture.cs:221:18:221:35 | call to method M3 | normal | Capture.cs:221:18:221:35 | call to method M3 | +| Capture.cs:223:28:223:45 | call to method M3 | normal | Capture.cs:223:28:223:45 | call to method M3 | +| Capture.cs:227:24:227:48 | object creation of type List | normal | Capture.cs:227:24:227:48 | object creation of type List | +| Capture.cs:241:17:241:29 | object creation of type Capture | normal | Capture.cs:241:17:241:29 | object creation of type Capture | +| Capture.cs:256:17:256:29 | object creation of type Capture | normal | Capture.cs:256:17:256:29 | object creation of type Capture | | GlobalDataFlow.cs:13:14:13:21 | call to constructor Object | normal | GlobalDataFlow.cs:13:14:13:21 | call to constructor Object | | GlobalDataFlow.cs:26:9:26:26 | access to property SinkProperty0 | normal | GlobalDataFlow.cs:26:9:26:26 | access to property SinkProperty0 | | GlobalDataFlow.cs:27:15:27:32 | access to property SinkProperty0 | normal | GlobalDataFlow.cs:27:15:27:32 | access to property SinkProperty0 | diff --git a/csharp/ql/test/library-tests/dataflow/global/TaintTracking.expected b/csharp/ql/test/library-tests/dataflow/global/TaintTracking.expected index 9a2ea6bd3da..b83832f48a6 100644 --- a/csharp/ql/test/library-tests/dataflow/global/TaintTracking.expected +++ b/csharp/ql/test/library-tests/dataflow/global/TaintTracking.expected @@ -5,13 +5,29 @@ | Capture.cs:72:15:72:20 | access to local variable sink30 | | Capture.cs:84:15:84:20 | access to local variable sink31 | | Capture.cs:93:15:93:20 | access to local variable sink32 | -| Capture.cs:122:15:122:20 | access to local variable sink40 | -| Capture.cs:133:15:133:20 | access to local variable sink33 | -| Capture.cs:145:15:145:20 | access to local variable sink34 | -| Capture.cs:154:15:154:20 | access to local variable sink35 | -| Capture.cs:161:15:161:20 | access to local variable sink36 | -| Capture.cs:169:15:169:20 | access to local variable sink37 | -| Capture.cs:195:15:195:20 | access to local variable sink38 | +| Capture.cs:124:15:124:20 | access to local variable sink40 | +| Capture.cs:135:15:135:20 | access to local variable sink33 | +| Capture.cs:147:15:147:20 | access to local variable sink34 | +| Capture.cs:156:15:156:20 | access to local variable sink35 | +| Capture.cs:163:15:163:20 | access to local variable sink36 | +| Capture.cs:171:15:171:20 | access to local variable sink37 | +| Capture.cs:197:15:197:20 | access to local variable sink38 | +| Capture.cs:206:19:206:19 | access to parameter s | +| Capture.cs:217:19:217:19 | access to parameter s | +| Capture.cs:231:19:231:19 | access to local variable x | +| Capture.cs:234:15:234:15 | access to local variable x | +| Capture.cs:246:19:246:25 | access to field Field | +| Capture.cs:251:15:251:21 | access to field Field | +| Capture.cs:268:15:268:21 | access to field Field | +| Capture.cs:273:30:273:30 | access to parameter x | +| Capture.cs:284:23:284:23 | access to local variable x | +| Capture.cs:292:15:292:15 | access to local variable x | +| Capture.cs:301:19:301:28 | access to field Field | +| Capture.cs:306:15:306:24 | access to field Field | +| Capture.cs:312:15:312:15 | access to local variable x | +| Capture.cs:319:19:319:19 | access to local variable x | +| Capture.cs:330:47:330:47 | access to local variable x | +| Capture.cs:341:45:341:45 | access to local variable x | | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | | GlobalDataFlow.cs:27:15:27:32 | access to property SinkProperty0 | | GlobalDataFlow.cs:45:50:45:59 | access to parameter sinkParam2 | diff --git a/csharp/ql/test/library-tests/dataflow/global/TaintTrackingPath.expected b/csharp/ql/test/library-tests/dataflow/global/TaintTrackingPath.expected index 1a8330776ab..2bd30574649 100644 --- a/csharp/ql/test/library-tests/dataflow/global/TaintTrackingPath.expected +++ b/csharp/ql/test/library-tests/dataflow/global/TaintTrackingPath.expected @@ -1,35 +1,173 @@ edges -| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:11:17:11:22 | access to local variable sink27 : String | provenance | | -| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:20:21:20:26 | access to local variable sink28 : String | provenance | | -| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:29:17:29:22 | access to local variable sink29 : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:9:9:13:9 | CaptureIn1(...) : CaptureIn1 [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:14:9:14:18 | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:16:9:24:9 | CaptureIn2(...) : CaptureIn2 [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:27:43:32:9 | (...) => ... : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:7:20:7:26 | tainted : String | Capture.cs:33:30:33:39 | access to local variable captureIn3 : Func [captured tainted] : String | provenance | | | Capture.cs:7:20:7:26 | tainted : String | Capture.cs:61:36:61:42 | access to parameter tainted : String | provenance | | +| Capture.cs:9:9:13:9 | CaptureIn1(...) : CaptureIn1 [captured tainted] : String | Capture.cs:14:9:14:18 | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | provenance | | | Capture.cs:11:17:11:22 | access to local variable sink27 : String | Capture.cs:12:19:12:24 | access to local variable sink27 | provenance | | +| Capture.cs:11:26:11:32 | access to parameter tainted : String | Capture.cs:11:17:11:22 | access to local variable sink27 : String | provenance | | +| Capture.cs:14:9:14:18 | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | Capture.cs:11:26:11:32 | access to parameter tainted : String | provenance | | +| Capture.cs:16:9:24:9 | CaptureIn2(...) : CaptureIn2 [captured tainted] : String | Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | provenance | | +| Capture.cs:18:13:22:13 | M(...) : M [captured tainted] : String | Capture.cs:23:13:23:13 | access to local function M : M [captured tainted] : String | provenance | | | Capture.cs:20:21:20:26 | access to local variable sink28 : String | Capture.cs:21:23:21:28 | access to local variable sink28 | provenance | | +| Capture.cs:20:30:20:36 | access to parameter tainted : String | Capture.cs:20:21:20:26 | access to local variable sink28 : String | provenance | | +| Capture.cs:23:13:23:13 | access to local function M : M [captured tainted] : String | Capture.cs:20:30:20:36 | access to parameter tainted : String | provenance | | +| Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | Capture.cs:18:13:22:13 | M(...) : M [captured tainted] : String | provenance | | +| Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | Capture.cs:23:13:23:13 | access to local function M : M [captured tainted] : String | provenance | | +| Capture.cs:27:30:27:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | Capture.cs:33:30:33:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:27:43:32:9 | (...) => ... : (...) => ... [captured tainted] : String | Capture.cs:27:30:27:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | provenance | | | Capture.cs:29:17:29:22 | access to local variable sink29 : String | Capture.cs:30:19:30:24 | access to local variable sink29 | provenance | | -| Capture.cs:50:50:50:55 | sink39 : String | Capture.cs:57:27:57:32 | access to parameter sink39 | provenance | | +| Capture.cs:29:26:29:32 | access to parameter tainted : String | Capture.cs:29:17:29:22 | access to local variable sink29 : String | provenance | | +| Capture.cs:33:30:33:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | Capture.cs:29:26:29:32 | access to parameter tainted : String | provenance | | +| Capture.cs:33:30:33:39 | access to local variable captureIn3 : Func [captured tainted] : String | Capture.cs:29:26:29:32 | access to parameter tainted : String | provenance | | +| Capture.cs:50:50:50:55 | sink39 : String | Capture.cs:52:23:59:13 | (...) => ... : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:52:23:59:13 | (...) => ... : (...) => ... [captured sink39] : String | Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:55:27:58:17 | (...) => ... : (...) => ... [captured sink39] : String | Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | provenance | | | Capture.cs:61:36:61:42 | access to parameter tainted : String | Capture.cs:50:50:50:55 | sink39 : String | provenance | | -| Capture.cs:69:13:69:18 | access to local variable sink30 : String | Capture.cs:72:15:72:20 | access to local variable sink30 | provenance | | -| Capture.cs:69:22:69:35 | "taint source" : String | Capture.cs:69:13:69:18 | access to local variable sink30 : String | provenance | | -| Capture.cs:79:17:79:22 | access to local variable sink31 : String | Capture.cs:84:15:84:20 | access to local variable sink31 | provenance | | -| Capture.cs:79:26:79:39 | "taint source" : String | Capture.cs:79:17:79:22 | access to local variable sink31 : String | provenance | | -| Capture.cs:89:13:89:18 | access to local variable sink32 : String | Capture.cs:93:15:93:20 | access to local variable sink32 | provenance | | -| Capture.cs:89:22:89:35 | "taint source" : String | Capture.cs:89:13:89:18 | access to local variable sink32 : String | provenance | | -| Capture.cs:115:17:115:22 | access to local variable sink40 : String | Capture.cs:122:15:122:20 | access to local variable sink40 | provenance | | -| Capture.cs:115:26:115:39 | "taint source" : String | Capture.cs:115:17:115:22 | access to local variable sink40 : String | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:133:15:133:20 | access to local variable sink33 | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:145:15:145:20 | access to local variable sink34 | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:154:15:154:20 | access to local variable sink35 | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:160:22:160:38 | call to local function CaptureThrough4 : String | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:168:25:168:31 | access to parameter tainted : String | provenance | | -| Capture.cs:125:25:125:31 | tainted : String | Capture.cs:194:25:194:31 | access to parameter tainted : String | provenance | | -| Capture.cs:160:13:160:18 | access to local variable sink36 : String | Capture.cs:161:15:161:20 | access to local variable sink36 | provenance | | -| Capture.cs:160:22:160:38 | call to local function CaptureThrough4 : String | Capture.cs:160:13:160:18 | access to local variable sink36 : String | provenance | | -| Capture.cs:168:25:168:31 | access to parameter tainted : String | Capture.cs:169:15:169:20 | access to local variable sink37 | provenance | | -| Capture.cs:188:26:188:26 | s : String | Capture.cs:191:20:191:22 | call to local function M : String | provenance | | -| Capture.cs:194:13:194:18 | access to local variable sink38 : String | Capture.cs:195:15:195:20 | access to local variable sink38 | provenance | | -| Capture.cs:194:22:194:32 | call to local function Id : String | Capture.cs:194:13:194:18 | access to local variable sink38 : String | provenance | | -| Capture.cs:194:25:194:31 | access to parameter tainted : String | Capture.cs:188:26:188:26 | s : String | provenance | | -| Capture.cs:194:25:194:31 | access to parameter tainted : String | Capture.cs:194:22:194:32 | call to local function Id : String | provenance | | +| Capture.cs:69:22:69:35 | "taint source" : String | Capture.cs:71:9:71:19 | [post] access to local function CaptureOut1 : CaptureOut1 [captured sink30] : String | provenance | | +| Capture.cs:71:9:71:19 | [post] access to local function CaptureOut1 : CaptureOut1 [captured sink30] : String | Capture.cs:72:15:72:20 | access to local variable sink30 | provenance | | +| Capture.cs:79:26:79:39 | "taint source" : String | Capture.cs:81:13:81:13 | [post] access to local function M : M [captured sink31] : String | provenance | | +| Capture.cs:81:13:81:13 | [post] access to local function M : M [captured sink31] : String | Capture.cs:83:9:83:19 | [post] access to local function CaptureOut2 : CaptureOut2 [captured sink31] : String | provenance | | +| Capture.cs:83:9:83:19 | [post] access to local function CaptureOut2 : CaptureOut2 [captured sink31] : String | Capture.cs:84:15:84:20 | access to local variable sink31 | provenance | | +| Capture.cs:89:22:89:35 | "taint source" : String | Capture.cs:92:30:92:40 | [post] access to local variable captureOut3 : (...) => ... [captured sink32] : String | provenance | | +| Capture.cs:92:30:92:40 | [post] access to local variable captureOut3 : (...) => ... [captured sink32] : String | Capture.cs:93:15:93:20 | access to local variable sink32 | provenance | | +| Capture.cs:114:23:117:13 | [post] (...) => ... : (...) => ... [captured sink40] : String | Capture.cs:123:9:123:33 | [post] access to local function CaptureOutMultipleLambdas : CaptureOutMultipleLambdas [captured sink40] : String | provenance | | +| Capture.cs:116:26:116:39 | "taint source" : String | Capture.cs:352:9:352:9 | [post] access to parameter a : (...) => ... [captured sink40] : String | provenance | | +| Capture.cs:123:9:123:33 | [post] access to local function CaptureOutMultipleLambdas : CaptureOutMultipleLambdas [captured sink40] : String | Capture.cs:124:15:124:20 | access to local variable sink40 | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:130:9:133:9 | CaptureThrough1(...) : CaptureThrough1 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:134:9:134:23 | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:138:9:145:9 | CaptureThrough2(...) : CaptureThrough2 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:146:9:146:23 | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:150:48:154:9 | (...) => ... : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:155:30:155:44 | access to local variable captureThrough3 : Func [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:158:9:161:9 | CaptureThrough4(...) : CaptureThrough4 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:162:22:162:36 | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:170:25:170:31 | access to parameter tainted : String | provenance | | +| Capture.cs:127:25:127:31 | tainted : String | Capture.cs:196:25:196:31 | access to parameter tainted : String | provenance | | +| Capture.cs:130:9:133:9 | CaptureThrough1(...) : CaptureThrough1 [captured tainted] : String | Capture.cs:134:9:134:23 | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | provenance | | +| Capture.cs:134:9:134:23 | [post] access to local function CaptureThrough1 : CaptureThrough1 [captured sink33] : String | Capture.cs:135:15:135:20 | access to local variable sink33 | provenance | | +| Capture.cs:134:9:134:23 | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | Capture.cs:134:9:134:23 | [post] access to local function CaptureThrough1 : CaptureThrough1 [captured sink33] : String | provenance | | +| Capture.cs:138:9:145:9 | CaptureThrough2(...) : CaptureThrough2 [captured tainted] : String | Capture.cs:146:9:146:23 | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | provenance | | +| Capture.cs:146:9:146:23 | [post] access to local function CaptureThrough2 : CaptureThrough2 [captured sink34] : String | Capture.cs:147:15:147:20 | access to local variable sink34 | provenance | | +| Capture.cs:146:9:146:23 | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | Capture.cs:146:9:146:23 | [post] access to local function CaptureThrough2 : CaptureThrough2 [captured sink34] : String | provenance | | +| Capture.cs:150:30:150:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | Capture.cs:155:30:155:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:150:48:154:9 | (...) => ... : (...) => ... [captured tainted] : String | Capture.cs:150:30:150:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | provenance | | +| Capture.cs:155:30:155:44 | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | Capture.cs:156:15:156:20 | access to local variable sink35 | provenance | | +| Capture.cs:155:30:155:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | Capture.cs:155:30:155:44 | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | provenance | | +| Capture.cs:155:30:155:44 | access to local variable captureThrough3 : Func [captured tainted] : String | Capture.cs:155:30:155:44 | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | provenance | | +| Capture.cs:158:9:161:9 | CaptureThrough4(...) : CaptureThrough4 [captured tainted] : String | Capture.cs:162:22:162:36 | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | provenance | | +| Capture.cs:162:13:162:18 | access to local variable sink36 : String | Capture.cs:163:15:163:20 | access to local variable sink36 | provenance | | +| Capture.cs:162:22:162:36 | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | Capture.cs:162:22:162:38 | call to local function CaptureThrough4 : String | provenance | | +| Capture.cs:162:22:162:38 | call to local function CaptureThrough4 : String | Capture.cs:162:13:162:18 | access to local variable sink36 : String | provenance | | +| Capture.cs:166:37:166:37 | p : String | Capture.cs:168:22:168:22 | access to parameter p : String | provenance | | +| Capture.cs:170:9:170:23 | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | Capture.cs:171:15:171:20 | access to local variable sink37 | provenance | | +| Capture.cs:170:25:170:31 | access to parameter tainted : String | Capture.cs:166:37:166:37 | p : String | provenance | | +| Capture.cs:170:25:170:31 | access to parameter tainted : String | Capture.cs:170:9:170:23 | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | provenance | | +| Capture.cs:190:26:190:26 | s : String | Capture.cs:192:13:192:28 | M(...) : M [captured s] : String | provenance | | +| Capture.cs:190:26:190:26 | s : String | Capture.cs:193:20:193:20 | access to local function M : M [captured s] : String | provenance | | +| Capture.cs:192:13:192:28 | M(...) : M [captured s] : String | Capture.cs:193:20:193:20 | access to local function M : M [captured s] : String | provenance | | +| Capture.cs:193:20:193:20 | access to local function M : M [captured s] : String | Capture.cs:193:20:193:22 | call to local function M : String | provenance | | +| Capture.cs:196:13:196:18 | access to local variable sink38 : String | Capture.cs:197:15:197:20 | access to local variable sink38 | provenance | | +| Capture.cs:196:22:196:32 | call to local function Id : String | Capture.cs:196:13:196:18 | access to local variable sink38 : String | provenance | | +| Capture.cs:196:25:196:31 | access to parameter tainted : String | Capture.cs:190:26:190:26 | s : String | provenance | | +| Capture.cs:196:25:196:31 | access to parameter tainted : String | Capture.cs:196:22:196:32 | call to local function Id : String | provenance | | +| Capture.cs:202:20:202:20 | s : String | Capture.cs:204:20:207:9 | (...) => ... : (...) => ... [captured s] : String | provenance | | +| Capture.cs:202:20:202:20 | s : String | Capture.cs:208:9:208:9 | access to local variable a : Action [captured s] : String | provenance | | +| Capture.cs:204:16:204:16 | access to local variable a : (...) => ... [captured s] : String | Capture.cs:208:9:208:9 | access to local variable a : (...) => ... [captured s] : String | provenance | | +| Capture.cs:204:20:207:9 | (...) => ... : (...) => ... [captured s] : String | Capture.cs:204:16:204:16 | access to local variable a : (...) => ... [captured s] : String | provenance | | +| Capture.cs:208:9:208:9 | access to local variable a : (...) => ... [captured s] : String | Capture.cs:206:19:206:19 | access to parameter s | provenance | | +| Capture.cs:208:9:208:9 | access to local variable a : Action [captured s] : String | Capture.cs:206:19:206:19 | access to parameter s | provenance | | +| Capture.cs:211:21:211:34 | "taint source" : String | Capture.cs:202:20:202:20 | s : String | provenance | | +| Capture.cs:213:22:213:22 | s : String | Capture.cs:215:16:218:9 | (...) => ... : (...) => ... [captured s] : String | provenance | | +| Capture.cs:221:18:221:35 | call to method M3 : (...) => ... [captured s] : String | Capture.cs:217:19:217:19 | access to parameter s | provenance | | +| Capture.cs:221:21:221:34 | "taint source" : String | Capture.cs:213:22:213:22 | s : String | provenance | | +| Capture.cs:221:21:221:34 | "taint source" : String | Capture.cs:221:18:221:35 | call to method M3 : (...) => ... [captured s] : String | provenance | | +| Capture.cs:223:28:223:45 | call to method M3 : (...) => ... [captured s] : String | Capture.cs:350:34:350:34 | a : (...) => ... [captured s] : String | provenance | | +| Capture.cs:223:31:223:44 | "taint source" : String | Capture.cs:213:22:213:22 | s : String | provenance | | +| Capture.cs:223:31:223:44 | "taint source" : String | Capture.cs:223:28:223:45 | call to method M3 : (...) => ... [captured s] : String | provenance | | +| Capture.cs:228:17:228:30 | "taint source" : String | Capture.cs:229:20:233:9 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:228:17:228:30 | "taint source" : String | Capture.cs:234:15:234:15 | access to local variable x | provenance | | +| Capture.cs:229:20:233:9 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:231:19:231:19 | access to local variable x | provenance | | +| Capture.cs:229:20:233:9 | [post] (...) => ... : (...) => ... [captured x] : String | Capture.cs:234:15:234:15 | access to local variable x | provenance | | +| Capture.cs:232:17:232:30 | "taint source" : String | Capture.cs:229:20:233:9 | [post] (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:244:20:248:9 | (...) => ... : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:249:9:249:9 | access to local variable a : Action [captured c, field Field] : String | provenance | | +| Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:251:15:251:15 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:242:19:242:32 | "taint source" : String | Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:244:16:244:16 | access to local variable a : (...) => ... [captured c, field Field] : String | Capture.cs:249:9:249:9 | access to local variable a : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:244:20:248:9 | (...) => ... : (...) => ... [captured c, field Field] : String | Capture.cs:244:16:244:16 | access to local variable a : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:246:19:246:19 | access to local variable c : Capture [field Field] : String | Capture.cs:246:19:246:25 | access to field Field | provenance | | +| Capture.cs:247:13:247:13 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:249:9:249:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:247:23:247:36 | "taint source" : String | Capture.cs:247:13:247:13 | [post] access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:249:9:249:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | Capture.cs:251:15:251:15 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:249:9:249:9 | access to local variable a : (...) => ... [captured c, field Field] : String | Capture.cs:246:19:246:19 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:249:9:249:9 | access to local variable a : Action [captured c, field Field] : String | Capture.cs:246:19:246:19 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:251:15:251:15 | access to local variable c : Capture [field Field] : String | Capture.cs:251:15:251:21 | access to field Field | provenance | | +| Capture.cs:264:13:264:13 | [post] access to local variable c : Capture [field Field] : String | Capture.cs:266:9:266:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | provenance | | +| Capture.cs:264:23:264:36 | "taint source" : String | Capture.cs:264:13:264:13 | [post] access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:266:9:266:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | Capture.cs:268:15:268:15 | access to local variable c : Capture [field Field] : String | provenance | | +| Capture.cs:268:15:268:15 | access to local variable c : Capture [field Field] : String | Capture.cs:268:15:268:21 | access to field Field | provenance | | +| Capture.cs:273:19:273:19 | x : String | Capture.cs:273:30:273:30 | access to parameter x | provenance | | +| Capture.cs:273:34:273:47 | "taint source" : String | Capture.cs:355:45:355:45 | x : String | provenance | | +| Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:280:25:288:9 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:290:9:290:14 | access to local variable middle : Action [captured x] : String | provenance | | +| Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:292:15:292:15 | access to local variable x | provenance | | +| Capture.cs:280:16:280:21 | access to local variable middle : (...) => ... [captured x] : String | Capture.cs:290:9:290:14 | access to local variable middle : (...) => ... [captured x] : String | provenance | | +| Capture.cs:280:25:288:9 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:280:16:280:21 | access to local variable middle : (...) => ... [captured x] : String | provenance | | +| Capture.cs:282:20:282:24 | access to local variable inner : (...) => ... [captured x] : String | Capture.cs:287:13:287:17 | access to local variable inner : (...) => ... [captured x] : String | provenance | | +| Capture.cs:282:28:286:13 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:282:20:282:24 | access to local variable inner : (...) => ... [captured x] : String | provenance | | +| Capture.cs:285:21:285:34 | "taint source" : String | Capture.cs:287:13:287:17 | [post] access to local variable inner : (...) => ... [captured x] : String | provenance | | +| Capture.cs:287:13:287:17 | [post] access to local variable inner : (...) => ... [captured x] : String | Capture.cs:290:9:290:14 | [post] access to local variable middle : (...) => ... [captured x] : String | provenance | | +| Capture.cs:287:13:287:17 | access to local variable inner : (...) => ... [captured x] : String | Capture.cs:284:23:284:23 | access to local variable x | provenance | | +| Capture.cs:287:13:287:17 | access to local variable inner : Action [captured x] : String | Capture.cs:284:23:284:23 | access to local variable x | provenance | | +| Capture.cs:290:9:290:14 | [post] access to local variable middle : (...) => ... [captured x] : String | Capture.cs:292:15:292:15 | access to local variable x | provenance | | +| Capture.cs:290:9:290:14 | access to local variable middle : (...) => ... [captured x] : String | Capture.cs:282:28:286:13 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:290:9:290:14 | access to local variable middle : (...) => ... [captured x] : String | Capture.cs:287:13:287:17 | access to local variable inner : Action [captured x] : String | provenance | | +| Capture.cs:290:9:290:14 | access to local variable middle : Action [captured x] : String | Capture.cs:282:28:286:13 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:290:9:290:14 | access to local variable middle : Action [captured x] : String | Capture.cs:287:13:287:17 | access to local variable inner : Action [captured x] : String | provenance | | +| Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | Capture.cs:299:20:303:9 | (...) => ... : (...) => ... [captured this in M10, field Field] : String | provenance | | +| Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | Capture.cs:304:9:304:9 | access to local variable a : Action [captured this in M10, field Field] : String | provenance | | +| Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | Capture.cs:306:15:306:18 | this access : Capture [field Field] : String | provenance | | +| Capture.cs:297:22:297:35 | "taint source" : String | Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | provenance | | +| Capture.cs:299:16:299:16 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | Capture.cs:304:9:304:9 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | provenance | | +| Capture.cs:299:20:303:9 | (...) => ... : (...) => ... [captured this in M10, field Field] : String | Capture.cs:299:16:299:16 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | provenance | | +| Capture.cs:301:19:301:22 | this access : Capture [field Field] : String | Capture.cs:301:19:301:28 | access to field Field | provenance | | +| Capture.cs:302:13:302:16 | [post] this access : Capture [field Field] : String | Capture.cs:304:9:304:9 | [post] access to local variable a : (...) => ... [captured this in M10, field Field] : String | provenance | | +| Capture.cs:302:26:302:39 | "taint source" : String | Capture.cs:302:13:302:16 | [post] this access : Capture [field Field] : String | provenance | | +| Capture.cs:304:9:304:9 | [post] access to local variable a : (...) => ... [captured this in M10, field Field] : String | Capture.cs:306:15:306:18 | this access : Capture [field Field] : String | provenance | | +| Capture.cs:304:9:304:9 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | Capture.cs:301:19:301:22 | this access : Capture [field Field] : String | provenance | | +| Capture.cs:304:9:304:9 | access to local variable a : Action [captured this in M10, field Field] : String | Capture.cs:301:19:301:22 | this access : Capture [field Field] : String | provenance | | +| Capture.cs:306:15:306:18 | this access : Capture [field Field] : String | Capture.cs:306:15:306:24 | access to field Field | provenance | | +| Capture.cs:311:17:311:30 | "taint source" : String | Capture.cs:312:15:312:15 | access to local variable x | provenance | | +| Capture.cs:318:17:318:30 | "taint source" : String | Capture.cs:319:19:319:19 | access to local variable x | provenance | | +| Capture.cs:328:17:328:30 | "taint source" : String | Capture.cs:330:9:330:49 | CapturedLocalFunction(...) : CapturedLocalFunction [captured x] : String | provenance | | +| Capture.cs:328:17:328:30 | "taint source" : String | Capture.cs:332:9:332:65 | CapturingLocalFunction(...) : CapturingLocalFunction [captured x] : String | provenance | | +| Capture.cs:328:17:328:30 | "taint source" : String | Capture.cs:334:9:334:30 | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | provenance | | +| Capture.cs:330:9:330:49 | CapturedLocalFunction(...) : CapturedLocalFunction [captured x] : String | Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | provenance | | +| Capture.cs:332:9:332:65 | CapturingLocalFunction(...) : CapturingLocalFunction [captured x] : String | Capture.cs:334:9:334:30 | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | provenance | | +| Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | Capture.cs:330:47:330:47 | access to local variable x | provenance | | +| Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | Capture.cs:330:47:330:47 | access to local variable x | provenance | | +| Capture.cs:334:9:334:30 | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | provenance | | +| Capture.cs:339:17:339:30 | "taint source" : String | Capture.cs:341:33:341:46 | (...) => ... : (...) => ... [captured x] : String | provenance | | +| Capture.cs:341:33:341:46 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:343:34:343:55 | (...) => ... : (...) => ... [captured capturedLambda, captured x] : String | provenance | | +| Capture.cs:341:33:341:46 | (...) => ... : (...) => ... [captured x] : String | Capture.cs:345:9:345:23 | access to local variable capturingLambda : Action [captured capturedLambda, captured x] : String | provenance | | +| Capture.cs:343:16:343:30 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | Capture.cs:345:9:345:23 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | provenance | | +| Capture.cs:343:34:343:55 | (...) => ... : (...) => ... [captured capturedLambda, captured x] : String | Capture.cs:343:16:343:30 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | provenance | | +| Capture.cs:343:40:343:53 | access to local variable capturedLambda : (...) => ... [captured x] : String | Capture.cs:341:45:341:45 | access to local variable x | provenance | | +| Capture.cs:345:9:345:23 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | Capture.cs:343:40:343:53 | access to local variable capturedLambda : (...) => ... [captured x] : String | provenance | | +| Capture.cs:345:9:345:23 | access to local variable capturingLambda : Action [captured capturedLambda, captured x] : String | Capture.cs:343:40:343:53 | access to local variable capturedLambda : (...) => ... [captured x] : String | provenance | | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured s] : String | Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured s] : String | provenance | | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:352:9:352:9 | [post] access to parameter a : (...) => ... [captured sink40] : String | Capture.cs:114:23:117:13 | [post] (...) => ... : (...) => ... [captured sink40] : String | provenance | | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured s] : String | Capture.cs:217:19:217:19 | access to parameter s | provenance | | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | Capture.cs:55:27:58:17 | (...) => ... : (...) => ... [captured sink39] : String | provenance | | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | Capture.cs:57:27:57:32 | access to parameter sink39 | provenance | | +| Capture.cs:355:45:355:45 | x : String | Capture.cs:357:11:357:11 | access to parameter x : String | provenance | | +| Capture.cs:357:11:357:11 | access to parameter x : String | Capture.cs:273:19:273:19 | x : String | provenance | | | GlobalDataFlow.cs:18:9:18:23 | access to field SinkField0 : String | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | provenance | | | GlobalDataFlow.cs:18:9:18:23 | access to field SinkField0 : String | GlobalDataFlow.cs:26:9:26:26 | access to property SinkProperty0 : String | provenance | | | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:18:9:18:23 | access to field SinkField0 : String | provenance | | @@ -431,42 +569,173 @@ edges | Splitting.cs:48:36:48:49 | "taint source" : String | Splitting.cs:48:13:48:13 | access to local variable s : String | provenance | | nodes | Capture.cs:7:20:7:26 | tainted : String | semmle.label | tainted : String | +| Capture.cs:9:9:13:9 | CaptureIn1(...) : CaptureIn1 [captured tainted] : String | semmle.label | CaptureIn1(...) : CaptureIn1 [captured tainted] : String | | Capture.cs:11:17:11:22 | access to local variable sink27 : String | semmle.label | access to local variable sink27 : String | +| Capture.cs:11:26:11:32 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | | Capture.cs:12:19:12:24 | access to local variable sink27 | semmle.label | access to local variable sink27 | +| Capture.cs:14:9:14:18 | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | semmle.label | access to local function CaptureIn1 : CaptureIn1 [captured tainted] : String | +| Capture.cs:16:9:24:9 | CaptureIn2(...) : CaptureIn2 [captured tainted] : String | semmle.label | CaptureIn2(...) : CaptureIn2 [captured tainted] : String | +| Capture.cs:18:13:22:13 | M(...) : M [captured tainted] : String | semmle.label | M(...) : M [captured tainted] : String | | Capture.cs:20:21:20:26 | access to local variable sink28 : String | semmle.label | access to local variable sink28 : String | +| Capture.cs:20:30:20:36 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | | Capture.cs:21:23:21:28 | access to local variable sink28 | semmle.label | access to local variable sink28 | +| Capture.cs:23:13:23:13 | access to local function M : M [captured tainted] : String | semmle.label | access to local function M : M [captured tainted] : String | +| Capture.cs:25:9:25:18 | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | semmle.label | access to local function CaptureIn2 : CaptureIn2 [captured tainted] : String | +| Capture.cs:27:30:27:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | semmle.label | access to local variable captureIn3 : (...) => ... [captured tainted] : String | +| Capture.cs:27:43:32:9 | (...) => ... : (...) => ... [captured tainted] : String | semmle.label | (...) => ... : (...) => ... [captured tainted] : String | | Capture.cs:29:17:29:22 | access to local variable sink29 : String | semmle.label | access to local variable sink29 : String | +| Capture.cs:29:26:29:32 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | | Capture.cs:30:19:30:24 | access to local variable sink29 | semmle.label | access to local variable sink29 | +| Capture.cs:33:30:33:39 | access to local variable captureIn3 : (...) => ... [captured tainted] : String | semmle.label | access to local variable captureIn3 : (...) => ... [captured tainted] : String | +| Capture.cs:33:30:33:39 | access to local variable captureIn3 : Func [captured tainted] : String | semmle.label | access to local variable captureIn3 : Func [captured tainted] : String | | Capture.cs:50:50:50:55 | sink39 : String | semmle.label | sink39 : String | +| Capture.cs:52:23:59:13 | (...) => ... : (...) => ... [captured sink39] : String | semmle.label | (...) => ... : (...) => ... [captured sink39] : String | +| Capture.cs:55:27:58:17 | (...) => ... : (...) => ... [captured sink39] : String | semmle.label | (...) => ... : (...) => ... [captured sink39] : String | | Capture.cs:57:27:57:32 | access to parameter sink39 | semmle.label | access to parameter sink39 | | Capture.cs:61:36:61:42 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | -| Capture.cs:69:13:69:18 | access to local variable sink30 : String | semmle.label | access to local variable sink30 : String | | Capture.cs:69:22:69:35 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:71:9:71:19 | [post] access to local function CaptureOut1 : CaptureOut1 [captured sink30] : String | semmle.label | [post] access to local function CaptureOut1 : CaptureOut1 [captured sink30] : String | | Capture.cs:72:15:72:20 | access to local variable sink30 | semmle.label | access to local variable sink30 | -| Capture.cs:79:17:79:22 | access to local variable sink31 : String | semmle.label | access to local variable sink31 : String | | Capture.cs:79:26:79:39 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:81:13:81:13 | [post] access to local function M : M [captured sink31] : String | semmle.label | [post] access to local function M : M [captured sink31] : String | +| Capture.cs:83:9:83:19 | [post] access to local function CaptureOut2 : CaptureOut2 [captured sink31] : String | semmle.label | [post] access to local function CaptureOut2 : CaptureOut2 [captured sink31] : String | | Capture.cs:84:15:84:20 | access to local variable sink31 | semmle.label | access to local variable sink31 | -| Capture.cs:89:13:89:18 | access to local variable sink32 : String | semmle.label | access to local variable sink32 : String | | Capture.cs:89:22:89:35 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:92:30:92:40 | [post] access to local variable captureOut3 : (...) => ... [captured sink32] : String | semmle.label | [post] access to local variable captureOut3 : (...) => ... [captured sink32] : String | | Capture.cs:93:15:93:20 | access to local variable sink32 | semmle.label | access to local variable sink32 | -| Capture.cs:115:17:115:22 | access to local variable sink40 : String | semmle.label | access to local variable sink40 : String | -| Capture.cs:115:26:115:39 | "taint source" : String | semmle.label | "taint source" : String | -| Capture.cs:122:15:122:20 | access to local variable sink40 | semmle.label | access to local variable sink40 | -| Capture.cs:125:25:125:31 | tainted : String | semmle.label | tainted : String | -| Capture.cs:133:15:133:20 | access to local variable sink33 | semmle.label | access to local variable sink33 | -| Capture.cs:145:15:145:20 | access to local variable sink34 | semmle.label | access to local variable sink34 | -| Capture.cs:154:15:154:20 | access to local variable sink35 | semmle.label | access to local variable sink35 | -| Capture.cs:160:13:160:18 | access to local variable sink36 : String | semmle.label | access to local variable sink36 : String | -| Capture.cs:160:22:160:38 | call to local function CaptureThrough4 : String | semmle.label | call to local function CaptureThrough4 : String | -| Capture.cs:161:15:161:20 | access to local variable sink36 | semmle.label | access to local variable sink36 | -| Capture.cs:168:25:168:31 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | -| Capture.cs:169:15:169:20 | access to local variable sink37 | semmle.label | access to local variable sink37 | -| Capture.cs:188:26:188:26 | s : String | semmle.label | s : String | -| Capture.cs:191:20:191:22 | call to local function M : String | semmle.label | call to local function M : String | -| Capture.cs:194:13:194:18 | access to local variable sink38 : String | semmle.label | access to local variable sink38 : String | -| Capture.cs:194:22:194:32 | call to local function Id : String | semmle.label | call to local function Id : String | -| Capture.cs:194:25:194:31 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | -| Capture.cs:195:15:195:20 | access to local variable sink38 | semmle.label | access to local variable sink38 | +| Capture.cs:114:23:117:13 | [post] (...) => ... : (...) => ... [captured sink40] : String | semmle.label | [post] (...) => ... : (...) => ... [captured sink40] : String | +| Capture.cs:116:26:116:39 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:123:9:123:33 | [post] access to local function CaptureOutMultipleLambdas : CaptureOutMultipleLambdas [captured sink40] : String | semmle.label | [post] access to local function CaptureOutMultipleLambdas : CaptureOutMultipleLambdas [captured sink40] : String | +| Capture.cs:124:15:124:20 | access to local variable sink40 | semmle.label | access to local variable sink40 | +| Capture.cs:127:25:127:31 | tainted : String | semmle.label | tainted : String | +| Capture.cs:130:9:133:9 | CaptureThrough1(...) : CaptureThrough1 [captured tainted] : String | semmle.label | CaptureThrough1(...) : CaptureThrough1 [captured tainted] : String | +| Capture.cs:134:9:134:23 | [post] access to local function CaptureThrough1 : CaptureThrough1 [captured sink33] : String | semmle.label | [post] access to local function CaptureThrough1 : CaptureThrough1 [captured sink33] : String | +| Capture.cs:134:9:134:23 | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | semmle.label | access to local function CaptureThrough1 : CaptureThrough1 [captured tainted] : String | +| Capture.cs:135:15:135:20 | access to local variable sink33 | semmle.label | access to local variable sink33 | +| Capture.cs:138:9:145:9 | CaptureThrough2(...) : CaptureThrough2 [captured tainted] : String | semmle.label | CaptureThrough2(...) : CaptureThrough2 [captured tainted] : String | +| Capture.cs:146:9:146:23 | [post] access to local function CaptureThrough2 : CaptureThrough2 [captured sink34] : String | semmle.label | [post] access to local function CaptureThrough2 : CaptureThrough2 [captured sink34] : String | +| Capture.cs:146:9:146:23 | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | semmle.label | access to local function CaptureThrough2 : CaptureThrough2 [captured tainted] : String | +| Capture.cs:147:15:147:20 | access to local variable sink34 | semmle.label | access to local variable sink34 | +| Capture.cs:150:30:150:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | semmle.label | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | +| Capture.cs:150:48:154:9 | (...) => ... : (...) => ... [captured tainted] : String | semmle.label | (...) => ... : (...) => ... [captured tainted] : String | +| Capture.cs:155:30:155:44 | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | semmle.label | [post] access to local variable captureThrough3 : (...) => ... [captured sink35] : String | +| Capture.cs:155:30:155:44 | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | semmle.label | access to local variable captureThrough3 : (...) => ... [captured tainted] : String | +| Capture.cs:155:30:155:44 | access to local variable captureThrough3 : Func [captured tainted] : String | semmle.label | access to local variable captureThrough3 : Func [captured tainted] : String | +| Capture.cs:156:15:156:20 | access to local variable sink35 | semmle.label | access to local variable sink35 | +| Capture.cs:158:9:161:9 | CaptureThrough4(...) : CaptureThrough4 [captured tainted] : String | semmle.label | CaptureThrough4(...) : CaptureThrough4 [captured tainted] : String | +| Capture.cs:162:13:162:18 | access to local variable sink36 : String | semmle.label | access to local variable sink36 : String | +| Capture.cs:162:22:162:36 | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | semmle.label | access to local function CaptureThrough4 : CaptureThrough4 [captured tainted] : String | +| Capture.cs:162:22:162:38 | call to local function CaptureThrough4 : String | semmle.label | call to local function CaptureThrough4 : String | +| Capture.cs:163:15:163:20 | access to local variable sink36 | semmle.label | access to local variable sink36 | +| Capture.cs:166:37:166:37 | p : String | semmle.label | p : String | +| Capture.cs:168:22:168:22 | access to parameter p : String | semmle.label | access to parameter p : String | +| Capture.cs:170:9:170:23 | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | semmle.label | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | +| Capture.cs:170:25:170:31 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | +| Capture.cs:171:15:171:20 | access to local variable sink37 | semmle.label | access to local variable sink37 | +| Capture.cs:190:26:190:26 | s : String | semmle.label | s : String | +| Capture.cs:192:13:192:28 | M(...) : M [captured s] : String | semmle.label | M(...) : M [captured s] : String | +| Capture.cs:193:20:193:20 | access to local function M : M [captured s] : String | semmle.label | access to local function M : M [captured s] : String | +| Capture.cs:193:20:193:22 | call to local function M : String | semmle.label | call to local function M : String | +| Capture.cs:196:13:196:18 | access to local variable sink38 : String | semmle.label | access to local variable sink38 : String | +| Capture.cs:196:22:196:32 | call to local function Id : String | semmle.label | call to local function Id : String | +| Capture.cs:196:25:196:31 | access to parameter tainted : String | semmle.label | access to parameter tainted : String | +| Capture.cs:197:15:197:20 | access to local variable sink38 | semmle.label | access to local variable sink38 | +| Capture.cs:202:20:202:20 | s : String | semmle.label | s : String | +| Capture.cs:204:16:204:16 | access to local variable a : (...) => ... [captured s] : String | semmle.label | access to local variable a : (...) => ... [captured s] : String | +| Capture.cs:204:20:207:9 | (...) => ... : (...) => ... [captured s] : String | semmle.label | (...) => ... : (...) => ... [captured s] : String | +| Capture.cs:206:19:206:19 | access to parameter s | semmle.label | access to parameter s | +| Capture.cs:208:9:208:9 | access to local variable a : (...) => ... [captured s] : String | semmle.label | access to local variable a : (...) => ... [captured s] : String | +| Capture.cs:208:9:208:9 | access to local variable a : Action [captured s] : String | semmle.label | access to local variable a : Action [captured s] : String | +| Capture.cs:211:21:211:34 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:213:22:213:22 | s : String | semmle.label | s : String | +| Capture.cs:215:16:218:9 | (...) => ... : (...) => ... [captured s] : String | semmle.label | (...) => ... : (...) => ... [captured s] : String | +| Capture.cs:217:19:217:19 | access to parameter s | semmle.label | access to parameter s | +| Capture.cs:221:18:221:35 | call to method M3 : (...) => ... [captured s] : String | semmle.label | call to method M3 : (...) => ... [captured s] : String | +| Capture.cs:221:21:221:34 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:223:28:223:45 | call to method M3 : (...) => ... [captured s] : String | semmle.label | call to method M3 : (...) => ... [captured s] : String | +| Capture.cs:223:31:223:44 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:228:17:228:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:229:20:233:9 | (...) => ... : (...) => ... [captured x] : String | semmle.label | (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:229:20:233:9 | [post] (...) => ... : (...) => ... [captured x] : String | semmle.label | [post] (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:231:19:231:19 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:232:17:232:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:234:15:234:15 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:242:9:242:9 | [post] access to local variable c : Capture [field Field] : String | semmle.label | [post] access to local variable c : Capture [field Field] : String | +| Capture.cs:242:19:242:32 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:244:16:244:16 | access to local variable a : (...) => ... [captured c, field Field] : String | semmle.label | access to local variable a : (...) => ... [captured c, field Field] : String | +| Capture.cs:244:20:248:9 | (...) => ... : (...) => ... [captured c, field Field] : String | semmle.label | (...) => ... : (...) => ... [captured c, field Field] : String | +| Capture.cs:246:19:246:19 | access to local variable c : Capture [field Field] : String | semmle.label | access to local variable c : Capture [field Field] : String | +| Capture.cs:246:19:246:25 | access to field Field | semmle.label | access to field Field | +| Capture.cs:247:13:247:13 | [post] access to local variable c : Capture [field Field] : String | semmle.label | [post] access to local variable c : Capture [field Field] : String | +| Capture.cs:247:23:247:36 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:249:9:249:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | semmle.label | [post] access to local variable a : (...) => ... [captured c, field Field] : String | +| Capture.cs:249:9:249:9 | access to local variable a : (...) => ... [captured c, field Field] : String | semmle.label | access to local variable a : (...) => ... [captured c, field Field] : String | +| Capture.cs:249:9:249:9 | access to local variable a : Action [captured c, field Field] : String | semmle.label | access to local variable a : Action [captured c, field Field] : String | +| Capture.cs:251:15:251:15 | access to local variable c : Capture [field Field] : String | semmle.label | access to local variable c : Capture [field Field] : String | +| Capture.cs:251:15:251:21 | access to field Field | semmle.label | access to field Field | +| Capture.cs:264:13:264:13 | [post] access to local variable c : Capture [field Field] : String | semmle.label | [post] access to local variable c : Capture [field Field] : String | +| Capture.cs:264:23:264:36 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:266:9:266:9 | [post] access to local variable a : (...) => ... [captured c, field Field] : String | semmle.label | [post] access to local variable a : (...) => ... [captured c, field Field] : String | +| Capture.cs:268:15:268:15 | access to local variable c : Capture [field Field] : String | semmle.label | access to local variable c : Capture [field Field] : String | +| Capture.cs:268:15:268:21 | access to field Field | semmle.label | access to field Field | +| Capture.cs:273:19:273:19 | x : String | semmle.label | x : String | +| Capture.cs:273:30:273:30 | access to parameter x | semmle.label | access to parameter x | +| Capture.cs:273:34:273:47 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:278:17:278:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:280:16:280:21 | access to local variable middle : (...) => ... [captured x] : String | semmle.label | access to local variable middle : (...) => ... [captured x] : String | +| Capture.cs:280:25:288:9 | (...) => ... : (...) => ... [captured x] : String | semmle.label | (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:282:20:282:24 | access to local variable inner : (...) => ... [captured x] : String | semmle.label | access to local variable inner : (...) => ... [captured x] : String | +| Capture.cs:282:28:286:13 | (...) => ... : (...) => ... [captured x] : String | semmle.label | (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:284:23:284:23 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:285:21:285:34 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:287:13:287:17 | [post] access to local variable inner : (...) => ... [captured x] : String | semmle.label | [post] access to local variable inner : (...) => ... [captured x] : String | +| Capture.cs:287:13:287:17 | access to local variable inner : (...) => ... [captured x] : String | semmle.label | access to local variable inner : (...) => ... [captured x] : String | +| Capture.cs:287:13:287:17 | access to local variable inner : Action [captured x] : String | semmle.label | access to local variable inner : Action [captured x] : String | +| Capture.cs:290:9:290:14 | [post] access to local variable middle : (...) => ... [captured x] : String | semmle.label | [post] access to local variable middle : (...) => ... [captured x] : String | +| Capture.cs:290:9:290:14 | access to local variable middle : (...) => ... [captured x] : String | semmle.label | access to local variable middle : (...) => ... [captured x] : String | +| Capture.cs:290:9:290:14 | access to local variable middle : Action [captured x] : String | semmle.label | access to local variable middle : Action [captured x] : String | +| Capture.cs:292:15:292:15 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:297:9:297:12 | [post] this access : Capture [field Field] : String | semmle.label | [post] this access : Capture [field Field] : String | +| Capture.cs:297:22:297:35 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:299:16:299:16 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | semmle.label | access to local variable a : (...) => ... [captured this in M10, field Field] : String | +| Capture.cs:299:20:303:9 | (...) => ... : (...) => ... [captured this in M10, field Field] : String | semmle.label | (...) => ... : (...) => ... [captured this in M10, field Field] : String | +| Capture.cs:301:19:301:22 | this access : Capture [field Field] : String | semmle.label | this access : Capture [field Field] : String | +| Capture.cs:301:19:301:28 | access to field Field | semmle.label | access to field Field | +| Capture.cs:302:13:302:16 | [post] this access : Capture [field Field] : String | semmle.label | [post] this access : Capture [field Field] : String | +| Capture.cs:302:26:302:39 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:304:9:304:9 | [post] access to local variable a : (...) => ... [captured this in M10, field Field] : String | semmle.label | [post] access to local variable a : (...) => ... [captured this in M10, field Field] : String | +| Capture.cs:304:9:304:9 | access to local variable a : (...) => ... [captured this in M10, field Field] : String | semmle.label | access to local variable a : (...) => ... [captured this in M10, field Field] : String | +| Capture.cs:304:9:304:9 | access to local variable a : Action [captured this in M10, field Field] : String | semmle.label | access to local variable a : Action [captured this in M10, field Field] : String | +| Capture.cs:306:15:306:18 | this access : Capture [field Field] : String | semmle.label | this access : Capture [field Field] : String | +| Capture.cs:306:15:306:24 | access to field Field | semmle.label | access to field Field | +| Capture.cs:311:17:311:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:312:15:312:15 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:318:17:318:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:319:19:319:19 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:328:17:328:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:330:9:330:49 | CapturedLocalFunction(...) : CapturedLocalFunction [captured x] : String | semmle.label | CapturedLocalFunction(...) : CapturedLocalFunction [captured x] : String | +| Capture.cs:330:47:330:47 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:332:9:332:65 | CapturingLocalFunction(...) : CapturingLocalFunction [captured x] : String | semmle.label | CapturingLocalFunction(...) : CapturingLocalFunction [captured x] : String | +| Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | semmle.label | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | +| Capture.cs:332:42:332:62 | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | semmle.label | access to local function CapturedLocalFunction : CapturedLocalFunction [captured x] : String | +| Capture.cs:334:9:334:30 | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | semmle.label | access to local function CapturingLocalFunction : CapturingLocalFunction [captured x] : String | +| Capture.cs:339:17:339:30 | "taint source" : String | semmle.label | "taint source" : String | +| Capture.cs:341:33:341:46 | (...) => ... : (...) => ... [captured x] : String | semmle.label | (...) => ... : (...) => ... [captured x] : String | +| Capture.cs:341:45:341:45 | access to local variable x | semmle.label | access to local variable x | +| Capture.cs:343:16:343:30 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | semmle.label | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | +| Capture.cs:343:34:343:55 | (...) => ... : (...) => ... [captured capturedLambda, captured x] : String | semmle.label | (...) => ... : (...) => ... [captured capturedLambda, captured x] : String | +| Capture.cs:343:40:343:53 | access to local variable capturedLambda : (...) => ... [captured x] : String | semmle.label | access to local variable capturedLambda : (...) => ... [captured x] : String | +| Capture.cs:345:9:345:23 | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | semmle.label | access to local variable capturingLambda : (...) => ... [captured capturedLambda, captured x] : String | +| Capture.cs:345:9:345:23 | access to local variable capturingLambda : Action [captured capturedLambda, captured x] : String | semmle.label | access to local variable capturingLambda : Action [captured capturedLambda, captured x] : String | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured s] : String | semmle.label | a : (...) => ... [captured s] : String | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | semmle.label | a : (...) => ... [captured sink39] : String | +| Capture.cs:350:34:350:34 | a : (...) => ... [captured sink39] : String | semmle.label | a : (...) => ... [captured sink39] : String | +| Capture.cs:352:9:352:9 | [post] access to parameter a : (...) => ... [captured sink40] : String | semmle.label | [post] access to parameter a : (...) => ... [captured sink40] : String | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured s] : String | semmle.label | access to parameter a : (...) => ... [captured s] : String | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | semmle.label | access to parameter a : (...) => ... [captured sink39] : String | +| Capture.cs:352:9:352:9 | access to parameter a : (...) => ... [captured sink39] : String | semmle.label | access to parameter a : (...) => ... [captured sink39] : String | +| Capture.cs:355:45:355:45 | x : String | semmle.label | x : String | +| Capture.cs:357:11:357:11 | access to parameter x : String | semmle.label | access to parameter x : String | | GlobalDataFlow.cs:18:9:18:23 | access to field SinkField0 : String | semmle.label | access to field SinkField0 : String | | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | semmle.label | "taint source" : String | | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | semmle.label | access to field SinkField0 | @@ -823,7 +1092,10 @@ nodes | Splitting.cs:50:19:50:19 | access to local variable s | semmle.label | access to local variable s | | Splitting.cs:52:19:52:19 | access to local variable s | semmle.label | access to local variable s | subpaths -| Capture.cs:194:25:194:31 | access to parameter tainted : String | Capture.cs:188:26:188:26 | s : String | Capture.cs:191:20:191:22 | call to local function M : String | Capture.cs:194:22:194:32 | call to local function Id : String | +| Capture.cs:170:25:170:31 | access to parameter tainted : String | Capture.cs:166:37:166:37 | p : String | Capture.cs:168:22:168:22 | access to parameter p : String | Capture.cs:170:9:170:23 | [post] access to local function CaptureThrough5 : CaptureThrough5 [captured sink37] : String | +| Capture.cs:196:25:196:31 | access to parameter tainted : String | Capture.cs:190:26:190:26 | s : String | Capture.cs:193:20:193:22 | call to local function M : String | Capture.cs:196:22:196:32 | call to local function Id : String | +| Capture.cs:221:21:221:34 | "taint source" : String | Capture.cs:213:22:213:22 | s : String | Capture.cs:215:16:218:9 | (...) => ... : (...) => ... [captured s] : String | Capture.cs:221:18:221:35 | call to method M3 : (...) => ... [captured s] : String | +| Capture.cs:223:31:223:44 | "taint source" : String | Capture.cs:213:22:213:22 | s : String | Capture.cs:215:16:218:9 | (...) => ... : (...) => ... [captured s] : String | Capture.cs:223:28:223:45 | call to method M3 : (...) => ... [captured s] : String | | GlobalDataFlow.cs:71:28:71:45 | access to property SinkProperty0 : String | GlobalDataFlow.cs:298:26:298:26 | x : String | GlobalDataFlow.cs:301:16:301:41 | ... ? ... : ... : String | GlobalDataFlow.cs:71:21:71:46 | call to method Return : String | | GlobalDataFlow.cs:73:94:73:98 | access to local variable sink0 : String | GlobalDataFlow.cs:298:26:298:26 | x : String | GlobalDataFlow.cs:301:16:301:41 | ... ? ... : ... : String | GlobalDataFlow.cs:73:29:73:101 | call to method Invoke : String | | GlobalDataFlow.cs:76:19:76:23 | access to local variable sink1 : String | GlobalDataFlow.cs:304:32:304:32 | x : String | GlobalDataFlow.cs:306:9:306:9 | access to parameter y : String | GlobalDataFlow.cs:76:30:76:34 | access to local variable sink2 : String | @@ -853,13 +1125,34 @@ subpaths | Capture.cs:72:15:72:20 | access to local variable sink30 | Capture.cs:69:22:69:35 | "taint source" : String | Capture.cs:72:15:72:20 | access to local variable sink30 | access to local variable sink30 | | Capture.cs:84:15:84:20 | access to local variable sink31 | Capture.cs:79:26:79:39 | "taint source" : String | Capture.cs:84:15:84:20 | access to local variable sink31 | access to local variable sink31 | | Capture.cs:93:15:93:20 | access to local variable sink32 | Capture.cs:89:22:89:35 | "taint source" : String | Capture.cs:93:15:93:20 | access to local variable sink32 | access to local variable sink32 | -| Capture.cs:122:15:122:20 | access to local variable sink40 | Capture.cs:115:26:115:39 | "taint source" : String | Capture.cs:122:15:122:20 | access to local variable sink40 | access to local variable sink40 | -| Capture.cs:133:15:133:20 | access to local variable sink33 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:133:15:133:20 | access to local variable sink33 | access to local variable sink33 | -| Capture.cs:145:15:145:20 | access to local variable sink34 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:145:15:145:20 | access to local variable sink34 | access to local variable sink34 | -| Capture.cs:154:15:154:20 | access to local variable sink35 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:154:15:154:20 | access to local variable sink35 | access to local variable sink35 | -| Capture.cs:161:15:161:20 | access to local variable sink36 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:161:15:161:20 | access to local variable sink36 | access to local variable sink36 | -| Capture.cs:169:15:169:20 | access to local variable sink37 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:169:15:169:20 | access to local variable sink37 | access to local variable sink37 | -| Capture.cs:195:15:195:20 | access to local variable sink38 | Capture.cs:125:25:125:31 | tainted : String | Capture.cs:195:15:195:20 | access to local variable sink38 | access to local variable sink38 | +| Capture.cs:124:15:124:20 | access to local variable sink40 | Capture.cs:116:26:116:39 | "taint source" : String | Capture.cs:124:15:124:20 | access to local variable sink40 | access to local variable sink40 | +| Capture.cs:135:15:135:20 | access to local variable sink33 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:135:15:135:20 | access to local variable sink33 | access to local variable sink33 | +| Capture.cs:147:15:147:20 | access to local variable sink34 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:147:15:147:20 | access to local variable sink34 | access to local variable sink34 | +| Capture.cs:156:15:156:20 | access to local variable sink35 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:156:15:156:20 | access to local variable sink35 | access to local variable sink35 | +| Capture.cs:163:15:163:20 | access to local variable sink36 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:163:15:163:20 | access to local variable sink36 | access to local variable sink36 | +| Capture.cs:171:15:171:20 | access to local variable sink37 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:171:15:171:20 | access to local variable sink37 | access to local variable sink37 | +| Capture.cs:197:15:197:20 | access to local variable sink38 | Capture.cs:127:25:127:31 | tainted : String | Capture.cs:197:15:197:20 | access to local variable sink38 | access to local variable sink38 | +| Capture.cs:206:19:206:19 | access to parameter s | Capture.cs:211:21:211:34 | "taint source" : String | Capture.cs:206:19:206:19 | access to parameter s | access to parameter s | +| Capture.cs:217:19:217:19 | access to parameter s | Capture.cs:221:21:221:34 | "taint source" : String | Capture.cs:217:19:217:19 | access to parameter s | access to parameter s | +| Capture.cs:217:19:217:19 | access to parameter s | Capture.cs:223:31:223:44 | "taint source" : String | Capture.cs:217:19:217:19 | access to parameter s | access to parameter s | +| Capture.cs:231:19:231:19 | access to local variable x | Capture.cs:228:17:228:30 | "taint source" : String | Capture.cs:231:19:231:19 | access to local variable x | access to local variable x | +| Capture.cs:234:15:234:15 | access to local variable x | Capture.cs:228:17:228:30 | "taint source" : String | Capture.cs:234:15:234:15 | access to local variable x | access to local variable x | +| Capture.cs:234:15:234:15 | access to local variable x | Capture.cs:232:17:232:30 | "taint source" : String | Capture.cs:234:15:234:15 | access to local variable x | access to local variable x | +| Capture.cs:246:19:246:25 | access to field Field | Capture.cs:242:19:242:32 | "taint source" : String | Capture.cs:246:19:246:25 | access to field Field | access to field Field | +| Capture.cs:251:15:251:21 | access to field Field | Capture.cs:242:19:242:32 | "taint source" : String | Capture.cs:251:15:251:21 | access to field Field | access to field Field | +| Capture.cs:251:15:251:21 | access to field Field | Capture.cs:247:23:247:36 | "taint source" : String | Capture.cs:251:15:251:21 | access to field Field | access to field Field | +| Capture.cs:268:15:268:21 | access to field Field | Capture.cs:264:23:264:36 | "taint source" : String | Capture.cs:268:15:268:21 | access to field Field | access to field Field | +| Capture.cs:273:30:273:30 | access to parameter x | Capture.cs:273:34:273:47 | "taint source" : String | Capture.cs:273:30:273:30 | access to parameter x | access to parameter x | +| Capture.cs:284:23:284:23 | access to local variable x | Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:284:23:284:23 | access to local variable x | access to local variable x | +| Capture.cs:292:15:292:15 | access to local variable x | Capture.cs:278:17:278:30 | "taint source" : String | Capture.cs:292:15:292:15 | access to local variable x | access to local variable x | +| Capture.cs:292:15:292:15 | access to local variable x | Capture.cs:285:21:285:34 | "taint source" : String | Capture.cs:292:15:292:15 | access to local variable x | access to local variable x | +| Capture.cs:301:19:301:28 | access to field Field | Capture.cs:297:22:297:35 | "taint source" : String | Capture.cs:301:19:301:28 | access to field Field | access to field Field | +| Capture.cs:306:15:306:24 | access to field Field | Capture.cs:297:22:297:35 | "taint source" : String | Capture.cs:306:15:306:24 | access to field Field | access to field Field | +| Capture.cs:306:15:306:24 | access to field Field | Capture.cs:302:26:302:39 | "taint source" : String | Capture.cs:306:15:306:24 | access to field Field | access to field Field | +| Capture.cs:312:15:312:15 | access to local variable x | Capture.cs:311:17:311:30 | "taint source" : String | Capture.cs:312:15:312:15 | access to local variable x | access to local variable x | +| Capture.cs:319:19:319:19 | access to local variable x | Capture.cs:318:17:318:30 | "taint source" : String | Capture.cs:319:19:319:19 | access to local variable x | access to local variable x | +| Capture.cs:330:47:330:47 | access to local variable x | Capture.cs:328:17:328:30 | "taint source" : String | Capture.cs:330:47:330:47 | access to local variable x | access to local variable x | +| Capture.cs:341:45:341:45 | access to local variable x | Capture.cs:339:17:339:30 | "taint source" : String | Capture.cs:341:45:341:45 | access to local variable x | access to local variable x | | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 | access to field SinkField0 | | GlobalDataFlow.cs:27:15:27:32 | access to property SinkProperty0 | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:27:15:27:32 | access to property SinkProperty0 | access to property SinkProperty0 | | GlobalDataFlow.cs:45:50:45:59 | access to parameter sinkParam2 | GlobalDataFlow.cs:18:27:18:40 | "taint source" : String | GlobalDataFlow.cs:45:50:45:59 | access to parameter sinkParam2 | access to parameter sinkParam2 | diff --git a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected index 9c4e141a490..fc02c1916a8 100644 --- a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected +++ b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected @@ -882,10 +882,10 @@ summary | Microsoft.AspNetCore.WebUtilities;FileBufferingWriteStream;false;WriteAsync;(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken);;Argument[0].Element;Argument[this];taint;manual | | Microsoft.AspNetCore.WebUtilities;FileBufferingWriteStream;false;WriteAsync;(System.ReadOnlyMemory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;df-generated | | Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;Read;();;Argument[this];ReturnValue;taint;manual | -| Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;Read;(System.Span);;Argument[this];ReturnValue;taint;manual | -| Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;manual | +| Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;Read;(System.Span);;Argument[this];Argument[0].Element;taint;manual | +| Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];Argument[0].Element;taint;manual | | Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;ReadLine;();;Argument[this];ReturnValue;taint;manual | | Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;ReadLineAsync;();;Argument[this];ReturnValue;taint;manual | | Microsoft.AspNetCore.WebUtilities;HttpRequestStreamReader;false;ReadToEndAsync;();;Argument[this];ReturnValue;taint;manual | @@ -1026,9 +1026,15 @@ summary | Microsoft.Extensions.Configuration;ChainedConfigurationProvider;false;GetReloadToken;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ChainedConfigurationProvider;false;TryGet;(System.String,System.String);;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ChainedConfigurationProvider;false;get_Configuration;();;Argument[this];ReturnValue;taint;df-generated | -| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | -| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[]);;Argument[0];ReturnValue;taint;df-generated | -| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[0];ReturnValue;taint;df-generated | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[0];taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];ReturnValue;taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[]);;Argument[1];Argument[0];taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[]);;Argument[1];ReturnValue;taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[1];Argument[0];taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[1];ReturnValue;taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[2];Argument[0];taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[2];ReturnValue;taint;manual | | Microsoft.Extensions.Configuration;ConfigurationBinder;false;Bind;(Microsoft.Extensions.Configuration.IConfiguration,System.Object,System.Action);;Argument[2];Argument[2].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;ConfigurationBinder;false;Get;(Microsoft.Extensions.Configuration.IConfiguration,System.Type,System.Action);;Argument[2];Argument[2].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;ConfigurationBinder;false;Get;(Microsoft.Extensions.Configuration.IConfiguration,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | @@ -1040,6 +1046,7 @@ summary | Microsoft.Extensions.Configuration;ConfigurationBinder;false;GetValue;(Microsoft.Extensions.Configuration.IConfiguration,System.String,T);;Argument[2];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationBuilder;false;Add;(Microsoft.Extensions.Configuration.IConfigurationSource);;Argument[0];Argument[this];taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationBuilder;false;Add;(Microsoft.Extensions.Configuration.IConfigurationSource);;Argument[this];ReturnValue;value;df-generated | +| Microsoft.Extensions.Configuration;ConfigurationBuilder;false;Build;();;Argument[this];ReturnValue;taint;manual | | Microsoft.Extensions.Configuration;ConfigurationBuilder;false;get_Sources;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationExtensions;false;Add;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;ConfigurationExtensions;false;GetConnectionString;(Microsoft.Extensions.Configuration.IConfiguration,System.String);;Argument[0];ReturnValue;taint;df-generated | @@ -1047,10 +1054,11 @@ summary | Microsoft.Extensions.Configuration;ConfigurationExtensions;false;GetRequiredSection;(Microsoft.Extensions.Configuration.IConfiguration,System.String);;Argument[1];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;Add;(Microsoft.Extensions.Configuration.IConfigurationSource);;Argument[0];Argument[this];taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;Add;(Microsoft.Extensions.Configuration.IConfigurationSource);;Argument[this];ReturnValue;value;df-generated | -| Microsoft.Extensions.Configuration;ConfigurationManager;false;Build;();;Argument[this];ReturnValue;value;df-generated | +| Microsoft.Extensions.Configuration;ConfigurationManager;false;Build;();;Argument[this];ReturnValue;taint;manual | | Microsoft.Extensions.Configuration;ConfigurationManager;false;GetReloadToken;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;GetSection;(System.String);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;GetSection;(System.String);;Argument[this];ReturnValue;taint;df-generated | +| Microsoft.Extensions.Configuration;ConfigurationManager;false;get_Item;(System.String);;Argument[this];ReturnValue;taint;manual | | Microsoft.Extensions.Configuration;ConfigurationManager;false;get_Properties;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;get_Sources;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationPath;false;Combine;(System.Collections.Generic.IEnumerable);;Argument[0].Element;ReturnValue;taint;df-generated | @@ -1064,13 +1072,13 @@ summary | Microsoft.Extensions.Configuration;ConfigurationRoot;false;GetReloadToken;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationRoot;false;GetSection;(System.String);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationRoot;false;GetSection;(System.String);;Argument[this];ReturnValue;taint;df-generated | -| Microsoft.Extensions.Configuration;ConfigurationRoot;false;get_Item;(System.String);;Argument[this];ReturnValue;taint;df-generated | +| Microsoft.Extensions.Configuration;ConfigurationRoot;false;get_Item;(System.String);;Argument[this];ReturnValue;taint;manual | | Microsoft.Extensions.Configuration;ConfigurationRoot;false;get_Providers;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationRootExtensions;false;GetDebugView;(Microsoft.Extensions.Configuration.IConfigurationRoot);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationRootExtensions;false;GetDebugView;(Microsoft.Extensions.Configuration.IConfigurationRoot,System.Func);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;ConfigurationSection;false;ConfigurationSection;(Microsoft.Extensions.Configuration.IConfigurationRoot,System.String);;Argument[0];Argument[this];taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationSection;false;ConfigurationSection;(Microsoft.Extensions.Configuration.IConfigurationRoot,System.String);;Argument[1];Argument[this];taint;df-generated | -| Microsoft.Extensions.Configuration;ConfigurationSection;false;get_Item;(System.String);;Argument[this];ReturnValue;taint;df-generated | +| Microsoft.Extensions.Configuration;ConfigurationSection;false;get_Item;(System.String);;Argument[this];ReturnValue;taint;manual | | Microsoft.Extensions.Configuration;ConfigurationSection;false;get_Path;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationSection;false;get_Value;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;EnvironmentVariablesExtensions;false;AddEnvironmentVariables;(Microsoft.Extensions.Configuration.IConfigurationBuilder);;Argument[0];ReturnValue;taint;df-generated | @@ -1080,6 +1088,8 @@ summary | Microsoft.Extensions.Configuration;FileConfigurationExtensions;false;SetFileLoadExceptionHandler;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;FileConfigurationExtensions;false;SetFileProvider;(Microsoft.Extensions.Configuration.IConfigurationBuilder,Microsoft.Extensions.FileProviders.IFileProvider);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;FileConfigurationSource;false;set_OnLoadException;(System.Action);;Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | +| Microsoft.Extensions.Configuration;IConfiguration;true;get_Item;(System.String);;Argument[this];ReturnValue;taint;manual | +| Microsoft.Extensions.Configuration;IConfigurationBuilder;true;Build;();;Argument[this];ReturnValue;taint;manual | | Microsoft.Extensions.Configuration;IniConfigurationExtensions;false;AddIniFile;(Microsoft.Extensions.Configuration.IConfigurationBuilder,Microsoft.Extensions.FileProviders.IFileProvider,System.String,System.Boolean,System.Boolean);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;IniConfigurationExtensions;false;AddIniFile;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;IniConfigurationExtensions;false;AddIniFile;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String);;Argument[0];ReturnValue;taint;df-generated | @@ -9210,14 +9220,14 @@ summary | System.IO;Stream;true;WriteAsync;(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken);;Argument[0].Element;Argument[this];taint;manual | | System.IO;Stream;true;WriteAsync;(System.ReadOnlyMemory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;df-generated | | System.IO;StreamReader;false;Read;();;Argument[this];ReturnValue;taint;manual | -| System.IO;StreamReader;false;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;StreamReader;false;Read;(System.Span);;Argument[this];ReturnValue;taint;manual | -| System.IO;StreamReader;false;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;StreamReader;false;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;manual | -| System.IO;StreamReader;false;ReadBlock;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;StreamReader;false;ReadBlock;(System.Span);;Argument[this];ReturnValue;taint;manual | -| System.IO;StreamReader;false;ReadBlockAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;StreamReader;false;ReadBlockAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;manual | +| System.IO;StreamReader;false;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StreamReader;false;Read;(System.Span);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StreamReader;false;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StreamReader;false;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StreamReader;false;ReadBlock;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StreamReader;false;ReadBlock;(System.Span);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StreamReader;false;ReadBlockAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StreamReader;false;ReadBlockAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];Argument[0].Element;taint;manual | | System.IO;StreamReader;false;ReadLine;();;Argument[this];ReturnValue;taint;manual | | System.IO;StreamReader;false;ReadLineAsync;();;Argument[this];ReturnValue;taint;manual | | System.IO;StreamReader;false;ReadToEnd;();;Argument[this];ReturnValue;taint;manual | @@ -9286,13 +9296,13 @@ summary | System.IO;StreamWriter;false;get_BaseStream;();;Argument[this];ReturnValue;taint;df-generated | | System.IO;StreamWriter;false;get_Encoding;();;Argument[this];ReturnValue;taint;df-generated | | System.IO;StringReader;false;Read;();;Argument[this];ReturnValue;taint;manual | -| System.IO;StringReader;false;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;StringReader;false;Read;(System.Span);;Argument[this];ReturnValue;taint;manual | -| System.IO;StringReader;false;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;StringReader;false;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;manual | -| System.IO;StringReader;false;ReadBlock;(System.Span);;Argument[this];ReturnValue;taint;manual | -| System.IO;StringReader;false;ReadBlockAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;StringReader;false;ReadBlockAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;manual | +| System.IO;StringReader;false;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StringReader;false;Read;(System.Span);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StringReader;false;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StringReader;false;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StringReader;false;ReadBlock;(System.Span);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StringReader;false;ReadBlockAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;StringReader;false;ReadBlockAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];Argument[0].Element;taint;manual | | System.IO;StringReader;false;ReadLine;();;Argument[this];ReturnValue;taint;manual | | System.IO;StringReader;false;ReadLineAsync;();;Argument[this];ReturnValue;taint;manual | | System.IO;StringReader;false;ReadLineAsync;(System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;df-generated | @@ -9335,14 +9345,14 @@ summary | System.IO;StringWriter;false;WriteLineAsync;(System.Text.StringBuilder,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;df-generated | | System.IO;TextReader;false;Synchronized;(System.IO.TextReader);;Argument[0];ReturnValue;taint;df-generated | | System.IO;TextReader;true;Read;();;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;Read;(System.Span);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadBlock;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadBlock;(System.Span);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadBlockAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadBlockAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;manual | +| System.IO;TextReader;true;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;Read;(System.Span);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadBlock;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadBlock;(System.Span);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadBlockAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadBlockAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];Argument[0].Element;taint;manual | | System.IO;TextReader;true;ReadLine;();;Argument[this];ReturnValue;taint;manual | | System.IO;TextReader;true;ReadLineAsync;();;Argument[this];ReturnValue;taint;manual | | System.IO;TextReader;true;ReadToEnd;();;Argument[this];ReturnValue;taint;manual | @@ -11062,6 +11072,8 @@ summary | System.Net.Http;HttpMethod;false;HttpMethod;(System.String);;Argument[0];Argument[this];taint;df-generated | | System.Net.Http;HttpMethod;false;ToString;();;Argument[this];ReturnValue;taint;df-generated | | System.Net.Http;HttpMethod;false;get_Method;();;Argument[this];ReturnValue;taint;df-generated | +| System.Net.Http;HttpRequestMessage;false;HttpRequestMessage;(System.Net.Http.HttpMethod,System.String);;Argument[0];Argument[this];taint;manual | +| System.Net.Http;HttpRequestMessage;false;HttpRequestMessage;(System.Net.Http.HttpMethod,System.String);;Argument[1];Argument[this];taint;manual | | System.Net.Http;HttpRequestMessage;false;HttpRequestMessage;(System.Net.Http.HttpMethod,System.Uri);;Argument[0];Argument[this];taint;df-generated | | System.Net.Http;HttpRequestMessage;false;HttpRequestMessage;(System.Net.Http.HttpMethod,System.Uri);;Argument[1];Argument[this];taint;df-generated | | System.Net.Http;HttpRequestMessage;false;ToString;();;Argument[this];ReturnValue;taint;df-generated | diff --git a/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected b/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected index 12c531e1837..4dec1bdd7d1 100644 --- a/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected +++ b/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected @@ -764,9 +764,15 @@ summary | Microsoft.Extensions.Configuration;ChainedConfigurationProvider;false;GetReloadToken;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ChainedConfigurationProvider;false;TryGet;(System.String,System.String);;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ChainedConfigurationProvider;false;get_Configuration;();;Argument[this];ReturnValue;taint;df-generated | -| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | -| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[]);;Argument[0];ReturnValue;taint;df-generated | -| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[0];ReturnValue;taint;df-generated | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[0];taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];ReturnValue;taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[]);;Argument[1];Argument[0];taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[]);;Argument[1];ReturnValue;taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[1];Argument[0];taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[1];ReturnValue;taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[2];Argument[0];taint;manual | +| Microsoft.Extensions.Configuration;CommandLineConfigurationExtensions;false;AddCommandLine;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String[],System.Collections.Generic.IDictionary);;Argument[2];ReturnValue;taint;manual | | Microsoft.Extensions.Configuration;ConfigurationBinder;false;Bind;(Microsoft.Extensions.Configuration.IConfiguration,System.Object,System.Action);;Argument[2];Argument[2].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;ConfigurationBinder;false;Get;(Microsoft.Extensions.Configuration.IConfiguration,System.Type,System.Action);;Argument[2];Argument[2].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;ConfigurationBinder;false;Get;(Microsoft.Extensions.Configuration.IConfiguration,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | @@ -785,7 +791,6 @@ summary | Microsoft.Extensions.Configuration;ConfigurationExtensions;false;GetRequiredSection;(Microsoft.Extensions.Configuration.IConfiguration,System.String);;Argument[1];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;Add;(Microsoft.Extensions.Configuration.IConfigurationSource);;Argument[0];Argument[this];taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;Add;(Microsoft.Extensions.Configuration.IConfigurationSource);;Argument[this];ReturnValue;value;df-generated | -| Microsoft.Extensions.Configuration;ConfigurationManager;false;Build;();;Argument[this];ReturnValue;value;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;GetReloadToken;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;GetSection;(System.String);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationManager;false;GetSection;(System.String);;Argument[this];ReturnValue;taint;df-generated | @@ -801,13 +806,11 @@ summary | Microsoft.Extensions.Configuration;ConfigurationRoot;false;GetReloadToken;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationRoot;false;GetSection;(System.String);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationRoot;false;GetSection;(System.String);;Argument[this];ReturnValue;taint;df-generated | -| Microsoft.Extensions.Configuration;ConfigurationRoot;false;get_Item;(System.String);;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationRoot;false;get_Providers;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationRootExtensions;false;GetDebugView;(Microsoft.Extensions.Configuration.IConfigurationRoot);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationRootExtensions;false;GetDebugView;(Microsoft.Extensions.Configuration.IConfigurationRoot,System.Func);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;ConfigurationSection;false;ConfigurationSection;(Microsoft.Extensions.Configuration.IConfigurationRoot,System.String);;Argument[0];Argument[this];taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationSection;false;ConfigurationSection;(Microsoft.Extensions.Configuration.IConfigurationRoot,System.String);;Argument[1];Argument[this];taint;df-generated | -| Microsoft.Extensions.Configuration;ConfigurationSection;false;get_Item;(System.String);;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationSection;false;get_Path;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;ConfigurationSection;false;get_Value;();;Argument[this];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;EnvironmentVariablesExtensions;false;AddEnvironmentVariables;(Microsoft.Extensions.Configuration.IConfigurationBuilder);;Argument[0];ReturnValue;taint;df-generated | @@ -817,6 +820,8 @@ summary | Microsoft.Extensions.Configuration;FileConfigurationExtensions;false;SetFileLoadExceptionHandler;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;FileConfigurationExtensions;false;SetFileProvider;(Microsoft.Extensions.Configuration.IConfigurationBuilder,Microsoft.Extensions.FileProviders.IFileProvider);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;FileConfigurationSource;false;set_OnLoadException;(System.Action);;Argument[0];Argument[0].Parameter[delegate-self];value;hq-generated | +| Microsoft.Extensions.Configuration;IConfiguration;true;get_Item;(System.String);;Argument[this];ReturnValue;taint;manual | +| Microsoft.Extensions.Configuration;IConfigurationBuilder;true;Build;();;Argument[this];ReturnValue;taint;manual | | Microsoft.Extensions.Configuration;IniConfigurationExtensions;false;AddIniFile;(Microsoft.Extensions.Configuration.IConfigurationBuilder,Microsoft.Extensions.FileProviders.IFileProvider,System.String,System.Boolean,System.Boolean);;Argument[0];ReturnValue;taint;df-generated | | Microsoft.Extensions.Configuration;IniConfigurationExtensions;false;AddIniFile;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.Action);;Argument[1];Argument[1].Parameter[delegate-self];value;hq-generated | | Microsoft.Extensions.Configuration;IniConfigurationExtensions;false;AddIniFile;(Microsoft.Extensions.Configuration.IConfigurationBuilder,System.String);;Argument[0];ReturnValue;taint;df-generated | @@ -7775,14 +7780,14 @@ summary | System.IO;StringWriter;false;WriteLineAsync;(System.Text.StringBuilder,System.Threading.CancellationToken);;Argument[0];Argument[this];taint;df-generated | | System.IO;TextReader;false;Synchronized;(System.IO.TextReader);;Argument[0];ReturnValue;taint;df-generated | | System.IO;TextReader;true;Read;();;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;Read;(System.Span);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadBlock;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadBlock;(System.Span);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadBlockAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];ReturnValue;taint;manual | -| System.IO;TextReader;true;ReadBlockAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];ReturnValue;taint;manual | +| System.IO;TextReader;true;Read;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;Read;(System.Span);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadBlock;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadBlock;(System.Span);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadBlockAsync;(System.Char[],System.Int32,System.Int32);;Argument[this];Argument[0].Element;taint;manual | +| System.IO;TextReader;true;ReadBlockAsync;(System.Memory,System.Threading.CancellationToken);;Argument[this];Argument[0].Element;taint;manual | | System.IO;TextReader;true;ReadLine;();;Argument[this];ReturnValue;taint;manual | | System.IO;TextReader;true;ReadLineAsync;();;Argument[this];ReturnValue;taint;manual | | System.IO;TextReader;true;ReadToEnd;();;Argument[this];ReturnValue;taint;manual | @@ -9414,6 +9419,8 @@ summary | System.Net.Http;HttpMethod;false;HttpMethod;(System.String);;Argument[0];Argument[this];taint;df-generated | | System.Net.Http;HttpMethod;false;ToString;();;Argument[this];ReturnValue;taint;df-generated | | System.Net.Http;HttpMethod;false;get_Method;();;Argument[this];ReturnValue;taint;df-generated | +| System.Net.Http;HttpRequestMessage;false;HttpRequestMessage;(System.Net.Http.HttpMethod,System.String);;Argument[0];Argument[this];taint;manual | +| System.Net.Http;HttpRequestMessage;false;HttpRequestMessage;(System.Net.Http.HttpMethod,System.String);;Argument[1];Argument[this];taint;manual | | System.Net.Http;HttpRequestMessage;false;HttpRequestMessage;(System.Net.Http.HttpMethod,System.Uri);;Argument[0];Argument[this];taint;df-generated | | System.Net.Http;HttpRequestMessage;false;HttpRequestMessage;(System.Net.Http.HttpMethod,System.Uri);;Argument[1];Argument[this];taint;df-generated | | System.Net.Http;HttpRequestMessage;false;ToString;();;Argument[this];ReturnValue;taint;df-generated | diff --git a/csharp/ql/test/library-tests/dataflow/local/DataFlowStep.expected b/csharp/ql/test/library-tests/dataflow/local/DataFlowStep.expected index 17838631b58..0e656151f08 100644 --- a/csharp/ql/test/library-tests/dataflow/local/DataFlowStep.expected +++ b/csharp/ql/test/library-tests/dataflow/local/DataFlowStep.expected @@ -1,31 +1,15 @@ | Capture.cs:5:17:5:17 | this | Capture.cs:13:9:13:14 | this access | -| Capture.cs:7:13:7:13 | access to local variable i | Capture.cs:7:13:7:17 | SSA def(i) | | Capture.cs:7:17:7:17 | 0 | Capture.cs:7:13:7:13 | access to local variable i | -| Capture.cs:9:9:12:9 | SSA capture def(i) | Capture.cs:11:17:11:17 | access to local variable i | | Capture.cs:13:9:13:14 | this access | Capture.cs:23:9:23:14 | this access | -| Capture.cs:15:9:22:9 | this | Capture.cs:21:13:21:18 | this access | -| Capture.cs:17:13:20:13 | SSA capture def(i) | Capture.cs:19:21:19:21 | access to local variable i | | Capture.cs:23:9:23:14 | this access | Capture.cs:34:9:34:14 | this access | -| Capture.cs:25:9:33:9 | this | Capture.cs:32:13:32:18 | this access | -| Capture.cs:27:13:30:13 | SSA capture def(i) | Capture.cs:29:21:29:21 | access to local variable i | -| Capture.cs:31:13:31:13 | access to local variable i | Capture.cs:31:13:31:17 | SSA def(i) | | Capture.cs:31:17:31:17 | 1 | Capture.cs:31:13:31:13 | access to local variable i | | Capture.cs:34:9:34:14 | this access | Capture.cs:40:9:40:15 | this access | -| Capture.cs:38:13:38:13 | access to local variable i | Capture.cs:38:13:38:17 | SSA def(i) | | Capture.cs:38:17:38:17 | 0 | Capture.cs:38:13:38:13 | access to local variable i | | Capture.cs:40:9:40:15 | this access | Capture.cs:51:9:51:15 | this access | -| Capture.cs:40:9:40:17 | SSA call def(i) | Capture.cs:41:13:41:13 | access to local variable i | -| Capture.cs:43:9:50:9 | this | Capture.cs:49:13:49:19 | this access | -| Capture.cs:47:17:47:17 | access to local variable i | Capture.cs:47:17:47:21 | SSA def(i) | | Capture.cs:47:21:47:21 | 0 | Capture.cs:47:17:47:17 | access to local variable i | | Capture.cs:51:9:51:15 | this access | Capture.cs:63:9:63:15 | this access | -| Capture.cs:51:9:51:17 | SSA call def(i) | Capture.cs:52:13:52:13 | access to local variable i | -| Capture.cs:54:9:62:9 | this | Capture.cs:60:13:60:19 | this access | -| Capture.cs:58:17:58:17 | access to local variable i | Capture.cs:58:17:58:21 | SSA def(i) | | Capture.cs:58:21:58:21 | 1 | Capture.cs:58:17:58:17 | access to local variable i | -| Capture.cs:61:13:61:13 | access to local variable i | Capture.cs:61:13:61:17 | SSA def(i) | | Capture.cs:61:17:61:17 | 1 | Capture.cs:61:13:61:13 | access to local variable i | -| Capture.cs:63:9:63:17 | SSA call def(i) | Capture.cs:64:13:64:13 | access to local variable i | | LocalDataFlow.cs:48:24:48:24 | b | LocalDataFlow.cs:84:21:84:21 | access to parameter b | | LocalDataFlow.cs:51:13:51:17 | access to local variable sink0 | LocalDataFlow.cs:51:13:51:34 | SSA def(sink0) | | LocalDataFlow.cs:51:13:51:34 | SSA def(sink0) | LocalDataFlow.cs:52:15:52:19 | access to local variable sink0 | diff --git a/csharp/ql/test/library-tests/dataflow/local/TaintTrackingStep.expected b/csharp/ql/test/library-tests/dataflow/local/TaintTrackingStep.expected index 6782695246e..e1ea6fe13d9 100644 --- a/csharp/ql/test/library-tests/dataflow/local/TaintTrackingStep.expected +++ b/csharp/ql/test/library-tests/dataflow/local/TaintTrackingStep.expected @@ -1,31 +1,15 @@ | Capture.cs:5:17:5:17 | this | Capture.cs:13:9:13:14 | this access | -| Capture.cs:7:13:7:13 | access to local variable i | Capture.cs:7:13:7:17 | SSA def(i) | | Capture.cs:7:17:7:17 | 0 | Capture.cs:7:13:7:13 | access to local variable i | -| Capture.cs:9:9:12:9 | SSA capture def(i) | Capture.cs:11:17:11:17 | access to local variable i | | Capture.cs:13:9:13:14 | this access | Capture.cs:23:9:23:14 | this access | -| Capture.cs:15:9:22:9 | this | Capture.cs:21:13:21:18 | this access | -| Capture.cs:17:13:20:13 | SSA capture def(i) | Capture.cs:19:21:19:21 | access to local variable i | | Capture.cs:23:9:23:14 | this access | Capture.cs:34:9:34:14 | this access | -| Capture.cs:25:9:33:9 | this | Capture.cs:32:13:32:18 | this access | -| Capture.cs:27:13:30:13 | SSA capture def(i) | Capture.cs:29:21:29:21 | access to local variable i | -| Capture.cs:31:13:31:13 | access to local variable i | Capture.cs:31:13:31:17 | SSA def(i) | | Capture.cs:31:17:31:17 | 1 | Capture.cs:31:13:31:13 | access to local variable i | | Capture.cs:34:9:34:14 | this access | Capture.cs:40:9:40:15 | this access | -| Capture.cs:38:13:38:13 | access to local variable i | Capture.cs:38:13:38:17 | SSA def(i) | | Capture.cs:38:17:38:17 | 0 | Capture.cs:38:13:38:13 | access to local variable i | | Capture.cs:40:9:40:15 | this access | Capture.cs:51:9:51:15 | this access | -| Capture.cs:40:9:40:17 | SSA call def(i) | Capture.cs:41:13:41:13 | access to local variable i | -| Capture.cs:43:9:50:9 | this | Capture.cs:49:13:49:19 | this access | -| Capture.cs:47:17:47:17 | access to local variable i | Capture.cs:47:17:47:21 | SSA def(i) | | Capture.cs:47:21:47:21 | 0 | Capture.cs:47:17:47:17 | access to local variable i | | Capture.cs:51:9:51:15 | this access | Capture.cs:63:9:63:15 | this access | -| Capture.cs:51:9:51:17 | SSA call def(i) | Capture.cs:52:13:52:13 | access to local variable i | -| Capture.cs:54:9:62:9 | this | Capture.cs:60:13:60:19 | this access | -| Capture.cs:58:17:58:17 | access to local variable i | Capture.cs:58:17:58:21 | SSA def(i) | | Capture.cs:58:21:58:21 | 1 | Capture.cs:58:17:58:17 | access to local variable i | -| Capture.cs:61:13:61:13 | access to local variable i | Capture.cs:61:13:61:17 | SSA def(i) | | Capture.cs:61:17:61:17 | 1 | Capture.cs:61:13:61:13 | access to local variable i | -| Capture.cs:63:9:63:17 | SSA call def(i) | Capture.cs:64:13:64:13 | access to local variable i | | LocalDataFlow.cs:48:24:48:24 | b | LocalDataFlow.cs:84:21:84:21 | access to parameter b | | LocalDataFlow.cs:51:13:51:17 | access to local variable sink0 | LocalDataFlow.cs:51:13:51:34 | SSA def(sink0) | | LocalDataFlow.cs:51:13:51:34 | SSA def(sink0) | LocalDataFlow.cs:52:15:52:19 | access to local variable sink0 | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/DefAdjacentRead.expected b/csharp/ql/test/library-tests/dataflow/ssa/DefAdjacentRead.expected index 8cb16972603..05e1e3d3a5c 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/DefAdjacentRead.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/DefAdjacentRead.expected @@ -1,12 +1,6 @@ -| Capture.cs:6:16:6:16 | i | Capture.cs:6:16:6:16 | i | Capture.cs:8:17:8:17 | access to parameter i | -| Capture.cs:6:16:6:16 | i | Capture.cs:13:13:13:17 | ... = ... | Capture.cs:14:17:14:17 | access to parameter i | -| Capture.cs:8:13:8:13 | x | Capture.cs:8:13:8:17 | Int32 x = ... | Capture.cs:34:13:34:13 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | ... = ... | Capture.cs:16:17:16:17 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:43:9:43:13 | ... = ... | Capture.cs:44:11:44:11 | access to local variable x | | Capture.cs:10:16:10:16 | a | Capture.cs:10:16:27:9 | Action a = ... | Capture.cs:38:9:38:9 | access to local variable a | | Capture.cs:17:17:17:17 | y | Capture.cs:17:17:17:21 | Int32 y = ... | Capture.cs:26:17:26:17 | access to local variable y | | Capture.cs:19:20:19:20 | b | Capture.cs:19:20:23:13 | Action b = ... | Capture.cs:25:13:25:13 | access to local variable b | -| Capture.cs:29:13:29:13 | z | Capture.cs:37:9:37:13 | ... = ... | Capture.cs:41:13:41:13 | access to local variable z | | Capture.cs:30:16:30:16 | c | Capture.cs:30:16:30:35 | Action c = ... | Capture.cs:32:9:32:9 | access to local variable c | | Capture.cs:52:16:52:16 | b | Capture.cs:52:16:52:43 | Action b = ... | Capture.cs:53:9:53:9 | access to local variable b | | Capture.cs:57:57:57:63 | strings | Capture.cs:57:57:57:63 | strings | Capture.cs:61:9:61:15 | access to parameter strings | @@ -21,22 +15,15 @@ | Capture.cs:86:64:86:64 | e | Capture.cs:86:64:86:73 | Expression> e = ... | Capture.cs:87:23:87:23 | access to local variable e | | Capture.cs:92:18:92:18 | d | Capture.cs:92:18:92:18 | d | Capture.cs:92:24:92:24 | access to parameter d | | Capture.cs:98:17:98:17 | x | Capture.cs:98:17:98:21 | Int32 x = ... | Capture.cs:99:20:99:20 | access to local variable x | -| Capture.cs:102:13:102:13 | z | Capture.cs:105:13:105:17 | ... = ... | Capture.cs:106:20:106:20 | access to local variable z | | Capture.cs:117:17:117:17 | x | Capture.cs:117:17:117:21 | Int32 x = ... | Capture.cs:118:17:118:17 | access to local variable x | -| Capture.cs:122:13:122:13 | b | Capture.cs:125:13:125:17 | ... = ... | Capture.cs:126:17:126:17 | access to local variable b | -| Capture.cs:130:13:130:13 | c | Capture.cs:133:13:133:17 | ... = ... | Capture.cs:134:17:134:17 | access to local variable c | -| Capture.cs:154:13:154:13 | f | Capture.cs:154:13:154:18 | Int32 f = ... | Capture.cs:155:13:155:13 | access to local variable f | | Capture.cs:198:28:198:29 | eh | Capture.cs:198:28:198:44 | MyEventHandler eh = ... | Capture.cs:199:27:199:28 | access to local variable eh | | Capture.cs:203:28:203:30 | eh2 | Capture.cs:203:28:203:45 | MyEventHandler eh2 = ... | Capture.cs:204:27:204:29 | access to local variable eh2 | | Capture.cs:210:24:210:24 | p | Capture.cs:210:24:210:59 | Process p = ... | Capture.cs:213:17:213:17 | access to local variable p | | Capture.cs:212:30:212:35 | exited | Capture.cs:212:30:212:71 | EventHandler exited = ... | Capture.cs:213:29:213:34 | access to local variable exited | -| Capture.cs:242:13:242:13 | i | Capture.cs:242:13:242:17 | Int32 i = ... | Capture.cs:254:27:254:27 | access to local variable i | -| Capture.cs:242:13:242:13 | i | Capture.cs:254:27:254:27 | access to local variable i | Capture.cs:255:34:255:34 | access to local variable i | | Consistency.cs:7:25:7:25 | b | Consistency.cs:7:25:7:25 | b | Consistency.cs:11:17:11:17 | access to parameter b | | Consistency.cs:15:17:15:17 | i | Consistency.cs:15:17:15:21 | Int32 i = ... | Consistency.cs:16:17:16:17 | access to local variable i | | Consistency.cs:25:29:25:29 | c | Consistency.cs:25:29:25:29 | Consistency c | Consistency.cs:26:13:26:13 | access to local variable c | | Consistency.cs:30:30:30:30 | c | Consistency.cs:32:9:32:29 | ... = ... | Consistency.cs:33:9:33:9 | access to parameter c | -| Consistency.cs:38:13:38:13 | i | Consistency.cs:39:28:39:32 | ... = ... | Consistency.cs:39:39:39:39 | access to local variable i | | Consistency.cs:44:11:44:11 | s | Consistency.cs:44:11:44:11 | S s | Consistency.cs:45:9:45:9 | access to local variable s | | Consistency.cs:49:30:49:30 | a | Consistency.cs:49:30:49:30 | a | Consistency.cs:49:47:49:47 | access to parameter a | | Consistency.cs:49:37:49:37 | i | Consistency.cs:49:37:49:37 | i | Consistency.cs:49:49:49:49 | access to parameter i | @@ -51,11 +38,6 @@ | DefUse.cs:44:13:44:13 | z | DefUse.cs:44:13:44:17 | Int32 z = ... | DefUse.cs:45:13:45:13 | access to local variable z | | DefUse.cs:44:13:44:13 | z | DefUse.cs:47:23:47:23 | access to local variable z | DefUse.cs:48:13:48:13 | access to local variable z | | DefUse.cs:44:13:44:13 | z | DefUse.cs:50:23:50:23 | access to local variable z | DefUse.cs:51:13:51:13 | access to local variable z | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:59:13:59:17 | Int32 i = ... | DefUse.cs:61:13:61:13 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:71:9:71:13 | ... = ... | DefUse.cs:72:9:72:9 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:72:9:72:11 | ...++ | DefUse.cs:73:13:73:13 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:75:9:75:13 | ... = ... | DefUse.cs:76:9:76:9 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:76:9:76:11 | ...-- | DefUse.cs:77:13:77:13 | access to local variable i | | DefUse.cs:67:19:67:20 | tc | DefUse.cs:67:19:67:27 | TestClass tc = ... | DefUse.cs:68:9:68:10 | access to local variable tc | | DefUse.cs:79:13:79:14 | x1 | DefUse.cs:80:30:80:31 | access to local variable x1 | DefUse.cs:81:13:81:14 | access to local variable x1 | | DefUse.cs:83:13:83:14 | x2 | DefUse.cs:83:13:83:18 | Int32 x2 = ... | DefUse.cs:85:15:85:16 | access to local variable x2 | @@ -77,8 +59,6 @@ | DefUse.cs:152:9:152:14 | Field4 | DefUse.cs:155:9:155:18 | ... = ... | DefUse.cs:156:13:156:18 | access to field Field4 | | DefUse.cs:166:9:166:14 | Field5 | DefUse.cs:184:9:184:18 | ... = ... | DefUse.cs:185:13:185:18 | access to field Field5 | | DefUse.cs:166:9:166:14 | Field5 | DefUse.cs:188:13:188:22 | ... = ... | DefUse.cs:189:17:189:22 | access to field Field5 | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:167:23:167:23 | i | DefUse.cs:169:13:169:13 | access to parameter i | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:173:13:173:17 | ... = ... | DefUse.cs:174:17:174:17 | access to parameter i | | DefUse.cs:171:23:171:23 | a | DefUse.cs:171:23:180:9 | Action a = ... | DefUse.cs:181:9:181:9 | access to local variable a | | DefUse.cs:171:23:171:23 | a | DefUse.cs:186:9:190:9 | ... = ... | DefUse.cs:191:9:191:9 | access to local variable a | | Example.cs:4:9:4:13 | Field | Example.cs:8:9:8:22 | ... = ... | Example.cs:9:13:9:22 | access to field Field | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/ReadAdjacentRead.expected b/csharp/ql/test/library-tests/dataflow/ssa/ReadAdjacentRead.expected index cd51b66ba3b..1b416d1b4f2 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/ReadAdjacentRead.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/ReadAdjacentRead.expected @@ -1,6 +1,3 @@ -| Capture.cs:6:16:6:16 | i | Capture.cs:8:17:8:17 | access to parameter i | Capture.cs:33:13:33:13 | access to parameter i | -| Capture.cs:8:13:8:13 | x | Capture.cs:16:17:16:17 | access to local variable x | Capture.cs:17:21:17:21 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:45:13:45:13 | access to local variable x | Capture.cs:47:13:47:13 | access to local variable x | | Capture.cs:10:16:10:16 | a | Capture.cs:38:9:38:9 | access to local variable a | Capture.cs:46:12:46:12 | access to local variable a | | Capture.cs:65:45:65:51 | strings | Capture.cs:68:18:68:24 | access to parameter strings | Capture.cs:70:9:70:15 | access to parameter strings | | Consistency.cs:5:9:5:13 | Field | Consistency.cs:26:13:26:19 | access to field Field | Consistency.cs:27:13:27:19 | access to field Field | @@ -22,7 +19,6 @@ | DefUse.cs:144:22:144:22 | x | DefUse.cs:146:17:146:17 | access to local variable x | DefUse.cs:147:17:147:17 | access to local variable x | | DefUse.cs:152:9:152:14 | Field4 | DefUse.cs:156:13:156:18 | access to field Field4 | DefUse.cs:157:13:157:18 | access to field Field4 | | DefUse.cs:152:9:152:14 | Field4 | DefUse.cs:162:13:162:18 | access to field Field4 | DefUse.cs:163:13:163:18 | access to field Field4 | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:177:21:177:21 | access to parameter i | DefUse.cs:178:21:178:21 | access to parameter i | | Example.cs:4:9:4:13 | Field | Example.cs:14:13:14:22 | access to field Field | Example.cs:15:13:15:22 | access to field Field | | Example.cs:6:23:6:23 | i | Example.cs:8:22:8:22 | access to parameter i | Example.cs:10:13:10:13 | access to parameter i | | Example.cs:6:23:6:23 | i | Example.cs:10:13:10:13 | access to parameter i | Example.cs:11:26:11:26 | access to parameter i | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SSAPhi.expected b/csharp/ql/test/library-tests/dataflow/ssa/SSAPhi.expected index 134190ef871..8cbd5e6b1b6 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/SSAPhi.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/SSAPhi.expected @@ -4,7 +4,6 @@ | DefUse.cs:6:14:6:14 | y | DefUse.cs:23:9:23:15 | SSA phi(y) | DefUse.cs:18:13:18:18 | SSA def(y) | | DefUse.cs:6:14:6:14 | y | DefUse.cs:42:9:42:15 | SSA phi(y) | DefUse.cs:28:13:28:18 | SSA def(y) | | DefUse.cs:6:14:6:14 | y | DefUse.cs:42:9:42:15 | SSA phi(y) | DefUse.cs:39:13:39:18 | SSA def(y) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:3:17:3:19 | SSA phi(i) | DefUse.cs:76:9:76:11 | SSA def(i) | | DefUse.cs:79:13:79:14 | x1 | DefUse.cs:80:30:80:31 | SSA phi(x1) | DefUse.cs:79:13:79:18 | SSA def(x1) | | DefUse.cs:79:13:79:14 | x1 | DefUse.cs:80:30:80:31 | SSA phi(x1) | DefUse.cs:80:30:80:31 | SSA def(x1) | | DefUse.cs:97:13:97:14 | x5 | DefUse.cs:98:16:98:17 | SSA phi(x5) | DefUse.cs:97:13:97:18 | SSA def(x5) | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SsaCapturedVariableDef.expected b/csharp/ql/test/library-tests/dataflow/ssa/SsaCapturedVariableDef.expected deleted file mode 100644 index 48aafe94201..00000000000 --- a/csharp/ql/test/library-tests/dataflow/ssa/SsaCapturedVariableDef.expected +++ /dev/null @@ -1,45 +0,0 @@ -| in | Capture.cs:6:16:6:16 | i | Capture.cs:6:16:6:16 | SSA param(i) | Capture.cs:10:20:27:9 | SSA capture def(i) | Capture.cs:38:9:38:11 | delegate call | false | -| in | Capture.cs:6:16:6:16 | i | Capture.cs:6:16:6:16 | SSA param(i) | Capture.cs:10:20:27:9 | SSA capture def(i) | Capture.cs:44:9:44:12 | call to method M | true | -| in | Capture.cs:8:13:8:13 | x | Capture.cs:8:13:8:17 | SSA def(x) | Capture.cs:19:24:23:13 | SSA capture def(x) | Capture.cs:38:9:38:11 | delegate call | true | -| in | Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | SSA def(x) | Capture.cs:19:24:23:13 | SSA capture def(x) | Capture.cs:25:13:25:15 | delegate call | false | -| in | Capture.cs:8:13:8:13 | x | Capture.cs:43:9:43:13 | SSA def(x) | Capture.cs:19:24:23:13 | SSA capture def(x) | Capture.cs:44:9:44:12 | call to method M | true | -| in | Capture.cs:17:17:17:17 | y | Capture.cs:17:17:17:21 | SSA def(y) | Capture.cs:19:24:23:13 | SSA capture def(y) | Capture.cs:25:13:25:15 | delegate call | false | -| in | Capture.cs:59:13:59:13 | i | Capture.cs:59:13:59:17 | SSA def(i) | Capture.cs:60:31:60:38 | SSA capture def(i) | Capture.cs:61:9:61:25 | call to method Select | true | -| in | Capture.cs:67:13:67:13 | c | Capture.cs:67:13:67:19 | SSA def(c) | Capture.cs:68:32:68:49 | SSA capture def(c) | Capture.cs:68:18:68:50 | call to method Where | true | -| in | Capture.cs:67:13:67:13 | c | Capture.cs:67:13:67:19 | SSA def(c) | Capture.cs:69:9:69:62 | SSA capture def(c) | Capture.cs:70:9:70:25 | call to method Select | true | -| in | Capture.cs:75:13:75:13 | i | Capture.cs:75:13:75:17 | SSA def(i) | Capture.cs:76:67:76:81 | SSA capture def(i) | Capture.cs:77:9:77:25 | call to method Select | true | -| in | Capture.cs:85:13:85:13 | b | Capture.cs:85:13:85:20 | SSA def(b) | Capture.cs:86:68:86:73 | SSA capture def(b) | Capture.cs:87:9:87:24 | call to method Where | true | -| in | Capture.cs:94:13:94:13 | y | Capture.cs:94:13:94:18 | SSA def(y) | Capture.cs:96:12:100:9 | SSA capture def(y) | Capture.cs:96:9:100:10 | call to local function fn | true | -| in | Capture.cs:94:13:94:13 | y | Capture.cs:94:13:94:18 | SSA def(y) | Capture.cs:96:12:100:9 | SSA capture def(y) | Capture.cs:103:9:107:10 | call to local function fn | true | -| in | Capture.cs:114:13:114:13 | a | Capture.cs:114:13:114:18 | SSA def(a) | Capture.cs:115:9:119:9 | SSA capture def(a) | Capture.cs:120:9:120:12 | call to local function M1 | false | -| in | Capture.cs:182:17:182:17 | i | Capture.cs:182:17:182:21 | SSA def(i) | Capture.cs:183:13:186:13 | SSA capture def(i) | Capture.cs:187:13:187:17 | call to local function M10 | true | -| in | Capture.cs:182:17:182:17 | i | Capture.cs:188:13:188:17 | SSA def(i) | Capture.cs:183:13:186:13 | SSA capture def(i) | Capture.cs:189:13:189:17 | call to local function M11 | false | -| in | Capture.cs:197:17:197:17 | i | Capture.cs:197:17:197:21 | SSA def(i) | Capture.cs:198:33:198:44 | SSA capture def(i) | Capture.cs:200:13:200:19 | delegate call | false | -| in | Capture.cs:197:17:197:17 | i | Capture.cs:197:17:197:21 | SSA def(i) | Capture.cs:203:34:203:45 | SSA capture def(i) | Capture.cs:200:13:200:19 | delegate call | false | -| in | Capture.cs:209:17:209:17 | i | Capture.cs:209:17:209:21 | SSA def(i) | Capture.cs:212:39:212:71 | SSA capture def(i) | Capture.cs:213:17:213:24 | access to event Exited | true | -| in | Capture.cs:229:13:229:13 | i | Capture.cs:232:9:232:13 | SSA def(i) | Capture.cs:231:9:231:49 | SSA capture def(i) | Capture.cs:233:9:233:12 | call to local function M2 | false | -| in | Fields.cs:77:13:77:13 | f | Fields.cs:77:13:77:45 | SSA def(f) | Fields.cs:78:27:78:54 | SSA capture def(f) | Fields.cs:81:9:81:11 | delegate call | false | -| in | Fields.cs:77:13:77:13 | f | Fields.cs:77:13:77:45 | SSA def(f) | Fields.cs:78:27:78:54 | SSA capture def(f) | Fields.cs:86:9:86:47 | call to method Select | true | -| in | Fields.cs:78:23:78:23 | a | Fields.cs:78:23:78:54 | SSA def(a) | Fields.cs:86:24:86:46 | SSA capture def(a) | Fields.cs:86:9:86:47 | call to method Select | true | -| in | Fields.cs:79:23:79:23 | b | Fields.cs:79:23:79:35 | SSA def(b) | Fields.cs:89:24:89:46 | SSA capture def(b) | Fields.cs:89:9:89:47 | call to method Select | true | -| in | Properties.cs:73:13:73:13 | f | Properties.cs:73:13:73:32 | SSA def(f) | Properties.cs:74:27:74:54 | SSA capture def(f) | Properties.cs:77:9:77:11 | delegate call | false | -| in | Properties.cs:73:13:73:13 | f | Properties.cs:73:13:73:32 | SSA def(f) | Properties.cs:74:27:74:54 | SSA capture def(f) | Properties.cs:82:9:82:47 | call to method Select | true | -| in | Properties.cs:74:23:74:23 | a | Properties.cs:74:23:74:54 | SSA def(a) | Properties.cs:82:24:82:46 | SSA capture def(a) | Properties.cs:82:9:82:47 | call to method Select | true | -| in | Properties.cs:75:23:75:23 | b | Properties.cs:75:23:75:35 | SSA def(b) | Properties.cs:85:24:85:46 | SSA capture def(b) | Properties.cs:85:9:85:47 | call to method Select | true | -| out | Capture.cs:6:16:6:16 | i | Capture.cs:13:13:13:17 | SSA def(i) | Capture.cs:38:9:38:11 | SSA call def(i) | Capture.cs:38:9:38:11 | delegate call | false | -| out | Capture.cs:6:16:6:16 | i | Capture.cs:13:13:13:17 | SSA def(i) | Capture.cs:44:9:44:12 | SSA call def(i) | Capture.cs:44:9:44:12 | call to method M | true | -| out | Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | SSA def(x) | Capture.cs:38:9:38:11 | SSA call def(x) | Capture.cs:38:9:38:11 | delegate call | false | -| out | Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | SSA def(x) | Capture.cs:44:9:44:12 | SSA call def(x) | Capture.cs:44:9:44:12 | call to method M | true | -| out | Capture.cs:29:13:29:13 | z | Capture.cs:30:28:30:32 | SSA def(z) | Capture.cs:32:9:32:11 | SSA call def(z) | Capture.cs:32:9:32:11 | delegate call | false | -| out | Capture.cs:29:13:29:13 | z | Capture.cs:30:28:30:32 | SSA def(z) | Capture.cs:44:9:44:12 | SSA call def(z) | Capture.cs:44:9:44:12 | call to method M | true | -| out | Capture.cs:50:20:50:20 | a | Capture.cs:52:28:52:40 | SSA def(a) | Capture.cs:53:9:53:11 | SSA call def(a) | Capture.cs:53:9:53:11 | delegate call | false | -| out | Capture.cs:59:13:59:13 | i | Capture.cs:60:36:60:38 | SSA def(i) | Capture.cs:61:9:61:25 | SSA call def(i) | Capture.cs:61:9:61:25 | call to method Select | true | -| out | Capture.cs:75:13:75:13 | i | Capture.cs:76:80:76:80 | SSA def(i) | Capture.cs:77:9:77:25 | SSA call def(i) | Capture.cs:77:9:77:25 | call to method Select | true | -| out | Capture.cs:102:13:102:13 | z | Capture.cs:105:13:105:17 | SSA def(z) | Capture.cs:103:9:107:10 | SSA call def(z) | Capture.cs:103:9:107:10 | call to local function fn | true | -| out | Capture.cs:122:13:122:13 | b | Capture.cs:125:13:125:17 | SSA def(b) | Capture.cs:128:9:128:12 | SSA call def(b) | Capture.cs:128:9:128:12 | call to local function M2 | false | -| out | Capture.cs:130:13:130:13 | c | Capture.cs:133:13:133:17 | SSA def(c) | Capture.cs:136:9:136:12 | SSA call def(c) | Capture.cs:136:9:136:12 | call to local function M3 | false | -| out | Capture.cs:139:13:139:13 | d | Capture.cs:142:13:142:17 | SSA def(d) | Capture.cs:144:9:144:12 | SSA call def(d) | Capture.cs:144:9:144:12 | call to local function M4 | false | -| out | Capture.cs:154:13:154:13 | f | Capture.cs:158:13:158:17 | SSA def(f) | Capture.cs:160:9:160:12 | SSA call def(f) | Capture.cs:160:9:160:12 | call to local function M6 | false | -| out | Capture.cs:168:13:168:13 | h | Capture.cs:174:17:174:21 | SSA def(h) | Capture.cs:176:13:176:16 | SSA call def(h) | Capture.cs:176:13:176:16 | call to local function M9 | false | -| out | Capture.cs:229:13:229:13 | i | Capture.cs:235:21:235:25 | SSA def(i) | Capture.cs:236:9:236:12 | SSA call def(i) | Capture.cs:236:9:236:12 | call to local function M3 | false | -| out | DefUse.cs:167:23:167:23 | i | DefUse.cs:173:13:173:17 | SSA def(i) | DefUse.cs:181:9:181:11 | SSA call def(i) | DefUse.cs:181:9:181:11 | delegate call | false | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SsaCapturedVariableDef.ql b/csharp/ql/test/library-tests/dataflow/ssa/SsaCapturedVariableDef.ql deleted file mode 100644 index f5815998200..00000000000 --- a/csharp/ql/test/library-tests/dataflow/ssa/SsaCapturedVariableDef.ql +++ /dev/null @@ -1,12 +0,0 @@ -import csharp - -from - string inout, Ssa::ExplicitDefinition def, Ssa::Definition targetDef, ControlFlow::Node call, - boolean additionalCalls -where - inout = "in" and def.isCapturedVariableDefinitionFlowIn(targetDef, call, additionalCalls) - or - inout = "out" and - def.isCapturedVariableDefinitionFlowOut(targetDef, additionalCalls) and - targetDef.(Ssa::ImplicitCallDefinition).getControlFlowNode() = call -select inout, def.getSourceVariable(), def, targetDef, call, additionalCalls diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SsaDef.expected b/csharp/ql/test/library-tests/dataflow/ssa/SsaDef.expected index 02d622c006a..aeda9e9b4c1 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/SsaDef.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/SsaDef.expected @@ -1,101 +1,37 @@ -| Capture.cs:6:16:6:16 | i | Capture.cs:6:16:6:16 | SSA param(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:10:20:27:9 | SSA capture def(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:13:13:13:17 | SSA def(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:38:9:38:11 | SSA call def(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:44:9:44:12 | SSA call def(i) | -| Capture.cs:8:13:8:13 | x | Capture.cs:8:13:8:17 | SSA def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | SSA def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:19:24:23:13 | SSA capture def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:38:9:38:11 | SSA call def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:43:9:43:13 | SSA def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:44:9:44:12 | SSA call def(x) | | Capture.cs:10:16:10:16 | a | Capture.cs:10:16:27:9 | SSA def(a) | | Capture.cs:17:17:17:17 | y | Capture.cs:17:17:17:21 | SSA def(y) | | Capture.cs:17:17:17:17 | y | Capture.cs:19:24:23:13 | SSA capture def(y) | | Capture.cs:19:20:19:20 | b | Capture.cs:19:20:23:13 | SSA def(b) | -| Capture.cs:29:13:29:13 | z | Capture.cs:29:13:29:17 | SSA def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:30:28:30:32 | SSA def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:32:9:32:11 | SSA call def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:37:9:37:13 | SSA def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:44:9:44:12 | SSA call def(z) | | Capture.cs:30:16:30:16 | c | Capture.cs:30:16:30:35 | SSA def(c) | -| Capture.cs:50:20:50:20 | a | Capture.cs:50:20:50:20 | SSA param(a) | -| Capture.cs:50:20:50:20 | a | Capture.cs:52:28:52:40 | SSA def(a) | -| Capture.cs:50:20:50:20 | a | Capture.cs:53:9:53:11 | SSA call def(a) | | Capture.cs:52:16:52:16 | b | Capture.cs:52:16:52:43 | SSA def(b) | | Capture.cs:57:57:57:63 | strings | Capture.cs:57:57:57:63 | SSA param(strings) | -| Capture.cs:59:13:59:13 | i | Capture.cs:59:13:59:17 | SSA def(i) | -| Capture.cs:59:13:59:13 | i | Capture.cs:60:31:60:38 | SSA capture def(i) | -| Capture.cs:59:13:59:13 | i | Capture.cs:60:36:60:38 | SSA def(i) | -| Capture.cs:59:13:59:13 | i | Capture.cs:61:9:61:25 | SSA call def(i) | | Capture.cs:60:27:60:27 | e | Capture.cs:60:27:60:38 | SSA def(e) | | Capture.cs:65:45:65:51 | strings | Capture.cs:65:45:65:51 | SSA param(strings) | -| Capture.cs:67:13:67:13 | c | Capture.cs:67:13:67:19 | SSA def(c) | | Capture.cs:67:13:67:13 | c | Capture.cs:68:32:68:49 | SSA capture def(c) | | Capture.cs:67:13:67:13 | c | Capture.cs:69:9:69:62 | SSA capture def(c) | | Capture.cs:68:32:68:32 | s | Capture.cs:68:32:68:32 | SSA param(s) | | Capture.cs:69:25:69:25 | s | Capture.cs:69:25:69:25 | SSA param(s) | | Capture.cs:73:67:73:73 | strings | Capture.cs:73:67:73:73 | SSA param(strings) | -| Capture.cs:75:13:75:13 | i | Capture.cs:75:13:75:17 | SSA def(i) | -| Capture.cs:75:13:75:13 | i | Capture.cs:76:67:76:81 | SSA capture def(i) | -| Capture.cs:75:13:75:13 | i | Capture.cs:76:80:76:80 | SSA def(i) | -| Capture.cs:75:13:75:13 | i | Capture.cs:77:9:77:25 | SSA call def(i) | | Capture.cs:76:63:76:63 | e | Capture.cs:76:63:76:81 | SSA def(e) | | Capture.cs:81:28:81:28 | i | Capture.cs:81:28:81:28 | SSA param(i) | | Capture.cs:81:28:81:28 | i | Capture.cs:81:34:81:36 | SSA def(i) | | Capture.cs:83:65:83:71 | strings | Capture.cs:83:65:83:71 | SSA param(strings) | -| Capture.cs:85:13:85:13 | b | Capture.cs:85:13:85:20 | SSA def(b) | | Capture.cs:85:13:85:13 | b | Capture.cs:86:68:86:73 | SSA capture def(b) | | Capture.cs:86:64:86:64 | e | Capture.cs:86:64:86:73 | SSA def(e) | | Capture.cs:92:18:92:18 | d | Capture.cs:92:18:92:18 | SSA param(d) | -| Capture.cs:94:13:94:13 | y | Capture.cs:94:13:94:18 | SSA def(y) | | Capture.cs:94:13:94:13 | y | Capture.cs:96:12:100:9 | SSA capture def(y) | | Capture.cs:98:17:98:17 | x | Capture.cs:98:17:98:21 | SSA def(x) | -| Capture.cs:102:13:102:13 | z | Capture.cs:102:13:102:18 | SSA def(z) | -| Capture.cs:102:13:102:13 | z | Capture.cs:103:9:107:10 | SSA call def(z) | -| Capture.cs:102:13:102:13 | z | Capture.cs:105:13:105:17 | SSA def(z) | -| Capture.cs:114:13:114:13 | a | Capture.cs:114:13:114:18 | SSA def(a) | | Capture.cs:114:13:114:13 | a | Capture.cs:115:9:119:9 | SSA capture def(a) | | Capture.cs:117:17:117:17 | x | Capture.cs:117:17:117:21 | SSA def(x) | -| Capture.cs:122:13:122:13 | b | Capture.cs:122:13:122:18 | SSA def(b) | -| Capture.cs:122:13:122:13 | b | Capture.cs:125:13:125:17 | SSA def(b) | -| Capture.cs:122:13:122:13 | b | Capture.cs:128:9:128:12 | SSA call def(b) | -| Capture.cs:130:13:130:13 | c | Capture.cs:130:13:130:18 | SSA def(c) | -| Capture.cs:130:13:130:13 | c | Capture.cs:133:13:133:17 | SSA def(c) | -| Capture.cs:130:13:130:13 | c | Capture.cs:136:9:136:12 | SSA call def(c) | -| Capture.cs:139:13:139:13 | d | Capture.cs:139:13:139:18 | SSA def(d) | -| Capture.cs:139:13:139:13 | d | Capture.cs:142:13:142:17 | SSA def(d) | -| Capture.cs:139:13:139:13 | d | Capture.cs:144:9:144:12 | SSA call def(d) | -| Capture.cs:147:13:147:13 | e | Capture.cs:147:13:147:18 | SSA def(e) | -| Capture.cs:147:13:147:13 | e | Capture.cs:148:9:152:9 | SSA capture def(e) | -| Capture.cs:147:13:147:13 | e | Capture.cs:151:13:151:17 | SSA def(e) | -| Capture.cs:154:13:154:13 | f | Capture.cs:154:13:154:18 | SSA def(f) | -| Capture.cs:154:13:154:13 | f | Capture.cs:158:13:158:17 | SSA def(f) | -| Capture.cs:154:13:154:13 | f | Capture.cs:160:9:160:12 | SSA call def(f) | | Capture.cs:162:13:162:13 | g | Capture.cs:163:9:166:9 | SSA capture def(g) | -| Capture.cs:168:13:168:13 | h | Capture.cs:168:13:168:18 | SSA def(h) | -| Capture.cs:168:13:168:13 | h | Capture.cs:171:13:171:17 | SSA def(h) | -| Capture.cs:168:13:168:13 | h | Capture.cs:174:17:174:21 | SSA def(h) | -| Capture.cs:168:13:168:13 | h | Capture.cs:176:13:176:16 | SSA call def(h) | -| Capture.cs:182:17:182:17 | i | Capture.cs:182:17:182:21 | SSA def(i) | | Capture.cs:182:17:182:17 | i | Capture.cs:183:13:186:13 | SSA capture def(i) | -| Capture.cs:182:17:182:17 | i | Capture.cs:188:13:188:17 | SSA def(i) | -| Capture.cs:197:17:197:17 | i | Capture.cs:197:17:197:21 | SSA def(i) | | Capture.cs:197:17:197:17 | i | Capture.cs:198:33:198:44 | SSA capture def(i) | | Capture.cs:197:17:197:17 | i | Capture.cs:203:34:203:45 | SSA capture def(i) | | Capture.cs:198:28:198:29 | eh | Capture.cs:198:28:198:44 | SSA def(eh) | | Capture.cs:203:28:203:30 | eh2 | Capture.cs:203:28:203:45 | SSA def(eh2) | -| Capture.cs:209:17:209:17 | i | Capture.cs:209:17:209:21 | SSA def(i) | | Capture.cs:209:17:209:17 | i | Capture.cs:212:39:212:71 | SSA capture def(i) | | Capture.cs:210:24:210:24 | p | Capture.cs:210:24:210:59 | SSA def(p) | | Capture.cs:212:30:212:35 | exited | Capture.cs:212:30:212:71 | SSA def(exited) | -| Capture.cs:229:13:229:13 | i | Capture.cs:231:9:231:49 | SSA capture def(i) | -| Capture.cs:229:13:229:13 | i | Capture.cs:232:9:232:13 | SSA def(i) | -| Capture.cs:229:13:229:13 | i | Capture.cs:235:21:235:25 | SSA def(i) | -| Capture.cs:229:13:229:13 | i | Capture.cs:236:9:236:12 | SSA call def(i) | -| Capture.cs:242:13:242:13 | i | Capture.cs:242:13:242:17 | SSA def(i) | -| Capture.cs:242:13:242:13 | i | Capture.cs:245:13:245:17 | SSA def(i) | -| Capture.cs:242:13:242:13 | i | Capture.cs:254:27:254:27 | SSA def(i) | | Capture.cs:248:36:248:36 | j | Capture.cs:251:13:251:17 | SSA def(j) | | Consistency.cs:7:25:7:25 | b | Consistency.cs:7:25:7:25 | SSA param(b) | | Consistency.cs:15:17:15:17 | i | Consistency.cs:15:17:15:21 | SSA def(i) | @@ -103,8 +39,6 @@ | Consistency.cs:25:29:25:29 | c | Consistency.cs:25:29:25:29 | SSA def(c) | | Consistency.cs:26:13:26:19 | c.Field | Consistency.cs:25:29:25:29 | SSA qualifier def(c.Field) | | Consistency.cs:30:30:30:30 | c | Consistency.cs:32:9:32:29 | SSA def(c) | -| Consistency.cs:38:13:38:13 | i | Consistency.cs:38:13:38:13 | SSA def(i) | -| Consistency.cs:38:13:38:13 | i | Consistency.cs:39:28:39:32 | SSA def(i) | | Consistency.cs:44:11:44:11 | s | Consistency.cs:44:11:44:11 | SSA def(s) | | Consistency.cs:49:30:49:30 | a | Consistency.cs:49:30:49:30 | SSA param(a) | | Consistency.cs:49:37:49:37 | i | Consistency.cs:49:37:49:37 | SSA param(i) | @@ -129,13 +63,6 @@ | DefUse.cs:44:13:44:13 | z | DefUse.cs:50:23:50:23 | SSA def(z) | | DefUse.cs:53:9:53:13 | this.Field | DefUse.cs:53:9:53:17 | SSA def(this.Field) | | DefUse.cs:56:9:56:12 | this.Prop | DefUse.cs:56:9:56:16 | SSA def(this.Prop) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:3:17:3:19 | SSA phi(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:59:13:59:17 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:60:37:60:41 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:71:9:71:13 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:72:9:72:11 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:75:9:75:13 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:76:9:76:11 | SSA def(i) | | DefUse.cs:63:9:63:14 | this.Field2 | DefUse.cs:63:9:63:18 | SSA def(this.Field2) | | DefUse.cs:66:9:66:14 | this.Field3 | DefUse.cs:66:9:66:18 | SSA def(this.Field3) | | DefUse.cs:67:19:67:20 | tc | DefUse.cs:67:19:67:27 | SSA def(tc) | @@ -162,11 +89,6 @@ | DefUse.cs:144:22:144:22 | x | DefUse.cs:144:22:144:22 | SSA def(x) | | DefUse.cs:155:9:155:14 | this.Field4 | DefUse.cs:155:9:155:18 | SSA def(this.Field4) | | DefUse.cs:162:13:162:18 | this.Field4 | DefUse.cs:160:10:160:16 | SSA entry def(this.Field4) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:167:23:167:23 | SSA param(i) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:170:9:170:13 | SSA def(i) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:173:13:173:17 | SSA def(i) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:175:32:179:13 | SSA capture def(i) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:181:9:181:11 | SSA call def(i) | | DefUse.cs:171:23:171:23 | a | DefUse.cs:171:23:180:9 | SSA def(a) | | DefUse.cs:171:23:171:23 | a | DefUse.cs:186:9:190:9 | SSA def(a) | | DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:184:9:184:18 | SSA def(this.Field5) | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SsaDefElement.expected b/csharp/ql/test/library-tests/dataflow/ssa/SsaDefElement.expected index 4ec9fbf90b0..69309834706 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/SsaDefElement.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/SsaDefElement.expected @@ -1,110 +1,44 @@ -| Capture.cs:6:16:6:16 | SSA param(i) | Capture.cs:6:16:6:16 | i | -| Capture.cs:8:13:8:17 | SSA def(x) | Capture.cs:8:13:8:17 | Int32 x = ... | | Capture.cs:10:16:27:9 | SSA def(a) | Capture.cs:10:16:27:9 | Action a = ... | -| Capture.cs:10:20:27:9 | SSA capture def(i) | Capture.cs:10:20:27:9 | (...) => ... | -| Capture.cs:13:13:13:17 | SSA def(i) | Capture.cs:13:13:13:17 | ... = ... | -| Capture.cs:15:13:15:17 | SSA def(x) | Capture.cs:15:13:15:17 | ... = ... | | Capture.cs:17:17:17:21 | SSA def(y) | Capture.cs:17:17:17:21 | Int32 y = ... | | Capture.cs:19:20:23:13 | SSA def(b) | Capture.cs:19:20:23:13 | Action b = ... | -| Capture.cs:19:24:23:13 | SSA capture def(x) | Capture.cs:19:24:23:13 | (...) => ... | | Capture.cs:19:24:23:13 | SSA capture def(y) | Capture.cs:19:24:23:13 | (...) => ... | -| Capture.cs:29:13:29:17 | SSA def(z) | Capture.cs:29:13:29:17 | Int32 z = ... | | Capture.cs:30:16:30:35 | SSA def(c) | Capture.cs:30:16:30:35 | Action c = ... | -| Capture.cs:30:28:30:32 | SSA def(z) | Capture.cs:30:28:30:32 | ... = ... | -| Capture.cs:32:9:32:11 | SSA call def(z) | Capture.cs:32:9:32:11 | delegate call | -| Capture.cs:37:9:37:13 | SSA def(z) | Capture.cs:37:9:37:13 | ... = ... | -| Capture.cs:38:9:38:11 | SSA call def(i) | Capture.cs:38:9:38:11 | delegate call | -| Capture.cs:38:9:38:11 | SSA call def(x) | Capture.cs:38:9:38:11 | delegate call | -| Capture.cs:43:9:43:13 | SSA def(x) | Capture.cs:43:9:43:13 | ... = ... | -| Capture.cs:44:9:44:12 | SSA call def(i) | Capture.cs:44:9:44:12 | call to method M | -| Capture.cs:44:9:44:12 | SSA call def(x) | Capture.cs:44:9:44:12 | call to method M | -| Capture.cs:44:9:44:12 | SSA call def(z) | Capture.cs:44:9:44:12 | call to method M | -| Capture.cs:50:20:50:20 | SSA param(a) | Capture.cs:50:20:50:20 | a | | Capture.cs:52:16:52:43 | SSA def(b) | Capture.cs:52:16:52:43 | Action b = ... | -| Capture.cs:52:28:52:40 | SSA def(a) | Capture.cs:52:28:52:40 | ... = ... | -| Capture.cs:53:9:53:11 | SSA call def(a) | Capture.cs:53:9:53:11 | delegate call | | Capture.cs:57:57:57:63 | SSA param(strings) | Capture.cs:57:57:57:63 | strings | -| Capture.cs:59:13:59:17 | SSA def(i) | Capture.cs:59:13:59:17 | Int32 i = ... | | Capture.cs:60:27:60:38 | SSA def(e) | Capture.cs:60:27:60:38 | Func e = ... | -| Capture.cs:60:31:60:38 | SSA capture def(i) | Capture.cs:60:31:60:38 | (...) => ... | -| Capture.cs:60:36:60:38 | SSA def(i) | Capture.cs:60:36:60:38 | ...++ | -| Capture.cs:61:9:61:25 | SSA call def(i) | Capture.cs:61:9:61:25 | call to method Select | | Capture.cs:65:45:65:51 | SSA param(strings) | Capture.cs:65:45:65:51 | strings | -| Capture.cs:67:13:67:19 | SSA def(c) | Capture.cs:67:13:67:19 | Char c = ... | | Capture.cs:68:32:68:32 | SSA param(s) | Capture.cs:68:32:68:32 | s | | Capture.cs:68:32:68:49 | SSA capture def(c) | Capture.cs:68:32:68:49 | (...) => ... | | Capture.cs:69:9:69:62 | SSA capture def(c) | Capture.cs:69:9:69:62 | M | | Capture.cs:69:25:69:25 | SSA param(s) | Capture.cs:69:25:69:25 | s | | Capture.cs:73:67:73:73 | SSA param(strings) | Capture.cs:73:67:73:73 | strings | -| Capture.cs:75:13:75:17 | SSA def(i) | Capture.cs:75:13:75:17 | Int32 i = ... | | Capture.cs:76:63:76:81 | SSA def(e) | Capture.cs:76:63:76:81 | Expression> e = ... | -| Capture.cs:76:67:76:81 | SSA capture def(i) | Capture.cs:76:67:76:81 | (...) => ... | -| Capture.cs:76:80:76:80 | SSA def(i) | Capture.cs:76:72:76:81 | call to method Inc | -| Capture.cs:77:9:77:25 | SSA call def(i) | Capture.cs:77:9:77:25 | call to method Select | | Capture.cs:81:28:81:28 | SSA param(i) | Capture.cs:81:28:81:28 | i | | Capture.cs:81:34:81:36 | SSA def(i) | Capture.cs:81:34:81:36 | ...++ | | Capture.cs:83:65:83:71 | SSA param(strings) | Capture.cs:83:65:83:71 | strings | -| Capture.cs:85:13:85:20 | SSA def(b) | Capture.cs:85:13:85:20 | Boolean b = ... | | Capture.cs:86:64:86:73 | SSA def(e) | Capture.cs:86:64:86:73 | Expression> e = ... | | Capture.cs:86:68:86:73 | SSA capture def(b) | Capture.cs:86:68:86:73 | (...) => ... | | Capture.cs:92:18:92:18 | SSA param(d) | Capture.cs:92:18:92:18 | d | -| Capture.cs:94:13:94:18 | SSA def(y) | Capture.cs:94:13:94:18 | Int32 y = ... | | Capture.cs:96:12:100:9 | SSA capture def(y) | Capture.cs:96:12:100:9 | (...) => ... | | Capture.cs:98:17:98:21 | SSA def(x) | Capture.cs:98:17:98:21 | Int32 x = ... | -| Capture.cs:102:13:102:18 | SSA def(z) | Capture.cs:102:13:102:18 | Int32 z = ... | -| Capture.cs:103:9:107:10 | SSA call def(z) | Capture.cs:103:9:107:10 | call to local function fn | -| Capture.cs:105:13:105:17 | SSA def(z) | Capture.cs:105:13:105:17 | ... = ... | -| Capture.cs:114:13:114:18 | SSA def(a) | Capture.cs:114:13:114:18 | Int32 a = ... | | Capture.cs:115:9:119:9 | SSA capture def(a) | Capture.cs:115:9:119:9 | M1 | | Capture.cs:117:17:117:21 | SSA def(x) | Capture.cs:117:17:117:21 | Int32 x = ... | -| Capture.cs:122:13:122:18 | SSA def(b) | Capture.cs:122:13:122:18 | Int32 b = ... | -| Capture.cs:125:13:125:17 | SSA def(b) | Capture.cs:125:13:125:17 | ... = ... | -| Capture.cs:128:9:128:12 | SSA call def(b) | Capture.cs:128:9:128:12 | call to local function M2 | -| Capture.cs:130:13:130:18 | SSA def(c) | Capture.cs:130:13:130:18 | Int32 c = ... | -| Capture.cs:133:13:133:17 | SSA def(c) | Capture.cs:133:13:133:17 | ... = ... | -| Capture.cs:136:9:136:12 | SSA call def(c) | Capture.cs:136:9:136:12 | call to local function M3 | -| Capture.cs:139:13:139:18 | SSA def(d) | Capture.cs:139:13:139:18 | Int32 d = ... | -| Capture.cs:142:13:142:17 | SSA def(d) | Capture.cs:142:13:142:17 | ... = ... | -| Capture.cs:144:9:144:12 | SSA call def(d) | Capture.cs:144:9:144:12 | call to local function M4 | -| Capture.cs:147:13:147:18 | SSA def(e) | Capture.cs:147:13:147:18 | Int32 e = ... | -| Capture.cs:148:9:152:9 | SSA capture def(e) | Capture.cs:148:9:152:9 | M5 | -| Capture.cs:151:13:151:17 | SSA def(e) | Capture.cs:151:13:151:17 | ... = ... | -| Capture.cs:154:13:154:18 | SSA def(f) | Capture.cs:154:13:154:18 | Int32 f = ... | -| Capture.cs:158:13:158:17 | SSA def(f) | Capture.cs:158:13:158:17 | ... = ... | -| Capture.cs:160:9:160:12 | SSA call def(f) | Capture.cs:160:9:160:12 | call to local function M6 | | Capture.cs:163:9:166:9 | SSA capture def(g) | Capture.cs:163:9:166:9 | M7 | -| Capture.cs:168:13:168:18 | SSA def(h) | Capture.cs:168:13:168:18 | Int32 h = ... | -| Capture.cs:171:13:171:17 | SSA def(h) | Capture.cs:171:13:171:17 | ... = ... | -| Capture.cs:174:17:174:21 | SSA def(h) | Capture.cs:174:17:174:21 | ... = ... | -| Capture.cs:176:13:176:16 | SSA call def(h) | Capture.cs:176:13:176:16 | call to local function M9 | -| Capture.cs:182:17:182:21 | SSA def(i) | Capture.cs:182:17:182:21 | Int32 i = ... | | Capture.cs:183:13:186:13 | SSA capture def(i) | Capture.cs:183:13:186:13 | M11 | -| Capture.cs:188:13:188:17 | SSA def(i) | Capture.cs:188:13:188:17 | ... = ... | -| Capture.cs:197:17:197:21 | SSA def(i) | Capture.cs:197:17:197:21 | Int32 i = ... | | Capture.cs:198:28:198:44 | SSA def(eh) | Capture.cs:198:28:198:44 | MyEventHandler eh = ... | | Capture.cs:198:33:198:44 | SSA capture def(i) | Capture.cs:198:33:198:44 | (...) => ... | | Capture.cs:203:28:203:45 | SSA def(eh2) | Capture.cs:203:28:203:45 | MyEventHandler eh2 = ... | | Capture.cs:203:34:203:45 | SSA capture def(i) | Capture.cs:203:34:203:45 | (...) => ... | -| Capture.cs:209:17:209:21 | SSA def(i) | Capture.cs:209:17:209:21 | Int32 i = ... | | Capture.cs:210:24:210:59 | SSA def(p) | Capture.cs:210:24:210:59 | Process p = ... | | Capture.cs:212:30:212:71 | SSA def(exited) | Capture.cs:212:30:212:71 | EventHandler exited = ... | | Capture.cs:212:39:212:71 | SSA capture def(i) | Capture.cs:212:39:212:71 | (...) => ... | -| Capture.cs:231:9:231:49 | SSA capture def(i) | Capture.cs:231:9:231:49 | M2 | -| Capture.cs:232:9:232:13 | SSA def(i) | Capture.cs:232:9:232:13 | ... = ... | -| Capture.cs:235:21:235:25 | SSA def(i) | Capture.cs:235:21:235:25 | ... = ... | -| Capture.cs:236:9:236:12 | SSA call def(i) | Capture.cs:236:9:236:12 | call to local function M3 | -| Capture.cs:242:13:242:17 | SSA def(i) | Capture.cs:242:13:242:17 | Int32 i = ... | -| Capture.cs:245:13:245:17 | SSA def(i) | Capture.cs:245:13:245:17 | ... = ... | | Capture.cs:251:13:251:17 | SSA def(j) | Capture.cs:251:13:251:17 | ... = ... | -| Capture.cs:254:27:254:27 | SSA def(i) | Capture.cs:254:9:254:28 | call to local function CaptureAndRef | | Consistency.cs:7:25:7:25 | SSA param(b) | Consistency.cs:7:25:7:25 | b | | Consistency.cs:15:17:15:21 | SSA def(i) | Consistency.cs:15:17:15:21 | Int32 i = ... | | Consistency.cs:15:17:15:21 | [finally: exception(Exception)] SSA def(i) | Consistency.cs:15:17:15:21 | Int32 i = ... | | Consistency.cs:25:29:25:29 | SSA def(c) | Consistency.cs:25:9:25:30 | call to method Out | | Consistency.cs:25:29:25:29 | SSA qualifier def(c.Field) | Consistency.cs:25:9:25:30 | call to method Out | | Consistency.cs:32:9:32:29 | SSA def(c) | Consistency.cs:32:9:32:29 | ... = ... | -| Consistency.cs:38:13:38:13 | SSA def(i) | Consistency.cs:38:13:38:13 | Int32 i | -| Consistency.cs:39:28:39:32 | SSA def(i) | Consistency.cs:39:28:39:32 | ... = ... | | Consistency.cs:44:11:44:11 | SSA def(s) | Consistency.cs:44:11:44:11 | S s | | Consistency.cs:49:30:49:30 | SSA param(a) | Consistency.cs:49:30:49:30 | a | | Consistency.cs:49:37:49:37 | SSA param(i) | Consistency.cs:49:37:49:37 | i | @@ -126,15 +60,9 @@ | DefUse.cs:50:23:50:23 | SSA def(z) | DefUse.cs:50:9:50:24 | call to method refMethod | | DefUse.cs:53:9:53:17 | SSA def(this.Field) | DefUse.cs:53:9:53:17 | ... = ... | | DefUse.cs:56:9:56:16 | SSA def(this.Prop) | DefUse.cs:56:9:56:16 | ... = ... | -| DefUse.cs:59:13:59:17 | SSA def(i) | DefUse.cs:59:13:59:17 | Int32 i = ... | -| DefUse.cs:60:37:60:41 | SSA def(i) | DefUse.cs:60:37:60:41 | ... = ... | | DefUse.cs:63:9:63:18 | SSA def(this.Field2) | DefUse.cs:63:9:63:18 | ... = ... | | DefUse.cs:66:9:66:18 | SSA def(this.Field3) | DefUse.cs:66:9:66:18 | ... = ... | | DefUse.cs:67:19:67:27 | SSA def(tc) | DefUse.cs:67:19:67:27 | TestClass tc = ... | -| DefUse.cs:71:9:71:13 | SSA def(i) | DefUse.cs:71:9:71:13 | ... = ... | -| DefUse.cs:72:9:72:11 | SSA def(i) | DefUse.cs:72:9:72:11 | ...++ | -| DefUse.cs:75:9:75:13 | SSA def(i) | DefUse.cs:75:9:75:13 | ... = ... | -| DefUse.cs:76:9:76:11 | SSA def(i) | DefUse.cs:76:9:76:11 | ...-- | | DefUse.cs:79:13:79:18 | SSA def(x1) | DefUse.cs:79:13:79:18 | Int32 x1 = ... | | DefUse.cs:80:30:80:31 | SSA def(x1) | DefUse.cs:80:16:80:32 | call to method refMethod | | DefUse.cs:83:13:83:18 | SSA def(x2) | DefUse.cs:83:13:83:18 | Int32 x2 = ... | @@ -156,12 +84,7 @@ | DefUse.cs:144:22:144:22 | SSA def(x) | DefUse.cs:144:22:144:22 | String x | | DefUse.cs:155:9:155:18 | SSA def(this.Field4) | DefUse.cs:155:9:155:18 | ... = ... | | DefUse.cs:160:10:160:16 | SSA entry def(this.Field4) | DefUse.cs:160:10:160:16 | FieldM2 | -| DefUse.cs:167:23:167:23 | SSA param(i) | DefUse.cs:167:23:167:23 | i | -| DefUse.cs:170:9:170:13 | SSA def(i) | DefUse.cs:170:9:170:13 | ... = ... | | DefUse.cs:171:23:180:9 | SSA def(a) | DefUse.cs:171:23:180:9 | Action a = ... | -| DefUse.cs:173:13:173:17 | SSA def(i) | DefUse.cs:173:13:173:17 | ... = ... | -| DefUse.cs:175:32:179:13 | SSA capture def(i) | DefUse.cs:175:32:179:13 | (...) => ... | -| DefUse.cs:181:9:181:11 | SSA call def(i) | DefUse.cs:181:9:181:11 | delegate call | | DefUse.cs:184:9:184:18 | SSA def(this.Field5) | DefUse.cs:184:9:184:18 | ... = ... | | DefUse.cs:186:9:190:9 | SSA def(a) | DefUse.cs:186:9:190:9 | ... = ... | | DefUse.cs:188:13:188:22 | SSA def(this.Field5) | DefUse.cs:188:13:188:22 | ... = ... | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SsaDefLastRead.expected b/csharp/ql/test/library-tests/dataflow/ssa/SsaDefLastRead.expected index fe4cfec2ec0..d94da54d008 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/SsaDefLastRead.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/SsaDefLastRead.expected @@ -1,25 +1,10 @@ -| Capture.cs:6:16:6:16 | i | Capture.cs:6:16:6:16 | SSA param(i) | Capture.cs:33:13:33:13 | access to parameter i | -| Capture.cs:6:16:6:16 | i | Capture.cs:10:20:27:9 | SSA capture def(i) | Capture.cs:12:17:12:17 | access to parameter i | -| Capture.cs:6:16:6:16 | i | Capture.cs:13:13:13:17 | SSA def(i) | Capture.cs:14:17:14:17 | access to parameter i | -| Capture.cs:6:16:6:16 | i | Capture.cs:38:9:38:11 | SSA call def(i) | Capture.cs:39:13:39:13 | access to parameter i | -| Capture.cs:8:13:8:13 | x | Capture.cs:8:13:8:17 | SSA def(x) | Capture.cs:34:13:34:13 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | SSA def(x) | Capture.cs:17:21:17:21 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:19:24:23:13 | SSA capture def(x) | Capture.cs:21:21:21:21 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:38:9:38:11 | SSA call def(x) | Capture.cs:40:13:40:13 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:43:9:43:13 | SSA def(x) | Capture.cs:44:11:44:11 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:44:9:44:12 | SSA call def(x) | Capture.cs:47:13:47:13 | access to local variable x | | Capture.cs:10:16:10:16 | a | Capture.cs:10:16:27:9 | SSA def(a) | Capture.cs:46:12:46:12 | access to local variable a | | Capture.cs:17:17:17:17 | y | Capture.cs:17:17:17:21 | SSA def(y) | Capture.cs:26:17:26:17 | access to local variable y | | Capture.cs:17:17:17:17 | y | Capture.cs:19:24:23:13 | SSA capture def(y) | Capture.cs:22:21:22:21 | access to local variable y | | Capture.cs:19:20:19:20 | b | Capture.cs:19:20:23:13 | SSA def(b) | Capture.cs:25:13:25:13 | access to local variable b | -| Capture.cs:29:13:29:13 | z | Capture.cs:32:9:32:11 | SSA call def(z) | Capture.cs:35:13:35:13 | access to local variable z | -| Capture.cs:29:13:29:13 | z | Capture.cs:37:9:37:13 | SSA def(z) | Capture.cs:41:13:41:13 | access to local variable z | | Capture.cs:30:16:30:16 | c | Capture.cs:30:16:30:35 | SSA def(c) | Capture.cs:32:9:32:9 | access to local variable c | -| Capture.cs:50:20:50:20 | a | Capture.cs:53:9:53:11 | SSA call def(a) | Capture.cs:54:9:54:9 | access to parameter a | | Capture.cs:52:16:52:16 | b | Capture.cs:52:16:52:43 | SSA def(b) | Capture.cs:53:9:53:9 | access to local variable b | | Capture.cs:57:57:57:63 | strings | Capture.cs:57:57:57:63 | SSA param(strings) | Capture.cs:61:9:61:15 | access to parameter strings | -| Capture.cs:59:13:59:13 | i | Capture.cs:60:31:60:38 | SSA capture def(i) | Capture.cs:60:36:60:36 | access to local variable i | -| Capture.cs:59:13:59:13 | i | Capture.cs:61:9:61:25 | SSA call def(i) | Capture.cs:62:13:62:13 | access to local variable i | | Capture.cs:60:27:60:27 | e | Capture.cs:60:27:60:38 | SSA def(e) | Capture.cs:61:24:61:24 | access to local variable e | | Capture.cs:65:45:65:51 | strings | Capture.cs:65:45:65:51 | SSA param(strings) | Capture.cs:70:9:70:15 | access to parameter strings | | Capture.cs:67:13:67:13 | c | Capture.cs:68:32:68:49 | SSA capture def(c) | Capture.cs:68:48:68:48 | access to local variable c | @@ -27,8 +12,6 @@ | Capture.cs:68:32:68:32 | s | Capture.cs:68:32:68:32 | SSA param(s) | Capture.cs:68:37:68:37 | access to parameter s | | Capture.cs:69:25:69:25 | s | Capture.cs:69:25:69:25 | SSA param(s) | Capture.cs:69:59:69:59 | access to parameter s | | Capture.cs:73:67:73:73 | strings | Capture.cs:73:67:73:73 | SSA param(strings) | Capture.cs:77:9:77:15 | access to parameter strings | -| Capture.cs:75:13:75:13 | i | Capture.cs:76:67:76:81 | SSA capture def(i) | Capture.cs:76:80:76:80 | access to local variable i | -| Capture.cs:75:13:75:13 | i | Capture.cs:77:9:77:25 | SSA call def(i) | Capture.cs:78:13:78:13 | access to local variable i | | Capture.cs:76:63:76:63 | e | Capture.cs:76:63:76:81 | SSA def(e) | Capture.cs:77:24:77:24 | access to local variable e | | Capture.cs:81:28:81:28 | i | Capture.cs:81:28:81:28 | SSA param(i) | Capture.cs:81:34:81:34 | access to parameter i | | Capture.cs:83:65:83:71 | strings | Capture.cs:83:65:83:71 | SSA param(strings) | Capture.cs:87:9:87:15 | access to parameter strings | @@ -37,17 +20,9 @@ | Capture.cs:92:18:92:18 | d | Capture.cs:92:18:92:18 | SSA param(d) | Capture.cs:92:24:92:24 | access to parameter d | | Capture.cs:94:13:94:13 | y | Capture.cs:96:12:100:9 | SSA capture def(y) | Capture.cs:98:21:98:21 | access to local variable y | | Capture.cs:98:17:98:17 | x | Capture.cs:98:17:98:21 | SSA def(x) | Capture.cs:99:20:99:20 | access to local variable x | -| Capture.cs:102:13:102:13 | z | Capture.cs:105:13:105:17 | SSA def(z) | Capture.cs:106:20:106:20 | access to local variable z | | Capture.cs:114:13:114:13 | a | Capture.cs:115:9:119:9 | SSA capture def(a) | Capture.cs:117:21:117:21 | access to local variable a | | Capture.cs:117:17:117:17 | x | Capture.cs:117:17:117:21 | SSA def(x) | Capture.cs:118:17:118:17 | access to local variable x | -| Capture.cs:122:13:122:13 | b | Capture.cs:125:13:125:17 | SSA def(b) | Capture.cs:126:17:126:17 | access to local variable b | -| Capture.cs:130:13:130:13 | c | Capture.cs:133:13:133:17 | SSA def(c) | Capture.cs:134:17:134:17 | access to local variable c | -| Capture.cs:130:13:130:13 | c | Capture.cs:136:9:136:12 | SSA call def(c) | Capture.cs:137:13:137:13 | access to local variable c | -| Capture.cs:139:13:139:13 | d | Capture.cs:144:9:144:12 | SSA call def(d) | Capture.cs:145:13:145:13 | access to local variable d | -| Capture.cs:147:13:147:13 | e | Capture.cs:148:9:152:9 | SSA capture def(e) | Capture.cs:150:17:150:17 | access to local variable e | -| Capture.cs:154:13:154:13 | f | Capture.cs:154:13:154:18 | SSA def(f) | Capture.cs:155:13:155:13 | access to local variable f | | Capture.cs:162:13:162:13 | g | Capture.cs:163:9:166:9 | SSA capture def(g) | Capture.cs:165:17:165:17 | access to local variable g | -| Capture.cs:168:13:168:13 | h | Capture.cs:176:13:176:16 | SSA call def(h) | Capture.cs:177:17:177:17 | access to local variable h | | Capture.cs:182:17:182:17 | i | Capture.cs:183:13:186:13 | SSA capture def(i) | Capture.cs:185:21:185:21 | access to local variable i | | Capture.cs:197:17:197:17 | i | Capture.cs:198:33:198:44 | SSA capture def(i) | Capture.cs:198:43:198:43 | access to local variable i | | Capture.cs:197:17:197:17 | i | Capture.cs:203:34:203:45 | SSA capture def(i) | Capture.cs:203:44:203:44 | access to local variable i | @@ -56,17 +31,12 @@ | Capture.cs:209:17:209:17 | i | Capture.cs:212:39:212:71 | SSA capture def(i) | Capture.cs:212:70:212:70 | access to local variable i | | Capture.cs:210:24:210:24 | p | Capture.cs:210:24:210:59 | SSA def(p) | Capture.cs:213:17:213:17 | access to local variable p | | Capture.cs:212:30:212:35 | exited | Capture.cs:212:30:212:71 | SSA def(exited) | Capture.cs:213:29:213:34 | access to local variable exited | -| Capture.cs:229:13:229:13 | i | Capture.cs:231:9:231:49 | SSA capture def(i) | Capture.cs:231:47:231:47 | access to local variable i | -| Capture.cs:229:13:229:13 | i | Capture.cs:236:9:236:12 | SSA call def(i) | Capture.cs:237:34:237:34 | access to local variable i | -| Capture.cs:242:13:242:13 | i | Capture.cs:242:13:242:17 | SSA def(i) | Capture.cs:254:27:254:27 | access to local variable i | -| Capture.cs:242:13:242:13 | i | Capture.cs:254:27:254:27 | SSA def(i) | Capture.cs:255:34:255:34 | access to local variable i | | Consistency.cs:7:25:7:25 | b | Consistency.cs:7:25:7:25 | SSA param(b) | Consistency.cs:11:17:11:17 | access to parameter b | | Consistency.cs:15:17:15:17 | i | Consistency.cs:15:17:15:21 | SSA def(i) | Consistency.cs:16:17:16:17 | access to local variable i | | Consistency.cs:15:17:15:17 | i | Consistency.cs:15:17:15:21 | [finally: exception(Exception)] SSA def(i) | Consistency.cs:16:17:16:17 | access to local variable i | | Consistency.cs:25:29:25:29 | c | Consistency.cs:25:29:25:29 | SSA def(c) | Consistency.cs:27:13:27:13 | access to local variable c | | Consistency.cs:26:13:26:19 | c.Field | Consistency.cs:25:29:25:29 | SSA qualifier def(c.Field) | Consistency.cs:27:13:27:19 | access to field Field | | Consistency.cs:30:30:30:30 | c | Consistency.cs:32:9:32:29 | SSA def(c) | Consistency.cs:33:9:33:9 | access to parameter c | -| Consistency.cs:38:13:38:13 | i | Consistency.cs:39:28:39:32 | SSA def(i) | Consistency.cs:39:39:39:39 | access to local variable i | | Consistency.cs:44:11:44:11 | s | Consistency.cs:44:11:44:11 | SSA def(s) | Consistency.cs:46:13:46:13 | access to local variable s | | Consistency.cs:49:30:49:30 | a | Consistency.cs:49:30:49:30 | SSA param(a) | Consistency.cs:49:47:49:47 | access to parameter a | | Consistency.cs:49:37:49:37 | i | Consistency.cs:49:37:49:37 | SSA param(i) | Consistency.cs:49:49:49:49 | access to parameter i | @@ -87,11 +57,6 @@ | DefUse.cs:44:13:44:13 | z | DefUse.cs:50:23:50:23 | SSA def(z) | DefUse.cs:51:13:51:13 | access to local variable z | | DefUse.cs:53:9:53:13 | this.Field | DefUse.cs:53:9:53:17 | SSA def(this.Field) | DefUse.cs:54:13:54:17 | access to field Field | | DefUse.cs:56:9:56:12 | this.Prop | DefUse.cs:56:9:56:16 | SSA def(this.Prop) | DefUse.cs:57:13:57:16 | access to property Prop | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:59:13:59:17 | SSA def(i) | DefUse.cs:61:13:61:13 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:71:9:71:13 | SSA def(i) | DefUse.cs:72:9:72:9 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:72:9:72:11 | SSA def(i) | DefUse.cs:73:13:73:13 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:75:9:75:13 | SSA def(i) | DefUse.cs:76:9:76:9 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:76:9:76:11 | SSA def(i) | DefUse.cs:77:13:77:13 | access to local variable i | | DefUse.cs:63:9:63:14 | this.Field2 | DefUse.cs:63:9:63:18 | SSA def(this.Field2) | DefUse.cs:64:13:64:18 | access to field Field2 | | DefUse.cs:63:9:63:14 | this.Field2 | DefUse.cs:63:9:63:18 | SSA def(this.Field2) | DefUse.cs:80:37:80:42 | access to field Field2 | | DefUse.cs:66:9:66:14 | this.Field3 | DefUse.cs:66:9:66:18 | SSA def(this.Field3) | DefUse.cs:69:13:69:18 | access to field Field3 | @@ -113,10 +78,6 @@ | DefUse.cs:144:22:144:22 | x | DefUse.cs:144:22:144:22 | SSA def(x) | DefUse.cs:147:17:147:17 | access to local variable x | | DefUse.cs:155:9:155:14 | this.Field4 | DefUse.cs:155:9:155:18 | SSA def(this.Field4) | DefUse.cs:157:13:157:18 | access to field Field4 | | DefUse.cs:162:13:162:18 | this.Field4 | DefUse.cs:160:10:160:16 | SSA entry def(this.Field4) | DefUse.cs:163:13:163:18 | access to field Field4 | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:167:23:167:23 | SSA param(i) | DefUse.cs:169:13:169:13 | access to parameter i | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:173:13:173:17 | SSA def(i) | DefUse.cs:174:17:174:17 | access to parameter i | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:175:32:179:13 | SSA capture def(i) | DefUse.cs:178:21:178:21 | access to parameter i | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:181:9:181:11 | SSA call def(i) | DefUse.cs:182:13:182:13 | access to parameter i | | DefUse.cs:171:23:171:23 | a | DefUse.cs:171:23:180:9 | SSA def(a) | DefUse.cs:181:9:181:9 | access to local variable a | | DefUse.cs:171:23:171:23 | a | DefUse.cs:186:9:190:9 | SSA def(a) | DefUse.cs:191:9:191:9 | access to local variable a | | DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:184:9:184:18 | SSA def(this.Field5) | DefUse.cs:185:13:185:18 | access to field Field5 | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SsaExplicitDef.expected b/csharp/ql/test/library-tests/dataflow/ssa/SsaExplicitDef.expected index 56d86ea53cd..000751cad1b 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/SsaExplicitDef.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/SsaExplicitDef.expected @@ -1,76 +1,32 @@ -| Capture.cs:6:16:6:16 | i | Capture.cs:6:16:6:16 | SSA param(i) | Capture.cs:6:16:6:16 | i | -| Capture.cs:6:16:6:16 | i | Capture.cs:13:13:13:17 | SSA def(i) | Capture.cs:13:13:13:17 | ... = ... | -| Capture.cs:8:13:8:13 | x | Capture.cs:8:13:8:17 | SSA def(x) | Capture.cs:8:13:8:17 | Int32 x = ... | -| Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | SSA def(x) | Capture.cs:15:13:15:17 | ... = ... | -| Capture.cs:8:13:8:13 | x | Capture.cs:43:9:43:13 | SSA def(x) | Capture.cs:43:9:43:13 | ... = ... | | Capture.cs:10:16:10:16 | a | Capture.cs:10:16:27:9 | SSA def(a) | Capture.cs:10:16:27:9 | Action a = ... | | Capture.cs:17:17:17:17 | y | Capture.cs:17:17:17:21 | SSA def(y) | Capture.cs:17:17:17:21 | Int32 y = ... | | Capture.cs:19:20:19:20 | b | Capture.cs:19:20:23:13 | SSA def(b) | Capture.cs:19:20:23:13 | Action b = ... | -| Capture.cs:29:13:29:13 | z | Capture.cs:29:13:29:17 | SSA def(z) | Capture.cs:29:13:29:17 | Int32 z = ... | -| Capture.cs:29:13:29:13 | z | Capture.cs:30:28:30:32 | SSA def(z) | Capture.cs:30:28:30:32 | ... = ... | -| Capture.cs:29:13:29:13 | z | Capture.cs:37:9:37:13 | SSA def(z) | Capture.cs:37:9:37:13 | ... = ... | | Capture.cs:30:16:30:16 | c | Capture.cs:30:16:30:35 | SSA def(c) | Capture.cs:30:16:30:35 | Action c = ... | -| Capture.cs:50:20:50:20 | a | Capture.cs:50:20:50:20 | SSA param(a) | Capture.cs:50:20:50:20 | a | -| Capture.cs:50:20:50:20 | a | Capture.cs:52:28:52:40 | SSA def(a) | Capture.cs:52:28:52:40 | ... = ... | | Capture.cs:52:16:52:16 | b | Capture.cs:52:16:52:43 | SSA def(b) | Capture.cs:52:16:52:43 | Action b = ... | | Capture.cs:57:57:57:63 | strings | Capture.cs:57:57:57:63 | SSA param(strings) | Capture.cs:57:57:57:63 | strings | -| Capture.cs:59:13:59:13 | i | Capture.cs:59:13:59:17 | SSA def(i) | Capture.cs:59:13:59:17 | Int32 i = ... | -| Capture.cs:59:13:59:13 | i | Capture.cs:60:36:60:38 | SSA def(i) | Capture.cs:60:36:60:38 | ...++ | | Capture.cs:60:27:60:27 | e | Capture.cs:60:27:60:38 | SSA def(e) | Capture.cs:60:27:60:38 | Func e = ... | | Capture.cs:65:45:65:51 | strings | Capture.cs:65:45:65:51 | SSA param(strings) | Capture.cs:65:45:65:51 | strings | -| Capture.cs:67:13:67:13 | c | Capture.cs:67:13:67:19 | SSA def(c) | Capture.cs:67:13:67:19 | Char c = ... | | Capture.cs:68:32:68:32 | s | Capture.cs:68:32:68:32 | SSA param(s) | Capture.cs:68:32:68:32 | s | | Capture.cs:69:25:69:25 | s | Capture.cs:69:25:69:25 | SSA param(s) | Capture.cs:69:25:69:25 | s | | Capture.cs:73:67:73:73 | strings | Capture.cs:73:67:73:73 | SSA param(strings) | Capture.cs:73:67:73:73 | strings | -| Capture.cs:75:13:75:13 | i | Capture.cs:75:13:75:17 | SSA def(i) | Capture.cs:75:13:75:17 | Int32 i = ... | -| Capture.cs:75:13:75:13 | i | Capture.cs:76:80:76:80 | SSA def(i) | Capture.cs:76:80:76:80 | access to local variable i | | Capture.cs:76:63:76:63 | e | Capture.cs:76:63:76:81 | SSA def(e) | Capture.cs:76:63:76:81 | Expression> e = ... | | Capture.cs:81:28:81:28 | i | Capture.cs:81:28:81:28 | SSA param(i) | Capture.cs:81:28:81:28 | i | | Capture.cs:81:28:81:28 | i | Capture.cs:81:34:81:36 | SSA def(i) | Capture.cs:81:34:81:36 | ...++ | | Capture.cs:83:65:83:71 | strings | Capture.cs:83:65:83:71 | SSA param(strings) | Capture.cs:83:65:83:71 | strings | -| Capture.cs:85:13:85:13 | b | Capture.cs:85:13:85:20 | SSA def(b) | Capture.cs:85:13:85:20 | Boolean b = ... | | Capture.cs:86:64:86:64 | e | Capture.cs:86:64:86:73 | SSA def(e) | Capture.cs:86:64:86:73 | Expression> e = ... | | Capture.cs:92:18:92:18 | d | Capture.cs:92:18:92:18 | SSA param(d) | Capture.cs:92:18:92:18 | d | -| Capture.cs:94:13:94:13 | y | Capture.cs:94:13:94:18 | SSA def(y) | Capture.cs:94:13:94:18 | Int32 y = ... | | Capture.cs:98:17:98:17 | x | Capture.cs:98:17:98:21 | SSA def(x) | Capture.cs:98:17:98:21 | Int32 x = ... | -| Capture.cs:102:13:102:13 | z | Capture.cs:102:13:102:18 | SSA def(z) | Capture.cs:102:13:102:18 | Int32 z = ... | -| Capture.cs:102:13:102:13 | z | Capture.cs:105:13:105:17 | SSA def(z) | Capture.cs:105:13:105:17 | ... = ... | -| Capture.cs:114:13:114:13 | a | Capture.cs:114:13:114:18 | SSA def(a) | Capture.cs:114:13:114:18 | Int32 a = ... | | Capture.cs:117:17:117:17 | x | Capture.cs:117:17:117:21 | SSA def(x) | Capture.cs:117:17:117:21 | Int32 x = ... | -| Capture.cs:122:13:122:13 | b | Capture.cs:122:13:122:18 | SSA def(b) | Capture.cs:122:13:122:18 | Int32 b = ... | -| Capture.cs:122:13:122:13 | b | Capture.cs:125:13:125:17 | SSA def(b) | Capture.cs:125:13:125:17 | ... = ... | -| Capture.cs:130:13:130:13 | c | Capture.cs:130:13:130:18 | SSA def(c) | Capture.cs:130:13:130:18 | Int32 c = ... | -| Capture.cs:130:13:130:13 | c | Capture.cs:133:13:133:17 | SSA def(c) | Capture.cs:133:13:133:17 | ... = ... | -| Capture.cs:139:13:139:13 | d | Capture.cs:139:13:139:18 | SSA def(d) | Capture.cs:139:13:139:18 | Int32 d = ... | -| Capture.cs:139:13:139:13 | d | Capture.cs:142:13:142:17 | SSA def(d) | Capture.cs:142:13:142:17 | ... = ... | -| Capture.cs:147:13:147:13 | e | Capture.cs:147:13:147:18 | SSA def(e) | Capture.cs:147:13:147:18 | Int32 e = ... | -| Capture.cs:147:13:147:13 | e | Capture.cs:151:13:151:17 | SSA def(e) | Capture.cs:151:13:151:17 | ... = ... | -| Capture.cs:154:13:154:13 | f | Capture.cs:154:13:154:18 | SSA def(f) | Capture.cs:154:13:154:18 | Int32 f = ... | -| Capture.cs:154:13:154:13 | f | Capture.cs:158:13:158:17 | SSA def(f) | Capture.cs:158:13:158:17 | ... = ... | -| Capture.cs:168:13:168:13 | h | Capture.cs:168:13:168:18 | SSA def(h) | Capture.cs:168:13:168:18 | Int32 h = ... | -| Capture.cs:168:13:168:13 | h | Capture.cs:171:13:171:17 | SSA def(h) | Capture.cs:171:13:171:17 | ... = ... | -| Capture.cs:168:13:168:13 | h | Capture.cs:174:17:174:21 | SSA def(h) | Capture.cs:174:17:174:21 | ... = ... | -| Capture.cs:182:17:182:17 | i | Capture.cs:182:17:182:21 | SSA def(i) | Capture.cs:182:17:182:21 | Int32 i = ... | -| Capture.cs:182:17:182:17 | i | Capture.cs:188:13:188:17 | SSA def(i) | Capture.cs:188:13:188:17 | ... = ... | -| Capture.cs:197:17:197:17 | i | Capture.cs:197:17:197:21 | SSA def(i) | Capture.cs:197:17:197:21 | Int32 i = ... | | Capture.cs:198:28:198:29 | eh | Capture.cs:198:28:198:44 | SSA def(eh) | Capture.cs:198:28:198:44 | MyEventHandler eh = ... | | Capture.cs:203:28:203:30 | eh2 | Capture.cs:203:28:203:45 | SSA def(eh2) | Capture.cs:203:28:203:45 | MyEventHandler eh2 = ... | -| Capture.cs:209:17:209:17 | i | Capture.cs:209:17:209:21 | SSA def(i) | Capture.cs:209:17:209:21 | Int32 i = ... | | Capture.cs:210:24:210:24 | p | Capture.cs:210:24:210:59 | SSA def(p) | Capture.cs:210:24:210:59 | Process p = ... | | Capture.cs:212:30:212:35 | exited | Capture.cs:212:30:212:71 | SSA def(exited) | Capture.cs:212:30:212:71 | EventHandler exited = ... | -| Capture.cs:229:13:229:13 | i | Capture.cs:232:9:232:13 | SSA def(i) | Capture.cs:232:9:232:13 | ... = ... | -| Capture.cs:229:13:229:13 | i | Capture.cs:235:21:235:25 | SSA def(i) | Capture.cs:235:21:235:25 | ... = ... | -| Capture.cs:242:13:242:13 | i | Capture.cs:242:13:242:17 | SSA def(i) | Capture.cs:242:13:242:17 | Int32 i = ... | -| Capture.cs:242:13:242:13 | i | Capture.cs:245:13:245:17 | SSA def(i) | Capture.cs:245:13:245:17 | ... = ... | -| Capture.cs:242:13:242:13 | i | Capture.cs:254:27:254:27 | SSA def(i) | Capture.cs:254:27:254:27 | access to local variable i | | Capture.cs:248:36:248:36 | j | Capture.cs:251:13:251:17 | SSA def(j) | Capture.cs:251:13:251:17 | ... = ... | | Consistency.cs:7:25:7:25 | b | Consistency.cs:7:25:7:25 | SSA param(b) | Consistency.cs:7:25:7:25 | b | | Consistency.cs:15:17:15:17 | i | Consistency.cs:15:17:15:21 | SSA def(i) | Consistency.cs:15:17:15:21 | Int32 i = ... | | Consistency.cs:15:17:15:17 | i | Consistency.cs:15:17:15:21 | [finally: exception(Exception)] SSA def(i) | Consistency.cs:15:17:15:21 | Int32 i = ... | | Consistency.cs:25:29:25:29 | c | Consistency.cs:25:29:25:29 | SSA def(c) | Consistency.cs:25:29:25:29 | Consistency c | | Consistency.cs:30:30:30:30 | c | Consistency.cs:32:9:32:29 | SSA def(c) | Consistency.cs:32:9:32:29 | ... = ... | -| Consistency.cs:38:13:38:13 | i | Consistency.cs:38:13:38:13 | SSA def(i) | Consistency.cs:38:13:38:13 | Int32 i | -| Consistency.cs:38:13:38:13 | i | Consistency.cs:39:28:39:32 | SSA def(i) | Consistency.cs:39:28:39:32 | ... = ... | | Consistency.cs:44:11:44:11 | s | Consistency.cs:44:11:44:11 | SSA def(s) | Consistency.cs:44:11:44:11 | S s | | Consistency.cs:49:30:49:30 | a | Consistency.cs:49:30:49:30 | SSA param(a) | Consistency.cs:49:30:49:30 | a | | Consistency.cs:49:37:49:37 | i | Consistency.cs:49:37:49:37 | SSA param(i) | Consistency.cs:49:37:49:37 | i | @@ -92,12 +48,6 @@ | DefUse.cs:44:13:44:13 | z | DefUse.cs:50:23:50:23 | SSA def(z) | DefUse.cs:50:23:50:23 | access to local variable z | | DefUse.cs:53:9:53:13 | this.Field | DefUse.cs:53:9:53:17 | SSA def(this.Field) | DefUse.cs:53:9:53:17 | ... = ... | | DefUse.cs:56:9:56:12 | this.Prop | DefUse.cs:56:9:56:16 | SSA def(this.Prop) | DefUse.cs:56:9:56:16 | ... = ... | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:59:13:59:17 | SSA def(i) | DefUse.cs:59:13:59:17 | Int32 i = ... | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:60:37:60:41 | SSA def(i) | DefUse.cs:60:37:60:41 | ... = ... | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:71:9:71:13 | SSA def(i) | DefUse.cs:71:9:71:13 | ... = ... | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:72:9:72:11 | SSA def(i) | DefUse.cs:72:9:72:11 | ...++ | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:75:9:75:13 | SSA def(i) | DefUse.cs:75:9:75:13 | ... = ... | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:76:9:76:11 | SSA def(i) | DefUse.cs:76:9:76:11 | ...-- | | DefUse.cs:63:9:63:14 | this.Field2 | DefUse.cs:63:9:63:18 | SSA def(this.Field2) | DefUse.cs:63:9:63:18 | ... = ... | | DefUse.cs:66:9:66:14 | this.Field3 | DefUse.cs:66:9:66:18 | SSA def(this.Field3) | DefUse.cs:66:9:66:18 | ... = ... | | DefUse.cs:67:19:67:20 | tc | DefUse.cs:67:19:67:27 | SSA def(tc) | DefUse.cs:67:19:67:27 | TestClass tc = ... | @@ -122,9 +72,6 @@ | DefUse.cs:142:68:142:69 | ie | DefUse.cs:142:68:142:69 | SSA param(ie) | DefUse.cs:142:68:142:69 | ie | | DefUse.cs:144:22:144:22 | x | DefUse.cs:144:22:144:22 | SSA def(x) | DefUse.cs:144:22:144:22 | String x | | DefUse.cs:155:9:155:14 | this.Field4 | DefUse.cs:155:9:155:18 | SSA def(this.Field4) | DefUse.cs:155:9:155:18 | ... = ... | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:167:23:167:23 | SSA param(i) | DefUse.cs:167:23:167:23 | i | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:170:9:170:13 | SSA def(i) | DefUse.cs:170:9:170:13 | ... = ... | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:173:13:173:17 | SSA def(i) | DefUse.cs:173:13:173:17 | ... = ... | | DefUse.cs:171:23:171:23 | a | DefUse.cs:171:23:180:9 | SSA def(a) | DefUse.cs:171:23:180:9 | Action a = ... | | DefUse.cs:171:23:171:23 | a | DefUse.cs:186:9:190:9 | SSA def(a) | DefUse.cs:186:9:190:9 | ... = ... | | DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:184:9:184:18 | SSA def(this.Field5) | DefUse.cs:184:9:184:18 | ... = ... | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SsaImplicitCall.expected b/csharp/ql/test/library-tests/dataflow/ssa/SsaImplicitCall.expected index 22a56a7da24..189720acf12 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/SsaImplicitCall.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/SsaImplicitCall.expected @@ -1,20 +1,3 @@ -| Capture.cs:6:16:6:16 | i | Capture.cs:38:9:38:11 | SSA call def(i) | Capture.cs:13:13:13:17 | ... = ... | -| Capture.cs:6:16:6:16 | i | Capture.cs:44:9:44:12 | SSA call def(i) | Capture.cs:13:13:13:17 | ... = ... | -| Capture.cs:8:13:8:13 | x | Capture.cs:38:9:38:11 | SSA call def(x) | Capture.cs:15:13:15:17 | ... = ... | -| Capture.cs:8:13:8:13 | x | Capture.cs:44:9:44:12 | SSA call def(x) | Capture.cs:15:13:15:17 | ... = ... | -| Capture.cs:29:13:29:13 | z | Capture.cs:32:9:32:11 | SSA call def(z) | Capture.cs:30:28:30:32 | ... = ... | -| Capture.cs:29:13:29:13 | z | Capture.cs:44:9:44:12 | SSA call def(z) | Capture.cs:30:28:30:32 | ... = ... | -| Capture.cs:50:20:50:20 | a | Capture.cs:53:9:53:11 | SSA call def(a) | Capture.cs:52:28:52:40 | ... = ... | -| Capture.cs:59:13:59:13 | i | Capture.cs:61:9:61:25 | SSA call def(i) | Capture.cs:60:36:60:38 | ...++ | -| Capture.cs:75:13:75:13 | i | Capture.cs:77:9:77:25 | SSA call def(i) | Capture.cs:76:80:76:80 | access to local variable i | -| Capture.cs:102:13:102:13 | z | Capture.cs:103:9:107:10 | SSA call def(z) | Capture.cs:105:13:105:17 | ... = ... | -| Capture.cs:122:13:122:13 | b | Capture.cs:128:9:128:12 | SSA call def(b) | Capture.cs:125:13:125:17 | ... = ... | -| Capture.cs:130:13:130:13 | c | Capture.cs:136:9:136:12 | SSA call def(c) | Capture.cs:133:13:133:17 | ... = ... | -| Capture.cs:139:13:139:13 | d | Capture.cs:144:9:144:12 | SSA call def(d) | Capture.cs:142:13:142:17 | ... = ... | -| Capture.cs:154:13:154:13 | f | Capture.cs:160:9:160:12 | SSA call def(f) | Capture.cs:158:13:158:17 | ... = ... | -| Capture.cs:168:13:168:13 | h | Capture.cs:176:13:176:16 | SSA call def(h) | Capture.cs:174:17:174:21 | ... = ... | -| Capture.cs:229:13:229:13 | i | Capture.cs:236:9:236:12 | SSA call def(i) | Capture.cs:235:21:235:25 | ... = ... | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:181:9:181:11 | SSA call def(i) | DefUse.cs:173:13:173:17 | ... = ... | | DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:191:9:191:11 | SSA call def(this.Field5) | DefUse.cs:188:13:188:22 | ... = ... | | Example.cs:8:9:8:18 | this.Field | Example.cs:13:13:13:23 | SSA call def(this.Field) | Example.cs:8:9:8:22 | ... = ... | | Example.cs:8:9:8:18 | this.Field | Example.cs:13:13:13:23 | SSA call def(this.Field) | Example.cs:11:13:11:30 | ... = ... | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SsaRead.expected b/csharp/ql/test/library-tests/dataflow/ssa/SsaRead.expected index 48acb24891f..8df92f84755 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/SsaRead.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/SsaRead.expected @@ -1,29 +1,11 @@ -| Capture.cs:6:16:6:16 | i | Capture.cs:6:16:6:16 | SSA param(i) | Capture.cs:8:17:8:17 | access to parameter i | -| Capture.cs:6:16:6:16 | i | Capture.cs:6:16:6:16 | SSA param(i) | Capture.cs:33:13:33:13 | access to parameter i | -| Capture.cs:6:16:6:16 | i | Capture.cs:10:20:27:9 | SSA capture def(i) | Capture.cs:12:17:12:17 | access to parameter i | -| Capture.cs:6:16:6:16 | i | Capture.cs:13:13:13:17 | SSA def(i) | Capture.cs:14:17:14:17 | access to parameter i | -| Capture.cs:6:16:6:16 | i | Capture.cs:38:9:38:11 | SSA call def(i) | Capture.cs:39:13:39:13 | access to parameter i | -| Capture.cs:8:13:8:13 | x | Capture.cs:8:13:8:17 | SSA def(x) | Capture.cs:34:13:34:13 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | SSA def(x) | Capture.cs:16:17:16:17 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | SSA def(x) | Capture.cs:17:21:17:21 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:19:24:23:13 | SSA capture def(x) | Capture.cs:21:21:21:21 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:38:9:38:11 | SSA call def(x) | Capture.cs:40:13:40:13 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:43:9:43:13 | SSA def(x) | Capture.cs:44:11:44:11 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:44:9:44:12 | SSA call def(x) | Capture.cs:45:13:45:13 | access to local variable x | -| Capture.cs:8:13:8:13 | x | Capture.cs:44:9:44:12 | SSA call def(x) | Capture.cs:47:13:47:13 | access to local variable x | | Capture.cs:10:16:10:16 | a | Capture.cs:10:16:27:9 | SSA def(a) | Capture.cs:38:9:38:9 | access to local variable a | | Capture.cs:10:16:10:16 | a | Capture.cs:10:16:27:9 | SSA def(a) | Capture.cs:46:12:46:12 | access to local variable a | | Capture.cs:17:17:17:17 | y | Capture.cs:17:17:17:21 | SSA def(y) | Capture.cs:26:17:26:17 | access to local variable y | | Capture.cs:17:17:17:17 | y | Capture.cs:19:24:23:13 | SSA capture def(y) | Capture.cs:22:21:22:21 | access to local variable y | | Capture.cs:19:20:19:20 | b | Capture.cs:19:20:23:13 | SSA def(b) | Capture.cs:25:13:25:13 | access to local variable b | -| Capture.cs:29:13:29:13 | z | Capture.cs:32:9:32:11 | SSA call def(z) | Capture.cs:35:13:35:13 | access to local variable z | -| Capture.cs:29:13:29:13 | z | Capture.cs:37:9:37:13 | SSA def(z) | Capture.cs:41:13:41:13 | access to local variable z | | Capture.cs:30:16:30:16 | c | Capture.cs:30:16:30:35 | SSA def(c) | Capture.cs:32:9:32:9 | access to local variable c | -| Capture.cs:50:20:50:20 | a | Capture.cs:53:9:53:11 | SSA call def(a) | Capture.cs:54:9:54:9 | access to parameter a | | Capture.cs:52:16:52:16 | b | Capture.cs:52:16:52:43 | SSA def(b) | Capture.cs:53:9:53:9 | access to local variable b | | Capture.cs:57:57:57:63 | strings | Capture.cs:57:57:57:63 | SSA param(strings) | Capture.cs:61:9:61:15 | access to parameter strings | -| Capture.cs:59:13:59:13 | i | Capture.cs:60:31:60:38 | SSA capture def(i) | Capture.cs:60:36:60:36 | access to local variable i | -| Capture.cs:59:13:59:13 | i | Capture.cs:61:9:61:25 | SSA call def(i) | Capture.cs:62:13:62:13 | access to local variable i | | Capture.cs:60:27:60:27 | e | Capture.cs:60:27:60:38 | SSA def(e) | Capture.cs:61:24:61:24 | access to local variable e | | Capture.cs:65:45:65:51 | strings | Capture.cs:65:45:65:51 | SSA param(strings) | Capture.cs:68:18:68:24 | access to parameter strings | | Capture.cs:65:45:65:51 | strings | Capture.cs:65:45:65:51 | SSA param(strings) | Capture.cs:70:9:70:15 | access to parameter strings | @@ -32,8 +14,6 @@ | Capture.cs:68:32:68:32 | s | Capture.cs:68:32:68:32 | SSA param(s) | Capture.cs:68:37:68:37 | access to parameter s | | Capture.cs:69:25:69:25 | s | Capture.cs:69:25:69:25 | SSA param(s) | Capture.cs:69:59:69:59 | access to parameter s | | Capture.cs:73:67:73:73 | strings | Capture.cs:73:67:73:73 | SSA param(strings) | Capture.cs:77:9:77:15 | access to parameter strings | -| Capture.cs:75:13:75:13 | i | Capture.cs:76:67:76:81 | SSA capture def(i) | Capture.cs:76:80:76:80 | access to local variable i | -| Capture.cs:75:13:75:13 | i | Capture.cs:77:9:77:25 | SSA call def(i) | Capture.cs:78:13:78:13 | access to local variable i | | Capture.cs:76:63:76:63 | e | Capture.cs:76:63:76:81 | SSA def(e) | Capture.cs:77:24:77:24 | access to local variable e | | Capture.cs:81:28:81:28 | i | Capture.cs:81:28:81:28 | SSA param(i) | Capture.cs:81:34:81:34 | access to parameter i | | Capture.cs:83:65:83:71 | strings | Capture.cs:83:65:83:71 | SSA param(strings) | Capture.cs:87:9:87:15 | access to parameter strings | @@ -42,17 +22,9 @@ | Capture.cs:92:18:92:18 | d | Capture.cs:92:18:92:18 | SSA param(d) | Capture.cs:92:24:92:24 | access to parameter d | | Capture.cs:94:13:94:13 | y | Capture.cs:96:12:100:9 | SSA capture def(y) | Capture.cs:98:21:98:21 | access to local variable y | | Capture.cs:98:17:98:17 | x | Capture.cs:98:17:98:21 | SSA def(x) | Capture.cs:99:20:99:20 | access to local variable x | -| Capture.cs:102:13:102:13 | z | Capture.cs:105:13:105:17 | SSA def(z) | Capture.cs:106:20:106:20 | access to local variable z | | Capture.cs:114:13:114:13 | a | Capture.cs:115:9:119:9 | SSA capture def(a) | Capture.cs:117:21:117:21 | access to local variable a | | Capture.cs:117:17:117:17 | x | Capture.cs:117:17:117:21 | SSA def(x) | Capture.cs:118:17:118:17 | access to local variable x | -| Capture.cs:122:13:122:13 | b | Capture.cs:125:13:125:17 | SSA def(b) | Capture.cs:126:17:126:17 | access to local variable b | -| Capture.cs:130:13:130:13 | c | Capture.cs:133:13:133:17 | SSA def(c) | Capture.cs:134:17:134:17 | access to local variable c | -| Capture.cs:130:13:130:13 | c | Capture.cs:136:9:136:12 | SSA call def(c) | Capture.cs:137:13:137:13 | access to local variable c | -| Capture.cs:139:13:139:13 | d | Capture.cs:144:9:144:12 | SSA call def(d) | Capture.cs:145:13:145:13 | access to local variable d | -| Capture.cs:147:13:147:13 | e | Capture.cs:148:9:152:9 | SSA capture def(e) | Capture.cs:150:17:150:17 | access to local variable e | -| Capture.cs:154:13:154:13 | f | Capture.cs:154:13:154:18 | SSA def(f) | Capture.cs:155:13:155:13 | access to local variable f | | Capture.cs:162:13:162:13 | g | Capture.cs:163:9:166:9 | SSA capture def(g) | Capture.cs:165:17:165:17 | access to local variable g | -| Capture.cs:168:13:168:13 | h | Capture.cs:176:13:176:16 | SSA call def(h) | Capture.cs:177:17:177:17 | access to local variable h | | Capture.cs:182:17:182:17 | i | Capture.cs:183:13:186:13 | SSA capture def(i) | Capture.cs:185:21:185:21 | access to local variable i | | Capture.cs:197:17:197:17 | i | Capture.cs:198:33:198:44 | SSA capture def(i) | Capture.cs:198:43:198:43 | access to local variable i | | Capture.cs:197:17:197:17 | i | Capture.cs:203:34:203:45 | SSA capture def(i) | Capture.cs:203:44:203:44 | access to local variable i | @@ -61,10 +33,6 @@ | Capture.cs:209:17:209:17 | i | Capture.cs:212:39:212:71 | SSA capture def(i) | Capture.cs:212:70:212:70 | access to local variable i | | Capture.cs:210:24:210:24 | p | Capture.cs:210:24:210:59 | SSA def(p) | Capture.cs:213:17:213:17 | access to local variable p | | Capture.cs:212:30:212:35 | exited | Capture.cs:212:30:212:71 | SSA def(exited) | Capture.cs:213:29:213:34 | access to local variable exited | -| Capture.cs:229:13:229:13 | i | Capture.cs:231:9:231:49 | SSA capture def(i) | Capture.cs:231:47:231:47 | access to local variable i | -| Capture.cs:229:13:229:13 | i | Capture.cs:236:9:236:12 | SSA call def(i) | Capture.cs:237:34:237:34 | access to local variable i | -| Capture.cs:242:13:242:13 | i | Capture.cs:242:13:242:17 | SSA def(i) | Capture.cs:254:27:254:27 | access to local variable i | -| Capture.cs:242:13:242:13 | i | Capture.cs:254:27:254:27 | SSA def(i) | Capture.cs:255:34:255:34 | access to local variable i | | Consistency.cs:7:25:7:25 | b | Consistency.cs:7:25:7:25 | SSA param(b) | Consistency.cs:11:17:11:17 | access to parameter b | | Consistency.cs:15:17:15:17 | i | Consistency.cs:15:17:15:21 | SSA def(i) | Consistency.cs:16:17:16:17 | access to local variable i | | Consistency.cs:15:17:15:17 | i | Consistency.cs:15:17:15:21 | [finally: exception(Exception)] SSA def(i) | Consistency.cs:16:17:16:17 | access to local variable i | @@ -73,7 +41,6 @@ | Consistency.cs:26:13:26:19 | c.Field | Consistency.cs:25:29:25:29 | SSA qualifier def(c.Field) | Consistency.cs:26:13:26:19 | access to field Field | | Consistency.cs:26:13:26:19 | c.Field | Consistency.cs:25:29:25:29 | SSA qualifier def(c.Field) | Consistency.cs:27:13:27:19 | access to field Field | | Consistency.cs:30:30:30:30 | c | Consistency.cs:32:9:32:29 | SSA def(c) | Consistency.cs:33:9:33:9 | access to parameter c | -| Consistency.cs:38:13:38:13 | i | Consistency.cs:39:28:39:32 | SSA def(i) | Consistency.cs:39:39:39:39 | access to local variable i | | Consistency.cs:44:11:44:11 | s | Consistency.cs:44:11:44:11 | SSA def(s) | Consistency.cs:45:9:45:9 | access to local variable s | | Consistency.cs:44:11:44:11 | s | Consistency.cs:44:11:44:11 | SSA def(s) | Consistency.cs:46:13:46:13 | access to local variable s | | Consistency.cs:49:30:49:30 | a | Consistency.cs:49:30:49:30 | SSA param(a) | Consistency.cs:49:47:49:47 | access to parameter a | @@ -102,11 +69,6 @@ | DefUse.cs:44:13:44:13 | z | DefUse.cs:50:23:50:23 | SSA def(z) | DefUse.cs:51:13:51:13 | access to local variable z | | DefUse.cs:53:9:53:13 | this.Field | DefUse.cs:53:9:53:17 | SSA def(this.Field) | DefUse.cs:54:13:54:17 | access to field Field | | DefUse.cs:56:9:56:12 | this.Prop | DefUse.cs:56:9:56:16 | SSA def(this.Prop) | DefUse.cs:57:13:57:16 | access to property Prop | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:59:13:59:17 | SSA def(i) | DefUse.cs:61:13:61:13 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:71:9:71:13 | SSA def(i) | DefUse.cs:72:9:72:9 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:72:9:72:11 | SSA def(i) | DefUse.cs:73:13:73:13 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:75:9:75:13 | SSA def(i) | DefUse.cs:76:9:76:9 | access to local variable i | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:76:9:76:11 | SSA def(i) | DefUse.cs:77:13:77:13 | access to local variable i | | DefUse.cs:63:9:63:14 | this.Field2 | DefUse.cs:63:9:63:18 | SSA def(this.Field2) | DefUse.cs:64:13:64:18 | access to field Field2 | | DefUse.cs:63:9:63:14 | this.Field2 | DefUse.cs:63:9:63:18 | SSA def(this.Field2) | DefUse.cs:80:37:80:42 | access to field Field2 | | DefUse.cs:66:9:66:14 | this.Field3 | DefUse.cs:66:9:66:18 | SSA def(this.Field3) | DefUse.cs:69:13:69:18 | access to field Field3 | @@ -133,11 +95,6 @@ | DefUse.cs:155:9:155:14 | this.Field4 | DefUse.cs:155:9:155:18 | SSA def(this.Field4) | DefUse.cs:157:13:157:18 | access to field Field4 | | DefUse.cs:162:13:162:18 | this.Field4 | DefUse.cs:160:10:160:16 | SSA entry def(this.Field4) | DefUse.cs:162:13:162:18 | access to field Field4 | | DefUse.cs:162:13:162:18 | this.Field4 | DefUse.cs:160:10:160:16 | SSA entry def(this.Field4) | DefUse.cs:163:13:163:18 | access to field Field4 | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:167:23:167:23 | SSA param(i) | DefUse.cs:169:13:169:13 | access to parameter i | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:173:13:173:17 | SSA def(i) | DefUse.cs:174:17:174:17 | access to parameter i | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:175:32:179:13 | SSA capture def(i) | DefUse.cs:177:21:177:21 | access to parameter i | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:175:32:179:13 | SSA capture def(i) | DefUse.cs:178:21:178:21 | access to parameter i | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:181:9:181:11 | SSA call def(i) | DefUse.cs:182:13:182:13 | access to parameter i | | DefUse.cs:171:23:171:23 | a | DefUse.cs:171:23:180:9 | SSA def(a) | DefUse.cs:181:9:181:9 | access to local variable a | | DefUse.cs:171:23:171:23 | a | DefUse.cs:186:9:190:9 | SSA def(a) | DefUse.cs:191:9:191:9 | access to local variable a | | DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:184:9:184:18 | SSA def(this.Field5) | DefUse.cs:185:13:185:18 | access to field Field5 | diff --git a/csharp/ql/test/library-tests/dataflow/ssa/SsaUltimateDef.expected b/csharp/ql/test/library-tests/dataflow/ssa/SsaUltimateDef.expected index bf7db292429..311df004270 100644 --- a/csharp/ql/test/library-tests/dataflow/ssa/SsaUltimateDef.expected +++ b/csharp/ql/test/library-tests/dataflow/ssa/SsaUltimateDef.expected @@ -1,118 +1,37 @@ -| Capture.cs:6:16:6:16 | i | Capture.cs:6:16:6:16 | SSA param(i) | Capture.cs:6:16:6:16 | SSA param(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:10:20:27:9 | SSA capture def(i) | Capture.cs:10:20:27:9 | SSA capture def(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:13:13:13:17 | SSA def(i) | Capture.cs:13:13:13:17 | SSA def(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:38:9:38:11 | SSA call def(i) | Capture.cs:6:16:6:16 | SSA param(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:38:9:38:11 | SSA call def(i) | Capture.cs:38:9:38:11 | SSA call def(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:44:9:44:12 | SSA call def(i) | Capture.cs:6:16:6:16 | SSA param(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:44:9:44:12 | SSA call def(i) | Capture.cs:38:9:38:11 | SSA call def(i) | -| Capture.cs:6:16:6:16 | i | Capture.cs:44:9:44:12 | SSA call def(i) | Capture.cs:44:9:44:12 | SSA call def(i) | -| Capture.cs:8:13:8:13 | x | Capture.cs:8:13:8:17 | SSA def(x) | Capture.cs:8:13:8:17 | SSA def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:15:13:15:17 | SSA def(x) | Capture.cs:15:13:15:17 | SSA def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:19:24:23:13 | SSA capture def(x) | Capture.cs:19:24:23:13 | SSA capture def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:38:9:38:11 | SSA call def(x) | Capture.cs:8:13:8:17 | SSA def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:38:9:38:11 | SSA call def(x) | Capture.cs:38:9:38:11 | SSA call def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:43:9:43:13 | SSA def(x) | Capture.cs:43:9:43:13 | SSA def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:44:9:44:12 | SSA call def(x) | Capture.cs:43:9:43:13 | SSA def(x) | -| Capture.cs:8:13:8:13 | x | Capture.cs:44:9:44:12 | SSA call def(x) | Capture.cs:44:9:44:12 | SSA call def(x) | | Capture.cs:10:16:10:16 | a | Capture.cs:10:16:27:9 | SSA def(a) | Capture.cs:10:16:27:9 | SSA def(a) | | Capture.cs:17:17:17:17 | y | Capture.cs:17:17:17:21 | SSA def(y) | Capture.cs:17:17:17:21 | SSA def(y) | | Capture.cs:17:17:17:17 | y | Capture.cs:19:24:23:13 | SSA capture def(y) | Capture.cs:19:24:23:13 | SSA capture def(y) | | Capture.cs:19:20:19:20 | b | Capture.cs:19:20:23:13 | SSA def(b) | Capture.cs:19:20:23:13 | SSA def(b) | -| Capture.cs:29:13:29:13 | z | Capture.cs:29:13:29:17 | SSA def(z) | Capture.cs:29:13:29:17 | SSA def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:30:28:30:32 | SSA def(z) | Capture.cs:30:28:30:32 | SSA def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:32:9:32:11 | SSA call def(z) | Capture.cs:29:13:29:17 | SSA def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:32:9:32:11 | SSA call def(z) | Capture.cs:32:9:32:11 | SSA call def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:37:9:37:13 | SSA def(z) | Capture.cs:37:9:37:13 | SSA def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:44:9:44:12 | SSA call def(z) | Capture.cs:37:9:37:13 | SSA def(z) | -| Capture.cs:29:13:29:13 | z | Capture.cs:44:9:44:12 | SSA call def(z) | Capture.cs:44:9:44:12 | SSA call def(z) | | Capture.cs:30:16:30:16 | c | Capture.cs:30:16:30:35 | SSA def(c) | Capture.cs:30:16:30:35 | SSA def(c) | -| Capture.cs:50:20:50:20 | a | Capture.cs:50:20:50:20 | SSA param(a) | Capture.cs:50:20:50:20 | SSA param(a) | -| Capture.cs:50:20:50:20 | a | Capture.cs:52:28:52:40 | SSA def(a) | Capture.cs:52:28:52:40 | SSA def(a) | -| Capture.cs:50:20:50:20 | a | Capture.cs:53:9:53:11 | SSA call def(a) | Capture.cs:50:20:50:20 | SSA param(a) | -| Capture.cs:50:20:50:20 | a | Capture.cs:53:9:53:11 | SSA call def(a) | Capture.cs:53:9:53:11 | SSA call def(a) | | Capture.cs:52:16:52:16 | b | Capture.cs:52:16:52:43 | SSA def(b) | Capture.cs:52:16:52:43 | SSA def(b) | | Capture.cs:57:57:57:63 | strings | Capture.cs:57:57:57:63 | SSA param(strings) | Capture.cs:57:57:57:63 | SSA param(strings) | -| Capture.cs:59:13:59:13 | i | Capture.cs:59:13:59:17 | SSA def(i) | Capture.cs:59:13:59:17 | SSA def(i) | -| Capture.cs:59:13:59:13 | i | Capture.cs:60:31:60:38 | SSA capture def(i) | Capture.cs:60:31:60:38 | SSA capture def(i) | -| Capture.cs:59:13:59:13 | i | Capture.cs:60:36:60:38 | SSA def(i) | Capture.cs:60:36:60:38 | SSA def(i) | -| Capture.cs:59:13:59:13 | i | Capture.cs:61:9:61:25 | SSA call def(i) | Capture.cs:59:13:59:17 | SSA def(i) | -| Capture.cs:59:13:59:13 | i | Capture.cs:61:9:61:25 | SSA call def(i) | Capture.cs:61:9:61:25 | SSA call def(i) | | Capture.cs:60:27:60:27 | e | Capture.cs:60:27:60:38 | SSA def(e) | Capture.cs:60:27:60:38 | SSA def(e) | | Capture.cs:65:45:65:51 | strings | Capture.cs:65:45:65:51 | SSA param(strings) | Capture.cs:65:45:65:51 | SSA param(strings) | -| Capture.cs:67:13:67:13 | c | Capture.cs:67:13:67:19 | SSA def(c) | Capture.cs:67:13:67:19 | SSA def(c) | | Capture.cs:67:13:67:13 | c | Capture.cs:68:32:68:49 | SSA capture def(c) | Capture.cs:68:32:68:49 | SSA capture def(c) | | Capture.cs:67:13:67:13 | c | Capture.cs:69:9:69:62 | SSA capture def(c) | Capture.cs:69:9:69:62 | SSA capture def(c) | | Capture.cs:68:32:68:32 | s | Capture.cs:68:32:68:32 | SSA param(s) | Capture.cs:68:32:68:32 | SSA param(s) | | Capture.cs:69:25:69:25 | s | Capture.cs:69:25:69:25 | SSA param(s) | Capture.cs:69:25:69:25 | SSA param(s) | | Capture.cs:73:67:73:73 | strings | Capture.cs:73:67:73:73 | SSA param(strings) | Capture.cs:73:67:73:73 | SSA param(strings) | -| Capture.cs:75:13:75:13 | i | Capture.cs:75:13:75:17 | SSA def(i) | Capture.cs:75:13:75:17 | SSA def(i) | -| Capture.cs:75:13:75:13 | i | Capture.cs:76:67:76:81 | SSA capture def(i) | Capture.cs:76:67:76:81 | SSA capture def(i) | -| Capture.cs:75:13:75:13 | i | Capture.cs:76:80:76:80 | SSA def(i) | Capture.cs:76:80:76:80 | SSA def(i) | -| Capture.cs:75:13:75:13 | i | Capture.cs:77:9:77:25 | SSA call def(i) | Capture.cs:75:13:75:17 | SSA def(i) | -| Capture.cs:75:13:75:13 | i | Capture.cs:77:9:77:25 | SSA call def(i) | Capture.cs:77:9:77:25 | SSA call def(i) | | Capture.cs:76:63:76:63 | e | Capture.cs:76:63:76:81 | SSA def(e) | Capture.cs:76:63:76:81 | SSA def(e) | | Capture.cs:81:28:81:28 | i | Capture.cs:81:28:81:28 | SSA param(i) | Capture.cs:81:28:81:28 | SSA param(i) | | Capture.cs:81:28:81:28 | i | Capture.cs:81:34:81:36 | SSA def(i) | Capture.cs:81:34:81:36 | SSA def(i) | | Capture.cs:83:65:83:71 | strings | Capture.cs:83:65:83:71 | SSA param(strings) | Capture.cs:83:65:83:71 | SSA param(strings) | -| Capture.cs:85:13:85:13 | b | Capture.cs:85:13:85:20 | SSA def(b) | Capture.cs:85:13:85:20 | SSA def(b) | | Capture.cs:85:13:85:13 | b | Capture.cs:86:68:86:73 | SSA capture def(b) | Capture.cs:86:68:86:73 | SSA capture def(b) | | Capture.cs:86:64:86:64 | e | Capture.cs:86:64:86:73 | SSA def(e) | Capture.cs:86:64:86:73 | SSA def(e) | | Capture.cs:92:18:92:18 | d | Capture.cs:92:18:92:18 | SSA param(d) | Capture.cs:92:18:92:18 | SSA param(d) | -| Capture.cs:94:13:94:13 | y | Capture.cs:94:13:94:18 | SSA def(y) | Capture.cs:94:13:94:18 | SSA def(y) | | Capture.cs:94:13:94:13 | y | Capture.cs:96:12:100:9 | SSA capture def(y) | Capture.cs:96:12:100:9 | SSA capture def(y) | | Capture.cs:98:17:98:17 | x | Capture.cs:98:17:98:21 | SSA def(x) | Capture.cs:98:17:98:21 | SSA def(x) | -| Capture.cs:102:13:102:13 | z | Capture.cs:102:13:102:18 | SSA def(z) | Capture.cs:102:13:102:18 | SSA def(z) | -| Capture.cs:102:13:102:13 | z | Capture.cs:103:9:107:10 | SSA call def(z) | Capture.cs:102:13:102:18 | SSA def(z) | -| Capture.cs:102:13:102:13 | z | Capture.cs:103:9:107:10 | SSA call def(z) | Capture.cs:103:9:107:10 | SSA call def(z) | -| Capture.cs:102:13:102:13 | z | Capture.cs:105:13:105:17 | SSA def(z) | Capture.cs:105:13:105:17 | SSA def(z) | -| Capture.cs:114:13:114:13 | a | Capture.cs:114:13:114:18 | SSA def(a) | Capture.cs:114:13:114:18 | SSA def(a) | | Capture.cs:114:13:114:13 | a | Capture.cs:115:9:119:9 | SSA capture def(a) | Capture.cs:115:9:119:9 | SSA capture def(a) | | Capture.cs:117:17:117:17 | x | Capture.cs:117:17:117:21 | SSA def(x) | Capture.cs:117:17:117:21 | SSA def(x) | -| Capture.cs:122:13:122:13 | b | Capture.cs:122:13:122:18 | SSA def(b) | Capture.cs:122:13:122:18 | SSA def(b) | -| Capture.cs:122:13:122:13 | b | Capture.cs:125:13:125:17 | SSA def(b) | Capture.cs:125:13:125:17 | SSA def(b) | -| Capture.cs:122:13:122:13 | b | Capture.cs:128:9:128:12 | SSA call def(b) | Capture.cs:122:13:122:18 | SSA def(b) | -| Capture.cs:122:13:122:13 | b | Capture.cs:128:9:128:12 | SSA call def(b) | Capture.cs:128:9:128:12 | SSA call def(b) | -| Capture.cs:130:13:130:13 | c | Capture.cs:130:13:130:18 | SSA def(c) | Capture.cs:130:13:130:18 | SSA def(c) | -| Capture.cs:130:13:130:13 | c | Capture.cs:133:13:133:17 | SSA def(c) | Capture.cs:133:13:133:17 | SSA def(c) | -| Capture.cs:130:13:130:13 | c | Capture.cs:136:9:136:12 | SSA call def(c) | Capture.cs:130:13:130:18 | SSA def(c) | -| Capture.cs:130:13:130:13 | c | Capture.cs:136:9:136:12 | SSA call def(c) | Capture.cs:136:9:136:12 | SSA call def(c) | -| Capture.cs:139:13:139:13 | d | Capture.cs:139:13:139:18 | SSA def(d) | Capture.cs:139:13:139:18 | SSA def(d) | -| Capture.cs:139:13:139:13 | d | Capture.cs:142:13:142:17 | SSA def(d) | Capture.cs:142:13:142:17 | SSA def(d) | -| Capture.cs:139:13:139:13 | d | Capture.cs:144:9:144:12 | SSA call def(d) | Capture.cs:139:13:139:18 | SSA def(d) | -| Capture.cs:139:13:139:13 | d | Capture.cs:144:9:144:12 | SSA call def(d) | Capture.cs:144:9:144:12 | SSA call def(d) | -| Capture.cs:147:13:147:13 | e | Capture.cs:147:13:147:18 | SSA def(e) | Capture.cs:147:13:147:18 | SSA def(e) | -| Capture.cs:147:13:147:13 | e | Capture.cs:148:9:152:9 | SSA capture def(e) | Capture.cs:148:9:152:9 | SSA capture def(e) | -| Capture.cs:147:13:147:13 | e | Capture.cs:151:13:151:17 | SSA def(e) | Capture.cs:151:13:151:17 | SSA def(e) | -| Capture.cs:154:13:154:13 | f | Capture.cs:154:13:154:18 | SSA def(f) | Capture.cs:154:13:154:18 | SSA def(f) | -| Capture.cs:154:13:154:13 | f | Capture.cs:158:13:158:17 | SSA def(f) | Capture.cs:158:13:158:17 | SSA def(f) | -| Capture.cs:154:13:154:13 | f | Capture.cs:160:9:160:12 | SSA call def(f) | Capture.cs:154:13:154:18 | SSA def(f) | -| Capture.cs:154:13:154:13 | f | Capture.cs:160:9:160:12 | SSA call def(f) | Capture.cs:160:9:160:12 | SSA call def(f) | | Capture.cs:162:13:162:13 | g | Capture.cs:163:9:166:9 | SSA capture def(g) | Capture.cs:163:9:166:9 | SSA capture def(g) | -| Capture.cs:168:13:168:13 | h | Capture.cs:168:13:168:18 | SSA def(h) | Capture.cs:168:13:168:18 | SSA def(h) | -| Capture.cs:168:13:168:13 | h | Capture.cs:171:13:171:17 | SSA def(h) | Capture.cs:171:13:171:17 | SSA def(h) | -| Capture.cs:168:13:168:13 | h | Capture.cs:174:17:174:21 | SSA def(h) | Capture.cs:174:17:174:21 | SSA def(h) | -| Capture.cs:168:13:168:13 | h | Capture.cs:176:13:176:16 | SSA call def(h) | Capture.cs:171:13:171:17 | SSA def(h) | -| Capture.cs:168:13:168:13 | h | Capture.cs:176:13:176:16 | SSA call def(h) | Capture.cs:176:13:176:16 | SSA call def(h) | -| Capture.cs:182:17:182:17 | i | Capture.cs:182:17:182:21 | SSA def(i) | Capture.cs:182:17:182:21 | SSA def(i) | | Capture.cs:182:17:182:17 | i | Capture.cs:183:13:186:13 | SSA capture def(i) | Capture.cs:183:13:186:13 | SSA capture def(i) | -| Capture.cs:182:17:182:17 | i | Capture.cs:188:13:188:17 | SSA def(i) | Capture.cs:188:13:188:17 | SSA def(i) | -| Capture.cs:197:17:197:17 | i | Capture.cs:197:17:197:21 | SSA def(i) | Capture.cs:197:17:197:21 | SSA def(i) | | Capture.cs:197:17:197:17 | i | Capture.cs:198:33:198:44 | SSA capture def(i) | Capture.cs:198:33:198:44 | SSA capture def(i) | | Capture.cs:197:17:197:17 | i | Capture.cs:203:34:203:45 | SSA capture def(i) | Capture.cs:203:34:203:45 | SSA capture def(i) | | Capture.cs:198:28:198:29 | eh | Capture.cs:198:28:198:44 | SSA def(eh) | Capture.cs:198:28:198:44 | SSA def(eh) | | Capture.cs:203:28:203:30 | eh2 | Capture.cs:203:28:203:45 | SSA def(eh2) | Capture.cs:203:28:203:45 | SSA def(eh2) | -| Capture.cs:209:17:209:17 | i | Capture.cs:209:17:209:21 | SSA def(i) | Capture.cs:209:17:209:21 | SSA def(i) | | Capture.cs:209:17:209:17 | i | Capture.cs:212:39:212:71 | SSA capture def(i) | Capture.cs:212:39:212:71 | SSA capture def(i) | | Capture.cs:210:24:210:24 | p | Capture.cs:210:24:210:59 | SSA def(p) | Capture.cs:210:24:210:59 | SSA def(p) | | Capture.cs:212:30:212:35 | exited | Capture.cs:212:30:212:71 | SSA def(exited) | Capture.cs:212:30:212:71 | SSA def(exited) | -| Capture.cs:229:13:229:13 | i | Capture.cs:231:9:231:49 | SSA capture def(i) | Capture.cs:231:9:231:49 | SSA capture def(i) | -| Capture.cs:229:13:229:13 | i | Capture.cs:232:9:232:13 | SSA def(i) | Capture.cs:232:9:232:13 | SSA def(i) | -| Capture.cs:229:13:229:13 | i | Capture.cs:235:21:235:25 | SSA def(i) | Capture.cs:235:21:235:25 | SSA def(i) | -| Capture.cs:229:13:229:13 | i | Capture.cs:236:9:236:12 | SSA call def(i) | Capture.cs:232:9:232:13 | SSA def(i) | -| Capture.cs:229:13:229:13 | i | Capture.cs:236:9:236:12 | SSA call def(i) | Capture.cs:236:9:236:12 | SSA call def(i) | -| Capture.cs:242:13:242:13 | i | Capture.cs:242:13:242:17 | SSA def(i) | Capture.cs:242:13:242:17 | SSA def(i) | -| Capture.cs:242:13:242:13 | i | Capture.cs:245:13:245:17 | SSA def(i) | Capture.cs:245:13:245:17 | SSA def(i) | -| Capture.cs:242:13:242:13 | i | Capture.cs:254:27:254:27 | SSA def(i) | Capture.cs:254:27:254:27 | SSA def(i) | | Capture.cs:248:36:248:36 | j | Capture.cs:251:13:251:17 | SSA def(j) | Capture.cs:251:13:251:17 | SSA def(j) | | Consistency.cs:7:25:7:25 | b | Consistency.cs:7:25:7:25 | SSA param(b) | Consistency.cs:7:25:7:25 | SSA param(b) | | Consistency.cs:15:17:15:17 | i | Consistency.cs:15:17:15:21 | SSA def(i) | Consistency.cs:15:17:15:21 | SSA def(i) | @@ -120,8 +39,6 @@ | Consistency.cs:25:29:25:29 | c | Consistency.cs:25:29:25:29 | SSA def(c) | Consistency.cs:25:29:25:29 | SSA def(c) | | Consistency.cs:26:13:26:19 | c.Field | Consistency.cs:25:29:25:29 | SSA qualifier def(c.Field) | Consistency.cs:25:29:25:29 | SSA qualifier def(c.Field) | | Consistency.cs:30:30:30:30 | c | Consistency.cs:32:9:32:29 | SSA def(c) | Consistency.cs:32:9:32:29 | SSA def(c) | -| Consistency.cs:38:13:38:13 | i | Consistency.cs:38:13:38:13 | SSA def(i) | Consistency.cs:38:13:38:13 | SSA def(i) | -| Consistency.cs:38:13:38:13 | i | Consistency.cs:39:28:39:32 | SSA def(i) | Consistency.cs:39:28:39:32 | SSA def(i) | | Consistency.cs:44:11:44:11 | s | Consistency.cs:44:11:44:11 | SSA def(s) | Consistency.cs:44:11:44:11 | SSA def(s) | | Consistency.cs:49:30:49:30 | a | Consistency.cs:49:30:49:30 | SSA param(a) | Consistency.cs:49:30:49:30 | SSA param(a) | | Consistency.cs:49:37:49:37 | i | Consistency.cs:49:37:49:37 | SSA param(i) | Consistency.cs:49:37:49:37 | SSA param(i) | @@ -149,13 +66,6 @@ | DefUse.cs:44:13:44:13 | z | DefUse.cs:50:23:50:23 | SSA def(z) | DefUse.cs:50:23:50:23 | SSA def(z) | | DefUse.cs:53:9:53:13 | this.Field | DefUse.cs:53:9:53:17 | SSA def(this.Field) | DefUse.cs:53:9:53:17 | SSA def(this.Field) | | DefUse.cs:56:9:56:12 | this.Prop | DefUse.cs:56:9:56:16 | SSA def(this.Prop) | DefUse.cs:56:9:56:16 | SSA def(this.Prop) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:3:17:3:19 | SSA phi(i) | DefUse.cs:76:9:76:11 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:59:13:59:17 | SSA def(i) | DefUse.cs:59:13:59:17 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:60:37:60:41 | SSA def(i) | DefUse.cs:60:37:60:41 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:71:9:71:13 | SSA def(i) | DefUse.cs:71:9:71:13 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:72:9:72:11 | SSA def(i) | DefUse.cs:72:9:72:11 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:75:9:75:13 | SSA def(i) | DefUse.cs:75:9:75:13 | SSA def(i) | -| DefUse.cs:59:13:59:13 | i | DefUse.cs:76:9:76:11 | SSA def(i) | DefUse.cs:76:9:76:11 | SSA def(i) | | DefUse.cs:63:9:63:14 | this.Field2 | DefUse.cs:63:9:63:18 | SSA def(this.Field2) | DefUse.cs:63:9:63:18 | SSA def(this.Field2) | | DefUse.cs:66:9:66:14 | this.Field3 | DefUse.cs:66:9:66:18 | SSA def(this.Field3) | DefUse.cs:66:9:66:18 | SSA def(this.Field3) | | DefUse.cs:67:19:67:20 | tc | DefUse.cs:67:19:67:27 | SSA def(tc) | DefUse.cs:67:19:67:27 | SSA def(tc) | @@ -184,12 +94,6 @@ | DefUse.cs:144:22:144:22 | x | DefUse.cs:144:22:144:22 | SSA def(x) | DefUse.cs:144:22:144:22 | SSA def(x) | | DefUse.cs:155:9:155:14 | this.Field4 | DefUse.cs:155:9:155:18 | SSA def(this.Field4) | DefUse.cs:155:9:155:18 | SSA def(this.Field4) | | DefUse.cs:162:13:162:18 | this.Field4 | DefUse.cs:160:10:160:16 | SSA entry def(this.Field4) | DefUse.cs:160:10:160:16 | SSA entry def(this.Field4) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:167:23:167:23 | SSA param(i) | DefUse.cs:167:23:167:23 | SSA param(i) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:170:9:170:13 | SSA def(i) | DefUse.cs:170:9:170:13 | SSA def(i) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:173:13:173:17 | SSA def(i) | DefUse.cs:173:13:173:17 | SSA def(i) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:175:32:179:13 | SSA capture def(i) | DefUse.cs:175:32:179:13 | SSA capture def(i) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:181:9:181:11 | SSA call def(i) | DefUse.cs:170:9:170:13 | SSA def(i) | -| DefUse.cs:167:23:167:23 | i | DefUse.cs:181:9:181:11 | SSA call def(i) | DefUse.cs:181:9:181:11 | SSA call def(i) | | DefUse.cs:171:23:171:23 | a | DefUse.cs:171:23:180:9 | SSA def(a) | DefUse.cs:171:23:180:9 | SSA def(a) | | DefUse.cs:171:23:171:23 | a | DefUse.cs:186:9:190:9 | SSA def(a) | DefUse.cs:186:9:190:9 | SSA def(a) | | DefUse.cs:184:9:184:14 | this.Field5 | DefUse.cs:184:9:184:18 | SSA def(this.Field5) | DefUse.cs:184:9:184:18 | SSA def(this.Field5) | diff --git a/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected b/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected index 97fb24fb239..7cbddb9d3d5 100644 --- a/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected +++ b/csharp/ql/test/library-tests/dataflow/tuples/PrintAst.expected @@ -369,7 +369,6 @@ Tuples.cs: # 95| -1: [TypeMention] string # 95| 1: [Parameter] j # 95| -1: [TypeMention] int -# 95| 4: [BlockStmt] {...} # 95| 16: [Property] i # 95| 3: [Getter] get_i # 95| 4: [Setter] set_i diff --git a/csharp/ql/test/library-tests/expressions/PrintAst.expected b/csharp/ql/test/library-tests/expressions/PrintAst.expected index d6e677602e3..e865a36d549 100644 --- a/csharp/ql/test/library-tests/expressions/PrintAst.expected +++ b/csharp/ql/test/library-tests/expressions/PrintAst.expected @@ -2411,7 +2411,6 @@ expressions.cs: #-----| 2: (Parameters) # 518| 0: [Parameter] oc1 # 518| -1: [TypeMention] object -# 518| 4: [BlockStmt] {...} # 520| 23: [Class] ClassC2 #-----| 3: (Base types) # 520| 0: [TypeMention] ClassC1 @@ -2421,4 +2420,3 @@ expressions.cs: # 520| -1: [TypeMention] object # 520| 3: [ConstructorInitializer] call to constructor ClassC1 # 520| 0: [ParameterAccess] access to parameter oc2 -# 520| 4: [BlockStmt] {...} diff --git a/csharp/ql/test/library-tests/members/GetLabel.ql b/csharp/ql/test/library-tests/members/GetLabel.ql index 0199c4925ac..61eff002e55 100644 --- a/csharp/ql/test/library-tests/members/GetLabel.ql +++ b/csharp/ql/test/library-tests/members/GetLabel.ql @@ -1,5 +1,5 @@ -import dotnet::DotNet +import csharp -from NamedElement ne -where ne.fromSource() -select ne, ne.getLabel() +deprecated query predicate labels(NamedElement ne, string label) { + ne.getLabel() = label and ne.fromSource() +} diff --git a/csharp/ql/test/library-tests/parameters/ParameterModifiers.cs b/csharp/ql/test/library-tests/parameters/ParameterModifiers.cs new file mode 100644 index 00000000000..b3db266b938 --- /dev/null +++ b/csharp/ql/test/library-tests/parameters/ParameterModifiers.cs @@ -0,0 +1,18 @@ +using System; + +public class ParameterModifiers +{ + public void M1(object p1) { } + public void M2(in object p2) { } + + public void M3(out object p3) + { + p3 = new object(); + } + + public void M4(ref object p4) { } + + public void M5(params object[] p5) { } + + public void M6(ref readonly object p6) { } +} diff --git a/csharp/ql/test/library-tests/parameters/ParameterModifiers.expected b/csharp/ql/test/library-tests/parameters/ParameterModifiers.expected new file mode 100644 index 00000000000..83e94bf278d --- /dev/null +++ b/csharp/ql/test/library-tests/parameters/ParameterModifiers.expected @@ -0,0 +1,19 @@ +parameterModifier +| ParameterModifiers.cs:5:27:5:28 | p1 | 0 | +| ParameterModifiers.cs:6:30:6:31 | p2 | 5 | +| ParameterModifiers.cs:8:31:8:32 | p3 | 2 | +| ParameterModifiers.cs:13:31:13:32 | p4 | 1 | +| ParameterModifiers.cs:15:36:15:37 | p5 | 3 | +| ParameterModifiers.cs:17:40:17:41 | p6 | 6 | +parameterIsValue +| ParameterModifiers.cs:5:27:5:28 | p1 | +parameterIsIn +| ParameterModifiers.cs:6:30:6:31 | p2 | +parameterIsOut +| ParameterModifiers.cs:8:31:8:32 | p3 | +parameterIsRef +| ParameterModifiers.cs:13:31:13:32 | p4 | +parameterIsParams +| ParameterModifiers.cs:15:36:15:37 | p5 | +parameterIsReadonlyRef +| ParameterModifiers.cs:17:40:17:41 | p6 | diff --git a/csharp/ql/test/library-tests/parameters/ParameterModifiers.ql b/csharp/ql/test/library-tests/parameters/ParameterModifiers.ql new file mode 100644 index 00000000000..b83eb202161 --- /dev/null +++ b/csharp/ql/test/library-tests/parameters/ParameterModifiers.ql @@ -0,0 +1,19 @@ +import csharp + +class TestParameter extends Parameter { + TestParameter() { this.getFile().getBaseName() = "ParameterModifiers.cs" } +} + +query predicate parameterModifier(TestParameter p, int kind) { params(p, _, _, _, kind, _, _) } + +query predicate parameterIsValue(TestParameter p) { p.isValue() } + +query predicate parameterIsIn(TestParameter p) { p.isIn() } + +query predicate parameterIsOut(TestParameter p) { p.isOut() } + +query predicate parameterIsRef(TestParameter p) { p.isRef() } + +query predicate parameterIsParams(TestParameter p) { p.isParams() } + +query predicate parameterIsReadonlyRef(TestParameter p) { p.isReadonlyRef() } diff --git a/csharp/ql/test/library-tests/parameters/Parameters.ql b/csharp/ql/test/library-tests/parameters/Parameters.ql index 209cdc12577..771fd83721b 100644 --- a/csharp/ql/test/library-tests/parameters/Parameters.ql +++ b/csharp/ql/test/library-tests/parameters/Parameters.ql @@ -1,7 +1,10 @@ import csharp private predicate fromTestLocation(Element e) { - e.fromSource() or e.getFile().getStem() = "Parameters" + e.fromSource() and + e.getFile().getBaseName() = ["Parameters.cs", "LambdaParameters.cs"] + or + e.getFile().getStem() = "Parameters" } private predicate compilerGeneratedAttribute(Parameterizable container) { diff --git a/csharp/ql/test/library-tests/statements/CompilerGenerated.expected b/csharp/ql/test/library-tests/statements/CompilerGenerated.expected new file mode 100644 index 00000000000..26ad2f9db10 --- /dev/null +++ b/csharp/ql/test/library-tests/statements/CompilerGenerated.expected @@ -0,0 +1,3 @@ +| fixed.cs:3:7:3:11 | {...} | fixed.cs:3:7:3:11 | Fixed | +| statements.cs:7:11:7:15 | {...} | statements.cs:7:11:7:15 | Class | +| statements.cs:243:15:243:25 | {...} | statements.cs:243:15:243:25 | AccountLock | diff --git a/csharp/ql/test/library-tests/statements/CompilerGenerated.ql b/csharp/ql/test/library-tests/statements/CompilerGenerated.ql new file mode 100644 index 00000000000..259e0ed84e8 --- /dev/null +++ b/csharp/ql/test/library-tests/statements/CompilerGenerated.ql @@ -0,0 +1,5 @@ +import csharp + +from Stmt stmt +where stmt.isCompilerGenerated() +select stmt, stmt.getEnclosingCallable() diff --git a/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/NoDisposeCallOnLocalIDisposable.cs b/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/NoDisposeCallOnLocalIDisposable.cs index d043cbbf491..ae9bccf0e6e 100644 --- a/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/NoDisposeCallOnLocalIDisposable.cs +++ b/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/NoDisposeCallOnLocalIDisposable.cs @@ -70,12 +70,12 @@ class Test using (var reader = new StreamReader(new FileStream("", FileMode.Open))) ; - // GOOD: XmlDocument.Load disposes incoming XmlReader (according to CIL) + // GOOD: XmlDocument.Load disposes incoming XmlReader (False positive as this is disposed in library code) var xmlReader = XmlReader.Create(new StringReader("xml"), null); var xmlDoc = new XmlDocument(); xmlDoc.Load(xmlReader); - // GOOD: Passed to a library. This is only detected in CIL. + // GOOD: Passed to a library (False positive as this is disposed in library code). DisposalTests.Class1.Dispose(new StreamWriter("output.txt")); // GOOD: Disposed automatically. diff --git a/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/NoDisposeCallOnLocalIDisposable.expected b/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/NoDisposeCallOnLocalIDisposable.expected index e96638e6076..1d71aa4af02 100644 --- a/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/NoDisposeCallOnLocalIDisposable.expected +++ b/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/NoDisposeCallOnLocalIDisposable.expected @@ -2,4 +2,6 @@ | NoDisposeCallOnLocalIDisposable.cs:51:18:51:73 | object creation of type FileStream | Disposable 'FileStream' is created but not disposed. | | NoDisposeCallOnLocalIDisposable.cs:52:9:52:64 | object creation of type FileStream | Disposable 'FileStream' is created but not disposed. | | NoDisposeCallOnLocalIDisposable.cs:74:25:74:71 | call to method Create | Disposable 'XmlReader' is created but not disposed. | +| NoDisposeCallOnLocalIDisposable.cs:74:42:74:64 | object creation of type StringReader | Disposable 'StringReader' is created but not disposed. | +| NoDisposeCallOnLocalIDisposable.cs:79:38:79:67 | object creation of type StreamWriter | Disposable 'StreamWriter' is created but not disposed. | | NoDisposeCallOnLocalIDisposableBad.cs:8:22:8:56 | object creation of type FileStream | Disposable 'FileStream' is created but not disposed. | diff --git a/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/options b/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/options index a02c94f4258..f12c8c66331 100644 --- a/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/options +++ b/csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/options @@ -1 +1 @@ -semmle-extractor-options: --cil /r:System.Private.Xml.dll /r:System.IO.Compression.dll +semmle-extractor-options: /r:System.Private.Xml.dll /r:System.IO.Compression.dll diff --git a/csharp/ql/test/query-tests/Nullness/E.cs b/csharp/ql/test/query-tests/Nullness/E.cs index ec2dee0d66f..ec1fa161392 100644 --- a/csharp/ql/test/query-tests/Nullness/E.cs +++ b/csharp/ql/test/query-tests/Nullness/E.cs @@ -420,14 +420,14 @@ public class E static bool Ex43(int? i, IEnumerable @is) { if (i.HasValue) - return @is.Any(j => j == i.Value); // GOOD + return @is.Any(j => j == i.Value); // GOOD (FALSE POSITIVE) return false; } static bool Ex44(int? i, IEnumerable @is) { if (i.HasValue) - @is = @is.Where(j => j == i.Value); // BAD (always) (FALSE NEGATIVE) + @is = @is.Where(j => j == i.Value); // BAD (always) i = null; return @is.Any(); } diff --git a/csharp/ql/test/query-tests/Nullness/NullMaybe.expected b/csharp/ql/test/query-tests/Nullness/NullMaybe.expected index 3789903e8b5..631c2cd7766 100644 --- a/csharp/ql/test/query-tests/Nullness/NullMaybe.expected +++ b/csharp/ql/test/query-tests/Nullness/NullMaybe.expected @@ -408,6 +408,10 @@ nodes | E.cs:405:16:405:16 | access to local variable i | | E.cs:417:24:417:40 | SSA capture def(i) | | E.cs:417:34:417:34 | access to parameter i | +| E.cs:423:28:423:44 | SSA capture def(i) | +| E.cs:423:38:423:38 | access to parameter i | +| E.cs:430:29:430:45 | SSA capture def(i) | +| E.cs:430:39:430:39 | access to parameter i | | E.cs:435:29:435:29 | SSA param(s) | | E.cs:437:13:437:21 | [true] ... is ... | | E.cs:439:13:439:13 | access to parameter s | @@ -803,6 +807,8 @@ edges | E.cs:404:9:404:18 | SSA def(i) | E.cs:405:16:405:16 | access to local variable i | | E.cs:404:9:404:18 | SSA def(i) | E.cs:405:16:405:16 | access to local variable i | | E.cs:417:24:417:40 | SSA capture def(i) | E.cs:417:34:417:34 | access to parameter i | +| E.cs:423:28:423:44 | SSA capture def(i) | E.cs:423:38:423:38 | access to parameter i | +| E.cs:430:29:430:45 | SSA capture def(i) | E.cs:430:39:430:39 | access to parameter i | | E.cs:435:29:435:29 | SSA param(s) | E.cs:437:13:437:21 | [true] ... is ... | | E.cs:437:13:437:21 | [true] ... is ... | E.cs:439:13:439:13 | access to parameter s | | Forwarding.cs:7:16:7:23 | SSA def(s) | Forwarding.cs:9:13:9:30 | [false] !... | @@ -919,6 +925,8 @@ edges | E.cs:386:27:386:28 | access to parameter e2 | E.cs:380:30:380:31 | SSA param(e2) | E.cs:386:27:386:28 | access to parameter e2 | Variable $@ may be null at this access as suggested by $@ null check. | E.cs:380:30:380:31 | e2 | e2 | E.cs:382:58:382:67 | ... == ... | this | | E.cs:386:27:386:28 | access to parameter e2 | E.cs:380:30:380:31 | SSA param(e2) | E.cs:386:27:386:28 | access to parameter e2 | Variable $@ may be null at this access as suggested by $@ null check. | E.cs:380:30:380:31 | e2 | e2 | E.cs:384:27:384:36 | ... == ... | this | | E.cs:417:34:417:34 | access to parameter i | E.cs:417:24:417:40 | SSA capture def(i) | E.cs:417:34:417:34 | access to parameter i | Variable $@ may be null at this access because it has a nullable type. | E.cs:415:27:415:27 | i | i | E.cs:415:27:415:27 | i | this | +| E.cs:423:38:423:38 | access to parameter i | E.cs:423:28:423:44 | SSA capture def(i) | E.cs:423:38:423:38 | access to parameter i | Variable $@ may be null at this access because it has a nullable type. | E.cs:420:27:420:27 | i | i | E.cs:420:27:420:27 | i | this | +| E.cs:430:39:430:39 | access to parameter i | E.cs:430:29:430:45 | SSA capture def(i) | E.cs:430:39:430:39 | access to parameter i | Variable $@ may be null at this access because it has a nullable type. | E.cs:427:27:427:27 | i | i | E.cs:427:27:427:27 | i | this | | GuardedString.cs:35:31:35:31 | access to local variable s | GuardedString.cs:7:16:7:32 | SSA def(s) | GuardedString.cs:35:31:35:31 | access to local variable s | Variable $@ may be null at this access because of $@ assignment. | GuardedString.cs:7:16:7:16 | s | s | GuardedString.cs:7:16:7:32 | String s = ... | this | | NullMaybeBad.cs:7:27:7:27 | access to parameter o | NullMaybeBad.cs:13:17:13:20 | null | NullMaybeBad.cs:7:27:7:27 | access to parameter o | Variable $@ may be null at this access because of $@ null argument. | NullMaybeBad.cs:5:25:5:25 | o | o | NullMaybeBad.cs:13:17:13:20 | null | this | | Params.cs:14:17:14:20 | access to parameter args | Params.cs:20:12:20:15 | null | Params.cs:14:17:14:20 | access to parameter args | Variable $@ may be null at this access because of $@ null argument. | Params.cs:12:36:12:39 | args | args | Params.cs:20:12:20:15 | null | this | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.cs b/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.cs index 85a95df55e4..df3db94b433 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.cs +++ b/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.cs @@ -1,4 +1,6 @@ using System; +using System.Data.SqlClient; +using System.Diagnostics; namespace System.Web.UI.WebControls { @@ -34,5 +36,22 @@ namespace Test startInfoProps.WorkingDirectory = userInput; Process.Start(startInfoProps); } + + public void StoredCommandInjection() + { + using (SqlConnection connection = new SqlConnection("")) + { + connection.Open(); + SqlCommand customerCommand = new SqlCommand("SELECT * FROM customers", connection); + SqlDataReader customerReader = customerCommand.ExecuteReader(); + + while (customerReader.Read()) + { + // BAD: Read from database, and use it to directly execute a command + Process.Start("foo.exe", "/c " + customerReader.GetString(1)); + } + customerReader.Close(); + } + } } } diff --git a/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.expected b/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.expected index 11b83a0ae20..fe27701d59d 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.expected @@ -1,59 +1,63 @@ edges -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:26:27:26:47 | ... + ... | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:26:50:26:66 | ... + ... | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:28:63:28:71 | access to local variable userInput | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:28:63:28:71 | access to local variable userInput : String | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:28:74:28:82 | access to local variable userInput | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:28:74:28:82 | access to local variable userInput : String | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:32:39:32:47 | access to local variable userInput | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:32:39:32:47 | access to local variable userInput : String | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:33:40:33:48 | access to local variable userInput | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:33:40:33:48 | access to local variable userInput : String | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:34:47:34:55 | access to local variable userInput | provenance | | -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | CommandInjection.cs:34:47:34:55 | access to local variable userInput : String | provenance | | -| CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:25:32:25:51 | access to property Text : String | provenance | | -| CommandInjection.cs:25:32:25:51 | access to property Text : String | CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | provenance | | -| CommandInjection.cs:28:30:28:38 | access to local variable startInfo : ProcessStartInfo | CommandInjection.cs:29:27:29:35 | access to local variable startInfo | provenance | | -| CommandInjection.cs:28:42:28:83 | object creation of type ProcessStartInfo : ProcessStartInfo | CommandInjection.cs:28:30:28:38 | access to local variable startInfo : ProcessStartInfo | provenance | | -| CommandInjection.cs:28:63:28:71 | access to local variable userInput : String | CommandInjection.cs:28:42:28:83 | object creation of type ProcessStartInfo : ProcessStartInfo | provenance | | -| CommandInjection.cs:28:74:28:82 | access to local variable userInput : String | CommandInjection.cs:28:42:28:83 | object creation of type ProcessStartInfo : ProcessStartInfo | provenance | | -| CommandInjection.cs:32:13:32:26 | [post] access to local variable startInfoProps : ProcessStartInfo | CommandInjection.cs:35:27:35:40 | access to local variable startInfoProps | provenance | | -| CommandInjection.cs:32:39:32:47 | access to local variable userInput : String | CommandInjection.cs:32:13:32:26 | [post] access to local variable startInfoProps : ProcessStartInfo | provenance | | -| CommandInjection.cs:33:13:33:26 | [post] access to local variable startInfoProps : ProcessStartInfo | CommandInjection.cs:35:27:35:40 | access to local variable startInfoProps | provenance | | -| CommandInjection.cs:33:40:33:48 | access to local variable userInput : String | CommandInjection.cs:33:13:33:26 | [post] access to local variable startInfoProps : ProcessStartInfo | provenance | | -| CommandInjection.cs:34:13:34:26 | [post] access to local variable startInfoProps : ProcessStartInfo | CommandInjection.cs:35:27:35:40 | access to local variable startInfoProps | provenance | | -| CommandInjection.cs:34:47:34:55 | access to local variable userInput : String | CommandInjection.cs:34:13:34:26 | [post] access to local variable startInfoProps : ProcessStartInfo | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:28:27:28:47 | ... + ... | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:28:50:28:66 | ... + ... | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:30:63:30:71 | access to local variable userInput | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:30:63:30:71 | access to local variable userInput : String | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:30:74:30:82 | access to local variable userInput | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:30:74:30:82 | access to local variable userInput : String | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:34:39:34:47 | access to local variable userInput | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:34:39:34:47 | access to local variable userInput : String | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:35:40:35:48 | access to local variable userInput | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:35:40:35:48 | access to local variable userInput : String | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:36:47:36:55 | access to local variable userInput | provenance | | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | CommandInjection.cs:36:47:36:55 | access to local variable userInput : String | provenance | | +| CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:27:32:27:51 | access to property Text : String | provenance | | +| CommandInjection.cs:27:32:27:51 | access to property Text : String | CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | provenance | | +| CommandInjection.cs:30:30:30:38 | access to local variable startInfo : ProcessStartInfo | CommandInjection.cs:31:27:31:35 | access to local variable startInfo | provenance | | +| CommandInjection.cs:30:42:30:83 | object creation of type ProcessStartInfo : ProcessStartInfo | CommandInjection.cs:30:30:30:38 | access to local variable startInfo : ProcessStartInfo | provenance | | +| CommandInjection.cs:30:63:30:71 | access to local variable userInput : String | CommandInjection.cs:30:42:30:83 | object creation of type ProcessStartInfo : ProcessStartInfo | provenance | | +| CommandInjection.cs:30:74:30:82 | access to local variable userInput : String | CommandInjection.cs:30:42:30:83 | object creation of type ProcessStartInfo : ProcessStartInfo | provenance | | +| CommandInjection.cs:34:13:34:26 | [post] access to local variable startInfoProps : ProcessStartInfo | CommandInjection.cs:37:27:37:40 | access to local variable startInfoProps | provenance | | +| CommandInjection.cs:34:39:34:47 | access to local variable userInput : String | CommandInjection.cs:34:13:34:26 | [post] access to local variable startInfoProps : ProcessStartInfo | provenance | | +| CommandInjection.cs:35:13:35:26 | [post] access to local variable startInfoProps : ProcessStartInfo | CommandInjection.cs:37:27:37:40 | access to local variable startInfoProps | provenance | | +| CommandInjection.cs:35:40:35:48 | access to local variable userInput : String | CommandInjection.cs:35:13:35:26 | [post] access to local variable startInfoProps : ProcessStartInfo | provenance | | +| CommandInjection.cs:36:13:36:26 | [post] access to local variable startInfoProps : ProcessStartInfo | CommandInjection.cs:37:27:37:40 | access to local variable startInfoProps | provenance | | +| CommandInjection.cs:36:47:36:55 | access to local variable userInput : String | CommandInjection.cs:36:13:36:26 | [post] access to local variable startInfoProps : ProcessStartInfo | provenance | | +| CommandInjection.cs:51:54:51:80 | call to method GetString : String | CommandInjection.cs:51:46:51:80 | ... + ... | provenance | | nodes -| CommandInjection.cs:25:20:25:28 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | -| CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | semmle.label | access to field categoryTextBox : TextBox | -| CommandInjection.cs:25:32:25:51 | access to property Text : String | semmle.label | access to property Text : String | -| CommandInjection.cs:26:27:26:47 | ... + ... | semmle.label | ... + ... | -| CommandInjection.cs:26:50:26:66 | ... + ... | semmle.label | ... + ... | -| CommandInjection.cs:28:30:28:38 | access to local variable startInfo : ProcessStartInfo | semmle.label | access to local variable startInfo : ProcessStartInfo | -| CommandInjection.cs:28:42:28:83 | object creation of type ProcessStartInfo : ProcessStartInfo | semmle.label | object creation of type ProcessStartInfo : ProcessStartInfo | -| CommandInjection.cs:28:63:28:71 | access to local variable userInput | semmle.label | access to local variable userInput | -| CommandInjection.cs:28:63:28:71 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | -| CommandInjection.cs:28:74:28:82 | access to local variable userInput | semmle.label | access to local variable userInput | -| CommandInjection.cs:28:74:28:82 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | -| CommandInjection.cs:29:27:29:35 | access to local variable startInfo | semmle.label | access to local variable startInfo | -| CommandInjection.cs:32:13:32:26 | [post] access to local variable startInfoProps : ProcessStartInfo | semmle.label | [post] access to local variable startInfoProps : ProcessStartInfo | -| CommandInjection.cs:32:39:32:47 | access to local variable userInput | semmle.label | access to local variable userInput | -| CommandInjection.cs:32:39:32:47 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | -| CommandInjection.cs:33:13:33:26 | [post] access to local variable startInfoProps : ProcessStartInfo | semmle.label | [post] access to local variable startInfoProps : ProcessStartInfo | -| CommandInjection.cs:33:40:33:48 | access to local variable userInput | semmle.label | access to local variable userInput | -| CommandInjection.cs:33:40:33:48 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | +| CommandInjection.cs:27:20:27:28 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | +| CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | semmle.label | access to field categoryTextBox : TextBox | +| CommandInjection.cs:27:32:27:51 | access to property Text : String | semmle.label | access to property Text : String | +| CommandInjection.cs:28:27:28:47 | ... + ... | semmle.label | ... + ... | +| CommandInjection.cs:28:50:28:66 | ... + ... | semmle.label | ... + ... | +| CommandInjection.cs:30:30:30:38 | access to local variable startInfo : ProcessStartInfo | semmle.label | access to local variable startInfo : ProcessStartInfo | +| CommandInjection.cs:30:42:30:83 | object creation of type ProcessStartInfo : ProcessStartInfo | semmle.label | object creation of type ProcessStartInfo : ProcessStartInfo | +| CommandInjection.cs:30:63:30:71 | access to local variable userInput | semmle.label | access to local variable userInput | +| CommandInjection.cs:30:63:30:71 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | +| CommandInjection.cs:30:74:30:82 | access to local variable userInput | semmle.label | access to local variable userInput | +| CommandInjection.cs:30:74:30:82 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | +| CommandInjection.cs:31:27:31:35 | access to local variable startInfo | semmle.label | access to local variable startInfo | | CommandInjection.cs:34:13:34:26 | [post] access to local variable startInfoProps : ProcessStartInfo | semmle.label | [post] access to local variable startInfoProps : ProcessStartInfo | -| CommandInjection.cs:34:47:34:55 | access to local variable userInput | semmle.label | access to local variable userInput | -| CommandInjection.cs:34:47:34:55 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | -| CommandInjection.cs:35:27:35:40 | access to local variable startInfoProps | semmle.label | access to local variable startInfoProps | +| CommandInjection.cs:34:39:34:47 | access to local variable userInput | semmle.label | access to local variable userInput | +| CommandInjection.cs:34:39:34:47 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | +| CommandInjection.cs:35:13:35:26 | [post] access to local variable startInfoProps : ProcessStartInfo | semmle.label | [post] access to local variable startInfoProps : ProcessStartInfo | +| CommandInjection.cs:35:40:35:48 | access to local variable userInput | semmle.label | access to local variable userInput | +| CommandInjection.cs:35:40:35:48 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | +| CommandInjection.cs:36:13:36:26 | [post] access to local variable startInfoProps : ProcessStartInfo | semmle.label | [post] access to local variable startInfoProps : ProcessStartInfo | +| CommandInjection.cs:36:47:36:55 | access to local variable userInput | semmle.label | access to local variable userInput | +| CommandInjection.cs:36:47:36:55 | access to local variable userInput : String | semmle.label | access to local variable userInput : String | +| CommandInjection.cs:37:27:37:40 | access to local variable startInfoProps | semmle.label | access to local variable startInfoProps | +| CommandInjection.cs:51:46:51:80 | ... + ... | semmle.label | ... + ... | +| CommandInjection.cs:51:54:51:80 | call to method GetString : String | semmle.label | call to method GetString : String | subpaths #select -| CommandInjection.cs:26:27:26:47 | ... + ... | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:26:27:26:47 | ... + ... | This command line depends on a $@. | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox | user-provided value | -| CommandInjection.cs:26:50:26:66 | ... + ... | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:26:50:26:66 | ... + ... | This command line depends on a $@. | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox | user-provided value | -| CommandInjection.cs:28:63:28:71 | access to local variable userInput | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:28:63:28:71 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox | user-provided value | -| CommandInjection.cs:28:74:28:82 | access to local variable userInput | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:28:74:28:82 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox | user-provided value | -| CommandInjection.cs:29:27:29:35 | access to local variable startInfo | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:29:27:29:35 | access to local variable startInfo | This command line depends on a $@. | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox | user-provided value | -| CommandInjection.cs:32:39:32:47 | access to local variable userInput | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:32:39:32:47 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox | user-provided value | -| CommandInjection.cs:33:40:33:48 | access to local variable userInput | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:33:40:33:48 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox | user-provided value | -| CommandInjection.cs:34:47:34:55 | access to local variable userInput | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:34:47:34:55 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox | user-provided value | -| CommandInjection.cs:35:27:35:40 | access to local variable startInfoProps | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:35:27:35:40 | access to local variable startInfoProps | This command line depends on a $@. | CommandInjection.cs:25:32:25:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:28:27:28:47 | ... + ... | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:28:27:28:47 | ... + ... | This command line depends on a $@. | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:28:50:28:66 | ... + ... | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:28:50:28:66 | ... + ... | This command line depends on a $@. | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:30:63:30:71 | access to local variable userInput | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:30:63:30:71 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:30:74:30:82 | access to local variable userInput | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:30:74:30:82 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:31:27:31:35 | access to local variable startInfo | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:31:27:31:35 | access to local variable startInfo | This command line depends on a $@. | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:34:39:34:47 | access to local variable userInput | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:34:39:34:47 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:35:40:35:48 | access to local variable userInput | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:35:40:35:48 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:36:47:36:55 | access to local variable userInput | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:36:47:36:55 | access to local variable userInput | This command line depends on a $@. | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:37:27:37:40 | access to local variable startInfoProps | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox : TextBox | CommandInjection.cs:37:27:37:40 | access to local variable startInfoProps | This command line depends on a $@. | CommandInjection.cs:27:32:27:46 | access to field categoryTextBox | user-provided value | +| CommandInjection.cs:51:46:51:80 | ... + ... | CommandInjection.cs:51:54:51:80 | call to method GetString : String | CommandInjection.cs:51:46:51:80 | ... + ... | This command line depends on a $@. | CommandInjection.cs:51:54:51:80 | call to method GetString | user-provided value | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.ext.yml b/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.ext.yml new file mode 100644 index 00000000000..82f107ae1d7 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-078/CommandInjection.ext.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-078/StoredCommandInjection.cs b/csharp/ql/test/query-tests/Security Features/CWE-078/StoredCommandInjection.cs deleted file mode 100644 index b9f4ca1de9d..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-078/StoredCommandInjection.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Data.SqlClient; -using System.Diagnostics; - -namespace Test -{ - - class StoredCommandInjection - { - - public void Test() - { - using (SqlConnection connection = new SqlConnection("")) - { - connection.Open(); - SqlCommand customerCommand = new SqlCommand("SELECT * FROM customers", connection); - SqlDataReader customerReader = customerCommand.ExecuteReader(); - - while (customerReader.Read()) - { - // BAD: Read from database, and use it to directly execute a command - Process.Start("foo.exe", "/c " + customerReader.GetString(1)); - } - customerReader.Close(); - } - } - } -} diff --git a/csharp/ql/test/query-tests/Security Features/CWE-078/StoredCommandInjection.expected b/csharp/ql/test/query-tests/Security Features/CWE-078/StoredCommandInjection.expected deleted file mode 100644 index 46c85f7abbe..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-078/StoredCommandInjection.expected +++ /dev/null @@ -1,8 +0,0 @@ -edges -| StoredCommandInjection.cs:22:54:22:80 | call to method GetString : String | StoredCommandInjection.cs:22:46:22:80 | ... + ... | provenance | | -nodes -| StoredCommandInjection.cs:22:46:22:80 | ... + ... | semmle.label | ... + ... | -| StoredCommandInjection.cs:22:54:22:80 | call to method GetString : String | semmle.label | call to method GetString : String | -subpaths -#select -| StoredCommandInjection.cs:22:46:22:80 | ... + ... | StoredCommandInjection.cs:22:54:22:80 | call to method GetString : String | StoredCommandInjection.cs:22:46:22:80 | ... + ... | This command line depends on a $@. | StoredCommandInjection.cs:22:54:22:80 | call to method GetString | stored (potentially user-provided) value | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-078/StoredCommandInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-078/StoredCommandInjection.qlref deleted file mode 100644 index c2df5055b37..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-078/StoredCommandInjection.qlref +++ /dev/null @@ -1 +0,0 @@ -Security Features/CWE-078/StoredCommandInjection.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.expected b/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.expected index 488df85e1c4..cad4dc8f741 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.expected @@ -5,4 +5,4 @@ nodes | StoredXSS.cs:22:60:22:86 | call to method GetString : String | semmle.label | call to method GetString : String | subpaths #select -| StoredXSS.cs:22:44:22:86 | ... + ... | StoredXSS.cs:22:60:22:86 | call to method GetString : String | StoredXSS.cs:22:44:22:86 | ... + ... | This HTML or JavaScript write depends on a $@. | StoredXSS.cs:22:60:22:86 | call to method GetString | stored (potentially user-provided) value | +| StoredXSS.cs:22:44:22:86 | ... + ... | StoredXSS.cs:22:60:22:86 | call to method GetString : String | StoredXSS.cs:22:44:22:86 | ... + ... | $@ flows to here and is written to HTML or JavaScript. | StoredXSS.cs:22:60:22:86 | call to method GetString : String | User-provided value | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.ext.yml b/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.ext.yml new file mode 100644 index 00000000000..82f107ae1d7 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.ext.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.qlref b/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.qlref index 196efd7f0e4..faad1d6403c 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.qlref +++ b/csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/StoredXSS.qlref @@ -1 +1 @@ -Security Features/CWE-079/StoredXSS.ql +Security Features/CWE-079/XSS.ql \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-089/SecondOrderSqlInjection.expected b/csharp/ql/test/query-tests/Security Features/CWE-089/SecondOrderSqlInjection.expected deleted file mode 100644 index fccccdb3c73..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-089/SecondOrderSqlInjection.expected +++ /dev/null @@ -1,56 +0,0 @@ -edges -| SecondOrderSqlInjection.cs:25:119:25:145 | call to method GetString : String | SecondOrderSqlInjection.cs:25:71:25:145 | ... + ... | provenance | | -| SecondOrderSqlInjection.cs:33:31:33:32 | access to local variable fs : FileStream | SecondOrderSqlInjection.cs:35:59:35:60 | access to local variable fs : FileStream | provenance | | -| SecondOrderSqlInjection.cs:33:36:33:78 | object creation of type FileStream : FileStream | SecondOrderSqlInjection.cs:33:31:33:32 | access to local variable fs : FileStream | provenance | | -| SecondOrderSqlInjection.cs:35:37:35:38 | access to local variable sr : StreamReader | SecondOrderSqlInjection.cs:38:35:38:36 | access to local variable sr : StreamReader | provenance | | -| SecondOrderSqlInjection.cs:35:42:35:76 | object creation of type StreamReader : StreamReader | SecondOrderSqlInjection.cs:35:37:35:38 | access to local variable sr : StreamReader | provenance | | -| SecondOrderSqlInjection.cs:35:59:35:60 | access to local variable fs : FileStream | SecondOrderSqlInjection.cs:35:42:35:76 | object creation of type StreamReader : StreamReader | provenance | | -| SecondOrderSqlInjection.cs:38:29:38:31 | access to local variable sql : String | SecondOrderSqlInjection.cs:40:31:40:33 | access to local variable sql : String | provenance | | -| SecondOrderSqlInjection.cs:38:35:38:36 | access to local variable sr : StreamReader | SecondOrderSqlInjection.cs:38:35:38:47 | call to method ReadLine : String | provenance | | -| SecondOrderSqlInjection.cs:38:35:38:47 | call to method ReadLine : String | SecondOrderSqlInjection.cs:38:29:38:31 | access to local variable sql : String | provenance | | -| SecondOrderSqlInjection.cs:40:25:40:27 | access to local variable sql : String | SecondOrderSqlInjection.cs:45:57:45:59 | access to local variable sql | provenance | | -| SecondOrderSqlInjection.cs:40:31:40:33 | access to local variable sql : String | SecondOrderSqlInjection.cs:40:31:40:40 | call to method Trim : String | provenance | | -| SecondOrderSqlInjection.cs:40:31:40:40 | call to method Trim : String | SecondOrderSqlInjection.cs:40:25:40:27 | access to local variable sql : String | provenance | | -| SqlInjectionSqlite.cs:49:31:49:32 | access to local variable fs : FileStream | SqlInjectionSqlite.cs:51:59:51:60 | access to local variable fs : FileStream | provenance | | -| SqlInjectionSqlite.cs:49:36:49:84 | object creation of type FileStream : FileStream | SqlInjectionSqlite.cs:49:31:49:32 | access to local variable fs : FileStream | provenance | | -| SqlInjectionSqlite.cs:51:37:51:38 | access to local variable sr : StreamReader | SqlInjectionSqlite.cs:54:35:54:36 | access to local variable sr : StreamReader | provenance | | -| SqlInjectionSqlite.cs:51:42:51:76 | object creation of type StreamReader : StreamReader | SqlInjectionSqlite.cs:51:37:51:38 | access to local variable sr : StreamReader | provenance | | -| SqlInjectionSqlite.cs:51:59:51:60 | access to local variable fs : FileStream | SqlInjectionSqlite.cs:51:42:51:76 | object creation of type StreamReader : StreamReader | provenance | | -| SqlInjectionSqlite.cs:54:29:54:31 | access to local variable sql : String | SqlInjectionSqlite.cs:56:31:56:33 | access to local variable sql : String | provenance | | -| SqlInjectionSqlite.cs:54:35:54:36 | access to local variable sr : StreamReader | SqlInjectionSqlite.cs:54:35:54:47 | call to method ReadLine : String | provenance | | -| SqlInjectionSqlite.cs:54:35:54:47 | call to method ReadLine : String | SqlInjectionSqlite.cs:54:29:54:31 | access to local variable sql : String | provenance | | -| SqlInjectionSqlite.cs:56:25:56:27 | access to local variable sql : String | SqlInjectionSqlite.cs:61:53:61:55 | access to local variable sql | provenance | | -| SqlInjectionSqlite.cs:56:31:56:33 | access to local variable sql : String | SqlInjectionSqlite.cs:56:31:56:40 | call to method Trim : String | provenance | | -| SqlInjectionSqlite.cs:56:31:56:40 | call to method Trim : String | SqlInjectionSqlite.cs:56:25:56:27 | access to local variable sql : String | provenance | | -nodes -| SecondOrderSqlInjection.cs:25:71:25:145 | ... + ... | semmle.label | ... + ... | -| SecondOrderSqlInjection.cs:25:119:25:145 | call to method GetString : String | semmle.label | call to method GetString : String | -| SecondOrderSqlInjection.cs:33:31:33:32 | access to local variable fs : FileStream | semmle.label | access to local variable fs : FileStream | -| SecondOrderSqlInjection.cs:33:36:33:78 | object creation of type FileStream : FileStream | semmle.label | object creation of type FileStream : FileStream | -| SecondOrderSqlInjection.cs:35:37:35:38 | access to local variable sr : StreamReader | semmle.label | access to local variable sr : StreamReader | -| SecondOrderSqlInjection.cs:35:42:35:76 | object creation of type StreamReader : StreamReader | semmle.label | object creation of type StreamReader : StreamReader | -| SecondOrderSqlInjection.cs:35:59:35:60 | access to local variable fs : FileStream | semmle.label | access to local variable fs : FileStream | -| SecondOrderSqlInjection.cs:38:29:38:31 | access to local variable sql : String | semmle.label | access to local variable sql : String | -| SecondOrderSqlInjection.cs:38:35:38:36 | access to local variable sr : StreamReader | semmle.label | access to local variable sr : StreamReader | -| SecondOrderSqlInjection.cs:38:35:38:47 | call to method ReadLine : String | semmle.label | call to method ReadLine : String | -| SecondOrderSqlInjection.cs:40:25:40:27 | access to local variable sql : String | semmle.label | access to local variable sql : String | -| SecondOrderSqlInjection.cs:40:31:40:33 | access to local variable sql : String | semmle.label | access to local variable sql : String | -| SecondOrderSqlInjection.cs:40:31:40:40 | call to method Trim : String | semmle.label | call to method Trim : String | -| SecondOrderSqlInjection.cs:45:57:45:59 | access to local variable sql | semmle.label | access to local variable sql | -| SqlInjectionSqlite.cs:49:31:49:32 | access to local variable fs : FileStream | semmle.label | access to local variable fs : FileStream | -| SqlInjectionSqlite.cs:49:36:49:84 | object creation of type FileStream : FileStream | semmle.label | object creation of type FileStream : FileStream | -| SqlInjectionSqlite.cs:51:37:51:38 | access to local variable sr : StreamReader | semmle.label | access to local variable sr : StreamReader | -| SqlInjectionSqlite.cs:51:42:51:76 | object creation of type StreamReader : StreamReader | semmle.label | object creation of type StreamReader : StreamReader | -| SqlInjectionSqlite.cs:51:59:51:60 | access to local variable fs : FileStream | semmle.label | access to local variable fs : FileStream | -| SqlInjectionSqlite.cs:54:29:54:31 | access to local variable sql : String | semmle.label | access to local variable sql : String | -| SqlInjectionSqlite.cs:54:35:54:36 | access to local variable sr : StreamReader | semmle.label | access to local variable sr : StreamReader | -| SqlInjectionSqlite.cs:54:35:54:47 | call to method ReadLine : String | semmle.label | call to method ReadLine : String | -| SqlInjectionSqlite.cs:56:25:56:27 | access to local variable sql : String | semmle.label | access to local variable sql : String | -| SqlInjectionSqlite.cs:56:31:56:33 | access to local variable sql : String | semmle.label | access to local variable sql : String | -| SqlInjectionSqlite.cs:56:31:56:40 | call to method Trim : String | semmle.label | call to method Trim : String | -| SqlInjectionSqlite.cs:61:53:61:55 | access to local variable sql | semmle.label | access to local variable sql | -subpaths -#select -| SecondOrderSqlInjection.cs:25:71:25:145 | ... + ... | SecondOrderSqlInjection.cs:25:119:25:145 | call to method GetString : String | SecondOrderSqlInjection.cs:25:71:25:145 | ... + ... | This SQL query depends on a $@. | SecondOrderSqlInjection.cs:25:119:25:145 | call to method GetString | stored user-provided value | -| SecondOrderSqlInjection.cs:45:57:45:59 | access to local variable sql | SecondOrderSqlInjection.cs:33:36:33:78 | object creation of type FileStream : FileStream | SecondOrderSqlInjection.cs:45:57:45:59 | access to local variable sql | This SQL query depends on a $@. | SecondOrderSqlInjection.cs:33:36:33:78 | object creation of type FileStream | stored user-provided value | -| SqlInjectionSqlite.cs:61:53:61:55 | access to local variable sql | SqlInjectionSqlite.cs:49:36:49:84 | object creation of type FileStream : FileStream | SqlInjectionSqlite.cs:61:53:61:55 | access to local variable sql | This SQL query depends on a $@. | SqlInjectionSqlite.cs:49:36:49:84 | object creation of type FileStream | stored user-provided value | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-089/SecondOrderSqlInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-089/SecondOrderSqlInjection.qlref deleted file mode 100644 index 265e6995985..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-089/SecondOrderSqlInjection.qlref +++ /dev/null @@ -1 +0,0 @@ -Security Features/CWE-089/SecondOrderSqlInjection.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.expected b/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.expected index 4b4da20c97a..c156c3def8b 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.expected @@ -1,4 +1,16 @@ edges +| SecondOrderSqlInjection.cs:25:119:25:145 | call to method GetString : String | SecondOrderSqlInjection.cs:25:71:25:145 | ... + ... | provenance | | +| SecondOrderSqlInjection.cs:33:31:33:32 | access to local variable fs : FileStream | SecondOrderSqlInjection.cs:35:59:35:60 | access to local variable fs : FileStream | provenance | | +| SecondOrderSqlInjection.cs:33:36:33:78 | object creation of type FileStream : FileStream | SecondOrderSqlInjection.cs:33:31:33:32 | access to local variable fs : FileStream | provenance | | +| SecondOrderSqlInjection.cs:35:37:35:38 | access to local variable sr : StreamReader | SecondOrderSqlInjection.cs:38:35:38:36 | access to local variable sr : StreamReader | provenance | | +| SecondOrderSqlInjection.cs:35:42:35:76 | object creation of type StreamReader : StreamReader | SecondOrderSqlInjection.cs:35:37:35:38 | access to local variable sr : StreamReader | provenance | | +| SecondOrderSqlInjection.cs:35:59:35:60 | access to local variable fs : FileStream | SecondOrderSqlInjection.cs:35:42:35:76 | object creation of type StreamReader : StreamReader | provenance | | +| SecondOrderSqlInjection.cs:38:29:38:31 | access to local variable sql : String | SecondOrderSqlInjection.cs:40:31:40:33 | access to local variable sql : String | provenance | | +| SecondOrderSqlInjection.cs:38:35:38:36 | access to local variable sr : StreamReader | SecondOrderSqlInjection.cs:38:35:38:47 | call to method ReadLine : String | provenance | | +| SecondOrderSqlInjection.cs:38:35:38:47 | call to method ReadLine : String | SecondOrderSqlInjection.cs:38:29:38:31 | access to local variable sql : String | provenance | | +| SecondOrderSqlInjection.cs:40:25:40:27 | access to local variable sql : String | SecondOrderSqlInjection.cs:45:57:45:59 | access to local variable sql | provenance | | +| SecondOrderSqlInjection.cs:40:31:40:33 | access to local variable sql : String | SecondOrderSqlInjection.cs:40:31:40:40 | call to method Trim : String | provenance | | +| SecondOrderSqlInjection.cs:40:31:40:40 | call to method Trim : String | SecondOrderSqlInjection.cs:40:25:40:27 | access to local variable sql : String | provenance | | | SqlInjection.cs:32:21:32:26 | access to local variable query1 : String | SqlInjection.cs:34:50:34:55 | access to local variable query1 | provenance | | | SqlInjection.cs:33:21:33:35 | access to field categoryTextBox : TextBox | SqlInjection.cs:33:21:33:40 | access to property Text : String | provenance | | | SqlInjection.cs:33:21:33:40 | access to property Text : String | SqlInjection.cs:32:21:32:26 | access to local variable query1 : String | provenance | | @@ -50,6 +62,20 @@ edges | SqlInjectionSqlite.cs:56:31:56:33 | access to local variable sql : String | SqlInjectionSqlite.cs:56:31:56:40 | call to method Trim : String | provenance | | | SqlInjectionSqlite.cs:56:31:56:40 | call to method Trim : String | SqlInjectionSqlite.cs:56:25:56:27 | access to local variable sql : String | provenance | | nodes +| SecondOrderSqlInjection.cs:25:71:25:145 | ... + ... | semmle.label | ... + ... | +| SecondOrderSqlInjection.cs:25:119:25:145 | call to method GetString : String | semmle.label | call to method GetString : String | +| SecondOrderSqlInjection.cs:33:31:33:32 | access to local variable fs : FileStream | semmle.label | access to local variable fs : FileStream | +| SecondOrderSqlInjection.cs:33:36:33:78 | object creation of type FileStream : FileStream | semmle.label | object creation of type FileStream : FileStream | +| SecondOrderSqlInjection.cs:35:37:35:38 | access to local variable sr : StreamReader | semmle.label | access to local variable sr : StreamReader | +| SecondOrderSqlInjection.cs:35:42:35:76 | object creation of type StreamReader : StreamReader | semmle.label | object creation of type StreamReader : StreamReader | +| SecondOrderSqlInjection.cs:35:59:35:60 | access to local variable fs : FileStream | semmle.label | access to local variable fs : FileStream | +| SecondOrderSqlInjection.cs:38:29:38:31 | access to local variable sql : String | semmle.label | access to local variable sql : String | +| SecondOrderSqlInjection.cs:38:35:38:36 | access to local variable sr : StreamReader | semmle.label | access to local variable sr : StreamReader | +| SecondOrderSqlInjection.cs:38:35:38:47 | call to method ReadLine : String | semmle.label | call to method ReadLine : String | +| SecondOrderSqlInjection.cs:40:25:40:27 | access to local variable sql : String | semmle.label | access to local variable sql : String | +| SecondOrderSqlInjection.cs:40:31:40:33 | access to local variable sql : String | semmle.label | access to local variable sql : String | +| SecondOrderSqlInjection.cs:40:31:40:40 | call to method Trim : String | semmle.label | call to method Trim : String | +| SecondOrderSqlInjection.cs:45:57:45:59 | access to local variable sql | semmle.label | access to local variable sql | | SqlInjection.cs:32:21:32:26 | access to local variable query1 : String | semmle.label | access to local variable query1 : String | | SqlInjection.cs:33:21:33:35 | access to field categoryTextBox : TextBox | semmle.label | access to field categoryTextBox : TextBox | | SqlInjection.cs:33:21:33:40 | access to property Text : String | semmle.label | access to property Text : String | @@ -118,6 +144,8 @@ nodes | SqlInjectionSqlite.cs:61:53:61:55 | access to local variable sql | semmle.label | access to local variable sql | subpaths #select +| SecondOrderSqlInjection.cs:25:71:25:145 | ... + ... | SecondOrderSqlInjection.cs:25:119:25:145 | call to method GetString : String | SecondOrderSqlInjection.cs:25:71:25:145 | ... + ... | This query depends on $@. | SecondOrderSqlInjection.cs:25:119:25:145 | call to method GetString : String | this database input | +| SecondOrderSqlInjection.cs:45:57:45:59 | access to local variable sql | SecondOrderSqlInjection.cs:33:36:33:78 | object creation of type FileStream : FileStream | SecondOrderSqlInjection.cs:45:57:45:59 | access to local variable sql | This query depends on $@. | SecondOrderSqlInjection.cs:33:36:33:78 | object creation of type FileStream : FileStream | this file stream | | SqlInjection.cs:34:50:34:55 | access to local variable query1 | SqlInjection.cs:33:21:33:35 | access to field categoryTextBox : TextBox | SqlInjection.cs:34:50:34:55 | access to local variable query1 | This query depends on $@. | SqlInjection.cs:33:21:33:35 | access to field categoryTextBox : TextBox | this ASP.NET user input | | SqlInjection.cs:69:56:69:61 | access to local variable query1 | SqlInjection.cs:68:33:68:47 | access to field categoryTextBox : TextBox | SqlInjection.cs:69:56:69:61 | access to local variable query1 | This query depends on $@. | SqlInjection.cs:68:33:68:47 | access to field categoryTextBox : TextBox | this ASP.NET user input | | SqlInjection.cs:70:55:70:60 | access to local variable query1 | SqlInjection.cs:68:33:68:47 | access to field categoryTextBox : TextBox | SqlInjection.cs:70:55:70:60 | access to local variable query1 | This query depends on $@. | SqlInjection.cs:68:33:68:47 | access to field categoryTextBox : TextBox | this ASP.NET user input | @@ -136,4 +164,5 @@ subpaths | SqlInjectionSqlite.cs:33:49:33:66 | access to property Text | SqlInjectionSqlite.cs:33:49:33:61 | access to field untrustedData : TextBox | SqlInjectionSqlite.cs:33:49:33:66 | access to property Text | This query depends on $@. | SqlInjectionSqlite.cs:33:49:33:61 | access to field untrustedData : TextBox | this ASP.NET user input | | SqlInjectionSqlite.cs:39:45:39:62 | access to property Text | SqlInjectionSqlite.cs:39:45:39:57 | access to field untrustedData : TextBox | SqlInjectionSqlite.cs:39:45:39:62 | access to property Text | This query depends on $@. | SqlInjectionSqlite.cs:39:45:39:57 | access to field untrustedData : TextBox | this ASP.NET user input | | SqlInjectionSqlite.cs:44:45:44:47 | access to local variable cmd | SqlInjectionSqlite.cs:24:41:24:53 | access to field untrustedData : TextBox | SqlInjectionSqlite.cs:44:45:44:47 | access to local variable cmd | This query depends on $@. | SqlInjectionSqlite.cs:24:41:24:53 | access to field untrustedData : TextBox | this ASP.NET user input | +| SqlInjectionSqlite.cs:61:53:61:55 | access to local variable sql | SqlInjectionSqlite.cs:49:36:49:84 | object creation of type FileStream : FileStream | SqlInjectionSqlite.cs:61:53:61:55 | access to local variable sql | This query depends on $@. | SqlInjectionSqlite.cs:49:36:49:84 | object creation of type FileStream : FileStream | this file stream | | SqlInjectionSqlite.cs:61:53:61:55 | access to local variable sql | SqlInjectionSqlite.cs:49:51:49:63 | access to field untrustedData : TextBox | SqlInjectionSqlite.cs:61:53:61:55 | access to local variable sql | This query depends on $@. | SqlInjectionSqlite.cs:49:51:49:63 | access to field untrustedData : TextBox | this ASP.NET user input | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.ext.yml b/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.ext.yml new file mode 100644 index 00000000000..82f107ae1d7 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.ext.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.cs b/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.cs index 2f43a4d4c12..ddd24e19729 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.cs +++ b/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.cs @@ -1,4 +1,5 @@ using System; +using System.Data.SqlClient; using System.DirectoryServices; using System.DirectoryServices.Protocols; using System.Web; @@ -27,6 +28,20 @@ public class LDAPInjectionHandler : IHttpHandler DirectoryEntry de = new DirectoryEntry("LDAP://Cn=" + userName); DirectoryEntry de2 = new DirectoryEntry(); de2.Path = "LDAP://Cn=" + userName; + + using (SqlConnection connection = new SqlConnection("")) + { + connection.Open(); + SqlCommand customerCommand = new SqlCommand("SELECT * FROM customers", connection); + SqlDataReader customerReader = customerCommand.ExecuteReader(); + + while (customerReader.Read()) + { + // BAD: Read from database, write it straight to a response + DirectorySearcher ds4 = new DirectorySearcher("accountname=" + customerReader.GetString(1)); + } + customerReader.Close(); + } } public string LDAPEncode(string value) diff --git a/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.expected b/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.expected index 59be23198dc..a04278ad994 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.expected @@ -1,28 +1,32 @@ edges -| LDAPInjection.cs:11:16:11:23 | access to local variable userName : String | LDAPInjection.cs:14:54:14:78 | ... + ... | provenance | | -| LDAPInjection.cs:11:16:11:23 | access to local variable userName : String | LDAPInjection.cs:16:21:16:45 | ... + ... | provenance | | -| LDAPInjection.cs:11:16:11:23 | access to local variable userName : String | LDAPInjection.cs:23:21:23:45 | ... + ... | provenance | | -| LDAPInjection.cs:11:16:11:23 | access to local variable userName : String | LDAPInjection.cs:24:53:24:77 | ... + ... | provenance | | -| LDAPInjection.cs:11:16:11:23 | access to local variable userName : String | LDAPInjection.cs:27:48:27:70 | ... + ... | provenance | | -| LDAPInjection.cs:11:16:11:23 | access to local variable userName : String | LDAPInjection.cs:29:20:29:42 | ... + ... | provenance | | -| LDAPInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:11:16:11:23 | access to local variable userName : String | provenance | | -| LDAPInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:11:27:11:61 | access to indexer : String | provenance | | -| LDAPInjection.cs:11:27:11:61 | access to indexer : String | LDAPInjection.cs:11:16:11:23 | access to local variable userName : String | provenance | | +| LDAPInjection.cs:12:16:12:23 | access to local variable userName : String | LDAPInjection.cs:15:54:15:78 | ... + ... | provenance | | +| LDAPInjection.cs:12:16:12:23 | access to local variable userName : String | LDAPInjection.cs:17:21:17:45 | ... + ... | provenance | | +| LDAPInjection.cs:12:16:12:23 | access to local variable userName : String | LDAPInjection.cs:24:21:24:45 | ... + ... | provenance | | +| LDAPInjection.cs:12:16:12:23 | access to local variable userName : String | LDAPInjection.cs:25:53:25:77 | ... + ... | provenance | | +| LDAPInjection.cs:12:16:12:23 | access to local variable userName : String | LDAPInjection.cs:28:48:28:70 | ... + ... | provenance | | +| LDAPInjection.cs:12:16:12:23 | access to local variable userName : String | LDAPInjection.cs:30:20:30:42 | ... + ... | provenance | | +| LDAPInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:12:16:12:23 | access to local variable userName : String | provenance | | +| LDAPInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:12:27:12:61 | access to indexer : String | provenance | | +| LDAPInjection.cs:12:27:12:61 | access to indexer : String | LDAPInjection.cs:12:16:12:23 | access to local variable userName : String | provenance | | +| LDAPInjection.cs:41:80:41:106 | call to method GetString : String | LDAPInjection.cs:41:63:41:106 | ... + ... | provenance | | nodes -| LDAPInjection.cs:11:16:11:23 | access to local variable userName : String | semmle.label | access to local variable userName : String | -| LDAPInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | -| LDAPInjection.cs:11:27:11:61 | access to indexer : String | semmle.label | access to indexer : String | -| LDAPInjection.cs:14:54:14:78 | ... + ... | semmle.label | ... + ... | -| LDAPInjection.cs:16:21:16:45 | ... + ... | semmle.label | ... + ... | -| LDAPInjection.cs:23:21:23:45 | ... + ... | semmle.label | ... + ... | -| LDAPInjection.cs:24:53:24:77 | ... + ... | semmle.label | ... + ... | -| LDAPInjection.cs:27:48:27:70 | ... + ... | semmle.label | ... + ... | -| LDAPInjection.cs:29:20:29:42 | ... + ... | semmle.label | ... + ... | +| LDAPInjection.cs:12:16:12:23 | access to local variable userName : String | semmle.label | access to local variable userName : String | +| LDAPInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | +| LDAPInjection.cs:12:27:12:61 | access to indexer : String | semmle.label | access to indexer : String | +| LDAPInjection.cs:15:54:15:78 | ... + ... | semmle.label | ... + ... | +| LDAPInjection.cs:17:21:17:45 | ... + ... | semmle.label | ... + ... | +| LDAPInjection.cs:24:21:24:45 | ... + ... | semmle.label | ... + ... | +| LDAPInjection.cs:25:53:25:77 | ... + ... | semmle.label | ... + ... | +| LDAPInjection.cs:28:48:28:70 | ... + ... | semmle.label | ... + ... | +| LDAPInjection.cs:30:20:30:42 | ... + ... | semmle.label | ... + ... | +| LDAPInjection.cs:41:63:41:106 | ... + ... | semmle.label | ... + ... | +| LDAPInjection.cs:41:80:41:106 | call to method GetString : String | semmle.label | call to method GetString : String | subpaths #select -| LDAPInjection.cs:14:54:14:78 | ... + ... | LDAPInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:14:54:14:78 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| LDAPInjection.cs:16:21:16:45 | ... + ... | LDAPInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:16:21:16:45 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| LDAPInjection.cs:23:21:23:45 | ... + ... | LDAPInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:23:21:23:45 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| LDAPInjection.cs:24:53:24:77 | ... + ... | LDAPInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:24:53:24:77 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| LDAPInjection.cs:27:48:27:70 | ... + ... | LDAPInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:27:48:27:70 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| LDAPInjection.cs:29:20:29:42 | ... + ... | LDAPInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:29:20:29:42 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | +| LDAPInjection.cs:15:54:15:78 | ... + ... | LDAPInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:15:54:15:78 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| LDAPInjection.cs:17:21:17:45 | ... + ... | LDAPInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:17:21:17:45 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| LDAPInjection.cs:24:21:24:45 | ... + ... | LDAPInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:24:21:24:45 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| LDAPInjection.cs:25:53:25:77 | ... + ... | LDAPInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:25:53:25:77 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| LDAPInjection.cs:28:48:28:70 | ... + ... | LDAPInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:28:48:28:70 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| LDAPInjection.cs:30:20:30:42 | ... + ... | LDAPInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | LDAPInjection.cs:30:20:30:42 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| LDAPInjection.cs:41:63:41:106 | ... + ... | LDAPInjection.cs:41:80:41:106 | call to method GetString : String | LDAPInjection.cs:41:63:41:106 | ... + ... | This LDAP query depends on a $@. | LDAPInjection.cs:41:80:41:106 | call to method GetString | user-provided value | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.ext.yml b/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.ext.yml new file mode 100644 index 00000000000..82f107ae1d7 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-090/LDAPInjection.ext.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-090/StoredLDAPInjection.cs b/csharp/ql/test/query-tests/Security Features/CWE-090/StoredLDAPInjection.cs deleted file mode 100644 index 975d1cb86f2..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-090/StoredLDAPInjection.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Data.SqlClient; -using System.DirectoryServices; - -namespace Test -{ - - class StoredLDAPInjection - { - - public void processRequest() - { - using (SqlConnection connection = new SqlConnection("")) - { - connection.Open(); - SqlCommand customerCommand = new SqlCommand("SELECT * FROM customers", connection); - SqlDataReader customerReader = customerCommand.ExecuteReader(); - - while (customerReader.Read()) - { - // BAD: Read from database, write it straight to a response - DirectorySearcher ds = new DirectorySearcher("accountname=" + customerReader.GetString(1)); - } - customerReader.Close(); - } - } - } -} diff --git a/csharp/ql/test/query-tests/Security Features/CWE-090/StoredLDAPInjection.expected b/csharp/ql/test/query-tests/Security Features/CWE-090/StoredLDAPInjection.expected deleted file mode 100644 index d66714c82cc..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-090/StoredLDAPInjection.expected +++ /dev/null @@ -1,8 +0,0 @@ -edges -| StoredLDAPInjection.cs:22:83:22:109 | call to method GetString : String | StoredLDAPInjection.cs:22:66:22:109 | ... + ... | provenance | | -nodes -| StoredLDAPInjection.cs:22:66:22:109 | ... + ... | semmle.label | ... + ... | -| StoredLDAPInjection.cs:22:83:22:109 | call to method GetString : String | semmle.label | call to method GetString : String | -subpaths -#select -| StoredLDAPInjection.cs:22:66:22:109 | ... + ... | StoredLDAPInjection.cs:22:83:22:109 | call to method GetString : String | StoredLDAPInjection.cs:22:66:22:109 | ... + ... | This LDAP query depends on a $@. | StoredLDAPInjection.cs:22:83:22:109 | call to method GetString | stored (potentially user-provided) value | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-090/StoredLDAPInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-090/StoredLDAPInjection.qlref deleted file mode 100644 index 0f41e1b15c9..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-090/StoredLDAPInjection.qlref +++ /dev/null @@ -1 +0,0 @@ -Security Features/CWE-090/StoredLDAPInjection.ql diff --git a/csharp/ql/test/query-tests/Security Features/CWE-094/CodeInjection.ext.yml b/csharp/ql/test/query-tests/Security Features/CWE-094/CodeInjection.ext.yml new file mode 100644 index 00000000000..82f107ae1d7 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-094/CodeInjection.ext.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.ext.yml b/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.ext.yml new file mode 100644 index 00000000000..82f107ae1d7 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.ext.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-643/StoredXPathInjection.cs b/csharp/ql/test/query-tests/Security Features/CWE-643/StoredXPathInjection.cs deleted file mode 100644 index 91b8291b5cf..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-643/StoredXPathInjection.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Data.SqlClient; -using System.Xml; -using System.Xml.XPath; - -namespace Test -{ - - class StoredXPathInjection - { - - public void processRequest() - { - using (SqlConnection connection = new SqlConnection("")) - { - connection.Open(); - SqlCommand customerCommand = new SqlCommand("SELECT * FROM customers", connection); - SqlDataReader customerReader = customerCommand.ExecuteReader(); - - while (customerReader.Read()) - { - string userName = customerReader.GetString(1); - string password = customerReader.GetString(2); - // BAD: User input used directly in an XPath expression - XPathExpression.Compile("//users/user[login/text()='" + userName + "' and password/text() = '" + password + "']/home_dir/text()"); - XmlNode xmlNode = null; - // BAD: User input used directly in an XPath expression to SelectNodes - xmlNode.SelectNodes("//users/user[login/text()='" + userName + "' and password/text() = '" + password + "']/home_dir/text()"); - - // GOOD: Uses parameters to avoid including user input directly in XPath expression - XPathExpression.Compile("//users/user[login/text()=$username]/home_dir/text()"); - } - customerReader.Close(); - } - } - } -} diff --git a/csharp/ql/test/query-tests/Security Features/CWE-643/StoredXPathInjection.expected b/csharp/ql/test/query-tests/Security Features/CWE-643/StoredXPathInjection.expected deleted file mode 100644 index 0b963f38d7b..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-643/StoredXPathInjection.expected +++ /dev/null @@ -1,20 +0,0 @@ -edges -| StoredXPathInjection.cs:22:28:22:35 | access to local variable userName : String | StoredXPathInjection.cs:25:45:25:148 | ... + ... | provenance | | -| StoredXPathInjection.cs:22:28:22:35 | access to local variable userName : String | StoredXPathInjection.cs:28:41:28:144 | ... + ... | provenance | | -| StoredXPathInjection.cs:22:39:22:65 | call to method GetString : String | StoredXPathInjection.cs:22:28:22:35 | access to local variable userName : String | provenance | | -| StoredXPathInjection.cs:23:28:23:35 | access to local variable password : String | StoredXPathInjection.cs:25:45:25:148 | ... + ... | provenance | | -| StoredXPathInjection.cs:23:28:23:35 | access to local variable password : String | StoredXPathInjection.cs:28:41:28:144 | ... + ... | provenance | | -| StoredXPathInjection.cs:23:39:23:65 | call to method GetString : String | StoredXPathInjection.cs:23:28:23:35 | access to local variable password : String | provenance | | -nodes -| StoredXPathInjection.cs:22:28:22:35 | access to local variable userName : String | semmle.label | access to local variable userName : String | -| StoredXPathInjection.cs:22:39:22:65 | call to method GetString : String | semmle.label | call to method GetString : String | -| StoredXPathInjection.cs:23:28:23:35 | access to local variable password : String | semmle.label | access to local variable password : String | -| StoredXPathInjection.cs:23:39:23:65 | call to method GetString : String | semmle.label | call to method GetString : String | -| StoredXPathInjection.cs:25:45:25:148 | ... + ... | semmle.label | ... + ... | -| StoredXPathInjection.cs:28:41:28:144 | ... + ... | semmle.label | ... + ... | -subpaths -#select -| StoredXPathInjection.cs:25:45:25:148 | ... + ... | StoredXPathInjection.cs:22:39:22:65 | call to method GetString : String | StoredXPathInjection.cs:25:45:25:148 | ... + ... | This XPath expression depends on a $@. | StoredXPathInjection.cs:22:39:22:65 | call to method GetString | stored (potentially user-provided) value | -| StoredXPathInjection.cs:25:45:25:148 | ... + ... | StoredXPathInjection.cs:23:39:23:65 | call to method GetString : String | StoredXPathInjection.cs:25:45:25:148 | ... + ... | This XPath expression depends on a $@. | StoredXPathInjection.cs:23:39:23:65 | call to method GetString | stored (potentially user-provided) value | -| StoredXPathInjection.cs:28:41:28:144 | ... + ... | StoredXPathInjection.cs:22:39:22:65 | call to method GetString : String | StoredXPathInjection.cs:28:41:28:144 | ... + ... | This XPath expression depends on a $@. | StoredXPathInjection.cs:22:39:22:65 | call to method GetString | stored (potentially user-provided) value | -| StoredXPathInjection.cs:28:41:28:144 | ... + ... | StoredXPathInjection.cs:23:39:23:65 | call to method GetString : String | StoredXPathInjection.cs:28:41:28:144 | ... + ... | This XPath expression depends on a $@. | StoredXPathInjection.cs:23:39:23:65 | call to method GetString | stored (potentially user-provided) value | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-643/StoredXPathInjection.qlref b/csharp/ql/test/query-tests/Security Features/CWE-643/StoredXPathInjection.qlref deleted file mode 100644 index 91ffd2d2074..00000000000 --- a/csharp/ql/test/query-tests/Security Features/CWE-643/StoredXPathInjection.qlref +++ /dev/null @@ -1 +0,0 @@ -Security Features/CWE-643/StoredXPathInjection.ql \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.cs b/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.cs index 53cdbb73cc1..a42a629cc7e 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.cs +++ b/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.cs @@ -1,4 +1,5 @@ using System; +using System.Data.SqlClient; using System.Web; using System.Xml; using System.Xml.XPath; @@ -62,4 +63,30 @@ public class XPathInjectionHandler : IHttpHandler return true; } } + + public void ProcessStoredRequest() + { + + using (SqlConnection connection = new SqlConnection("")) + { + connection.Open(); + SqlCommand customerCommand = new SqlCommand("SELECT * FROM customers", connection); + SqlDataReader customerReader = customerCommand.ExecuteReader(); + + while (customerReader.Read()) + { + string userName = customerReader.GetString(1); + string password = customerReader.GetString(2); + // BAD: User input used directly in an XPath expression + XPathExpression.Compile("//users/user[login/text()='" + userName + "' and password/text() = '" + password + "']/home_dir/text()"); + XmlNode xmlNode = null; + // BAD: User input used directly in an XPath expression to SelectNodes + xmlNode.SelectNodes("//users/user[login/text()='" + userName + "' and password/text() = '" + password + "']/home_dir/text()"); + + // GOOD: Uses parameters to avoid including user input directly in XPath expression + XPathExpression.Compile("//users/user[login/text()=$username]/home_dir/text()"); + } + customerReader.Close(); + } + } } diff --git a/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.expected b/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.expected index f722ab15f6b..f957dc1e6a0 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.expected @@ -1,47 +1,63 @@ edges -| XPathInjection.cs:10:16:10:23 | access to local variable userName : String | XPathInjection.cs:13:13:13:13 | access to local variable s : String | provenance | | -| XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:10:16:10:23 | access to local variable userName : String | provenance | | -| XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:10:27:10:61 | access to indexer : String | provenance | | -| XPathInjection.cs:10:27:10:61 | access to indexer : String | XPathInjection.cs:10:16:10:23 | access to local variable userName : String | provenance | | -| XPathInjection.cs:11:16:11:23 | access to local variable password : String | XPathInjection.cs:13:13:13:13 | access to local variable s : String | provenance | | -| XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:11:16:11:23 | access to local variable password : String | provenance | | +| XPathInjection.cs:11:16:11:23 | access to local variable userName : String | XPathInjection.cs:14:13:14:13 | access to local variable s : String | provenance | | +| XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:11:16:11:23 | access to local variable userName : String | provenance | | | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:11:27:11:61 | access to indexer : String | provenance | | -| XPathInjection.cs:11:27:11:61 | access to indexer : String | XPathInjection.cs:11:16:11:23 | access to local variable password : String | provenance | | -| XPathInjection.cs:13:13:13:13 | access to local variable s : String | XPathInjection.cs:16:33:16:33 | access to local variable s | provenance | | -| XPathInjection.cs:13:13:13:13 | access to local variable s : String | XPathInjection.cs:19:29:19:29 | access to local variable s | provenance | | -| XPathInjection.cs:13:13:13:13 | access to local variable s : String | XPathInjection.cs:28:20:28:20 | access to local variable s | provenance | | -| XPathInjection.cs:13:13:13:13 | access to local variable s : String | XPathInjection.cs:34:30:34:30 | access to local variable s | provenance | | -| XPathInjection.cs:13:13:13:13 | access to local variable s : String | XPathInjection.cs:40:21:40:21 | access to local variable s | provenance | | -| XPathInjection.cs:13:13:13:13 | access to local variable s : String | XPathInjection.cs:46:22:46:22 | access to local variable s | provenance | | -| XPathInjection.cs:13:13:13:13 | access to local variable s : String | XPathInjection.cs:52:21:52:21 | access to local variable s | provenance | | +| XPathInjection.cs:11:27:11:61 | access to indexer : String | XPathInjection.cs:11:16:11:23 | access to local variable userName : String | provenance | | +| XPathInjection.cs:12:16:12:23 | access to local variable password : String | XPathInjection.cs:14:13:14:13 | access to local variable s : String | provenance | | +| XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:12:16:12:23 | access to local variable password : String | provenance | | +| XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:12:27:12:61 | access to indexer : String | provenance | | +| XPathInjection.cs:12:27:12:61 | access to indexer : String | XPathInjection.cs:12:16:12:23 | access to local variable password : String | provenance | | +| XPathInjection.cs:14:13:14:13 | access to local variable s : String | XPathInjection.cs:17:33:17:33 | access to local variable s | provenance | | +| XPathInjection.cs:14:13:14:13 | access to local variable s : String | XPathInjection.cs:20:29:20:29 | access to local variable s | provenance | | +| XPathInjection.cs:14:13:14:13 | access to local variable s : String | XPathInjection.cs:29:20:29:20 | access to local variable s | provenance | | +| XPathInjection.cs:14:13:14:13 | access to local variable s : String | XPathInjection.cs:35:30:35:30 | access to local variable s | provenance | | +| XPathInjection.cs:14:13:14:13 | access to local variable s : String | XPathInjection.cs:41:21:41:21 | access to local variable s | provenance | | +| XPathInjection.cs:14:13:14:13 | access to local variable s : String | XPathInjection.cs:47:22:47:22 | access to local variable s | provenance | | +| XPathInjection.cs:14:13:14:13 | access to local variable s : String | XPathInjection.cs:53:21:53:21 | access to local variable s | provenance | | +| XPathInjection.cs:78:24:78:31 | access to local variable userName : String | XPathInjection.cs:81:41:81:144 | ... + ... | provenance | | +| XPathInjection.cs:78:24:78:31 | access to local variable userName : String | XPathInjection.cs:84:37:84:140 | ... + ... | provenance | | +| XPathInjection.cs:78:35:78:61 | call to method GetString : String | XPathInjection.cs:78:24:78:31 | access to local variable userName : String | provenance | | +| XPathInjection.cs:79:24:79:31 | access to local variable password : String | XPathInjection.cs:81:41:81:144 | ... + ... | provenance | | +| XPathInjection.cs:79:24:79:31 | access to local variable password : String | XPathInjection.cs:84:37:84:140 | ... + ... | provenance | | +| XPathInjection.cs:79:35:79:61 | call to method GetString : String | XPathInjection.cs:79:24:79:31 | access to local variable password : String | provenance | | nodes -| XPathInjection.cs:10:16:10:23 | access to local variable userName : String | semmle.label | access to local variable userName : String | -| XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | -| XPathInjection.cs:10:27:10:61 | access to indexer : String | semmle.label | access to indexer : String | -| XPathInjection.cs:11:16:11:23 | access to local variable password : String | semmle.label | access to local variable password : String | +| XPathInjection.cs:11:16:11:23 | access to local variable userName : String | semmle.label | access to local variable userName : String | | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | | XPathInjection.cs:11:27:11:61 | access to indexer : String | semmle.label | access to indexer : String | -| XPathInjection.cs:13:13:13:13 | access to local variable s : String | semmle.label | access to local variable s : String | -| XPathInjection.cs:16:33:16:33 | access to local variable s | semmle.label | access to local variable s | -| XPathInjection.cs:19:29:19:29 | access to local variable s | semmle.label | access to local variable s | -| XPathInjection.cs:28:20:28:20 | access to local variable s | semmle.label | access to local variable s | -| XPathInjection.cs:34:30:34:30 | access to local variable s | semmle.label | access to local variable s | -| XPathInjection.cs:40:21:40:21 | access to local variable s | semmle.label | access to local variable s | -| XPathInjection.cs:46:22:46:22 | access to local variable s | semmle.label | access to local variable s | -| XPathInjection.cs:52:21:52:21 | access to local variable s | semmle.label | access to local variable s | +| XPathInjection.cs:12:16:12:23 | access to local variable password : String | semmle.label | access to local variable password : String | +| XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | +| XPathInjection.cs:12:27:12:61 | access to indexer : String | semmle.label | access to indexer : String | +| XPathInjection.cs:14:13:14:13 | access to local variable s : String | semmle.label | access to local variable s : String | +| XPathInjection.cs:17:33:17:33 | access to local variable s | semmle.label | access to local variable s | +| XPathInjection.cs:20:29:20:29 | access to local variable s | semmle.label | access to local variable s | +| XPathInjection.cs:29:20:29:20 | access to local variable s | semmle.label | access to local variable s | +| XPathInjection.cs:35:30:35:30 | access to local variable s | semmle.label | access to local variable s | +| XPathInjection.cs:41:21:41:21 | access to local variable s | semmle.label | access to local variable s | +| XPathInjection.cs:47:22:47:22 | access to local variable s | semmle.label | access to local variable s | +| XPathInjection.cs:53:21:53:21 | access to local variable s | semmle.label | access to local variable s | +| XPathInjection.cs:78:24:78:31 | access to local variable userName : String | semmle.label | access to local variable userName : String | +| XPathInjection.cs:78:35:78:61 | call to method GetString : String | semmle.label | call to method GetString : String | +| XPathInjection.cs:79:24:79:31 | access to local variable password : String | semmle.label | access to local variable password : String | +| XPathInjection.cs:79:35:79:61 | call to method GetString : String | semmle.label | call to method GetString : String | +| XPathInjection.cs:81:41:81:144 | ... + ... | semmle.label | ... + ... | +| XPathInjection.cs:84:37:84:140 | ... + ... | semmle.label | ... + ... | subpaths #select -| XPathInjection.cs:16:33:16:33 | access to local variable s | XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:16:33:16:33 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:10:27:10:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:16:33:16:33 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:16:33:16:33 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:19:29:19:29 | access to local variable s | XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:19:29:19:29 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:10:27:10:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:19:29:19:29 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:19:29:19:29 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:28:20:28:20 | access to local variable s | XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:28:20:28:20 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:10:27:10:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:28:20:28:20 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:28:20:28:20 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:34:30:34:30 | access to local variable s | XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:34:30:34:30 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:10:27:10:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:34:30:34:30 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:34:30:34:30 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:40:21:40:21 | access to local variable s | XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:40:21:40:21 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:10:27:10:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:40:21:40:21 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:40:21:40:21 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:46:22:46:22 | access to local variable s | XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:46:22:46:22 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:10:27:10:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:46:22:46:22 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:46:22:46:22 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:52:21:52:21 | access to local variable s | XPathInjection.cs:10:27:10:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:52:21:52:21 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:10:27:10:49 | access to property QueryString | user-provided value | -| XPathInjection.cs:52:21:52:21 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:52:21:52:21 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:17:33:17:33 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:17:33:17:33 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:17:33:17:33 | access to local variable s | XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:17:33:17:33 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:20:29:20:29 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:20:29:20:29 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:20:29:20:29 | access to local variable s | XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:20:29:20:29 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:29:20:29:20 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:29:20:29:20 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:29:20:29:20 | access to local variable s | XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:29:20:29:20 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:35:30:35:30 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:35:30:35:30 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:35:30:35:30 | access to local variable s | XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:35:30:35:30 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:41:21:41:21 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:41:21:41:21 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:41:21:41:21 | access to local variable s | XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:41:21:41:21 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:47:22:47:22 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:47:22:47:22 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:47:22:47:22 | access to local variable s | XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:47:22:47:22 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:53:21:53:21 | access to local variable s | XPathInjection.cs:11:27:11:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:53:21:53:21 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:11:27:11:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:53:21:53:21 | access to local variable s | XPathInjection.cs:12:27:12:49 | access to property QueryString : NameValueCollection | XPathInjection.cs:53:21:53:21 | access to local variable s | This XPath expression depends on a $@. | XPathInjection.cs:12:27:12:49 | access to property QueryString | user-provided value | +| XPathInjection.cs:81:41:81:144 | ... + ... | XPathInjection.cs:78:35:78:61 | call to method GetString : String | XPathInjection.cs:81:41:81:144 | ... + ... | This XPath expression depends on a $@. | XPathInjection.cs:78:35:78:61 | call to method GetString | user-provided value | +| XPathInjection.cs:81:41:81:144 | ... + ... | XPathInjection.cs:79:35:79:61 | call to method GetString : String | XPathInjection.cs:81:41:81:144 | ... + ... | This XPath expression depends on a $@. | XPathInjection.cs:79:35:79:61 | call to method GetString | user-provided value | +| XPathInjection.cs:84:37:84:140 | ... + ... | XPathInjection.cs:78:35:78:61 | call to method GetString : String | XPathInjection.cs:84:37:84:140 | ... + ... | This XPath expression depends on a $@. | XPathInjection.cs:78:35:78:61 | call to method GetString | user-provided value | +| XPathInjection.cs:84:37:84:140 | ... + ... | XPathInjection.cs:79:35:79:61 | call to method GetString : String | XPathInjection.cs:84:37:84:140 | ... + ... | This XPath expression depends on a $@. | XPathInjection.cs:79:35:79:61 | call to method GetString | user-provided value | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.ext.yml b/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.ext.yml new file mode 100644 index 00000000000..82f107ae1d7 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-643/XPathInjection.ext.yml @@ -0,0 +1,7 @@ +extensions: + + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] \ No newline at end of file diff --git a/csharp/tools/tracing-config.lua b/csharp/tools/tracing-config.lua index 55f803c5adb..5fc1cc8e80e 100644 --- a/csharp/tools/tracing-config.lua +++ b/csharp/tools/tracing-config.lua @@ -23,6 +23,10 @@ function RegisterExtractorPack(id) not isDotnetPath(arg) end + local function isPathToExecutable(path) + return path:match('%.exe$') or path:match('%.dll') + end + function DotnetMatcherBuild(compilerName, compilerPath, compilerArguments, _languageId) if not isDotnet(compilerName) then @@ -56,8 +60,16 @@ function RegisterExtractorPack(id) NativeArgumentsToArgv(compilerArguments.nativeArgumentPointer) end for i, arg in ipairs(argv) do + -- if dotnet is being used to execute any application except dotnet itself, we should + -- not inject any flags. + if not match and isPathToExecutable(arg) and not isDotnetPath(arg) then + Log(1, 'Execute a .NET application usage detected') + Log(1, 'Dotnet path-to-application detected: %s', arg) + break + end if isPossibleDotnetSubcommand(arg) then - if (not match) and inSubCommandPosition then + if not match and inSubCommandPosition then + Log(1, 'Execute a .NET SDK command usage detected') Log(1, 'Dotnet subcommand detected: %s', arg) end -- only respond to strings that look like sub-command names if we have not yet @@ -85,7 +97,7 @@ function RegisterExtractorPack(id) end -- for `dotnet test`, we should not append `-p:UseSharedCompilation=false` to the command line -- if an `exe` or `dll` is passed as an argument as the call is forwarded to vstest. - if testMatch and (arg:match('%.exe$') or arg:match('%.dll')) then + if testMatch and isPathToExecutable(arg) then match = false break end diff --git a/docs/codeql/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code.rst b/docs/codeql/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code.rst index ddc78558496..7e19e78bd42 100644 --- a/docs/codeql/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code.rst +++ b/docs/codeql/codeql-for-visual-studio-code/testing-codeql-queries-in-visual-studio-code.rst @@ -12,27 +12,31 @@ About testing queries in VS Code To ensure that your CodeQL queries produce the expected results, you can run tests that compare the expected query results with the actual results. -The CodeQL extension automatically prompts VS Code to install the Test Explorer extension as a dependency. The Test Explorer displays any workspace folders with a name ending in ``-tests`` and provides a UI for exploring and running tests in those folders. +The CodeQL extension automatically registers itself with the **Testing** view. The **Testing** view displays all tests found in your current workspace and provides a UI for exploring and running tests in your workspace. For more information about how CodeQL tests work, see "`Testing custom queries `__" in the CLI help. Testing the results of your queries ----------------------------------- -1. Open the Test Explorer view in the sidebar. +1. Open the **Testing** view in the sidebar. - .. image:: ../images/codeql-for-visual-studio-code/open-test-explorer.png + .. image:: ../images/codeql-for-visual-studio-code/open-testing-view.png :width: 350 - :alt: Open the Test Explorer view + :alt: Open the Testing view 2. To run a specific test, hover over the file or folder name and click the play button. To run all tests in your workspace, click the play button at the top of the view. If a test takes too long to run, you can click the stop button at the top of the view to cancel the test. -3. The icons show whether a test passed or failed. If it failed, right-click the failed test and click **CodeQL: Show Test Output Differences** to display the differences between the expected output and the actual output. +3. The icons show whether a test passed or failed. If it failed, click the test in the **Test Results** panel to display the differences between the expected output and the actual output. - .. image:: ../images/codeql-for-visual-studio-code/show-test-diff.png + .. image:: ../images/codeql-for-visual-studio-code/test-results-panel.png + :width: 800 + :alt: View the Test Results panel + +4. Compare the results. If you want to update the test with the actual output, right-click the test in the **Testing** view and click **Accept Test Output**. + + .. image:: ../images/codeql-for-visual-studio-code/accept-test-output.png :width: 400 - :alt: Show test output differences - -4. Compare the results. If you want to update the test with the actual output, click **CodeQL: Accept Test Output**. + :alt: Acccept test output in the Testing view Monitoring the performance of your queries ------------------------------------------ diff --git a/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst b/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst index 0eaa4518118..d1dce1a6771 100644 --- a/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst +++ b/docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst @@ -18,9 +18,9 @@ When you open the model editor, it analyzes the currently selected CodeQL databa The model editor has two different modes: -- Application mode (default view): The editor lists each external framework used by the selected CodeQL database. When you expand a framework, a list of all calls to and from the external API is shown with the options available to model dataflow through each call. This mode is most useful for improving the CodeQL results for a specific codebase. +- **Application mode (default view):** The editor lists each external framework used by the selected CodeQL database. When you expand a framework, a list of all calls to and from the external API is shown with the options available to model dataflow through each call. This mode is most useful for improving the CodeQL results for a specific codebase. -- Dependency mode: The editor identifies all of the publicly accessible APIs in the selected CodeQL database. This view guides you through modeling each public API that the codebase makes available. When you have finished modeling the entire API, you can save the model and use it to improve the CodeQL analysis for all codebases that use the dependency. +- **Dependency mode:** The editor identifies all of the publicly accessible APIs in the selected CodeQL database. This view guides you through modeling each public API that the codebase makes available. When you have finished modeling the entire API, you can save the model and use it to improve the CodeQL analysis for all codebases that use the dependency. Displaying the CodeQL model editor ---------------------------------- @@ -32,7 +32,7 @@ Displaying the CodeQL model editor #. The CodeQL model editor runs a series of telemetry queries to identify APIs in the code and the editor is displayed in a new tab. #. When the telemetry queries are complete, the APIs that have been identified are shown in the editor. -.. tip:: +.. pull-quote:: Tip The "CodeQL method modeling" section is a view that you can move from the primary sidebar to the secondary sidebar, when you want more space while you are modeling calls or methods. If you close the view, you can reopen it from the "Open Views" option in the **View** menu. @@ -41,6 +41,8 @@ Modeling the calls your codebase makes to external APIs You typically use this approach when you are looking at a specific codebase where you want to improve the precision of CodeQL results. This is useful when the codebase uses frameworks or libraries that are not supported by CodeQL and if the source code of the framework or library is not included in the analysis. +This section uses an open source Java project called "sofa-jraft" as an example. The experience of modeling calls to external APIs written in other static languages is similar. + #. Select the CodeQL database that you want to improve CodeQL coverage for. #. Display the CodeQL model editor. By default the editor runs in application mode, so the list of external APIs used by the selected codebase is shown. @@ -90,6 +92,8 @@ The models are stored in a series of YAML data extension files, one for each ext Modeling the public API of a codebase ------------------------------------- +This section uses an open source Java project called "sofa-jraft" as an example. The experience of modeling the public API written using other static languages is similar. + You typically use this method when you want to model a framework or library that your organization uses in more than one codebase. Once you have finished creating and testing the model, you can publish the CodeQL model pack to the GitHub Container Registry for your whole organization to use. #. Select the CodeQL database that you want to model. diff --git a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-java.rst b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-java.rst index 028e1317814..3a9b84cfcc3 100644 --- a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-java.rst +++ b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-java.rst @@ -27,7 +27,13 @@ Local data flow is data flow within a single method or callable. Local data flow Using local data flow ~~~~~~~~~~~~~~~~~~~~~ -The local data flow library is in the module ``DataFlow``, which defines the class ``Node`` denoting any element that data can flow through. ``Node``\ s are divided into expression nodes (``ExprNode``) and parameter nodes (``ParameterNode``). You can map between data flow nodes and expressions/parameters using the member predicates ``asExpr`` and ``asParameter``: +To use the data flow library you need the following import: + +.. code-block:: ql + + import semmle.code.java.dataflow.DataFlow + +The ``DataFlow`` module defines the class ``Node`` denoting any element that data can flow through. ``Node``\ s are divided into expression nodes (``ExprNode``) and parameter nodes (``ParameterNode``). You can map between data flow nodes and expressions/parameters using the member predicates ``asExpr`` and ``asParameter``: .. code-block:: ql @@ -75,7 +81,14 @@ Local taint tracking extends local data flow by including non-value-preserving f If ``x`` is a tainted string then ``y`` is also tainted. -The local taint tracking library is in the module ``TaintTracking``. Like local data flow, a predicate ``localTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo)`` holds if there is an immediate taint propagation edge from the node ``nodeFrom`` to the node ``nodeTo``. You can apply the predicate recursively by using the ``+`` and ``*`` operators, or by using the predefined recursive predicate ``localTaint``, which is equivalent to ``localTaintStep*``. + +To use the taint tracking library you need the following import: + +.. code-block:: ql + + import semmle.code.java.dataflow.TaintTracking + +Like local data flow, a predicate ``localTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo)`` holds if there is an immediate taint propagation edge from the node ``nodeFrom`` to the node ``nodeTo``. You can apply the predicate recursively by using the ``+`` and ``*`` operators, or by using the predefined recursive predicate ``localTaint``, which is equivalent to ``localTaintStep*``. For example, you can find taint propagation from a parameter ``source`` to an expression ``sink`` in zero or more local steps: diff --git a/docs/codeql/codeql-language-guides/codeql-for-csharp.rst b/docs/codeql/codeql-language-guides/codeql-for-csharp.rst index 9b692094841..491b7bf9de7 100644 --- a/docs/codeql/codeql-language-guides/codeql-for-csharp.rst +++ b/docs/codeql/codeql-language-guides/codeql-for-csharp.rst @@ -11,6 +11,7 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat basic-query-for-csharp-code codeql-library-for-csharp analyzing-data-flow-in-csharp + customizing-library-models-for-csharp - :doc:`Basic query for C# code `: Learn to write and run a simple CodeQL query. @@ -18,4 +19,5 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat - :doc:`Analyzing data flow in C# `: You can use CodeQL to track the flow of data through a C# program to its use. +- :doc:`Customizing library models for C# `: You can model frameworks and libraries that your codebase depends on using data extensions and publish them as CodeQL model packs. diff --git a/docs/codeql/codeql-language-guides/customizing-library-models-for-csharp.rst b/docs/codeql/codeql-language-guides/customizing-library-models-for-csharp.rst new file mode 100644 index 00000000000..09dcf36fc07 --- /dev/null +++ b/docs/codeql/codeql-language-guides/customizing-library-models-for-csharp.rst @@ -0,0 +1,358 @@ +.. _customizing-library-models-for-csharp: + +Customizing library models for C# +================================= + +You can model the methods and callables that control data flow in any framework or library. This is especially useful for custom frameworks or niche libraries, that are not supported by the standard CodeQL libraries. + +.. include:: ../reusables/beta-note-customizing-library-models.rst + +About this article +------------------ + +This article contains reference material about how to define custom models for sources, sinks, and flow summaries for C# dependencies in data extension files. + +About data extensions +--------------------- + +You can customize analysis by defining models (summaries, sinks, and sources) of your code's C#/.NET dependencies in data extension files. Each model defines the behavior of one or more elements of your library or framework, such as methods, properties, and callables. When you run dataflow analysis, these models expand the potential sources and sinks tracked by dataflow analysis and improve the precision of results. + +Most of the security queries search for paths from a source of untrusted input to a sink that represents a vulnerability. This is known as taint tracking. Each source is a starting point for dataflow analysis to track tainted data and each sink is an end point. + +Taint tracking queries also need to know how data can flow through elements that are not included in the source code. These are modeled as summaries. A summary model enables queries to synthesize the flow behavior through elements in dependency code that is not stored in your repository. + +Syntax used to define an element in an extension file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Each model of an element is defined using a data extension where each tuple constitutes a model. +A data extension file to extend the standard C# queries included with CodeQL is a YAML file with the form: + +.. code-block:: yaml + + extensions: + - addsTo: + pack: codeql/csharp-all + extensible: + data: + - + - + - ... + +Each YAML file may contain one or more top-level extensions. + +- ``addsTo`` defines the CodeQL pack name and extensible predicate that the extension is injected into. +- ``data`` defines one or more rows of tuples that are injected as values into the extensible predicate. The number of columns and their types must match the definition of the extensible predicate. + +Data extensions use union semantics, which means that the tuples of all extensions for a single extensible predicate are combined, duplicates are removed, and all of the remaining tuples are queryable by referencing the extensible predicate. + +Publish data extension files in a CodeQL model pack to share +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can group one or more data extension files into a CodeQL model pack and publish it to the GitHub Container Registry. This makes it easy for anyone to download the model pack and use it to extend their analysis. For more information, see `Creating a CodeQL model pack `__ and `Publishing and using CodeQL packs `__ in the CodeQL CLI documentation. + +Extensible predicates used to create custom models in C# +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The CodeQL library for C# analysis exposes the following extensible predicates: + +- ``sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model sources of potentially tainted data. The ``kind`` of the sources defined using this predicate determine which threat model they are associated with. Different threat models can be used to customize the sources used in an analysis. For more information, see ":ref:`Threat models `." +- ``sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance)``. This is used to model sinks where tainted data may be used in a way that makes the code vulnerable. +- ``summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance)``. This is used to model flow through elements. +- ``neutralModel(namespace, type, name, signature, kind, provenance)``. This is similar to a summary model but used to model the flow of values that have only a minor impact on the dataflow analysis. Manual neutral models (those with a provenance such as ``manual`` or ``ai-manual``) can be used to override generated summary models (those with a provenance such as ``df-generated``), so that the summary model will be ignored. Other than that, neutral models have no effect. + +The extensible predicates are populated using the models defined in data extension files. + +Examples of custom model definitions +------------------------------------ + +The examples in this section are taken from the standard CodeQL C# query pack published by GitHub. They demonstrate how to add tuples to extend extensible predicates that are used by the standard queries. + +Example: Taint sink in the ``System.Data.SqlClient`` namespace +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This example shows how the C# query pack models the argument of the ``SqlCommand`` constructor as a SQL injection sink. +This is the constructor of the ``SqlCommand`` class, which is located in the ``System.Data.SqlClient`` namespace. + +.. code-block:: csharp + + public static void TaintSink(SqlConnection conn, string query) { + SqlCommand command = new SqlCommand(query, connection) // The argument to this method is a SQL injection sink. + ... + } + +We need to add a tuple to the ``sinkModel``\(namespace, type, subtypes, name, signature, ext, input, kind, provenance) extensible predicate by updating a data extension file. + +.. code-block:: yaml + + extensions: + - addsTo: + pack: codeql/csharp-all + extensible: sinkModel + data: + - ["System.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String,System.Data.SqlClient.SqlConnection)", "", "Argument[0]", "sql-injection", "manual"] + +Since we want to add a new sink, we need to add a tuple to the ``sinkModel`` extensible predicate. +The first five values identify the callable (in this case a method) to be modeled as a sink. + +- The first value ``System.Data.SqlClient`` is the namespace name. +- The second value ``SqlCommand`` is the name of the class (type) that contains the method. +- The third value ``False`` is a flag that indicates whether or not the sink also applies to all overrides of the method. +- The fourth value ``SqlCommand`` is the method name. Constructors are named after the class. +- The fifth value ``(System.String,System.Data.SqlClient.SqlConnection)`` is the method input type signature. The type names must be fully qualified. + +The sixth value should be left empty and is out of scope for this documentation. +The remaining values are used to define the ``access path``, the ``kind``, and the ``provenance`` (origin) of the sink. + +- The seventh value ``Argument[0]`` is the ``access path`` to the first argument passed to the method, which means that this is the location of the sink. +- The eighth value ``sql-injection`` is the kind of the sink. The sink kind is used to define the queries where the sink is in scope. In this case - the SQL injection queries. +- The ninth value ``manual`` is the provenance of the sink, which is used to identify the origin of the sink. + +Example: Taint source from the ``System.Net.Sockets`` namespace +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This example shows how the C# query pack models the return value from the ``GetStream`` method as a ``remote`` source. +This is the ``GetStream`` method in the ``TcpClient`` class, which is located in the ``System.Net.Sockets`` namespace. + +.. code-block:: csharp + + public static void Tainted(TcpClient client) { + NetworkStream stream = client.GetStream(); // The return value of this method is a remote source of taint. + ... + } + +We need to add a tuple to the ``sourceModel``\(namespace, type, subtypes, name, signature, ext, output, kind, provenance) extensible predicate by updating a data extension file. + +.. code-block:: yaml + + extensions: + - addsTo: + pack: codeql/csharp-all + extensible: sourceModel + data: + - ["System.Net.Sockets", "TcpClient", False, "GetStream", "()", "", "ReturnValue", "remote", "manual"] + + +Since we are adding a new source, we need to add a tuple to the ``sourceModel`` extensible predicate. +The first five values identify the callable (in this case a method) to be modeled as a source. + +- The first value ``System.Net.Sockets`` is the namespace name. +- The second value ``TcpClient`` is the name of the class (type) that contains the source. +- The third value ``False`` is a flag that indicates whether or not the source also applies to all overrides of the method. +- The fourth value ``GetStream`` is the method name. +- The fifth value ``()`` is the method input type signature. + +The sixth value should be left empty and is out of scope for this documentation. +The remaining values are used to define the ``access path``, the ``kind``, and the ``provenance`` (origin) of the source. + +- The seventh value ``ReturnValue`` is the access path to the return of the method, which means that it is the return value that should be considered a source of tainted input. +- The eighth value ``remote`` is the kind of the source. The source kind is used to define the threat model where the source is in scope. ``remote`` applies to many of the security related queries as it means a remote source of untrusted data. As an example the SQL injection query uses ``remote`` sources. For more information, see ":ref:`Threat models `." +- The ninth value ``manual`` is the provenance of the source, which is used to identify the origin of the source. + +Example: Add flow through the ``Concat`` method +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This example shows how the C# query pack models flow through a method for a simple case. +This pattern covers many of the cases where we need to summarize flow through a method that is stored in a library or framework outside the repository. + +.. code-block:: csharp + + public static void TaintFlow(string s1, string s2) { + string t = String.Concat(s1, s2); // There is taint flow from s1 and s2 to t. + ... + } + +We need to add tuples to the ``summaryModel``\(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance) extensible predicate by updating a data extension file: + +.. code-block:: yaml + + extensions: + - addsTo: + pack: codeql/csharp-all + extensible: summaryModel + data: + - ["System", "String", False, "Concat", "(System.Object,System.Object)", "", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["System", "String", False, "Concat", "(System.Object,System.Object)", "", "Argument[1]", "ReturnValue", "taint", "manual"] + +Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate. +Each tuple defines flow from one argument to the return value. +The first row defines flow from the first argument (``s1`` in the example) to the return value (``t`` in the example) and the second row defines flow from the second argument (``s2`` in the example) to the return value (``t`` in the example). + +The first five values identify the callable (in this case a method) to be modeled as a summary. +These are the same for both of the rows above as we are adding two summaries for the same method. + +- The first value ``System`` is the namespace name. +- The second value ``String`` is the class (type) name. +- The third value ``False`` is a flag that indicates whether or not the summary also applies to all overrides of the method. +- The fourth value ``Concat`` is the method name. +- The fifth value ``(System.Object,System.Object)`` is the method input type signature. + +The sixth value should be left empty and is out of scope for this documentation. +The remaining values are used to define the ``access path``, the ``kind``, and the ``provenance`` (origin) of the summary. + +- The seventh value is the access path to the input (where data flows from). ``Argument[0]`` is the access path to the first argument (``s1`` in the example) and ``Argument[1]`` is the access path to the second argument (``s2`` in the example). +- The eighth value ``ReturnValue`` is the access path to the output (where data flows to), in this case ``ReturnValue``, which means that the input flows to the return value. +- The ninth value ``taint`` is the kind of the flow. ``taint`` means that taint is propagated through the call. +- The tenth value ``manual`` is the provenance of the summary, which is used to identify the origin of the summary. + +It would also be possible to merge the two rows into one by using a comma-separated list in the seventh value. This would be useful if the method has many arguments and the flow is the same for all of them. + +.. code-block:: yaml + + extensions: + - addsTo: + pack: codeql/csharp-all + extensible: summaryModel + data: + - ["System", "String", False, "Concat", "(System.Object,System.Object)", "", "Argument[0,1]", "ReturnValue", "taint", "manual"] + +This row defines flow from both the first and the second argument to the return value. The seventh value ``Argument[0,1]`` is shorthand for specifying an access path to both ``Argument[0]`` and ``Argument[1]``. + +Example: Add flow through the ``Trim`` method +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This example shows how the C# query pack models flow through a method for a simple case. + +.. code-block:: csharp + + public static void TaintFlow(string s) { + string t = s.Trim(); // There is taint flow from s to t. + ... + } + +We need to add a tuple to the ``summaryModel``\(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance) extensible predicate by updating a data extension file: + +.. code-block:: yaml + + extensions: + - addsTo: + pack: codeql/csharp-all + extensible: summaryModel + data: + - ["System", "String", False, "Trim", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"] + +Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate. +Each tuple defines flow from one argument to the return value. +The first row defines flow from the qualifier of the method call (``s1`` in the example) to the return value (``t`` in the example). + +The first five values identify the callable (in this case a method) to be modeled as a summary. +These are the same for both of the rows above as we are adding two summaries for the same method. + +- The first value ``System`` is the namespace name. +- The second value ``String`` is the class (type) name. +- The third value ``False`` is a flag that indicates whether or not the summary also applies to all overrides of the method. +- The fourth value ``Trim`` is the method name. +- The fifth value ``()`` is the method input type signature. + +The sixth value should be left empty and is out of scope for this documentation. +The remaining values are used to define the ``access path``, the ``kind``, and the ``provenance`` (origin) of the summary. + +- The seventh value is the access path to the input (where data flows from). ``Argument[this]`` is the access path to the qualifier (``s`` in the example). +- The eighth value ``ReturnValue`` is the access path to the output (where data flows to), in this case ``ReturnValue``, which means that the input flows to the return value. +- The ninth value ``taint`` is the kind of the flow. ``taint`` means that taint is propagated through the call. +- The tenth value ``manual`` is the provenance of the summary, which is used to identify the origin of the summary. + +Example: Add flow through the ``Select`` method +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This example shows how the C# query pack models a more complex flow through a method. +Here we model flow through higher order methods and collection types, as well as how to handle extension methods and generics. + +.. code-block:: csharp + + public static void TaintFlow(IEnumerable stream) { + IEnumerable lines = stream.Select(item => item + "\n"); + ... + } + +We need to add tuples to the ``summaryModel``\(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance) extensible predicate by updating a data extension file: + +.. code-block:: yaml + + extensions: + - addsTo: + pack: codeql/csharp-all + extensible: summaryModel + data: + - ["System.Linq", "Enumerable", False, "Select", "(System.Collections.Generic.IEnumerable,System.Func)", "", "Argument[0].Element", "Argument[1].Parameter[0]", "value", "manual"] + - ["System.Linq", "Enumerable", False, "Select", "(System.Collections.Generic.IEnumerable,System.Func)", "", "Argument[1].ReturnValue", "ReturnValue.Element", "value", "manual"] + + +Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate. +Each tuple defines part of the flow that comprises the total flow through the ``Select`` method. +The first five values identify the callable (in this case a method) to be modeled as a summary. +These are the same for both of the rows above as we are adding two summaries for the same method. + +- The first value ``System.Linq`` is the namespace name. +- The second value ``Enumerable`` is the class (type) name. +- The third value ``False`` is a flag that indicates whether or not the summary also applies to all overrides of the method. +- The fourth value ``Select`` is the method name, along with the type parameters for the method. The names of the generic type parameters provided in the model must match the names of the generic type parameters in the method signature in the source code. +- The fifth value ``(System.Collections.Generic.IEnumerable,System.Func)`` is the method input type signature. The generics in the signature must match the generics in the method signature in the source code. + +The sixth value should be left empty and is out of scope for this documentation. +The remaining values are used to define the ``access path``, the ``kind``, and the ``provenance`` (origin) of the summary definition. + +- The seventh value is the access path to the ``input`` (where data flows from). +- The eighth value is the access path to the ``output`` (where data flows to). + +For the first row: + +- The seventh value is ``Argument[0].Element``, which is the access path to the elements of the qualifier (the elements of the enumerable ``stream`` in the example). +- The eight value is ``Argument[1].Parameter[0]``, which is the access path to the first parameter of the ``System.Func`` argument of ``Select`` (the lambda parameter ``item`` in the example). + +For the second row: + +- The seventh value is ``Argument[1].ReturnValue``, which is the access path to the return value of the ``System.Func`` argument of ``Select`` (the return value of the lambda in the example). +- The eighth value is ``ReturnValue.Element``, which is the access path to the elements of the return value of ``Select`` (the elements of the enumerable ``lines`` in the example). + +For the remaining values for both rows: + +- The ninth value ``value`` is the kind of the flow. ``value`` means that the value is preserved. +- The tenth value ``manual`` is the provenance of the summary, which is used to identify the origin of the summary. + +That is, the first row specifies that values can flow from the elements of the qualifier enumerable into the first argument of the function provided to ``Select``. The second row specifies that values can flow from the return value of the function to the elements of the enumerable returned from ``Select``. + +Example: Add a ``neutral`` method +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This example shows how we can model a method as being neutral with respect to flow. We will also cover how to model a property by modeling the getter of the ``Now`` property of the ``DateTime`` class as neutral. +A neutral model is used to define that there is no flow through a method. + +.. code-block:: csharp + + public static void TaintFlow() { + System.DateTime t = System.DateTime.Now; // There is no flow from Now to t. + ... + } + +We need to add a tuple to the ``neutralModel``\(namespace, type, name, signature, kind, provenance) extensible predicate by updating a data extension file. + +.. code-block:: yaml + + extensions: + - addsTo: + pack: codeql/csharp-all + extensible: neutralModel + data: + - ["System", "DateTime", "get_Now", "()", "summary", "manual"] + + +Since we are adding a neutral model, we need to add tuples to the ``neutralModel`` extensible predicate. +The first four values identify the callable (in this case the getter of the ``Now`` property) to be modeled as a neutral, the fifth value is the kind, and the sixth value is the provenance (origin) of the neutral. + +- The first value ``System`` is the namespace name. +- The second value ``DateTime`` is the class (type) name. +- The third value ``get_Now`` is the method name. Getter and setter methods are named ``get_`` and ``set_`` respectively. +- The fourth value ``()`` is the method input type signature. +- The fifth value ``summary`` is the kind of the neutral. +- The sixth value ``manual`` is the provenance of the neutral. + +.. _threat-models-csharp: + +Threat models +------------- + +.. include:: ../reusables/beta-note-threat-models.rst + +A threat model is a named class of dataflow sources that can be enabled or disabled independently. Threat models allow you to control the set of dataflow sources that you want to consider unsafe. For example, one codebase may only consider remote HTTP requests to be tainted, whereas another may also consider data from local files to be unsafe. You can use threat models to ensure that the relevant taint sources are used in a CodeQL analysis. + +The ``kind`` property of ``sourceModel`` determines which threat model a source is associated with. There are two main categories: + +- ``remote`` which represents requests and responses from the network. +- ``local`` which represents data from local files (``file``), command-line arguments (``commandargs``), database reads (``database``), and environment variables(``environment``). + +When running a CodeQL analysis, the ``remote`` threat model is included by default. You can optionally include other threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see `Analyzing your code with CodeQL queries `__ and `Customizing your advanced setup for code scanning `__. diff --git a/docs/codeql/codeql-language-guides/customizing-library-models-for-java-and-kotlin.rst b/docs/codeql/codeql-language-guides/customizing-library-models-for-java-and-kotlin.rst index 063bcf1e4a1..e8b69e20d81 100644 --- a/docs/codeql/codeql-language-guides/customizing-library-models-for-java-and-kotlin.rst +++ b/docs/codeql/codeql-language-guides/customizing-library-models-for-java-and-kotlin.rst @@ -7,7 +7,7 @@ You can model the methods and callables that control data flow in any framework .. include:: ../reusables/kotlin-beta-note.rst -.. include:: ../reusables/beta-note-model-packs-java.rst +.. include:: ../reusables/beta-note-customizing-library-models.rst About this article ------------------ @@ -61,10 +61,10 @@ Extensible predicates used to create custom models in Java and Kotlin The CodeQL library for Java and Kotlin analysis exposes the following extensible predicates: -- ``sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model sources of potentially tainted data. The ``kind`` of the sources defined using this predicate determine which threat model they are associated with. Different threat models can be used to customize the sources used in an analysis. For more information, see ":ref:`Threat models `." +- ``sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model sources of potentially tainted data. The ``kind`` of the sources defined using this predicate determine which threat model they are associated with. Different threat models can be used to customize the sources used in an analysis. For more information, see ":ref:`Threat models `." - ``sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance)``. This is used to model sinks where tainted data maybe used in a way that makes the code vulnerable. - ``summaryModel(package, type, subtypes, name, signature, ext, input, output, kind, provenance)``. This is used to model flow through elements. -- ``neutralModel(package, type, name, signature, kind, provenance)``. This is similar to a summary model but used to model the flow of values that have only a minor impact on the dataflow analysis. +- ``neutralModel(package, type, name, signature, kind, provenance)``. This is similar to a summary model but used to model the flow of values that have only a minor impact on the dataflow analysis. Manual neutral models (those with a provenance such as ``manual`` or ``ai-manual``) override generated summary models (those with a provenance such as ``df-generated``) so that the summary will be ignored. Other than that, neutral models have a slight impact on the dataflow dispatch logic, which is out of scope for this documentation. The extensible predicates are populated using the models defined in data extension files. @@ -151,7 +151,7 @@ The sixth value should be left empty and is out of scope for this documentation. The remaining values are used to define the ``access path``, the ``kind``, and the ``provenance`` (origin) of the source. - The seventh value ``ReturnValue`` is the access path to the return of the method, which means that it is the return value that should be considered a source of tainted input. -- The eighth value ``remote`` is the kind of the source. The source kind is used to define the threat model where the source is in scope. ``remote`` applies to many of the security related queries as it means a remote source of untrusted data. As an example the SQL injection query uses ``remote`` sources. For more information, see ":ref:`Threat models `." +- The eighth value ``remote`` is the kind of the source. The source kind is used to define the threat model where the source is in scope. ``remote`` applies to many of the security related queries as it means a remote source of untrusted data. As an example the SQL injection query uses ``remote`` sources. For more information, see ":ref:`Threat models `." - The ninth value ``manual`` is the provenance of the source, which is used to identify the origin of the source. Example: Add flow through the ``concat`` method @@ -292,12 +292,12 @@ The first four values identify the callable (in this case a method) to be modele - The fifth value ``summary`` is the kind of the neutral. - The sixth value ``manual`` is the provenance of the neutral. -.. _threat-models: +.. _threat-models-java: Threat models ------------- -.. include:: ../reusables/beta-note-threat-models-java.rst +.. include:: ../reusables/beta-note-threat-models.rst A threat model is a named class of dataflow sources that can be enabled or disabled independently. Threat models allow you to control the set of dataflow sources that you want to consider unsafe. For example, one codebase may only consider remote HTTP requests to be tainted, whereas another may also consider data from local files to be unsafe. You can use threat models to ensure that the relevant taint sources are used in a CodeQL analysis. diff --git a/docs/codeql/codeql-language-guides/extensible-predicates.rst b/docs/codeql/codeql-language-guides/extensible-predicates.rst index 0ed962df4af..7b00f09785e 100644 --- a/docs/codeql/codeql-language-guides/extensible-predicates.rst +++ b/docs/codeql/codeql-language-guides/extensible-predicates.rst @@ -8,7 +8,7 @@ Extensible predicates and their interaction with data extensions You can use data extensions to model the methods and callables that control dataflow in any framework or library. This is especially useful for custom frameworks or niche libraries, that are not supported by the standard CodeQL libraries. -.. include:: ../reusables/beta-note-model-packs-java.rst +.. include:: ../reusables/beta-note-customizing-library-models.rst About this article ------------------ diff --git a/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.16.3.rst b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.16.3.rst new file mode 100644 index 00000000000..af699a301c4 --- /dev/null +++ b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.16.3.rst @@ -0,0 +1,194 @@ +.. _codeql-cli-2.16.3: + +========================== +CodeQL 2.16.3 (2024-02-22) +========================== + +.. contents:: Contents + :depth: 2 + :local: + :backlinks: none + +This is an overview of changes in the CodeQL CLI and relevant CodeQL query and library packs. For additional updates on changes to the CodeQL code scanning experience, check out the `code scanning section on the GitHub blog `__, `relevant GitHub Changelog updates `__, `changes in the CodeQL extension for Visual Studio Code `__, and the `CodeQL Action changelog `__. + +Security Coverage +----------------- + +CodeQL 2.16.3 runs a total of 408 security queries when configured with the Default suite (covering 160 CWE). The Extended suite enables an additional 131 queries (covering 34 more CWE). 2 security queries have been added with this release. + +CodeQL CLI +---------- + +Bug Fixes +~~~~~~~~~ + +* Fixed a bug where CodeQL may produce an invalid database when it exhausts all available ID numbers. Now it detects the condition and reports an error instead. + +New Features +~~~~~~~~~~~~ + +* A new extractor option has been added to the Python extractor: :code:`python_executable_name`. + You can use this option to override the default process the extractor uses to find and select a Python executable. + Pass one of :code:`--extractor-option python_executable_name=py` or :code:`--extractor-option python_executable_name=python` or :code:`--extractor-option python_executable_name=python3` to commands that run the extractor, for example: :code:`codeql database create`. + + On Windows machines, the Python extractor will expect to find :code:`py.exe` on the system :code:`PATH` by default. + If the Python executable has a different name, you can set the new extractor option to override this value and look for :code:`python.exe` or :code:`python3.exe`. + + For more information about using the extractor option with the CodeQL CLI, see `Extractor options `__. + +Security Updates +~~~~~~~~~~~~~~~~ + +* Fixes CVE-2024-25129, a limited data exfiltration vulnerability that could be triggered by untrusted databases or QL packs. See the + \ `security advisory `__ for more information. + +Query Packs +----------- + +Bug Fixes +~~~~~~~~~ + +JavaScript/TypeScript +""""""""""""""""""""" + +* The left operand of the :code:`&&` operator no longer propagates data flow by default. + +Major Analysis Improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Golang +"""""" + +* The query "Use of a hardcoded key for signing JWT" (:code:`go/hardcoded-key`) has been promoted from experimental to the main query pack. Its results will now appear by default as part of :code:`go/hardcoded-credentials`. This query was originally `submitted as an experimental query by @porcupineyhairs `__. + +Java +"""" + +* The sinks of the queries :code:`java/path-injection` and :code:`java/path-injection-local` have been reworked. Path creation sinks have been converted to summaries instead, while sinks now are actual file read/write operations only. This has reduced the false positive ratio of both queries. + +Minor Analysis Improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +C/C++ +""""" + +* The "non-constant format string" query (:code:`cpp/non-constant-format`) has been updated to produce fewer false positives. +* Added dataflow models for the :code:`gettext` function variants. + +C# +"" + +* Added sanitizers for relative URLs, :code:`List.Contains()`, and checking the :code:`.Host` property on an URI to the :code:`cs/web/unvalidated-url-redirection` query. + +Java +"""" + +* The sanitizer for the path injection queries has been improved to handle more cases where :code:`equals` is used to check an exact path match. +* The query :code:`java/unvalidated-url-redirection` now sanitizes results following the same logic as the query :code:`java/ssrf`. URLs where the destination cannot be controlled externally are no longer reported. + +New Queries +~~~~~~~~~~~ + +Golang +"""""" + +* The query "Missing JWT signature check" (:code:`go/missing-jwt-signature-check`) has been promoted from experimental to the main query pack. Its results will now appear by default. This query was originally `submitted as an experimental query by @am0o0 `__. + +Java +"""" + +* Added a new query :code:`java/android/insecure-local-authentication` for finding uses of biometric authentication APIs that do not make use of a :code:`KeyStore`\ -backed key and thus may be bypassed. + +Swift +""""" + +* Added a new experimental query, :code:`swift/unsafe-unpacking`, that detects unpacking user controlled zips without validating the destination file path is within the destination directory. + +Query Metadata Changes +~~~~~~~~~~~~~~~~~~~~~~ + +Java +"""" + +* The :code:`security-severity` score of the query :code:`java/relative-path-command` has been reduced to better adjust it to the specific conditions needed for exploitation. + +Language Libraries +------------------ + +Minor Analysis Improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +C# +"" + +* C# 12: The QL and data flow library now support primary constructors. +* Added a new database relation to store key-value pairs corresponding to compilations. The new relation is used in buildless mode to surface information related to dependency fetching. + +Java +"""" + +* An extension point for sanitizers of the query :code:`java/unvalidated-url-redirection` has been added. + +* Added models for the following packages: + + * java.io + * java.lang + * java.net + * java.net.http + * java.nio.file + * java.util.zip + * javax.servlet + * org.apache.commons.io + * org.apache.hadoop.fs + * org.apache.hadoop.fs.s3a + * org.eclipse.jetty.client + * org.gradle.api.file + +JavaScript/TypeScript +""""""""""""""""""""" + +* The name "certification" is no longer seen as possibly being a certificate, and will therefore no longer be flagged in queries like "clear-text-logging" which look for sensitive data. + +Python +"""""" + +* The name "certification" is no longer seen as possibly being a certificate, and will therefore no longer be flagged in queries like "clear-text-logging" which look for sensitive data. +* Added modeling of the :code:`psycopg` PyPI package as a SQL database library. + +Ruby +"""" + +* Raw output ERB tags of the form :code:`<%== ... %>` are now recognised as cross-site scripting sinks. +* The name "certification" is no longer seen as possibly being a certificate, and will therefore no longer be flagged in queries like "clear-text-logging" which look for sensitive data. + +Swift +""""" + +* The name "certification" is no longer seen as possibly being a certificate, and will therefore no longer be flagged in queries like "clear-text-logging" which look for sensitive data. + +Deprecated APIs +~~~~~~~~~~~~~~~ + +Java +"""" + +* The :code:`PathCreation` class in :code:`PathCreation.qll` has been deprecated. + +New Features +~~~~~~~~~~~~ + +C/C++ +""""" + +* A :code:`getInitialization` predicate was added to the :code:`RangeBasedForStmt` class that yields the C++20-style initializer of the range-based :code:`for` statement when it exists. + +Shared Libraries +---------------- + +Breaking Changes +~~~~~~~~~~~~~~~~ + +Dataflow Analysis +""""""""""""""""" + +* The :code:`edges` predicate contained in :code:`PathGraph` now contains two additional columns for propagating model provenance information. This is primarily an internal change without any impact on any APIs, except for specialised queries making use of :code:`MergePathGraph` in conjunction with custom :code:`PathGraph` implementations. Such queries will need to be updated to reference the two new columns. This is expected to be very rare, as :code:`MergePathGraph` is an advanced feature, but it is a breaking change for any such affected queries. diff --git a/docs/codeql/codeql-overview/codeql-changelog/index.rst b/docs/codeql/codeql-overview/codeql-changelog/index.rst index 2c1de5b5957..a04f37ad9e4 100644 --- a/docs/codeql/codeql-overview/codeql-changelog/index.rst +++ b/docs/codeql/codeql-overview/codeql-changelog/index.rst @@ -11,6 +11,7 @@ A list of queries for each suite and language `is available here `_,``github.com/go-kit/kit*``,,,1 `Iris `_,``github.com/kataras/iris*``,,,1 `Kubernetes `_,"``k8s.io/api*``, ``k8s.io/apimachinery*``",,57, - `Macaron `_,``gopkg.in/macaron*``,,1, + `Macaron `_,``gopkg.in/macaron*``,12,1, `Revel `_,"``github.com/revel/revel*``, ``github.com/robfig/revel*``",,20, `SendGrid `_,``github.com/sendgrid/sendgrid-go*``,,1, `Standard library `_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``",8,578, @@ -35,5 +35,5 @@ Go framework & library support `yaml `_,``gopkg.in/yaml*``,,9, `zap `_,``go.uber.org/zap*``,,11, Others,"``github.com/go-jose/go-jose/$ANYVERSION/jwt``, ``gopkg.in/square/go-jose.v2/jwt``",,8,2 - Totals,,8,871,24 + Totals,,20,871,24 diff --git a/go/extractor/autobuilder/autobuilder.go b/go/extractor/autobuilder/autobuilder.go index 11c49735eaa..eec9ba84c04 100644 --- a/go/extractor/autobuilder/autobuilder.go +++ b/go/extractor/autobuilder/autobuilder.go @@ -70,12 +70,33 @@ func tryBuild(cmd string, args ...string) bool { return res && (!CheckExtracted || checkExtractorRun()) } -// Autobuild attempts to detect build system and run the corresponding command. -func Autobuild() bool { - return tryBuildIfExists("Makefile", "make") || - tryBuildIfExists("makefile", "make") || - tryBuildIfExists("GNUmakefile", "make") || - tryBuildIfExists("build.ninja", "ninja") || - tryBuildIfExists("build", "./build") || - tryBuildIfExists("build.sh", "./build.sh") +// If a project is accompanied by a build script (such as a makefile), then we try executing such +// build scripts to build the project. This type represents pairs of script names to check for +// and the names of corresponding build tools to invoke if those scripts exist. +type BuildScript struct { + Tool string // The name of the command to execute if the build script exists + Filename string // The name of the build script to check for +} + +// An array of build scripts to check for and corresponding commands that we can execute +// if they exist. +var BuildScripts = []BuildScript{ + {Tool: "make", Filename: "Makefile"}, + {Tool: "make", Filename: "makefile"}, + {Tool: "make", Filename: "GNUmakefile"}, + {Tool: "ninja", Filename: "build.ninja"}, + {Tool: "./build", Filename: "build"}, + {Tool: "./build.sh", Filename: "build.sh"}, +} + +// Autobuild attempts to detect build systems based on the presence of build scripts from the +// list in `BuildScripts` and run the corresponding command. This may invoke zero or more +// build scripts in the order given by `BuildScripts`. +func Autobuild() bool { + for _, script := range BuildScripts { + if tryBuildIfExists(script.Filename, script.Tool) { + return true + } + } + return false } diff --git a/go/extractor/autobuilder/build-environment.go b/go/extractor/autobuilder/build-environment.go index 485786ed946..3f03ff922af 100644 --- a/go/extractor/autobuilder/build-environment.go +++ b/go/extractor/autobuilder/build-environment.go @@ -12,7 +12,7 @@ import ( ) const minGoVersion = "1.11" -const maxGoVersion = "1.21" +const maxGoVersion = "1.22" type versionInfo struct { goModVersion string // The version of Go found in the go directive in the `go.mod` file. @@ -267,15 +267,22 @@ func outputEnvironmentJson(version string) { // Get the version of Go to install and output it to stdout as json. func IdentifyEnvironment() { var v versionInfo - buildInfo := project.GetBuildInfo(false) - goVersionInfo := project.TryReadGoDirective(buildInfo) - v.goModVersion, v.goModVersionFound = goVersionInfo.Version, goVersionInfo.Found + workspaces := project.GetWorkspaceInfo(false) + // Remove temporary extractor files (e.g. auto-generated go.mod files) when we are done + defer project.RemoveTemporaryExtractorFiles() + + // Find the greatest Go version required by any of the workspaces. + greatestGoVersion := project.RequiredGoVersion(&workspaces) + v.goModVersion, v.goModVersionFound = greatestGoVersion.Version, greatestGoVersion.Found + + // Find which, if any, version of Go is installed on the system already. v.goEnvVersionFound = toolchain.IsInstalled() if v.goEnvVersionFound { v.goEnvVersion = toolchain.GetEnvGoVersion()[2:] } + // Determine which version of Go we should recommend to install. msg, versionToInstall := getVersionToInstall(v) log.Println(msg) diff --git a/go/extractor/cli/go-autobuilder/go-autobuilder.go b/go/extractor/cli/go-autobuilder/go-autobuilder.go index 0fcbfd4686c..91291c77144 100644 --- a/go/extractor/cli/go-autobuilder/go-autobuilder.go +++ b/go/extractor/cli/go-autobuilder/go-autobuilder.go @@ -56,23 +56,6 @@ Build behavior: fmt.Fprintf(os.Stderr, "Usage:\n\n %s\n", os.Args[0]) } -// Returns the current Go version in semver format, e.g. v1.14.4 -func getEnvGoSemVer() string { - goVersion := toolchain.GetEnvGoVersion() - if !strings.HasPrefix(goVersion, "go") { - log.Fatalf("Expected 'go version' output of the form 'go1.2.3'; got '%s'", goVersion) - } - // Go versions don't follow the SemVer format, but the only exception we normally care about - // is release candidates; so this is a horrible hack to convert e.g. `go1.22rc1` into `go1.22-rc1` - // which is compatible with the SemVer specification - rcIndex := strings.Index(goVersion, "rc") - if rcIndex != -1 { - return semver.Canonical("v"+goVersion[2:rcIndex]) + "-" + goVersion[rcIndex:] - } else { - return semver.Canonical("v" + goVersion[2:]) - } -} - // Returns the import path of the package being built, or "" if it cannot be determined. func getImportPath() (importpath string) { importpath = os.Getenv("LGTM_INDEX_IMPORT_PATH") @@ -177,8 +160,8 @@ func getSourceDir() string { } // fixGoVendorIssues fixes issues with go vendor for go version >= 1.14 -func fixGoVendorIssues(buildInfo *project.BuildInfo, goModVersionFound bool) { - if buildInfo.ModMode == project.ModVendor { +func fixGoVendorIssues(workspace *project.GoWorkspace, goModVersionFound bool) { + if workspace.ModMode == project.ModVendor { // fix go vendor issues with go versions >= 1.14 when no go version is specified in the go.mod // if this is the case, and dependencies were vendored with an old go version (and therefore // do not contain a '## explicit' annotation, the go command will fail and refuse to do any @@ -186,7 +169,7 @@ func fixGoVendorIssues(buildInfo *project.BuildInfo, goModVersionFound bool) { // // we work around this by adding an explicit go version of 1.13, which is the last version // where this is not an issue - if buildInfo.DepMode == project.GoGetWithModules { + if workspace.DepMode == project.GoGetWithModules { if !goModVersionFound { // if the go.mod does not contain a version line modulesTxt, err := os.ReadFile("vendor/modules.txt") @@ -197,7 +180,7 @@ func fixGoVendorIssues(buildInfo *project.BuildInfo, goModVersionFound bool) { log.Println("Adding a version directive to the go.mod file as the modules.txt does not have explicit annotations") if !addVersionToMod("1.13") { log.Println("Failed to add a version to the go.mod file to fix explicitly required package bug; not using vendored dependencies") - buildInfo.ModMode = project.ModMod + workspace.ModMode = project.ModMod } } } @@ -206,9 +189,9 @@ func fixGoVendorIssues(buildInfo *project.BuildInfo, goModVersionFound bool) { } // Determines whether the project needs a GOPATH set up -func getNeedGopath(buildInfo project.BuildInfo, importpath string) bool { +func getNeedGopath(workspace project.GoWorkspace, importpath string) bool { needGopath := true - if buildInfo.DepMode == project.GoGetWithModules { + if workspace.DepMode == project.GoGetWithModules { needGopath = false } // if `LGTM_INDEX_NEED_GOPATH` is set, it overrides the value for `needGopath` inferred above @@ -229,44 +212,46 @@ func getNeedGopath(buildInfo project.BuildInfo, importpath string) bool { } // Try to update `go.mod` and `go.sum` if the go version is >= 1.16. -func tryUpdateGoModAndGoSum(buildInfo project.BuildInfo) { +func tryUpdateGoModAndGoSum(workspace project.GoWorkspace) { // Go 1.16 and later won't automatically attempt to update go.mod / go.sum during package loading, so try to update them here: - if buildInfo.ModMode != project.ModVendor && buildInfo.DepMode == project.GoGetWithModules && semver.Compare(getEnvGoSemVer(), "v1.16") >= 0 { - // stat go.mod and go.sum - goModPath := filepath.Join(buildInfo.BaseDir, "go.mod") - beforeGoModFileInfo, beforeGoModErr := os.Stat(goModPath) - if beforeGoModErr != nil { - log.Println("Failed to stat go.mod before running `go mod tidy -e`") - } - - goSumPath := filepath.Join(buildInfo.BaseDir, "go.sum") - beforeGoSumFileInfo, beforeGoSumErr := os.Stat(goSumPath) - - // run `go mod tidy -e` - cmd := exec.Command("go", "mod", "tidy", "-e") - cmd.Dir = buildInfo.BaseDir - res := util.RunCmd(cmd) - - if !res { - log.Println("Failed to run `go mod tidy -e`") - } else { - if beforeGoModFileInfo != nil { - afterGoModFileInfo, afterGoModErr := os.Stat(goModPath) - if afterGoModErr != nil { - log.Println("Failed to stat go.mod after running `go mod tidy -e`") - } else if afterGoModFileInfo.ModTime().After(beforeGoModFileInfo.ModTime()) { - // if go.mod has been changed then notify the user - log.Println("We have run `go mod tidy -e` and it altered go.mod. You may wish to check these changes into version control. ") - } + if workspace.ModMode != project.ModVendor && workspace.DepMode == project.GoGetWithModules && semver.Compare(toolchain.GetEnvGoSemVer(), "v1.16") >= 0 { + for _, goMod := range workspace.Modules { + // stat go.mod and go.sum + goModPath := goMod.Path + goModDir := filepath.Dir(goModPath) + beforeGoModFileInfo, beforeGoModErr := os.Stat(goModPath) + if beforeGoModErr != nil { + log.Printf("Failed to stat %s before running `go mod tidy -e`\n", goModPath) } - afterGoSumFileInfo, afterGoSumErr := os.Stat(goSumPath) - if afterGoSumErr != nil { - log.Println("Failed to stat go.sum after running `go mod tidy -e`") + goSumPath := filepath.Join(goModDir, "go.sum") + beforeGoSumFileInfo, beforeGoSumErr := os.Stat(goSumPath) + + // run `go mod tidy -e` + cmd := toolchain.TidyModule(goModDir) + res := util.RunCmd(cmd) + + if !res { + log.Printf("Failed to run `go mod tidy -e` in %s\n", goModDir) } else { - if beforeGoSumErr != nil || afterGoSumFileInfo.ModTime().After(beforeGoSumFileInfo.ModTime()) { - // if go.sum has been changed then notify the user - log.Println("We have run `go mod tidy -e` and it altered go.sum. You may wish to check these changes into version control. ") + if beforeGoModFileInfo != nil { + afterGoModFileInfo, afterGoModErr := os.Stat(goModPath) + if afterGoModErr != nil { + log.Printf("Failed to stat %s after running `go mod tidy -e`: %s\n", goModPath, afterGoModErr.Error()) + } else if afterGoModFileInfo.ModTime().After(beforeGoModFileInfo.ModTime()) { + // if go.mod has been changed then notify the user + log.Println("We have run `go mod tidy -e` and it altered go.mod. You may wish to check these changes into version control. ") + } + } + + afterGoSumFileInfo, afterGoSumErr := os.Stat(goSumPath) + if afterGoSumErr != nil { + log.Printf("Failed to stat %s after running `go mod tidy -e`: %s\n", goSumPath, afterGoSumErr.Error()) + } else { + if beforeGoSumErr != nil || afterGoSumFileInfo.ModTime().After(beforeGoSumFileInfo.ModTime()) { + // if go.sum has been changed then notify the user + log.Println("We have run `go mod tidy -e` and it altered go.sum. You may wish to check these changes into version control. ") + } } } } @@ -406,7 +391,7 @@ func buildWithoutCustomCommands(modMode project.ModMode) bool { log.Println("Build failed, continuing to install dependencies.") shouldInstallDependencies = true - } else if util.DepErrors("./...", modMode.ArgsForGoVersion(getEnvGoSemVer())...) { + } else if util.DepErrors("./...", modMode.ArgsForGoVersion(toolchain.GetEnvGoSemVer())...) { log.Println("Dependencies are still not resolving after the build, continuing to install dependencies.") shouldInstallDependencies = true @@ -449,10 +434,10 @@ func buildWithCustomCommands(inst string) { } // Install dependencies using the given dependency installer mode. -func installDependencies(buildInfo project.BuildInfo) { +func installDependencies(workspace project.GoWorkspace) { // automatically determine command to install dependencies var install *exec.Cmd - if buildInfo.DepMode == project.Dep { + if workspace.DepMode == project.Dep { // set up the dep cache if SEMMLE_CACHE is set cacheDir := os.Getenv("SEMMLE_CACHE") if cacheDir != "" { @@ -482,47 +467,80 @@ func installDependencies(buildInfo project.BuildInfo) { install = exec.Command("dep", "ensure", "-v") } log.Println("Installing dependencies using `dep ensure`.") - } else if buildInfo.DepMode == project.Glide { + util.RunCmd(install) + } else if workspace.DepMode == project.Glide { install = exec.Command("glide", "install") log.Println("Installing dependencies using `glide install`") + util.RunCmd(install) } else { - // explicitly set go module support - if buildInfo.DepMode == project.GoGetWithModules { - os.Setenv("GO111MODULE", "on") - } else if buildInfo.DepMode == project.GoGetNoModules { - os.Setenv("GO111MODULE", "off") + if workspace.Modules == nil { + project.InitGoModForLegacyProject(workspace.BaseDir) + workspace.Modules = project.LoadGoModules([]string{filepath.Join(workspace.BaseDir, "go.mod")}) } - // get dependencies - install = exec.Command("go", "get", "-v", "./...") - install.Dir = buildInfo.BaseDir - log.Printf("Installing dependencies using `go get -v ./...` in `%s`.\n", buildInfo.BaseDir) + // get dependencies for all modules + for _, module := range workspace.Modules { + path := filepath.Dir(module.Path) + + if util.DirExists(filepath.Join(path, "vendor")) { + vendor := toolchain.VendorModule(path) + log.Printf("Synchronizing vendor file using `go mod vendor` in %s.\n", path) + util.RunCmd(vendor) + } + + install = exec.Command("go", "get", "-v", "./...") + install.Dir = path + log.Printf("Installing dependencies using `go get -v ./...` in `%s`.\n", path) + util.RunCmd(install) + } } - util.RunCmd(install) } // Run the extractor. -func extract(buildInfo project.BuildInfo) { +func extract(workspace project.GoWorkspace) bool { extractor, err := util.GetExtractorPath() if err != nil { log.Fatalf("Could not determine path of extractor: %v.\n", err) } extractorArgs := []string{} - if buildInfo.DepMode == project.GoGetWithModules { - extractorArgs = append(extractorArgs, buildInfo.ModMode.ArgsForGoVersion(getEnvGoSemVer())...) + if workspace.DepMode == project.GoGetWithModules { + extractorArgs = append(extractorArgs, workspace.ModMode.ArgsForGoVersion(toolchain.GetEnvGoSemVer())...) } - extractorArgs = append(extractorArgs, "./...") - log.Printf("Running extractor command '%s %v' from directory '%s'.\n", extractor, extractorArgs, buildInfo.BaseDir) + if len(workspace.Modules) == 0 { + // There may be no modules if we are using e.g. Dep or Glide + extractorArgs = append(extractorArgs, "./...") + } else { + for _, module := range workspace.Modules { + relModPath, relErr := filepath.Rel(workspace.BaseDir, filepath.Dir(module.Path)) + + if relErr != nil { + log.Printf( + "Unable to make module path %s relative to workspace base dir %s: %s\n", + filepath.Dir(module.Path), workspace.BaseDir, relErr.Error()) + } else { + if relModPath != "." { + extractorArgs = append(extractorArgs, "."+string(os.PathSeparator)+relModPath+"/...") + } else { + extractorArgs = append(extractorArgs, relModPath+"/...") + } + } + } + } + + log.Printf("Running extractor command '%s %v' from directory '%s'.\n", extractor, extractorArgs, workspace.BaseDir) cmd := exec.Command(extractor, extractorArgs...) - cmd.Dir = buildInfo.BaseDir + cmd.Dir = workspace.BaseDir cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err = cmd.Run() if err != nil { - log.Fatalf("Extraction failed: %s\n", err.Error()) + log.Printf("Extraction failed for %s: %s\n", workspace.BaseDir, err.Error()) + return false } + + return true } // Build the project and run the extractor. @@ -536,75 +554,118 @@ func installDependenciesAndBuild() { // determine how to install dependencies and whether a GOPATH needs to be set up before // extraction - buildInfo := project.GetBuildInfo(true) + workspaces := project.GetWorkspaceInfo(true) if _, present := os.LookupEnv("GO111MODULE"); !present { os.Setenv("GO111MODULE", "auto") } - goVersionInfo := project.TryReadGoDirective(buildInfo) + // Remove temporary extractor files (e.g. auto-generated go.mod files) when we are done + defer project.RemoveTemporaryExtractorFiles() + + // If there is only one workspace and it needs a GOPATH set up, which may be the case if + // we don't use Go modules, then we move the repository to a temporary directory and set + // the GOPATH to it. + if len(workspaces) == 1 { + workspace := workspaces[0] + + importpath := getImportPath() + needGopath := getNeedGopath(workspace, importpath) + + inLGTM := os.Getenv("LGTM_SRC") != "" || os.Getenv("LGTM_INDEX_NEED_GOPATH") != "" + + if inLGTM && needGopath { + paths := moveToTemporaryGopath(srcdir, importpath) + + // schedule restoring the contents of newdir to their original location after this function completes: + defer restoreRepoLayout(paths.newdir, paths.files, filepath.Base(paths.scratch), srcdir) + + pt := createPathTransformerFile(paths.newdir) + defer os.Remove(pt.Name()) + + writePathTransformerFile(pt, paths.realSrc, paths.root, paths.newdir) + setGopath(paths.root) + } + } + + // Find the greatest version of Go that is required by the workspaces to check it against the version + // of Go that is installed on the system. + greatestGoVersion := project.RequiredGoVersion(&workspaces) // This diagnostic is not required if the system Go version is 1.21 or greater, since the // Go tooling should install required Go versions as needed. - if semver.Compare(getEnvGoSemVer(), "v1.21.0") < 0 && goVersionInfo.Found && semver.Compare("v"+goVersionInfo.Version, getEnvGoSemVer()) > 0 { - diagnostics.EmitNewerGoVersionNeeded(getEnvGoSemVer(), "v"+goVersionInfo.Version) + if semver.Compare(toolchain.GetEnvGoSemVer(), "v1.21.0") < 0 && greatestGoVersion.Found && semver.Compare("v"+greatestGoVersion.Version, toolchain.GetEnvGoSemVer()) > 0 { + diagnostics.EmitNewerGoVersionNeeded(toolchain.GetEnvGoSemVer(), "v"+greatestGoVersion.Version) if val, _ := os.LookupEnv("GITHUB_ACTIONS"); val == "true" { log.Printf( - "The go.mod file requires version %s of Go, but version %s is installed. Consider adding an actions/setup-go step to your workflow.\n", - "v"+goVersionInfo.Version, - getEnvGoSemVer()) + "A go.mod file requires version %s of Go, but version %s is installed. Consider adding an actions/setup-go step to your workflow.\n", + "v"+greatestGoVersion.Version, + toolchain.GetEnvGoSemVer()) } } - fixGoVendorIssues(&buildInfo, goVersionInfo.Found) + // Track all projects which could not be extracted successfully + var unsuccessfulProjects = []string{} - tryUpdateGoModAndGoSum(buildInfo) + // Attempt to extract all workspaces; we will tolerate individual extraction failures here + for i, workspace := range workspaces { + goVersionInfo := workspace.RequiredGoVersion() - importpath := getImportPath() - needGopath := getNeedGopath(buildInfo, importpath) + fixGoVendorIssues(&workspace, goVersionInfo.Found) - inLGTM := os.Getenv("LGTM_SRC") != "" || os.Getenv("LGTM_INDEX_NEED_GOPATH") != "" + tryUpdateGoModAndGoSum(workspace) - if inLGTM && needGopath { - paths := moveToTemporaryGopath(srcdir, importpath) - - // schedule restoring the contents of newdir to their original location after this function completes: - defer restoreRepoLayout(paths.newdir, paths.files, filepath.Base(paths.scratch), srcdir) - - pt := createPathTransformerFile(paths.newdir) - defer os.Remove(pt.Name()) - - writePathTransformerFile(pt, paths.realSrc, paths.root, paths.newdir) - setGopath(paths.root) - } - - // check whether an explicit dependency installation command was provided - inst := util.Getenv("CODEQL_EXTRACTOR_GO_BUILD_COMMAND", "LGTM_INDEX_BUILD_COMMAND") - shouldInstallDependencies := false - if inst == "" { - shouldInstallDependencies = buildWithoutCustomCommands(buildInfo.ModMode) - } else { - buildWithCustomCommands(inst) - } - - if buildInfo.ModMode == project.ModVendor { - // test if running `go` with -mod=vendor works, and if it doesn't, try to fallback to -mod=mod - // or not set if the go version < 1.14. Note we check this post-build in case the build brings - // the vendor directory up to date. - if !checkVendor() { - buildInfo.ModMode = project.ModMod - log.Println("The vendor directory is not consistent with the go.mod; not using vendored dependencies.") - } - } - - if shouldInstallDependencies { - if buildInfo.ModMode == project.ModVendor { - log.Printf("Skipping dependency installation because a Go vendor directory was found.") + // check whether an explicit dependency installation command was provided + inst := util.Getenv("CODEQL_EXTRACTOR_GO_BUILD_COMMAND", "LGTM_INDEX_BUILD_COMMAND") + shouldInstallDependencies := false + if inst == "" { + shouldInstallDependencies = buildWithoutCustomCommands(workspace.ModMode) } else { - installDependencies(buildInfo) + buildWithCustomCommands(inst) + } + + if workspace.ModMode == project.ModVendor { + // test if running `go` with -mod=vendor works, and if it doesn't, try to fallback to -mod=mod + // or not set if the go version < 1.14. Note we check this post-build in case the build brings + // the vendor directory up to date. + if !checkVendor() { + workspace.ModMode = project.ModMod + log.Println("The vendor directory is not consistent with the go.mod; not using vendored dependencies.") + } + } + + if shouldInstallDependencies { + if workspace.ModMode == project.ModVendor { + log.Printf("Skipping dependency installation because a Go vendor directory was found.") + } else { + installDependencies(workspace) + } + } + + workspaces[i].Extracted = extract(workspace) + + if !workspaces[i].Extracted { + unsuccessfulProjects = append(unsuccessfulProjects, workspace.BaseDir) } } - extract(buildInfo) + // If all projects could not be extracted successfully, we fail the overall extraction. + if len(unsuccessfulProjects) == len(workspaces) { + log.Fatalln("Extraction failed for all discovered Go projects.") + } + + // If there is at least one project that could not be extracted successfully, + // emit a diagnostic that reports which projects we could not extract successfully. + // We only consider this a warning, since there may be test projects etc. which + // do not matter if they cannot be extracted successfully. + if len(unsuccessfulProjects) > 0 { + log.Printf( + "Warning: extraction failed for %d project(s): %s\n", + len(unsuccessfulProjects), + strings.Join(unsuccessfulProjects, ", ")) + diagnostics.EmitExtractionFailedForProjects(unsuccessfulProjects) + } else { + log.Printf("Success: extraction succeeded for all %d discovered project(s).\n", len(workspaces)) + } } func main() { diff --git a/go/extractor/diagnostics/diagnostics.go b/go/extractor/diagnostics/diagnostics.go index 6a3c4175318..c02af8afb92 100644 --- a/go/extractor/diagnostics/diagnostics.go +++ b/go/extractor/diagnostics/diagnostics.go @@ -493,3 +493,18 @@ func EmitNewerSystemGoRequired(requiredVersion string) { noLocation, ) } + +func EmitExtractionFailedForProjects(path []string) { + emitDiagnostic( + "go/autobuilder/extraction-failed-for-project", + fmt.Sprintf("Unable to extract %d Go projects", len(path)), + fmt.Sprintf( + "The following %d Go project%s could not be extracted successfully:\n\n`%s`\n", + len(path), + plural(len(path), "", "s"), + strings.Join(path, "`, `")), + severityWarning, + fullVisibility, + noLocation, + ) +} diff --git a/go/extractor/go.mod b/go/extractor/go.mod index c1aa66b49b3..9dafc31bbbe 100644 --- a/go/extractor/go.mod +++ b/go/extractor/go.mod @@ -1,6 +1,6 @@ module github.com/github/codeql-go/extractor -go 1.21 +go 1.22.0 require ( golang.org/x/mod v0.15.0 diff --git a/go/extractor/go.work b/go/extractor/go.work new file mode 100644 index 00000000000..96b89a39cb9 --- /dev/null +++ b/go/extractor/go.work @@ -0,0 +1,3 @@ +go 1.22.0 + +use . diff --git a/go/extractor/go.work.sum b/go/extractor/go.work.sum new file mode 100644 index 00000000000..e3856dfbfa5 --- /dev/null +++ b/go/extractor/go.work.sum @@ -0,0 +1,5 @@ +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ= diff --git a/go/extractor/project/project.go b/go/extractor/project/project.go index baef8bdefb8..187389ecd55 100644 --- a/go/extractor/project/project.go +++ b/go/extractor/project/project.go @@ -5,22 +5,104 @@ import ( "os" "path/filepath" "regexp" + "slices" "sort" "strings" "github.com/github/codeql-go/extractor/diagnostics" + "github.com/github/codeql-go/extractor/toolchain" "github.com/github/codeql-go/extractor/util" + "golang.org/x/mod/modfile" "golang.org/x/mod/semver" ) -func getDirs(paths []string) []string { - dirs := make([]string, len(paths)) - for i, path := range paths { - dirs[i] = filepath.Dir(path) - } - return dirs +// DependencyInstallerMode is an enum describing how dependencies should be installed +type DependencyInstallerMode int + +const ( + // GoGetNoModules represents dependency installation using `go get` without modules + GoGetNoModules DependencyInstallerMode = iota + // GoGetWithModules represents dependency installation using `go get` with modules + GoGetWithModules + // Dep represent dependency installation using `dep ensure` + Dep + // Glide represents dependency installation using `glide install` + Glide +) + +// Represents information about a `go.mod` file: this is at least the path to the `go.mod` file, +// plus the parsed contents of the file, if available. +type GoModule struct { + Path string // The path to the `go.mod` file + Module *modfile.File // The parsed contents of the `go.mod` file } +// Represents information about a Go project workspace: this may either be a folder containing +// a `go.work` file or a collection of `go.mod` files. +type GoWorkspace struct { + BaseDir string // The base directory for this workspace + WorkspaceFile *modfile.WorkFile // The `go.work` file for this workspace + Modules []*GoModule // A list of `go.mod` files + DepMode DependencyInstallerMode // A value indicating how to install dependencies for this workspace + ModMode ModMode // A value indicating which module mode to use for this workspace + Extracted bool // A value indicating whether this workspace was extracted successfully +} + +// Represents a nullable version string. +type GoVersionInfo struct { + // The version string, if any + Version string + // A value indicating whether a version string was found + Found bool +} + +// Determines the version of Go that is required by this workspace. This is, in order of preference: +// 1. The Go version specified in the `go.work` file, if any. +// 2. The greatest Go version specified in any `go.mod` file, if any. +func (workspace *GoWorkspace) RequiredGoVersion() GoVersionInfo { + if workspace.WorkspaceFile != nil && workspace.WorkspaceFile.Go != nil { + // If we have parsed a `go.work` file, return the version number from it. + return GoVersionInfo{Version: workspace.WorkspaceFile.Go.Version, Found: true} + } else if workspace.Modules != nil && len(workspace.Modules) > 0 { + // Otherwise, if we have `go.work` files, find the greatest Go version in those. + var greatestVersion string = "" + for _, module := range workspace.Modules { + if module.Module != nil && module.Module.Go != nil { + // If we have parsed the file, retrieve the version number we have already obtained. + if greatestVersion == "" || semver.Compare("v"+module.Module.Go.Version, "v"+greatestVersion) > 0 { + greatestVersion = module.Module.Go.Version + } + } else { + modVersion := tryReadGoDirective(module.Path) + if modVersion.Found && (greatestVersion == "" || semver.Compare("v"+modVersion.Version, "v"+greatestVersion) > 0) { + greatestVersion = modVersion.Version + } + } + } + + // If we have found some version, return it. + if greatestVersion != "" { + return GoVersionInfo{Version: greatestVersion, Found: true} + } + } + + return GoVersionInfo{Version: "", Found: false} +} + +// Finds the greatest Go version required by any of the given `workspaces`. +// Returns a `GoVersionInfo` value with `Found: false` if no version information is available. +func RequiredGoVersion(workspaces *[]GoWorkspace) GoVersionInfo { + greatestGoVersion := GoVersionInfo{Version: "", Found: false} + for _, workspace := range *workspaces { + goVersionInfo := workspace.RequiredGoVersion() + if goVersionInfo.Found && (!greatestGoVersion.Found || semver.Compare("v"+goVersionInfo.Version, "v"+greatestGoVersion.Version) > 0) { + greatestGoVersion = goVersionInfo + } + } + return greatestGoVersion +} + +// Determines whether any of the directory paths in the input are nested. func checkDirsNested(inputDirs []string) (string, bool) { // replace "." with "" so that we can check if all the paths are nested dirs := make([]string, len(inputDirs)) @@ -42,72 +124,365 @@ func checkDirsNested(inputDirs []string) (string, bool) { return dirs[0], true } -// Returns the directory to run the go build in and whether to use a go.mod -// file. -func findGoModFiles(emitDiagnostics bool) (baseDir string, useGoMod bool) { - goModPaths := util.FindAllFilesWithName(".", "go.mod", "vendor") - if len(goModPaths) == 0 { - baseDir = "." - useGoMod = false +// A list of files we created that should be removed after we are done. +var filesToRemove []string = []string{} + +// Try to initialize a go.mod file for projects that do not already have one. +func InitGoModForLegacyProject(path string) { + log.Printf("The code in %s seems to be missing a go.mod file. Attempting to initialize one...\n", path) + + modInit := toolchain.InitModule(path) + + if !util.RunCmd(modInit) { + log.Printf("Failed to initialize go.mod file for this project.") return } - goModDirs := getDirs(goModPaths) - if util.AnyGoFilesOutsideDirs(".", goModDirs...) { + + // Add the go.mod file to a list of files we should remove later. + filesToRemove = append(filesToRemove, filepath.Join(path, "go.mod")) + + modTidy := toolchain.TidyModule(path) + out, err := modTidy.CombinedOutput() + log.Println(string(out)) + + if err != nil { + log.Printf("Failed to determine module requirements for this project.") + } + + if strings.Contains(string(out), "is relative, but relative import paths are not supported in module mode") { + diagnostics.EmitRelativeImportPaths() + } +} + +// Attempts to remove all files that we created. +func RemoveTemporaryExtractorFiles() { + for _, path := range filesToRemove { + err := os.Remove(path) + if err != nil { + log.Printf("Unable to remove file we created at %s: %s\n", path, err.Error()) + } + } + + filesToRemove = []string{} +} + +// Find all go.work files in the working directory and its subdirectories +func findGoWorkFiles() []string { + return util.FindAllFilesWithName(".", "go.work", "vendor") +} + +// Find all go.mod files in the specified directory and its subdirectories +func findGoModFiles(root string) []string { + return util.FindAllFilesWithName(root, "go.mod", "vendor") +} + +// Given a list of `go.mod` file paths, try to parse them all. The resulting array of `GoModule` objects +// will be the same length as the input array and the objects will contain at least the `go.mod` path. +// If parsing the corresponding file is successful, then the parsed contents will also be available. +func LoadGoModules(goModFilePaths []string) []*GoModule { + results := make([]*GoModule, len(goModFilePaths)) + + for i, goModFilePath := range goModFilePaths { + results[i] = new(GoModule) + results[i].Path = goModFilePath + + modFileSrc, err := os.ReadFile(goModFilePath) + + if err != nil { + log.Printf("Unable to read %s: %s.\n", goModFilePath, err.Error()) + continue + } + + modFile, err := modfile.ParseLax(goModFilePath, modFileSrc, nil) + + if err != nil { + log.Printf("Unable to parse %s: %s.\n", goModFilePath, err.Error()) + continue + } + + results[i].Module = modFile + } + + return results +} + +// Given a path to a `go.work` file, this function attempts to parse the `go.work` file. If unsuccessful, +// we attempt to discover `go.mod` files within subdirectories of the directory containing the `go.work` +// file ourselves. +func discoverWorkspace(workFilePath string) GoWorkspace { + log.Printf("Loading %s...\n", workFilePath) + baseDir := filepath.Dir(workFilePath) + workFileSrc, err := os.ReadFile(workFilePath) + + if err != nil { + // We couldn't read the `go.work` file for some reason; let's try to find `go.mod` files ourselves + log.Printf("Unable to read %s, falling back to finding `go.mod` files manually:\n%s\n", workFilePath, err.Error()) + + goModFilePaths := findGoModFiles(baseDir) + log.Printf("Discovered the following Go modules in %s:\n%s\n", baseDir, strings.Join(goModFilePaths, "\n")) + + return GoWorkspace{ + BaseDir: baseDir, + Modules: LoadGoModules(goModFilePaths), + DepMode: GoGetWithModules, + ModMode: getModMode(GoGetWithModules, baseDir), + } + } + + workFile, err := modfile.ParseWork(workFilePath, workFileSrc, nil) + + if err != nil { + // The `go.work` file couldn't be parsed for some reason; let's try to find `go.mod` files ourselves + log.Printf("Unable to parse %s, falling back to finding `go.mod` files manually:\n%s\n", workFilePath, err.Error()) + + goModFilePaths := findGoModFiles(baseDir) + log.Printf("Discovered the following Go modules in %s:\n%s\n", baseDir, strings.Join(goModFilePaths, "\n")) + + return GoWorkspace{ + BaseDir: baseDir, + Modules: LoadGoModules(goModFilePaths), + DepMode: GoGetWithModules, + ModMode: getModMode(GoGetWithModules, baseDir), + } + } + + // Get the paths of all of the `go.mod` files that we read from the `go.work` file. + goModFilePaths := make([]string, len(workFile.Use)) + + for i, use := range workFile.Use { + if filepath.IsAbs(use.Path) { + // TODO: This case might be problematic for some other logic (e.g. stray file detection) + goModFilePaths[i] = filepath.Join(use.Path, "go.mod") + } else { + goModFilePaths[i] = filepath.Join(filepath.Dir(workFilePath), use.Path, "go.mod") + } + } + + log.Printf("%s uses the following Go modules:\n%s\n", workFilePath, strings.Join(goModFilePaths, "\n")) + + return GoWorkspace{ + BaseDir: baseDir, + WorkspaceFile: workFile, + Modules: LoadGoModules(goModFilePaths), + DepMode: GoGetWithModules, + ModMode: ModReadonly, // Workspaces only support "readonly" + } +} + +// Analyse the working directory to discover workspaces. +func discoverWorkspaces(emitDiagnostics bool) []GoWorkspace { + // Try to find any `go.work` files which may exist in the working directory. + goWorkFiles := findGoWorkFiles() + + if len(goWorkFiles) == 0 { + // There is no `go.work` file. Find all `go.mod` files in the working directory. + log.Println("Found no go.work files in the workspace; looking for go.mod files...") + + goModFiles := findGoModFiles(".") + + // Return a separate workspace for each `go.mod` file that we found. + results := make([]GoWorkspace, len(goModFiles)) + + for i, goModFile := range goModFiles { + results[i] = GoWorkspace{ + BaseDir: filepath.Dir(goModFile), + Modules: LoadGoModules([]string{goModFile}), + DepMode: GoGetWithModules, + ModMode: getModMode(GoGetWithModules, filepath.Dir(goModFile)), + } + } + + return results + } else { + // We have found `go.work` files, try to load them all. + log.Printf("Found go.work file(s) in: %s.\n", strings.Join(goWorkFiles, ", ")) + + if emitDiagnostics { + diagnostics.EmitGoWorkFound(goWorkFiles) + } + + results := make([]GoWorkspace, len(goWorkFiles)) + for i, workFilePath := range goWorkFiles { + results[i] = discoverWorkspace(workFilePath) + } + + // Add all stray `go.mod` files (i.e. those not referenced by `go.work` files) + // as separate workspaces. + goModFiles := findGoModFiles(".") + + for _, goModFile := range goModFiles { + // Check to see whether we already have this module file under an existing workspace. + found := false + for _, workspace := range results { + if workspace.Modules == nil { + break + } + + for _, module := range workspace.Modules { + if module.Path == goModFile { + found = true + break + } + } + + if found { + break + } + } + + // If not, add it to the array. + if !found { + log.Printf("Module %s is not referenced by any go.work file; adding it separately.\n", goModFile) + results = append(results, GoWorkspace{ + BaseDir: filepath.Dir(goModFile), + Modules: LoadGoModules([]string{goModFile}), + DepMode: GoGetWithModules, + ModMode: getModMode(GoGetWithModules, filepath.Dir(goModFile)), + }) + } + } + + return results + } +} + +// Discovers Go workspaces in the current working directory. +// Returns an array of Go workspaces and the total number of module files which we discovered. +func getBuildRoots(emitDiagnostics bool) (goWorkspaces []GoWorkspace, totalModuleFiles int) { + goWorkspaces = discoverWorkspaces(emitDiagnostics) + + // Determine the total number of `go.mod` files that we discovered. + totalModuleFiles = 0 + + for _, goWorkspace := range goWorkspaces { + totalModuleFiles += len(goWorkspace.Modules) + } + + // If there are no `go.mod` files at all, create one in line with https://go.dev/blog/migrating-to-go-modules + if totalModuleFiles == 0 { + // Check for other, legacy package managers + if util.FileExists("Gopkg.toml") { + if emitDiagnostics { + diagnostics.EmitGopkgTomlFound() + } + log.Println("Found Gopkg.toml, using dep instead of go get") + goWorkspaces = []GoWorkspace{{ + BaseDir: ".", + DepMode: Dep, + ModMode: ModUnset, + }} + totalModuleFiles = 0 + return + } + + if util.FileExists("glide.yaml") { + if emitDiagnostics { + diagnostics.EmitGlideYamlFound() + } + log.Println("Found glide.yaml, using Glide instead of go get") + goWorkspaces = []GoWorkspace{{ + BaseDir: ".", + DepMode: Glide, + ModMode: ModUnset, + }} + totalModuleFiles = 0 + return + } + + // If we have no `go.mod` files, then the project appears to be a legacy project without + // a `go.mod` file. Check that there are actually Go source files before initializing a module + // so that we correctly fail the extraction later. + if !util.FindGoFiles(".") { + goWorkspaces = []GoWorkspace{{ + BaseDir: ".", + DepMode: GoGetNoModules, + ModMode: ModUnset, + }} + totalModuleFiles = 0 + return + } + + goWorkspaces = []GoWorkspace{{ + BaseDir: ".", + DepMode: GoGetNoModules, + ModMode: getModMode(GoGetWithModules, "."), + }} + totalModuleFiles = 0 + return + } + + // Get the paths to all `go.mod` files + i := 0 + goModPaths := make([]string, totalModuleFiles) + + for _, goWorkspace := range goWorkspaces { + for _, goModule := range goWorkspace.Modules { + goModPaths[i] = goModule.Path + i++ + } + } + + goModDirs := util.GetParentDirs(goModPaths) + straySourceFiles := util.GoFilesOutsideDirs(".", goModDirs...) + if len(straySourceFiles) > 0 { if emitDiagnostics { diagnostics.EmitGoFilesOutsideGoModules(goModPaths) } - baseDir = "." - useGoMod = false + + // We need to initialise Go modules for the stray source files. Our goal is to initialise + // as few Go modules as possible, in locations which do not overlap with existing Go + // modules. + for _, straySourceFile := range straySourceFiles { + path := "." + components := strings.Split(filepath.Dir(straySourceFile), string(os.PathSeparator)) + + for _, component := range components { + path = filepath.Join(path, component) + + // Try to initialize a `go.mod` file automatically for the stray source files. + if !slices.Contains(goModDirs, path) { + goWorkspaces = append(goWorkspaces, GoWorkspace{ + BaseDir: path, + DepMode: GoGetNoModules, + ModMode: ModUnset, + }) + goModDirs = append(goModDirs, path) + break + } + } + } + return } - if len(goModPaths) > 1 { - // currently not supported - baseDir = "." - commonRoot, nested := checkDirsNested(goModDirs) - if nested && commonRoot == "" { - useGoMod = true - } else { - useGoMod = false - } - if emitDiagnostics { + + // If we are emitted diagnostics, report some details about the workspace structure. + if emitDiagnostics { + if totalModuleFiles > 1 { + _, nested := checkDirsNested(goModDirs) + if nested { diagnostics.EmitMultipleGoModFoundNested(goModPaths) } else { diagnostics.EmitMultipleGoModFoundNotNested(goModPaths) } - } - return - } - if emitDiagnostics { - if goModDirs[0] == "." { - diagnostics.EmitSingleRootGoModFound(goModPaths[0]) - } else { - diagnostics.EmitSingleNonRootGoModFound(goModPaths[0]) + } else if totalModuleFiles == 1 { + if goModDirs[0] == "." { + diagnostics.EmitSingleRootGoModFound(goModPaths[0]) + } else { + diagnostics.EmitSingleNonRootGoModFound(goModPaths[0]) + } } } - baseDir = goModDirs[0] - useGoMod = true + return } -// DependencyInstallerMode is an enum describing how dependencies should be installed -type DependencyInstallerMode int - -const ( - // GoGetNoModules represents dependency installation using `go get` without modules - GoGetNoModules DependencyInstallerMode = iota - // GoGetWithModules represents dependency installation using `go get` with modules - GoGetWithModules - // Dep represent dependency installation using `dep ensure` - Dep - // Glide represents dependency installation using `glide install` - Glide -) - -// Returns the appropriate DependencyInstallerMode for the current project -func getDepMode(emitDiagnostics bool) (DependencyInstallerMode, string) { - bazelPaths := util.FindAllFilesWithName(".", "BUILD", "vendor") - bazelPaths = append(bazelPaths, util.FindAllFilesWithName(".", "BUILD.bazel", "vendor")...) +// Finds Go workspaces in the current working directory. +func GetWorkspaceInfo(emitDiagnostics bool) []GoWorkspace { + bazelPaths := slices.Concat( + util.FindAllFilesWithName(".", "BUILD", "vendor"), + util.FindAllFilesWithName(".", "BUILD.bazel", "vendor"), + ) if len(bazelPaths) > 0 { // currently not supported if emitDiagnostics { @@ -115,36 +490,10 @@ func getDepMode(emitDiagnostics bool) (DependencyInstallerMode, string) { } } - goWorkPaths := util.FindAllFilesWithName(".", "go.work", "vendor") - if len(goWorkPaths) > 0 { - // currently not supported - if emitDiagnostics { - diagnostics.EmitGoWorkFound(goWorkPaths) - } - } + goWorkspaces, totalModuleFiles := getBuildRoots(emitDiagnostics) + log.Printf("Found %d go.mod file(s).\n", totalModuleFiles) - baseDir, useGoMod := findGoModFiles(emitDiagnostics) - if useGoMod { - log.Println("Found go.mod, enabling go modules") - return GoGetWithModules, baseDir - } - - if util.FileExists("Gopkg.toml") { - if emitDiagnostics { - diagnostics.EmitGopkgTomlFound() - } - log.Println("Found Gopkg.toml, using dep instead of go get") - return Dep, "." - } - - if util.FileExists("glide.yaml") { - if emitDiagnostics { - diagnostics.EmitGlideYamlFound() - } - log.Println("Found glide.yaml, using Glide instead of go get") - return Glide, "." - } - return GoGetNoModules, "." + return goWorkspaces } // ModMode corresponds to the possible values of the -mod flag for the Go compiler @@ -194,38 +543,18 @@ func getModMode(depMode DependencyInstallerMode, baseDir string) ModMode { return ModUnset } -type BuildInfo struct { - DepMode DependencyInstallerMode - ModMode ModMode - BaseDir string -} - -func GetBuildInfo(emitDiagnostics bool) BuildInfo { - depMode, baseDir := getDepMode(true) - modMode := getModMode(depMode, baseDir) - return BuildInfo{depMode, modMode, baseDir} -} - -type GoVersionInfo struct { - // The version string, if any - Version string - // A value indicating whether a version string was found - Found bool -} - // Tries to open `go.mod` and read a go directive, returning the version and whether it was found. -func TryReadGoDirective(buildInfo BuildInfo) GoVersionInfo { - if buildInfo.DepMode == GoGetWithModules { - versionRe := regexp.MustCompile(`(?m)^go[ \t\r]+([0-9]+\.[0-9]+(\.[0-9]+)?)$`) - goMod, err := os.ReadFile(filepath.Join(buildInfo.BaseDir, "go.mod")) - if err != nil { - log.Println("Failed to read go.mod to check for missing Go version") - } else { - matches := versionRe.FindSubmatch(goMod) - if matches != nil { - if len(matches) > 1 { - return GoVersionInfo{string(matches[1]), true} - } +// The version string is returned in the "1.2.3" format. +func tryReadGoDirective(path string) GoVersionInfo { + versionRe := regexp.MustCompile(`(?m)^go[ \t\r]+([0-9]+\.[0-9]+(\.[0-9]+)?)$`) + goMod, err := os.ReadFile(path) + if err != nil { + log.Println("Failed to read go.mod to check for missing Go version") + } else { + matches := versionRe.FindSubmatch(goMod) + if matches != nil { + if len(matches) > 1 { + return GoVersionInfo{string(matches[1]), true} } } } diff --git a/go/extractor/toolchain/toolchain.go b/go/extractor/toolchain/toolchain.go index 01e35bc177b..38abfd43874 100644 --- a/go/extractor/toolchain/toolchain.go +++ b/go/extractor/toolchain/toolchain.go @@ -6,6 +6,8 @@ import ( "os" "os/exec" "strings" + + "golang.org/x/mod/semver" ) // Check if Go is installed in the environment. @@ -36,6 +38,23 @@ func GetEnvGoVersion() string { return goVersion } +// Returns the current Go version in semver format, e.g. v1.14.4 +func GetEnvGoSemVer() string { + goVersion := GetEnvGoVersion() + if !strings.HasPrefix(goVersion, "go") { + log.Fatalf("Expected 'go version' output of the form 'go1.2.3'; got '%s'", goVersion) + } + // Go versions don't follow the SemVer format, but the only exception we normally care about + // is release candidates; so this is a horrible hack to convert e.g. `go1.22rc1` into `go1.22-rc1` + // which is compatible with the SemVer specification + rcIndex := strings.Index(goVersion, "rc") + if rcIndex != -1 { + return semver.Canonical("v"+goVersion[2:rcIndex]) + "-" + goVersion[rcIndex:] + } else { + return semver.Canonical("v" + goVersion[2:]) + } +} + // The 'go version' command may output warnings on separate lines before // the actual version string is printed. This function parses the output // to retrieve just the version string. @@ -47,3 +66,29 @@ func parseGoVersion(data string) string { } return strings.Fields(lastLine)[2] } + +// Returns a value indicating whether the system Go toolchain supports workspaces. +func SupportsWorkspaces() bool { + return semver.Compare(GetEnvGoSemVer(), "v1.18.0") >= 0 +} + +// Run `go mod tidy -e` in the directory given by `path`. +func TidyModule(path string) *exec.Cmd { + cmd := exec.Command("go", "mod", "tidy", "-e") + cmd.Dir = path + return cmd +} + +// Run `go mod init` in the directory given by `path`. +func InitModule(path string) *exec.Cmd { + modInit := exec.Command("go", "mod", "init", "codeql/auto-project") + modInit.Dir = path + return modInit +} + +// Constructs a command to run `go mod vendor -e` in the directory given by `path`. +func VendorModule(path string) *exec.Cmd { + modVendor := exec.Command("go", "mod", "vendor", "-e") + modVendor.Dir = path + return modVendor +} diff --git a/go/extractor/util/util.go b/go/extractor/util/util.go index 313c000d30d..b5b28089e78 100644 --- a/go/extractor/util/util.go +++ b/go/extractor/util/util.go @@ -10,6 +10,7 @@ import ( "os/exec" "path/filepath" "runtime" + "slices" "strings" ) @@ -204,13 +205,13 @@ func RunCmd(cmd *exec.Cmd) bool { in, _ := cmd.StdinPipe() err := cmd.Start() if err != nil { - log.Printf("Running %s failed, continuing anyway: %s\n", cmd.Path, err.Error()) + log.Printf("Running %s %v failed, continuing anyway: %s\n", cmd.Path, cmd.Args, err.Error()) return false } in.Close() err = cmd.Wait() if err != nil { - log.Printf("Running %s failed, continuing anyway: %s\n", cmd.Path, err.Error()) + log.Printf("Running %s %v failed, continuing anyway: %s\n", cmd.Path, cmd.Args, err.Error()) return false } @@ -319,24 +320,33 @@ func FindAllFilesWithName(root string, name string, dirsToSkip ...string) []stri return paths } -func AnyGoFilesOutsideDirs(root string, dirsToSkip ...string) bool { - found := false +// Returns an array of any Go source files in locations which do not have a `go.mod` +// file in the same directory or higher up in the file hierarchy, relative to the `root`. +func GoFilesOutsideDirs(root string, dirsToSkip ...string) []string { + result := []string{} + filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } - if d.IsDir() { - for _, dirToSkip := range dirsToSkip { - if path == dirToSkip { - return filepath.SkipDir - } - } + if d.IsDir() && slices.Contains(dirsToSkip, path) { + return filepath.SkipDir } if filepath.Ext(d.Name()) == ".go" { - found = true - return filepath.SkipAll + log.Printf("Found stray Go source file in %s.\n", path) + result = append(result, path) } return nil }) - return found + + return result +} + +// For every file path in the input array, return the parent directory. +func GetParentDirs(paths []string) []string { + dirs := make([]string, len(paths)) + for i, path := range paths { + dirs[i] = filepath.Dir(path) + } + return dirs } diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.expected b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.expected new file mode 100644 index 00000000000..abc02314890 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.expected @@ -0,0 +1,4 @@ +extractedFiles +| work/subdir/go.mod:0:0:0:0 | work/subdir/go.mod | +| work/subdir/test.go:0:0:0:0 | work/subdir/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.py b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.py index 778af4464c7..23de1b1600a 100644 --- a/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.py +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.py @@ -10,7 +10,7 @@ from diagnostics_test_utils import * goPath = os.path.join(os.path.abspath(os.getcwd()), ".go") os.environ['GOPATH'] = goPath os.environ['LGTM_INDEX_IMPORT_PATH'] = "test" -run_codeql_database_create([], lang="go", source="work", db=None, runFunction=runUnsuccessfully) +run_codeql_database_create([], lang="go", source="work") check_diagnostics() diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.ql b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.ql new file mode 100644 index 00000000000..459a4301560 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/go-files-found-not-processed/test.ql @@ -0,0 +1,8 @@ +import go +import semmle.go.DiagnosticsReporting + +query predicate extractedFiles(File f) { any() } + +from string msg, int sev +where reportableDiagnostics(_, msg, sev) +select msg, sev diff --git a/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/test.py b/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/test.py index 21a6cd40ef7..841351c4f67 100644 --- a/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/test.py +++ b/go/ql/integration-tests/all-platforms/go/diagnostics/unsupported-relative-path/test.py @@ -10,7 +10,7 @@ from diagnostics_test_utils import * goPath = os.path.join(os.path.abspath(os.getcwd()), ".go") os.environ['GOPATH'] = goPath os.environ['GITHUB_REPOSITORY'] = "a/b" -run_codeql_database_create([], lang="go", source="work", db=None, runFunction=runUnsuccessfully) +run_codeql_database_create([], lang="go", source="work", db=None) check_diagnostics() diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/diagnostics.expected b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/diagnostics.expected new file mode 100644 index 00000000000..56d774b7037 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/diagnostics.expected @@ -0,0 +1,14 @@ +{ + "markdownMessage": "A single `go.mod` file was found.\n\n`go.mod`", + "severity": "note", + "source": { + "extractorName": "go", + "id": "go/autobuilder/single-root-go-mod-found", + "name": "A single `go.mod` file was found in the root" + }, + "visibility": { + "cliSummaryTable": false, + "statusPage": false, + "telemetry": true + } +} diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/force_sequential_test_execution b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/force_sequential_test_execution new file mode 100644 index 00000000000..47ca9929099 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/force_sequential_test_execution @@ -0,0 +1,2 @@ +# go get has been observed to sometimes fail when multiple tests try to simultaneously fetch the same package. +goget diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/go.mod b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/go.mod new file mode 100644 index 00000000000..ead01aaaab6 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/go.mod @@ -0,0 +1,3 @@ +require golang.org/x/net v0.0.0-20200505041828-1ed23360d12c + +module test diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/go.sum b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/go.sum new file mode 100644 index 00000000000..6c5ffa613d0 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/go.sum @@ -0,0 +1,7 @@ +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20200505041828-1ed23360d12c h1:zJ0mtu4jCalhKg6Oaukv6iIkb+cOvDrajDH9DH46Q4M= +golang.org/x/net v0.0.0-20200505041828-1ed23360d12c/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/subdir/add.go b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/subdir/add.go new file mode 100644 index 00000000000..910b449d808 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/subdir/add.go @@ -0,0 +1,5 @@ +package subdir + +func Add(a, b int) int { + return a + b +} diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/test.go b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/test.go new file mode 100644 index 00000000000..15e54322353 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/src/test.go @@ -0,0 +1,14 @@ +package test + +import ( + "test/subdir" + + "golang.org/x/net/ipv4" +) + +func test() { + + header := ipv4.Header{} + header.Version = subdir.Add(2, 2) + +} diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/test.expected b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/test.expected new file mode 100644 index 00000000000..0bdb5f221d9 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/test.expected @@ -0,0 +1,5 @@ +extractedFiles +| src/go.mod:0:0:0:0 | src/go.mod | +| src/subdir/add.go:0:0:0:0 | src/subdir/add.go | +| src/test.go:0:0:0:0 | src/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/test.py b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/test.py new file mode 100644 index 00000000000..43c7d1b38e8 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/test.py @@ -0,0 +1,18 @@ +import os +import subprocess + +from create_database_utils import * +from diagnostics_test_utils import * + +# Set up a GOPATH relative to this test's root directory; +# we set os.environ instead of using extra_env because we +# need it to be set for the call to "go clean -modcache" later +goPath = os.path.join(os.path.abspath(os.getcwd()), ".go") +os.environ['GOPATH'] = goPath +run_codeql_database_create([], lang="go", source="src") + +check_diagnostics() + +# Clean up the temporary GOPATH to prevent Bazel failures next +# time the tests are run; see https://github.com/golang/go/issues/27161 +subprocess.call(["go", "clean", "-modcache"]) diff --git a/go/ql/integration-tests/all-platforms/go/go-mod-without-version/test.ql b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/test.ql new file mode 100644 index 00000000000..459a4301560 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/go-mod-without-version/test.ql @@ -0,0 +1,8 @@ +import go +import semmle.go.DiagnosticsReporting + +query predicate extractedFiles(File f) { any() } + +from string msg, int sev +where reportableDiagnostics(_, msg, sev) +select msg, sev diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/diagnostics.expected b/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/diagnostics.expected index ed2d87ac207..9cf8eb1761f 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/diagnostics.expected +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/diagnostics.expected @@ -1,17 +1,3 @@ -{ - "markdownMessage": "1 package could not be found:\n\n`subdir/subsubdir`.\n\nDefinitions in those packages may not be recognized by CodeQL, and files that use them may only be partially analyzed.\n\nCheck that the paths are correct and make sure any private packages can be accessed. If any of the packages are present in the repository then you may need a [custom build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", - "severity": "warning", - "source": { - "extractorName": "go", - "id": "go/autobuilder/package-not-found", - "name": "Some packages could not be found" - }, - "visibility": { - "cliSummaryTable": true, - "statusPage": true, - "telemetry": true - } -} { "markdownMessage": "Go files were found outside of the Go modules corresponding to these `go.mod` files.\n\n`subdir/go.mod`", "severity": "note", diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/test.expected b/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/test.expected index 18120f350ef..957d2f845a4 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/test.expected +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/test.expected @@ -1,2 +1,7 @@ -| Extraction failed in subdir/test.go with error cannot find package "subdir/subsubdir" in any of:\n\t(absolute path) (from $GOROOT)\n\t(absolute path) (from $GOPATH) | 2 | -| Extraction failed in subdir/test.go with error could not import subdir/subsubdir (invalid package name: "") | 2 | +extractedFiles +| src/go.mod:0:0:0:0 | src/go.mod | +| src/main.go:0:0:0:0 | src/main.go | +| src/subdir/go.mod:0:0:0:0 | src/subdir/go.mod | +| src/subdir/subsubdir/add.go:0:0:0:0 | src/subdir/subsubdir/add.go | +| src/subdir/test.go:0:0:0:0 | src/subdir/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/test.ql b/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/test.ql index e817bb2938a..459a4301560 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/test.ql +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-and-go-files-not-under-it/test.ql @@ -1,6 +1,8 @@ import go import semmle.go.DiagnosticsReporting +query predicate extractedFiles(File f) { any() } + from string msg, int sev where reportableDiagnostics(_, msg, sev) select msg, sev diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/test.expected b/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/test.expected index e69de29bb2d..0bdb5f221d9 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/test.expected +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/test.expected @@ -0,0 +1,5 @@ +extractedFiles +| src/go.mod:0:0:0:0 | src/go.mod | +| src/subdir/add.go:0:0:0:0 | src/subdir/add.go | +| src/test.go:0:0:0:0 | src/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/test.ql b/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/test.ql index e817bb2938a..459a4301560 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/test.ql +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-in-root/test.ql @@ -1,6 +1,8 @@ import go import semmle.go.DiagnosticsReporting +query predicate extractedFiles(File f) { any() } + from string msg, int sev where reportableDiagnostics(_, msg, sev) select msg, sev diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/test.expected b/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/test.expected index e69de29bb2d..66ba3ef588f 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/test.expected +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/test.expected @@ -0,0 +1,5 @@ +extractedFiles +| src/subdir/go.mod:0:0:0:0 | src/subdir/go.mod | +| src/subdir/subsubdir/add.go:0:0:0:0 | src/subdir/subsubdir/add.go | +| src/subdir/test.go:0:0:0:0 | src/subdir/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/test.ql b/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/test.ql index e817bb2938a..459a4301560 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/test.ql +++ b/go/ql/integration-tests/all-platforms/go/single-go-mod-not-in-root/test.ql @@ -1,6 +1,8 @@ import go import semmle.go.DiagnosticsReporting +query predicate extractedFiles(File f) { any() } + from string msg, int sev where reportableDiagnostics(_, msg, sev) select msg, sev diff --git a/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/diagnostics.expected b/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/diagnostics.expected index dc018d92b3d..82821f25224 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/diagnostics.expected +++ b/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/diagnostics.expected @@ -26,17 +26,3 @@ "telemetry": true } } -{ - "markdownMessage": "2 packages could not be found:\n\n`subdir1/subsubdir1`, `subdir2/subsubdir2`.\n\nDefinitions in those packages may not be recognized by CodeQL, and files that use them may only be partially analyzed.\n\nCheck that the paths are correct and make sure any private packages can be accessed. If any of the packages are present in the repository then you may need a [custom build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", - "severity": "warning", - "source": { - "extractorName": "go", - "id": "go/autobuilder/package-not-found", - "name": "Some packages could not be found" - }, - "visibility": { - "cliSummaryTable": true, - "statusPage": true, - "telemetry": true - } -} diff --git a/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/test.expected b/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/test.expected index a2c09b1171a..ec39eb9a9dd 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/test.expected +++ b/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/test.expected @@ -1,4 +1,8 @@ -| Extraction failed in modules/subdir1/test.go with error cannot find package "subdir1/subsubdir1" in any of:\n\t(absolute path) (from $GOROOT)\n\t(absolute path) (from $GOPATH) | 2 | -| Extraction failed in modules/subdir1/test.go with error could not import subdir1/subsubdir1 (invalid package name: "") | 2 | -| Extraction failed in modules/subdir2/test.go with error cannot find package "subdir2/subsubdir2" in any of:\n\t(absolute path) (from $GOROOT)\n\t(absolute path) (from $GOPATH) | 2 | -| Extraction failed in modules/subdir2/test.go with error could not import subdir2/subsubdir2 (invalid package name: "") | 2 | +extractedFiles +| src/modules/subdir1/go.mod:0:0:0:0 | src/modules/subdir1/go.mod | +| src/modules/subdir1/subsubdir1/add.go:0:0:0:0 | src/modules/subdir1/subsubdir1/add.go | +| src/modules/subdir1/test.go:0:0:0:0 | src/modules/subdir1/test.go | +| src/modules/subdir2/go.mod:0:0:0:0 | src/modules/subdir2/go.mod | +| src/modules/subdir2/subsubdir2/add.go:0:0:0:0 | src/modules/subdir2/subsubdir2/add.go | +| src/modules/subdir2/test.go:0:0:0:0 | src/modules/subdir2/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/test.ql b/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/test.ql index e817bb2938a..459a4301560 100644 --- a/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/test.ql +++ b/go/ql/integration-tests/all-platforms/go/single-go-work-not-in-root/test.ql @@ -1,6 +1,8 @@ import go import semmle.go.DiagnosticsReporting +query predicate extractedFiles(File f) { any() } + from string msg, int sev where reportableDiagnostics(_, msg, sev) select msg, sev diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/diagnostics.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/diagnostics.expected index 226eb35d3ab..8d84d3efe44 100644 --- a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/diagnostics.expected +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/diagnostics.expected @@ -12,17 +12,3 @@ "telemetry": true } } -{ - "markdownMessage": "2 packages could not be found:\n\n`test/subdir2`, `subdir1/subsubdir1`.\n\nDefinitions in those packages may not be recognized by CodeQL, and files that use them may only be partially analyzed.\n\nCheck that the paths are correct and make sure any private packages can be accessed. If any of the packages are present in the repository then you may need a [custom build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", - "severity": "warning", - "source": { - "extractorName": "go", - "id": "go/autobuilder/package-not-found", - "name": "Some packages could not be found" - }, - "visibility": { - "cliSummaryTable": true, - "statusPage": true, - "telemetry": true - } -} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/test.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/test.expected index 38b4f954433..c19a77a7547 100644 --- a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/test.expected +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/test.expected @@ -1,4 +1,8 @@ -| Extraction failed in subdir0/subdir1/test.go with error cannot find package "subdir1/subsubdir1" in any of:\n\t(absolute path) (from $GOROOT)\n\t(absolute path) (from $GOPATH) | 2 | -| Extraction failed in subdir0/subdir1/test.go with error could not import subdir1/subsubdir1 (invalid package name: "") | 2 | -| Extraction failed in subdir0/test.go with error cannot find package "test/subdir2" in any of:\n\t(absolute path) (from $GOROOT)\n\t(absolute path) (from $GOPATH) | 2 | -| Extraction failed in subdir0/test.go with error could not import test/subdir2 (invalid package name: "") | 2 | +extractedFiles +| src/subdir0/go.mod:0:0:0:0 | src/subdir0/go.mod | +| src/subdir0/subdir1/go.mod:0:0:0:0 | src/subdir0/subdir1/go.mod | +| src/subdir0/subdir1/subsubdir1/add.go:0:0:0:0 | src/subdir0/subdir1/subsubdir1/add.go | +| src/subdir0/subdir1/test.go:0:0:0:0 | src/subdir0/subdir1/test.go | +| src/subdir0/subdir2/add.go:0:0:0:0 | src/subdir0/subdir2/add.go | +| src/subdir0/test.go:0:0:0:0 | src/subdir0/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/test.ql b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/test.ql index e817bb2938a..459a4301560 100644 --- a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/test.ql +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-none-in-root/test.ql @@ -1,6 +1,8 @@ import go import semmle.go.DiagnosticsReporting +query predicate extractedFiles(File f) { any() } + from string msg, int sev where reportableDiagnostics(_, msg, sev) select msg, sev diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/test.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/test.expected index e69de29bb2d..d3e7328fe5a 100644 --- a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/test.expected +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/test.expected @@ -0,0 +1,8 @@ +extractedFiles +| src/go.mod:0:0:0:0 | src/go.mod | +| src/subdir1/go.mod:0:0:0:0 | src/subdir1/go.mod | +| src/subdir1/subsubdir1/add.go:0:0:0:0 | src/subdir1/subsubdir1/add.go | +| src/subdir1/test.go:0:0:0:0 | src/subdir1/test.go | +| src/subdir2/add.go:0:0:0:0 | src/subdir2/add.go | +| src/test.go:0:0:0:0 | src/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/test.ql b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/test.ql index e817bb2938a..459a4301560 100644 --- a/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/test.ql +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-nested-one-in-root/test.ql @@ -1,6 +1,8 @@ import go import semmle.go.DiagnosticsReporting +query predicate extractedFiles(File f) { any() } + from string msg, int sev where reportableDiagnostics(_, msg, sev) select msg, sev diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/diagnostics.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/diagnostics.expected index e07da8154d4..bb26aa9aca4 100644 --- a/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/diagnostics.expected +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/diagnostics.expected @@ -12,17 +12,3 @@ "telemetry": true } } -{ - "markdownMessage": "2 packages could not be found:\n\n`subdir1/subsubdir1`, `subdir2/subsubdir2`.\n\nDefinitions in those packages may not be recognized by CodeQL, and files that use them may only be partially analyzed.\n\nCheck that the paths are correct and make sure any private packages can be accessed. If any of the packages are present in the repository then you may need a [custom build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", - "severity": "warning", - "source": { - "extractorName": "go", - "id": "go/autobuilder/package-not-found", - "name": "Some packages could not be found" - }, - "visibility": { - "cliSummaryTable": true, - "statusPage": true, - "telemetry": true - } -} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/test.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/test.expected index 8435a54f44a..917ad8beba8 100644 --- a/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/test.expected +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/test.expected @@ -1,4 +1,8 @@ -| Extraction failed in subdir1/test.go with error cannot find package "subdir1/subsubdir1" in any of:\n\t(absolute path) (from $GOROOT)\n\t(absolute path) (from $GOPATH) | 2 | -| Extraction failed in subdir1/test.go with error could not import subdir1/subsubdir1 (invalid package name: "") | 2 | -| Extraction failed in subdir2/test.go with error cannot find package "subdir2/subsubdir2" in any of:\n\t(absolute path) (from $GOROOT)\n\t(absolute path) (from $GOPATH) | 2 | -| Extraction failed in subdir2/test.go with error could not import subdir2/subsubdir2 (invalid package name: "") | 2 | +extractedFiles +| src/subdir1/go.mod:0:0:0:0 | src/subdir1/go.mod | +| src/subdir1/subsubdir1/add.go:0:0:0:0 | src/subdir1/subsubdir1/add.go | +| src/subdir1/test.go:0:0:0:0 | src/subdir1/test.go | +| src/subdir2/go.mod:0:0:0:0 | src/subdir2/go.mod | +| src/subdir2/subsubdir2/add.go:0:0:0:0 | src/subdir2/subsubdir2/add.go | +| src/subdir2/test.go:0:0:0:0 | src/subdir2/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/test.ql b/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/test.ql index e817bb2938a..459a4301560 100644 --- a/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/test.ql +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-not-nested/test.ql @@ -1,6 +1,8 @@ import go import semmle.go.DiagnosticsReporting +query predicate extractedFiles(File f) { any() } + from string msg, int sev where reportableDiagnostics(_, msg, sev) select msg, sev diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/diagnostics.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/diagnostics.expected new file mode 100644 index 00000000000..02805a60c99 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/diagnostics.expected @@ -0,0 +1,28 @@ +{ + "markdownMessage": "2 `go.mod` files were found:\n\n`subdir1/go.mod`, `subdir2/go.mod`", + "severity": "note", + "source": { + "extractorName": "go", + "id": "go/autobuilder/multiple-go-mod-found-not-nested", + "name": "Multiple `go.mod` files found, not all nested under one root `go.mod` file" + }, + "visibility": { + "cliSummaryTable": false, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "The following 1 Go project could not be extracted successfully:\n\n`subdir2`\n", + "severity": "warning", + "source": { + "extractorName": "go", + "id": "go/autobuilder/extraction-failed-for-project", + "name": "Unable to extract 1 Go projects" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/force_sequential_test_execution b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/force_sequential_test_execution new file mode 100644 index 00000000000..47ca9929099 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/force_sequential_test_execution @@ -0,0 +1,2 @@ +# go get has been observed to sometimes fail when multiple tests try to simultaneously fetch the same package. +goget diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/go.mod b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/go.mod new file mode 100644 index 00000000000..147c51b8386 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/go.mod @@ -0,0 +1,5 @@ +go 1.14 + +require golang.org/x/net v0.0.0-20200505041828-1ed23360d12c + +module subdir1 diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/go.sum b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/go.sum new file mode 100644 index 00000000000..6c5ffa613d0 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/go.sum @@ -0,0 +1,7 @@ +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20200505041828-1ed23360d12c h1:zJ0mtu4jCalhKg6Oaukv6iIkb+cOvDrajDH9DH46Q4M= +golang.org/x/net v0.0.0-20200505041828-1ed23360d12c/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/subsubdir1/add.go b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/subsubdir1/add.go new file mode 100644 index 00000000000..900c2b5f266 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/subsubdir1/add.go @@ -0,0 +1,5 @@ +package subsubdir1 + +func Add(a, b int) int { + return a + b +} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/test.go b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/test.go new file mode 100644 index 00000000000..6081be52248 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir1/test.go @@ -0,0 +1,14 @@ +package subdir + +import ( + "subdir1/subsubdir1" + + "golang.org/x/net/ipv4" +) + +func test() { + + header := ipv4.Header{} + header.Version = subsubdir1.Add(2, 2) + +} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/go.mod b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/go.mod new file mode 100644 index 00000000000..7a2ca787004 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/go.mod @@ -0,0 +1,7 @@ +go 1.14 + +require ( + github.com/microsoft/go-mssqldb v0.12.0 +) + +module subdir2 diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/go.sum b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/go.sum new file mode 100644 index 00000000000..432407e3db0 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/go.sum @@ -0,0 +1,30 @@ +github.com/Azure/go-autorest v13.3.2+incompatible h1:VxzPyuhtnlBOzc4IWCZHqpyH2d+QMLQEuy3wREyY4oc= +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.4 h1:1cM+NmKw91+8h5vfjgzK4ZGLuN72k87XVZBWyGwNjUM= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/microsoft/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73 h1:OGNva6WhsKst5OZf7eZOklDztV3hwtTHovdrLHV+MsA= +github.com/microsoft/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/subsubdir2/add.go b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/subsubdir2/add.go new file mode 100644 index 00000000000..99810d11db0 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/subsubdir2/add.go @@ -0,0 +1,5 @@ +package subsubdir2 + +func Add(a, b int) int { + return a + b +} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/test.go b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/test.go new file mode 100644 index 00000000000..29ea91b58df --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/src/subdir2/test.go @@ -0,0 +1,12 @@ +package subdir + +import ( + mssql "github.com/microsoft/go-mssqldb" +) + +func test() { + connString := "hello" + connector, err := mssql.NewAccessTokenConnector( + connString, nil) + +} diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/test.expected b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/test.expected new file mode 100644 index 00000000000..8d83defa1bb --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/test.expected @@ -0,0 +1,5 @@ +extractedFiles +| src/subdir1/go.mod:0:0:0:0 | src/subdir1/go.mod | +| src/subdir1/subsubdir1/add.go:0:0:0:0 | src/subdir1/subsubdir1/add.go | +| src/subdir1/test.go:0:0:0:0 | src/subdir1/test.go | +#select diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/test.py b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/test.py new file mode 100644 index 00000000000..43c7d1b38e8 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/test.py @@ -0,0 +1,18 @@ +import os +import subprocess + +from create_database_utils import * +from diagnostics_test_utils import * + +# Set up a GOPATH relative to this test's root directory; +# we set os.environ instead of using extra_env because we +# need it to be set for the call to "go clean -modcache" later +goPath = os.path.join(os.path.abspath(os.getcwd()), ".go") +os.environ['GOPATH'] = goPath +run_codeql_database_create([], lang="go", source="src") + +check_diagnostics() + +# Clean up the temporary GOPATH to prevent Bazel failures next +# time the tests are run; see https://github.com/golang/go/issues/27161 +subprocess.call(["go", "clean", "-modcache"]) diff --git a/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/test.ql b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/test.ql new file mode 100644 index 00000000000..459a4301560 --- /dev/null +++ b/go/ql/integration-tests/all-platforms/go/two-go-mods-one-failure/test.ql @@ -0,0 +1,8 @@ +import go +import semmle.go.DiagnosticsReporting + +query predicate extractedFiles(File f) { any() } + +from string msg, int sev +where reportableDiagnostics(_, msg, sev) +select msg, sev diff --git a/go/ql/lib/change-notes/2024-02-14-range-map-read.md b/go/ql/lib/change-notes/2024-02-14-range-map-read.md new file mode 100644 index 00000000000..ea45737a72e --- /dev/null +++ b/go/ql/lib/change-notes/2024-02-14-range-map-read.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* Fixed dataflow out of a `map` using a `range` statement. diff --git a/go/ql/lib/change-notes/2024-03-04-autobuilder-changes.md b/go/ql/lib/change-notes/2024-03-04-autobuilder-changes.md new file mode 100644 index 00000000000..0442a571029 --- /dev/null +++ b/go/ql/lib/change-notes/2024-03-04-autobuilder-changes.md @@ -0,0 +1,5 @@ +--- +category: majorAnalysis +--- +* We have significantly improved the Go autobuilder to understand a greater range of project layouts, which allows Go source files to be analysed that could previously not be processed. +* Go 1.22 has been included in the range of supported Go versions. diff --git a/go/ql/lib/change-notes/2024-03-04-macaron-sources.md b/go/ql/lib/change-notes/2024-03-04-macaron-sources.md new file mode 100644 index 00000000000..72ea242510d --- /dev/null +++ b/go/ql/lib/change-notes/2024-03-04-macaron-sources.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added dataflow sources for the package `gopkg.in/macaron.v1`. diff --git a/go/ql/lib/ext/gopkg.in.macaron.model.yml b/go/ql/lib/ext/gopkg.in.macaron.model.yml index c0c0de87267..10846d4e8b6 100644 --- a/go/ql/lib/ext/gopkg.in.macaron.model.yml +++ b/go/ql/lib/ext/gopkg.in.macaron.model.yml @@ -1,4 +1,20 @@ extensions: + - addsTo: + pack: codeql/go-all + extensible: sourceModel + data: + - ["gopkg.in/macaron", "Context", True, "AllParams", "", "", "ReturnValue", "remote", "manual"] + - ["gopkg.in/macaron", "Context", True, "GetCookie", "", "", "ReturnValue", "remote", "manual"] + - ["gopkg.in/macaron", "Context", True, "GetSecureCookie", "", "", "ReturnValue[0]", "remote", "manual"] + - ["gopkg.in/macaron", "Context", True, "GetSuperSecureCookie", "", "", "ReturnValue[0]", "remote", "manual"] + - ["gopkg.in/macaron", "Context", True, "GetFile", "", "", "ReturnValue[0]", "remote", "manual"] + - ["gopkg.in/macaron", "Context", True, "Params", "", "", "ReturnValue", "remote", "manual"] + - ["gopkg.in/macaron", "Context", True, "ParamsEscape", "", "", "ReturnValue", "remote", "manual"] + - ["gopkg.in/macaron", "Context", True, "Query", "", "", "ReturnValue", "remote", "manual"] + - ["gopkg.in/macaron", "Context", True, "QueryEscape", "", "", "ReturnValue", "remote", "manual"] + - ["gopkg.in/macaron", "Context", True, "QueryStrings", "", "", "ReturnValue", "remote", "manual"] + - ["gopkg.in/macaron", "RequestBody", True, "Bytes", "", "", "ReturnValue[0]", "remote", "manual"] + - ["gopkg.in/macaron", "RequestBody", True, "String", "", "", "ReturnValue[0]", "remote", "manual"] - addsTo: pack: codeql/go-all extensible: summaryModel diff --git a/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll b/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll index ad985e2c5b5..e6a21a06dec 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/ContainerFlow.qll @@ -41,11 +41,11 @@ predicate containerStoreStep(Node node1, Node node2, Content c) { or c instanceof MapKeyContent and node2.getType() instanceof MapType and - exists(Write w | w.writesElement(node2, node1, _)) + exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), node1, _)) or c instanceof MapValueContent and node2.getType() instanceof MapType and - exists(Write w | w.writesElement(node2, _, node1)) + exists(Write w | w.writesElement(node2.(PostUpdateNode).getPreUpdateNode(), _, node1)) } /** @@ -57,11 +57,11 @@ predicate containerStoreStep(Node node1, Node node2, Content c) { predicate containerReadStep(Node node1, Node node2, Content c) { c instanceof ArrayContent and ( - node2.(Read).readsElement(node1, _) and - ( - node1.getType() instanceof ArrayType or - node1.getType() instanceof SliceType - ) + node1.getType() instanceof ArrayType or + node1.getType() instanceof SliceType + ) and + ( + node2.(Read).readsElement(node1, _) or node2.(RangeElementNode).getBase() = node1 or @@ -85,5 +85,5 @@ predicate containerReadStep(Node node1, Node node2, Content c) { or c instanceof MapValueContent and node1.getType() instanceof MapType and - node2.(Read).readsElement(node1, _) + (node2.(Read).readsElement(node1, _) or node2.(RangeElementNode).getBase() = node1) } diff --git a/go/ql/lib/semmle/go/frameworks/SQL.qll b/go/ql/lib/semmle/go/frameworks/SQL.qll index f76182fb111..1a6e2280781 100644 --- a/go/ql/lib/semmle/go/frameworks/SQL.qll +++ b/go/ql/lib/semmle/go/frameworks/SQL.qll @@ -81,18 +81,28 @@ module SQL { "github.com/lann/squirrel" ], "") | - // first argument to `squirrel.Expr` - fn.hasQualifiedName(sq, "Expr") + fn.hasQualifiedName(sq, ["Delete", "Expr", "Insert", "Select", "Update"]) or - // first argument to the `Prefix`, `Suffix` or `Where` method of one of the `*Builder` classes - exists(string builder | builder.matches("%Builder") | - fn.(Method).hasQualifiedName(sq, builder, "Prefix") or - fn.(Method).hasQualifiedName(sq, builder, "Suffix") or - fn.(Method).hasQualifiedName(sq, builder, "Where") + exists(Method m, string builder | m = fn | + builder = ["DeleteBuilder", "InsertBuilder", "SelectBuilder", "UpdateBuilder"] and + m.hasQualifiedName(sq, builder, + ["Columns", "From", "Options", "OrderBy", "Prefix", "Suffix", "Where"]) + or + builder = "InsertBuilder" and + m.hasQualifiedName(sq, builder, ["Replace", "Into"]) + or + builder = "SelectBuilder" and + m.hasQualifiedName(sq, builder, + ["CrossJoin", "GroupBy", "InnerJoin", "LeftJoin", "RightJoin"]) + or + builder = "UpdateBuilder" and + m.hasQualifiedName(sq, builder, ["Set", "Table"]) ) ) and - this = fn.getACall().getArgument(0) and - this.getType().getUnderlyingType() instanceof StringType + this = fn.getACall().getArgument(0) + | + this.getType().getUnderlyingType() instanceof StringType or + this.getType().getUnderlyingType().(SliceType).getElementType() instanceof StringType ) } } diff --git a/go/ql/lib/semmle/go/security/SensitiveActions.qll b/go/ql/lib/semmle/go/security/SensitiveActions.qll index 6430ddb8cac..3fd96191758 100644 --- a/go/ql/lib/semmle/go/security/SensitiveActions.qll +++ b/go/ql/lib/semmle/go/security/SensitiveActions.qll @@ -233,6 +233,7 @@ module PasswordHeuristics { predicate isDummyPassword(string password) { password.length() < 4 or + password.length() <= 100 and count(password.charAt(_)) <= 2 // aaaaaaaa or bBbBbB or ghghghghghgh or the like or password diff --git a/go/ql/lib/semmle/go/security/UncontrolledAllocationSize.qll b/go/ql/lib/semmle/go/security/UncontrolledAllocationSize.qll new file mode 100644 index 00000000000..885aa7a7053 --- /dev/null +++ b/go/ql/lib/semmle/go/security/UncontrolledAllocationSize.qll @@ -0,0 +1,34 @@ +/** + * Provides a taint-tracking configuration for reasoning about uncontrolled allocation size issues. + */ + +import go + +/** + * Provides a taint-tracking flow for reasoning about uncontrolled allocation size issues. + */ +module UncontrolledAllocationSize { + private import UncontrolledAllocationSizeCustomizations::UncontrolledAllocationSize + + /** + * Module for defining predicates and tracking taint flow related to uncontrolled allocation size issues. + */ + module Config implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { source instanceof Source } + + predicate isSink(DataFlow::Node sink) { sink instanceof Sink } + + predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + exists(Function f, DataFlow::CallNode cn | cn = f.getACall() | + f.hasQualifiedName("strconv", ["Atoi", "ParseInt", "ParseUint", "ParseFloat"]) and + node1 = cn.getArgument(0) and + node2 = cn.getResult(0) + ) + } + } + + /** Tracks taint flow for reasoning about uncontrolled allocation size issues. */ + module Flow = TaintTracking::Global; +} diff --git a/go/ql/lib/semmle/go/security/UncontrolledAllocationSizeCustomizations.qll b/go/ql/lib/semmle/go/security/UncontrolledAllocationSizeCustomizations.qll new file mode 100644 index 00000000000..1237971dde1 --- /dev/null +++ b/go/ql/lib/semmle/go/security/UncontrolledAllocationSizeCustomizations.qll @@ -0,0 +1,33 @@ +/** + * Provides default sources, sinks, and sanitizers for reasoning about uncontrolled allocation size issues, + * as well as extension points for adding your own. + */ + +import go +private import semmle.go.security.AllocationSizeOverflow + +/** + * Provides extension points for customizing the taint-tracking configuration for reasoning + * about uncontrolled allocation size issues. + */ +module UncontrolledAllocationSize { + /** A data flow source for uncontrolled allocation size vulnerabilities. */ + abstract class Source extends DataFlow::Node { } + + /** A data flow sink for uncontrolled allocation size vulnerabilities. */ + abstract class Sink extends DataFlow::Node { } + + /** A sanitizer for uncontrolled allocation size vulnerabilities. */ + abstract class Sanitizer extends DataFlow::Node { } + + /** A source of untrusted data, considered as a taint source for uncontrolled size allocation vulnerabilities. */ + private class UntrustedFlowAsSource extends Source instanceof UntrustedFlowSource { } + + /** The size argument of a memory allocation function. */ + private class AllocationSizeAsSink extends Sink instanceof AllocationSizeOverflow::AllocationSize { + } + + /** A check that a value is below some upper limit. */ + private class SizeCheckSanitizer extends Sanitizer instanceof AllocationSizeOverflow::AllocationSizeCheckBarrier + { } +} diff --git a/go/ql/src/Security/CWE-770/UncontrolledAllocationSize.qhelp b/go/ql/src/Security/CWE-770/UncontrolledAllocationSize.qhelp new file mode 100644 index 00000000000..14930944bb6 --- /dev/null +++ b/go/ql/src/Security/CWE-770/UncontrolledAllocationSize.qhelp @@ -0,0 +1,36 @@ + + + + +

Using untrusted input to allocate slices with the built-in make function could + lead to excessive memory allocation and potentially cause the program to crash due to running + out of memory. This vulnerability could be exploited to perform a denial-of-service attack by + consuming all available server resources.

+
+ + +

Implement a maximum allowed value for size allocations with the built-in make + function to prevent excessively large allocations.

+
+ + +

In the following example snippet, the n parameter is user-controlled.

+

If the external user provides an excessively large value, the application allocates a slice + of size n without further verification, potentially exhausting all the available + memory.

+ + + +

One way to prevent this vulnerability is by implementing a maximum allowed value for the + user-controlled input, as seen in the following example:

+ + +
+ + +
  • OWASP: Denial + of Service Cheat Sheet +
  • +
    +
    \ No newline at end of file diff --git a/go/ql/src/Security/CWE-770/UncontrolledAllocationSize.ql b/go/ql/src/Security/CWE-770/UncontrolledAllocationSize.ql new file mode 100644 index 00000000000..eabfa3333ec --- /dev/null +++ b/go/ql/src/Security/CWE-770/UncontrolledAllocationSize.ql @@ -0,0 +1,21 @@ +/** + * @name Slice memory allocation with excessive size value + * @description Allocating memory for slices with the built-in make function from user-controlled sources can lead to a denial of service. + * @kind path-problem + * @problem.severity error + * @security-severity 7.5 + * @precision high + * @id go/uncontrolled-allocation-size + * @tags security + * external/cwe/cwe-770 + */ + +import go +import semmle.go.security.UncontrolledAllocationSize +import UncontrolledAllocationSize::Flow::PathGraph + +from + UncontrolledAllocationSize::Flow::PathNode source, UncontrolledAllocationSize::Flow::PathNode sink +where UncontrolledAllocationSize::Flow::flowPath(source, sink) +select sink, source, sink, "This memory allocation depends on a $@.", source.getNode(), + "user-provided value" diff --git a/go/ql/src/Security/CWE-770/UncontrolledAllocationSizeBad.go b/go/ql/src/Security/CWE-770/UncontrolledAllocationSizeBad.go new file mode 100644 index 00000000000..b3a57d4f5e1 --- /dev/null +++ b/go/ql/src/Security/CWE-770/UncontrolledAllocationSizeBad.go @@ -0,0 +1,27 @@ +package main + +import ( + "encoding/json" + "fmt" + "net/http" + "strconv" +) + +func OutOfMemoryBad(w http.ResponseWriter, r *http.Request) { + query := r.URL.Query() + + queryStr := query.Get("n") + collectionSize, err := strconv.Atoi(queryStr) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + result := make([]string, collectionSize) + for i := 0; i < collectionSize; i++ { + result[i] = fmt.Sprintf("Item %d", i+1) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(result) +} diff --git a/go/ql/src/Security/CWE-770/UncontrolledAllocationSizeGood.go b/go/ql/src/Security/CWE-770/UncontrolledAllocationSizeGood.go new file mode 100644 index 00000000000..761501064f6 --- /dev/null +++ b/go/ql/src/Security/CWE-770/UncontrolledAllocationSizeGood.go @@ -0,0 +1,30 @@ +package main + +import ( + "encoding/json" + "fmt" + "net/http" + "strconv" +) + +func OutOfMemoryGood(w http.ResponseWriter, r *http.Request) { + query := r.URL.Query() + MaxValue := 6 + queryStr := query.Get("n") + collectionSize, err := strconv.Atoi(queryStr) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if collectionSize < 0 || collectionSize > MaxValue { + http.Error(w, "Bad request", http.StatusBadRequest) + return + } + result := make([]string, collectionSize) + for i := 0; i < collectionSize; i++ { + result[i] = fmt.Sprintf("Item %d", i+1) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(result) +} diff --git a/go/ql/src/change-notes/2024-03-05-squirrel-sqli-sinks.md b/go/ql/src/change-notes/2024-03-05-squirrel-sqli-sinks.md new file mode 100644 index 00000000000..0b6a78df9f9 --- /dev/null +++ b/go/ql/src/change-notes/2024-03-05-squirrel-sqli-sinks.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The query `go/sql-injection` now recognizes more sinks in the package `github.com/Masterminds/squirrel`. diff --git a/go/ql/src/change-notes/2024-03-07-uncontrolled-allocation-size.md b/go/ql/src/change-notes/2024-03-07-uncontrolled-allocation-size.md new file mode 100644 index 00000000000..663932005eb --- /dev/null +++ b/go/ql/src/change-notes/2024-03-07-uncontrolled-allocation-size.md @@ -0,0 +1,4 @@ +--- +category: newQuery +--- +* The query "Slice memory allocation with excessive size value" (`go/uncontrolled-allocation-size`) has been promoted from experimental to the main query pack. Its results will now appear by default. This query was originally [submitted as an experimental query by @Malayke](https://github.com/github/codeql/pull/15130). diff --git a/go/ql/src/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qhelp b/go/ql/src/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qhelp new file mode 100644 index 00000000000..27323d5f421 --- /dev/null +++ b/go/ql/src/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qhelp @@ -0,0 +1,33 @@ + + + +

    Extracting Compressed files with any compression algorithm like gzip can cause to denial of service attacks.

    +

    Attackers can compress a huge file which created by repeated similiar byte and convert it to a small compressed file.

    + +
    + + +

    When you want to decompress a user-provided compressed file you must be careful about the decompression ratio or read these files within a loop byte by byte to be able to manage the decompressed size in each cycle of the loop. Also you can limit the size of reader buffer.

    + +
    + +

    +Using "io.LimitReader" and "io.CopyN" are the best option to prevent decompression bomb attacks. +

    + + + +
    + + +
  • +CVE-2023-26483 +
  • +
  • +A great research to gain more impact by this kind of attacks +
  • + +
    +
    diff --git a/go/ql/src/experimental/CWE-522-DecompressionBombs/DecompressionBombs.ql b/go/ql/src/experimental/CWE-522-DecompressionBombs/DecompressionBombs.ql new file mode 100644 index 00000000000..e86c097f020 --- /dev/null +++ b/go/ql/src/experimental/CWE-522-DecompressionBombs/DecompressionBombs.ql @@ -0,0 +1,21 @@ +/** + * @name Uncontrolled file decompression + * @description Uncontrolled data that flows into decompression library APIs without checking the compression rate is dangerous + * @kind path-problem + * @problem.severity error + * @security-severity 7.8 + * @precision high + * @id go/uncontrolled-file-decompression + * @tags security + * experimental + * external/cwe/cwe-409 + */ + +import go +import experimental.frameworks.DecompressionBombs +import DecompressionBomb::Flow::PathGraph + +from DecompressionBomb::Flow::PathNode source, DecompressionBomb::Flow::PathNode sink +where DecompressionBomb::Flow::flowPath(source, sink) +select sink.getNode(), source, sink, "This decompression is $@.", source.getNode(), + "decompressing compressed data without managing output size" diff --git a/go/ql/src/experimental/CWE-522-DecompressionBombs/example_good.go b/go/ql/src/experimental/CWE-522-DecompressionBombs/example_good.go new file mode 100644 index 00000000000..32b7ca45efe --- /dev/null +++ b/go/ql/src/experimental/CWE-522-DecompressionBombs/example_good.go @@ -0,0 +1,30 @@ +package main + +import ( + "archive/zip" + "fmt" + "io" + "os" +) + +func ZipOpenReader(filename string) { + // Open the zip file + r, _ := zip.OpenReader(filename) + var totalBytes int64 + for _, f := range r.File { + rc, _ := f.Open() + totalBytes = 0 + for { + result, _ := io.CopyN(os.Stdout, rc, 68) + if result == 0 { + break + } + totalBytes = totalBytes + result + if totalBytes > 1024*1024 { + fmt.Print(totalBytes) + _ = rc.Close() + break + } + } + } +} diff --git a/go/ql/src/experimental/CWE-522-DecompressionBombs/example_good_2.go b/go/ql/src/experimental/CWE-522-DecompressionBombs/example_good_2.go new file mode 100644 index 00000000000..5e70fde61c2 --- /dev/null +++ b/go/ql/src/experimental/CWE-522-DecompressionBombs/example_good_2.go @@ -0,0 +1,18 @@ +package main + +import ( + "compress/gzip" + "io" + "os" +) + +func safeReader() { + var src io.Reader + src, _ = os.Open("filename") + gzipR, _ := gzip.NewReader(src) + dstF, _ := os.OpenFile("./test", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755) + defer dstF.Close() + var newSrc io.Reader + newSrc = io.LimitReader(gzipR, 1024*1024*1024*5) + _, _ = io.Copy(dstF, newSrc) +} diff --git a/go/ql/src/experimental/CWE-525/WebCacheDeception.expected b/go/ql/src/experimental/CWE-525/WebCacheDeception.expected new file mode 100644 index 00000000000..70e70de3037 --- /dev/null +++ b/go/ql/src/experimental/CWE-525/WebCacheDeception.expected @@ -0,0 +1,5 @@ +| WebCacheDeceptionBad.go:82:18:82:31 | "/adminusers/" | "/adminusers/" is used as wildcard endpoint. | +| WebCacheDeceptionFiber.go:15:10:15:17 | "/api/*" | "/api/*" is used as wildcard endpoint. | +| WebCacheDeceptionFiber.go:20:11:20:18 | "/api/*" | "/api/*" is used as wildcard endpoint. | +| WebCacheDeceptionGoChi.go:13:8:13:11 | "/*" | "/*" is used as wildcard endpoint. | +| WebCacheDeceptionHTTPRouter.go:21:13:21:25 | "/test/*test" | "/test/*test" is used as wildcard endpoint. | diff --git a/go/ql/src/experimental/CWE-525/WebCacheDeception.qhelp b/go/ql/src/experimental/CWE-525/WebCacheDeception.qhelp index f2958304383..deea709abcf 100644 --- a/go/ql/src/experimental/CWE-525/WebCacheDeception.qhelp +++ b/go/ql/src/experimental/CWE-525/WebCacheDeception.qhelp @@ -17,13 +17,31 @@

    Vulnerable code example: A web server is configured to cache all responses ending in '.css'. An attacker requests 'profile.css', and the server processes 'profile', a sensitive page, and caches it.

    - +

    Secure code example: The server is configured with strict cache controls and URL validation, preventing caching of dynamic or sensitive pages regardless of their URL pattern.

    - + +
    + +

    + Vulnerable code example: The server is configured with strict cache controls and URL validation, preventing caching of dynamic or sensitive pages regardless of their URL pattern. +

    + +
    + +

    + Vulnerable code example: The server is configured with strict cache controls and URL validation, preventing caching of dynamic or sensitive pages regardless of their URL pattern. +

    + +
    + +

    + Vulnerable code example: The server is configured with strict cache controls and URL validation, preventing caching of dynamic or sensitive pages regardless of their URL pattern. +

    +
  • diff --git a/go/ql/src/experimental/CWE-525/WebCacheDeception.ql b/go/ql/src/experimental/CWE-525/WebCacheDeception.ql index 2af70ee490c..eb488b0b0d1 100644 --- a/go/ql/src/experimental/CWE-525/WebCacheDeception.ql +++ b/go/ql/src/experimental/CWE-525/WebCacheDeception.ql @@ -11,17 +11,7 @@ */ import go +import WebCacheDeceptionLib -from - DataFlow::CallNode httpHandleFuncCall, DataFlow::ReadNode rn, Http::HeaderWrite::Range hw, - DeclaredFunction f -where - httpHandleFuncCall.getTarget().hasQualifiedName("net/http", "HandleFunc") and - httpHandleFuncCall.getArgument(0).getStringValue().matches("%/") and - httpHandleFuncCall.getArgument(1) = rn and - rn.reads(f) and - f.getParameter(0) = hw.getResponseWriter() and - hw.getHeaderName() = "cache-control" -select httpHandleFuncCall.getArgument(0), - "Wildcard Endpoint used with " + httpHandleFuncCall.getArgument(0) + " and '" + hw.getHeaderName() - + "' Header is used" +from WebCacheDeception::Sink httpHandleFuncCall +select httpHandleFuncCall, httpHandleFuncCall + " is used as wildcard endpoint." diff --git a/go/ql/src/experimental/CWE-525/WebCacheDeceptionLib.qll b/go/ql/src/experimental/CWE-525/WebCacheDeceptionLib.qll new file mode 100644 index 00000000000..32223cf98eb --- /dev/null +++ b/go/ql/src/experimental/CWE-525/WebCacheDeceptionLib.qll @@ -0,0 +1,61 @@ +import go +import StringOps + +module WebCacheDeception { + abstract class Sink extends DataFlow::Node { } + + private class GoNetHttp extends Sink { + GoNetHttp() { + exists( + DataFlow::CallNode m, DataFlow::ReadNode rn, Http::HeaderWrite::Range hw, DeclaredFunction f + | + m.getTarget().hasQualifiedName("net/http", "HandleFunc") and + m.getArgument(0).getStringValue().matches("%/") and + m.getArgument(1) = rn and + rn.reads(f) and + f.getParameter(0) = hw.getResponseWriter() and + hw.getHeaderName() = "cache-control" and + this = m.getArgument(0) + ) + } + } + + private class GoFiber extends Sink { + GoFiber() { + exists(ImportSpec i | + i.getPath() = "github.com/gofiber/fiber" or + i.getPath() = "github.com/gofiber/fiber/v2" + | + exists(DataFlow::CallNode m | + m.getCall().getArgument(0).toString().matches("%/*%") and + this = m.getArgument(0) + ) + ) + } + } + + private class GoChi extends Sink { + GoChi() { + exists(ImportSpec i | + i.getPath() = "github.com/go-chi/chi/v5" or + i.getPath() = "github.com/go-chi/chi/v5/middleware" + | + exists(DataFlow::CallNode m | + m.getCall().getArgument(0).toString().matches("%/*%") and + this = m.getArgument(0) + ) + ) + } + } + + private class GoHttpRouter extends Sink { + GoHttpRouter() { + exists(string pkg | pkg = "github.com/julienschmidt/httprouter" | + exists(DataFlow::CallNode m | + m.getCall().getArgument(0).toString().matches("%/*%") and + this = m.getArgument(0) + ) + ) + } + } +} diff --git a/go/ql/src/experimental/CWE-525/WebCacheDeceptionBad.go b/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionBad.go similarity index 100% rename from go/ql/src/experimental/CWE-525/WebCacheDeceptionBad.go rename to go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionBad.go diff --git a/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionFiber.go b/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionFiber.go new file mode 100644 index 00000000000..e6107de430a --- /dev/null +++ b/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionFiber.go @@ -0,0 +1,38 @@ +package fiber + +import ( + "fmt" + "log" + + "github.com/gofiber/fiber/v2" +) + +func main() { + app := fiber.New() + log.Println("We are logging in Golang!") + + // GET /api/register + app.Get("/api/*", func(c *fiber.Ctx) error { + msg := fmt.Sprintf("✋") + return c.SendString(msg) // => ✋ register + }) + + app.Post("/api/*", func(c *fiber.Ctx) error { + msg := fmt.Sprintf("✋") + return c.SendString(msg) // => ✋ register + }) + + // GET /flights/LAX-SFO + app.Get("/flights/:from-:to", func(c *fiber.Ctx) error { + msg := fmt.Sprintf("💸 From: %s, To: %s", c.Params("from"), c.Params("to")) + return c.SendString(msg) // => 💸 From: LAX, To: SFO + }) + + // GET /dictionary.txt + app.Get("/:file.:ext", func(c *fiber.Ctx) error { + msg := fmt.Sprintf("📃 %s.%s", c.Params("file"), c.Params("ext")) + return c.SendString(msg) // => 📃 dictionary.txt + }) + + log.Fatal(app.Listen(":3000")) +} diff --git a/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionGoChi.go b/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionGoChi.go new file mode 100644 index 00000000000..fcfa7911cc4 --- /dev/null +++ b/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionGoChi.go @@ -0,0 +1,17 @@ +package main + +import ( + "net/http" + + "github.com/go-chi/chi/v5" + "github.com/go-chi/chi/v5/middleware" +) + +func main() { + r := chi.NewRouter() + r.Use(middleware.Logger) + r.Get("/*", func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("welcome")) + }) + http.ListenAndServe(":3000", r) +} diff --git a/go/ql/src/experimental/CWE-525/WebCacheDeceptionGood.go b/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionGood.go similarity index 100% rename from go/ql/src/experimental/CWE-525/WebCacheDeceptionGood.go rename to go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionGood.go diff --git a/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionHTTPRouter.go b/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionHTTPRouter.go new file mode 100644 index 00000000000..79369565051 --- /dev/null +++ b/go/ql/src/experimental/CWE-525/examples/WebCacheDeceptionHTTPRouter.go @@ -0,0 +1,25 @@ +package httprouter + +import ( + "fmt" + "log" + "net/http" + + "github.com/julienschmidt/httprouter" +) + +func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + fmt.Fprint(w, "Welcome!\n") +} + +func Hello(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + fmt.Fprintf(w, "hello, %s!\n", ps.ByName("name")) +} + +func main() { + router := httprouter.New() + router.GET("/test/*test", Index) + router.GET("/hello/:name", Hello) + + log.Fatal(http.ListenAndServe(":8082", router)) +} diff --git a/go/ql/src/experimental/frameworks/DecompressionBombs.qll b/go/ql/src/experimental/frameworks/DecompressionBombs.qll new file mode 100644 index 00000000000..e1d2cd4ddc9 --- /dev/null +++ b/go/ql/src/experimental/frameworks/DecompressionBombs.qll @@ -0,0 +1,63 @@ +/** + * Provides a taint tracking configuration for reasoning about decompression bomb vulnerabilities. + */ + +import go + +class MimeMultipartFileHeader extends UntrustedFlowSource::Range { + MimeMultipartFileHeader() { + exists(DataFlow::FieldReadNode frn | this = frn | + frn.getField().hasQualifiedName("mime/multipart", "FileHeader", ["Filename", "Header"]) + ) + or + exists(DataFlow::Method m | + m.hasQualifiedName("mime/multipart", "FileHeader", "Open") and + this = m.getACall().getResult(0) + ) + or + exists(DataFlow::FieldReadNode frn | + frn.getField().hasQualifiedName("mime/multipart", "Form", "Value") + ) + } +} + +/** Provides a taint tracking configuration for reasoning about decompression bomb vulnerabilities. */ +module DecompressionBomb { + import experimental.frameworks.DecompressionBombsCustomizations + + module Config implements DataFlow::StateConfigSig { + class FlowState = DecompressionBombs::FlowState; + + predicate isSource(DataFlow::Node source, FlowState state) { + source instanceof UntrustedFlowSource and + state = "" + } + + predicate isSink(DataFlow::Node sink, FlowState state) { + sink instanceof DecompressionBombs::Sink and + state = + [ + "ZstdNewReader", "XzNewReader", "GzipNewReader", "PgzipNewReader", "S2NewReader", + "SnappyNewReader", "ZlibNewReader", "FlateNewReader", "Bzip2NewReader", "ZipOpenReader", + "ZipKlauspost" + ] + } + + predicate isAdditionalFlowStep(DataFlow::Node fromNode, DataFlow::Node toNode) { + exists(DecompressionBombs::AdditionalTaintStep addStep | + addStep.isAdditionalFlowStep(fromNode, toNode) + ) + } + + predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(DecompressionBombs::AdditionalTaintStep addStep | + addStep.isAdditionalFlowStep(fromNode, fromState, toNode, toState) + ) + } + } + + /** Tracks taint flow for reasoning about decompression bomb vulnerabilities. */ + module Flow = TaintTracking::GlobalWithState; +} diff --git a/go/ql/src/experimental/frameworks/DecompressionBombsCustomizations.qll b/go/ql/src/experimental/frameworks/DecompressionBombsCustomizations.qll new file mode 100644 index 00000000000..b50d3757797 --- /dev/null +++ b/go/ql/src/experimental/frameworks/DecompressionBombsCustomizations.qll @@ -0,0 +1,607 @@ +import go + +module DecompressionBombs { + class FlowState extends string { + FlowState() { + this = + [ + "ZstdNewReader", "XzNewReader", "GzipNewReader", "PgzipNewReader", "S2NewReader", + "SnappyNewReader", "ZlibNewReader", "FlateNewReader", "Bzip2NewReader", "ZipOpenReader", + "ZipKlauspost", "" + ] + } + } + + /** + * The additional taint steps that need for creating taint tracking or dataflow. + */ + abstract class AdditionalTaintStep extends string { + AdditionalTaintStep() { this = "AdditionalTaintStep" } + + /** + * Holds if there is a additional taint step between pred and succ. + */ + predicate isAdditionalFlowStep(DataFlow::Node fromNode, DataFlow::Node toNode) { none() } + + /** + * Holds if there is a additional taint step between pred and succ. + */ + abstract predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ); + } + + /** + * The Sinks of uncontrolled data decompression + */ + abstract class Sink extends DataFlow::Node { } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/DataDog/zstd` package. + * + * `Reader.Read` already modeled. + */ + module DataDogZstd { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/DataDog/zstd", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "ZstdNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/klauspost/compress/zstd` package. + * + * `Reader.Read`, `Reader.WriteTo` already modeled. + */ + module KlauspostZstd { + class TheSink extends Sink { + TheSink() { + exists(Method m | + m.hasQualifiedName("github.com/klauspost/compress/zstd", "Decoder", "DecodeAll") + | + this = m.getACall().getReceiver() + ) + } + } + + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/klauspost/compress/zstd", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "ZstdNewReader" + ) + } + } + } + + /** + * Provides additional flow steps for `archive/zip` package + */ + module ArchiveZipBombs { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("archive/zip", ["OpenReader", "NewReader"]) and call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "ZipOpenReader" + ) + } + } + } + + /** + * Provides Decompression additional taint steps for `github.com/klauspost/compress/zip` package + */ + module KlauspostZip { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/klauspost/compress/zip", ["NewReader", "OpenReader"]) and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "ZipKlauspost" + ) + } + + override predicate isAdditionalFlowStep(DataFlow::Node fromNode, DataFlow::Node toNode) { + exists(DataFlow::FieldReadNode fi | + fi.getType().hasQualifiedName("github.com/klauspost/compress/zip", "Reader") + | + fromNode = fi.getBase() and + toNode = fi + ) + or + exists(Method m, DataFlow::CallNode call | + m.hasQualifiedName("github.com/klauspost/compress/zip", "File", ["Open", "OpenRaw"]) and + call = m.getACall() + | + fromNode = call.getReceiver() and + toNode = call + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/ulikunitz/xz` package. + * + * `Reader.Read` already modeled. + */ + module UlikunitzXz { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/ulikunitz/xz", "NewReader") and call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "XzNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `compress/gzip` package. + * + * `Reader.Read` already modeled. + */ + module CompressGzipBombs { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("compress/gzip", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "GzipNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/klauspost/pgzip` package. + * + * `Reader.Read`, `Reader.WriteTo` already modeled. + */ + module KlauspostPgzip { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/klauspost/pgzip", "NewReader") and + call = f.getACall() and + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "PgzipNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/klauspost/compress/gzip` package. + * + * `Reader.Read`, `Reader.WriteTo` already modeled. + */ + module KlauspostGzip { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/klauspost/compress/gzip", "NewReader") and + call = f.getACall() and + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "GzipNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `compress/bzip2` package. + * + * `Reader.Read` already modeled. + */ + module CompressBzip2 { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("compress/bzip2", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "Bzip2NewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/dsnet/compress/bzip2` package. + * + * `Reader.Read` already modeled. + */ + module DsnetBzip2 { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/dsnet/compress/bzip2", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "Bzip2NewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/dsnet/compress/flate` package. + * + * `Reader.Read` already modeled. + */ + module DsnetFlate { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/dsnet/compress/flate", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "FlateNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `compress/flate` package. + * + * `Reader.Read` already modeled. + */ + module CompressFlate { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("compress/flate", ["NewReaderDict", "NewReader"]) and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "FlateNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/klauspost/compress/flate` package. + * + * `Reader.Read` already modeled. + */ + module KlauspostFlate { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/klauspost/compress/flate", ["NewReaderDict", "NewReader"]) and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "FlateNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/klauspost/compress/zlib` package. + * + * `Reader.Read` already modeled. + */ + module KlauspostZlib { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/klauspost/compress/zlib", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "ZlibNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `compress/zlib` package. + * + * `Reader.Read` already modeled. + */ + module CompressZlibBombs { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("compress/zlib", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "ZlibNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/golang/snappy` package. + * + * `Reader.Read`, `Reader.ReadByte` already modeled. + */ + module GolangSnappy { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/golang/snappy", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "SnappyNewReader" + ) + } + } + } + + /** + * Provides decompression bombs sinks and additional flow steps for `github.com/klauspost/compress/snappy` package. + * + * `Reader.Read`, `Reader.ReadByte` already modeled. + */ + module KlauspostSnappy { + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/klauspost/compress/snappy", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "SnappyNewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks and additional flow steps for `github.com/klauspost/compress/s2` package. + * + * `Reader.Read`, `Reader.ReadByte` already modeled. + */ + module KlauspostS2 { + class TheSink extends Sink { + TheSink() { + exists(Method m, DataFlow::CallNode cn | + m.hasQualifiedName("github.com/klauspost/compress/s2", "Reader", "DecodeConcurrent") and + cn = m.getACall() + | + this = cn.getReceiver() and + not hasFlowToComparison(cn.getResult(0)) + ) + } + } + + class TheAdditionalTaintStep extends AdditionalTaintStep { + TheAdditionalTaintStep() { this = "AdditionalTaintStep" } + + override predicate isAdditionalFlowStep( + DataFlow::Node fromNode, FlowState fromState, DataFlow::Node toNode, FlowState toState + ) { + exists(Function f, DataFlow::CallNode call | + f.hasQualifiedName("github.com/klauspost/compress/s2", "NewReader") and + call = f.getACall() + | + fromNode = call.getArgument(0) and + toNode = call.getResult(0) and + fromState = "" and + toState = "S2NewReader" + ) + } + } + } + + /** + * Provides decompression bomb sinks for packages that use some standard IO interfaces/methods for reading decompressed data + */ + class GeneralReadIoSink extends Sink { + GeneralReadIoSink() { + exists(Function f, DataFlow::CallNode cn | + f.hasQualifiedName("io", "CopyN") and cn = f.getACall() + | + this = cn.getArgument(1) and + not hasFlowToComparison(cn.getResult(0)) + ) + or + exists(Method m, DataFlow::CallNode cn | + ( + m.implements("io", "Reader", "Read") or + m.implements("io", "ByteReader", "ReadByte") or + m.implements("io", "WriterTo", "WriteTo") + ) and + cn = m.getACall() + | + this = cn.getReceiver() and + not hasFlowToComparison(cn.getResult(0)) + ) + or + exists(Function f | f.hasQualifiedName("io", ["Copy", "CopyBuffer"]) | + this = f.getACall().getArgument(1) + ) + or + exists(Function f | f.hasQualifiedName("io", ["Pipe", "ReadAll", "ReadAtLeast", "ReadFull"]) | + this = f.getACall().getArgument(0) + ) + or + exists(Method m | + m.hasQualifiedName("bufio", "Reader", + ["ReadBytes", "ReadByte", "ReadLine", "ReadRune", "ReadSlice", "ReadString"]) + | + this = m.getACall().getReceiver() + ) + or + exists(Method m, DataFlow::CallNode cn | + m.hasQualifiedName("bufio", "Reader", ["Read", "WriteTo"]) and + cn = m.getACall() + | + this = cn.getReceiver() and + not hasFlowToComparison(cn.getResult(0)) + ) + or + exists(Method m | m.hasQualifiedName("bufio", "Scanner", ["Text", "Bytes"]) | + this = m.getACall().getReceiver() + ) + or + exists(Function f | f.hasQualifiedName("io/ioutil", "ReadAll") | + this = f.getACall().getArgument(0) + ) + } + } + + /** + * Holds if the value of `n` flow into a comparison (<, >, <=, >=). + */ + predicate hasFlowToComparison(DataFlow::Node n) { + localStep*(n, any(DataFlow::RelationalComparisonNode rcn).getAnOperand()) + } + + /** + * Holds if the value of `pred` can flow into `succ` in one step through an + * arithmetic operation (other than remainder). + * + * Note: this predicate is copied from AllocationSizeOverflow. When this query + * is promoted it should be put in a shared location. + */ + predicate additionalStep(DataFlow::Node pred, DataFlow::Node succ) { + succ.asExpr().(ArithmeticExpr).getAnOperand() = pred.asExpr() and + not succ.asExpr() instanceof RemExpr + } + + /** + * Holds if the value of `pred` can flow into `succ` in one step, either by a standard taint step + * or by an additional step. + * + * Note: this predicate is copied from AllocationSizeOverflow. When this query + * is promoted it should be put in a shared location. + */ + predicate localStep(DataFlow::Node pred, DataFlow::Node succ) { + TaintTracking::localTaintStep(pred, succ) or + additionalStep(pred, succ) + } +} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.expected b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.expected new file mode 100644 index 00000000000..8ec8033d086 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.expected @@ -0,0 +1,2 @@ +testFailures +failures diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.ql b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.ql new file mode 100644 index 00000000000..f5422c2a507 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombTest.ql @@ -0,0 +1,19 @@ +import go +import TestUtilities.InlineExpectationsTest +import experimental.frameworks.DecompressionBombs::DecompressionBomb + +module TestDecompressionBombs implements TestSig { + string getARelevantTag() { result = "hasValueFlow" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "hasValueFlow" and + exists(DataFlow::Node sink | Flow::flowTo(sink) | + sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = sink.toString() and + value = "\"" + sink.toString() + "\"" + ) + } +} + +import MakeTest diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.expected b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.expected new file mode 100644 index 00000000000..5136387a80a --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.expected @@ -0,0 +1,435 @@ +edges +| test.go:59:16:59:44 | call to FormValue | test.go:128:20:128:27 | definition of filename | provenance | | +| test.go:60:15:60:26 | selection of Body | test.go:158:19:158:22 | definition of file | provenance | | +| test.go:61:24:61:35 | selection of Body | test.go:169:28:169:31 | definition of file | provenance | | +| test.go:62:13:62:24 | selection of Body | test.go:181:17:181:20 | definition of file | provenance | | +| test.go:64:8:64:19 | selection of Body | test.go:208:12:208:15 | definition of file | provenance | | +| test.go:66:8:66:19 | selection of Body | test.go:233:12:233:15 | definition of file | provenance | | +| test.go:68:17:68:28 | selection of Body | test.go:258:21:258:24 | definition of file | provenance | | +| test.go:70:13:70:24 | selection of Body | test.go:283:17:283:20 | definition of file | provenance | | +| test.go:72:16:72:27 | selection of Body | test.go:308:20:308:23 | definition of file | provenance | | +| test.go:74:7:74:18 | selection of Body | test.go:333:11:333:14 | definition of file | provenance | | +| test.go:76:9:76:20 | selection of Body | test.go:358:13:358:16 | definition of file | provenance | | +| test.go:78:18:78:29 | selection of Body | test.go:384:22:384:25 | definition of file | provenance | | +| test.go:80:5:80:16 | selection of Body | test.go:412:9:412:12 | definition of file | provenance | | +| test.go:82:7:82:18 | selection of Body | test.go:447:11:447:14 | definition of file | provenance | | +| test.go:84:15:84:26 | selection of Body | test.go:440:19:440:21 | definition of src | provenance | | +| test.go:85:16:85:27 | selection of Body | test.go:472:20:472:23 | definition of file | provenance | | +| test.go:87:16:87:27 | selection of Body | test.go:499:20:499:23 | definition of file | provenance | | +| test.go:89:17:89:28 | selection of Body | test.go:526:21:526:24 | definition of file | provenance | | +| test.go:91:15:91:26 | selection of Body | test.go:555:19:555:22 | definition of file | provenance | | +| test.go:93:5:93:16 | selection of Body | test.go:580:9:580:12 | definition of file | provenance | | +| test.go:128:20:128:27 | definition of filename | test.go:130:33:130:40 | filename | provenance | | +| test.go:128:20:128:27 | definition of filename | test.go:143:51:143:58 | filename | provenance | | +| test.go:130:2:130:41 | ... := ...[0] | test.go:132:12:132:12 | f | provenance | | +| test.go:130:33:130:40 | filename | test.go:130:2:130:41 | ... := ...[0] | provenance | | +| test.go:132:3:132:19 | ... := ...[0] | test.go:134:37:134:38 | rc | provenance | | +| test.go:132:12:132:12 | f | test.go:132:3:132:19 | ... := ...[0] | provenance | | +| test.go:143:2:143:59 | ... := ...[0] | test.go:144:20:144:37 | implicit dereference | provenance | | +| test.go:143:51:143:58 | filename | test.go:143:2:143:59 | ... := ...[0] | provenance | | +| test.go:144:20:144:37 | implicit dereference | test.go:144:20:144:37 | implicit dereference | provenance | | +| test.go:144:20:144:37 | implicit dereference | test.go:144:20:144:37 | implicit read of field Reader | provenance | | +| test.go:144:20:144:37 | implicit read of field Reader | test.go:145:12:145:12 | f | provenance | | +| test.go:145:12:145:12 | f | test.go:145:12:145:19 | call to Open | provenance | | +| test.go:145:12:145:19 | call to Open | test.go:147:37:147:38 | rc | provenance | | +| test.go:158:19:158:22 | definition of file | test.go:159:25:159:28 | file | provenance | | +| test.go:159:2:159:29 | ... := ...[0] | test.go:160:48:160:52 | file1 | provenance | | +| test.go:159:25:159:28 | file | test.go:159:2:159:29 | ... := ...[0] | provenance | | +| test.go:160:2:160:69 | ... := ...[0] | test.go:163:26:163:29 | file | provenance | | +| test.go:160:32:160:53 | call to NewReader | test.go:160:2:160:69 | ... := ...[0] | provenance | | +| test.go:160:48:160:52 | file1 | test.go:160:32:160:53 | call to NewReader | provenance | | +| test.go:163:3:163:36 | ... := ...[0] | test.go:164:36:164:51 | fileReaderCloser | provenance | | +| test.go:163:26:163:29 | file | test.go:163:3:163:36 | ... := ...[0] | provenance | | +| test.go:169:28:169:31 | definition of file | test.go:170:25:170:28 | file | provenance | | +| test.go:170:2:170:29 | ... := ...[0] | test.go:171:57:171:61 | file2 | provenance | | +| test.go:170:25:170:28 | file | test.go:170:2:170:29 | ... := ...[0] | provenance | | +| test.go:171:2:171:78 | ... := ...[0] | test.go:175:26:175:29 | file | provenance | | +| test.go:171:41:171:62 | call to NewReader | test.go:171:2:171:78 | ... := ...[0] | provenance | | +| test.go:171:57:171:61 | file2 | test.go:171:41:171:62 | call to NewReader | provenance | | +| test.go:175:26:175:29 | file | test.go:175:26:175:36 | call to Open | provenance | | +| test.go:175:26:175:36 | call to Open | test.go:176:36:176:51 | fileReaderCloser | provenance | | +| test.go:181:17:181:20 | definition of file | test.go:184:41:184:44 | file | provenance | | +| test.go:184:2:184:73 | ... := ...[0] | test.go:186:2:186:12 | bzip2Reader | provenance | | +| test.go:184:2:184:73 | ... := ...[0] | test.go:187:26:187:36 | bzip2Reader | provenance | | +| test.go:184:41:184:44 | file | test.go:184:2:184:73 | ... := ...[0] | provenance | | +| test.go:187:12:187:37 | call to NewReader | test.go:189:18:189:24 | tarRead | provenance | | +| test.go:187:26:187:36 | bzip2Reader | test.go:187:12:187:37 | call to NewReader | provenance | | +| test.go:189:18:189:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:208:12:208:15 | definition of file | test.go:211:33:211:36 | file | provenance | | +| test.go:211:17:211:37 | call to NewReader | test.go:213:2:213:12 | bzip2Reader | provenance | | +| test.go:211:17:211:37 | call to NewReader | test.go:214:26:214:36 | bzip2Reader | provenance | | +| test.go:211:33:211:36 | file | test.go:211:17:211:37 | call to NewReader | provenance | | +| test.go:214:12:214:37 | call to NewReader | test.go:216:18:216:24 | tarRead | provenance | | +| test.go:214:26:214:36 | bzip2Reader | test.go:214:12:214:37 | call to NewReader | provenance | | +| test.go:216:18:216:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:233:12:233:15 | definition of file | test.go:236:33:236:36 | file | provenance | | +| test.go:236:17:236:37 | call to NewReader | test.go:238:2:238:12 | flateReader | provenance | | +| test.go:236:17:236:37 | call to NewReader | test.go:239:26:239:36 | flateReader | provenance | | +| test.go:236:33:236:36 | file | test.go:236:17:236:37 | call to NewReader | provenance | | +| test.go:239:12:239:37 | call to NewReader | test.go:241:18:241:24 | tarRead | provenance | | +| test.go:239:26:239:36 | flateReader | test.go:239:12:239:37 | call to NewReader | provenance | | +| test.go:241:18:241:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:258:21:258:24 | definition of file | test.go:261:42:261:45 | file | provenance | | +| test.go:261:17:261:46 | call to NewReader | test.go:263:2:263:12 | flateReader | provenance | | +| test.go:261:17:261:46 | call to NewReader | test.go:264:26:264:36 | flateReader | provenance | | +| test.go:261:42:261:45 | file | test.go:261:17:261:46 | call to NewReader | provenance | | +| test.go:264:12:264:37 | call to NewReader | test.go:266:18:266:24 | tarRead | provenance | | +| test.go:264:26:264:36 | flateReader | test.go:264:12:264:37 | call to NewReader | provenance | | +| test.go:266:18:266:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:283:17:283:20 | definition of file | test.go:286:41:286:44 | file | provenance | | +| test.go:286:2:286:73 | ... := ...[0] | test.go:288:2:288:12 | flateReader | provenance | | +| test.go:286:2:286:73 | ... := ...[0] | test.go:289:26:289:36 | flateReader | provenance | | +| test.go:286:41:286:44 | file | test.go:286:2:286:73 | ... := ...[0] | provenance | | +| test.go:289:12:289:37 | call to NewReader | test.go:291:18:291:24 | tarRead | provenance | | +| test.go:289:26:289:36 | flateReader | test.go:289:12:289:37 | call to NewReader | provenance | | +| test.go:291:18:291:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:308:20:308:23 | definition of file | test.go:311:43:311:46 | file | provenance | | +| test.go:311:2:311:47 | ... := ...[0] | test.go:313:2:313:11 | zlibReader | provenance | | +| test.go:311:2:311:47 | ... := ...[0] | test.go:314:26:314:35 | zlibReader | provenance | | +| test.go:311:43:311:46 | file | test.go:311:2:311:47 | ... := ...[0] | provenance | | +| test.go:314:12:314:36 | call to NewReader | test.go:316:18:316:24 | tarRead | provenance | | +| test.go:314:26:314:35 | zlibReader | test.go:314:12:314:36 | call to NewReader | provenance | | +| test.go:316:18:316:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:333:11:333:14 | definition of file | test.go:336:34:336:37 | file | provenance | | +| test.go:336:2:336:38 | ... := ...[0] | test.go:338:2:338:11 | zlibReader | provenance | | +| test.go:336:2:336:38 | ... := ...[0] | test.go:339:26:339:35 | zlibReader | provenance | | +| test.go:336:34:336:37 | file | test.go:336:2:336:38 | ... := ...[0] | provenance | | +| test.go:339:12:339:36 | call to NewReader | test.go:341:18:341:24 | tarRead | provenance | | +| test.go:339:26:339:35 | zlibReader | test.go:339:12:339:36 | call to NewReader | provenance | | +| test.go:341:18:341:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:358:13:358:16 | definition of file | test.go:361:35:361:38 | file | provenance | | +| test.go:361:18:361:39 | call to NewReader | test.go:363:2:363:13 | snappyReader | provenance | | +| test.go:361:18:361:39 | call to NewReader | test.go:364:2:364:13 | snappyReader | provenance | | +| test.go:361:18:361:39 | call to NewReader | test.go:365:26:365:37 | snappyReader | provenance | | +| test.go:361:35:361:38 | file | test.go:361:18:361:39 | call to NewReader | provenance | | +| test.go:365:12:365:38 | call to NewReader | test.go:367:18:367:24 | tarRead | provenance | | +| test.go:365:26:365:37 | snappyReader | test.go:365:12:365:38 | call to NewReader | provenance | | +| test.go:367:18:367:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:384:22:384:25 | definition of file | test.go:387:44:387:47 | file | provenance | | +| test.go:387:18:387:48 | call to NewReader | test.go:389:2:389:13 | snappyReader | provenance | | +| test.go:387:18:387:48 | call to NewReader | test.go:391:2:391:13 | snappyReader | provenance | | +| test.go:387:18:387:48 | call to NewReader | test.go:392:2:392:13 | snappyReader | provenance | | +| test.go:387:18:387:48 | call to NewReader | test.go:393:26:393:37 | snappyReader | provenance | | +| test.go:387:44:387:47 | file | test.go:387:18:387:48 | call to NewReader | provenance | | +| test.go:393:12:393:38 | call to NewReader | test.go:395:18:395:24 | tarRead | provenance | | +| test.go:393:26:393:37 | snappyReader | test.go:393:12:393:38 | call to NewReader | provenance | | +| test.go:395:18:395:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:412:9:412:12 | definition of file | test.go:415:27:415:30 | file | provenance | | +| test.go:415:14:415:31 | call to NewReader | test.go:417:2:417:9 | s2Reader | provenance | | +| test.go:415:14:415:31 | call to NewReader | test.go:418:2:418:9 | s2Reader | provenance | | +| test.go:415:14:415:31 | call to NewReader | test.go:420:2:420:9 | s2Reader | provenance | | +| test.go:415:14:415:31 | call to NewReader | test.go:421:26:421:33 | s2Reader | provenance | | +| test.go:415:27:415:30 | file | test.go:415:14:415:31 | call to NewReader | provenance | | +| test.go:421:12:421:34 | call to NewReader | test.go:423:18:423:24 | tarRead | provenance | | +| test.go:421:26:421:33 | s2Reader | test.go:421:12:421:34 | call to NewReader | provenance | | +| test.go:423:18:423:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:440:19:440:21 | definition of src | test.go:441:34:441:36 | src | provenance | | +| test.go:441:2:441:37 | ... := ...[0] | test.go:444:12:444:32 | type conversion | provenance | | +| test.go:441:34:441:36 | src | test.go:441:2:441:37 | ... := ...[0] | provenance | | +| test.go:444:12:444:32 | type conversion | test.go:445:23:445:28 | newSrc | provenance | | +| test.go:447:11:447:14 | definition of file | test.go:450:34:450:37 | file | provenance | | +| test.go:450:2:450:38 | ... := ...[0] | test.go:452:2:452:11 | gzipReader | provenance | | +| test.go:450:2:450:38 | ... := ...[0] | test.go:453:26:453:35 | gzipReader | provenance | | +| test.go:450:34:450:37 | file | test.go:450:2:450:38 | ... := ...[0] | provenance | | +| test.go:453:12:453:36 | call to NewReader | test.go:455:18:455:24 | tarRead | provenance | | +| test.go:453:26:453:35 | gzipReader | test.go:453:12:453:36 | call to NewReader | provenance | | +| test.go:455:18:455:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:472:20:472:23 | definition of file | test.go:475:43:475:46 | file | provenance | | +| test.go:475:2:475:47 | ... := ...[0] | test.go:477:2:477:11 | gzipReader | provenance | | +| test.go:475:2:475:47 | ... := ...[0] | test.go:479:2:479:11 | gzipReader | provenance | | +| test.go:475:2:475:47 | ... := ...[0] | test.go:480:26:480:35 | gzipReader | provenance | | +| test.go:475:43:475:46 | file | test.go:475:2:475:47 | ... := ...[0] | provenance | | +| test.go:480:12:480:36 | call to NewReader | test.go:482:18:482:24 | tarRead | provenance | | +| test.go:480:26:480:35 | gzipReader | test.go:480:12:480:36 | call to NewReader | provenance | | +| test.go:482:18:482:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:499:20:499:23 | definition of file | test.go:502:45:502:48 | file | provenance | | +| test.go:502:2:502:49 | ... := ...[0] | test.go:504:2:504:12 | pgzipReader | provenance | | +| test.go:502:2:502:49 | ... := ...[0] | test.go:506:2:506:12 | pgzipReader | provenance | | +| test.go:502:2:502:49 | ... := ...[0] | test.go:507:26:507:36 | pgzipReader | provenance | | +| test.go:502:45:502:48 | file | test.go:502:2:502:49 | ... := ...[0] | provenance | | +| test.go:507:12:507:37 | call to NewReader | test.go:509:18:509:24 | tarRead | provenance | | +| test.go:507:26:507:36 | pgzipReader | test.go:507:12:507:37 | call to NewReader | provenance | | +| test.go:509:18:509:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:526:21:526:24 | definition of file | test.go:529:43:529:46 | file | provenance | | +| test.go:529:2:529:47 | ... := ...[0] | test.go:531:2:531:11 | zstdReader | provenance | | +| test.go:529:2:529:47 | ... := ...[0] | test.go:533:2:533:11 | zstdReader | provenance | | +| test.go:529:2:529:47 | ... := ...[0] | test.go:535:2:535:11 | zstdReader | provenance | | +| test.go:529:2:529:47 | ... := ...[0] | test.go:536:26:536:35 | zstdReader | provenance | | +| test.go:529:43:529:46 | file | test.go:529:2:529:47 | ... := ...[0] | provenance | | +| test.go:536:12:536:36 | call to NewReader | test.go:538:18:538:24 | tarRead | provenance | | +| test.go:536:26:536:35 | zstdReader | test.go:536:12:536:36 | call to NewReader | provenance | | +| test.go:538:18:538:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:555:19:555:22 | definition of file | test.go:558:38:558:41 | file | provenance | | +| test.go:558:16:558:42 | call to NewReader | test.go:560:2:560:11 | zstdReader | provenance | | +| test.go:558:16:558:42 | call to NewReader | test.go:561:26:561:35 | zstdReader | provenance | | +| test.go:558:38:558:41 | file | test.go:558:16:558:42 | call to NewReader | provenance | | +| test.go:561:12:561:36 | call to NewReader | test.go:563:18:563:24 | tarRead | provenance | | +| test.go:561:26:561:35 | zstdReader | test.go:561:12:561:36 | call to NewReader | provenance | | +| test.go:563:18:563:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:580:9:580:12 | definition of file | test.go:583:30:583:33 | file | provenance | | +| test.go:583:2:583:34 | ... := ...[0] | test.go:585:2:585:9 | xzReader | provenance | | +| test.go:583:2:583:34 | ... := ...[0] | test.go:586:26:586:33 | xzReader | provenance | | +| test.go:583:30:583:33 | file | test.go:583:2:583:34 | ... := ...[0] | provenance | | +| test.go:586:12:586:34 | call to NewReader | test.go:589:18:589:24 | tarRead | provenance | | +| test.go:586:12:586:34 | call to NewReader | test.go:590:19:590:25 | tarRead | provenance | | +| test.go:586:26:586:33 | xzReader | test.go:586:12:586:34 | call to NewReader | provenance | | +| test.go:589:18:589:24 | tarRead | test.go:611:22:611:28 | definition of tarRead | provenance | | +| test.go:590:19:590:25 | tarRead | test.go:627:23:627:29 | definition of tarRead | provenance | | +| test.go:611:22:611:28 | definition of tarRead | test.go:621:25:621:31 | tarRead | provenance | | +| test.go:611:22:611:28 | definition of tarRead | test.go:621:25:621:31 | tarRead | provenance | | +| test.go:611:22:611:28 | definition of tarRead | test.go:621:25:621:31 | tarRead | provenance | | +| test.go:611:22:611:28 | definition of tarRead | test.go:621:25:621:31 | tarRead | provenance | | +| test.go:611:22:611:28 | definition of tarRead | test.go:621:25:621:31 | tarRead | provenance | | +| test.go:611:22:611:28 | definition of tarRead | test.go:621:25:621:31 | tarRead | provenance | | +| test.go:611:22:611:28 | definition of tarRead | test.go:621:25:621:31 | tarRead | provenance | | +| test.go:611:22:611:28 | definition of tarRead | test.go:621:25:621:31 | tarRead | provenance | | +| test.go:611:22:611:28 | definition of tarRead | test.go:621:25:621:31 | tarRead | provenance | | +| test.go:627:23:627:29 | definition of tarRead | test.go:629:2:629:8 | tarRead | provenance | | +nodes +| test.go:59:16:59:44 | call to FormValue | semmle.label | call to FormValue | +| test.go:60:15:60:26 | selection of Body | semmle.label | selection of Body | +| test.go:61:24:61:35 | selection of Body | semmle.label | selection of Body | +| test.go:62:13:62:24 | selection of Body | semmle.label | selection of Body | +| test.go:64:8:64:19 | selection of Body | semmle.label | selection of Body | +| test.go:66:8:66:19 | selection of Body | semmle.label | selection of Body | +| test.go:68:17:68:28 | selection of Body | semmle.label | selection of Body | +| test.go:70:13:70:24 | selection of Body | semmle.label | selection of Body | +| test.go:72:16:72:27 | selection of Body | semmle.label | selection of Body | +| test.go:74:7:74:18 | selection of Body | semmle.label | selection of Body | +| test.go:76:9:76:20 | selection of Body | semmle.label | selection of Body | +| test.go:78:18:78:29 | selection of Body | semmle.label | selection of Body | +| test.go:80:5:80:16 | selection of Body | semmle.label | selection of Body | +| test.go:82:7:82:18 | selection of Body | semmle.label | selection of Body | +| test.go:84:15:84:26 | selection of Body | semmle.label | selection of Body | +| test.go:85:16:85:27 | selection of Body | semmle.label | selection of Body | +| test.go:87:16:87:27 | selection of Body | semmle.label | selection of Body | +| test.go:89:17:89:28 | selection of Body | semmle.label | selection of Body | +| test.go:91:15:91:26 | selection of Body | semmle.label | selection of Body | +| test.go:93:5:93:16 | selection of Body | semmle.label | selection of Body | +| test.go:128:20:128:27 | definition of filename | semmle.label | definition of filename | +| test.go:130:2:130:41 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:130:33:130:40 | filename | semmle.label | filename | +| test.go:132:3:132:19 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:132:12:132:12 | f | semmle.label | f | +| test.go:134:37:134:38 | rc | semmle.label | rc | +| test.go:143:2:143:59 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:143:51:143:58 | filename | semmle.label | filename | +| test.go:144:20:144:37 | implicit dereference | semmle.label | implicit dereference | +| test.go:144:20:144:37 | implicit read of field Reader | semmle.label | implicit read of field Reader | +| test.go:145:12:145:12 | f | semmle.label | f | +| test.go:145:12:145:19 | call to Open | semmle.label | call to Open | +| test.go:147:37:147:38 | rc | semmle.label | rc | +| test.go:158:19:158:22 | definition of file | semmle.label | definition of file | +| test.go:159:2:159:29 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:159:25:159:28 | file | semmle.label | file | +| test.go:160:2:160:69 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:160:32:160:53 | call to NewReader | semmle.label | call to NewReader | +| test.go:160:48:160:52 | file1 | semmle.label | file1 | +| test.go:163:3:163:36 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:163:26:163:29 | file | semmle.label | file | +| test.go:164:36:164:51 | fileReaderCloser | semmle.label | fileReaderCloser | +| test.go:169:28:169:31 | definition of file | semmle.label | definition of file | +| test.go:170:2:170:29 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:170:25:170:28 | file | semmle.label | file | +| test.go:171:2:171:78 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:171:41:171:62 | call to NewReader | semmle.label | call to NewReader | +| test.go:171:57:171:61 | file2 | semmle.label | file2 | +| test.go:175:26:175:29 | file | semmle.label | file | +| test.go:175:26:175:36 | call to Open | semmle.label | call to Open | +| test.go:176:36:176:51 | fileReaderCloser | semmle.label | fileReaderCloser | +| test.go:181:17:181:20 | definition of file | semmle.label | definition of file | +| test.go:184:2:184:73 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:184:41:184:44 | file | semmle.label | file | +| test.go:186:2:186:12 | bzip2Reader | semmle.label | bzip2Reader | +| test.go:187:12:187:37 | call to NewReader | semmle.label | call to NewReader | +| test.go:187:26:187:36 | bzip2Reader | semmle.label | bzip2Reader | +| test.go:189:18:189:24 | tarRead | semmle.label | tarRead | +| test.go:208:12:208:15 | definition of file | semmle.label | definition of file | +| test.go:211:17:211:37 | call to NewReader | semmle.label | call to NewReader | +| test.go:211:33:211:36 | file | semmle.label | file | +| test.go:213:2:213:12 | bzip2Reader | semmle.label | bzip2Reader | +| test.go:214:12:214:37 | call to NewReader | semmle.label | call to NewReader | +| test.go:214:26:214:36 | bzip2Reader | semmle.label | bzip2Reader | +| test.go:216:18:216:24 | tarRead | semmle.label | tarRead | +| test.go:233:12:233:15 | definition of file | semmle.label | definition of file | +| test.go:236:17:236:37 | call to NewReader | semmle.label | call to NewReader | +| test.go:236:33:236:36 | file | semmle.label | file | +| test.go:238:2:238:12 | flateReader | semmle.label | flateReader | +| test.go:239:12:239:37 | call to NewReader | semmle.label | call to NewReader | +| test.go:239:26:239:36 | flateReader | semmle.label | flateReader | +| test.go:241:18:241:24 | tarRead | semmle.label | tarRead | +| test.go:258:21:258:24 | definition of file | semmle.label | definition of file | +| test.go:261:17:261:46 | call to NewReader | semmle.label | call to NewReader | +| test.go:261:42:261:45 | file | semmle.label | file | +| test.go:263:2:263:12 | flateReader | semmle.label | flateReader | +| test.go:264:12:264:37 | call to NewReader | semmle.label | call to NewReader | +| test.go:264:26:264:36 | flateReader | semmle.label | flateReader | +| test.go:266:18:266:24 | tarRead | semmle.label | tarRead | +| test.go:283:17:283:20 | definition of file | semmle.label | definition of file | +| test.go:286:2:286:73 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:286:41:286:44 | file | semmle.label | file | +| test.go:288:2:288:12 | flateReader | semmle.label | flateReader | +| test.go:289:12:289:37 | call to NewReader | semmle.label | call to NewReader | +| test.go:289:26:289:36 | flateReader | semmle.label | flateReader | +| test.go:291:18:291:24 | tarRead | semmle.label | tarRead | +| test.go:308:20:308:23 | definition of file | semmle.label | definition of file | +| test.go:311:2:311:47 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:311:43:311:46 | file | semmle.label | file | +| test.go:313:2:313:11 | zlibReader | semmle.label | zlibReader | +| test.go:314:12:314:36 | call to NewReader | semmle.label | call to NewReader | +| test.go:314:26:314:35 | zlibReader | semmle.label | zlibReader | +| test.go:316:18:316:24 | tarRead | semmle.label | tarRead | +| test.go:333:11:333:14 | definition of file | semmle.label | definition of file | +| test.go:336:2:336:38 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:336:34:336:37 | file | semmle.label | file | +| test.go:338:2:338:11 | zlibReader | semmle.label | zlibReader | +| test.go:339:12:339:36 | call to NewReader | semmle.label | call to NewReader | +| test.go:339:26:339:35 | zlibReader | semmle.label | zlibReader | +| test.go:341:18:341:24 | tarRead | semmle.label | tarRead | +| test.go:358:13:358:16 | definition of file | semmle.label | definition of file | +| test.go:361:18:361:39 | call to NewReader | semmle.label | call to NewReader | +| test.go:361:35:361:38 | file | semmle.label | file | +| test.go:363:2:363:13 | snappyReader | semmle.label | snappyReader | +| test.go:364:2:364:13 | snappyReader | semmle.label | snappyReader | +| test.go:365:12:365:38 | call to NewReader | semmle.label | call to NewReader | +| test.go:365:26:365:37 | snappyReader | semmle.label | snappyReader | +| test.go:367:18:367:24 | tarRead | semmle.label | tarRead | +| test.go:384:22:384:25 | definition of file | semmle.label | definition of file | +| test.go:387:18:387:48 | call to NewReader | semmle.label | call to NewReader | +| test.go:387:44:387:47 | file | semmle.label | file | +| test.go:389:2:389:13 | snappyReader | semmle.label | snappyReader | +| test.go:391:2:391:13 | snappyReader | semmle.label | snappyReader | +| test.go:392:2:392:13 | snappyReader | semmle.label | snappyReader | +| test.go:393:12:393:38 | call to NewReader | semmle.label | call to NewReader | +| test.go:393:26:393:37 | snappyReader | semmle.label | snappyReader | +| test.go:395:18:395:24 | tarRead | semmle.label | tarRead | +| test.go:412:9:412:12 | definition of file | semmle.label | definition of file | +| test.go:415:14:415:31 | call to NewReader | semmle.label | call to NewReader | +| test.go:415:27:415:30 | file | semmle.label | file | +| test.go:417:2:417:9 | s2Reader | semmle.label | s2Reader | +| test.go:418:2:418:9 | s2Reader | semmle.label | s2Reader | +| test.go:420:2:420:9 | s2Reader | semmle.label | s2Reader | +| test.go:421:12:421:34 | call to NewReader | semmle.label | call to NewReader | +| test.go:421:26:421:33 | s2Reader | semmle.label | s2Reader | +| test.go:423:18:423:24 | tarRead | semmle.label | tarRead | +| test.go:440:19:440:21 | definition of src | semmle.label | definition of src | +| test.go:441:2:441:37 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:441:34:441:36 | src | semmle.label | src | +| test.go:444:12:444:32 | type conversion | semmle.label | type conversion | +| test.go:445:23:445:28 | newSrc | semmle.label | newSrc | +| test.go:447:11:447:14 | definition of file | semmle.label | definition of file | +| test.go:450:2:450:38 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:450:34:450:37 | file | semmle.label | file | +| test.go:452:2:452:11 | gzipReader | semmle.label | gzipReader | +| test.go:453:12:453:36 | call to NewReader | semmle.label | call to NewReader | +| test.go:453:26:453:35 | gzipReader | semmle.label | gzipReader | +| test.go:455:18:455:24 | tarRead | semmle.label | tarRead | +| test.go:472:20:472:23 | definition of file | semmle.label | definition of file | +| test.go:475:2:475:47 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:475:43:475:46 | file | semmle.label | file | +| test.go:477:2:477:11 | gzipReader | semmle.label | gzipReader | +| test.go:479:2:479:11 | gzipReader | semmle.label | gzipReader | +| test.go:480:12:480:36 | call to NewReader | semmle.label | call to NewReader | +| test.go:480:26:480:35 | gzipReader | semmle.label | gzipReader | +| test.go:482:18:482:24 | tarRead | semmle.label | tarRead | +| test.go:499:20:499:23 | definition of file | semmle.label | definition of file | +| test.go:502:2:502:49 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:502:45:502:48 | file | semmle.label | file | +| test.go:504:2:504:12 | pgzipReader | semmle.label | pgzipReader | +| test.go:506:2:506:12 | pgzipReader | semmle.label | pgzipReader | +| test.go:507:12:507:37 | call to NewReader | semmle.label | call to NewReader | +| test.go:507:26:507:36 | pgzipReader | semmle.label | pgzipReader | +| test.go:509:18:509:24 | tarRead | semmle.label | tarRead | +| test.go:526:21:526:24 | definition of file | semmle.label | definition of file | +| test.go:529:2:529:47 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:529:43:529:46 | file | semmle.label | file | +| test.go:531:2:531:11 | zstdReader | semmle.label | zstdReader | +| test.go:533:2:533:11 | zstdReader | semmle.label | zstdReader | +| test.go:535:2:535:11 | zstdReader | semmle.label | zstdReader | +| test.go:536:12:536:36 | call to NewReader | semmle.label | call to NewReader | +| test.go:536:26:536:35 | zstdReader | semmle.label | zstdReader | +| test.go:538:18:538:24 | tarRead | semmle.label | tarRead | +| test.go:555:19:555:22 | definition of file | semmle.label | definition of file | +| test.go:558:16:558:42 | call to NewReader | semmle.label | call to NewReader | +| test.go:558:38:558:41 | file | semmle.label | file | +| test.go:560:2:560:11 | zstdReader | semmle.label | zstdReader | +| test.go:561:12:561:36 | call to NewReader | semmle.label | call to NewReader | +| test.go:561:26:561:35 | zstdReader | semmle.label | zstdReader | +| test.go:563:18:563:24 | tarRead | semmle.label | tarRead | +| test.go:580:9:580:12 | definition of file | semmle.label | definition of file | +| test.go:583:2:583:34 | ... := ...[0] | semmle.label | ... := ...[0] | +| test.go:583:30:583:33 | file | semmle.label | file | +| test.go:585:2:585:9 | xzReader | semmle.label | xzReader | +| test.go:586:12:586:34 | call to NewReader | semmle.label | call to NewReader | +| test.go:586:26:586:33 | xzReader | semmle.label | xzReader | +| test.go:589:18:589:24 | tarRead | semmle.label | tarRead | +| test.go:590:19:590:25 | tarRead | semmle.label | tarRead | +| test.go:611:22:611:28 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:611:22:611:28 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:611:22:611:28 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:611:22:611:28 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:611:22:611:28 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:611:22:611:28 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:611:22:611:28 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:611:22:611:28 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:611:22:611:28 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:621:25:621:31 | tarRead | semmle.label | tarRead | +| test.go:621:25:621:31 | tarRead | semmle.label | tarRead | +| test.go:621:25:621:31 | tarRead | semmle.label | tarRead | +| test.go:621:25:621:31 | tarRead | semmle.label | tarRead | +| test.go:621:25:621:31 | tarRead | semmle.label | tarRead | +| test.go:621:25:621:31 | tarRead | semmle.label | tarRead | +| test.go:621:25:621:31 | tarRead | semmle.label | tarRead | +| test.go:621:25:621:31 | tarRead | semmle.label | tarRead | +| test.go:621:25:621:31 | tarRead | semmle.label | tarRead | +| test.go:627:23:627:29 | definition of tarRead | semmle.label | definition of tarRead | +| test.go:629:2:629:8 | tarRead | semmle.label | tarRead | +subpaths +#select +| test.go:134:37:134:38 | rc | test.go:59:16:59:44 | call to FormValue | test.go:134:37:134:38 | rc | This decompression is $@. | test.go:59:16:59:44 | call to FormValue | decompressing compressed data without managing output size | +| test.go:147:37:147:38 | rc | test.go:59:16:59:44 | call to FormValue | test.go:147:37:147:38 | rc | This decompression is $@. | test.go:59:16:59:44 | call to FormValue | decompressing compressed data without managing output size | +| test.go:164:36:164:51 | fileReaderCloser | test.go:60:15:60:26 | selection of Body | test.go:164:36:164:51 | fileReaderCloser | This decompression is $@. | test.go:60:15:60:26 | selection of Body | decompressing compressed data without managing output size | +| test.go:176:36:176:51 | fileReaderCloser | test.go:61:24:61:35 | selection of Body | test.go:176:36:176:51 | fileReaderCloser | This decompression is $@. | test.go:61:24:61:35 | selection of Body | decompressing compressed data without managing output size | +| test.go:186:2:186:12 | bzip2Reader | test.go:62:13:62:24 | selection of Body | test.go:186:2:186:12 | bzip2Reader | This decompression is $@. | test.go:62:13:62:24 | selection of Body | decompressing compressed data without managing output size | +| test.go:213:2:213:12 | bzip2Reader | test.go:64:8:64:19 | selection of Body | test.go:213:2:213:12 | bzip2Reader | This decompression is $@. | test.go:64:8:64:19 | selection of Body | decompressing compressed data without managing output size | +| test.go:238:2:238:12 | flateReader | test.go:66:8:66:19 | selection of Body | test.go:238:2:238:12 | flateReader | This decompression is $@. | test.go:66:8:66:19 | selection of Body | decompressing compressed data without managing output size | +| test.go:263:2:263:12 | flateReader | test.go:68:17:68:28 | selection of Body | test.go:263:2:263:12 | flateReader | This decompression is $@. | test.go:68:17:68:28 | selection of Body | decompressing compressed data without managing output size | +| test.go:288:2:288:12 | flateReader | test.go:70:13:70:24 | selection of Body | test.go:288:2:288:12 | flateReader | This decompression is $@. | test.go:70:13:70:24 | selection of Body | decompressing compressed data without managing output size | +| test.go:313:2:313:11 | zlibReader | test.go:72:16:72:27 | selection of Body | test.go:313:2:313:11 | zlibReader | This decompression is $@. | test.go:72:16:72:27 | selection of Body | decompressing compressed data without managing output size | +| test.go:338:2:338:11 | zlibReader | test.go:74:7:74:18 | selection of Body | test.go:338:2:338:11 | zlibReader | This decompression is $@. | test.go:74:7:74:18 | selection of Body | decompressing compressed data without managing output size | +| test.go:363:2:363:13 | snappyReader | test.go:76:9:76:20 | selection of Body | test.go:363:2:363:13 | snappyReader | This decompression is $@. | test.go:76:9:76:20 | selection of Body | decompressing compressed data without managing output size | +| test.go:364:2:364:13 | snappyReader | test.go:76:9:76:20 | selection of Body | test.go:364:2:364:13 | snappyReader | This decompression is $@. | test.go:76:9:76:20 | selection of Body | decompressing compressed data without managing output size | +| test.go:389:2:389:13 | snappyReader | test.go:78:18:78:29 | selection of Body | test.go:389:2:389:13 | snappyReader | This decompression is $@. | test.go:78:18:78:29 | selection of Body | decompressing compressed data without managing output size | +| test.go:391:2:391:13 | snappyReader | test.go:78:18:78:29 | selection of Body | test.go:391:2:391:13 | snappyReader | This decompression is $@. | test.go:78:18:78:29 | selection of Body | decompressing compressed data without managing output size | +| test.go:392:2:392:13 | snappyReader | test.go:78:18:78:29 | selection of Body | test.go:392:2:392:13 | snappyReader | This decompression is $@. | test.go:78:18:78:29 | selection of Body | decompressing compressed data without managing output size | +| test.go:417:2:417:9 | s2Reader | test.go:80:5:80:16 | selection of Body | test.go:417:2:417:9 | s2Reader | This decompression is $@. | test.go:80:5:80:16 | selection of Body | decompressing compressed data without managing output size | +| test.go:418:2:418:9 | s2Reader | test.go:80:5:80:16 | selection of Body | test.go:418:2:418:9 | s2Reader | This decompression is $@. | test.go:80:5:80:16 | selection of Body | decompressing compressed data without managing output size | +| test.go:420:2:420:9 | s2Reader | test.go:80:5:80:16 | selection of Body | test.go:420:2:420:9 | s2Reader | This decompression is $@. | test.go:80:5:80:16 | selection of Body | decompressing compressed data without managing output size | +| test.go:445:23:445:28 | newSrc | test.go:84:15:84:26 | selection of Body | test.go:445:23:445:28 | newSrc | This decompression is $@. | test.go:84:15:84:26 | selection of Body | decompressing compressed data without managing output size | +| test.go:452:2:452:11 | gzipReader | test.go:82:7:82:18 | selection of Body | test.go:452:2:452:11 | gzipReader | This decompression is $@. | test.go:82:7:82:18 | selection of Body | decompressing compressed data without managing output size | +| test.go:477:2:477:11 | gzipReader | test.go:85:16:85:27 | selection of Body | test.go:477:2:477:11 | gzipReader | This decompression is $@. | test.go:85:16:85:27 | selection of Body | decompressing compressed data without managing output size | +| test.go:479:2:479:11 | gzipReader | test.go:85:16:85:27 | selection of Body | test.go:479:2:479:11 | gzipReader | This decompression is $@. | test.go:85:16:85:27 | selection of Body | decompressing compressed data without managing output size | +| test.go:504:2:504:12 | pgzipReader | test.go:87:16:87:27 | selection of Body | test.go:504:2:504:12 | pgzipReader | This decompression is $@. | test.go:87:16:87:27 | selection of Body | decompressing compressed data without managing output size | +| test.go:506:2:506:12 | pgzipReader | test.go:87:16:87:27 | selection of Body | test.go:506:2:506:12 | pgzipReader | This decompression is $@. | test.go:87:16:87:27 | selection of Body | decompressing compressed data without managing output size | +| test.go:531:2:531:11 | zstdReader | test.go:89:17:89:28 | selection of Body | test.go:531:2:531:11 | zstdReader | This decompression is $@. | test.go:89:17:89:28 | selection of Body | decompressing compressed data without managing output size | +| test.go:533:2:533:11 | zstdReader | test.go:89:17:89:28 | selection of Body | test.go:533:2:533:11 | zstdReader | This decompression is $@. | test.go:89:17:89:28 | selection of Body | decompressing compressed data without managing output size | +| test.go:535:2:535:11 | zstdReader | test.go:89:17:89:28 | selection of Body | test.go:535:2:535:11 | zstdReader | This decompression is $@. | test.go:89:17:89:28 | selection of Body | decompressing compressed data without managing output size | +| test.go:560:2:560:11 | zstdReader | test.go:91:15:91:26 | selection of Body | test.go:560:2:560:11 | zstdReader | This decompression is $@. | test.go:91:15:91:26 | selection of Body | decompressing compressed data without managing output size | +| test.go:585:2:585:9 | xzReader | test.go:93:5:93:16 | selection of Body | test.go:585:2:585:9 | xzReader | This decompression is $@. | test.go:93:5:93:16 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:62:13:62:24 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:62:13:62:24 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:64:8:64:19 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:64:8:64:19 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:66:8:66:19 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:66:8:66:19 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:68:17:68:28 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:68:17:68:28 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:70:13:70:24 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:70:13:70:24 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:72:16:72:27 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:72:16:72:27 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:74:7:74:18 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:74:7:74:18 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:76:9:76:20 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:76:9:76:20 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:78:18:78:29 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:78:18:78:29 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:80:5:80:16 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:80:5:80:16 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:82:7:82:18 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:82:7:82:18 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:85:16:85:27 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:85:16:85:27 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:87:16:87:27 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:87:16:87:27 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:89:17:89:28 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:89:17:89:28 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:91:15:91:26 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:91:15:91:26 | selection of Body | decompressing compressed data without managing output size | +| test.go:621:25:621:31 | tarRead | test.go:93:5:93:16 | selection of Body | test.go:621:25:621:31 | tarRead | This decompression is $@. | test.go:93:5:93:16 | selection of Body | decompressing compressed data without managing output size | +| test.go:629:2:629:8 | tarRead | test.go:93:5:93:16 | selection of Body | test.go:629:2:629:8 | tarRead | This decompression is $@. | test.go:93:5:93:16 | selection of Body | decompressing compressed data without managing output size | diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qlref b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qlref new file mode 100644 index 00000000000..c24a4cc9678 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.qlref @@ -0,0 +1 @@ +experimental/CWE-522-DecompressionBombs/DecompressionBombs.ql \ No newline at end of file diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/go.mod b/go/ql/test/experimental/CWE-522-DecompressionBombs/go.mod new file mode 100644 index 00000000000..c72caac9fe7 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/go.mod @@ -0,0 +1,12 @@ +module Bombs + +go 1.20 + +require ( + github.com/DataDog/zstd v1.5.5 + github.com/dsnet/compress v0.0.1 + github.com/golang/snappy v0.0.4 + github.com/klauspost/compress v1.16.6 + github.com/klauspost/pgzip v1.2.6 + github.com/ulikunitz/xz v0.5.11 +) diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/test.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/test.go new file mode 100644 index 00000000000..dc359c387ac --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/test.go @@ -0,0 +1,655 @@ +package main + +//go:generate depstubber -vendor github.com/dsnet/compress/bzip2 Reader NewReader +//go:generate depstubber -vendor github.com/klauspost/compress/flate "" NewReader +//go:generate depstubber -vendor github.com/dsnet/compress/flate Reader NewReader +//go:generate depstubber -vendor github.com/klauspost/compress/zlib "" NewReader +//go:generate depstubber -vendor github.com/golang/snappy Reader NewReader +//go:generate depstubber -vendor github.com/klauspost/compress/snappy "" NewReader +//go:generate depstubber -vendor github.com/klauspost/compress/s2 Reader NewReader +//go:generate depstubber -vendor github.com/klauspost/compress/gzip Reader NewReader +//go:generate depstubber -vendor github.com/klauspost/pgzip Reader NewReader +//go:generate depstubber -vendor github.com/klauspost/compress/zstd Decoder NewReader +//go:generate depstubber -vendor github.com/DataDog/zstd "" NewReader +//go:generate depstubber -vendor github.com/ulikunitz/xz Reader NewReader +//go:generate depstubber -vendor github.com/klauspost/compress/zip FileHeader,File,Reader,ReadCloser NewReader,OpenReader + +import ( + "archive/tar" + "archive/zip" + "bytes" + "compress/bzip2" + "compress/flate" + "compress/gzip" + "compress/zlib" + "fmt" + "io" + "net/http" + "os" + "testing/fstest" + + bzip2Dsnet "github.com/dsnet/compress/bzip2" + flateDsnet "github.com/dsnet/compress/flate" + "github.com/golang/snappy" + flateKlauspost "github.com/klauspost/compress/flate" + gzipKlauspost "github.com/klauspost/compress/gzip" + "github.com/klauspost/compress/s2" + snappyKlauspost "github.com/klauspost/compress/snappy" + zlibKlauspost "github.com/klauspost/compress/zlib" + pgzipKlauspost "github.com/klauspost/pgzip" + "github.com/ulikunitz/xz" + + zstdDataDog "github.com/DataDog/zstd" + zipKlauspost "github.com/klauspost/compress/zip" + zstdKlauspost "github.com/klauspost/compress/zstd" +) + +func main() { + DecompressHandler := http.HandlerFunc(DecompressHandler) + http.Handle("/Decompress", DecompressHandler) + err := http.ListenAndServe(":8080", nil) + if err != nil { + return + } + +} +func DecompressHandler(w http.ResponseWriter, request *http.Request) { + GZipOpenReaderSafe(request.PostFormValue("test")) + ZipOpenReaderSafe(request.PostFormValue("test")) + ZipOpenReader(request.FormValue("filepath")) + ZipNewReader(request.Body) + ZipNewReaderKlauspost(request.Body) + Bzip2Dsnet(request.Body) + Bzip2DsnetSafe(request.Body) + Bzip2(request.Body) + Bzip2Safe(request.Body) + Flate(request.Body) + FlateSafe(request.Body) + FlateKlauspost(request.Body) + FlateKlauspostSafe(request.Body) + FlateDsnet(request.Body) + FlateDsnetSafe(request.Body) + ZlibKlauspost(request.Body) + ZlibKlauspostSafe(request.Body) + Zlib(request.Body) + ZlibSafe(request.Body) + Snappy(request.Body) + SnappySafe(request.Body) + SnappyKlauspost(request.Body) + SnappyKlauspostSafe(request.Body) + S2(request.Body) + S2Safe(request.Body) + Gzip(request.Body) + GzipSafe(request.Body) + GZipIoReader(request.Body, "dest") + GzipKlauspost(request.Body) + GzipKlauspostSafe(request.Body) + PzipKlauspost(request.Body) + PzipKlauspostSafe(request.Body) + Zstd_Klauspost(request.Body) + Zstd_KlauspostSafe(request.Body) + Zstd_DataDog(request.Body) + Zstd_DataDogSafe(request.Body) + Xz(request.Body) + XzSafe(request.Body) +} + +func GZipOpenReaderSafe(filename string) { + var src io.Reader + src, _ = os.Open(filename) + gzipR, _ := gzip.NewReader(src) + dstF, _ := os.OpenFile("./test", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755) + defer dstF.Close() + var newSrc io.Reader + newSrc = io.LimitReader(gzipR, 1024*1024*1024*5) // GOOD: The output size is being controlled + _, _ = io.Copy(dstF, newSrc) +} + +func ZipOpenReaderSafe(filename string) { + r, _ := zip.OpenReader(filename) + var totalBytes int64 = 0 + for _, f := range r.File { + rc, _ := f.Open() + for { + result, _ := io.CopyN(os.Stdout, rc, 68) // GOOD: The output size is being controlled + if result == 0 { + _ = rc.Close() + break + } + totalBytes = totalBytes + result + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } + } +} + +func ZipOpenReader(filename string) { + // Open the zip file + zipReader, _ := zip.OpenReader(filename) + for _, f := range zipReader.File { + rc, _ := f.Open() + for { + result, _ := io.CopyN(os.Stdout, rc, 68) // $ hasValueFlow="rc" + if result == 0 { + _ = rc.Close() + break + } + fmt.Print(result) + _ = rc.Close() + } + } + zipKlauspostReader, _ := zipKlauspost.OpenReader(filename) + for _, f := range zipKlauspostReader.File { + rc, _ := f.Open() + for { + result, _ := io.CopyN(os.Stdout, rc, 68) // $ hasValueFlow="rc" + if result == 0 { + _ = rc.Close() + break + } + fmt.Print(result) + _ = rc.Close() + } + } +} + +func ZipNewReader(file io.Reader) { + file1, _ := io.ReadAll(file) + zipReader, _ := zip.NewReader(bytes.NewReader(file1), int64(32<<20)) + for _, file := range zipReader.File { + fileWriter := bytes.NewBuffer([]byte{}) + fileReaderCloser, _ := file.Open() + result, _ := io.Copy(fileWriter, fileReaderCloser) // $ hasValueFlow="fileReaderCloser" + fmt.Print(result) + } +} + +func ZipNewReaderKlauspost(file io.Reader) { + file2, _ := io.ReadAll(file) + zipReader, _ := zipKlauspost.NewReader(bytes.NewReader(file2), int64(32<<20)) + for _, file := range zipReader.File { + fileWriter := bytes.NewBuffer([]byte{}) + // file.OpenRaw() + fileReaderCloser, _ := file.Open() + result, _ := io.Copy(fileWriter, fileReaderCloser) // $ hasValueFlow="fileReaderCloser" + fmt.Print(result) + } +} + +func Bzip2Dsnet(file io.Reader) { + var tarRead *tar.Reader + + bzip2Reader, _ := bzip2Dsnet.NewReader(file, &bzip2Dsnet.ReaderConfig{}) + var out []byte = make([]byte, 70) + bzip2Reader.Read(out) // $ hasValueFlow="bzip2Reader" + tarRead = tar.NewReader(bzip2Reader) + + TarDecompressor(tarRead) + +} +func Bzip2DsnetSafe(file io.Reader) { + bzip2Reader, _ := bzip2Dsnet.NewReader(file, &bzip2Dsnet.ReaderConfig{}) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = bzip2Reader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", bzip2Reader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } + +} +func Bzip2(file io.Reader) { + var tarRead *tar.Reader + + bzip2Reader := bzip2.NewReader(file) + var out []byte = make([]byte, 70) + bzip2Reader.Read(out) // $ hasValueFlow="bzip2Reader" + tarRead = tar.NewReader(bzip2Reader) + + TarDecompressor(tarRead) +} +func Bzip2Safe(file io.Reader) { + bzip2Reader := bzip2.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = bzip2Reader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", bzip2Reader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func Flate(file io.Reader) { + var tarRead *tar.Reader + + flateReader := flate.NewReader(file) + var out []byte = make([]byte, 70) + flateReader.Read(out) // $ hasValueFlow="flateReader" + tarRead = tar.NewReader(flateReader) + + TarDecompressor(tarRead) +} +func FlateSafe(file io.Reader) { + flateReader := flate.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = flateReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", flateReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func FlateKlauspost(file io.Reader) { + var tarRead *tar.Reader + + flateReader := flateKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + flateReader.Read(out) // $ hasValueFlow="flateReader" + tarRead = tar.NewReader(flateReader) + + TarDecompressor(tarRead) +} +func FlateKlauspostSafe(file io.Reader) { + flateReader := flateKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = flateReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", flateReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func FlateDsnet(file io.Reader) { + var tarRead *tar.Reader + + flateReader, _ := flateDsnet.NewReader(file, &flateDsnet.ReaderConfig{}) + var out []byte = make([]byte, 70) + flateReader.Read(out) // $ hasValueFlow="flateReader" + tarRead = tar.NewReader(flateReader) + + TarDecompressor(tarRead) +} +func FlateDsnetSafe(file io.Reader) { + flateReader, _ := flateDsnet.NewReader(file, &flateDsnet.ReaderConfig{}) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = flateReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", flateReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func ZlibKlauspost(file io.Reader) { + var tarRead *tar.Reader + + zlibReader, _ := zlibKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + zlibReader.Read(out) // $ hasValueFlow="zlibReader" + tarRead = tar.NewReader(zlibReader) + + TarDecompressor(tarRead) +} +func ZlibKlauspostSafe(file io.Reader) { + zlibReader, _ := zlibKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = zlibReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", zlibReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func Zlib(file io.Reader) { + var tarRead *tar.Reader + + zlibReader, _ := zlib.NewReader(file) + var out []byte = make([]byte, 70) + zlibReader.Read(out) // $ hasValueFlow="zlibReader" + tarRead = tar.NewReader(zlibReader) + + TarDecompressor(tarRead) +} +func ZlibSafe(file io.Reader) { + zlibReader, _ := zlib.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = zlibReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", zlibReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func Snappy(file io.Reader) { + var tarRead *tar.Reader + + snappyReader := snappy.NewReader(file) + var out []byte = make([]byte, 70) + snappyReader.Read(out) // $ hasValueFlow="snappyReader" + snappyReader.ReadByte() // $ hasValueFlow="snappyReader" + tarRead = tar.NewReader(snappyReader) + + TarDecompressor(tarRead) +} +func SnappySafe(file io.Reader) { + snappyReader := snappy.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = snappyReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", snappyReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func SnappyKlauspost(file io.Reader) { + var tarRead *tar.Reader + + snappyReader := snappyKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + snappyReader.Read(out) // $ hasValueFlow="snappyReader" + var buf bytes.Buffer + snappyReader.DecodeConcurrent(&buf, 2) // $ hasValueFlow="snappyReader" + snappyReader.ReadByte() // $ hasValueFlow="snappyReader" + tarRead = tar.NewReader(snappyReader) + + TarDecompressor(tarRead) +} +func SnappyKlauspostSafe(file io.Reader) { + snappyReader := snappyKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = snappyReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", snappyReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func S2(file io.Reader) { + var tarRead *tar.Reader + + s2Reader := s2.NewReader(file) + var out []byte = make([]byte, 70) + s2Reader.Read(out) // $ hasValueFlow="s2Reader" + s2Reader.ReadByte() // $ hasValueFlow="s2Reader" + var buf bytes.Buffer + s2Reader.DecodeConcurrent(&buf, 2) // $ hasValueFlow="s2Reader" + tarRead = tar.NewReader(s2Reader) + + TarDecompressor(tarRead) +} +func S2Safe(file io.Reader) { + s2Reader := s2.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = s2Reader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", s2Reader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func GZipIoReader(src io.Reader, dst string) { + gzipReader, _ := gzip.NewReader(src) + dstF, _ := os.OpenFile(dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755) + defer dstF.Close() + newSrc := io.Reader(gzipReader) + _, _ = io.Copy(dstF, newSrc) // $ hasValueFlow="newSrc" +} +func Gzip(file io.Reader) { + var tarRead *tar.Reader + + gzipReader, _ := gzip.NewReader(file) + var out []byte = make([]byte, 70) + gzipReader.Read(out) // $ hasValueFlow="gzipReader" + tarRead = tar.NewReader(gzipReader) + + TarDecompressor(tarRead) +} +func GzipSafe(file io.Reader) { + gzipReader, _ := gzip.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = gzipReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", gzipReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func GzipKlauspost(file io.Reader) { + var tarRead *tar.Reader + + gzipReader, _ := gzipKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + gzipReader.Read(out) // $ hasValueFlow="gzipReader" + var buf bytes.Buffer + gzipReader.WriteTo(&buf) // $ hasValueFlow="gzipReader" + tarRead = tar.NewReader(gzipReader) + + TarDecompressor(tarRead) +} +func GzipKlauspostSafe(file io.Reader) { + gzipReader, _ := gzipKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = gzipReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", gzipReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func PzipKlauspost(file io.Reader) { + var tarRead *tar.Reader + + pgzipReader, _ := pgzipKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + pgzipReader.Read(out) // $ hasValueFlow="pgzipReader" + var buf bytes.Buffer + pgzipReader.WriteTo(&buf) // $ hasValueFlow="pgzipReader" + tarRead = tar.NewReader(pgzipReader) + + TarDecompressor(tarRead) +} +func PzipKlauspostSafe(file io.Reader) { + pgzipReader, _ := pgzipKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = pgzipReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", pgzipReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func Zstd_Klauspost(file io.Reader) { + var tarRead *tar.Reader + + zstdReader, _ := zstdKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + zstdReader.Read(out) // $ hasValueFlow="zstdReader" + var buf bytes.Buffer + zstdReader.WriteTo(&buf) // $ hasValueFlow="zstdReader" + var src []byte + zstdReader.DecodeAll(src, nil) // $ hasValueFlow="zstdReader" + tarRead = tar.NewReader(zstdReader) + + TarDecompressor(tarRead) +} +func Zstd_KlauspostSafe(file io.Reader) { + zstdReader, _ := zstdKlauspost.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = zstdReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", zstdReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func Zstd_DataDog(file io.Reader) { + var tarRead *tar.Reader + + zstdReader := zstdDataDog.NewReader(file) + var out []byte = make([]byte, 70) + zstdReader.Read(out) // $ hasValueFlow="zstdReader" + tarRead = tar.NewReader(zstdReader) + + TarDecompressor(tarRead) +} +func Zstd_DataDogSafe(file io.Reader) { + zstdReader := zstdDataDog.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = zstdReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", zstdReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} +func Xz(file io.Reader) { + var tarRead *tar.Reader + + xzReader, _ := xz.NewReader(file) + var out []byte = make([]byte, 70) + xzReader.Read(out) // $ hasValueFlow="xzReader" + tarRead = tar.NewReader(xzReader) + fmt.Println(io.SeekStart) + + TarDecompressor(tarRead) + TarDecompressor2(tarRead) + TarDecompressorSafe(tarRead) + TarDecompressorTN(tarRead) +} + +func XzSafe(file io.Reader) { + xzReader, _ := xz.NewReader(file) + var out []byte = make([]byte, 70) + var totalBytes int64 = 0 + i := 1 + for i > 0 { + i, _ = xzReader.Read(out) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", xzReader) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} + +func TarDecompressor(tarRead *tar.Reader) { + files := make(fstest.MapFS) + for { + cur, err := tarRead.Next() + if err == io.EOF { + break + } + if cur.Typeflag != tar.TypeReg { + continue + } + data, _ := io.ReadAll(tarRead) // $ hasValueFlow="tarRead" + files[cur.Name] = &fstest.MapFile{Data: data} + } + fmt.Print(files) +} + +func TarDecompressor2(tarRead *tar.Reader) { + var tarOut []byte = make([]byte, 70) + tarRead.Read(tarOut) // $ hasValueFlow="tarRead" + fmt.Println("do sth with output:", tarOut) +} + +func TarDecompressorTN(tarRead *tar.Reader) { + var tarOut []byte = make([]byte, 70) + i := 1 + for i > 0 { + i, _ = tarRead.Read(tarOut) // GOOD: the output size is being controlled + fmt.Println("do sth with output:", tarOut) + } +} + +func TarDecompressorSafe(tarRead *tar.Reader) { + var tarOut []byte = make([]byte, 70) + i := 1 + var totalBytes int64 = 0 + for i > 0 { + i, _ = tarRead.Read(tarOut) // GOOD: The output size is being controlled + fmt.Println("do sth with output:", tarOut) + totalBytes = totalBytes + int64(i) + if totalBytes > 1024*1024*1024*5 { + fmt.Print(totalBytes, "exceeded") + break + } + } +} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/DataDog/zstd/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/DataDog/zstd/stub.go new file mode 100644 index 00000000000..1551a6ebb1a --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/DataDog/zstd/stub.go @@ -0,0 +1,16 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/DataDog/zstd, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/DataDog/zstd (exports: ; functions: NewReader) + +// Package zstd is a stub of github.com/DataDog/zstd, generated by depstubber. +package zstd + +import ( + io "io" +) + +func NewReader(_ io.Reader) io.ReadCloser { + return nil +} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/dsnet/compress/bzip2/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/dsnet/compress/bzip2/stub.go new file mode 100644 index 00000000000..e51c66a76de --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/dsnet/compress/bzip2/stub.go @@ -0,0 +1,35 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/dsnet/compress/bzip2, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/dsnet/compress/bzip2 (exports: Reader; functions: NewReader) + +// Package bzip2 is a stub of github.com/dsnet/compress/bzip2, generated by depstubber. +package bzip2 + +import ( + io "io" +) + +func NewReader(_ io.Reader, _ *ReaderConfig) (*Reader, error) { + return nil, nil +} + +type Reader struct { + InputOffset int64 + OutputOffset int64 +} + +func (_ *Reader) Close() error { + return nil +} + +func (_ *Reader) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ *Reader) Reset(_ io.Reader) error { + return nil +} + +type ReaderConfig struct{} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/dsnet/compress/flate/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/dsnet/compress/flate/stub.go new file mode 100644 index 00000000000..1130904695b --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/dsnet/compress/flate/stub.go @@ -0,0 +1,35 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/dsnet/compress/flate, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/dsnet/compress/flate (exports: Reader; functions: NewReader) + +// Package flate is a stub of github.com/dsnet/compress/flate, generated by depstubber. +package flate + +import ( + io "io" +) + +func NewReader(_ io.Reader, _ *ReaderConfig) (*Reader, error) { + return nil, nil +} + +type Reader struct { + InputOffset int64 + OutputOffset int64 +} + +func (_ *Reader) Close() error { + return nil +} + +func (_ *Reader) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ *Reader) Reset(_ io.Reader) error { + return nil +} + +type ReaderConfig struct{} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/golang/snappy/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/golang/snappy/stub.go new file mode 100644 index 00000000000..d7c0bcb6480 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/golang/snappy/stub.go @@ -0,0 +1,28 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/golang/snappy, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/golang/snappy (exports: Reader; functions: NewReader) + +// Package snappy is a stub of github.com/golang/snappy, generated by depstubber. +package snappy + +import ( + io "io" +) + +func NewReader(_ io.Reader) *Reader { + return nil +} + +type Reader struct{} + +func (_ *Reader) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ *Reader) ReadByte() (byte, error) { + return 0, nil +} + +func (_ *Reader) Reset(_ io.Reader) {} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/flate/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/flate/stub.go new file mode 100644 index 00000000000..971f4f06d49 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/flate/stub.go @@ -0,0 +1,16 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/klauspost/compress/flate, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/klauspost/compress/flate (exports: ; functions: NewReader) + +// Package flate is a stub of github.com/klauspost/compress/flate, generated by depstubber. +package flate + +import ( + io "io" +) + +func NewReader(_ io.Reader) io.ReadCloser { + return nil +} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/gzip/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/gzip/stub.go new file mode 100644 index 00000000000..6590497526a --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/gzip/stub.go @@ -0,0 +1,47 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/klauspost/compress/gzip, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/klauspost/compress/gzip (exports: Reader; functions: NewReader) + +// Package gzip is a stub of github.com/klauspost/compress/gzip, generated by depstubber. +package gzip + +import ( + io "io" + time "time" +) + +type Header struct { + Comment string + Extra []byte + ModTime time.Time + Name string + OS byte +} + +func NewReader(_ io.Reader) (*Reader, error) { + return nil, nil +} + +type Reader struct { + Header Header +} + +func (_ *Reader) Close() error { + return nil +} + +func (_ *Reader) Multistream(_ bool) {} + +func (_ *Reader) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ *Reader) Reset(_ io.Reader) error { + return nil +} + +func (_ *Reader) WriteTo(_ io.Writer) (int64, error) { + return 0, nil +} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/s2/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/s2/stub.go new file mode 100644 index 00000000000..5d057944d0a --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/s2/stub.go @@ -0,0 +1,84 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/klauspost/compress/s2, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/klauspost/compress/s2 (exports: Reader; functions: NewReader) + +// Package s2 is a stub of github.com/klauspost/compress/s2, generated by depstubber. +package s2 + +import ( + io "io" +) + +func NewReader(_ io.Reader, _ ...ReaderOption) *Reader { + return nil +} + +type ReadSeeker struct { + Reader *Reader +} + +func (_ ReadSeeker) DecodeConcurrent(_ io.Writer, _ int) (int64, error) { + return 0, nil +} + +func (_ ReadSeeker) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ ReadSeeker) ReadByte() (byte, error) { + return 0, nil +} + +func (_ ReadSeeker) ReadSeeker(_ bool, _ []byte) (*ReadSeeker, error) { + return nil, nil +} + +func (_ ReadSeeker) Reset(_ io.Reader) {} + +func (_ ReadSeeker) Skip(_ int64) error { + return nil +} + +func (_ ReadSeeker) SkippableCB(_ byte, _ func(io.Reader) error) error { + return nil +} + +func (_ *ReadSeeker) ReadAt(_ []byte, _ int64) (int, error) { + return 0, nil +} + +func (_ *ReadSeeker) Seek(_ int64, _ int) (int64, error) { + return 0, nil +} + +type Reader struct{} + +func (_ *Reader) DecodeConcurrent(_ io.Writer, _ int) (*ReadSeeker, error) { + return nil, nil +} + +func (_ *Reader) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ *Reader) ReadByte() (byte, error) { + return 0, nil +} + +func (_ *Reader) ReadSeeker(_ bool, _ []byte) (*ReadSeeker, error) { + return nil, nil +} + +func (_ *Reader) Reset(_ io.Reader) {} + +func (_ *Reader) Skip(_ int64) error { + return nil +} + +func (_ *Reader) SkippableCB(_ byte, _ func(io.Reader) error) error { + return nil +} + +type ReaderOption func(*Reader) error diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/snappy/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/snappy/stub.go new file mode 100644 index 00000000000..96330aa7d15 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/snappy/stub.go @@ -0,0 +1,59 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/klauspost/compress/snappy, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/klauspost/compress/snappy (exports: ; functions: NewReader) + +// Package snappy is a stub of github.com/klauspost/compress/snappy, generated by depstubber. +package snappy + +import ( + io "io" + s2 "github.com/klauspost/compress/s2" + +) + +type Reader = s2.Reader + +func NewReader(_ io.Reader) *Reader { + return nil +} + + +type ReadSeeker struct { + Reader *Reader +} + +func (_ ReadSeeker) DecodeConcurrent(_ io.Writer, _ int) (int64, error) { + return 0, nil +} + +func (_ ReadSeeker) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ ReadSeeker) ReadByte() (byte, error) { + return 0, nil +} + +func (_ ReadSeeker) ReadSeeker(_ bool, _ []byte) (*ReadSeeker, error) { + return nil, nil +} + +func (_ ReadSeeker) Reset(_ io.Reader) {} + +func (_ ReadSeeker) Skip(_ int64) error { + return nil +} + +func (_ ReadSeeker) SkippableCB(_ byte, _ func(io.Reader) error) error { + return nil +} + +func (_ *ReadSeeker) ReadAt(_ []byte, _ int64) (int, error) { + return 0, nil +} + +func (_ *ReadSeeker) Seek(_ int64, _ int) (int64, error) { + return 0, nil +} \ No newline at end of file diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/zip/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/zip/stub.go new file mode 100644 index 00000000000..2f3ad377a1c --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/zip/stub.go @@ -0,0 +1,124 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/klauspost/compress/zip, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/klauspost/compress/zip (exports: FileHeader,File,Reader,ReadCloser; functions: NewReader,OpenReader) + +// Package zip is a stub of github.com/klauspost/compress/zip, generated by depstubber. +package zip + +import ( + io "io" + fs "io/fs" + time "time" + "os" +) + +type Decompressor func(io.Reader) io.ReadCloser + +type File struct { + FileHeader + zip *Reader + zipr io.ReaderAt + headerOffset int64 // includes overall ZIP archive baseOffset + zip64 bool // zip64 extended information extra field presence +} + + +func (_ *File) DataOffset() (int64, error) { + return 0, nil +} + +func (_ *File) FileInfo() fs.FileInfo { + return nil +} + +func (_ *File) ModTime() time.Time { + return time.Time{} +} + +func (_ *File) Mode() fs.FileMode { + return 0 +} + +func (_ *File) Open() (io.ReadCloser, error) { + return nil, nil +} + +func (_ *File) OpenRaw() (io.Reader, error) { + return nil, nil +} + +func (_ *File) SetModTime(_ time.Time) {} + +func (_ *File) SetMode(_ fs.FileMode) {} + +type FileHeader struct { + Name string + Comment string + NonUTF8 bool + CreatorVersion uint16 + ReaderVersion uint16 + Flags uint16 + Method uint16 + Modified time.Time + ModifiedTime uint16 + ModifiedDate uint16 + CRC32 uint32 + CompressedSize uint32 + UncompressedSize uint32 + CompressedSize64 uint64 + UncompressedSize64 uint64 + Extra []byte + ExternalAttrs uint32 +} + +func (_ *FileHeader) FileInfo() fs.FileInfo { + return nil +} + +func (_ *FileHeader) ModTime() time.Time { + return time.Time{} +} + +func (_ *FileHeader) Mode() fs.FileMode { + return 0 +} + +func (_ *FileHeader) SetModTime(_ time.Time) {} + +func (_ *FileHeader) SetMode(_ fs.FileMode) {} + +func NewReader(_ io.ReaderAt, _ int64) (*Reader, error) { + return nil, nil +} + +func OpenReader(_ string) (*ReadCloser, error) { + return nil, nil +} + +type ReadCloser struct { + f *os.File + Reader +} + +func (_ *ReadCloser) Close() error { + return nil +} + +func (_ *ReadCloser) Open(_ string) (fs.File, error) { + return nil, nil +} + +func (_ *ReadCloser) RegisterDecompressor(_ uint16, _ Decompressor) {} + +type Reader struct { + File []*File + Comment string +} + +func (_ *Reader) Open(_ string) (fs.File, error) { + return nil, nil +} + +func (_ *Reader) RegisterDecompressor(_ uint16, _ Decompressor) {} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/zlib/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/zlib/stub.go new file mode 100644 index 00000000000..29d59ab5e2b --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/zlib/stub.go @@ -0,0 +1,16 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/klauspost/compress/zlib, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/klauspost/compress/zlib (exports: ; functions: NewReader) + +// Package zlib is a stub of github.com/klauspost/compress/zlib, generated by depstubber. +package zlib + +import ( + io "io" +) + +func NewReader(_ io.Reader) (io.ReadCloser, error) { + return nil, nil +} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/zstd/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/zstd/stub.go new file mode 100644 index 00000000000..7c0590a2778 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/compress/zstd/stub.go @@ -0,0 +1,42 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/klauspost/compress/zstd, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/klauspost/compress/zstd (exports: Decoder; functions: NewReader) + +// Package zstd is a stub of github.com/klauspost/compress/zstd, generated by depstubber. +package zstd + +import ( + io "io" +) + +type DOption func(interface{}) error + +type Decoder struct{} + +func (_ *Decoder) Close() {} + +func (_ *Decoder) DecodeAll(_ []byte, _ []byte) ([]byte, error) { + return nil, nil +} + +func (_ *Decoder) IOReadCloser() io.ReadCloser { + return nil +} + +func (_ *Decoder) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ *Decoder) Reset(_ io.Reader) error { + return nil +} + +func (_ *Decoder) WriteTo(_ io.Writer) (int64, error) { + return 0, nil +} + +func NewReader(_ io.Reader, _ ...DOption) (*Decoder, error) { + return nil, nil +} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/pgzip/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/pgzip/stub.go new file mode 100644 index 00000000000..b7fb157d3fb --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/klauspost/pgzip/stub.go @@ -0,0 +1,47 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/klauspost/pgzip, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/klauspost/pgzip (exports: Reader; functions: NewReader) + +// Package pgzip is a stub of github.com/klauspost/pgzip, generated by depstubber. +package pgzip + +import ( + io "io" + time "time" +) + +type Header struct { + Comment string + Extra []byte + ModTime time.Time + Name string + OS byte +} + +func NewReader(_ io.Reader) (*Reader, error) { + return nil, nil +} + +type Reader struct { + Header Header +} + +func (_ *Reader) Close() error { + return nil +} + +func (_ *Reader) Multistream(_ bool) {} + +func (_ *Reader) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ *Reader) Reset(_ io.Reader) error { + return nil +} + +func (_ *Reader) WriteTo(_ io.Writer) (int64, error) { + return 0, nil +} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/ulikunitz/xz/stub.go b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/ulikunitz/xz/stub.go new file mode 100644 index 00000000000..6a2780cd891 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/github.com/ulikunitz/xz/stub.go @@ -0,0 +1,45 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/ulikunitz/xz, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/ulikunitz/xz (exports: Reader; functions: NewReader) + +// Package xz is a stub of github.com/ulikunitz/xz, generated by depstubber. +package xz + +import ( + io "io" +) + +func NewReader(_ io.Reader) (*Reader, error) { + return nil, nil +} + +type Reader struct { + ReaderConfig ReaderConfig +} + +func (_ Reader) NewReader(_ io.Reader) (*Reader, error) { + return nil, nil +} + +func (_ *Reader) Read(_ []byte) (int, error) { + return 0, nil +} + +func (_ *Reader) Verify() error { + return nil +} + +type ReaderConfig struct { + DictCap int + SingleStream bool +} + +func (_ ReaderConfig) NewReader(_ io.Reader) (*Reader, error) { + return nil, nil +} + +func (_ *ReaderConfig) Verify() error { + return nil +} diff --git a/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/modules.txt b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/modules.txt new file mode 100644 index 00000000000..92976a6e7e9 --- /dev/null +++ b/go/ql/test/experimental/CWE-522-DecompressionBombs/vendor/modules.txt @@ -0,0 +1,18 @@ +# github.com/DataDog/zstd v1.5.5 +## explicit +github.com/DataDog/zstd +# github.com/dsnet/compress v0.0.1 +## explicit +github.com/dsnet/compress +# github.com/golang/snappy v0.0.4 +## explicit +github.com/golang/snappy +# github.com/klauspost/compress v1.16.6 +## explicit +github.com/klauspost/compress +# github.com/klauspost/pgzip v1.2.6 +## explicit +github.com/klauspost/pgzip +# github.com/ulikunitz/xz v0.5.11 +## explicit +github.com/ulikunitz/xz diff --git a/go/ql/test/experimental/CWE-525/WebCacheDeception.expected b/go/ql/test/experimental/CWE-525/WebCacheDeception.expected index 969ba863fa0..70e70de3037 100644 --- a/go/ql/test/experimental/CWE-525/WebCacheDeception.expected +++ b/go/ql/test/experimental/CWE-525/WebCacheDeception.expected @@ -1 +1,5 @@ -| WebCacheDeceptionBad.go:82:18:82:31 | "/adminusers/" | Wildcard Endpoint used with "/adminusers/" and 'cache-control' Header is used | \ No newline at end of file +| WebCacheDeceptionBad.go:82:18:82:31 | "/adminusers/" | "/adminusers/" is used as wildcard endpoint. | +| WebCacheDeceptionFiber.go:15:10:15:17 | "/api/*" | "/api/*" is used as wildcard endpoint. | +| WebCacheDeceptionFiber.go:20:11:20:18 | "/api/*" | "/api/*" is used as wildcard endpoint. | +| WebCacheDeceptionGoChi.go:13:8:13:11 | "/*" | "/*" is used as wildcard endpoint. | +| WebCacheDeceptionHTTPRouter.go:21:13:21:25 | "/test/*test" | "/test/*test" is used as wildcard endpoint. | diff --git a/go/ql/test/experimental/CWE-525/WebCacheDeceptionBad.go b/go/ql/test/experimental/CWE-525/WebCacheDeceptionBad.go index b3c0d345bd1..577fbd78c06 100644 --- a/go/ql/test/experimental/CWE-525/WebCacheDeceptionBad.go +++ b/go/ql/test/experimental/CWE-525/WebCacheDeceptionBad.go @@ -1,4 +1,4 @@ -package bad +package main import ( "fmt" @@ -74,7 +74,7 @@ func ShowAdminPageCache(w http.ResponseWriter, r *http.Request) { } -func main() { +func badRoutingNet() { fmt.Println("Vulnapp server listening : 1337") http.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("assets/")))) diff --git a/go/ql/test/experimental/CWE-525/WebCacheDeceptionFiber.go b/go/ql/test/experimental/CWE-525/WebCacheDeceptionFiber.go new file mode 100644 index 00000000000..80f396c26df --- /dev/null +++ b/go/ql/test/experimental/CWE-525/WebCacheDeceptionFiber.go @@ -0,0 +1,38 @@ +package main + +import ( + "fmt" + "log" + + "github.com/gofiber/fiber/v2" +) + +func badRouting() { + app := fiber.New() + log.Println("We are logging in Golang!") + + // GET /api/register + app.Get("/api/*", func(c *fiber.Ctx) error { + msg := fmt.Sprintf("✋") + return c.SendString(msg) // => ✋ register + }) + + app.Post("/api/*", func(c *fiber.Ctx) error { + msg := fmt.Sprintf("✋") + return c.SendString(msg) // => ✋ register + }) + + // GET /flights/LAX-SFO + app.Get("/flights/:from-:to", func(c *fiber.Ctx) error { + msg := fmt.Sprintf("💸 From: %s, To: %s", c.Params("from"), c.Params("to")) + return c.SendString(msg) // => 💸 From: LAX, To: SFO + }) + + // GET /dictionary.txt + app.Get("/:file.:ext", func(c *fiber.Ctx) error { + msg := fmt.Sprintf("📃 %s.%s", c.Params("file"), c.Params("ext")) + return c.SendString(msg) // => 📃 dictionary.txt + }) + + log.Fatal(app.Listen(":3000")) +} diff --git a/go/ql/test/experimental/CWE-525/WebCacheDeceptionGoChi.go b/go/ql/test/experimental/CWE-525/WebCacheDeceptionGoChi.go new file mode 100644 index 00000000000..539dae1dee9 --- /dev/null +++ b/go/ql/test/experimental/CWE-525/WebCacheDeceptionGoChi.go @@ -0,0 +1,17 @@ +package main + +import ( + "net/http" + + "github.com/go-chi/chi/v5" + "github.com/go-chi/chi/v5/middleware" +) + +func badRoutingChi() { + r := chi.NewRouter() + r.Use(middleware.Logger) + r.Get("/*", func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("welcome")) + }) + http.ListenAndServe(":3000", r) +} diff --git a/go/ql/test/experimental/CWE-525/WebCacheDeceptionHTTPRouter.go b/go/ql/test/experimental/CWE-525/WebCacheDeceptionHTTPRouter.go new file mode 100644 index 00000000000..864c6c5e31c --- /dev/null +++ b/go/ql/test/experimental/CWE-525/WebCacheDeceptionHTTPRouter.go @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "log" + "net/http" + + "github.com/julienschmidt/httprouter" +) + +func Index(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { + fmt.Fprint(w, "Welcome!\n") +} + +func Hello(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + fmt.Fprintf(w, "hello, %s!\n", ps.ByName("name")) +} + +func badHTTPRouter() { + router := httprouter.New() + router.GET("/test/*test", Index) + router.GET("/hello/:name", Hello) + + log.Fatal(http.ListenAndServe(":8082", router)) +} diff --git a/go/ql/test/experimental/CWE-525/go.mod b/go/ql/test/experimental/CWE-525/go.mod new file mode 100644 index 00000000000..a3190908392 --- /dev/null +++ b/go/ql/test/experimental/CWE-525/go.mod @@ -0,0 +1,23 @@ +module wcd + +go 1.21 + +require ( + github.com/go-chi/chi/v5 v5.0.10 + github.com/gofiber/fiber/v2 v2.51.0 + github.com/julienschmidt/httprouter v1.3.0 +) + +require ( + github.com/andybalholm/brotli v1.0.5 // indirect + github.com/google/uuid v1.4.0 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasthttp v1.50.0 // indirect + github.com/valyala/tcplisten v1.0.0 // indirect + golang.org/x/sys v0.14.0 // indirect +) diff --git a/go/ql/test/experimental/CWE-525/vendor/github.com/go-chi/chi/v5/middleware/stub.go b/go/ql/test/experimental/CWE-525/vendor/github.com/go-chi/chi/v5/middleware/stub.go new file mode 100644 index 00000000000..7bfbedf3a61 --- /dev/null +++ b/go/ql/test/experimental/CWE-525/vendor/github.com/go-chi/chi/v5/middleware/stub.go @@ -0,0 +1,16 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/go-chi/chi/v5/middleware, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/go-chi/chi/v5/middleware (exports: ; functions: Logger) + +// Package middleware is a stub of github.com/go-chi/chi/v5/middleware, generated by depstubber. +package middleware + +import ( + http "net/http" +) + +func Logger(_ http.Handler) http.Handler { + return nil +} diff --git a/go/ql/test/experimental/CWE-525/vendor/github.com/go-chi/chi/v5/stub.go b/go/ql/test/experimental/CWE-525/vendor/github.com/go-chi/chi/v5/stub.go new file mode 100644 index 00000000000..6a75474c6de --- /dev/null +++ b/go/ql/test/experimental/CWE-525/vendor/github.com/go-chi/chi/v5/stub.go @@ -0,0 +1,160 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/go-chi/chi/v5, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/go-chi/chi/v5 (exports: ; functions: NewRouter) + +// Package chi is a stub of github.com/go-chi/chi/v5, generated by depstubber. +package chi + +import ( + http "net/http" +) + +type Context struct { + Routes Routes + RoutePath string + RouteMethod string + URLParams RouteParams + RoutePatterns []string +} + +func (_ *Context) Reset() {} + +func (_ *Context) RoutePattern() string { + return "" +} + +func (_ *Context) URLParam(_ string) string { + return "" +} + +type Middlewares []func(http.Handler) http.Handler + +func (_ Middlewares) Handler(_ http.Handler) http.Handler { + return nil +} + +func (_ Middlewares) HandlerFunc(_ http.HandlerFunc) http.Handler { + return nil +} + +type Mux struct{} + +func (_ *Mux) Connect(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Delete(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Get(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Group(_ func(Router)) Router { + return nil +} + +func (_ *Mux) Handle(_ string, _ http.Handler) {} + +func (_ *Mux) HandleFunc(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Head(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Match(_ *Context, _ string, _ string) bool { + return false +} + +func (_ *Mux) Method(_ string, _ string, _ http.Handler) {} + +func (_ *Mux) MethodFunc(_ string, _ string, _ http.HandlerFunc) {} + +func (_ *Mux) MethodNotAllowed(_ http.HandlerFunc) {} + +func (_ *Mux) MethodNotAllowedHandler(_ ...interface{}) http.HandlerFunc { + return nil +} + +func (_ *Mux) Middlewares() Middlewares { + return nil +} + +func (_ *Mux) Mount(_ string, _ http.Handler) {} + +func (_ *Mux) NotFound(_ http.HandlerFunc) {} + +func (_ *Mux) NotFoundHandler() http.HandlerFunc { + return nil +} + +func (_ *Mux) Options(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Patch(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Post(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Put(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Route(_ string, _ func(Router)) Router { + return nil +} + +func (_ *Mux) Routes() []Route { + return nil +} + +func (_ *Mux) ServeHTTP(_ http.ResponseWriter, _ *http.Request) {} + +func (_ *Mux) Trace(_ string, _ http.HandlerFunc) {} + +func (_ *Mux) Use(_ ...func(http.Handler) http.Handler) {} + +func (_ *Mux) With(_ ...func(http.Handler) http.Handler) Router { + return nil +} + +func NewRouter() *Mux { + return nil +} + +type Route struct { + SubRoutes Routes + Handlers map[string]http.Handler + Pattern string +} + +type RouteParams struct { + Keys []string + Values []string +} + +func (_ *RouteParams) Add(_ string, _ string) {} + +type Router interface { + Connect(_ string, _ http.HandlerFunc) + Delete(_ string, _ http.HandlerFunc) + Get(_ string, _ http.HandlerFunc) + Group(_ func(Router)) Router + Handle(_ string, _ http.Handler) + HandleFunc(_ string, _ http.HandlerFunc) + Head(_ string, _ http.HandlerFunc) + Match(_ *Context, _ string, _ string) bool + Method(_ string, _ string, _ http.Handler) + MethodFunc(_ string, _ string, _ http.HandlerFunc) + MethodNotAllowed(_ http.HandlerFunc) + Middlewares() Middlewares + Mount(_ string, _ http.Handler) + NotFound(_ http.HandlerFunc) + Options(_ string, _ http.HandlerFunc) + Patch(_ string, _ http.HandlerFunc) + Post(_ string, _ http.HandlerFunc) + Put(_ string, _ http.HandlerFunc) + Route(_ string, _ func(Router)) Router + Routes() []Route + ServeHTTP(_ http.ResponseWriter, _ *http.Request) + Trace(_ string, _ http.HandlerFunc) + Use(_ ...func(http.Handler) http.Handler) + With(_ ...func(http.Handler) http.Handler) Router +} + +type Routes interface { + Match(_ *Context, _ string, _ string) bool + Middlewares() Middlewares + Routes() []Route +} diff --git a/go/ql/test/experimental/CWE-525/vendor/github.com/gofiber/fiber/v2/stub.go b/go/ql/test/experimental/CWE-525/vendor/github.com/gofiber/fiber/v2/stub.go new file mode 100644 index 00000000000..ccd2ccda0ee --- /dev/null +++ b/go/ql/test/experimental/CWE-525/vendor/github.com/gofiber/fiber/v2/stub.go @@ -0,0 +1,1033 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/gofiber/fiber/v2, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/gofiber/fiber/v2 (exports: ; functions: New,Get,Post) + +// Package fiber is a stub of github.com/gofiber/fiber/v2, generated by depstubber. +package fiber + +import ( + context "context" + tls "crypto/tls" + x509 "crypto/x509" + io "io" + multipart "mime/multipart" + net "net" + http "net/http" + time "time" +) + +type Agent struct { + Name string + NoDefaultUserAgentHeader bool + HostClient interface{} +} + +func (_ Agent) CloseIdleConnections() {} + +func (_ Agent) ConnsCount() int { + return 0 +} + +func (_ Agent) Do(_ interface{}, _ interface{}) error { + return nil +} + +func (_ Agent) DoDeadline(_ interface{}, _ interface{}, _ time.Time) error { + return nil +} + +func (_ Agent) DoRedirects(_ interface{}, _ interface{}, _ int) error { + return nil +} + +func (_ Agent) DoTimeout(_ interface{}, _ interface{}, _ time.Duration) error { + return nil +} + +func (_ Agent) Get(_ []byte, _ string) (int, []byte, error) { + return 0, nil, nil +} + +func (_ Agent) GetDeadline(_ []byte, _ string, _ time.Time) (int, []byte, error) { + return 0, nil, nil +} + +func (_ Agent) GetTimeout(_ []byte, _ string, _ time.Duration) (int, []byte, error) { + return 0, nil, nil +} + +func (_ Agent) LastUseTime() time.Time { + return time.Time{} +} + +func (_ Agent) PendingRequests() int { + return 0 +} + +func (_ Agent) Post(_ []byte, _ string, _ interface{}) (int, []byte, error) { + return 0, nil, nil +} + +func (_ Agent) SetMaxConns(_ int) {} + +func (_ *Agent) Add(_ string, _ string) *Agent { + return nil +} + +func (_ *Agent) AddBytesK(_ []byte, _ string) *Agent { + return nil +} + +func (_ *Agent) AddBytesKV(_ []byte, _ []byte) *Agent { + return nil +} + +func (_ *Agent) AddBytesV(_ string, _ []byte) *Agent { + return nil +} + +func (_ *Agent) BasicAuth(_ string, _ string) *Agent { + return nil +} + +func (_ *Agent) BasicAuthBytes(_ []byte, _ []byte) *Agent { + return nil +} + +func (_ *Agent) Body(_ []byte) *Agent { + return nil +} + +func (_ *Agent) BodyStream(_ io.Reader, _ int) *Agent { + return nil +} + +func (_ *Agent) BodyString(_ string) *Agent { + return nil +} + +func (_ *Agent) Boundary(_ string) *Agent { + return nil +} + +func (_ *Agent) Bytes() (int, []byte, []error) { + return 0, nil, nil +} + +func (_ *Agent) ConnectionClose() *Agent { + return nil +} + +func (_ *Agent) ContentType(_ string) *Agent { + return nil +} + +func (_ *Agent) ContentTypeBytes(_ []byte) *Agent { + return nil +} + +func (_ *Agent) Cookie(_ string, _ string) *Agent { + return nil +} + +func (_ *Agent) CookieBytesK(_ []byte, _ string) *Agent { + return nil +} + +func (_ *Agent) CookieBytesKV(_ []byte, _ []byte) *Agent { + return nil +} + +func (_ *Agent) Cookies(_ ...string) *Agent { + return nil +} + +func (_ *Agent) CookiesBytesKV(_ ...[]byte) *Agent { + return nil +} + +func (_ *Agent) Debug(_ ...io.Writer) *Agent { + return nil +} + +func (_ *Agent) Dest(_ []byte) *Agent { + return nil +} + +func (_ *Agent) FileData(_ ...*FormFile) *Agent { + return nil +} + +func (_ *Agent) Form(_ interface{}) *Agent { + return nil +} + +func (_ *Agent) Host(_ string) *Agent { + return nil +} + +func (_ *Agent) HostBytes(_ []byte) *Agent { + return nil +} + +func (_ *Agent) InsecureSkipVerify() *Agent { + return nil +} + +func (_ *Agent) JSON(_ interface{}, _ ...string) *Agent { + return nil +} + +func (_ *Agent) JSONDecoder(_ interface{}) *Agent { + return nil +} + +func (_ *Agent) JSONEncoder(_ interface{}) *Agent { + return nil +} + +func (_ *Agent) MaxRedirectsCount(_ int) *Agent { + return nil +} + +func (_ *Agent) MultipartForm(_ interface{}) *Agent { + return nil +} + +func (_ *Agent) Parse() error { + return nil +} + +func (_ *Agent) QueryString(_ string) *Agent { + return nil +} + +func (_ *Agent) QueryStringBytes(_ []byte) *Agent { + return nil +} + +func (_ *Agent) Referer(_ string) *Agent { + return nil +} + +func (_ *Agent) RefererBytes(_ []byte) *Agent { + return nil +} + +func (_ *Agent) Request() interface{} { + return nil +} + +func (_ *Agent) RetryIf(_ interface{}) *Agent { + return nil +} + +func (_ *Agent) Reuse() *Agent { + return nil +} + +func (_ *Agent) SendFile(_ string, _ ...string) *Agent { + return nil +} + +func (_ *Agent) SendFiles(_ ...string) *Agent { + return nil +} + +func (_ *Agent) Set(_ string, _ string) *Agent { + return nil +} + +func (_ *Agent) SetBytesK(_ []byte, _ string) *Agent { + return nil +} + +func (_ *Agent) SetBytesKV(_ []byte, _ []byte) *Agent { + return nil +} + +func (_ *Agent) SetBytesV(_ string, _ []byte) *Agent { + return nil +} + +func (_ *Agent) SetResponse(_ interface{}) *Agent { + return nil +} + +func (_ *Agent) String() (int, string, []error) { + return 0, "", nil +} + +func (_ *Agent) Struct(_ interface{}) (int, []byte, []error) { + return 0, nil, nil +} + +func (_ *Agent) TLSConfig(_ *tls.Config) *Agent { + return nil +} + +func (_ *Agent) Timeout(_ time.Duration) *Agent { + return nil +} + +func (_ *Agent) UserAgent(_ string) *Agent { + return nil +} + +func (_ *Agent) UserAgentBytes(_ []byte) *Agent { + return nil +} + +func (_ *Agent) XML(_ interface{}) *Agent { + return nil +} + +type App struct{} + +func (_ *App) AcquireCtx(_ interface{}) *Ctx { + return nil +} + +func (_ *App) Add(_ string, _ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) All(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) Config() Config { + return Config{} +} + +func (_ *App) Connect(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) Delete(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) ErrorHandler(_ *Ctx, _ error) error { + return nil +} + +func (_ *App) Get(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) GetRoute(_ string) Route { + return Route{} +} + +func (_ *App) GetRoutes(_ ...bool) []Route { + return nil +} + +func (_ *App) Group(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) Handler() interface{} { + return nil +} + +func (_ *App) HandlersCount() uint32 { + return 0 +} + +func (_ *App) Head(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) Hooks() *Hooks { + return nil +} + +func (_ *App) Listen(_ string) error { + return nil +} + +func (_ *App) ListenMutualTLS(_ string, _ string, _ string, _ string) error { + return nil +} + +func (_ *App) ListenMutualTLSWithCertificate(_ string, _ tls.Certificate, _ *x509.CertPool) error { + return nil +} + +func (_ *App) ListenTLS(_ string, _ string, _ string) error { + return nil +} + +func (_ *App) ListenTLSWithCertificate(_ string, _ tls.Certificate) error { + return nil +} + +func (_ *App) Listener(_ net.Listener) error { + return nil +} + +func (_ *App) Mount(_ string, _ *App) Router { + return nil +} + +func (_ *App) MountPath() string { + return "" +} + +func (_ *App) Name(_ string) Router { + return nil +} + +func (_ *App) Options(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) Patch(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) Post(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) Put(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) ReleaseCtx(_ *Ctx) {} + +func (_ *App) Route(_ string, _ func(Router), _ ...string) Router { + return nil +} + +func (_ *App) Server() interface{} { + return nil +} + +func (_ *App) SetTLSHandler(_ *TLSHandler) {} + +func (_ *App) Shutdown() error { + return nil +} + +func (_ *App) ShutdownWithContext(_ context.Context) error { + return nil +} + +func (_ *App) ShutdownWithTimeout(_ time.Duration) error { + return nil +} + +func (_ *App) Stack() [][]*Route { + return nil +} + +func (_ *App) Static(_ string, _ string, _ ...Static) Router { + return nil +} + +func (_ *App) Test(_ *http.Request, _ ...int) (*http.Response, error) { + return nil, nil +} + +func (_ *App) Trace(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *App) Use(_ ...interface{}) Router { + return nil +} + +type Colors struct { + Black string + Red string + Green string + Yellow string + Blue string + Magenta string + Cyan string + White string + Reset string +} + +type Config struct { + Prefork bool + ServerHeader string + StrictRouting bool + CaseSensitive bool + Immutable bool + UnescapePath bool + ETag bool + BodyLimit int + Concurrency int + Views Views + ViewsLayout string + PassLocalsToViews bool + ReadTimeout time.Duration + WriteTimeout time.Duration + IdleTimeout time.Duration + ReadBufferSize int + WriteBufferSize int + CompressedFileSuffix string + ProxyHeader string + GETOnly bool + ErrorHandler func(*Ctx, error) error + DisableKeepalive bool + DisableDefaultDate bool + DisableDefaultContentType bool + DisableHeaderNormalizing bool + DisableStartupMessage bool + AppName string + StreamRequestBody bool + DisablePreParseMultipartForm bool + ReduceMemoryUsage bool + JSONEncoder interface{} + JSONDecoder interface{} + XMLEncoder interface{} + Network string + EnableTrustedProxyCheck bool + TrustedProxies []string + EnableIPValidation bool + EnablePrintRoutes bool + ColorScheme Colors + RequestMethods []string + EnableSplittingOnParsers bool +} + +type Cookie struct { + Name string + Value string + Path string + Domain string + MaxAge int + Expires time.Time + Secure bool + HTTPOnly bool + SameSite string + SessionOnly bool +} + +type Ctx struct{} + +func (_ *Ctx) Accepts(_ ...string) string { + return "" +} + +func (_ *Ctx) AcceptsCharsets(_ ...string) string { + return "" +} + +func (_ *Ctx) AcceptsEncodings(_ ...string) string { + return "" +} + +func (_ *Ctx) AcceptsLanguages(_ ...string) string { + return "" +} + +func (_ *Ctx) AllParams() map[string]string { + return nil +} + +func (_ *Ctx) App() *App { + return nil +} + +func (_ *Ctx) Append(_ string, _ ...string) {} + +func (_ *Ctx) Attachment(_ ...string) {} + +func (_ *Ctx) BaseURL() string { + return "" +} + +func (_ *Ctx) Bind(_ Map) error { + return nil +} + +func (_ *Ctx) Body() []byte { + return nil +} + +func (_ *Ctx) BodyParser(_ interface{}) error { + return nil +} + +func (_ *Ctx) BodyRaw() []byte { + return nil +} + +func (_ *Ctx) ClearCookie(_ ...string) {} + +func (_ *Ctx) ClientHelloInfo() *tls.ClientHelloInfo { + return nil +} + +func (_ *Ctx) Context() interface{} { + return nil +} + +func (_ *Ctx) Cookie(_ *Cookie) {} + +func (_ *Ctx) CookieParser(_ interface{}) error { + return nil +} + +func (_ *Ctx) Cookies(_ string, _ ...string) string { + return "" +} + +func (_ *Ctx) Download(_ string, _ ...string) error { + return nil +} + +func (_ *Ctx) FormFile(_ string) (*multipart.FileHeader, error) { + return nil, nil +} + +func (_ *Ctx) FormValue(_ string, _ ...string) string { + return "" +} + +func (_ *Ctx) Format(_ interface{}) error { + return nil +} + +func (_ *Ctx) Fresh() bool { + return false +} + +func (_ *Ctx) Get(_ string, _ ...string) string { + return "" +} + +func (_ *Ctx) GetReqHeaders() map[string][]string { + return nil +} + +func (_ *Ctx) GetRespHeader(_ string, _ ...string) string { + return "" +} + +func (_ *Ctx) GetRespHeaders() map[string][]string { + return nil +} + +func (_ *Ctx) GetRouteURL(_ string, _ Map) (string, error) { + return "", nil +} + +func (_ *Ctx) Hostname() string { + return "" +} + +func (_ *Ctx) IP() string { + return "" +} + +func (_ *Ctx) IPs() []string { + return nil +} + +func (_ *Ctx) Is(_ string) bool { + return false +} + +func (_ *Ctx) IsFromLocal() bool { + return false +} + +func (_ *Ctx) IsProxyTrusted() bool { + return false +} + +func (_ *Ctx) JSON(_ interface{}, _ ...string) error { + return nil +} + +func (_ *Ctx) JSONP(_ interface{}, _ ...string) error { + return nil +} + +func (_ *Ctx) Links(_ ...string) {} + +func (_ *Ctx) Locals(_ interface{}, _ ...interface{}) interface{} { + return nil +} + +func (_ *Ctx) Location(_ string) {} + +func (_ *Ctx) Method(_ ...string) string { + return "" +} + +func (_ *Ctx) MultipartForm() (*multipart.Form, error) { + return nil, nil +} + +func (_ *Ctx) Next() error { + return nil +} + +func (_ *Ctx) OriginalURL() string { + return "" +} + +func (_ *Ctx) Params(_ string, _ ...string) string { + return "" +} + +func (_ *Ctx) ParamsInt(_ string, _ ...int) (int, error) { + return 0, nil +} + +func (_ *Ctx) ParamsParser(_ interface{}) error { + return nil +} + +func (_ *Ctx) Path(_ ...string) string { + return "" +} + +func (_ *Ctx) Port() string { + return "" +} + +func (_ *Ctx) Protocol() string { + return "" +} + +func (_ *Ctx) Queries() map[string]string { + return nil +} + +func (_ *Ctx) Query(_ string, _ ...string) string { + return "" +} + +func (_ *Ctx) QueryBool(_ string, _ ...bool) bool { + return false +} + +func (_ *Ctx) QueryFloat(_ string, _ ...float64) float64 { + return 0 +} + +func (_ *Ctx) QueryInt(_ string, _ ...int) int { + return 0 +} + +func (_ *Ctx) QueryParser(_ interface{}) error { + return nil +} + +func (_ *Ctx) Range(_ int) (Range, error) { + return Range{}, nil +} + +func (_ *Ctx) Redirect(_ string, _ ...int) error { + return nil +} + +func (_ *Ctx) RedirectBack(_ string, _ ...int) error { + return nil +} + +func (_ *Ctx) RedirectToRoute(_ string, _ Map, _ ...int) error { + return nil +} + +func (_ *Ctx) Render(_ string, _ interface{}, _ ...string) error { + return nil +} + +func (_ *Ctx) ReqHeaderParser(_ interface{}) error { + return nil +} + +func (_ *Ctx) Request() interface{} { + return nil +} + +func (_ *Ctx) Response() interface{} { + return nil +} + +func (_ *Ctx) RestartRouting() error { + return nil +} + +func (_ *Ctx) Route() *Route { + return nil +} + +func (_ *Ctx) SaveFile(_ *multipart.FileHeader, _ string) error { + return nil +} + +func (_ *Ctx) SaveFileToStorage(_ *multipart.FileHeader, _ string, _ Storage) error { + return nil +} + +func (_ *Ctx) Secure() bool { + return false +} + +func (_ *Ctx) Send(_ []byte) error { + return nil +} + +func (_ *Ctx) SendFile(_ string, _ ...bool) error { + return nil +} + +func (_ *Ctx) SendStatus(_ int) error { + return nil +} + +func (_ *Ctx) SendStream(_ io.Reader, _ ...int) error { + return nil +} + +func (_ *Ctx) SendString(_ string) error { + return nil +} + +func (_ *Ctx) Set(_ string, _ string) {} + +func (_ *Ctx) SetUserContext(_ context.Context) {} + +func (_ *Ctx) Stale() bool { + return false +} + +func (_ *Ctx) Status(_ int) *Ctx { + return nil +} + +func (_ *Ctx) String() string { + return "" +} + +func (_ *Ctx) Subdomains(_ ...int) []string { + return nil +} + +func (_ *Ctx) Type(_ string, _ ...string) *Ctx { + return nil +} + +func (_ *Ctx) UserContext() context.Context { + return nil +} + +func (_ *Ctx) Vary(_ ...string) {} + +func (_ *Ctx) Write(_ []byte) (int, error) { + return 0, nil +} + +func (_ *Ctx) WriteString(_ string) (int, error) { + return 0, nil +} + +func (_ *Ctx) Writef(_ string, _ ...interface{}) (int, error) { + return 0, nil +} + +func (_ *Ctx) XHR() bool { + return false +} + +func (_ *Ctx) XML(_ interface{}) error { + return nil +} + +type FormFile struct { + Fieldname string + Name string + Content []byte +} + +func Get(_ string) *Agent { + return nil +} + +type Group struct { + Prefix string +} + +func (_ *Group) Add(_ string, _ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) All(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Connect(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Delete(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Get(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Group(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Head(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Mount(_ string, _ *App) Router { + return nil +} + +func (_ *Group) Name(_ string) Router { + return nil +} + +func (_ *Group) Options(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Patch(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Post(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Put(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Route(_ string, _ func(Router), _ ...string) Router { + return nil +} + +func (_ *Group) Static(_ string, _ string, _ ...Static) Router { + return nil +} + +func (_ *Group) Trace(_ string, _ ...func(*Ctx) error) Router { + return nil +} + +func (_ *Group) Use(_ ...interface{}) Router { + return nil +} + +type Hooks struct{} + +func (_ *Hooks) OnFork(_ ...func(int) error) {} + +func (_ *Hooks) OnGroup(_ ...func(Group) error) {} + +func (_ *Hooks) OnGroupName(_ ...func(Group) error) {} + +func (_ *Hooks) OnListen(_ ...func(ListenData) error) {} + +func (_ *Hooks) OnMount(_ ...func(*App) error) {} + +func (_ *Hooks) OnName(_ ...func(Route) error) {} + +func (_ *Hooks) OnRoute(_ ...func(Route) error) {} + +func (_ *Hooks) OnShutdown(_ ...func() error) {} + +type ListenData struct { + Host string + Port string + TLS bool +} + +type Map map[string]interface{} + +func New(_ ...Config) *App { + return nil +} + +func Post(_ string) *Agent { + return nil +} + +type Range struct { + Type string + Ranges []RangeSet +} + +type RangeSet struct { + Start int + End int +} + +type Route struct { + Method string + Name string + Path string + Params []string + Handlers []func(*Ctx) error +} + +type Router interface { + Add(_ string, _ string, _ ...func(*Ctx) error) Router + All(_ string, _ ...func(*Ctx) error) Router + Connect(_ string, _ ...func(*Ctx) error) Router + Delete(_ string, _ ...func(*Ctx) error) Router + Get(_ string, _ ...func(*Ctx) error) Router + Group(_ string, _ ...func(*Ctx) error) Router + Head(_ string, _ ...func(*Ctx) error) Router + Mount(_ string, _ *App) Router + Name(_ string) Router + Options(_ string, _ ...func(*Ctx) error) Router + Patch(_ string, _ ...func(*Ctx) error) Router + Post(_ string, _ ...func(*Ctx) error) Router + Put(_ string, _ ...func(*Ctx) error) Router + Route(_ string, _ func(Router), _ ...string) Router + Static(_ string, _ string, _ ...Static) Router + Trace(_ string, _ ...func(*Ctx) error) Router + Use(_ ...interface{}) Router +} + +type Static struct { + Compress bool + ByteRange bool + Browse bool + Download bool + Index string + CacheDuration time.Duration + MaxAge int + ModifyResponse func(*Ctx) error + Next func(*Ctx) bool +} + +type Storage interface { + Close() error + Delete(_ string) error + Get(_ string) ([]byte, error) + Reset() error + Set(_ string, _ []byte, _ time.Duration) error +} + +type TLSHandler struct{} + +func (_ *TLSHandler) GetClientInfo(_ *tls.ClientHelloInfo) (*tls.Certificate, error) { + return nil, nil +} + +type Views interface { + Load() error + Render(_ io.Writer, _ string, _ interface{}, _ ...string) error +} diff --git a/go/ql/test/experimental/CWE-525/vendor/github.com/julienschmidt/httprouter/stub.go b/go/ql/test/experimental/CWE-525/vendor/github.com/julienschmidt/httprouter/stub.go new file mode 100644 index 00000000000..2515bf4fc90 --- /dev/null +++ b/go/ql/test/experimental/CWE-525/vendor/github.com/julienschmidt/httprouter/stub.go @@ -0,0 +1,68 @@ +// Code generated by depstubber. DO NOT EDIT. +// This is a simple stub for github.com/julienschmidt/httprouter, strictly for use in testing. + +// See the LICENSE file for information about the licensing of the original library. +// Source: github.com/julienschmidt/httprouter (exports: ; functions: New) + +// Package httprouter is a stub of github.com/julienschmidt/httprouter, generated by depstubber. +package httprouter + +import ( + http "net/http" +) + +type Handle func(http.ResponseWriter, *http.Request, Params) + +func New() *Router { + return nil +} + +type Param struct { + Key string + Value string +} + +type Params []Param + +func (_ Params) ByName(_ string) string { + return "" +} + +type Router struct { + RedirectTrailingSlash bool + RedirectFixedPath bool + HandleMethodNotAllowed bool + HandleOPTIONS bool + GlobalOPTIONS http.Handler + NotFound http.Handler + MethodNotAllowed http.Handler + PanicHandler func(http.ResponseWriter, *http.Request, interface{}) +} + +func (_ *Router) DELETE(_ string, _ Handle) {} + +func (_ *Router) GET(_ string, _ Handle) {} + +func (_ *Router) HEAD(_ string, _ Handle) {} + +func (_ *Router) Handle(_ string, _ string, _ Handle) {} + +func (_ *Router) Handler(_ string, _ string, _ http.Handler) {} + +func (_ *Router) HandlerFunc(_ string, _ string, _ http.HandlerFunc) {} + +func (_ *Router) Lookup(_ string, _ string) (Handle, Params, bool) { + return nil, nil, false +} + +func (_ *Router) OPTIONS(_ string, _ Handle) {} + +func (_ *Router) PATCH(_ string, _ Handle) {} + +func (_ *Router) POST(_ string, _ Handle) {} + +func (_ *Router) PUT(_ string, _ Handle) {} + +func (_ *Router) ServeFiles(_ string, _ http.FileSystem) {} + +func (_ *Router) ServeHTTP(_ http.ResponseWriter, _ *http.Request) {} diff --git a/go/ql/test/experimental/CWE-525/vendor/modules.txt b/go/ql/test/experimental/CWE-525/vendor/modules.txt new file mode 100644 index 00000000000..cc5c287610c --- /dev/null +++ b/go/ql/test/experimental/CWE-525/vendor/modules.txt @@ -0,0 +1,42 @@ +# github.com/go-chi/chi/v5 v5.0.10 +## explicit +github.com/go-chi/chi/v5 +# github.com/gofiber/fiber/v2 v2.51.0 +## explicit +github.com/gofiber/fiber/v2 +# github.com/julienschmidt/httprouter v1.3.0 +## explicit +github.com/julienschmidt/httprouter +# github.com/andybalholm/brotli v1.0.5 +## explicit +github.com/andybalholm/brotli +# github.com/google/uuid v1.4.0 +## explicit +github.com/google/uuid +# github.com/klauspost/compress v1.16.7 +## explicit +github.com/klauspost/compress +# github.com/mattn/go-colorable v0.1.13 +## explicit +github.com/mattn/go-colorable +# github.com/mattn/go-isatty v0.0.20 +## explicit +github.com/mattn/go-isatty +# github.com/mattn/go-runewidth v0.0.15 +## explicit +github.com/mattn/go-runewidth +# github.com/rivo/uniseg v0.2.0 +## explicit +github.com/rivo/uniseg +# github.com/valyala/bytebufferpool v1.0.0 +## explicit +github.com/valyala/bytebufferpool +# github.com/valyala/fasthttp v1.50.0 +## explicit +github.com/valyala/fasthttp +# github.com/valyala/tcplisten v1.0.0 +## explicit +github.com/valyala/tcplisten +# golang.org/x/sys v0.14.0 +## explicit +golang.org/x/sys diff --git a/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/Flows.expected b/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/Flows.expected new file mode 100644 index 00000000000..e69de29bb2d diff --git a/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/Flows.ql b/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/Flows.ql new file mode 100644 index 00000000000..1b27b27d6dc --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/Flows.ql @@ -0,0 +1,3 @@ +import go +import TestUtilities.InlineFlowTest +import DefaultFlowTest diff --git a/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/test.go b/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/test.go new file mode 100644 index 00000000000..b6dedf748b3 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/dataflow/MapReadsAndStores/test.go @@ -0,0 +1,25 @@ +package main + +func source() string { + return "untrusted data" +} + +func sink(any) { +} + +func main() { + var someMap map[string]string = map[string]string{} + someMap["someKey"] = source() + + for _, val := range someMap { + sink(val) // $ hasValueFlow="val" + } +} + +func testLiteral() { + someMap := map[string]string{"someKey": source()} + + for _, val := range someMap { + sink(val) // $ hasValueFlow="val" + } +} diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.expected b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.expected new file mode 100644 index 00000000000..8ec8033d086 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.expected @@ -0,0 +1,2 @@ +testFailures +failures diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.ql b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.ql new file mode 100644 index 00000000000..710ac89a1de --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/Sources.ql @@ -0,0 +1,18 @@ +import go +import TestUtilities.InlineExpectationsTest + +module UntrustedFlowSourceTest implements TestSig { + string getARelevantTag() { result = "UntrustedFlowSource" } + + predicate hasActualResult(Location location, string element, string tag, string value) { + exists(UntrustedFlowSource src | + src.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), + location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and + element = src.toString() and + value = "" and + tag = "UntrustedFlowSource" + ) + } +} + +import MakeTest diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Macaron/sources.go b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/sources.go new file mode 100644 index 00000000000..569b032c05f --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/sources.go @@ -0,0 +1,22 @@ +package main + +//go:generate depstubber -vendor gopkg.in/macaron.v1 Context,RequestBody + +import ( + "gopkg.in/macaron.v1" +) + +func sources(ctx *macaron.Context, body *macaron.RequestBody) { + _ = ctx.AllParams() // $UntrustedFlowSource + _ = ctx.GetCookie("") // $UntrustedFlowSource + _, _ = ctx.GetSecureCookie("") // $UntrustedFlowSource + _, _ = ctx.GetSuperSecureCookie("", "") // $UntrustedFlowSource + _, _, _ = ctx.GetFile("") // $UntrustedFlowSource + _ = ctx.Params("") // $UntrustedFlowSource + _ = ctx.ParamsEscape("") // $UntrustedFlowSource + _ = ctx.Query("") // $UntrustedFlowSource + _ = ctx.QueryEscape("") // $UntrustedFlowSource + _ = ctx.QueryStrings("") // $UntrustedFlowSource + _, _ = body.Bytes() // $UntrustedFlowSource + _, _ = body.String() // $UntrustedFlowSource +} diff --git a/go/ql/test/library-tests/semmle/go/frameworks/Macaron/vendor/gopkg.in/macaron.v1/stub.go b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/vendor/gopkg.in/macaron.v1/stub.go index cac6e12385a..058ec52bfdb 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/Macaron/vendor/gopkg.in/macaron.v1/stub.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/Macaron/vendor/gopkg.in/macaron.v1/stub.go @@ -2,7 +2,7 @@ // This is a simple stub for gopkg.in/macaron.v1, strictly for use in testing. // See the LICENSE file for information about the licensing of the original library. -// Source: gopkg.in/macaron.v1 (exports: Context; functions: ) +// Source: gopkg.in/macaron.v1 (exports: Context,RequestBody; functions: ) // Package macaron is a stub of gopkg.in/macaron.v1, generated by depstubber. package macaron @@ -63,9 +63,7 @@ func (_ Context) Any(_ string, _ ...Handler) *Route { return nil } -func (_ Context) Apply(_ interface{}) interface { - Error() string -} { +func (_ Context) Apply(_ interface{}) error { return nil } @@ -89,27 +87,19 @@ func (_ Context) GetVal(_ reflect.Type) reflect.Value { func (_ Context) Group(_ string, _ func(), _ ...Handler) {} -func (_ Context) HTMLBytes(_ string, _ interface{}, _ ...HTMLOptions) ([]uint8, interface { - Error() string -}) { +func (_ Context) HTMLBytes(_ string, _ interface{}, _ ...HTMLOptions) ([]byte, error) { return nil, nil } -func (_ Context) HTMLSetBytes(_ string, _ string, _ interface{}, _ ...HTMLOptions) ([]uint8, interface { - Error() string -}) { +func (_ Context) HTMLSetBytes(_ string, _ string, _ interface{}, _ ...HTMLOptions) ([]byte, error) { return nil, nil } -func (_ Context) HTMLSetString(_ string, _ string, _ interface{}, _ ...HTMLOptions) (string, interface { - Error() string -}) { +func (_ Context) HTMLSetString(_ string, _ string, _ interface{}, _ ...HTMLOptions) (string, error) { return "", nil } -func (_ Context) HTMLString(_ string, _ interface{}, _ ...HTMLOptions) (string, interface { - Error() string -}) { +func (_ Context) HTMLString(_ string, _ interface{}, _ ...HTMLOptions) (string, error) { return "", nil } @@ -131,17 +121,13 @@ func (_ Context) Header() http.Header { func (_ Context) InternalServerError(_ ...Handler) {} -func (_ Context) Invoke(_ interface{}) ([]reflect.Value, interface { - Error() string -}) { +func (_ Context) Invoke(_ interface{}) ([]reflect.Value, error) { return nil, nil } func (_ Context) JSON(_ int, _ interface{}) {} -func (_ Context) JSONString(_ interface{}) (string, interface { - Error() string -}) { +func (_ Context) JSONString(_ interface{}) (string, error) { return "", nil } @@ -167,7 +153,7 @@ func (_ Context) Patch(_ string, _ ...Handler) *Route { return nil } -func (_ Context) PlainText(_ int, _ []uint8) {} +func (_ Context) PlainText(_ int, _ []byte) {} func (_ Context) Post(_ string, _ ...Handler) *Route { return nil @@ -177,7 +163,7 @@ func (_ Context) Put(_ string, _ ...Handler) *Route { return nil } -func (_ Context) RawData(_ int, _ []uint8) {} +func (_ Context) RawData(_ int, _ []byte) {} func (_ Context) Route(_ string, _ string, _ ...Handler) *Route { return nil @@ -209,9 +195,7 @@ func (_ Context) URLFor(_ string, _ ...string) string { return "" } -func (_ Context) Write(_ []uint8) (int, interface { - Error() string -}) { +func (_ Context) Write(_ []byte) (int, error) { return 0, nil } @@ -219,6 +203,10 @@ func (_ Context) WriteHeader(_ int) {} func (_ Context) XML(_ int, _ interface{}) {} +func (_ *Context) AllParams() Params { + return nil +} + func (_ *Context) ChangeStaticPath(_ string, _ string) {} func (_ *Context) GetCookie(_ string) string { @@ -237,9 +225,7 @@ func (_ *Context) GetCookieInt64(_ string) int64 { return 0 } -func (_ *Context) GetFile(_ string) (multipart.File, *multipart.FileHeader, interface { - Error() string -}) { +func (_ *Context) GetFile(_ string) (multipart.File, *multipart.FileHeader, error) { return nil, nil, nil } @@ -317,9 +303,7 @@ func (_ *Context) RemoteAddr() string { func (_ *Context) ReplaceAllParams(_ Params) {} -func (_ *Context) SaveToFile(_ string, _ string) interface { - Error() string -} { +func (_ *Context) SaveToFile(_ string, _ string) error { return nil } @@ -357,33 +341,21 @@ type Params map[string]string type Render interface { Error(_ int, _ ...string) HTML(_ int, _ string, _ interface{}, _ ...HTMLOptions) - HTMLBytes(_ string, _ interface{}, _ ...HTMLOptions) ([]uint8, interface { - Error() string - }) + HTMLBytes(_ string, _ interface{}, _ ...HTMLOptions) ([]byte, error) HTMLSet(_ int, _ string, _ string, _ interface{}, _ ...HTMLOptions) - HTMLSetBytes(_ string, _ string, _ interface{}, _ ...HTMLOptions) ([]uint8, interface { - Error() string - }) - HTMLSetString(_ string, _ string, _ interface{}, _ ...HTMLOptions) (string, interface { - Error() string - }) - HTMLString(_ string, _ interface{}, _ ...HTMLOptions) (string, interface { - Error() string - }) + HTMLSetBytes(_ string, _ string, _ interface{}, _ ...HTMLOptions) ([]byte, error) + HTMLSetString(_ string, _ string, _ interface{}, _ ...HTMLOptions) (string, error) + HTMLString(_ string, _ interface{}, _ ...HTMLOptions) (string, error) HasTemplateSet(_ string) bool Header() http.Header JSON(_ int, _ interface{}) - JSONString(_ interface{}) (string, interface { - Error() string - }) - PlainText(_ int, _ []uint8) - RawData(_ int, _ []uint8) + JSONString(_ interface{}) (string, error) + PlainText(_ int, _ []byte) + RawData(_ int, _ []byte) SetResponseWriter(_ http.ResponseWriter) SetTemplatePath(_ string, _ string) Status(_ int) - Write(_ []uint8) (int, interface { - Error() string - }) + Write(_ []byte) (int, error) WriteHeader(_ int) XML(_ int, _ interface{}) } @@ -406,9 +378,7 @@ func (_ Request) Context() context.Context { return nil } -func (_ Request) Cookie(_ string) (*http.Cookie, interface { - Error() string -}) { +func (_ Request) Cookie(_ string) (*http.Cookie, error) { return nil, nil } @@ -416,9 +386,7 @@ func (_ Request) Cookies() []*http.Cookie { return nil } -func (_ Request) FormFile(_ string) (multipart.File, *multipart.FileHeader, interface { - Error() string -}) { +func (_ Request) FormFile(_ string) (multipart.File, *multipart.FileHeader, error) { return nil, nil, nil } @@ -426,21 +394,15 @@ func (_ Request) FormValue(_ string) string { return "" } -func (_ Request) MultipartReader() (*multipart.Reader, interface { - Error() string -}) { +func (_ Request) MultipartReader() (*multipart.Reader, error) { return nil, nil } -func (_ Request) ParseForm() interface { - Error() string -} { +func (_ Request) ParseForm() error { return nil } -func (_ Request) ParseMultipartForm(_ int64) interface { - Error() string -} { +func (_ Request) ParseMultipartForm(_ int64) error { return nil } @@ -466,15 +428,11 @@ func (_ Request) WithContext(_ context.Context) *http.Request { return nil } -func (_ Request) Write(_ io.Writer) interface { - Error() string -} { +func (_ Request) Write(_ io.Writer) error { return nil } -func (_ Request) WriteProxy(_ io.Writer) interface { - Error() string -} { +func (_ Request) WriteProxy(_ io.Writer) error { return nil } @@ -484,9 +442,7 @@ func (_ *Request) Body() *RequestBody { type RequestBody struct{} -func (_ *RequestBody) Bytes() ([]uint8, interface { - Error() string -}) { +func (_ *RequestBody) Bytes() ([]byte, error) { return nil, nil } @@ -494,9 +450,7 @@ func (_ *RequestBody) ReadCloser() io.ReadCloser { return nil } -func (_ *RequestBody) String() (string, interface { - Error() string -}) { +func (_ *RequestBody) String() (string, error) { return "", nil } @@ -506,9 +460,7 @@ type ResponseWriter interface { Header() http.Header Size() int Status() int - Write(_ []uint8) (int, interface { - Error() string - }) + Write(_ []byte) (int, error) WriteHeader(_ int) Written() bool } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/go.mod b/go/ql/test/library-tests/semmle/go/frameworks/SQL/go.mod index d6d79cd4a53..fce450afb0f 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/go.mod +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/go.mod @@ -3,15 +3,21 @@ module semmle.go.frameworks.SQL go 1.13 require ( - github.com/Masterminds/squirrel v1.1.0 + github.com/Masterminds/squirrel v1.5.4 github.com/go-pg/pg v8.0.6+incompatible github.com/go-pg/pg/v9 v9.1.3 github.com/go-sql-driver/mysql v1.6.0 // indirect github.com/go-xorm/xorm v0.7.9 github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.2 // indirect - github.com/uptrace/bun v1.1.14 - github.com/uptrace/bun/dialect/sqlitedialect v1.1.14 - github.com/uptrace/bun/driver/sqliteshim v1.1.14 + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/stretchr/testify v1.8.1 // indirect + golang.org/x/tools v0.9.1 // indirect + gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect + lukechampine.com/uint128 v1.3.0 // indirect + modernc.org/libc v1.22.6 // indirect + modernc.org/sqlite v1.22.1 // indirect + modernc.org/token v1.1.0 // indirect xorm.io/xorm v1.1.0 ) diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/main.go b/go/ql/test/library-tests/semmle/go/frameworks/SQL/main.go index fa05b5b698f..dd21a91eedd 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/main.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/main.go @@ -1,6 +1,6 @@ package main -//go:generate depstubber -vendor github.com/Masterminds/squirrel "" Select,Expr +//go:generate depstubber -vendor github.com/Masterminds/squirrel DeleteBuilder,InsertBuilder,SelectBuilder,UpdateBuilder Delete,Expr,Insert,Select,Update import ( "context" @@ -43,9 +43,43 @@ func test(db *sql.DB, ctx context.Context) { } func squirrelTest(querypart string) { - squirrel.Select("*").From("users").Where(squirrel.Expr(querypart)) // $ querystring=querypart - squirrel.Select("*").From("users").Where(querypart) // $ querystring=querypart - squirrel.Select("*").From("users").Suffix(querypart) // $ querystring=querypart + squirrel.Expr(querypart) // $ querystring=querypart + deleteBuilder := squirrel.Delete(querypart) // $ querystring=querypart + deleteBuilder.From(querypart) // $ querystring=querypart + deleteBuilder.OrderBy(querypart) // $ querystring=[]type{args} + deleteBuilder.Prefix(querypart) // $ querystring=querypart + deleteBuilder.Suffix(querypart) // $ querystring=querypart + deleteBuilder.Where(querypart) // $ querystring=querypart + + insertBuilder := squirrel.Insert(querypart) // $ querystring=querypart + insertBuilder.Columns(querypart) // $ querystring=[]type{args} + insertBuilder.Options(querypart) // $ querystring=[]type{args} + insertBuilder.Prefix(querypart) // $ querystring=querypart + insertBuilder.Suffix(querypart) // $ querystring=querypart + insertBuilder.Into(querypart) // $ querystring=querypart + + selectBuilder := squirrel.Select(querypart) // $ querystring=[]type{args} + selectBuilder.Columns(querypart) // $ querystring=[]type{args} + selectBuilder.From(querypart) // $ querystring=querypart + selectBuilder.Options(querypart) // $ querystring=[]type{args} + selectBuilder.OrderBy(querypart) // $ querystring=[]type{args} + selectBuilder.Prefix(querypart) // $ querystring=querypart + selectBuilder.Suffix(querypart) // $ querystring=querypart + selectBuilder.Where(querypart) // $ querystring=querypart + selectBuilder.CrossJoin(querypart) // $ querystring=querypart + selectBuilder.GroupBy(querypart) // $ querystring=[]type{args} + selectBuilder.InnerJoin(querypart) // $ querystring=querypart + selectBuilder.LeftJoin(querypart) // $ querystring=querypart + selectBuilder.RightJoin(querypart) // $ querystring=querypart + + updateBuilder := squirrel.Update(querypart) // $ querystring=querypart + updateBuilder.From(querypart) // $ querystring=querypart + updateBuilder.OrderBy(querypart) // $ querystring=[]type{args} + updateBuilder.Prefix(querypart) // $ querystring=querypart + updateBuilder.Suffix(querypart) // $ querystring=querypart + updateBuilder.Where(querypart) // $ querystring=querypart + updateBuilder.Set(querypart, "") // $ querystring=querypart + updateBuilder.Table(querypart) // $ querystring=querypart } func test2(tx *sql.Tx, query string, ctx context.Context) { diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/vendor/github.com/Masterminds/squirrel/stub.go b/go/ql/test/library-tests/semmle/go/frameworks/SQL/vendor/github.com/Masterminds/squirrel/stub.go index fc639e9e209..96a30e49d4e 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/vendor/github.com/Masterminds/squirrel/stub.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/vendor/github.com/Masterminds/squirrel/stub.go @@ -2,7 +2,7 @@ // This is a simple stub for github.com/Masterminds/squirrel, strictly for use in testing. // See the LICENSE file for information about the licensing of the original library. -// Source: github.com/Masterminds/squirrel (exports: ; functions: Select,Expr) +// Source: github.com/Masterminds/squirrel (exports: DeleteBuilder,InsertBuilder,SelectBuilder,UpdateBuilder; functions: Delete,Expr,Insert,Select,Update) // Package squirrel is a stub of github.com/Masterminds/squirrel, generated by depstubber. package squirrel @@ -17,10 +17,186 @@ type BaseRunner interface { Query(_ string, _ ...interface{}) (*sql.Rows, error) } -func Expr(_ string, _ ...interface{}) interface{} { +func Delete(_ string) DeleteBuilder { + return DeleteBuilder{} +} + +type DeleteBuilder struct{} + +func (_ DeleteBuilder) Exec() (sql.Result, error) { + return nil, nil +} + +func (_ DeleteBuilder) ExecContext(_ context.Context) (sql.Result, error) { + return nil, nil +} + +func (_ DeleteBuilder) From(_ string) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) Limit(_ uint64) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) MustSql() (string, []interface{}) { + return "", nil +} + +func (_ DeleteBuilder) Offset(_ uint64) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) OrderBy(_ ...string) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) PlaceholderFormat(_ PlaceholderFormat) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) Prefix(_ string, _ ...interface{}) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) PrefixExpr(_ Sqlizer) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) Query() (*sql.Rows, error) { + return nil, nil +} + +func (_ DeleteBuilder) QueryContext(_ context.Context) (*sql.Rows, error) { + return nil, nil +} + +func (_ DeleteBuilder) QueryRowContext(_ context.Context) RowScanner { return nil } +func (_ DeleteBuilder) RunWith(_ BaseRunner) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) ScanContext(_ context.Context, _ ...interface{}) error { + return nil +} + +func (_ DeleteBuilder) Suffix(_ string, _ ...interface{}) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) SuffixExpr(_ Sqlizer) DeleteBuilder { + return DeleteBuilder{} +} + +func (_ DeleteBuilder) ToSql() (string, []interface{}, error) { + return "", nil, nil +} + +func (_ DeleteBuilder) Where(_ interface{}, _ ...interface{}) DeleteBuilder { + return DeleteBuilder{} +} + +func Expr(_ string, _ ...interface{}) Sqlizer { + return nil +} + +func Insert(_ string) InsertBuilder { + return InsertBuilder{} +} + +type InsertBuilder struct{} + +func (_ InsertBuilder) Columns(_ ...string) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) Exec() (sql.Result, error) { + return nil, nil +} + +func (_ InsertBuilder) ExecContext(_ context.Context) (sql.Result, error) { + return nil, nil +} + +func (_ InsertBuilder) Into(_ string) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) MustSql() (string, []interface{}) { + return "", nil +} + +func (_ InsertBuilder) Options(_ ...string) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) PlaceholderFormat(_ PlaceholderFormat) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) Prefix(_ string, _ ...interface{}) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) PrefixExpr(_ Sqlizer) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) Query() (*sql.Rows, error) { + return nil, nil +} + +func (_ InsertBuilder) QueryContext(_ context.Context) (*sql.Rows, error) { + return nil, nil +} + +func (_ InsertBuilder) QueryRow() RowScanner { + return nil +} + +func (_ InsertBuilder) QueryRowContext(_ context.Context) RowScanner { + return nil +} + +func (_ InsertBuilder) RunWith(_ BaseRunner) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) Scan(_ ...interface{}) error { + return nil +} + +func (_ InsertBuilder) ScanContext(_ context.Context, _ ...interface{}) error { + return nil +} + +func (_ InsertBuilder) Select(_ SelectBuilder) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) SetMap(_ map[string]interface{}) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) Suffix(_ string, _ ...interface{}) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) SuffixExpr(_ Sqlizer) InsertBuilder { + return InsertBuilder{} +} + +func (_ InsertBuilder) ToSql() (string, []interface{}, error) { + return "", nil, nil +} + +func (_ InsertBuilder) Values(_ ...interface{}) InsertBuilder { + return InsertBuilder{} +} + type PlaceholderFormat interface { ReplacePlaceholders(_ string) (string, error) } @@ -43,6 +219,10 @@ func (_ SelectBuilder) Columns(_ ...string) SelectBuilder { return SelectBuilder{} } +func (_ SelectBuilder) CrossJoin(_ string, _ ...interface{}) SelectBuilder { + return SelectBuilder{} +} + func (_ SelectBuilder) Distinct() SelectBuilder { return SelectBuilder{} } @@ -71,6 +251,10 @@ func (_ SelectBuilder) Having(_ interface{}, _ ...interface{}) SelectBuilder { return SelectBuilder{} } +func (_ SelectBuilder) InnerJoin(_ string, _ ...interface{}) SelectBuilder { + return SelectBuilder{} +} + func (_ SelectBuilder) Join(_ string, _ ...interface{}) SelectBuilder { return SelectBuilder{} } @@ -103,6 +287,10 @@ func (_ SelectBuilder) OrderBy(_ ...string) SelectBuilder { return SelectBuilder{} } +func (_ SelectBuilder) OrderByClause(_ interface{}, _ ...interface{}) SelectBuilder { + return SelectBuilder{} +} + func (_ SelectBuilder) PlaceholderFormat(_ PlaceholderFormat) SelectBuilder { return SelectBuilder{} } @@ -111,6 +299,10 @@ func (_ SelectBuilder) Prefix(_ string, _ ...interface{}) SelectBuilder { return SelectBuilder{} } +func (_ SelectBuilder) PrefixExpr(_ Sqlizer) SelectBuilder { + return SelectBuilder{} +} + func (_ SelectBuilder) Query() (*sql.Rows, error) { return nil, nil } @@ -127,10 +319,18 @@ func (_ SelectBuilder) QueryRowContext(_ context.Context) RowScanner { return nil } +func (_ SelectBuilder) RemoveColumns() SelectBuilder { + return SelectBuilder{} +} + func (_ SelectBuilder) RemoveLimit() SelectBuilder { return SelectBuilder{} } +func (_ SelectBuilder) RemoveOffset() SelectBuilder { + return SelectBuilder{} +} + func (_ SelectBuilder) RightJoin(_ string, _ ...interface{}) SelectBuilder { return SelectBuilder{} } @@ -151,6 +351,10 @@ func (_ SelectBuilder) Suffix(_ string, _ ...interface{}) SelectBuilder { return SelectBuilder{} } +func (_ SelectBuilder) SuffixExpr(_ Sqlizer) SelectBuilder { + return SelectBuilder{} +} + func (_ SelectBuilder) ToSql() (string, []interface{}, error) { return "", nil, nil } @@ -158,3 +362,113 @@ func (_ SelectBuilder) ToSql() (string, []interface{}, error) { func (_ SelectBuilder) Where(_ interface{}, _ ...interface{}) SelectBuilder { return SelectBuilder{} } + +type Sqlizer interface { + ToSql() (string, []interface{}, error) +} + +func Update(_ string) UpdateBuilder { + return UpdateBuilder{} +} + +type UpdateBuilder struct{} + +func (_ UpdateBuilder) Exec() (sql.Result, error) { + return nil, nil +} + +func (_ UpdateBuilder) ExecContext(_ context.Context) (sql.Result, error) { + return nil, nil +} + +func (_ UpdateBuilder) From(_ string) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) FromSelect(_ SelectBuilder, _ string) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) Limit(_ uint64) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) MustSql() (string, []interface{}) { + return "", nil +} + +func (_ UpdateBuilder) Offset(_ uint64) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) OrderBy(_ ...string) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) PlaceholderFormat(_ PlaceholderFormat) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) Prefix(_ string, _ ...interface{}) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) PrefixExpr(_ Sqlizer) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) Query() (*sql.Rows, error) { + return nil, nil +} + +func (_ UpdateBuilder) QueryContext(_ context.Context) (*sql.Rows, error) { + return nil, nil +} + +func (_ UpdateBuilder) QueryRow() RowScanner { + return nil +} + +func (_ UpdateBuilder) QueryRowContext(_ context.Context) RowScanner { + return nil +} + +func (_ UpdateBuilder) RunWith(_ BaseRunner) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) Scan(_ ...interface{}) error { + return nil +} + +func (_ UpdateBuilder) ScanContext(_ context.Context, _ ...interface{}) error { + return nil +} + +func (_ UpdateBuilder) Set(_ string, _ interface{}) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) SetMap(_ map[string]interface{}) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) Suffix(_ string, _ ...interface{}) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) SuffixExpr(_ Sqlizer) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) Table(_ string) UpdateBuilder { + return UpdateBuilder{} +} + +func (_ UpdateBuilder) ToSql() (string, []interface{}, error) { + return "", nil, nil +} + +func (_ UpdateBuilder) Where(_ interface{}, _ ...interface{}) UpdateBuilder { + return UpdateBuilder{} +} diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/vendor/modules.txt b/go/ql/test/library-tests/semmle/go/frameworks/SQL/vendor/modules.txt index bf83abef6f7..10f72495104 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/vendor/modules.txt +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/Masterminds/squirrel v1.1.0 +# github.com/Masterminds/squirrel v1.5.4 github.com/Masterminds/squirrel # github.com/go-pg/pg v8.0.6+incompatible github.com/go-pg/pg diff --git a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.expected b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.expected new file mode 100644 index 00000000000..e69de29bb2d diff --git a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql new file mode 100644 index 00000000000..18add3a4881 --- /dev/null +++ b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql @@ -0,0 +1,4 @@ +import go +import semmle.go.security.UncontrolledAllocationSize +import TestUtilities.InlineFlowTest +import FlowTest diff --git a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeBad.go b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeBad.go new file mode 100644 index 00000000000..0ae70436bde --- /dev/null +++ b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeBad.go @@ -0,0 +1,27 @@ +package main + +import ( + "encoding/json" + "fmt" + "net/http" + "strconv" +) + +func OutOfMemoryBad(w http.ResponseWriter, r *http.Request) { + source := r.URL.Query() + + sourceStr := source.Get("n") + sink, err := strconv.Atoi(sourceStr) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + result := make([]string, sink) // $hasTaintFlow="sink" + for i := 0; i < sink; i++ { + result[i] = fmt.Sprintf("Item %d", i+1) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(result) +} diff --git a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeGood.go b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeGood.go new file mode 100644 index 00000000000..a66edf74a83 --- /dev/null +++ b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeGood.go @@ -0,0 +1,94 @@ +package main + +import ( + "encoding/json" + "fmt" + "net/http" + "strconv" +) + +func OutOfMemoryGood1(w http.ResponseWriter, r *http.Request) { + source := r.URL.Query() + MaxValue := 6 + sourceStr := source.Get("n") + sink, err := strconv.Atoi(sourceStr) + if err != nil || sink < 0 { + http.Error(w, "Bad request", http.StatusBadRequest) + return + } + if sink > MaxValue { + return + } + result := make([]string, sink) + for i := 0; i < sink; i++ { + result[i] = fmt.Sprintf("Item %d", i+1) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(result) +} + +func OutOfMemoryGood2(w http.ResponseWriter, r *http.Request) { + source := r.URL.Query() + MaxValue := 6 + sourceStr := source.Get("n") + sink, err := strconv.Atoi(sourceStr) + if err != nil || sink < 0 { + http.Error(w, "Bad request", http.StatusBadRequest) + return + } + if sink <= MaxValue { + result := make([]string, sink) + for i := 0; i < sink; i++ { + result[i] = fmt.Sprintf("Item %d", i+1) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(result) + } +} + +func OutOfMemoryGood3(w http.ResponseWriter, r *http.Request) { + source := r.URL.Query() + MaxValue := 6 + sourceStr := source.Get("n") + sink, err := strconv.Atoi(sourceStr) + if err != nil || sink < 0 { + http.Error(w, "Bad request", http.StatusBadRequest) + return + } + if sink > MaxValue { + sink = MaxValue + result := make([]string, sink) + for i := 0; i < sink; i++ { + result[i] = fmt.Sprintf("Item %d", i+1) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(result) + } +} + +func OutOfMemoryGood4(w http.ResponseWriter, r *http.Request) { + source := r.URL.Query() + MaxValue := 6 + sourceStr := source.Get("n") + sink, err := strconv.Atoi(sourceStr) + if err != nil || sink < 0 { + http.Error(w, "Bad request", http.StatusBadRequest) + return + } + if sink > MaxValue { + sink = MaxValue + } else { + tmp := sink + sink = tmp + } + result := make([]string, sink) + for i := 0; i < sink; i++ { + result[i] = fmt.Sprintf("Item %d", i+1) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(result) +} diff --git a/java/documentation/library-coverage/coverage.csv b/java/documentation/library-coverage/coverage.csv index 5b3af5e9040..751024f5321 100644 --- a/java/documentation/library-coverage/coverage.csv +++ b/java/documentation/library-coverage/coverage.csv @@ -56,7 +56,7 @@ freemarker.template,7,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,7,,,,,,,,,,,, groovy.lang,26,,,,,,,,,,,,,26,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, groovy.text,1,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, groovy.util,5,,,,,,,,,,,,,5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -hudson,74,9,2648,,4,,,,,,3,3,,,,4,,,,,,,,,,,54,,,,,,,,,6,,,,,,,,,,,,5,4,2572,76 +hudson,74,9,2648,,4,,,,,,3,2,,,,4,,,,,,,,,,,55,,,,,,,,,6,,,,,,,,,,,,5,4,2572,76 io.jsonwebtoken,,2,4,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,4, io.netty.bootstrap,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,,,,,,,,,,,,,,, io.netty.buffer,,,207,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,130,77 @@ -82,7 +82,7 @@ java.net,22,3,24,,,,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,20,,,,,,,,,,,,,3,24, java.nio,44,,38,,,,,,,,,5,,,,,,,,,,,,,,,38,,,,,,,,,1,,,,,,,,,,,,,,38, java.security,21,,,,,11,10,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, java.sql,15,1,2,,,,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,,9,,,,,,,,1,,,,2, -java.util,47,2,520,,,,,,,,,1,,,,,,,,,,,34,,,,2,,,,5,2,,1,2,,,,,,,,,,,,2,,,46,474 +java.util,47,2,522,,,,,,,,,1,,,,,,,,,,,34,,,,2,,,,5,2,,1,2,,,,,,,,,,,,2,,,46,476 javafx.scene.web,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,, javax.activation,2,,7,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,1,,,,,,,,,,,,,,7, javax.crypto,19,,4,,,12,3,,2,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,4, diff --git a/java/documentation/library-coverage/coverage.rst b/java/documentation/library-coverage/coverage.rst index 3e0edb7dfac..903890f7ba2 100644 --- a/java/documentation/library-coverage/coverage.rst +++ b/java/documentation/library-coverage/coverage.rst @@ -18,10 +18,10 @@ Java framework & library support `Google Guava `_,``com.google.common.*``,,730,43,9,,,,, JBoss Logging,``org.jboss.logging``,,,324,,,,,, `JSON-java `_,``org.json``,,236,,,,,,, - Java Standard Library,``java.*``,10,735,239,80,,9,,,25 + Java Standard Library,``java.*``,10,737,239,80,,9,,,25 Java extensions,"``javax.*``, ``jakarta.*``",67,688,80,5,4,2,1,1,4 Kotlin Standard Library,``kotlin*``,,1849,16,14,,,,,2 `Spring `_,``org.springframework.*``,38,481,118,5,,28,14,,35 - Others,"``actions.osgi``, ``antlr``, ``ch.ethz.ssh2``, ``cn.hutool.core.codec``, ``com.alibaba.druid.sql``, ``com.alibaba.fastjson2``, ``com.amazonaws.auth``, ``com.auth0.jwt.algorithms``, ``com.azure.identity``, ``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.fasterxml.jackson.core``, ``com.fasterxml.jackson.databind``, ``com.google.gson``, ``com.hubspot.jinjava``, ``com.jcraft.jsch``, ``com.microsoft.sqlserver.jdbc``, ``com.mitchellbosecke.pebble``, ``com.mongodb``, ``com.opensymphony.xwork2``, ``com.rabbitmq.client``, ``com.sshtools.j2ssh.authentication``, ``com.sun.crypto.provider``, ``com.sun.jndi.ldap``, ``com.sun.net.httpserver``, ``com.sun.net.ssl``, ``com.sun.rowset``, ``com.sun.security.auth.module``, ``com.sun.security.ntlm``, ``com.sun.security.sasl.digest``, ``com.thoughtworks.xstream``, ``com.trilead.ssh2``, ``com.unboundid.ldap.sdk``, ``com.zaxxer.hikari``, ``flexjson``, ``freemarker.cache``, ``freemarker.template``, ``groovy.lang``, ``groovy.text``, ``groovy.util``, ``hudson``, ``io.jsonwebtoken``, ``io.netty.bootstrap``, ``io.netty.buffer``, ``io.netty.channel``, ``io.netty.handler.codec``, ``io.netty.handler.ssl``, ``io.netty.handler.stream``, ``io.netty.resolver``, ``io.netty.util``, ``javafx.scene.web``, ``jenkins``, ``jodd.json``, ``liquibase.database.jvm``, ``liquibase.statement.core``, ``net.schmizz.sshj``, ``net.sf.json``, ``net.sf.saxon.s9api``, ``ognl``, ``okhttp3``, ``org.acegisecurity``, ``org.antlr.runtime``, ``org.apache.commons.codec``, ``org.apache.commons.compress.archivers.tar``, ``org.apache.commons.exec``, ``org.apache.commons.httpclient.util``, ``org.apache.commons.jelly``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.commons.lang``, ``org.apache.commons.logging``, ``org.apache.commons.net``, ``org.apache.commons.ognl``, ``org.apache.cxf.catalog``, ``org.apache.cxf.common.classloader``, ``org.apache.cxf.common.jaxb``, ``org.apache.cxf.common.logging``, ``org.apache.cxf.configuration.jsse``, ``org.apache.cxf.helpers``, ``org.apache.cxf.resource``, ``org.apache.cxf.staxutils``, ``org.apache.cxf.tools.corba.utils``, ``org.apache.cxf.tools.util``, ``org.apache.cxf.transform``, ``org.apache.directory.ldap.client.api``, ``org.apache.hadoop.fs``, ``org.apache.hadoop.hive.metastore``, ``org.apache.hadoop.hive.ql.exec``, ``org.apache.hadoop.hive.ql.metadata``, ``org.apache.hc.client5.http.async.methods``, ``org.apache.hc.client5.http.classic.methods``, ``org.apache.hc.client5.http.fluent``, ``org.apache.hive.hcatalog.templeton``, ``org.apache.ibatis.jdbc``, ``org.apache.ibatis.mapping``, ``org.apache.log4j``, ``org.apache.shiro.codec``, ``org.apache.shiro.jndi``, ``org.apache.shiro.mgt``, ``org.apache.sshd.client.session``, ``org.apache.struts.beanvalidation.validation.interceptor``, ``org.apache.struts2``, ``org.apache.tools.ant``, ``org.apache.tools.zip``, ``org.apache.velocity.app``, ``org.apache.velocity.runtime``, ``org.codehaus.cargo.container.installer``, ``org.codehaus.groovy.control``, ``org.dom4j``, ``org.eclipse.jetty.client``, ``org.fusesource.leveldbjni``, ``org.geogebra.web.full.main``, ``org.gradle.api.file``, ``org.hibernate``, ``org.influxdb``, ``org.jdbi.v3.core``, ``org.jenkins.ui.icon``, ``org.jenkins.ui.symbol``, ``org.jooq``, ``org.keycloak.models.map.storage``, ``org.kohsuke.stapler``, ``org.mvel2``, ``org.openjdk.jmh.runner.options``, ``org.owasp.esapi``, ``org.pac4j.jwt.config.encryption``, ``org.pac4j.jwt.config.signature``, ``org.scijava.log``, ``org.slf4j``, ``org.thymeleaf``, ``org.xml.sax``, ``org.xmlpull.v1``, ``org.yaml.snakeyaml``, ``play.libs.ws``, ``play.mvc``, ``ratpack.core.form``, ``ratpack.core.handling``, ``ratpack.core.http``, ``ratpack.exec``, ``ratpack.form``, ``ratpack.func``, ``ratpack.handling``, ``ratpack.http``, ``ratpack.util``, ``retrofit2``, ``sun.jvmstat.perfdata.monitor.protocol.local``, ``sun.jvmstat.perfdata.monitor.protocol.rmi``, ``sun.misc``, ``sun.net.ftp``, ``sun.net.www.protocol.http``, ``sun.security.acl``, ``sun.security.jgss.krb5``, ``sun.security.krb5``, ``sun.security.pkcs``, ``sun.security.pkcs11``, ``sun.security.provider``, ``sun.security.ssl``, ``sun.security.x509``, ``sun.tools.jconsole``",131,10518,893,124,6,22,18,,209 - Totals,,308,18951,2558,336,16,128,33,1,409 + Others,"``actions.osgi``, ``antlr``, ``ch.ethz.ssh2``, ``cn.hutool.core.codec``, ``com.alibaba.druid.sql``, ``com.alibaba.fastjson2``, ``com.amazonaws.auth``, ``com.auth0.jwt.algorithms``, ``com.azure.identity``, ``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.fasterxml.jackson.core``, ``com.fasterxml.jackson.databind``, ``com.google.gson``, ``com.hubspot.jinjava``, ``com.jcraft.jsch``, ``com.microsoft.sqlserver.jdbc``, ``com.mitchellbosecke.pebble``, ``com.mongodb``, ``com.opensymphony.xwork2``, ``com.rabbitmq.client``, ``com.sshtools.j2ssh.authentication``, ``com.sun.crypto.provider``, ``com.sun.jndi.ldap``, ``com.sun.net.httpserver``, ``com.sun.net.ssl``, ``com.sun.rowset``, ``com.sun.security.auth.module``, ``com.sun.security.ntlm``, ``com.sun.security.sasl.digest``, ``com.thoughtworks.xstream``, ``com.trilead.ssh2``, ``com.unboundid.ldap.sdk``, ``com.zaxxer.hikari``, ``flexjson``, ``freemarker.cache``, ``freemarker.template``, ``groovy.lang``, ``groovy.text``, ``groovy.util``, ``hudson``, ``io.jsonwebtoken``, ``io.netty.bootstrap``, ``io.netty.buffer``, ``io.netty.channel``, ``io.netty.handler.codec``, ``io.netty.handler.ssl``, ``io.netty.handler.stream``, ``io.netty.resolver``, ``io.netty.util``, ``javafx.scene.web``, ``jenkins``, ``jodd.json``, ``liquibase.database.jvm``, ``liquibase.statement.core``, ``net.schmizz.sshj``, ``net.sf.json``, ``net.sf.saxon.s9api``, ``ognl``, ``okhttp3``, ``org.acegisecurity``, ``org.antlr.runtime``, ``org.apache.commons.codec``, ``org.apache.commons.compress.archivers.tar``, ``org.apache.commons.exec``, ``org.apache.commons.httpclient.util``, ``org.apache.commons.jelly``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.commons.lang``, ``org.apache.commons.logging``, ``org.apache.commons.net``, ``org.apache.commons.ognl``, ``org.apache.cxf.catalog``, ``org.apache.cxf.common.classloader``, ``org.apache.cxf.common.jaxb``, ``org.apache.cxf.common.logging``, ``org.apache.cxf.configuration.jsse``, ``org.apache.cxf.helpers``, ``org.apache.cxf.resource``, ``org.apache.cxf.staxutils``, ``org.apache.cxf.tools.corba.utils``, ``org.apache.cxf.tools.util``, ``org.apache.cxf.transform``, ``org.apache.directory.ldap.client.api``, ``org.apache.hadoop.fs``, ``org.apache.hadoop.hive.metastore``, ``org.apache.hadoop.hive.ql.exec``, ``org.apache.hadoop.hive.ql.metadata``, ``org.apache.hc.client5.http.async.methods``, ``org.apache.hc.client5.http.classic.methods``, ``org.apache.hc.client5.http.fluent``, ``org.apache.hive.hcatalog.templeton``, ``org.apache.ibatis.jdbc``, ``org.apache.ibatis.mapping``, ``org.apache.log4j``, ``org.apache.shiro.codec``, ``org.apache.shiro.jndi``, ``org.apache.shiro.mgt``, ``org.apache.sshd.client.session``, ``org.apache.struts.beanvalidation.validation.interceptor``, ``org.apache.struts2``, ``org.apache.tools.ant``, ``org.apache.tools.zip``, ``org.apache.velocity.app``, ``org.apache.velocity.runtime``, ``org.codehaus.cargo.container.installer``, ``org.codehaus.groovy.control``, ``org.dom4j``, ``org.eclipse.jetty.client``, ``org.fusesource.leveldbjni``, ``org.geogebra.web.full.main``, ``org.gradle.api.file``, ``org.hibernate``, ``org.influxdb``, ``org.jdbi.v3.core``, ``org.jenkins.ui.icon``, ``org.jenkins.ui.symbol``, ``org.jooq``, ``org.keycloak.models.map.storage``, ``org.kohsuke.stapler``, ``org.mvel2``, ``org.openjdk.jmh.runner.options``, ``org.owasp.esapi``, ``org.pac4j.jwt.config.encryption``, ``org.pac4j.jwt.config.signature``, ``org.scijava.log``, ``org.slf4j``, ``org.thymeleaf``, ``org.xml.sax``, ``org.xmlpull.v1``, ``org.yaml.snakeyaml``, ``play.libs.ws``, ``play.mvc``, ``ratpack.core.form``, ``ratpack.core.handling``, ``ratpack.core.http``, ``ratpack.exec``, ``ratpack.form``, ``ratpack.func``, ``ratpack.handling``, ``ratpack.http``, ``ratpack.util``, ``retrofit2``, ``sun.jvmstat.perfdata.monitor.protocol.local``, ``sun.jvmstat.perfdata.monitor.protocol.rmi``, ``sun.misc``, ``sun.net.ftp``, ``sun.net.www.protocol.http``, ``sun.security.acl``, ``sun.security.jgss.krb5``, ``sun.security.krb5``, ``sun.security.pkcs``, ``sun.security.pkcs11``, ``sun.security.provider``, ``sun.security.ssl``, ``sun.security.x509``, ``sun.tools.jconsole``",131,10518,893,125,6,22,18,,209 + Totals,,308,18953,2558,337,16,128,33,1,409 diff --git a/java/integration-tests-lib/maven_wrapper_test_utils.py b/java/integration-tests-lib/maven_wrapper_test_utils.py new file mode 100644 index 00000000000..fd3b727ff77 --- /dev/null +++ b/java/integration-tests-lib/maven_wrapper_test_utils.py @@ -0,0 +1,12 @@ +import sys +import os.path + +def check_maven_wrapper_exists(expected_version): + if not os.path.exists(".mvn/wrapper/maven-wrapper.jar"): + print("Maven wrapper jar file expected but not found", file = sys.stderr) + sys.exit(1) + with open(".mvn/wrapper/maven-wrapper.properties", "r") as f: + content = f.read() + if ("apache-maven-%s-" % expected_version) not in content: + print("Expected Maven wrapper to fetch version %s, but actual properties file said:\n\n%s" % (expected_version, content), file = sys.stderr) + sys.exit(1) diff --git a/java/ql/automodel/src/AutomodelEndpointTypes.qll b/java/ql/automodel/src/AutomodelEndpointTypes.qll index e37cc80099f..f4f7bc8eb7b 100644 --- a/java/ql/automodel/src/AutomodelEndpointTypes.qll +++ b/java/ql/automodel/src/AutomodelEndpointTypes.qll @@ -50,6 +50,26 @@ class CommandInjectionSinkType extends SinkType { CommandInjectionSinkType() { this = "command-injection" } } +/** A sink relevant to file storage. */ +class FileContentStoreSinkType extends SinkType { + FileContentStoreSinkType() { this = "file-content-store" } +} + +/** A sink relevant to HTML injection. */ +class HtmlInjectionSinkType extends SinkType { + HtmlInjectionSinkType() { this = "html-injection" } +} + +/** A sink relevant to LDAP injection. */ +class LdapInjectionSinkType extends SinkType { + LdapInjectionSinkType() { this = "ldap-injection" } +} + +/** A sink relevant to URL redirection. */ +class UrlRedirectionSinkType extends SinkType { + UrlRedirectionSinkType() { this = "url-redirection" } +} + /** A class for source types that can be predicted by a classifier. */ abstract class SourceType extends EndpointType { bindingset[this] diff --git a/java/ql/automodel/src/AutomodelJavaUtil.qll b/java/ql/automodel/src/AutomodelJavaUtil.qll index ba42806e953..368fb172483 100644 --- a/java/ql/automodel/src/AutomodelJavaUtil.qll +++ b/java/ql/automodel/src/AutomodelJavaUtil.qll @@ -28,20 +28,7 @@ class DollarAtString extends string { * descriptions. */ predicate isKnownKind(string kind, AutomodelEndpointTypes::EndpointType type) { - kind = "path-injection" and - type instanceof AutomodelEndpointTypes::PathInjectionSinkType - or - kind = "sql-injection" and - type instanceof AutomodelEndpointTypes::SqlInjectionSinkType - or - kind = "request-forgery" and - type instanceof AutomodelEndpointTypes::RequestForgerySinkType - or - kind = "command-injection" and - type instanceof AutomodelEndpointTypes::CommandInjectionSinkType - or - kind = "remote" and - type instanceof AutomodelEndpointTypes::RemoteSourceType + kind = type.getKind() } /** diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.expected b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.expected new file mode 100644 index 00000000000..08c21ba9900 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.expected @@ -0,0 +1,20 @@ +| Annotation processors enabled: true | 1 | +| Number of calls with call target | 1 | +| Number of calls with missing call target | 4 | +| Number of diagnostics from CodeQL Java extractor with severity 5 | 10 | +| Number of diagnostics from CodeQL Java extractor with severity 6 | 2 | +| Number of expressions with known type | 1 | +| Number of expressions with unknown type | 6 | +| Number of files | 607 | +| Number of files with extension class | 604 | +| Number of files with extension java | 1 | +| Number of files with extension properties | 1 | +| Number of lines of code | 7 | +| Number of lines of code with extension java | 7 | +| Percentage of calls with call target | 20 | +| Percentage of expressions with known type | 14 | +| Total number of diagnostics from CodeQL Java extractor | 12 | +| Total number of lines | 13 | +| Total number of lines with extension java | 13 | +| Used annotation processor: lombok.launch.AnnotationProcessorHider$AnnotationProcessor | 1 | +| Used annotation processor: lombok.launch.AnnotationProcessorHider$ClaimingProcessor | 1 | diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.qlref b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.qlref new file mode 100644 index 00000000000..ff57e78a9d7 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.qlref @@ -0,0 +1 @@ +Telemetry/ExtractorInformation.ql \ No newline at end of file diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/Test.java b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/Test.java new file mode 100644 index 00000000000..6c2a61c4897 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/Test.java @@ -0,0 +1,13 @@ +import abc.Def; + +public class Test { + + public static void test() { + + Def.someMethod(); + (new Def()).member().chained(); + + } + +} + diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/diagnostics.expected new file mode 100644 index 00000000000..2118edbe296 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/diagnostics.expected @@ -0,0 +1,42 @@ +{ + "markdownMessage": "Because no usable build tool (Gradle, Maven, etc) was found, build scripts could not be queried for guidance about the appropriate JDK version for the code being extracted, or precise dependency information. The default JDK will be used, and external dependencies will be inferred from the Java package names used.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/no-build-tool-advice", + "name": "Java buildless mode found no usable build tool" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java buildless mode used the system default JDK.", + "severity": "unknown", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/jdk-system-default", + "name": "Java buildless mode used the system default JDK" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "Java was extracted in buildless mode. This means that all Java source in the working directory will be scanned, with build tools such as Maven and Gradle only contributing information about external dependencies.", + "severity": "note", + "source": { + "extractorName": "java", + "id": "java/autobuilder/buildless/mode-active", + "name": "Java was extracted in buildless mode" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/test.py b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/test.py new file mode 100644 index 00000000000..747dd6a82ad --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-erroneous/test.py @@ -0,0 +1,8 @@ +import sys + +from create_database_utils import * +from diagnostics_test_utils import * + +run_codeql_database_create([], lang="java", extra_env={"CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS": "true"}) + +check_diagnostics() diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.gitattributes b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.gitattributes new file mode 100644 index 00000000000..36e4b9d7df9 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.mvn/wrapper/maven-wrapper.properties b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000000..9527f33d801 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/force_sequential_test_execution new file mode 100644 index 00000000000..44bcad8d582 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/force_sequential_test_execution @@ -0,0 +1 @@ +The wrapper downloading a Maven distribution multiple times in parallel is not safe. diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw new file mode 100755 index 00000000000..b7f064624f8 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw @@ -0,0 +1,287 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.1.1 +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + JAVA_HOME="`/usr/libexec/java_home`"; export JAVA_HOME + else + JAVA_HOME="/Library/Java/Home"; export JAVA_HOME + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`\\unset -f command; \\command -v java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + printf '%s' "$(cd "$basedir"; pwd)" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=$(find_maven_basedir "$(dirname $0)") +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + else + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $wrapperUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + QUIET="--quiet" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + QUIET="" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" + else + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" + fi + [ $? -eq 0 ] || rm -f "$wrapperJarPath" + elif command -v curl > /dev/null; then + QUIET="--silent" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + QUIET="" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L + else + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L + fi + [ $? -eq 0 ] || rm -f "$wrapperJarPath" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaSource="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaSource=`cygpath --path --windows "$javaSource"` + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaSource") + fi + if [ -e "$javaClass" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw.cmd b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw.cmd new file mode 100644 index 00000000000..474c9d6b74c --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw.cmd @@ -0,0 +1,187 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.1.1 +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %WRAPPER_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/pom.xml b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/pom.xml new file mode 100644 index 00000000000..ec4aaf128c1 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/pom.xml @@ -0,0 +1,114 @@ + + + + 4.0.0 + + com.example + maven-sample + 1.0-SNAPSHOT + + maven-sample + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + + + + + exec-maven-plugin + org.codehaus.mojo + 1.1.1 + + + check-maven-version + package + + java + + + + + com.example.App + + + + com.diffplug.spotless + spotless-maven-plugin + 2.19.1 + + + + check + + compile + + + + + + /* FAIL ME */ + + + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + \ No newline at end of file diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/java/com/example/App.java b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/java/com/example/App.java new file mode 100644 index 00000000000..c9eec918587 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/java/com/example/App.java @@ -0,0 +1,30 @@ +package com.example; + +import java.util.regex.Pattern; +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + String expectedVersion = System.getenv("EXPECT_MAVEN"); + Path mavenHome = Paths.get(System.getProperty("maven.home")).normalize(); + String observedVersion = mavenHome.getFileName().toString(); + if (expectedVersion != null && !expectedVersion.equals(observedVersion)) { + System.err.println("Wrong maven version, expected '" + expectedVersion + "' but got '" + observedVersion + "'" + mavenHome); + System.exit(1); + } + String commandMatcher = System.getenv("EXPECT_COMMAND_REGEX"); + String command = System.getProperty("sun.java.command"); + if (commandMatcher != null && !Pattern.matches(commandMatcher, command)) { + System.err.println("Wrong command line, '" + command + "' does not match '" + commandMatcher + "'"); + System.exit(1); + } + } +} diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/my-app.properties b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/my-app.properties new file mode 100644 index 00000000000..e566b49a29a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/my-app.properties @@ -0,0 +1 @@ +version=1.0 diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/page.xml b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/page.xml new file mode 100644 index 00000000000..2bab459cb03 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/page.xml @@ -0,0 +1,8 @@ + + +A sample + + +

    Hello world!

    + + diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/struts.xml b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/struts.xml new file mode 100644 index 00000000000..73fc0c6b9cb --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/struts.xml @@ -0,0 +1,4 @@ + + +This is a sample file + diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/test/java/com/example/AppTest.java new file mode 100644 index 00000000000..22a94ca6f01 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/test/java/com/example/AppTest.java @@ -0,0 +1,20 @@ +package com.example; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.expected b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.expected new file mode 100644 index 00000000000..dd77a3fab0a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.expected @@ -0,0 +1,16 @@ +#select +| src/main/java/com/example/App.java:0:0:0:0 | App | +| src/test/java/com/example/AppTest.java:0:0:0:0 | AppTest | +xmlFiles +| pom.xml:0:0:0:0 | pom.xml | +| src/main/resources/page.xml:0:0:0:0 | src/main/resources/page.xml | +| src/main/resources/struts.xml:0:0:0:0 | src/main/resources/struts.xml | +| target/classes/page.xml:0:0:0:0 | target/classes/page.xml | +| target/classes/struts.xml:0:0:0:0 | target/classes/struts.xml | +propertiesFiles +| .mvn/wrapper/maven-wrapper.properties:0:0:0:0 | .mvn/wrapper/maven-wrapper.properties | +| src/main/resources/my-app.properties:0:0:0:0 | src/main/resources/my-app.properties | +| target/classes/my-app.properties:0:0:0:0 | target/classes/my-app.properties | +| target/maven-archiver/pom.properties:0:0:0:0 | target/maven-archiver/pom.properties | +| test-db/log/ext/javac-1.properties:0:0:0:0 | test-db/log/ext/javac-1.properties | +| test-db/log/ext/javac.properties:0:0:0:0 | test-db/log/ext/javac.properties | diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.py b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.py new file mode 100644 index 00000000000..5311b982c2b --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.py @@ -0,0 +1,7 @@ +import sys + +from create_database_utils import * +from maven_wrapper_test_utils import * + +run_codeql_database_create([], lang="java") +check_maven_wrapper_exists("3.9.4") diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.ql b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.ql new file mode 100644 index 00000000000..25cd26fdd14 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.ql @@ -0,0 +1,9 @@ +import java + +from File f +where f.isSourceFile() +select f + +query predicate xmlFiles(XmlFile x) { any() } + +query predicate propertiesFiles(File f) { f.getExtension() = "properties" } diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.gitattributes b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.gitattributes new file mode 100644 index 00000000000..36e4b9d7df9 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/MavenWrapperDownloader.java b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000000..732313c4311 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,162 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.IOException; +import java.io.InputStream; +import java.net.Authenticator; +import java.net.PasswordAuthentication; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.LinkOption; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.nio.file.StandardOpenOption; +import java.util.Properties; + +public final class MavenWrapperDownloader +{ + private static final String WRAPPER_VERSION = "3.1.1"; + + private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) ); + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/" + WRAPPER_VERSION + + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to use instead of the + * default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main( String[] args ) + { + if ( args.length == 0 ) + { + System.err.println( " - ERROR projectBasedir parameter missing" ); + System.exit( 1 ); + } + + log( " - Downloader started" ); + final String dir = args[0].replace( "..", "" ); // Sanitize path + final Path projectBasedir = Paths.get( dir ).toAbsolutePath().normalize(); + if ( !Files.isDirectory( projectBasedir, LinkOption.NOFOLLOW_LINKS ) ) + { + System.err.println( " - ERROR projectBasedir not exists: " + projectBasedir ); + System.exit( 1 ); + } + + log( " - Using base directory: " + projectBasedir ); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + Path mavenWrapperPropertyFile = projectBasedir.resolve( MAVEN_WRAPPER_PROPERTIES_PATH ); + String url = readWrapperUrl( mavenWrapperPropertyFile ); + + try + { + Path outputFile = projectBasedir.resolve( MAVEN_WRAPPER_JAR_PATH ); + createDirectories( outputFile.getParent() ); + downloadFileFromURL( url, outputFile ); + log( "Done" ); + System.exit( 0 ); + } + catch ( IOException e ) + { + System.err.println( "- Error downloading" ); + e.printStackTrace(); + System.exit( 1 ); + } + } + + private static void downloadFileFromURL( String urlString, Path destination ) throws IOException + { + log( " - Downloading to: " + destination ); + if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null ) + { + final String username = System.getenv( "MVNW_USERNAME" ); + final char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray(); + Authenticator.setDefault( new Authenticator() + { + @Override + protected PasswordAuthentication getPasswordAuthentication() + { + return new PasswordAuthentication( username, password ); + } + } ); + } + URL website = new URL( urlString ); + try ( InputStream inStream = website.openStream() ) { + Files.copy( inStream, destination, StandardCopyOption.REPLACE_EXISTING ); + } + log( " - Downloader complete" ); + } + + private static void createDirectories(Path outputPath) throws IOException + { + if ( !Files.isDirectory( outputPath, LinkOption.NOFOLLOW_LINKS ) ) { + Path createDirectories = Files.createDirectories( outputPath ); + log( " - Directories created: " + createDirectories ); + } + } + + private static String readWrapperUrl( Path mavenWrapperPropertyFile ) + { + String url = DEFAULT_DOWNLOAD_URL; + if ( Files.exists( mavenWrapperPropertyFile, LinkOption.NOFOLLOW_LINKS ) ) + { + log( " - Reading property file: " + mavenWrapperPropertyFile ); + try ( InputStream in = Files.newInputStream( mavenWrapperPropertyFile, StandardOpenOption.READ ) ) + { + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load( in ); + url = mavenWrapperProperties.getProperty( PROPERTY_NAME_WRAPPER_URL, DEFAULT_DOWNLOAD_URL ); + } + catch ( IOException e ) + { + System.err.println( " - ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'" ); + } + } + log( " - Downloading from: " + url ); + return url; + } + + private static void log( String msg ) + { + if ( VERBOSE ) + { + System.out.println( msg ); + } + } + +} diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/maven-wrapper.properties b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000000..9527f33d801 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/force_sequential_test_execution new file mode 100644 index 00000000000..44bcad8d582 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/force_sequential_test_execution @@ -0,0 +1 @@ +The wrapper downloading a Maven distribution multiple times in parallel is not safe. diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw new file mode 100755 index 00000000000..b7f064624f8 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw @@ -0,0 +1,287 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.1.1 +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + JAVA_HOME="`/usr/libexec/java_home`"; export JAVA_HOME + else + JAVA_HOME="/Library/Java/Home"; export JAVA_HOME + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`\\unset -f command; \\command -v java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + printf '%s' "$(cd "$basedir"; pwd)" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=$(find_maven_basedir "$(dirname $0)") +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + else + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $wrapperUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + QUIET="--quiet" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + QUIET="" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" + else + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" + fi + [ $? -eq 0 ] || rm -f "$wrapperJarPath" + elif command -v curl > /dev/null; then + QUIET="--silent" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + QUIET="" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L + else + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L + fi + [ $? -eq 0 ] || rm -f "$wrapperJarPath" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaSource="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaSource=`cygpath --path --windows "$javaSource"` + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaSource") + fi + if [ -e "$javaClass" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw.cmd b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw.cmd new file mode 100644 index 00000000000..474c9d6b74c --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw.cmd @@ -0,0 +1,187 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.1.1 +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %WRAPPER_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/pom.xml b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/pom.xml new file mode 100644 index 00000000000..ec4aaf128c1 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/pom.xml @@ -0,0 +1,114 @@ + + + + 4.0.0 + + com.example + maven-sample + 1.0-SNAPSHOT + + maven-sample + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + + + + + exec-maven-plugin + org.codehaus.mojo + 1.1.1 + + + check-maven-version + package + + java + + + + + com.example.App + + + + com.diffplug.spotless + spotless-maven-plugin + 2.19.1 + + + + check + + compile + + + + + + /* FAIL ME */ + + + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + \ No newline at end of file diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/java/com/example/App.java b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/java/com/example/App.java new file mode 100644 index 00000000000..c9eec918587 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/java/com/example/App.java @@ -0,0 +1,30 @@ +package com.example; + +import java.util.regex.Pattern; +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + String expectedVersion = System.getenv("EXPECT_MAVEN"); + Path mavenHome = Paths.get(System.getProperty("maven.home")).normalize(); + String observedVersion = mavenHome.getFileName().toString(); + if (expectedVersion != null && !expectedVersion.equals(observedVersion)) { + System.err.println("Wrong maven version, expected '" + expectedVersion + "' but got '" + observedVersion + "'" + mavenHome); + System.exit(1); + } + String commandMatcher = System.getenv("EXPECT_COMMAND_REGEX"); + String command = System.getProperty("sun.java.command"); + if (commandMatcher != null && !Pattern.matches(commandMatcher, command)) { + System.err.println("Wrong command line, '" + command + "' does not match '" + commandMatcher + "'"); + System.exit(1); + } + } +} diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/my-app.properties b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/my-app.properties new file mode 100644 index 00000000000..e566b49a29a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/my-app.properties @@ -0,0 +1 @@ +version=1.0 diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/page.xml b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/page.xml new file mode 100644 index 00000000000..2bab459cb03 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/page.xml @@ -0,0 +1,8 @@ + + +A sample + + +

    Hello world!

    + + diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/struts.xml b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/struts.xml new file mode 100644 index 00000000000..73fc0c6b9cb --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/struts.xml @@ -0,0 +1,4 @@ + + +This is a sample file + diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/test/java/com/example/AppTest.java new file mode 100644 index 00000000000..22a94ca6f01 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/test/java/com/example/AppTest.java @@ -0,0 +1,20 @@ +package com.example; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.expected b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.expected new file mode 100644 index 00000000000..dd77a3fab0a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.expected @@ -0,0 +1,16 @@ +#select +| src/main/java/com/example/App.java:0:0:0:0 | App | +| src/test/java/com/example/AppTest.java:0:0:0:0 | AppTest | +xmlFiles +| pom.xml:0:0:0:0 | pom.xml | +| src/main/resources/page.xml:0:0:0:0 | src/main/resources/page.xml | +| src/main/resources/struts.xml:0:0:0:0 | src/main/resources/struts.xml | +| target/classes/page.xml:0:0:0:0 | target/classes/page.xml | +| target/classes/struts.xml:0:0:0:0 | target/classes/struts.xml | +propertiesFiles +| .mvn/wrapper/maven-wrapper.properties:0:0:0:0 | .mvn/wrapper/maven-wrapper.properties | +| src/main/resources/my-app.properties:0:0:0:0 | src/main/resources/my-app.properties | +| target/classes/my-app.properties:0:0:0:0 | target/classes/my-app.properties | +| target/maven-archiver/pom.properties:0:0:0:0 | target/maven-archiver/pom.properties | +| test-db/log/ext/javac-1.properties:0:0:0:0 | test-db/log/ext/javac-1.properties | +| test-db/log/ext/javac.properties:0:0:0:0 | test-db/log/ext/javac.properties | diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.py b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.py new file mode 100644 index 00000000000..5311b982c2b --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.py @@ -0,0 +1,7 @@ +import sys + +from create_database_utils import * +from maven_wrapper_test_utils import * + +run_codeql_database_create([], lang="java") +check_maven_wrapper_exists("3.9.4") diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.ql b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.ql new file mode 100644 index 00000000000..25cd26fdd14 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.ql @@ -0,0 +1,9 @@ +import java + +from File f +where f.isSourceFile() +select f + +query predicate xmlFiles(XmlFile x) { any() } + +query predicate propertiesFiles(File f) { f.getExtension() = "properties" } diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/.gitattributes b/java/ql/integration-tests/all-platforms/java/maven-wrapper/.gitattributes new file mode 100644 index 00000000000..36e4b9d7df9 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.jar b/java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000000..bf82ff01c6c Binary files /dev/null and b/java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.jar differ diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.properties b/java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000000..9527f33d801 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-wrapper/force_sequential_test_execution new file mode 100644 index 00000000000..44bcad8d582 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/force_sequential_test_execution @@ -0,0 +1 @@ +The wrapper downloading a Maven distribution multiple times in parallel is not safe. diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw b/java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw new file mode 100755 index 00000000000..b7f064624f8 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw @@ -0,0 +1,287 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.1.1 +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + JAVA_HOME="`/usr/libexec/java_home`"; export JAVA_HOME + else + JAVA_HOME="/Library/Java/Home"; export JAVA_HOME + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`\\unset -f command; \\command -v java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + printf '%s' "$(cd "$basedir"; pwd)" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=$(find_maven_basedir "$(dirname $0)") +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + else + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $wrapperUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + QUIET="--quiet" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + QUIET="" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" + else + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" + fi + [ $? -eq 0 ] || rm -f "$wrapperJarPath" + elif command -v curl > /dev/null; then + QUIET="--silent" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + QUIET="" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L + else + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L + fi + [ $? -eq 0 ] || rm -f "$wrapperJarPath" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaSource="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaSource=`cygpath --path --windows "$javaSource"` + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaSource") + fi + if [ -e "$javaClass" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw.cmd b/java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw.cmd new file mode 100644 index 00000000000..474c9d6b74c --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw.cmd @@ -0,0 +1,187 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.1.1 +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %WRAPPER_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/pom.xml b/java/ql/integration-tests/all-platforms/java/maven-wrapper/pom.xml new file mode 100644 index 00000000000..ec4aaf128c1 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/pom.xml @@ -0,0 +1,114 @@ + + + + 4.0.0 + + com.example + maven-sample + 1.0-SNAPSHOT + + maven-sample + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + + + + + exec-maven-plugin + org.codehaus.mojo + 1.1.1 + + + check-maven-version + package + + java + + + + + com.example.App + + + + com.diffplug.spotless + spotless-maven-plugin + 2.19.1 + + + + check + + compile + + + + + + /* FAIL ME */ + + + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + \ No newline at end of file diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/java/com/example/App.java b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/java/com/example/App.java new file mode 100644 index 00000000000..c9eec918587 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/java/com/example/App.java @@ -0,0 +1,30 @@ +package com.example; + +import java.util.regex.Pattern; +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + String expectedVersion = System.getenv("EXPECT_MAVEN"); + Path mavenHome = Paths.get(System.getProperty("maven.home")).normalize(); + String observedVersion = mavenHome.getFileName().toString(); + if (expectedVersion != null && !expectedVersion.equals(observedVersion)) { + System.err.println("Wrong maven version, expected '" + expectedVersion + "' but got '" + observedVersion + "'" + mavenHome); + System.exit(1); + } + String commandMatcher = System.getenv("EXPECT_COMMAND_REGEX"); + String command = System.getProperty("sun.java.command"); + if (commandMatcher != null && !Pattern.matches(commandMatcher, command)) { + System.err.println("Wrong command line, '" + command + "' does not match '" + commandMatcher + "'"); + System.exit(1); + } + } +} diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/my-app.properties b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/my-app.properties new file mode 100644 index 00000000000..e566b49a29a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/my-app.properties @@ -0,0 +1 @@ +version=1.0 diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/page.xml b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/page.xml new file mode 100644 index 00000000000..2bab459cb03 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/page.xml @@ -0,0 +1,8 @@ + + +A sample + + +

    Hello world!

    + + diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/struts.xml b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/struts.xml new file mode 100644 index 00000000000..73fc0c6b9cb --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/struts.xml @@ -0,0 +1,4 @@ + + +This is a sample file + diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/test/java/com/example/AppTest.java new file mode 100644 index 00000000000..22a94ca6f01 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/test/java/com/example/AppTest.java @@ -0,0 +1,20 @@ +package com.example; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.expected b/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.expected new file mode 100644 index 00000000000..dd77a3fab0a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.expected @@ -0,0 +1,16 @@ +#select +| src/main/java/com/example/App.java:0:0:0:0 | App | +| src/test/java/com/example/AppTest.java:0:0:0:0 | AppTest | +xmlFiles +| pom.xml:0:0:0:0 | pom.xml | +| src/main/resources/page.xml:0:0:0:0 | src/main/resources/page.xml | +| src/main/resources/struts.xml:0:0:0:0 | src/main/resources/struts.xml | +| target/classes/page.xml:0:0:0:0 | target/classes/page.xml | +| target/classes/struts.xml:0:0:0:0 | target/classes/struts.xml | +propertiesFiles +| .mvn/wrapper/maven-wrapper.properties:0:0:0:0 | .mvn/wrapper/maven-wrapper.properties | +| src/main/resources/my-app.properties:0:0:0:0 | src/main/resources/my-app.properties | +| target/classes/my-app.properties:0:0:0:0 | target/classes/my-app.properties | +| target/maven-archiver/pom.properties:0:0:0:0 | target/maven-archiver/pom.properties | +| test-db/log/ext/javac-1.properties:0:0:0:0 | test-db/log/ext/javac-1.properties | +| test-db/log/ext/javac.properties:0:0:0:0 | test-db/log/ext/javac.properties | diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.py b/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.py new file mode 100644 index 00000000000..5311b982c2b --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.py @@ -0,0 +1,7 @@ +import sys + +from create_database_utils import * +from maven_wrapper_test_utils import * + +run_codeql_database_create([], lang="java") +check_maven_wrapper_exists("3.9.4") diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.ql b/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.ql new file mode 100644 index 00000000000..25cd26fdd14 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.ql @@ -0,0 +1,9 @@ +import java + +from File f +where f.isSourceFile() +select f + +query predicate xmlFiles(XmlFile x) { any() } + +query predicate propertiesFiles(File f) { f.getExtension() = "properties" } diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.expected b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.expected new file mode 100644 index 00000000000..6d33b902935 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.expected @@ -0,0 +1,18 @@ +| Annotation processors enabled: true | 1 | +| Number of calls with call target | 1 | +| Number of calls with missing call target | 0 | +| Number of expressions with known type | 1 | +| Number of expressions with unknown type | 0 | +| Number of files | 543 | +| Number of files with extension class | 538 | +| Number of files with extension jar | 1 | +| Number of files with extension java | 2 | +| Number of files with extension properties | 1 | +| Number of lines of code | 7 | +| Number of lines of code with extension java | 7 | +| Percentage of calls with call target | 100 | +| Percentage of expressions with known type | 100 | +| Total number of lines | 12 | +| Total number of lines with extension java | 12 | +| Used annotation processor: lombok.launch.AnnotationProcessorHider$AnnotationProcessor | 1 | +| Used annotation processor: lombok.launch.AnnotationProcessorHider$ClaimingProcessor | 1 | diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.qlref b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.qlref new file mode 100644 index 00000000000..ff57e78a9d7 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.qlref @@ -0,0 +1 @@ +Telemetry/ExtractorInformation.ql \ No newline at end of file diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/mod1pkg/Mod1Class.java b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/mod1pkg/Mod1Class.java new file mode 100644 index 00000000000..3b9bc9e0b0c --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/mod1pkg/Mod1Class.java @@ -0,0 +1,3 @@ +package mod1pkg; + +public class Mod1Class { } diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/module-info.java b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/module-info.java new file mode 100644 index 00000000000..cde20aaf6c7 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/module-info.java @@ -0,0 +1,5 @@ +module moduleone { + + exports mod1pkg; + +} diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/mod2pkg/User.java b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/mod2pkg/User.java new file mode 100644 index 00000000000..c21bb391335 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/mod2pkg/User.java @@ -0,0 +1,7 @@ +import mod1pkg.Mod1Class; + +public class User { + + private Mod1Class m1c; + +} diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/module-info.java b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/module-info.java new file mode 100644 index 00000000000..94f93fdfdf3 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/module-info.java @@ -0,0 +1,5 @@ +module moduletwo { + + requires moduleone; + +} diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/test.py b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/test.py new file mode 100644 index 00000000000..c4726143c50 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/test.py @@ -0,0 +1,15 @@ +import sys + +from create_database_utils import * +import subprocess +import os + +try_use_java11() + +os.mkdir("mod1obj") +os.mkdir("mod2obj") + +subprocess.check_call(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"]) +subprocess.check_call(["jar", "-c", "-f", "mod1.jar", "-C", "mod1obj", "mod1pkg/Mod1Class.class", "--release", "9", "-C", "mod1obj", "module-info.class"]) + +run_codeql_database_create(["javac mod2/mod2pkg/User.java mod2/module-info.java -d mod2obj -p mod1.jar"], lang="java") diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.expected b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.expected new file mode 100644 index 00000000000..d6bdf6dd7b5 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.expected @@ -0,0 +1,18 @@ +| Annotation processors enabled: true | 1 | +| Number of calls with call target | 1 | +| Number of calls with missing call target | 0 | +| Number of expressions with known type | 1 | +| Number of expressions with unknown type | 0 | +| Number of files | 610 | +| Number of files with extension class | 605 | +| Number of files with extension jar | 1 | +| Number of files with extension java | 2 | +| Number of files with extension properties | 1 | +| Number of lines of code | 7 | +| Number of lines of code with extension java | 7 | +| Percentage of calls with call target | 100 | +| Percentage of expressions with known type | 100 | +| Total number of lines | 12 | +| Total number of lines with extension java | 12 | +| Used annotation processor: lombok.launch.AnnotationProcessorHider$AnnotationProcessor | 1 | +| Used annotation processor: lombok.launch.AnnotationProcessorHider$ClaimingProcessor | 1 | diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.qlref b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.qlref new file mode 100644 index 00000000000..ff57e78a9d7 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.qlref @@ -0,0 +1 @@ +Telemetry/ExtractorInformation.ql \ No newline at end of file diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/mod1pkg/Mod1Class.java b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/mod1pkg/Mod1Class.java new file mode 100644 index 00000000000..3b9bc9e0b0c --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/mod1pkg/Mod1Class.java @@ -0,0 +1,3 @@ +package mod1pkg; + +public class Mod1Class { } diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/module-info.java b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/module-info.java new file mode 100644 index 00000000000..cde20aaf6c7 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/module-info.java @@ -0,0 +1,5 @@ +module moduleone { + + exports mod1pkg; + +} diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/mod2pkg/User.java b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/mod2pkg/User.java new file mode 100644 index 00000000000..c21bb391335 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/mod2pkg/User.java @@ -0,0 +1,7 @@ +import mod1pkg.Mod1Class; + +public class User { + + private Mod1Class m1c; + +} diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/module-info.java b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/module-info.java new file mode 100644 index 00000000000..94f93fdfdf3 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/module-info.java @@ -0,0 +1,5 @@ +module moduletwo { + + requires moduleone; + +} diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/test.py b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/test.py new file mode 100644 index 00000000000..c912a0cb27a --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/test.py @@ -0,0 +1,13 @@ +import sys + +from create_database_utils import * +import subprocess +import os + +os.mkdir("mod1obj") +os.mkdir("mod2obj") + +subprocess.check_call(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"]) +subprocess.check_call(["jar", "-c", "-f", "mod1.jar", "-C", "mod1obj", "mod1pkg/Mod1Class.class", "--release", "9", "-C", "mod1obj", "module-info.class"]) + +run_codeql_database_create(["javac mod2/mod2pkg/User.java mod2/module-info.java -d mod2obj -p mod1.jar"], lang="java") diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.expected b/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.expected index b7d6dd6e972..5e32cd7786e 100644 --- a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.expected +++ b/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.expected @@ -1,7 +1,12 @@ +| Number of calls with call target | 1 | +| Number of calls with missing call target | 0 | +| Number of expressions with known type | 0 | +| Number of expressions with unknown type | 0 | | Number of files with extension jar | 1 | | Number of files with extension kt | 1 | | Number of lines of code | 2 | | Number of lines of code with extension kt | 2 | +| Percentage of calls with call target | 100 | | Total number of lines | 3 | | Total number of lines with extension kt | 3 | | Uses Kotlin 2: false | 1 | diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.expected b/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.expected index b743aae2faf..d00ef5f0ec6 100644 --- a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.expected +++ b/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.expected @@ -1,7 +1,12 @@ +| Number of calls with call target | 1 | +| Number of calls with missing call target | 0 | +| Number of expressions with known type | 0 | +| Number of expressions with unknown type | 0 | | Number of files with extension jar | 1 | | Number of files with extension kt | 1 | | Number of lines of code | 2 | | Number of lines of code with extension kt | 2 | +| Percentage of calls with call target | 100 | | Total number of lines | 3 | | Total number of lines with extension kt | 3 | | Uses Kotlin 2: true | 1 | diff --git a/java/ql/lib/change-notes/2024-02-23-widget-flowsteps.md b/java/ql/lib/change-notes/2024-02-23-widget-flowsteps.md new file mode 100644 index 00000000000..eb560fba07d --- /dev/null +++ b/java/ql/lib/change-notes/2024-02-23-widget-flowsteps.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* Some flow steps related to `android.text.Editable.toString` that were accidentally disabled have been re-enabled. diff --git a/java/ql/lib/change-notes/2024-02-27-error-types.md b/java/ql/lib/change-notes/2024-02-27-error-types.md new file mode 100644 index 00000000000..cdc6d7620aa --- /dev/null +++ b/java/ql/lib/change-notes/2024-02-27-error-types.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Java expressions with erroneous types (e.g. the result of a call whose callee couldn't be resolved during extraction) are now given a CodeQL `ErrorType` more often. diff --git a/java/ql/lib/change-notes/2024-02-27-mvnw-versions.md b/java/ql/lib/change-notes/2024-02-27-mvnw-versions.md new file mode 100644 index 00000000000..a0227088ae9 --- /dev/null +++ b/java/ql/lib/change-notes/2024-02-27-mvnw-versions.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* Fixed the Java autobuilder overriding the version of Maven used by a project when the Maven wrapper `mvnw` is in use and the `maven-wrapper.jar` file is not present in the repository. diff --git a/java/ql/lib/ext/hudson.model.yml b/java/ql/lib/ext/hudson.model.yml index 791e63daaec..f83a2bae6b3 100644 --- a/java/ql/lib/ext/hudson.model.yml +++ b/java/ql/lib/ext/hudson.model.yml @@ -11,7 +11,7 @@ extensions: - ["hudson", "FilePath", True, "copyFrom", "(FileItem)", "", "Argument[0]", "path-injection", "ai-manual"] - ["hudson", "FilePath", True, "copyRecursiveTo", "", "", "Argument[this]", "path-injection", "ai-manual"] - ["hudson", "FilePath", True, "copyRecursiveTo", "(DirScanner,FilePath,String,FilePath$TarCompression)", "", "Argument[1]", "path-injection", "ai-manual"] - - ["hudson", "FilePath", True, "copyRecursiveTo", "(DirScanner,FilePath,String)", "", "Argument[1]", "file-content-store", "ai-manual"] + - ["hudson", "FilePath", True, "copyRecursiveTo", "(DirScanner,FilePath,String)", "", "Argument[1]", "path-injection", "ai-manual"] - ["hudson", "FilePath", True, "copyRecursiveTo", "(String,FilePath)", "", "Argument[1]", "path-injection", "ai-manual"] - ["hudson", "FilePath", True, "copyRecursiveTo", "(String,String,FilePath)", "", "Argument[0]", "path-injection", "ai-manual"] - ["hudson", "FilePath", True, "copyRecursiveTo", "(String,String,FilePath)", "", "Argument[2]", "path-injection", "ai-manual"] diff --git a/java/ql/lib/ext/java.lang.model.yml b/java/ql/lib/ext/java.lang.model.yml index 183ed225303..0569b4c209c 100644 --- a/java/ql/lib/ext/java.lang.model.yml +++ b/java/ql/lib/ext/java.lang.model.yml @@ -218,9 +218,11 @@ extensions: - ["java.lang", "System", "currentTimeMillis", "()", "summary", "manual"] - ["java.lang", "System", "exit", "(int)", "summary", "manual"] - ["java.lang", "System", "getenv", "(String)", "summary", "manual"] + - ["java.lang", "System", "getProperty", "", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs - ["java.lang", "System", "identityHashCode", "(Object)", "summary", "manual"] - ["java.lang", "System", "lineSeparator", "()", "summary", "manual"] - ["java.lang", "System", "nanoTime", "()", "summary", "manual"] + - ["java.lang", "System", "setProperty", "", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs - ["java.lang", "Thread", "currentThread", "()", "summary", "manual"] - ["java.lang", "Thread", "getContextClassLoader", "()", "summary", "manual"] - ["java.lang", "Thread", "interrupt", "()", "summary", "manual"] diff --git a/java/ql/lib/ext/java.security.model.yml b/java/ql/lib/ext/java.security.model.yml index c01f674b2c8..a50c0b1d3fa 100644 --- a/java/ql/lib/ext/java.security.model.yml +++ b/java/ql/lib/ext/java.security.model.yml @@ -15,3 +15,10 @@ extensions: - ["java.security", "KeyStoreSpi", True, "engineSetKeyEntry", "(String,Key,char[],Certificate[])", "", "Argument[2]", "credentials-password", "hq-generated"] - ["java.security", "KeyStoreSpi", True, "engineStore", "(OutputStream,char[])", "", "Argument[1]", "credentials-password", "hq-generated"] - ["java.security", "KeyStoreSpi", True, "engineSetKeyEntry", "(String,byte[],Certificate[])", "", "Argument[1]", "credentials-key", "hq-generated"] + - addsTo: + pack: codeql/java-all + extensible: neutralModel + data: + - ["java.security", "MessageDigest", "digest", "()", "summary", "df-manual"] + - ["java.security", "MessageDigest", "digest", "(byte[])", "summary", "df-manual"] + - ["java.security", "MessageDigest", "digest", "(byte[],int,int)", "summary", "df-manual"] diff --git a/java/ql/lib/ext/java.text.model.yml b/java/ql/lib/ext/java.text.model.yml index 5b315e9986d..16bb2300a98 100644 --- a/java/ql/lib/ext/java.text.model.yml +++ b/java/ql/lib/ext/java.text.model.yml @@ -4,6 +4,9 @@ extensions: extensible: neutralModel data: # summary neutrals + - ["java.text", "Format", "format", "", "summary", "manual"] # similar issue as `Object.toString`; depends on the object being passed as the argument + - ["java.text", "MessageFormat", "format", "", "summary", "manual"] # similar issue as `Object.toString`; depends on the object being passed as the argument + # The below APIs have numeric flow and are currently being stored as neutral models. # These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future. - ["java.text", "DateFormat", "format", "(Date)", "summary", "manual"] # taint-numeric diff --git a/java/ql/lib/ext/java.util.model.yml b/java/ql/lib/ext/java.util.model.yml index 07eae7c95b4..bd6e58918aa 100644 --- a/java/ql/lib/ext/java.util.model.yml +++ b/java/ql/lib/ext/java.util.model.yml @@ -227,6 +227,8 @@ extensions: - ["java.util", "Map", True, "replace", "(Object,Object,Object)", "", "Argument[0]", "Argument[this].MapKey", "value", "manual"] - ["java.util", "Map", True, "replace", "(Object,Object,Object)", "", "Argument[2]", "Argument[this].MapValue", "value", "manual"] - ["java.util", "Map", True, "values", "()", "", "Argument[this].MapValue", "ReturnValue.Element", "value", "manual"] + - ["java.util", "Map$Entry", True, "copyOf", "(Map$Entry)", "", "Argument[0].MapKey", "ReturnValue.MapKey", "value", "df-manual"] + - ["java.util", "Map$Entry", True, "copyOf", "(Map$Entry)", "", "Argument[0].MapValue", "ReturnValue.MapValue", "value", "df-manual"] - ["java.util", "Map$Entry", True, "getKey", "", "", "Argument[this].MapKey", "ReturnValue", "value", "manual"] - ["java.util", "Map$Entry", True, "getValue", "", "", "Argument[this].MapValue", "ReturnValue", "value", "manual"] - ["java.util", "Map$Entry", True, "setValue", "", "", "Argument[this].MapValue", "ReturnValue", "value", "manual"] @@ -415,6 +417,7 @@ extensions: - ["java.util", "ArrayList", "ArrayList", "(int)", "summary", "manual"] - ["java.util", "ArrayList", "isEmpty", "()", "summary", "manual"] - ["java.util", "ArrayList", "size", "()", "summary", "manual"] + - ["java.util", "Arrays", "deepToString", "(Object[])", "summary", "df-manual"] - ["java.util", "Arrays", "toString", "(Object[])", "summary", "manual"] - ["java.util", "Calendar", "getInstance", "()", "summary", "manual"] - ["java.util", "Collection", "contains", "(Object)", "summary", "manual"] @@ -454,6 +457,8 @@ extensions: - ["java.util", "Set", "contains", "(Object)", "summary", "manual"] - ["java.util", "Set", "isEmpty", "()", "summary", "manual"] - ["java.util", "Set", "size", "()", "summary", "manual"] + - ["java.util", "TreeMap", "TreeMap", "(Comparator)", "summary", "df-manual"] + - ["java.util", "TreeSet", "TreeSet", "(Comparator)", "summary", "df-manual"] - ["java.util", "UUID", "equals", "(Object)", "summary", "manual"] - ["java.util", "UUID", "fromString", "(String)", "summary", "manual"] - ["java.util", "UUID", "randomUUID", "()", "summary", "manual"] diff --git a/java/ql/lib/ext/java.util.stream.model.yml b/java/ql/lib/ext/java.util.stream.model.yml index 52b32a73587..32438ab1956 100644 --- a/java/ql/lib/ext/java.util.stream.model.yml +++ b/java/ql/lib/ext/java.util.stream.model.yml @@ -92,8 +92,11 @@ extensions: pack: codeql/java-all extensible: neutralModel data: + - ["java.util.stream", "Collectors", "joining", "", "summary", "manual"] # cannot be modeled completely without a model for `java.util.stream.Stream#collect(Collector)` as well - ["java.util.stream", "Collectors", "toList", "()", "summary", "manual"] + - ["java.util.stream", "Collectors", "toMap", "", "summary", "manual"] # specialized collectors flow - ["java.util.stream", "Collectors", "toSet", "()", "summary", "manual"] + - ["java.util.stream", "Stream", "collect", "(Collector)", "summary", "manual"] # handled separately on a case-by-case basis as it is too complex for MaD - ["java.util.stream", "Stream", "count", "()", "summary", "manual"] # The below APIs have numeric flow and are currently being stored as neutral models. diff --git a/java/ql/lib/ext/javax.crypto.model.yml b/java/ql/lib/ext/javax.crypto.model.yml index b001017b256..9c909320344 100644 --- a/java/ql/lib/ext/javax.crypto.model.yml +++ b/java/ql/lib/ext/javax.crypto.model.yml @@ -7,3 +7,20 @@ extensions: - ["javax.crypto", "Cipher", True, "init", "(int,Key,AlgorithmParameterSpec,SecureRandom)", "", "Argument[2]", "encryption-iv", "manual"] - ["javax.crypto", "Cipher", False, "unwrap", "(byte[],String,int)", "", "Argument[0]", "credentials-key", "hq-generated"] - ["javax.crypto", "CipherSpi", True, "engineUnwrap", "(byte[],String,int)", "", "Argument[0]", "credentials-key", "hq-generated"] + - addsTo: + pack: codeql/java-all + extensible: neutralModel + data: + - ["javax.crypto", "Cipher", "doFinal", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "getAlgorithm", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "getExemptionMechanism", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "getInstance", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "getIV", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "getParameters", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "getProvider", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "init", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "toString", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "unwrap", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "update", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "updateAAD", "", "summary", "manual"] + - ["javax.crypto", "Cipher", "wrap", "", "summary", "manual"] diff --git a/java/ql/lib/semmle/code/java/Expr.qll b/java/ql/lib/semmle/code/java/Expr.qll index 74f37a4a451..3442855a91a 100644 --- a/java/ql/lib/semmle/code/java/Expr.qll +++ b/java/ql/lib/semmle/code/java/Expr.qll @@ -2065,7 +2065,11 @@ class MethodCall extends Expr, Call, @methodaccess { override Stmt getEnclosingStmt() { result = Expr.super.getEnclosingStmt() } /** Gets a printable representation of this expression. */ - override string toString() { result = this.printAccess() } + override string toString() { + if exists(this.getMethod()) + then result = this.printAccess() + else result = "" + } /** Gets a printable representation of this expression. */ string printAccess() { result = this.getMethod().getName() + "(...)" } @@ -2128,13 +2132,19 @@ class TypeAccess extends Expr, Annotatable, @typeaccess { /** Gets the compilation unit in which this type access occurs. */ override CompilationUnit getCompilationUnit() { result = Expr.super.getCompilationUnit() } - /** Gets a printable representation of this expression. */ - override string toString() { + private string toNormalString() { result = this.getQualifier().toString() + "." + this.getType().toString() or not this.hasQualifier() and result = this.getType().toString() } + /** Gets a printable representation of this expression. */ + override string toString() { + if this.getType() instanceof ErrorType + then result = "" + else result = this.toNormalString() + } + override string getAPrimaryQlClass() { result = "TypeAccess" } } diff --git a/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll index 1666413db76..ded0606956f 100644 --- a/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll @@ -430,6 +430,7 @@ private Element interpretElement0( } /** Gets the source/sink/summary/neutral element corresponding to the supplied parameters. */ +cached Element interpretElement( string package, string type, boolean subtypes, string name, string signature, string ext ) { diff --git a/java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll b/java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll index 2021dcc2bef..773c480b7e7 100644 --- a/java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll +++ b/java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll @@ -14,6 +14,7 @@ private module Frameworks { private import semmle.code.java.frameworks.android.Intent private import semmle.code.java.frameworks.android.Slice private import semmle.code.java.frameworks.android.SQLite + private import semmle.code.java.frameworks.android.Widget private import semmle.code.java.frameworks.apache.Lang private import semmle.code.java.frameworks.ApacheHttp private import semmle.code.java.frameworks.guava.Guava diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/ModelExclusions.qll b/java/ql/lib/semmle/code/java/dataflow/internal/ModelExclusions.qll index b8c86badd4f..12569b4f6c2 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/ModelExclusions.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/ModelExclusions.qll @@ -59,11 +59,27 @@ private predicate isInternal(CompilationUnit cu) { cu.getPackage().getName().matches("%internal%") } +/** A method relating to lambda flow. */ +private class LambdaFlowMethod extends Method { + LambdaFlowMethod() { + this.hasQualifiedName("java.lang", "Runnable", "run") or + this.hasQualifiedName("java.util", "Comparator", + ["comparing", "comparingDouble", "comparingInt", "comparingLong"]) or + this.hasQualifiedName("java.util.function", "BiConsumer", "accept") or + this.hasQualifiedName("java.util.function", "BiFunction", "apply") or + this.hasQualifiedName("java.util.function", "Consumer", "accept") or + this.hasQualifiedName("java.util.function", "Function", "apply") or + this.hasQualifiedName("java.util.function", "Supplier", "get") + } +} + /** Holds if the given callable is not worth modeling. */ predicate isUninterestingForModels(Callable c) { isInTestFile(c.getCompilationUnit().getFile()) or isInternal(c.getCompilationUnit()) or c instanceof MainMethod or + c instanceof ToStringMethod or + c instanceof LambdaFlowMethod or c instanceof StaticInitializer or exists(FunctionalExpr funcExpr | c = funcExpr.asMethod()) or c.getDeclaringType() instanceof TestLibrary or diff --git a/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll b/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll index 3126b750aaf..c599756a81c 100644 --- a/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll @@ -9,7 +9,12 @@ private import semmle.code.java.security.Sanitizers /** A variable that may hold sensitive information, judging by its name. */ class VariableWithSensitiveName extends Variable { - VariableWithSensitiveName() { this.getName().regexpMatch(getCommonSensitiveInfoRegex()) } + VariableWithSensitiveName() { + exists(string name | name = this.getName() | + name.regexpMatch(getCommonSensitiveInfoRegex()) and + not name.regexpMatch("(?i).*null.*") + ) + } } /** A reference to a variable that may hold sensitive information, judging by its name. */ diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md index b0a780b7584..5d835351453 100644 --- a/java/ql/src/CHANGELOG.md +++ b/java/ql/src/CHANGELOG.md @@ -15,7 +15,7 @@ ### Minor Analysis Improvements * The sanitizer for the path injection queries has been improved to handle more cases where `equals` is used to check an exact path match. -* The query `java/unvalidated-url-redirection` now sanitizes results following the same logic as the query `java/ssrf`. URLs the destination of which cannot be externally controlled will not be reported anymore. +* The query `java/unvalidated-url-redirection` now sanitizes results following the same logic as the query `java/ssrf`. URLs where the destination cannot be controlled externally are no longer reported. ## 0.8.8 diff --git a/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql b/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql index c61c5a263e8..9608ec93767 100644 --- a/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql +++ b/java/ql/src/Likely Bugs/Likely Typos/ContradictoryTypeChecks.ql @@ -40,7 +40,9 @@ predicate contradictoryTypeCheck(Expr e, Variable v, RefType t, RefType sup, Exp requiresInstanceOf(e, ssa.getAUse(), t) and sup = t.getAnAncestor() and instanceOfCheck(cond, ssa.getAUse(), sup) and - cond.(Guard).controls(e.getBasicBlock(), false) + cond.(Guard).controls(e.getBasicBlock(), false) and + not t instanceof ErrorType and + not sup instanceof ErrorType ) } diff --git a/java/ql/src/Telemetry/ExtractorInformation.ql b/java/ql/src/Telemetry/ExtractorInformation.ql index 24cd705eee7..bb37f4a31d0 100644 --- a/java/ql/src/Telemetry/ExtractorInformation.ql +++ b/java/ql/src/Telemetry/ExtractorInformation.ql @@ -85,6 +85,65 @@ predicate extractorTotalDiagnostics(string key, int value) { ) } +signature module StatsSig { + int getNumberOfOk(); + + int getNumberOfNotOk(); + + string getOkText(); + + string getNotOkText(); +} + +module ReportStats { + predicate numberOfOk(string key, int value) { + value = Stats::getNumberOfOk() and + key = "Number of " + Stats::getOkText() + } + + predicate numberOfNotOk(string key, int value) { + value = Stats::getNumberOfNotOk() and + key = "Number of " + Stats::getNotOkText() + } + + predicate percentageOfOk(string key, float value) { + value = Stats::getNumberOfOk() * 100.0 / (Stats::getNumberOfOk() + Stats::getNumberOfNotOk()) and + key = "Percentage of " + Stats::getOkText() + } +} + +module CallTargetStats implements StatsSig { + int getNumberOfOk() { result = count(Call c | exists(c.getCallee())) } + + int getNumberOfNotOk() { result = count(Call c | not exists(c.getCallee())) } + + string getOkText() { result = "calls with call target" } + + string getNotOkText() { result = "calls with missing call target" } +} + +private class SourceExpr extends Expr { + SourceExpr() { this.getFile().isSourceFile() } +} + +private predicate hasGoodType(Expr e) { + exists(e.getType()) and not e.getType() instanceof ErrorType +} + +module ExprTypeStats implements StatsSig { + int getNumberOfOk() { result = count(SourceExpr e | hasGoodType(e)) } + + int getNumberOfNotOk() { result = count(SourceExpr e | not hasGoodType(e)) } + + string getOkText() { result = "expressions with known type" } + + string getNotOkText() { result = "expressions with unknown type" } +} + +module CallTargetStatsReport = ReportStats; + +module ExprTypeStatsReport = ReportStats; + from string key, int value where not exists(string pattern | extractorInformationSkipKey(pattern) and key.matches(pattern)) and @@ -97,6 +156,12 @@ where totalNumberOfLinesByExtension(key, value) or numberOfLinesOfCodeByExtension(key, value) or extractorDiagnostics(key, value) or - extractorTotalDiagnostics(key, value) + extractorTotalDiagnostics(key, value) or + CallTargetStatsReport::numberOfOk(key, value) or + CallTargetStatsReport::numberOfNotOk(key, value) or + CallTargetStatsReport::percentageOfOk(key, any(float x | value = x.floor())) or + ExprTypeStatsReport::numberOfOk(key, value) or + ExprTypeStatsReport::numberOfNotOk(key, value) or + ExprTypeStatsReport::percentageOfOk(key, any(float x | value = x.floor())) ) select key, value diff --git a/java/ql/src/change-notes/2024-03-04-sensitive-log-remove-null-from-sources.md b/java/ql/src/change-notes/2024-03-04-sensitive-log-remove-null-from-sources.md new file mode 100644 index 00000000000..0bb4f18f2bd --- /dev/null +++ b/java/ql/src/change-notes/2024-03-04-sensitive-log-remove-null-from-sources.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* To reduce the number of false positives in the query "Insertion of sensitive information into log files" (`java/sensitive-log`), variables with names that contain "null" (case-insensitively) are no longer considered sources of sensitive information. diff --git a/java/ql/src/change-notes/released/0.8.9.md b/java/ql/src/change-notes/released/0.8.9.md index d50b8f5e1c5..ca56541b86e 100644 --- a/java/ql/src/change-notes/released/0.8.9.md +++ b/java/ql/src/change-notes/released/0.8.9.md @@ -15,4 +15,4 @@ ### Minor Analysis Improvements * The sanitizer for the path injection queries has been improved to handle more cases where `equals` is used to check an exact path match. -* The query `java/unvalidated-url-redirection` now sanitizes results following the same logic as the query `java/ssrf`. URLs the destination of which cannot be externally controlled will not be reported anymore. +* The query `java/unvalidated-url-redirection` now sanitizes results following the same logic as the query `java/ssrf`. URLs where the destination cannot be controlled externally are no longer reported. diff --git a/java/ql/test-kotlin1/library-tests/compilation-units/cus.expected b/java/ql/test-kotlin1/library-tests/compilation-units/cus.expected index a5995ccc419..97b688e8795 100644 --- a/java/ql/test-kotlin1/library-tests/compilation-units/cus.expected +++ b/java/ql/test-kotlin1/library-tests/compilation-units/cus.expected @@ -4,6 +4,8 @@ | ArrayList$ArrayListSpliterator | .../ArrayList$ArrayListSpliterator.class:0:0:0:0 | | List | .../List.class:0:0:0:0 | | ListIterator | .../ListIterator.class:0:0:0:0 | +| MemorySessionImpl$ResourceList | .../MemorySessionImpl$ResourceList.class:0:0:0:0 | +| MemorySessionImpl$ResourceList$ResourceCleanup | .../MemorySessionImpl$ResourceList$ResourceCleanup.class:0:0:0:0 | | MutableList | .../MutableList.class:0:0:0:0 | | MutableListIterator | .../MutableListIterator.class:0:0:0:0 | | test | .../test.kt:0:0:0:0 | diff --git a/java/ql/test-kotlin1/library-tests/enum/test.expected b/java/ql/test-kotlin1/library-tests/enum/test.expected index ca8e735fa18..d279ac89963 100644 --- a/java/ql/test-kotlin1/library-tests/enum/test.expected +++ b/java/ql/test-kotlin1/library-tests/enum/test.expected @@ -37,7 +37,6 @@ | kotlin.Enum | Enum | compareTo | | kotlin.Enum | Enum | describeConstable | | kotlin.Enum | Enum | equals | -| kotlin.Enum | Enum | finalize | | kotlin.Enum | Enum | getDeclaringClass | | kotlin.Enum | Enum | hashCode | | kotlin.Enum | Enum | name | diff --git a/java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.expected b/java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.expected index 4ccb82a3d0d..9ad4eeeadc8 100644 --- a/java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.expected +++ b/java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.expected @@ -16,6 +16,14 @@ methodWithDuplicate | AbstractCollection | removeAll | Collection | | AbstractCollection | retainAll | Collection | | AbstractCollection | toArray | T[] | +| AbstractCollection | add | Runnable | +| AbstractCollection | addAll | Collection | +| AbstractCollection | contains | Object | +| AbstractCollection | containsAll | Collection | +| AbstractCollection | remove | Object | +| AbstractCollection | removeAll | Collection | +| AbstractCollection | retainAll | Collection | +| AbstractCollection | toArray | T[] | | AbstractCollection | add | String | | AbstractCollection | addAll | Collection | | AbstractCollection | contains | Object | @@ -139,6 +147,17 @@ methodWithDuplicate | Collection | retainAll | Collection | | Collection | toArray | IntFunction | | Collection | toArray | T[] | +| Collection | add | Runnable | +| Collection | addAll | Collection | +| Collection | contains | Object | +| Collection | containsAll | Collection | +| Collection | equals | Object | +| Collection | remove | Object | +| Collection | removeAll | Collection | +| Collection | removeIf | Predicate | +| Collection | retainAll | Collection | +| Collection | toArray | IntFunction | +| Collection | toArray | T[] | | Collection | add | String | | Collection | addAll | Collection | | Collection | contains | Object | @@ -191,6 +210,8 @@ methodWithDuplicate | List | add | int | | List | addAll | Collection | | List | addAll | int | +| List | addFirst | E | +| List | addLast | E | | List | contains | Object | | List | containsAll | Collection | | List | copyOf | Collection | diff --git a/java/ql/test-kotlin1/library-tests/reflection/reflection.expected b/java/ql/test-kotlin1/library-tests/reflection/reflection.expected index d149bd24563..06cc3ca22c8 100644 --- a/java/ql/test-kotlin1/library-tests/reflection/reflection.expected +++ b/java/ql/test-kotlin1/library-tests/reflection/reflection.expected @@ -269,8 +269,15 @@ compGenerated | file:///CharRange.class:0:0:0:0 | spliterator | Forwarder for a Kotlin class inheriting an interface default method | | file:///Class2.class:0:0:0:0 | getValue | Default property accessor | | file:///Class2.class:0:0:0:0 | getValue | Default property accessor | +| file:///EnumEntries.class:0:0:0:0 | addFirst | Forwarder for a Kotlin class inheriting an interface default method | +| file:///EnumEntries.class:0:0:0:0 | addLast | Forwarder for a Kotlin class inheriting an interface default method | | file:///EnumEntries.class:0:0:0:0 | forEach | Forwarder for a Kotlin class inheriting an interface default method | +| file:///EnumEntries.class:0:0:0:0 | getFirst | Forwarder for a Kotlin class inheriting an interface default method | +| file:///EnumEntries.class:0:0:0:0 | getLast | Forwarder for a Kotlin class inheriting an interface default method | | file:///EnumEntries.class:0:0:0:0 | parallelStream | Forwarder for a Kotlin class inheriting an interface default method | +| file:///EnumEntries.class:0:0:0:0 | removeFirst | Forwarder for a Kotlin class inheriting an interface default method | +| file:///EnumEntries.class:0:0:0:0 | removeLast | Forwarder for a Kotlin class inheriting an interface default method | +| file:///EnumEntries.class:0:0:0:0 | reversed | Forwarder for a Kotlin class inheriting an interface default method | | file:///EnumEntries.class:0:0:0:0 | spliterator | Forwarder for a Kotlin class inheriting an interface default method | | file:///EnumEntries.class:0:0:0:0 | stream | Forwarder for a Kotlin class inheriting an interface default method | | file:///EnumEntries.class:0:0:0:0 | toArray | Forwarder for a Kotlin class inheriting an interface default method | diff --git a/java/ql/test-kotlin2/library-tests/exprs/PrintAst.expected b/java/ql/test-kotlin2/library-tests/exprs/PrintAst.expected index 41f235c1efd..b6bbd9e02e9 100644 --- a/java/ql/test-kotlin2/library-tests/exprs/PrintAst.expected +++ b/java/ql/test-kotlin2/library-tests/exprs/PrintAst.expected @@ -2933,15 +2933,15 @@ exprs.kt: # 292| 1: [StmtExpr] # 292| 0: [BlockStmt] { ... } # 292| 0: [LocalVariableDeclStmt] var ...; -# 292| 1: [LocalVariableDeclExpr] tmp0 +# 292| 1: [LocalVariableDeclExpr] # 292| 0: [VarAccess] i0 # 292| 1: [ExprStmt] ; # 292| 0: [AssignExpr] ...=... # 292| 0: [VarAccess] i0 # 292| 1: [MethodCall] inc(...) -# 292| -1: [VarAccess] tmp0 +# 292| -1: [VarAccess] # 292| 2: [ExprStmt] ; -# 292| 0: [VarAccess] tmp0 +# 292| 0: [VarAccess] # 293| 7: [ExprStmt] ; # 293| 0: [ImplicitCoercionToUnitExpr] # 293| 0: [TypeAccess] Unit @@ -2960,15 +2960,15 @@ exprs.kt: # 294| 1: [StmtExpr] # 294| 0: [BlockStmt] { ... } # 294| 0: [LocalVariableDeclStmt] var ...; -# 294| 1: [LocalVariableDeclExpr] tmp1 +# 294| 1: [LocalVariableDeclExpr] # 294| 0: [VarAccess] i0 # 294| 1: [ExprStmt] ; # 294| 0: [AssignExpr] ...=... # 294| 0: [VarAccess] i0 # 294| 1: [MethodCall] dec(...) -# 294| -1: [VarAccess] tmp1 +# 294| -1: [VarAccess] # 294| 2: [ExprStmt] ; -# 294| 0: [VarAccess] tmp1 +# 294| 0: [VarAccess] # 295| 9: [ExprStmt] ; # 295| 0: [ImplicitCoercionToUnitExpr] # 295| 0: [TypeAccess] Unit @@ -3028,15 +3028,15 @@ exprs.kt: # 306| 1: [StmtExpr] # 306| 0: [BlockStmt] { ... } # 306| 0: [LocalVariableDeclStmt] var ...; -# 306| 1: [LocalVariableDeclExpr] tmp2 +# 306| 1: [LocalVariableDeclExpr] # 306| 0: [VarAccess] b0 # 306| 1: [ExprStmt] ; # 306| 0: [AssignExpr] ...=... # 306| 0: [VarAccess] b0 # 306| 1: [MethodCall] inc(...) -# 306| -1: [VarAccess] tmp2 +# 306| -1: [VarAccess] # 306| 2: [ExprStmt] ; -# 306| 0: [VarAccess] tmp2 +# 306| 0: [VarAccess] # 307| 20: [ExprStmt] ; # 307| 0: [ImplicitCoercionToUnitExpr] # 307| 0: [TypeAccess] Unit @@ -3055,15 +3055,15 @@ exprs.kt: # 308| 1: [StmtExpr] # 308| 0: [BlockStmt] { ... } # 308| 0: [LocalVariableDeclStmt] var ...; -# 308| 1: [LocalVariableDeclExpr] tmp3 +# 308| 1: [LocalVariableDeclExpr] # 308| 0: [VarAccess] b0 # 308| 1: [ExprStmt] ; # 308| 0: [AssignExpr] ...=... # 308| 0: [VarAccess] b0 # 308| 1: [MethodCall] dec(...) -# 308| -1: [VarAccess] tmp3 +# 308| -1: [VarAccess] # 308| 2: [ExprStmt] ; -# 308| 0: [VarAccess] tmp3 +# 308| 0: [VarAccess] # 309| 22: [ExprStmt] ; # 309| 0: [ImplicitCoercionToUnitExpr] # 309| 0: [TypeAccess] Unit @@ -3123,15 +3123,15 @@ exprs.kt: # 320| 1: [StmtExpr] # 320| 0: [BlockStmt] { ... } # 320| 0: [LocalVariableDeclStmt] var ...; -# 320| 1: [LocalVariableDeclExpr] tmp4 +# 320| 1: [LocalVariableDeclExpr] # 320| 0: [VarAccess] s0 # 320| 1: [ExprStmt] ; # 320| 0: [AssignExpr] ...=... # 320| 0: [VarAccess] s0 # 320| 1: [MethodCall] inc(...) -# 320| -1: [VarAccess] tmp4 +# 320| -1: [VarAccess] # 320| 2: [ExprStmt] ; -# 320| 0: [VarAccess] tmp4 +# 320| 0: [VarAccess] # 321| 33: [ExprStmt] ; # 321| 0: [ImplicitCoercionToUnitExpr] # 321| 0: [TypeAccess] Unit @@ -3150,15 +3150,15 @@ exprs.kt: # 322| 1: [StmtExpr] # 322| 0: [BlockStmt] { ... } # 322| 0: [LocalVariableDeclStmt] var ...; -# 322| 1: [LocalVariableDeclExpr] tmp5 +# 322| 1: [LocalVariableDeclExpr] # 322| 0: [VarAccess] s0 # 322| 1: [ExprStmt] ; # 322| 0: [AssignExpr] ...=... # 322| 0: [VarAccess] s0 # 322| 1: [MethodCall] dec(...) -# 322| -1: [VarAccess] tmp5 +# 322| -1: [VarAccess] # 322| 2: [ExprStmt] ; -# 322| 0: [VarAccess] tmp5 +# 322| 0: [VarAccess] # 323| 35: [ExprStmt] ; # 323| 0: [ImplicitCoercionToUnitExpr] # 323| 0: [TypeAccess] Unit @@ -3218,15 +3218,15 @@ exprs.kt: # 334| 1: [StmtExpr] # 334| 0: [BlockStmt] { ... } # 334| 0: [LocalVariableDeclStmt] var ...; -# 334| 1: [LocalVariableDeclExpr] tmp6 +# 334| 1: [LocalVariableDeclExpr] # 334| 0: [VarAccess] l0 # 334| 1: [ExprStmt] ; # 334| 0: [AssignExpr] ...=... # 334| 0: [VarAccess] l0 # 334| 1: [MethodCall] inc(...) -# 334| -1: [VarAccess] tmp6 +# 334| -1: [VarAccess] # 334| 2: [ExprStmt] ; -# 334| 0: [VarAccess] tmp6 +# 334| 0: [VarAccess] # 335| 46: [ExprStmt] ; # 335| 0: [ImplicitCoercionToUnitExpr] # 335| 0: [TypeAccess] Unit @@ -3245,15 +3245,15 @@ exprs.kt: # 336| 1: [StmtExpr] # 336| 0: [BlockStmt] { ... } # 336| 0: [LocalVariableDeclStmt] var ...; -# 336| 1: [LocalVariableDeclExpr] tmp7 +# 336| 1: [LocalVariableDeclExpr] # 336| 0: [VarAccess] l0 # 336| 1: [ExprStmt] ; # 336| 0: [AssignExpr] ...=... # 336| 0: [VarAccess] l0 # 336| 1: [MethodCall] dec(...) -# 336| -1: [VarAccess] tmp7 +# 336| -1: [VarAccess] # 336| 2: [ExprStmt] ; -# 336| 0: [VarAccess] tmp7 +# 336| 0: [VarAccess] # 337| 48: [ExprStmt] ; # 337| 0: [ImplicitCoercionToUnitExpr] # 337| 0: [TypeAccess] Unit @@ -3358,7 +3358,7 @@ exprs.kt: # 174| 5: [Constructor] Direction # 174| 5: [BlockStmt] { ... } # 174| 0: [ExprStmt] ; -# 174| 0: [ClassInstanceExpr] new Enum(...) +# 174| 0: [ClassInstanceExpr] new Enum(...) # 174| -3: [TypeAccess] Enum # 174| 0: [TypeAccess] Direction # 174| 0: [NullLiteral] null @@ -3381,24 +3381,24 @@ exprs.kt: # 175| 0: [ClassInstanceExpr] new Direction(...) # 175| -3: [TypeAccess] Direction # 178| 7: [Class] Color -# 0| 2: [Method] getEntries -# 0| 3: [TypeAccess] EnumEntries -# 0| 0: [TypeAccess] Color -# 0| 3: [Method] valueOf -# 0| 3: [TypeAccess] Color +# 178| 2: [Method] getEntries +# 178| 3: [TypeAccess] EnumEntries +# 178| 0: [TypeAccess] Color +# 178| 3: [Method] valueOf +# 178| 3: [TypeAccess] Color #-----| 4: (Parameters) -# 0| 0: [Parameter] value -# 0| 0: [TypeAccess] String -# 0| 4: [Method] values -# 0| 3: [TypeAccess] Color[] -# 0| 0: [TypeAccess] Color +# 178| 0: [Parameter] value +# 178| 0: [TypeAccess] String +# 178| 4: [Method] values +# 178| 3: [TypeAccess] Color[] +# 178| 0: [TypeAccess] Color # 178| 5: [Constructor] Color #-----| 4: (Parameters) # 178| 0: [Parameter] rgb # 178| 0: [TypeAccess] int # 178| 5: [BlockStmt] { ... } # 178| 0: [ExprStmt] ; -# 178| 0: [ClassInstanceExpr] new Enum(...) +# 178| 0: [ClassInstanceExpr] new Enum(...) # 178| -3: [TypeAccess] Enum # 178| 0: [TypeAccess] Color # 178| 0: [NullLiteral] null @@ -6080,8 +6080,8 @@ samConversion.kt: # 9| -3: [TypeAccess] Function1 # 9| 0: [TypeAccess] Integer # 9| 1: [TypeAccess] Boolean -# 9| 1: [WhenBranch] ... -> ... -# 9| 0: [BooleanLiteral] true +# 11| 1: [WhenBranch] ... -> ... +# 11| 0: [BooleanLiteral] true # 11| 1: [ExprStmt] ; # 11| 0: [LambdaExpr] ...->... # 11| -4: [AnonymousClass] new Function1(...) { ... } diff --git a/java/ql/test-kotlin2/library-tests/exprs/delegatedProperties.expected b/java/ql/test-kotlin2/library-tests/exprs/delegatedProperties.expected index 7141b6d1531..a530d0ee560 100644 --- a/java/ql/test-kotlin2/library-tests/exprs/delegatedProperties.expected +++ b/java/ql/test-kotlin2/library-tests/exprs/delegatedProperties.expected @@ -1,22 +1,22 @@ delegatedProperties -| delegatedProperties.kt:6:9:9:9 | prop1 | prop1 | local | delegatedProperties.kt:6:24:9:9 | Lazy prop1$delegate | delegatedProperties.kt:6:27:9:9 | lazy(...) | -| delegatedProperties.kt:19:9:19:51 | varResource1 | varResource1 | local | delegatedProperties.kt:19:31:19:51 | ResourceDelegate varResource1$delegate | delegatedProperties.kt:19:34:19:51 | new ResourceDelegate(...) | -| delegatedProperties.kt:23:9:23:31 | name | name | local | delegatedProperties.kt:23:26:23:31 | Map name$delegate | delegatedProperties.kt:23:29:23:31 | map | -| delegatedProperties.kt:33:9:33:76 | readOnly | readOnly | local | delegatedProperties.kt:33:27:33:47 | ReadWriteProperty readOnly$delegate | delegatedProperties.kt:33:30:33:47 | resourceDelegate(...) | -| delegatedProperties.kt:34:9:34:48 | readWrite | readWrite | local | delegatedProperties.kt:34:28:34:48 | ReadWriteProperty readWrite$delegate | delegatedProperties.kt:34:31:34:48 | resourceDelegate(...) | -| delegatedProperties.kt:39:9:39:51 | varResource2 | varResource2 | local | delegatedProperties.kt:39:31:39:51 | ResourceDelegate varResource2$delegate | delegatedProperties.kt:39:31:39:51 | provideDelegate(...) | -| delegatedProperties.kt:42:5:42:47 | varResource0 | varResource0 | non-local | delegatedProperties.kt:42:27:42:47 | varResource0$delegate | delegatedProperties.kt:42:30:42:47 | new ResourceDelegate(...) | -| delegatedProperties.kt:66:5:66:50 | delegatedToMember1 | delegatedToMember1 | non-local | delegatedProperties.kt:66:33:66:50 | delegatedToMember1$delegate | delegatedProperties.kt:66:36:66:50 | ...::... | -| delegatedProperties.kt:67:5:67:53 | delegatedToMember2 | delegatedToMember2 | non-local | delegatedProperties.kt:67:33:67:53 | delegatedToMember2$delegate | delegatedProperties.kt:67:36:67:53 | ...::... | -| delegatedProperties.kt:69:5:69:56 | delegatedToExtMember1 | delegatedToExtMember1 | non-local | delegatedProperties.kt:69:36:69:56 | delegatedToExtMember1$delegate | delegatedProperties.kt:69:39:69:56 | ...::... | -| delegatedProperties.kt:70:5:70:59 | delegatedToExtMember2 | delegatedToExtMember2 | non-local | delegatedProperties.kt:70:36:70:59 | delegatedToExtMember2$delegate | delegatedProperties.kt:70:39:70:59 | ...::... | -| delegatedProperties.kt:72:5:72:56 | delegatedToBaseClass1 | delegatedToBaseClass1 | non-local | delegatedProperties.kt:72:36:72:56 | delegatedToBaseClass1$delegate | delegatedProperties.kt:72:39:72:56 | ...::... | -| delegatedProperties.kt:73:5:73:56 | delegatedToBaseClass2 | delegatedToBaseClass2 | non-local | delegatedProperties.kt:73:36:73:56 | delegatedToBaseClass2$delegate | delegatedProperties.kt:73:39:73:56 | ...::... | -| delegatedProperties.kt:75:5:75:78 | delegatedToAnotherClass1 | delegatedToAnotherClass1 | non-local | delegatedProperties.kt:75:39:75:78 | delegatedToAnotherClass1$delegate | delegatedProperties.kt:75:42:75:78 | ...::... | -| delegatedProperties.kt:77:5:77:49 | delegatedToTopLevel | delegatedToTopLevel | non-local | delegatedProperties.kt:77:34:77:49 | delegatedToTopLevel$delegate | delegatedProperties.kt:77:37:77:49 | ...::... | -| delegatedProperties.kt:79:5:79:38 | max | max | non-local | delegatedProperties.kt:79:18:79:38 | max$delegate | delegatedProperties.kt:79:21:79:38 | ...::... | -| delegatedProperties.kt:82:9:82:54 | delegatedToMember3 | delegatedToMember3 | local | delegatedProperties.kt:82:37:82:54 | KMutableProperty0 delegatedToMember3$delegate | delegatedProperties.kt:82:40:82:54 | ...::... | -| delegatedProperties.kt:87:1:87:46 | extDelegated | extDelegated | non-local | delegatedProperties.kt:87:31:87:46 | extDelegated$delegateMyClass | delegatedProperties.kt:87:34:87:46 | ...::... | +| delegatedProperties.kt:6:9:9:9 | prop1 | prop1 | local | delegatedProperties.kt:6:9:9:9 | Lazy prop1$delegate | delegatedProperties.kt:6:27:9:9 | lazy(...) | +| delegatedProperties.kt:19:9:19:51 | varResource1 | varResource1 | local | delegatedProperties.kt:19:9:19:51 | ResourceDelegate varResource1$delegate | delegatedProperties.kt:19:34:19:51 | new ResourceDelegate(...) | +| delegatedProperties.kt:23:9:23:31 | name | name | local | delegatedProperties.kt:23:9:23:31 | Map name$delegate | delegatedProperties.kt:23:29:23:31 | map | +| delegatedProperties.kt:33:9:33:76 | readOnly | readOnly | local | delegatedProperties.kt:33:9:33:76 | ReadWriteProperty readOnly$delegate | delegatedProperties.kt:33:30:33:47 | resourceDelegate(...) | +| delegatedProperties.kt:34:9:34:48 | readWrite | readWrite | local | delegatedProperties.kt:34:9:34:48 | ReadWriteProperty readWrite$delegate | delegatedProperties.kt:34:31:34:48 | resourceDelegate(...) | +| delegatedProperties.kt:39:9:39:51 | varResource2 | varResource2 | local | delegatedProperties.kt:39:9:39:51 | ResourceDelegate varResource2$delegate | delegatedProperties.kt:39:34:39:51 | provideDelegate(...) | +| delegatedProperties.kt:42:5:42:47 | varResource0 | varResource0 | non-local | delegatedProperties.kt:42:30:42:47 | varResource0$delegate | delegatedProperties.kt:42:30:42:47 | new ResourceDelegate(...) | +| delegatedProperties.kt:66:5:66:50 | delegatedToMember1 | delegatedToMember1 | non-local | delegatedProperties.kt:66:36:66:50 | delegatedToMember1$delegate | delegatedProperties.kt:66:36:66:50 | ...::... | +| delegatedProperties.kt:67:5:67:53 | delegatedToMember2 | delegatedToMember2 | non-local | delegatedProperties.kt:67:36:67:53 | delegatedToMember2$delegate | delegatedProperties.kt:67:36:67:53 | ...::... | +| delegatedProperties.kt:69:5:69:56 | delegatedToExtMember1 | delegatedToExtMember1 | non-local | delegatedProperties.kt:69:39:69:56 | delegatedToExtMember1$delegate | delegatedProperties.kt:69:39:69:56 | ...::... | +| delegatedProperties.kt:70:5:70:59 | delegatedToExtMember2 | delegatedToExtMember2 | non-local | delegatedProperties.kt:70:39:70:59 | delegatedToExtMember2$delegate | delegatedProperties.kt:70:39:70:59 | ...::... | +| delegatedProperties.kt:72:5:72:56 | delegatedToBaseClass1 | delegatedToBaseClass1 | non-local | delegatedProperties.kt:72:39:72:56 | delegatedToBaseClass1$delegate | delegatedProperties.kt:72:39:72:56 | ...::... | +| delegatedProperties.kt:73:5:73:56 | delegatedToBaseClass2 | delegatedToBaseClass2 | non-local | delegatedProperties.kt:73:39:73:56 | delegatedToBaseClass2$delegate | delegatedProperties.kt:73:39:73:56 | ...::... | +| delegatedProperties.kt:75:5:75:78 | delegatedToAnotherClass1 | delegatedToAnotherClass1 | non-local | delegatedProperties.kt:75:42:75:78 | delegatedToAnotherClass1$delegate | delegatedProperties.kt:75:42:75:78 | ...::... | +| delegatedProperties.kt:77:5:77:49 | delegatedToTopLevel | delegatedToTopLevel | non-local | delegatedProperties.kt:77:37:77:49 | delegatedToTopLevel$delegate | delegatedProperties.kt:77:37:77:49 | ...::... | +| delegatedProperties.kt:79:5:79:38 | max | max | non-local | delegatedProperties.kt:79:21:79:38 | max$delegate | delegatedProperties.kt:79:21:79:38 | ...::... | +| delegatedProperties.kt:82:9:82:54 | delegatedToMember3 | delegatedToMember3 | local | delegatedProperties.kt:82:9:82:54 | KMutableProperty0 delegatedToMember3$delegate | delegatedProperties.kt:82:40:82:54 | ...::... | +| delegatedProperties.kt:87:1:87:46 | extDelegated | extDelegated | non-local | delegatedProperties.kt:87:34:87:46 | extDelegated$delegateMyClass | delegatedProperties.kt:87:34:87:46 | ...::... | delegatedPropertyTypes | delegatedProperties.kt:6:9:9:9 | prop1 | file://:0:0:0:0 | int | file:///Lazy.class:0:0:0:0 | Lazy | | delegatedProperties.kt:19:9:19:51 | varResource1 | file://:0:0:0:0 | int | delegatedProperties.kt:45:1:51:1 | ResourceDelegate | @@ -37,32 +37,32 @@ delegatedPropertyTypes | delegatedProperties.kt:82:9:82:54 | delegatedToMember3 | file://:0:0:0:0 | int | file:///KMutableProperty0.class:0:0:0:0 | KMutableProperty0 | | delegatedProperties.kt:87:1:87:46 | extDelegated | file://:0:0:0:0 | int | file:///KMutableProperty0.class:0:0:0:0 | KMutableProperty0 | delegatedPropertyGetters -| delegatedProperties.kt:6:9:9:9 | prop1 | delegatedProperties.kt:6:24:9:9 | | -| delegatedProperties.kt:19:9:19:51 | varResource1 | delegatedProperties.kt:19:31:19:51 | | -| delegatedProperties.kt:23:9:23:31 | name | delegatedProperties.kt:23:26:23:31 | | -| delegatedProperties.kt:33:9:33:76 | readOnly | delegatedProperties.kt:33:27:33:47 | | -| delegatedProperties.kt:34:9:34:48 | readWrite | delegatedProperties.kt:34:28:34:48 | | -| delegatedProperties.kt:39:9:39:51 | varResource2 | delegatedProperties.kt:39:31:39:51 | | -| delegatedProperties.kt:42:5:42:47 | varResource0 | delegatedProperties.kt:42:27:42:47 | getVarResource0 | -| delegatedProperties.kt:66:5:66:50 | delegatedToMember1 | delegatedProperties.kt:66:33:66:50 | getDelegatedToMember1 | -| delegatedProperties.kt:67:5:67:53 | delegatedToMember2 | delegatedProperties.kt:67:33:67:53 | getDelegatedToMember2 | -| delegatedProperties.kt:69:5:69:56 | delegatedToExtMember1 | delegatedProperties.kt:69:36:69:56 | getDelegatedToExtMember1 | -| delegatedProperties.kt:70:5:70:59 | delegatedToExtMember2 | delegatedProperties.kt:70:36:70:59 | getDelegatedToExtMember2 | -| delegatedProperties.kt:72:5:72:56 | delegatedToBaseClass1 | delegatedProperties.kt:72:36:72:56 | getDelegatedToBaseClass1 | -| delegatedProperties.kt:73:5:73:56 | delegatedToBaseClass2 | delegatedProperties.kt:73:36:73:56 | getDelegatedToBaseClass2 | -| delegatedProperties.kt:75:5:75:78 | delegatedToAnotherClass1 | delegatedProperties.kt:75:39:75:78 | getDelegatedToAnotherClass1 | -| delegatedProperties.kt:77:5:77:49 | delegatedToTopLevel | delegatedProperties.kt:77:34:77:49 | getDelegatedToTopLevel | -| delegatedProperties.kt:79:5:79:38 | max | delegatedProperties.kt:79:18:79:38 | getMax | -| delegatedProperties.kt:82:9:82:54 | delegatedToMember3 | delegatedProperties.kt:82:37:82:54 | | -| delegatedProperties.kt:87:1:87:46 | extDelegated | delegatedProperties.kt:87:31:87:46 | getExtDelegated | +| delegatedProperties.kt:6:9:9:9 | prop1 | delegatedProperties.kt:6:9:9:9 | | +| delegatedProperties.kt:19:9:19:51 | varResource1 | delegatedProperties.kt:19:9:19:51 | | +| delegatedProperties.kt:23:9:23:31 | name | delegatedProperties.kt:23:9:23:31 | | +| delegatedProperties.kt:33:9:33:76 | readOnly | delegatedProperties.kt:33:9:33:76 | | +| delegatedProperties.kt:34:9:34:48 | readWrite | delegatedProperties.kt:34:9:34:48 | | +| delegatedProperties.kt:39:9:39:51 | varResource2 | delegatedProperties.kt:39:9:39:51 | | +| delegatedProperties.kt:42:5:42:47 | varResource0 | delegatedProperties.kt:42:30:42:47 | getVarResource0 | +| delegatedProperties.kt:66:5:66:50 | delegatedToMember1 | delegatedProperties.kt:66:36:66:50 | getDelegatedToMember1 | +| delegatedProperties.kt:67:5:67:53 | delegatedToMember2 | delegatedProperties.kt:67:36:67:53 | getDelegatedToMember2 | +| delegatedProperties.kt:69:5:69:56 | delegatedToExtMember1 | delegatedProperties.kt:69:39:69:56 | getDelegatedToExtMember1 | +| delegatedProperties.kt:70:5:70:59 | delegatedToExtMember2 | delegatedProperties.kt:70:39:70:59 | getDelegatedToExtMember2 | +| delegatedProperties.kt:72:5:72:56 | delegatedToBaseClass1 | delegatedProperties.kt:72:39:72:56 | getDelegatedToBaseClass1 | +| delegatedProperties.kt:73:5:73:56 | delegatedToBaseClass2 | delegatedProperties.kt:73:39:73:56 | getDelegatedToBaseClass2 | +| delegatedProperties.kt:75:5:75:78 | delegatedToAnotherClass1 | delegatedProperties.kt:75:42:75:78 | getDelegatedToAnotherClass1 | +| delegatedProperties.kt:77:5:77:49 | delegatedToTopLevel | delegatedProperties.kt:77:37:77:49 | getDelegatedToTopLevel | +| delegatedProperties.kt:79:5:79:38 | max | delegatedProperties.kt:79:21:79:38 | getMax | +| delegatedProperties.kt:82:9:82:54 | delegatedToMember3 | delegatedProperties.kt:82:9:82:54 | | +| delegatedProperties.kt:87:1:87:46 | extDelegated | delegatedProperties.kt:87:34:87:46 | getExtDelegated | delegatedPropertySetters -| delegatedProperties.kt:19:9:19:51 | varResource1 | delegatedProperties.kt:19:31:19:51 | | -| delegatedProperties.kt:34:9:34:48 | readWrite | delegatedProperties.kt:34:28:34:48 | | -| delegatedProperties.kt:42:5:42:47 | varResource0 | delegatedProperties.kt:42:27:42:47 | setVarResource0 | -| delegatedProperties.kt:66:5:66:50 | delegatedToMember1 | delegatedProperties.kt:66:33:66:50 | setDelegatedToMember1 | -| delegatedProperties.kt:67:5:67:53 | delegatedToMember2 | delegatedProperties.kt:67:33:67:53 | setDelegatedToMember2 | -| delegatedProperties.kt:69:5:69:56 | delegatedToExtMember1 | delegatedProperties.kt:69:36:69:56 | setDelegatedToExtMember1 | -| delegatedProperties.kt:70:5:70:59 | delegatedToExtMember2 | delegatedProperties.kt:70:36:70:59 | setDelegatedToExtMember2 | -| delegatedProperties.kt:77:5:77:49 | delegatedToTopLevel | delegatedProperties.kt:77:34:77:49 | setDelegatedToTopLevel | -| delegatedProperties.kt:82:9:82:54 | delegatedToMember3 | delegatedProperties.kt:82:37:82:54 | | -| delegatedProperties.kt:87:1:87:46 | extDelegated | delegatedProperties.kt:87:31:87:46 | setExtDelegated | +| delegatedProperties.kt:19:9:19:51 | varResource1 | delegatedProperties.kt:19:9:19:51 | | +| delegatedProperties.kt:34:9:34:48 | readWrite | delegatedProperties.kt:34:9:34:48 | | +| delegatedProperties.kt:42:5:42:47 | varResource0 | delegatedProperties.kt:42:5:42:47 | setVarResource0 | +| delegatedProperties.kt:66:5:66:50 | delegatedToMember1 | delegatedProperties.kt:66:5:66:50 | setDelegatedToMember1 | +| delegatedProperties.kt:67:5:67:53 | delegatedToMember2 | delegatedProperties.kt:67:5:67:53 | setDelegatedToMember2 | +| delegatedProperties.kt:69:5:69:56 | delegatedToExtMember1 | delegatedProperties.kt:69:5:69:56 | setDelegatedToExtMember1 | +| delegatedProperties.kt:70:5:70:59 | delegatedToExtMember2 | delegatedProperties.kt:70:5:70:59 | setDelegatedToExtMember2 | +| delegatedProperties.kt:77:5:77:49 | delegatedToTopLevel | delegatedProperties.kt:77:5:77:49 | setDelegatedToTopLevel | +| delegatedProperties.kt:82:9:82:54 | delegatedToMember3 | delegatedProperties.kt:82:9:82:54 | | +| delegatedProperties.kt:87:1:87:46 | extDelegated | delegatedProperties.kt:87:1:87:46 | setExtDelegated | diff --git a/java/ql/test-kotlin2/library-tests/exprs/exprs.expected b/java/ql/test-kotlin2/library-tests/exprs/exprs.expected index 45d5606d1ac..d23114e0758 100644 --- a/java/ql/test-kotlin2/library-tests/exprs/exprs.expected +++ b/java/ql/test-kotlin2/library-tests/exprs/exprs.expected @@ -1,13 +1,13 @@ -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:6:24:9:9 | | NullLiteral | -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:19:31:19:51 | | NullLiteral | -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:19:31:19:51 | | NullLiteral | -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:23:26:23:31 | | NullLiteral | -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:33:27:33:47 | | NullLiteral | -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:34:28:34:48 | | NullLiteral | -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:34:28:34:48 | | NullLiteral | -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:39:31:39:51 | | NullLiteral | -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:82:37:82:54 | | NullLiteral | -| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:82:37:82:54 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:6:9:9:9 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:19:9:19:51 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:19:9:19:51 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:23:9:23:31 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:33:9:33:76 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:34:9:34:48 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:34:9:34:48 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:39:9:39:51 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:82:9:82:54 | | NullLiteral | +| delegatedProperties.kt:0:0:0:0 | null | delegatedProperties.kt:82:9:82:54 | | NullLiteral | | delegatedProperties.kt:1:9:1:12 | null | delegatedProperties.kt:18:5:40:5 | fn | NullLiteral | | delegatedProperties.kt:1:9:1:12 | this | delegatedProperties.kt:42:27:42:47 | getVarResource0 | ThisAccess | | delegatedProperties.kt:1:9:1:12 | this | delegatedProperties.kt:42:27:42:47 | setVarResource0 | ThisAccess | @@ -51,7 +51,7 @@ | delegatedProperties.kt:6:32:9:9 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:7:13:7:27 | ConsoleKt | delegatedProperties.kt:6:32:9:9 | invoke | TypeAccess | | delegatedProperties.kt:7:13:7:27 | println(...) | delegatedProperties.kt:6:32:9:9 | invoke | MethodCall | -| delegatedProperties.kt:7:22:7:25 | "init" | delegatedProperties.kt:6:32:9:9 | invoke | StringLiteral | +| delegatedProperties.kt:7:21:7:26 | "init" | delegatedProperties.kt:6:32:9:9 | invoke | StringLiteral | | delegatedProperties.kt:8:13:8:13 | 5 | delegatedProperties.kt:6:32:9:9 | invoke | IntegerLiteral | | delegatedProperties.kt:10:9:10:22 | ConsoleKt | delegatedProperties.kt:5:5:12:5 | fn | TypeAccess | | delegatedProperties.kt:10:9:10:22 | println(...) | delegatedProperties.kt:5:5:12:5 | fn | MethodCall | @@ -108,9 +108,9 @@ | delegatedProperties.kt:20:17:20:28 | (...) | delegatedProperties.kt:18:5:40:5 | fn | MethodCall | | delegatedProperties.kt:20:17:20:28 | Object | delegatedProperties.kt:18:5:40:5 | fn | TypeAccess | | delegatedProperties.kt:20:17:20:28 | new (...) | delegatedProperties.kt:18:5:40:5 | fn | ClassInstanceExpr | -| delegatedProperties.kt:21:9:21:20 | (...) | delegatedProperties.kt:18:5:40:5 | fn | MethodCall | -| delegatedProperties.kt:21:9:21:20 | Object | delegatedProperties.kt:18:5:40:5 | fn | TypeAccess | -| delegatedProperties.kt:21:9:21:20 | new (...) | delegatedProperties.kt:18:5:40:5 | fn | ClassInstanceExpr | +| delegatedProperties.kt:21:9:21:24 | (...) | delegatedProperties.kt:18:5:40:5 | fn | MethodCall | +| delegatedProperties.kt:21:9:21:24 | Object | delegatedProperties.kt:18:5:40:5 | fn | TypeAccess | +| delegatedProperties.kt:21:9:21:24 | new (...) | delegatedProperties.kt:18:5:40:5 | fn | ClassInstanceExpr | | delegatedProperties.kt:21:24:21:24 | 2 | delegatedProperties.kt:18:5:40:5 | fn | IntegerLiteral | | delegatedProperties.kt:23:26:23:31 | ...::... | delegatedProperties.kt:23:26:23:31 | | PropertyRefExpr | | delegatedProperties.kt:23:26:23:31 | (...) | delegatedProperties.kt:23:26:23:31 | get | MethodCall | @@ -147,13 +147,13 @@ | delegatedProperties.kt:26:13:26:28 | this.curValue | delegatedProperties.kt:26:13:26:28 | getCurValue | VarAccess | | delegatedProperties.kt:26:13:26:28 | this.curValue | delegatedProperties.kt:26:13:26:28 | setCurValue | VarAccess | | delegatedProperties.kt:26:28:26:28 | 0 | delegatedProperties.kt:25:64:31:9 | | IntegerLiteral | -| delegatedProperties.kt:27:22:27:88 | int | file://:0:0:0:0 | | TypeAccess | +| delegatedProperties.kt:27:13:27:88 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:27:35:27:47 | Object | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:27:50:27:71 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:27:50:27:71 | KProperty | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:27:81:27:88 | getCurValue(...) | delegatedProperties.kt:27:22:27:88 | getValue | MethodCall | -| delegatedProperties.kt:27:81:27:88 | this | delegatedProperties.kt:27:22:27:88 | getValue | ThisAccess | -| delegatedProperties.kt:28:22:30:13 | Unit | file://:0:0:0:0 | | TypeAccess | +| delegatedProperties.kt:27:81:27:88 | getCurValue(...) | delegatedProperties.kt:27:13:27:88 | getValue | MethodCall | +| delegatedProperties.kt:27:81:27:88 | this | delegatedProperties.kt:27:13:27:88 | getValue | ThisAccess | +| delegatedProperties.kt:28:13:30:13 | Unit | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:28:35:28:47 | Object | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:28:50:28:71 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:28:50:28:71 | KProperty | file://:0:0:0:0 | | TypeAccess | @@ -216,8 +216,8 @@ | delegatedProperties.kt:36:9:36:29 | println(...) | delegatedProperties.kt:18:5:40:5 | fn | MethodCall | | delegatedProperties.kt:36:17:36:28 | getVarResource0(...) | delegatedProperties.kt:18:5:40:5 | fn | MethodCall | | delegatedProperties.kt:36:17:36:28 | this | delegatedProperties.kt:18:5:40:5 | fn | ThisAccess | -| delegatedProperties.kt:37:9:37:20 | setVarResource0(...) | delegatedProperties.kt:18:5:40:5 | fn | MethodCall | -| delegatedProperties.kt:37:9:37:20 | this | delegatedProperties.kt:18:5:40:5 | fn | ThisAccess | +| delegatedProperties.kt:37:9:37:24 | setVarResource0(...) | delegatedProperties.kt:18:5:40:5 | fn | MethodCall | +| delegatedProperties.kt:37:9:37:24 | this | delegatedProperties.kt:18:5:40:5 | fn | ThisAccess | | delegatedProperties.kt:37:24:37:24 | 3 | delegatedProperties.kt:18:5:40:5 | fn | IntegerLiteral | | delegatedProperties.kt:39:31:39:51 | ...::... | delegatedProperties.kt:18:5:40:5 | fn | PropertyRefExpr | | delegatedProperties.kt:39:31:39:51 | ...::... | delegatedProperties.kt:39:31:39:51 | | PropertyRefExpr | @@ -285,18 +285,18 @@ | delegatedProperties.kt:46:27:46:41 | Owner | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:46:44:46:65 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:46:44:46:65 | KProperty | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:47:16:47:16 | 1 | delegatedProperties.kt:46:14:48:5 | getValue | IntegerLiteral | -| delegatedProperties.kt:49:14:50:5 | Unit | file://:0:0:0:0 | | TypeAccess | +| delegatedProperties.kt:47:16:47:16 | 1 | delegatedProperties.kt:46:5:48:5 | getValue | IntegerLiteral | +| delegatedProperties.kt:49:5:50:5 | Unit | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:49:27:49:41 | Owner | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:49:44:49:65 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:49:44:49:65 | KProperty | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:49:68:49:78 | Integer | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:54:14:57:5 | ResourceDelegate | file://:0:0:0:0 | | TypeAccess | +| delegatedProperties.kt:54:5:57:5 | ResourceDelegate | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:54:34:54:48 | Owner | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:54:51:54:68 | ? ... | file://:0:0:0:0 | | WildcardTypeAccess | | delegatedProperties.kt:54:51:54:68 | KProperty | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:56:16:56:33 | ResourceDelegate | delegatedProperties.kt:54:14:57:5 | provideDelegate | TypeAccess | -| delegatedProperties.kt:56:16:56:33 | new ResourceDelegate(...) | delegatedProperties.kt:54:14:57:5 | provideDelegate | ClassInstanceExpr | +| delegatedProperties.kt:56:16:56:33 | ResourceDelegate | delegatedProperties.kt:54:5:57:5 | provideDelegate | TypeAccess | +| delegatedProperties.kt:56:16:56:33 | new ResourceDelegate(...) | delegatedProperties.kt:54:5:57:5 | provideDelegate | ClassInstanceExpr | | delegatedProperties.kt:60:1:60:24 | ...=... | delegatedProperties.kt:0:0:0:0 | | KtInitializerAssignExpr | | delegatedProperties.kt:60:1:60:24 | ...=... | delegatedProperties.kt:60:1:60:24 | setTopLevelInt | AssignExpr | | delegatedProperties.kt:60:1:60:24 | | delegatedProperties.kt:60:1:60:24 | setTopLevelInt | VarAccess | @@ -311,23 +311,23 @@ | delegatedProperties.kt:60:1:60:24 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:60:1:60:24 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:60:24:60:24 | 0 | delegatedProperties.kt:0:0:0:0 | | IntegerLiteral | -| delegatedProperties.kt:62:25:62:48 | ...=... | delegatedProperties.kt:62:1:62:49 | ClassWithDelegate | KtInitializerAssignExpr | -| delegatedProperties.kt:62:25:62:48 | anotherClassInt | delegatedProperties.kt:62:1:62:49 | ClassWithDelegate | VarAccess | -| delegatedProperties.kt:62:25:62:48 | anotherClassInt | delegatedProperties.kt:62:1:62:49 | ClassWithDelegate | VarAccess | +| delegatedProperties.kt:62:25:62:48 | ...=... | delegatedProperties.kt:62:24:62:49 | ClassWithDelegate | KtInitializerAssignExpr | +| delegatedProperties.kt:62:25:62:48 | anotherClassInt | delegatedProperties.kt:62:24:62:49 | ClassWithDelegate | VarAccess | +| delegatedProperties.kt:62:25:62:48 | anotherClassInt | delegatedProperties.kt:62:24:62:49 | ClassWithDelegate | VarAccess | | delegatedProperties.kt:62:25:62:48 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:62:25:62:48 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:62:25:62:48 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:62:25:62:48 | this | delegatedProperties.kt:62:25:62:48 | getAnotherClassInt | ThisAccess | | delegatedProperties.kt:62:25:62:48 | this.anotherClassInt | delegatedProperties.kt:62:25:62:48 | getAnotherClassInt | VarAccess | -| delegatedProperties.kt:63:17:63:37 | ...=... | delegatedProperties.kt:63:6:63:38 | Base | KtInitializerAssignExpr | -| delegatedProperties.kt:63:17:63:37 | baseClassInt | delegatedProperties.kt:63:6:63:38 | Base | VarAccess | -| delegatedProperties.kt:63:17:63:37 | baseClassInt | delegatedProperties.kt:63:6:63:38 | Base | VarAccess | +| delegatedProperties.kt:63:17:63:37 | ...=... | delegatedProperties.kt:63:16:63:38 | Base | KtInitializerAssignExpr | +| delegatedProperties.kt:63:17:63:37 | baseClassInt | delegatedProperties.kt:63:16:63:38 | Base | VarAccess | +| delegatedProperties.kt:63:17:63:37 | baseClassInt | delegatedProperties.kt:63:16:63:38 | Base | VarAccess | | delegatedProperties.kt:63:17:63:37 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:63:17:63:37 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:63:17:63:37 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:63:17:63:37 | this | delegatedProperties.kt:63:17:63:37 | getBaseClassInt | ThisAccess | | delegatedProperties.kt:63:17:63:37 | this.baseClassInt | delegatedProperties.kt:63:17:63:37 | getBaseClassInt | VarAccess | -| delegatedProperties.kt:65:15:65:32 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:65:15:65:32 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:65:15:65:32 | ...=... | delegatedProperties.kt:65:15:65:32 | setMemberInt | AssignExpr | | delegatedProperties.kt:65:15:65:32 | | delegatedProperties.kt:65:15:65:32 | setMemberInt | VarAccess | | delegatedProperties.kt:65:15:65:32 | Unit | file://:0:0:0:0 | | TypeAccess | @@ -335,24 +335,24 @@ | delegatedProperties.kt:65:15:65:32 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:65:15:65:32 | int | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:65:15:65:32 | int | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:65:15:65:32 | memberInt | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | -| delegatedProperties.kt:65:15:65:32 | memberInt | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:65:15:65:32 | memberInt | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | +| delegatedProperties.kt:65:15:65:32 | memberInt | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:65:15:65:32 | this | delegatedProperties.kt:65:15:65:32 | getMemberInt | ThisAccess | | delegatedProperties.kt:65:15:65:32 | this | delegatedProperties.kt:65:15:65:32 | setMemberInt | ThisAccess | | delegatedProperties.kt:65:15:65:32 | this.memberInt | delegatedProperties.kt:65:15:65:32 | getMemberInt | VarAccess | | delegatedProperties.kt:65:15:65:32 | this.memberInt | delegatedProperties.kt:65:15:65:32 | setMemberInt | VarAccess | -| delegatedProperties.kt:65:35:65:77 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:65:35:65:77 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:65:35:65:77 | ClassWithDelegate | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:65:35:65:77 | ClassWithDelegate | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:65:35:65:77 | ClassWithDelegate | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:65:35:65:77 | anotherClassInstance | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | -| delegatedProperties.kt:65:35:65:77 | anotherClassInstance | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:65:35:65:77 | anotherClassInstance | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | +| delegatedProperties.kt:65:35:65:77 | anotherClassInstance | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:65:35:65:77 | this | delegatedProperties.kt:65:35:65:77 | getAnotherClassInstance | ThisAccess | | delegatedProperties.kt:65:35:65:77 | this.anotherClassInstance | delegatedProperties.kt:65:35:65:77 | getAnotherClassInstance | VarAccess | -| delegatedProperties.kt:65:87:65:95 | memberInt | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:65:87:65:95 | memberInt | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:66:33:66:50 | ...::... | delegatedProperties.kt:66:33:66:50 | getDelegatedToMember1 | PropertyRefExpr | | delegatedProperties.kt:66:33:66:50 | ...::... | delegatedProperties.kt:66:33:66:50 | setDelegatedToMember1 | PropertyRefExpr | -| delegatedProperties.kt:66:33:66:50 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:66:33:66:50 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:66:33:66:50 | Integer | delegatedProperties.kt:66:33:66:50 | getDelegatedToMember1 | TypeAccess | | delegatedProperties.kt:66:33:66:50 | Integer | delegatedProperties.kt:66:33:66:50 | getDelegatedToMember1 | TypeAccess | | delegatedProperties.kt:66:33:66:50 | Integer | delegatedProperties.kt:66:33:66:50 | setDelegatedToMember1 | TypeAccess | @@ -374,7 +374,7 @@ | delegatedProperties.kt:66:33:66:50 | a0 | delegatedProperties.kt:66:33:66:50 | set | VarAccess | | delegatedProperties.kt:66:33:66:50 | a1 | delegatedProperties.kt:66:33:66:50 | set | VarAccess | | delegatedProperties.kt:66:33:66:50 | a1 | delegatedProperties.kt:66:33:66:50 | set | VarAccess | -| delegatedProperties.kt:66:33:66:50 | delegatedToMember1$delegate | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:66:33:66:50 | delegatedToMember1$delegate | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:66:33:66:50 | get(...) | delegatedProperties.kt:66:33:66:50 | invoke | MethodCall | | delegatedProperties.kt:66:33:66:50 | get(...) | delegatedProperties.kt:66:33:66:50 | invoke | MethodCall | | delegatedProperties.kt:66:33:66:50 | getDelegatedToMember1(...) | delegatedProperties.kt:66:33:66:50 | get | MethodCall | @@ -391,14 +391,14 @@ | delegatedProperties.kt:66:33:66:50 | this | delegatedProperties.kt:66:33:66:50 | setDelegatedToMember1 | ThisAccess | | delegatedProperties.kt:66:33:66:50 | this.delegatedToMember1$delegate | delegatedProperties.kt:66:33:66:50 | getDelegatedToMember1 | VarAccess | | delegatedProperties.kt:66:33:66:50 | this.delegatedToMember1$delegate | delegatedProperties.kt:66:33:66:50 | setDelegatedToMember1 | VarAccess | -| delegatedProperties.kt:66:36:66:39 | MyClass | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:66:36:66:39 | MyClass.this | delegatedProperties.kt:65:1:85:1 | MyClass | ThisAccess | -| delegatedProperties.kt:66:36:66:50 | ...::... | delegatedProperties.kt:65:1:85:1 | MyClass | PropertyRefExpr | +| delegatedProperties.kt:66:36:66:39 | MyClass | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:66:36:66:39 | MyClass.this | delegatedProperties.kt:65:14:65:78 | MyClass | ThisAccess | +| delegatedProperties.kt:66:36:66:50 | ...::... | delegatedProperties.kt:65:14:65:78 | MyClass | PropertyRefExpr | | delegatedProperties.kt:66:36:66:50 | ...=... | delegatedProperties.kt:66:36:66:50 | | AssignExpr | | delegatedProperties.kt:66:36:66:50 | | delegatedProperties.kt:66:36:66:50 | | VarAccess | | delegatedProperties.kt:66:36:66:50 | | delegatedProperties.kt:66:33:66:50 | setDelegatedToMember1 | VarAccess | -| delegatedProperties.kt:66:36:66:50 | Integer | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:66:36:66:50 | KMutableProperty0 | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | +| delegatedProperties.kt:66:36:66:50 | Integer | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:66:36:66:50 | KMutableProperty0 | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | | delegatedProperties.kt:66:36:66:50 | MyClass | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:66:36:66:50 | a0 | delegatedProperties.kt:66:36:66:50 | set | VarAccess | | delegatedProperties.kt:66:36:66:50 | get(...) | delegatedProperties.kt:66:36:66:50 | invoke | MethodCall | @@ -413,7 +413,7 @@ | delegatedProperties.kt:66:36:66:50 | this. | delegatedProperties.kt:66:36:66:50 | set | VarAccess | | delegatedProperties.kt:67:33:67:53 | ...::... | delegatedProperties.kt:67:33:67:53 | getDelegatedToMember2 | PropertyRefExpr | | delegatedProperties.kt:67:33:67:53 | ...::... | delegatedProperties.kt:67:33:67:53 | setDelegatedToMember2 | PropertyRefExpr | -| delegatedProperties.kt:67:33:67:53 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:67:33:67:53 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:67:33:67:53 | Integer | delegatedProperties.kt:67:33:67:53 | getDelegatedToMember2 | TypeAccess | | delegatedProperties.kt:67:33:67:53 | Integer | delegatedProperties.kt:67:33:67:53 | getDelegatedToMember2 | TypeAccess | | delegatedProperties.kt:67:33:67:53 | Integer | delegatedProperties.kt:67:33:67:53 | setDelegatedToMember2 | TypeAccess | @@ -438,7 +438,7 @@ | delegatedProperties.kt:67:33:67:53 | a0 | delegatedProperties.kt:67:33:67:53 | set | VarAccess | | delegatedProperties.kt:67:33:67:53 | a1 | delegatedProperties.kt:67:33:67:53 | set | VarAccess | | delegatedProperties.kt:67:33:67:53 | a1 | delegatedProperties.kt:67:33:67:53 | set | VarAccess | -| delegatedProperties.kt:67:33:67:53 | delegatedToMember2$delegate | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:67:33:67:53 | delegatedToMember2$delegate | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:67:33:67:53 | get(...) | delegatedProperties.kt:67:33:67:53 | invoke | MethodCall | | delegatedProperties.kt:67:33:67:53 | get(...) | delegatedProperties.kt:67:33:67:53 | invoke | MethodCall | | delegatedProperties.kt:67:33:67:53 | getDelegatedToMember2(...) | delegatedProperties.kt:67:33:67:53 | get | MethodCall | @@ -455,11 +455,11 @@ | delegatedProperties.kt:67:33:67:53 | this | delegatedProperties.kt:67:33:67:53 | setDelegatedToMember2 | ThisAccess | | delegatedProperties.kt:67:33:67:53 | this.delegatedToMember2$delegate | delegatedProperties.kt:67:33:67:53 | getDelegatedToMember2 | VarAccess | | delegatedProperties.kt:67:33:67:53 | this.delegatedToMember2$delegate | delegatedProperties.kt:67:33:67:53 | setDelegatedToMember2 | VarAccess | -| delegatedProperties.kt:67:36:67:53 | ...::... | delegatedProperties.kt:65:1:85:1 | MyClass | PropertyRefExpr | +| delegatedProperties.kt:67:36:67:53 | ...::... | delegatedProperties.kt:65:14:65:78 | MyClass | PropertyRefExpr | | delegatedProperties.kt:67:36:67:53 | | delegatedProperties.kt:67:33:67:53 | setDelegatedToMember2 | VarAccess | -| delegatedProperties.kt:67:36:67:53 | Integer | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:67:36:67:53 | KMutableProperty1 | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:67:36:67:53 | MyClass | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | +| delegatedProperties.kt:67:36:67:53 | Integer | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:67:36:67:53 | KMutableProperty1 | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:67:36:67:53 | MyClass | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | | delegatedProperties.kt:67:36:67:53 | a0 | delegatedProperties.kt:67:36:67:53 | get | VarAccess | | delegatedProperties.kt:67:36:67:53 | a0 | delegatedProperties.kt:67:36:67:53 | invoke | VarAccess | | delegatedProperties.kt:67:36:67:53 | a0 | delegatedProperties.kt:67:36:67:53 | set | VarAccess | @@ -470,7 +470,7 @@ | delegatedProperties.kt:67:36:67:53 | this | delegatedProperties.kt:67:36:67:53 | invoke | ThisAccess | | delegatedProperties.kt:69:36:69:56 | ...::... | delegatedProperties.kt:69:36:69:56 | getDelegatedToExtMember1 | PropertyRefExpr | | delegatedProperties.kt:69:36:69:56 | ...::... | delegatedProperties.kt:69:36:69:56 | setDelegatedToExtMember1 | PropertyRefExpr | -| delegatedProperties.kt:69:36:69:56 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:69:36:69:56 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:69:36:69:56 | Integer | delegatedProperties.kt:69:36:69:56 | getDelegatedToExtMember1 | TypeAccess | | delegatedProperties.kt:69:36:69:56 | Integer | delegatedProperties.kt:69:36:69:56 | getDelegatedToExtMember1 | TypeAccess | | delegatedProperties.kt:69:36:69:56 | Integer | delegatedProperties.kt:69:36:69:56 | setDelegatedToExtMember1 | TypeAccess | @@ -492,7 +492,7 @@ | delegatedProperties.kt:69:36:69:56 | a0 | delegatedProperties.kt:69:36:69:56 | set | VarAccess | | delegatedProperties.kt:69:36:69:56 | a1 | delegatedProperties.kt:69:36:69:56 | set | VarAccess | | delegatedProperties.kt:69:36:69:56 | a1 | delegatedProperties.kt:69:36:69:56 | set | VarAccess | -| delegatedProperties.kt:69:36:69:56 | delegatedToExtMember1$delegate | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:69:36:69:56 | delegatedToExtMember1$delegate | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:69:36:69:56 | get(...) | delegatedProperties.kt:69:36:69:56 | invoke | MethodCall | | delegatedProperties.kt:69:36:69:56 | get(...) | delegatedProperties.kt:69:36:69:56 | invoke | MethodCall | | delegatedProperties.kt:69:36:69:56 | getDelegatedToExtMember1(...) | delegatedProperties.kt:69:36:69:56 | get | MethodCall | @@ -509,16 +509,16 @@ | delegatedProperties.kt:69:36:69:56 | this | delegatedProperties.kt:69:36:69:56 | setDelegatedToExtMember1 | ThisAccess | | delegatedProperties.kt:69:36:69:56 | this.delegatedToExtMember1$delegate | delegatedProperties.kt:69:36:69:56 | getDelegatedToExtMember1 | VarAccess | | delegatedProperties.kt:69:36:69:56 | this.delegatedToExtMember1$delegate | delegatedProperties.kt:69:36:69:56 | setDelegatedToExtMember1 | VarAccess | -| delegatedProperties.kt:69:39:69:42 | MyClass | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:69:39:69:42 | MyClass.this | delegatedProperties.kt:65:1:85:1 | MyClass | ThisAccess | -| delegatedProperties.kt:69:39:69:56 | ...::... | delegatedProperties.kt:65:1:85:1 | MyClass | PropertyRefExpr | +| delegatedProperties.kt:69:39:69:42 | MyClass | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:69:39:69:42 | MyClass.this | delegatedProperties.kt:65:14:65:78 | MyClass | ThisAccess | +| delegatedProperties.kt:69:39:69:56 | ...::... | delegatedProperties.kt:65:14:65:78 | MyClass | PropertyRefExpr | | delegatedProperties.kt:69:39:69:56 | ...=... | delegatedProperties.kt:69:39:69:56 | | AssignExpr | | delegatedProperties.kt:69:39:69:56 | | delegatedProperties.kt:69:39:69:56 | | VarAccess | | delegatedProperties.kt:69:39:69:56 | | delegatedProperties.kt:69:36:69:56 | setDelegatedToExtMember1 | VarAccess | | delegatedProperties.kt:69:39:69:56 | DelegatedPropertiesKt | delegatedProperties.kt:69:39:69:56 | get | TypeAccess | | delegatedProperties.kt:69:39:69:56 | DelegatedPropertiesKt | delegatedProperties.kt:69:39:69:56 | set | TypeAccess | -| delegatedProperties.kt:69:39:69:56 | Integer | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:69:39:69:56 | KMutableProperty0 | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | +| delegatedProperties.kt:69:39:69:56 | Integer | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:69:39:69:56 | KMutableProperty0 | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | | delegatedProperties.kt:69:39:69:56 | MyClass | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:69:39:69:56 | a0 | delegatedProperties.kt:69:39:69:56 | set | VarAccess | | delegatedProperties.kt:69:39:69:56 | get(...) | delegatedProperties.kt:69:39:69:56 | invoke | MethodCall | @@ -533,7 +533,7 @@ | delegatedProperties.kt:69:39:69:56 | this. | delegatedProperties.kt:69:39:69:56 | set | VarAccess | | delegatedProperties.kt:70:36:70:59 | ...::... | delegatedProperties.kt:70:36:70:59 | getDelegatedToExtMember2 | PropertyRefExpr | | delegatedProperties.kt:70:36:70:59 | ...::... | delegatedProperties.kt:70:36:70:59 | setDelegatedToExtMember2 | PropertyRefExpr | -| delegatedProperties.kt:70:36:70:59 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:70:36:70:59 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:70:36:70:59 | Integer | delegatedProperties.kt:70:36:70:59 | getDelegatedToExtMember2 | TypeAccess | | delegatedProperties.kt:70:36:70:59 | Integer | delegatedProperties.kt:70:36:70:59 | getDelegatedToExtMember2 | TypeAccess | | delegatedProperties.kt:70:36:70:59 | Integer | delegatedProperties.kt:70:36:70:59 | setDelegatedToExtMember2 | TypeAccess | @@ -558,7 +558,7 @@ | delegatedProperties.kt:70:36:70:59 | a0 | delegatedProperties.kt:70:36:70:59 | set | VarAccess | | delegatedProperties.kt:70:36:70:59 | a1 | delegatedProperties.kt:70:36:70:59 | set | VarAccess | | delegatedProperties.kt:70:36:70:59 | a1 | delegatedProperties.kt:70:36:70:59 | set | VarAccess | -| delegatedProperties.kt:70:36:70:59 | delegatedToExtMember2$delegate | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:70:36:70:59 | delegatedToExtMember2$delegate | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:70:36:70:59 | get(...) | delegatedProperties.kt:70:36:70:59 | invoke | MethodCall | | delegatedProperties.kt:70:36:70:59 | get(...) | delegatedProperties.kt:70:36:70:59 | invoke | MethodCall | | delegatedProperties.kt:70:36:70:59 | getDelegatedToExtMember2(...) | delegatedProperties.kt:70:36:70:59 | get | MethodCall | @@ -575,13 +575,13 @@ | delegatedProperties.kt:70:36:70:59 | this | delegatedProperties.kt:70:36:70:59 | setDelegatedToExtMember2 | ThisAccess | | delegatedProperties.kt:70:36:70:59 | this.delegatedToExtMember2$delegate | delegatedProperties.kt:70:36:70:59 | getDelegatedToExtMember2 | VarAccess | | delegatedProperties.kt:70:36:70:59 | this.delegatedToExtMember2$delegate | delegatedProperties.kt:70:36:70:59 | setDelegatedToExtMember2 | VarAccess | -| delegatedProperties.kt:70:39:70:59 | ...::... | delegatedProperties.kt:65:1:85:1 | MyClass | PropertyRefExpr | +| delegatedProperties.kt:70:39:70:59 | ...::... | delegatedProperties.kt:65:14:65:78 | MyClass | PropertyRefExpr | | delegatedProperties.kt:70:39:70:59 | | delegatedProperties.kt:70:36:70:59 | setDelegatedToExtMember2 | VarAccess | | delegatedProperties.kt:70:39:70:59 | DelegatedPropertiesKt | delegatedProperties.kt:70:39:70:59 | get | TypeAccess | | delegatedProperties.kt:70:39:70:59 | DelegatedPropertiesKt | delegatedProperties.kt:70:39:70:59 | set | TypeAccess | -| delegatedProperties.kt:70:39:70:59 | Integer | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:70:39:70:59 | KMutableProperty1 | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:70:39:70:59 | MyClass | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | +| delegatedProperties.kt:70:39:70:59 | Integer | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:70:39:70:59 | KMutableProperty1 | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:70:39:70:59 | MyClass | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | | delegatedProperties.kt:70:39:70:59 | a0 | delegatedProperties.kt:70:39:70:59 | get | VarAccess | | delegatedProperties.kt:70:39:70:59 | a0 | delegatedProperties.kt:70:39:70:59 | invoke | VarAccess | | delegatedProperties.kt:70:39:70:59 | a0 | delegatedProperties.kt:70:39:70:59 | set | VarAccess | @@ -591,7 +591,7 @@ | delegatedProperties.kt:70:39:70:59 | setExtDelegated(...) | delegatedProperties.kt:70:39:70:59 | set | MethodCall | | delegatedProperties.kt:70:39:70:59 | this | delegatedProperties.kt:70:39:70:59 | invoke | ThisAccess | | delegatedProperties.kt:72:36:72:56 | ...::... | delegatedProperties.kt:72:36:72:56 | getDelegatedToBaseClass1 | PropertyRefExpr | -| delegatedProperties.kt:72:36:72:56 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:72:36:72:56 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:72:36:72:56 | Integer | delegatedProperties.kt:72:36:72:56 | getDelegatedToBaseClass1 | TypeAccess | | delegatedProperties.kt:72:36:72:56 | Integer | delegatedProperties.kt:72:36:72:56 | getDelegatedToBaseClass1 | TypeAccess | | delegatedProperties.kt:72:36:72:56 | Integer | file://:0:0:0:0 | | TypeAccess | @@ -601,7 +601,7 @@ | delegatedProperties.kt:72:36:72:56 | PropertyReferenceDelegatesKt | delegatedProperties.kt:72:36:72:56 | getDelegatedToBaseClass1 | TypeAccess | | delegatedProperties.kt:72:36:72:56 | a0 | delegatedProperties.kt:72:36:72:56 | get | VarAccess | | delegatedProperties.kt:72:36:72:56 | a0 | delegatedProperties.kt:72:36:72:56 | invoke | VarAccess | -| delegatedProperties.kt:72:36:72:56 | delegatedToBaseClass1$delegate | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:72:36:72:56 | delegatedToBaseClass1$delegate | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:72:36:72:56 | get(...) | delegatedProperties.kt:72:36:72:56 | invoke | MethodCall | | delegatedProperties.kt:72:36:72:56 | getDelegatedToBaseClass1(...) | delegatedProperties.kt:72:36:72:56 | get | MethodCall | | delegatedProperties.kt:72:36:72:56 | getValue(...) | delegatedProperties.kt:72:36:72:56 | getDelegatedToBaseClass1 | MethodCall | @@ -609,13 +609,13 @@ | delegatedProperties.kt:72:36:72:56 | this | delegatedProperties.kt:72:36:72:56 | getDelegatedToBaseClass1 | ThisAccess | | delegatedProperties.kt:72:36:72:56 | this | delegatedProperties.kt:72:36:72:56 | invoke | ThisAccess | | delegatedProperties.kt:72:36:72:56 | this.delegatedToBaseClass1$delegate | delegatedProperties.kt:72:36:72:56 | getDelegatedToBaseClass1 | VarAccess | -| delegatedProperties.kt:72:39:72:42 | MyClass | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:72:39:72:42 | MyClass.this | delegatedProperties.kt:65:1:85:1 | MyClass | ThisAccess | -| delegatedProperties.kt:72:39:72:56 | ...::... | delegatedProperties.kt:65:1:85:1 | MyClass | PropertyRefExpr | +| delegatedProperties.kt:72:39:72:42 | MyClass | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:72:39:72:42 | MyClass.this | delegatedProperties.kt:65:14:65:78 | MyClass | ThisAccess | +| delegatedProperties.kt:72:39:72:56 | ...::... | delegatedProperties.kt:65:14:65:78 | MyClass | PropertyRefExpr | | delegatedProperties.kt:72:39:72:56 | ...=... | delegatedProperties.kt:72:39:72:56 | | AssignExpr | | delegatedProperties.kt:72:39:72:56 | | delegatedProperties.kt:72:39:72:56 | | VarAccess | -| delegatedProperties.kt:72:39:72:56 | Integer | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:72:39:72:56 | KProperty0 | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | +| delegatedProperties.kt:72:39:72:56 | Integer | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:72:39:72:56 | KProperty0 | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | | delegatedProperties.kt:72:39:72:56 | MyClass | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:72:39:72:56 | get(...) | delegatedProperties.kt:72:39:72:56 | invoke | MethodCall | | delegatedProperties.kt:72:39:72:56 | getBaseClassInt(...) | delegatedProperties.kt:72:39:72:56 | get | MethodCall | @@ -625,7 +625,7 @@ | delegatedProperties.kt:72:39:72:56 | this. | delegatedProperties.kt:72:39:72:56 | | VarAccess | | delegatedProperties.kt:72:39:72:56 | this. | delegatedProperties.kt:72:39:72:56 | get | VarAccess | | delegatedProperties.kt:73:36:73:56 | ...::... | delegatedProperties.kt:73:36:73:56 | getDelegatedToBaseClass2 | PropertyRefExpr | -| delegatedProperties.kt:73:36:73:56 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:73:36:73:56 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:73:36:73:56 | Base | delegatedProperties.kt:73:36:73:56 | getDelegatedToBaseClass2 | TypeAccess | | delegatedProperties.kt:73:36:73:56 | Base | file://:0:0:0:0 | | TypeAccess | | delegatedProperties.kt:73:36:73:56 | Integer | delegatedProperties.kt:73:36:73:56 | getDelegatedToBaseClass2 | TypeAccess | @@ -637,7 +637,7 @@ | delegatedProperties.kt:73:36:73:56 | PropertyReferenceDelegatesKt | delegatedProperties.kt:73:36:73:56 | getDelegatedToBaseClass2 | TypeAccess | | delegatedProperties.kt:73:36:73:56 | a0 | delegatedProperties.kt:73:36:73:56 | get | VarAccess | | delegatedProperties.kt:73:36:73:56 | a0 | delegatedProperties.kt:73:36:73:56 | invoke | VarAccess | -| delegatedProperties.kt:73:36:73:56 | delegatedToBaseClass2$delegate | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:73:36:73:56 | delegatedToBaseClass2$delegate | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:73:36:73:56 | get(...) | delegatedProperties.kt:73:36:73:56 | invoke | MethodCall | | delegatedProperties.kt:73:36:73:56 | getDelegatedToBaseClass2(...) | delegatedProperties.kt:73:36:73:56 | get | MethodCall | | delegatedProperties.kt:73:36:73:56 | getValue(...) | delegatedProperties.kt:73:36:73:56 | getDelegatedToBaseClass2 | MethodCall | @@ -645,17 +645,17 @@ | delegatedProperties.kt:73:36:73:56 | this | delegatedProperties.kt:73:36:73:56 | getDelegatedToBaseClass2 | ThisAccess | | delegatedProperties.kt:73:36:73:56 | this | delegatedProperties.kt:73:36:73:56 | invoke | ThisAccess | | delegatedProperties.kt:73:36:73:56 | this.delegatedToBaseClass2$delegate | delegatedProperties.kt:73:36:73:56 | getDelegatedToBaseClass2 | VarAccess | -| delegatedProperties.kt:73:39:73:56 | ...::... | delegatedProperties.kt:65:1:85:1 | MyClass | PropertyRefExpr | -| delegatedProperties.kt:73:39:73:56 | Base | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:73:39:73:56 | Integer | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:73:39:73:56 | KProperty1 | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | +| delegatedProperties.kt:73:39:73:56 | ...::... | delegatedProperties.kt:65:14:65:78 | MyClass | PropertyRefExpr | +| delegatedProperties.kt:73:39:73:56 | Base | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:73:39:73:56 | Integer | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:73:39:73:56 | KProperty1 | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | | delegatedProperties.kt:73:39:73:56 | a0 | delegatedProperties.kt:73:39:73:56 | get | VarAccess | | delegatedProperties.kt:73:39:73:56 | a0 | delegatedProperties.kt:73:39:73:56 | invoke | VarAccess | | delegatedProperties.kt:73:39:73:56 | get(...) | delegatedProperties.kt:73:39:73:56 | invoke | MethodCall | | delegatedProperties.kt:73:39:73:56 | getBaseClassInt(...) | delegatedProperties.kt:73:39:73:56 | get | MethodCall | | delegatedProperties.kt:73:39:73:56 | this | delegatedProperties.kt:73:39:73:56 | invoke | ThisAccess | | delegatedProperties.kt:75:39:75:78 | ...::... | delegatedProperties.kt:75:39:75:78 | getDelegatedToAnotherClass1 | PropertyRefExpr | -| delegatedProperties.kt:75:39:75:78 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:75:39:75:78 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:75:39:75:78 | Integer | delegatedProperties.kt:75:39:75:78 | getDelegatedToAnotherClass1 | TypeAccess | | delegatedProperties.kt:75:39:75:78 | Integer | delegatedProperties.kt:75:39:75:78 | getDelegatedToAnotherClass1 | TypeAccess | | delegatedProperties.kt:75:39:75:78 | Integer | file://:0:0:0:0 | | TypeAccess | @@ -665,7 +665,7 @@ | delegatedProperties.kt:75:39:75:78 | PropertyReferenceDelegatesKt | delegatedProperties.kt:75:39:75:78 | getDelegatedToAnotherClass1 | TypeAccess | | delegatedProperties.kt:75:39:75:78 | a0 | delegatedProperties.kt:75:39:75:78 | get | VarAccess | | delegatedProperties.kt:75:39:75:78 | a0 | delegatedProperties.kt:75:39:75:78 | invoke | VarAccess | -| delegatedProperties.kt:75:39:75:78 | delegatedToAnotherClass1$delegate | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:75:39:75:78 | delegatedToAnotherClass1$delegate | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:75:39:75:78 | get(...) | delegatedProperties.kt:75:39:75:78 | invoke | MethodCall | | delegatedProperties.kt:75:39:75:78 | getDelegatedToAnotherClass1(...) | delegatedProperties.kt:75:39:75:78 | get | MethodCall | | delegatedProperties.kt:75:39:75:78 | getValue(...) | delegatedProperties.kt:75:39:75:78 | getDelegatedToAnotherClass1 | MethodCall | @@ -673,15 +673,15 @@ | delegatedProperties.kt:75:39:75:78 | this | delegatedProperties.kt:75:39:75:78 | getDelegatedToAnotherClass1 | ThisAccess | | delegatedProperties.kt:75:39:75:78 | this | delegatedProperties.kt:75:39:75:78 | invoke | ThisAccess | | delegatedProperties.kt:75:39:75:78 | this.delegatedToAnotherClass1$delegate | delegatedProperties.kt:75:39:75:78 | getDelegatedToAnotherClass1 | VarAccess | -| delegatedProperties.kt:75:42:75:61 | MyClass | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:75:42:75:61 | MyClass.this | delegatedProperties.kt:65:1:85:1 | MyClass | ThisAccess | -| delegatedProperties.kt:75:42:75:61 | getAnotherClassInstance(...) | delegatedProperties.kt:65:1:85:1 | MyClass | MethodCall | -| delegatedProperties.kt:75:42:75:78 | ...::... | delegatedProperties.kt:65:1:85:1 | MyClass | PropertyRefExpr | +| delegatedProperties.kt:75:42:75:61 | MyClass | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:75:42:75:61 | MyClass.this | delegatedProperties.kt:65:14:65:78 | MyClass | ThisAccess | +| delegatedProperties.kt:75:42:75:61 | getAnotherClassInstance(...) | delegatedProperties.kt:65:14:65:78 | MyClass | MethodCall | +| delegatedProperties.kt:75:42:75:78 | ...::... | delegatedProperties.kt:65:14:65:78 | MyClass | PropertyRefExpr | | delegatedProperties.kt:75:42:75:78 | ...=... | delegatedProperties.kt:75:42:75:78 | | AssignExpr | | delegatedProperties.kt:75:42:75:78 | | delegatedProperties.kt:75:42:75:78 | | VarAccess | | delegatedProperties.kt:75:42:75:78 | ClassWithDelegate | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:75:42:75:78 | Integer | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:75:42:75:78 | KProperty0 | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | +| delegatedProperties.kt:75:42:75:78 | Integer | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:75:42:75:78 | KProperty0 | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | | delegatedProperties.kt:75:42:75:78 | get(...) | delegatedProperties.kt:75:42:75:78 | invoke | MethodCall | | delegatedProperties.kt:75:42:75:78 | getAnotherClassInt(...) | delegatedProperties.kt:75:42:75:78 | get | MethodCall | | delegatedProperties.kt:75:42:75:78 | this | delegatedProperties.kt:75:42:75:78 | | ThisAccess | @@ -691,7 +691,7 @@ | delegatedProperties.kt:75:42:75:78 | this. | delegatedProperties.kt:75:42:75:78 | get | VarAccess | | delegatedProperties.kt:77:34:77:49 | ...::... | delegatedProperties.kt:77:34:77:49 | getDelegatedToTopLevel | PropertyRefExpr | | delegatedProperties.kt:77:34:77:49 | ...::... | delegatedProperties.kt:77:34:77:49 | setDelegatedToTopLevel | PropertyRefExpr | -| delegatedProperties.kt:77:34:77:49 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:77:34:77:49 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:77:34:77:49 | Integer | delegatedProperties.kt:77:34:77:49 | getDelegatedToTopLevel | TypeAccess | | delegatedProperties.kt:77:34:77:49 | Integer | delegatedProperties.kt:77:34:77:49 | getDelegatedToTopLevel | TypeAccess | | delegatedProperties.kt:77:34:77:49 | Integer | delegatedProperties.kt:77:34:77:49 | setDelegatedToTopLevel | TypeAccess | @@ -713,7 +713,7 @@ | delegatedProperties.kt:77:34:77:49 | a0 | delegatedProperties.kt:77:34:77:49 | set | VarAccess | | delegatedProperties.kt:77:34:77:49 | a1 | delegatedProperties.kt:77:34:77:49 | set | VarAccess | | delegatedProperties.kt:77:34:77:49 | a1 | delegatedProperties.kt:77:34:77:49 | set | VarAccess | -| delegatedProperties.kt:77:34:77:49 | delegatedToTopLevel$delegate | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:77:34:77:49 | delegatedToTopLevel$delegate | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:77:34:77:49 | get(...) | delegatedProperties.kt:77:34:77:49 | invoke | MethodCall | | delegatedProperties.kt:77:34:77:49 | get(...) | delegatedProperties.kt:77:34:77:49 | invoke | MethodCall | | delegatedProperties.kt:77:34:77:49 | getDelegatedToTopLevel(...) | delegatedProperties.kt:77:34:77:49 | get | MethodCall | @@ -730,19 +730,19 @@ | delegatedProperties.kt:77:34:77:49 | this | delegatedProperties.kt:77:34:77:49 | setDelegatedToTopLevel | ThisAccess | | delegatedProperties.kt:77:34:77:49 | this.delegatedToTopLevel$delegate | delegatedProperties.kt:77:34:77:49 | getDelegatedToTopLevel | VarAccess | | delegatedProperties.kt:77:34:77:49 | this.delegatedToTopLevel$delegate | delegatedProperties.kt:77:34:77:49 | setDelegatedToTopLevel | VarAccess | -| delegatedProperties.kt:77:37:77:49 | ...::... | delegatedProperties.kt:65:1:85:1 | MyClass | PropertyRefExpr | +| delegatedProperties.kt:77:37:77:49 | ...::... | delegatedProperties.kt:65:14:65:78 | MyClass | PropertyRefExpr | | delegatedProperties.kt:77:37:77:49 | | delegatedProperties.kt:77:34:77:49 | setDelegatedToTopLevel | VarAccess | | delegatedProperties.kt:77:37:77:49 | DelegatedPropertiesKt | delegatedProperties.kt:77:37:77:49 | get | TypeAccess | | delegatedProperties.kt:77:37:77:49 | DelegatedPropertiesKt | delegatedProperties.kt:77:37:77:49 | set | TypeAccess | -| delegatedProperties.kt:77:37:77:49 | Integer | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:77:37:77:49 | KMutableProperty0 | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | +| delegatedProperties.kt:77:37:77:49 | Integer | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:77:37:77:49 | KMutableProperty0 | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | | delegatedProperties.kt:77:37:77:49 | a0 | delegatedProperties.kt:77:37:77:49 | set | VarAccess | | delegatedProperties.kt:77:37:77:49 | get(...) | delegatedProperties.kt:77:37:77:49 | invoke | MethodCall | | delegatedProperties.kt:77:37:77:49 | getTopLevelInt(...) | delegatedProperties.kt:77:37:77:49 | get | MethodCall | | delegatedProperties.kt:77:37:77:49 | setTopLevelInt(...) | delegatedProperties.kt:77:37:77:49 | set | MethodCall | | delegatedProperties.kt:77:37:77:49 | this | delegatedProperties.kt:77:37:77:49 | invoke | ThisAccess | | delegatedProperties.kt:79:18:79:38 | ...::... | delegatedProperties.kt:79:18:79:38 | getMax | PropertyRefExpr | -| delegatedProperties.kt:79:18:79:38 | ...=... | delegatedProperties.kt:65:1:85:1 | MyClass | KtInitializerAssignExpr | +| delegatedProperties.kt:79:18:79:38 | ...=... | delegatedProperties.kt:65:14:65:78 | MyClass | KtInitializerAssignExpr | | delegatedProperties.kt:79:18:79:38 | Integer | delegatedProperties.kt:79:18:79:38 | getMax | TypeAccess | | delegatedProperties.kt:79:18:79:38 | Integer | delegatedProperties.kt:79:18:79:38 | getMax | TypeAccess | | delegatedProperties.kt:79:18:79:38 | Integer | file://:0:0:0:0 | | TypeAccess | @@ -756,13 +756,13 @@ | delegatedProperties.kt:79:18:79:38 | getMax(...) | delegatedProperties.kt:79:18:79:38 | get | MethodCall | | delegatedProperties.kt:79:18:79:38 | getValue(...) | delegatedProperties.kt:79:18:79:38 | getMax | MethodCall | | delegatedProperties.kt:79:18:79:38 | int | file://:0:0:0:0 | | TypeAccess | -| delegatedProperties.kt:79:18:79:38 | max$delegate | delegatedProperties.kt:65:1:85:1 | MyClass | VarAccess | +| delegatedProperties.kt:79:18:79:38 | max$delegate | delegatedProperties.kt:65:14:65:78 | MyClass | VarAccess | | delegatedProperties.kt:79:18:79:38 | this | delegatedProperties.kt:79:18:79:38 | getMax | ThisAccess | | delegatedProperties.kt:79:18:79:38 | this | delegatedProperties.kt:79:18:79:38 | invoke | ThisAccess | | delegatedProperties.kt:79:18:79:38 | this.max$delegate | delegatedProperties.kt:79:18:79:38 | getMax | VarAccess | -| delegatedProperties.kt:79:21:79:38 | ...::... | delegatedProperties.kt:65:1:85:1 | MyClass | PropertyRefExpr | -| delegatedProperties.kt:79:21:79:38 | Integer | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | -| delegatedProperties.kt:79:21:79:38 | KProperty0 | delegatedProperties.kt:65:1:85:1 | MyClass | TypeAccess | +| delegatedProperties.kt:79:21:79:38 | ...::... | delegatedProperties.kt:65:14:65:78 | MyClass | PropertyRefExpr | +| delegatedProperties.kt:79:21:79:38 | Integer | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | +| delegatedProperties.kt:79:21:79:38 | KProperty0 | delegatedProperties.kt:65:14:65:78 | MyClass | TypeAccess | | delegatedProperties.kt:79:21:79:38 | MAX_VALUE | delegatedProperties.kt:79:21:79:38 | get | VarAccess | | delegatedProperties.kt:79:21:79:38 | get(...) | delegatedProperties.kt:79:21:79:38 | invoke | MethodCall | | delegatedProperties.kt:79:21:79:38 | this | delegatedProperties.kt:79:21:79:38 | invoke | ThisAccess | diff --git a/java/ql/test-kotlin2/library-tests/reflection/reflection.expected b/java/ql/test-kotlin2/library-tests/reflection/reflection.expected index d149bd24563..f6c1aa2151d 100644 --- a/java/ql/test-kotlin2/library-tests/reflection/reflection.expected +++ b/java/ql/test-kotlin2/library-tests/reflection/reflection.expected @@ -1,26 +1,26 @@ variableInitializerType -| reflection.kt:7:13:7:15 | KFunction ref | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:7:49:7:54 | new Function2(...) { ... } | file:///Function2.class:0:0:0:0 | Function2 | true | -| reflection.kt:7:13:7:15 | KFunction ref | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:7:49:7:54 | new Function2(...) { ... } | file:///FunctionReference.class:0:0:0:0 | FunctionReference | true | -| reflection.kt:10:13:10:14 | KProperty1 x0 | file:///KProperty1.class:0:0:0:0 | KProperty1 | reflection.kt:10:38:10:42 | new KProperty1(...) { ... } | file:///KProperty1.class:0:0:0:0 | KProperty1 | true | -| reflection.kt:10:13:10:14 | KProperty1 x0 | file:///KProperty1.class:0:0:0:0 | KProperty1 | reflection.kt:10:38:10:42 | new KProperty1(...) { ... } | file:///PropertyReference.class:0:0:0:0 | PropertyReference | true | -| reflection.kt:13:13:13:14 | Getter x3 | file:///KProperty1$Getter.class:0:0:0:0 | Getter | file:///KProperty1$Getter.class:0:0:0:0 | Getter | file:///Function1.class:0:0:0:0 | Function1 | true | -| reflection.kt:13:13:13:14 | Getter x3 | file:///KProperty1$Getter.class:0:0:0:0 | Getter | file:///KProperty1$Getter.class:0:0:0:0 | Getter | file:///KProperty$Getter.class:0:0:0:0 | Getter | true | -| reflection.kt:14:13:14:14 | KFunction x4 | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:14:38:14:44 | new Function1(...) { ... } | file:///Function1.class:0:0:0:0 | Function1 | true | -| reflection.kt:14:13:14:14 | KFunction x4 | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:14:38:14:44 | new Function1(...) { ... } | file:///FunctionReference.class:0:0:0:0 | FunctionReference | true | -| reflection.kt:15:13:15:14 | KProperty0 x5 | file:///KProperty0.class:0:0:0:0 | KProperty0 | reflection.kt:15:35:15:41 | new KProperty0(...) { ... } | file:///KProperty0.class:0:0:0:0 | KProperty0 | true | -| reflection.kt:15:13:15:14 | KProperty0 x5 | file:///KProperty0.class:0:0:0:0 | KProperty0 | reflection.kt:15:35:15:41 | new KProperty0(...) { ... } | file:///PropertyReference.class:0:0:0:0 | PropertyReference | true | -| reflection.kt:17:13:17:14 | KMutableProperty1 y0 | file:///KMutableProperty1.class:0:0:0:0 | KMutableProperty1 | reflection.kt:17:45:17:49 | new KMutableProperty1(...) { ... } | file:///KMutableProperty1.class:0:0:0:0 | KMutableProperty1 | true | -| reflection.kt:17:13:17:14 | KMutableProperty1 y0 | file:///KMutableProperty1.class:0:0:0:0 | KMutableProperty1 | reflection.kt:17:45:17:49 | new KMutableProperty1(...) { ... } | file:///PropertyReference.class:0:0:0:0 | PropertyReference | true | -| reflection.kt:20:13:20:14 | Setter y3 | file:///KMutableProperty1$Setter.class:0:0:0:0 | Setter | file:///KMutableProperty1$Setter.class:0:0:0:0 | Setter | file:///Function2.class:0:0:0:0 | Function2 | true | -| reflection.kt:20:13:20:14 | Setter y3 | file:///KMutableProperty1$Setter.class:0:0:0:0 | Setter | file:///KMutableProperty1$Setter.class:0:0:0:0 | Setter | file:///KMutableProperty$Setter.class:0:0:0:0 | Setter | true | -| reflection.kt:21:13:21:14 | KFunction y4 | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:21:44:21:50 | new Function2(...) { ... } | file:///Function2.class:0:0:0:0 | Function2 | true | -| reflection.kt:21:13:21:14 | KFunction y4 | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:21:44:21:50 | new Function2(...) { ... } | file:///FunctionReference.class:0:0:0:0 | FunctionReference | true | -| reflection.kt:22:13:22:14 | KMutableProperty0 y5 | file:///KMutableProperty0.class:0:0:0:0 | KMutableProperty0 | reflection.kt:22:42:22:48 | new KMutableProperty0(...) { ... } | file:///KMutableProperty0.class:0:0:0:0 | KMutableProperty0 | true | -| reflection.kt:22:13:22:14 | KMutableProperty0 y5 | file:///KMutableProperty0.class:0:0:0:0 | KMutableProperty0 | reflection.kt:22:42:22:48 | new KMutableProperty0(...) { ... } | file:///PropertyReference.class:0:0:0:0 | PropertyReference | true | -| reflection.kt:24:13:24:16 | KProperty2 prop | file:///KProperty2.class:0:0:0:0 | KProperty2 | file:///KProperty2.class:0:0:0:0 | KProperty2 | file:///Function2.class:0:0:0:0 | Function2 | true | -| reflection.kt:24:13:24:16 | KProperty2 prop | file:///KProperty2.class:0:0:0:0 | KProperty2 | file:///KProperty2.class:0:0:0:0 | KProperty2 | file:///KProperty.class:0:0:0:0 | KProperty | true | -| reflection.kt:116:13:116:13 | KFunction x | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:116:40:116:44 | new Function1(...) { ... } | file:///Function1.class:0:0:0:0 | Function1 | true | -| reflection.kt:116:13:116:13 | KFunction x | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:116:40:116:44 | new Function1(...) { ... } | file:///FunctionReference.class:0:0:0:0 | FunctionReference | true | +| reflection.kt:7:9:7:54 | KFunction ref | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:7:49:7:54 | new Function2(...) { ... } | file:///Function2.class:0:0:0:0 | Function2 | true | +| reflection.kt:7:9:7:54 | KFunction ref | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:7:49:7:54 | new Function2(...) { ... } | file:///FunctionReference.class:0:0:0:0 | FunctionReference | true | +| reflection.kt:10:9:10:42 | KProperty1 x0 | file:///KProperty1.class:0:0:0:0 | KProperty1 | reflection.kt:10:38:10:42 | new KProperty1(...) { ... } | file:///KProperty1.class:0:0:0:0 | KProperty1 | true | +| reflection.kt:10:9:10:42 | KProperty1 x0 | file:///KProperty1.class:0:0:0:0 | KProperty1 | reflection.kt:10:38:10:42 | new KProperty1(...) { ... } | file:///PropertyReference.class:0:0:0:0 | PropertyReference | true | +| reflection.kt:13:9:13:53 | Getter x3 | file:///KProperty1$Getter.class:0:0:0:0 | Getter | file:///KProperty1$Getter.class:0:0:0:0 | Getter | file:///Function1.class:0:0:0:0 | Function1 | true | +| reflection.kt:13:9:13:53 | Getter x3 | file:///KProperty1$Getter.class:0:0:0:0 | Getter | file:///KProperty1$Getter.class:0:0:0:0 | Getter | file:///KProperty$Getter.class:0:0:0:0 | Getter | true | +| reflection.kt:14:9:14:44 | KFunction x4 | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:14:38:14:44 | new Function1(...) { ... } | file:///Function1.class:0:0:0:0 | Function1 | true | +| reflection.kt:14:9:14:44 | KFunction x4 | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:14:38:14:44 | new Function1(...) { ... } | file:///FunctionReference.class:0:0:0:0 | FunctionReference | true | +| reflection.kt:15:9:15:41 | KProperty0 x5 | file:///KProperty0.class:0:0:0:0 | KProperty0 | reflection.kt:15:35:15:41 | new KProperty0(...) { ... } | file:///KProperty0.class:0:0:0:0 | KProperty0 | true | +| reflection.kt:15:9:15:41 | KProperty0 x5 | file:///KProperty0.class:0:0:0:0 | KProperty0 | reflection.kt:15:35:15:41 | new KProperty0(...) { ... } | file:///PropertyReference.class:0:0:0:0 | PropertyReference | true | +| reflection.kt:17:9:17:49 | KMutableProperty1 y0 | file:///KMutableProperty1.class:0:0:0:0 | KMutableProperty1 | reflection.kt:17:45:17:49 | new KMutableProperty1(...) { ... } | file:///KMutableProperty1.class:0:0:0:0 | KMutableProperty1 | true | +| reflection.kt:17:9:17:49 | KMutableProperty1 y0 | file:///KMutableProperty1.class:0:0:0:0 | KMutableProperty1 | reflection.kt:17:45:17:49 | new KMutableProperty1(...) { ... } | file:///PropertyReference.class:0:0:0:0 | PropertyReference | true | +| reflection.kt:20:9:20:60 | Setter y3 | file:///KMutableProperty1$Setter.class:0:0:0:0 | Setter | file:///KMutableProperty1$Setter.class:0:0:0:0 | Setter | file:///Function2.class:0:0:0:0 | Function2 | true | +| reflection.kt:20:9:20:60 | Setter y3 | file:///KMutableProperty1$Setter.class:0:0:0:0 | Setter | file:///KMutableProperty1$Setter.class:0:0:0:0 | Setter | file:///KMutableProperty$Setter.class:0:0:0:0 | Setter | true | +| reflection.kt:21:9:21:50 | KFunction y4 | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:21:44:21:50 | new Function2(...) { ... } | file:///Function2.class:0:0:0:0 | Function2 | true | +| reflection.kt:21:9:21:50 | KFunction y4 | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:21:44:21:50 | new Function2(...) { ... } | file:///FunctionReference.class:0:0:0:0 | FunctionReference | true | +| reflection.kt:22:9:22:48 | KMutableProperty0 y5 | file:///KMutableProperty0.class:0:0:0:0 | KMutableProperty0 | reflection.kt:22:42:22:48 | new KMutableProperty0(...) { ... } | file:///KMutableProperty0.class:0:0:0:0 | KMutableProperty0 | true | +| reflection.kt:22:9:22:48 | KMutableProperty0 y5 | file:///KMutableProperty0.class:0:0:0:0 | KMutableProperty0 | reflection.kt:22:42:22:48 | new KMutableProperty0(...) { ... } | file:///PropertyReference.class:0:0:0:0 | PropertyReference | true | +| reflection.kt:24:9:24:91 | KProperty2 prop | file:///KProperty2.class:0:0:0:0 | KProperty2 | file:///KProperty2.class:0:0:0:0 | KProperty2 | file:///Function2.class:0:0:0:0 | Function2 | true | +| reflection.kt:24:9:24:91 | KProperty2 prop | file:///KProperty2.class:0:0:0:0 | KProperty2 | file:///KProperty2.class:0:0:0:0 | KProperty2 | file:///KProperty.class:0:0:0:0 | KProperty | true | +| reflection.kt:116:9:116:44 | KFunction x | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:116:40:116:44 | new Function1(...) { ... } | file:///Function1.class:0:0:0:0 | Function1 | true | +| reflection.kt:116:9:116:44 | KFunction x | file:///KFunction.class:0:0:0:0 | KFunction | reflection.kt:116:40:116:44 | new Function1(...) { ... } | file:///FunctionReference.class:0:0:0:0 | FunctionReference | true | invocation | reflection.kt:8:17:8:24 | getName(...) | file:///KCallable.class:0:0:0:0 | getName | | reflection.kt:11:23:11:33 | get(...) | file:///KProperty1.class:0:0:0:0 | get | @@ -263,30 +263,70 @@ modifiers | reflection.kt:162:25:162:45 | ...::... | reflection.kt:162:25:162:45 | invoke | override | | reflection.kt:162:25:162:45 | ...::... | reflection.kt:162:25:162:45 | invoke | public | compGenerated +| file:///AccessMode.class:0:0:0:0 | getEntries | Default property accessor | | file:///CharProgression.class:0:0:0:0 | forEach | Forwarder for a Kotlin class inheriting an interface default method | | file:///CharProgression.class:0:0:0:0 | spliterator | Forwarder for a Kotlin class inheriting an interface default method | | file:///CharRange.class:0:0:0:0 | forEach | Forwarder for a Kotlin class inheriting an interface default method | | file:///CharRange.class:0:0:0:0 | spliterator | Forwarder for a Kotlin class inheriting an interface default method | +| file:///Character$UnicodeScript.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ChronoField.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ChronoUnit.class:0:0:0:0 | getEntries | Default property accessor | | file:///Class2.class:0:0:0:0 | getValue | Default property accessor | | file:///Class2.class:0:0:0:0 | getValue | Default property accessor | +| file:///Collector$Characteristics.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ConstantPool$Tag.class:0:0:0:0 | getEntries | Default property accessor | +| file:///DateTimeFormatterBuilder$SettingsParser.class:0:0:0:0 | getEntries | Default property accessor | +| file:///DayOfWeek.class:0:0:0:0 | getEntries | Default property accessor | +| file:///DirectMethodHandleDesc$Kind.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ElementType.class:0:0:0:0 | getEntries | Default property accessor | | file:///EnumEntries.class:0:0:0:0 | forEach | Forwarder for a Kotlin class inheriting an interface default method | | file:///EnumEntries.class:0:0:0:0 | parallelStream | Forwarder for a Kotlin class inheriting an interface default method | | file:///EnumEntries.class:0:0:0:0 | spliterator | Forwarder for a Kotlin class inheriting an interface default method | | file:///EnumEntries.class:0:0:0:0 | stream | Forwarder for a Kotlin class inheriting an interface default method | | file:///EnumEntries.class:0:0:0:0 | toArray | Forwarder for a Kotlin class inheriting an interface default method | +| file:///FormatStyle.class:0:0:0:0 | getEntries | Default property accessor | | file:///IntProgression.class:0:0:0:0 | forEach | Forwarder for a Kotlin class inheriting an interface default method | | file:///IntProgression.class:0:0:0:0 | spliterator | Forwarder for a Kotlin class inheriting an interface default method | | file:///IntRange.class:0:0:0:0 | forEach | Forwarder for a Kotlin class inheriting an interface default method | | file:///IntRange.class:0:0:0:0 | spliterator | Forwarder for a Kotlin class inheriting an interface default method | +| file:///IsoEra.class:0:0:0:0 | getEntries | Default property accessor | | file:///KTypeProjection.class:0:0:0:0 | contravariant | Proxy static method for a @JvmStatic-annotated function or property | | file:///KTypeProjection.class:0:0:0:0 | copy$default | Forwarder for Kotlin calls that need default arguments filling in | | file:///KTypeProjection.class:0:0:0:0 | covariant | Proxy static method for a @JvmStatic-annotated function or property | | file:///KTypeProjection.class:0:0:0:0 | invariant | Proxy static method for a @JvmStatic-annotated function or property | +| file:///LambdaForm$BasicType.class:0:0:0:0 | getEntries | Default property accessor | +| file:///LambdaForm$Kind.class:0:0:0:0 | getEntries | Default property accessor | +| file:///LinkOption.class:0:0:0:0 | getEntries | Default property accessor | +| file:///Locale$Category.class:0:0:0:0 | getEntries | Default property accessor | +| file:///Locale$FilteringMode.class:0:0:0:0 | getEntries | Default property accessor | +| file:///Locale$IsoCountryCode.class:0:0:0:0 | getEntries | Default property accessor | | file:///LongProgression.class:0:0:0:0 | forEach | Forwarder for a Kotlin class inheriting an interface default method | | file:///LongProgression.class:0:0:0:0 | spliterator | Forwarder for a Kotlin class inheriting an interface default method | | file:///LongRange.class:0:0:0:0 | forEach | Forwarder for a Kotlin class inheriting an interface default method | | file:///LongRange.class:0:0:0:0 | spliterator | Forwarder for a Kotlin class inheriting an interface default method | +| file:///MethodHandleImpl$ArrayAccess.class:0:0:0:0 | getEntries | Default property accessor | +| file:///MethodHandleImpl$Intrinsic.class:0:0:0:0 | getEntries | Default property accessor | +| file:///MethodHandles$Lookup$ClassOption.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ModuleDescriptor$Exports$Modifier.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ModuleDescriptor$Modifier.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ModuleDescriptor$Opens$Modifier.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ModuleDescriptor$Requires$Modifier.class:0:0:0:0 | getEntries | Default property accessor | +| file:///Month.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ObjectInputFilter$Status.class:0:0:0:0 | getEntries | Default property accessor | +| file:///Proxy$Type.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ResolverStyle.class:0:0:0:0 | getEntries | Default property accessor | +| file:///RetentionPolicy.class:0:0:0:0 | getEntries | Default property accessor | +| file:///SignStyle.class:0:0:0:0 | getEntries | Default property accessor | +| file:///StackWalker$ExtendedOption.class:0:0:0:0 | getEntries | Default property accessor | +| file:///StackWalker$Option.class:0:0:0:0 | getEntries | Default property accessor | | file:///String.class:0:0:0:0 | isEmpty | Forwarder for a Kotlin class inheriting an interface default method | +| file:///TextStyle.class:0:0:0:0 | getEntries | Default property accessor | +| file:///Thread$State.class:0:0:0:0 | getEntries | Default property accessor | +| file:///TimeUnit.class:0:0:0:0 | getEntries | Default property accessor | +| file:///VarHandle$AccessMode.class:0:0:0:0 | getEntries | Default property accessor | +| file:///VarHandle$AccessType.class:0:0:0:0 | getEntries | Default property accessor | +| file:///Wrapper.class:0:0:0:0 | getEntries | Default property accessor | +| file:///ZoneOffsetTransitionRule$TimeDefinition.class:0:0:0:0 | getEntries | Default property accessor | | reflection.kt:7:49:7:54 | new Function2(...) { ... } | The class around a local function, a lambda, or a function reference | | reflection.kt:10:38:10:42 | new KProperty1(...) { ... } | The class around a local function, a lambda, or a function reference | | reflection.kt:14:38:14:44 | new Function1(...) { ... } | The class around a local function, a lambda, or a function reference | @@ -336,7 +376,7 @@ compGenerated | reflection.kt:153:21:153:44 | new Function1(...) { ... } | The class around a local function, a lambda, or a function reference | | reflection.kt:154:33:154:61 | | Declaring classes of adapter functions in Kotlin | | reflection.kt:154:33:154:61 | new Function2(...) { ... } | The class around a local function, a lambda, or a function reference | -| reflection.kt:157:1:157:49 | ConstructorOptional | Forwarder for Kotlin calls that need default arguments filling in | +| reflection.kt:157:26:157:45 | ConstructorOptional | Forwarder for Kotlin calls that need default arguments filling in | | reflection.kt:162:25:162:45 | | Declaring classes of adapter functions in Kotlin | | reflection.kt:162:25:162:45 | new Function1(...) { ... } | The class around a local function, a lambda, or a function reference | propertyReferenceOverrides diff --git a/java/ql/test/ext/TopJdkApis/TopJdkApisTest.expected b/java/ql/test/ext/TopJdkApis/TopJdkApisTest.expected index 456db638dab..f289ad7feb7 100644 --- a/java/ql/test/ext/TopJdkApis/TopJdkApisTest.expected +++ b/java/ql/test/ext/TopJdkApis/TopJdkApisTest.expected @@ -1,14 +1,7 @@ | java.lang.Runnable#run() | no manual model | -| java.lang.System#getProperty(String) | no manual model | -| java.lang.System#setProperty(String,String) | no manual model | -| java.text.Format#format(Object) | no manual model | -| java.text.MessageFormat#format(String,Object[]) | no manual model | | java.util.Comparator#comparing(Function) | no manual model | | java.util.function.BiConsumer#accept(Object,Object) | no manual model | | java.util.function.BiFunction#apply(Object,Object) | no manual model | | java.util.function.Consumer#accept(Object) | no manual model | | java.util.function.Function#apply(Object) | no manual model | | java.util.function.Supplier#get() | no manual model | -| java.util.stream.Collectors#joining(CharSequence) | no manual model | -| java.util.stream.Collectors#toMap(Function,Function) | no manual model | -| java.util.stream.Stream#collect(Collector) | no manual model | diff --git a/java/ql/test/ext/TopJdkApis/TopJdkApisTest.java b/java/ql/test/ext/TopJdkApis/TopJdkApisTest.java index 90797502198..20e897e9c08 100644 --- a/java/ql/test/ext/TopJdkApis/TopJdkApisTest.java +++ b/java/ql/test/ext/TopJdkApis/TopJdkApisTest.java @@ -37,6 +37,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; +import java.util.concurrent.locks.Lock; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/java/ql/test/library-tests/errorexpr/Test.java b/java/ql/test/library-tests/errorexpr/Test.java index cd18f0564ce..af314e5ced6 100644 --- a/java/ql/test/library-tests/errorexpr/Test.java +++ b/java/ql/test/library-tests/errorexpr/Test.java @@ -15,3 +15,4 @@ public class Test { // Diagnostic Matches: Erroneous node in tree: (ERROR) // Diagnostic Matches: In file Test.java:8:15 no end location for JCMethodInvocation : yield(x) // Diagnostic Matches: 1 errors during annotation processing +// Diagnostic Matches: Unknown or erroneous type for expression of kind ErrorExpr diff --git a/java/ql/test/library-tests/errortype/Diags.expected b/java/ql/test/library-tests/errortype/Diags.expected index 6dd6f1d91a1..c561f5caf8d 100644 --- a/java/ql/test/library-tests/errortype/Diags.expected +++ b/java/ql/test/library-tests/errortype/Diags.expected @@ -1,3 +1,6 @@ | Test.java:0:0:0:0 | 2 javac errors | +| Test.java:6:5:6:15 | Unknown or erroneous type for expression of kind TypeAccess | | Test.java:6:23:6:39 | Unexpected symbol for constructor: new NoSuchClass() | +| Test.java:6:23:6:39 | Unknown or erroneous type for expression of kind ClassInstanceCreation | +| Test.java:6:27:6:37 | Unknown or erroneous type for expression of kind TypeAccess | | file://:0:0:0:0 | 2 errors during annotation processing | diff --git a/java/ql/test/library-tests/errortype/ErrorTypes.expected b/java/ql/test/library-tests/errortype/ErrorTypes.expected index 9214eaa8336..da7029b2ffb 100644 --- a/java/ql/test/library-tests/errortype/ErrorTypes.expected +++ b/java/ql/test/library-tests/errortype/ErrorTypes.expected @@ -1 +1,4 @@ +| Test.java:6:5:6:15 | | +| Test.java:6:23:6:39 | | +| Test.java:6:27:6:37 | | | Test.java:7:12:7:14 | nsc | diff --git a/java/ql/test/library-tests/errortype/PrintAst.expected b/java/ql/test/library-tests/errortype/PrintAst.expected index d0780a453e9..9dab21189dc 100644 --- a/java/ql/test/library-tests/errortype/PrintAst.expected +++ b/java/ql/test/library-tests/errortype/PrintAst.expected @@ -7,9 +7,9 @@ Test.java: # 5| 3: [TypeAccess] NoSuchClass # 5| 5: [BlockStmt] { ... } # 6| 0: [LocalVariableDeclStmt] var ...; -# 6| 0: [TypeAccess] NoSuchClass +# 6| 0: [TypeAccess] # 6| 1: [LocalVariableDeclExpr] nsc # 6| 0: [ClassInstanceExpr] -# 6| -3: [TypeAccess] NoSuchClass +# 6| -3: [TypeAccess] # 7| 1: [ReturnStmt] return ... # 7| 0: [VarAccess] nsc diff --git a/java/ql/test/library-tests/errortype/Test.java b/java/ql/test/library-tests/errortype/Test.java index 25fc6591972..715c7af1afc 100644 --- a/java/ql/test/library-tests/errortype/Test.java +++ b/java/ql/test/library-tests/errortype/Test.java @@ -12,3 +12,5 @@ public class Test { // Diagnostic Matches: Unexpected symbol for constructor: new NoSuchClass() // Diagnostic Matches: 2 javac errors // Diagnostic Matches: 2 errors during annotation processing +// Diagnostic Matches: Unknown or erroneous type for expression of kind TypeAccess +// Diagnostic Matches: Unknown or erroneous type for expression of kind ClassInstanceCreation diff --git a/java/ql/test/library-tests/unknown-method-reference-lhs/Diags.expected b/java/ql/test/library-tests/unknown-method-reference-lhs/Diags.expected index c5f9f210946..c9489329f1c 100644 --- a/java/ql/test/library-tests/unknown-method-reference-lhs/Diags.expected +++ b/java/ql/test/library-tests/unknown-method-reference-lhs/Diags.expected @@ -1,2 +1,4 @@ | Test.java:0:0:0:0 | 1 javac errors | | Test.java:4:13:4:30 | Unable to extract method reference Unavailable.f()::g with no owner type | +| Test.java:4:13:4:30 | Unknown or erroneous type for expression of kind MemberReference | +| Test.java:4:13:4:30 | Unknown or erroneous type for expression of kind TypeAccess | diff --git a/java/ql/test/library-tests/unknown-method-reference-lhs/Test.java b/java/ql/test/library-tests/unknown-method-reference-lhs/Test.java index 0d3e46297d7..e2c48e14bd7 100644 --- a/java/ql/test/library-tests/unknown-method-reference-lhs/Test.java +++ b/java/ql/test/library-tests/unknown-method-reference-lhs/Test.java @@ -8,3 +8,5 @@ public class Test { // Diagnostic Matches: 1 javac errors // Diagnostic Matches: Unable to extract method reference Unavailable.f()::g with no owner type +// Diagnostic Matches: Unknown or erroneous type for expression of kind MemberReference +// Diagnostic Matches: Unknown or erroneous type for expression of kind TypeAccess diff --git a/java/ql/test/query-tests/Metrics/GeneratedVsManualCoverage/TopJdkApisTest/TopJdkApisTest.expected b/java/ql/test/query-tests/Metrics/GeneratedVsManualCoverage/TopJdkApisTest/TopJdkApisTest.expected index a092100b6a7..df21c086b2f 100644 --- a/java/ql/test/query-tests/Metrics/GeneratedVsManualCoverage/TopJdkApisTest/TopJdkApisTest.expected +++ b/java/ql/test/query-tests/Metrics/GeneratedVsManualCoverage/TopJdkApisTest/TopJdkApisTest.expected @@ -1,23 +1,23 @@ | java.awt | 0 | 0 | 2 | 1 | 3 | 0.6666666666666666 | 0.0 | 0.6666666666666666 | 0.0 | NaN | 0.3333333333333333 | -| java.io | 0 | 0 | 22 | 15 | 37 | 0.5945945945945946 | 0.0 | 0.5945945945945946 | 0.0 | NaN | 0.40540540540540543 | -| java.lang | 0 | 0 | 62 | 94 | 156 | 0.3974358974358974 | 0.0 | 0.3974358974358974 | 0.0 | NaN | 0.6025641025641025 | +| java.io | 0 | 0 | 21 | 15 | 36 | 0.5833333333333334 | 0.0 | 0.5833333333333334 | 0.0 | NaN | 0.4166666666666667 | +| java.lang | 0 | 0 | 57 | 88 | 145 | 0.3931034482758621 | 0.0 | 0.3931034482758621 | 0.0 | NaN | 0.6068965517241379 | | java.lang.invoke | 0 | 0 | 0 | 1 | 1 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | | java.lang.reflect | 0 | 0 | 0 | 4 | 4 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | -| java.math | 0 | 0 | 0 | 16 | 16 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | -| java.net | 0 | 0 | 5 | 0 | 5 | 1.0 | 0.0 | 1.0 | 0.0 | NaN | 0.0 | +| java.math | 0 | 0 | 0 | 15 | 15 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | +| java.net | 0 | 0 | 4 | 0 | 4 | 1.0 | 0.0 | 1.0 | 0.0 | NaN | 0.0 | | java.nio | 0 | 0 | 2 | 3 | 5 | 0.4 | 0.0 | 0.4 | 0.0 | NaN | 0.6 | | java.nio.charset | 0 | 0 | 0 | 1 | 1 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | -| java.nio.file | 0 | 0 | 7 | 1 | 8 | 0.875 | 0.0 | 0.875 | 0.0 | NaN | 0.125 | +| java.nio.file | 0 | 0 | 6 | 1 | 7 | 0.8571428571428571 | 0.0 | 0.8571428571428571 | 0.0 | NaN | 0.14285714285714285 | | java.sql | 0 | 0 | 1 | 15 | 16 | 0.0625 | 0.0 | 0.0625 | 0.0 | NaN | 0.9375 | | java.text | 0 | 0 | 0 | 5 | 5 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | | java.time | 0 | 0 | 0 | 17 | 17 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | | java.time.chrono | 0 | 0 | 0 | 1 | 1 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | | java.time.format | 0 | 0 | 0 | 2 | 2 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | -| java.util | 0 | 0 | 86 | 66 | 152 | 0.5657894736842105 | 0.0 | 0.5657894736842105 | 0.0 | NaN | 0.4342105263157895 | +| java.util | 0 | 0 | 86 | 64 | 150 | 0.5733333333333334 | 0.0 | 0.5733333333333334 | 0.0 | NaN | 0.4266666666666667 | | java.util.concurrent | 0 | 0 | 9 | 9 | 18 | 0.5 | 0.0 | 0.5 | 0.0 | NaN | 0.5 | | java.util.concurrent.atomic | 0 | 0 | 2 | 11 | 13 | 0.15384615384615385 | 0.0 | 0.15384615384615385 | 0.0 | NaN | 0.8461538461538461 | | java.util.concurrent.locks | 0 | 0 | 0 | 2 | 2 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | -| java.util.function | 0 | 0 | 0 | 6 | 6 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | +| java.util.function | 0 | 0 | 0 | 1 | 1 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 | | java.util.logging | 0 | 0 | 1 | 1 | 2 | 0.5 | 0.0 | 0.5 | 0.0 | NaN | 0.5 | | java.util.regex | 0 | 0 | 3 | 1 | 4 | 0.75 | 0.0 | 0.75 | 0.0 | NaN | 0.25 | | java.util.stream | 0 | 0 | 18 | 8 | 26 | 0.6923076923076923 | 0.0 | 0.6923076923076923 | 0.0 | NaN | 0.3076923076923077 | diff --git a/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageSharedPrefsTest.java b/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageSharedPrefsTest.java index bdd14b0112d..66991adfa64 100644 --- a/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageSharedPrefsTest.java +++ b/java/ql/test/query-tests/security/CWE-312/android/CleartextStorage/CleartextStorageSharedPrefsTest.java @@ -2,6 +2,7 @@ import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; +import android.widget.EditText; import androidx.security.crypto.MasterKey; import androidx.security.crypto.EncryptedSharedPreferences; import java.nio.charset.StandardCharsets; @@ -101,4 +102,11 @@ public class CleartextStorageSharedPrefsTest extends Activity { sharedPrefs.edit().putString("name", name).apply(); // Safe sharedPrefs.edit().putString("password", password).apply(); // $hasCleartextStorageSharedPrefs } + + public void testSetSharedPrefs7(Context context, EditText name, EditText password) { + SharedPreferences sharedPrefs = + context.getSharedPreferences("user_prefs", Context.MODE_PRIVATE); + sharedPrefs.edit().putString("name", name.getText().toString()).apply(); // Safe + sharedPrefs.edit().putString("password", password.getText().toString()).apply(); // $hasCleartextStorageSharedPrefs + } } diff --git a/java/ql/test/query-tests/security/CWE-532/Test.java b/java/ql/test/query-tests/security/CWE-532/Test.java index 2f985f0b7bc..f0530a00a83 100644 --- a/java/ql/test/query-tests/security/CWE-532/Test.java +++ b/java/ql/test/query-tests/security/CWE-532/Test.java @@ -19,4 +19,10 @@ class Test { logger.error("Auth failed for: " + username); // Safe } + void test4(String nullToken) { + Logger logger = null; + + logger.error("Auth failed for: " + nullToken); // Safe + } + } diff --git a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.expected b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.expected index 014d47f25dd..2654c4d94d6 100644 --- a/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.expected +++ b/java/ql/test/utils/modelgenerator/dataflow/CaptureSummaryModels.expected @@ -21,7 +21,6 @@ | p;Joiner;false;merge;(Joiner);;Argument[this];ReturnValue;value;df-generated | | p;Joiner;false;setEmptyValue;(CharSequence);;Argument[0];Argument[this];taint;df-generated | | p;Joiner;false;setEmptyValue;(CharSequence);;Argument[this];ReturnValue;value;df-generated | -| p;Joiner;false;toString;();;Argument[this];ReturnValue;taint;df-generated | | p;MultipleImpl2$IInterface;true;m;(Object);;Argument[0];ReturnValue;taint;df-generated | | p;MultipleImpls$Strat2;true;getValue;();;Argument[this];ReturnValue;taint;df-generated | | p;MultipleImpls$Strategy;true;doSomething;(String);;Argument[0];Argument[this];taint;df-generated | diff --git a/javascript/extractor/BUILD.bazel b/javascript/extractor/BUILD.bazel index bd7159eea11..6793287c22f 100644 --- a/javascript/extractor/BUILD.bazel +++ b/javascript/extractor/BUILD.bazel @@ -26,12 +26,6 @@ codeql_java_project( ], ) -pkg_files( - name = "javascript-extractor-resources", - srcs = glob(["resources/**"]), - strip_prefix = "resources", -) - codeql_fat_jar( name = "extractor-javascript", srcs = [ @@ -49,7 +43,6 @@ codeql_fat_jar( "@semmle_code//util-java7", "@semmle_code//util-java8", ], - files = [":javascript-extractor-resources"], main_class = "com.semmle.js.extractor.Main", ) diff --git a/javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll b/javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll index 192d2e6faa4..d88dab4d431 100644 --- a/javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll +++ b/javascript/ql/lib/semmle/javascript/dataflow/Nodes.qll @@ -1262,6 +1262,12 @@ module ClassNode { result.getFile() = f } + pragma[nomagic] + private DataFlow::NewNode getAnInstantiationInFile(string name, File f) { + result = AccessPath::getAReferenceTo(name).(DataFlow::LocalSourceNode).getAnInstantiation() and + result.getFile() = f + } + /** * Gets a reference to the function `func`, where there exists a read/write of the "prototype" property on that reference. */ @@ -1273,7 +1279,7 @@ module ClassNode { } /** - * A function definition with prototype manipulation as a `ClassNode` instance. + * A function definition, targeted by a `new`-call or with prototype manipulation, seen as a `ClassNode` instance. */ class FunctionStyleClass extends Range, DataFlow::ValueNode { override Function astNode; @@ -1284,9 +1290,12 @@ module ClassNode { ( exists(getAFunctionValueWithPrototype(function)) or - exists(string name | - this = AccessPath::getAnAssignmentTo(name) and + function = any(NewNode new).getCalleeNode().analyze().getAValue() + or + exists(string name | this = AccessPath::getAnAssignmentTo(name) | exists(getAPrototypeReferenceInFile(name, this.getFile())) + or + exists(getAnInstantiationInFile(name, this.getFile())) ) ) } diff --git a/javascript/ql/lib/semmle/javascript/dataflow/internal/CallGraphs.qll b/javascript/ql/lib/semmle/javascript/dataflow/internal/CallGraphs.qll index d5a5b29d1dc..7e55944038b 100644 --- a/javascript/ql/lib/semmle/javascript/dataflow/internal/CallGraphs.qll +++ b/javascript/ql/lib/semmle/javascript/dataflow/internal/CallGraphs.qll @@ -241,24 +241,25 @@ module CallGraph { ) } - private DataFlow::FunctionNode getAMethodOnPlainObject(DataFlow::SourceNode node) { + private DataFlow::FunctionNode getAMethodOnObject(DataFlow::SourceNode node) { ( - ( - node instanceof DataFlow::ObjectLiteralNode - or - node instanceof DataFlow::FunctionNode - ) and result = node.getAPropertySource() or result = node.(DataFlow::ObjectLiteralNode).getPropertyGetter(_) or result = node.(DataFlow::ObjectLiteralNode).getPropertySetter(_) ) and - not node.getTopLevel().isExterns() + not node.getTopLevel().isExterns() and + // Ignore writes to `this` inside a constructor, since this is already handled by instance method tracking + not exists(DataFlow::ClassNode cls | + node = cls.getConstructor().getReceiver() + or + node = cls.(DataFlow::ClassNode::FunctionStyleClass).getAPrototypeReference() + ) } private predicate shouldTrackObjectWithMethods(DataFlow::SourceNode node) { - exists(getAMethodOnPlainObject(node)) + exists(getAMethodOnObject(node)) } /** @@ -292,7 +293,7 @@ module CallGraph { predicate impliedReceiverStep(DataFlow::SourceNode pred, DataFlow::SourceNode succ) { exists(DataFlow::SourceNode host | pred = getAnAllocationSiteRef(host) and - succ = getAMethodOnPlainObject(host).getReceiver() + succ = getAMethodOnObject(host).getReceiver() ) } } diff --git a/javascript/ql/lib/semmle/javascript/dataflow/internal/StepSummary.qll b/javascript/ql/lib/semmle/javascript/dataflow/internal/StepSummary.qll index 6593df32615..435d4d82ed5 100644 --- a/javascript/ql/lib/semmle/javascript/dataflow/internal/StepSummary.qll +++ b/javascript/ql/lib/semmle/javascript/dataflow/internal/StepSummary.qll @@ -45,6 +45,8 @@ private module Cached { CopyStep(PropertyName prop) or LoadStoreStep(PropertyName fromProp, PropertyName toProp) { SharedTypeTrackingStep::loadStoreStep(_, _, fromProp, toProp) + or + summarizedLoadStoreStep(_, _, fromProp, toProp) } or WithoutPropStep(PropertySet props) { SharedTypeTrackingStep::withoutPropStep(_, _, props) } } @@ -69,6 +71,26 @@ private module Cached { AccessPath::isAssignedInUniqueFile(global) } + bindingset[fun] + pragma[inline_late] + private DataFlow::PropRead getStoredPropRead(DataFlow::FunctionNode fun, string storeProp) { + result = fun.getAReturn().getALocalSource().getAPropertySource(storeProp) + } + + /** + * Holds if `loadProp` of `param` is stored in the `storeProp` property of the return value of `fun`. + */ + pragma[nomagic] + private predicate summarizedLoadStoreStep( + DataFlow::ParameterNode param, DataFlow::FunctionNode fun, string loadProp, string storeProp + ) { + exists(DataFlow::PropRead read | + read = getStoredPropRead(fun, storeProp) and + read.getBase().getALocalSource() = param and + read.getPropertyName() = loadProp + ) + } + /** * INTERNAL: Use `TypeBackTracker.smallstep()` instead. */ @@ -156,6 +178,14 @@ private module Cached { exists(string prop | param.getAPropertyRead(prop).flowsTo(fun.getAReturn()) and summary = LoadStep(prop) + or + fun.getAReturn().getALocalSource().getAPropertySource(prop) = param and + summary = StoreStep(prop) + ) + or + exists(string loadProp, string storeProp | + summarizedLoadStoreStep(param, fun, loadProp, storeProp) and + summary = LoadStoreStep(loadProp, storeProp) ) ) and if param = fun.getAParameter() diff --git a/javascript/ql/lib/semmle/javascript/endpoints/EndpointNaming.qll b/javascript/ql/lib/semmle/javascript/endpoints/EndpointNaming.qll index eb2fa714a39..fdb2b7ab966 100644 --- a/javascript/ql/lib/semmle/javascript/endpoints/EndpointNaming.qll +++ b/javascript/ql/lib/semmle/javascript/endpoints/EndpointNaming.qll @@ -277,9 +277,16 @@ private predicate nameFromGlobal(DataFlow::Node node, string package, string nam (if node.getTopLevel().isExterns() then badness = -10 else badness = 10) } +/** Gets an API node whose value is exposed to client code. */ +private API::Node exposedNode() { + result = API::moduleExport(_) + or + result = exposedNode().getASuccessor() +} + /** Holds if an instance of `cls` can be exposed to client code. */ private predicate hasEscapingInstance(DataFlow::ClassNode cls) { - cls.getAnInstanceReference().flowsTo(any(API::Node n).asSink()) + cls.getAnInstanceReference().flowsTo(exposedNode().asSink()) } private predicate sourceNodeHasNameCandidate( diff --git a/javascript/ql/src/change-notes/2024-03-07-lift-cg-restriction.md b/javascript/ql/src/change-notes/2024-03-07-lift-cg-restriction.md new file mode 100644 index 00000000000..4d591aaf9a2 --- /dev/null +++ b/javascript/ql/src/change-notes/2024-03-07-lift-cg-restriction.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The call graph has been improved, leading to more alerts for data flow based queries. diff --git a/javascript/ql/test/library-tests/CallGraphs/FullTest/tests.expected b/javascript/ql/test/library-tests/CallGraphs/FullTest/tests.expected index 0750c30359b..4d2c78206a4 100644 --- a/javascript/ql/test/library-tests/CallGraphs/FullTest/tests.expected +++ b/javascript/ql/test/library-tests/CallGraphs/FullTest/tests.expected @@ -135,6 +135,7 @@ test_getAFunctionValue | tst.js:3:1:3:1 | h | tst.js:3:5:3:17 | function() {} | | tst.js:3:1:3:17 | h = function() {} | tst.js:3:5:3:17 | function() {} | | tst.js:3:5:3:17 | function() {} | tst.js:3:5:3:17 | function() {} | +| tst.js:4:1:4:1 | k | tst.js:2:9:2:21 | function() {} | | tst.js:4:1:4:5 | k = g | tst.js:2:9:2:21 | function() {} | | tst.js:4:5:4:5 | g | tst.js:2:9:2:21 | function() {} | | tst.js:6:1:6:1 | f | tst.js:1:1:1:15 | function f() {} | @@ -142,13 +143,23 @@ test_getAFunctionValue | tst.js:8:1:8:1 | h | tst.js:3:5:3:17 | function() {} | | tst.js:9:1:9:1 | k | tst.js:2:9:2:21 | function() {} | | tst.js:11:1:20:1 | functio ... \\tf();\\n} | tst.js:11:1:20:1 | functio ... \\tf();\\n} | +| tst.js:11:12:11:12 | m | tst.js:2:9:2:21 | function() {} | +| tst.js:11:12:11:12 | m | tst.js:2:9:2:21 | function() {} | +| tst.js:12:6:12:6 | m | tst.js:2:9:2:21 | function() {} | +| tst.js:12:6:12:27 | n | tst.js:2:9:2:21 | function() {} | | tst.js:12:6:12:27 | n | tst.js:12:15:12:27 | function() {} | +| tst.js:12:10:12:10 | m | tst.js:2:9:2:21 | function() {} | +| tst.js:12:10:12:10 | m | tst.js:2:9:2:21 | function() {} | +| tst.js:12:10:12:10 | m | tst.js:2:9:2:21 | function() {} | +| tst.js:12:10:12:27 | m \|\| function() {} | tst.js:2:9:2:21 | function() {} | | tst.js:12:10:12:27 | m \|\| function() {} | tst.js:12:15:12:27 | function() {} | | tst.js:12:15:12:27 | function() {} | tst.js:12:15:12:27 | function() {} | | tst.js:13:2:13:16 | function p() {} | tst.js:13:2:13:16 | function p() {} | | tst.js:13:11:13:11 | p | tst.js:13:2:13:16 | function p() {} | +| tst.js:14:2:14:2 | m | tst.js:2:9:2:21 | function() {} | | tst.js:15:2:15:2 | l | tst.js:11:1:20:1 | functio ... \\tf();\\n} | | tst.js:16:2:16:17 | arguments.callee | tst.js:11:1:20:1 | functio ... \\tf();\\n} | +| tst.js:17:2:17:2 | n | tst.js:2:9:2:21 | function() {} | | tst.js:17:2:17:2 | n | tst.js:12:15:12:27 | function() {} | | tst.js:18:2:18:2 | p | tst.js:13:2:13:16 | function p() {} | | tst.js:19:2:19:2 | f | tst.js:1:1:1:15 | function f() {} | @@ -463,8 +474,10 @@ test_getACallee | tst.js:7:1:7:3 | g() | tst.js:2:9:2:21 | function() {} | | tst.js:8:1:8:3 | h() | tst.js:3:5:3:17 | function() {} | | tst.js:9:1:9:3 | k() | tst.js:2:9:2:21 | function() {} | +| tst.js:14:2:14:4 | m() | tst.js:2:9:2:21 | function() {} | | tst.js:15:2:15:4 | l() | tst.js:11:1:20:1 | functio ... \\tf();\\n} | | tst.js:16:2:16:19 | arguments.callee() | tst.js:11:1:20:1 | functio ... \\tf();\\n} | +| tst.js:17:2:17:4 | n() | tst.js:2:9:2:21 | function() {} | | tst.js:17:2:17:4 | n() | tst.js:12:15:12:27 | function() {} | | tst.js:18:2:18:4 | p() | tst.js:13:2:13:16 | function p() {} | | tst.js:19:2:19:4 | f() | tst.js:1:1:1:15 | function f() {} | diff --git a/javascript/ql/test/library-tests/EndpointNaming/pack1/main.js b/javascript/ql/test/library-tests/EndpointNaming/pack1/main.js index cc550f0da15..53269fb0602 100644 --- a/javascript/ql/test/library-tests/EndpointNaming/pack1/main.js +++ b/javascript/ql/test/library-tests/EndpointNaming/pack1/main.js @@ -13,3 +13,9 @@ export function getEscapingInstance() { } // $ name=(pack1).getEscapingInstance export function publicFunction() {} // $ name=(pack1).publicFunction + +// Escapes into an upstream library, but is not exposed downstream +class InternalClass { + m() {} +} +require('foo').bar(new InternalClass()); diff --git a/javascript/ql/test/library-tests/TypeTracking/summarize.js b/javascript/ql/test/library-tests/TypeTracking/summarize.js new file mode 100644 index 00000000000..08f09e80c7c --- /dev/null +++ b/javascript/ql/test/library-tests/TypeTracking/summarize.js @@ -0,0 +1,41 @@ +import 'dummy'; + +function identity(x) { + return x; +} +function load(x) { + return x.loadProp; +} +function store(x) { + return { storeProp: x }; +} +function loadStore(x) { + return { storeProp: x.loadProp }; +} +function loadStore2(x) { + let mid = x.loadProp; + return { storeProp: mid }; +} + +identity({}); +load({}); +store({}); +loadStore({}); +loadStore2({}); + +const obj = {}; // name: obj + +let x = identity(obj); +x; // track: obj + +x = load({ loadProp: obj }); +x; // track: obj + +x = store(obj); +x.storeProp; // track: obj + +x = loadStore({ loadProp: obj }); +x.storeProp; // track: obj + +x = loadStore2({ loadProp: obj }); +x.storeProp; // track: obj diff --git a/misc/bazel/cmake/cmake.bzl b/misc/bazel/cmake/cmake.bzl index 7d50c7fcdee..d98a480c69c 100644 --- a/misc/bazel/cmake/cmake.bzl +++ b/misc/bazel/cmake/cmake.bzl @@ -70,10 +70,10 @@ def _cmake_aspect_impl(target, ctx): is_macos = "darwin" in ctx.var["TARGET_CPU"] - is_binary = ctx.rule.kind == "cc_binary" + is_binary = ctx.rule.kind in ("cc_binary", "cc_test") force_cxx_compilation = "force_cxx_compilation" in ctx.rule.attr.features attr = ctx.rule.attr - srcs = attr.srcs + getattr(attr, "hdrs", []) + getattr(attr, "textual_hdrs", []) + srcs = getattr(attr, "srcs", []) + getattr(attr, "hdrs", []) + getattr(attr, "textual_hdrs", []) srcs = [f for src in srcs for f in src.files.to_list()] inputs = [f for f in srcs if not f.is_source or f.path.startswith("external/")] by_kind = {} @@ -92,10 +92,10 @@ def _cmake_aspect_impl(target, ctx): cxx_compilation = force_cxx_compilation or any([not src.endswith(".c") for src in srcs]) copts = ctx.fragments.cpp.copts + (ctx.fragments.cpp.cxxopts if cxx_compilation else ctx.fragments.cpp.conlyopts) - copts += [ctx.expand_make_variables("copts", o, {}) for o in ctx.rule.attr.copts] + copts += [ctx.expand_make_variables("copts", o, {}) for o in getattr(ctx.rule.attr, "copts", [])] linkopts = ctx.fragments.cpp.linkopts - linkopts += [ctx.expand_make_variables("linkopts", o, {}) for o in ctx.rule.attr.linkopts] + linkopts += [ctx.expand_make_variables("linkopts", o, {}) for o in getattr(ctx.rule.attr, "linkopts", [])] compilation_ctx = target[CcInfo].compilation_context system_includes = _get_includes(compilation_ctx.system_includes) diff --git a/misc/bazel/cmake/setup.cmake b/misc/bazel/cmake/setup.cmake index 439bfbb59d7..739bdd861ab 100644 --- a/misc/bazel/cmake/setup.cmake +++ b/misc/bazel/cmake/setup.cmake @@ -9,26 +9,61 @@ if (NOT DEFINED BAZEL_BIN) set(BAZEL_BIN "bazelisk") endif () +if (NOT DEFINED CODEQL_BAZEL_WORKSPACE) + set(CODEQL_BAZEL_WORKSPACE "codeql") +endif () + macro(bazel) - execute_process(COMMAND ${BAZEL_BIN} ${ARGN} + execute_process(COMMAND ${BAZEL_BIN} ${BAZEL_STARTUP_OPTIONS} ${ARGN} COMMAND_ERROR_IS_FATAL ANY OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) endmacro() -bazel(info workspace OUTPUT_VARIABLE BAZEL_WORKSPACE) +macro(bazel_even_if_failing) + execute_process(COMMAND ${BAZEL_BIN} ${BAZEL_STARTUP_OPTIONS} ${ARGN} + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) +endmacro() +bazel(info workspace OUTPUT_VARIABLE BAZEL_WORKSPACE) bazel(info output_base OUTPUT_VARIABLE BAZEL_OUTPUT_BASE) set(BAZEL_EXEC_ROOT ${BAZEL_OUTPUT_BASE}/execroot/_main) +set(BAZEL_BUILD_OPTIONS --nocheck_visibility --keep_going) macro(include_generated BAZEL_TARGET) - bazel(build ${BAZEL_TARGET}) + bazel(build ${BAZEL_TARGET} ${BAZEL_BUILD_OPTIONS}) string(REPLACE "@" "/external/" BAZEL_TARGET_PATH ${BAZEL_TARGET}) string(REPLACE "//" "/" BAZEL_TARGET_PATH ${BAZEL_TARGET_PATH}) string(REPLACE ":" "/" BAZEL_TARGET_PATH ${BAZEL_TARGET_PATH}) include(${BAZEL_WORKSPACE}/bazel-bin${BAZEL_TARGET_PATH}.cmake) endmacro() +macro(generate_and_include) + file(REMOVE "${BAZEL_WORKSPACE}/.bazel-cmake/BUILD.bazel") + # use aquery to only get targets compatible with the current platform + bazel_even_if_failing(aquery "kind(\"cc_test|cc_binary\", ${ARGN})" ${BAZEL_BUILD_OPTIONS} --output=jsonproto OUTPUT_VARIABLE BAZEL_AQUERY_RESULT) + string(JSON BAZEL_JSON_TARGETS GET "${BAZEL_AQUERY_RESULT}" targets) + string(JSON LAST_IDX LENGTH "${BAZEL_JSON_TARGETS}") + math(EXPR LAST_IDX "${LAST_IDX} - 1") + foreach(IDX RANGE ${LAST_IDX}) + string(JSON CUR_BAZEL_TARGET GET "${BAZEL_JSON_TARGETS}" ${IDX} label) + string(APPEND BAZEL_TARGETS " '${CUR_BAZEL_TARGET}',\n") + endforeach () + file(WRITE "${BAZEL_WORKSPACE}/.bazel-cmake/BUILD.bazel" "\ +# this file was generated by cmake +load('@${CODEQL_BAZEL_WORKSPACE}//misc/bazel/cmake:cmake.bzl', 'generate_cmake')\n\ +\n\ +generate_cmake(\n\ + name = 'cmake',\n\ + testonly = True,\n\ + targets = [\n\ +${BAZEL_TARGETS}\ + ],\n\ +)\n") + include_generated(//.bazel-cmake:cmake) +endmacro() + if (CREATE_COMPILATION_DATABASE_LINK) file(CREATE_LINK ${PROJECT_BINARY_DIR}/compile_commands.json ${PROJECT_SOURCE_DIR}/compile_commands.json SYMBOLIC) endif () diff --git a/python/extractor/BUILD.bazel b/python/extractor/BUILD.bazel new file mode 100644 index 00000000000..4e93f539bde --- /dev/null +++ b/python/extractor/BUILD.bazel @@ -0,0 +1,49 @@ +load("//:dist.bzl", "pack_zip") + +py_binary( + name = "make-zips-py", + srcs = [ + "make_zips.py", + "python_tracer.py", + "unparse.py", + ], + data = [ + "LICENSE-PSF.md", + "__main__.py", + "imp.py", + ] + glob([ + "blib2to3/**", + "buildtools/**", + "lark/**", + "semmle/**", + ]), + # On @criemen's machine, without this, make-zips.py can't find its imports from + # python_tracer. The problem didn't show for some reason on Windows CI machines, though. + imports = ["."], + main = "make_zips.py", +) + +genrule( + name = "python3src", + outs = [ + "python3src.zip", + ], + cmd = "PYTHON_INSTALLER_OUTPUT=\"$(RULEDIR)\" $(location :make-zips-py)", + tools = [":make-zips-py"], +) + +pack_zip( + name = "extractor-python", + srcs = [ + "LICENSE-PSF.md", # because we distribute imp.py + "convert_setup.py", + "get_venv_lib.py", + "imp.py", + "index.py", + "python_tracer.py", + "setup.py", + ":python3src", + ] + glob(["data/**"]), + prefix = "tools", + visibility = ["//visibility:public"], +) diff --git a/python/extractor/LICENSE-PSF.md b/python/extractor/LICENSE-PSF.md new file mode 100644 index 00000000000..636654191e9 --- /dev/null +++ b/python/extractor/LICENSE-PSF.md @@ -0,0 +1,257 @@ +Parts of the Python extractor are derived from code in the CPython +distribution. Its license is reproduced below. + +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations, which became +Zope Corporation. In 2001, the Python Software Foundation (PSF, see +https://www.python.org/psf/) was formed, a non-profit organization +created specifically to own Python-related Intellectual Property. +Zope Corporation was a sponsoring member of the PSF. + +All Python releases are Open Source (see http://www.opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2 and above 2.1.1 2001-now PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Python Software Foundation; +All Rights Reserved" are retained in Python alone or in any derivative version +prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/python/extractor/Makefile b/python/extractor/Makefile new file mode 100644 index 00000000000..1f2c5d0752b --- /dev/null +++ b/python/extractor/Makefile @@ -0,0 +1,61 @@ +.PHONY: all +.DEFAULT: all +all: + +OS = $(shell uname) + +GIT_ROOT = $(shell git rev-parse --show-toplevel) + +TOKENIZER_FILE = semmle/python/parser/tokenizer.py +TOKENIZER_DEPS = tokenizer_generator/state_transition.txt tokenizer_generator/tokenizer_template.py +# Must use the same Python version as on jenkins, since output differs per version. +# However, output is unstable on Python 3.5 (which jenkins uses) +TOKENIZER_CMD = python3 -m tokenizer_generator.gen_state_machine $(TOKENIZER_DEPS) + +.PHONY: tokenizer +tokenizer: $(TOKENIZER_FILE) + +$(TOKENIZER_FILE): $(TOKENIZER_DEPS) + $(TOKENIZER_CMD) > $@ + + +MASTER_FILE = semmle/python/master.py + +DBSCHEME_FILE = $(GIT_ROOT)/ql/python/ql/lib/semmlecode.python.dbscheme + +.PHONY: dbscheme +dbscheme: $(MASTER_FILE) + python3 -m semmle.dbscheme_gen $(DBSCHEME_FILE) + +AST_GENERATED_DIR = $(GIT_ROOT)/ql/python/ql/lib/semmle/python/ +AST_GENERATED_FILE = $(AST_GENERATED_DIR)AstGenerated.qll + +.PHONY: ast +ast: $(MASTER_FILE) + python3 -m semmle.query_gen $(AST_GENERATED_DIR) + $(GIT_ROOT)/target/intree/codeql/codeql query format --in-place $(AST_GENERATED_FILE) + +################################################################################ +# Tests +################################################################################ + +.PHONY: test-all +test-all: test-3 + +.PHONY: test-3 +test-3: pytest-3 test-tokenizer + +.PHONY: test-tokenizer +test-tokenizer: SHELL:=/bin/bash +test-tokenizer: + @echo Not running test-tokenizer as jenkins uses Python 3.5 + # TODO: Enable again once we run Python > 3.5 on Jenkins + # diff -u $(TOKENIZER_FILE) <($(TOKENIZER_CMD)) + +.PHONY: pytest-3 +pytest-3: + poetry run pytest + +.PHONY: pytest-3-deprecation-error +pytest-3-deprecation-error: + PYTHONWARNINGS='error::DeprecationWarning' poetry run pytest diff --git a/python/extractor/README.md b/python/extractor/README.md new file mode 100644 index 00000000000..7bb4e78dad9 --- /dev/null +++ b/python/extractor/README.md @@ -0,0 +1,211 @@ +# Python extraction + +Python extraction happens in two phases: + +1. [Setup](#1-Setup-Phase) + - determine which version to analyze the project as + - creating virtual environment (only LGTM.com) + - determine python import path + - invoking the actual python extractor +2. [The actual Python extractor](#2-The-actual-Python-extractor) + - walks files and folders, and performs extraction + +The rule for `pack_zip('python-extractor')` in `build` defines what files are included in a distribution and in the CodeQL CLI. After building the CodeQL CLI locally, the files are in `target/intree/codeql/python/tools`. + +## Local development + +This project uses + +- [poetry](https://python-poetry.org/) as the package manager +- [tox](https://tox.wiki/en) together with [pytest](https://docs.pytest.org/en/) to run tests across multiple versions + +You can install both tools with [`pipx`](https://pypa.github.io/pipx/), like so + +```sh +pipx install poetry +pipx inject poetry virtualenv-pyenv # to allow poetry to find python versions from pyenv +pipx install tox +pipx inject tox virtualenv-pyenv # to allow tox to find python versions from pyenv +``` + +Once you've installed poetry, you can do this: + +```sh +# install required packages +$ poetry install + +# to run tests against python version used by poetry +$ poetry run pytest + +# or +$ poetry shell # activate poetry environment +$ pytest # so now pytest is available + +# to run tests against all support python versions +$ tox + +# to run against specific version (Python 3.9) +$ tox -e py39 +``` + +To install multiple python versions locally, we recommend you use [`pyenv`](https://github.com/pyenv/pyenv) + +_(don't try to use `tox run-parallel`, our tests are not set up for this to work 😅)_ + +### Zip files + +Currently we distribute our code in an obfuscated way, by including the code in the subfolders in a zip file that is imported at run-time (by the python files in the top level of this directory). + +The one exception is the `data` directory (used for stubs) which is included directly in the `tools` folder. + +The zip creation is managed by [`make_zips.py`](./make_zips.py), and currently we make one zipfile for Python 2 (which is byte compiled), and one for Python 3 (which has source files, but they are stripped of comments and docstrings). + +### A note about Python versions + +We expect to be able to run our tools (setup phase) with either Python 2 or Python 3, and after determining which version to analyze the code as, we run the extractor with that version. So we must support: + +- Setup tools run using Python 2: + - Extracting code using Python 2 + - Extracting code using Python 3 +- Setup tools run using Python 3: + - Extracting code using Python 2 + - Extracting code using Python 3 + +# 1. Setup phase + +**For extraction with the CodeQL CLI locally** (`codeql database create --language python`) + +- Runs [`language-packs/python/tools/autobuild.sh`](/language-packs/python/tools/autobuild.sh) and this script runs [`index.py`](./index.py) + +### Overview of control flow for [`setup.py`](./setup.py) + +The representation of the code in the figure below has in some cases been altered slightly, but is accurate as of 2020-03-20. + +
    + + + +![python extraction overiew](./docs/extractor-python-setup.svg) + +
    + +### Overview of control flow for [`index.py`](./index.py) + +The representation of the code in the figure below has in some cases been altered slightly, but is accurate as of 2020-03-20. + +
    + + + +![python extraction overiew](./docs/extractor-python-index.svg) + +
    + +# 2. The actual Python extractor + +## Overview + +The entrypoint of the actual Python extractor is [`python_tracer.py`](./python_tracer.py). + +The usual way to invoke the extractor is to pass a directory of Python files to the launcher. The extractor extracts code from those files and their dependencies, producing TRAP files, and copies the source code to a source archive. +Alternatively, for highly distributed systems, it is possible to pass a single file to the per extractor invocation; invoking it many times. +The extractor recognizes Python source code files and Thrift IDL files. +Other types of file can be added to the database, by passing the `--filter` option to the extractor, but they'll be stored as text blobs. + +The extractor expects the `CODEQL_EXTRACTOR_PYTHON_TRAP_DIR` and +`CODEQL_EXTRACTOR_PYTHON_SOURCE_ARCHIVE_DIR` environment variables to be set (which determine, +respectively, where it puts TRAP files and the source archive). However, the location of the TRAP +folder and source archive can be specified on the command-line instead. + +The extractor outputs the following information as TRAP files: + +- A file containing per-interpreter data, such as version information and the contents of the `builtins` module. +- One file per extractor process containing the file and folder information for all processed files and all enclosing folders. +- Per Python or template file: + - The AST. + - Scopes and variables, attached to the AST. + - The control-flow graph, selectively split when repeated tests are seen. + +## How it works + +### Overall Architecture + +Once started, the extractor consists of three sets of communicating processes. + +1. The front-end: A single process which walks the files and folders specified on the command-line, enqueuing those files plus any additional modules requested by the extractor processes. +2. The extractors: Typically one process per CPU. Takes file and module descriptions from the queue, producing TRAP files and copies of the source. +3. The logging process. To avoid message interleaving and avoid deadlock, all log messages are queued up to be sent to a logging process which formats and prints the messages. + +The front-end -> worker message queue has quite limited capacity (2 per process) to ensure rapid shutdown when interrupted. The capacity of the worker -> front-end message queue must be at least twice that size to prevent deadlock, and is in fact much larger to prevent workers being blocked on the queue. + +Experiments suggest that the extractor scales almost linearly to at least 20 processes (on linux). + +The component that walks the file system is known as the "traverser" and is designed to be pluggable. +Its interface is simply an iterable of file descriptions. See `semmle/traverser.py`. + +### Lifetime of the extractor + +1. Parse the command-line options and read environment variables. +2. The main process creates: + 1. the logging queue and process, + 2. the message queues, and + 3. the extractor processes. +3. The main process, now the front-end, starts traversing the file system, by iterating over the traverser. +4. Until it has exhausted the traverser, it concurrently: + - Adds module descriptions from the traverser to the message queue + - Reads the reply queue and for any `"IMPORT"` message received adds the module to the message queue if that module has not been seen before. +5. Until a `"SUCCESS"` message has been received on the reply queue for each module description that has been enqueued: + - Reads the reply queue and adds those module descriptions it hasn't seen before to the message queue. +6. Add one `None` message to the message queue for each extractor. +7. Wait for all extractors to halt. +8. Stop the logging process and halt. + +### Lifetime of an extractor process + +1. Read messages from the message queue until a `None` message is received. For each message: + 1. Parse the file or module. + 2. Send an "IMPORT" message for all modules imported by the module being processed. + 3. Write out TRAP and source archive for the file. + 4. Send a "SUCCESS" message for the file. +2. Emit file and folder TRAP for all files and modules processed. +3. Halt. + +### TRAP caching + +An important consequence of local extraction is that, except for the file path information, the contents of the TRAP file are functionally determined by: + +- The contents of the file. +- Some command-line options (those determining name hashing and CFG splitting). +- The extractor version. + +Caching of TRAP files can reduce the time to extract a large project with few changes by an order of magnitude. + +### Extraction + +Each extractor process runs a loop which extracts files or modules from the queue, one at a time. +Each file or module description is passed, in turn, to one of the extractor objects which will either extract it or reject it for the next extractor object to try. +Currently the default extractors are: + +- Builtin module extractor: Extracts built-in modules like `sys`. +- Thrift extractor: Extracts Thrift IDL files. +- Python extractor: Extracts Python source code files. +- Package extractor: Extracts minimal information for package folders. +- General file extractor: Any files rejected by the above passes are added to the database as a text blob. + +#### Python extraction + +The Python extractor is the most interesting of the processes mentioned above. +The Python extractor takes a path to a Python file. It emits TRAP to the specified folder and a UTF-8 encoded version of the source to the source archive. +It consists of the following passes: + +1. Ingestion and decoding: Read the contents of the file as bytes, determine its encoding, and decode it to text. +2. Tokenizing: Tokenize the source text, including whitespace and comment tokens. +3. Parsing: Create a concrete parse tree from the list of tokens. +4. Rewriting: Rewrite the concrete parse tree to an AST, annotated with scope, variable information, and locations. +5. Write out lexical and AST information as TRAP. +6. Generate and emit TRAP for control-flow graphs. This is done one scope at a time to minimize memory consumption. +7. Emit ancillary information, like TRAP for comments. + +#### Template file extraction + +Most Python template languages work by either translating the template into Python or by fairly closely mimicking the behavior of Python. This means that we can extract template files by converting them to the same AST used internally by the Python extractor and then passing that AST to the backend of the Python extractor to determine imports, and generate TRAP files including control-flow information. diff --git a/python/extractor/__main__.py b/python/extractor/__main__.py new file mode 100644 index 00000000000..d059d0f99bd --- /dev/null +++ b/python/extractor/__main__.py @@ -0,0 +1,4 @@ +import semmle.populator + +if __name__ == "__main__": + semmle.populator.main() diff --git a/python/extractor/blib2to3/Grammar.txt b/python/extractor/blib2to3/Grammar.txt new file mode 100644 index 00000000000..8d16d27b60b --- /dev/null +++ b/python/extractor/blib2to3/Grammar.txt @@ -0,0 +1,224 @@ +# Grammar for 2to3. This grammar supports Python 2.x and 3.x. + +# NOTE WELL: You should also follow all the steps listed at +# https://devguide.python.org/grammar/ + +# Start symbols for the grammar: +# file_input is a module or sequence of commands read from an input file; +# single_input is a single interactive statement; +# eval_input is the input for the eval() and input() functions. +# NB: compound_stmt in single_input is followed by extra NEWLINE! +file_input: (NEWLINE | stmt)* ENDMARKER +single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE +eval_input: testlist NEWLINE* ENDMARKER + +decorator: '@' namedexpr_test NEWLINE +decorators: decorator+ +decorated: decorators (classdef | funcdef | async_funcdef) +async_funcdef: 'async' funcdef +funcdef: 'def' NAME parameters ['->' test] ':' suite +parameters: '(' [typedargslist] ')' + +# The following definition for typedarglist is equivalent to this set of rules: +# +# arguments = argument (',' argument)* +# argument = tfpdef ['=' test] +# kwargs = '**' tname [','] +# args = '*' [tname] +# kwonly_kwargs = (',' argument)* [',' [kwargs]] +# args_kwonly_kwargs = args kwonly_kwargs | kwargs +# poskeyword_args_kwonly_kwargs = arguments [',' [args_kwonly_kwargs]] +# typedargslist_no_posonly = poskeyword_args_kwonly_kwargs | args_kwonly_kwargs +# typedarglist = arguments ',' '/' [',' [typedargslist_no_posonly]])|(typedargslist_no_posonly)" +# +# It needs to be fully expanded to allow our LL(1) parser to work on it. + +typedargslist: tfpdef ['=' test] (',' tfpdef ['=' test])* ',' '/' [ + ',' [((tfpdef ['=' test] ',')* ('*' [tname] (',' tname ['=' test])* + [',' ['**' tname [',']]] | '**' tname [',']) + | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])] + ] | ((tfpdef ['=' test] ',')* ('*' [tname] (',' tname ['=' test])* + [',' ['**' tname [',']]] | '**' tname [',']) + | tfpdef ['=' test] (',' tfpdef ['=' test])* [',']) + +tname: NAME [':' test] +tfpdef: tname | '(' tfplist ')' +tfplist: tfpdef (',' tfpdef)* [','] + +# The following definition for varargslist is equivalent to this set of rules: +# +# arguments = argument (',' argument )* +# argument = vfpdef ['=' test] +# kwargs = '**' vname [','] +# args = '*' [vname] +# kwonly_kwargs = (',' argument )* [',' [kwargs]] +# args_kwonly_kwargs = args kwonly_kwargs | kwargs +# poskeyword_args_kwonly_kwargs = arguments [',' [args_kwonly_kwargs]] +# vararglist_no_posonly = poskeyword_args_kwonly_kwargs | args_kwonly_kwargs +# varargslist = arguments ',' '/' [','[(vararglist_no_posonly)]] | (vararglist_no_posonly) +# +# It needs to be fully expanded to allow our LL(1) parser to work on it. + +varargslist: vfpdef ['=' test ](',' vfpdef ['=' test])* ',' '/' [',' [ + ((vfpdef ['=' test] ',')* ('*' [vname] (',' vname ['=' test])* + [',' ['**' vname [',']]] | '**' vname [',']) + | vfpdef ['=' test] (',' vfpdef ['=' test])* [',']) + ]] | ((vfpdef ['=' test] ',')* + ('*' [vname] (',' vname ['=' test])* [',' ['**' vname [',']]]| '**' vname [',']) + | vfpdef ['=' test] (',' vfpdef ['=' test])* [',']) + +vname: NAME +vfpdef: vname | '(' vfplist ')' +vfplist: vfpdef (',' vfpdef)* [','] + +stmt: simple_stmt | compound_stmt +simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE +small_stmt: (expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | + import_stmt | global_stmt | exec_stmt | assert_stmt) +expr_stmt: testlist_star_expr (annassign | augassign (yield_expr|testlist) | + ('=' (yield_expr|testlist_star_expr))*) +annassign: ':' test ['=' test] +testlist_star_expr: (test|star_expr) (',' (test|star_expr))* [','] +augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' | + '<<=' | '>>=' | '**=' | '//=') +# For normal and annotated assignments, additional restrictions enforced by the interpreter +print_stmt: 'print' ( [ test (',' test)* [','] ] | + '>>' test [ (',' test)+ [','] ] ) +del_stmt: 'del' del_list +del_list: (expr|star_expr) (',' (expr|star_expr))* [','] +pass_stmt: 'pass' +flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt | yield_stmt +break_stmt: 'break' +continue_stmt: 'continue' +return_stmt: 'return' [testlist_star_expr] +yield_stmt: yield_expr +raise_stmt: 'raise' [test ['from' test | ',' test [',' test]]] +import_stmt: import_name | import_from +import_name: 'import' dotted_as_names +import_from: ('from' ('.'* dotted_name | '.'+) + 'import' ('*' | '(' import_as_names ')' | import_as_names)) +import_as_name: NAME ['as' NAME] +dotted_as_name: dotted_name ['as' NAME] +import_as_names: import_as_name (',' import_as_name)* [','] +dotted_as_names: dotted_as_name (',' dotted_as_name)* +dotted_name: NAME ('.' NAME)* +global_stmt: ('global' | 'nonlocal') NAME (',' NAME)* +exec_stmt: 'exec' expr ['in' test [',' test]] +assert_stmt: 'assert' test [',' test] + +compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated | async_stmt +async_stmt: 'async' (funcdef | with_stmt | for_stmt) +if_stmt: 'if' namedexpr_test ':' suite ('elif' namedexpr_test ':' suite)* ['else' ':' suite] +while_stmt: 'while' namedexpr_test ':' suite ['else' ':' suite] +for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite] +try_stmt: ('try' ':' suite + ((except_clause ':' suite)+ + ['else' ':' suite] + ['finally' ':' suite] | + 'finally' ':' suite)) +with_stmt: 'with' with_item (',' with_item)* ':' suite +with_item: test ['as' expr] +with_var: 'as' expr +# NB compile.c makes sure that the default except clause is last +except_clause: 'except' [test [(',' | 'as') test]] +suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT + +# Backward compatibility cruft to support: +# [ x for x in lambda: True, lambda: False if x() ] +# even while also allowing: +# lambda x: 5 if x else 2 +# (But not a mix of the two) +testlist_safe: old_test [(',' old_test)+ [',']] +old_test: or_test | old_lambdef +old_lambdef: 'lambda' [varargslist] ':' old_test + +namedexpr_test: test [':=' test] +test: or_test ['if' or_test 'else' test] | lambdef +or_test: and_test ('or' and_test)* +and_test: not_test ('and' not_test)* +not_test: 'not' not_test | comparison +comparison: expr (comp_op expr)* +comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is'|'is' 'not' +star_expr: '*' expr +expr: xor_expr ('|' xor_expr)* +xor_expr: and_expr ('^' and_expr)* +and_expr: shift_expr ('&' shift_expr)* +shift_expr: arith_expr (('<<'|'>>') arith_expr)* +arith_expr: term (('+'|'-') term)* +term: factor (('*'|'@'|'/'|'%'|'//') factor)* +factor: ('+'|'-'|'~') factor | power +power: ['await'] atom trailer* ['**' factor] +atom: ('(' [yield_expr|testlist_gexp] ')' | + '[' [listmaker] ']' | + '{' [dictsetmaker] '}' | + '`' testlist1 '`' | + NAME | NUMBER | string | '.' '.' '.' | special_operation + ) + +string: (fstring_part | STRING)+ +fstring_part: FSTRING_START testlist ['='] [ CONVERSION ] [ format_specifier ] (FSTRING_MID testlist ['='] [ CONVERSION ] [ format_specifier ] )* FSTRING_END +format_specifier: ':' (FSTRING_SPEC test [ CONVERSION ] [ format_specifier ] )* FSTRING_SPEC + +listmaker: (namedexpr_test|star_expr) ( old_comp_for | (',' (namedexpr_test|star_expr))* [','] ) +testlist_gexp: (namedexpr_test|star_expr) ( old_comp_for | (',' (namedexpr_test|star_expr))* [','] ) +lambdef: 'lambda' [varargslist] ':' test +trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME +subscriptlist: subscript (',' subscript)* [','] +subscript: test | [test] ':' [test] [ ':' [test] ] +exprlist: (expr|star_expr) (',' (expr|star_expr))* [','] +testlist: test (',' test)* [','] +dictsetmaker: ( ((test ':' test | '**' expr) + (comp_for | (',' (test ':' test | '**' expr))* [','])) | + ((test | star_expr) + (comp_for | (',' (test | star_expr))* [','])) ) + +classdef: 'class' NAME ['(' [arglist] ')'] ':' suite + +arglist: argument (',' argument)* [','] + +# "test '=' test" is really "keyword '=' test", but we have no such token. +# These need to be in a single rule to avoid grammar that is ambiguous +# to our LL(1) parser. Even though 'test' includes '*expr' in star_expr, +# we explicitly match '*' here, too, to give it proper precedence. +# Illegal combinations and orderings are blocked in ast.c: +# multiple (test comp_for) arguments are blocked; keyword unpackings +# that precede iterable unpackings are blocked; etc. +argument: ( test [comp_for] | + test ':=' test | + test '=' test | + '**' test | + '*' test ) + +comp_iter: comp_for | comp_if +comp_for: ['async'] 'for' exprlist 'in' or_test [comp_iter] +comp_if: 'if' old_test [comp_iter] + +# As noted above, testlist_safe extends the syntax allowed in list +# comprehensions and generators. We can't use it indiscriminately in all +# derivations using a comp_for-like pattern because the testlist_safe derivation +# contains comma which clashes with trailing comma in arglist. +# +# This was an issue because the parser would not follow the correct derivation +# when parsing syntactically valid Python code. Since testlist_safe was created +# specifically to handle list comprehensions and generator expressions enclosed +# with parentheses, it's safe to only use it in those. That avoids the issue; we +# can parse code like set(x for x in [],). +# +# The syntax supported by this set of rules is not a valid Python 3 syntax, +# hence the prefix "old". +# +# See https://bugs.python.org/issue27494 +old_comp_iter: old_comp_for | old_comp_if +old_comp_for: ['async'] 'for' exprlist 'in' testlist_safe [old_comp_iter] +old_comp_if: 'if' old_test [old_comp_iter] + +testlist1: test (',' test)* + +# not used in grammar, but may appear in "node" passed from Parser to Compiler +encoding_decl: NAME + +yield_expr: 'yield' [yield_arg] +yield_arg: 'from' test | testlist_star_expr + +special_operation: DOLLARNAME '(' [testlist] ')' + diff --git a/python/extractor/blib2to3/LICENSE b/python/extractor/blib2to3/LICENSE new file mode 100644 index 00000000000..1afbedba92b --- /dev/null +++ b/python/extractor/blib2to3/LICENSE @@ -0,0 +1,254 @@ +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations, which became +Zope Corporation. In 2001, the Python Software Foundation (PSF, see +https://www.python.org/psf/) was formed, a non-profit organization +created specifically to own Python-related Intellectual Property. +Zope Corporation was a sponsoring member of the PSF. + +All Python releases are Open Source (see http://www.opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2 and above 2.1.1 2001-now PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Python Software Foundation; All +Rights Reserved" are retained in Python alone or in any derivative version +prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/python/extractor/blib2to3/README b/python/extractor/blib2to3/README new file mode 100644 index 00000000000..e20750d35f0 --- /dev/null +++ b/python/extractor/blib2to3/README @@ -0,0 +1,20 @@ +This code is derived from the black code formatter, +which itself was derived from the lib2to3 package in the Python standard library. + +We (Semmle) have modified this further to ease conversion to our multi-version AST. + +Original README from black: + +A subset of lib2to3 taken from Python 3.7.0b2. +Commit hash: 9c17e3a1987004b8bcfbe423953aad84493a7984 + +Reasons for forking: +- consistent handling of f-strings for users of Python < 3.6.2 +- backport of BPO-33064 that fixes parsing files with trailing commas after + *args and **kwargs +- backport of GH-6143 that restores the ability to reformat legacy usage of + `async` +- support all types of string literals +- better ability to debug (better reprs) +- INDENT and DEDENT don't hold whitespace and comment prefixes +- ability to Cythonize diff --git a/python/extractor/blib2to3/README.md b/python/extractor/blib2to3/README.md new file mode 100644 index 00000000000..cf01b731108 --- /dev/null +++ b/python/extractor/blib2to3/README.md @@ -0,0 +1,67 @@ +# Building Concrete Parse Trees using the Python grammar + +This grammar is mostly reusing existing code: + +- `lib2to3` is a part of the `2to3` utility (included in the CPython + distribution) aimed at automatically converting Python 2 code to equivalent + Python 3 code. Because it needs to be idempotent when applied to Python 3 + code, this grammar must be capable of parsing both Python 2 and 3 (with + certain restrictions). +- `blib2to3` is part of the `black` formatter for Python. It adds a few + extensions on top of `lib2to3`. +- Finally, we extend this grammar even further, in order to support things like + f-strings even when the extractor is run using Python 2. (In this respect, + `blib2to3` "cheats" by requiring Python 3 if you want to parse Python 3 code. + We do not have this luxury.) + +The grammar of Python is described in `Grammar.txt` in the style of an EBNF: + +- Rules have the form `nonterminal_name: production` (where traditionally, one + would use `::=` instead of `:`) +- Productions can contain + - Literal strings, enclosed in single quotes. + - Alternation, indicated by an infix `|`. + - Repetition, indicated by a postfixed `*` for "zero or more" and `+` for + "one or more". + - Optional parts, indicated by these being surrounded by square brackets. + - Parentheseses to indicate grouping, and to allow productions to span several lines. + +>Note: You may wonder: How is `Grammar.txt` parsed? The answer to this is that +>it is used to parse itself. In particular, it uses the same tokenizer as that +>for Python, and hence every symbol appearing in the grammar must be a valid +>Python token. This is why rules use `:` instead of `::=`. This also explains +>why parentheses must be used when a production spans multiple lines, as the +>presence of parentheses affects the tokenization. + +The concrete parse tree built based on these rules has a simple form: Each node +has a `name` attribute, equal to that of the corresponding nonterminal, and a +`children` attribute, which contains a list of all of the children of the node. +These come directly from the production on the right hand side of the rule for +the given nonterminal. Thus, something like + +``` +testlist: test (',' test)* [','] +``` + +will result in a node with name `testlist`, and its attribute `children` will be +a list where the first element is a `test` node, the second (if any) is a node +for `','`, etc. Note in particular that _every_ part of the production is +included in the children, even parts that are just static tokens. + +The leaves of the concrete parse tree (corresponding to the terminals of the +grammar) will have an associated `value` attribute. This contains the underlying +string for this token (in particular, for a `NAME` token, its value will be the +underlying identifier). + +## From Concrete to Abstract + +To turn the concrete parse tree into an asbstract parse tree, we _walk_ the tree +using the visitor pattern. Thus, for every nonterminal (e.g. `testlist`) we have +a method (in this case `visit_testlist`) that takes care of visiting nodes of +this type in the concrete parse tree. In doing so, we build up the abstract +parse tree, eliding any nodes that are not relevant in terms of the abstract +syntax. + +>TO DO: +>- Why we parse everything four times (`async` et al.) + diff --git a/python/extractor/blib2to3/__init__.py b/python/extractor/blib2to3/__init__.py new file mode 100644 index 00000000000..ea30561d839 --- /dev/null +++ b/python/extractor/blib2to3/__init__.py @@ -0,0 +1 @@ +#empty diff --git a/python/extractor/blib2to3/pgen2/__init__.py b/python/extractor/blib2to3/pgen2/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/blib2to3/pgen2/driver.py b/python/extractor/blib2to3/pgen2/driver.py new file mode 100644 index 00000000000..f7c9fb281d5 --- /dev/null +++ b/python/extractor/blib2to3/pgen2/driver.py @@ -0,0 +1,37 @@ +# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +# Modifications: +# Copyright 2006 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Parser driver. + +This provides a high-level interface to parse a file into a syntax tree. + +""" + +__author__ = "Guido van Rossum " + +__all__ = ["load_grammar"] + +# Python imports +import os +import logging +import pkgutil +import sys + +# Pgen imports +from . import grammar, pgen + +if sys.version < "3": + from cStringIO import StringIO +else: + from io import StringIO + +def load_grammar(package, grammar): + """Load the grammar (maybe from a pickle).""" + data = pkgutil.get_data(package, grammar) + stream = StringIO(data.decode("utf8")) + g = pgen.generate_grammar(grammar, stream) + return g diff --git a/python/extractor/blib2to3/pgen2/grammar.py b/python/extractor/blib2to3/pgen2/grammar.py new file mode 100644 index 00000000000..6a4d575ac2c --- /dev/null +++ b/python/extractor/blib2to3/pgen2/grammar.py @@ -0,0 +1,188 @@ +# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""This module defines the data structures used to represent a grammar. + +These are a bit arcane because they are derived from the data +structures used by Python's 'pgen' parser generator. + +There's also a table here mapping operators to their names in the +token module; the Python tokenize module reports all operators as the +fallback token code OP, but the parser needs the actual token code. + +""" + +# Python imports +import pickle + +# Local imports +from . import token + + +class Grammar(object): + """Pgen parsing tables conversion class. + + Once initialized, this class supplies the grammar tables for the + parsing engine implemented by parse.py. The parsing engine + accesses the instance variables directly. The class here does not + provide initialization of the tables; several subclasses exist to + do this (see the conv and pgen modules). + + The load() method reads the tables from a pickle file, which is + much faster than the other ways offered by subclasses. The pickle + file is written by calling dump() (after loading the grammar + tables using a subclass). The report() method prints a readable + representation of the tables to stdout, for debugging. + + The instance variables are as follows: + + symbol2number -- a dict mapping symbol names to numbers. Symbol + numbers are always 256 or higher, to distinguish + them from token numbers, which are between 0 and + 255 (inclusive). + + number2symbol -- a dict mapping numbers to symbol names; + these two are each other's inverse. + + states -- a list of DFAs, where each DFA is a list of + states, each state is a list of arcs, and each + arc is a (i, j) pair where i is a label and j is + a state number. The DFA number is the index into + this list. (This name is slightly confusing.) + Final states are represented by a special arc of + the form (0, j) where j is its own state number. + + dfas -- a dict mapping symbol numbers to (DFA, first) + pairs, where DFA is an item from the states list + above, and first is a set of tokens that can + begin this grammar rule (represented by a dict + whose values are always 1). + + labels -- a list of (x, y) pairs where x is either a token + number or a symbol number, and y is either None + or a string; the strings are keywords. The label + number is the index in this list; label numbers + are used to mark state transitions (arcs) in the + DFAs. + + start -- the number of the grammar's start symbol. + + keywords -- a dict mapping keyword strings to arc labels. + + tokens -- a dict mapping token numbers to arc labels. + + """ + + def __init__(self): + self.symbol2number = {} + self.number2symbol = {} + self.states = [] + self.dfas = {} + self.labels = [(0, "EMPTY")] + self.keywords = {} + self.tokens = {} + self.symbol2label = {} + self.start = 256 + + def dump(self, filename): + """Dump the grammar tables to a pickle file.""" + with open(filename, "wb") as f: + pickle.dump(self.__dict__, f, pickle.HIGHEST_PROTOCOL) + + def load(self, filename): + """Load the grammar tables from a pickle file.""" + with open(filename, "rb") as f: + d = pickle.load(f) + self.__dict__.update(d) + + def loads(self, pkl): + """Load the grammar tables from a pickle bytes object.""" + self.__dict__.update(pickle.loads(pkl)) + + def copy(self): + """ + Copy the grammar. + """ + new = self.__class__() + for dict_attr in ("symbol2number", "number2symbol", "dfas", "keywords", + "tokens", "symbol2label"): + setattr(new, dict_attr, getattr(self, dict_attr).copy()) + new.labels = self.labels[:] + new.states = self.states[:] + new.start = self.start + return new + + def report(self): + """Dump the grammar tables to standard output, for debugging.""" + from pprint import pprint + print("s2n") + pprint(self.symbol2number) + print("n2s") + pprint(self.number2symbol) + print("states") + pprint(self.states) + print("dfas") + pprint(self.dfas) + print("labels") + pprint(self.labels) + print("start", self.start) + + +# Map from operator to number (since tokenize doesn't do this) + +opmap_raw = """ +( LPAR +) RPAR +[ LSQB +] RSQB +: COLON +, COMMA +; SEMI ++ PLUS +- MINUS +* STAR +/ SLASH +| VBAR +& AMPER +< LESS +> GREATER += EQUAL +. DOT +% PERCENT +` BACKQUOTE +{ LBRACE +} RBRACE +@ AT +@= ATEQUAL +== EQEQUAL +!= NOTEQUAL +<> NOTEQUAL +<= LESSEQUAL +>= GREATEREQUAL +~ TILDE +^ CIRCUMFLEX +<< LEFTSHIFT +>> RIGHTSHIFT +** DOUBLESTAR ++= PLUSEQUAL +-= MINEQUAL +*= STAREQUAL +/= SLASHEQUAL +%= PERCENTEQUAL +&= AMPEREQUAL +|= VBAREQUAL +^= CIRCUMFLEXEQUAL +<<= LEFTSHIFTEQUAL +>>= RIGHTSHIFTEQUAL +**= DOUBLESTAREQUAL +// DOUBLESLASH +//= DOUBLESLASHEQUAL +-> RARROW +:= COLONEQUAL +""" + +opmap = {} +for line in opmap_raw.splitlines(): + if line: + op, name = line.split() + opmap[op] = getattr(token, name) diff --git a/python/extractor/blib2to3/pgen2/parse.py b/python/extractor/blib2to3/pgen2/parse.py new file mode 100644 index 00000000000..6bebdbba7e5 --- /dev/null +++ b/python/extractor/blib2to3/pgen2/parse.py @@ -0,0 +1,201 @@ +# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Parser engine for the grammar tables generated by pgen. + +The grammar table must be loaded first. + +See Parser/parser.c in the Python distribution for additional info on +how this parsing engine works. + +""" + +# Local imports +from . import token + +class ParseError(Exception): + """Exception to signal the parser is stuck.""" + + def __init__(self, msg, type, value, context): + Exception.__init__(self, "%s: type=%r, value=%r, context=%r" % + (msg, type, value, context)) + self.msg = msg + self.type = type + self.value = value + self.context = context + +class Parser(object): + """Parser engine. + + The proper usage sequence is: + + p = Parser(grammar, [converter]) # create instance + p.setup([start]) # prepare for parsing + : + if p.addtoken(...): # parse a token; may raise ParseError + break + root = p.rootnode # root of abstract syntax tree + + A Parser instance may be reused by calling setup() repeatedly. + + A Parser instance contains state pertaining to the current token + sequence, and should not be used concurrently by different threads + to parse separate token sequences. + + See driver.py for how to get input tokens by tokenizing a file or + string. + + Parsing is complete when addtoken() returns True; the root of the + abstract syntax tree can then be retrieved from the rootnode + instance variable. When a syntax error occurs, addtoken() raises + the ParseError exception. There is no error recovery; the parser + cannot be used after a syntax error was reported (but it can be + reinitialized by calling setup()). + + """ + + def __init__(self, grammar, convert=None): + """Constructor. + + The grammar argument is a grammar.Grammar instance; see the + grammar module for more information. + + The parser is not ready yet for parsing; you must call the + setup() method to get it started. + + The optional convert argument is a function mapping concrete + syntax tree nodes to abstract syntax tree nodes. If not + given, no conversion is done and the syntax tree produced is + the concrete syntax tree. If given, it must be a function of + two arguments, the first being the grammar (a grammar.Grammar + instance), and the second being the concrete syntax tree node + to be converted. The syntax tree is converted from the bottom + up. + + A concrete syntax tree node is a (type, value, context, nodes) + tuple, where type is the node type (a token or symbol number), + value is None for symbols and a string for tokens, context is + None or an opaque value used for error reporting (typically a + (lineno, offset) pair), and nodes is a list of children for + symbols, and None for tokens. + + An abstract syntax tree node may be anything; this is entirely + up to the converter function. + + """ + self.grammar = grammar + self.convert = convert or (lambda grammar, node: node) + + def setup(self, start=None): + """Prepare for parsing. + + This *must* be called before starting to parse. + + The optional argument is an alternative start symbol; it + defaults to the grammar's start symbol. + + You can use a Parser instance to parse any number of programs; + each time you call setup() the parser is reset to an initial + state determined by the (implicit or explicit) start symbol. + + """ + if start is None: + start = self.grammar.start + # Each stack entry is a tuple: (dfa, state, node). + # A node is a tuple: (type, value, context, children), + # where children is a list of nodes or None, and context may be None. + newnode = (start, None, None, []) + stackentry = (self.grammar.dfas[start], 0, newnode) + self.stack = [stackentry] + self.rootnode = None + self.used_names = set() # Aliased to self.rootnode.used_names in pop() + + def addtoken(self, type, value, context): + """Add a token; return True iff this is the end of the program.""" + # Map from token to label + ilabel = self.classify(type, value, context) + # Loop until the token is shifted; may raise exceptions + while True: + dfa, state, node = self.stack[-1] + states, first = dfa + arcs = states[state] + # Look for a state with this label + for i, newstate in arcs: + t, v = self.grammar.labels[i] + if ilabel == i: + # Look it up in the list of labels + assert t < 256 + # Shift a token; we're done with it + self.shift(type, value, newstate, context) + # Pop while we are in an accept-only state + state = newstate + while states[state] == [(0, state)]: + self.pop() + if not self.stack: + # Done parsing! + return True + dfa, state, node = self.stack[-1] + states, first = dfa + # Done with this token + return False + elif t >= 256: + # See if it's a symbol and if we're in its first set + itsdfa = self.grammar.dfas[t] + itsstates, itsfirst = itsdfa + if ilabel in itsfirst: + # Push a symbol + self.push(t, self.grammar.dfas[t], newstate, context) + break # To continue the outer while loop + else: + if (0, state) in arcs: + # An accepting state, pop it and try something else + self.pop() + if not self.stack: + # Done parsing, but another token is input + raise ParseError("too much input", + type, value, context) + else: + # No success finding a transition + raise ParseError("bad input", type, value, context) + + def classify(self, type, value, context): + """Turn a token into a label. (Internal)""" + if type == token.NAME: + # Keep a listing of all used names + self.used_names.add(value) + # Check for reserved words + ilabel = self.grammar.keywords.get(value) + if ilabel is not None: + return ilabel + ilabel = self.grammar.tokens.get(type) + if ilabel is None: + raise ParseError("bad token", type, value, context) + return ilabel + + def shift(self, type, value, newstate, context): + """Shift a token. (Internal)""" + dfa, state, node = self.stack[-1] + newnode = (type, value, context, None) + newnode = self.convert(self.grammar, newnode) + if newnode is not None: + node[-1].append(newnode) + self.stack[-1] = (dfa, newstate, node) + + def push(self, type, newdfa, newstate, context): + """Push a nonterminal. (Internal)""" + dfa, state, node = self.stack[-1] + newnode = (type, None, context, []) + self.stack[-1] = (dfa, newstate, node) + self.stack.append((newdfa, 0, newnode)) + + def pop(self): + """Pop a nonterminal. (Internal)""" + popdfa, popstate, popnode = self.stack.pop() + newnode = self.convert(self.grammar, popnode) + if newnode is not None: + if self.stack: + dfa, state, node = self.stack[-1] + node[-1].append(newnode) + else: + self.rootnode = newnode + self.rootnode.used_names = self.used_names diff --git a/python/extractor/blib2to3/pgen2/pgen.py b/python/extractor/blib2to3/pgen2/pgen.py new file mode 100644 index 00000000000..297e7330cff --- /dev/null +++ b/python/extractor/blib2to3/pgen2/pgen.py @@ -0,0 +1,386 @@ +# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +# Pgen imports +from . import grammar, token, tokenize + +class PgenGrammar(grammar.Grammar): + pass + +class ParserGenerator(object): + + def __init__(self, filename, stream=None): + close_stream = None + if stream is None: + stream = open(filename) + close_stream = stream.close + self.filename = filename + self.stream = stream + self.generator = tokenize.generate_tokens(stream.readline) + self.gettoken() # Initialize lookahead + self.dfas, self.startsymbol = self.parse() + if close_stream is not None: + close_stream() + self.first = {} # map from symbol name to set of tokens + self.addfirstsets() + + def make_grammar(self): + c = PgenGrammar() + names = list(self.dfas.keys()) + names.sort() + names.remove(self.startsymbol) + names.insert(0, self.startsymbol) + for name in names: + i = 256 + len(c.symbol2number) + c.symbol2number[name] = i + c.number2symbol[i] = name + for name in names: + dfa = self.dfas[name] + states = [] + for state in dfa: + arcs = [] + for label, next in sorted(state.arcs.items()): + arcs.append((self.make_label(c, label), dfa.index(next))) + if state.isfinal: + arcs.append((0, dfa.index(state))) + states.append(arcs) + c.states.append(states) + c.dfas[c.symbol2number[name]] = (states, self.make_first(c, name)) + c.start = c.symbol2number[self.startsymbol] + return c + + def make_first(self, c, name): + rawfirst = self.first[name] + first = {} + for label in sorted(rawfirst): + ilabel = self.make_label(c, label) + ##assert ilabel not in first # XXX failed on <> ... != + first[ilabel] = 1 + return first + + def make_label(self, c, label): + # XXX Maybe this should be a method on a subclass of converter? + ilabel = len(c.labels) + if label[0].isalpha(): + # Either a symbol name or a named token + if label in c.symbol2number: + # A symbol name (a non-terminal) + if label in c.symbol2label: + return c.symbol2label[label] + else: + c.labels.append((c.symbol2number[label], None)) + c.symbol2label[label] = ilabel + return ilabel + else: + # A named token (NAME, NUMBER, STRING) + itoken = getattr(token, label, None) + assert isinstance(itoken, int), label + assert itoken in token.tok_name, label + if itoken in c.tokens: + return c.tokens[itoken] + else: + c.labels.append((itoken, None)) + c.tokens[itoken] = ilabel + return ilabel + else: + # Either a keyword or an operator + assert label[0] in ('"', "'"), label + value = eval(label) + if value[0].isalpha(): + # A keyword + if value in c.keywords: + return c.keywords[value] + else: + c.labels.append((token.NAME, value)) + c.keywords[value] = ilabel + return ilabel + else: + # An operator (any non-numeric token) + itoken = grammar.opmap[value] # Fails if unknown token + if itoken in c.tokens: + return c.tokens[itoken] + else: + c.labels.append((itoken, None)) + c.tokens[itoken] = ilabel + return ilabel + + def addfirstsets(self): + names = list(self.dfas.keys()) + names.sort() + for name in names: + if name not in self.first: + self.calcfirst(name) + #print name, self.first[name].keys() + + def calcfirst(self, name): + dfa = self.dfas[name] + self.first[name] = None # dummy to detect left recursion + state = dfa[0] + totalset = {} + overlapcheck = {} + for label, next in state.arcs.items(): + if label in self.dfas: + if label in self.first: + fset = self.first[label] + if fset is None: + raise ValueError("recursion for rule %r" % name) + else: + self.calcfirst(label) + fset = self.first[label] + totalset.update(fset) + overlapcheck[label] = fset + else: + totalset[label] = 1 + overlapcheck[label] = {label: 1} + inverse = {} + for label, itsfirst in overlapcheck.items(): + for symbol in itsfirst: + if symbol in inverse: + raise ValueError("rule %s is ambiguous; %s is in the" + " first sets of %s as well as %s" % + (name, symbol, label, inverse[symbol])) + inverse[symbol] = label + self.first[name] = totalset + + def parse(self): + dfas = {} + startsymbol = None + # MSTART: (NEWLINE | RULE)* ENDMARKER + while self.type != token.ENDMARKER: + while self.type == token.NEWLINE: + self.gettoken() + # RULE: NAME ':' RHS NEWLINE + name = self.expect(token.NAME) + self.expect(token.OP, ":") + a, z = self.parse_rhs() + self.expect(token.NEWLINE) + #self.dump_nfa(name, a, z) + dfa = self.make_dfa(a, z) + #self.dump_dfa(name, dfa) + oldlen = len(dfa) + self.simplify_dfa(dfa) + newlen = len(dfa) + dfas[name] = dfa + #print name, oldlen, newlen + if startsymbol is None: + startsymbol = name + return dfas, startsymbol + + def make_dfa(self, start, finish): + # To turn an NFA into a DFA, we define the states of the DFA + # to correspond to *sets* of states of the NFA. Then do some + # state reduction. Let's represent sets as dicts with 1 for + # values. + assert isinstance(start, NFAState) + assert isinstance(finish, NFAState) + def closure(state): + base = {} + addclosure(state, base) + return base + def addclosure(state, base): + assert isinstance(state, NFAState) + if state in base: + return + base[state] = 1 + for label, next in state.arcs: + if label is None: + addclosure(next, base) + states = [DFAState(closure(start), finish)] + for state in states: # NB states grows while we're iterating + arcs = {} + for nfastate in state.nfaset: + for label, next in nfastate.arcs: + if label is not None: + addclosure(next, arcs.setdefault(label, {})) + for label, nfaset in sorted(arcs.items()): + for st in states: + if st.nfaset == nfaset: + break + else: + st = DFAState(nfaset, finish) + states.append(st) + state.addarc(st, label) + return states # List of DFAState instances; first one is start + + def dump_nfa(self, name, start, finish): + print("Dump of NFA for", name) + todo = [start] + for i, state in enumerate(todo): + print(" State", i, state is finish and "(final)" or "") + for label, next in state.arcs: + if next in todo: + j = todo.index(next) + else: + j = len(todo) + todo.append(next) + if label is None: + print(" -> %d" % j) + else: + print(" %s -> %d" % (label, j)) + + def dump_dfa(self, name, dfa): + print("Dump of DFA for", name) + for i, state in enumerate(dfa): + print(" State", i, state.isfinal and "(final)" or "") + for label, next in sorted(state.arcs.items()): + print(" %s -> %d" % (label, dfa.index(next))) + + def simplify_dfa(self, dfa): + # This is not theoretically optimal, but works well enough. + # Algorithm: repeatedly look for two states that have the same + # set of arcs (same labels pointing to the same nodes) and + # unify them, until things stop changing. + + # dfa is a list of DFAState instances + changes = True + while changes: + changes = False + for i, state_i in enumerate(dfa): + for j in range(i+1, len(dfa)): + state_j = dfa[j] + if state_i == state_j: + #print " unify", i, j + del dfa[j] + for state in dfa: + state.unifystate(state_j, state_i) + changes = True + break + + def parse_rhs(self): + # RHS: ALT ('|' ALT)* + a, z = self.parse_alt() + if self.value != "|": + return a, z + else: + aa = NFAState() + zz = NFAState() + aa.addarc(a) + z.addarc(zz) + while self.value == "|": + self.gettoken() + a, z = self.parse_alt() + aa.addarc(a) + z.addarc(zz) + return aa, zz + + def parse_alt(self): + # ALT: ITEM+ + a, b = self.parse_item() + while (self.value in ("(", "[") or + self.type in (token.NAME, token.STRING)): + c, d = self.parse_item() + b.addarc(c) + b = d + return a, b + + def parse_item(self): + # ITEM: '[' RHS ']' | ATOM ['+' | '*'] + if self.value == "[": + self.gettoken() + a, z = self.parse_rhs() + self.expect(token.OP, "]") + a.addarc(z) + return a, z + else: + a, z = self.parse_atom() + value = self.value + if value not in ("+", "*"): + return a, z + self.gettoken() + z.addarc(a) + if value == "+": + return a, z + else: + return a, a + + def parse_atom(self): + # ATOM: '(' RHS ')' | NAME | STRING + if self.value == "(": + self.gettoken() + a, z = self.parse_rhs() + self.expect(token.OP, ")") + return a, z + elif self.type in (token.NAME, token.STRING): + a = NFAState() + z = NFAState() + a.addarc(z, self.value) + self.gettoken() + return a, z + else: + self.raise_error("expected (...) or NAME or STRING, got %s/%s", + self.type, self.value) + + def expect(self, type, value=None): + if self.type != type or (value is not None and self.value != value): + self.raise_error("expected %s/%s, got %s/%s", + type, value, self.type, self.value) + value = self.value + self.gettoken() + return value + + def gettoken(self): + tup = next(self.generator) + while tup[0] in (tokenize.COMMENT, tokenize.NL): + tup = next(self.generator) + self.type, self.value, self.begin, self.end, self.line = tup + #print token.tok_name[self.type], repr(self.value) + + def raise_error(self, msg, *args): + if args: + try: + msg = msg % args + except: + msg = " ".join([msg] + list(map(str, args))) + raise SyntaxError(msg, (self.filename, self.end[0], + self.end[1], self.line)) + +class NFAState(object): + + def __init__(self): + self.arcs = [] # list of (label, NFAState) pairs + + def addarc(self, next, label=None): + assert label is None or isinstance(label, str) + assert isinstance(next, NFAState) + self.arcs.append((label, next)) + +class DFAState(object): + + def __init__(self, nfaset, final): + assert isinstance(nfaset, dict) + assert isinstance(next(iter(nfaset)), NFAState) + assert isinstance(final, NFAState) + self.nfaset = nfaset + self.isfinal = final in nfaset + self.arcs = {} # map from label to DFAState + + def addarc(self, next, label): + assert isinstance(label, str) + assert label not in self.arcs + assert isinstance(next, DFAState) + self.arcs[label] = next + + def unifystate(self, old, new): + for label, next in self.arcs.items(): + if next is old: + self.arcs[label] = new + + def __eq__(self, other): + # Equality test -- ignore the nfaset instance variable + assert isinstance(other, DFAState) + if self.isfinal != other.isfinal: + return False + # Can't just return self.arcs == other.arcs, because that + # would invoke this method recursively, with cycles... + if len(self.arcs) != len(other.arcs): + return False + for label, next in self.arcs.items(): + if next is not other.arcs.get(label): + return False + return True + + __hash__ = None # For Py3 compatibility. + +def generate_grammar(filename, stream=None): + p = ParserGenerator(filename, stream) + return p.make_grammar() diff --git a/python/extractor/blib2to3/pgen2/token.py b/python/extractor/blib2to3/pgen2/token.py new file mode 100644 index 00000000000..73d10e758c2 --- /dev/null +++ b/python/extractor/blib2to3/pgen2/token.py @@ -0,0 +1,91 @@ +"""Token constants (from "token.h").""" + +# Taken from Python (r53757) and modified to include some tokens +# originally monkeypatched in by pgen2.tokenize + +#--start constants-- +ENDMARKER = 0 +NAME = 1 +NUMBER = 2 +STRING = 3 +NEWLINE = 4 +INDENT = 5 +DEDENT = 6 +LPAR = 7 +RPAR = 8 +LSQB = 9 +RSQB = 10 +COLON = 11 +COMMA = 12 +SEMI = 13 +PLUS = 14 +MINUS = 15 +STAR = 16 +SLASH = 17 +VBAR = 18 +AMPER = 19 +LESS = 20 +GREATER = 21 +EQUAL = 22 +DOT = 23 +PERCENT = 24 +BACKQUOTE = 25 +LBRACE = 26 +RBRACE = 27 +EQEQUAL = 28 +NOTEQUAL = 29 +LESSEQUAL = 30 +GREATEREQUAL = 31 +TILDE = 32 +CIRCUMFLEX = 33 +LEFTSHIFT = 34 +RIGHTSHIFT = 35 +DOUBLESTAR = 36 +PLUSEQUAL = 37 +MINEQUAL = 38 +STAREQUAL = 39 +SLASHEQUAL = 40 +PERCENTEQUAL = 41 +AMPEREQUAL = 42 +VBAREQUAL = 43 +CIRCUMFLEXEQUAL = 44 +LEFTSHIFTEQUAL = 45 +RIGHTSHIFTEQUAL = 46 +DOUBLESTAREQUAL = 47 +DOUBLESLASH = 48 +DOUBLESLASHEQUAL = 49 +AT = 50 +ATEQUAL = 51 +OP = 52 +COMMENT = 53 +NL = 54 +RARROW = 55 +AWAIT = 56 +ASYNC = 57 +DOLLARNAME = 58 +FSTRING_START = 59 +FSTRING_MID = 60 +FSTRING_END = 61 +CONVERSION = 62 +COLONEQUAL = 63 +FSTRING_SPEC = 64 +ILLEGALINDENT = 65 +ERRORTOKEN = 66 +N_TOKENS = 67 +NT_OFFSET = 256 +#--end constants-- + +tok_name = {} +for _name, _value in list(globals().items()): + if type(_value) is type(0): + tok_name[_value] = _name + + +def ISTERMINAL(x): + return x < NT_OFFSET + +def ISNONTERMINAL(x): + return x >= NT_OFFSET + +def ISEOF(x): + return x == ENDMARKER diff --git a/python/extractor/blib2to3/pgen2/tokenize.py b/python/extractor/blib2to3/pgen2/tokenize.py new file mode 100644 index 00000000000..0d72e69ea13 --- /dev/null +++ b/python/extractor/blib2to3/pgen2/tokenize.py @@ -0,0 +1,509 @@ +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation. +# All rights reserved. + +"""Tokenization help for Python programs. + +generate_tokens(readline) is a generator that breaks a stream of +text into Python tokens. It accepts a readline-like method which is called +repeatedly to get the next line of input (or "" for EOF). It generates +5-tuples with these members: + + the token type (see token.py) + the token (a string) + the starting (row, column) indices of the token (a 2-tuple of ints) + the ending (row, column) indices of the token (a 2-tuple of ints) + the original line (string) + +It is designed to match the working of the Python tokenizer exactly, except +that it produces COMMENT tokens for comments and gives type OP for all +operators + +Older entry points + tokenize_loop(readline, tokeneater) + tokenize(readline, tokeneater=printtoken) +are the same, except instead of generating tokens, tokeneater is a callback +function to which the 5 fields described above are passed as 5 arguments, +each time a new token is found.""" + +__author__ = 'Ka-Ping Yee ' +__credits__ = \ + 'GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip Montanaro' + +import re +from codecs import BOM_UTF8, lookup +from blib2to3.pgen2.token import * +import sys + +from . import token +__all__ = [x for x in dir(token) if x[0] != '_'] + ["tokenize", + "generate_tokens", "untokenize"] +del token + +try: + bytes +except NameError: + # Support bytes type in Python <= 2.5, so 2to3 turns itself into + # valid Python 3 code. + bytes = str + +def group(*choices): return '(' + '|'.join(choices) + ')' +def any(*choices): return group(*choices) + '*' +def maybe(*choices): return group(*choices) + '?' +def _combinations(*l): + return set( + x + y for x in l for y in l + ("",) if x.lower() != y.lower() + ) + +Whitespace = r'[ \f\t]*' +Comment = r'#[^\r\n]*' +Ignore = Whitespace + any(r'\\\r?\n' + Whitespace) + maybe(Comment) +Name = r'\w+' # this is invalid but it's fine because Name comes after Number in all groups +DollarName = r'\$\w+' + +Binnumber = r'0[bB]_?[01]+(?:_[01]+)*' +Hexnumber = r'0[xX]_?[\da-fA-F]+(?:_[\da-fA-F]+)*[lL]?' +Octnumber = r'0[oO]?_?[0-7]+(?:_[0-7]+)*[lL]?' +Decnumber = group(r'[1-9]\d*(?:_\d+)*[lL]?', '0[lL]?') +Intnumber = group(Binnumber, Hexnumber, Octnumber, Decnumber) +Exponent = r'[eE][-+]?\d+(?:_\d+)*' +Pointfloat = group(r'\d+(?:_\d+)*\.(?:\d+(?:_\d+)*)?', r'\.\d+(?:_\d+)*') + maybe(Exponent) +Expfloat = r'\d+(?:_\d+)*' + Exponent +Floatnumber = group(Pointfloat, Expfloat) +Imagnumber = group(r'\d+(?:_\d+)*[jJ]', Floatnumber + r'[jJ]') +Number = group(Imagnumber, Floatnumber, Intnumber) + +# Tail end of ' string. +Single = r"[^'\\]*(?:\\.[^'\\]*)*'" +# Tail end of " string. +Double = r'[^"\\]*(?:\\.[^"\\]*)*"' +# Tail end of ''' string. +Single3 = r"[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*'''" +# Tail end of """ string. +Double3 = r'[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""' +_litprefix = r"(?:[uUrRbBfF]|[rR][fFbB]|[fFbBuU][rR])?" +Triple = group(_litprefix + "'''", _litprefix + '"""') +# Single-line ' or " string. +String = group(_litprefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*'", + _litprefix + r'"[^\n"\\]*(?:\\.[^\n"\\]*)*"') + +# Because of leftmost-then-longest match semantics, be sure to put the +# longest operators first (e.g., if = came before ==, == would get +# recognized as two instances of =). +Operator = group(r"\*\*=?", r">>=?", r"<<=?", r"<>", r"!=", + r"//=?", r"->", + r"[+\-*/%&@|^=<>]=?", + r"~") + +Bracket = '[][(){}]' +Special = group(r'\r?\n', r'[:;.,`@]') +Funny = group(Operator, Bracket, Special) + +PlainToken = group(Number, Funny, String, Name, DollarName) +Token = Ignore + PlainToken + +# First (or only) line of ' or " string. +ContStr = group(_litprefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*" + + group("'", r'\\\r?\n'), + _litprefix + r'"[^\n"\\]*(?:\\.[^\n"\\]*)*' + + group('"', r'\\\r?\n')) +PseudoExtras = group(r'\\\r?\n', Comment, Triple) +PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name, DollarName) + +tokenprog = re.compile(Token, re.UNICODE) +pseudoprog = re.compile(PseudoToken, re.UNICODE) +single3prog = re.compile(Single3) +double3prog = re.compile(Double3) + +_strprefixes = ( + _combinations('r', 'R', 'f', 'F') | + _combinations('r', 'R', 'b', 'B') | + {'u', 'U', 'ur', 'uR', 'Ur', 'UR'} +) + +endprogs = {"'": re.compile(Single), '"': re.compile(Double), + "'''": single3prog, '"""': double3prog, + } +endprogs.update({prefix+"'''": single3prog for prefix in _strprefixes}) +endprogs.update({prefix+'"""': double3prog for prefix in _strprefixes}) +endprogs.update({prefix: None for prefix in _strprefixes}) + +triple_quoted = ( + {"'''", '"""'} | + {prefix+"'''" for prefix in _strprefixes} | + {prefix+'"""' for prefix in _strprefixes} +) +single_quoted = ( + {"'", '"'} | + {prefix+"'" for prefix in _strprefixes} | + {prefix+'"' for prefix in _strprefixes} +) + +tabsize = 8 + +class TokenError(Exception): pass + +class StopTokenizing(Exception): pass + +def printtoken(type, token, xxx_todo_changeme, xxx_todo_changeme1, line): # for testing + (srow, scol) = xxx_todo_changeme + (erow, ecol) = xxx_todo_changeme1 + print("%d,%d-%d,%d:\t%s\t%s" % \ + (srow, scol, erow, ecol, tok_name[type], repr(token))) + +def tokenize(readline, tokeneater=printtoken): + """ + The tokenize() function accepts two parameters: one representing the + input stream, and one providing an output mechanism for tokenize(). + + The first parameter, readline, must be a callable object which provides + the same interface as the readline() method of built-in file objects. + Each call to the function should return one line of input as a string. + + The second parameter, tokeneater, must also be a callable object. It is + called once for each token, with five arguments, corresponding to the + tuples generated by generate_tokens(). + """ + try: + tokenize_loop(readline, tokeneater) + except StopTokenizing: + pass + +# backwards compatible interface +def tokenize_loop(readline, tokeneater): + for token_info in generate_tokens(readline): + tokeneater(*token_info) + +if sys.version_info > (3,): + isidentifier = str.isidentifier +else: + IDENTIFIER_RE = re.compile(r"^[^\d\W]\w*$", re.UNICODE) + + def isidentifier(s): + return bool(IDENTIFIER_RE.match(s)) + +ASCII = re.ASCII if sys.version_info > (3,) else 0 +cookie_re = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)', ASCII) +blank_re = re.compile(br'^[ \t\f]*(?:[#\r\n]|$)', ASCII) + +def _get_normal_name(orig_enc): + """Imitates get_normal_name in tokenizer.c.""" + # Only care about the first 12 characters. + enc = orig_enc[:12].lower().replace("_", "-") + if enc == "utf-8" or enc.startswith("utf-8-"): + return "utf-8" + if enc in ("latin-1", "iso-8859-1", "iso-latin-1") or \ + enc.startswith(("latin-1-", "iso-8859-1-", "iso-latin-1-")): + return "iso-8859-1" + return orig_enc + +def detect_encoding(readline): + """ + The detect_encoding() function is used to detect the encoding that should + be used to decode a Python source file. It requires one argument, readline, + in the same way as the tokenize() generator. + + It will call readline a maximum of twice, and return the encoding used + (as a string) and a list of any lines (left as bytes) it has read + in. + + It detects the encoding from the presence of a utf-8 bom or an encoding + cookie as specified in pep-0263. If both a bom and a cookie are present, but + disagree, a SyntaxError will be raised. If the encoding cookie is an invalid + charset, raise a SyntaxError. Note that if a utf-8 bom is found, + 'utf-8-sig' is returned. + + If no encoding is specified, then the default of 'utf-8' will be returned. + """ + bom_found = False + encoding = None + default = 'utf-8' + def read_or_stop(): + try: + return readline() + except StopIteration: + return bytes() + + def find_cookie(line): + try: + line_string = line.decode('ascii') + except UnicodeDecodeError: + return None + match = cookie_re.match(line_string) + if not match: + return None + encoding = _get_normal_name(match.group(1)) + try: + codec = lookup(encoding) + except LookupError: + # This behaviour mimics the Python interpreter + raise SyntaxError("unknown encoding: " + encoding) + + if bom_found: + if codec.name != 'utf-8': + # This behaviour mimics the Python interpreter + raise SyntaxError('encoding problem: utf-8') + encoding += '-sig' + return encoding + + first = read_or_stop() + if first.startswith(BOM_UTF8): + bom_found = True + first = first[3:] + default = 'utf-8-sig' + if not first: + return default, [] + + encoding = find_cookie(first) + if encoding: + return encoding, [first] + if not blank_re.match(first): + return default, [first] + + second = read_or_stop() + if not second: + return default, [first] + + encoding = find_cookie(second) + if encoding: + return encoding, [first, second] + + return default, [first, second] + + +def generate_tokens(readline): + """ + The generate_tokens() generator requires one argument, readline, which + must be a callable object which provides the same interface as the + readline() method of built-in file objects. Each call to the function + should return one line of input as a string. Alternately, readline + can be a callable function terminating with StopIteration: + readline = open(myfile).next # Example of alternate readline + + The generator produces 5-tuples with these members: the token type; the + token string; a 2-tuple (srow, scol) of ints specifying the row and + column where the token begins in the source; a 2-tuple (erow, ecol) of + ints specifying the row and column where the token ends in the source; + and the line on which the token was found. The line passed is the + logical line; continuation lines are included. + """ + lnum = parenlev = continued = 0 + numchars = '0123456789' + contstr, needcont = '', 0 + contline = None + indents = [0] + + # 'stashed' and 'async_*' are used for async/await parsing + stashed = None + async_def = False + async_def_indent = 0 + async_def_nl = False + + while 1: # loop over lines in stream + try: + line = readline() + except StopIteration: + line = '' + lnum = lnum + 1 + pos, max = 0, len(line) + + if contstr: # continued string + if not line: + raise TokenError("EOF in multi-line string", strstart) + endmatch = endprog.match(line) + if endmatch: + pos = end = endmatch.end(0) + yield (STRING, contstr + line[:end], + strstart, (lnum, end), contline + line) + contstr, needcont = '', 0 + contline = None + elif needcont and line[-2:] != '\\\n' and line[-3:] != '\\\r\n': + yield (ERRORTOKEN, contstr + line, + strstart, (lnum, len(line)), contline) + contstr = '' + contline = None + continue + else: + contstr = contstr + line + contline = contline + line + continue + + elif parenlev == 0 and not continued: # new statement + if not line: break + column = 0 + while pos < max: # measure leading whitespace + if line[pos] == ' ': column = column + 1 + elif line[pos] == '\t': column = (column//tabsize + 1)*tabsize + elif line[pos] == '\f': column = 0 + else: break + pos = pos + 1 + if pos == max: break + + if stashed: + yield stashed + stashed = None + + if line[pos] in '\r\n': # skip blank lines + yield (NL, line[pos:], (lnum, pos), (lnum, len(line)), line) + continue + + if line[pos] == '#': # skip comments + comment_token = line[pos:].rstrip('\r\n') + nl_pos = pos + len(comment_token) + yield (COMMENT, comment_token, + (lnum, pos), (lnum, pos + len(comment_token)), line) + yield (NL, line[nl_pos:], + (lnum, nl_pos), (lnum, len(line)), line) + continue + + if column > indents[-1]: # count indents + indents.append(column) + yield (INDENT, line[:pos], (lnum, 0), (lnum, pos), line) + + while column < indents[-1]: # count dedents + if column not in indents: + raise IndentationError( + "unindent does not match any outer indentation level", + ("", lnum, pos, line)) + indents = indents[:-1] + + if async_def and async_def_indent >= indents[-1]: + async_def = False + async_def_nl = False + async_def_indent = 0 + + yield (DEDENT, '', (lnum, pos), (lnum, pos), line) + + if async_def and async_def_nl and async_def_indent >= indents[-1]: + async_def = False + async_def_nl = False + async_def_indent = 0 + + else: # continued statement + if not line: + raise TokenError("EOF in multi-line statement", (lnum, 0)) + continued = 0 + + while pos < max: + pseudomatch = pseudoprog.match(line, pos) + if pseudomatch: # scan for tokens + start, end = pseudomatch.span(1) + spos, epos, pos = (lnum, start), (lnum, end), end + token, initial = line[start:end], line[start] + + if initial in numchars or \ + (initial == '.' and token != '.'): # ordinary number + yield (NUMBER, token, spos, epos, line) + elif initial in '\r\n': + newline = NEWLINE + if parenlev > 0: + newline = NL + elif async_def: + async_def_nl = True + if stashed: + yield stashed + stashed = None + yield (newline, token, spos, epos, line) + + elif initial == '#': + assert not token.endswith("\n") + if stashed: + yield stashed + stashed = None + yield (COMMENT, token, spos, epos, line) + elif token in triple_quoted: + endprog = endprogs[token] + endmatch = endprog.match(line, pos) + if endmatch: # all on one line + pos = endmatch.end(0) + token = line[start:pos] + if stashed: + yield stashed + stashed = None + yield (STRING, token, spos, (lnum, pos), line) + else: + strstart = (lnum, start) # multiple lines + contstr = line[start:] + contline = line + break + elif initial in single_quoted or \ + token[:2] in single_quoted or \ + token[:3] in single_quoted: + if token[-1] == '\n': # continued string + strstart = (lnum, start) + endprog = (endprogs[initial] or endprogs[token[1]] or + endprogs[token[2]]) + contstr, needcont = line[start:], 1 + contline = line + break + else: # ordinary string + if stashed: + yield stashed + stashed = None + yield (STRING, token, spos, epos, line) + elif isidentifier(initial): # ordinary name + if token in ('async', 'await'): + if async_def: + yield (ASYNC if token == 'async' else AWAIT, + token, spos, epos, line) + continue + + tok = (NAME, token, spos, epos, line) + if token == 'async' and not stashed: + stashed = tok + continue + + if token in ('def', 'for'): + if (stashed + and stashed[0] == NAME + and stashed[1] == 'async'): + + if token == 'def': + async_def = True + async_def_indent = indents[-1] + + yield (ASYNC, stashed[1], + stashed[2], stashed[3], + stashed[4]) + stashed = None + + if stashed: + yield stashed + stashed = None + + yield tok + elif initial == '\\': # continued stmt + # This yield is new; needed for better idempotency: + if stashed: + yield stashed + stashed = None + yield (NL, token, spos, (lnum, pos), line) + continued = 1 + elif initial == '$': + if stashed: + yield stashed + stashed = None + yield (DOLLARNAME, token, spos, epos, line) + else: + if initial in '([{': parenlev = parenlev + 1 + elif initial in ')]}': parenlev = parenlev - 1 + if stashed: + yield stashed + stashed = None + yield (OP, token, spos, epos, line) + else: + yield (ERRORTOKEN, line[pos], + (lnum, pos), (lnum, pos+1), line) + pos = pos + 1 + + if stashed: + yield stashed + stashed = None + + for indent in indents[1:]: # pop remaining indent levels + yield (DEDENT, '', (lnum, 0), (lnum, 0), '') + yield (ENDMARKER, '', (lnum, 0), (lnum, 0), '') + +if __name__ == '__main__': # testing + import sys + if len(sys.argv) > 1: tokenize(open(sys.argv[1]).readline) + else: tokenize(sys.stdin.readline) diff --git a/python/extractor/blib2to3/pygram.py b/python/extractor/blib2to3/pygram.py new file mode 100644 index 00000000000..1602d536893 --- /dev/null +++ b/python/extractor/blib2to3/pygram.py @@ -0,0 +1,56 @@ +# Copyright 2006 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Export the Python grammar and symbols.""" + +# Python imports +import os + +# Local imports +from .pgen2 import token +from .pgen2 import driver + +# The grammar file +_GRAMMAR_FILE = "Grammar.txt" + + +class Symbols(object): + + def __init__(self, grammar): + """Initializer. + + Creates an attribute for each grammar symbol (nonterminal), + whose value is the symbol's type (an int >= 256). + """ + for name, symbol in grammar.symbol2number.items(): + setattr(self, name, symbol) + + +def initialize(cache_dir=None): + global python2_grammar + global python2_grammar_no_print_statement + global python3_grammar + global python3_grammar_no_async + global python_symbols + + python_grammar = driver.load_grammar("blib2to3", _GRAMMAR_FILE) + python_symbols = Symbols(python_grammar) + + # Python 2 + python2_grammar = python_grammar.copy() + del python2_grammar.keywords["async"] + del python2_grammar.keywords["await"] + + # Python 2 + from __future__ import print_function + python2_grammar_no_print_statement = python2_grammar.copy() + del python2_grammar_no_print_statement.keywords["print"] + + # Python 3 + python3_grammar = python_grammar + del python3_grammar.keywords["print"] + del python3_grammar.keywords["exec"] + + #Python 3 wihtout async or await + python3_grammar_no_async = python3_grammar.copy() + del python3_grammar_no_async.keywords["async"] + del python3_grammar_no_async.keywords["await"] diff --git a/python/extractor/blib2to3/pytree.py b/python/extractor/blib2to3/pytree.py new file mode 100644 index 00000000000..71724b263d3 --- /dev/null +++ b/python/extractor/blib2to3/pytree.py @@ -0,0 +1,29 @@ +# Copyright 2006 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +""" +Python parse tree definitions. + +This is a very concrete parse tree; we need to keep every token and +even the comments and whitespace between tokens. + +There's also a pattern matching implementation here. +""" + +__author__ = "Guido van Rossum " + +import sys +from io import StringIO + +HUGE = 0x7FFFFFFF # maximum repeat count, default max + +_type_reprs = {} +def type_repr(type_num): + global _type_reprs + if not _type_reprs: + from .pygram import python_symbols + # printing tokens is possible but not as useful + # from .pgen2 import token // token.__dict__.items(): + for name, val in python_symbols.__dict__.items(): + if type(val) == int: _type_reprs[val] = name + return _type_reprs.setdefault(type_num, type_num) diff --git a/python/extractor/buildtools/__init__.py b/python/extractor/buildtools/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/buildtools/auto_install.py b/python/extractor/buildtools/auto_install.py new file mode 100644 index 00000000000..197f994db6c --- /dev/null +++ b/python/extractor/buildtools/auto_install.py @@ -0,0 +1,106 @@ +#!/usr/bin/python3 + +import sys +import logging +import os +import os.path +import re + +from packaging.specifiers import SpecifierSet +from packaging.version import Version + +import buildtools.semmle.requirements as requirements + +logging.basicConfig(level=logging.WARNING) + + +def pip_install(req, venv, dependencies=True, wheel=True): + venv.upgrade_pip() + tmp = requirements.save_to_file([req]) + #Install the requirements using the venv python + args = [ "install", "-r", tmp] + if dependencies: + print("Installing %s with dependencies." % req) + elif wheel: + print("Installing %s without dependencies." % req) + args += [ "--no-deps"] + else: + print("Installing %s without dependencies or wheel." % req) + args += [ "--no-deps", "--no-binary", ":all:"] + print("Calling " + " ".join(args)) + venv.pip(args) + os.remove(tmp) + +def restrict_django(reqs): + for req in reqs: + if sys.version_info[0] < 3 and req.name.lower() == "django": + if Version("2") in req.specifier: + req.specifier = SpecifierSet("<2") + return reqs + +ignored_packages = [ + "pyobjc-.*", + "pypiwin32", + "frida", + "pyopenssl", # Installed by pip. Don't mess with its version. + "wxpython", # Takes forever to compile all the C code. + "cryptography", #Installed by pyOpenSSL and thus by pip. Don't mess with its version. + "psycopg2", #psycopg2 version 2.6 fails to install. +] + +if os.name != "nt": + ignored_packages.append("pywin32") #Only works on Windows + +ignored_package_regex = re.compile("|".join(ignored_packages)) + +def non_ignored(reqs): + filtered_reqs = [] + for req in reqs: + if ignored_package_regex.match(req.name.lower()) is not None: + logging.info("Package %s is ignored. Skipping." % req.name) + else: + filtered_reqs += [req] + return filtered_reqs + +def try_install_with_deps(req, venv): + try: + pip_install(req, venv, dependencies=True) + except Exception as ex: + logging.warn("Failed to install all dependencies for " + req.name) + logging.info(ex) + try: + pip_install(req, venv, dependencies = False) + except Exception: + pip_install(req, venv, dependencies = False, wheel = False) + +def install(reqs, venv): + '''Attempt to install a sufficient and stable set of dependencies from the requirements.txt file. + First of all we 'clean' the requirements, removing contradictory version numbers. + Then we attempt to install the restricted version of each dependency, and , should that fail, + we install the unrestricted version. If that fails, the whole installation fails. + Once the immediate dependencies are installed, we then (attempt to ) install the dependencies. + Returns True if installation was successful. False otherwise. + + `reqs` should be a string containing all requirements separated by newlines or a list of + strings with each string being a requirement. + ''' + if isinstance(reqs, str): + reqs = reqs.split("\n") + reqs = requirements.parse(reqs) + reqs = restrict_django(reqs) + reqs = non_ignored(reqs) + cleaned = requirements.clean(reqs) + restricted = requirements.restrict(reqs) + for i, req in enumerate(restricted): + try: + try_install_with_deps(req, venv) + except Exception as ex1: + try: + try_install_with_deps(cleaned[i], venv) + except Exception as ex2: + logging.error("Failed to install " + req.name) + logging.warning(ex2) + return False + logging.info("Failed to install restricted form of " + req.name) + logging.info(ex1) + return True diff --git a/python/extractor/buildtools/discover.py b/python/extractor/buildtools/discover.py new file mode 100644 index 00000000000..b938d92794a --- /dev/null +++ b/python/extractor/buildtools/discover.py @@ -0,0 +1,65 @@ +import sys +import os + +from buildtools import version + +DEFAULT_VERSION = 3 + +def get_relative_root(root_identifiers): + if any([os.path.exists(identifier) for identifier in root_identifiers]): + print("Source root appears to be the real root.") + return "." + + found = set() + for directory in next(os.walk("."))[1]: + if any([os.path.exists(os.path.join(directory, identifier)) for identifier in root_identifiers]): + found.add(directory) + if not found: + print("No directories containing root identifiers were found. Returning working directory as root.") + return "." + if len(found) > 1: + print("Multiple possible root directories found. Returning working directory as root.") + return "." + + root = found.pop() + print("'%s' appears to be the root." % root) + return root + +def get_root(*root_identifiers): + return os.path.abspath(get_relative_root(root_identifiers)) + +REQUIREMENTS_TAG = "LGTM_PYTHON_SETUP_REQUIREMENTS_FILES" + +def find_requirements(dir): + if REQUIREMENTS_TAG in os.environ: + val = os.environ[REQUIREMENTS_TAG] + if val == "false": + return [] + paths = [ os.path.join(dir, line.strip()) for line in val.splitlines() ] + for p in paths: + if not os.path.exists(p): + raise IOError(p + " not found") + return paths + candidates = ["requirements.txt", "test-requirements.txt"] + return [ path if os.path.exists(path) else "" for path in [ os.path.join(dir, file) for file in candidates] ] + +def discover(default_version=DEFAULT_VERSION): + """Discover things about the Python checkout and return a version, root, requirement-files triple.""" + root = get_root("requirements.txt", "setup.py") + v = version.best_version(root, default_version) + # Unify the requirements or just get path to requirements... + requirement_files = find_requirements(root) + return v, root, requirement_files + +def get_version(default_version=DEFAULT_VERSION): + root = get_root("requirements.txt", "setup.py") + return version.best_version(root, default_version) + +def main(): + if len(sys.argv) > 1: + print(discover(int(sys.argv[1]))) + else: + print(discover()) + +if __name__ == "__main__": + main() diff --git a/python/extractor/buildtools/helper.py b/python/extractor/buildtools/helper.py new file mode 100644 index 00000000000..c1676ed1b4c --- /dev/null +++ b/python/extractor/buildtools/helper.py @@ -0,0 +1,16 @@ +import os +import traceback +import re + + +SCRIPTDIR = os.path.split(os.path.dirname(__file__))[1] + + +def print_exception_indented(opt=None): + exc_text = traceback.format_exc() + for line in exc_text.splitlines(): + # remove path information that might be sensitive + # for example, in the .pyc files for Python 2, a traceback would contain + # /home/rasmus/code/target/thirdparty/python/build/extractor-python/buildtools/install.py + line = re.sub(r'File \".*' + SCRIPTDIR + r'(.*)\",', r'File <'+ SCRIPTDIR + r'\1>', line) + print(' ' + line) diff --git a/python/extractor/buildtools/index.py b/python/extractor/buildtools/index.py new file mode 100644 index 00000000000..10521868313 --- /dev/null +++ b/python/extractor/buildtools/index.py @@ -0,0 +1,429 @@ +import sys +import os +import subprocess +import csv + +if sys.version_info < (3,): + from urlparse import urlparse + from urllib import url2pathname +else: + from urllib.parse import urlparse + from urllib.request import url2pathname + +from buildtools import discover +from buildtools import install +from buildtools.version import executable, extractor_executable + + +INCLUDE_TAG = "LGTM_INDEX_INCLUDE" +EXCLUDE_TAG = "LGTM_INDEX_EXCLUDE" +FILTER_TAG = "LGTM_INDEX_FILTERS" +PATH_TAG = "LGTM_INDEX_IMPORT_PATH" +REPO_FOLDERS_TAG = "LGTM_REPOSITORY_FOLDERS_CSV" +REPO_EXCLUDE_KINDS = "metadata", "external" + +# These are the levels that the CodeQL CLI supports, in order of increasing verbosity. +CLI_LOGGING_LEVELS = ['off', 'errors', 'warnings', 'progress', 'progress+', 'progress++', 'progress+++'] + +# These are the verbosity levels used internally in the extractor. The indices of these levels +# should match up with the corresponding constants in the semmle.logging module. +EXTRACTOR_LOGGING_LEVELS = ['off', 'errors', 'warnings', 'info', 'debug', 'trace'] + +def trap_cache(): + return os.path.join(os.environ["LGTM_WORKSPACE"], "trap_cache") + +def split_into_options(lines, opt): + opts = [] + for line in lines.split("\n"): + line = line.strip() + if line: + opts.append(opt) + opts.append(line) + return opts + +def get_include_options(): + if INCLUDE_TAG in os.environ: + return split_into_options(os.environ[INCLUDE_TAG], "-R") + else: + src = os.environ["LGTM_SRC"] + return [ "-R", src] + +def get_exclude_options(): + options = [] + if EXCLUDE_TAG in os.environ: + options.extend(split_into_options(os.environ[EXCLUDE_TAG], "-Y")) + if REPO_FOLDERS_TAG not in os.environ: + return options + with open(os.environ[REPO_FOLDERS_TAG]) as csv_file: + csv_reader = csv.reader(csv_file) + next(csv_reader) # discard header + for kind, url in csv_reader: + if kind not in REPO_EXCLUDE_KINDS: + continue + try: + path = url2pathname(urlparse(url).path) + except: + print("Unable to parse '" + url + "' as file url.") + else: + options.append("-Y") + options.append(path) + return options + +def get_filter_options(): + if FILTER_TAG in os.environ: + return split_into_options(os.environ[FILTER_TAG], "--filter") + else: + return [] + +def get_path_options(version): + # We want to stop extracting libraries, and only extract the code that is in the + # repo. While in the transition period for stopping to install dependencies in the + # codeql-action, we will need to be able to support both old and new behavior. + # + # Like PYTHONUNBUFFERED for Python, we treat any non-empty string as meaning the + # flag is enabled. + # https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUNBUFFERED + if os.environ.get("CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION"): + return [] + + # Not extracting dependencies will be default in CodeQL CLI release 2.16.0. Until + # 2.17.0, we provide an escape hatch to get the old behavior. + force_enable_envvar_name = "CODEQL_EXTRACTOR_PYTHON_FORCE_ENABLE_LIBRARY_EXTRACTION_UNTIL_2_17_0" + if os.environ.get(force_enable_envvar_name): + print("WARNING: We plan to remove the availability of the {} option in CodeQL CLI release 2.17.0 and beyond. Please let us know by submitting an issue to https://github.com/github/codeql why you needed to re-enable dependency extraction.".format(force_enable_envvar_name)) + path_option = [ "-p", install.get_library(version)] + if PATH_TAG in os.environ: + path_option = split_into_options(os.environ[PATH_TAG], "-p") + path_option + return path_option + else: + print("INFO: The Python extractor has recently (from 2.16.0 CodeQL CLI release) stopped extracting dependencies by default, and therefore stopped analyzing the source code of dependencies by default. We plan to remove this entirely in CodeQL CLI release 2.17.0. If you encounter problems, please let us know by submitting an issue to https://github.com/github/codeql, so we can consider adjusting our plans. It is possible to re-enable dependency extraction by exporting '{}=1'.".format(force_enable_envvar_name)) + return [] + +def get_stdlib(): + return os.path.dirname(os.__file__) + + +def exclude_pip_21_3_build_dir_options(): + """ + Handle build/ dir from `pip install .` (new in pip 21.3) + + Starting with pip 21.3, in-tree builds are now the default (see + https://pip.pypa.io/en/stable/news/#v21-3). This means that pip commands that build + the package (like `pip install .` or `pip wheel .`), will leave a copy of all the + package source code in `build/lib//`. + + If that is done before invoking the extractor, we will end up extracting that copy + as well, which is very bad (especially for points-to performance). So with this + function we try to find such folders, so they can be excluded from extraction. + + The only reliable sign is that inside the `build` folder, there must be a `lib` + subfolder, and there must not be any ordinary files. + + When the `wheel` package is installed there will also be a `bdist.linux-x86_64` + subfolder. Although most people have the `wheel` package installed, it's not + required, so we don't use that in the logic. + """ + + # As a failsafe, we include logic to disable this functionality based on an + # environment variable. + # + # Like PYTHONUNBUFFERED for Python, we treat any non-empty string as meaning the + # flag is enabled. + # https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUNBUFFERED + if os.environ.get("CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_PIP_BUILD_DIR_EXCLUDE"): + return [] + + include_dirs = set(get_include_options()[1::2]) + + # For the purpose of exclusion, we normalize paths to their absolute path, just like + # we do in the actual traverser. + exclude_dirs = set(os.path.abspath(path) for path in get_exclude_options()[1::2]) + + to_exclude = list() + + def walk_dir(dirpath): + if os.path.abspath(dirpath) in exclude_dirs: + return + + contents = os.listdir(dirpath) + paths = [os.path.join(dirpath, c) for c in contents] + dirs = [path for path in paths if os.path.isdir(path)] + dirnames = [os.path.basename(path) for path in dirs] + + # Allow Python package such as `mypkg.build.lib`, so if we see an `__init__.py` + # file in the current dir don't walk the tree further. + if "__init__.py" in contents: + return + + # note that we don't require that there by a `setup.py` present beside the + # `build/` dir, since that is not required to build a package -- see + # https://pgjones.dev/blog/packaging-without-setup-py-2020 + # + # Although I didn't observe `pip install .` with a package that uses `poetry` as + # the build-system leave behind a `build/` directory, that doesn't mean it + # couldn't happen. + if os.path.basename(dirpath) == "build" and "lib" in dirnames and dirs == paths: + to_exclude.append(dirpath) + return # no need to walk the sub directories + + for dir in dirs: + # We ignore symlinks, as these can present infinite loops, and any folders + # they can point to will be handled on their own anyway. + if not os.path.islink(dir): + walk_dir(dir) + + for top in include_dirs: + walk_dir(top) + + options = [] + + if to_exclude: + print( + "Excluding the following directories from extraction, since they look like " + "in-tree build directories generated by pip: {}".format(to_exclude) + ) + print( + "You can disable this behavior by setting the environment variable " + "CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_PIP_BUILD_DIR_EXCLUDE=1" + ) + for dirpath in to_exclude: + options.append("-Y") # `-Y` is the same as `--exclude-file` + options.append(dirpath) + + return options + + +def exclude_venvs_options(): + """ + If there are virtual environments (venv) present within the directory that is being + extracted, we don't want to recurse into all of these and extract all the Python + source code. + + This function tries to find such venvs, and produce the right options to ignore + them. + """ + + # As a failsafe, we include logic to disable this functionality based on an + # environment variable. + # + # Like PYTHONUNBUFFERED for Python, we treat any non-empty string as meaning the + # flag is enabled. + # https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUNBUFFERED + if os.environ.get("CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_VENV_EXCLUDE"): + return [] + + include_dirs = set(get_include_options()[1::2]) + + # For the purpose of exclusion, we normalize paths to their absolute path, just like + # we do in the actual traverser. + exclude_dirs = set(os.path.abspath(path) for path in get_exclude_options()[1::2]) + + to_exclude = [] + + def walk_dir(dirpath): + if os.path.abspath(dirpath) in exclude_dirs: + return + + paths = [os.path.join(dirpath, c) for c in os.listdir(dirpath)] + dirs = [path for path in paths if os.path.isdir(path)] + dirnames = [os.path.basename(path) for path in dirs] + + # we look for `/Lib/site-packages` (Windows) or + # `/lib/python*/site-packages` (unix) without requiring any other files to + # be present. + # + # Initially we had implemented some more advanced logic to only ignore venvs + # that had a `pyvenv.cfg` or a suitable activate scripts. But reality turned out + # to be less reliable, so now we just ignore any venv that has a proper + # `site-packages` as a subfolder. + # + # This logic for detecting a virtual environment was based on the CPython implementation, see: + # - https://github.com/python/cpython/blob/4575c01b750cd26377e803247c38d65dad15e26a/Lib/venv/__init__.py#L122-L131 + # - https://github.com/python/cpython/blob/4575c01b750cd26377e803247c38d65dad15e26a/Lib/venv/__init__.py#L170 + # + # Some interesting examples: + # - windows without `activate`: https://github.com/NTUST/106-team4/tree/7f902fec29f68ca44d4f4385f2d7714c2078c937/finalPage/finalVENV/Scripts + # - windows with `activate`: https://github.com/Lynchie/KCM/tree/ea9eeed07e0c9eec41f9fc7480ce90390ee09876/VENV/Scripts + # - without `pyvenv.cfg`: https://github.com/FiacreT/M-moire/tree/4089755191ffc848614247e98bbb641c1933450d/osintplatform/testNeo/venv + # - without `pyvenv.cfg`: https://github.com/Lynchie/KCM/tree/ea9eeed07e0c9eec41f9fc7480ce90390ee09876/VENV + # - without `pyvenv.cfg`: https://github.com/mignonjia/NetworkingProject/tree/a89fe12ffbf384095766aadfe6454a4c0062d1e7/crud/venv + # + # I'm quite sure I saw some project on LGTM that had neither `pyvenv.cfg` or an activate script, but I could not find the reference again. + + if "Lib" in dirnames: + has_site_packages_folder = os.path.exists(os.path.join(dirpath, "Lib", "site-packages")) + elif "lib" in dirnames: + lib_path = os.path.join(dirpath, "lib") + python_folders = [dirname for dirname in os.listdir(lib_path) if dirname.startswith("python")] + has_site_packages_folder = bool(python_folders) and any( + os.path.exists(os.path.join(dirpath, "lib", python_folder, "site-packages")) for python_folder in python_folders + ) + else: + has_site_packages_folder = False + + if has_site_packages_folder: + to_exclude.append(dirpath) + return # no need to walk the sub directories + + for dir in dirs: + # We ignore symlinks, as these can present infinite loops, and any folders + # they can point to will be handled on their own anyway. + if not os.path.islink(dir): + walk_dir(dir) + + for top in include_dirs: + walk_dir(top) + + options = [] + + if to_exclude: + print( + "Excluding the following directories from extraction, since they look like " + "virtual environments: {}".format(to_exclude) + ) + print( + "You can disable this behavior by setting the environment variable " + "CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_VENV_EXCLUDE=1" + ) + + for dirpath in to_exclude: + options.append("-Y") # `-Y` is the same as `--exclude-file` + options.append(dirpath) + + return options + +def get_extractor_logging_level(s: str): + """Returns a integer value corresponding to the logging level specified by the string s, or `None` if s is invalid.""" + try: + return EXTRACTOR_LOGGING_LEVELS.index(s) + except ValueError: + return None + +def get_cli_logging_level(s: str): + """Returns a integer value corresponding to the logging level specified by the string s, or `None` if s is invalid.""" + try: + return CLI_LOGGING_LEVELS.index(s) + except ValueError: + return None + +def get_logging_options(): + # First look for the extractor-specific option + verbosity_level = os.environ.get("CODEQL_EXTRACTOR_PYTHON_OPTION_LOGGING_VERBOSITY", None) + if verbosity_level is not None: + level = get_extractor_logging_level(verbosity_level) + if level is None: + level = get_cli_logging_level(verbosity_level) + if level is None: + # This is unlikely to be reached in practice, as the level should be validated by the CLI. + raise ValueError( + "Invalid verbosity level: {}. Valid values are: {}".format( + verbosity_level, ", ".join(set(EXTRACTOR_LOGGING_LEVELS + CLI_LOGGING_LEVELS)) + ) + ) + return ["--verbosity", str(level)] + + # Then look for the CLI-wide option + cli_verbosity_level = os.environ.get("CODEQL_VERBOSITY", None) + if cli_verbosity_level is not None: + level = get_cli_logging_level(cli_verbosity_level) + if level is None: + # This is unlikely to be reached in practice, as the level should be validated by the CLI. + raise ValueError( + "Invalid verbosity level: {}. Valid values are: {}".format( + cli_verbosity_level, ", ".join(CLI_LOGGING_LEVELS) + ) + ) + return ["--verbosity", str(level)] + + # Default behaviour: turn on verbose mode: + return ["-v"] + + +def extractor_options(version): + options = [] + + options += get_logging_options() + + # use maximum number of processes + options += ["-z", "all"] + + # cache trap files + options += ["-c", trap_cache()] + + options += get_path_options(version) + options += get_include_options() + options += get_exclude_options() + options += get_filter_options() + options += exclude_pip_21_3_build_dir_options() + options += exclude_venvs_options() + + return options + + +def site_flag(version): + # + # Disabling site with -S (which we do by default) has been observed to cause + # problems at some customers. We're not entirely sure enabling this by default is + # going to be 100% ok, so for now we just want to disable this flag if running with + # it turns out to be a problem (which we check for). + # + # see https://docs.python.org/3/library/site.html + # + # I don't see any reason for running with -S when invoking the tracer in this + # scenario. If we were using the executable from a virtual environment after + # installing PyPI packages, running without -S would allow one of those packages to + # influence the behavior of the extractor, as was the problem for CVE-2020-5252 + # (described in https://github.com/akoumjian/python-safety-vuln). But since this is + # not the case, I don't think there is any advantage to running with -S. + + # Although we have an automatic way that should detect when we should not be running + # with -S, we're not 100% certain that it is not possible to create _other_ strange + # Python installations where `gzip` could be available, but the rest of the standard + # library still not being available. Therefore we're going to keep this environment + # variable, just to make sure there is an easy fall-back in those cases. + # + # Like PYTHONUNBUFFERED for Python, we treat any non-empty string as meaning the + # flag is enabled. + # https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUNBUFFERED + if os.environ.get("CODEQL_EXTRACTOR_PYTHON_ENABLE_SITE"): + return [] + + try: + # In the cases where customers had problems, `gzip` was the first module + # encountered that could not be loaded, so that's the one we check for. Note + # that this has nothing to do with it being problematic to add GZIP support to + # Python :) + args = executable(version) + ["-S", "-c", "import gzip"] + subprocess.check_call(args) + return ["-S"] + except (subprocess.CalledProcessError, Exception): + print("Running without -S") + return [] + +def get_analysis_version(major_version): + """Gets the version of Python that we _analyze_ the code as being written for. + The return value is a string, e.g. "3.11" or "2.7.18". Populating the `major_version`, + `minor_version` and `micro_version` predicates is done inside the CodeQL libraries. + """ + # If the version is already specified, simply reuse it. + if "CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION" in os.environ: + return os.environ["CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION"] + elif major_version == 2: + return "2.7.18" # Last officially supported version + else: + return "3.12" # This should always be the latest supported version + + +def main(): + version = discover.get_version() + tracer = os.path.join(os.environ["SEMMLE_DIST"], "tools", "python_tracer.py") + args = extractor_executable() + site_flag(3) + [tracer] + extractor_options(version) + print("Calling " + " ".join(args)) + sys.stdout.flush() + sys.stderr.flush() + env = os.environ.copy() + env["CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION"] = get_analysis_version(version) + subprocess.check_call(args, env=env) + +if __name__ == "__main__": + main() diff --git a/python/extractor/buildtools/install.py b/python/extractor/buildtools/install.py new file mode 100644 index 00000000000..4ce8b82e178 --- /dev/null +++ b/python/extractor/buildtools/install.py @@ -0,0 +1,123 @@ +import sys +import os +import subprocess +import re +import ast +import tempfile + +from buildtools import unify_requirements +from buildtools.version import executable +from buildtools.version import WIN +from buildtools.helper import print_exception_indented + +def call(args, cwd=None): + print("Calling " + " ".join(args)) + sys.stdout.flush() + sys.stderr.flush() + subprocess.check_call(args, cwd=cwd) + +class Venv(object): + + def __init__(self, path, version): + self.environ = {} + self.path = path + exe_ext = [ "Scripts", "python.exe" ] if WIN else [ "bin", "python" ] + self.venv_executable = os.path.join(self.path, *exe_ext) + self._lib = None + self.pip_upgraded = False + self.empty_folder = tempfile.mkdtemp(prefix="empty", dir=os.environ["LGTM_WORKSPACE"]) + self.version = version + + def create(self): + if self.version < 3: + venv = ["-m", "virtualenv", "--never-download"] + else: + venv = ["-m", "venv"] + call(executable(self.version) + venv + [self.path], cwd=self.empty_folder) + + def upgrade_pip(self): + 'Make sure that pip has been upgraded to latest version' + if self.pip_upgraded: + return + self.pip([ "install", "--upgrade", "pip"]) + self.pip_upgraded = True + + def pip(self, args): + call([self.venv_executable, "-m", "pip"] + args, cwd=self.empty_folder) + + @property + def lib(self): + if self._lib is None: + try: + tools = os.path.join(os.environ['SEMMLE_DIST'], "tools") + get_venv_lib = os.path.join(tools, "get_venv_lib.py") + if os.path.exists(self.venv_executable): + python_executable = [self.venv_executable] + else: + python_executable = executable(self.version) + args = python_executable + [get_venv_lib] + print("Calling " + " ".join(args)) + sys.stdout.flush() + sys.stderr.flush() + self._lib = subprocess.check_output(args) + if sys.version_info >= (3,): + self._lib = str(self._lib, sys.getfilesystemencoding()) + self._lib = self._lib.rstrip("\r\n") + except: + lib_ext = ["Lib"] if WIN else [ "lib" ] + self._lib = os.path.join(self.path, *lib_ext) + print('Error trying to run get_venv_lib (this is Python {})'.format(sys.version[:5])) + print_exception_indented() + return self._lib + +def venv_path(): + return os.path.join(os.environ["LGTM_WORKSPACE"], "venv") + +def system_packages(version): + output = subprocess.check_output(executable(version) + [ "-c", "import sys; print(sys.path)"]) + if sys.version_info >= (3,): + output = str(output, sys.getfilesystemencoding()) + paths = ast.literal_eval(output.strip()) + return [ path for path in paths if ("dist-packages" in path or "site-packages" in path) ] + +REQUIREMENTS_TAG = "LGTM_PYTHON_SETUP_REQUIREMENTS" +EXCLUDE_REQUIREMENTS_TAG = "LGTM_PYTHON_SETUP_EXCLUDE_REQUIREMENTS" + +def main(version, root, requirement_files): + # We import `auto_install` here, as it has a dependency on the `packaging` + # module. For the CodeQL CLI (where we do not install any packages) we never + # run the `main` function, and so there is no need to always import this + # dependency. + from buildtools import auto_install + print("version, root, requirement_files", version, root, requirement_files) + venv = Venv(venv_path(), version) + venv.create() + if REQUIREMENTS_TAG in os.environ: + if not auto_install.install(os.environ[REQUIREMENTS_TAG], venv): + sys.exit(1) + requirements_from_setup = os.path.join(os.environ["LGTM_WORKSPACE"], "setup_requirements.txt") + args = [ venv.venv_executable, os.path.join(os.environ["SEMMLE_DIST"], "tools", "convert_setup.py"), root, requirements_from_setup] + system_packages(version) + print("Calling " + " ".join(args)) + sys.stdout.flush() + sys.stderr.flush() + #We don't care if this fails, we only care if `requirements_from_setup` was created. + subprocess.call(args) + if os.path.exists(requirements_from_setup): + requirement_files = [ requirements_from_setup ] + requirement_files[1:] + print("Requirement files: " + str(requirement_files)) + requirements = unify_requirements.gather(requirement_files) + if EXCLUDE_REQUIREMENTS_TAG in os.environ: + excludes = os.environ[EXCLUDE_REQUIREMENTS_TAG].splitlines() + print("Excluding ", excludes) + regex = re.compile("|".join(exclude + r'\b' for exclude in excludes)) + requirements = [ req for req in requirements if not regex.match(req) ] + err = 0 if auto_install.install(requirements, venv) else 1 + sys.exit(err) + +def get_library(version): + return Venv(venv_path(), version).lib + +if __name__ == "__main__": + version, root, requirement_files = sys.argv[1], sys.argv[2], sys.argv[3:] + version = int(version) + main(version, root, requirement_files) diff --git a/python/extractor/buildtools/semmle/__init__.py b/python/extractor/buildtools/semmle/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/buildtools/semmle/requirements.py b/python/extractor/buildtools/semmle/requirements.py new file mode 100644 index 00000000000..7258bd64522 --- /dev/null +++ b/python/extractor/buildtools/semmle/requirements.py @@ -0,0 +1,136 @@ +import copy +import tempfile +import re +from packaging.requirements import Requirement +from packaging.version import Version +from packaging.specifiers import SpecifierSet + +IGNORED_REQUIREMENTS = re.compile("^(-e\\s+)?(git|svn|hg)(?:\\+.*)?://.*$") + +def parse(lines): + 'Parse a list of requirement strings into a list of `Requirement`s' + res = [] + #Process + for line in lines: + if '#' in line: + line, _ = line.split('#', 1) + if not line: + continue + if IGNORED_REQUIREMENTS.match(line): + continue + try: + req = Requirement(line) + except: + print("Cannot parse requirements line '%s'" % line) + else: + res.append(req) + return res + +def parse_file(filename): + with open(filename, 'r') as fd: + return parse(fd.read().splitlines()) + +def save_to_file(reqs): + 'Takes a list of requirements, saves them to a temporary file and returns the filename' + with tempfile.NamedTemporaryFile(prefix="semmle-requirements", suffix=".txt", mode="w", delete=False) as fd: + for req in reqs: + if req.url is None: + fd.write(str(req)) + else: + fd.write(req.url) + fd.write("\n") + return fd.name + +def clean(reqs): + 'Look for self-contradictory specifier groups and remove the necessary specifier parts to make them consistent' + result = [] + for req in reqs: + specs = req.specifier + cleaned_specs = _clean_specs(specs) + req.specifier = cleaned_specs + result.append(Requirement(str(req))) + req.specifier = specs + return result + +def _clean_specs(specs): + ok = SpecifierSet() + #Choose a deterministic order such that >= comes before <=. + for spec in sorted(iter(specs), key=str, reverse=True): + for ok_spec in ok: + if not _compatible_specifier(ok_spec, spec): + break + else: + ok &= SpecifierSet(str(spec)) + return ok + +def restrict(reqs): + '''Restrict versions to "compatible" versions. + For example restrict >=1.2 to all versions >= 1.2 that have 1 as the major version number. + >=N... becomes >=N...,==N.* and >N... requirements becomes >N..,==N.* + ''' + #First of all clean the requirements + reqs = clean(reqs) + result = [] + for req in reqs: + specs = req.specifier + req.specifier = _restrict_specs(specs) + result.append(Requirement(str(req))) + req.specifier = specs + return result + +def _restrict_specs(specs): + restricted = copy.deepcopy(specs) + #Iteration order doesn't really matter here so we choose the + #same as for clean, just to be consistent + for spec in sorted(iter(specs), key=str, reverse=True): + if spec.operator in ('>', '>='): + base_version = spec.version.split(".", 1)[0] + restricted &= SpecifierSet('==' + base_version + '.*') + return restricted + +def _compatible_specifier(s1, s2): + overlaps = 0 + overlaps += _min_version(s1) in s2 + overlaps += _max_version(s1) in s2 + overlaps += _min_version(s2) in s1 + overlaps += _max_version(s2) in s1 + if overlaps > 1: + return True + if overlaps == 1: + #One overlap -- Generally compatible, but not for =x + return not _is_strict(s1) and not _is_strict(s2) + #overlaps == 0: + return False + +MIN_VERSION = Version('0.0a0') +MAX_VERSION = Version('1000000') + +def _min_version(s): + if s.operator in ('>', '>='): + return s.version + elif s.operator in ('<', '<=', '!='): + return MIN_VERSION + elif s.operator == '==': + v = s.version + if v[-1] == '*': + return v[:-1] + '0' + else: + return s.version + else: + # '~=' + return s.version + +def _max_version(s): + if s.operator in ('<', '<='): + return s.version + elif s.operator in ('>', '>=', '!='): + return MAX_VERSION + elif s.operator in ('~=', '=='): + v = s.version + if v[-1] == '*' or s.operator == '~=': + return v[:-1] + '1000000' + else: + return s.version + +def _is_strict(s): + return s.operator in ('>', '<') diff --git a/python/extractor/buildtools/tox.ini b/python/extractor/buildtools/tox.ini new file mode 100644 index 00000000000..b1be1caaff0 --- /dev/null +++ b/python/extractor/buildtools/tox.ini @@ -0,0 +1,14 @@ +# this is a setup file for `tox`, which allows us to run test locally against multiple python +# versions. Simply run `tox` in the directory of this file! +# +# install tox with `pipx install tox` or whatever your preferred way is :) + +[tox] +envlist = py27,py3 +skipsdist=True + +[testenv] +# install in the virtualenv where commands will be executed +deps = pytest +commands = + pytest diff --git a/python/extractor/buildtools/unify_requirements.py b/python/extractor/buildtools/unify_requirements.py new file mode 100644 index 00000000000..b6dcac683ab --- /dev/null +++ b/python/extractor/buildtools/unify_requirements.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +import os +import re + +def get_requirements(file_path): + if not file_path: + return [] + with open(file_path, "r") as requirements_file: + lines = requirements_file.read().splitlines() + for line_no, line in enumerate(lines): + match = re.search("^\\s*-r\\s+([^#]+)", line) + if match: + include_file_path = os.path.join(os.path.dirname(file_path), match.group(1).strip()) + include_requirements = get_requirements(include_file_path) + lines[line_no:line_no+1] = include_requirements + return lines + +def deduplicate(requirements): + result = [] + seen = set() + for req in requirements: + if req in seen: + continue + result.append(req) + seen.add(req) + return result + +def gather(requirement_files): + requirements = [] + for file in requirement_files: + requirements += get_requirements(file) + requirements = deduplicate(requirements) + print("Requirements:") + for r in requirements: + print(" {}".format(r)) + return requirements diff --git a/python/extractor/buildtools/version.py b/python/extractor/buildtools/version.py new file mode 100644 index 00000000000..e6f685a64b1 --- /dev/null +++ b/python/extractor/buildtools/version.py @@ -0,0 +1,223 @@ +import sys +import os +import subprocess +import tokenize +import re + +from buildtools.helper import print_exception_indented + + +TROVE = re.compile(r"Programming Language\s+::\s+Python\s+::\s+(\d)") + +if sys.version_info > (3,): + import collections.abc as collections + file_open = tokenize.open +else: + import collections + file_open = open + +WIN = sys.platform == "win32" + + +if WIN: + # installing `py` launcher is optional when installing Python on windows, so it's + # possible that the user did not install it, see + # https://github.com/github/codeql-cli-binaries/issues/125#issuecomment-1157429430 + # so we check whether it has been installed. Newer versions have a `--list` option, + # but that has only been mentioned in the docs since 3.9, so to not risk it not + # working on potential older versions, we'll just use `py --version` which forwards + # the `--version` argument to the default python executable. + + try: + subprocess.check_call(["py", "--version"]) + except (subprocess.CalledProcessError, Exception): + sys.stderr.write("The `py` launcher is required for CodeQL to work on Windows.") + sys.stderr.write("Please include it when installing Python for Windows.") + sys.stderr.write("see https://docs.python.org/3/using/windows.html#python-launcher-for-windows") + sys.stderr.flush() + sys.exit(4) # 4 was a unique exit code at the time of writing + +AVAILABLE_VERSIONS = [] + +def set_available_versions(): + """Sets the global `AVAILABLE_VERSIONS` to a list of available (major) Python versions.""" + global AVAILABLE_VERSIONS + if AVAILABLE_VERSIONS: + return # already set + for version in [3, 2]: + try: + subprocess.check_call(" ".join(executable_name(version) + ["-c", "pass"]), shell=True) + AVAILABLE_VERSIONS.append(version) + except Exception: + pass # If not available, we simply don't add it to the list + if not AVAILABLE_VERSIONS: + # If neither 'python3' nor 'python2' is available, we'll just try 'python' and hope for the best + AVAILABLE_VERSIONS = [''] + +def executable(version): + """Returns the executable to use for the given Python version.""" + global AVAILABLE_VERSIONS + set_available_versions() + if version not in AVAILABLE_VERSIONS: + available_version = AVAILABLE_VERSIONS[0] + print("Wanted to run Python %s, but it is not available. Using Python %s instead" % (version, available_version)) + version = available_version + return executable_name(version) + + +def executable_name(version): + if WIN: + return ["py", "-%s" % version] + else: + return ["python%s" % version] + +PREFERRED_PYTHON_VERSION = None + +def extractor_executable(): + ''' + Returns the executable to use for the extractor. + If a Python executable name is specified using the extractor option, returns that name. + In the absence of a user-specified executable name, returns the executable name for + Python 3 if it is available, and Python 2 if not. + ''' + executable_name = os.environ.get("CODEQL_EXTRACTOR_PYTHON_OPTION_PYTHON_EXECUTABLE_NAME", None) + if executable_name is not None: + print("Using Python executable name provided via the python_executable_name extractor option: {}" + .format(executable_name) + ) + return [executable_name] + # Call machine_version() to ensure we've set PREFERRED_PYTHON_VERSION + if PREFERRED_PYTHON_VERSION is None: + machine_version() + return executable(PREFERRED_PYTHON_VERSION) + +def machine_version(): + """If only Python 2 or Python 3 is installed, will return that version""" + global PREFERRED_PYTHON_VERSION + print("Trying to guess Python version based on installed versions") + if sys.version_info > (3,): + this, other = 3, 2 + else: + this, other = 2, 3 + try: + exe = executable(other) + # We need `shell=True` here in order for the test framework to function correctly. For + # whatever reason, the `PATH` variable is ignored if `shell=False`. + # Also, this in turn forces us to give the whole command as a string, rather than a list. + # Otherwise, the effect is that the Python interpreter is invoked _as a REPL_, rather than + # with the given piece of code. + subprocess.check_call(" ".join(exe + [ "-c", "pass" ]), shell=True) + print("This script is running Python {}, but Python {} is also available (as '{}')" + .format(this, other, ' '.join(exe)) + ) + # If both versions are available, our preferred version is Python 3 + PREFERRED_PYTHON_VERSION = 3 + return None + except Exception: + print("Only Python {} installed -- will use that version".format(this)) + PREFERRED_PYTHON_VERSION = this + return this + +def trove_version(root): + print("Trying to guess Python version based on Trove classifiers in setup.py") + try: + full_path = os.path.join(root, "setup.py") + if not os.path.exists(full_path): + print("Did not find setup.py (expected it to be at {})".format(full_path)) + return None + + versions = set() + with file_open(full_path) as fd: + contents = fd.read() + for match in TROVE.finditer(contents): + versions.add(int(match.group(1))) + + if 2 in versions and 3 in versions: + print("Found Trove classifiers for both Python 2 and Python 3 in setup.py -- will use Python 3") + return 3 + elif len(versions) == 1: + result = versions.pop() + print("Found Trove classifier for Python {} in setup.py -- will use that version".format(result)) + return result + else: + print("Found no Trove classifiers for Python in setup.py") + except Exception: + print("Skipping due to exception:") + print_exception_indented() + return None + +def wrap_with_list(x): + if isinstance(x, collections.Iterable) and not isinstance(x, str): + return x + else: + return [x] + +def travis_version(root): + print("Trying to guess Python version based on travis file") + try: + full_paths = [os.path.join(root, filename) for filename in [".travis.yml", "travis.yml"]] + travis_file_paths = [path for path in full_paths if os.path.exists(path)] + if not travis_file_paths: + print("Did not find any travis files (expected them at either {})".format(full_paths)) + return None + + try: + import yaml + except ImportError: + print("Found a travis file, but yaml library not available") + return None + + with open(travis_file_paths[0]) as travis_file: + travis_yaml = yaml.safe_load(travis_file) + if "python" in travis_yaml: + versions = wrap_with_list(travis_yaml["python"]) + else: + versions = [] + + # 'matrix' is an alias for 'jobs' now (https://github.com/travis-ci/docs-travis-ci-com/issues/1500) + # If both are defined, only the last defined will be used. + if "matrix" in travis_yaml and "jobs" in travis_yaml: + print("Ignoring 'matrix' and 'jobs' in Travis file, since they are both defined (only one of them should be).") + else: + matrix = travis_yaml.get("matrix") or travis_yaml.get("jobs") or dict() + includes = matrix.get("include") or [] + for include in includes: + if "python" in include: + versions.extend(wrap_with_list(include["python"])) + + found = set() + for version in versions: + # Yaml may convert version strings to numbers, convert them back. + version = str(version) + if version.startswith("2"): + found.add(2) + if version.startswith("3"): + found.add(3) + + if len(found) == 1: + result = found.pop() + print("Only found Python {} in travis file -- will use that version".format(result)) + return result + elif len(found) == 2: + print("Found both Python 2 and Python 3 being used in travis file -- ignoring") + else: + print("Found no Python being used in travis file") + except Exception: + print("Skipping due to exception:") + print_exception_indented() + return None + +VERSION_TAG = "LGTM_PYTHON_SETUP_VERSION" + +def best_version(root, default): + if VERSION_TAG in os.environ: + try: + return int(os.environ[VERSION_TAG]) + except ValueError: + raise SyntaxError("Illegal value for " + VERSION_TAG) + print("Will try to guess Python version, as it was not specified in `lgtm.yml`") + version = trove_version(root) or travis_version(root) or machine_version() + if version is None: + version = default + print("Could not guess Python version, will use default: Python {}".format(version)) + return version diff --git a/python/extractor/cli-integration-test/.gitignore b/python/extractor/cli-integration-test/.gitignore new file mode 100644 index 00000000000..d3606b9b666 --- /dev/null +++ b/python/extractor/cli-integration-test/.gitignore @@ -0,0 +1,5 @@ +*/db/ +*/dbs/ +*/venv/ +**/*.egg-info/ +*/.cache diff --git a/python/extractor/cli-integration-test/README.md b/python/extractor/cli-integration-test/README.md new file mode 100644 index 00000000000..4da21247ebc --- /dev/null +++ b/python/extractor/cli-integration-test/README.md @@ -0,0 +1,21 @@ +# Extractor Python CodeQL CLI integration tests + +To ensure that the two work together as intended, and as an easy way to set up realistic test-cases. + + +### Adding a new test case + +Add a new folder, place a file called `test.sh` in it, which should start with the code below. The script should exit with failure code to fail the test. + +```bash +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" +``` diff --git a/python/extractor/cli-integration-test/basic/query.ql b/python/extractor/cli-integration-test/basic/query.ql new file mode 100644 index 00000000000..82198eaf87b --- /dev/null +++ b/python/extractor/cli-integration-test/basic/query.ql @@ -0,0 +1 @@ +select 1 diff --git a/python/extractor/cli-integration-test/basic/repo_dir/foo.py b/python/extractor/cli-integration-test/basic/repo_dir/foo.py new file mode 100644 index 00000000000..517b47df53c --- /dev/null +++ b/python/extractor/cli-integration-test/basic/repo_dir/foo.py @@ -0,0 +1 @@ +print(42) diff --git a/python/extractor/cli-integration-test/basic/test.sh b/python/extractor/cli-integration-test/basic/test.sh new file mode 100755 index 00000000000..13433df24b9 --- /dev/null +++ b/python/extractor/cli-integration-test/basic/test.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +rm -rf db + +$CODEQL database create db --language python --source-root repo_dir/ +$CODEQL query run --database db query.ql diff --git a/python/extractor/cli-integration-test/disable-library-extraction/repo_dir/foo.py b/python/extractor/cli-integration-test/disable-library-extraction/repo_dir/foo.py new file mode 100644 index 00000000000..cf0cd77a108 --- /dev/null +++ b/python/extractor/cli-integration-test/disable-library-extraction/repo_dir/foo.py @@ -0,0 +1,3 @@ +import pip + +print(42) diff --git a/python/extractor/cli-integration-test/disable-library-extraction/test.sh b/python/extractor/cli-integration-test/disable-library-extraction/test.sh new file mode 100755 index 00000000000..ac940f811dc --- /dev/null +++ b/python/extractor/cli-integration-test/disable-library-extraction/test.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +# start on clean slate +rm -rf dbs +mkdir dbs + +cd "$SCRIPTDIR" + +# In 2.16.0 we will not extract libraries by default, so there is no difference in what +# is extracted by setting this environment variable.. We should remove this test when +# 2.17.0 is released. +export CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION= +$CODEQL database create dbs/normal --language python --source-root repo_dir/ + +export CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION=1 +$CODEQL database create dbs/no-lib-extraction --language python --source-root repo_dir/ + +# --- + +set +x + +EXTRACTED_NORMAL=$(unzip -l dbs/normal/src.zip | wc -l) +EXTRACTED_NO_LIB_EXTRACTION=$(unzip -l dbs/no-lib-extraction/src.zip | wc -l) + +exitcode=0 + +echo "EXTRACTED_NORMAL=$EXTRACTED_NORMAL" +echo "EXTRACTED_NO_LIB_EXTRACTION=$EXTRACTED_NO_LIB_EXTRACTION" + +if [[ $EXTRACTED_NO_LIB_EXTRACTION -lt $EXTRACTED_NORMAL ]]; then + echo "ERROR: EXTRACTED_NO_LIB_EXTRACTION smaller than EXTRACTED_NORMAL" + exitcode=1 +fi + +exit $exitcode diff --git a/python/extractor/cli-integration-test/extract-stdlib/query.ql b/python/extractor/cli-integration-test/extract-stdlib/query.ql new file mode 100644 index 00000000000..d2024b9228f --- /dev/null +++ b/python/extractor/cli-integration-test/extract-stdlib/query.ql @@ -0,0 +1,18 @@ +import python +import semmle.python.types.Builtins + +predicate named_entity(string name, string kind) { + exists(Builtin::special(name)) and kind = "special" + or + exists(Builtin::builtin(name)) and kind = "builtin" + or + exists(Module m | m.getName() = name) and kind = "module" + or + exists(File f | f.getShortName() = name + ".py") and kind = "file" +} + +from string name, string kind +where + name in ["foo", "baz", "main", "os", "sys", "re"] and + named_entity(name, kind) +select name, kind order by name, kind diff --git a/python/extractor/cli-integration-test/extract-stdlib/query.with-stdlib.expected b/python/extractor/cli-integration-test/extract-stdlib/query.with-stdlib.expected new file mode 100644 index 00000000000..6431b96a625 --- /dev/null +++ b/python/extractor/cli-integration-test/extract-stdlib/query.with-stdlib.expected @@ -0,0 +1,12 @@ +| name | kind | ++------+---------+ +| baz | file | +| baz | module | +| foo | file | +| foo | module | +| main | file | +| os | file | +| os | module | +| re | file | +| re | module | +| sys | special | diff --git a/python/extractor/cli-integration-test/extract-stdlib/query.without-stdlib.expected b/python/extractor/cli-integration-test/extract-stdlib/query.without-stdlib.expected new file mode 100644 index 00000000000..7184b6635dd --- /dev/null +++ b/python/extractor/cli-integration-test/extract-stdlib/query.without-stdlib.expected @@ -0,0 +1,8 @@ +| name | kind | ++------+---------+ +| baz | file | +| baz | module | +| foo | file | +| foo | module | +| main | file | +| sys | special | diff --git a/python/extractor/cli-integration-test/extract-stdlib/repo_dir/baz.py b/python/extractor/cli-integration-test/extract-stdlib/repo_dir/baz.py new file mode 100644 index 00000000000..6fc7679985c --- /dev/null +++ b/python/extractor/cli-integration-test/extract-stdlib/repo_dir/baz.py @@ -0,0 +1 @@ +quux = 4 diff --git a/python/extractor/cli-integration-test/extract-stdlib/repo_dir/foo.py b/python/extractor/cli-integration-test/extract-stdlib/repo_dir/foo.py new file mode 100644 index 00000000000..ed831dda3c2 --- /dev/null +++ b/python/extractor/cli-integration-test/extract-stdlib/repo_dir/foo.py @@ -0,0 +1,4 @@ +import baz +import re +bar = 5 + baz.quux +re.compile("hello") diff --git a/python/extractor/cli-integration-test/extract-stdlib/repo_dir/main.py b/python/extractor/cli-integration-test/extract-stdlib/repo_dir/main.py new file mode 100644 index 00000000000..5efbaf04b2d --- /dev/null +++ b/python/extractor/cli-integration-test/extract-stdlib/repo_dir/main.py @@ -0,0 +1,6 @@ +import sys +import os +print(os.path) +print(sys.path) +import foo +print(foo.bar) diff --git a/python/extractor/cli-integration-test/extract-stdlib/test.sh b/python/extractor/cli-integration-test/extract-stdlib/test.sh new file mode 100755 index 00000000000..6a61becd25c --- /dev/null +++ b/python/extractor/cli-integration-test/extract-stdlib/test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +rm -rf dbs + +mkdir dbs + +CODEQL_EXTRACTOR_PYTHON_DONT_EXTRACT_STDLIB=True $CODEQL database create dbs/without-stdlib --language python --source-root repo_dir/ +$CODEQL query run --database dbs/without-stdlib query.ql > query.without-stdlib.actual +diff query.without-stdlib.expected query.without-stdlib.actual + +LGTM_INDEX_EXCLUDE="/usr/lib/**" $CODEQL database create dbs/with-stdlib --language python --source-root repo_dir/ +$CODEQL query run --database dbs/with-stdlib query.ql > query.with-stdlib.actual +diff query.with-stdlib.expected query.with-stdlib.actual diff --git a/python/extractor/cli-integration-test/force-enable-library-extraction/repo_dir/foo.py b/python/extractor/cli-integration-test/force-enable-library-extraction/repo_dir/foo.py new file mode 100644 index 00000000000..cf0cd77a108 --- /dev/null +++ b/python/extractor/cli-integration-test/force-enable-library-extraction/repo_dir/foo.py @@ -0,0 +1,3 @@ +import pip + +print(42) diff --git a/python/extractor/cli-integration-test/force-enable-library-extraction/test.sh b/python/extractor/cli-integration-test/force-enable-library-extraction/test.sh new file mode 100755 index 00000000000..9d74cfaca4b --- /dev/null +++ b/python/extractor/cli-integration-test/force-enable-library-extraction/test.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +# start on clean slate +rm -rf dbs +mkdir dbs + +cd "$SCRIPTDIR" + +export CODEQL_EXTRACTOR_PYTHON_FORCE_ENABLE_LIBRARY_EXTRACTION_UNTIL_2_17_0= +$CODEQL database create dbs/normal --language python --source-root repo_dir/ + +export CODEQL_EXTRACTOR_PYTHON_FORCE_ENABLE_LIBRARY_EXTRACTION_UNTIL_2_17_0=1 +$CODEQL database create dbs/with-lib-extraction --language python --source-root repo_dir/ + +# --- + +set +x + +EXTRACTED_NORMAL=$(unzip -l dbs/normal/src.zip | wc -l) +EXTRACTED_WITH_LIB_EXTRACTION=$(unzip -l dbs/with-lib-extraction/src.zip | wc -l) + +exitcode=0 + +echo "EXTRACTED_NORMAL=$EXTRACTED_NORMAL" +echo "EXTRACTED_WITH_LIB_EXTRACTION=$EXTRACTED_WITH_LIB_EXTRACTION" + +if [[ ! $EXTRACTED_WITH_LIB_EXTRACTION -gt $EXTRACTED_NORMAL ]]; then + echo "ERROR: EXTRACTED_WITH_LIB_EXTRACTION not greater than EXTRACTED_NORMAL" + exitcode=1 +fi + +exit $exitcode diff --git a/python/extractor/cli-integration-test/ignore-venv/.gitignore b/python/extractor/cli-integration-test/ignore-venv/.gitignore new file mode 100644 index 00000000000..aefd67e4550 --- /dev/null +++ b/python/extractor/cli-integration-test/ignore-venv/.gitignore @@ -0,0 +1,2 @@ +venv/ +venv2/ diff --git a/python/extractor/cli-integration-test/ignore-venv/repo_dir/foo.py b/python/extractor/cli-integration-test/ignore-venv/repo_dir/foo.py new file mode 100644 index 00000000000..df8452f9f21 --- /dev/null +++ b/python/extractor/cli-integration-test/ignore-venv/repo_dir/foo.py @@ -0,0 +1,3 @@ +import flask + +print(42) diff --git a/python/extractor/cli-integration-test/ignore-venv/test.sh b/python/extractor/cli-integration-test/ignore-venv/test.sh new file mode 100755 index 00000000000..e1368008891 --- /dev/null +++ b/python/extractor/cli-integration-test/ignore-venv/test.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +# start on clean slate +rm -rf dbs repo_dir/venv* +mkdir dbs + + +# set up venvs +cd repo_dir + +python3 -m venv venv +venv/bin/pip install flask + +python3 -m venv venv2 + +cd "$SCRIPTDIR" + +# In 2.16.0 we stop extracting libraries by default, so to test this functionality we +# need to force enable it. Once we release 2.17.0 and turn off library extraction for +# good, we can remove the part of this test ensuring that dependencies in an active +# venv are still extracted (since that will no longer be the case). +export CODEQL_EXTRACTOR_PYTHON_FORCE_ENABLE_LIBRARY_EXTRACTION_UNTIL_2_17_0=1 + +# Create DBs with venv2 active (that does not have flask installed) +source repo_dir/venv2/bin/activate + +export CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_VENV_EXCLUDE= +$CODEQL database create dbs/normal --language python --source-root repo_dir/ + +export CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_VENV_EXCLUDE=1 +$CODEQL database create dbs/no-venv-ignore --language python --source-root repo_dir/ + +# Create DB with venv active that has flask installed. We want to ensure that we're +# still able to resolve imports to flask, but don't want to extract EVERYTHING from +# within the venv. Important note is that the test-file in the repo_dir actually imports +# flask :D +source repo_dir/venv/bin/activate +export CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_VENV_EXCLUDE= +$CODEQL database create dbs/normal-with-flask-venv --language python --source-root repo_dir/ + +# --- + +set +x + +EXTRACTED_NORMAL=$(unzip -l dbs/normal/src.zip | wc -l) +EXTRACTED_NO_VENV_IGNORE=$(unzip -l dbs/no-venv-ignore/src.zip | wc -l) +EXTRACTED_ACTIVE_FLASK=$(unzip -l dbs/normal-with-flask-venv/src.zip | wc -l) + +exitcode=0 + +echo "EXTRACTED_NORMAL=$EXTRACTED_NORMAL" +echo "EXTRACTED_NO_VENV_IGNORE=$EXTRACTED_NO_VENV_IGNORE" +echo "EXTRACTED_ACTIVE_FLASK=$EXTRACTED_ACTIVE_FLASK" + +if [[ ! $EXTRACTED_NORMAL -lt $EXTRACTED_NO_VENV_IGNORE ]]; then + echo "ERROR: EXTRACTED_NORMAL not smaller EXTRACTED_NO_VENV_IGNORE" + exitcode=1 +fi + +if [[ ! $EXTRACTED_NORMAL -lt $EXTRACTED_ACTIVE_FLASK ]]; then + echo "ERROR: EXTRACTED_NORMAL not smaller EXTRACTED_ACTIVE_FLASK" + exitcode=1 +fi + +if [[ ! $EXTRACTED_ACTIVE_FLASK -lt $EXTRACTED_NO_VENV_IGNORE ]]; then + echo "ERROR: EXTRACTED_ACTIVE_FLASK not smaller EXTRACTED_NO_VENV_IGNORE" + exitcode=1 +fi + +exit $exitcode diff --git a/python/extractor/cli-integration-test/pip-21.3-build-dir/.gitignore b/python/extractor/cli-integration-test/pip-21.3-build-dir/.gitignore new file mode 100644 index 00000000000..62cb69e3cc3 --- /dev/null +++ b/python/extractor/cli-integration-test/pip-21.3-build-dir/.gitignore @@ -0,0 +1,2 @@ +repo_dir/build/ +dbs/ diff --git a/python/extractor/cli-integration-test/pip-21.3-build-dir/repo_dir/setup.py b/python/extractor/cli-integration-test/pip-21.3-build-dir/repo_dir/setup.py new file mode 100644 index 00000000000..077cdb126d0 --- /dev/null +++ b/python/extractor/cli-integration-test/pip-21.3-build-dir/repo_dir/setup.py @@ -0,0 +1,12 @@ +from setuptools import find_packages, setup + +# using src/ folder as recommended in: https://blog.ionelmc.ro/2014/05/25/python-packaging/ + +setup( + name="example_pkg", + version="0.0.1", + description="example", + packages=find_packages("src"), + package_dir={"": "src"}, + install_requires=[], +) diff --git a/python/extractor/cli-integration-test/pip-21.3-build-dir/repo_dir/src/example_pkg/__init__.py b/python/extractor/cli-integration-test/pip-21.3-build-dir/repo_dir/src/example_pkg/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/cli-integration-test/pip-21.3-build-dir/repo_dir/src/example_pkg/foo.py b/python/extractor/cli-integration-test/pip-21.3-build-dir/repo_dir/src/example_pkg/foo.py new file mode 100644 index 00000000000..517b47df53c --- /dev/null +++ b/python/extractor/cli-integration-test/pip-21.3-build-dir/repo_dir/src/example_pkg/foo.py @@ -0,0 +1 @@ +print(42) diff --git a/python/extractor/cli-integration-test/pip-21.3-build-dir/test.sh b/python/extractor/cli-integration-test/pip-21.3-build-dir/test.sh new file mode 100755 index 00000000000..bc28adaf9ff --- /dev/null +++ b/python/extractor/cli-integration-test/pip-21.3-build-dir/test.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +NUM_PYTHON_FILES_IN_REPO=$(find repo_dir/src/ -name '*.py' | wc -l) + +rm -rf venv dbs + +mkdir dbs + +python3 -m venv venv + +source venv/bin/activate + +pip install --upgrade 'pip>=21.3' + +cd repo_dir +pip install . +cd "$SCRIPTDIR" + +export CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_PIP_BUILD_DIR_EXCLUDE= +$CODEQL database create dbs/normal --language python --source-root repo_dir/ + +export CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_PIP_BUILD_DIR_EXCLUDE=1 +$CODEQL database create dbs/with-build-dir --language python --source-root repo_dir/ + +EXTRACTED_NORMAL=$(unzip -l dbs/normal/src.zip | wc -l) +EXTRACTED_WITH_BUILD=$(unzip -l dbs/with-build-dir/src.zip | wc -l) + +if [[ $((EXTRACTED_NORMAL + NUM_PYTHON_FILES_IN_REPO)) == $EXTRACTED_WITH_BUILD ]]; then + echo "Numbers add up" +else + echo "Numbers did not add up" + echo "NUM_PYTHON_FILES_IN_REPO=$NUM_PYTHON_FILES_IN_REPO" + echo "EXTRACTED_NORMAL=$EXTRACTED_NORMAL" + echo "EXTRACTED_WITH_BUILD=$EXTRACTED_WITH_BUILD" + exit 1 +fi diff --git a/python/extractor/cli-integration-test/python-2-deprecation/query.only-python2.expected b/python/extractor/cli-integration-test/python-2-deprecation/query.only-python2.expected new file mode 100644 index 00000000000..75bc5074059 --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/query.only-python2.expected @@ -0,0 +1,5 @@ +| name | ++----------+ +| dircache | +| stat | +| test | diff --git a/python/extractor/cli-integration-test/python-2-deprecation/query.python2-using-python3.expected b/python/extractor/cli-integration-test/python-2-deprecation/query.python2-using-python3.expected new file mode 100644 index 00000000000..75bc5074059 --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/query.python2-using-python3.expected @@ -0,0 +1,5 @@ +| name | ++----------+ +| dircache | +| stat | +| test | diff --git a/python/extractor/cli-integration-test/python-2-deprecation/query.ql b/python/extractor/cli-integration-test/python-2-deprecation/query.ql new file mode 100644 index 00000000000..3921f6387df --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/query.ql @@ -0,0 +1,18 @@ +import python +import semmle.python.types.Builtins + +predicate named_entity(string name, string kind) { + exists(Builtin::special(name)) and kind = "special" + or + exists(Builtin::builtin(name)) and kind = "builtin" + or + exists(Module m | m.getName() = name) and kind = "module" + or + exists(File f | f.getShortName() = name + ".py") and kind = "file" +} + +from string name +where + name in ["dircache", "test", "stat"] and + named_entity(name, "file") +select name order by name diff --git a/python/extractor/cli-integration-test/python-2-deprecation/query.without-python2.expected b/python/extractor/cli-integration-test/python-2-deprecation/query.without-python2.expected new file mode 100644 index 00000000000..3fa1f24a785 --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/query.without-python2.expected @@ -0,0 +1,4 @@ +| name | ++------+ +| stat | +| test | diff --git a/python/extractor/cli-integration-test/python-2-deprecation/repo_dir/setup.py b/python/extractor/cli-integration-test/python-2-deprecation/repo_dir/setup.py new file mode 100644 index 00000000000..f8d369cfad0 --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/repo_dir/setup.py @@ -0,0 +1 @@ +"Programming Language :: Python :: 2" diff --git a/python/extractor/cli-integration-test/python-2-deprecation/repo_dir/test.py b/python/extractor/cli-integration-test/python-2-deprecation/repo_dir/test.py new file mode 100644 index 00000000000..700a624b65b --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/repo_dir/test.py @@ -0,0 +1,5 @@ +# `dircache` was removed in Python 3, and so is a good test of which standard library we're +# extracting. +import dircache +# A module that's present in both Python 2 and 3 +import stat diff --git a/python/extractor/cli-integration-test/python-2-deprecation/test.sh b/python/extractor/cli-integration-test/python-2-deprecation/test.sh new file mode 100755 index 00000000000..8b756a0dbec --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/test.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +rm -rf dbs +rm -f *.actual + +mkdir dbs + +# NB: on our Linux CI infrastructure, `python` is aliased to `python3`. +WITHOUT_PYTHON2=$(pwd)/without-python2 +WITHOUT_PYTHON3=$(pwd)/without-python3 + +echo "Test 1: Only Python 2 is available. Should fail." +# Note the negation at the start of the command. +! PATH="$WITHOUT_PYTHON3:$PATH" $CODEQL database create dbs/only-python2-no-flag --language python --source-root repo_dir/ + +echo "Test 2: Only Python 3 is available. Should extract using Python 3 and use the Python 3 standard library." +PATH="$WITHOUT_PYTHON2:$PATH" $CODEQL database create dbs/without-python2 --language python --source-root repo_dir/ +$CODEQL query run --database dbs/without-python2 query.ql > query.without-python2.actual +diff query.without-python2.expected query.without-python2.actual + +echo "Test 3: Python 2 and 3 are both available. Should extract using Python 3, but use the Python 2 standard library." +$CODEQL database create dbs/python2-using-python3 --language python --source-root repo_dir/ +$CODEQL query run --database dbs/python2-using-python3 query.ql > query.python2-using-python3.actual +diff query.python2-using-python3.expected query.python2-using-python3.actual + +rm -f *.actual diff --git a/python/extractor/cli-integration-test/python-2-deprecation/without-python2/python2 b/python/extractor/cli-integration-test/python-2-deprecation/without-python2/python2 new file mode 100755 index 00000000000..4bbc47f8a0b --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/without-python2/python2 @@ -0,0 +1,4 @@ +echo "Attempted to run:" +echo " python2 $@" +echo "Failing instead." +exit 127 diff --git a/python/extractor/cli-integration-test/python-2-deprecation/without-python2/which b/python/extractor/cli-integration-test/python-2-deprecation/without-python2/which new file mode 100755 index 00000000000..c3bd5c78fa5 --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/without-python2/which @@ -0,0 +1,6 @@ +#!/bin/bash -p + +case $1 in + python2) exit 1;; + *) command /usr/bin/which -- "$1";; +esac \ No newline at end of file diff --git a/python/extractor/cli-integration-test/python-2-deprecation/without-python3/python b/python/extractor/cli-integration-test/python-2-deprecation/without-python3/python new file mode 100755 index 00000000000..d500093fcd3 --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/without-python3/python @@ -0,0 +1,4 @@ +echo "Attempted to run:" +echo " python $@" +echo "Failing instead." +exit 127 diff --git a/python/extractor/cli-integration-test/python-2-deprecation/without-python3/python3 b/python/extractor/cli-integration-test/python-2-deprecation/without-python3/python3 new file mode 100755 index 00000000000..199457a785e --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/without-python3/python3 @@ -0,0 +1,4 @@ +echo "Attempted to run:" +echo " python3 $@" +echo "Failing instead." +exit 127 diff --git a/python/extractor/cli-integration-test/python-2-deprecation/without-python3/which b/python/extractor/cli-integration-test/python-2-deprecation/without-python3/which new file mode 100755 index 00000000000..899656fdf74 --- /dev/null +++ b/python/extractor/cli-integration-test/python-2-deprecation/without-python3/which @@ -0,0 +1,9 @@ +#!/bin/bash -p + +echo "Fake which called with arguments: $@" + +case $1 in + python) exit 1;; + python3) exit 1;; + *) command /usr/bin/which -- "$1";; +esac \ No newline at end of file diff --git a/python/extractor/cli-integration-test/run-all-tests.sh b/python/extractor/cli-integration-test/run-all-tests.sh new file mode 100755 index 00000000000..0e458e585c9 --- /dev/null +++ b/python/extractor/cli-integration-test/run-all-tests.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +failures=() +for f in */test.sh; do + echo "Running $f:" + if ! bash "$f"; then + echo "ERROR: $f failed" + failures+=("$f") + fi + echo "---" +done + +if [ -z "${failures[*]}" ]; then + echo "All integration tests passed!" + exit 0 +else + echo "ERROR: Some integration test failed! Failures:" + for failure in "${failures[@]}" + do + echo "- ${failure}" + done + exit 1 +fi diff --git a/python/extractor/cli-integration-test/stdout-encoding/repo_dir/ನನ್ನ_ಸ್ಕ್ರಿಪ್ಟ್.py b/python/extractor/cli-integration-test/stdout-encoding/repo_dir/ನನ್ನ_ಸ್ಕ್ರಿಪ್ಟ್.py new file mode 100644 index 00000000000..517b47df53c --- /dev/null +++ b/python/extractor/cli-integration-test/stdout-encoding/repo_dir/ನನ್ನ_ಸ್ಕ್ರಿಪ್ಟ್.py @@ -0,0 +1 @@ +print(42) diff --git a/python/extractor/cli-integration-test/stdout-encoding/test.sh b/python/extractor/cli-integration-test/stdout-encoding/test.sh new file mode 100755 index 00000000000..347954c8090 --- /dev/null +++ b/python/extractor/cli-integration-test/stdout-encoding/test.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +rm -rf db + +# even with default encoding that doesn't support utf-8 (like on windows) we want to +# ensure that we can properly log that we've extracted files whose filenames contain +# utf-8 chars +export PYTHONIOENCODING="ascii" +$CODEQL database create db --language python --source-root repo_dir/ diff --git a/python/extractor/cli-integration-test/symlinks/.gitignore b/python/extractor/cli-integration-test/symlinks/.gitignore new file mode 100644 index 00000000000..8e28861cdaf --- /dev/null +++ b/python/extractor/cli-integration-test/symlinks/.gitignore @@ -0,0 +1,2 @@ +repo_dir/subdir +repo_dir/symlink_to_top diff --git a/python/extractor/cli-integration-test/symlinks/query.ql b/python/extractor/cli-integration-test/symlinks/query.ql new file mode 100644 index 00000000000..82198eaf87b --- /dev/null +++ b/python/extractor/cli-integration-test/symlinks/query.ql @@ -0,0 +1 @@ +select 1 diff --git a/python/extractor/cli-integration-test/symlinks/repo_dir/foo.py b/python/extractor/cli-integration-test/symlinks/repo_dir/foo.py new file mode 100644 index 00000000000..517b47df53c --- /dev/null +++ b/python/extractor/cli-integration-test/symlinks/repo_dir/foo.py @@ -0,0 +1 @@ +print(42) diff --git a/python/extractor/cli-integration-test/symlinks/test.sh b/python/extractor/cli-integration-test/symlinks/test.sh new file mode 100755 index 00000000000..aef8978bd54 --- /dev/null +++ b/python/extractor/cli-integration-test/symlinks/test.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +rm -rf db + +# create two symlink loops, so +# - repo_dir/subdir/symlink_to_top -> repo_dir +# - repo_dir/symlink_to_top -> repo_dir +# such a setup was seen in https://github.com/PowerDNS/weakforced + +rm -rf repo_dir/subdir +mkdir repo_dir/subdir +ln -s .. repo_dir/subdir/symlink_to_top + +rm -f repo_dir/symlink_to_top +ln -s . repo_dir/symlink_to_top + +timeout --verbose 15s $CODEQL database create db --language python --source-root repo_dir/ +$CODEQL query run --database db query.ql diff --git a/python/extractor/cli-integration-test/writing-diagnostics/diagnostics.expected b/python/extractor/cli-integration-test/writing-diagnostics/diagnostics.expected new file mode 100644 index 00000000000..de218a50e1e --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/diagnostics.expected @@ -0,0 +1,163 @@ +{ + "attributes": { + "args": [ + "Syntax Error" + ], + "traceback": [ + "\"semmle/python/modules.py\", line 108, in py_ast", + "\"semmle/python/modules.py\", line 102, in old_py_ast", + "\"semmle/python/parser/__init__.py\", line 100, in parse", + "\"semmleFile \"\", line 1", + "\"semmle/python/extractor.py\", line 84, in process_source_module", + "\"semmle/python/modules.py\", line 92, in ast", + "\"semmle/python/modules.py\", line 120, in py_ast", + "\"semmle/python/modules.py\", line 117, in py_ast", + "\"semmle/python/parser/tsg_parser.py\", line 221, in parse", + "\"semmleFile \"\", line 1" + ] + }, + "location": { + "file": "/repo_dir/syntaxerror3.py", + "startColumn": 0, + "endColumn": 0, + "startLine": 1, + "endLine": 1 + }, + "markdownMessage": "A parse error occurred while processing `/repo_dir/syntaxerror3.py`, and as a result this file could not be analyzed. Check the syntax of the file using the `python -m py_compile` command and correct any invalid syntax.", + "severity": "warning", + "source": { + "extractorName": "python", + "id": "py/diagnostics/syntax-error", + "name": "Could not process some files due to syntax errors" + }, + "timestamp": "2023-03-13T15:03:48.177832", + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "attributes": { + "args": [ + "Syntax Error" + ], + "traceback": [ + "\"semmle/python/modules.py\", line 108, in py_ast", + "\"semmle/python/modules.py\", line 102, in old_py_ast", + "\"semmle/python/parser/__init__.py\", line 100, in parse", + "\"semmleFile \"\", line 3", + "\"semmle/python/extractor.py\", line 84, in process_source_module", + "\"semmle/python/modules.py\", line 92, in ast", + "\"semmle/python/modules.py\", line 120, in py_ast", + "\"semmle/python/modules.py\", line 117, in py_ast", + "\"semmle/python/parser/tsg_parser.py\", line 221, in parse", + "\"semmleFile \"\", line 3" + ] + }, + "location": { + "file": "/repo_dir/syntaxerror1.py", + "startColumn": 0, + "endColumn": 0, + "startLine": 3, + "endLine": 3 + }, + "markdownMessage": "A parse error occurred while processing `/repo_dir/syntaxerror1.py`, and as a result this file could not be analyzed. Check the syntax of the file using the `python -m py_compile` command and correct any invalid syntax.", + "severity": "warning", + "source": { + "extractorName": "python", + "id": "py/diagnostics/syntax-error", + "name": "Could not process some files due to syntax errors" + }, + "timestamp": "2023-03-13T15:03:48.181384", + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "attributes": { + "args": [ + "Syntax Error" + ], + "traceback": [ + "\"semmle/python/modules.py\", line 108, in py_ast", + "\"semmle/python/modules.py\", line 102, in old_py_ast", + "\"semmle/python/parser/__init__.py\", line 100, in parse", + "\"semmleFile \"\", line 6", + "\"semmle/python/extractor.py\", line 84, in process_source_module", + "\"semmle/python/modules.py\", line 92, in ast", + "\"semmle/python/modules.py\", line 120, in py_ast", + "\"semmle/python/modules.py\", line 117, in py_ast", + "\"semmle/python/parser/tsg_parser.py\", line 221, in parse", + "\"semmleFile \"\", line 5" + ] + }, + "location": { + "file": "/repo_dir/syntaxerror2.py", + "startColumn": 0, + "endColumn": 0, + "startLine": 5, + "endLine": 5 + }, + "markdownMessage": "A parse error occurred while processing `/repo_dir/syntaxerror2.py`, and as a result this file could not be analyzed. Check the syntax of the file using the `python -m py_compile` command and correct any invalid syntax.", + "severity": "warning", + "source": { + "extractorName": "python", + "id": "py/diagnostics/syntax-error", + "name": "Could not process some files due to syntax errors" + }, + "timestamp": "2023-03-13T15:03:48.164991", + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} +{ + "attributes": { + "args": [ + "maximum recursion depth exceeded while calling a Python object" + ], + "traceback": [ + "\"semmle/worker.py\", line 235, in _extract_loop", + "\"semmle/extractors/super_extractor.py\", line 37, in process", + "\"semmle/extractors/py_extractor.py\", line 43, in process", + "\"semmle/python/extractor.py\", line 227, in process_source_module", + "\"semmle/python/extractor.py\", line 84, in process_source_module", + "\"semmle/python/modules.py\", line 96, in ast", + "\"semmle/python/passes/labeller.py\", line 85, in apply", + "\"semmle/python/passes/labeller.py\", line 44, in __init__", + "\"semmle/python/passes/labeller.py\", line 14, in __init__", + "\"semmle/python/passes/ast_pass.py\", line 208, in visit", + "\"semmle/python/passes/ast_pass.py\", line 216, in generic_visit", + "\"semmle/python/passes/ast_pass.py\", line 213, in generic_visit", + "\"semmle/python/passes/ast_pass.py\", line 208, in visit", + "\"semmle/python/passes/ast_pass.py\", line 213, in generic_visit", + "\"semmle/python/passes/ast_pass.py\", line 208, in visit", + "... 3930 lines skipped", + "\"semmle/python/passes/ast_pass.py\", line 213, in generic_visit", + "\"semmle/python/passes/ast_pass.py\", line 208, in visit", + "\"semmle/python/passes/ast_pass.py\", line 213, in generic_visit", + "\"semmle/python/passes/ast_pass.py\", line 208, in visit", + "\"semmle/python/passes/ast_pass.py\", line 205, in _get_visit_method" + ] + }, + "location": { + "file": "/repo_dir/recursion_error.py" + }, + "plaintextMessage": "maximum recursion depth exceeded while calling a Python object", + "severity": "error", + "source": { + "extractorName": "python", + "id": "py/diagnostics/recursion-error", + "name": "Recursion error in Python extractor" + }, + "timestamp": "2023-03-13T15:03:47.468924", + "visibility": { + "cliSummaryTable": false, + "statusPage": false, + "telemetry": true + } +} diff --git a/python/extractor/cli-integration-test/writing-diagnostics/make_test.py b/python/extractor/cli-integration-test/writing-diagnostics/make_test.py new file mode 100644 index 00000000000..66e84477a1b --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/make_test.py @@ -0,0 +1,4 @@ + +# Creates a test file that will cause a RecursionError when run with the Python extractor. +with open('repo_dir/recursion_error.py', 'w') as f: + f.write("print({})\n".format("+".join(["1"] * 1000))) diff --git a/python/extractor/cli-integration-test/writing-diagnostics/query.expected b/python/extractor/cli-integration-test/writing-diagnostics/query.expected new file mode 100644 index 00000000000..127af7fe20c --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/query.expected @@ -0,0 +1,6 @@ +| filename | ++-----------------+ +| safe.py | +| syntaxerror1.py | +| syntaxerror2.py | +| syntaxerror3.py | diff --git a/python/extractor/cli-integration-test/writing-diagnostics/query.ql b/python/extractor/cli-integration-test/writing-diagnostics/query.ql new file mode 100644 index 00000000000..f95676636d9 --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/query.ql @@ -0,0 +1,3 @@ +import python + +select any(File f).getShortName() as filename order by filename diff --git a/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/safe.py b/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/safe.py new file mode 100644 index 00000000000..9fcf0f1b882 --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/safe.py @@ -0,0 +1 @@ +print("No deeply nested structures here!") diff --git a/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/syntaxerror1.py b/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/syntaxerror1.py new file mode 100644 index 00000000000..75c745c8cd8 --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/syntaxerror1.py @@ -0,0 +1,3 @@ +# This file contains a deliberate syntax error + +2 + diff --git a/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/syntaxerror2.py b/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/syntaxerror2.py new file mode 100644 index 00000000000..9de43c0370f --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/syntaxerror2.py @@ -0,0 +1,5 @@ + + + + +[ diff --git a/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/syntaxerror3.py b/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/syntaxerror3.py new file mode 100644 index 00000000000..4e4800bd521 --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/repo_dir/syntaxerror3.py @@ -0,0 +1 @@ +"Oh no! diff --git a/python/extractor/cli-integration-test/writing-diagnostics/test.sh b/python/extractor/cli-integration-test/writing-diagnostics/test.sh new file mode 100755 index 00000000000..32915e2d73c --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/test.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ + +set -x + +CODEQL=${CODEQL:-codeql} + +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$SCRIPTDIR" + +rm -rf db +rm -f *.actual + +python3 make_test.py + +echo "Testing database with various errors during extraction" +$CODEQL database create db --language python --source-root repo_dir/ +$CODEQL query run --database db query.ql > query.actual +diff query.expected query.actual +python3 test_diagnostics_output.py + +rm -f *.actual +rm -f repo_dir/recursion_error.py +rm -rf db diff --git a/python/extractor/cli-integration-test/writing-diagnostics/test_diagnostics_output.py b/python/extractor/cli-integration-test/writing-diagnostics/test_diagnostics_output.py new file mode 100644 index 00000000000..39982596fc5 --- /dev/null +++ b/python/extractor/cli-integration-test/writing-diagnostics/test_diagnostics_output.py @@ -0,0 +1,7 @@ +import os +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "integration-tests")) +import diagnostics_test_utils + +test_db = "db" +diagnostics_test_utils.check_diagnostics(".", test_db, skip_attributes=True) diff --git a/python/extractor/convert_setup.py b/python/extractor/convert_setup.py new file mode 100644 index 00000000000..e50ced2d793 --- /dev/null +++ b/python/extractor/convert_setup.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python + +import os.path +import imp +import sys +import traceback +import re + +SETUP_TAG = "LGTM_PYTHON_SETUP_SETUP_PY" + +setup_file_path = "" +requirements_file_path = "" + +if sys.version_info >= (3,): + basestring = str + +def setup_interceptor(**args): + requirements = make_requirements(**args) + write_requirements_file(requirements) + +def make_requirements(requires=(), install_requires=(), extras_require={}, dependency_links=[], **other_args): + # Install main requirements. + requirements = list(requires) + list(install_requires) + # Install requirements for all features. + for feature, feature_requirements in extras_require.items(): + if isinstance(feature_requirements, basestring): + requirements += [feature_requirements] + else: + requirements += list(feature_requirements) + + # Attempt to use dependency_links to find requirements first. + for link in dependency_links: + split_link = link.rsplit("#egg=", 1) + if len(split_link) != 2: + print("Invalid dependency link \"%s\" was ignored." % link) + continue + if not link.startswith("http"): + print("Dependency link \"%s\" is not an HTTP link so is being ignored." % link) + continue + package_name = split_link[1].rsplit("-", 1)[0] + for index, requirement in enumerate(requirements): + if requirement_name(requirement) == package_name: + print("Using %s to install %s." % (link, requirement)) + requirements[index] = package_name + " @ " + link + + print("Creating %s file from %s." % (requirements_file_path, setup_file_path)) + requirements = [requirement.encode("ascii", "ignore").strip().decode("ascii") for requirement in requirements] + print("Requirements extracted from setup.py: %s" % requirements) + return requirements + +REQUIREMENT = re.compile(r"^([\w-]+)") + +def requirement_name(req_string): + req_string = req_string.strip() + if req_string[0] == '#': + return None + match = REQUIREMENT.match(req_string) + if match: + return match.group(1) + return None + + +def write_requirements_file(requirements): + if os.path.exists(requirements_file_path): + # Only overwrite the existing requirements if the new requirements are not empty. + if requirements: + print("%s already exists. It will be overwritten." % requirements_file_path) + else: + print("%s already exists and it will not be overwritten because the new requirements list is empty." % requirements_file_path) + return + elif not requirements: + print("%s will not be written because the new requirements list is empty." % requirements_file_path) + return + with open(requirements_file_path, "w") as requirements_file: + for requirement in requirements: + requirements_file.write(requirement + "\n") + print("Requirements have been written to " + requirements_file_path) + +def convert_setup_to_requirements(root): + global setup_file_path + if SETUP_TAG in os.environ: + setup_file_path = os.environ[SETUP_TAG] + if setup_file_path == "false": + print("setup.py explicitly ignored") + return 0 + else: + setup_file_path = os.path.join(root, "setup.py") + if not os.path.exists(setup_file_path): + print("%s does not exist. Not generating requirements.txt." % setup_file_path) + return 0 + # Override the setuptools and distutils.core implementation of setup with our own. + import setuptools + setattr(setuptools, "setup", setup_interceptor) + import distutils.core + setattr(distutils.core, "setup", setup_interceptor) + + # TODO: WHY are we inserting at index 1? + # >>> l = [1,2,3]; l.insert(1, 'x'); print(l) + # [1, 'x', 2, 3] + + # Ensure the current directory is on path since setup.py might try and include some files in it. + sys.path.insert(1, root) + + # Modify the arguments since the setup file sometimes checks them. + sys.argv = [setup_file_path, "build"] + + # Run the setup.py file. + try: + imp.load_source("__main__", setup_file_path) + except BaseException as ex: + # We don't really care about errors so long as a requirements.txt exists in the next build step. + print("Running %s failed." % setup_file_path) + traceback.print_exc(file=sys.stdout) + if not os.path.exists(requirements_file_path): + print("%s failed, and a %s file does not exist. Exiting with error." % (setup_file_path, requirements_file_path)) + return 1 + return 0 + +def main(): + global requirements_file_path + requirements_file_path = sys.argv[2] + sys.path.extend(sys.argv[3:]) + sys.exit(convert_setup_to_requirements(sys.argv[1])) + +if __name__ == "__main__": + main() diff --git a/python/extractor/data/python/stubs/README.md b/python/extractor/data/python/stubs/README.md new file mode 100644 index 00000000000..6b215666c4c --- /dev/null +++ b/python/extractor/data/python/stubs/README.md @@ -0,0 +1,3 @@ +This folder contains stubs for commonly used Python libraries, which have +the same interface as the original libraries, but are more amenable to +static analysis. The original licenses are noted in each subdirectory. diff --git a/python/extractor/data/python/stubs/six/LICENSE b/python/extractor/data/python/stubs/six/LICENSE new file mode 100644 index 00000000000..4b05a545261 --- /dev/null +++ b/python/extractor/data/python/stubs/six/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2010-2019 Benjamin Peterson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/python/extractor/data/python/stubs/six/__init__.py b/python/extractor/data/python/stubs/six/__init__.py new file mode 100644 index 00000000000..5ffa5618478 --- /dev/null +++ b/python/extractor/data/python/stubs/six/__init__.py @@ -0,0 +1,240 @@ +# Stub file for six. +#This should have the same interface as the six module, +#but be much more tractable for static analysis. + + + +"""Utilities for writing code that runs on Python 2 and 3""" + +# Copyright (c) 2015 Semmle Limited +# All rights reserved +# Note that the original six module is copyright Benjamin Peterson +# + +import operator +import sys +import types + +__author__ = "Benjamin Peterson " +__version__ = "1.14.0" + + +# Useful for very coarse version differentiation. +PY2 = sys.version_info < (3,) +PY3 = sys.version_info >= (3,) + +if PY3: + string_types = str, + integer_types = int, + class_types = type, + text_type = str + binary_type = bytes + + MAXSIZE = sys.maxsize +else: + string_types = basestring, + integer_types = (int, long) + class_types = (type, types.ClassType) + text_type = unicode + binary_type = str + #We can't compute MAXSIZE, but it doesn't really matter + MAXSIZE = int((1 << 63) - 1) + + +def _add_doc(func, doc): + """Add documentation to a function.""" + func.__doc__ = doc + + +def _import_module(name): + """Import module, returning the module after the last dot.""" + __import__(name) + return sys.modules[name] + +import six.moves as moves + + +def add_move(move): + """Add an item to six.moves.""" + setattr(_MovedItems, move.name, move) + + +def remove_move(name): + """Remove item from six.moves.""" + try: + delattr(_MovedItems, name) + except AttributeError: + try: + del moves.__dict__[name] + except KeyError: + raise AttributeError("no such move, %r" % (name,)) + + +if PY3: + _meth_func = "__func__" + _meth_self = "__self__" + + _func_closure = "__closure__" + _func_code = "__code__" + _func_defaults = "__defaults__" + _func_globals = "__globals__" + + _iterkeys = "keys" + _itervalues = "values" + _iteritems = "items" + _iterlists = "lists" +else: + _meth_func = "im_func" + _meth_self = "im_self" + + _func_closure = "func_closure" + _func_code = "func_code" + _func_defaults = "func_defaults" + _func_globals = "func_globals" + + _iterkeys = "iterkeys" + _itervalues = "itervalues" + _iteritems = "iteritems" + _iterlists = "iterlists" + + +try: + advance_iterator = next +except NameError: + def advance_iterator(it): + return it.next() +next = advance_iterator + + +try: + callable = callable +except NameError: + def callable(obj): + return any("__call__" in klass.__dict__ for klass in type(obj).__mro__) + + +if PY3: + def get_unbound_function(unbound): + return unbound + + create_bound_method = types.MethodType + + Iterator = object +else: + def get_unbound_function(unbound): + return unbound.im_func + + def create_bound_method(func, obj): + return types.MethodType(func, obj, obj.__class__) + + class Iterator(object): + + def next(self): + return type(self).__next__(self) + + callable = callable +_add_doc(get_unbound_function, + """Get the function out of a possibly unbound function""") + + +get_method_function = operator.attrgetter(_meth_func) +get_method_self = operator.attrgetter(_meth_self) +get_function_closure = operator.attrgetter(_func_closure) +get_function_code = operator.attrgetter(_func_code) +get_function_defaults = operator.attrgetter(_func_defaults) +get_function_globals = operator.attrgetter(_func_globals) + + +def iterkeys(d, **kw): + """Return an iterator over the keys of a dictionary.""" + return iter(getattr(d, _iterkeys)(**kw)) + +def itervalues(d, **kw): + """Return an iterator over the values of a dictionary.""" + return iter(getattr(d, _itervalues)(**kw)) + +def iteritems(d, **kw): + """Return an iterator over the (key, value) pairs of a dictionary.""" + return iter(getattr(d, _iteritems)(**kw)) + +def iterlists(d, **kw): + """Return an iterator over the (key, [values]) pairs of a dictionary.""" + return iter(getattr(d, _iterlists)(**kw)) + +def byte2int(ch): #type bytes -> int + return int(unknown()) + +def b(s): #type str -> bytes + """Byte literal""" + return bytes(unknown()) + +def u(s): #type str -> unicode + """Text literal""" + if PY3: + unicode = str + return unicode(unknown()) + +if PY3: + unichr = chr + def int2byte(i): #type int -> bytes + return bytes(unknown()) + indexbytes = operator.getitem + iterbytes = iter + import io + StringIO = io.StringIO + BytesIO = io.BytesIO +else: + unichr = unichr + int2byte = chr + def indexbytes(buf, i): + return int(unknown()) + def iterbytes(buf): + return (int(unknown()) for byte in buf) + import StringIO + StringIO = BytesIO = StringIO.StringIO + + +if PY3: + exec_ = getattr(six.moves.builtins, "exec") + + def reraise(tp, value, tb=None): + """Reraise an exception.""" + if value.__traceback__ is not tb: + raise value.with_traceback(tb) + raise value + +else: + def exec_(_code_, _globs_=None, _locs_=None): + pass + + def reraise(tp, value, tb=None): + """Reraise an exception.""" + exc = tp(value) + exc.__traceback__ = tb + raise exc + + +print_ = getattr(moves.builtins, "print", None) +if print_ is None: + def print_(*args, **kwargs): + """The new-style print function for Python 2.4 and 2.5.""" + pass + +def with_metaclass(meta, *bases): + """Create a base class with a metaclass.""" + return meta("NewBase", bases, {}) + +def add_metaclass(metaclass): + """Class decorator for creating a class with a metaclass.""" + def wrapper(cls): + orig_vars = cls.__dict__.copy() + orig_vars.pop('__dict__', None) + orig_vars.pop('__weakref__', None) + slots = orig_vars.get('__slots__') + if slots is not None: + if isinstance(slots, str): + slots = [slots] + for slots_var in slots: + orig_vars.pop(slots_var) + return metaclass(cls.__name__, cls.__bases__, orig_vars) + return wrapper diff --git a/python/extractor/data/python/stubs/six/moves/__init__.py b/python/extractor/data/python/stubs/six/moves/__init__.py new file mode 100644 index 00000000000..26af6d6ed0d --- /dev/null +++ b/python/extractor/data/python/stubs/six/moves/__init__.py @@ -0,0 +1,239 @@ +# six.moves + +import sys +PY2 = sys.version_info < (3,) +PY3 = sys.version_info >= (3,) + +# Generated (six_gen.py) from six version 1.14.0 with Python 2.7.17 (default, Nov 18 2019, 13:12:39) +if PY2: + import cStringIO as _1 + cStringIO = _1.StringIO + import itertools as _2 + filter = _2.filter + filterfalse = _2.filterfalse + import __builtin__ as _3 + input = _3.raw_input + intern = _3.intern + map = _2.map + import os as _4 + getcwd = _4.getcwdu + getcwdb = _4.getcwd + import commands as _5 + getoutput = _5.getoutput + range = _3.xrange + reload_module = _3.reload + reduce = _3.reduce + import pipes as _6 + shlex_quote = _6.quote + import StringIO as _7 + StringIO = _7.StringIO + import UserDict as _8 + UserDict = _8.UserDict + import UserList as _9 + UserList = _9.UserList + import UserString as _10 + UserString = _10.UserString + xrange = _3.xrange + zip = zip + zip_longest = _2.zip_longest + import __builtin__ as builtins + import ConfigParser as configparser + import collections as collections_abc + import copy_reg as copyreg + import gdbm as dbm_gnu + import dbm as dbm_ndbm + import dummy_thread as _dummy_thread + import cookielib as http_cookiejar + import Cookie as http_cookies + import htmlentitydefs as html_entities + import HTMLParser as html_parser + import httplib as http_client + import email.MIMEBase as email_mime_base + import email.MIMEImage as email_mime_image + import email.MIMEMultipart as email_mime_multipart + import email.MIMENonMultipart as email_mime_nonmultipart + import email.MIMEText as email_mime_text + import BaseHTTPServer as BaseHTTPServer + import CGIHTTPServer as CGIHTTPServer + import SimpleHTTPServer as SimpleHTTPServer + import cPickle as cPickle + import Queue as queue + import repr as reprlib + import SocketServer as socketserver + import thread as _thread + import Tkinter as tkinter + import Dialog as tkinter_dialog + import FileDialog as tkinter_filedialog + import ScrolledText as tkinter_scrolledtext + import SimpleDialog as tkinter_simpledialog + import Tix as tkinter_tix + import ttk as tkinter_ttk + import Tkconstants as tkinter_constants + import Tkdnd as tkinter_dnd + import tkColorChooser as tkinter_colorchooser + import tkCommonDialog as tkinter_commondialog + import tkFileDialog as tkinter_tkfiledialog + import tkFont as tkinter_font + import tkMessageBox as tkinter_messagebox + import tkSimpleDialog as tkinter_tksimpledialog + import xmlrpclib as xmlrpc_client + import SimpleXMLRPCServer as xmlrpc_server + del _1 + del _5 + del _7 + del _8 + del _6 + del _3 + del _9 + del _2 + del _10 + del _4 + +# Generated (six_gen.py) from six version 1.14.0 with Python 3.8.0 (default, Nov 18 2019, 13:17:17) +if PY3: + import io as _1 + cStringIO = _1.StringIO + import builtins as _2 + filter = _2.filter + import itertools as _3 + filterfalse = _3.filterfalse + input = _2.input + import sys as _4 + intern = _4.intern + map = _2.map + import os as _5 + getcwd = _5.getcwd + getcwdb = _5.getcwdb + import subprocess as _6 + getoutput = _6.getoutput + range = _2.range + import importlib as _7 + reload_module = _7.reload + import functools as _8 + reduce = _8.reduce + import shlex as _9 + shlex_quote = _9.quote + StringIO = _1.StringIO + import collections as _10 + UserDict = _10.UserDict + UserList = _10.UserList + UserString = _10.UserString + xrange = _2.range + zip = _2.zip + zip_longest = _3.zip_longest + import builtins as builtins + import configparser as configparser + import collections.abc as collections_abc + import copyreg as copyreg + import dbm.gnu as dbm_gnu + import dbm.ndbm as dbm_ndbm + import _dummy_thread as _dummy_thread + import http.cookiejar as http_cookiejar + import http.cookies as http_cookies + import html.entities as html_entities + import html.parser as html_parser + import http.client as http_client + import email.mime.base as email_mime_base + import email.mime.image as email_mime_image + import email.mime.multipart as email_mime_multipart + import email.mime.nonmultipart as email_mime_nonmultipart + import email.mime.text as email_mime_text + import http.server as BaseHTTPServer + import http.server as CGIHTTPServer + import http.server as SimpleHTTPServer + import pickle as cPickle + import queue as queue + import reprlib as reprlib + import socketserver as socketserver + import _thread as _thread + import tkinter as tkinter + import tkinter.dialog as tkinter_dialog + import tkinter.filedialog as tkinter_filedialog + import tkinter.scrolledtext as tkinter_scrolledtext + import tkinter.simpledialog as tkinter_simpledialog + import tkinter.tix as tkinter_tix + import tkinter.ttk as tkinter_ttk + import tkinter.constants as tkinter_constants + import tkinter.dnd as tkinter_dnd + import tkinter.colorchooser as tkinter_colorchooser + import tkinter.commondialog as tkinter_commondialog + import tkinter.filedialog as tkinter_tkfiledialog + import tkinter.font as tkinter_font + import tkinter.messagebox as tkinter_messagebox + import tkinter.simpledialog as tkinter_tksimpledialog + import xmlrpc.client as xmlrpc_client + import xmlrpc.server as xmlrpc_server + del _1 + del _2 + del _3 + del _4 + del _5 + del _6 + del _7 + del _8 + del _9 + del _10 + +# Not generated: + +import six.moves.urllib as urllib +import six.moves.urllib_parse as urllib_parse +import six.moves.urllib_response as urllib_response +import six.moves.urllib_request as urllib_request +import six.moves.urllib_error as urllib_error +import six.moves.urllib_robotparser as urllib_robotparser + + +sys.modules['six.moves.builtins'] = builtins +sys.modules['six.moves.configparser'] = configparser +sys.modules['six.moves.collections_abc'] = collections_abc +sys.modules['six.moves.copyreg'] = copyreg +sys.modules['six.moves.dbm_gnu'] = dbm_gnu +sys.modules['six.moves.dbm_ndbm'] = dbm_ndbm +sys.modules['six.moves._dummy_thread'] = _dummy_thread +sys.modules['six.moves.http_cookiejar'] = http_cookiejar +sys.modules['six.moves.http_cookies'] = http_cookies +sys.modules['six.moves.html_entities'] = html_entities +sys.modules['six.moves.html_parser'] = html_parser +sys.modules['six.moves.http_client'] = http_client +sys.modules['six.moves.email_mime_base'] = email_mime_base +sys.modules['six.moves.email_mime_image'] = email_mime_image +sys.modules['six.moves.email_mime_multipart'] = email_mime_multipart +sys.modules['six.moves.email_mime_nonmultipart'] = email_mime_nonmultipart +sys.modules['six.moves.email_mime_text'] = email_mime_text +sys.modules['six.moves.BaseHTTPServer'] = BaseHTTPServer +sys.modules['six.moves.CGIHTTPServer'] = CGIHTTPServer +sys.modules['six.moves.SimpleHTTPServer'] = SimpleHTTPServer +sys.modules['six.moves.cPickle'] = cPickle +sys.modules['six.moves.queue'] = queue +sys.modules['six.moves.reprlib'] = reprlib +sys.modules['six.moves.socketserver'] = socketserver +sys.modules['six.moves._thread'] = _thread +sys.modules['six.moves.tkinter'] = tkinter +sys.modules['six.moves.tkinter_dialog'] = tkinter_dialog +sys.modules['six.moves.tkinter_filedialog'] = tkinter_filedialog +sys.modules['six.moves.tkinter_scrolledtext'] = tkinter_scrolledtext +sys.modules['six.moves.tkinter_simpledialog'] = tkinter_simpledialog +sys.modules['six.moves.tkinter_tix'] = tkinter_tix +sys.modules['six.moves.tkinter_ttk'] = tkinter_ttk +sys.modules['six.moves.tkinter_constants'] = tkinter_constants +sys.modules['six.moves.tkinter_dnd'] = tkinter_dnd +sys.modules['six.moves.tkinter_colorchooser'] = tkinter_colorchooser +sys.modules['six.moves.tkinter_commondialog'] = tkinter_commondialog +sys.modules['six.moves.tkinter_tkfiledialog'] = tkinter_tkfiledialog +sys.modules['six.moves.tkinter_font'] = tkinter_font +sys.modules['six.moves.tkinter_messagebox'] = tkinter_messagebox +sys.modules['six.moves.tkinter_tksimpledialog'] = tkinter_tksimpledialog +sys.modules['six.moves.xmlrpc_client'] = xmlrpc_client +sys.modules['six.moves.xmlrpc_server'] = xmlrpc_server + +# Windows special + +if PY2: + import _winreg as winreg +if PY3: + import winreg as winreg + +sys.modules['six.moves.winreg'] = winreg + +del sys diff --git a/python/extractor/data/python/stubs/six/moves/urllib/__init__.py b/python/extractor/data/python/stubs/six/moves/urllib/__init__.py new file mode 100644 index 00000000000..b2dce83a06e --- /dev/null +++ b/python/extractor/data/python/stubs/six/moves/urllib/__init__.py @@ -0,0 +1,15 @@ +import sys + +import six.moves.urllib_error as error +import six.moves.urllib_parse as parse +import six.moves.urllib_request as request +import six.moves.urllib_response as response +import six.moves.urllib_robotparser as robotparser + +sys.modules['six.moves.urllib.error'] = error +sys.modules['six.moves.urllib.parse'] = parse +sys.modules['six.moves.urllib.request'] = request +sys.modules['six.moves.urllib.response'] = response +sys.modules['six.moves.urllib.robotparser'] = robotparser + +del sys diff --git a/python/extractor/data/python/stubs/six/moves/urllib_error.py b/python/extractor/data/python/stubs/six/moves/urllib_error.py new file mode 100644 index 00000000000..beb5b4dab28 --- /dev/null +++ b/python/extractor/data/python/stubs/six/moves/urllib_error.py @@ -0,0 +1,21 @@ +# six.moves.urllib_error + +from six import PY2, PY3 + +# Generated (six_gen.py) from six version 1.14.0 with Python 2.7.17 (default, Nov 18 2019, 13:12:39) +if PY2: + import urllib2 as _1 + URLError = _1.URLError + HTTPError = _1.HTTPError + import urllib as _2 + ContentTooShortError = _2.ContentTooShortError + del _1 + del _2 + +# Generated (six_gen.py) from six version 1.14.0 with Python 3.8.0 (default, Nov 18 2019, 13:17:17) +if PY3: + import urllib.error as _1 + URLError = _1.URLError + HTTPError = _1.HTTPError + ContentTooShortError = _1.ContentTooShortError + del _1 diff --git a/python/extractor/data/python/stubs/six/moves/urllib_parse.py b/python/extractor/data/python/stubs/six/moves/urllib_parse.py new file mode 100644 index 00000000000..7eb87909634 --- /dev/null +++ b/python/extractor/data/python/stubs/six/moves/urllib_parse.py @@ -0,0 +1,65 @@ +# six.moves.urllib_parse + +from six import PY2, PY3 + +# Generated (six_gen.py) from six version 1.14.0 with Python 2.7.17 (default, Nov 18 2019, 13:12:39) +if PY2: + import urlparse as _1 + ParseResult = _1.ParseResult + SplitResult = _1.SplitResult + parse_qs = _1.parse_qs + parse_qsl = _1.parse_qsl + urldefrag = _1.urldefrag + urljoin = _1.urljoin + urlparse = _1.urlparse + urlsplit = _1.urlsplit + urlunparse = _1.urlunparse + urlunsplit = _1.urlunsplit + import urllib as _2 + quote = _2.quote + quote_plus = _2.quote_plus + unquote = _2.unquote + unquote_plus = _2.unquote_plus + unquote_to_bytes = _2.unquote + urlencode = _2.urlencode + splitquery = _2.splitquery + splittag = _2.splittag + splituser = _2.splituser + splitvalue = _2.splitvalue + uses_fragment = _1.uses_fragment + uses_netloc = _1.uses_netloc + uses_params = _1.uses_params + uses_query = _1.uses_query + uses_relative = _1.uses_relative + del _1 + del _2 + +# Generated (six_gen.py) from six version 1.14.0 with Python 3.8.0 (default, Nov 18 2019, 13:17:17) +if PY3: + import urllib.parse as _1 + ParseResult = _1.ParseResult + SplitResult = _1.SplitResult + parse_qs = _1.parse_qs + parse_qsl = _1.parse_qsl + urldefrag = _1.urldefrag + urljoin = _1.urljoin + urlparse = _1.urlparse + urlsplit = _1.urlsplit + urlunparse = _1.urlunparse + urlunsplit = _1.urlunsplit + quote = _1.quote + quote_plus = _1.quote_plus + unquote = _1.unquote + unquote_plus = _1.unquote_plus + unquote_to_bytes = _1.unquote_to_bytes + urlencode = _1.urlencode + splitquery = _1.splitquery + splittag = _1.splittag + splituser = _1.splituser + splitvalue = _1.splitvalue + uses_fragment = _1.uses_fragment + uses_netloc = _1.uses_netloc + uses_params = _1.uses_params + uses_query = _1.uses_query + uses_relative = _1.uses_relative + del _1 diff --git a/python/extractor/data/python/stubs/six/moves/urllib_request.py b/python/extractor/data/python/stubs/six/moves/urllib_request.py new file mode 100644 index 00000000000..c43331560e3 --- /dev/null +++ b/python/extractor/data/python/stubs/six/moves/urllib_request.py @@ -0,0 +1,85 @@ +# six.moves.urllib_request + +from six import PY2, PY3 + +# Generated (six_gen.py) from six version 1.14.0 with Python 2.7.17 (default, Nov 18 2019, 13:12:39) +if PY2: + import urllib2 as _1 + urlopen = _1.urlopen + install_opener = _1.install_opener + build_opener = _1.build_opener + import urllib as _2 + pathname2url = _2.pathname2url + url2pathname = _2.url2pathname + getproxies = _2.getproxies + Request = _1.Request + OpenerDirector = _1.OpenerDirector + HTTPDefaultErrorHandler = _1.HTTPDefaultErrorHandler + HTTPRedirectHandler = _1.HTTPRedirectHandler + HTTPCookieProcessor = _1.HTTPCookieProcessor + ProxyHandler = _1.ProxyHandler + BaseHandler = _1.BaseHandler + HTTPPasswordMgr = _1.HTTPPasswordMgr + HTTPPasswordMgrWithDefaultRealm = _1.HTTPPasswordMgrWithDefaultRealm + AbstractBasicAuthHandler = _1.AbstractBasicAuthHandler + HTTPBasicAuthHandler = _1.HTTPBasicAuthHandler + ProxyBasicAuthHandler = _1.ProxyBasicAuthHandler + AbstractDigestAuthHandler = _1.AbstractDigestAuthHandler + HTTPDigestAuthHandler = _1.HTTPDigestAuthHandler + ProxyDigestAuthHandler = _1.ProxyDigestAuthHandler + HTTPHandler = _1.HTTPHandler + HTTPSHandler = _1.HTTPSHandler + FileHandler = _1.FileHandler + FTPHandler = _1.FTPHandler + CacheFTPHandler = _1.CacheFTPHandler + UnknownHandler = _1.UnknownHandler + HTTPErrorProcessor = _1.HTTPErrorProcessor + urlretrieve = _2.urlretrieve + urlcleanup = _2.urlcleanup + URLopener = _2.URLopener + FancyURLopener = _2.FancyURLopener + proxy_bypass = _2.proxy_bypass + parse_http_list = _1.parse_http_list + parse_keqv_list = _1.parse_keqv_list + del _1 + del _2 + +# Generated (six_gen.py) from six version 1.14.0 with Python 3.8.0 (default, Nov 18 2019, 13:17:17) +if PY3: + import urllib.request as _1 + urlopen = _1.urlopen + install_opener = _1.install_opener + build_opener = _1.build_opener + pathname2url = _1.pathname2url + url2pathname = _1.url2pathname + getproxies = _1.getproxies + Request = _1.Request + OpenerDirector = _1.OpenerDirector + HTTPDefaultErrorHandler = _1.HTTPDefaultErrorHandler + HTTPRedirectHandler = _1.HTTPRedirectHandler + HTTPCookieProcessor = _1.HTTPCookieProcessor + ProxyHandler = _1.ProxyHandler + BaseHandler = _1.BaseHandler + HTTPPasswordMgr = _1.HTTPPasswordMgr + HTTPPasswordMgrWithDefaultRealm = _1.HTTPPasswordMgrWithDefaultRealm + AbstractBasicAuthHandler = _1.AbstractBasicAuthHandler + HTTPBasicAuthHandler = _1.HTTPBasicAuthHandler + ProxyBasicAuthHandler = _1.ProxyBasicAuthHandler + AbstractDigestAuthHandler = _1.AbstractDigestAuthHandler + HTTPDigestAuthHandler = _1.HTTPDigestAuthHandler + ProxyDigestAuthHandler = _1.ProxyDigestAuthHandler + HTTPHandler = _1.HTTPHandler + HTTPSHandler = _1.HTTPSHandler + FileHandler = _1.FileHandler + FTPHandler = _1.FTPHandler + CacheFTPHandler = _1.CacheFTPHandler + UnknownHandler = _1.UnknownHandler + HTTPErrorProcessor = _1.HTTPErrorProcessor + urlretrieve = _1.urlretrieve + urlcleanup = _1.urlcleanup + URLopener = _1.URLopener + FancyURLopener = _1.FancyURLopener + proxy_bypass = _1.proxy_bypass + parse_http_list = _1.parse_http_list + parse_keqv_list = _1.parse_keqv_list + del _1 diff --git a/python/extractor/data/python/stubs/six/moves/urllib_response.py b/python/extractor/data/python/stubs/six/moves/urllib_response.py new file mode 100644 index 00000000000..d0903b61bf8 --- /dev/null +++ b/python/extractor/data/python/stubs/six/moves/urllib_response.py @@ -0,0 +1,21 @@ +# six.moves.urllib_response + +from six import PY2, PY3 + +# Generated (six_gen.py) from six version 1.14.0 with Python 2.7.17 (default, Nov 18 2019, 13:12:39) +if PY2: + import urllib as _1 + addbase = _1.addbase + addclosehook = _1.addclosehook + addinfo = _1.addinfo + addinfourl = _1.addinfourl + del _1 + +# Generated (six_gen.py) from six version 1.14.0 with Python 3.8.0 (default, Nov 18 2019, 13:17:17) +if PY3: + import urllib.response as _1 + addbase = _1.addbase + addclosehook = _1.addclosehook + addinfo = _1.addinfo + addinfourl = _1.addinfourl + del _1 diff --git a/python/extractor/data/python/stubs/six/moves/urllib_robotparser.py b/python/extractor/data/python/stubs/six/moves/urllib_robotparser.py new file mode 100644 index 00000000000..e49ef0ade88 --- /dev/null +++ b/python/extractor/data/python/stubs/six/moves/urllib_robotparser.py @@ -0,0 +1,15 @@ +# six.moves.urllib_robotparser + +from six import PY2, PY3 + +# Generated (six_gen.py) from six version 1.14.0 with Python 2.7.17 (default, Nov 18 2019, 13:12:39) +if PY2: + import robotparser as _1 + RobotFileParser = _1.RobotFileParser + del _1 + +# Generated (six_gen.py) from six version 1.14.0 with Python 3.8.0 (default, Nov 18 2019, 13:17:17) +if PY3: + import urllib.robotparser as _1 + RobotFileParser = _1.RobotFileParser + del _1 diff --git a/python/extractor/docs/extractor-python-index.svg b/python/extractor/docs/extractor-python-index.svg new file mode 100644 index 00000000000..e7dc29b7366 --- /dev/null +++ b/python/extractor/docs/extractor-python-index.svg @@ -0,0 +1,3 @@ + + +
    runs
    runs
    codeql database create
    codeql database create
    exec python index.py
    exec python index.py
    language-packs/python/tools/autobuild.sh
    language-packs/python/tools/autobuild.sh
    python index.py
    python index.py
    index.py1) add zipfile to path2) buildtools.index.main()buildtools.index.main()1) version = buildtools.discover.get_version()2) options = buildtools.index.extractor_options(version)3) subprocess.check_call(['python{version}', 'python_tracer.py'] + options)
    buildtools.index.extractor_options(version)
    buildtools.index.extractor_options(version)
    buildtools.index.get_path_options(version)
    buildtools.index.get_path_options(version)
    buildtools.install.get_library(version)
    buildtools.install.get_library(versi...
    subprocess.check_output()
    subprocess.check_output()
    python_executable get_venv_lib.py
    python_executable get_venv_lib.py
    'index' step on LGTM.com
    'index' step on LGTM.com
    python index.py
    python index.py
    lgtm-buildtools/buildtools/python/index.sh
    lgtm-buildtools/buildtools/python/index.sh
    buildtools.install.Venv.lib()1) self.venv_executable = $LGTM_WORKSPACE/venv/bin/python2) if os.path.exists(self.venv_executable):        python_executable = [self.venv_executable]    else:        python_executable = executable(self.version)3) try:        return subprocess.check_outputl(python_executable + ['get_venv_lib.py']    except:        <some error handling code that seems buggy>get_venv_lib.pyprint(get_venv_lib())get_venv_lib.get_venv_lib()try:    return pip_installed_folder()except:    return first_site_packages()
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/python/extractor/docs/extractor-python-setup.svg b/python/extractor/docs/extractor-python-setup.svg new file mode 100644 index 00000000000..339568416e7 --- /dev/null +++ b/python/extractor/docs/extractor-python-setup.svg @@ -0,0 +1,3 @@ + + +
    python setup.py
    python setup.py
    'python_setup' step on LGTM.com
    'python_setup' step on LGTM.com
    python ${LGTM_BUILDTOOLS}/python/setup.py
    python ${LGTM_BUILDTOOLS}/python/setup.py
    lgtm-buildtools/buildtools/python_setup.sh
    lgtm-buildtools/buildtools/python_setup.sh
    subprocess.call(["python", "$SEMMLE_DIST/tools/setup.py"])
    subprocess.call(["python", "$SEMMLE_DIST/tools/setup.py"])
    lgtm-buildtools/buildtools/python/setup.py
    lgtm-buildtools/buildtools/python/setup.py
    setup.py1) add zipfile to path2) version, root, requirement_files = buildtools.discover.discover()3) buildtools.install.main(version, root, requirement_files)buildtools.install.main(version, root, requirement_files)1) venv = buildtools.install.Venv("$LGTM_WORKSPACE/venv", version)2) venv.create()
    3) requirements_from_setup = "$LGTM_WORKSPACE/setup_requirements.txt"
    3) requirements_from_setup = "$LGTM_WORKSPACE/setup_requirements.txt"
    4) args = [root, requirements_from_setup, system_packages(version)]5) subprocess.call([venv.venv_executable, 'convert_setup.py'] + args)6) if os.path.exists(requirements_from_setup):        requirement_files = [ requirements_from_setup ] + requirement_files[1:]7) requirements = unify_requirements.gather(requirement_files)8) buildtools.auto_install.install(requirements, venv)buildtools.install.Venv.create()1) exe = buildtools.version.executable(self.version)2) if self.version == 2:      subprocess.check_call(exe, ["-m", "virtualenv", "$LGTM_WORKSPACE/venv"]
    3) if self.version == 3:
          subprocess.check_call(exe, ["-m", "venv", "$LGTM_WORKSPACE/venv"
    3) if self.version == 3:...
    $LGTM_WORKSPACE/venv/bin/python convert_setup.py
    $LGTM_WORKSPACE/venv/bin/python convert_setup.py
    running root/setup.py
    running root/setup.py
    convert_setup.py1) root = sys.argv[1]    global requirements_file_path = sys.argv[2]    sys.path.extend(sys.argv[3:])    override = os.environ.get("LGTM_PYTHON_SETUP_SETUP_PY")2) if override == "false":       sys.exit(0)3) if override:        setup_file_path = os.path.join(override, 'setup.py')    else:        setup_file_path = os.path.join(root, 'setup.py')4) setattr(setuptools, "setup", setup_interceptor)    setattr(distutils.core, "setup", setup_interceptor)
    5) imp.load_source(setup_file_path)
        as though invoked as './setup.py build'
    5) imp.load_source(setup_file_path)...
    convert_setup.setup_interceptor(**args)
    1) requirements = gather requirements from **args
    ('requires', 'install_requires', 'extras_require', 'dependency_links')
    1) requirements = gather requirements from **args...
    2) write 'requirements' to 'global requirements_file_path' 
        ("$LGTM_WORKSPACE/setup_requirements.txt")
    2) write 'requirements' to 'global requirements_file_path'...
    buildtools.auto_install.install(requirements, venv)
    informally what boils down to
    for req in requirements:
        run $LGTM_WORKSPACE/venv/bin/python -m pip install 'req'
    informally what boils down to...
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/python/extractor/get_venv_lib.py b/python/extractor/get_venv_lib.py new file mode 100644 index 00000000000..7adcaa4589a --- /dev/null +++ b/python/extractor/get_venv_lib.py @@ -0,0 +1,35 @@ +import os +import sys + + +def pip_installed_folder(): + try: + import pip + except ImportError: + print("ERROR: 'pip' not installed.") + sys.exit(2) + dirname, filename = os.path.split(pip.__file__) + if filename.startswith("__init__."): + dirname = os.path.dirname(dirname) + return dirname + +def first_site_packages(): + dist_packages = None + for path in sys.path: + if "site-packages" in path: + return path + if "dist-packages" in path and not dist_packages: + dist_packages = path + if dist_packages: + return dist_packages + # No site-packages or dist-packages? + raise Exception + +def get_venv_lib(): + try: + return pip_installed_folder() + except: + return first_site_packages() + +if __name__=='__main__': + print(get_venv_lib()) diff --git a/python/extractor/imp.py b/python/extractor/imp.py new file mode 100644 index 00000000000..6a0685559fd --- /dev/null +++ b/python/extractor/imp.py @@ -0,0 +1,344 @@ +"""This module provides the components needed to build your own __import__ +function. Undocumented functions are obsolete. + +In most cases it is preferred you consider using the importlib module's +functionality over this module. + +This file was copied from `Lib/imp.py`, copyright PSF, with minor modifications made afterward. +""" +# (Probably) need to stay in _imp +from _imp import (lock_held, acquire_lock, release_lock, + get_frozen_object, is_frozen_package, + init_frozen, is_builtin, is_frozen, + _fix_co_filename) +try: + from _imp import create_dynamic +except ImportError: + # Platform doesn't support dynamic loading. + create_dynamic = None + +from importlib._bootstrap import _ERR_MSG, _exec, _load, _builtin_from_name +from importlib._bootstrap_external import SourcelessFileLoader + +from importlib import machinery +from importlib import util +import importlib +import os +import sys +import tokenize +import types +import warnings + + + +# DEPRECATED +SEARCH_ERROR = 0 +PY_SOURCE = 1 +PY_COMPILED = 2 +C_EXTENSION = 3 +PY_RESOURCE = 4 +PKG_DIRECTORY = 5 +C_BUILTIN = 6 +PY_FROZEN = 7 +PY_CODERESOURCE = 8 +IMP_HOOK = 9 + + +def new_module(name): + """**DEPRECATED** + + Create a new module. + + The module is not entered into sys.modules. + + """ + return types.ModuleType(name) + + +def get_magic(): + """**DEPRECATED** + + Return the magic number for .pyc files. + """ + return util.MAGIC_NUMBER + + +def get_tag(): + """Return the magic tag for .pyc files.""" + return sys.implementation.cache_tag + + +def cache_from_source(path, debug_override=None): + """**DEPRECATED** + + Given the path to a .py file, return the path to its .pyc file. + + The .py file does not need to exist; this simply returns the path to the + .pyc file calculated as if the .py file were imported. + + If debug_override is not None, then it must be a boolean and is used in + place of sys.flags.optimize. + + If sys.implementation.cache_tag is None then NotImplementedError is raised. + + """ + with warnings.catch_warnings(): + warnings.simplefilter('ignore') + return util.cache_from_source(path, debug_override) + + +def source_from_cache(path): + """**DEPRECATED** + + Given the path to a .pyc. file, return the path to its .py file. + + The .pyc file does not need to exist; this simply returns the path to + the .py file calculated to correspond to the .pyc file. If path does + not conform to PEP 3147 format, ValueError will be raised. If + sys.implementation.cache_tag is None then NotImplementedError is raised. + + """ + return util.source_from_cache(path) + + +def get_suffixes(): + """**DEPRECATED**""" + extensions = [(s, 'rb', C_EXTENSION) for s in machinery.EXTENSION_SUFFIXES] + source = [(s, 'r', PY_SOURCE) for s in machinery.SOURCE_SUFFIXES] + bytecode = [(s, 'rb', PY_COMPILED) for s in machinery.BYTECODE_SUFFIXES] + + return extensions + source + bytecode + + +class NullImporter: + + """**DEPRECATED** + + Null import object. + + """ + + def __init__(self, path): + if path == '': + raise ImportError('empty pathname', path='') + elif os.path.isdir(path): + raise ImportError('existing directory', path=path) + + def find_module(self, fullname): + """Always returns None.""" + return None + + +class _HackedGetData: + + """Compatibility support for 'file' arguments of various load_*() + functions.""" + + def __init__(self, fullname, path, file=None): + super().__init__(fullname, path) + self.file = file + + def get_data(self, path): + """Gross hack to contort loader to deal w/ load_*()'s bad API.""" + if self.file and path == self.path: + # The contract of get_data() requires us to return bytes. Reopen the + # file in binary mode if needed. + if not self.file.closed: + file = self.file + if 'b' not in file.mode: + file.close() + if self.file.closed: + self.file = file = open(self.path, 'rb') + + with file: + return file.read() + else: + return super().get_data(path) + + +class _LoadSourceCompatibility(_HackedGetData, machinery.SourceFileLoader): + + """Compatibility support for implementing load_source().""" + + +def load_source(name, pathname, file=None): + loader = _LoadSourceCompatibility(name, pathname, file) + spec = util.spec_from_file_location(name, pathname, loader=loader) + if name in sys.modules: + module = _exec(spec, sys.modules[name]) + else: + module = _load(spec) + # To allow reloading to potentially work, use a non-hacked loader which + # won't rely on a now-closed file object. + module.__loader__ = machinery.SourceFileLoader(name, pathname) + module.__spec__.loader = module.__loader__ + return module + + +class _LoadCompiledCompatibility(_HackedGetData, SourcelessFileLoader): + + """Compatibility support for implementing load_compiled().""" + + +def load_compiled(name, pathname, file=None): + """**DEPRECATED**""" + loader = _LoadCompiledCompatibility(name, pathname, file) + spec = util.spec_from_file_location(name, pathname, loader=loader) + if name in sys.modules: + module = _exec(spec, sys.modules[name]) + else: + module = _load(spec) + # To allow reloading to potentially work, use a non-hacked loader which + # won't rely on a now-closed file object. + module.__loader__ = SourcelessFileLoader(name, pathname) + module.__spec__.loader = module.__loader__ + return module + + +def load_package(name, path): + """**DEPRECATED**""" + if os.path.isdir(path): + extensions = (machinery.SOURCE_SUFFIXES[:] + + machinery.BYTECODE_SUFFIXES[:]) + for extension in extensions: + init_path = os.path.join(path, '__init__' + extension) + if os.path.exists(init_path): + path = init_path + break + else: + raise ValueError('{!r} is not a package'.format(path)) + spec = util.spec_from_file_location(name, path, + submodule_search_locations=[]) + if name in sys.modules: + return _exec(spec, sys.modules[name]) + else: + return _load(spec) + + +def load_module(name, file, filename, details): + """**DEPRECATED** + + Load a module, given information returned by find_module(). + + The module name must include the full package name, if any. + + """ + suffix, mode, type_ = details + if mode and (not mode.startswith(('r', 'U')) or '+' in mode): + raise ValueError('invalid file open mode {!r}'.format(mode)) + elif file is None and type_ in {PY_SOURCE, PY_COMPILED}: + msg = 'file object required for import (type code {})'.format(type_) + raise ValueError(msg) + elif type_ == PY_SOURCE: + return load_source(name, filename, file) + elif type_ == PY_COMPILED: + return load_compiled(name, filename, file) + elif type_ == C_EXTENSION and load_dynamic is not None: + if file is None: + with open(filename, 'rb') as opened_file: + return load_dynamic(name, filename, opened_file) + else: + return load_dynamic(name, filename, file) + elif type_ == PKG_DIRECTORY: + return load_package(name, filename) + elif type_ == C_BUILTIN: + return init_builtin(name) + elif type_ == PY_FROZEN: + return init_frozen(name) + else: + msg = "Don't know how to import {} (type code {})".format(name, type_) + raise ImportError(msg, name=name) + + +def find_module(name, path=None): + """**DEPRECATED** + + Search for a module. + + If path is omitted or None, search for a built-in, frozen or special + module and continue search in sys.path. The module name cannot + contain '.'; to search for a submodule of a package, pass the + submodule name and the package's __path__. + + """ + if not isinstance(name, str): + raise TypeError("'name' must be a str, not {}".format(type(name))) + elif not isinstance(path, (type(None), list)): + # Backwards-compatibility + raise RuntimeError("'path' must be None or a list, " + "not {}".format(type(path))) + + if path is None: + if is_builtin(name): + return None, None, ('', '', C_BUILTIN) + elif is_frozen(name): + return None, None, ('', '', PY_FROZEN) + else: + path = sys.path + + for entry in path: + package_directory = os.path.join(entry, name) + for suffix in ['.py', machinery.BYTECODE_SUFFIXES[0]]: + package_file_name = '__init__' + suffix + file_path = os.path.join(package_directory, package_file_name) + if os.path.isfile(file_path): + return None, package_directory, ('', '', PKG_DIRECTORY) + for suffix, mode, type_ in get_suffixes(): + file_name = name + suffix + file_path = os.path.join(entry, file_name) + if os.path.isfile(file_path): + break + else: + continue + break # Break out of outer loop when breaking out of inner loop. + else: + raise ImportError(_ERR_MSG.format(name), name=name) + + encoding = None + if 'b' not in mode: + with open(file_path, 'rb') as file: + encoding = tokenize.detect_encoding(file.readline)[0] + file = open(file_path, mode, encoding=encoding) + return file, file_path, (suffix, mode, type_) + + +def reload(module): + """**DEPRECATED** + + Reload the module and return it. + + The module must have been successfully imported before. + + """ + return importlib.reload(module) + + +def init_builtin(name): + """**DEPRECATED** + + Load and return a built-in module by name, or None is such module doesn't + exist + """ + try: + return _builtin_from_name(name) + except ImportError: + return None + + +if create_dynamic: + def load_dynamic(name, path, file=None): + """**DEPRECATED** + + Load an extension module. + """ + import importlib.machinery + loader = importlib.machinery.ExtensionFileLoader(name, path) + + # Issue #24748: Skip the sys.modules check in _load_module_shim; + # always load new extension + spec = importlib.machinery.ModuleSpec( + name=name, loader=loader, origin=path) + return _load(spec) + +else: + load_dynamic = None diff --git a/python/extractor/index.py b/python/extractor/index.py new file mode 100644 index 00000000000..29996f8a0c3 --- /dev/null +++ b/python/extractor/index.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +# This file needs to be able to handle all versions of Python we are likely to encounter +# Which is probably 3.6 and upwards. Handling 3.6 specifically will be by throwing an error, though. +# We will require at least 3.7 to proceed. + +'''Run index.py in buildtools''' + +import os +import sys + +if sys.version_info < (3, 7): + sys.exit("ERROR: Python 3.7 or later is required (currently running {}.{})".format(sys.version_info[0], sys.version_info[1])) + +from python_tracer import getzipfilename + +if 'SEMMLE_DIST' in os.environ: + if 'CODEQL_EXTRACTOR_PYTHON_ROOT' not in os.environ: + os.environ['CODEQL_EXTRACTOR_PYTHON_ROOT'] = os.environ['SEMMLE_DIST'] +else: + os.environ["SEMMLE_DIST"] = os.environ["CODEQL_EXTRACTOR_PYTHON_ROOT"] + +tools = os.path.join(os.environ['SEMMLE_DIST'], "tools") +zippath = os.path.join(tools, getzipfilename()) +sys.path = [ zippath ] + sys.path + +import buildtools.index +buildtools.index.main() diff --git a/python/extractor/lark/LICENSE b/python/extractor/lark/LICENSE new file mode 100644 index 00000000000..efcb9665fb5 --- /dev/null +++ b/python/extractor/lark/LICENSE @@ -0,0 +1,19 @@ +Copyright © 2017 Erez Shinan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/python/extractor/lark/__init__.py b/python/extractor/lark/__init__.py new file mode 100644 index 00000000000..34f0b8dfb55 --- /dev/null +++ b/python/extractor/lark/__init__.py @@ -0,0 +1,7 @@ +from .tree import Tree +from .visitors import Transformer, Visitor, v_args, Discard +from .visitors import InlineTransformer, inline_args # XXX Deprecated +from .exceptions import ParseError, LexError, GrammarError, UnexpectedToken, UnexpectedInput, UnexpectedCharacters +from .lark import Lark + +__version__ = "0.6.3" diff --git a/python/extractor/lark/common.py b/python/extractor/lark/common.py new file mode 100644 index 00000000000..b47253a07d1 --- /dev/null +++ b/python/extractor/lark/common.py @@ -0,0 +1,87 @@ +import re +import sys + +from .utils import get_regexp_width + +Py36 = (sys.version_info[:2] >= (3, 6)) + + +###{standalone +###} + + + +class LexerConf: + def __init__(self, tokens, ignore=(), postlex=None, callbacks=None): + self.tokens = tokens + self.ignore = ignore + self.postlex = postlex + self.callbacks = callbacks or {} + +class ParserConf: + def __init__(self, rules, callback, start): + self.rules = rules + self.callback = callback + self.start = start + + + +class Pattern(object): + def __init__(self, value, flags=()): + self.value = value + self.flags = frozenset(flags) + + def __repr__(self): + return repr(self.to_regexp()) + + # Pattern Hashing assumes all subclasses have a different priority! + def __hash__(self): + return hash((type(self), self.value, self.flags)) + def __eq__(self, other): + return type(self) == type(other) and self.value == other.value and self.flags == other.flags + + def to_regexp(self): + raise NotImplementedError() + + if Py36: + # Python 3.6 changed syntax for flags in regular expression + def _get_flags(self, value): + for f in self.flags: + value = ('(?%s:%s)' % (f, value)) + return value + + else: + def _get_flags(self, value): + for f in self.flags: + value = ('(?%s)' % f) + value + return value + +class PatternStr(Pattern): + def to_regexp(self): + return self._get_flags(re.escape(self.value)) + + @property + def min_width(self): + return len(self.value) + max_width = min_width + +class PatternRE(Pattern): + def to_regexp(self): + return self._get_flags(self.value) + + @property + def min_width(self): + return get_regexp_width(self.to_regexp())[0] + @property + def max_width(self): + return get_regexp_width(self.to_regexp())[1] + +class TokenDef(object): + def __init__(self, name, pattern, priority=1): + assert isinstance(pattern, Pattern), pattern + self.name = name + self.pattern = pattern + self.priority = priority + + def __repr__(self): + return '%s(%r, %r)' % (type(self).__name__, self.name, self.pattern) diff --git a/python/extractor/lark/exceptions.py b/python/extractor/lark/exceptions.py new file mode 100644 index 00000000000..9350f66c9eb --- /dev/null +++ b/python/extractor/lark/exceptions.py @@ -0,0 +1,86 @@ +from .utils import STRING_TYPE + +class LarkError(Exception): + pass + +class GrammarError(LarkError): + pass + +class ParseError(LarkError): + pass + +class LexError(LarkError): + pass + +class UnexpectedInput(LarkError): + pos_in_stream = None + + def get_context(self, text, span=40): + pos = self.pos_in_stream + start = max(pos - span, 0) + end = pos + span + before = text[start:pos].rsplit('\n', 1)[-1] + after = text[pos:end].split('\n', 1)[0] + return before + after + '\n' + ' ' * len(before) + '^\n' + + def match_examples(self, parse_fn, examples): + """ Given a parser instance and a dictionary mapping some label with + some malformed syntax examples, it'll return the label for the + example that bests matches the current error. + """ + assert self.state is not None, "Not supported for this exception" + + candidate = None + for label, example in examples.items(): + assert not isinstance(example, STRING_TYPE) + + for malformed in example: + try: + parse_fn(malformed) + except UnexpectedInput as ut: + if ut.state == self.state: + try: + if ut.token == self.token: # Try exact match first + return label + except AttributeError: + pass + if not candidate: + candidate = label + + return candidate + + +class UnexpectedCharacters(LexError, UnexpectedInput): + def __init__(self, seq, lex_pos, line, column, allowed=None, considered_tokens=None, state=None): + message = "No terminal defined for '%s' at line %d col %d" % (seq[lex_pos], line, column) + + self.line = line + self.column = column + self.allowed = allowed + self.considered_tokens = considered_tokens + self.pos_in_stream = lex_pos + self.state = state + + message += '\n\n' + self.get_context(seq) + if allowed: + message += '\nExpecting: %s\n' % allowed + + super(UnexpectedCharacters, self).__init__(message) + + + +class UnexpectedToken(ParseError, UnexpectedInput): + def __init__(self, token, expected, considered_rules=None, state=None): + self.token = token + self.expected = expected # XXX str shouldn't necessary + self.line = getattr(token, 'line', '?') + self.column = getattr(token, 'column', '?') + self.considered_rules = considered_rules + self.state = state + self.pos_in_stream = getattr(token, 'pos_in_stream', None) + + message = ("Unexpected token %r at line %s, column %s.\n" + "Expected: %s\n" + % (token, self.line, self.column, ', '.join(self.expected))) + + super(UnexpectedToken, self).__init__(message) diff --git a/python/extractor/lark/grammar.py b/python/extractor/lark/grammar.py new file mode 100644 index 00000000000..37c2997f74d --- /dev/null +++ b/python/extractor/lark/grammar.py @@ -0,0 +1,60 @@ +class Symbol(object): + is_term = NotImplemented + + def __init__(self, name): + self.name = name + + def __eq__(self, other): + assert isinstance(other, Symbol), other + return self.is_term == other.is_term and self.name == other.name + + def __ne__(self, other): + return not (self == other) + + def __hash__(self): + return hash(self.name) + + def __repr__(self): + return '%s(%r)' % (type(self).__name__, self.name) + +class Terminal(Symbol): + is_term = True + + def __init__(self, name, filter_out=False): + self.name = name + self.filter_out = filter_out + + +class NonTerminal(Symbol): + is_term = False + +class Rule(object): + """ + origin : a symbol + expansion : a list of symbols + """ + def __init__(self, origin, expansion, alias=None, options=None): + self.origin = origin + self.expansion = expansion + self.alias = alias + self.options = options + + def __str__(self): + return '<%s : %s>' % (self.origin, ' '.join(map(str,self.expansion))) + + def __repr__(self): + return 'Rule(%r, %r, %r, %r)' % (self.origin, self.expansion, self.alias, self.options) + + +class RuleOptions: + def __init__(self, keep_all_tokens=False, expand1=False, priority=None): + self.keep_all_tokens = keep_all_tokens + self.expand1 = expand1 + self.priority = priority + + def __repr__(self): + return 'RuleOptions(%r, %r, %r)' % ( + self.keep_all_tokens, + self.expand1, + self.priority, + ) diff --git a/python/extractor/lark/grammars/__init__.py b/python/extractor/lark/grammars/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/lark/grammars/common.lark b/python/extractor/lark/grammars/common.lark new file mode 100644 index 00000000000..8bc8079f368 --- /dev/null +++ b/python/extractor/lark/grammars/common.lark @@ -0,0 +1,49 @@ +// +// Numbers +// + +DIGIT: "0".."9" +HEXDIGIT: "a".."f"|"A".."F"|DIGIT + +INT: DIGIT+ +SIGNED_INT: ["+"|"-"] INT +DECIMAL: INT "." INT? | "." INT + +// float = /-?\d+(\.\d+)?([eE][+-]?\d+)?/ +_EXP: ("e"|"E") SIGNED_INT +FLOAT: INT _EXP | DECIMAL _EXP? +SIGNED_FLOAT: ["+"|"-"] FLOAT + +NUMBER: FLOAT | INT +SIGNED_NUMBER: ["+"|"-"] NUMBER + +// +// Strings +// +//STRING: /"(\\\"|\\\\|[^"\n])*?"i?/ +STRING_INNER: ("\\\""|/[^"]/) +ESCAPED_STRING: "\"" STRING_INNER* "\"" + + +// +// Names (Variables) +// +LCASE_LETTER: "a".."z" +UCASE_LETTER: "A".."Z" + +LETTER: UCASE_LETTER | LCASE_LETTER +WORD: LETTER+ + +CNAME: ("_"|LETTER) ("_"|LETTER|DIGIT)* + + +// +// Whitespace +// +WS_INLINE: (" "|/\t/)+ +WS: /[ \t\f\r\n]/+ + +CR : /\r/ +LF : /\n/ +NEWLINE: (CR? LF)+ + diff --git a/python/extractor/lark/indenter.py b/python/extractor/lark/indenter.py new file mode 100644 index 00000000000..34e61a09e25 --- /dev/null +++ b/python/extractor/lark/indenter.py @@ -0,0 +1,55 @@ +"Provides Indentation services for languages with indentation similar to Python" + +from .lexer import Token + +###{standalone +class Indenter: + def __init__(self): + self.paren_level = 0 + self.indent_level = [0] + + def handle_NL(self, token): + if self.paren_level > 0: + return + + yield token + + indent_str = token.rsplit('\n', 1)[1] # Tabs and spaces + indent = indent_str.count(' ') + indent_str.count('\t') * self.tab_len + + if indent > self.indent_level[-1]: + self.indent_level.append(indent) + yield Token.new_borrow_pos(self.INDENT_type, indent_str, token) + else: + while indent < self.indent_level[-1]: + self.indent_level.pop() + yield Token.new_borrow_pos(self.DEDENT_type, indent_str, token) + + assert indent == self.indent_level[-1], '%s != %s' % (indent, self.indent_level[-1]) + + def process(self, stream): + for token in stream: + if token.type == self.NL_type: + for t in self.handle_NL(token): + yield t + else: + yield token + + if token.type in self.OPEN_PAREN_types: + self.paren_level += 1 + elif token.type in self.CLOSE_PAREN_types: + self.paren_level -= 1 + assert self.paren_level >= 0 + + while len(self.indent_level) > 1: + self.indent_level.pop() + yield Token(self.DEDENT_type, '') + + assert self.indent_level == [0], self.indent_level + + # XXX Hack for ContextualLexer. Maybe there's a more elegant solution? + @property + def always_accept(self): + return (self.NL_type,) + +###} diff --git a/python/extractor/lark/lark.py b/python/extractor/lark/lark.py new file mode 100644 index 00000000000..7493beae252 --- /dev/null +++ b/python/extractor/lark/lark.py @@ -0,0 +1,235 @@ +from __future__ import absolute_import + +import os +import time +from collections import defaultdict +from io import open + +from .utils import STRING_TYPE +from .load_grammar import load_grammar +from .tree import Tree +from .common import LexerConf, ParserConf + +from .lexer import Lexer, TraditionalLexer +from .parse_tree_builder import ParseTreeBuilder +from .parser_frontends import get_frontend + + +class LarkOptions(object): + """Specifies the options for Lark + + """ + OPTIONS_DOC = """ + parser - Decides which parser engine to use, "earley" or "lalr". (Default: "earley") + Note: "lalr" requires a lexer + + lexer - Decides whether or not to use a lexer stage + "standard": Use a standard lexer + "contextual": Stronger lexer (only works with parser="lalr") + "dynamic": Flexible and powerful (only with parser="earley") + "dynamic_complete": Same as dynamic, but tries *every* variation + of tokenizing possible. (only with parser="earley") + "auto" (default): Choose for me based on grammar and parser + + ambiguity - Decides how to handle ambiguity in the parse. Only relevant if parser="earley" + "resolve": The parser will automatically choose the simplest derivation + (it chooses consistently: greedy for tokens, non-greedy for rules) + "explicit": The parser will return all derivations wrapped in "_ambig" tree nodes (i.e. a forest). + + transformer - Applies the transformer to every parse tree + debug - Affects verbosity (default: False) + keep_all_tokens - Don't automagically remove "punctuation" tokens (default: False) + cache_grammar - Cache the Lark grammar (Default: False) + postlex - Lexer post-processing (Requires standard lexer. Default: None) + start - The start symbol (Default: start) + profile - Measure run-time usage in Lark. Read results from the profiler proprety (Default: False) + propagate_positions - Propagates [line, column, end_line, end_column] attributes into all tree branches. + lexer_callbacks - Dictionary of callbacks for the lexer. May alter tokens during lexing. Use with caution. + """ + __doc__ = OPTIONS_DOC + def __init__(self, options_dict): + o = dict(options_dict) + + self.debug = bool(o.pop('debug', False)) + self.keep_all_tokens = bool(o.pop('keep_all_tokens', False)) + self.tree_class = o.pop('tree_class', Tree) + self.cache_grammar = o.pop('cache_grammar', False) + self.postlex = o.pop('postlex', None) + self.parser = o.pop('parser', 'earley') + self.lexer = o.pop('lexer', 'auto') + self.transformer = o.pop('transformer', None) + self.start = o.pop('start', 'start') + self.profile = o.pop('profile', False) + self.ambiguity = o.pop('ambiguity', 'auto') + self.propagate_positions = o.pop('propagate_positions', False) + self.earley__predict_all = o.pop('earley__predict_all', False) + self.lexer_callbacks = o.pop('lexer_callbacks', {}) + + assert self.parser in ('earley', 'lalr', 'cyk', None) + + if self.parser == 'earley' and self.transformer: + raise ValueError('Cannot specify an embedded transformer when using the Earley algorithm.' + 'Please use your transformer on the resulting parse tree, or use a different algorithm (i.e. lalr)') + + if o: + raise ValueError("Unknown options: %s" % o.keys()) + + +class Profiler: + def __init__(self): + self.total_time = defaultdict(float) + self.cur_section = '__init__' + self.last_enter_time = time.time() + + def enter_section(self, name): + cur_time = time.time() + self.total_time[self.cur_section] += cur_time - self.last_enter_time + self.last_enter_time = cur_time + self.cur_section = name + + def make_wrapper(self, name, f): + def wrapper(*args, **kwargs): + last_section = self.cur_section + self.enter_section(name) + try: + return f(*args, **kwargs) + finally: + self.enter_section(last_section) + + return wrapper + + +class Lark: + def __init__(self, grammar, **options): + """ + grammar : a string or file-object containing the grammar spec (using Lark's ebnf syntax) + options : a dictionary controlling various aspects of Lark. + """ + self.options = LarkOptions(options) + + # Some, but not all file-like objects have a 'name' attribute + try: + self.source = grammar.name + except AttributeError: + self.source = '' + cache_file = "larkcache_%s" % str(hash(grammar)%(2**32)) + else: + cache_file = "larkcache_%s" % os.path.basename(self.source) + + # Drain file-like objects to get their contents + try: + read = grammar.read + except AttributeError: + pass + else: + grammar = read() + + assert isinstance(grammar, STRING_TYPE) + + if self.options.cache_grammar: + raise NotImplementedError("Not available yet") + + assert not self.options.profile, "Feature temporarily disabled" + self.profiler = Profiler() if self.options.profile else None + + if self.options.lexer == 'auto': + if self.options.parser == 'lalr': + self.options.lexer = 'contextual' + elif self.options.parser == 'earley': + self.options.lexer = 'dynamic' + elif self.options.parser == 'cyk': + self.options.lexer = 'standard' + else: + assert False, self.options.parser + lexer = self.options.lexer + assert lexer in ('standard', 'contextual', 'dynamic', 'dynamic_complete') or issubclass(lexer, Lexer) + + if self.options.ambiguity == 'auto': + if self.options.parser == 'earley': + self.options.ambiguity = 'resolve' + else: + disambig_parsers = ['earley', 'cyk'] + assert self.options.parser in disambig_parsers, ( + 'Only %s supports disambiguation right now') % ', '.join(disambig_parsers) + assert self.options.ambiguity in ('resolve', 'explicit', 'auto', 'resolve__antiscore_sum') + + # Parse the grammar file and compose the grammars (TODO) + self.grammar = load_grammar(grammar, self.source) + + # Compile the EBNF grammar into BNF + self.terminals, self.rules, self.ignore_tokens = self.grammar.compile() + + self.lexer_conf = LexerConf(self.terminals, self.ignore_tokens, self.options.postlex, self.options.lexer_callbacks) + + if self.options.parser: + self.parser = self._build_parser() + elif lexer: + self.lexer = self._build_lexer() + + if self.profiler: self.profiler.enter_section('outside_lark') + + __init__.__doc__ = "\nOPTIONS:" + LarkOptions.OPTIONS_DOC + + def _build_lexer(self): + return TraditionalLexer(self.lexer_conf.tokens, ignore=self.lexer_conf.ignore, user_callbacks=self.lexer_conf.callbacks) + + def _build_parser(self): + self.parser_class = get_frontend(self.options.parser, self.options.lexer) + + self._parse_tree_builder = ParseTreeBuilder(self.rules, self.options.tree_class, self.options.propagate_positions, self.options.keep_all_tokens, self.options.parser!='lalr') + callback = self._parse_tree_builder.create_callback(self.options.transformer) + if self.profiler: + for f in dir(callback): + if not (f.startswith('__') and f.endswith('__')): + setattr(callback, f, self.profiler.make_wrapper('transformer', getattr(callback, f))) + + parser_conf = ParserConf(self.rules, callback, self.options.start) + + return self.parser_class(self.lexer_conf, parser_conf, options=self.options) + + @classmethod + def open(cls, grammar_filename, rel_to=None, **options): + """Create an instance of Lark with the grammar given by its filename + + If rel_to is provided, the function will find the grammar filename in relation to it. + + Example: + + >>> Lark.open("grammar_file.lark", rel_to=__file__, parser="lalr") + Lark(...) + + """ + if rel_to: + basepath = os.path.dirname(rel_to) + grammar_filename = os.path.join(basepath, grammar_filename) + with open(grammar_filename, encoding='utf8') as f: + return cls(f, **options) + + def __repr__(self): + return 'Lark(open(%r), parser=%r, lexer=%r, ...)' % (self.source, self.options.parser, self.options.lexer) + + + def lex(self, text): + "Only lex (and postlex) the text, without parsing it. Only relevant when lexer='standard'" + if not hasattr(self, 'lexer'): + self.lexer = self._build_lexer() + stream = self.lexer.lex(text) + if self.options.postlex: + return self.options.postlex.process(stream) + return stream + + def parse(self, text): + "Parse the given text, according to the options provided. Returns a tree, unless specified otherwise." + return self.parser.parse(text) + + # if self.profiler: + # self.profiler.enter_section('lex') + # l = list(self.lex(text)) + # self.profiler.enter_section('parse') + # try: + # return self.parser.parse(l) + # finally: + # self.profiler.enter_section('outside_lark') + # else: + # l = list(self.lex(text)) + # return self.parser.parse(l) diff --git a/python/extractor/lark/lexer.py b/python/extractor/lark/lexer.py new file mode 100644 index 00000000000..15f83b7a128 --- /dev/null +++ b/python/extractor/lark/lexer.py @@ -0,0 +1,252 @@ +## Lexer Implementation + +import re + +from .utils import Str, classify +from .common import PatternStr, PatternRE, TokenDef +from .exceptions import UnexpectedCharacters, LexError + +###{standalone +class Token(Str): + __slots__ = ('type', 'pos_in_stream', 'value', 'line', 'column', 'end_line', 'end_column') + + def __new__(cls, type_, value, pos_in_stream=None, line=None, column=None): + self = super(Token, cls).__new__(cls, value) + self.type = type_ + self.pos_in_stream = pos_in_stream + self.value = value + self.line = line + self.column = column + self.end_line = None + self.end_column = None + return self + + @classmethod + def new_borrow_pos(cls, type_, value, borrow_t): + return cls(type_, value, borrow_t.pos_in_stream, line=borrow_t.line, column=borrow_t.column) + + def __reduce__(self): + return (self.__class__, (self.type, self.value, self.pos_in_stream, self.line, self.column, )) + + def __repr__(self): + return 'Token(%s, %r)' % (self.type, self.value) + + def __deepcopy__(self, memo): + return Token(self.type, self.value, self.pos_in_stream, self.line, self.column) + + def __eq__(self, other): + if isinstance(other, Token) and self.type != other.type: + return False + + return Str.__eq__(self, other) + + __hash__ = Str.__hash__ + + +class LineCounter: + def __init__(self): + self.newline_char = '\n' + self.char_pos = 0 + self.line = 1 + self.column = 1 + self.line_start_pos = 0 + + def feed(self, token, test_newline=True): + """Consume a token and calculate the new line & column. + + As an optional optimization, set test_newline=False is token doesn't contain a newline. + """ + if test_newline: + newlines = token.count(self.newline_char) + if newlines: + self.line += newlines + self.line_start_pos = self.char_pos + token.rindex(self.newline_char) + 1 + + self.char_pos += len(token) + self.column = self.char_pos - self.line_start_pos + 1 + +class _Lex: + "Built to serve both Lexer and ContextualLexer" + def __init__(self, lexer, state=None): + self.lexer = lexer + self.state = state + + def lex(self, stream, newline_types, ignore_types): + newline_types = list(newline_types) + ignore_types = list(ignore_types) + line_ctr = LineCounter() + + t = None + while True: + lexer = self.lexer + for mre, type_from_index in lexer.mres: + m = mre.match(stream, line_ctr.char_pos) + if m: + value = m.group(0) + type_ = type_from_index[m.lastindex] + if type_ not in ignore_types: + t = Token(type_, value, line_ctr.char_pos, line_ctr.line, line_ctr.column) + if t.type in lexer.callback: + t = lexer.callback[t.type](t) + yield t + else: + if type_ in lexer.callback: + t = Token(type_, value, line_ctr.char_pos, line_ctr.line, line_ctr.column) + lexer.callback[type_](t) + + line_ctr.feed(value, type_ in newline_types) + if t: + t.end_line = line_ctr.line + t.end_column = line_ctr.column + + break + else: + if line_ctr.char_pos < len(stream): + raise UnexpectedCharacters(stream, line_ctr.char_pos, line_ctr.line, line_ctr.column, state=self.state) + break + +class UnlessCallback: + def __init__(self, mres): + self.mres = mres + + def __call__(self, t): + for mre, type_from_index in self.mres: + m = mre.match(t.value) + if m: + t.type = type_from_index[m.lastindex] + break + return t + +###} + + + +def _create_unless(tokens): + tokens_by_type = classify(tokens, lambda t: type(t.pattern)) + assert len(tokens_by_type) <= 2, tokens_by_type.keys() + embedded_strs = set() + callback = {} + for retok in tokens_by_type.get(PatternRE, []): + unless = [] # {} + for strtok in tokens_by_type.get(PatternStr, []): + if strtok.priority > retok.priority: + continue + s = strtok.pattern.value + m = re.match(retok.pattern.to_regexp(), s) + if m and m.group(0) == s: + unless.append(strtok) + if strtok.pattern.flags <= retok.pattern.flags: + embedded_strs.add(strtok) + if unless: + callback[retok.name] = UnlessCallback(build_mres(unless, match_whole=True)) + + tokens = [t for t in tokens if t not in embedded_strs] + return tokens, callback + + +def _build_mres(tokens, max_size, match_whole): + # Python sets an unreasonable group limit (currently 100) in its re module + # Worse, the only way to know we reached it is by catching an AssertionError! + # This function recursively tries less and less groups until it's successful. + postfix = '$' if match_whole else '' + mres = [] + while tokens: + try: + mre = re.compile(u'|'.join(u'(?P<%s>%s)'%(t.name, t.pattern.to_regexp()+postfix) for t in tokens[:max_size])) + except AssertionError: # Yes, this is what Python provides us.. :/ + return _build_mres(tokens, max_size//2, match_whole) + + mres.append((mre, {i:n for n,i in mre.groupindex.items()} )) + tokens = tokens[max_size:] + return mres + +def build_mres(tokens, match_whole=False): + return _build_mres(tokens, len(tokens), match_whole) + +def _regexp_has_newline(r): + return '\n' in r or '\\n' in r or ('(?s' in r and '.' in r) + +class Lexer: + """Lexer interface + + Method Signatures: + lex(self, stream) -> Iterator[Token] + + set_parser_state(self, state) # Optional + """ + set_parser_state = NotImplemented + lex = NotImplemented + +class TraditionalLexer(Lexer): + def __init__(self, tokens, ignore=(), user_callbacks={}): + assert all(isinstance(t, TokenDef) for t in tokens), tokens + + tokens = list(tokens) + + # Sanitization + for t in tokens: + try: + re.compile(t.pattern.to_regexp()) + except: + raise LexError("Cannot compile token %s: %s" % (t.name, t.pattern)) + + if t.pattern.min_width == 0: + raise LexError("Lexer does not allow zero-width tokens. (%s: %s)" % (t.name, t.pattern)) + + assert set(ignore) <= {t.name for t in tokens} + + # Init + self.newline_types = [t.name for t in tokens if _regexp_has_newline(t.pattern.to_regexp())] + self.ignore_types = list(ignore) + + tokens.sort(key=lambda x:(-x.priority, -x.pattern.max_width, -len(x.pattern.value), x.name)) + + tokens, self.callback = _create_unless(tokens) + assert all(self.callback.values()) + + for type_, f in user_callbacks.items(): + assert type_ not in self.callback + self.callback[type_] = f + + self.tokens = tokens + + self.mres = build_mres(tokens) + + def lex(self, stream): + return _Lex(self).lex(stream, self.newline_types, self.ignore_types) + + +class ContextualLexer(Lexer): + def __init__(self, tokens, states, ignore=(), always_accept=(), user_callbacks={}): + tokens_by_name = {} + for t in tokens: + assert t.name not in tokens_by_name, t + tokens_by_name[t.name] = t + + lexer_by_tokens = {} + self.lexers = {} + for state, accepts in states.items(): + key = frozenset(accepts) + try: + lexer = lexer_by_tokens[key] + except KeyError: + accepts = set(accepts) | set(ignore) | set(always_accept) + state_tokens = [tokens_by_name[n] for n in accepts if n and n in tokens_by_name] + lexer = TraditionalLexer(state_tokens, ignore=ignore, user_callbacks=user_callbacks) + lexer_by_tokens[key] = lexer + + self.lexers[state] = lexer + + self.root_lexer = TraditionalLexer(tokens, ignore=ignore, user_callbacks=user_callbacks) + + self.set_parser_state(None) # Needs to be set on the outside + + def set_parser_state(self, state): + self.parser_state = state + + def lex(self, stream): + l = _Lex(self.lexers[self.parser_state], self.parser_state) + for x in l.lex(stream, self.root_lexer.newline_types, self.root_lexer.ignore_types): + yield x + l.lexer = self.lexers[self.parser_state] + l.state = self.parser_state diff --git a/python/extractor/lark/load_grammar.py b/python/extractor/lark/load_grammar.py new file mode 100644 index 00000000000..7fd32c48e8d --- /dev/null +++ b/python/extractor/lark/load_grammar.py @@ -0,0 +1,741 @@ +"Parses and creates Grammar objects" + +import os.path +import sys +from itertools import chain +import re +from ast import literal_eval +from copy import deepcopy +import pkgutil + +from .lexer import Token + + +from .parse_tree_builder import ParseTreeBuilder +from .parser_frontends import LALR_TraditionalLexer +from .common import LexerConf, ParserConf, PatternStr, PatternRE, TokenDef +from .grammar import RuleOptions, Rule, Terminal, NonTerminal, Symbol +from .utils import classify, suppress +from .exceptions import GrammarError, UnexpectedCharacters, UnexpectedToken + +from .tree import Tree, SlottedTree as ST +from .visitors import Transformer, Visitor, v_args, Transformer_InPlace +inline_args = v_args(inline=True) + +__path__ = os.path.dirname(__file__) + +GRAMMAR_PACKAGES = ['lark.grammars'] + +EXT = '.lark' + +_RE_FLAGS = 'imslux' + +def is_terminal(sym): + return sym.isupper() + +_TERMINAL_NAMES = { + '.' : 'DOT', + ',' : 'COMMA', + ':' : 'COLON', + ';' : 'SEMICOLON', + '+' : 'PLUS', + '-' : 'MINUS', + '*' : 'STAR', + '/' : 'SLASH', + '\\' : 'BACKSLASH', + '|' : 'VBAR', + '?' : 'QMARK', + '!' : 'BANG', + '@' : 'AT', + '#' : 'HASH', + '$' : 'DOLLAR', + '%' : 'PERCENT', + '^' : 'CIRCUMFLEX', + '&' : 'AMPERSAND', + '_' : 'UNDERSCORE', + '<' : 'LESSTHAN', + '>' : 'MORETHAN', + '=' : 'EQUAL', + '"' : 'DBLQUOTE', + '\'' : 'QUOTE', + '`' : 'BACKQUOTE', + '~' : 'TILDE', + '(' : 'LPAR', + ')' : 'RPAR', + '{' : 'LBRACE', + '}' : 'RBRACE', + '[' : 'LSQB', + ']' : 'RSQB', + '\n' : 'NEWLINE', + '\r\n' : 'CRLF', + '\t' : 'TAB', + ' ' : 'SPACE', +} + +# Grammar Parser +TERMINALS = { + '_LPAR': r'\(', + '_RPAR': r'\)', + '_LBRA': r'\[', + '_RBRA': r'\]', + 'OP': '[+*][?]?|[?](?![a-z])', + '_COLON': ':', + '_COMMA': ',', + '_OR': r'\|', + '_DOT': r'\.', + 'TILDE': '~', + 'RULE': '!?[_?]?[a-z][_a-z0-9]*', + 'TERMINAL': '_?[A-Z][_A-Z0-9]*', + 'STRING': r'"(\\"|\\\\|[^"\n])*?"i?', + 'REGEXP': r'/(?!/)(\\/|\\\\|[^/\n])*?/[%s]*' % _RE_FLAGS, + '_NL': r'(\r?\n)+\s*', + 'WS': r'[ \t]+', + 'COMMENT': r'//[^\n]*', + '_TO': '->', + '_IGNORE': r'%ignore', + '_DECLARE': r'%declare', + '_IMPORT': r'%import', + 'NUMBER': r'\d+', +} + +RULES = { + 'start': ['_list'], + '_list': ['_item', '_list _item'], + '_item': ['rule', 'token', 'statement', '_NL'], + + 'rule': ['RULE _COLON expansions _NL', + 'RULE _DOT NUMBER _COLON expansions _NL'], + 'expansions': ['alias', + 'expansions _OR alias', + 'expansions _NL _OR alias'], + + '?alias': ['expansion _TO RULE', 'expansion'], + 'expansion': ['_expansion'], + + '_expansion': ['', '_expansion expr'], + + '?expr': ['atom', + 'atom OP', + 'atom TILDE NUMBER', + 'atom TILDE NUMBER _DOT _DOT NUMBER', + ], + + '?atom': ['_LPAR expansions _RPAR', + 'maybe', + 'value'], + + 'value': ['terminal', + 'nonterminal', + 'literal', + 'range'], + + 'terminal': ['TERMINAL'], + 'nonterminal': ['RULE'], + + '?name': ['RULE', 'TERMINAL'], + + 'maybe': ['_LBRA expansions _RBRA'], + 'range': ['STRING _DOT _DOT STRING'], + + 'token': ['TERMINAL _COLON expansions _NL', + 'TERMINAL _DOT NUMBER _COLON expansions _NL'], + 'statement': ['ignore', 'import', 'declare'], + 'ignore': ['_IGNORE expansions _NL'], + 'declare': ['_DECLARE _declare_args _NL'], + 'import': ['_IMPORT _import_path _NL', + '_IMPORT _import_path _LPAR name_list _RPAR _NL', + '_IMPORT _import_path _TO TERMINAL _NL'], + + '_import_path': ['import_lib', 'import_rel'], + 'import_lib': ['_import_args'], + 'import_rel': ['_DOT _import_args'], + '_import_args': ['name', '_import_args _DOT name'], + + 'name_list': ['_name_list'], + '_name_list': ['name', '_name_list _COMMA name'], + + '_declare_args': ['name', '_declare_args name'], + 'literal': ['REGEXP', 'STRING'], +} + + +@inline_args +class EBNF_to_BNF(Transformer_InPlace): + def __init__(self): + self.new_rules = [] + self.rules_by_expr = {} + self.prefix = 'anon' + self.i = 0 + self.rule_options = None + + def _add_recurse_rule(self, type_, expr): + if expr in self.rules_by_expr: + return self.rules_by_expr[expr] + + new_name = '__%s_%s_%d' % (self.prefix, type_, self.i) + self.i += 1 + t = NonTerminal(Token('RULE', new_name, -1)) + tree = ST('expansions', [ST('expansion', [expr]), ST('expansion', [t, expr])]) + self.new_rules.append((new_name, tree, self.rule_options)) + self.rules_by_expr[expr] = t + return t + + def expr(self, rule, op, *args): + if op.value == '?': + return ST('expansions', [rule, ST('expansion', [])]) + elif op.value == '+': + # a : b c+ d + # --> + # a : b _c d + # _c : _c c | c; + return self._add_recurse_rule('plus', rule) + elif op.value == '*': + # a : b c* d + # --> + # a : b _c? d + # _c : _c c | c; + new_name = self._add_recurse_rule('star', rule) + return ST('expansions', [new_name, ST('expansion', [])]) + elif op.value == '~': + if len(args) == 1: + mn = mx = int(args[0]) + else: + mn, mx = map(int, args) + if mx < mn: + raise GrammarError("Bad Range for %s (%d..%d isn't allowed)" % (rule, mn, mx)) + return ST('expansions', [ST('expansion', [rule] * n) for n in range(mn, mx+1)]) + assert False, op + + +class SimplifyRule_Visitor(Visitor): + + @staticmethod + def _flatten(tree): + while True: + to_expand = [i for i, child in enumerate(tree.children) + if isinstance(child, Tree) and child.data == tree.data] + if not to_expand: + break + tree.expand_kids_by_index(*to_expand) + + def expansion(self, tree): + # rules_list unpacking + # a : b (c|d) e + # --> + # a : b c e | b d e + # + # In AST terms: + # expansion(b, expansions(c, d), e) + # --> + # expansions( expansion(b, c, e), expansion(b, d, e) ) + + self._flatten(tree) + + for i, child in enumerate(tree.children): + if isinstance(child, Tree) and child.data == 'expansions': + tree.data = 'expansions' + tree.children = [self.visit(ST('expansion', [option if i==j else other + for j, other in enumerate(tree.children)])) + for option in set(child.children)] + self._flatten(tree) + break + + def alias(self, tree): + rule, alias_name = tree.children + if rule.data == 'expansions': + aliases = [] + for child in tree.children[0].children: + aliases.append(ST('alias', [child, alias_name])) + tree.data = 'expansions' + tree.children = aliases + + def expansions(self, tree): + self._flatten(tree) + tree.children = list(set(tree.children)) + + +class RuleTreeToText(Transformer): + def expansions(self, x): + return x + def expansion(self, symbols): + return symbols, None + def alias(self, x): + (expansion, _alias), alias = x + assert _alias is None, (alias, expansion, '-', _alias) # Double alias not allowed + return expansion, alias.value + + +@inline_args +class CanonizeTree(Transformer_InPlace): + def maybe(self, expr): + return ST('expr', [expr, Token('OP', '?', -1)]) + + def tokenmods(self, *args): + if len(args) == 1: + return list(args) + tokenmods, value = args + return tokenmods + [value] + +class PrepareAnonTerminals(Transformer_InPlace): + "Create a unique list of anonymous tokens. Attempt to give meaningful names to them when we add them" + + def __init__(self, tokens): + self.tokens = tokens + self.token_set = {td.name for td in self.tokens} + self.token_reverse = {td.pattern: td for td in tokens} + self.i = 0 + + + @inline_args + def pattern(self, p): + value = p.value + if p in self.token_reverse and p.flags != self.token_reverse[p].pattern.flags: + raise GrammarError(u'Conflicting flags for the same terminal: %s' % p) + + token_name = None + + if isinstance(p, PatternStr): + try: + # If already defined, use the user-defined token name + token_name = self.token_reverse[p].name + except KeyError: + # Try to assign an indicative anon-token name + try: + token_name = _TERMINAL_NAMES[value] + except KeyError: + if value.isalnum() and value[0].isalpha() and value.upper() not in self.token_set: + with suppress(UnicodeEncodeError): + value.upper().encode('ascii') # Make sure we don't have unicode in our token names + token_name = value.upper() + + elif isinstance(p, PatternRE): + if p in self.token_reverse: # Kind of a wierd placement.name + token_name = self.token_reverse[p].name + else: + assert False, p + + if token_name is None: + token_name = '__ANON_%d' % self.i + self.i += 1 + + if token_name not in self.token_set: + assert p not in self.token_reverse + self.token_set.add(token_name) + tokendef = TokenDef(token_name, p) + self.token_reverse[p] = tokendef + self.tokens.append(tokendef) + + return Terminal(token_name, filter_out=isinstance(p, PatternStr)) + + +def _rfind(s, choices): + return max(s.rfind(c) for c in choices) + + + +def _fix_escaping(s): + w = '' + i = iter(s) + for n in i: + w += n + if n == '\\': + n2 = next(i) + if n2 == '\\': + w += '\\\\' + elif n2 not in 'unftr': + w += '\\' + w += n2 + w = w.replace('\\"', '"').replace("'", "\\'") + + to_eval = "u'''%s'''" % w + try: + s = literal_eval(to_eval) + except SyntaxError as e: + raise ValueError(s, e) + + return s + + +def _literal_to_pattern(literal): + v = literal.value + flag_start = _rfind(v, '/"')+1 + assert flag_start > 0 + flags = v[flag_start:] + assert all(f in _RE_FLAGS for f in flags), flags + + v = v[:flag_start] + assert v[0] == v[-1] and v[0] in '"/' + x = v[1:-1] + + s = _fix_escaping(x) + + if literal.type == 'STRING': + s = s.replace('\\\\', '\\') + + return { 'STRING': PatternStr, + 'REGEXP': PatternRE }[literal.type](s, flags) + + +@inline_args +class PrepareLiterals(Transformer_InPlace): + def literal(self, literal): + return ST('pattern', [_literal_to_pattern(literal)]) + + def range(self, start, end): + assert start.type == end.type == 'STRING' + start = start.value[1:-1] + end = end.value[1:-1] + assert len(start) == len(end) == 1, (start, end, len(start), len(end)) + regexp = '[%s-%s]' % (start, end) + return ST('pattern', [PatternRE(regexp)]) + + +class TokenTreeToPattern(Transformer): + def pattern(self, ps): + p ,= ps + return p + + def expansion(self, items): + assert items + if len(items) == 1: + return items[0] + if len({i.flags for i in items}) > 1: + raise GrammarError("Lark doesn't support joining tokens with conflicting flags!") + return PatternRE(''.join(i.to_regexp() for i in items), items[0].flags if items else ()) + + def expansions(self, exps): + if len(exps) == 1: + return exps[0] + if len({i.flags for i in exps}) > 1: + raise GrammarError("Lark doesn't support joining tokens with conflicting flags!") + return PatternRE('(?:%s)' % ('|'.join(i.to_regexp() for i in exps)), exps[0].flags) + + def expr(self, args): + inner, op = args[:2] + if op == '~': + if len(args) == 3: + op = "{%d}" % int(args[2]) + else: + mn, mx = map(int, args[2:]) + if mx < mn: + raise GrammarError("Bad Range for %s (%d..%d isn't allowed)" % (inner, mn, mx)) + op = "{%d,%d}" % (mn, mx) + else: + assert len(args) == 2 + return PatternRE('(?:%s)%s' % (inner.to_regexp(), op), inner.flags) + + def alias(self, t): + raise GrammarError("Aliasing not allowed in terminals (You used -> in the wrong place)") + + def value(self, v): + return v[0] + +class PrepareSymbols(Transformer_InPlace): + def value(self, v): + v ,= v + if isinstance(v, Tree): + return v + elif v.type == 'RULE': + return NonTerminal(v.value) + elif v.type == 'TERMINAL': + return Terminal(v.value, filter_out=v.startswith('_')) + assert False + +def _choice_of_rules(rules): + return ST('expansions', [ST('expansion', [Token('RULE', name)]) for name in rules]) + +class Grammar: + def __init__(self, rule_defs, token_defs, ignore): + self.token_defs = token_defs + self.rule_defs = rule_defs + self.ignore = ignore + + def compile(self): + # We change the trees in-place (to support huge grammars) + # So deepcopy allows calling compile more than once. + token_defs = deepcopy(list(self.token_defs)) + rule_defs = deepcopy(self.rule_defs) + + # ================= + # Compile Tokens + # ================= + + # Convert token-trees to strings/regexps + transformer = PrepareLiterals() * TokenTreeToPattern() + for name, (token_tree, priority) in token_defs: + if token_tree is None: # Terminal added through %declare + continue + expansions = list(token_tree.find_data('expansion')) + if len(expansions) == 1 and not expansions[0].children: + raise GrammarError("Terminals cannot be empty (%s)" % name) + + tokens = [TokenDef(name, transformer.transform(token_tree), priority) + for name, (token_tree, priority) in token_defs if token_tree] + + # ================= + # Compile Rules + # ================= + + # 1. Pre-process terminals + transformer = PrepareLiterals() * PrepareSymbols() * PrepareAnonTerminals(tokens) # Adds to tokens + + # 2. Convert EBNF to BNF (and apply step 1) + ebnf_to_bnf = EBNF_to_BNF() + rules = [] + for name, rule_tree, options in rule_defs: + ebnf_to_bnf.rule_options = RuleOptions(keep_all_tokens=True) if options and options.keep_all_tokens else None + tree = transformer.transform(rule_tree) + rules.append((name, ebnf_to_bnf.transform(tree), options)) + rules += ebnf_to_bnf.new_rules + + assert len(rules) == len({name for name, _t, _o in rules}), "Whoops, name collision" + + # 3. Compile tree to Rule objects + rule_tree_to_text = RuleTreeToText() + + simplify_rule = SimplifyRule_Visitor() + compiled_rules = [] + for name, tree, options in rules: + simplify_rule.visit(tree) + expansions = rule_tree_to_text.transform(tree) + + for expansion, alias in expansions: + if alias and name.startswith('_'): + raise GrammarError("Rule %s is marked for expansion (it starts with an underscore) and isn't allowed to have aliases (alias=%s)" % (name, alias)) + + assert all(isinstance(x, Symbol) for x in expansion), expansion + + rule = Rule(NonTerminal(name), expansion, alias, options) + compiled_rules.append(rule) + + return tokens, compiled_rules, self.ignore + + +_imported_grammars = {} +def import_grammar(grammar_path): + if grammar_path not in _imported_grammars: + for package in GRAMMAR_PACKAGES: + text = pkgutil.get_data(package, grammar_path).decode("utf-8") + grammar = load_grammar(text, grammar_path) + _imported_grammars[grammar_path] = grammar + + return _imported_grammars[grammar_path] + + +def resolve_token_references(token_defs): + # TODO Cycles detection + # TODO Solve with transitive closure (maybe) + + token_dict = {k:t for k, (t,_p) in token_defs} + assert len(token_dict) == len(token_defs), "Same name defined twice?" + + while True: + changed = False + for name, (token_tree, _p) in token_defs: + if token_tree is None: # Terminal added through %declare + continue + for exp in token_tree.find_data('value'): + item ,= exp.children + if isinstance(item, Token): + if item.type == 'RULE': + raise GrammarError("Rules aren't allowed inside terminals (%s in %s)" % (item, name)) + if item.type == 'TERMINAL': + exp.children[0] = token_dict[item] + changed = True + if not changed: + break + +def options_from_rule(name, *x): + if len(x) > 1: + priority, expansions = x + priority = int(priority) + else: + expansions ,= x + priority = None + + keep_all_tokens = name.startswith('!') + name = name.lstrip('!') + expand1 = name.startswith('?') + name = name.lstrip('?') + + return name, expansions, RuleOptions(keep_all_tokens, expand1, priority=priority) + + +def symbols_from_strcase(expansion): + return [Terminal(x, filter_out=x.startswith('_')) if is_terminal(x) else NonTerminal(x) for x in expansion] + +@inline_args +class PrepareGrammar(Transformer_InPlace): + def terminal(self, name): + return name + def nonterminal(self, name): + return name + + +class GrammarLoader: + def __init__(self): + tokens = [TokenDef(name, PatternRE(value)) for name, value in TERMINALS.items()] + + rules = [options_from_rule(name, x) for name, x in RULES.items()] + rules = [Rule(NonTerminal(r), symbols_from_strcase(x.split()), None, o) for r, xs, o in rules for x in xs] + callback = ParseTreeBuilder(rules, ST).create_callback() + lexer_conf = LexerConf(tokens, ['WS', 'COMMENT']) + + parser_conf = ParserConf(rules, callback, 'start') + self.parser = LALR_TraditionalLexer(lexer_conf, parser_conf) + + self.canonize_tree = CanonizeTree() + + def load_grammar(self, grammar_text, grammar_name=''): + "Parse grammar_text, verify, and create Grammar object. Display nice messages on error." + + try: + tree = self.canonize_tree.transform( self.parser.parse(grammar_text+'\n') ) + except UnexpectedCharacters as e: + context = e.get_context(grammar_text) + raise GrammarError("Unexpected input at line %d column %d in %s: \n\n%s" % + (e.line, e.column, grammar_name, context)) + except UnexpectedToken as e: + context = e.get_context(grammar_text) + error = e.match_examples(self.parser.parse, { + 'Unclosed parenthesis': ['a: (\n'], + 'Umatched closing parenthesis': ['a: )\n', 'a: [)\n', 'a: (]\n'], + 'Expecting rule or token definition (missing colon)': ['a\n', 'a->\n', 'A->\n', 'a A\n'], + 'Alias expects lowercase name': ['a: -> "a"\n'], + 'Unexpected colon': ['a::\n', 'a: b:\n', 'a: B:\n', 'a: "a":\n'], + 'Misplaced operator': ['a: b??', 'a: b(?)', 'a:+\n', 'a:?\n', 'a:*\n', 'a:|*\n'], + 'Expecting option ("|") or a new rule or token definition': ['a:a\n()\n'], + '%import expects a name': ['%import "a"\n'], + '%ignore expects a value': ['%ignore %import\n'], + }) + if error: + raise GrammarError("%s at line %s column %s\n\n%s" % (error, e.line, e.column, context)) + elif 'STRING' in e.expected: + raise GrammarError("Expecting a value at line %s column %s\n\n%s" % (e.line, e.column, context)) + raise + + tree = PrepareGrammar().transform(tree) + + # Extract grammar items + defs = classify(tree.children, lambda c: c.data, lambda c: c.children) + token_defs = defs.pop('token', []) + rule_defs = defs.pop('rule', []) + statements = defs.pop('statement', []) + assert not defs + + token_defs = [td if len(td)==3 else (td[0], 1, td[1]) for td in token_defs] + token_defs = [(name.value, (t, int(p))) for name, p, t in token_defs] + + # Execute statements + ignore = [] + declared = [] + for (stmt,) in statements: + if stmt.data == 'ignore': + t ,= stmt.children + ignore.append(t) + elif stmt.data == 'import': + if len(stmt.children) > 1: + path_node, arg1 = stmt.children + else: + path_node ,= stmt.children + arg1 = None + + dotted_path = path_node.children + + if isinstance(arg1, Tree): # Multi import + names = arg1.children + aliases = names # Can't have aliased multi import, so all aliases will be the same as names + else: # Single import + names = [dotted_path[-1]] # Get name from dotted path + aliases = [arg1] if arg1 else names # Aliases if exist + dotted_path = dotted_path[:-1] + + grammar_path = os.path.join(*dotted_path) + EXT + + if path_node.data == 'import_lib': # Import from library + g = import_grammar(grammar_path) + else: # Relative import + if grammar_name == '': # Import relative to script file path if grammar is coded in script + base_file = os.path.abspath(sys.modules['__main__'].__file__) + else: + base_file = grammar_name # Import relative to grammar file path if external grammar file + base_path = os.path.split(base_file)[0] + g = import_grammar(grammar_path, base_paths=[base_path]) + + for name, alias in zip(names, aliases): + token_options = dict(g.token_defs)[name] + assert isinstance(token_options, tuple) and len(token_options)==2 + token_defs.append([alias.value, token_options]) + + elif stmt.data == 'declare': + for t in stmt.children: + token_defs.append([t.value, (None, None)]) + else: + assert False, stmt + + + # Verify correctness 1 + for name, _ in token_defs: + if name.startswith('__'): + raise GrammarError('Names starting with double-underscore are reserved (Error at %s)' % name) + + # Handle ignore tokens + # XXX A slightly hacky solution. Recognition of %ignore TERMINAL as separate comes from the lexer's + # inability to handle duplicate tokens (two names, one value) + ignore_names = [] + for t in ignore: + if t.data=='expansions' and len(t.children) == 1: + t2 ,= t.children + if t2.data=='expansion' and len(t2.children) == 1: + item ,= t2.children + if item.data == 'value': + item ,= item.children + if isinstance(item, Token) and item.type == 'TERMINAL': + ignore_names.append(item.value) + continue + + name = '__IGNORE_%d'% len(ignore_names) + ignore_names.append(name) + token_defs.append((name, (t, 0))) + + # Verify correctness 2 + token_names = set() + for name, _ in token_defs: + if name in token_names: + raise GrammarError("Token '%s' defined more than once" % name) + token_names.add(name) + + if set(ignore_names) > token_names: + raise GrammarError("Tokens %s were marked to ignore but were not defined!" % (set(ignore_names) - token_names)) + + # Resolve token references + resolve_token_references(token_defs) + + rules = [options_from_rule(*x) for x in rule_defs] + + rule_names = set() + for name, _x, _o in rules: + if name.startswith('__'): + raise GrammarError('Names starting with double-underscore are reserved (Error at %s)' % name) + if name in rule_names: + raise GrammarError("Rule '%s' defined more than once" % name) + rule_names.add(name) + + for name, expansions, _o in rules: + used_symbols = {t for x in expansions.find_data('expansion') + for t in x.scan_values(lambda t: t.type in ('RULE', 'TERMINAL'))} + for sym in used_symbols: + if is_terminal(sym): + if sym not in token_names: + raise GrammarError("Token '%s' used but not defined (in rule %s)" % (sym, name)) + else: + if sym not in rule_names: + raise GrammarError("Rule '%s' used but not defined (in rule %s)" % (sym, name)) + + # TODO don't include unused tokens, they can only cause trouble! + + return Grammar(rules, token_defs, ignore_names) + + + +load_grammar = GrammarLoader().load_grammar diff --git a/python/extractor/lark/parse_tree_builder.py b/python/extractor/lark/parse_tree_builder.py new file mode 100644 index 00000000000..5db11345bc8 --- /dev/null +++ b/python/extractor/lark/parse_tree_builder.py @@ -0,0 +1,164 @@ +from .exceptions import GrammarError +from .utils import suppress +from .lexer import Token +from .grammar import Rule +from .tree import Tree +from .visitors import InlineTransformer # XXX Deprecated + +###{standalone +from functools import partial, wraps + + +class ExpandSingleChild: + def __init__(self, node_builder): + self.node_builder = node_builder + + def __call__(self, children): + if len(children) == 1: + return children[0] + else: + return self.node_builder(children) + + +class PropagatePositions: + def __init__(self, node_builder): + self.node_builder = node_builder + + def __call__(self, children): + res = self.node_builder(children) + + if children and isinstance(res, Tree): + for a in children: + if isinstance(a, Tree): + res.meta.line = a.meta.line + res.meta.column = a.meta.column + elif isinstance(a, Token): + res.meta.line = a.line + res.meta.column = a.column + break + + for a in reversed(children): + # with suppress(AttributeError): + if isinstance(a, Tree): + res.meta.end_line = a.meta.end_line + res.meta.end_column = a.meta.end_column + elif isinstance(a, Token): + res.meta.end_line = a.end_line + res.meta.end_column = a.end_column + + break + + return res + + +class ChildFilter: + def __init__(self, to_include, node_builder): + self.node_builder = node_builder + self.to_include = to_include + + def __call__(self, children): + filtered = [] + for i, to_expand in self.to_include: + if to_expand: + filtered += children[i].children + else: + filtered.append(children[i]) + + return self.node_builder(filtered) + +class ChildFilterLALR(ChildFilter): + "Optimized childfilter for LALR (assumes no duplication in parse tree, so it's safe to change it)" + + def __call__(self, children): + filtered = [] + for i, to_expand in self.to_include: + if to_expand: + if filtered: + filtered += children[i].children + else: # Optimize for left-recursion + filtered = children[i].children + else: + filtered.append(children[i]) + + return self.node_builder(filtered) + +def _should_expand(sym): + return not sym.is_term and sym.name.startswith('_') + +def maybe_create_child_filter(expansion, keep_all_tokens, ambiguous): + to_include = [(i, _should_expand(sym)) for i, sym in enumerate(expansion) + if keep_all_tokens or not (sym.is_term and sym.filter_out)] + + if len(to_include) < len(expansion) or any(to_expand for i, to_expand in to_include): + return partial(ChildFilter if ambiguous else ChildFilterLALR, to_include) + + +class Callback(object): + pass + + +def inline_args(func): + @wraps(func) + def f(children): + return func(*children) + return f + + + +class ParseTreeBuilder: + def __init__(self, rules, tree_class, propagate_positions=False, keep_all_tokens=False, ambiguous=False): + self.tree_class = tree_class + self.propagate_positions = propagate_positions + self.always_keep_all_tokens = keep_all_tokens + self.ambiguous = ambiguous + + self.rule_builders = list(self._init_builders(rules)) + + self.user_aliases = {} + + def _init_builders(self, rules): + for rule in rules: + options = rule.options + keep_all_tokens = self.always_keep_all_tokens or (options.keep_all_tokens if options else False) + expand_single_child = options.expand1 if options else False + + wrapper_chain = filter(None, [ + (expand_single_child and not rule.alias) and ExpandSingleChild, + maybe_create_child_filter(rule.expansion, keep_all_tokens, self.ambiguous), + self.propagate_positions and PropagatePositions, + ]) + + yield rule, wrapper_chain + + + def create_callback(self, transformer=None): + callback = Callback() + + i = 0 + for rule, wrapper_chain in self.rule_builders: + internal_callback_name = '_cb%d_%s' % (i, rule.origin) + i += 1 + + user_callback_name = rule.alias or rule.origin.name + try: + f = getattr(transformer, user_callback_name) + assert not getattr(f, 'meta', False), "Meta args not supported for internal transformer" + # XXX InlineTransformer is deprecated! + if getattr(f, 'inline', False) or isinstance(transformer, InlineTransformer): + f = inline_args(f) + except AttributeError: + f = partial(self.tree_class, user_callback_name) + + self.user_aliases[rule] = rule.alias + rule.alias = internal_callback_name + + for w in wrapper_chain: + f = w(f) + + if hasattr(callback, internal_callback_name): + raise GrammarError("Rule '%s' already exists" % (rule,)) + setattr(callback, internal_callback_name, f) + + return callback + +###} diff --git a/python/extractor/lark/parser_frontends.py b/python/extractor/lark/parser_frontends.py new file mode 100644 index 00000000000..cb43cb310a2 --- /dev/null +++ b/python/extractor/lark/parser_frontends.py @@ -0,0 +1,189 @@ +import re +from functools import partial + +from .utils import get_regexp_width +from .parsers.grammar_analysis import GrammarAnalyzer +from .lexer import TraditionalLexer, ContextualLexer, Lexer, Token + +from .parsers import lalr_parser, earley, xearley, resolve_ambig, cyk +from .tree import Tree + +class WithLexer: + lexer = None + parser = None + lexer_conf = None + + def init_traditional_lexer(self, lexer_conf): + self.lexer_conf = lexer_conf + self.lexer = TraditionalLexer(lexer_conf.tokens, ignore=lexer_conf.ignore, user_callbacks=lexer_conf.callbacks) + + def init_contextual_lexer(self, lexer_conf): + self.lexer_conf = lexer_conf + states = {idx:list(t.keys()) for idx, t in self.parser._parse_table.states.items()} + always_accept = lexer_conf.postlex.always_accept if lexer_conf.postlex else () + self.lexer = ContextualLexer(lexer_conf.tokens, states, + ignore=lexer_conf.ignore, + always_accept=always_accept, + user_callbacks=lexer_conf.callbacks) + + def lex(self, text): + stream = self.lexer.lex(text) + if self.lexer_conf.postlex: + return self.lexer_conf.postlex.process(stream) + return stream + + def parse(self, text): + token_stream = self.lex(text) + sps = self.lexer.set_parser_state + return self.parser.parse(token_stream, *[sps] if sps is not NotImplemented else []) + +class LALR_TraditionalLexer(WithLexer): + def __init__(self, lexer_conf, parser_conf, options=None): + self.parser = lalr_parser.Parser(parser_conf) + self.init_traditional_lexer(lexer_conf) + +class LALR_ContextualLexer(WithLexer): + def __init__(self, lexer_conf, parser_conf, options=None): + self.parser = lalr_parser.Parser(parser_conf) + self.init_contextual_lexer(lexer_conf) + +class LALR_CustomLexer(WithLexer): + def __init__(self, lexer_cls, lexer_conf, parser_conf, options=None): + self.parser = lalr_parser.Parser(parser_conf) + self.lexer_conf = lexer_conf + self.lexer = lexer_cls(lexer_conf) + + +def get_ambiguity_resolver(options): + if not options or options.ambiguity == 'resolve': + return resolve_ambig.standard_resolve_ambig + elif options.ambiguity == 'resolve__antiscore_sum': + return resolve_ambig.antiscore_sum_resolve_ambig + elif options.ambiguity == 'explicit': + return None + raise ValueError(options) + +def tokenize_text(text): + line = 1 + col_start_pos = 0 + for i, ch in enumerate(text): + if '\n' in ch: + line += ch.count('\n') + col_start_pos = i + ch.rindex('\n') + yield Token('CHAR', ch, line=line, column=i - col_start_pos) + +class Earley(WithLexer): + def __init__(self, lexer_conf, parser_conf, options=None): + self.init_traditional_lexer(lexer_conf) + + self.parser = earley.Parser(parser_conf, self.match, + resolve_ambiguity=get_ambiguity_resolver(options)) + + def match(self, term, token): + return term.name == token.type + + +class XEarley: + def __init__(self, lexer_conf, parser_conf, options=None, **kw): + self.token_by_name = {t.name:t for t in lexer_conf.tokens} + + self._prepare_match(lexer_conf) + + self.parser = xearley.Parser(parser_conf, + self.match, + resolve_ambiguity=get_ambiguity_resolver(options), + ignore=lexer_conf.ignore, + predict_all=options.earley__predict_all, + **kw + ) + + def match(self, term, text, index=0): + return self.regexps[term.name].match(text, index) + + def _prepare_match(self, lexer_conf): + self.regexps = {} + for t in lexer_conf.tokens: + regexp = t.pattern.to_regexp() + try: + width = get_regexp_width(regexp)[0] + except ValueError: + raise ValueError("Bad regexp in token %s: %s" % (t.name, regexp)) + else: + if width == 0: + raise ValueError("Dynamic Earley doesn't allow zero-width regexps", t) + + self.regexps[t.name] = re.compile(regexp) + + def parse(self, text): + return self.parser.parse(text) + +class XEarley_CompleteLex(XEarley): + def __init__(self, *args, **kw): + super(self).__init__(*args, complete_lex=True, **kw) + + + +class CYK(WithLexer): + + def __init__(self, lexer_conf, parser_conf, options=None): + self.init_traditional_lexer(lexer_conf) + + self._analysis = GrammarAnalyzer(parser_conf) + self._parser = cyk.Parser(parser_conf.rules, parser_conf.start) + + self._postprocess = {} + for rule in parser_conf.rules: + a = rule.alias + self._postprocess[a] = a if callable(a) else (a and getattr(parser_conf.callback, a)) + + def parse(self, text): + tokens = list(self.lex(text)) + parse = self._parser.parse(tokens) + parse = self._transform(parse) + return parse + + def _transform(self, tree): + subtrees = list(tree.iter_subtrees()) + for subtree in subtrees: + subtree.children = [self._apply_callback(c) if isinstance(c, Tree) else c for c in subtree.children] + + return self._apply_callback(tree) + + def _apply_callback(self, tree): + children = tree.children + callback = self._postprocess[tree.rule.alias] + assert callback, tree.rule.alias + r = callback(children) + return r + + +def get_frontend(parser, lexer): + if parser=='lalr': + if lexer is None: + raise ValueError('The LALR parser requires use of a lexer') + elif lexer == 'standard': + return LALR_TraditionalLexer + elif lexer == 'contextual': + return LALR_ContextualLexer + elif issubclass(lexer, Lexer): + return partial(LALR_CustomLexer, lexer) + else: + raise ValueError('Unknown lexer: %s' % lexer) + elif parser=='earley': + if lexer=='standard': + return Earley + elif lexer=='dynamic': + return XEarley + elif lexer=='dynamic_complete': + return XEarley_CompleteLex + elif lexer=='contextual': + raise ValueError('The Earley parser does not support the contextual parser') + else: + raise ValueError('Unknown lexer: %s' % lexer) + elif parser == 'cyk': + if lexer == 'standard': + return CYK + else: + raise ValueError('CYK parser requires using standard parser.') + else: + raise ValueError('Unknown parser: %s' % parser) diff --git a/python/extractor/lark/parsers/__init__.py b/python/extractor/lark/parsers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/lark/parsers/cyk.py b/python/extractor/lark/parsers/cyk.py new file mode 100644 index 00000000000..d65d485b285 --- /dev/null +++ b/python/extractor/lark/parsers/cyk.py @@ -0,0 +1,342 @@ +"""This module implements a CYK parser.""" + +# Author: https://github.com/ehudt (2018) +# +# Adapted by Erez + + +from collections import defaultdict +import itertools + +from ..exceptions import ParseError +from ..lexer import Token +from ..tree import Tree +from ..grammar import Terminal as T, NonTerminal as NT, Symbol + +try: + xrange +except NameError: + xrange = range + +def match(t, s): + assert isinstance(t, T) + return t.name == s.type + + +class Rule(object): + """Context-free grammar rule.""" + + def __init__(self, lhs, rhs, weight, alias): + super(Rule, self).__init__() + assert isinstance(lhs, NT), lhs + assert all(isinstance(x, NT) or isinstance(x, T) for x in rhs), rhs + self.lhs = lhs + self.rhs = rhs + self.weight = weight + self.alias = alias + + def __str__(self): + return '%s -> %s' % (str(self.lhs), ' '.join(str(x) for x in self.rhs)) + + def __repr__(self): + return str(self) + + def __hash__(self): + return hash((self.lhs, tuple(self.rhs))) + + def __eq__(self, other): + return self.lhs == other.lhs and self.rhs == other.rhs + + def __ne__(self, other): + return not (self == other) + + +class Grammar(object): + """Context-free grammar.""" + + def __init__(self, rules): + self.rules = frozenset(rules) + + def __eq__(self, other): + return self.rules == other.rules + + def __str__(self): + return '\n' + '\n'.join(sorted(repr(x) for x in self.rules)) + '\n' + + def __repr__(self): + return str(self) + + +# Parse tree data structures +class RuleNode(object): + """A node in the parse tree, which also contains the full rhs rule.""" + + def __init__(self, rule, children, weight=0): + self.rule = rule + self.children = children + self.weight = weight + + def __repr__(self): + return 'RuleNode(%s, [%s])' % (repr(self.rule.lhs), ', '.join(str(x) for x in self.children)) + + + +class Parser(object): + """Parser wrapper.""" + + def __init__(self, rules, start): + super(Parser, self).__init__() + self.orig_rules = {rule.alias: rule for rule in rules} + rules = [self._to_rule(rule) for rule in rules] + self.grammar = to_cnf(Grammar(rules)) + self.start = NT(start) + + def _to_rule(self, lark_rule): + """Converts a lark rule, (lhs, rhs, callback, options), to a Rule.""" + assert isinstance(lark_rule.origin, NT) + assert all(isinstance(x, Symbol) for x in lark_rule.expansion) + return Rule( + lark_rule.origin, lark_rule.expansion, + weight=lark_rule.options.priority if lark_rule.options and lark_rule.options.priority else 0, + alias=lark_rule.alias) + + def parse(self, tokenized): # pylint: disable=invalid-name + """Parses input, which is a list of tokens.""" + table, trees = _parse(tokenized, self.grammar) + # Check if the parse succeeded. + if all(r.lhs != self.start for r in table[(0, len(tokenized) - 1)]): + raise ParseError('Parsing failed.') + parse = trees[(0, len(tokenized) - 1)][self.start] + return self._to_tree(revert_cnf(parse)) + + def _to_tree(self, rule_node): + """Converts a RuleNode parse tree to a lark Tree.""" + orig_rule = self.orig_rules[rule_node.rule.alias] + children = [] + for child in rule_node.children: + if isinstance(child, RuleNode): + children.append(self._to_tree(child)) + else: + assert isinstance(child.name, Token) + children.append(child.name) + t = Tree(orig_rule.origin, children) + t.rule=orig_rule + return t + + +def print_parse(node, indent=0): + if isinstance(node, RuleNode): + print(' ' * (indent * 2) + str(node.rule.lhs)) + for child in node.children: + print_parse(child, indent + 1) + else: + print(' ' * (indent * 2) + str(node.s)) + + +def _parse(s, g): + """Parses sentence 's' using CNF grammar 'g'.""" + # The CYK table. Indexed with a 2-tuple: (start pos, end pos) + table = defaultdict(set) + # Top-level structure is similar to the CYK table. Each cell is a dict from + # rule name to the best (lightest) tree for that rule. + trees = defaultdict(dict) + # Populate base case with existing terminal production rules + for i, w in enumerate(s): + for terminal, rules in g.terminal_rules.items(): + if match(terminal, w): + for rule in rules: + table[(i, i)].add(rule) + if (rule.lhs not in trees[(i, i)] or + rule.weight < trees[(i, i)][rule.lhs].weight): + trees[(i, i)][rule.lhs] = RuleNode(rule, [T(w)], weight=rule.weight) + + # Iterate over lengths of sub-sentences + for l in xrange(2, len(s) + 1): + # Iterate over sub-sentences with the given length + for i in xrange(len(s) - l + 1): + # Choose partition of the sub-sentence in [1, l) + for p in xrange(i + 1, i + l): + span1 = (i, p - 1) + span2 = (p, i + l - 1) + for r1, r2 in itertools.product(table[span1], table[span2]): + for rule in g.nonterminal_rules.get((r1.lhs, r2.lhs), []): + table[(i, i + l - 1)].add(rule) + r1_tree = trees[span1][r1.lhs] + r2_tree = trees[span2][r2.lhs] + rule_total_weight = rule.weight + r1_tree.weight + r2_tree.weight + if (rule.lhs not in trees[(i, i + l - 1)] + or rule_total_weight < trees[(i, i + l - 1)][rule.lhs].weight): + trees[(i, i + l - 1)][rule.lhs] = RuleNode(rule, [r1_tree, r2_tree], weight=rule_total_weight) + return table, trees + + +# This section implements context-free grammar converter to Chomsky normal form. +# It also implements a conversion of parse trees from its CNF to the original +# grammar. +# Overview: +# Applies the following operations in this order: +# * TERM: Eliminates non-solitary terminals from all rules +# * BIN: Eliminates rules with more than 2 symbols on their right-hand-side. +# * UNIT: Eliminates non-terminal unit rules +# +# The following grammar characteristics aren't featured: +# * Start symbol appears on RHS +# * Empty rules (epsilon rules) + + +class CnfWrapper(object): + """CNF wrapper for grammar. + + Validates that the input grammar is CNF and provides helper data structures. + """ + + def __init__(self, grammar): + super(CnfWrapper, self).__init__() + self.grammar = grammar + self.rules = grammar.rules + self.terminal_rules = defaultdict(list) + self.nonterminal_rules = defaultdict(list) + for r in self.rules: + # Validate that the grammar is CNF and populate auxiliary data structures. + assert isinstance(r.lhs, NT), r + assert len(r.rhs) in [1, 2], r + if len(r.rhs) == 1 and isinstance(r.rhs[0], T): + self.terminal_rules[r.rhs[0]].append(r) + elif len(r.rhs) == 2 and all(isinstance(x, NT) for x in r.rhs): + self.nonterminal_rules[tuple(r.rhs)].append(r) + else: + assert False, r + + def __eq__(self, other): + return self.grammar == other.grammar + + def __repr__(self): + return repr(self.grammar) + + +class UnitSkipRule(Rule): + """A rule that records NTs that were skipped during transformation.""" + + def __init__(self, lhs, rhs, skipped_rules, weight, alias): + super(UnitSkipRule, self).__init__(lhs, rhs, weight, alias) + self.skipped_rules = skipped_rules + + def __eq__(self, other): + return isinstance(other, type(self)) and self.skipped_rules == other.skipped_rules + + __hash__ = Rule.__hash__ + + +def build_unit_skiprule(unit_rule, target_rule): + skipped_rules = [] + if isinstance(unit_rule, UnitSkipRule): + skipped_rules += unit_rule.skipped_rules + skipped_rules.append(target_rule) + if isinstance(target_rule, UnitSkipRule): + skipped_rules += target_rule.skipped_rules + return UnitSkipRule(unit_rule.lhs, target_rule.rhs, skipped_rules, + weight=unit_rule.weight + target_rule.weight, alias=unit_rule.alias) + + +def get_any_nt_unit_rule(g): + """Returns a non-terminal unit rule from 'g', or None if there is none.""" + for rule in g.rules: + if len(rule.rhs) == 1 and isinstance(rule.rhs[0], NT): + return rule + return None + + +def _remove_unit_rule(g, rule): + """Removes 'rule' from 'g' without changing the langugage produced by 'g'.""" + new_rules = [x for x in g.rules if x != rule] + refs = [x for x in g.rules if x.lhs == rule.rhs[0]] + new_rules += [build_unit_skiprule(rule, ref) for ref in refs] + return Grammar(new_rules) + + +def _split(rule): + """Splits a rule whose len(rhs) > 2 into shorter rules.""" + rule_str = str(rule.lhs) + '__' + '_'.join(str(x) for x in rule.rhs) + rule_name = '__SP_%s' % (rule_str) + '_%d' + yield Rule(rule.lhs, [rule.rhs[0], NT(rule_name % 1)], weight=rule.weight, alias=rule.alias) + for i in xrange(1, len(rule.rhs) - 2): + yield Rule(NT(rule_name % i), [rule.rhs[i], NT(rule_name % (i + 1))], weight=0, alias='Split') + yield Rule(NT(rule_name % (len(rule.rhs) - 2)), rule.rhs[-2:], weight=0, alias='Split') + + +def _term(g): + """Applies the TERM rule on 'g' (see top comment).""" + all_t = {x for rule in g.rules for x in rule.rhs if isinstance(x, T)} + t_rules = {t: Rule(NT('__T_%s' % str(t)), [t], weight=0, alias='Term') for t in all_t} + new_rules = [] + for rule in g.rules: + if len(rule.rhs) > 1 and any(isinstance(x, T) for x in rule.rhs): + new_rhs = [t_rules[x].lhs if isinstance(x, T) else x for x in rule.rhs] + new_rules.append(Rule(rule.lhs, new_rhs, weight=rule.weight, alias=rule.alias)) + new_rules.extend(v for k, v in t_rules.items() if k in rule.rhs) + else: + new_rules.append(rule) + return Grammar(new_rules) + + +def _bin(g): + """Applies the BIN rule to 'g' (see top comment).""" + new_rules = [] + for rule in g.rules: + if len(rule.rhs) > 2: + new_rules += _split(rule) + else: + new_rules.append(rule) + return Grammar(new_rules) + + +def _unit(g): + """Applies the UNIT rule to 'g' (see top comment).""" + nt_unit_rule = get_any_nt_unit_rule(g) + while nt_unit_rule: + g = _remove_unit_rule(g, nt_unit_rule) + nt_unit_rule = get_any_nt_unit_rule(g) + return g + + +def to_cnf(g): + """Creates a CNF grammar from a general context-free grammar 'g'.""" + g = _unit(_bin(_term(g))) + return CnfWrapper(g) + + +def unroll_unit_skiprule(lhs, orig_rhs, skipped_rules, children, weight, alias): + if not skipped_rules: + return RuleNode(Rule(lhs, orig_rhs, weight=weight, alias=alias), children, weight=weight) + else: + weight = weight - skipped_rules[0].weight + return RuleNode( + Rule(lhs, [skipped_rules[0].lhs], weight=weight, alias=alias), [ + unroll_unit_skiprule(skipped_rules[0].lhs, orig_rhs, + skipped_rules[1:], children, + skipped_rules[0].weight, skipped_rules[0].alias) + ], weight=weight) + + +def revert_cnf(node): + """Reverts a parse tree (RuleNode) to its original non-CNF form (Node).""" + if isinstance(node, T): + return node + # Reverts TERM rule. + if node.rule.lhs.name.startswith('__T_'): + return node.children[0] + else: + children = [] + for child in map(revert_cnf, node.children): + # Reverts BIN rule. + if isinstance(child, RuleNode) and child.rule.lhs.name.startswith('__SP_'): + children += child.children + else: + children.append(child) + # Reverts UNIT rule. + if isinstance(node.rule, UnitSkipRule): + return unroll_unit_skiprule(node.rule.lhs, node.rule.rhs, + node.rule.skipped_rules, children, + node.rule.weight, node.rule.alias) + else: + return RuleNode(node.rule, children) diff --git a/python/extractor/lark/parsers/earley.py b/python/extractor/lark/parsers/earley.py new file mode 100644 index 00000000000..4ff26b2c793 --- /dev/null +++ b/python/extractor/lark/parsers/earley.py @@ -0,0 +1,239 @@ +"This module implements an Earley Parser" + +# The parser uses a parse-forest to keep track of derivations and ambiguations. +# When the parse ends successfully, a disambiguation stage resolves all ambiguity +# (right now ambiguity resolution is not developed beyond the needs of lark) +# Afterwards the parse tree is reduced (transformed) according to user callbacks. +# I use the no-recursion version of Transformer, because the tree might be +# deeper than Python's recursion limit (a bit absurd, but that's life) +# +# The algorithm keeps track of each state set, using a corresponding Column instance. +# Column keeps track of new items using NewsList instances. +# +# Author: Erez Shinan (2017) +# Email : erezshin@gmail.com + +from ..tree import Tree +from ..visitors import Transformer_InPlace, v_args +from ..exceptions import ParseError, UnexpectedToken +from .grammar_analysis import GrammarAnalyzer +from ..grammar import NonTerminal + + +class Derivation(Tree): + def __init__(self, rule, items=None): + Tree.__init__(self, 'drv', items or []) + self.meta.rule = rule + self._hash = None + + def _pretty_label(self): # Nicer pretty for debugging the parser + return self.rule.origin if self.rule else self.data + + def __hash__(self): + if self._hash is None: + self._hash = Tree.__hash__(self) + return self._hash + +class Item(object): + "An Earley Item, the atom of the algorithm." + + def __init__(self, rule, ptr, start, tree): + self.rule = rule + self.ptr = ptr + self.start = start + self.tree = tree if tree is not None else Derivation(self.rule) + + @property + def expect(self): + return self.rule.expansion[self.ptr] + + @property + def is_complete(self): + return self.ptr == len(self.rule.expansion) + + def advance(self, tree): + assert self.tree.data == 'drv' + new_tree = Derivation(self.rule, self.tree.children + [tree]) + return self.__class__(self.rule, self.ptr+1, self.start, new_tree) + + def __eq__(self, other): + return self.start is other.start and self.ptr == other.ptr and self.rule == other.rule + + def __hash__(self): + return hash((self.rule, self.ptr, id(self.start))) # Always runs Derivation.__hash__ + + def __repr__(self): + before = list(map(str, self.rule.expansion[:self.ptr])) + after = list(map(str, self.rule.expansion[self.ptr:])) + return '<(%d) %s : %s * %s>' % (id(self.start), self.rule.origin, ' '.join(before), ' '.join(after)) + +class NewsList(list): + "Keeps track of newly added items (append-only)" + + def __init__(self, initial=None): + list.__init__(self, initial or []) + self.last_iter = 0 + + def get_news(self): + i = self.last_iter + self.last_iter = len(self) + return self[i:] + + + +class Column: + "An entry in the table, aka Earley Chart. Contains lists of items." + def __init__(self, i, FIRST, predict_all=False): + self.i = i + self.to_reduce = NewsList() + self.to_predict = NewsList() + self.to_scan = [] + self.item_count = 0 + self.FIRST = FIRST + + self.predicted = set() + self.completed = {} + self.predict_all = predict_all + + def add(self, items): + """Sort items into scan/predict/reduce newslists + + Makes sure only unique items are added. + """ + for item in items: + + item_key = item, item.tree # Elsewhere, tree is not part of the comparison + if item.is_complete: + # XXX Potential bug: What happens if there's ambiguity in an empty rule? + if item.rule.expansion and item_key in self.completed: + old_tree = self.completed[item_key].tree + if old_tree == item.tree: + is_empty = not self.FIRST[item.rule.origin] + if not is_empty: + continue + + if old_tree.data != '_ambig': + new_tree = old_tree.copy() + new_tree.meta.rule = old_tree.meta.rule + old_tree.set('_ambig', [new_tree]) + old_tree.meta.rule = None # No longer a 'drv' node + + if item.tree.children[0] is old_tree: # XXX a little hacky! + raise ParseError("Infinite recursion in grammar! (Rule %s)" % item.rule) + + if item.tree not in old_tree.children: + old_tree.children.append(item.tree) + # old_tree.children.append(item.tree) + else: + self.completed[item_key] = item + self.to_reduce.append(item) + else: + if item.expect.is_term: + self.to_scan.append(item) + else: + k = item_key if self.predict_all else item + if k in self.predicted: + continue + self.predicted.add(k) + self.to_predict.append(item) + + self.item_count += 1 # Only count if actually added + + + def __bool__(self): + return bool(self.item_count) + __nonzero__ = __bool__ # Py2 backwards-compatibility + +class Parser: + def __init__(self, parser_conf, term_matcher, resolve_ambiguity=None): + analysis = GrammarAnalyzer(parser_conf) + self.parser_conf = parser_conf + self.resolve_ambiguity = resolve_ambiguity + + self.FIRST = analysis.FIRST + self.postprocess = {} + self.predictions = {} + for rule in parser_conf.rules: + self.postprocess[rule] = rule.alias if callable(rule.alias) else getattr(parser_conf.callback, rule.alias) + self.predictions[rule.origin] = [x.rule for x in analysis.expand_rule(rule.origin)] + + self.term_matcher = term_matcher + + + def parse(self, stream, start_symbol=None): + # Define parser functions + start_symbol = NonTerminal(start_symbol or self.parser_conf.start) + + _Item = Item + match = self.term_matcher + + def predict(nonterm, column): + assert not nonterm.is_term, nonterm + return [_Item(rule, 0, column, None) for rule in self.predictions[nonterm]] + + def complete(item): + name = item.rule.origin + return [i.advance(item.tree) for i in item.start.to_predict if i.expect == name] + + def predict_and_complete(column): + while True: + to_predict = {x.expect for x in column.to_predict.get_news() + if x.ptr} # if not part of an already predicted batch + to_reduce = set(column.to_reduce.get_news()) + if not (to_predict or to_reduce): + break + + for nonterm in to_predict: + column.add( predict(nonterm, column) ) + + for item in to_reduce: + new_items = list(complete(item)) + if item in new_items: + raise ParseError('Infinite recursion detected! (rule %s)' % item.rule) + column.add(new_items) + + def scan(i, token, column): + next_set = Column(i, self.FIRST) + next_set.add(item.advance(token) for item in column.to_scan if match(item.expect, token)) + + if not next_set: + expect = {i.expect.name for i in column.to_scan} + raise UnexpectedToken(token, expect, considered_rules=set(column.to_scan)) + + return next_set + + # Main loop starts + column0 = Column(0, self.FIRST) + column0.add(predict(start_symbol, column0)) + + column = column0 + for i, token in enumerate(stream): + predict_and_complete(column) + column = scan(i, token, column) + + predict_and_complete(column) + + # Parse ended. Now build a parse tree + solutions = [n.tree for n in column.to_reduce + if n.rule.origin==start_symbol and n.start is column0] + + if not solutions: + raise ParseError('Incomplete parse: Could not find a solution to input') + elif len(solutions) == 1: + tree = solutions[0] + else: + tree = Tree('_ambig', solutions) + + if self.resolve_ambiguity: + tree = self.resolve_ambiguity(tree) + + return ApplyCallbacks(self.postprocess).transform(tree) + + +class ApplyCallbacks(Transformer_InPlace): + def __init__(self, postprocess): + self.postprocess = postprocess + + @v_args(meta=True) + def drv(self, children, meta): + return self.postprocess[meta.rule](children) diff --git a/python/extractor/lark/parsers/grammar_analysis.py b/python/extractor/lark/parsers/grammar_analysis.py new file mode 100644 index 00000000000..d27aa9360f8 --- /dev/null +++ b/python/extractor/lark/parsers/grammar_analysis.py @@ -0,0 +1,148 @@ + +from ..utils import bfs, fzset, classify +from ..exceptions import GrammarError +from ..grammar import Rule, Terminal, NonTerminal + + +class RulePtr(object): + __slots__ = ('rule', 'index') + + def __init__(self, rule, index): + assert isinstance(rule, Rule) + assert index <= len(rule.expansion) + self.rule = rule + self.index = index + + def __repr__(self): + before = self.rule.expansion[:self.index] + after = self.rule.expansion[self.index:] + return '<%s : %s * %s>' % (self.rule.origin, ' '.join(before), ' '.join(after)) + + @property + def next(self): + return self.rule.expansion[self.index] + + def advance(self, sym): + assert self.next == sym + return RulePtr(self.rule, self.index+1) + + @property + def is_satisfied(self): + return self.index == len(self.rule.expansion) + + def __eq__(self, other): + return self.rule == other.rule and self.index == other.index + def __hash__(self): + return hash((self.rule, self.index)) + + +def update_set(set1, set2): + if not set2: + return False + + copy = set(set1) + set1 |= set2 + return set1 != copy + +def calculate_sets(rules): + """Calculate FOLLOW sets. + + Adapted from: http://lara.epfl.ch/w/cc09:algorithm_for_first_and_follow_sets""" + symbols = {sym for rule in rules for sym in rule.expansion} | {rule.origin for rule in rules} + + # foreach grammar rule X ::= Y(1) ... Y(k) + # if k=0 or {Y(1),...,Y(k)} subset of NULLABLE then + # NULLABLE = NULLABLE union {X} + # for i = 1 to k + # if i=1 or {Y(1),...,Y(i-1)} subset of NULLABLE then + # FIRST(X) = FIRST(X) union FIRST(Y(i)) + # for j = i+1 to k + # if i=k or {Y(i+1),...Y(k)} subset of NULLABLE then + # FOLLOW(Y(i)) = FOLLOW(Y(i)) union FOLLOW(X) + # if i+1=j or {Y(i+1),...,Y(j-1)} subset of NULLABLE then + # FOLLOW(Y(i)) = FOLLOW(Y(i)) union FIRST(Y(j)) + # until none of NULLABLE,FIRST,FOLLOW changed in last iteration + + NULLABLE = set() + FIRST = {} + FOLLOW = {} + for sym in symbols: + FIRST[sym]={sym} if sym.is_term else set() + FOLLOW[sym]=set() + + # Calculate NULLABLE and FIRST + changed = True + while changed: + changed = False + + for rule in rules: + if set(rule.expansion) <= NULLABLE: + if update_set(NULLABLE, {rule.origin}): + changed = True + + for i, sym in enumerate(rule.expansion): + if set(rule.expansion[:i]) <= NULLABLE: + if update_set(FIRST[rule.origin], FIRST[sym]): + changed = True + + # Calculate FOLLOW + changed = True + while changed: + changed = False + + for rule in rules: + for i, sym in enumerate(rule.expansion): + if i==len(rule.expansion)-1 or set(rule.expansion[i:]) <= NULLABLE: + if update_set(FOLLOW[sym], FOLLOW[rule.origin]): + changed = True + + for j in range(i+1, len(rule.expansion)): + if set(rule.expansion[i+1:j]) <= NULLABLE: + if update_set(FOLLOW[sym], FIRST[rule.expansion[j]]): + changed = True + + return FIRST, FOLLOW, NULLABLE + + +class GrammarAnalyzer(object): + def __init__(self, parser_conf, debug=False): + self.debug = debug + + rules = parser_conf.rules + [Rule(NonTerminal('$root'), [NonTerminal(parser_conf.start), Terminal('$END')])] + self.rules_by_origin = classify(rules, lambda r: r.origin) + + assert len(rules) == len(set(rules)) + for r in rules: + for sym in r.expansion: + if not (sym.is_term or sym in self.rules_by_origin): + raise GrammarError("Using an undefined rule: %s" % sym) # TODO test validation + + self.start_state = self.expand_rule(NonTerminal('$root')) + + self.FIRST, self.FOLLOW, self.NULLABLE = calculate_sets(rules) + + def expand_rule(self, rule): + "Returns all init_ptrs accessible by rule (recursive)" + init_ptrs = set() + def _expand_rule(rule): + assert not rule.is_term, rule + + for r in self.rules_by_origin[rule]: + init_ptr = RulePtr(r, 0) + init_ptrs.add(init_ptr) + + if r.expansion: # if not empty rule + new_r = init_ptr.next + if not new_r.is_term: + yield new_r + + for _ in bfs([rule], _expand_rule): + pass + + return fzset(init_ptrs) + + def _first(self, r): + if r.is_term: + return {r} + else: + return {rp.next for rp in self.expand_rule(r) if rp.next.is_term} diff --git a/python/extractor/lark/parsers/lalr_analysis.py b/python/extractor/lark/parsers/lalr_analysis.py new file mode 100644 index 00000000000..b69fa0f31ee --- /dev/null +++ b/python/extractor/lark/parsers/lalr_analysis.py @@ -0,0 +1,108 @@ +"""This module builds a LALR(1) transition-table for lalr_parser.py + +For now, shift/reduce conflicts are automatically resolved as shifts. +""" + +# Author: Erez Shinan (2017) +# Email : erezshin@gmail.com + +import logging +from collections import defaultdict + +from ..utils import classify, classify_bool, bfs, fzset +from ..exceptions import GrammarError + +from .grammar_analysis import GrammarAnalyzer, Terminal + +class Action: + def __init__(self, name): + self.name = name + def __str__(self): + return self.name + def __repr__(self): + return str(self) + +Shift = Action('Shift') +Reduce = Action('Reduce') + +class ParseTable: + def __init__(self, states, start_state, end_state): + self.states = states + self.start_state = start_state + self.end_state = end_state + +class IntParseTable(ParseTable): + + @classmethod + def from_ParseTable(cls, parse_table): + enum = list(parse_table.states) + state_to_idx = {s:i for i,s in enumerate(enum)} + int_states = {} + + for s, la in parse_table.states.items(): + la = {k:(v[0], state_to_idx[v[1]]) if v[0] is Shift else v + for k,v in la.items()} + int_states[ state_to_idx[s] ] = la + + + start_state = state_to_idx[parse_table.start_state] + end_state = state_to_idx[parse_table.end_state] + return cls(int_states, start_state, end_state) + + + + +class LALR_Analyzer(GrammarAnalyzer): + + def compute_lookahead(self): + self.end_states = [] + + self.states = {} + def step(state): + lookahead = defaultdict(list) + sat, unsat = classify_bool(state, lambda rp: rp.is_satisfied) + for rp in sat: + for term in self.FOLLOW.get(rp.rule.origin, ()): + lookahead[term].append((Reduce, rp.rule)) + + d = classify(unsat, lambda rp: rp.next) + for sym, rps in d.items(): + rps = {rp.advance(sym) for rp in rps} + + for rp in set(rps): + if not rp.is_satisfied and not rp.next.is_term: + rps |= self.expand_rule(rp.next) + + new_state = fzset(rps) + lookahead[sym].append((Shift, new_state)) + if sym == Terminal('$END'): + self.end_states.append( new_state ) + yield new_state + + for k, v in lookahead.items(): + if len(v) > 1: + if self.debug: + logging.warn("Shift/reduce conflict for %s: %s. Resolving as shift.", k, v) + for x in v: + # XXX resolving shift/reduce into shift, like PLY + # Give a proper warning + if x[0] is Shift: + lookahead[k] = [x] + + for k, v in lookahead.items(): + if not len(v) == 1: + raise GrammarError("Collision in %s: %s" %(k, ', '.join(['\n * %s: %s' % x for x in v]))) + + self.states[state] = {k.name:v[0] for k, v in lookahead.items()} + + for _ in bfs([self.start_state], step): + pass + + self.end_state ,= self.end_states + + self._parse_table = ParseTable(self.states, self.start_state, self.end_state) + + if self.debug: + self.parse_table = self._parse_table + else: + self.parse_table = IntParseTable.from_ParseTable(self._parse_table) diff --git a/python/extractor/lark/parsers/lalr_parser.py b/python/extractor/lark/parsers/lalr_parser.py new file mode 100644 index 00000000000..8fa56f51aa0 --- /dev/null +++ b/python/extractor/lark/parsers/lalr_parser.py @@ -0,0 +1,90 @@ +"""This module implements a LALR(1) Parser +""" +# Author: Erez Shinan (2017) +# Email : erezshin@gmail.com +from ..exceptions import UnexpectedToken + +from .lalr_analysis import LALR_Analyzer, Shift + +class Parser: + def __init__(self, parser_conf): + assert all(r.options is None or r.options.priority is None + for r in parser_conf.rules), "LALR doesn't yet support prioritization" + analysis = LALR_Analyzer(parser_conf) + analysis.compute_lookahead() + callbacks = {rule: getattr(parser_conf.callback, rule.alias or rule.origin, None) + for rule in parser_conf.rules} + + self._parse_table = analysis.parse_table + self.parser_conf = parser_conf + self.parser = _Parser(analysis.parse_table, callbacks) + self.parse = self.parser.parse + +###{standalone + +class _Parser: + def __init__(self, parse_table, callbacks): + self.states = parse_table.states + self.start_state = parse_table.start_state + self.end_state = parse_table.end_state + self.callbacks = callbacks + + def parse(self, seq, set_state=None): + i = 0 + token = None + stream = iter(seq) + states = self.states + + state_stack = [self.start_state] + value_stack = [] + + if set_state: set_state(self.start_state) + + def get_action(key): + state = state_stack[-1] + try: + return states[state][key] + except KeyError: + expected = states[state].keys() + raise UnexpectedToken(token, expected, state=state) # TODO filter out rules from expected + + def reduce(rule): + size = len(rule.expansion) + if size: + s = value_stack[-size:] + del state_stack[-size:] + del value_stack[-size:] + else: + s = [] + + value = self.callbacks[rule](s) + + _action, new_state = get_action(rule.origin.name) + assert _action is Shift + state_stack.append(new_state) + value_stack.append(value) + + # Main LALR-parser loop + for i, token in enumerate(stream): + while True: + action, arg = get_action(token.type) + assert arg != self.end_state + + if action is Shift: + state_stack.append(arg) + value_stack.append(token) + if set_state: set_state(arg) + break # next token + else: + reduce(arg) + + while True: + _action, arg = get_action('$END') + if _action is Shift: + assert arg == self.end_state + val ,= value_stack + return val + else: + reduce(arg) + +###} diff --git a/python/extractor/lark/parsers/resolve_ambig.py b/python/extractor/lark/parsers/resolve_ambig.py new file mode 100644 index 00000000000..2470eb9788c --- /dev/null +++ b/python/extractor/lark/parsers/resolve_ambig.py @@ -0,0 +1,109 @@ +from ..utils import compare +from functools import cmp_to_key + +from ..tree import Tree + + +# Standard ambiguity resolver (uses comparison) +# +# Author: Erez Sh + +def _compare_rules(rule1, rule2): + return -compare( len(rule1.expansion), len(rule2.expansion)) + +def _sum_priority(tree): + p = 0 + + for n in tree.iter_subtrees(): + try: + p += n.meta.rule.options.priority or 0 + except AttributeError: + pass + + return p + +def _compare_priority(tree1, tree2): + tree1.iter_subtrees() + +def _compare_drv(tree1, tree2): + try: + rule1 = tree1.meta.rule + except AttributeError: + rule1 = None + + try: + rule2 = tree2.meta.rule + except AttributeError: + rule2 = None + + if None == rule1 == rule2: + return compare(tree1, tree2) + elif rule1 is None: + return -1 + elif rule2 is None: + return 1 + + assert tree1.data != '_ambig' + assert tree2.data != '_ambig' + + p1 = _sum_priority(tree1) + p2 = _sum_priority(tree2) + c = (p1 or p2) and compare(p1, p2) + if c: + return c + + c = _compare_rules(tree1.meta.rule, tree2.meta.rule) + if c: + return c + + # rules are "equal", so compare trees + if len(tree1.children) == len(tree2.children): + for t1, t2 in zip(tree1.children, tree2.children): + c = _compare_drv(t1, t2) + if c: + return c + + return compare(len(tree1.children), len(tree2.children)) + + +def _standard_resolve_ambig(tree): + assert tree.data == '_ambig' + key_f = cmp_to_key(_compare_drv) + best = max(tree.children, key=key_f) + assert best.data == 'drv' + tree.set('drv', best.children) + tree.meta.rule = best.meta.rule # needed for applying callbacks + +def standard_resolve_ambig(tree): + for ambig in tree.find_data('_ambig'): + _standard_resolve_ambig(ambig) + + return tree + + + + +# Anti-score Sum +# +# Author: Uriva (https://github.com/uriva) + +def _antiscore_sum_drv(tree): + if not isinstance(tree, Tree): + return 0 + + assert tree.data != '_ambig' + + return _sum_priority(tree) + +def _antiscore_sum_resolve_ambig(tree): + assert tree.data == '_ambig' + best = min(tree.children, key=_antiscore_sum_drv) + assert best.data == 'drv' + tree.set('drv', best.children) + tree.meta.rule = best.meta.rule # needed for applying callbacks + +def antiscore_sum_resolve_ambig(tree): + for ambig in tree.find_data('_ambig'): + _antiscore_sum_resolve_ambig(ambig) + + return tree diff --git a/python/extractor/lark/parsers/xearley.py b/python/extractor/lark/parsers/xearley.py new file mode 100644 index 00000000000..ff194a3c213 --- /dev/null +++ b/python/extractor/lark/parsers/xearley.py @@ -0,0 +1,156 @@ +"This module implements an experimental Earley Parser with a dynamic lexer" + +# The parser uses a parse-forest to keep track of derivations and ambiguations. +# When the parse ends successfully, a disambiguation stage resolves all ambiguity +# (right now ambiguity resolution is not developed beyond the needs of lark) +# Afterwards the parse tree is reduced (transformed) according to user callbacks. +# I use the no-recursion version of Transformer and Visitor, because the tree might be +# deeper than Python's recursion limit (a bit absurd, but that's life) +# +# The algorithm keeps track of each state set, using a corresponding Column instance. +# Column keeps track of new items using NewsList instances. +# +# Instead of running a lexer beforehand, or using a costy char-by-char method, this parser +# uses regular expressions by necessity, achieving high-performance while maintaining all of +# Earley's power in parsing any CFG. +# +# +# Author: Erez Shinan (2017) +# Email : erezshin@gmail.com + +from collections import defaultdict + +from ..exceptions import ParseError, UnexpectedCharacters +from ..lexer import Token +from ..tree import Tree +from .grammar_analysis import GrammarAnalyzer +from ..grammar import NonTerminal, Terminal + +from .earley import ApplyCallbacks, Item, Column + + +class Parser: + def __init__(self, parser_conf, term_matcher, resolve_ambiguity=None, ignore=(), predict_all=False, complete_lex=False): + self.analysis = GrammarAnalyzer(parser_conf) + self.parser_conf = parser_conf + self.resolve_ambiguity = resolve_ambiguity + self.ignore = [Terminal(t) for t in ignore] + self.predict_all = predict_all + self.complete_lex = complete_lex + + self.FIRST = self.analysis.FIRST + self.postprocess = {} + self.predictions = {} + for rule in parser_conf.rules: + self.postprocess[rule] = getattr(parser_conf.callback, rule.alias) + self.predictions[rule.origin] = [x.rule for x in self.analysis.expand_rule(rule.origin)] + + self.term_matcher = term_matcher + + + def parse(self, stream, start_symbol=None): + # Define parser functions + start_symbol = NonTerminal(start_symbol or self.parser_conf.start) + delayed_matches = defaultdict(list) + match = self.term_matcher + + text_line = 1 + text_column = 1 + + def predict(nonterm, column): + assert not nonterm.is_term, nonterm + return [Item(rule, 0, column, None) for rule in self.predictions[nonterm]] + + def complete(item): + name = item.rule.origin + return [i.advance(item.tree) for i in item.start.to_predict if i.expect == name] + + def predict_and_complete(column): + while True: + to_predict = {x.expect for x in column.to_predict.get_news() + if x.ptr} # if not part of an already predicted batch + to_reduce = column.to_reduce.get_news() + if not (to_predict or to_reduce): + break + + for nonterm in to_predict: + column.add( predict(nonterm, column) ) + for item in to_reduce: + new_items = list(complete(item)) + if item in new_items: + raise ParseError('Infinite recursion detected! (rule %s)' % item.rule) + column.add(new_items) + + def scan(i, column): + to_scan = column.to_scan + + for x in self.ignore: + m = match(x, stream, i) + if m: + delayed_matches[m.end()] += set(to_scan) + delayed_matches[m.end()] += set(column.to_reduce) + + # TODO add partial matches for ignore too? + # s = m.group(0) + # for j in range(1, len(s)): + # m = x.match(s[:-j]) + # if m: + # delayed_matches[m.end()] += to_scan + + for item in to_scan: + m = match(item.expect, stream, i) + if m: + t = Token(item.expect.name, m.group(0), i, text_line, text_column) + delayed_matches[m.end()].append(item.advance(t)) + + if self.complete_lex: + s = m.group(0) + for j in range(1, len(s)): + m = match(item.expect, s[:-j]) + if m: + t = Token(item.expect.name, m.group(0), i, text_line, text_column) + delayed_matches[i+m.end()].append(item.advance(t)) + + next_set = Column(i+1, self.FIRST, predict_all=self.predict_all) + next_set.add(delayed_matches[i+1]) + del delayed_matches[i+1] # No longer needed, so unburden memory + + if not next_set and not delayed_matches: + raise UnexpectedCharacters(stream, i, text_line, text_column, {item.expect for item in to_scan}, set(to_scan)) + + return next_set + + # Main loop starts + column0 = Column(0, self.FIRST, predict_all=self.predict_all) + column0.add(predict(start_symbol, column0)) + + column = column0 + for i, token in enumerate(stream): + predict_and_complete(column) + column = scan(i, column) + + if token == '\n': + text_line += 1 + text_column = 1 + else: + text_column += 1 + + predict_and_complete(column) + + # Parse ended. Now build a parse tree + solutions = [n.tree for n in column.to_reduce + if n.rule.origin==start_symbol and n.start is column0] + + if not solutions: + expected_tokens = [t.expect for t in column.to_scan] + raise ParseError('Unexpected end of input! Expecting a terminal of: %s' % expected_tokens) + + elif len(solutions) == 1: + tree = solutions[0] + else: + tree = Tree('_ambig', solutions) + + if self.resolve_ambiguity: + tree = self.resolve_ambiguity(tree) + + return ApplyCallbacks(self.postprocess).transform(tree) diff --git a/python/extractor/lark/reconstruct.py b/python/extractor/lark/reconstruct.py new file mode 100644 index 00000000000..bf8dbafa36a --- /dev/null +++ b/python/extractor/lark/reconstruct.py @@ -0,0 +1,129 @@ +from collections import defaultdict + +from .tree import Tree +from .visitors import Transformer_InPlace +from .common import ParserConf, PatternStr +from .lexer import Token +from .parsers import earley, resolve_ambig +from .grammar import Rule, Terminal, NonTerminal + + + +def is_discarded_terminal(t): + return t.is_term and t.filter_out + +def is_iter_empty(i): + try: + _ = next(i) + return False + except StopIteration: + return True + +class WriteTokensTransformer(Transformer_InPlace): + def __init__(self, tokens): + self.tokens = tokens + + def __default__(self, data, children, meta): + # if not isinstance(t, MatchTree): + # return t + if not getattr(meta, 'match_tree', False): + return Tree(data, children) + + iter_args = iter(children) + to_write = [] + for sym in meta.orig_expansion: + if is_discarded_terminal(sym): + t = self.tokens[sym.name] + assert isinstance(t.pattern, PatternStr) + to_write.append(t.pattern.value) + else: + x = next(iter_args) + if isinstance(x, list): + to_write += x + else: + if isinstance(x, Token): + assert Terminal(x.type) == sym, x + else: + assert NonTerminal(x.data) == sym, (sym, x) + to_write.append(x) + + assert is_iter_empty(iter_args) + return to_write + + +class MatchTree(Tree): + pass + +class MakeMatchTree: + def __init__(self, name, expansion): + self.name = name + self.expansion = expansion + + def __call__(self, args): + t = MatchTree(self.name, args) + t.meta.match_tree = True + t.meta.orig_expansion = self.expansion + return t + +class Reconstructor: + def __init__(self, parser): + # XXX TODO calling compile twice returns different results! + tokens, rules, _grammar_extra = parser.grammar.compile() + + self.write_tokens = WriteTokensTransformer({t.name:t for t in tokens}) + self.rules = list(self._build_recons_rules(rules)) + + def _build_recons_rules(self, rules): + expand1s = {r.origin for r in rules if r.options and r.options.expand1} + + aliases = defaultdict(list) + for r in rules: + if r.alias: + aliases[r.origin].append( r.alias ) + + rule_names = {r.origin for r in rules} + nonterminals = {sym for sym in rule_names + if sym.name.startswith('_') or sym in expand1s or sym in aliases } + + for r in rules: + recons_exp = [sym if sym in nonterminals else Terminal(sym.name) + for sym in r.expansion if not is_discarded_terminal(sym)] + + # Skip self-recursive constructs + if recons_exp == [r.origin]: + continue + + sym = NonTerminal(r.alias) if r.alias else r.origin + + yield Rule(sym, recons_exp, MakeMatchTree(sym.name, r.expansion)) + + for origin, rule_aliases in aliases.items(): + for alias in rule_aliases: + yield Rule(origin, [Terminal(alias)], MakeMatchTree(origin.name, [NonTerminal(alias)])) + + yield Rule(origin, [Terminal(origin.name)], MakeMatchTree(origin.name, [origin])) + + + + def _match(self, term, token): + if isinstance(token, Tree): + return Terminal(token.data) == term + elif isinstance(token, Token): + return term == Terminal(token.type) + assert False + + def _reconstruct(self, tree): + # TODO: ambiguity? + parser = earley.Parser(ParserConf(self.rules, None, tree.data), self._match, resolve_ambiguity=resolve_ambig.standard_resolve_ambig) + unreduced_tree = parser.parse(tree.children) # find a full derivation + assert unreduced_tree.data == tree.data + res = self.write_tokens.transform(unreduced_tree) + for item in res: + if isinstance(item, Tree): + for x in self._reconstruct(item): + yield x + else: + yield item + + def reconstruct(self, tree): + return ''.join(self._reconstruct(tree)) diff --git a/python/extractor/lark/tools/__init__.py b/python/extractor/lark/tools/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/lark/tools/nearley.py b/python/extractor/lark/tools/nearley.py new file mode 100644 index 00000000000..a7fd2592941 --- /dev/null +++ b/python/extractor/lark/tools/nearley.py @@ -0,0 +1,186 @@ +"Converts between Lark and Nearley grammars. Work in progress!" + +import os.path +import sys +import codecs + + +from lark import Lark, InlineTransformer + +nearley_grammar = r""" + start: (ruledef|directive)+ + + directive: "@" NAME (STRING|NAME) + | "@" JS -> js_code + ruledef: NAME "->" expansions + | NAME REGEXP "->" expansions -> macro + expansions: expansion ("|" expansion)* + + expansion: expr+ js + + ?expr: item [":" /[+*?]/] + + ?item: rule|string|regexp + | "(" expansions ")" + + rule: NAME + string: STRING + regexp: REGEXP + JS: /{%.*?%}/s + js: JS? + + NAME: /[a-zA-Z_$]\w*/ + COMMENT: /#[^\n]*/ + REGEXP: /\[.*?\]/ + STRING: /".*?"/ + + %import common.WS + %ignore WS + %ignore COMMENT + + """ + +nearley_grammar_parser = Lark(nearley_grammar, parser='earley', lexer='standard') + +def _get_rulename(name): + name = {'_': '_ws_maybe', '__':'_ws'}.get(name, name) + return 'n_' + name.replace('$', '__DOLLAR__').lower() + +class NearleyToLark(InlineTransformer): + def __init__(self): + self._count = 0 + self.extra_rules = {} + self.extra_rules_rev = {} + self.alias_js_code = {} + + def _new_function(self, code): + name = 'alias_%d' % self._count + self._count += 1 + + self.alias_js_code[name] = code + return name + + def _extra_rule(self, rule): + if rule in self.extra_rules_rev: + return self.extra_rules_rev[rule] + + name = 'xrule_%d' % len(self.extra_rules) + assert name not in self.extra_rules + self.extra_rules[name] = rule + self.extra_rules_rev[rule] = name + return name + + def rule(self, name): + return _get_rulename(name) + + def ruledef(self, name, exps): + return '!%s: %s' % (_get_rulename(name), exps) + + def expr(self, item, op): + rule = '(%s)%s' % (item, op) + return self._extra_rule(rule) + + def regexp(self, r): + return '/%s/' % r + + def string(self, s): + return self._extra_rule(s) + + def expansion(self, *x): + x, js = x[:-1], x[-1] + if js.children: + js_code ,= js.children + js_code = js_code[2:-2] + alias = '-> ' + self._new_function(js_code) + else: + alias = '' + return ' '.join(x) + alias + + def expansions(self, *x): + return '%s' % ('\n |'.join(x)) + + def start(self, *rules): + return '\n'.join(filter(None, rules)) + +def _nearley_to_lark(g, builtin_path, n2l, js_code, folder_path, includes): + rule_defs = [] + + tree = nearley_grammar_parser.parse(g) + for statement in tree.children: + if statement.data == 'directive': + directive, arg = statement.children + if directive in ('builtin', 'include'): + folder = builtin_path if directive == 'builtin' else folder_path + path = os.path.join(folder, arg[1:-1]) + if path not in includes: + includes.add(path) + with codecs.open(path, encoding='utf8') as f: + text = f.read() + rule_defs += _nearley_to_lark(text, builtin_path, n2l, js_code, os.path.abspath(os.path.dirname(path)), includes) + else: + assert False, directive + elif statement.data == 'js_code': + code ,= statement.children + code = code[2:-2] + js_code.append(code) + elif statement.data == 'macro': + pass # TODO Add support for macros! + elif statement.data == 'ruledef': + rule_defs.append( n2l.transform(statement) ) + else: + raise Exception("Unknown statement: %s" % statement) + + return rule_defs + + +def create_code_for_nearley_grammar(g, start, builtin_path, folder_path): + import js2py + + emit_code = [] + def emit(x=None): + if x: + emit_code.append(x) + emit_code.append('\n') + + js_code = ['function id(x) {return x[0];}'] + n2l = NearleyToLark() + rule_defs = _nearley_to_lark(g, builtin_path, n2l, js_code, folder_path, set()) + lark_g = '\n'.join(rule_defs) + lark_g += '\n'+'\n'.join('!%s: %s' % item for item in n2l.extra_rules.items()) + + emit('from lark import Lark, Transformer') + emit() + emit('grammar = ' + repr(lark_g)) + emit() + + for alias, code in n2l.alias_js_code.items(): + js_code.append('%s = (%s);' % (alias, code)) + + emit(js2py.translate_js('\n'.join(js_code))) + emit('class TransformNearley(Transformer):') + for alias in n2l.alias_js_code: + emit(" %s = var.get('%s').to_python()" % (alias, alias)) + emit(" __default__ = lambda self, n, c, m: c if c else None") + + emit() + emit('parser = Lark(grammar, start="n_%s")' % start) + emit('def parse(text):') + emit(' return TransformNearley().transform(parser.parse(text))') + + return ''.join(emit_code) + +def main(fn, start, nearley_lib): + with codecs.open(fn, encoding='utf8') as f: + grammar = f.read() + return create_code_for_nearley_grammar(grammar, start, os.path.join(nearley_lib, 'builtin'), os.path.abspath(os.path.dirname(fn))) + + +if __name__ == '__main__': + if len(sys.argv) < 4: + print("Reads Nearley grammar (with js functions) outputs an equivalent lark parser.") + print("Usage: %s " % sys.argv[0]) + sys.exit(1) + + fn, start, nearley_lib = sys.argv[1:] + + print(main(fn, start, nearley_lib)) diff --git a/python/extractor/lark/tools/standalone.py b/python/extractor/lark/tools/standalone.py new file mode 100644 index 00000000000..1913a99e480 --- /dev/null +++ b/python/extractor/lark/tools/standalone.py @@ -0,0 +1,7 @@ +# This file used to contain the Lark standalone tool. +# +# We do not use it, and it is licensed under the GPL, which is much +# more restrictive than the rest of Lark. In order to avoid depending +# on it accidentally, we exclude it from our repository and distribution. +# When LARK is upgraded, this file should be kept in preference to the +# original. diff --git a/python/extractor/lark/tree.py b/python/extractor/lark/tree.py new file mode 100644 index 00000000000..98b8db65da5 --- /dev/null +++ b/python/extractor/lark/tree.py @@ -0,0 +1,162 @@ +try: + from future_builtins import filter +except ImportError: + pass + +from copy import deepcopy + +class Meta: + pass + +###{standalone +class Tree(object): + def __init__(self, data, children, meta=None): + self.data = data + self.children = children + self._meta = meta + + @property + def meta(self): + if self._meta is None: + self._meta = Meta() + return self._meta + + def __repr__(self): + return 'Tree(%s, %s)' % (self.data, self.children) + + def _pretty_label(self): + return self.data + + def _pretty(self, level, indent_str): + if len(self.children) == 1 and not isinstance(self.children[0], Tree): + return [ indent_str*level, self._pretty_label(), '\t', '%s' % (self.children[0],), '\n'] + + l = [ indent_str*level, self._pretty_label(), '\n' ] + for n in self.children: + if isinstance(n, Tree): + l += n._pretty(level+1, indent_str) + else: + l += [ indent_str*(level+1), '%s' % (n,), '\n' ] + + return l + + def pretty(self, indent_str=' '): + return ''.join(self._pretty(0, indent_str)) +###} + + def expand_kids_by_index(self, *indices): + "Expand (inline) children at the given indices" + for i in sorted(indices, reverse=True): # reverse so that changing tail won't affect indices + kid = self.children[i] + self.children[i:i+1] = kid.children + + def __eq__(self, other): + try: + return self.data == other.data and self.children == other.children + except AttributeError: + return False + + def __ne__(self, other): + return not (self == other) + + def __hash__(self): + return hash((self.data, tuple(self.children))) + + def find_pred(self, pred): + "Find all nodes where pred(tree) == True" + return filter(pred, self.iter_subtrees()) + + def find_data(self, data): + "Find all nodes where tree.data == data" + return self.find_pred(lambda t: t.data == data) + + def scan_values(self, pred): + for c in self.children: + if isinstance(c, Tree): + for t in c.scan_values(pred): + yield t + else: + if pred(c): + yield c + + def iter_subtrees(self): + # TODO: Re-write as a more efficient version + + visited = set() + q = [self] + + l = [] + while q: + subtree = q.pop() + l.append( subtree ) + if id(subtree) in visited: + continue # already been here from another branch + visited.add(id(subtree)) + q += [c for c in subtree.children if isinstance(c, Tree)] + + seen = set() + for x in reversed(l): + if id(x) not in seen: + yield x + seen.add(id(x)) + + + def __deepcopy__(self, memo): + return type(self)(self.data, deepcopy(self.children, memo)) + + def copy(self): + return type(self)(self.data, self.children) + def set(self, data, children): + self.data = data + self.children = children + + # XXX Deprecated! Here for backwards compatibility <0.6.0 + @property + def line(self): + return self.meta.line + @property + def column(self): + return self.meta.column + @property + def end_line(self): + return self.meta.end_line + @property + def end_column(self): + return self.meta.end_column + + +class SlottedTree(Tree): + __slots__ = 'data', 'children', 'rule', '_meta' + + +def pydot__tree_to_png(tree, filename): + "Creates a colorful image that represents the tree (data+children, without meta)" + + import pydot + graph = pydot.Dot(graph_type='digraph', rankdir="LR") + + i = [0] + + def new_leaf(leaf): + node = pydot.Node(i[0], label=repr(leaf)) + i[0] += 1 + graph.add_node(node) + return node + + def _to_pydot(subtree): + color = hash(subtree.data) & 0xffffff + color |= 0x808080 + + subnodes = [_to_pydot(child) if isinstance(child, Tree) else new_leaf(child) + for child in subtree.children] + node = pydot.Node(i[0], style="filled", fillcolor="#%x"%color, label=subtree.data) + i[0] += 1 + graph.add_node(node) + + for subnode in subnodes: + graph.add_edge(pydot.Edge(node, subnode)) + + return node + + _to_pydot(tree) + graph.write_png(filename) diff --git a/python/extractor/lark/utils.py b/python/extractor/lark/utils.py new file mode 100644 index 00000000000..3c92bcc1438 --- /dev/null +++ b/python/extractor/lark/utils.py @@ -0,0 +1,127 @@ +from collections import deque +import sys + +class fzset(frozenset): + def __repr__(self): + return '{%s}' % ', '.join(map(repr, self)) + + +def classify_bool(seq, pred): + true_elems = [] + false_elems = [] + + for elem in seq: + if pred(elem): + true_elems.append(elem) + else: + false_elems.append(elem) + + return true_elems, false_elems + +def classify(seq, key=None, value=None): + d = {} + for item in seq: + k = key(item) if (key is not None) else item + v = value(item) if (value is not None) else item + if k in d: + d[k].append(v) + else: + d[k] = [v] + return d + +def bfs(initial, expand): + open_q = deque(list(initial)) + visited = set(open_q) + while open_q: + node = open_q.popleft() + yield node + for next_node in expand(node): + if next_node not in visited: + visited.add(next_node) + open_q.append(next_node) + + + + +try: + STRING_TYPE = basestring +except NameError: # Python 3 + STRING_TYPE = str + +###{standalone + +import types +from functools import wraps, partial +from contextlib import contextmanager + +Str = type(u'') + +def smart_decorator(f, create_decorator): + if isinstance(f, types.FunctionType): + return wraps(f)(create_decorator(f, True)) + + elif isinstance(f, (type, types.BuiltinFunctionType)): + return wraps(f)(create_decorator(f, False)) + + elif isinstance(f, types.MethodType): + return wraps(f)(create_decorator(f.__func__, True)) + + elif isinstance(f, partial): + # wraps does not work for partials in 2.7: https://bugs.python.org/issue3445 + return create_decorator(f.__func__, True) + + else: + return create_decorator(f.__func__.__call__, True) + + + + +try: + from contextlib import suppress # Python 3 +except ImportError: + @contextmanager + def suppress(*excs): + '''Catch and dismiss the provided exception + + >>> x = 'hello' + >>> with suppress(IndexError): + ... x = x[10] + >>> x + 'hello' + ''' + try: + yield + except excs: + pass + +###} + + + +try: + compare = cmp +except NameError: + def compare(a, b): + if a == b: + return 0 + elif a > b: + return 1 + return -1 + + +def get_regexp_width(regexp): + # in 3.11 sre_parse was replaced with re._parser + # see implementation in https://github.com/python/cpython/blob/3.11/Lib/sre_parse.py + if sys.version_info >= (3, 11): + import re + try: + return re._parser.parse(regexp).getwidth() + except re.error: + raise ValueError(regexp) + else: + import sre_constants + import sre_parse + try: + return sre_parse.parse(regexp).getwidth() + except sre_constants.error: + raise ValueError(regexp) diff --git a/python/extractor/lark/visitors.py b/python/extractor/lark/visitors.py new file mode 100644 index 00000000000..b7969d51bf2 --- /dev/null +++ b/python/extractor/lark/visitors.py @@ -0,0 +1,250 @@ +from inspect import getmembers, getmro +from functools import wraps + +from .utils import smart_decorator +from .tree import Tree + +class Discard(Exception): + pass + + +# Transformers + +class Transformer: + """Visits the tree recursively, starting with the leaves and finally the root (bottom-up) + + Calls its methods (provided by user via inheritance) according to tree.data + The returned value replaces the old one in the structure. + + Can be used to implement map or reduce. + """ + + def _call_userfunc(self, tree, new_children=None): + # Assumes tree is already transformed + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + if getattr(f, 'meta', False): + return f(children, tree.meta) + elif getattr(f, 'inline', False): + return f(*children) + elif getattr(f, 'whole_tree', False): + if new_children is not None: + raise NotImplementedError("Doesn't work with the base Transformer class") + return f(tree) + else: + return f(children) + + def _transform_children(self, children): + for c in children: + try: + yield self._transform_tree(c) if isinstance(c, Tree) else c + except Discard: + pass + + def _transform_tree(self, tree): + children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree, children) + + def transform(self, tree): + return self._transform_tree(tree) + + def __mul__(self, other): + return TransformerChain(self, other) + + def __default__(self, data, children, meta): + "Default operation on tree (for override)" + return Tree(data, children, meta) + + @classmethod + def _apply_decorator(cls, decorator, **kwargs): + mro = getmro(cls) + assert mro[0] is cls + libmembers = {name for _cls in mro[1:] for name, _ in getmembers(_cls)} + for name, value in getmembers(cls): + if name.startswith('_') or name in libmembers: + continue + + setattr(cls, name, decorator(value, **kwargs)) + return cls + + +class InlineTransformer(Transformer): # XXX Deprecated + def _call_userfunc(self, tree, new_children=None): + # Assumes tree is already transformed + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + return f(*children) + + +class TransformerChain(object): + def __init__(self, *transformers): + self.transformers = transformers + + def transform(self, tree): + for t in self.transformers: + tree = t.transform(tree) + return tree + + def __mul__(self, other): + return TransformerChain(*self.transformers + (other,)) + + +class Transformer_InPlace(Transformer): + "Non-recursive. Changes the tree in-place instead of returning new instances" + def _transform_tree(self, tree): # Cancel recursion + return self._call_userfunc(tree) + + def transform(self, tree): + for subtree in tree.iter_subtrees(): + subtree.children = list(self._transform_children(subtree.children)) + + return self._transform_tree(tree) + + +class Transformer_InPlaceRecursive(Transformer): + "Recursive. Changes the tree in-place instead of returning new instances" + def _transform_tree(self, tree): + tree.children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree) + + + +# Visitors + +class VisitorBase: + def _call_userfunc(self, tree): + return getattr(self, tree.data, self.__default__)(tree) + + def __default__(self, tree): + "Default operation on tree (for override)" + return tree + + +class Visitor(VisitorBase): + """Bottom-up visitor, non-recursive + + Visits the tree, starting with the leaves and finally the root (bottom-up) + Calls its methods (provided by user via inheritance) according to tree.data + """ + + + def visit(self, tree): + for subtree in tree.iter_subtrees(): + self._call_userfunc(subtree) + return tree + +class Visitor_Recursive(VisitorBase): + """Bottom-up visitor, recursive + + Visits the tree, starting with the leaves and finally the root (bottom-up) + Calls its methods (provided by user via inheritance) according to tree.data + """ + + def visit(self, tree): + for child in tree.children: + if isinstance(child, Tree): + self.visit(child) + + f = getattr(self, tree.data, self.__default__) + f(tree) + return tree + + + +def visit_children_decor(func): + "See Interpreter" + @wraps(func) + def inner(cls, tree): + values = cls.visit_children(tree) + return func(cls, values) + return inner + + +class Interpreter: + """Top-down visitor, recursive + + Visits the tree, starting with the root and finally the leaves (top-down) + Calls its methods (provided by user via inheritance) according to tree.data + + Unlike Transformer and Visitor, the Interpreter doesn't automatically visit its sub-branches. + The user has to explicitly call visit_children, or use the @visit_children_decor + """ + def visit(self, tree): + return getattr(self, tree.data)(tree) + + def visit_children(self, tree): + return [self.visit(child) if isinstance(child, Tree) else child + for child in tree.children] + + def __getattr__(self, name): + return self.__default__ + + def __default__(self, tree): + return self.visit_children(tree) + + + + +# Decorators + +def _apply_decorator(obj, decorator, **kwargs): + try: + _apply = obj._apply_decorator + except AttributeError: + return decorator(obj, **kwargs) + else: + return _apply(decorator, **kwargs) + + + +def _inline_args__func(func): + @wraps(func) + def create_decorator(_f, with_self): + if with_self: + def f(self, children): + return _f(self, *children) + else: + def f(self, children): + return _f(*children) + return f + + return smart_decorator(func, create_decorator) + + +def inline_args(obj): # XXX Deprecated + return _apply_decorator(obj, _inline_args__func) + + + +def _visitor_args_func_dec(func, inline=False, meta=False, whole_tree=False): + assert [whole_tree, meta, inline].count(True) <= 1 + def create_decorator(_f, with_self): + if with_self: + def f(self, *args, **kwargs): + return _f(self, *args, **kwargs) + else: + def f(self, *args, **kwargs): + return _f(*args, **kwargs) + return f + + f = smart_decorator(func, create_decorator) + f.inline = inline + f.meta = meta + f.whole_tree = whole_tree + return f + +def v_args(inline=False, meta=False, tree=False): + "A convenience decorator factory, for modifying the behavior of user-supplied visitor methods" + if [tree, meta, inline].count(True) > 1: + raise ValueError("Visitor functions can either accept tree, or meta, or be inlined. These cannot be combined.") + def _visitor_args_dec(obj): + return _apply_decorator(obj, _visitor_args_func_dec, inline=inline, meta=meta, whole_tree=tree) + return _visitor_args_dec diff --git a/python/extractor/licenses.md b/python/extractor/licenses.md new file mode 100644 index 00000000000..f3a5c6cc458 --- /dev/null +++ b/python/extractor/licenses.md @@ -0,0 +1,14 @@ +| Component | Vendored-in | License | Comments | +| ------------------------------- | ----------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data/python/stubs/six` | Y | MIT, see `data/python/stubs/six/LICENSE` | Stubs for `six` (the Python 2/3 compatibility library), based on the original library but simplified to aid analysis. | +| `lark` | Y | MIT, see `lark/LICENSE` | Parsing library. Used for extracting `.thrift` files. | +| `tests/tokenizer/shift_jis.py` | Y | PSF | Test file copied (with attribution) from the `cpython` source code. | +| `tsg-python/tree-sitter-python` | Y | MIT | Used in `tsg-python` to parse Python files | +| `tsg-python` | Y | MIT / Apache | This is our own creation, so are free to choose what license it is covered by. | +| `tree-sitter-graph` | N | MIT / Apache | Used in `tsg-python` to execute files written in the `tree-sitter-graph` language. | +| `unparse.py` | Y | PSF | Copied and adapted from `Tools/unparse.py` from the `cpython` source code, with attribution. | +| `imp.py` | Y | PSF | Copied and adapted from `Lib/imp.py` from the `cpython` source code, with attribution. | +| `semmle/data/*.trap` | Y | PSF | These files were derived from the C source code of the `cpython` project, and are used in our modelling of built-in objects. No attribution, currently. | +| `semmle/thrift/parse.py` | Y | Apache | Includes a grammar based on https://github.com/apache/thrift/blob/master/doc/specs/idl.md, with comment stating this attribution. | +| `semmle/python/ast.py` | Y | PSF | Copied and adapted from `Lib/ast.py` from the `cpython` source code. Not explicitly attributed. | +| `blib2to3` | Y | PSF / MIT | A modified version of `blib2to3` from the `psf/black` project (MIT licensed), itself a copy of `lib2to3` from the `cpython` project (PSF licensed), with a thorough attribution for this fact. | diff --git a/python/extractor/make_zips.py b/python/extractor/make_zips.py new file mode 100755 index 00000000000..b91b1bf458d --- /dev/null +++ b/python/extractor/make_zips.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python + +import os +import shutil +import sys +import zipfile +import optparse +import compileall + +from python_tracer import getzipfilename +from unparse import strip_comments_and_docstrings + +# TO DO -- Add options to set destination directory and source directory + + +def find_tools(): + try: + return os.environ['PYTHON_INSTALLER_OUTPUT'] + except KeyError: + pass + try: + return os.environ['ODASA_TOOLS'] + except KeyError: + pass + try: + return os.path.join(os.environ['SEMMLE_DIST'], 'tools') + except KeyError: + pass + try: + return os.path.join(os.environ['ODASA_HOME'], 'tools') + except KeyError: + pass + raise Exception('ODASA_TOOLS environment variable is not set') + +def find_src(): + if __name__ == '__main__': + return os.path.dirname(os.path.abspath(sys.argv[0])) + raise Exception('Cannot find source code') + + +def build_byte_compiled_zip(src_dir, zippath): + # TODO(low): Why are we compiling ourselves, when writepy can also do that? + compileall.compile_dir(os.path.join(src_dir, 'semmle'), force=True, quiet=True) + + zipped = zipfile.PyZipFile(zippath, 'w') + + zipped.writepy(os.path.join(src_dir, '__main__.py')) + zipped.writepy(os.path.join(src_dir, 'semmle')) + zipped.writepy(os.path.join(src_dir, 'blib2to3')) + zipped.writepy(os.path.join(src_dir, 'lark')) + zipped.writepy(os.path.join(src_dir, 'buildtools')) + zipped.write(os.path.join(src_dir, 'blib2to3', 'Grammar.txt'), 'blib2to3/Grammar.txt') + zipped.write(os.path.join(src_dir, 'lark', 'grammars', 'common.lark'), 'lark/grammars/common.lark') + + data_dir = os.path.join(src_dir, 'semmle', 'data') + for f in os.listdir(data_dir): + if f.endswith('.trap'): + zipped.write(os.path.join(data_dir, f), os.path.join('semmle', 'data', f)) + zipped.close() + + +def build_source_zip(src_dir, zippath): + zipped = zipfile.PyZipFile(zippath, 'w') + + zipped.write(os.path.join(src_dir, '__main__.py'), '__main__.py') + zipped.write(os.path.join(src_dir, 'imp.py'), 'imp.py') + write_source(zipped, src_dir, 'semmle') + write_source(zipped, src_dir, 'blib2to3', ('.py', '.txt', '')) + write_source(zipped, src_dir, 'lark', (".py", ".lark", "")) + write_source(zipped, src_dir, 'buildtools') + + data_dir = os.path.join(src_dir, 'semmle', 'data') + for f in os.listdir(data_dir): + if f.endswith('.trap'): + zipped.write(os.path.join(data_dir, f), os.path.join('semmle', 'data', f)) + + zipped.close() + +def write_source(zipped, root, name, extensions=[".py"]): + src = os.path.join(root, name) + for dirpath, _, filenames in os.walk(src): + for name in filenames: + _, ext = os.path.splitext(name) + if ext not in extensions: + continue + path = os.path.join(dirpath, name) + temp = strip_comments_and_docstrings(path) + zipped.write(temp, os.path.relpath(path, root)) + os.remove(temp) + +def main(): + parser = optparse.OptionParser(usage = "usage: %prog [install-dir]") + _, args = parser.parse_args(sys.argv[1:]) + if len(args) > 1: + parser.print_usage() + elif args: + tools_dir = args[0] + if not os.path.exists(tools_dir): + os.makedirs(tools_dir) + else: + tools_dir = find_tools() + src_dir = find_src() + + zippath = os.path.join(src_dir, getzipfilename()) + + if sys.version_info > (3,): + build_source_zip(src_dir, zippath) + else: + build_byte_compiled_zip(src_dir, zippath) + + shutil.copy(zippath, tools_dir) + +if __name__ == '__main__': + main() diff --git a/python/extractor/poetry.lock b/python/extractor/poetry.lock new file mode 100644 index 00000000000..b07e63d2ff4 --- /dev/null +++ b/python/extractor/poetry.lock @@ -0,0 +1,227 @@ +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "exceptiongroup" +version = "1.1.3" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, + {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, +] + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "importlib-metadata" +version = "6.7.0" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.7" +files = [ + {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"}, + {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"}, +] + +[package.dependencies] +typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "packaging" +version = "23.2" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, +] + +[[package]] +name = "pluggy" +version = "1.2.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, + {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "pytest" +version = "7.4.2" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-7.4.2-py3-none-any.whl", hash = "sha256:1d881c6124e08ff0a1bb75ba3ec0bfd8b5354a01c194ddd5a0a870a48d99b002"}, + {file = "pytest-7.4.2.tar.gz", hash = "sha256:a766259cfab564a2ad52cb1aae1b881a75c3eb7e34ca3779697c23ed47c47069"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "pytest-mock" +version = "3.11.1" +description = "Thin-wrapper around the mock package for easier use with pytest" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-mock-3.11.1.tar.gz", hash = "sha256:7f6b125602ac6d743e523ae0bfa71e1a697a2f5534064528c6ff84c2f7c2fc7f"}, + {file = "pytest_mock-3.11.1-py3-none-any.whl", hash = "sha256:21c279fff83d70763b05f8874cc9cfb3fcacd6d354247a976f9529d19f9acf39"}, +] + +[package.dependencies] +pytest = ">=5.0" + +[package.extras] +dev = ["pre-commit", "pytest-asyncio", "tox"] + +[[package]] +name = "pyyaml" +version = "6.0.1" +description = "YAML parser and emitter for Python" +optional = false +python-versions = ">=3.6" +files = [ + {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, + {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, + {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, + {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, + {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, + {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, + {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, + {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, + {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, + {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, + {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, + {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, + {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, + {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, + {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, + {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, + {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, + {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, + {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, + {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, + {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, + {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, + {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, + {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, +] + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + +[[package]] +name = "typing-extensions" +version = "4.7.1" +description = "Backported and Experimental Type Hints for Python 3.7+" +optional = false +python-versions = ">=3.7" +files = [ + {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, + {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, +] + +[[package]] +name = "zipp" +version = "3.15.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.7" +files = [ + {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, + {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + +[metadata] +lock-version = "2.0" +python-versions = "^3.7" +content-hash = "efa2573fc074b2b5334ac81c2ed14a4b9894aacab841973703a7af180c181870" diff --git a/python/extractor/pyproject.toml b/python/extractor/pyproject.toml new file mode 100644 index 00000000000..a9f7adbbc6f --- /dev/null +++ b/python/extractor/pyproject.toml @@ -0,0 +1,21 @@ +[tool.poetry] +name = "extractor-python" +version = "0.0.1" +description = "" +authors = [] +packages = [ + { include = "buildtools" }, + { include = "semmle" }, +] + +[tool.poetry.dependencies] +python = "^3.7" +pyyaml = "^6.0.1" + +[tool.poetry.group.dev.dependencies] +pytest-mock = "^3.11.1" +pytest = "^7.4.2" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/python/extractor/pytest.ini b/python/extractor/pytest.ini new file mode 100644 index 00000000000..632ca92b9a1 --- /dev/null +++ b/python/extractor/pytest.ini @@ -0,0 +1,6 @@ +[pytest] +addopts = --ignore=cli-integration-test/ +testpaths = tests +filterwarnings = + ; see https://docs.python.org/3/library/warnings.html#the-warnings-filter + error::DeprecationWarning diff --git a/python/extractor/python_imports.py b/python/extractor/python_imports.py new file mode 100755 index 00000000000..ee883c8f1e7 --- /dev/null +++ b/python/extractor/python_imports.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +'''This module sets up sys.path from the environment +and runs the .import file generation.''' + +import python_tracer + +if __name__ == "__main__": + python_tracer.load_library() + import semmle.imports + semmle.imports.main() diff --git a/python/extractor/python_tracer.py b/python/extractor/python_tracer.py new file mode 100755 index 00000000000..17b1af9769b --- /dev/null +++ b/python/extractor/python_tracer.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +#This file needs to be able to handle all versions of Python we are likely to encounter +#Which is probably 2.6 and upwards + +'''This module sets up sys.path from the environment +and runs the populator when called from semmle tools such as buildSnapshot.''' + +import sys +import os + +# The constant is put here instead of make_zips.py, since make_zips.py is not present in +# the distributed extractor-python code +def getzipfilename(): + return 'python3src.zip' + + +def load_library(): + try: + tools = os.environ['ODASA_TOOLS'] + except KeyError: + try: + tools = os.path.join(os.environ['SEMMLE_DIST'], "tools") + except KeyError: + tools = sys.path[0] + try: + zippath = os.path.join(tools, getzipfilename()) + sys.path = [ zippath ] + sys.path + except Exception: + #Failed to find tools. Error is reported below + zippath = tools + try: + import semmle.populator + except ImportError as ex: + print("FATAL ERROR: ") + print(ex) + if tools is not None: + if not os.path.exists(os.path.join(tools, getzipfilename())): + sys.stderr.write("No tracer library found in " + tools + "\n") + else: + sys.stderr.write("Unable to load tracer library at %s:\n" % zippath) + import traceback + traceback.print_exc(file=sys.stderr) + else: + print(sys.path) + sys.stderr.write("Cannot find Semmle tools\n") + sys.exit(2) + +if __name__ == "__main__": + original_path = sys.path + load_library() + import semmle.populator + semmle.populator.main(original_path) diff --git a/python/extractor/qlpack.yml b/python/extractor/qlpack.yml new file mode 100644 index 00000000000..783c301abbb --- /dev/null +++ b/python/extractor/qlpack.yml @@ -0,0 +1,6 @@ +name: extractor-python +dependencies: + codeql/python-all: "*" + codeql/python-queries: "*" +extractor: python +warnOnImplicitThis: true diff --git a/python/extractor/semmle/__init__.py b/python/extractor/semmle/__init__.py new file mode 100644 index 00000000000..4b469ca715f --- /dev/null +++ b/python/extractor/semmle/__init__.py @@ -0,0 +1 @@ +from .util import VERSION as __version__ diff --git a/python/extractor/semmle/cache.py b/python/extractor/semmle/cache.py new file mode 100644 index 00000000000..303793516fa --- /dev/null +++ b/python/extractor/semmle/cache.py @@ -0,0 +1,197 @@ +from semmle.util import makedirs +import os +from collections import deque +from functools import total_ordering + +''' +Least Recently Written Disk-based Cache + +Implements a LRW disk cache for trap files and similar. +This cache relies on the following properties which *must* hold. + +Only one value can ever be associated with a key. +Keys should be ascii strings and cannot start with '$' or include any file or path separator characters. +Values should be byte strings (with any contents). + +The cache is robust against arbitrary levels of concurrency. + +''' + + +MAX_GENERATIONS = 50 +MAX_FILES_PER_GENERATION = 200 + +def encode_keys(keys): + 'Convert a collection of keys to a byte string' + return '\n'.join(keys).encode("ascii") + +def decode_keys(data): + 'Convert a byte string into a set of keys' + return set(data.decode("ascii").split('\n')) + +@total_ordering +class Generation(object): + + def __init__(self, cachedir, age): + self.cachedir = os.path.join(cachedir, str(age)) + self.age = age + if not os.path.exists(self.cachedir): + makedirs(self.cachedir) + try: + with open(os.path.join(self.cachedir, "$keys"), 'rb') as fd: + self.keys = decode_keys(fd.read()) + self.full = True + except Exception: + self.keys = set() + if os.path.isdir(self.cachedir): + #Directory exists, but cannot read "$keys", so this is a non-full generation + self.full = False + else: + self.full = True + + def get(self, key): + if self.full and key not in self.keys: + return None + try: + with open(os.path.join(self.cachedir, key), 'rb') as fd: + return fd.read() + except Exception: + return None + + def set(self, key, value): + '''Returns true if it should be able to store (key, value) even if in fact it can't. + This means that this method will return True if the generation is not full.''' + if self.full: + return False + if os.path.exists(os.path.join(self.cachedir, "$keys")): + self.full = True + try: + with open(os.path.join(self.cachedir, "$keys"), 'rb') as fd: + self.keys = decode_keys(fd.read()) + except Exception: + self.keys = set() + return False + self._try_atomic_write_file(key, value) + if len(self._list_files()) >= MAX_FILES_PER_GENERATION: + self.full = True + self._write_keys() + return True + + def _list_files(self): + try: + return os.listdir(self.cachedir) + except Exception: + #This probably means the directory has been deleted + return [] + + def _write_keys(self): + keys = self._list_files() + self._try_atomic_write_file("$keys", encode_keys(keys)) + self.keys = set(keys) + + def _try_atomic_write_file(self, name, contents): + fullname = os.path.join(self.cachedir, name) + tmpname = os.path.join(self.cachedir, '$%d%s' % (os.getpid(), name)) + try: + with open(tmpname, 'wb') as tmp: + tmp.write(contents) + os.rename(tmpname, fullname) + except Exception: + #Failed for some reason. The folder may have been deleted, or on Windows, the file may already exist. + #Attempt to tidy up + if os.path.exists(tmpname): + try: + os.remove(tmpname) + except Exception: + #Give up :( + pass + + def clear(self): + try: + filenames = os.listdir(self.cachedir) + except Exception: + #Can't do anything + return + for filename in filenames: + try: + os.remove(os.path.join(self.cachedir, filename)) + except Exception: + # Can't delete. Maybe another process has deleted it or it is open (on Windows) + pass + try: + os.rmdir(self.cachedir) + except Exception: + # Can't delete + pass + + def __lt__(self, other): + #Smaller numbers are older + return self.age > other.age + +class Cache(object): + + cache_of_caches = {} + + def __init__(self, cachedir, verbose=False): + self.cachedir = cachedir + self.verbose = verbose + self.generations = [] + if not os.path.exists(cachedir): + makedirs(cachedir) + generations = [] + for gen in os.listdir(self.cachedir): + try: + age = int(gen) + generations.append(Generation(self.cachedir, age)) + except Exception: + #gen might not be an int, or it may have been deleted + pass + if generations: + generations.sort() + else: + generations = [Generation(self.cachedir, 1)] + self.generations = deque(generations) + while len(self.generations) > MAX_GENERATIONS: + self.generations.pop().clear() + + def set(self, key, value): + '''Add this (key, value) pair to the cache. keys should not start with '$' or include file or path separators. + Either adds the (key, value) atomically or does nothing. Partial keys or values are never visible. + ''' + try: + while not self.generations[0].set(key, value): + self.generations.appendleft(Generation(self.cachedir, self.generations[0].age+1)) + if len(self.generations) > MAX_GENERATIONS: + self.generations.pop().clear() + except Exception as ex: + #Its OK to fail but we must never raise + if self.verbose: + try: + print ("Exception setting cache key '%s': %s" % (key, ex)) + except Exception: + # Just in case + pass + + def get(self, key): + if key is None: + return None + try: + for gen in self.generations: + res = gen.get(key) + if res is not None: + return res + except Exception as ex: + if self.verbose: + try: + print ("Exception getting cache key '%s': %s" % (key, ex)) + except Exception: + # Just in case + pass + return None + + @staticmethod + def for_directory(cachedir, verbose): + '''Caches are relatively expensive objects, so we cache them.''' + if (cachedir, verbose) not in Cache.cache_of_caches: + Cache.cache_of_caches[(cachedir, verbose)] = Cache(cachedir, verbose) + return Cache.cache_of_caches[(cachedir, verbose)] diff --git a/python/extractor/semmle/cmdline.py b/python/extractor/semmle/cmdline.py new file mode 100644 index 00000000000..9c2ff4a3274 --- /dev/null +++ b/python/extractor/semmle/cmdline.py @@ -0,0 +1,327 @@ +from optparse import OptionParser, OptionGroup, HelpFormatter +import shlex +import sys +import os +import re + +from semmle import logging +from semmle.util import VERSION + + +def make_parser(): + '''Parse command_line, returning options, arguments''' + parser = OptionParser(add_help_option=False, version='%s' % VERSION) + + import_options = OptionGroup(parser, "Import following options", + description="Note that -a -n -g and -t are included for backwards compatibility. They are ignored") + import_options.add_option("--max-import-depth", dest="max_import_depth", + help="The maximum depth of imports to follow before halting.", + default=None) + import_options.add_option("-p", "--path", dest="path", default=[], action="append", + help="Search path for python modules.") + import_options.get_option("-p").long_help = ( + "This is the path that the extractor uses when searching for imports. This path is searched before sys.path. "+ + "If the search path (sys.path) during program execution includes any paths that are not in 'sys.path' during extraction, " + + "then those paths need to be included using this flag.") + import_options.add_option("-x", "--excludepath", dest="exclude", default=[], action="append", + help="Exclude from search path for importing modules.") + import_options.get_option("-x").long_help = ( + "Excludes this path and all its sub-paths when searching for imports. " + + "Useful for excluding sub folders of paths specified with the '-p' option, or for excluding items in the 'sys.path' list.") + import_options.add_option("-a", "--all-imports", dest="all", + help="Ignored", default=False, action="store_true") + import_options.add_option("-n", "--no-imports", dest="none", + help="Ignored", default=False, action="store_true") + import_options.add_option("-g", "--guess-imports", dest="guess", + help="Ignored", default=False, action="store_true") + import_options.add_option("-t", "--top-imports", dest="top", + help="Ignored", default=False, action="store_true") + parser.add_option_group(import_options) + + module_options = OptionGroup(parser, "Options to determine which modules are to be extracted", + description="When specifying a list of values, individual values should be separated by the OS path separator for paths, and by commas for names.") + module_options.add_option("-m", "--main", dest="main", + help="A list of files which can be run as the main (or application) script.", + default=[], action="append") + module_options.get_option("-m").long_help = ( + "Files included in the database as 'main' modules will have the name '__main__' rather than a name derived from the path. " + + "It is perfectly legal to have several '__main__' modules in the database.") + module_options.add_option("-r", "--recurse-package", dest="recursive", default=[], action="append", + help="DEPRECATED. Analyze all modules in this comma-separated list of packages (recursively).") + module_options.add_option("-y", "--exclude-package", dest="exclude_package", default=[], action="append", + help="IGNORED.") + module_options.add_option("-Y", "--exclude-file", dest="exclude_file", default=[], action="append", + help="Exclude file from recursive search of files. Will not affect recursive search by package.") + module_options.add_option("--filter", dest="path_filter", default=[], action="append", + help="""Filter to apply to files from recursive search of files. Will not affect recursive search by package. + Filters are of the form [include|exclude]:GLOB_PATTERN""") + module_options.add_option("--exclude-pattern", dest="exclude_pattern", + help = """Exclude any modules matching this regular expression.""", + default=None) + module_options.add_option("--respect-init", dest="respect_init", + help="Respect the presence of '__init__.py' files when considering whether a folder is " + "a package. Defaults to True for Python 2 and False for Python 3. " + "Legal values are 'True' or 'False' (case-insensitive).", + default = None) + module_options.add_option("-F", "--files", dest="files", default=[], action="append", + help = """Treat the paths in this list as source files for modules. Compute the module name from given paths.""") + module_options.add_option("-R", "--recurse-files", dest="recurse_files", default=[], action="append", + help = """Treat the paths in this list as paths for packages, then recurse. Compute the package name from given paths.""") + parser.add_option_group(module_options) + + config_options = OptionGroup(parser, "Configuration options") + config_options.add_option("-f","--file", dest="file", default=None, + help="File to read options from") + config_options.add_option("-c", "--trap-cache", dest="trap_cache", + help="Directory in which to cache trap files.", + default=None) + config_options.add_option("-z", "--max-procs", dest="max_procs", default=None, + help="Maximum number of processes, legal options are " + "'all', 'half'(the default) or any positive integer.") + config_options.add_option("-j", "--introspect-c", dest="introspect_c", + help="Option is ignored (retained for backwards compatibility)", + default=False, action="store_true") + config_options.add_option("--ignore-missing-modules", dest="ignore_missing_modules", default=False, action="store_true", + help = """Ignore any module specified on the command line that cannot be found. Defaults to false.""") + config_options.add_option("-u", "--no-symlinks", dest="no_symlinks", + help="Do not follow sym-links when normalizing paths", + default=False, action="store_true") + config_options.add_option("-e", "--renamer", dest="renamer", + help="""Module containing get_renamer() function which returns + a renaming function to be used when normalizing paths.""", + default=None) + config_options.add_option("-o", "--outdir", dest="outdir", + help="Output directory for writing trap files.") + config_options.add_option("--omit-syntax-errors", dest="no_syntax_errors", + help="Do not emit trap files or copy source for those files containing syntax errors", + default=False, action="store_true") + config_options.get_option("-o").long_help = " Only useful when running the extractor independently of Semmle's toolchain." + config_options.add_option("--max-context-cost", dest="context_cost", default=None, + help="""Specify the maximum cost of contexts in the points-to analysis. + WARNING: Setting this option may cause the analysis to consume a lot more time and memory than normal""") + config_options.add_option("--colorize", dest="colorize", default=False, action="store_true", + help = """Colorize the logging output.""") + + config_options.add_option("--dont-extract-stdlib", dest="extract_stdlib", default=True, action="store_false", + help="Do not extract the standard library.") + + parser.add_option_group(config_options) + + debug_options = OptionGroup(parser, "Debug and information options") + debug_options.add_option("-h", "--help", default=False, action="store_true", + help="show this help message and exit. Combine with -v for more details.") + debug_options.add_option("-v", "--verbose", dest="verbose", help="Verbose output", + default=0, action="count") + debug_options.add_option("--verbosity", dest="verbosity", help="Verbosity of output", + default=None) + debug_options.add_option("--quiet", dest="quiet", help="Quiet output, only report errors or worse.", + default=0, action="count") + debug_options.add_option("-q", "--trace-only", dest="trace_only", + help="Trace only, printing modules found. Do not create trap files.", + default=False, action="store_true") + debug_options.add_option("--profile-out", dest="profile_out", default=None, + help="Write profiling information to the given file.") + parser.add_option_group(debug_options) + + lang_options = OptionGroup(parser, "Options for handling sub-languages and extensions") + + # This is a temporary feature until we have full, transparent support for combined 2/3 analysis. + # Slated to be removed before 1.12 so it should not be documented. + lang_options.add_option("-l", "--lang", dest="language_version", default=[], action="append", + help="Override automatic language version detection and use specified versions(s)") + + parser.add_option_group(lang_options) + + advanced_options = OptionGroup(parser, "Advanced options: For running the extractor in unusual environments.") + advanced_options.add_option("--dont-split-graph", dest="split", default=True, action="store_false", + help = """Do not perform splitting on the flow graph, this will result in increased performance, + but at the cost of decreased accuracy in the resulting database. Defaults to false.""") + advanced_options.add_option("--dont-unroll-graph", dest="unroll", action="store_false", + help = """DEPRECATED. Do not use. + Do not perform selective loop unrolling on the flow graph. This will result in increased performance, + but at the cost of decreased accuracy in the resulting database. Defaults to true.""") + advanced_options.add_option("--unroll-graph", dest="unroll", default=False, action="store_true", + help = """Perform selective loop unrolling on the flow graph. This may result in increased accuracy, + but at the cost of decreased performance in the resulting database. Defaults to false.""") + + parser.add_option_group(advanced_options) + return parser + +def strip_trailing_slash(path): + '''Remove trailing slash from path for consistency''' + while path.endswith(os.sep) and path != os.sep: + path = path[:-1] + return path + +def parse(command_line): + parser = make_parser() + options, args = parser.parse_args(command_line) + while options.file: + with open(options.file) as opt_file: + file_opts = shlex.split(opt_file.read()) + extra_options, extra_args = parser.parse_args(file_opts) + options.file = None + #The optparse.Values class does not provide a public method for updating. + #This only works if all the defaults are a false value (which they are) + for attr in dir(options): + if attr in extra_options.__dict__: + dval = extra_options.__dict__[attr] + if dval: + setattr(options, attr, dval) + args.extend(extra_args) + del options.file + if options.help: + if options.verbose: + for opt in parser._get_all_options(): + if hasattr(opt, "long_help"): + if opt.long_help.endswith("."): + opt.help += " " + opt.long_help + else: + opt.help += ". " + opt.long_help + parser.print_help() + if options.verbose: + print(EXTRA_HELP) + sys.exit(0) + if options.respect_init is None: + # In this case we cannot use `util.get_analysis_major_version` because it will only be + # populated _after_ we've parsed the options. + options.respect_init = any(version.startswith('2') for version in options.language_version) + else: + options.respect_init = options.respect_init.lower() == "true" + options.main = split_and_flatten(options.main, os.pathsep) + options.exclude = split_and_flatten(options.exclude, os.pathsep) + options.recursive = split_and_flatten(options.recursive, ",") + options.exclude_package = split_and_flatten(options.exclude_package, ",") + options.files = split_and_flatten(options.files, os.pathsep) + options.recurse_files = split_and_flatten(options.recurse_files, os.pathsep) + options.path = split_and_flatten(options.path, os.pathsep) + options.path = [strip_trailing_slash(item) for item in options.path] + for name in options.recursive: + verify_module_name(name) + for name in options.exclude_package: + verify_module_name(name) + for name in args: + verify_module_name(name) + if options.verbosity is not None: + try: + options.verbosity = int(options.verbosity) + except ValueError: + print (options.verbosity + " is not a valid verbosity level.") + sys.exit(1) + else: + options.verbosity = logging.WARN # default logging level + options.verbosity -= options.quiet + options.verbosity += options.verbose + if options.verbosity > logging.TRACE: + options.verbosity = logging.TRACE + if options.verbosity < logging.OFF: + options.verbosity = logging.OFF + if options.max_import_depth is None: + max_import_depth = float('inf') + else: + max_import_depth = int(options.max_import_depth) + if max_import_depth < 0: + max_import_depth = float('inf') + options.max_import_depth = max_import_depth + + if 'CODEQL_EXTRACTOR_PYTHON_DONT_EXTRACT_STDLIB' in os.environ: + options.extract_stdlib = False + + options.prune = True + return options, args + +def split_and_flatten(options_list, div): + result = [] + for item in options_list: + result.extend(item.split(div)) + return result + +def is_legal_module_name(name): + for identifier in name.split("."): + if not identifier.isidentifier(): + return False + return True + +def verify_module_name(name): + if not is_legal_module_name(name): + sys.exit("'%s' is not a legal module name" % name) + +EXTRA_HELP = ''' +When combining explicitly listed modules, or any options to include modules, with any option to exclude modules, the exclude options act as filters on the included modules. +Therefore if any module is both excluded and included by a command line option, then it will not be included in the database. +Note that exclusion of a module does not necessarily exclude the modules that are imported by that module. + +For example, if module 'a' imports module 'b' and module 'c' also imports module 'b' and the extractor is called with "-y c a", +then 'c' will be excluded but 'b' will be included as it is imported by 'a'. + +Exit codes: + 0. OK, finished normally + 1. Failed to extract one or more files. + 2. Interrupted (by ctrl-C or a signal) + 3. Other error. +''' + +def output_dir_from_options_and_env(options): + trap_dir = options.outdir + if trap_dir is None: + if 'CODEQL_EXTRACTOR_PYTHON_TRAP_DIR' in os.environ: + trap_dir = os.environ['CODEQL_EXTRACTOR_PYTHON_TRAP_DIR'] + elif 'TRAP_FOLDER' in os.environ: + trap_dir = os.environ['TRAP_FOLDER'] + else: + raise IOError( + "Cannot find trap folder. CODEQL_EXTRACTOR_PYTHON_TRAP_DIR is not set.") + if not os.path.exists(trap_dir): + os.makedirs(trap_dir) + return trap_dir + + +class MarkdownFormatter (HelpFormatter): + """Format help with underlined section headers. + """ + + def __init__(self, + indent_increment=0, + max_help_position=40, + width=1000, + short_first=0): + HelpFormatter.__init__ ( + self, indent_increment, max_help_position, width, short_first) + self.needs_table_heading = False + + def format_usage(self, usage): + return "%s %s\n" % (self.format_heading(_("Usage")), usage) + + def format_heading(self, heading): + self.needs_table_heading = True + return '%s %s\n' % ('#' * (self.level +3), heading) + + def format_description(self, description): + return description + "\n" + + def format_option(self, option): + if self.needs_table_heading: + self.needs_table_heading = False + header = "Flags | Description\n------|---------\n" + else: + header = '' + opts = self.option_strings[option] + return header + opts + " | " + option.help.replace("\n", " ") + "\n" + +def _is_help_line(lines, index, pos): + if index + 1 >= len(lines): + return False + if len(lines[index]) <= pos: + return False + if lines[index].startswith("#"): + return False + return True + +def _format_parser_options(): + parser = make_parser() + formatter = MarkdownFormatter() + return parser.format_help(formatter) + + +if __name__ == "__main__": + print(_format_parser_options()) diff --git a/python/extractor/semmle/data/$stdlib_27.trap b/python/extractor/semmle/data/$stdlib_27.trap new file mode 100644 index 00000000000..31ce836558d --- /dev/null +++ b/python/extractor/semmle/data/$stdlib_27.trap @@ -0,0 +1,9861 @@ +#10000 = @"C_builtin_function_or_method$_multiprocessing.address_of_buffer" +#10001 = @"C_type$tuple" +ext_rettype(#10000, #10001) +#10002 = @"C_builtin_function_or_method$_multiprocessing.sendfd" +#10003 = @"C_type$NoneType" +ext_rettype(#10002, #10003) +#10004 = @"C_builtin_function_or_method$_multiprocessing.recvfd" +#10005 = @"C_type$int" +ext_rettype(#10004, #10005) +#10006 = @"C_builtin_function_or_method$_ssl._test_decode_cert" +#10007 = @"C_type$dict" +ext_rettype(#10006, #10007) +#10008 = @"C_builtin_function_or_method$_ssl.RAND_add" +ext_rettype(#10008, #10003) +#10009 = @"C_builtin_function_or_method$_ssl.RAND_egd" +ext_rettype(#10009, #10005) +#10010 = @"C_builtin_function_or_method$_ssl.RAND_status" +ext_rettype(#10010, #10005) +#10011 = @"C_builtin_function_or_method$_ssl.get_default_verify_paths" +ext_rettype(#10011, #10001) +#10012 = @"C_builtin_function_or_method$_ssl.txt2obj" +ext_rettype(#10012, #10001) +#10013 = @"C_builtin_function_or_method$_ssl.nid2obj" +ext_rettype(#10013, #10001) +#10014 = @"C_builtin_function_or_method$_sre.getcodesize" +ext_rettype(#10014, #10005) +#10015 = @"C_builtin_function_or_method$_sre.getlower" +ext_rettype(#10015, #10005) +#10016 = @"C_builtin_function_or_method$linuxaudiodev.open" +#10017 = @"C_type$linuxaudiodev.linux_audio_device" +ext_rettype(#10016, #10017) +#10018 = @"C_builtin_function_or_method$_heapq.heappush" +ext_rettype(#10018, #10003) +#10019 = @"C_builtin_function_or_method$_heapq.heapify" +ext_rettype(#10019, #10003) +#10020 = @"C_builtin_function_or_method$_heapq.nlargest" +#10021 = @"C_type$list" +ext_rettype(#10020, #10021) +#10022 = @"C_builtin_function_or_method$_heapq.nsmallest" +ext_rettype(#10022, #10021) +#10023 = @"C_builtin_function_or_method$nis.match" +#10024 = @"C_type$bytes" +ext_rettype(#10023, #10024) +#10025 = @"C_builtin_function_or_method$nis.cat" +ext_rettype(#10025, #10007) +#10026 = @"C_builtin_function_or_method$nis.maps" +ext_rettype(#10026, #10021) +#10027 = @"C_builtin_function_or_method$nis.get_default_domain" +ext_rettype(#10027, #10024) +#10028 = @"C_builtin_function_or_method$pwd.getpwall" +ext_rettype(#10028, #10021) +#10029 = @"C_builtin_function_or_method$audioop.max" +ext_rettype(#10029, #10005) +#10030 = @"C_builtin_function_or_method$audioop.minmax" +ext_rettype(#10030, #10001) +#10031 = @"C_builtin_function_or_method$audioop.avg" +ext_rettype(#10031, #10005) +#10032 = @"C_builtin_function_or_method$audioop.maxpp" +ext_rettype(#10032, #10005) +#10033 = @"C_builtin_function_or_method$audioop.avgpp" +ext_rettype(#10033, #10005) +#10034 = @"C_builtin_function_or_method$audioop.rms" +ext_rettype(#10034, #10005) +#10035 = @"C_builtin_function_or_method$audioop.findfit" +ext_rettype(#10035, #10001) +#10036 = @"C_builtin_function_or_method$audioop.findmax" +ext_rettype(#10036, #10005) +#10037 = @"C_builtin_function_or_method$audioop.findfactor" +#10038 = @"C_type$float" +ext_rettype(#10037, #10038) +#10039 = @"C_builtin_function_or_method$audioop.cross" +ext_rettype(#10039, #10005) +#10040 = @"C_builtin_function_or_method$audioop.mul" +ext_rettype(#10040, #10024) +#10041 = @"C_builtin_function_or_method$audioop.add" +ext_rettype(#10041, #10024) +#10042 = @"C_builtin_function_or_method$audioop.bias" +ext_rettype(#10042, #10024) +#10043 = @"C_builtin_function_or_method$audioop.ulaw2lin" +ext_rettype(#10043, #10024) +#10044 = @"C_builtin_function_or_method$audioop.lin2ulaw" +ext_rettype(#10044, #10024) +#10045 = @"C_builtin_function_or_method$audioop.alaw2lin" +ext_rettype(#10045, #10024) +#10046 = @"C_builtin_function_or_method$audioop.lin2alaw" +ext_rettype(#10046, #10024) +#10047 = @"C_builtin_function_or_method$audioop.lin2lin" +ext_rettype(#10047, #10024) +#10048 = @"C_builtin_function_or_method$audioop.adpcm2lin" +ext_rettype(#10048, #10001) +#10049 = @"C_builtin_function_or_method$audioop.lin2adpcm" +ext_rettype(#10049, #10001) +#10050 = @"C_builtin_function_or_method$audioop.tomono" +ext_rettype(#10050, #10024) +#10051 = @"C_builtin_function_or_method$audioop.tostereo" +ext_rettype(#10051, #10024) +#10052 = @"C_builtin_function_or_method$audioop.getsample" +ext_rettype(#10052, #10005) +#10053 = @"C_builtin_function_or_method$audioop.reverse" +ext_rettype(#10053, #10024) +#10054 = @"C_builtin_function_or_method$audioop.ratecv" +ext_rettype(#10054, #10001) +#10055 = @"C_builtin_function_or_method$_multibytecodec.__create_codec" +#10056 = @"C_type$MultibyteCodec" +ext_rettype(#10055, #10056) +#10057 = @"C_builtin_function_or_method$operator.isCallable" +#10058 = @"C_type$bool" +ext_rettype(#10057, #10058) +#10059 = @"C_builtin_function_or_method$operator.isNumberType" +ext_rettype(#10059, #10058) +#10060 = @"C_builtin_function_or_method$operator.isSequenceType" +ext_rettype(#10060, #10058) +#10061 = @"C_builtin_function_or_method$operator.truth" +ext_rettype(#10061, #10058) +#10062 = @"C_builtin_function_or_method$operator.contains" +ext_rettype(#10062, #10058) +#10063 = @"C_builtin_function_or_method$operator.__contains__" +ext_rettype(#10063, #10058) +#10064 = @"C_builtin_function_or_method$operator.sequenceIncludes" +ext_rettype(#10064, #10058) +#10065 = @"C_builtin_function_or_method$operator.indexOf" +ext_rettype(#10065, #10005) +#10066 = @"C_builtin_function_or_method$operator.countOf" +ext_rettype(#10066, #10005) +#10067 = @"C_builtin_function_or_method$operator.isMappingType" +ext_rettype(#10067, #10058) +#10068 = @"C_builtin_function_or_method$operator.not_" +ext_rettype(#10068, #10058) +#10069 = @"C_builtin_function_or_method$operator.__not__" +ext_rettype(#10069, #10058) +#10070 = @"C_builtin_function_or_method$operator.setitem" +ext_rettype(#10070, #10003) +#10071 = @"C_builtin_function_or_method$operator.__setitem__" +ext_rettype(#10071, #10003) +#10072 = @"C_builtin_function_or_method$operator.delitem" +ext_rettype(#10072, #10003) +#10073 = @"C_builtin_function_or_method$operator.__delitem__" +ext_rettype(#10073, #10003) +#10074 = @"C_builtin_function_or_method$operator.setslice" +ext_rettype(#10074, #10003) +#10075 = @"C_builtin_function_or_method$operator.__setslice__" +ext_rettype(#10075, #10003) +#10076 = @"C_builtin_function_or_method$operator.delslice" +ext_rettype(#10076, #10003) +#10077 = @"C_builtin_function_or_method$operator.__delslice__" +ext_rettype(#10077, #10003) +#10078 = @"C_builtin_function_or_method$operator._compare_digest" +ext_rettype(#10078, #10058) +#10079 = @"C_builtin_function_or_method$parser.ast2tuple" +ext_rettype(#10079, #10003) +#10080 = @"C_builtin_function_or_method$parser.ast2list" +ext_rettype(#10080, #10003) +#10081 = @"C_builtin_function_or_method$parser.compileast" +#10082 = @"C_type$code" +ext_rettype(#10081, #10082) +#10083 = @"C_builtin_function_or_method$parser.compilest" +ext_rettype(#10083, #10082) +#10084 = @"C_builtin_function_or_method$parser.expr" +#10085 = @"C_type$parser.st" +ext_rettype(#10084, #10085) +#10086 = @"C_builtin_function_or_method$parser.suite" +ext_rettype(#10086, #10085) +#10087 = @"C_builtin_function_or_method$parser.sequence2ast" +ext_rettype(#10087, #10085) +#10088 = @"C_builtin_function_or_method$parser.sequence2st" +ext_rettype(#10088, #10085) +#10089 = @"C_builtin_function_or_method$parser.st2tuple" +ext_rettype(#10089, #10003) +#10090 = @"C_builtin_function_or_method$parser.st2list" +ext_rettype(#10090, #10003) +#10091 = @"C_builtin_function_or_method$parser.tuple2ast" +ext_rettype(#10091, #10085) +#10092 = @"C_builtin_function_or_method$parser.tuple2st" +ext_rettype(#10092, #10085) +#10093 = @"C_builtin_function_or_method$parser._pickler" +ext_rettype(#10093, #10001) +#10094 = @"C_builtin_function_or_method$_socket.gethostbyname" +ext_rettype(#10094, #10024) +#10095 = @"C_builtin_function_or_method$_socket.gethostbyname_ex" +ext_rettype(#10095, #10001) +#10096 = @"C_builtin_function_or_method$_socket.gethostbyaddr" +ext_rettype(#10096, #10001) +#10097 = @"C_builtin_function_or_method$_socket.gethostname" +ext_rettype(#10097, #10024) +#10098 = @"C_builtin_function_or_method$_socket.getservbyname" +ext_rettype(#10098, #10005) +#10099 = @"C_builtin_function_or_method$_socket.getservbyport" +ext_rettype(#10099, #10024) +#10100 = @"C_builtin_function_or_method$_socket.getprotobyname" +ext_rettype(#10100, #10005) +#10101 = @"C_builtin_function_or_method$_socket.fromfd" +#10102 = @"C_type$_socket.socket" +ext_rettype(#10101, #10102) +#10103 = @"C_builtin_function_or_method$_socket.socketpair" +ext_rettype(#10103, #10001) +#10104 = @"C_builtin_function_or_method$_socket.ntohs" +ext_rettype(#10104, #10005) +#10105 = @"C_builtin_function_or_method$_socket.ntohl" +ext_rettype(#10105, #10005) +#10106 = @"C_builtin_function_or_method$_socket.htons" +ext_rettype(#10106, #10005) +#10107 = @"C_builtin_function_or_method$_socket.htonl" +ext_rettype(#10107, #10005) +#10108 = @"C_builtin_function_or_method$_socket.inet_aton" +ext_rettype(#10108, #10024) +#10109 = @"C_builtin_function_or_method$_socket.inet_ntoa" +ext_rettype(#10109, #10024) +#10110 = @"C_builtin_function_or_method$_socket.inet_pton" +ext_rettype(#10110, #10024) +#10111 = @"C_builtin_function_or_method$_socket.inet_ntop" +ext_rettype(#10111, #10024) +#10112 = @"C_builtin_function_or_method$_socket.getaddrinfo" +ext_rettype(#10112, #10021) +#10113 = @"C_builtin_function_or_method$_socket.getnameinfo" +ext_rettype(#10113, #10001) +#10114 = @"C_builtin_function_or_method$_socket.getdefaulttimeout" +ext_rettype(#10114, #10038) +ext_rettype(#10114, #10003) +#10115 = @"C_builtin_function_or_method$_socket.setdefaulttimeout" +ext_rettype(#10115, #10003) +#10116 = @"C_builtin_function_or_method$itertools.tee" +ext_rettype(#10116, #10001) +#10117 = @"C_builtin_function_or_method$math.acos" +ext_rettype(#10117, #10038) +#10118 = @"C_builtin_function_or_method$math.acosh" +ext_rettype(#10118, #10038) +#10119 = @"C_builtin_function_or_method$math.asin" +ext_rettype(#10119, #10038) +#10120 = @"C_builtin_function_or_method$math.asinh" +ext_rettype(#10120, #10038) +#10121 = @"C_builtin_function_or_method$math.atan" +ext_rettype(#10121, #10038) +#10122 = @"C_builtin_function_or_method$math.atan2" +ext_rettype(#10122, #10038) +#10123 = @"C_builtin_function_or_method$math.atanh" +ext_rettype(#10123, #10038) +#10124 = @"C_builtin_function_or_method$math.ceil" +ext_rettype(#10124, #10038) +#10125 = @"C_builtin_function_or_method$math.copysign" +ext_rettype(#10125, #10038) +#10126 = @"C_builtin_function_or_method$math.cos" +ext_rettype(#10126, #10038) +#10127 = @"C_builtin_function_or_method$math.cosh" +ext_rettype(#10127, #10038) +#10128 = @"C_builtin_function_or_method$math.degrees" +ext_rettype(#10128, #10038) +#10129 = @"C_builtin_function_or_method$math.erf" +ext_rettype(#10129, #10038) +#10130 = @"C_builtin_function_or_method$math.erfc" +ext_rettype(#10130, #10038) +#10131 = @"C_builtin_function_or_method$math.exp" +ext_rettype(#10131, #10038) +#10132 = @"C_builtin_function_or_method$math.expm1" +ext_rettype(#10132, #10038) +#10133 = @"C_builtin_function_or_method$math.fabs" +ext_rettype(#10133, #10038) +#10134 = @"C_builtin_function_or_method$math.factorial" +ext_rettype(#10134, #10005) +#10135 = @"C_builtin_function_or_method$math.floor" +ext_rettype(#10135, #10038) +#10136 = @"C_builtin_function_or_method$math.fmod" +ext_rettype(#10136, #10038) +#10137 = @"C_builtin_function_or_method$math.frexp" +ext_rettype(#10137, #10001) +#10138 = @"C_builtin_function_or_method$math.fsum" +ext_rettype(#10138, #10038) +#10139 = @"C_builtin_function_or_method$math.gamma" +ext_rettype(#10139, #10038) +#10140 = @"C_builtin_function_or_method$math.hypot" +ext_rettype(#10140, #10038) +#10141 = @"C_builtin_function_or_method$math.isinf" +ext_rettype(#10141, #10058) +#10142 = @"C_builtin_function_or_method$math.isnan" +ext_rettype(#10142, #10058) +#10143 = @"C_builtin_function_or_method$math.ldexp" +ext_rettype(#10143, #10038) +#10144 = @"C_builtin_function_or_method$math.lgamma" +ext_rettype(#10144, #10038) +#10145 = @"C_builtin_function_or_method$math.log" +ext_rettype(#10145, #10038) +#10146 = @"C_builtin_function_or_method$math.log1p" +ext_rettype(#10146, #10038) +#10147 = @"C_builtin_function_or_method$math.log10" +ext_rettype(#10147, #10038) +#10148 = @"C_builtin_function_or_method$math.modf" +ext_rettype(#10148, #10001) +#10149 = @"C_builtin_function_or_method$math.pow" +ext_rettype(#10149, #10038) +#10150 = @"C_builtin_function_or_method$math.radians" +ext_rettype(#10150, #10038) +#10151 = @"C_builtin_function_or_method$math.sin" +ext_rettype(#10151, #10038) +#10152 = @"C_builtin_function_or_method$math.sinh" +ext_rettype(#10152, #10038) +#10153 = @"C_builtin_function_or_method$math.sqrt" +ext_rettype(#10153, #10038) +#10154 = @"C_builtin_function_or_method$math.tan" +ext_rettype(#10154, #10038) +#10155 = @"C_builtin_function_or_method$math.tanh" +ext_rettype(#10155, #10038) +#10156 = @"C_builtin_function_or_method$signal.alarm" +ext_rettype(#10156, #10005) +#10157 = @"C_builtin_function_or_method$signal.setitimer" +ext_rettype(#10157, #10001) +#10158 = @"C_builtin_function_or_method$signal.getitimer" +ext_rettype(#10158, #10001) +#10159 = @"C_builtin_function_or_method$signal.signal" +ext_rettype(#10159, #10003) +#10160 = @"C_builtin_function_or_method$signal.getsignal" +ext_rettype(#10160, #10003) +#10161 = @"C_builtin_function_or_method$signal.set_wakeup_fd" +ext_rettype(#10161, #10005) +#10162 = @"C_builtin_function_or_method$signal.siginterrupt" +ext_rettype(#10162, #10003) +#10163 = @"C_builtin_function_or_method$signal.pause" +ext_rettype(#10163, #10003) +#10164 = @"C_builtin_function_or_method$_csv.reader" +#10165 = @"C_type$_csv.reader" +ext_rettype(#10164, #10165) +#10166 = @"C_builtin_function_or_method$_csv.writer" +#10167 = @"C_type$_csv.writer" +ext_rettype(#10166, #10167) +#10168 = @"C_builtin_function_or_method$_csv.list_dialects" +ext_rettype(#10168, #10021) +#10169 = @"C_builtin_function_or_method$_csv.register_dialect" +ext_rettype(#10169, #10003) +#10170 = @"C_builtin_function_or_method$_csv.unregister_dialect" +ext_rettype(#10170, #10003) +#10171 = @"C_builtin_function_or_method$_csv.field_size_limit" +ext_rettype(#10171, #10005) +#10172 = @"C_builtin_function_or_method$gc.enable" +ext_rettype(#10172, #10003) +#10173 = @"C_builtin_function_or_method$gc.disable" +ext_rettype(#10173, #10003) +#10174 = @"C_builtin_function_or_method$gc.isenabled" +ext_rettype(#10174, #10058) +#10175 = @"C_builtin_function_or_method$gc.set_debug" +ext_rettype(#10175, #10003) +#10176 = @"C_builtin_function_or_method$gc.get_debug" +ext_rettype(#10176, #10005) +#10177 = @"C_builtin_function_or_method$gc.get_count" +ext_rettype(#10177, #10001) +#10178 = @"C_builtin_function_or_method$gc.set_threshold" +ext_rettype(#10178, #10003) +#10179 = @"C_builtin_function_or_method$gc.get_threshold" +ext_rettype(#10179, #10001) +#10180 = @"C_builtin_function_or_method$gc.collect" +ext_rettype(#10180, #10005) +#10181 = @"C_builtin_function_or_method$gc.get_objects" +ext_rettype(#10181, #10021) +#10182 = @"C_builtin_function_or_method$gc.is_tracked" +ext_rettype(#10182, #10058) +#10183 = @"C_builtin_function_or_method$gc.get_referrers" +ext_rettype(#10183, #10021) +#10184 = @"C_builtin_function_or_method$gc.get_referents" +ext_rettype(#10184, #10021) +#10185 = @"C_builtin_function_or_method$termios.tcgetattr" +ext_rettype(#10185, #10021) +#10186 = @"C_builtin_function_or_method$termios.tcsetattr" +ext_rettype(#10186, #10003) +#10187 = @"C_builtin_function_or_method$termios.tcsendbreak" +ext_rettype(#10187, #10003) +#10188 = @"C_builtin_function_or_method$termios.tcdrain" +ext_rettype(#10188, #10003) +#10189 = @"C_builtin_function_or_method$termios.tcflush" +ext_rettype(#10189, #10003) +#10190 = @"C_builtin_function_or_method$termios.tcflow" +ext_rettype(#10190, #10003) +#10191 = @"C_builtin_function_or_method$grp.getgrall" +ext_rettype(#10191, #10021) +#10192 = @"C_builtin_function_or_method$time.time" +ext_rettype(#10192, #10038) +#10193 = @"C_builtin_function_or_method$time.clock" +ext_rettype(#10193, #10038) +#10194 = @"C_builtin_function_or_method$time.sleep" +ext_rettype(#10194, #10003) +#10195 = @"C_builtin_function_or_method$time.asctime" +ext_rettype(#10195, #10024) +#10196 = @"C_builtin_function_or_method$time.ctime" +ext_rettype(#10196, #10024) +#10197 = @"C_builtin_function_or_method$time.mktime" +ext_rettype(#10197, #10038) +#10198 = @"C_builtin_function_or_method$time.strftime" +ext_rettype(#10198, #10024) +#10199 = @"C_builtin_function_or_method$time.tzset" +ext_rettype(#10199, #10003) +#10200 = @"C_builtin_function_or_method$_hotshot.coverage" +#10201 = @"C_type$_hotshot.ProfilerType" +ext_rettype(#10200, #10201) +#10202 = @"C_builtin_function_or_method$_hotshot.profiler" +ext_rettype(#10202, #10201) +#10203 = @"C_builtin_function_or_method$_hotshot.logreader" +#10204 = @"C_type$_hotshot.LogReaderType" +ext_rettype(#10203, #10204) +#10205 = @"C_builtin_function_or_method$_hotshot.resolution" +ext_rettype(#10205, #10001) +#10206 = @"C_builtin_function_or_method$posix.access" +ext_rettype(#10206, #10058) +#10207 = @"C_builtin_function_or_method$posix.ttyname" +ext_rettype(#10207, #10024) +#10208 = @"C_builtin_function_or_method$posix.chdir" +ext_rettype(#10208, #10003) +#10209 = @"C_builtin_function_or_method$posix.chmod" +ext_rettype(#10209, #10003) +#10210 = @"C_builtin_function_or_method$posix.fchmod" +ext_rettype(#10210, #10003) +#10211 = @"C_builtin_function_or_method$posix.chown" +ext_rettype(#10211, #10003) +#10212 = @"C_builtin_function_or_method$posix.fchown" +ext_rettype(#10212, #10003) +#10213 = @"C_builtin_function_or_method$posix.lchown" +ext_rettype(#10213, #10003) +#10214 = @"C_builtin_function_or_method$posix.chroot" +ext_rettype(#10214, #10003) +#10215 = @"C_builtin_function_or_method$posix.ctermid" +ext_rettype(#10215, #10024) +#10216 = @"C_builtin_function_or_method$posix.getcwd" +ext_rettype(#10216, #10024) +#10217 = @"C_builtin_function_or_method$posix.getcwdu" +#10218 = @"C_type$unicode" +ext_rettype(#10217, #10218) +#10219 = @"C_builtin_function_or_method$posix.link" +ext_rettype(#10219, #10003) +#10220 = @"C_builtin_function_or_method$posix.listdir" +ext_rettype(#10220, #10021) +#10221 = @"C_builtin_function_or_method$posix.mkdir" +ext_rettype(#10221, #10003) +#10222 = @"C_builtin_function_or_method$posix.nice" +ext_rettype(#10222, #10005) +#10223 = @"C_builtin_function_or_method$posix.readlink" +ext_rettype(#10223, #10024) +ext_rettype(#10223, #10218) +#10224 = @"C_builtin_function_or_method$posix.rename" +ext_rettype(#10224, #10003) +#10225 = @"C_builtin_function_or_method$posix.rmdir" +ext_rettype(#10225, #10003) +#10226 = @"C_builtin_function_or_method$posix.stat_float_times" +ext_rettype(#10226, #10058) +ext_rettype(#10226, #10003) +#10227 = @"C_builtin_function_or_method$posix.symlink" +ext_rettype(#10227, #10003) +#10228 = @"C_builtin_function_or_method$posix.system" +ext_rettype(#10228, #10005) +#10229 = @"C_builtin_function_or_method$posix.umask" +ext_rettype(#10229, #10005) +#10230 = @"C_builtin_function_or_method$posix.uname" +ext_rettype(#10230, #10001) +#10231 = @"C_builtin_function_or_method$posix.unlink" +ext_rettype(#10231, #10003) +#10232 = @"C_builtin_function_or_method$posix.remove" +ext_rettype(#10232, #10003) +#10233 = @"C_builtin_function_or_method$posix.utime" +ext_rettype(#10233, #10003) +#10234 = @"C_builtin_function_or_method$posix.times" +ext_rettype(#10234, #10001) +#10235 = @"C_builtin_function_or_method$posix.fork" +ext_rettype(#10235, #10005) +#10236 = @"C_builtin_function_or_method$posix.openpty" +ext_rettype(#10236, #10001) +#10237 = @"C_builtin_function_or_method$posix.forkpty" +ext_rettype(#10237, #10001) +#10238 = @"C_builtin_function_or_method$posix.getegid" +ext_rettype(#10238, #10005) +#10239 = @"C_builtin_function_or_method$posix.geteuid" +ext_rettype(#10239, #10005) +#10240 = @"C_builtin_function_or_method$posix.getgid" +ext_rettype(#10240, #10005) +#10241 = @"C_builtin_function_or_method$posix.getgroups" +ext_rettype(#10241, #10021) +#10242 = @"C_builtin_function_or_method$posix.getpid" +ext_rettype(#10242, #10005) +#10243 = @"C_builtin_function_or_method$posix.getpgrp" +ext_rettype(#10243, #10005) +#10244 = @"C_builtin_function_or_method$posix.getppid" +ext_rettype(#10244, #10005) +#10245 = @"C_builtin_function_or_method$posix.getuid" +ext_rettype(#10245, #10005) +#10246 = @"C_builtin_function_or_method$posix.getlogin" +ext_rettype(#10246, #10024) +#10247 = @"C_builtin_function_or_method$posix.kill" +ext_rettype(#10247, #10003) +#10248 = @"C_builtin_function_or_method$posix.killpg" +ext_rettype(#10248, #10003) +#10249 = @"C_builtin_function_or_method$posix.popen" +#10250 = @"C_type$file" +ext_rettype(#10249, #10250) +#10251 = @"C_builtin_function_or_method$posix.setuid" +ext_rettype(#10251, #10003) +#10252 = @"C_builtin_function_or_method$posix.seteuid" +ext_rettype(#10252, #10003) +#10253 = @"C_builtin_function_or_method$posix.setegid" +ext_rettype(#10253, #10003) +#10254 = @"C_builtin_function_or_method$posix.setreuid" +ext_rettype(#10254, #10003) +#10255 = @"C_builtin_function_or_method$posix.setregid" +ext_rettype(#10255, #10003) +#10256 = @"C_builtin_function_or_method$posix.setgid" +ext_rettype(#10256, #10003) +#10257 = @"C_builtin_function_or_method$posix.setgroups" +ext_rettype(#10257, #10003) +#10258 = @"C_builtin_function_or_method$posix.initgroups" +ext_rettype(#10258, #10003) +#10259 = @"C_builtin_function_or_method$posix.getpgid" +ext_rettype(#10259, #10005) +#10260 = @"C_builtin_function_or_method$posix.setpgrp" +ext_rettype(#10260, #10003) +#10261 = @"C_builtin_function_or_method$posix.wait" +ext_rettype(#10261, #10001) +#10262 = @"C_builtin_function_or_method$posix.wait3" +ext_rettype(#10262, #10001) +#10263 = @"C_builtin_function_or_method$posix.wait4" +ext_rettype(#10263, #10001) +#10264 = @"C_builtin_function_or_method$posix.waitpid" +ext_rettype(#10264, #10001) +#10265 = @"C_builtin_function_or_method$posix.getsid" +ext_rettype(#10265, #10005) +#10266 = @"C_builtin_function_or_method$posix.setsid" +ext_rettype(#10266, #10003) +#10267 = @"C_builtin_function_or_method$posix.setpgid" +ext_rettype(#10267, #10003) +#10268 = @"C_builtin_function_or_method$posix.tcgetpgrp" +ext_rettype(#10268, #10005) +#10269 = @"C_builtin_function_or_method$posix.tcsetpgrp" +ext_rettype(#10269, #10003) +#10270 = @"C_builtin_function_or_method$posix.open" +ext_rettype(#10270, #10005) +#10271 = @"C_builtin_function_or_method$posix.close" +ext_rettype(#10271, #10003) +#10272 = @"C_builtin_function_or_method$posix.closerange" +ext_rettype(#10272, #10003) +#10273 = @"C_builtin_function_or_method$posix.dup" +ext_rettype(#10273, #10005) +#10274 = @"C_builtin_function_or_method$posix.dup2" +ext_rettype(#10274, #10003) +#10275 = @"C_builtin_function_or_method$posix.lseek" +ext_rettype(#10275, #10005) +#10276 = @"C_builtin_function_or_method$posix.write" +ext_rettype(#10276, #10005) +#10277 = @"C_builtin_function_or_method$posix.fdopen" +ext_rettype(#10277, #10250) +#10278 = @"C_builtin_function_or_method$posix.isatty" +ext_rettype(#10278, #10058) +#10279 = @"C_builtin_function_or_method$posix.pipe" +ext_rettype(#10279, #10001) +#10280 = @"C_builtin_function_or_method$posix.mkfifo" +ext_rettype(#10280, #10003) +#10281 = @"C_builtin_function_or_method$posix.mknod" +ext_rettype(#10281, #10003) +#10282 = @"C_builtin_function_or_method$posix.major" +ext_rettype(#10282, #10005) +#10283 = @"C_builtin_function_or_method$posix.minor" +ext_rettype(#10283, #10005) +#10284 = @"C_builtin_function_or_method$posix.makedev" +ext_rettype(#10284, #10005) +#10285 = @"C_builtin_function_or_method$posix.ftruncate" +ext_rettype(#10285, #10003) +#10286 = @"C_builtin_function_or_method$posix.putenv" +ext_rettype(#10286, #10003) +#10287 = @"C_builtin_function_or_method$posix.unsetenv" +ext_rettype(#10287, #10003) +#10288 = @"C_builtin_function_or_method$posix.strerror" +ext_rettype(#10288, #10024) +#10289 = @"C_builtin_function_or_method$posix.fchdir" +ext_rettype(#10289, #10003) +#10290 = @"C_builtin_function_or_method$posix.fsync" +ext_rettype(#10290, #10003) +#10291 = @"C_builtin_function_or_method$posix.fdatasync" +ext_rettype(#10291, #10003) +#10292 = @"C_builtin_function_or_method$posix.WCOREDUMP" +ext_rettype(#10292, #10058) +#10293 = @"C_builtin_function_or_method$posix.WIFCONTINUED" +ext_rettype(#10293, #10058) +#10294 = @"C_builtin_function_or_method$posix.WIFSTOPPED" +ext_rettype(#10294, #10058) +#10295 = @"C_builtin_function_or_method$posix.WIFSIGNALED" +ext_rettype(#10295, #10058) +#10296 = @"C_builtin_function_or_method$posix.WIFEXITED" +ext_rettype(#10296, #10058) +#10297 = @"C_builtin_function_or_method$posix.WEXITSTATUS" +ext_rettype(#10297, #10005) +#10298 = @"C_builtin_function_or_method$posix.WTERMSIG" +ext_rettype(#10298, #10005) +#10299 = @"C_builtin_function_or_method$posix.WSTOPSIG" +ext_rettype(#10299, #10005) +#10300 = @"C_builtin_function_or_method$posix.tmpfile" +ext_rettype(#10300, #10250) +#10301 = @"C_builtin_function_or_method$posix.tempnam" +ext_rettype(#10301, #10024) +#10302 = @"C_builtin_function_or_method$posix.tmpnam" +ext_rettype(#10302, #10024) +#10303 = @"C_builtin_function_or_method$posix.confstr" +ext_rettype(#10303, #10024) +ext_rettype(#10303, #10003) +#10304 = @"C_builtin_function_or_method$posix.sysconf" +ext_rettype(#10304, #10005) +#10305 = @"C_builtin_function_or_method$posix.fpathconf" +ext_rettype(#10305, #10005) +#10306 = @"C_builtin_function_or_method$posix.pathconf" +ext_rettype(#10306, #10005) +#10307 = @"C_builtin_function_or_method$posix.getloadavg" +ext_rettype(#10307, #10001) +#10308 = @"C_builtin_function_or_method$posix.setresuid" +ext_rettype(#10308, #10003) +#10309 = @"C_builtin_function_or_method$posix.setresgid" +ext_rettype(#10309, #10003) +#10310 = @"C_builtin_function_or_method$posix.getresuid" +ext_rettype(#10310, #10001) +#10311 = @"C_builtin_function_or_method$posix.getresgid" +ext_rettype(#10311, #10001) +#10312 = @"C_builtin_function_or_method$posix.urandom" +ext_rettype(#10312, #10024) +#10313 = @"C_builtin_function_or_method$cStringIO.StringIO" +#10314 = @"C_type$cStringIO.StringO" +ext_rettype(#10313, #10314) +#10315 = @"C_type$cStringIO.StringI" +ext_rettype(#10313, #10315) +#10316 = @"C_builtin_function_or_method$_struct._clearcache" +ext_rettype(#10316, #10003) +#10317 = @"C_builtin_function_or_method$_struct.calcsize" +ext_rettype(#10317, #10005) +#10318 = @"C_builtin_function_or_method$_struct.pack" +ext_rettype(#10318, #10024) +#10319 = @"C_builtin_function_or_method$_struct.pack_into" +ext_rettype(#10319, #10003) +#10320 = @"C_builtin_function_or_method$_struct.unpack" +ext_rettype(#10320, #10001) +#10321 = @"C_builtin_function_or_method$_struct.unpack_from" +ext_rettype(#10321, #10001) +#10322 = @"C_builtin_function_or_method$crypt.crypt" +ext_rettype(#10322, #10024) +#10323 = @"C_builtin_function_or_method$strop.atof" +ext_rettype(#10323, #10038) +#10324 = @"C_builtin_function_or_method$strop.atoi" +ext_rettype(#10324, #10005) +#10325 = @"C_builtin_function_or_method$strop.atol" +ext_rettype(#10325, #10005) +#10326 = @"C_builtin_function_or_method$strop.capitalize" +ext_rettype(#10326, #10024) +#10327 = @"C_builtin_function_or_method$strop.count" +ext_rettype(#10327, #10005) +#10328 = @"C_builtin_function_or_method$strop.expandtabs" +ext_rettype(#10328, #10024) +#10329 = @"C_builtin_function_or_method$strop.find" +ext_rettype(#10329, #10005) +#10330 = @"C_builtin_function_or_method$strop.lstrip" +ext_rettype(#10330, #10024) +#10331 = @"C_builtin_function_or_method$strop.lower" +ext_rettype(#10331, #10024) +#10332 = @"C_builtin_function_or_method$strop.maketrans" +ext_rettype(#10332, #10024) +#10333 = @"C_builtin_function_or_method$strop.replace" +ext_rettype(#10333, #10024) +#10334 = @"C_builtin_function_or_method$strop.rfind" +ext_rettype(#10334, #10005) +#10335 = @"C_builtin_function_or_method$strop.rstrip" +ext_rettype(#10335, #10024) +#10336 = @"C_builtin_function_or_method$strop.split" +ext_rettype(#10336, #10021) +#10337 = @"C_builtin_function_or_method$strop.splitfields" +ext_rettype(#10337, #10021) +#10338 = @"C_builtin_function_or_method$strop.strip" +ext_rettype(#10338, #10024) +#10339 = @"C_builtin_function_or_method$strop.swapcase" +ext_rettype(#10339, #10024) +#10340 = @"C_builtin_function_or_method$strop.upper" +ext_rettype(#10340, #10024) +#10341 = @"C_builtin_function_or_method$binascii.a2b_uu" +ext_rettype(#10341, #10024) +#10342 = @"C_builtin_function_or_method$binascii.a2b_hqx" +ext_rettype(#10342, #10001) +#10343 = @"C_builtin_function_or_method$binascii.b2a_hex" +ext_rettype(#10343, #10024) +#10344 = @"C_builtin_function_or_method$binascii.a2b_hex" +ext_rettype(#10344, #10024) +#10345 = @"C_builtin_function_or_method$binascii.hexlify" +ext_rettype(#10345, #10024) +#10346 = @"C_builtin_function_or_method$binascii.unhexlify" +ext_rettype(#10346, #10024) +#10347 = @"C_builtin_function_or_method$binascii.rledecode_hqx" +ext_rettype(#10347, #10024) +#10348 = @"C_builtin_function_or_method$binascii.crc_hqx" +ext_rettype(#10348, #10005) +#10349 = @"C_builtin_function_or_method$binascii.crc32" +ext_rettype(#10349, #10005) +#10350 = @"C_builtin_function_or_method$binascii.a2b_qp" +ext_rettype(#10350, #10024) +#10351 = @"C_builtin_function_or_method$binascii.b2a_qp" +ext_rettype(#10351, #10024) +#10352 = @"C_builtin_function_or_method$cPickle.dump" +ext_rettype(#10352, #10003) +#10353 = @"C_builtin_function_or_method$cPickle.Pickler" +#10354 = @"C_type$cPickle.Pickler" +ext_rettype(#10353, #10354) +#10355 = @"C_builtin_function_or_method$cPickle.Unpickler" +#10356 = @"C_type$cPickle.Unpickler" +ext_rettype(#10355, #10356) +#10357 = @"C_builtin_function_or_method$unicodedata.decimal" +ext_rettype(#10357, #10005) +#10358 = @"C_builtin_function_or_method$unicodedata.digit" +ext_rettype(#10358, #10005) +#10359 = @"C_builtin_function_or_method$unicodedata.numeric" +ext_rettype(#10359, #10038) +#10360 = @"C_builtin_function_or_method$unicodedata.category" +ext_rettype(#10360, #10024) +#10361 = @"C_builtin_function_or_method$unicodedata.bidirectional" +ext_rettype(#10361, #10024) +#10362 = @"C_builtin_function_or_method$unicodedata.combining" +ext_rettype(#10362, #10005) +#10363 = @"C_builtin_function_or_method$unicodedata.mirrored" +ext_rettype(#10363, #10005) +#10364 = @"C_builtin_function_or_method$unicodedata.east_asian_width" +ext_rettype(#10364, #10024) +#10365 = @"C_builtin_function_or_method$unicodedata.decomposition" +ext_rettype(#10365, #10024) +#10366 = @"C_builtin_function_or_method$unicodedata.name" +ext_rettype(#10366, #10024) +#10367 = @"C_builtin_function_or_method$unicodedata.lookup" +ext_rettype(#10367, #10218) +#10368 = @"C_builtin_function_or_method$xxsubtype.bench" +ext_rettype(#10368, #10038) +#10369 = @"C_builtin_function_or_method$_hashlib.new" +#10370 = @"C_type$_hashlib.HASH" +ext_rettype(#10369, #10370) +#10371 = @"C_builtin_function_or_method$_hashlib.openssl_md5" +ext_rettype(#10371, #10370) +#10372 = @"C_builtin_function_or_method$_hashlib.openssl_sha1" +ext_rettype(#10372, #10370) +#10373 = @"C_builtin_function_or_method$_hashlib.openssl_sha224" +ext_rettype(#10373, #10370) +#10374 = @"C_builtin_function_or_method$_hashlib.openssl_sha256" +ext_rettype(#10374, #10370) +#10375 = @"C_builtin_function_or_method$_hashlib.openssl_sha384" +ext_rettype(#10375, #10370) +#10376 = @"C_builtin_function_or_method$_hashlib.openssl_sha512" +ext_rettype(#10376, #10370) +#10377 = @"C_builtin_function_or_method$_hashlib.pbkdf2_hmac" +ext_rettype(#10377, #10024) +#10378 = @"C_builtin_function_or_method$zlib.adler32" +ext_rettype(#10378, #10005) +#10379 = @"C_builtin_function_or_method$zlib.compress" +ext_rettype(#10379, #10024) +#10380 = @"C_builtin_function_or_method$zlib.crc32" +ext_rettype(#10380, #10005) +#10381 = @"C_builtin_function_or_method$thread.start_new_thread" +ext_rettype(#10381, #10005) +#10382 = @"C_builtin_function_or_method$thread.start_new" +ext_rettype(#10382, #10005) +#10383 = @"C_builtin_function_or_method$thread.allocate_lock" +#10384 = @"C_type$thread.lock" +ext_rettype(#10383, #10384) +#10385 = @"C_builtin_function_or_method$thread.allocate" +ext_rettype(#10385, #10384) +#10386 = @"C_builtin_function_or_method$thread.interrupt_main" +ext_rettype(#10386, #10003) +#10387 = @"C_builtin_function_or_method$thread.get_ident" +ext_rettype(#10387, #10005) +#10388 = @"C_builtin_function_or_method$thread._count" +ext_rettype(#10388, #10005) +#10389 = @"C_builtin_function_or_method$thread.stack_size" +ext_rettype(#10389, #10005) +#10390 = @"C_builtin_function_or_method$bz2.decompress" +ext_rettype(#10390, #10024) +#10391 = @"C_builtin_function_or_method$resource.getrlimit" +ext_rettype(#10391, #10001) +#10392 = @"C_builtin_function_or_method$resource.setrlimit" +ext_rettype(#10392, #10003) +#10393 = @"C_builtin_function_or_method$resource.getpagesize" +ext_rettype(#10393, #10005) +#10394 = @"C_builtin_function_or_method$_codecs.register" +ext_rettype(#10394, #10003) +#10395 = @"C_builtin_function_or_method$_codecs.escape_encode" +ext_rettype(#10395, #10001) +#10396 = @"C_builtin_function_or_method$_codecs.escape_decode" +ext_rettype(#10396, #10001) +#10397 = @"C_builtin_function_or_method$_codecs.utf_8_encode" +ext_rettype(#10397, #10001) +#10398 = @"C_builtin_function_or_method$_codecs.utf_8_decode" +ext_rettype(#10398, #10001) +#10399 = @"C_builtin_function_or_method$_codecs.utf_7_encode" +ext_rettype(#10399, #10001) +#10400 = @"C_builtin_function_or_method$_codecs.utf_7_decode" +ext_rettype(#10400, #10001) +#10401 = @"C_builtin_function_or_method$_codecs.utf_16_encode" +ext_rettype(#10401, #10001) +#10402 = @"C_builtin_function_or_method$_codecs.utf_16_le_encode" +ext_rettype(#10402, #10001) +#10403 = @"C_builtin_function_or_method$_codecs.utf_16_be_encode" +ext_rettype(#10403, #10001) +#10404 = @"C_builtin_function_or_method$_codecs.utf_16_decode" +ext_rettype(#10404, #10001) +#10405 = @"C_builtin_function_or_method$_codecs.utf_16_le_decode" +ext_rettype(#10405, #10001) +#10406 = @"C_builtin_function_or_method$_codecs.utf_16_be_decode" +ext_rettype(#10406, #10001) +#10407 = @"C_builtin_function_or_method$_codecs.utf_16_ex_decode" +ext_rettype(#10407, #10001) +#10408 = @"C_builtin_function_or_method$_codecs.utf_32_encode" +ext_rettype(#10408, #10001) +#10409 = @"C_builtin_function_or_method$_codecs.utf_32_le_encode" +ext_rettype(#10409, #10001) +#10410 = @"C_builtin_function_or_method$_codecs.utf_32_be_encode" +ext_rettype(#10410, #10001) +#10411 = @"C_builtin_function_or_method$_codecs.utf_32_decode" +ext_rettype(#10411, #10001) +#10412 = @"C_builtin_function_or_method$_codecs.utf_32_le_decode" +ext_rettype(#10412, #10001) +#10413 = @"C_builtin_function_or_method$_codecs.utf_32_be_decode" +ext_rettype(#10413, #10001) +#10414 = @"C_builtin_function_or_method$_codecs.utf_32_ex_decode" +ext_rettype(#10414, #10001) +#10415 = @"C_builtin_function_or_method$_codecs.unicode_escape_encode" +ext_rettype(#10415, #10001) +#10416 = @"C_builtin_function_or_method$_codecs.unicode_escape_decode" +ext_rettype(#10416, #10001) +#10417 = @"C_builtin_function_or_method$_codecs.unicode_internal_encode" +ext_rettype(#10417, #10001) +#10418 = @"C_builtin_function_or_method$_codecs.unicode_internal_decode" +ext_rettype(#10418, #10001) +#10419 = @"C_builtin_function_or_method$_codecs.raw_unicode_escape_encode" +ext_rettype(#10419, #10001) +#10420 = @"C_builtin_function_or_method$_codecs.raw_unicode_escape_decode" +ext_rettype(#10420, #10001) +#10421 = @"C_builtin_function_or_method$_codecs.latin_1_encode" +ext_rettype(#10421, #10001) +#10422 = @"C_builtin_function_or_method$_codecs.latin_1_decode" +ext_rettype(#10422, #10001) +#10423 = @"C_builtin_function_or_method$_codecs.ascii_encode" +ext_rettype(#10423, #10001) +#10424 = @"C_builtin_function_or_method$_codecs.ascii_decode" +ext_rettype(#10424, #10001) +#10425 = @"C_builtin_function_or_method$_codecs.charmap_encode" +ext_rettype(#10425, #10001) +#10426 = @"C_builtin_function_or_method$_codecs.charmap_decode" +ext_rettype(#10426, #10001) +#10427 = @"C_builtin_function_or_method$_codecs.charmap_build" +ext_rettype(#10427, #10007) +#10428 = @"C_builtin_function_or_method$_codecs.readbuffer_encode" +ext_rettype(#10428, #10001) +#10429 = @"C_builtin_function_or_method$_codecs.charbuffer_encode" +ext_rettype(#10429, #10001) +#10430 = @"C_builtin_function_or_method$_codecs.register_error" +ext_rettype(#10430, #10003) +#10431 = @"C_builtin_function_or_method$readline.parse_and_bind" +ext_rettype(#10431, #10003) +#10432 = @"C_builtin_function_or_method$readline.get_line_buffer" +ext_rettype(#10432, #10024) +#10433 = @"C_builtin_function_or_method$readline.insert_text" +ext_rettype(#10433, #10003) +#10434 = @"C_builtin_function_or_method$readline.redisplay" +ext_rettype(#10434, #10003) +#10435 = @"C_builtin_function_or_method$readline.read_init_file" +ext_rettype(#10435, #10003) +#10436 = @"C_builtin_function_or_method$readline.read_history_file" +ext_rettype(#10436, #10003) +#10437 = @"C_builtin_function_or_method$readline.write_history_file" +ext_rettype(#10437, #10003) +#10438 = @"C_builtin_function_or_method$readline.get_history_item" +ext_rettype(#10438, #10024) +ext_rettype(#10438, #10003) +#10439 = @"C_builtin_function_or_method$readline.get_current_history_length" +ext_rettype(#10439, #10005) +#10440 = @"C_builtin_function_or_method$readline.set_history_length" +ext_rettype(#10440, #10003) +#10441 = @"C_builtin_function_or_method$readline.get_history_length" +ext_rettype(#10441, #10005) +#10442 = @"C_builtin_function_or_method$readline.set_completer" +ext_rettype(#10442, #10003) +#10443 = @"C_builtin_function_or_method$readline.get_completer" +ext_rettype(#10443, #10003) +#10444 = @"C_builtin_function_or_method$readline.get_completion_type" +ext_rettype(#10444, #10005) +#10445 = @"C_builtin_function_or_method$readline.set_completer_delims" +ext_rettype(#10445, #10003) +#10446 = @"C_builtin_function_or_method$readline.add_history" +ext_rettype(#10446, #10003) +#10447 = @"C_builtin_function_or_method$readline.remove_history_item" +ext_rettype(#10447, #10003) +#10448 = @"C_builtin_function_or_method$readline.replace_history_item" +ext_rettype(#10448, #10003) +#10449 = @"C_builtin_function_or_method$readline.get_completer_delims" +ext_rettype(#10449, #10024) +#10450 = @"C_builtin_function_or_method$readline.set_completion_display_matches_hook" +ext_rettype(#10450, #10003) +#10451 = @"C_builtin_function_or_method$readline.set_startup_hook" +ext_rettype(#10451, #10003) +#10452 = @"C_builtin_function_or_method$readline.set_pre_input_hook" +ext_rettype(#10452, #10003) +#10453 = @"C_builtin_function_or_method$readline.clear_history" +ext_rettype(#10453, #10003) +#10454 = @"C_builtin_function_or_method$_testcapi.test_config" +ext_rettype(#10454, #10003) +#10455 = @"C_builtin_function_or_method$_testcapi.test_datetime_capi" +ext_rettype(#10455, #10003) +#10456 = @"C_builtin_function_or_method$_testcapi.test_list_api" +ext_rettype(#10456, #10003) +#10457 = @"C_builtin_function_or_method$_testcapi.test_dict_iteration" +ext_rettype(#10457, #10003) +#10458 = @"C_builtin_function_or_method$_testcapi.test_lazy_hash_inheritance" +ext_rettype(#10458, #10003) +#10459 = @"C_builtin_function_or_method$_testcapi.test_broken_memoryview" +ext_rettype(#10459, #10003) +#10460 = @"C_builtin_function_or_method$_testcapi.test_long_api" +ext_rettype(#10460, #10003) +#10461 = @"C_builtin_function_or_method$_testcapi.test_long_and_overflow" +ext_rettype(#10461, #10003) +#10462 = @"C_builtin_function_or_method$_testcapi.test_long_numbits" +ext_rettype(#10462, #10003) +#10463 = @"C_builtin_function_or_method$_testcapi.test_k_code" +ext_rettype(#10463, #10003) +#10464 = @"C_builtin_function_or_method$_testcapi.test_empty_argparse" +ext_rettype(#10464, #10003) +#10465 = @"C_builtin_function_or_method$_testcapi.test_null_strings" +ext_rettype(#10465, #10001) +#10466 = @"C_builtin_function_or_method$_testcapi.test_string_from_format" +ext_rettype(#10466, #10003) +#10467 = @"C_builtin_function_or_method$_testcapi.test_with_docstring" +ext_rettype(#10467, #10003) +#10468 = @"C_builtin_function_or_method$_testcapi.getargs_tuple" +ext_rettype(#10468, #10001) +#10469 = @"C_builtin_function_or_method$_testcapi.getargs_keywords" +ext_rettype(#10469, #10001) +#10470 = @"C_builtin_function_or_method$_testcapi.getargs_b" +ext_rettype(#10470, #10005) +#10471 = @"C_builtin_function_or_method$_testcapi.getargs_B" +ext_rettype(#10471, #10005) +#10472 = @"C_builtin_function_or_method$_testcapi.getargs_h" +ext_rettype(#10472, #10005) +#10473 = @"C_builtin_function_or_method$_testcapi.getargs_H" +ext_rettype(#10473, #10005) +#10474 = @"C_builtin_function_or_method$_testcapi.getargs_I" +ext_rettype(#10474, #10005) +#10475 = @"C_builtin_function_or_method$_testcapi.getargs_k" +ext_rettype(#10475, #10005) +#10476 = @"C_builtin_function_or_method$_testcapi.getargs_i" +ext_rettype(#10476, #10005) +#10477 = @"C_builtin_function_or_method$_testcapi.getargs_l" +ext_rettype(#10477, #10005) +#10478 = @"C_builtin_function_or_method$_testcapi.getargs_n" +ext_rettype(#10478, #10005) +#10479 = @"C_builtin_function_or_method$_testcapi.getargs_L" +ext_rettype(#10479, #10005) +#10480 = @"C_builtin_function_or_method$_testcapi.getargs_K" +ext_rettype(#10480, #10005) +#10481 = @"C_builtin_function_or_method$_testcapi.test_longlong_api" +ext_rettype(#10481, #10003) +#10482 = @"C_builtin_function_or_method$_testcapi.test_long_long_and_overflow" +ext_rettype(#10482, #10003) +#10483 = @"C_builtin_function_or_method$_testcapi.test_L_code" +ext_rettype(#10483, #10003) +#10484 = @"C_builtin_function_or_method$_testcapi.test_u_code" +ext_rettype(#10484, #10003) +#10485 = @"C_builtin_function_or_method$_testcapi.test_widechar" +ext_rettype(#10485, #10003) +#10486 = @"C_builtin_function_or_method$_testcapi._test_thread_state" +ext_rettype(#10486, #10003) +#10487 = @"C_builtin_function_or_method$_testcapi._pending_threadfunc" +ext_rettype(#10487, #10058) +#10488 = @"C_builtin_function_or_method$_testcapi.test_capsule" +ext_rettype(#10488, #10003) +#10489 = @"C_builtin_function_or_method$_testcapi.traceback_print" +ext_rettype(#10489, #10003) +#10490 = @"C_builtin_function_or_method$_testcapi.code_newempty" +ext_rettype(#10490, #10082) +#10491 = @"C_builtin_function_or_method$_testcapi.make_exception_with_doc" +#10492 = @"C_type$type" +ext_rettype(#10491, #10492) +#10493 = @"C_builtin_function_or_method$_testcapi.sequence_delitem" +ext_rettype(#10493, #10003) +#10494 = @"C_builtin_function_or_method$_testcapi.call_in_temporary_c_thread" +ext_rettype(#10494, #10003) +#10495 = @"C_builtin_function_or_method$select.select" +ext_rettype(#10495, #10001) +#10496 = @"C_builtin_function_or_method$select.poll" +#10497 = @"C_type$select.poll" +ext_rettype(#10496, #10497) +#10498 = @"C_builtin_function_or_method$spwd.getspall" +ext_rettype(#10498, #10021) +#10499 = @"C_builtin_function_or_method$_locale.setlocale" +ext_rettype(#10499, #10024) +#10500 = @"C_builtin_function_or_method$_locale.localeconv" +ext_rettype(#10500, #10007) +#10501 = @"C_builtin_function_or_method$_locale.strcoll" +ext_rettype(#10501, #10005) +#10502 = @"C_builtin_function_or_method$_locale.strxfrm" +ext_rettype(#10502, #10024) +#10503 = @"C_builtin_function_or_method$_locale.nl_langinfo" +ext_rettype(#10503, #10024) +#10504 = @"C_builtin_function_or_method$_locale.gettext" +ext_rettype(#10504, #10024) +#10505 = @"C_builtin_function_or_method$_locale.dgettext" +ext_rettype(#10505, #10024) +#10506 = @"C_builtin_function_or_method$_locale.dcgettext" +ext_rettype(#10506, #10024) +#10507 = @"C_builtin_function_or_method$_locale.textdomain" +ext_rettype(#10507, #10024) +#10508 = @"C_builtin_function_or_method$_locale.bindtextdomain" +ext_rettype(#10508, #10024) +#10509 = @"C_builtin_function_or_method$_locale.bind_textdomain_codeset" +ext_rettype(#10509, #10024) +ext_rettype(#10509, #10003) +#10510 = @"C_builtin_function_or_method$pyexpat.ParserCreate" +#10511 = @"C_type$pyexpat.xmlparser" +ext_rettype(#10510, #10511) +#10512 = @"C_builtin_function_or_method$pyexpat.ErrorString" +ext_rettype(#10512, #10024) +#10513 = @"C_builtin_function_or_method$future_builtins.hex" +ext_rettype(#10513, #10024) +#10514 = @"C_builtin_function_or_method$future_builtins.oct" +ext_rettype(#10514, #10024) +#10515 = @"C_builtin_function_or_method$future_builtins.ascii" +ext_rettype(#10515, #10024) +#10516 = @"C_builtin_function_or_method$cmath.acos" +#10517 = @"C_type$complex" +ext_rettype(#10516, #10517) +#10518 = @"C_builtin_function_or_method$cmath.acosh" +ext_rettype(#10518, #10517) +#10519 = @"C_builtin_function_or_method$cmath.asin" +ext_rettype(#10519, #10517) +#10520 = @"C_builtin_function_or_method$cmath.asinh" +ext_rettype(#10520, #10517) +#10521 = @"C_builtin_function_or_method$cmath.atan" +ext_rettype(#10521, #10517) +#10522 = @"C_builtin_function_or_method$cmath.atanh" +ext_rettype(#10522, #10517) +#10523 = @"C_builtin_function_or_method$cmath.cos" +ext_rettype(#10523, #10517) +#10524 = @"C_builtin_function_or_method$cmath.cosh" +ext_rettype(#10524, #10517) +#10525 = @"C_builtin_function_or_method$cmath.exp" +ext_rettype(#10525, #10517) +#10526 = @"C_builtin_function_or_method$cmath.isinf" +ext_rettype(#10526, #10058) +#10527 = @"C_builtin_function_or_method$cmath.isnan" +ext_rettype(#10527, #10058) +#10528 = @"C_builtin_function_or_method$cmath.log" +ext_rettype(#10528, #10517) +#10529 = @"C_builtin_function_or_method$cmath.log10" +ext_rettype(#10529, #10517) +#10530 = @"C_builtin_function_or_method$cmath.phase" +ext_rettype(#10530, #10038) +#10531 = @"C_builtin_function_or_method$cmath.polar" +ext_rettype(#10531, #10001) +#10532 = @"C_builtin_function_or_method$cmath.rect" +ext_rettype(#10532, #10517) +#10533 = @"C_builtin_function_or_method$cmath.sin" +ext_rettype(#10533, #10517) +#10534 = @"C_builtin_function_or_method$cmath.sinh" +ext_rettype(#10534, #10517) +#10535 = @"C_builtin_function_or_method$cmath.sqrt" +ext_rettype(#10535, #10517) +#10536 = @"C_builtin_function_or_method$cmath.tan" +ext_rettype(#10536, #10517) +#10537 = @"C_builtin_function_or_method$cmath.tanh" +ext_rettype(#10537, #10517) +#10538 = @"C_builtin_function_or_method$_weakref.getweakrefcount" +ext_rettype(#10538, #10005) +#10539 = @"C_builtin_function_or_method$_weakref.getweakrefs" +ext_rettype(#10539, #10021) +#10540 = @"C_builtin_function_or_method$_weakref.proxy" +#10541 = @"C_type$weakref" +ext_rettype(#10540, #10541) +#10542 = @"C_builtin_function_or_method$ossaudiodev.open" +#10543 = @"C_type$ossaudiodev.oss_audio_device" +ext_rettype(#10542, #10543) +#10544 = @"C_builtin_function_or_method$ossaudiodev.openmixer" +#10545 = @"C_type$ossaudiodev.oss_mixer_device" +ext_rettype(#10544, #10545) +#10546 = @"C_builtin_function_or_method$_ctypes.get_errno" +ext_rettype(#10546, #10005) +#10547 = @"C_builtin_function_or_method$_ctypes.set_errno" +ext_rettype(#10547, #10005) +#10548 = @"C_builtin_function_or_method$_ctypes._buffer_info" +ext_rettype(#10548, #10001) +#10549 = @"C_builtin_function_or_method$_ctypes.resize" +ext_rettype(#10549, #10003) +#10550 = @"C_builtin_function_or_method$_ctypes.set_conversion_mode" +ext_rettype(#10550, #10001) +#10551 = @"C_builtin_function_or_method$_ctypes.dlopen" +ext_rettype(#10551, #10005) +#10552 = @"C_builtin_function_or_method$_ctypes.dlclose" +ext_rettype(#10552, #10003) +#10553 = @"C_builtin_function_or_method$_ctypes.dlsym" +ext_rettype(#10553, #10005) +#10554 = @"C_builtin_function_or_method$_ctypes.alignment" +ext_rettype(#10554, #10005) +#10555 = @"C_builtin_function_or_method$_ctypes.sizeof" +ext_rettype(#10555, #10005) +#10556 = @"C_builtin_function_or_method$_ctypes.byref" +#10557 = @"C_type$CArgObject" +ext_rettype(#10556, #10557) +#10558 = @"C_builtin_function_or_method$_ctypes.addressof" +ext_rettype(#10558, #10005) +#10559 = @"C_builtin_function_or_method$_ctypes.call_function" +ext_rettype(#10559, #10005) +ext_rettype(#10559, #10003) +#10560 = @"C_builtin_function_or_method$_ctypes.call_cdeclfunction" +ext_rettype(#10560, #10005) +ext_rettype(#10560, #10003) +#10561 = @"C_builtin_function_or_method$_ctypes_test.func_si" +ext_rettype(#10561, #10003) +#10562 = @"C_builtin_function_or_method$_ctypes_test.func" +ext_rettype(#10562, #10003) +#10563 = @"C_builtin_function_or_method$fcntl.fcntl" +ext_rettype(#10563, #10005) +ext_rettype(#10563, #10024) +#10564 = @"C_builtin_function_or_method$fcntl.ioctl" +ext_rettype(#10564, #10005) +ext_rettype(#10564, #10024) +#10565 = @"C_builtin_function_or_method$fcntl.flock" +ext_rettype(#10565, #10003) +#10566 = @"C_builtin_function_or_method$fcntl.lockf" +ext_rettype(#10566, #10003) +#10567 = @"C_builtin_function_or_method$_json.scanstring" +ext_rettype(#10567, #10001) +#10568 = @"C_builtin_function_or_method$syslog.openlog" +ext_rettype(#10568, #10003) +#10569 = @"C_builtin_function_or_method$syslog.closelog" +ext_rettype(#10569, #10003) +#10570 = @"C_builtin_function_or_method$syslog.syslog" +ext_rettype(#10570, #10003) +#10571 = @"C_builtin_function_or_method$syslog.setlogmask" +ext_rettype(#10571, #10005) +#10572 = @"C_builtin_function_or_method$syslog.LOG_MASK" +ext_rettype(#10572, #10005) +#10573 = @"C_builtin_function_or_method$syslog.LOG_UPTO" +ext_rettype(#10573, #10005) +#10574 = @"C_builtin_function_or_method$_elementtree.Element" +#10575 = @"C_type$Element" +ext_rettype(#10574, #10575) +#10576 = @"C_builtin_function_or_method$_elementtree.SubElement" +ext_rettype(#10576, #10575) +#10577 = @"C_builtin_function_or_method$_elementtree.TreeBuilder" +#10578 = @"C_type$TreeBuilder" +ext_rettype(#10577, #10578) +#10579 = @"C_builtin_function_or_method$_elementtree.XMLParser" +#10580 = @"C_type$XMLParser" +ext_rettype(#10579, #10580) +#10581 = @"C_builtin_function_or_method$_elementtree.XMLTreeBuilder" +ext_rettype(#10581, #10580) +#10582 = @"C_builtin_function_or_method$_bisect.bisect_right" +ext_rettype(#10582, #10005) +#10583 = @"C_builtin_function_or_method$_bisect.bisect" +ext_rettype(#10583, #10005) +#10584 = @"C_builtin_function_or_method$_bisect.insort_right" +ext_rettype(#10584, #10003) +#10585 = @"C_builtin_function_or_method$_bisect.insort" +ext_rettype(#10585, #10003) +#10586 = @"C_builtin_function_or_method$_bisect.bisect_left" +ext_rettype(#10586, #10005) +#10587 = @"C_builtin_function_or_method$_bisect.insort_left" +ext_rettype(#10587, #10003) +#10588 = @"C_builtin_function_or_method$sys.callstats" +ext_rettype(#10588, #10003) +#10589 = @"C_builtin_function_or_method$sys._clear_type_cache" +ext_rettype(#10589, #10003) +#10590 = @"C_builtin_function_or_method$sys._current_frames" +ext_rettype(#10590, #10007) +#10591 = @"C_builtin_function_or_method$sys.displayhook" +ext_rettype(#10591, #10003) +#10592 = @"C_builtin_function_or_method$sys.exc_info" +ext_rettype(#10592, #10001) +#10593 = @"C_builtin_function_or_method$sys.exc_clear" +ext_rettype(#10593, #10003) +#10594 = @"C_builtin_function_or_method$sys.excepthook" +ext_rettype(#10594, #10003) +#10595 = @"C_builtin_function_or_method$sys.getdefaultencoding" +ext_rettype(#10595, #10024) +#10596 = @"C_builtin_function_or_method$sys.getdlopenflags" +ext_rettype(#10596, #10005) +#10597 = @"C_builtin_function_or_method$sys.getfilesystemencoding" +ext_rettype(#10597, #10024) +ext_rettype(#10597, #10003) +#10598 = @"C_builtin_function_or_method$sys.getrefcount" +ext_rettype(#10598, #10005) +#10599 = @"C_builtin_function_or_method$sys.getrecursionlimit" +ext_rettype(#10599, #10005) +#10600 = @"C_builtin_function_or_method$sys.getsizeof" +ext_rettype(#10600, #10005) +#10601 = @"C_builtin_function_or_method$sys._getframe" +#10602 = @"C_type$frame" +ext_rettype(#10601, #10602) +#10603 = @"C_builtin_function_or_method$sys.setdefaultencoding" +ext_rettype(#10603, #10003) +#10604 = @"C_builtin_function_or_method$sys.setcheckinterval" +ext_rettype(#10604, #10003) +#10605 = @"C_builtin_function_or_method$sys.getcheckinterval" +ext_rettype(#10605, #10005) +#10606 = @"C_builtin_function_or_method$sys.setdlopenflags" +ext_rettype(#10606, #10003) +#10607 = @"C_builtin_function_or_method$sys.setprofile" +ext_rettype(#10607, #10003) +#10608 = @"C_builtin_function_or_method$sys.getprofile" +ext_rettype(#10608, #10003) +#10609 = @"C_builtin_function_or_method$sys.setrecursionlimit" +ext_rettype(#10609, #10003) +#10610 = @"C_builtin_function_or_method$sys.settrace" +ext_rettype(#10610, #10003) +#10611 = @"C_builtin_function_or_method$sys.gettrace" +ext_rettype(#10611, #10003) +#10612 = @"C_builtin_function_or_method$_warnings.warn" +ext_rettype(#10612, #10003) +#10613 = @"C_builtin_function_or_method$_warnings.warn_explicit" +ext_rettype(#10613, #10003) +#10614 = @"C_builtin_function_or_method$marshal.dump" +ext_rettype(#10614, #10003) +#10615 = @"C_builtin_function_or_method$marshal.load" +ext_rettype(#10615, #10058) +ext_rettype(#10615, #10038) +ext_rettype(#10615, #10005) +ext_rettype(#10615, #10517) +ext_rettype(#10615, #10003) +#10616 = @"C_builtin_function_or_method$marshal.loads" +ext_rettype(#10616, #10058) +ext_rettype(#10616, #10038) +ext_rettype(#10616, #10005) +ext_rettype(#10616, #10517) +ext_rettype(#10616, #10003) +#10617 = @"C_builtin_function_or_method$imp.reload" +#10618 = @"C_type$module" +ext_rettype(#10617, #10618) +#10619 = @"C_builtin_function_or_method$imp.find_module" +ext_rettype(#10619, #10001) +#10620 = @"C_builtin_function_or_method$imp.get_magic" +ext_rettype(#10620, #10024) +#10621 = @"C_builtin_function_or_method$imp.get_suffixes" +ext_rettype(#10621, #10021) +#10622 = @"C_builtin_function_or_method$imp.load_module" +ext_rettype(#10622, #10618) +#10623 = @"C_builtin_function_or_method$imp.new_module" +ext_rettype(#10623, #10618) +#10624 = @"C_builtin_function_or_method$imp.lock_held" +ext_rettype(#10624, #10058) +#10625 = @"C_builtin_function_or_method$imp.acquire_lock" +ext_rettype(#10625, #10003) +#10626 = @"C_builtin_function_or_method$imp.release_lock" +ext_rettype(#10626, #10003) +#10627 = @"C_builtin_function_or_method$imp.get_frozen_object" +ext_rettype(#10627, #10058) +ext_rettype(#10627, #10038) +ext_rettype(#10627, #10005) +ext_rettype(#10627, #10517) +ext_rettype(#10627, #10003) +#10628 = @"C_builtin_function_or_method$imp.init_builtin" +ext_rettype(#10628, #10618) +ext_rettype(#10628, #10003) +#10629 = @"C_builtin_function_or_method$imp.init_frozen" +ext_rettype(#10629, #10618) +ext_rettype(#10629, #10003) +#10630 = @"C_builtin_function_or_method$imp.is_builtin" +ext_rettype(#10630, #10005) +#10631 = @"C_builtin_function_or_method$imp.is_frozen" +ext_rettype(#10631, #10058) +#10632 = @"C_builtin_function_or_method$imp.load_dynamic" +ext_rettype(#10632, #10618) +#10633 = @"C_builtin_function_or_method$imp.load_package" +ext_rettype(#10633, #10618) +#10634 = @"C_builtin_function_or_method$builtins.__import__" +ext_rettype(#10634, #10618) +ext_rettype(#10634, #10003) +#10635 = @"C_builtin_function_or_method$builtins.all" +ext_rettype(#10635, #10058) +#10636 = @"C_builtin_function_or_method$builtins.any" +ext_rettype(#10636, #10058) +#10637 = @"C_builtin_function_or_method$builtins.bin" +ext_rettype(#10637, #10024) +#10638 = @"C_builtin_function_or_method$builtins.callable" +ext_rettype(#10638, #10058) +#10639 = @"C_builtin_function_or_method$builtins.chr" +ext_rettype(#10639, #10024) +#10640 = @"C_builtin_function_or_method$builtins.cmp" +ext_rettype(#10640, #10005) +#10641 = @"C_builtin_function_or_method$builtins.coerce" +ext_rettype(#10641, #10001) +#10642 = @"C_builtin_function_or_method$builtins.compile" +ext_rettype(#10642, #10082) +ext_rettype(#10642, #10003) +#10643 = @"C_builtin_function_or_method$builtins.delattr" +ext_rettype(#10643, #10003) +#10644 = @"C_builtin_function_or_method$builtins.dir" +ext_rettype(#10644, #10021) +#10645 = @"C_builtin_function_or_method$builtins.filter" +ext_rettype(#10645, #10021) +ext_rettype(#10645, #10001) +#10646 = @"C_builtin_function_or_method$builtins.format" +ext_rettype(#10646, #10024) +ext_rettype(#10646, #10218) +#10647 = @"C_builtin_function_or_method$builtins.globals" +ext_rettype(#10647, #10007) +#10648 = @"C_builtin_function_or_method$builtins.hasattr" +ext_rettype(#10648, #10058) +#10649 = @"C_builtin_function_or_method$builtins.hash" +ext_rettype(#10649, #10005) +#10650 = @"C_builtin_function_or_method$builtins.id" +ext_rettype(#10650, #10005) +#10651 = @"C_builtin_function_or_method$builtins.input" +ext_rettype(#10651, #10024) +#10652 = @"C_builtin_function_or_method$builtins.isinstance" +ext_rettype(#10652, #10058) +#10653 = @"C_builtin_function_or_method$builtins.issubclass" +ext_rettype(#10653, #10058) +#10654 = @"C_builtin_function_or_method$builtins.iter" +#10655 = @"C_type$iterator" +ext_rettype(#10654, #10655) +#10656 = @"C_type$callable-iterator" +ext_rettype(#10654, #10656) +#10657 = @"C_builtin_function_or_method$builtins.len" +ext_rettype(#10657, #10005) +#10658 = @"C_builtin_function_or_method$builtins.locals" +ext_rettype(#10658, #10007) +#10659 = @"C_builtin_function_or_method$builtins.map" +ext_rettype(#10659, #10021) +#10660 = @"C_builtin_function_or_method$builtins.open" +ext_rettype(#10660, #10250) +#10661 = @"C_builtin_function_or_method$builtins.ord" +ext_rettype(#10661, #10005) +#10662 = @"C_builtin_function_or_method$builtins.print" +ext_rettype(#10662, #10003) +#10663 = @"C_builtin_function_or_method$builtins.range" +ext_rettype(#10663, #10021) +#10664 = @"C_builtin_function_or_method$builtins.raw_input" +ext_rettype(#10664, #10024) +#10665 = @"C_builtin_function_or_method$builtins.reload" +ext_rettype(#10665, #10618) +#10666 = @"C_builtin_function_or_method$builtins.repr" +ext_rettype(#10666, #10024) +#10667 = @"C_builtin_function_or_method$builtins.round" +ext_rettype(#10667, #10038) +#10668 = @"C_builtin_function_or_method$builtins.setattr" +ext_rettype(#10668, #10003) +#10669 = @"C_builtin_function_or_method$builtins.sorted" +ext_rettype(#10669, #10021) +#10670 = @"C_builtin_function_or_method$builtins.sum" +ext_rettype(#10670, #10038) +ext_rettype(#10670, #10005) +#10671 = @"C_builtin_function_or_method$builtins.unichr" +ext_rettype(#10671, #10218) +#10672 = @"C_builtin_function_or_method$builtins.vars" +ext_rettype(#10672, #10007) +#10673 = @"C_builtin_function_or_method$builtins.zip" +ext_rettype(#10673, #10021) +#10674 = @"C_type$_multiprocessing.SemLock$acquire" +ext_rettype(#10674, #10058) +#10675 = @"C_type$_multiprocessing.SemLock$release" +ext_rettype(#10675, #10003) +#10676 = @"C_type$_multiprocessing.SemLock$__enter__" +ext_rettype(#10676, #10058) +#10677 = @"C_type$_multiprocessing.SemLock$__exit__" +ext_rettype(#10677, #10003) +#10678 = @"C_type$_multiprocessing.SemLock$_count" +ext_rettype(#10678, #10005) +#10679 = @"C_type$_multiprocessing.SemLock$_is_mine" +ext_rettype(#10679, #10058) +#10680 = @"C_type$_multiprocessing.SemLock$_get_value" +ext_rettype(#10680, #10005) +#10681 = @"C_type$_multiprocessing.SemLock$_is_zero" +ext_rettype(#10681, #10058) +#10682 = @"C_type$_multiprocessing.SemLock$_after_fork" +ext_rettype(#10682, #10003) +#10683 = @"C_type$_multiprocessing.Connection$send_bytes" +ext_rettype(#10683, #10003) +#10684 = @"C_type$_multiprocessing.Connection$recv_bytes" +ext_rettype(#10684, #10024) +#10685 = @"C_type$_multiprocessing.Connection$recv_bytes_into" +ext_rettype(#10685, #10005) +#10686 = @"C_type$_multiprocessing.Connection$send" +ext_rettype(#10686, #10003) +#10687 = @"C_type$_multiprocessing.Connection$poll" +ext_rettype(#10687, #10058) +#10688 = @"C_type$_multiprocessing.Connection$fileno" +ext_rettype(#10688, #10005) +#10689 = @"C_type$_multiprocessing.Connection$close" +ext_rettype(#10689, #10003) +#10690 = @"C_type$_ssl._SSLContext$_wrap_socket" +#10691 = @"C_type$_ssl._SSLSocket" +ext_rettype(#10690, #10691) +#10692 = @"C_type$_ssl._SSLContext$set_ciphers" +ext_rettype(#10692, #10003) +#10693 = @"C_type$_ssl._SSLContext$_set_npn_protocols" +ext_rettype(#10693, #10003) +#10694 = @"C_type$_ssl._SSLContext$load_cert_chain" +ext_rettype(#10694, #10003) +#10695 = @"C_type$_ssl._SSLContext$load_dh_params" +ext_rettype(#10695, #10003) +#10696 = @"C_type$_ssl._SSLContext$load_verify_locations" +ext_rettype(#10696, #10003) +#10697 = @"C_type$_ssl._SSLContext$session_stats" +ext_rettype(#10697, #10007) +#10698 = @"C_type$_ssl._SSLContext$set_default_verify_paths" +ext_rettype(#10698, #10003) +#10699 = @"C_type$_ssl._SSLContext$set_ecdh_curve" +ext_rettype(#10699, #10003) +#10700 = @"C_type$_ssl._SSLContext$set_servername_callback" +ext_rettype(#10700, #10003) +#10701 = @"C_type$_ssl._SSLContext$cert_store_stats" +ext_rettype(#10701, #10007) +#10702 = @"C_type$_ssl._SSLContext$get_ca_certs" +ext_rettype(#10702, #10021) +#10703 = @"C_type$_ssl._SSLSocket$do_handshake" +ext_rettype(#10703, #10003) +#10704 = @"C_type$_ssl._SSLSocket$write" +ext_rettype(#10704, #10005) +#10705 = @"C_type$_ssl._SSLSocket$read" +ext_rettype(#10705, #10005) +#10706 = @"C_type$_ssl._SSLSocket$pending" +ext_rettype(#10706, #10005) +#10707 = @"C_type$_ssl._SSLSocket$peer_certificate" +ext_rettype(#10707, #10007) +ext_rettype(#10707, #10024) +ext_rettype(#10707, #10003) +#10708 = @"C_type$_ssl._SSLSocket$cipher" +ext_rettype(#10708, #10001) +ext_rettype(#10708, #10003) +#10709 = @"C_type$_ssl._SSLSocket$version" +ext_rettype(#10709, #10218) +ext_rettype(#10709, #10003) +#10710 = @"C_type$_ssl._SSLSocket$selected_npn_protocol" +ext_rettype(#10710, #10218) +ext_rettype(#10710, #10003) +#10711 = @"C_type$_ssl._SSLSocket$compression" +ext_rettype(#10711, #10024) +ext_rettype(#10711, #10003) +#10712 = @"C_type$_ssl._SSLSocket$shutdown" +ext_rettype(#10712, #10102) +#10713 = @"C_type$_ssl._SSLSocket$tls_unique_cb" +ext_rettype(#10713, #10024) +ext_rettype(#10713, #10003) +#10714 = @"C_type$_sre.SRE_Match$group" +ext_rettype(#10714, #10001) +#10715 = @"C_type$_sre.SRE_Match$start" +ext_rettype(#10715, #10005) +#10716 = @"C_type$_sre.SRE_Match$end" +ext_rettype(#10716, #10005) +#10717 = @"C_type$_sre.SRE_Match$span" +ext_rettype(#10717, #10001) +#10718 = @"C_type$_sre.SRE_Match$groups" +ext_rettype(#10718, #10001) +#10719 = @"C_type$_sre.SRE_Match$groupdict" +ext_rettype(#10719, #10007) +#10720 = @"C_type$_sre.SRE_Scanner$match" +ext_rettype(#10720, #10003) +#10721 = @"C_type$_sre.SRE_Scanner$search" +ext_rettype(#10721, #10003) +#10722 = @"C_type$_sre.SRE_Pattern$match" +ext_rettype(#10722, #10003) +#10723 = @"C_type$_sre.SRE_Pattern$search" +ext_rettype(#10723, #10003) +#10724 = @"C_type$_sre.SRE_Pattern$sub" +ext_rettype(#10724, #10001) +#10725 = @"C_type$_sre.SRE_Pattern$subn" +ext_rettype(#10725, #10001) +#10726 = @"C_type$_sre.SRE_Pattern$split" +ext_rettype(#10726, #10021) +#10727 = @"C_type$_sre.SRE_Pattern$findall" +ext_rettype(#10727, #10021) +#10728 = @"C_type$_sre.SRE_Pattern$finditer" +ext_rettype(#10728, #10656) +#10729 = @"C_type$linuxaudiodev.linux_audio_device$write" +ext_rettype(#10729, #10003) +#10730 = @"C_type$linuxaudiodev.linux_audio_device$setparameters" +ext_rettype(#10730, #10003) +#10731 = @"C_type$linuxaudiodev.linux_audio_device$bufsize" +ext_rettype(#10731, #10005) +#10732 = @"C_type$linuxaudiodev.linux_audio_device$obufcount" +ext_rettype(#10732, #10005) +#10733 = @"C_type$linuxaudiodev.linux_audio_device$obuffree" +ext_rettype(#10733, #10005) +#10734 = @"C_type$linuxaudiodev.linux_audio_device$flush" +ext_rettype(#10734, #10003) +#10735 = @"C_type$linuxaudiodev.linux_audio_device$close" +ext_rettype(#10735, #10003) +#10736 = @"C_type$linuxaudiodev.linux_audio_device$fileno" +ext_rettype(#10736, #10005) +#10737 = @"C_type$linuxaudiodev.linux_audio_device$getptr" +ext_rettype(#10737, #10001) +#10738 = @"C_type$MultibyteCodec$2encode" +ext_rettype(#10738, #10001) +#10739 = @"C_type$MultibyteCodec$2decode" +ext_rettype(#10739, #10001) +#10740 = @"C_type$MultibyteIncrementalEncoder$2encode" +ext_rettype(#10740, #10024) +#10741 = @"C_type$MultibyteIncrementalEncoder$2reset" +ext_rettype(#10741, #10003) +#10742 = @"C_type$MultibyteIncrementalDecoder$2reset" +ext_rettype(#10742, #10003) +#10743 = @"C_type$MultibyteStreamReader$2read" +ext_rettype(#10743, #10218) +#10744 = @"C_type$MultibyteStreamReader$2readline" +ext_rettype(#10744, #10218) +#10745 = @"C_type$MultibyteStreamReader$2readlines" +ext_rettype(#10745, #10021) +#10746 = @"C_type$MultibyteStreamReader$2reset" +ext_rettype(#10746, #10003) +#10747 = @"C_type$MultibyteStreamWriter$2write" +ext_rettype(#10747, #10003) +#10748 = @"C_type$MultibyteStreamWriter$2writelines" +ext_rettype(#10748, #10003) +#10749 = @"C_type$MultibyteStreamWriter$2reset" +ext_rettype(#10749, #10003) +#10750 = @"C_type$deque_iterator$2__length_hint__" +ext_rettype(#10750, #10005) +#10751 = @"C_type$deque_reverse_iterator$2__length_hint__" +ext_rettype(#10751, #10005) +#10752 = @"C_type$collections.deque$append" +ext_rettype(#10752, #10003) +#10753 = @"C_type$collections.deque$appendleft" +ext_rettype(#10753, #10003) +#10754 = @"C_type$collections.deque$clear" +ext_rettype(#10754, #10003) +#10755 = @"C_type$collections.deque$count" +ext_rettype(#10755, #10005) +#10756 = @"C_type$collections.deque$extend" +ext_rettype(#10756, #10003) +#10757 = @"C_type$collections.deque$extendleft" +ext_rettype(#10757, #10003) +#10758 = @"C_type$collections.deque$__reduce__" +ext_rettype(#10758, #10001) +#10759 = @"C_type$collections.deque$remove" +ext_rettype(#10759, #10003) +#10760 = @"C_type$collections.deque$__reversed__" +#10761 = @"C_type$deque_reverse_iterator" +ext_rettype(#10760, #10761) +#10762 = @"C_type$collections.deque$reverse" +ext_rettype(#10762, #10003) +#10763 = @"C_type$collections.deque$rotate" +ext_rettype(#10763, #10003) +#10764 = @"C_type$collections.deque$__sizeof__" +ext_rettype(#10764, #10005) +#10765 = @"C_type$collections.defaultdict$__reduce__" +ext_rettype(#10765, #10001) +#10766 = @"C_type$parser.st$compile" +ext_rettype(#10766, #10082) +#10767 = @"C_type$parser.st$tolist" +ext_rettype(#10767, #10003) +#10768 = @"C_type$parser.st$totuple" +ext_rettype(#10768, #10003) +#10769 = @"C_type$parser.st$__sizeof__" +ext_rettype(#10769, #10005) +#10770 = @"C_type$_socket.socket$accept" +ext_rettype(#10770, #10001) +#10771 = @"C_type$_socket.socket$bind" +ext_rettype(#10771, #10003) +#10772 = @"C_type$_socket.socket$close" +ext_rettype(#10772, #10003) +#10773 = @"C_type$_socket.socket$connect" +ext_rettype(#10773, #10003) +#10774 = @"C_type$_socket.socket$connect_ex" +ext_rettype(#10774, #10005) +#10775 = @"C_type$_socket.socket$dup" +ext_rettype(#10775, #10102) +#10776 = @"C_type$_socket.socket$fileno" +ext_rettype(#10776, #10005) +#10777 = @"C_type$_socket.socket$getpeername" +ext_rettype(#10777, #10001) +ext_rettype(#10777, #10024) +ext_rettype(#10777, #10003) +#10778 = @"C_type$_socket.socket$getsockname" +ext_rettype(#10778, #10001) +ext_rettype(#10778, #10024) +ext_rettype(#10778, #10003) +#10779 = @"C_type$_socket.socket$getsockopt" +ext_rettype(#10779, #10005) +#10780 = @"C_type$_socket.socket$listen" +ext_rettype(#10780, #10003) +#10781 = @"C_type$_socket.socket$makefile" +ext_rettype(#10781, #10250) +#10782 = @"C_type$_socket.socket$recv_into" +ext_rettype(#10782, #10005) +#10783 = @"C_type$_socket.socket$recvfrom" +ext_rettype(#10783, #10001) +#10784 = @"C_type$_socket.socket$recvfrom_into" +ext_rettype(#10784, #10001) +#10785 = @"C_type$_socket.socket$send" +ext_rettype(#10785, #10005) +#10786 = @"C_type$_socket.socket$sendall" +ext_rettype(#10786, #10003) +#10787 = @"C_type$_socket.socket$sendto" +ext_rettype(#10787, #10005) +#10788 = @"C_type$_socket.socket$setblocking" +ext_rettype(#10788, #10003) +#10789 = @"C_type$_socket.socket$settimeout" +ext_rettype(#10789, #10003) +#10790 = @"C_type$_socket.socket$gettimeout" +ext_rettype(#10790, #10038) +ext_rettype(#10790, #10003) +#10791 = @"C_type$_socket.socket$setsockopt" +ext_rettype(#10791, #10003) +#10792 = @"C_type$_socket.socket$shutdown" +ext_rettype(#10792, #10003) +#10793 = @"C_type$itertools.tee$__copy__" +#10794 = @"C_type$itertools.tee" +ext_rettype(#10793, #10794) +#10795 = @"C_type$itertools.count$__reduce__" +ext_rettype(#10795, #10001) +#10796 = @"C_type$itertools.repeat$__length_hint__" +ext_rettype(#10796, #10005) +#10797 = @"C_type$_csv.writer$writerows" +ext_rettype(#10797, #10003) +#10798 = @"C_type$array.array$append" +ext_rettype(#10798, #10003) +#10799 = @"C_type$array.array$buffer_info" +ext_rettype(#10799, #10001) +#10800 = @"C_type$array.array$byteswap" +ext_rettype(#10800, #10003) +#10801 = @"C_type$array.array$count" +ext_rettype(#10801, #10005) +#10802 = @"C_type$array.array$extend" +ext_rettype(#10802, #10003) +#10803 = @"C_type$array.array$fromfile" +ext_rettype(#10803, #10003) +#10804 = @"C_type$array.array$fromlist" +ext_rettype(#10804, #10003) +#10805 = @"C_type$array.array$fromstring" +ext_rettype(#10805, #10003) +#10806 = @"C_type$array.array$fromunicode" +ext_rettype(#10806, #10003) +#10807 = @"C_type$array.array$index" +ext_rettype(#10807, #10005) +#10808 = @"C_type$array.array$insert" +ext_rettype(#10808, #10003) +#10809 = @"C_type$array.array$read" +ext_rettype(#10809, #10003) +#10810 = @"C_type$array.array$__reduce__" +ext_rettype(#10810, #10001) +#10811 = @"C_type$array.array$remove" +ext_rettype(#10811, #10003) +#10812 = @"C_type$array.array$reverse" +ext_rettype(#10812, #10003) +#10813 = @"C_type$array.array$tofile" +ext_rettype(#10813, #10003) +#10814 = @"C_type$array.array$tolist" +ext_rettype(#10814, #10021) +#10815 = @"C_type$array.array$tostring" +ext_rettype(#10815, #10024) +#10816 = @"C_type$array.array$tounicode" +ext_rettype(#10816, #10218) +#10817 = @"C_type$array.array$write" +ext_rettype(#10817, #10003) +#10818 = @"C_type$array.array$__sizeof__" +ext_rettype(#10818, #10005) +#10819 = @"C_type$mmap.mmap$close" +ext_rettype(#10819, #10003) +#10820 = @"C_type$mmap.mmap$find" +ext_rettype(#10820, #10005) +#10821 = @"C_type$mmap.mmap$rfind" +ext_rettype(#10821, #10005) +#10822 = @"C_type$mmap.mmap$flush" +ext_rettype(#10822, #10005) +#10823 = @"C_type$mmap.mmap$move" +ext_rettype(#10823, #10003) +#10824 = @"C_type$mmap.mmap$read" +ext_rettype(#10824, #10024) +#10825 = @"C_type$mmap.mmap$read_byte" +ext_rettype(#10825, #10024) +#10826 = @"C_type$mmap.mmap$readline" +ext_rettype(#10826, #10024) +#10827 = @"C_type$mmap.mmap$resize" +ext_rettype(#10827, #10003) +#10828 = @"C_type$mmap.mmap$seek" +ext_rettype(#10828, #10003) +#10829 = @"C_type$mmap.mmap$size" +ext_rettype(#10829, #10005) +#10830 = @"C_type$mmap.mmap$tell" +ext_rettype(#10830, #10005) +#10831 = @"C_type$mmap.mmap$write" +ext_rettype(#10831, #10003) +#10832 = @"C_type$mmap.mmap$write_byte" +ext_rettype(#10832, #10003) +#10833 = @"C_type$_hotshot.ProfilerType$addinfo" +ext_rettype(#10833, #10003) +#10834 = @"C_type$_hotshot.ProfilerType$close" +ext_rettype(#10834, #10003) +#10835 = @"C_type$_hotshot.ProfilerType$fileno" +ext_rettype(#10835, #10005) +#10836 = @"C_type$_hotshot.ProfilerType$start" +ext_rettype(#10836, #10003) +#10837 = @"C_type$_hotshot.ProfilerType$stop" +ext_rettype(#10837, #10003) +#10838 = @"C_type$_hotshot.LogReaderType$close" +ext_rettype(#10838, #10003) +#10839 = @"C_type$_hotshot.LogReaderType$fileno" +ext_rettype(#10839, #10005) +#10840 = @"C_type$cStringIO.StringO$flush" +ext_rettype(#10840, #10003) +#10841 = @"C_type$cStringIO.StringO$getvalue" +ext_rettype(#10841, #10024) +#10842 = @"C_type$cStringIO.StringO$isatty" +ext_rettype(#10842, #10058) +#10843 = @"C_type$cStringIO.StringO$read" +ext_rettype(#10843, #10024) +#10844 = @"C_type$cStringIO.StringO$readline" +ext_rettype(#10844, #10024) +#10845 = @"C_type$cStringIO.StringO$readlines" +ext_rettype(#10845, #10021) +#10846 = @"C_type$cStringIO.StringO$reset" +ext_rettype(#10846, #10003) +#10847 = @"C_type$cStringIO.StringO$seek" +ext_rettype(#10847, #10003) +#10848 = @"C_type$cStringIO.StringO$tell" +ext_rettype(#10848, #10005) +#10849 = @"C_type$cStringIO.StringO$truncate" +ext_rettype(#10849, #10003) +#10850 = @"C_type$cStringIO.StringO$close" +ext_rettype(#10850, #10003) +#10851 = @"C_type$cStringIO.StringO$write" +ext_rettype(#10851, #10003) +#10852 = @"C_type$cStringIO.StringO$writelines" +ext_rettype(#10852, #10003) +#10853 = @"C_type$cStringIO.StringI$flush" +ext_rettype(#10853, #10003) +#10854 = @"C_type$cStringIO.StringI$getvalue" +ext_rettype(#10854, #10024) +#10855 = @"C_type$cStringIO.StringI$isatty" +ext_rettype(#10855, #10058) +#10856 = @"C_type$cStringIO.StringI$read" +ext_rettype(#10856, #10024) +#10857 = @"C_type$cStringIO.StringI$readline" +ext_rettype(#10857, #10024) +#10858 = @"C_type$cStringIO.StringI$readlines" +ext_rettype(#10858, #10021) +#10859 = @"C_type$cStringIO.StringI$reset" +ext_rettype(#10859, #10003) +#10860 = @"C_type$cStringIO.StringI$seek" +ext_rettype(#10860, #10003) +#10861 = @"C_type$cStringIO.StringI$tell" +ext_rettype(#10861, #10005) +#10862 = @"C_type$cStringIO.StringI$truncate" +ext_rettype(#10862, #10003) +#10863 = @"C_type$cStringIO.StringI$close" +ext_rettype(#10863, #10003) +#10864 = @"C_type$Struct$2pack" +ext_rettype(#10864, #10024) +#10865 = @"C_type$Struct$2pack_into" +ext_rettype(#10865, #10003) +#10866 = @"C_type$Struct$2unpack" +ext_rettype(#10866, #10001) +#10867 = @"C_type$Struct$2unpack_from" +ext_rettype(#10867, #10001) +#10868 = @"C_type$Struct$2__sizeof__" +ext_rettype(#10868, #10005) +#10869 = @"C_type$cPickle.Pickler$dump" +ext_rettype(#10869, #10024) +#10870 = @"C_type$cPickle.Pickler$clear_memo" +ext_rettype(#10870, #10003) +#10871 = @"C_type$cPickle.Pickler$getvalue" +ext_rettype(#10871, #10024) +#10872 = @"C_type$zipimport.zipimporter$find_module" +ext_rettype(#10872, #10003) +#10873 = @"C_type$zipimport.zipimporter$get_data" +ext_rettype(#10873, #10024) +#10874 = @"C_type$zipimport.zipimporter$get_code" +ext_rettype(#10874, #10058) +ext_rettype(#10874, #10038) +ext_rettype(#10874, #10082) +ext_rettype(#10874, #10005) +ext_rettype(#10874, #10517) +ext_rettype(#10874, #10003) +#10875 = @"C_type$zipimport.zipimporter$get_source" +ext_rettype(#10875, #10024) +ext_rettype(#10875, #10003) +#10876 = @"C_type$zipimport.zipimporter$get_filename" +ext_rettype(#10876, #10024) +#10877 = @"C_type$zipimport.zipimporter$is_package" +ext_rettype(#10877, #10058) +#10878 = @"C_type$unicodedata.UCD$decimal" +ext_rettype(#10878, #10005) +#10879 = @"C_type$unicodedata.UCD$digit" +ext_rettype(#10879, #10005) +#10880 = @"C_type$unicodedata.UCD$numeric" +ext_rettype(#10880, #10038) +#10881 = @"C_type$unicodedata.UCD$category" +ext_rettype(#10881, #10024) +#10882 = @"C_type$unicodedata.UCD$bidirectional" +ext_rettype(#10882, #10024) +#10883 = @"C_type$unicodedata.UCD$combining" +ext_rettype(#10883, #10005) +#10884 = @"C_type$unicodedata.UCD$mirrored" +ext_rettype(#10884, #10005) +#10885 = @"C_type$unicodedata.UCD$east_asian_width" +ext_rettype(#10885, #10024) +#10886 = @"C_type$unicodedata.UCD$decomposition" +ext_rettype(#10886, #10024) +#10887 = @"C_type$unicodedata.UCD$name" +ext_rettype(#10887, #10024) +#10888 = @"C_type$unicodedata.UCD$lookup" +ext_rettype(#10888, #10218) +#10889 = @"C_type$xxsubtype.spamlist$getstate" +ext_rettype(#10889, #10005) +#10890 = @"C_type$xxsubtype.spamlist$setstate" +ext_rettype(#10890, #10003) +#10891 = @"C_type$xxsubtype.spamlist$classmeth" +ext_rettype(#10891, #10001) +#10892 = @"C_type$xxsubtype.spamlist$staticmeth" +ext_rettype(#10892, #10001) +#10893 = @"C_type$xxsubtype.spamdict$getstate" +ext_rettype(#10893, #10005) +#10894 = @"C_type$xxsubtype.spamdict$setstate" +ext_rettype(#10894, #10003) +#10895 = @"C_type$_hashlib.HASH$update" +ext_rettype(#10895, #10003) +#10896 = @"C_type$_hashlib.HASH$digest" +ext_rettype(#10896, #10024) +#10897 = @"C_type$_hashlib.HASH$hexdigest" +ext_rettype(#10897, #10024) +#10898 = @"C_type$_hashlib.HASH$copy" +ext_rettype(#10898, #10370) +#10899 = @"C_type$zlib.Compress$flush" +ext_rettype(#10899, #10024) +#10900 = @"C_type$_random.Random$random" +ext_rettype(#10900, #10038) +#10901 = @"C_type$_random.Random$seed" +ext_rettype(#10901, #10003) +#10902 = @"C_type$_random.Random$getstate" +ext_rettype(#10902, #10001) +#10903 = @"C_type$_random.Random$setstate" +ext_rettype(#10903, #10003) +#10904 = @"C_type$_random.Random$jumpahead" +ext_rettype(#10904, #10003) +#10905 = @"C_type$_random.Random$getrandbits" +ext_rettype(#10905, #10005) +#10906 = @"C_type$thread.lock$acquire_lock" +ext_rettype(#10906, #10058) +#10907 = @"C_type$thread.lock$acquire" +ext_rettype(#10907, #10058) +#10908 = @"C_type$thread.lock$release_lock" +ext_rettype(#10908, #10003) +#10909 = @"C_type$thread.lock$release" +ext_rettype(#10909, #10003) +#10910 = @"C_type$thread.lock$locked_lock" +ext_rettype(#10910, #10058) +#10911 = @"C_type$thread.lock$locked" +ext_rettype(#10911, #10058) +#10912 = @"C_type$thread.lock$__enter__" +ext_rettype(#10912, #10058) +#10913 = @"C_type$thread.lock$__exit__" +ext_rettype(#10913, #10003) +#10914 = @"C_type$bz2.BZ2File$readline" +ext_rettype(#10914, #10024) +#10915 = @"C_type$bz2.BZ2File$readlines" +ext_rettype(#10915, #10021) +#10916 = @"C_type$bz2.BZ2File$write" +ext_rettype(#10916, #10003) +#10917 = @"C_type$bz2.BZ2File$writelines" +ext_rettype(#10917, #10003) +#10918 = @"C_type$bz2.BZ2File$seek" +ext_rettype(#10918, #10003) +#10919 = @"C_type$bz2.BZ2File$tell" +ext_rettype(#10919, #10005) +#10920 = @"C_type$bz2.BZ2File$close" +ext_rettype(#10920, #10003) +#10921 = @"C_type$bz2.BZ2File$__exit__" +ext_rettype(#10921, #10003) +#10922 = @"C_type$bz2.BZ2Compressor$compress" +ext_rettype(#10922, #10024) +#10923 = @"C_type$select.poll$register" +ext_rettype(#10923, #10003) +#10924 = @"C_type$select.poll$modify" +ext_rettype(#10924, #10003) +#10925 = @"C_type$select.poll$unregister" +ext_rettype(#10925, #10003) +#10926 = @"C_type$select.poll$poll" +ext_rettype(#10926, #10021) +#10927 = @"C_type$select.epoll$close" +ext_rettype(#10927, #10003) +#10928 = @"C_type$select.epoll$fileno" +ext_rettype(#10928, #10005) +#10929 = @"C_type$select.epoll$modify" +ext_rettype(#10929, #10003) +#10930 = @"C_type$select.epoll$register" +ext_rettype(#10930, #10003) +#10931 = @"C_type$select.epoll$unregister" +ext_rettype(#10931, #10003) +#10932 = @"C_type$select.epoll$poll" +ext_rettype(#10932, #10021) +#10933 = @"C_type$_io.BytesIO$readable" +ext_rettype(#10933, #10058) +#10934 = @"C_type$_io.BytesIO$seekable" +ext_rettype(#10934, #10058) +#10935 = @"C_type$_io.BytesIO$writable" +ext_rettype(#10935, #10058) +#10936 = @"C_type$_io.BytesIO$close" +ext_rettype(#10936, #10003) +#10937 = @"C_type$_io.BytesIO$flush" +ext_rettype(#10937, #10003) +#10938 = @"C_type$_io.BytesIO$isatty" +ext_rettype(#10938, #10058) +#10939 = @"C_type$_io.BytesIO$tell" +ext_rettype(#10939, #10005) +#10940 = @"C_type$_io.BytesIO$write" +ext_rettype(#10940, #10005) +#10941 = @"C_type$_io.BytesIO$writelines" +ext_rettype(#10941, #10003) +#10942 = @"C_type$_io.BytesIO$read1" +ext_rettype(#10942, #10024) +#10943 = @"C_type$_io.BytesIO$readinto" +ext_rettype(#10943, #10005) +#10944 = @"C_type$_io.BytesIO$readline" +ext_rettype(#10944, #10024) +#10945 = @"C_type$_io.BytesIO$readlines" +ext_rettype(#10945, #10021) +#10946 = @"C_type$_io.BytesIO$read" +ext_rettype(#10946, #10024) +#10947 = @"C_type$_io.BytesIO$getvalue" +ext_rettype(#10947, #10024) +#10948 = @"C_type$_io.BytesIO$seek" +ext_rettype(#10948, #10005) +#10949 = @"C_type$_io.BytesIO$truncate" +ext_rettype(#10949, #10005) +#10950 = @"C_type$_io.BytesIO$__getstate__" +ext_rettype(#10950, #10001) +#10951 = @"C_type$_io.BytesIO$__setstate__" +ext_rettype(#10951, #10003) +#10952 = @"C_type$_io.BytesIO$__sizeof__" +ext_rettype(#10952, #10005) +#10953 = @"C_type$_io._BufferedIOBase$readinto" +ext_rettype(#10953, #10005) +#10954 = @"C_type$_io.BufferedReader$close" +ext_rettype(#10954, #10003) +#10955 = @"C_type$_io.BufferedReader$read" +ext_rettype(#10955, #10024) +ext_rettype(#10955, #10218) +ext_rettype(#10955, #10003) +#10956 = @"C_type$_io.BufferedReader$peek" +ext_rettype(#10956, #10024) +ext_rettype(#10956, #10003) +#10957 = @"C_type$_io.BufferedReader$read1" +ext_rettype(#10957, #10024) +ext_rettype(#10957, #10003) +#10958 = @"C_type$_io.BufferedReader$readline" +ext_rettype(#10958, #10024) +ext_rettype(#10958, #10218) +#10959 = @"C_type$_io.BufferedReader$seek" +ext_rettype(#10959, #10005) +ext_rettype(#10959, #10003) +#10960 = @"C_type$_io.BufferedReader$tell" +ext_rettype(#10960, #10005) +#10961 = @"C_type$_io.BufferedReader$truncate" +ext_rettype(#10961, #10003) +#10962 = @"C_type$_io.BufferedReader$__sizeof__" +ext_rettype(#10962, #10005) +#10963 = @"C_type$_io.BufferedRandom$close" +ext_rettype(#10963, #10003) +#10964 = @"C_type$_io.BufferedRandom$flush" +ext_rettype(#10964, #10003) +#10965 = @"C_type$_io.BufferedRandom$seek" +ext_rettype(#10965, #10005) +ext_rettype(#10965, #10003) +#10966 = @"C_type$_io.BufferedRandom$tell" +ext_rettype(#10966, #10005) +#10967 = @"C_type$_io.BufferedRandom$truncate" +ext_rettype(#10967, #10003) +#10968 = @"C_type$_io.BufferedRandom$read" +ext_rettype(#10968, #10024) +ext_rettype(#10968, #10218) +ext_rettype(#10968, #10003) +#10969 = @"C_type$_io.BufferedRandom$read1" +ext_rettype(#10969, #10024) +ext_rettype(#10969, #10003) +#10970 = @"C_type$_io.BufferedRandom$readinto" +ext_rettype(#10970, #10005) +#10971 = @"C_type$_io.BufferedRandom$readline" +ext_rettype(#10971, #10024) +ext_rettype(#10971, #10218) +#10972 = @"C_type$_io.BufferedRandom$peek" +ext_rettype(#10972, #10024) +ext_rettype(#10972, #10003) +#10973 = @"C_type$_io.BufferedRandom$write" +ext_rettype(#10973, #10005) +ext_rettype(#10973, #10003) +#10974 = @"C_type$_io.BufferedRandom$__sizeof__" +ext_rettype(#10974, #10005) +#10975 = @"C_type$_io.BufferedWriter$close" +ext_rettype(#10975, #10003) +#10976 = @"C_type$_io.BufferedWriter$write" +ext_rettype(#10976, #10005) +ext_rettype(#10976, #10003) +#10977 = @"C_type$_io.BufferedWriter$truncate" +ext_rettype(#10977, #10003) +#10978 = @"C_type$_io.BufferedWriter$flush" +ext_rettype(#10978, #10003) +#10979 = @"C_type$_io.BufferedWriter$seek" +ext_rettype(#10979, #10005) +ext_rettype(#10979, #10003) +#10980 = @"C_type$_io.BufferedWriter$tell" +ext_rettype(#10980, #10005) +#10981 = @"C_type$_io.BufferedWriter$__sizeof__" +ext_rettype(#10981, #10005) +#10982 = @"C_type$_io._IOBase$flush" +ext_rettype(#10982, #10003) +#10983 = @"C_type$_io._IOBase$close" +ext_rettype(#10983, #10003) +#10984 = @"C_type$_io._IOBase$seekable" +ext_rettype(#10984, #10058) +#10985 = @"C_type$_io._IOBase$readable" +ext_rettype(#10985, #10058) +#10986 = @"C_type$_io._IOBase$writable" +ext_rettype(#10986, #10058) +#10987 = @"C_type$_io._IOBase$_checkClosed" +ext_rettype(#10987, #10003) +#10988 = @"C_type$_io._IOBase$isatty" +ext_rettype(#10988, #10058) +#10989 = @"C_type$_io._IOBase$readline" +ext_rettype(#10989, #10024) +#10990 = @"C_type$_io._IOBase$readlines" +ext_rettype(#10990, #10021) +#10991 = @"C_type$_io._IOBase$writelines" +ext_rettype(#10991, #10003) +#10992 = @"C_type$_io._RawIOBase$read" +ext_rettype(#10992, #10024) +#10993 = @"C_type$_io._RawIOBase$readall" +ext_rettype(#10993, #10024) +ext_rettype(#10993, #10218) +#10994 = @"C_type$_io.StringIO$close" +ext_rettype(#10994, #10003) +#10995 = @"C_type$_io.StringIO$getvalue" +ext_rettype(#10995, #10218) +#10996 = @"C_type$_io.StringIO$read" +ext_rettype(#10996, #10218) +#10997 = @"C_type$_io.StringIO$readline" +ext_rettype(#10997, #10218) +#10998 = @"C_type$_io.StringIO$tell" +ext_rettype(#10998, #10005) +#10999 = @"C_type$_io.StringIO$truncate" +ext_rettype(#10999, #10005) +#11000 = @"C_type$_io.StringIO$seek" +ext_rettype(#11000, #10005) +#11001 = @"C_type$_io.StringIO$write" +ext_rettype(#11001, #10005) +#11002 = @"C_type$_io.StringIO$seekable" +ext_rettype(#11002, #10058) +#11003 = @"C_type$_io.StringIO$readable" +ext_rettype(#11003, #10058) +#11004 = @"C_type$_io.StringIO$writable" +ext_rettype(#11004, #10058) +#11005 = @"C_type$_io.StringIO$__getstate__" +ext_rettype(#11005, #10001) +#11006 = @"C_type$_io.StringIO$__setstate__" +ext_rettype(#11006, #10003) +#11007 = @"C_type$_io.FileIO$read" +ext_rettype(#11007, #10003) +#11008 = @"C_type$_io.FileIO$readall" +ext_rettype(#11008, #10003) +#11009 = @"C_type$_io.FileIO$readinto" +ext_rettype(#11009, #10005) +ext_rettype(#11009, #10003) +#11010 = @"C_type$_io.FileIO$write" +ext_rettype(#11010, #10005) +ext_rettype(#11010, #10003) +#11011 = @"C_type$_io.FileIO$seek" +ext_rettype(#11011, #10005) +#11012 = @"C_type$_io.FileIO$tell" +ext_rettype(#11012, #10005) +#11013 = @"C_type$_io.FileIO$close" +ext_rettype(#11013, #10003) +#11014 = @"C_type$_io.FileIO$seekable" +ext_rettype(#11014, #10058) +#11015 = @"C_type$_io.FileIO$readable" +ext_rettype(#11015, #10058) +#11016 = @"C_type$_io.FileIO$writable" +ext_rettype(#11016, #10058) +#11017 = @"C_type$_io.FileIO$fileno" +ext_rettype(#11017, #10005) +#11018 = @"C_type$_io.FileIO$isatty" +ext_rettype(#11018, #10058) +#11019 = @"C_type$_io.IncrementalNewlineDecoder$getstate" +ext_rettype(#11019, #10001) +#11020 = @"C_type$_io.IncrementalNewlineDecoder$setstate" +ext_rettype(#11020, #10003) +#11021 = @"C_type$_io.IncrementalNewlineDecoder$reset" +ext_rettype(#11021, #10003) +#11022 = @"C_type$_io.TextIOWrapper$write" +ext_rettype(#11022, #10005) +#11023 = @"C_type$_io.TextIOWrapper$read" +ext_rettype(#11023, #10218) +#11024 = @"C_type$_io.TextIOWrapper$close" +ext_rettype(#11024, #10003) +#11025 = @"C_type$_io.TextIOWrapper$tell" +ext_rettype(#11025, #10005) +#11026 = @"C_type$functools.partial$__reduce__" +ext_rettype(#11026, #10001) +#11027 = @"C_type$functools.partial$__setstate__" +ext_rettype(#11027, #10003) +#11028 = @"C_type$pyexpat.xmlparser$Parse" +ext_rettype(#11028, #10005) +#11029 = @"C_type$pyexpat.xmlparser$ParseFile" +ext_rettype(#11029, #10005) +#11030 = @"C_type$pyexpat.xmlparser$SetBase" +ext_rettype(#11030, #10003) +#11031 = @"C_type$pyexpat.xmlparser$GetBase" +ext_rettype(#11031, #10024) +#11032 = @"C_type$pyexpat.xmlparser$ExternalEntityParserCreate" +ext_rettype(#11032, #10511) +#11033 = @"C_type$pyexpat.xmlparser$SetParamEntityParsing" +ext_rettype(#11033, #10005) +#11034 = @"C_type$pyexpat.xmlparser$GetInputContext" +ext_rettype(#11034, #10024) +ext_rettype(#11034, #10003) +#11035 = @"C_type$pyexpat.xmlparser$UseForeignDTD" +ext_rettype(#11035, #10003) +#11036 = @"C_type$ossaudiodev.oss_audio_device$write" +ext_rettype(#11036, #10005) +#11037 = @"C_type$ossaudiodev.oss_audio_device$writeall" +ext_rettype(#11037, #10003) +#11038 = @"C_type$ossaudiodev.oss_audio_device$close" +ext_rettype(#11038, #10003) +#11039 = @"C_type$ossaudiodev.oss_audio_device$fileno" +ext_rettype(#11039, #10005) +#11040 = @"C_type$ossaudiodev.oss_audio_device$nonblock" +ext_rettype(#11040, #10003) +#11041 = @"C_type$ossaudiodev.oss_audio_device$setfmt" +ext_rettype(#11041, #10005) +#11042 = @"C_type$ossaudiodev.oss_audio_device$getfmts" +ext_rettype(#11042, #10005) +#11043 = @"C_type$ossaudiodev.oss_audio_device$channels" +ext_rettype(#11043, #10005) +#11044 = @"C_type$ossaudiodev.oss_audio_device$speed" +ext_rettype(#11044, #10005) +#11045 = @"C_type$ossaudiodev.oss_audio_device$sync" +ext_rettype(#11045, #10003) +#11046 = @"C_type$ossaudiodev.oss_audio_device$reset" +ext_rettype(#11046, #10003) +#11047 = @"C_type$ossaudiodev.oss_audio_device$post" +ext_rettype(#11047, #10003) +#11048 = @"C_type$ossaudiodev.oss_audio_device$setparameters" +ext_rettype(#11048, #10001) +#11049 = @"C_type$ossaudiodev.oss_audio_device$bufsize" +ext_rettype(#11049, #10005) +#11050 = @"C_type$ossaudiodev.oss_audio_device$obufcount" +ext_rettype(#11050, #10005) +#11051 = @"C_type$ossaudiodev.oss_audio_device$obuffree" +ext_rettype(#11051, #10005) +#11052 = @"C_type$ossaudiodev.oss_audio_device$getptr" +ext_rettype(#11052, #10001) +#11053 = @"C_type$ossaudiodev.oss_audio_device$flush" +ext_rettype(#11053, #10003) +#11054 = @"C_type$ossaudiodev.oss_mixer_device$close" +ext_rettype(#11054, #10003) +#11055 = @"C_type$ossaudiodev.oss_mixer_device$fileno" +ext_rettype(#11055, #10005) +#11056 = @"C_type$ossaudiodev.oss_mixer_device$controls" +ext_rettype(#11056, #10005) +#11057 = @"C_type$ossaudiodev.oss_mixer_device$stereocontrols" +ext_rettype(#11057, #10005) +#11058 = @"C_type$ossaudiodev.oss_mixer_device$reccontrols" +ext_rettype(#11058, #10005) +#11059 = @"C_type$ossaudiodev.oss_mixer_device$get" +ext_rettype(#11059, #10001) +#11060 = @"C_type$ossaudiodev.oss_mixer_device$set" +ext_rettype(#11060, #10001) +#11061 = @"C_type$ossaudiodev.oss_mixer_device$get_recsrc" +ext_rettype(#11061, #10005) +#11062 = @"C_type$ossaudiodev.oss_mixer_device$set_recsrc" +ext_rettype(#11062, #10005) +#11063 = @"C_type$_ctypes._CData$__reduce__" +ext_rettype(#11063, #10001) +#11064 = @"C_type$_ctypes._CData$__setstate__" +ext_rettype(#11064, #10003) +#11065 = @"C_type$_ctypes.PyCPointerType$from_param" +ext_rettype(#11065, #10557) +#11066 = @"C_type$_ctypes.PyCPointerType$set_type" +ext_rettype(#11066, #10003) +#11067 = @"C_type$_ctypes.PyCSimpleType$from_param" +ext_rettype(#11067, #10557) +#11068 = @"C_type$_lsprof.Profiler$enable" +ext_rettype(#11068, #10003) +#11069 = @"C_type$_lsprof.Profiler$disable" +ext_rettype(#11069, #10003) +#11070 = @"C_type$_lsprof.Profiler$clear" +ext_rettype(#11070, #10003) +#11071 = @"C_type$Element$2clear" +ext_rettype(#11071, #10003) +#11072 = @"C_type$Element$2set" +ext_rettype(#11072, #10003) +#11073 = @"C_type$Element$2find" +ext_rettype(#11073, #10003) +#11074 = @"C_type$Element$2findtext" +ext_rettype(#11074, #10024) +#11075 = @"C_type$Element$2findall" +ext_rettype(#11075, #10021) +#11076 = @"C_type$Element$2append" +ext_rettype(#11076, #10003) +#11077 = @"C_type$Element$2extend" +ext_rettype(#11077, #10003) +#11078 = @"C_type$Element$2insert" +ext_rettype(#11078, #10003) +#11079 = @"C_type$Element$2remove" +ext_rettype(#11079, #10003) +#11080 = @"C_type$Element$2getchildren" +ext_rettype(#11080, #10021) +#11081 = @"C_type$Element$2items" +ext_rettype(#11081, #10021) +#11082 = @"C_type$Element$2keys" +ext_rettype(#11082, #10021) +#11083 = @"C_type$Element$2makeelement" +ext_rettype(#11083, #10575) +#11084 = @"C_type$Element$2__copy__" +ext_rettype(#11084, #10575) +#11085 = @"C_type$Element$2__deepcopy__" +ext_rettype(#11085, #10575) +#11086 = @"C_type$Element$!__reduce__" +ext_rettype(#11086, #10001) +#11087 = @"C_type$TreeBuilder$2data" +ext_rettype(#11087, #10003) +#11088 = @"C_type$TreeBuilder$2start" +ext_rettype(#11088, #10575) +#11089 = @"C_type$TreeBuilder$2xml" +ext_rettype(#11089, #10003) +#11090 = @"C_type$TreeBuilder$2close" +ext_rettype(#11090, #10003) +#11091 = @"C_type$XMLParser$2feed" +ext_rettype(#11091, #10003) +#11092 = @"C_type$XMLParser$2close" +ext_rettype(#11092, #10003) +#11093 = @"C_type$XMLParser$2_parse" +ext_rettype(#11093, #10003) +#11094 = @"C_type$XMLParser$2_setevents" +ext_rettype(#11094, #10003) +#11095 = @"C_type$datetime.timedelta$__reduce__" +ext_rettype(#11095, #10001) +#11096 = @"C_type$datetime.time$__format__" +ext_rettype(#11096, #10024) +ext_rettype(#11096, #10218) +#11097 = @"C_type$datetime.time$utcoffset" +ext_rettype(#11097, #10003) +#11098 = @"C_type$datetime.time$tzname" +ext_rettype(#11098, #10003) +#11099 = @"C_type$datetime.time$dst" +ext_rettype(#11099, #10003) +#11100 = @"C_type$datetime.time$__reduce__" +ext_rettype(#11100, #10001) +#11101 = @"C_type$datetime.tzinfo$__reduce__" +ext_rettype(#11101, #10001) +#11102 = @"C_type$datetime.datetime$ctime" +ext_rettype(#11102, #10024) +#11103 = @"C_type$datetime.datetime$utcoffset" +ext_rettype(#11103, #10003) +#11104 = @"C_type$datetime.datetime$tzname" +ext_rettype(#11104, #10003) +#11105 = @"C_type$datetime.datetime$dst" +ext_rettype(#11105, #10003) +#11106 = @"C_type$datetime.datetime$__reduce__" +ext_rettype(#11106, #10001) +#11107 = @"C_type$datetime.date$ctime" +ext_rettype(#11107, #10024) +#11108 = @"C_type$datetime.date$__format__" +ext_rettype(#11108, #10024) +ext_rettype(#11108, #10218) +#11109 = @"C_type$datetime.date$isocalendar" +ext_rettype(#11109, #10001) +#11110 = @"C_type$datetime.date$isoformat" +ext_rettype(#11110, #10024) +#11111 = @"C_type$datetime.date$isoweekday" +ext_rettype(#11111, #10005) +#11112 = @"C_type$datetime.date$toordinal" +ext_rettype(#11112, #10005) +#11113 = @"C_type$datetime.date$weekday" +ext_rettype(#11113, #10005) +#11114 = @"C_type$datetime.date$__reduce__" +ext_rettype(#11114, #10001) +#11115 = @"C_type$_ast.AST$__reduce__" +ext_rettype(#11115, #10001) +#11116 = @"C_type$imp.NullImporter$find_module" +ext_rettype(#11116, #10003) +#11117 = @"C_type$rangeiterator$2__length_hint__" +ext_rettype(#11117, #10005) +#11118 = @"C_type$xrange$2__reversed__" +#11119 = @"C_type$rangeiterator" +ext_rettype(#11118, #11119) +#11120 = @"C_type$xrange$2__reduce__" +ext_rettype(#11120, #10001) +#11121 = @"C_type$reversed$2__length_hint__" +ext_rettype(#11121, #10005) +#11122 = @"C_type$str$2join" +ext_rettype(#11122, #10024) +ext_rettype(#11122, #10218) +#11123 = @"C_type$str$2split" +ext_rettype(#11123, #10021) +#11124 = @"C_type$str$2rsplit" +ext_rettype(#11124, #10021) +#11125 = @"C_type$str$2lower" +ext_rettype(#11125, #10024) +#11126 = @"C_type$str$2upper" +ext_rettype(#11126, #10024) +#11127 = @"C_type$str$2islower" +ext_rettype(#11127, #10058) +#11128 = @"C_type$str$2isupper" +ext_rettype(#11128, #10058) +#11129 = @"C_type$str$2isspace" +ext_rettype(#11129, #10058) +#11130 = @"C_type$str$2isdigit" +ext_rettype(#11130, #10058) +#11131 = @"C_type$str$2istitle" +ext_rettype(#11131, #10058) +#11132 = @"C_type$str$2isalpha" +ext_rettype(#11132, #10058) +#11133 = @"C_type$str$2isalnum" +ext_rettype(#11133, #10058) +#11134 = @"C_type$str$2capitalize" +ext_rettype(#11134, #10024) +#11135 = @"C_type$str$2count" +ext_rettype(#11135, #10005) +#11136 = @"C_type$str$2endswith" +ext_rettype(#11136, #10058) +#11137 = @"C_type$str$2partition" +ext_rettype(#11137, #10001) +#11138 = @"C_type$str$2find" +ext_rettype(#11138, #10005) +#11139 = @"C_type$str$2index" +ext_rettype(#11139, #10005) +#11140 = @"C_type$str$2lstrip" +ext_rettype(#11140, #10024) +ext_rettype(#11140, #10218) +#11141 = @"C_type$str$2replace" +ext_rettype(#11141, #10024) +ext_rettype(#11141, #10218) +#11142 = @"C_type$str$2rfind" +ext_rettype(#11142, #10005) +#11143 = @"C_type$str$2rindex" +ext_rettype(#11143, #10005) +#11144 = @"C_type$str$2rstrip" +ext_rettype(#11144, #10024) +ext_rettype(#11144, #10218) +#11145 = @"C_type$str$2rpartition" +ext_rettype(#11145, #10001) +#11146 = @"C_type$str$2startswith" +ext_rettype(#11146, #10058) +#11147 = @"C_type$str$2strip" +ext_rettype(#11147, #10024) +ext_rettype(#11147, #10218) +#11148 = @"C_type$str$2swapcase" +ext_rettype(#11148, #10024) +#11149 = @"C_type$str$2translate" +ext_rettype(#11149, #10024) +#11150 = @"C_type$str$2title" +ext_rettype(#11150, #10024) +#11151 = @"C_type$str$2ljust" +ext_rettype(#11151, #10024) +#11152 = @"C_type$str$2rjust" +ext_rettype(#11152, #10024) +#11153 = @"C_type$str$2center" +ext_rettype(#11153, #10024) +#11154 = @"C_type$str$2zfill" +ext_rettype(#11154, #10024) +#11155 = @"C_type$str$2__format__" +ext_rettype(#11155, #10024) +ext_rettype(#11155, #10218) +#11156 = @"C_type$str$2_formatter_field_name_split" +ext_rettype(#11156, #10001) +#11157 = @"C_type$str$2_formatter_parser" +#11158 = @"C_type$formatteriterator" +ext_rettype(#11157, #11158) +#11159 = @"C_type$str$2expandtabs" +ext_rettype(#11159, #10024) +#11160 = @"C_type$str$2splitlines" +ext_rettype(#11160, #10021) +#11161 = @"C_type$str$2__sizeof__" +ext_rettype(#11161, #10005) +#11162 = @"C_type$str$2__getnewargs__" +ext_rettype(#11162, #10001) +#11163 = @"C_type$frame$2__sizeof__" +ext_rettype(#11163, #10005) +#11164 = @"C_type$exceptions.BaseException$__reduce__" +ext_rettype(#11164, #10001) +#11165 = @"C_type$exceptions.BaseException$__setstate__" +ext_rettype(#11165, #10003) +#11166 = @"C_type$exceptions.BaseException$__unicode__" +ext_rettype(#11166, #10024) +ext_rettype(#11166, #10218) +#11167 = @"C_type$exceptions.EnvironmentError$__reduce__" +ext_rettype(#11167, #10001) +#11168 = @"C_type$file$2readline" +ext_rettype(#11168, #10024) +#11169 = @"C_type$file$2write" +ext_rettype(#11169, #10003) +#11170 = @"C_type$file$2fileno" +ext_rettype(#11170, #10005) +#11171 = @"C_type$file$2seek" +ext_rettype(#11171, #10003) +#11172 = @"C_type$file$2truncate" +ext_rettype(#11172, #10003) +#11173 = @"C_type$file$2tell" +ext_rettype(#11173, #10005) +#11174 = @"C_type$file$2readinto" +ext_rettype(#11174, #10005) +#11175 = @"C_type$file$2readlines" +ext_rettype(#11175, #10021) +#11176 = @"C_type$file$2xreadlines" +ext_rettype(#11176, #10250) +#11177 = @"C_type$file$2writelines" +ext_rettype(#11177, #10003) +#11178 = @"C_type$file$2flush" +ext_rettype(#11178, #10003) +#11179 = @"C_type$file$2close" +ext_rettype(#11179, #10005) +ext_rettype(#11179, #10003) +#11180 = @"C_type$file$2isatty" +ext_rettype(#11180, #10058) +#11181 = @"C_type$file$2__enter__" +ext_rettype(#11181, #10250) +#11182 = @"C_type$file$2__exit__" +ext_rettype(#11182, #10003) +#11183 = @"C_type$int$2conjugate" +ext_rettype(#11183, #10005) +#11184 = @"C_type$int$2bit_length" +ext_rettype(#11184, #10005) +#11185 = @"C_type$int$2__trunc__" +ext_rettype(#11185, #10005) +#11186 = @"C_type$int$2__getnewargs__" +ext_rettype(#11186, #10001) +#11187 = @"C_type$int$2__format__" +ext_rettype(#11187, #10024) +#11188 = @"C_type$listiterator$2__length_hint__" +ext_rettype(#11188, #10005) +#11189 = @"C_type$listreverseiterator$2__length_hint__" +ext_rettype(#11189, #10005) +#11190 = @"C_type$list$2__getitem__" +ext_rettype(#11190, #10021) +#11191 = @"C_type$list$2__reversed__" +#11192 = @"C_type$listreverseiterator" +ext_rettype(#11191, #11192) +#11193 = @"C_type$list$2__sizeof__" +ext_rettype(#11193, #10005) +#11194 = @"C_type$list$2append" +ext_rettype(#11194, #10003) +#11195 = @"C_type$list$2insert" +ext_rettype(#11195, #10003) +#11196 = @"C_type$list$2extend" +ext_rettype(#11196, #10003) +#11197 = @"C_type$list$2remove" +ext_rettype(#11197, #10003) +#11198 = @"C_type$list$2index" +ext_rettype(#11198, #10005) +#11199 = @"C_type$list$2count" +ext_rettype(#11199, #10005) +#11200 = @"C_type$list$2reverse" +ext_rettype(#11200, #10003) +#11201 = @"C_type$list$2sort" +ext_rettype(#11201, #10003) +#11202 = @"C_type$slice$22indices" +ext_rettype(#11202, #10001) +#11203 = @"C_type$slice$2__reduce__" +ext_rettype(#11203, #10001) +#11204 = @"C_type$dictionary-keyiterator$__length_hint__" +ext_rettype(#11204, #10005) +#11205 = @"C_type$dictionary-valueiterator$__length_hint__" +ext_rettype(#11205, #10005) +#11206 = @"C_type$dictionary-itemiterator$__length_hint__" +ext_rettype(#11206, #10005) +#11207 = @"C_type$dict$2__contains__" +ext_rettype(#11207, #10058) +#11208 = @"C_type$dict$2__sizeof__" +ext_rettype(#11208, #10005) +#11209 = @"C_type$dict$2has_key" +ext_rettype(#11209, #10058) +#11210 = @"C_type$dict$2popitem" +ext_rettype(#11210, #10001) +#11211 = @"C_type$dict$2keys" +ext_rettype(#11211, #10021) +#11212 = @"C_type$dict$2items" +ext_rettype(#11212, #10021) +#11213 = @"C_type$dict$2values" +ext_rettype(#11213, #10021) +#11214 = @"C_type$dict$2update" +ext_rettype(#11214, #10003) +#11215 = @"C_type$dict$2clear" +ext_rettype(#11215, #10003) +#11216 = @"C_type$dict$2copy" +ext_rettype(#11216, #10007) +#11217 = @"C_type$long$2conjugate" +ext_rettype(#11217, #10005) +#11218 = @"C_type$long$2bit_length" +ext_rettype(#11218, #10005) +#11219 = @"C_type$long$2__trunc__" +ext_rettype(#11219, #10005) +#11220 = @"C_type$long$2__getnewargs__" +ext_rettype(#11220, #10001) +#11221 = @"C_type$long$2__format__" +ext_rettype(#11221, #10024) +#11222 = @"C_type$long$2__sizeof__" +ext_rettype(#11222, #10005) +#11223 = @"C_type$generator$2close" +ext_rettype(#11223, #10003) +#11224 = @"C_type$complex$2conjugate" +ext_rettype(#11224, #10517) +#11225 = @"C_type$complex$2__getnewargs__" +ext_rettype(#11225, #10001) +#11226 = @"C_type$complex$2__format__" +ext_rettype(#11226, #10024) +#11227 = @"C_type$type$2mro" +ext_rettype(#11227, #10001) +#11228 = @"C_type$type$2__subclasses__" +ext_rettype(#11228, #10021) +#11229 = @"C_type$type$2__instancecheck__" +ext_rettype(#11229, #10058) +#11230 = @"C_type$type$2__subclasscheck__" +ext_rettype(#11230, #10058) +#11231 = @"C_type$object$2__reduce_ex__" +ext_rettype(#11231, #10001) +#11232 = @"C_type$object$2__reduce__" +ext_rettype(#11232, #10001) +#11233 = @"C_type$object$2__format__" +ext_rettype(#11233, #10024) +ext_rettype(#11233, #10218) +#11234 = @"C_type$object$2__sizeof__" +ext_rettype(#11234, #10005) +#11235 = @"C_type$setiterator$2__length_hint__" +ext_rettype(#11235, #10005) +#11236 = @"C_type$frozenset$2__contains__" +ext_rettype(#11236, #10058) +#11237 = @"C_type$frozenset$2copy" +#11238 = @"C_type$set" +ext_rettype(#11237, #11238) +#11239 = @"C_type$frozenset" +ext_rettype(#11237, #11239) +#11240 = @"C_type$frozenset$2difference" +ext_rettype(#11240, #11238) +ext_rettype(#11240, #11239) +#11241 = @"C_type$frozenset$2intersection" +ext_rettype(#11241, #11238) +ext_rettype(#11241, #11239) +#11242 = @"C_type$frozenset$2isdisjoint" +ext_rettype(#11242, #10058) +#11243 = @"C_type$frozenset$2issubset" +ext_rettype(#11243, #10058) +#11244 = @"C_type$frozenset$2issuperset" +ext_rettype(#11244, #10058) +#11245 = @"C_type$frozenset$2__reduce__" +ext_rettype(#11245, #10001) +#11246 = @"C_type$frozenset$2__sizeof__" +ext_rettype(#11246, #10005) +#11247 = @"C_type$frozenset$2symmetric_difference" +ext_rettype(#11247, #11238) +ext_rettype(#11247, #11239) +#11248 = @"C_type$frozenset$2union" +ext_rettype(#11248, #11238) +ext_rettype(#11248, #11239) +#11249 = @"C_type$set$2add" +ext_rettype(#11249, #10003) +#11250 = @"C_type$set$2clear" +ext_rettype(#11250, #10003) +#11251 = @"C_type$set$2__contains__" +ext_rettype(#11251, #10058) +#11252 = @"C_type$set$2copy" +ext_rettype(#11252, #11238) +ext_rettype(#11252, #11239) +#11253 = @"C_type$set$2discard" +ext_rettype(#11253, #10003) +#11254 = @"C_type$set$2difference" +ext_rettype(#11254, #11238) +ext_rettype(#11254, #11239) +#11255 = @"C_type$set$2difference_update" +ext_rettype(#11255, #10003) +#11256 = @"C_type$set$2intersection" +ext_rettype(#11256, #11238) +ext_rettype(#11256, #11239) +#11257 = @"C_type$set$2intersection_update" +ext_rettype(#11257, #10003) +#11258 = @"C_type$set$2isdisjoint" +ext_rettype(#11258, #10058) +#11259 = @"C_type$set$2issubset" +ext_rettype(#11259, #10058) +#11260 = @"C_type$set$2issuperset" +ext_rettype(#11260, #10058) +#11261 = @"C_type$set$2__reduce__" +ext_rettype(#11261, #10001) +#11262 = @"C_type$set$2remove" +ext_rettype(#11262, #10003) +#11263 = @"C_type$set$2__sizeof__" +ext_rettype(#11263, #10005) +#11264 = @"C_type$set$2symmetric_difference" +ext_rettype(#11264, #11238) +ext_rettype(#11264, #11239) +#11265 = @"C_type$set$2symmetric_difference_update" +ext_rettype(#11265, #10003) +#11266 = @"C_type$set$2union" +ext_rettype(#11266, #11238) +ext_rettype(#11266, #11239) +#11267 = @"C_type$set$2update" +ext_rettype(#11267, #10003) +#11268 = @"C_type$iterator$2__length_hint__" +ext_rettype(#11268, #10005) +#11269 = @"C_type$float$2conjugate" +ext_rettype(#11269, #10038) +#11270 = @"C_type$float$2__trunc__" +ext_rettype(#11270, #10005) +#11271 = @"C_type$float$2as_integer_ratio" +ext_rettype(#11271, #10001) +#11272 = @"C_type$float$2hex" +ext_rettype(#11272, #10024) +#11273 = @"C_type$float$2is_integer" +ext_rettype(#11273, #10058) +#11274 = @"C_type$float$2__getnewargs__" +ext_rettype(#11274, #10001) +#11275 = @"C_type$float$2__getformat__" +ext_rettype(#11275, #10024) +#11276 = @"C_type$float$2__setformat__" +ext_rettype(#11276, #10003) +#11277 = @"C_type$float$2__format__" +ext_rettype(#11277, #10024) +#11278 = @"C_type$dictproxy$2has_key" +ext_rettype(#11278, #10058) +#11279 = @"C_type$bytearray_iterator$2__length_hint__" +ext_rettype(#11279, #10005) +#11280 = @"C_type$bytearray$2__alloc__" +ext_rettype(#11280, #10005) +#11281 = @"C_type$bytearray$2__reduce__" +ext_rettype(#11281, #10001) +#11282 = @"C_type$bytearray$2__sizeof__" +ext_rettype(#11282, #10005) +#11283 = @"C_type$bytearray$2append" +ext_rettype(#11283, #10003) +#11284 = @"C_type$bytearray$2capitalize" +#11285 = @"C_type$bytearray" +ext_rettype(#11284, #11285) +#11286 = @"C_type$bytearray$2center" +ext_rettype(#11286, #11285) +#11287 = @"C_type$bytearray$2count" +ext_rettype(#11287, #10005) +#11288 = @"C_type$bytearray$2endswith" +ext_rettype(#11288, #10058) +#11289 = @"C_type$bytearray$2expandtabs" +ext_rettype(#11289, #11285) +#11290 = @"C_type$bytearray$2extend" +ext_rettype(#11290, #10003) +#11291 = @"C_type$bytearray$2find" +ext_rettype(#11291, #10005) +#11292 = @"C_type$bytearray$2fromhex" +ext_rettype(#11292, #11285) +#11293 = @"C_type$bytearray$2index" +ext_rettype(#11293, #10005) +#11294 = @"C_type$bytearray$2insert" +ext_rettype(#11294, #10003) +#11295 = @"C_type$bytearray$2isalnum" +ext_rettype(#11295, #10058) +#11296 = @"C_type$bytearray$2isalpha" +ext_rettype(#11296, #10058) +#11297 = @"C_type$bytearray$2isdigit" +ext_rettype(#11297, #10058) +#11298 = @"C_type$bytearray$2islower" +ext_rettype(#11298, #10058) +#11299 = @"C_type$bytearray$2isspace" +ext_rettype(#11299, #10058) +#11300 = @"C_type$bytearray$2istitle" +ext_rettype(#11300, #10058) +#11301 = @"C_type$bytearray$2isupper" +ext_rettype(#11301, #10058) +#11302 = @"C_type$bytearray$2join" +ext_rettype(#11302, #11285) +#11303 = @"C_type$bytearray$2ljust" +ext_rettype(#11303, #11285) +#11304 = @"C_type$bytearray$2lower" +ext_rettype(#11304, #11285) +#11305 = @"C_type$bytearray$2lstrip" +ext_rettype(#11305, #11285) +#11306 = @"C_type$bytearray$2partition" +ext_rettype(#11306, #10001) +#11307 = @"C_type$bytearray$2pop" +ext_rettype(#11307, #10005) +#11308 = @"C_type$bytearray$2remove" +ext_rettype(#11308, #10003) +#11309 = @"C_type$bytearray$2replace" +ext_rettype(#11309, #11285) +#11310 = @"C_type$bytearray$2reverse" +ext_rettype(#11310, #10003) +#11311 = @"C_type$bytearray$2rfind" +ext_rettype(#11311, #10005) +#11312 = @"C_type$bytearray$2rindex" +ext_rettype(#11312, #10005) +#11313 = @"C_type$bytearray$2rjust" +ext_rettype(#11313, #11285) +#11314 = @"C_type$bytearray$2rpartition" +ext_rettype(#11314, #10001) +#11315 = @"C_type$bytearray$2rsplit" +ext_rettype(#11315, #10021) +#11316 = @"C_type$bytearray$2rstrip" +ext_rettype(#11316, #11285) +#11317 = @"C_type$bytearray$2split" +ext_rettype(#11317, #10021) +#11318 = @"C_type$bytearray$2splitlines" +ext_rettype(#11318, #10021) +#11319 = @"C_type$bytearray$2startswith" +ext_rettype(#11319, #10058) +#11320 = @"C_type$bytearray$2strip" +ext_rettype(#11320, #11285) +#11321 = @"C_type$bytearray$2swapcase" +ext_rettype(#11321, #11285) +#11322 = @"C_type$bytearray$2title" +ext_rettype(#11322, #11285) +#11323 = @"C_type$bytearray$2translate" +ext_rettype(#11323, #11285) +#11324 = @"C_type$bytearray$2upper" +ext_rettype(#11324, #11285) +#11325 = @"C_type$bytearray$2zfill" +ext_rettype(#11325, #11285) +#11326 = @"C_type$unicode$2replace" +ext_rettype(#11326, #10218) +#11327 = @"C_type$unicode$2split" +ext_rettype(#11327, #10021) +#11328 = @"C_type$unicode$2rsplit" +ext_rettype(#11328, #10021) +#11329 = @"C_type$unicode$2join" +ext_rettype(#11329, #10218) +#11330 = @"C_type$unicode$2capitalize" +ext_rettype(#11330, #10218) +#11331 = @"C_type$unicode$2title" +ext_rettype(#11331, #10218) +#11332 = @"C_type$unicode$2center" +ext_rettype(#11332, #10218) +#11333 = @"C_type$unicode$2count" +ext_rettype(#11333, #10005) +#11334 = @"C_type$unicode$2expandtabs" +ext_rettype(#11334, #10218) +#11335 = @"C_type$unicode$2find" +ext_rettype(#11335, #10005) +#11336 = @"C_type$unicode$2partition" +ext_rettype(#11336, #10001) +#11337 = @"C_type$unicode$2index" +ext_rettype(#11337, #10005) +#11338 = @"C_type$unicode$2ljust" +ext_rettype(#11338, #10218) +#11339 = @"C_type$unicode$2lower" +ext_rettype(#11339, #10218) +#11340 = @"C_type$unicode$2lstrip" +ext_rettype(#11340, #10218) +#11341 = @"C_type$unicode$2rfind" +ext_rettype(#11341, #10005) +#11342 = @"C_type$unicode$2rindex" +ext_rettype(#11342, #10005) +#11343 = @"C_type$unicode$2rjust" +ext_rettype(#11343, #10218) +#11344 = @"C_type$unicode$2rstrip" +ext_rettype(#11344, #10218) +#11345 = @"C_type$unicode$2rpartition" +ext_rettype(#11345, #10001) +#11346 = @"C_type$unicode$2splitlines" +ext_rettype(#11346, #10021) +#11347 = @"C_type$unicode$2strip" +ext_rettype(#11347, #10218) +#11348 = @"C_type$unicode$2swapcase" +ext_rettype(#11348, #10218) +#11349 = @"C_type$unicode$2upper" +ext_rettype(#11349, #10218) +#11350 = @"C_type$unicode$2startswith" +ext_rettype(#11350, #10058) +#11351 = @"C_type$unicode$2endswith" +ext_rettype(#11351, #10058) +#11352 = @"C_type$unicode$2islower" +ext_rettype(#11352, #10058) +#11353 = @"C_type$unicode$2isupper" +ext_rettype(#11353, #10058) +#11354 = @"C_type$unicode$2istitle" +ext_rettype(#11354, #10058) +#11355 = @"C_type$unicode$2isspace" +ext_rettype(#11355, #10058) +#11356 = @"C_type$unicode$2isdecimal" +ext_rettype(#11356, #10058) +#11357 = @"C_type$unicode$2isdigit" +ext_rettype(#11357, #10058) +#11358 = @"C_type$unicode$2isnumeric" +ext_rettype(#11358, #10058) +#11359 = @"C_type$unicode$2isalpha" +ext_rettype(#11359, #10058) +#11360 = @"C_type$unicode$2isalnum" +ext_rettype(#11360, #10058) +#11361 = @"C_type$unicode$2zfill" +ext_rettype(#11361, #10218) +#11362 = @"C_type$unicode$2__format__" +ext_rettype(#11362, #10024) +ext_rettype(#11362, #10218) +#11363 = @"C_type$unicode$2_formatter_field_name_split" +ext_rettype(#11363, #10001) +#11364 = @"C_type$unicode$2_formatter_parser" +ext_rettype(#11364, #11158) +#11365 = @"C_type$unicode$2__sizeof__" +ext_rettype(#11365, #10005) +#11366 = @"C_type$unicode$2__getnewargs__" +ext_rettype(#11366, #10001) +#11367 = @"C_type$EncodingMap$2size" +ext_rettype(#11367, #10005) +#11368 = @"C_type$memoryview$2tobytes" +ext_rettype(#11368, #10024) +#11369 = @"C_type$memoryview$2tolist" +ext_rettype(#11369, #10021) +#11370 = @"C_type$tupleiterator$2__length_hint__" +ext_rettype(#11370, #10005) +#11371 = @"C_type$tuple$2__getnewargs__" +ext_rettype(#11371, #10001) +#11372 = @"C_type$tuple$2__sizeof__" +ext_rettype(#11372, #10005) +#11373 = @"C_type$tuple$2index" +ext_rettype(#11373, #10005) +#11374 = @"C_type$tuple$2count" +ext_rettype(#11374, #10005) +#11375 = @"C_type$object" +ext_argtype(#10000, 0, #11375) +#11376 = @"C_builtin_function_or_method$_heapq.heappop" +ext_argtype(#11376, 0, #11375) +ext_argtype(#10019, 0, #11375) +ext_argtype(#10020, 0, #10005) +ext_argtype(#10020, 1, #11375) +ext_argtype(#10022, 0, #10005) +ext_argtype(#10022, 1, #11375) +#11377 = @"C_type$buffer" +ext_argtype(#10023, 0, #11377) +ext_argtype(#10023, 1, #10024) +ext_argtype(#10023, 1, #10218) +ext_argtype(#10023, 2, #10024) +ext_argtype(#10023, 2, #10218) +ext_argtype(#10025, 0, #10024) +ext_argtype(#10025, 0, #10218) +ext_argtype(#10025, 1, #10024) +ext_argtype(#10025, 1, #10218) +ext_argtype(#10026, 0, #10024) +ext_argtype(#10026, 0, #10218) +#11378 = @"C_builtin_function_or_method$pwd.getpwuid" +ext_argtype(#11378, 0, #11375) +#11379 = @"C_builtin_function_or_method$pwd.getpwnam" +ext_argtype(#11379, 0, #10024) +ext_argtype(#11379, 0, #10218) +ext_argtype(#10029, 0, #10024) +ext_argtype(#10029, 0, #10218) +ext_argtype(#10029, 1, #10005) +ext_argtype(#10030, 0, #10024) +ext_argtype(#10030, 0, #10218) +ext_argtype(#10030, 1, #10005) +ext_argtype(#10031, 0, #10024) +ext_argtype(#10031, 0, #10218) +ext_argtype(#10031, 1, #10005) +ext_argtype(#10032, 0, #10024) +ext_argtype(#10032, 0, #10218) +ext_argtype(#10032, 1, #10005) +ext_argtype(#10033, 0, #10024) +ext_argtype(#10033, 0, #10218) +ext_argtype(#10033, 1, #10005) +ext_argtype(#10034, 0, #10024) +ext_argtype(#10034, 0, #10218) +ext_argtype(#10034, 1, #10005) +ext_argtype(#10035, 0, #10024) +ext_argtype(#10035, 0, #10218) +ext_argtype(#10035, 1, #10024) +ext_argtype(#10035, 1, #10218) +ext_argtype(#10036, 0, #10024) +ext_argtype(#10036, 0, #10218) +ext_argtype(#10036, 1, #10005) +ext_argtype(#10037, 0, #10024) +ext_argtype(#10037, 0, #10218) +ext_argtype(#10037, 1, #10024) +ext_argtype(#10037, 1, #10218) +ext_argtype(#10039, 0, #10024) +ext_argtype(#10039, 0, #10218) +ext_argtype(#10039, 1, #10005) +ext_argtype(#10040, 0, #10024) +ext_argtype(#10040, 0, #10218) +ext_argtype(#10040, 1, #10005) +ext_argtype(#10040, 2, #10038) +ext_argtype(#10041, 0, #10024) +ext_argtype(#10041, 0, #10218) +ext_argtype(#10041, 1, #10024) +ext_argtype(#10041, 1, #10218) +ext_argtype(#10041, 2, #10005) +ext_argtype(#10042, 0, #10024) +ext_argtype(#10042, 0, #10218) +ext_argtype(#10042, 1, #10005) +ext_argtype(#10042, 2, #10005) +ext_argtype(#10043, 0, #10024) +ext_argtype(#10043, 0, #10218) +ext_argtype(#10043, 1, #10005) +ext_argtype(#10044, 0, #10024) +ext_argtype(#10044, 0, #10218) +ext_argtype(#10044, 1, #10005) +ext_argtype(#10045, 0, #10024) +ext_argtype(#10045, 0, #10218) +ext_argtype(#10045, 1, #10005) +ext_argtype(#10046, 0, #10024) +ext_argtype(#10046, 0, #10218) +ext_argtype(#10046, 1, #10005) +ext_argtype(#10047, 0, #10024) +ext_argtype(#10047, 0, #10218) +ext_argtype(#10047, 1, #10005) +ext_argtype(#10047, 2, #10005) +ext_argtype(#10048, 0, #10024) +ext_argtype(#10048, 0, #10218) +ext_argtype(#10048, 1, #10005) +ext_argtype(#10048, 2, #11375) +ext_argtype(#10049, 0, #10024) +ext_argtype(#10049, 0, #10218) +ext_argtype(#10049, 1, #10005) +ext_argtype(#10049, 2, #11375) +ext_argtype(#10050, 0, #10024) +ext_argtype(#10050, 0, #10218) +ext_argtype(#10050, 1, #10005) +ext_argtype(#10050, 2, #10038) +ext_argtype(#10050, 3, #10038) +ext_argtype(#10051, 0, #10024) +ext_argtype(#10051, 0, #10218) +ext_argtype(#10051, 1, #10005) +ext_argtype(#10051, 2, #10038) +ext_argtype(#10051, 3, #10038) +ext_argtype(#10052, 0, #10024) +ext_argtype(#10052, 0, #10218) +ext_argtype(#10052, 1, #10005) +ext_argtype(#10052, 2, #10005) +ext_argtype(#10053, 0, #10024) +ext_argtype(#10053, 0, #10218) +ext_argtype(#10053, 1, #10005) +ext_argtype(#10054, 0, #10024) +ext_argtype(#10054, 0, #10218) +ext_argtype(#10054, 1, #10005) +ext_argtype(#10054, 2, #10005) +ext_argtype(#10054, 3, #10005) +ext_argtype(#10054, 4, #10005) +ext_argtype(#10054, 5, #11375) +ext_argtype(#10054, 6, #10005) +ext_argtype(#10054, 7, #10005) +#11380 = @"C_builtin_function_or_method$_codecs_jp.getcodec" +ext_argtype(#11380, 0, #11375) +#11381 = @"C_builtin_function_or_method$_codecs_tw.getcodec" +ext_argtype(#11381, 0, #11375) +#11382 = @"C_builtin_function_or_method$_codecs_kr.getcodec" +ext_argtype(#11382, 0, #11375) +#11383 = @"C_builtin_function_or_method$_codecs_cn.getcodec" +ext_argtype(#11383, 0, #11375) +#11384 = @"C_builtin_function_or_method$_codecs_iso2022.getcodec" +ext_argtype(#11384, 0, #11375) +#11385 = @"C_builtin_function_or_method$_codecs_hk.getcodec" +ext_argtype(#11385, 0, #11375) +ext_argtype(#10055, 0, #11375) +ext_argtype(#10057, 0, #11375) +ext_argtype(#10059, 0, #11375) +ext_argtype(#10060, 0, #11375) +ext_argtype(#10061, 0, #11375) +ext_argtype(#10067, 0, #11375) +#11386 = @"C_builtin_function_or_method$operator.index" +ext_argtype(#11386, 0, #11375) +#11387 = @"C_builtin_function_or_method$operator.__index__" +ext_argtype(#11387, 0, #11375) +#11388 = @"C_builtin_function_or_method$operator.neg" +ext_argtype(#11388, 0, #11375) +#11389 = @"C_builtin_function_or_method$operator.__neg__" +ext_argtype(#11389, 0, #11375) +#11390 = @"C_builtin_function_or_method$operator.pos" +ext_argtype(#11390, 0, #11375) +#11391 = @"C_builtin_function_or_method$operator.__pos__" +ext_argtype(#11391, 0, #11375) +#11392 = @"C_builtin_function_or_method$operator.abs" +ext_argtype(#11392, 0, #11375) +#11393 = @"C_builtin_function_or_method$operator.__abs__" +ext_argtype(#11393, 0, #11375) +#11394 = @"C_builtin_function_or_method$operator.inv" +ext_argtype(#11394, 0, #11375) +#11395 = @"C_builtin_function_or_method$operator.__inv__" +ext_argtype(#11395, 0, #11375) +#11396 = @"C_builtin_function_or_method$operator.invert" +ext_argtype(#11396, 0, #11375) +#11397 = @"C_builtin_function_or_method$operator.__invert__" +ext_argtype(#11397, 0, #11375) +ext_argtype(#10068, 0, #11375) +ext_argtype(#10069, 0, #11375) +#11398 = @"C_builtin_function_or_method$operator.repeat" +ext_argtype(#11398, 0, #11375) +ext_argtype(#11398, 1, #10005) +#11399 = @"C_builtin_function_or_method$operator.__repeat__" +ext_argtype(#11399, 0, #11375) +ext_argtype(#11399, 1, #10005) +#11400 = @"C_builtin_function_or_method$operator.irepeat" +ext_argtype(#11400, 0, #11375) +ext_argtype(#11400, 1, #10005) +#11401 = @"C_builtin_function_or_method$operator.__irepeat__" +ext_argtype(#11401, 0, #11375) +ext_argtype(#11401, 1, #10005) +#11402 = @"C_builtin_function_or_method$operator.getslice" +ext_argtype(#11402, 0, #11375) +ext_argtype(#11402, 1, #10005) +ext_argtype(#11402, 2, #10005) +#11403 = @"C_builtin_function_or_method$operator.__getslice__" +ext_argtype(#11403, 0, #11375) +ext_argtype(#11403, 1, #10005) +ext_argtype(#11403, 2, #10005) +ext_argtype(#10074, 0, #11375) +ext_argtype(#10074, 1, #10005) +ext_argtype(#10074, 2, #10005) +ext_argtype(#10074, 3, #11375) +ext_argtype(#10075, 0, #11375) +ext_argtype(#10075, 1, #10005) +ext_argtype(#10075, 2, #10005) +ext_argtype(#10075, 3, #11375) +ext_argtype(#10076, 0, #11375) +ext_argtype(#10076, 1, #10005) +ext_argtype(#10076, 2, #10005) +ext_argtype(#10077, 0, #11375) +ext_argtype(#10077, 1, #10005) +ext_argtype(#10077, 2, #10005) +ext_argtype(#10078, 0, #11375) +ext_argtype(#10078, 1, #11375) +ext_argtype(#10088, 0, #11375) +ext_argtype(#10092, 0, #11375) +ext_argtype(#10093, 0, #10085) +ext_argtype(#10094, 0, #10024) +ext_argtype(#10094, 0, #10218) +ext_argtype(#10095, 0, #10024) +ext_argtype(#10095, 0, #10218) +ext_argtype(#10096, 0, #10024) +ext_argtype(#10096, 0, #10218) +ext_argtype(#10098, 0, #10024) +ext_argtype(#10098, 0, #10218) +ext_argtype(#10098, 1, #10024) +ext_argtype(#10098, 1, #10218) +ext_argtype(#10099, 0, #10005) +ext_argtype(#10099, 1, #10024) +ext_argtype(#10099, 1, #10218) +ext_argtype(#10100, 0, #10024) +ext_argtype(#10100, 0, #10218) +ext_argtype(#10101, 0, #10005) +ext_argtype(#10101, 1, #10005) +ext_argtype(#10101, 2, #10005) +ext_argtype(#10101, 3, #10005) +ext_argtype(#10103, 0, #10005) +ext_argtype(#10103, 1, #10005) +ext_argtype(#10103, 2, #10005) +ext_argtype(#10104, 0, #10005) +ext_argtype(#10105, 0, #11375) +ext_argtype(#10106, 0, #10005) +ext_argtype(#10107, 0, #11375) +ext_argtype(#10108, 0, #10024) +ext_argtype(#10108, 0, #10218) +ext_argtype(#10109, 0, #10024) +ext_argtype(#10109, 0, #10218) +ext_argtype(#10110, 0, #10005) +ext_argtype(#10110, 1, #10024) +ext_argtype(#10110, 1, #10218) +ext_argtype(#10111, 0, #10005) +ext_argtype(#10111, 1, #10024) +ext_argtype(#10111, 1, #10218) +ext_argtype(#10112, 0, #11375) +ext_argtype(#10112, 1, #11375) +ext_argtype(#10112, 2, #10005) +ext_argtype(#10112, 3, #10005) +ext_argtype(#10112, 4, #10005) +ext_argtype(#10112, 5, #10005) +ext_argtype(#10113, 0, #11375) +ext_argtype(#10113, 1, #10005) +ext_argtype(#10115, 0, #11375) +ext_argtype(#10116, 0, #11375) +ext_argtype(#10116, 1, #10005) +ext_argtype(#10117, 0, #11375) +ext_argtype(#10118, 0, #11375) +ext_argtype(#10119, 0, #11375) +ext_argtype(#10120, 0, #11375) +ext_argtype(#10121, 0, #11375) +ext_argtype(#10123, 0, #11375) +ext_argtype(#10124, 0, #11375) +ext_argtype(#10126, 0, #11375) +ext_argtype(#10127, 0, #11375) +ext_argtype(#10128, 0, #11375) +ext_argtype(#10129, 0, #11375) +ext_argtype(#10130, 0, #11375) +ext_argtype(#10131, 0, #11375) +ext_argtype(#10132, 0, #11375) +ext_argtype(#10133, 0, #11375) +ext_argtype(#10134, 0, #11375) +ext_argtype(#10135, 0, #11375) +ext_argtype(#10137, 0, #11375) +ext_argtype(#10138, 0, #11375) +ext_argtype(#10139, 0, #11375) +ext_argtype(#10141, 0, #11375) +ext_argtype(#10142, 0, #11375) +ext_argtype(#10143, 0, #10038) +ext_argtype(#10143, 1, #11375) +ext_argtype(#10144, 0, #11375) +ext_argtype(#10146, 0, #11375) +ext_argtype(#10147, 0, #11375) +ext_argtype(#10148, 0, #11375) +ext_argtype(#10150, 0, #11375) +ext_argtype(#10151, 0, #11375) +ext_argtype(#10152, 0, #11375) +ext_argtype(#10153, 0, #11375) +ext_argtype(#10154, 0, #11375) +ext_argtype(#10155, 0, #11375) +#11404 = @"C_builtin_function_or_method$math.trunc" +ext_argtype(#11404, 0, #11375) +#11405 = @"C_builtin_function_or_method$_symtable.symtable" +ext_argtype(#11405, 0, #10024) +ext_argtype(#11405, 0, #10218) +ext_argtype(#11405, 1, #10024) +ext_argtype(#11405, 1, #10218) +ext_argtype(#11405, 2, #10024) +ext_argtype(#11405, 2, #10218) +ext_argtype(#10156, 0, #10005) +ext_argtype(#10157, 0, #10005) +ext_argtype(#10157, 1, #10038) +ext_argtype(#10157, 2, #10038) +ext_argtype(#10158, 0, #10005) +ext_argtype(#10159, 0, #10005) +ext_argtype(#10159, 1, #11375) +ext_argtype(#10160, 0, #10005) +ext_argtype(#10161, 0, #10005) +ext_argtype(#10162, 0, #10005) +ext_argtype(#10162, 1, #10005) +ext_argtype(#10170, 0, #11375) +#11406 = @"C_builtin_function_or_method$_csv.get_dialect" +ext_argtype(#11406, 0, #11375) +ext_argtype(#10175, 0, #10005) +ext_argtype(#10178, 0, #10005) +ext_argtype(#10178, 1, #10005) +ext_argtype(#10178, 2, #10005) +ext_argtype(#10180, 0, #10005) +ext_argtype(#10182, 0, #11375) +ext_argtype(#10185, 0, #11375) +ext_argtype(#10186, 0, #11375) +ext_argtype(#10186, 1, #10005) +ext_argtype(#10186, 2, #11375) +ext_argtype(#10187, 0, #11375) +ext_argtype(#10187, 1, #10005) +ext_argtype(#10188, 0, #11375) +ext_argtype(#10189, 0, #11375) +ext_argtype(#10189, 1, #10005) +ext_argtype(#10190, 0, #11375) +ext_argtype(#10190, 1, #10005) +#11407 = @"C_builtin_function_or_method$grp.getgrgid" +ext_argtype(#11407, 0, #11375) +#11408 = @"C_builtin_function_or_method$grp.getgrnam" +ext_argtype(#11408, 0, #11375) +ext_argtype(#10194, 0, #10038) +ext_argtype(#10197, 0, #11375) +ext_argtype(#10198, 0, #10024) +ext_argtype(#10198, 0, #10218) +ext_argtype(#10198, 1, #11375) +ext_argtype(#10200, 0, #10024) +ext_argtype(#10200, 0, #10218) +ext_argtype(#10202, 0, #10024) +ext_argtype(#10202, 0, #10218) +ext_argtype(#10202, 1, #10005) +ext_argtype(#10202, 2, #10005) +ext_argtype(#10203, 0, #10024) +ext_argtype(#10203, 0, #10218) +ext_argtype(#10257, 0, #11375) +ext_argtype(#10289, 0, #11375) +ext_argtype(#10290, 0, #11375) +ext_argtype(#10291, 0, #11375) +ext_argtype(#10317, 0, #11375) +ext_argtype(#10322, 0, #10024) +ext_argtype(#10322, 0, #10218) +ext_argtype(#10322, 1, #10024) +ext_argtype(#10322, 1, #10218) +ext_argtype(#10326, 0, #11375) +ext_argtype(#10330, 0, #11375) +ext_argtype(#10331, 0, #11375) +ext_argtype(#10335, 0, #11375) +ext_argtype(#10338, 0, #11375) +ext_argtype(#10339, 0, #11375) +ext_argtype(#10340, 0, #11375) +ext_argtype(#10352, 0, #11375) +ext_argtype(#10352, 1, #11375) +ext_argtype(#10352, 2, #10005) +#11409 = @"C_builtin_function_or_method$cPickle.dumps" +ext_argtype(#11409, 0, #11375) +ext_argtype(#11409, 1, #10005) +#11410 = @"C_builtin_function_or_method$cPickle.load" +ext_argtype(#11410, 0, #11375) +#11411 = @"C_builtin_function_or_method$cPickle.loads" +ext_argtype(#11411, 0, #10024) +ext_argtype(#10355, 0, #11375) +#11412 = @"C_type$unicodedata.UCD" +ext_argtype(#10357, 0, #11412) +ext_argtype(#10357, 1, #10218) +ext_argtype(#10357, 2, #11375) +ext_argtype(#10358, 0, #11412) +ext_argtype(#10358, 1, #10218) +ext_argtype(#10358, 2, #11375) +ext_argtype(#10359, 0, #11412) +ext_argtype(#10359, 1, #10218) +ext_argtype(#10359, 2, #11375) +ext_argtype(#10360, 0, #11412) +ext_argtype(#10360, 1, #10218) +ext_argtype(#10361, 0, #11412) +ext_argtype(#10361, 1, #10218) +ext_argtype(#10362, 0, #11412) +ext_argtype(#10362, 1, #10218) +ext_argtype(#10363, 0, #11412) +ext_argtype(#10363, 1, #10218) +ext_argtype(#10364, 0, #11412) +ext_argtype(#10364, 1, #10218) +ext_argtype(#10365, 0, #11412) +ext_argtype(#10365, 1, #10218) +ext_argtype(#10366, 0, #11412) +ext_argtype(#10366, 1, #10218) +ext_argtype(#10366, 2, #11375) +ext_argtype(#10367, 0, #11412) +ext_argtype(#10367, 1, #10024) +ext_argtype(#10367, 1, #10218) +#11413 = @"C_builtin_function_or_method$unicodedata.normalize" +ext_argtype(#11413, 0, #11412) +ext_argtype(#11413, 1, #10024) +ext_argtype(#11413, 1, #10218) +ext_argtype(#11413, 2, #10218) +ext_argtype(#10368, 0, #11375) +ext_argtype(#10368, 1, #10024) +ext_argtype(#10368, 2, #10005) +ext_argtype(#10378, 0, #10024) +ext_argtype(#10378, 0, #10218) +ext_argtype(#10378, 1, #10005) +ext_argtype(#10379, 0, #10024) +ext_argtype(#10379, 0, #10218) +ext_argtype(#10379, 1, #10005) +#11414 = @"C_builtin_function_or_method$zlib.compressobj" +ext_argtype(#11414, 0, #10005) +ext_argtype(#11414, 1, #10005) +ext_argtype(#11414, 2, #10005) +ext_argtype(#11414, 3, #10005) +ext_argtype(#11414, 4, #10005) +ext_argtype(#10380, 0, #10024) +ext_argtype(#10380, 0, #10218) +ext_argtype(#10380, 1, #10005) +#11415 = @"C_builtin_function_or_method$zlib.decompress" +ext_argtype(#11415, 0, #10024) +ext_argtype(#11415, 0, #10218) +ext_argtype(#11415, 1, #10005) +ext_argtype(#11415, 2, #10005) +#11416 = @"C_builtin_function_or_method$zlib.decompressobj" +ext_argtype(#11416, 0, #10005) +ext_argtype(#10389, 0, #10005) +#11417 = @"C_builtin_function_or_method$bz2.compress" +ext_argtype(#11417, 0, #10024) +ext_argtype(#11417, 0, #10218) +ext_argtype(#11417, 1, #10005) +ext_argtype(#10390, 0, #10024) +ext_argtype(#10390, 0, #10218) +#11418 = @"C_builtin_function_or_method$resource.getrusage" +ext_argtype(#11418, 0, #10005) +ext_argtype(#10391, 0, #10005) +ext_argtype(#10392, 0, #10005) +ext_argtype(#10392, 1, #11375) +ext_argtype(#10394, 0, #11375) +ext_argtype(#10431, 0, #10024) +ext_argtype(#10431, 0, #10218) +ext_argtype(#10433, 0, #10024) +ext_argtype(#10433, 0, #10218) +ext_argtype(#10435, 0, #10024) +ext_argtype(#10435, 0, #10218) +ext_argtype(#10435, 0, #10003) +ext_argtype(#10436, 0, #10024) +ext_argtype(#10436, 0, #10218) +ext_argtype(#10436, 0, #10003) +ext_argtype(#10437, 0, #10024) +ext_argtype(#10437, 0, #10218) +ext_argtype(#10437, 0, #10003) +ext_argtype(#10438, 0, #10005) +ext_argtype(#10440, 0, #10005) +ext_argtype(#10445, 0, #10024) +ext_argtype(#10445, 0, #10218) +ext_argtype(#10446, 0, #10024) +ext_argtype(#10446, 0, #10218) +ext_argtype(#10447, 0, #10005) +ext_argtype(#10448, 0, #10005) +ext_argtype(#10448, 1, #10024) +ext_argtype(#10448, 1, #10218) +#11419 = @"C_builtin_function_or_method$_testcapi.raise_exception" +ext_argtype(#11419, 0, #11375) +ext_argtype(#11419, 1, #10005) +ext_argtype(#10468, 0, #10005) +ext_argtype(#10468, 1, #10001) +ext_argtype(#10470, 0, #10005) +ext_argtype(#10471, 0, #10005) +ext_argtype(#10472, 0, #10005) +ext_argtype(#10473, 0, #10005) +ext_argtype(#10474, 0, #10005) +ext_argtype(#10475, 0, #10005) +ext_argtype(#10476, 0, #10005) +ext_argtype(#10477, 0, #10005) +ext_argtype(#10478, 0, #10005) +ext_argtype(#10479, 0, #10005) +ext_argtype(#10480, 0, #10005) +#11420 = @"C_builtin_function_or_method$_testcapi.codec_incrementalencoder" +ext_argtype(#11420, 0, #10024) +ext_argtype(#11420, 0, #10218) +ext_argtype(#11420, 1, #10024) +ext_argtype(#11420, 1, #10218) +#11421 = @"C_builtin_function_or_method$_testcapi.codec_incrementaldecoder" +ext_argtype(#11421, 0, #10024) +ext_argtype(#11421, 0, #10218) +ext_argtype(#11421, 1, #10024) +ext_argtype(#11421, 1, #10218) +#11422 = @"C_builtin_function_or_method$_testcapi.unicode_encodedecimal" +ext_argtype(#11422, 0, #10218) +ext_argtype(#11422, 1, #10024) +ext_argtype(#11422, 1, #10218) +ext_argtype(#10486, 0, #11375) +ext_argtype(#10487, 0, #11375) +ext_argtype(#10489, 0, #11375) +ext_argtype(#10489, 1, #11375) +ext_argtype(#10490, 0, #10024) +ext_argtype(#10490, 0, #10218) +ext_argtype(#10490, 1, #10024) +ext_argtype(#10490, 1, #10218) +ext_argtype(#10490, 2, #10005) +ext_argtype(#10491, 0, #10024) +ext_argtype(#10491, 0, #10218) +ext_argtype(#10491, 1, #10024) +ext_argtype(#10491, 1, #10218) +ext_argtype(#10491, 2, #11375) +ext_argtype(#10491, 3, #11375) +ext_argtype(#10493, 0, #11375) +ext_argtype(#10493, 1, #10005) +ext_argtype(#10494, 0, #11375) +#11423 = @"C_builtin_function_or_method$spwd.getspnam" +ext_argtype(#11423, 0, #10024) +ext_argtype(#11423, 0, #10218) +ext_argtype(#10499, 0, #10005) +ext_argtype(#10499, 1, #10024) +ext_argtype(#10499, 1, #10218) +ext_argtype(#10499, 1, #10003) +ext_argtype(#10502, 0, #10024) +ext_argtype(#10502, 0, #10218) +ext_argtype(#10503, 0, #10005) +ext_argtype(#10504, 0, #10024) +ext_argtype(#10504, 0, #10218) +ext_argtype(#10505, 0, #10024) +ext_argtype(#10505, 0, #10218) +ext_argtype(#10505, 0, #10003) +ext_argtype(#10505, 1, #10024) +ext_argtype(#10505, 1, #10218) +ext_argtype(#10506, 0, #10024) +ext_argtype(#10506, 0, #10218) +ext_argtype(#10506, 0, #10003) +ext_argtype(#10506, 1, #10024) +ext_argtype(#10506, 1, #10218) +ext_argtype(#10506, 2, #10005) +ext_argtype(#10507, 0, #10024) +ext_argtype(#10507, 0, #10218) +ext_argtype(#10507, 0, #10003) +ext_argtype(#10508, 0, #10024) +ext_argtype(#10508, 0, #10218) +ext_argtype(#10508, 1, #10024) +ext_argtype(#10508, 1, #10218) +ext_argtype(#10508, 1, #10003) +ext_argtype(#10509, 0, #10024) +ext_argtype(#10509, 0, #10218) +ext_argtype(#10509, 1, #10024) +ext_argtype(#10509, 1, #10218) +ext_argtype(#10509, 1, #10003) +ext_argtype(#10510, 0, #10024) +ext_argtype(#10510, 0, #10218) +ext_argtype(#10510, 0, #10003) +ext_argtype(#10510, 1, #10024) +ext_argtype(#10510, 1, #10218) +ext_argtype(#10510, 1, #10003) +ext_argtype(#10510, 2, #11375) +ext_argtype(#10512, 0, #10005) +ext_argtype(#10513, 0, #11375) +ext_argtype(#10514, 0, #11375) +ext_argtype(#10515, 0, #11375) +ext_argtype(#10526, 0, #10517) +ext_argtype(#10527, 0, #10517) +ext_argtype(#10528, 0, #10517) +ext_argtype(#10528, 1, #10517) +ext_argtype(#10530, 0, #10517) +ext_argtype(#10531, 0, #10517) +ext_argtype(#10532, 0, #10038) +ext_argtype(#10532, 1, #10038) +ext_argtype(#10538, 0, #11375) +ext_argtype(#10539, 0, #11375) +#11424 = @"C_builtin_function_or_method$_ctypes.POINTER" +ext_argtype(#11424, 0, #11375) +#11425 = @"C_builtin_function_or_method$_ctypes.pointer" +ext_argtype(#11425, 0, #11375) +#11426 = @"C_builtin_function_or_method$_ctypes._unpickle" +ext_argtype(#11426, 0, #11375) +ext_argtype(#11426, 1, #11375) +ext_argtype(#10548, 0, #11375) +ext_argtype(#10549, 0, #11375) +ext_argtype(#10549, 1, #10005) +ext_argtype(#10550, 0, #10024) +ext_argtype(#10550, 0, #10218) +ext_argtype(#10550, 0, #10003) +ext_argtype(#10550, 1, #10024) +ext_argtype(#10550, 1, #10218) +ext_argtype(#10551, 0, #10024) +ext_argtype(#10551, 0, #10218) +ext_argtype(#10551, 0, #10003) +ext_argtype(#10551, 1, #10005) +ext_argtype(#10552, 0, #11375) +ext_argtype(#10553, 0, #11375) +ext_argtype(#10553, 1, #10024) +ext_argtype(#10553, 1, #10218) +ext_argtype(#10554, 0, #11375) +ext_argtype(#10555, 0, #11375) +ext_argtype(#10558, 0, #11375) +ext_argtype(#10559, 0, #11375) +ext_argtype(#10559, 1, #10001) +ext_argtype(#10560, 0, #11375) +ext_argtype(#10560, 1, #10001) +#11427 = @"C_builtin_function_or_method$_ctypes.PyObj_FromPtr" +ext_argtype(#11427, 0, #11375) +#11428 = @"C_builtin_function_or_method$_ctypes.Py_INCREF" +ext_argtype(#11428, 0, #11375) +#11429 = @"C_builtin_function_or_method$_ctypes.Py_DECREF" +ext_argtype(#11429, 0, #11375) +ext_argtype(#10561, 0, #10024) +ext_argtype(#10561, 0, #10218) +ext_argtype(#10561, 1, #10005) +#11430 = @"C_builtin_function_or_method$_json.encode_basestring_ascii" +ext_argtype(#11430, 0, #11375) +ext_argtype(#10567, 0, #11375) +ext_argtype(#10567, 1, #11375) +ext_argtype(#10567, 2, #10024) +ext_argtype(#10567, 2, #10218) +ext_argtype(#10567, 2, #10003) +ext_argtype(#10567, 3, #10005) +ext_argtype(#10568, 0, #10024) +ext_argtype(#10568, 1, #10005) +ext_argtype(#10568, 2, #10005) +ext_argtype(#10571, 0, #10005) +ext_argtype(#10572, 0, #10005) +ext_argtype(#10573, 0, #10005) +ext_argtype(#10574, 0, #11375) +ext_argtype(#10574, 1, #10007) +ext_argtype(#10576, 0, #10575) +ext_argtype(#10576, 1, #11375) +ext_argtype(#10576, 2, #10007) +ext_argtype(#10579, 0, #11375) +ext_argtype(#10579, 1, #10024) +ext_argtype(#10579, 1, #10218) +ext_argtype(#10579, 1, #10003) +ext_argtype(#10581, 0, #11375) +ext_argtype(#10581, 1, #10024) +ext_argtype(#10581, 1, #10218) +ext_argtype(#10581, 1, #10003) +ext_argtype(#10582, 0, #11375) +ext_argtype(#10582, 1, #11375) +ext_argtype(#10582, 2, #10005) +ext_argtype(#10582, 3, #10005) +ext_argtype(#10583, 0, #11375) +ext_argtype(#10583, 1, #11375) +ext_argtype(#10583, 2, #10005) +ext_argtype(#10583, 3, #10005) +ext_argtype(#10584, 0, #11375) +ext_argtype(#10584, 1, #11375) +ext_argtype(#10584, 2, #10005) +ext_argtype(#10584, 3, #10005) +ext_argtype(#10585, 0, #11375) +ext_argtype(#10585, 1, #11375) +ext_argtype(#10585, 2, #10005) +ext_argtype(#10585, 3, #10005) +ext_argtype(#10586, 0, #11375) +ext_argtype(#10586, 1, #11375) +ext_argtype(#10586, 2, #10005) +ext_argtype(#10586, 3, #10005) +ext_argtype(#10587, 0, #11375) +ext_argtype(#10587, 1, #11375) +ext_argtype(#10587, 2, #10005) +ext_argtype(#10587, 3, #10005) +ext_argtype(#10591, 0, #11375) +ext_argtype(#10598, 0, #11375) +ext_argtype(#10600, 0, #11375) +ext_argtype(#10600, 1, #11375) +ext_argtype(#10601, 0, #10005) +ext_argtype(#10603, 0, #10024) +ext_argtype(#10603, 0, #10218) +ext_argtype(#10604, 0, #10005) +ext_argtype(#10606, 0, #10005) +ext_argtype(#10607, 0, #11375) +ext_argtype(#10609, 0, #10005) +ext_argtype(#10610, 0, #11375) +#11431 = @"C_builtin_function_or_method$sys.call_tracing" +ext_argtype(#11431, 0, #11375) +ext_argtype(#11431, 1, #10001) +ext_argtype(#10612, 0, #11375) +ext_argtype(#10612, 1, #11375) +ext_argtype(#10612, 2, #10005) +ext_argtype(#10613, 0, #11375) +ext_argtype(#10613, 1, #11375) +ext_argtype(#10613, 2, #11375) +ext_argtype(#10613, 3, #10005) +ext_argtype(#10613, 4, #11375) +ext_argtype(#10613, 5, #11375) +ext_argtype(#10613, 6, #11375) +ext_argtype(#10615, 0, #11375) +ext_argtype(#10617, 0, #11375) +ext_argtype(#10619, 0, #10024) +ext_argtype(#10619, 0, #10218) +ext_argtype(#10619, 1, #11375) +ext_argtype(#10622, 0, #10024) +ext_argtype(#10622, 0, #10218) +ext_argtype(#10622, 1, #11375) +ext_argtype(#10622, 2, #10024) +ext_argtype(#10622, 2, #10218) +ext_argtype(#10622, 3, #10001) +ext_argtype(#10623, 0, #10024) +ext_argtype(#10623, 0, #10218) +ext_argtype(#10627, 0, #10024) +ext_argtype(#10627, 0, #10218) +ext_argtype(#10628, 0, #10024) +ext_argtype(#10628, 0, #10218) +ext_argtype(#10629, 0, #10024) +ext_argtype(#10629, 0, #10218) +ext_argtype(#10630, 0, #10024) +ext_argtype(#10630, 0, #10218) +ext_argtype(#10631, 0, #10024) +ext_argtype(#10631, 0, #10218) +#11432 = @"C_builtin_function_or_method$imp.load_compiled" +ext_argtype(#11432, 0, #10024) +ext_argtype(#11432, 0, #10218) +ext_argtype(#11432, 1, #10024) +ext_argtype(#11432, 1, #10218) +ext_argtype(#11432, 2, #10250) +ext_argtype(#10632, 0, #10024) +ext_argtype(#10632, 0, #10218) +ext_argtype(#10632, 1, #10024) +ext_argtype(#10632, 1, #10218) +ext_argtype(#10632, 2, #10250) +ext_argtype(#10633, 0, #10024) +ext_argtype(#10633, 0, #10218) +ext_argtype(#10633, 1, #10024) +ext_argtype(#10633, 1, #10218) +#11433 = @"C_builtin_function_or_method$imp.load_source" +ext_argtype(#11433, 0, #10024) +ext_argtype(#11433, 0, #10218) +ext_argtype(#11433, 1, #10024) +ext_argtype(#11433, 1, #10218) +ext_argtype(#11433, 2, #10250) +ext_argtype(#10634, 0, #10024) +ext_argtype(#10634, 0, #10218) +ext_argtype(#10634, 1, #11375) +ext_argtype(#10634, 2, #11375) +ext_argtype(#10634, 3, #11375) +ext_argtype(#10634, 4, #10005) +#11434 = @"C_builtin_function_or_method$builtins.abs" +ext_argtype(#11434, 0, #11375) +ext_argtype(#10635, 0, #11375) +ext_argtype(#10636, 0, #11375) +ext_argtype(#10637, 0, #11375) +ext_argtype(#10638, 0, #11375) +ext_argtype(#10639, 0, #10005) +ext_argtype(#10642, 0, #11375) +ext_argtype(#10642, 1, #10024) +ext_argtype(#10642, 1, #10218) +ext_argtype(#10642, 2, #10024) +ext_argtype(#10642, 2, #10218) +ext_argtype(#10642, 3, #10005) +ext_argtype(#10642, 4, #10005) +#11435 = @"C_builtin_function_or_method$builtins.execfile" +ext_argtype(#11435, 0, #10024) +ext_argtype(#11435, 0, #10218) +ext_argtype(#11435, 1, #10007) +ext_argtype(#11435, 2, #11375) +ext_argtype(#10646, 0, #11375) +ext_argtype(#10646, 1, #11375) +ext_argtype(#10649, 0, #11375) +#11436 = @"C_builtin_function_or_method$builtins.hex" +ext_argtype(#11436, 0, #11375) +ext_argtype(#10650, 0, #11375) +#11437 = @"C_builtin_function_or_method$builtins.intern" +ext_argtype(#11437, 0, #10024) +ext_argtype(#10657, 0, #11375) +#11438 = @"C_builtin_function_or_method$builtins.oct" +ext_argtype(#11438, 0, #11375) +ext_argtype(#10661, 0, #11375) +ext_argtype(#10665, 0, #11375) +ext_argtype(#10666, 0, #11375) +ext_argtype(#10667, 0, #10038) +ext_argtype(#10667, 1, #11375) +ext_argtype(#10669, 0, #11375) +ext_argtype(#10669, 1, #11375) +ext_argtype(#10669, 2, #11375) +ext_argtype(#10669, 3, #10005) +ext_argtype(#10671, 0, #10005) +#11439 = @"C_type$_multiprocessing.SemLock" +ext_argtype(#10674, 0, #11439) +ext_argtype(#10675, 0, #11439) +ext_argtype(#10676, 0, #11439) +ext_argtype(#10677, 0, #11439) +ext_argtype(#10678, 0, #11439) +ext_argtype(#10679, 0, #11439) +ext_argtype(#10680, 0, #11439) +ext_argtype(#10681, 0, #11439) +#11440 = @"C_type$_multiprocessing.SemLock$_rebuild" +ext_argtype(#11440, 0, #11439) +ext_argtype(#10682, 0, #11439) +#11441 = @"C_type$_multiprocessing.Connection" +ext_argtype(#10683, 0, #11441) +ext_argtype(#10684, 0, #11441) +ext_argtype(#10685, 0, #11441) +ext_argtype(#10686, 0, #11441) +ext_argtype(#10686, 1, #11375) +#11442 = @"C_type$_multiprocessing.Connection$recv" +ext_argtype(#11442, 0, #11441) +ext_argtype(#10687, 0, #11441) +ext_argtype(#10688, 0, #11441) +ext_argtype(#10689, 0, #11441) +#11443 = @"C_type$_ssl._SSLContext" +ext_argtype(#10690, 0, #11443) +ext_argtype(#10692, 0, #11443) +ext_argtype(#10693, 0, #11443) +ext_argtype(#10694, 0, #11443) +ext_argtype(#10695, 0, #11443) +ext_argtype(#10695, 1, #11375) +ext_argtype(#10696, 0, #11443) +ext_argtype(#10697, 0, #11443) +ext_argtype(#10698, 0, #11443) +ext_argtype(#10699, 0, #11443) +ext_argtype(#10699, 1, #11375) +ext_argtype(#10700, 0, #11443) +ext_argtype(#10701, 0, #11443) +ext_argtype(#10702, 0, #11443) +ext_argtype(#10703, 0, #10691) +ext_argtype(#10704, 0, #10691) +ext_argtype(#10705, 0, #10691) +ext_argtype(#10706, 0, #10691) +ext_argtype(#10707, 0, #10691) +ext_argtype(#10708, 0, #10691) +ext_argtype(#10709, 0, #10691) +ext_argtype(#10710, 0, #10691) +ext_argtype(#10711, 0, #10691) +ext_argtype(#10712, 0, #10691) +ext_argtype(#10713, 0, #10691) +#11444 = @"C_type$_sre.SRE_Match" +ext_argtype(#10714, 0, #11444) +ext_argtype(#10715, 0, #11444) +ext_argtype(#10716, 0, #11444) +ext_argtype(#10717, 0, #11444) +ext_argtype(#10718, 0, #11444) +ext_argtype(#10719, 0, #11444) +#11445 = @"C_type$_sre.SRE_Match$expand" +ext_argtype(#11445, 0, #11444) +ext_argtype(#11445, 1, #11375) +#11446 = @"C_type$_sre.SRE_Match$__copy__" +ext_argtype(#11446, 0, #11444) +#11447 = @"C_type$_sre.SRE_Match$__deepcopy__" +ext_argtype(#11447, 0, #11444) +ext_argtype(#11447, 1, #11375) +#11448 = @"C_type$_sre.SRE_Scanner" +ext_argtype(#10720, 0, #11448) +ext_argtype(#10721, 0, #11448) +#11449 = @"C_type$_sre.SRE_Pattern" +ext_argtype(#10722, 0, #11449) +ext_argtype(#10723, 0, #11449) +ext_argtype(#10724, 0, #11449) +ext_argtype(#10725, 0, #11449) +ext_argtype(#10726, 0, #11449) +ext_argtype(#10727, 0, #11449) +ext_argtype(#10728, 0, #11449) +#11450 = @"C_type$_sre.SRE_Pattern$scanner" +ext_argtype(#11450, 0, #11449) +#11451 = @"C_type$_sre.SRE_Pattern$__copy__" +ext_argtype(#11451, 0, #11449) +#11452 = @"C_type$_sre.SRE_Pattern$__deepcopy__" +ext_argtype(#11452, 0, #11449) +ext_argtype(#11452, 1, #11375) +#11453 = @"C_type$linuxaudiodev.linux_audio_device$read" +ext_argtype(#11453, 0, #10017) +ext_argtype(#11453, 1, #10005) +ext_argtype(#10729, 0, #10017) +ext_argtype(#10729, 1, #10024) +ext_argtype(#10729, 1, #10218) +ext_argtype(#10730, 0, #10017) +ext_argtype(#10730, 1, #10005) +ext_argtype(#10730, 2, #10005) +ext_argtype(#10730, 3, #10005) +ext_argtype(#10730, 4, #10005) +ext_argtype(#10730, 5, #10005) +ext_argtype(#10731, 0, #10017) +ext_argtype(#10732, 0, #10017) +ext_argtype(#10733, 0, #10017) +ext_argtype(#10734, 0, #10017) +ext_argtype(#10735, 0, #10017) +ext_argtype(#10736, 0, #10017) +ext_argtype(#10737, 0, #10017) +ext_argtype(#10738, 0, #10056) +ext_argtype(#10739, 0, #10056) +#11454 = @"C_type$MultibyteIncrementalEncoder" +ext_argtype(#10740, 0, #11454) +ext_argtype(#10741, 0, #11454) +#11455 = @"C_type$MultibyteIncrementalDecoder$2decode" +#11456 = @"C_type$MultibyteIncrementalDecoder" +ext_argtype(#11455, 0, #11456) +ext_argtype(#10742, 0, #11456) +#11457 = @"C_type$MultibyteStreamReader" +ext_argtype(#10743, 0, #11457) +ext_argtype(#10744, 0, #11457) +ext_argtype(#10745, 0, #11457) +ext_argtype(#10746, 0, #11457) +#11458 = @"C_type$MultibyteStreamWriter" +ext_argtype(#10747, 0, #11458) +ext_argtype(#10747, 1, #11375) +ext_argtype(#10748, 0, #11458) +ext_argtype(#10748, 1, #11375) +ext_argtype(#10749, 0, #11458) +#11459 = @"C_type$deque_iterator" +ext_argtype(#10750, 0, #11459) +ext_argtype(#10750, 0, #10761) +ext_argtype(#10751, 0, #11459) +ext_argtype(#10751, 0, #10761) +#11460 = @"C_type$collections.deque" +ext_argtype(#10752, 0, #11460) +ext_argtype(#10752, 1, #11375) +ext_argtype(#10753, 0, #11460) +ext_argtype(#10753, 1, #11375) +ext_argtype(#10754, 0, #11460) +#11461 = @"C_type$collections.deque$__copy__" +ext_argtype(#11461, 0, #11460) +ext_argtype(#10755, 0, #11460) +ext_argtype(#10755, 1, #11375) +ext_argtype(#10756, 0, #11460) +ext_argtype(#10756, 1, #11375) +ext_argtype(#10757, 0, #11460) +ext_argtype(#10757, 1, #11375) +#11462 = @"C_type$collections.deque$pop" +ext_argtype(#11462, 0, #11460) +#11463 = @"C_type$collections.deque$popleft" +ext_argtype(#11463, 0, #11460) +ext_argtype(#10758, 0, #11460) +ext_argtype(#10759, 0, #11460) +ext_argtype(#10759, 1, #11375) +ext_argtype(#10760, 0, #11460) +ext_argtype(#10762, 0, #11460) +ext_argtype(#10763, 0, #11460) +ext_argtype(#10763, 1, #10005) +ext_argtype(#10764, 0, #11460) +#11464 = @"C_type$collections.defaultdict$__missing__" +#11465 = @"C_type$collections.defaultdict" +ext_argtype(#11464, 0, #11465) +ext_argtype(#11464, 1, #11375) +#11466 = @"C_type$collections.defaultdict$copy" +ext_argtype(#11466, 0, #11465) +#11467 = @"C_type$collections.defaultdict$__copy__" +ext_argtype(#11467, 0, #11465) +ext_argtype(#10765, 0, #11465) +ext_argtype(#10766, 0, #10085) +#11468 = @"C_type$parser.st$isexpr" +ext_argtype(#11468, 0, #10085) +#11469 = @"C_type$parser.st$issuite" +ext_argtype(#11469, 0, #10085) +ext_argtype(#10767, 0, #10085) +ext_argtype(#10768, 0, #10085) +ext_argtype(#10769, 0, #10085) +ext_argtype(#10770, 0, #10102) +ext_argtype(#10771, 0, #10102) +ext_argtype(#10771, 1, #11375) +ext_argtype(#10772, 0, #10102) +ext_argtype(#10773, 0, #10102) +ext_argtype(#10773, 1, #11375) +ext_argtype(#10774, 0, #10102) +ext_argtype(#10774, 1, #11375) +ext_argtype(#10775, 0, #10102) +ext_argtype(#10776, 0, #10102) +ext_argtype(#10777, 0, #10102) +ext_argtype(#10778, 0, #10102) +ext_argtype(#10779, 0, #10102) +ext_argtype(#10779, 1, #10005) +ext_argtype(#10779, 2, #10005) +ext_argtype(#10779, 3, #10005) +ext_argtype(#10780, 0, #10102) +ext_argtype(#10780, 1, #11375) +ext_argtype(#10781, 0, #10102) +ext_argtype(#10781, 1, #10024) +ext_argtype(#10781, 1, #10218) +ext_argtype(#10781, 2, #10005) +#11470 = @"C_type$_socket.socket$recv" +ext_argtype(#11470, 0, #10102) +ext_argtype(#11470, 1, #10005) +ext_argtype(#11470, 2, #10005) +ext_argtype(#10782, 0, #10102) +ext_argtype(#10782, 1, #11377) +ext_argtype(#10782, 2, #10005) +ext_argtype(#10782, 3, #10005) +ext_argtype(#10783, 0, #10102) +ext_argtype(#10783, 1, #10005) +ext_argtype(#10783, 2, #10005) +ext_argtype(#10784, 0, #10102) +ext_argtype(#10784, 1, #11377) +ext_argtype(#10784, 2, #10005) +ext_argtype(#10784, 3, #10005) +ext_argtype(#10785, 0, #10102) +ext_argtype(#10785, 1, #10024) +ext_argtype(#10785, 1, #10218) +ext_argtype(#10785, 2, #10005) +ext_argtype(#10786, 0, #10102) +ext_argtype(#10786, 1, #10024) +ext_argtype(#10786, 1, #10218) +ext_argtype(#10786, 2, #10005) +ext_argtype(#10787, 0, #10102) +ext_argtype(#10788, 0, #10102) +ext_argtype(#10788, 1, #11375) +ext_argtype(#10789, 0, #10102) +ext_argtype(#10789, 1, #11375) +ext_argtype(#10790, 0, #10102) +ext_argtype(#10791, 0, #10102) +ext_argtype(#10792, 0, #10102) +ext_argtype(#10792, 1, #11375) +ext_argtype(#10793, 0, #10794) +#11471 = @"C_type$itertools.chain$from_iterable" +#11472 = @"C_type$itertools.chain" +ext_argtype(#11471, 0, #11472) +ext_argtype(#11471, 1, #11375) +#11473 = @"C_type$itertools.count" +ext_argtype(#10795, 0, #11473) +#11474 = @"C_type$itertools.repeat" +ext_argtype(#10796, 0, #11474) +#11475 = @"C_type$_csv.writer$writerow" +ext_argtype(#11475, 0, #10167) +ext_argtype(#11475, 1, #11375) +ext_argtype(#10797, 0, #10167) +ext_argtype(#10797, 1, #11375) +#11476 = @"C_type$array.array" +ext_argtype(#10798, 0, #11476) +ext_argtype(#10798, 1, #11375) +ext_argtype(#10799, 0, #11476) +ext_argtype(#10800, 0, #11476) +#11477 = @"C_type$array.array$__copy__" +ext_argtype(#11477, 0, #11476) +ext_argtype(#10801, 0, #11476) +ext_argtype(#10801, 1, #11375) +#11478 = @"C_type$array.array$__deepcopy__" +ext_argtype(#11478, 0, #11476) +ext_argtype(#11478, 1, #11375) +ext_argtype(#10802, 0, #11476) +ext_argtype(#10802, 1, #11375) +ext_argtype(#10803, 0, #11476) +ext_argtype(#10804, 0, #11476) +ext_argtype(#10804, 1, #11375) +ext_argtype(#10805, 0, #11476) +ext_argtype(#10806, 0, #11476) +ext_argtype(#10807, 0, #11476) +ext_argtype(#10807, 1, #11375) +ext_argtype(#10808, 0, #11476) +#11479 = @"C_type$array.array$pop" +ext_argtype(#11479, 0, #11476) +ext_argtype(#10809, 0, #11476) +ext_argtype(#10810, 0, #11476) +ext_argtype(#10811, 0, #11476) +ext_argtype(#10811, 1, #11375) +ext_argtype(#10812, 0, #11476) +ext_argtype(#10813, 0, #11476) +ext_argtype(#10813, 1, #11375) +ext_argtype(#10814, 0, #11476) +ext_argtype(#10815, 0, #11476) +ext_argtype(#10816, 0, #11476) +ext_argtype(#10817, 0, #11476) +ext_argtype(#10817, 1, #11375) +ext_argtype(#10818, 0, #11476) +#11480 = @"C_type$mmap.mmap" +ext_argtype(#10819, 0, #11480) +ext_argtype(#10820, 0, #11480) +ext_argtype(#10821, 0, #11480) +ext_argtype(#10822, 0, #11480) +ext_argtype(#10823, 0, #11480) +ext_argtype(#10824, 0, #11480) +ext_argtype(#10825, 0, #11480) +ext_argtype(#10826, 0, #11480) +ext_argtype(#10827, 0, #11480) +ext_argtype(#10828, 0, #11480) +ext_argtype(#10829, 0, #11480) +ext_argtype(#10830, 0, #11480) +ext_argtype(#10831, 0, #11480) +ext_argtype(#10832, 0, #11480) +ext_argtype(#10833, 0, #10201) +ext_argtype(#10833, 1, #10024) +ext_argtype(#10833, 1, #10218) +ext_argtype(#10833, 2, #10024) +ext_argtype(#10833, 2, #10218) +ext_argtype(#10834, 0, #10201) +ext_argtype(#10835, 0, #10201) +#11481 = @"C_type$_hotshot.ProfilerType$runcall" +ext_argtype(#11481, 0, #10201) +#11482 = @"C_type$_hotshot.ProfilerType$runcode" +ext_argtype(#11482, 0, #10201) +ext_argtype(#11482, 1, #10082) +ext_argtype(#11482, 2, #10007) +ext_argtype(#11482, 3, #11375) +ext_argtype(#10836, 0, #10201) +ext_argtype(#10837, 0, #10201) +ext_argtype(#10838, 0, #10204) +ext_argtype(#10839, 0, #10204) +ext_argtype(#10840, 0, #10314) +ext_argtype(#10841, 0, #10314) +ext_argtype(#10842, 0, #10314) +ext_argtype(#10843, 0, #10314) +ext_argtype(#10843, 1, #10005) +ext_argtype(#10844, 0, #10314) +ext_argtype(#10844, 1, #10005) +ext_argtype(#10845, 0, #10314) +ext_argtype(#10845, 1, #10005) +ext_argtype(#10846, 0, #10314) +ext_argtype(#10847, 0, #10314) +ext_argtype(#10847, 1, #10005) +ext_argtype(#10847, 2, #10005) +ext_argtype(#10848, 0, #10314) +ext_argtype(#10849, 0, #10314) +ext_argtype(#10849, 1, #10005) +ext_argtype(#10850, 0, #10314) +ext_argtype(#10851, 0, #10314) +ext_argtype(#10851, 1, #10024) +ext_argtype(#10851, 1, #10218) +ext_argtype(#10852, 0, #10314) +ext_argtype(#10852, 1, #11375) +ext_argtype(#10853, 0, #10315) +ext_argtype(#10854, 0, #10315) +ext_argtype(#10855, 0, #10315) +ext_argtype(#10856, 0, #10315) +ext_argtype(#10856, 1, #10005) +ext_argtype(#10857, 0, #10315) +ext_argtype(#10857, 1, #10005) +ext_argtype(#10858, 0, #10315) +ext_argtype(#10858, 1, #10005) +ext_argtype(#10859, 0, #10315) +ext_argtype(#10860, 0, #10315) +ext_argtype(#10860, 1, #10005) +ext_argtype(#10860, 2, #10005) +ext_argtype(#10861, 0, #10315) +ext_argtype(#10862, 0, #10315) +ext_argtype(#10862, 1, #10005) +ext_argtype(#10863, 0, #10315) +#11483 = @"C_type$Struct" +ext_argtype(#10864, 0, #11483) +ext_argtype(#10865, 0, #11483) +ext_argtype(#10866, 0, #11483) +ext_argtype(#10866, 1, #11375) +ext_argtype(#10867, 0, #11483) +ext_argtype(#10868, 0, #11483) +ext_argtype(#10869, 0, #10354) +ext_argtype(#10869, 1, #11375) +ext_argtype(#10869, 2, #10005) +ext_argtype(#10870, 0, #10354) +ext_argtype(#10871, 0, #10354) +ext_argtype(#10871, 1, #10005) +#11484 = @"C_type$cPickle.Unpickler$load" +ext_argtype(#11484, 0, #10356) +#11485 = @"C_type$cPickle.Unpickler$noload" +ext_argtype(#11485, 0, #10356) +#11486 = @"C_type$zipimport.zipimporter" +ext_argtype(#10872, 0, #11486) +ext_argtype(#10872, 1, #10024) +ext_argtype(#10872, 1, #10218) +ext_argtype(#10872, 2, #11375) +#11487 = @"C_type$zipimport.zipimporter$load_module" +ext_argtype(#11487, 0, #11486) +ext_argtype(#11487, 1, #10024) +ext_argtype(#11487, 1, #10218) +ext_argtype(#10873, 0, #11486) +ext_argtype(#10873, 1, #10024) +ext_argtype(#10873, 1, #10218) +ext_argtype(#10874, 0, #11486) +ext_argtype(#10874, 1, #10024) +ext_argtype(#10874, 1, #10218) +ext_argtype(#10875, 0, #11486) +ext_argtype(#10875, 1, #10024) +ext_argtype(#10875, 1, #10218) +ext_argtype(#10876, 0, #11486) +ext_argtype(#10876, 1, #10024) +ext_argtype(#10876, 1, #10218) +ext_argtype(#10877, 0, #11486) +ext_argtype(#10877, 1, #10024) +ext_argtype(#10877, 1, #10218) +ext_argtype(#10878, 0, #11412) +ext_argtype(#10878, 1, #10218) +ext_argtype(#10878, 2, #11375) +ext_argtype(#10879, 0, #11412) +ext_argtype(#10879, 1, #10218) +ext_argtype(#10879, 2, #11375) +ext_argtype(#10880, 0, #11412) +ext_argtype(#10880, 1, #10218) +ext_argtype(#10880, 2, #11375) +ext_argtype(#10881, 0, #11412) +ext_argtype(#10881, 1, #10218) +ext_argtype(#10882, 0, #11412) +ext_argtype(#10882, 1, #10218) +ext_argtype(#10883, 0, #11412) +ext_argtype(#10883, 1, #10218) +ext_argtype(#10884, 0, #11412) +ext_argtype(#10884, 1, #10218) +ext_argtype(#10885, 0, #11412) +ext_argtype(#10885, 1, #10218) +ext_argtype(#10886, 0, #11412) +ext_argtype(#10886, 1, #10218) +ext_argtype(#10887, 0, #11412) +ext_argtype(#10887, 1, #10218) +ext_argtype(#10887, 2, #11375) +ext_argtype(#10888, 0, #11412) +ext_argtype(#10888, 1, #10024) +ext_argtype(#10888, 1, #10218) +#11488 = @"C_type$unicodedata.UCD$normalize" +ext_argtype(#11488, 0, #11412) +ext_argtype(#11488, 1, #10024) +ext_argtype(#11488, 1, #10218) +ext_argtype(#11488, 2, #10218) +#11489 = @"C_type$xxsubtype.spamlist" +ext_argtype(#10889, 0, #11489) +ext_argtype(#10890, 0, #11489) +ext_argtype(#10890, 1, #10005) +ext_argtype(#10891, 0, #11489) +#11490 = @"C_type$xxsubtype.spamdict" +ext_argtype(#10893, 0, #11490) +ext_argtype(#10894, 0, #11490) +ext_argtype(#10894, 1, #10005) +ext_argtype(#10895, 0, #10370) +ext_argtype(#10896, 0, #10370) +ext_argtype(#10897, 0, #10370) +ext_argtype(#10898, 0, #10370) +#11491 = @"C_type$zlib.Compress$compress" +#11492 = @"C_type$zlib.Compress" +ext_argtype(#11491, 0, #11492) +ext_argtype(#11491, 1, #10024) +ext_argtype(#11491, 1, #10218) +ext_argtype(#10899, 0, #11492) +ext_argtype(#10899, 1, #10005) +#11493 = @"C_type$zlib.Compress$copy" +ext_argtype(#11493, 0, #11492) +#11494 = @"C_type$zlib.Decompress$decompress" +#11495 = @"C_type$zlib.Decompress" +ext_argtype(#11494, 0, #11495) +ext_argtype(#11494, 1, #10024) +ext_argtype(#11494, 1, #10218) +ext_argtype(#11494, 2, #10005) +#11496 = @"C_type$zlib.Decompress$flush" +ext_argtype(#11496, 0, #11495) +ext_argtype(#11496, 1, #10005) +#11497 = @"C_type$zlib.Decompress$copy" +ext_argtype(#11497, 0, #11495) +#11498 = @"C_type$_random.Random" +ext_argtype(#10900, 0, #11498) +ext_argtype(#10901, 0, #11498) +ext_argtype(#10902, 0, #11498) +ext_argtype(#10903, 0, #11498) +ext_argtype(#10903, 1, #11375) +ext_argtype(#10904, 0, #11498) +ext_argtype(#10904, 1, #11375) +ext_argtype(#10905, 0, #11498) +ext_argtype(#10905, 1, #10005) +ext_argtype(#10906, 0, #10384) +ext_argtype(#10906, 1, #10005) +ext_argtype(#10907, 0, #10384) +ext_argtype(#10907, 1, #10005) +ext_argtype(#10908, 0, #10384) +ext_argtype(#10909, 0, #10384) +ext_argtype(#10910, 0, #10384) +ext_argtype(#10911, 0, #10384) +ext_argtype(#10912, 0, #10384) +ext_argtype(#10912, 1, #10005) +ext_argtype(#10913, 0, #10384) +#11499 = @"C_type$bz2.BZ2File$read" +#11500 = @"C_type$bz2.BZ2File" +ext_argtype(#11499, 0, #11500) +ext_argtype(#11499, 1, #10005) +ext_argtype(#10914, 0, #11500) +ext_argtype(#10914, 1, #10005) +ext_argtype(#10915, 0, #11500) +ext_argtype(#10915, 1, #10005) +#11501 = @"C_type$bz2.BZ2File$xreadlines" +ext_argtype(#11501, 0, #11500) +ext_argtype(#10916, 0, #11500) +ext_argtype(#10916, 1, #10024) +ext_argtype(#10916, 1, #10218) +ext_argtype(#10917, 0, #11500) +ext_argtype(#10917, 1, #11375) +ext_argtype(#10918, 0, #11500) +ext_argtype(#10918, 1, #11375) +ext_argtype(#10918, 2, #10005) +ext_argtype(#10919, 0, #11500) +ext_argtype(#10920, 0, #11500) +#11502 = @"C_type$bz2.BZ2File$__enter__" +ext_argtype(#11502, 0, #11500) +ext_argtype(#10921, 0, #11500) +#11503 = @"C_type$bz2.BZ2Compressor" +ext_argtype(#10922, 0, #11503) +ext_argtype(#10922, 1, #10024) +ext_argtype(#10922, 1, #10218) +#11504 = @"C_type$bz2.BZ2Compressor$flush" +ext_argtype(#11504, 0, #11503) +#11505 = @"C_type$bz2.BZ2Decompressor$decompress" +#11506 = @"C_type$bz2.BZ2Decompressor" +ext_argtype(#11505, 0, #11506) +ext_argtype(#11505, 1, #10024) +ext_argtype(#11505, 1, #10218) +ext_argtype(#10923, 0, #10497) +ext_argtype(#10923, 1, #11375) +ext_argtype(#10923, 2, #11375) +ext_argtype(#10924, 0, #10497) +ext_argtype(#10924, 1, #11375) +ext_argtype(#10924, 2, #11375) +ext_argtype(#10925, 0, #10497) +ext_argtype(#10925, 1, #11375) +ext_argtype(#10926, 0, #10497) +#11507 = @"C_type$select.epoll$fromfd" +#11508 = @"C_type$select.epoll" +ext_argtype(#11507, 0, #11508) +ext_argtype(#11507, 1, #10005) +ext_argtype(#10927, 0, #11508) +ext_argtype(#10928, 0, #11508) +ext_argtype(#10929, 0, #11508) +ext_argtype(#10929, 1, #11375) +ext_argtype(#10929, 2, #10005) +ext_argtype(#10930, 0, #11508) +ext_argtype(#10930, 1, #11375) +ext_argtype(#10930, 2, #10005) +ext_argtype(#10931, 0, #11508) +ext_argtype(#10931, 1, #11375) +ext_argtype(#10932, 0, #11508) +ext_argtype(#10932, 1, #10038) +ext_argtype(#10932, 2, #10005) +#11509 = @"C_type$_io.BytesIO" +ext_argtype(#10933, 0, #11509) +ext_argtype(#10934, 0, #11509) +ext_argtype(#10935, 0, #11509) +ext_argtype(#10936, 0, #11509) +ext_argtype(#10937, 0, #11509) +ext_argtype(#10938, 0, #11509) +ext_argtype(#10939, 0, #11509) +ext_argtype(#10940, 0, #11509) +ext_argtype(#10940, 1, #11375) +ext_argtype(#10941, 0, #11509) +ext_argtype(#10941, 1, #11375) +ext_argtype(#10942, 0, #11509) +ext_argtype(#10942, 1, #11375) +ext_argtype(#10943, 0, #11509) +ext_argtype(#10943, 1, #11377) +ext_argtype(#10944, 0, #11509) +ext_argtype(#10944, 1, #11375) +ext_argtype(#10945, 0, #11509) +ext_argtype(#10945, 1, #11375) +ext_argtype(#10946, 0, #11509) +ext_argtype(#10946, 1, #11375) +ext_argtype(#10947, 0, #11509) +ext_argtype(#10948, 0, #11509) +ext_argtype(#10948, 1, #11375) +ext_argtype(#10948, 2, #10005) +ext_argtype(#10949, 0, #11509) +ext_argtype(#10949, 1, #11375) +ext_argtype(#10950, 0, #11509) +ext_argtype(#10951, 0, #11509) +ext_argtype(#10951, 1, #11375) +ext_argtype(#10952, 0, #11509) +#11510 = @"C_type$_io._BufferedIOBase$detach" +#11511 = @"C_type$_io._BufferedIOBase" +ext_argtype(#11510, 0, #11511) +#11512 = @"C_type$_io._BufferedIOBase$read" +ext_argtype(#11512, 0, #11511) +#11513 = @"C_type$_io._BufferedIOBase$read1" +ext_argtype(#11513, 0, #11511) +ext_argtype(#10953, 0, #11511) +#11514 = @"C_type$_io._BufferedIOBase$write" +ext_argtype(#11514, 0, #11511) +#11515 = @"C_type$_io.BufferedReader$detach" +#11516 = @"C_type$_io.BufferedReader" +ext_argtype(#11515, 0, #11516) +#11517 = @"C_type$_io.BufferedReader$flush" +ext_argtype(#11517, 0, #11516) +ext_argtype(#10954, 0, #11516) +#11518 = @"C_type$_io.BufferedReader$seekable" +ext_argtype(#11518, 0, #11516) +#11519 = @"C_type$_io.BufferedReader$readable" +ext_argtype(#11519, 0, #11516) +#11520 = @"C_type$_io.BufferedReader$writable" +ext_argtype(#11520, 0, #11516) +#11521 = @"C_type$_io.BufferedReader$fileno" +ext_argtype(#11521, 0, #11516) +#11522 = @"C_type$_io.BufferedReader$isatty" +ext_argtype(#11522, 0, #11516) +ext_argtype(#10955, 0, #11516) +ext_argtype(#10956, 0, #11516) +ext_argtype(#10957, 0, #11516) +ext_argtype(#10958, 0, #11516) +ext_argtype(#10959, 0, #11516) +ext_argtype(#10960, 0, #11516) +ext_argtype(#10961, 0, #11516) +ext_argtype(#10962, 0, #11516) +#11523 = @"C_type$_io.BufferedRandom" +ext_argtype(#10963, 0, #11523) +#11524 = @"C_type$_io.BufferedRandom$detach" +ext_argtype(#11524, 0, #11523) +#11525 = @"C_type$_io.BufferedRandom$seekable" +ext_argtype(#11525, 0, #11523) +#11526 = @"C_type$_io.BufferedRandom$readable" +ext_argtype(#11526, 0, #11523) +#11527 = @"C_type$_io.BufferedRandom$writable" +ext_argtype(#11527, 0, #11523) +#11528 = @"C_type$_io.BufferedRandom$fileno" +ext_argtype(#11528, 0, #11523) +#11529 = @"C_type$_io.BufferedRandom$isatty" +ext_argtype(#11529, 0, #11523) +ext_argtype(#10964, 0, #11523) +ext_argtype(#10965, 0, #11523) +ext_argtype(#10966, 0, #11523) +ext_argtype(#10967, 0, #11523) +ext_argtype(#10968, 0, #11523) +ext_argtype(#10969, 0, #11523) +ext_argtype(#10970, 0, #11523) +ext_argtype(#10971, 0, #11523) +ext_argtype(#10972, 0, #11523) +ext_argtype(#10973, 0, #11523) +ext_argtype(#10974, 0, #11523) +#11530 = @"C_type$_io.BufferedWriter" +ext_argtype(#10975, 0, #11530) +#11531 = @"C_type$_io.BufferedWriter$detach" +ext_argtype(#11531, 0, #11530) +#11532 = @"C_type$_io.BufferedWriter$seekable" +ext_argtype(#11532, 0, #11530) +#11533 = @"C_type$_io.BufferedWriter$readable" +ext_argtype(#11533, 0, #11530) +#11534 = @"C_type$_io.BufferedWriter$writable" +ext_argtype(#11534, 0, #11530) +#11535 = @"C_type$_io.BufferedWriter$fileno" +ext_argtype(#11535, 0, #11530) +#11536 = @"C_type$_io.BufferedWriter$isatty" +ext_argtype(#11536, 0, #11530) +ext_argtype(#10976, 0, #11530) +ext_argtype(#10977, 0, #11530) +ext_argtype(#10978, 0, #11530) +ext_argtype(#10979, 0, #11530) +ext_argtype(#10980, 0, #11530) +ext_argtype(#10981, 0, #11530) +#11537 = @"C_type$_io.BufferedRWPair$read" +#11538 = @"C_type$_io.BufferedRWPair" +ext_argtype(#11537, 0, #11538) +#11539 = @"C_type$_io.BufferedRWPair$peek" +ext_argtype(#11539, 0, #11538) +#11540 = @"C_type$_io.BufferedRWPair$read1" +ext_argtype(#11540, 0, #11538) +#11541 = @"C_type$_io.BufferedRWPair$readinto" +ext_argtype(#11541, 0, #11538) +#11542 = @"C_type$_io.BufferedRWPair$write" +ext_argtype(#11542, 0, #11538) +#11543 = @"C_type$_io.BufferedRWPair$flush" +ext_argtype(#11543, 0, #11538) +#11544 = @"C_type$_io.BufferedRWPair$readable" +ext_argtype(#11544, 0, #11538) +#11545 = @"C_type$_io.BufferedRWPair$writable" +ext_argtype(#11545, 0, #11538) +#11546 = @"C_type$_io.BufferedRWPair$close" +ext_argtype(#11546, 0, #11538) +#11547 = @"C_type$_io.BufferedRWPair$isatty" +ext_argtype(#11547, 0, #11538) +#11548 = @"C_type$_io._IOBase$seek" +#11549 = @"C_type$_io._IOBase" +ext_argtype(#11548, 0, #11549) +#11550 = @"C_type$_io._IOBase$tell" +ext_argtype(#11550, 0, #11549) +#11551 = @"C_type$_io._IOBase$truncate" +ext_argtype(#11551, 0, #11549) +ext_argtype(#10982, 0, #11549) +ext_argtype(#10983, 0, #11549) +ext_argtype(#10984, 0, #11549) +ext_argtype(#10985, 0, #11549) +ext_argtype(#10986, 0, #11549) +ext_argtype(#10987, 0, #11549) +#11552 = @"C_type$_io._IOBase$_checkSeekable" +ext_argtype(#11552, 0, #11549) +#11553 = @"C_type$_io._IOBase$_checkReadable" +ext_argtype(#11553, 0, #11549) +#11554 = @"C_type$_io._IOBase$_checkWritable" +ext_argtype(#11554, 0, #11549) +#11555 = @"C_type$_io._IOBase$fileno" +ext_argtype(#11555, 0, #11549) +ext_argtype(#10988, 0, #11549) +#11556 = @"C_type$_io._IOBase$__enter__" +ext_argtype(#11556, 0, #11549) +#11557 = @"C_type$_io._IOBase$__exit__" +ext_argtype(#11557, 0, #11549) +ext_argtype(#10989, 0, #11549) +ext_argtype(#10990, 0, #11549) +ext_argtype(#10991, 0, #11549) +#11558 = @"C_type$_io._RawIOBase" +ext_argtype(#10992, 0, #11558) +ext_argtype(#10993, 0, #11558) +#11559 = @"C_type$_io.StringIO" +ext_argtype(#10994, 0, #11559) +ext_argtype(#10995, 0, #11559) +ext_argtype(#10996, 0, #11559) +ext_argtype(#10997, 0, #11559) +ext_argtype(#10998, 0, #11559) +ext_argtype(#10999, 0, #11559) +ext_argtype(#11000, 0, #11559) +ext_argtype(#11001, 0, #11559) +ext_argtype(#11001, 1, #11375) +ext_argtype(#11002, 0, #11559) +ext_argtype(#11003, 0, #11559) +ext_argtype(#11004, 0, #11559) +ext_argtype(#11005, 0, #11559) +ext_argtype(#11006, 0, #11559) +ext_argtype(#11006, 1, #11375) +#11560 = @"C_type$_io.FileIO" +ext_argtype(#11007, 0, #11560) +ext_argtype(#11008, 0, #11560) +ext_argtype(#11009, 0, #11560) +ext_argtype(#11010, 0, #11560) +ext_argtype(#11011, 0, #11560) +ext_argtype(#11012, 0, #11560) +#11561 = @"C_type$_io.FileIO$truncate" +ext_argtype(#11561, 0, #11560) +ext_argtype(#11013, 0, #11560) +ext_argtype(#11014, 0, #11560) +ext_argtype(#11015, 0, #11560) +ext_argtype(#11016, 0, #11560) +ext_argtype(#11017, 0, #11560) +ext_argtype(#11018, 0, #11560) +#11562 = @"C_type$_io._TextIOBase$detach" +#11563 = @"C_type$_io._TextIOBase" +ext_argtype(#11562, 0, #11563) +#11564 = @"C_type$_io._TextIOBase$read" +ext_argtype(#11564, 0, #11563) +#11565 = @"C_type$_io._TextIOBase$readline" +ext_argtype(#11565, 0, #11563) +#11566 = @"C_type$_io._TextIOBase$write" +ext_argtype(#11566, 0, #11563) +#11567 = @"C_type$_io.IncrementalNewlineDecoder$decode" +#11568 = @"C_type$_io.IncrementalNewlineDecoder" +ext_argtype(#11567, 0, #11568) +ext_argtype(#11019, 0, #11568) +ext_argtype(#11020, 0, #11568) +ext_argtype(#11020, 1, #11375) +ext_argtype(#11021, 0, #11568) +#11569 = @"C_type$_io.TextIOWrapper$detach" +#11570 = @"C_type$_io.TextIOWrapper" +ext_argtype(#11569, 0, #11570) +ext_argtype(#11022, 0, #11570) +ext_argtype(#11023, 0, #11570) +#11571 = @"C_type$_io.TextIOWrapper$readline" +ext_argtype(#11571, 0, #11570) +#11572 = @"C_type$_io.TextIOWrapper$flush" +ext_argtype(#11572, 0, #11570) +ext_argtype(#11024, 0, #11570) +#11573 = @"C_type$_io.TextIOWrapper$fileno" +ext_argtype(#11573, 0, #11570) +#11574 = @"C_type$_io.TextIOWrapper$seekable" +ext_argtype(#11574, 0, #11570) +#11575 = @"C_type$_io.TextIOWrapper$readable" +ext_argtype(#11575, 0, #11570) +#11576 = @"C_type$_io.TextIOWrapper$writable" +ext_argtype(#11576, 0, #11570) +#11577 = @"C_type$_io.TextIOWrapper$isatty" +ext_argtype(#11577, 0, #11570) +#11578 = @"C_type$_io.TextIOWrapper$seek" +ext_argtype(#11578, 0, #11570) +ext_argtype(#11025, 0, #11570) +#11579 = @"C_type$_io.TextIOWrapper$truncate" +ext_argtype(#11579, 0, #11570) +#11580 = @"C_type$functools.partial" +ext_argtype(#11026, 0, #11580) +ext_argtype(#11027, 0, #11580) +ext_argtype(#11027, 1, #11375) +ext_argtype(#11028, 0, #10511) +ext_argtype(#11028, 1, #10024) +ext_argtype(#11028, 1, #10218) +ext_argtype(#11028, 2, #10005) +ext_argtype(#11029, 0, #10511) +ext_argtype(#11029, 1, #11375) +ext_argtype(#11030, 0, #10511) +ext_argtype(#11030, 1, #10024) +ext_argtype(#11030, 1, #10218) +ext_argtype(#11031, 0, #10511) +ext_argtype(#11032, 0, #10511) +ext_argtype(#11032, 1, #10024) +ext_argtype(#11032, 1, #10218) +ext_argtype(#11032, 1, #10003) +ext_argtype(#11032, 2, #10024) +ext_argtype(#11032, 2, #10218) +ext_argtype(#11033, 0, #10511) +ext_argtype(#11033, 1, #10005) +ext_argtype(#11034, 0, #10511) +ext_argtype(#11035, 0, #10511) +ext_argtype(#11035, 1, #11375) +#11581 = @"C_type$ossaudiodev.oss_audio_device$read" +ext_argtype(#11581, 0, #10543) +ext_argtype(#11581, 1, #10005) +ext_argtype(#11036, 0, #10543) +ext_argtype(#11036, 1, #10024) +ext_argtype(#11036, 1, #10218) +ext_argtype(#11037, 0, #10543) +ext_argtype(#11037, 1, #10024) +ext_argtype(#11037, 1, #10218) +ext_argtype(#11038, 0, #10543) +ext_argtype(#11039, 0, #10543) +ext_argtype(#11040, 0, #10543) +ext_argtype(#11041, 0, #10543) +ext_argtype(#11042, 0, #10543) +ext_argtype(#11043, 0, #10543) +ext_argtype(#11044, 0, #10543) +ext_argtype(#11045, 0, #10543) +ext_argtype(#11046, 0, #10543) +ext_argtype(#11047, 0, #10543) +ext_argtype(#11048, 0, #10543) +ext_argtype(#11048, 1, #10005) +ext_argtype(#11048, 2, #10005) +ext_argtype(#11048, 3, #10005) +ext_argtype(#11048, 4, #10005) +ext_argtype(#11049, 0, #10543) +ext_argtype(#11050, 0, #10543) +ext_argtype(#11051, 0, #10543) +ext_argtype(#11052, 0, #10543) +ext_argtype(#11053, 0, #10543) +ext_argtype(#11054, 0, #10545) +ext_argtype(#11055, 0, #10545) +ext_argtype(#11056, 0, #10545) +ext_argtype(#11057, 0, #10545) +ext_argtype(#11058, 0, #10545) +ext_argtype(#11059, 0, #10545) +ext_argtype(#11059, 1, #10005) +ext_argtype(#11060, 0, #10545) +ext_argtype(#11060, 1, #10005) +ext_argtype(#11060, 2, #10001) +ext_argtype(#11061, 0, #10545) +ext_argtype(#11062, 0, #10545) +#11582 = @"C_type$_ctypes.PyCArrayType$from_param" +#11583 = @"C_type$_ctypes.PyCArrayType" +ext_argtype(#11582, 0, #11583) +#11584 = @"C_type$_ctypes.PyCFuncPtrType" +ext_argtype(#11582, 0, #11584) +#11585 = @"C_type$_ctypes.PyCStructType" +ext_argtype(#11582, 0, #11585) +#11586 = @"C_type$_ctypes.UnionType" +ext_argtype(#11582, 0, #11586) +ext_argtype(#11582, 1, #11375) +#11587 = @"C_type$_ctypes.PyCArrayType$from_address" +ext_argtype(#11587, 0, #11583) +ext_argtype(#11587, 0, #11584) +ext_argtype(#11587, 0, #11585) +ext_argtype(#11587, 0, #11586) +ext_argtype(#11587, 1, #11375) +#11588 = @"C_type$_ctypes.PyCArrayType$from_buffer" +ext_argtype(#11588, 0, #11583) +ext_argtype(#11588, 0, #11584) +ext_argtype(#11588, 0, #11585) +ext_argtype(#11588, 0, #11586) +#11589 = @"C_type$_ctypes.PyCArrayType$from_buffer_copy" +ext_argtype(#11589, 0, #11583) +ext_argtype(#11589, 0, #11584) +ext_argtype(#11589, 0, #11585) +ext_argtype(#11589, 0, #11586) +#11590 = @"C_type$_ctypes.PyCArrayType$in_dll" +ext_argtype(#11590, 0, #11583) +ext_argtype(#11590, 0, #11584) +ext_argtype(#11590, 0, #11585) +ext_argtype(#11590, 0, #11586) +#11591 = @"C_type$_ctypes.PyCFuncPtrType$from_param" +ext_argtype(#11591, 0, #11583) +ext_argtype(#11591, 0, #11584) +ext_argtype(#11591, 0, #11585) +ext_argtype(#11591, 0, #11586) +ext_argtype(#11591, 1, #11375) +#11592 = @"C_type$_ctypes.PyCFuncPtrType$from_address" +ext_argtype(#11592, 0, #11583) +ext_argtype(#11592, 0, #11584) +ext_argtype(#11592, 0, #11585) +ext_argtype(#11592, 0, #11586) +ext_argtype(#11592, 1, #11375) +#11593 = @"C_type$_ctypes.PyCFuncPtrType$from_buffer" +ext_argtype(#11593, 0, #11583) +ext_argtype(#11593, 0, #11584) +ext_argtype(#11593, 0, #11585) +ext_argtype(#11593, 0, #11586) +#11594 = @"C_type$_ctypes.PyCFuncPtrType$from_buffer_copy" +ext_argtype(#11594, 0, #11583) +ext_argtype(#11594, 0, #11584) +ext_argtype(#11594, 0, #11585) +ext_argtype(#11594, 0, #11586) +#11595 = @"C_type$_ctypes.PyCFuncPtrType$in_dll" +ext_argtype(#11595, 0, #11583) +ext_argtype(#11595, 0, #11584) +ext_argtype(#11595, 0, #11585) +ext_argtype(#11595, 0, #11586) +#11596 = @"C_type$_ctypes.PyCStructType$from_param" +ext_argtype(#11596, 0, #11583) +ext_argtype(#11596, 0, #11584) +ext_argtype(#11596, 0, #11585) +ext_argtype(#11596, 0, #11586) +ext_argtype(#11596, 1, #11375) +#11597 = @"C_type$_ctypes.PyCStructType$from_address" +ext_argtype(#11597, 0, #11583) +ext_argtype(#11597, 0, #11584) +ext_argtype(#11597, 0, #11585) +ext_argtype(#11597, 0, #11586) +ext_argtype(#11597, 1, #11375) +#11598 = @"C_type$_ctypes.PyCStructType$from_buffer" +ext_argtype(#11598, 0, #11583) +ext_argtype(#11598, 0, #11584) +ext_argtype(#11598, 0, #11585) +ext_argtype(#11598, 0, #11586) +#11599 = @"C_type$_ctypes.PyCStructType$from_buffer_copy" +ext_argtype(#11599, 0, #11583) +ext_argtype(#11599, 0, #11584) +ext_argtype(#11599, 0, #11585) +ext_argtype(#11599, 0, #11586) +#11600 = @"C_type$_ctypes.PyCStructType$in_dll" +ext_argtype(#11600, 0, #11583) +ext_argtype(#11600, 0, #11584) +ext_argtype(#11600, 0, #11585) +ext_argtype(#11600, 0, #11586) +#11601 = @"C_type$_ctypes.UnionType$from_param" +ext_argtype(#11601, 0, #11583) +ext_argtype(#11601, 0, #11584) +ext_argtype(#11601, 0, #11585) +ext_argtype(#11601, 0, #11586) +ext_argtype(#11601, 1, #11375) +#11602 = @"C_type$_ctypes.UnionType$from_address" +ext_argtype(#11602, 0, #11583) +ext_argtype(#11602, 0, #11584) +ext_argtype(#11602, 0, #11585) +ext_argtype(#11602, 0, #11586) +ext_argtype(#11602, 1, #11375) +#11603 = @"C_type$_ctypes.UnionType$from_buffer" +ext_argtype(#11603, 0, #11583) +ext_argtype(#11603, 0, #11584) +ext_argtype(#11603, 0, #11585) +ext_argtype(#11603, 0, #11586) +#11604 = @"C_type$_ctypes.UnionType$from_buffer_copy" +ext_argtype(#11604, 0, #11583) +ext_argtype(#11604, 0, #11584) +ext_argtype(#11604, 0, #11585) +ext_argtype(#11604, 0, #11586) +#11605 = @"C_type$_ctypes.UnionType$in_dll" +ext_argtype(#11605, 0, #11583) +ext_argtype(#11605, 0, #11584) +ext_argtype(#11605, 0, #11585) +ext_argtype(#11605, 0, #11586) +#11606 = @"C_type$_ctypes._SimpleCData$__ctypes_from_outparam__" +#11607 = @"C_type$_ctypes._SimpleCData" +ext_argtype(#11606, 0, #11607) +#11608 = @"C_type$_ctypes._CData$__ctypes_from_outparam__" +#11609 = @"C_type$_ctypes._CData" +ext_argtype(#11608, 0, #11609) +ext_argtype(#11063, 0, #11609) +ext_argtype(#11064, 0, #11609) +#11610 = @"C_type$_ctypes.PyCPointerType$from_address" +#11611 = @"C_type$_ctypes.PyCPointerType" +ext_argtype(#11610, 0, #11611) +ext_argtype(#11610, 1, #11375) +#11612 = @"C_type$_ctypes.PyCPointerType$from_buffer" +ext_argtype(#11612, 0, #11611) +#11613 = @"C_type$_ctypes.PyCPointerType$from_buffer_copy" +ext_argtype(#11613, 0, #11611) +#11614 = @"C_type$_ctypes.PyCPointerType$in_dll" +ext_argtype(#11614, 0, #11611) +ext_argtype(#11065, 0, #11611) +ext_argtype(#11065, 1, #11375) +ext_argtype(#11066, 0, #11611) +ext_argtype(#11066, 1, #11375) +#11615 = @"C_type$_ctypes.PyCSimpleType" +ext_argtype(#11067, 0, #11615) +ext_argtype(#11067, 1, #11375) +#11616 = @"C_type$_ctypes.PyCSimpleType$from_address" +ext_argtype(#11616, 0, #11615) +ext_argtype(#11616, 1, #11375) +#11617 = @"C_type$_ctypes.PyCSimpleType$from_buffer" +ext_argtype(#11617, 0, #11615) +#11618 = @"C_type$_ctypes.PyCSimpleType$from_buffer_copy" +ext_argtype(#11618, 0, #11615) +#11619 = @"C_type$_ctypes.PyCSimpleType$in_dll" +ext_argtype(#11619, 0, #11615) +#11620 = @"C_type$_lsprof.Profiler$getstats" +#11621 = @"C_type$_lsprof.Profiler" +ext_argtype(#11620, 0, #11621) +ext_argtype(#11068, 0, #11621) +ext_argtype(#11068, 1, #10005) +ext_argtype(#11068, 2, #10005) +ext_argtype(#11069, 0, #11621) +ext_argtype(#11070, 0, #11621) +ext_argtype(#11071, 0, #10575) +#11622 = @"C_type$Element$2get" +ext_argtype(#11622, 0, #10575) +ext_argtype(#11622, 1, #11375) +ext_argtype(#11622, 2, #11375) +ext_argtype(#11072, 0, #10575) +ext_argtype(#11072, 1, #11375) +ext_argtype(#11072, 2, #11375) +ext_argtype(#11073, 0, #10575) +ext_argtype(#11073, 1, #11375) +ext_argtype(#11073, 2, #11375) +ext_argtype(#11074, 0, #10575) +ext_argtype(#11074, 1, #11375) +ext_argtype(#11074, 2, #11375) +ext_argtype(#11074, 3, #11375) +ext_argtype(#11075, 0, #10575) +ext_argtype(#11075, 1, #11375) +ext_argtype(#11075, 2, #11375) +ext_argtype(#11076, 0, #10575) +ext_argtype(#11076, 1, #10575) +ext_argtype(#11077, 0, #10575) +ext_argtype(#11077, 1, #11375) +ext_argtype(#11078, 0, #10575) +ext_argtype(#11078, 1, #10005) +ext_argtype(#11078, 2, #10575) +ext_argtype(#11079, 0, #10575) +ext_argtype(#11079, 1, #10575) +#11623 = @"C_type$Element$2iter" +ext_argtype(#11623, 0, #10575) +ext_argtype(#11623, 1, #11375) +#11624 = @"C_type$Element$2itertext" +ext_argtype(#11624, 0, #10575) +#11625 = @"C_type$Element$2iterfind" +ext_argtype(#11625, 0, #10575) +ext_argtype(#11625, 1, #11375) +ext_argtype(#11625, 2, #11375) +#11626 = @"C_type$Element$2getiterator" +ext_argtype(#11626, 0, #10575) +ext_argtype(#11626, 1, #11375) +ext_argtype(#11080, 0, #10575) +ext_argtype(#11081, 0, #10575) +ext_argtype(#11082, 0, #10575) +ext_argtype(#11083, 0, #10575) +ext_argtype(#11083, 1, #11375) +ext_argtype(#11083, 2, #11375) +ext_argtype(#11084, 0, #10575) +ext_argtype(#11085, 0, #10575) +ext_argtype(#11085, 1, #11375) +ext_argtype(#11086, 0, #10575) +ext_argtype(#11087, 0, #10578) +ext_argtype(#11087, 1, #11375) +ext_argtype(#11088, 0, #10578) +ext_argtype(#11088, 1, #11375) +ext_argtype(#11088, 2, #11375) +#11627 = @"C_type$TreeBuilder$2end" +ext_argtype(#11627, 0, #10578) +ext_argtype(#11627, 1, #11375) +ext_argtype(#11089, 0, #10578) +ext_argtype(#11089, 1, #11375) +ext_argtype(#11089, 2, #11375) +ext_argtype(#11090, 0, #10578) +ext_argtype(#11091, 0, #10580) +ext_argtype(#11091, 1, #10024) +ext_argtype(#11091, 1, #10218) +ext_argtype(#11092, 0, #10580) +ext_argtype(#11093, 0, #10580) +ext_argtype(#11093, 1, #11375) +ext_argtype(#11094, 0, #10580) +ext_argtype(#11094, 1, #10021) +ext_argtype(#11094, 2, #11375) +#11628 = @"C_type$datetime.timedelta$total_seconds" +#11629 = @"C_type$datetime.timedelta" +ext_argtype(#11628, 0, #11629) +ext_argtype(#11095, 0, #11629) +#11630 = @"C_type$datetime.time$isoformat" +#11631 = @"C_type$datetime.time" +ext_argtype(#11630, 0, #11631) +#11632 = @"C_type$datetime.time$strftime" +ext_argtype(#11632, 0, #11631) +ext_argtype(#11096, 0, #11631) +ext_argtype(#11097, 0, #11631) +ext_argtype(#11098, 0, #11631) +ext_argtype(#11099, 0, #11631) +#11633 = @"C_type$datetime.time$replace" +ext_argtype(#11633, 0, #11631) +ext_argtype(#11100, 0, #11631) +#11634 = @"C_type$datetime.tzinfo$tzname" +#11635 = @"C_type$datetime.tzinfo" +ext_argtype(#11634, 0, #11635) +ext_argtype(#11634, 1, #11375) +#11636 = @"C_type$datetime.tzinfo$utcoffset" +ext_argtype(#11636, 0, #11635) +ext_argtype(#11636, 1, #11375) +#11637 = @"C_type$datetime.tzinfo$dst" +ext_argtype(#11637, 0, #11635) +ext_argtype(#11637, 1, #11375) +#11638 = @"C_type$datetime.tzinfo$fromutc" +ext_argtype(#11638, 0, #11635) +ext_argtype(#11638, 1, #11375) +ext_argtype(#11101, 0, #11635) +#11639 = @"C_type$datetime.datetime$now" +#11640 = @"C_type$datetime.datetime" +ext_argtype(#11639, 0, #11640) +#11641 = @"C_type$datetime.datetime$utcnow" +ext_argtype(#11641, 0, #11640) +#11642 = @"C_type$datetime.datetime$fromtimestamp" +ext_argtype(#11642, 0, #11640) +#11643 = @"C_type$datetime.datetime$utcfromtimestamp" +ext_argtype(#11643, 0, #11640) +#11644 = @"C_type$datetime.datetime$strptime" +ext_argtype(#11644, 0, #11640) +#11645 = @"C_type$datetime.datetime$combine" +ext_argtype(#11645, 0, #11640) +#11646 = @"C_type$datetime.datetime$date" +ext_argtype(#11646, 0, #11640) +#11647 = @"C_type$datetime.datetime$time" +ext_argtype(#11647, 0, #11640) +#11648 = @"C_type$datetime.datetime$timetz" +ext_argtype(#11648, 0, #11640) +ext_argtype(#11102, 0, #11640) +#11649 = @"C_type$datetime.datetime$timetuple" +ext_argtype(#11649, 0, #11640) +#11650 = @"C_type$datetime.datetime$utctimetuple" +ext_argtype(#11650, 0, #11640) +#11651 = @"C_type$datetime.datetime$isoformat" +ext_argtype(#11651, 0, #11640) +ext_argtype(#11103, 0, #11640) +ext_argtype(#11104, 0, #11640) +ext_argtype(#11105, 0, #11640) +#11652 = @"C_type$datetime.datetime$replace" +ext_argtype(#11652, 0, #11640) +#11653 = @"C_type$datetime.datetime$astimezone" +ext_argtype(#11653, 0, #11640) +ext_argtype(#11106, 0, #11640) +#11654 = @"C_type$datetime.date$fromtimestamp" +#11655 = @"C_type$datetime.date" +ext_argtype(#11654, 0, #11655) +#11656 = @"C_type$datetime.date$fromordinal" +ext_argtype(#11656, 0, #11655) +#11657 = @"C_type$datetime.date$today" +ext_argtype(#11657, 0, #11655) +ext_argtype(#11107, 0, #11655) +#11658 = @"C_type$datetime.date$strftime" +ext_argtype(#11658, 0, #11655) +ext_argtype(#11108, 0, #11655) +#11659 = @"C_type$datetime.date$timetuple" +ext_argtype(#11659, 0, #11655) +ext_argtype(#11109, 0, #11655) +ext_argtype(#11110, 0, #11655) +ext_argtype(#11111, 0, #11655) +ext_argtype(#11112, 0, #11655) +ext_argtype(#11113, 0, #11655) +#11660 = @"C_type$datetime.date$replace" +ext_argtype(#11660, 0, #11655) +ext_argtype(#11114, 0, #11655) +#11661 = @"C_type$_ast.AST" +ext_argtype(#11115, 0, #11661) +#11662 = @"C_type$imp.NullImporter" +ext_argtype(#11116, 0, #11662) +ext_argtype(#11117, 0, #11119) +#11663 = @"C_type$xrange" +ext_argtype(#11118, 0, #11663) +ext_argtype(#11120, 0, #11663) +#11664 = @"C_type$reversed" +ext_argtype(#11121, 0, #11664) +ext_argtype(#11122, 0, #10024) +ext_argtype(#11122, 1, #11375) +ext_argtype(#11123, 0, #10024) +ext_argtype(#11124, 0, #10024) +ext_argtype(#11125, 0, #10024) +ext_argtype(#11126, 0, #10024) +ext_argtype(#11127, 0, #10024) +ext_argtype(#11128, 0, #10024) +ext_argtype(#11129, 0, #10024) +ext_argtype(#11130, 0, #10024) +ext_argtype(#11131, 0, #10024) +ext_argtype(#11132, 0, #10024) +ext_argtype(#11133, 0, #10024) +ext_argtype(#11134, 0, #10024) +ext_argtype(#11135, 0, #10024) +ext_argtype(#11136, 0, #10024) +ext_argtype(#11137, 0, #10024) +ext_argtype(#11137, 1, #11375) +ext_argtype(#11138, 0, #10024) +ext_argtype(#11139, 0, #10024) +ext_argtype(#11140, 0, #10024) +ext_argtype(#11141, 0, #10024) +ext_argtype(#11142, 0, #10024) +ext_argtype(#11143, 0, #10024) +ext_argtype(#11144, 0, #10024) +ext_argtype(#11145, 0, #10024) +ext_argtype(#11145, 1, #11375) +ext_argtype(#11146, 0, #10024) +ext_argtype(#11147, 0, #10024) +ext_argtype(#11148, 0, #10024) +ext_argtype(#11149, 0, #10024) +ext_argtype(#11150, 0, #10024) +ext_argtype(#11151, 0, #10024) +ext_argtype(#11152, 0, #10024) +ext_argtype(#11153, 0, #10024) +ext_argtype(#11154, 0, #10024) +#11665 = @"C_type$str$2format" +ext_argtype(#11665, 0, #10024) +ext_argtype(#11155, 0, #10024) +ext_argtype(#11156, 0, #10024) +ext_argtype(#11157, 0, #10024) +#11666 = @"C_type$str$2encode" +ext_argtype(#11666, 0, #10024) +#11667 = @"C_type$str$2decode" +ext_argtype(#11667, 0, #10024) +ext_argtype(#11159, 0, #10024) +ext_argtype(#11160, 0, #10024) +ext_argtype(#11161, 0, #10024) +ext_argtype(#11162, 0, #10024) +ext_argtype(#11163, 0, #10602) +#11668 = @"C_type$exceptions.BaseException" +ext_argtype(#11164, 0, #11668) +ext_argtype(#11165, 0, #11668) +ext_argtype(#11165, 1, #11375) +ext_argtype(#11166, 0, #11668) +#11669 = @"C_type$exceptions.EnvironmentError" +ext_argtype(#11167, 0, #11669) +ext_argtype(#11168, 0, #10250) +#11670 = @"C_type$file$2read" +ext_argtype(#11670, 0, #10250) +ext_argtype(#11169, 0, #10250) +ext_argtype(#11170, 0, #10250) +ext_argtype(#11171, 0, #10250) +ext_argtype(#11172, 0, #10250) +ext_argtype(#11173, 0, #10250) +ext_argtype(#11174, 0, #10250) +ext_argtype(#11175, 0, #10250) +ext_argtype(#11176, 0, #10250) +ext_argtype(#11177, 0, #10250) +ext_argtype(#11177, 1, #11375) +ext_argtype(#11178, 0, #10250) +ext_argtype(#11179, 0, #10250) +ext_argtype(#11180, 0, #10250) +ext_argtype(#11181, 0, #10250) +ext_argtype(#11182, 0, #10250) +ext_argtype(#11183, 0, #10005) +ext_argtype(#11184, 0, #10005) +ext_argtype(#11185, 0, #10005) +ext_argtype(#11186, 0, #10005) +ext_argtype(#11187, 0, #10005) +ext_argtype(#11187, 1, #11375) +#11671 = @"C_type$listiterator" +ext_argtype(#11188, 0, #11671) +ext_argtype(#11189, 0, #11192) +ext_argtype(#11190, 0, #10021) +ext_argtype(#11190, 1, #11375) +ext_argtype(#11191, 0, #10021) +ext_argtype(#11193, 0, #10021) +ext_argtype(#11194, 0, #10021) +ext_argtype(#11194, 1, #11375) +ext_argtype(#11195, 0, #10021) +ext_argtype(#11195, 1, #10005) +ext_argtype(#11195, 2, #11375) +ext_argtype(#11196, 0, #10021) +ext_argtype(#11196, 1, #11375) +#11672 = @"C_type$list$2pop" +ext_argtype(#11672, 0, #10021) +ext_argtype(#11672, 1, #10005) +ext_argtype(#11197, 0, #10021) +ext_argtype(#11197, 1, #11375) +ext_argtype(#11198, 0, #10021) +ext_argtype(#11198, 1, #11375) +ext_argtype(#11198, 2, #11375) +ext_argtype(#11198, 3, #11375) +ext_argtype(#11199, 0, #10021) +ext_argtype(#11199, 1, #11375) +ext_argtype(#11200, 0, #10021) +ext_argtype(#11201, 0, #10021) +ext_argtype(#11201, 1, #11375) +ext_argtype(#11201, 2, #11375) +ext_argtype(#11201, 3, #10005) +#11673 = @"C_type$slice" +ext_argtype(#11202, 0, #11673) +ext_argtype(#11202, 1, #11375) +ext_argtype(#11203, 0, #11673) +#11674 = @"C_type$dictionary-keyiterator" +ext_argtype(#11204, 0, #11674) +#11675 = @"C_type$dictionary-valueiterator" +ext_argtype(#11204, 0, #11675) +#11676 = @"C_type$dictionary-itemiterator" +ext_argtype(#11204, 0, #11676) +ext_argtype(#11205, 0, #11674) +ext_argtype(#11205, 0, #11675) +ext_argtype(#11205, 0, #11676) +ext_argtype(#11206, 0, #11674) +ext_argtype(#11206, 0, #11675) +ext_argtype(#11206, 0, #11676) +ext_argtype(#11207, 0, #10007) +ext_argtype(#11207, 1, #11375) +#11677 = @"C_type$dict$2__getitem__" +ext_argtype(#11677, 0, #10007) +ext_argtype(#11677, 1, #11375) +ext_argtype(#11208, 0, #10007) +ext_argtype(#11209, 0, #10007) +ext_argtype(#11209, 1, #11375) +#11678 = @"C_type$dict$2get" +ext_argtype(#11678, 0, #10007) +#11679 = @"C_type$dict$2setdefault" +ext_argtype(#11679, 0, #10007) +#11680 = @"C_type$dict$2pop" +ext_argtype(#11680, 0, #10007) +ext_argtype(#11210, 0, #10007) +ext_argtype(#11211, 0, #10007) +ext_argtype(#11212, 0, #10007) +ext_argtype(#11213, 0, #10007) +#11681 = @"C_type$dict$2viewkeys" +ext_argtype(#11681, 0, #10007) +#11682 = @"C_type$dict$2viewitems" +ext_argtype(#11682, 0, #10007) +#11683 = @"C_type$dict$2viewvalues" +ext_argtype(#11683, 0, #10007) +ext_argtype(#11214, 0, #10007) +#11684 = @"C_type$dict$2fromkeys" +ext_argtype(#11684, 0, #10007) +ext_argtype(#11215, 0, #10007) +ext_argtype(#11216, 0, #10007) +#11685 = @"C_type$dict$2iterkeys" +ext_argtype(#11685, 0, #10007) +#11686 = @"C_type$dict$2itervalues" +ext_argtype(#11686, 0, #10007) +#11687 = @"C_type$dict$2iteritems" +ext_argtype(#11687, 0, #10007) +#11688 = @"C_type$long" +ext_argtype(#11217, 0, #11688) +ext_argtype(#11218, 0, #11688) +ext_argtype(#11219, 0, #11688) +ext_argtype(#11220, 0, #11688) +ext_argtype(#11221, 0, #11688) +ext_argtype(#11221, 1, #11375) +ext_argtype(#11222, 0, #11688) +#11689 = @"C_type$generator$2send" +#11690 = @"C_type$generator" +ext_argtype(#11689, 0, #11690) +ext_argtype(#11689, 1, #11375) +#11691 = @"C_type$generator$2throw" +ext_argtype(#11691, 0, #11690) +ext_argtype(#11223, 0, #11690) +#11692 = @"C_type$weakproxy$2__unicode__" +#11693 = @"C_type$weakproxy" +ext_argtype(#11692, 0, #11693) +ext_argtype(#11224, 0, #10517) +ext_argtype(#11225, 0, #10517) +ext_argtype(#11226, 0, #10517) +ext_argtype(#11226, 1, #11375) +ext_argtype(#11227, 0, #10492) +ext_argtype(#11228, 0, #10492) +ext_argtype(#11229, 0, #10492) +ext_argtype(#11229, 1, #11375) +ext_argtype(#11230, 0, #10492) +ext_argtype(#11230, 1, #11375) +ext_argtype(#11231, 0, #11375) +ext_argtype(#11231, 1, #10005) +ext_argtype(#11232, 0, #11375) +ext_argtype(#11232, 1, #10005) +#11694 = @"C_type$object$2__subclasshook__" +ext_argtype(#11694, 0, #11375) +ext_argtype(#11233, 0, #11375) +ext_argtype(#11233, 1, #11375) +ext_argtype(#11234, 0, #11375) +#11695 = @"C_type$setiterator" +ext_argtype(#11235, 0, #11695) +ext_argtype(#11236, 0, #11239) +ext_argtype(#11236, 1, #11375) +ext_argtype(#11237, 0, #11239) +ext_argtype(#11240, 0, #11239) +ext_argtype(#11241, 0, #11239) +ext_argtype(#11242, 0, #11239) +ext_argtype(#11242, 1, #11375) +ext_argtype(#11243, 0, #11239) +ext_argtype(#11243, 1, #11375) +ext_argtype(#11244, 0, #11239) +ext_argtype(#11244, 1, #11375) +ext_argtype(#11245, 0, #11239) +ext_argtype(#11246, 0, #11239) +ext_argtype(#11247, 0, #11239) +ext_argtype(#11247, 1, #11375) +ext_argtype(#11248, 0, #11239) +ext_argtype(#11249, 0, #11238) +ext_argtype(#11249, 1, #11375) +ext_argtype(#11250, 0, #11238) +ext_argtype(#11251, 0, #11238) +ext_argtype(#11251, 1, #11375) +ext_argtype(#11252, 0, #11238) +ext_argtype(#11253, 0, #11238) +ext_argtype(#11253, 1, #11375) +ext_argtype(#11254, 0, #11238) +ext_argtype(#11255, 0, #11238) +ext_argtype(#11256, 0, #11238) +ext_argtype(#11257, 0, #11238) +ext_argtype(#11258, 0, #11238) +ext_argtype(#11258, 1, #11375) +ext_argtype(#11259, 0, #11238) +ext_argtype(#11259, 1, #11375) +ext_argtype(#11260, 0, #11238) +ext_argtype(#11260, 1, #11375) +#11696 = @"C_type$set$2pop" +ext_argtype(#11696, 0, #11238) +ext_argtype(#11261, 0, #11238) +ext_argtype(#11262, 0, #11238) +ext_argtype(#11262, 1, #11375) +ext_argtype(#11263, 0, #11238) +ext_argtype(#11264, 0, #11238) +ext_argtype(#11264, 1, #11375) +ext_argtype(#11265, 0, #11238) +ext_argtype(#11265, 1, #11375) +ext_argtype(#11266, 0, #11238) +ext_argtype(#11267, 0, #11238) +ext_argtype(#11268, 0, #10655) +ext_argtype(#11269, 0, #10038) +ext_argtype(#11270, 0, #10038) +ext_argtype(#11271, 0, #10038) +#11697 = @"C_type$float$2fromhex" +ext_argtype(#11697, 0, #10038) +ext_argtype(#11697, 1, #11375) +ext_argtype(#11272, 0, #10038) +ext_argtype(#11273, 0, #10038) +ext_argtype(#11274, 0, #10038) +ext_argtype(#11275, 0, #10038) +ext_argtype(#11275, 1, #11375) +ext_argtype(#11276, 0, #10038) +ext_argtype(#11276, 1, #10024) +ext_argtype(#11276, 1, #10218) +ext_argtype(#11276, 2, #10024) +ext_argtype(#11276, 2, #10218) +ext_argtype(#11277, 0, #10038) +ext_argtype(#11277, 1, #11375) +#11698 = @"C_type$dictproxy" +ext_argtype(#11278, 0, #11698) +ext_argtype(#11278, 1, #11375) +#11699 = @"C_type$dictproxy$2get" +ext_argtype(#11699, 0, #11698) +#11700 = @"C_type$dictproxy$2keys" +ext_argtype(#11700, 0, #11698) +#11701 = @"C_type$dictproxy$2values" +ext_argtype(#11701, 0, #11698) +#11702 = @"C_type$dictproxy$2items" +ext_argtype(#11702, 0, #11698) +#11703 = @"C_type$dictproxy$2iterkeys" +ext_argtype(#11703, 0, #11698) +#11704 = @"C_type$dictproxy$2itervalues" +ext_argtype(#11704, 0, #11698) +#11705 = @"C_type$dictproxy$2iteritems" +ext_argtype(#11705, 0, #11698) +#11706 = @"C_type$dictproxy$2copy" +ext_argtype(#11706, 0, #11698) +#11707 = @"C_type$property$2getter" +#11708 = @"C_type$property" +ext_argtype(#11707, 0, #11708) +ext_argtype(#11707, 1, #11375) +#11709 = @"C_type$property$2setter" +ext_argtype(#11709, 0, #11708) +ext_argtype(#11709, 1, #11375) +#11710 = @"C_type$property$2deleter" +ext_argtype(#11710, 0, #11708) +ext_argtype(#11710, 1, #11375) +#11711 = @"C_type$bytearray_iterator" +ext_argtype(#11279, 0, #11711) +ext_argtype(#11280, 0, #11285) +ext_argtype(#11281, 0, #11285) +ext_argtype(#11282, 0, #11285) +ext_argtype(#11283, 0, #11285) +ext_argtype(#11283, 1, #11375) +ext_argtype(#11284, 0, #11285) +ext_argtype(#11286, 0, #11285) +ext_argtype(#11287, 0, #11285) +#11712 = @"C_type$bytearray$2decode" +ext_argtype(#11712, 0, #11285) +ext_argtype(#11288, 0, #11285) +ext_argtype(#11289, 0, #11285) +ext_argtype(#11290, 0, #11285) +ext_argtype(#11290, 1, #11375) +ext_argtype(#11291, 0, #11285) +ext_argtype(#11292, 0, #11285) +ext_argtype(#11293, 0, #11285) +ext_argtype(#11294, 0, #11285) +ext_argtype(#11295, 0, #11285) +ext_argtype(#11296, 0, #11285) +ext_argtype(#11297, 0, #11285) +ext_argtype(#11298, 0, #11285) +ext_argtype(#11299, 0, #11285) +ext_argtype(#11300, 0, #11285) +ext_argtype(#11301, 0, #11285) +ext_argtype(#11302, 0, #11285) +ext_argtype(#11302, 1, #11375) +ext_argtype(#11303, 0, #11285) +ext_argtype(#11304, 0, #11285) +ext_argtype(#11305, 0, #11285) +ext_argtype(#11306, 0, #11285) +ext_argtype(#11306, 1, #11375) +ext_argtype(#11307, 0, #11285) +ext_argtype(#11308, 0, #11285) +ext_argtype(#11308, 1, #11375) +ext_argtype(#11309, 0, #11285) +ext_argtype(#11310, 0, #11285) +ext_argtype(#11311, 0, #11285) +ext_argtype(#11312, 0, #11285) +ext_argtype(#11313, 0, #11285) +ext_argtype(#11314, 0, #11285) +ext_argtype(#11314, 1, #11375) +ext_argtype(#11315, 0, #11285) +ext_argtype(#11316, 0, #11285) +ext_argtype(#11317, 0, #11285) +ext_argtype(#11318, 0, #11285) +ext_argtype(#11319, 0, #11285) +ext_argtype(#11320, 0, #11285) +ext_argtype(#11321, 0, #11285) +ext_argtype(#11322, 0, #11285) +ext_argtype(#11323, 0, #11285) +ext_argtype(#11324, 0, #11285) +ext_argtype(#11325, 0, #11285) +#11713 = @"C_type$unicode$2encode" +ext_argtype(#11713, 0, #10218) +ext_argtype(#11326, 0, #10218) +ext_argtype(#11327, 0, #10218) +ext_argtype(#11328, 0, #10218) +ext_argtype(#11329, 0, #10218) +ext_argtype(#11329, 1, #11375) +ext_argtype(#11330, 0, #10218) +ext_argtype(#11331, 0, #10218) +ext_argtype(#11332, 0, #10218) +ext_argtype(#11333, 0, #10218) +ext_argtype(#11334, 0, #10218) +ext_argtype(#11335, 0, #10218) +ext_argtype(#11336, 0, #10218) +ext_argtype(#11336, 1, #11375) +ext_argtype(#11337, 0, #10218) +ext_argtype(#11338, 0, #10218) +ext_argtype(#11339, 0, #10218) +ext_argtype(#11340, 0, #10218) +#11714 = @"C_type$unicode$2decode" +ext_argtype(#11714, 0, #10218) +ext_argtype(#11341, 0, #10218) +ext_argtype(#11342, 0, #10218) +ext_argtype(#11343, 0, #10218) +ext_argtype(#11344, 0, #10218) +ext_argtype(#11345, 0, #10218) +ext_argtype(#11345, 1, #11375) +ext_argtype(#11346, 0, #10218) +ext_argtype(#11347, 0, #10218) +ext_argtype(#11348, 0, #10218) +#11715 = @"C_type$unicode$2translate" +ext_argtype(#11715, 0, #10218) +ext_argtype(#11715, 1, #11375) +ext_argtype(#11349, 0, #10218) +ext_argtype(#11350, 0, #10218) +ext_argtype(#11351, 0, #10218) +ext_argtype(#11352, 0, #10218) +ext_argtype(#11353, 0, #10218) +ext_argtype(#11354, 0, #10218) +ext_argtype(#11355, 0, #10218) +ext_argtype(#11356, 0, #10218) +ext_argtype(#11357, 0, #10218) +ext_argtype(#11358, 0, #10218) +ext_argtype(#11359, 0, #10218) +ext_argtype(#11360, 0, #10218) +ext_argtype(#11361, 0, #10218) +#11716 = @"C_type$unicode$2format" +ext_argtype(#11716, 0, #10218) +ext_argtype(#11362, 0, #10218) +ext_argtype(#11363, 0, #10218) +ext_argtype(#11364, 0, #10218) +ext_argtype(#11365, 0, #10218) +ext_argtype(#11366, 0, #10218) +#11717 = @"C_type$EncodingMap" +ext_argtype(#11367, 0, #11717) +#11718 = @"C_type$memoryview" +ext_argtype(#11368, 0, #11718) +ext_argtype(#11369, 0, #11718) +#11719 = @"C_type$tupleiterator" +ext_argtype(#11370, 0, #11719) +ext_argtype(#11371, 0, #10001) +ext_argtype(#11372, 0, #10001) +ext_argtype(#11373, 0, #10001) +ext_argtype(#11373, 1, #11375) +ext_argtype(#11373, 2, #11375) +ext_argtype(#11373, 3, #11375) +ext_argtype(#11374, 0, #10001) +ext_argtype(#11374, 1, #11375) +ext_argreturn(#11428, 1) +ext_argreturn(#11429, 1) +ext_argreturn(#11608, 0) +#11720 = @"C_type$_multiprocessing.Connection$closed" +ext_proptype(#11720, #10058) +#11721 = @"C_type$_multiprocessing.Connection$readable" +ext_proptype(#11721, #10058) +#11722 = @"C_type$_multiprocessing.Connection$writable" +ext_proptype(#11722, #10058) +#11723 = @"C_type$_ssl._SSLContext$check_hostname" +ext_proptype(#11723, #10058) +#11724 = @"C_type$_ssl._SSLContext$options" +ext_proptype(#11724, #10005) +#11725 = @"C_type$_ssl._SSLContext$verify_flags" +ext_proptype(#11725, #10005) +#11726 = @"C_type$_ssl._SSLContext$verify_mode" +ext_proptype(#11726, #10005) +#11727 = @"C_type$_sre.SRE_Match$lastindex" +ext_proptype(#11727, #10005) +ext_proptype(#11727, #10003) +#11728 = @"C_type$_sre.SRE_Match$lastgroup" +ext_proptype(#11728, #10003) +#11729 = @"C_type$_sre.SRE_Match$regs" +ext_proptype(#11729, #10001) +#11730 = @"C_type$MultibyteIncrementalEncoder$2errors" +ext_proptype(#11730, #10024) +#11731 = @"C_type$MultibyteIncrementalDecoder$2errors" +ext_proptype(#11731, #10024) +#11732 = @"C_type$MultibyteStreamReader$2errors" +ext_proptype(#11732, #10024) +#11733 = @"C_type$MultibyteStreamWriter$2errors" +ext_proptype(#11733, #10024) +#11734 = @"C_type$collections.deque$maxlen" +ext_proptype(#11734, #10005) +ext_proptype(#11734, #10003) +#11735 = @"C_type$_csv.Dialect$escapechar" +ext_proptype(#11735, #10024) +ext_proptype(#11735, #10003) +#11736 = @"C_type$_csv.Dialect$quotechar" +ext_proptype(#11736, #10024) +ext_proptype(#11736, #10003) +#11737 = @"C_type$_csv.Dialect$quoting" +ext_proptype(#11737, #10005) +#11738 = @"C_type$array.array$typecode" +ext_proptype(#11738, #10024) +#11739 = @"C_type$array.array$itemsize" +ext_proptype(#11739, #10005) +#11740 = @"C_type$cStringIO.StringO$closed" +ext_proptype(#11740, #10058) +#11741 = @"C_type$cStringIO.StringI$closed" +ext_proptype(#11741, #10058) +#11742 = @"C_type$Struct$2size" +ext_proptype(#11742, #10005) +#11743 = @"C_type$xxsubtype.spamlist$state" +ext_proptype(#11743, #10005) +#11744 = @"C_type$_hashlib.HASH$digest_size" +ext_proptype(#11744, #10005) +#11745 = @"C_type$_hashlib.HASH$block_size" +ext_proptype(#11745, #10005) +#11746 = @"C_type$_hashlib.HASH$digestsize" +ext_proptype(#11746, #10005) +#11747 = @"C_type$bz2.BZ2File$closed" +ext_proptype(#11747, #10005) +#11748 = @"C_type$bz2.BZ2File$newlines" +ext_proptype(#11748, #10001) +ext_proptype(#11748, #10024) +ext_proptype(#11748, #10003) +#11749 = @"C_type$select.epoll$closed" +ext_proptype(#11749, #10058) +#11750 = @"C_type$_io.BytesIO$closed" +ext_proptype(#11750, #10058) +#11751 = @"C_type$_io._IOBase$closed" +ext_proptype(#11751, #10058) +#11752 = @"C_type$_io.StringIO$closed" +ext_proptype(#11752, #10058) +#11753 = @"C_type$_io.StringIO$newlines" +ext_proptype(#11753, #10003) +#11754 = @"C_type$_io.StringIO$line_buffering" +ext_proptype(#11754, #10058) +#11755 = @"C_type$_io.FileIO$closed" +ext_proptype(#11755, #10058) +#11756 = @"C_type$_io.FileIO$closefd" +ext_proptype(#11756, #10058) +#11757 = @"C_type$_io.FileIO$mode" +ext_proptype(#11757, #10218) +#11758 = @"C_type$_io._TextIOBase$encoding" +ext_proptype(#11758, #10003) +#11759 = @"C_type$_io._TextIOBase$newlines" +ext_proptype(#11759, #10003) +#11760 = @"C_type$_io._TextIOBase$errors" +ext_proptype(#11760, #10003) +#11761 = @"C_type$_io.IncrementalNewlineDecoder$newlines" +ext_proptype(#11761, #10001) +ext_proptype(#11761, #10218) +ext_proptype(#11761, #10003) +#11762 = @"C_type$_io.TextIOWrapper$newlines" +ext_proptype(#11762, #10003) +#11763 = @"C_type$_io.TextIOWrapper$_CHUNK_SIZE" +ext_proptype(#11763, #10005) +#11764 = @"C_type$_ctypes.CField$offset" +ext_proptype(#11764, #10005) +#11765 = @"C_type$_ctypes.CField$size" +ext_proptype(#11765, #10005) +#11766 = @"C_type$_ctypes.PyCFuncPtr$errcheck" +ext_proptype(#11766, #10003) +#11767 = @"C_type$_ctypes.PyCFuncPtr$restype" +ext_proptype(#11767, #10003) +#11768 = @"C_type$_ctypes.PyCFuncPtr$argtypes" +ext_proptype(#11768, #10003) +#11769 = @"C_type$datetime.time$hour" +ext_proptype(#11769, #10005) +#11770 = @"C_type$datetime.time$minute" +ext_proptype(#11770, #10005) +#11771 = @"C_type$datetime.time$second" +ext_proptype(#11771, #10005) +#11772 = @"C_type$datetime.time$microsecond" +ext_proptype(#11772, #10005) +#11773 = @"C_type$datetime.datetime$hour" +ext_proptype(#11773, #10005) +#11774 = @"C_type$datetime.datetime$minute" +ext_proptype(#11774, #10005) +#11775 = @"C_type$datetime.datetime$second" +ext_proptype(#11775, #10005) +#11776 = @"C_type$datetime.datetime$microsecond" +ext_proptype(#11776, #10005) +#11777 = @"C_type$datetime.date$year" +ext_proptype(#11777, #10005) +#11778 = @"C_type$datetime.date$month" +ext_proptype(#11778, #10005) +#11779 = @"C_type$datetime.date$day" +ext_proptype(#11779, #10005) +#11780 = @"C_type$frame$2f_lineno" +ext_proptype(#11780, #10005) +#11781 = @"C_type$frame$2f_trace" +ext_proptype(#11781, #10003) +#11782 = @"C_type$frame$2f_restricted" +ext_proptype(#11782, #10058) +#11783 = @"C_type$frame$2f_exc_traceback" +ext_proptype(#11783, #10003) +#11784 = @"C_type$frame$2f_exc_type" +ext_proptype(#11784, #10003) +#11785 = @"C_type$frame$2f_exc_value" +ext_proptype(#11785, #10003) +#11786 = @"C_type$exceptions.BaseException$args" +ext_proptype(#11786, #10003) +#11787 = @"C_type$file$2closed" +ext_proptype(#11787, #10058) +#11788 = @"C_type$file$2newlines" +ext_proptype(#11788, #10001) +ext_proptype(#11788, #10024) +ext_proptype(#11788, #10003) +#11789 = @"C_type$file$2softspace" +ext_proptype(#11789, #10005) +#11790 = @"C_type$int$2real" +ext_proptype(#11790, #10005) +#11791 = @"C_type$int$2imag" +ext_proptype(#11791, #10005) +#11792 = @"C_type$int$2numerator" +ext_proptype(#11792, #10005) +#11793 = @"C_type$int$2denominator" +ext_proptype(#11793, #10005) +#11794 = @"C_type$long$2real" +ext_proptype(#11794, #10005) +#11795 = @"C_type$long$2imag" +ext_proptype(#11795, #10005) +#11796 = @"C_type$long$2numerator" +ext_proptype(#11796, #10005) +#11797 = @"C_type$long$2denominator" +ext_proptype(#11797, #10005) +#11798 = @"C_type$type$2__name__" +ext_proptype(#11798, #10024) +#11799 = @"C_type$type$2__module__" +ext_proptype(#11799, #10024) +#11800 = @"C_type$type$2__dict__" +ext_proptype(#11800, #11698) +ext_proptype(#11800, #10003) +#11801 = @"C_type$type$2__doc__" +ext_proptype(#11801, #10024) +ext_proptype(#11801, #10003) +#11802 = @"C_type$function$2func_defaults" +ext_proptype(#11802, #10003) +#11803 = @"C_type$function$2__defaults__" +ext_proptype(#11803, #10003) +#11804 = @"C_type$float$2real" +ext_proptype(#11804, #10038) +#11805 = @"C_type$float$2imag" +ext_proptype(#11805, #10038) +#11806 = @"C_type$builtin_function_or_method$2__doc__" +ext_proptype(#11806, #10024) +ext_proptype(#11806, #10003) +#11807 = @"C_type$builtin_function_or_method$2__name__" +ext_proptype(#11807, #10024) +#11808 = @"C_type$builtin_function_or_method$2__self__" +ext_proptype(#11808, #10003) +#11809 = @"C_type$method-wrapper$__name__" +ext_proptype(#11809, #10024) +#11810 = @"C_type$method-wrapper$__doc__" +ext_proptype(#11810, #10024) +ext_proptype(#11810, #10003) +#11811 = @"C_type$method_descriptor$2__doc__" +ext_proptype(#11811, #10024) +ext_proptype(#11811, #10003) +#11812 = @"C_type$classmethod_descriptor$2__doc__" +ext_proptype(#11812, #10024) +ext_proptype(#11812, #10003) +#11813 = @"C_type$member_descriptor$2__doc__" +ext_proptype(#11813, #10024) +ext_proptype(#11813, #10003) +#11814 = @"C_type$getset_descriptor$2__doc__" +ext_proptype(#11814, #10024) +ext_proptype(#11814, #10003) +#11815 = @"C_type$wrapper_descriptor$2__doc__" +ext_proptype(#11815, #10024) +ext_proptype(#11815, #10003) +#11816 = @"C_type$memoryview$2format" +ext_proptype(#11816, #10024) +#11817 = @"C_type$memoryview$2itemsize" +ext_proptype(#11817, #10005) +#11818 = @"C_type$memoryview$2shape" +ext_proptype(#11818, #10001) +ext_proptype(#11818, #10003) +#11819 = @"C_type$memoryview$2strides" +ext_proptype(#11819, #10001) +ext_proptype(#11819, #10003) +#11820 = @"C_type$memoryview$2suboffsets" +ext_proptype(#11820, #10001) +ext_proptype(#11820, #10003) +#11821 = @"C_type$memoryview$2readonly" +ext_proptype(#11821, #10058) +#11822 = @"C_type$memoryview$2ndim" +ext_proptype(#11822, #10005) +py_cobjects(#11441) +py_cobjects(#11439) +py_cobjects(#10691) +py_cobjects(#11443) +py_cobjects(#11285) +py_cobjects(#11444) +py_cobjects(#11448) +py_cobjects(#11449) +py_cobjects(#10021) +py_cobjects(#10492) +py_cobjects(#10017) +py_cobjects(#10001) +py_cobjects(#10056) +py_cobjects(#11454) +py_cobjects(#11456) +py_cobjects(#11457) +py_cobjects(#11458) +#11823 = @"C_type$operator.itemgetter" +py_cobjects(#11823) +#11824 = @"C_type$operator.attrgetter" +py_cobjects(#11824) +#11825 = @"C_type$operator.methodcaller" +py_cobjects(#11825) +py_cobjects(#11460) +py_cobjects(#11459) +py_cobjects(#10761) +py_cobjects(#11465) +py_cobjects(#10007) +py_cobjects(#10085) +py_cobjects(#10102) +#11826 = @"C_type$itertools._grouper" +py_cobjects(#11826) +#11827 = @"C_type$itertools.groupby" +py_cobjects(#11827) +#11828 = @"C_type$itertools.tee_dataobject" +py_cobjects(#11828) +py_cobjects(#10794) +#11829 = @"C_type$itertools.cycle" +py_cobjects(#11829) +#11830 = @"C_type$itertools.dropwhile" +py_cobjects(#11830) +#11831 = @"C_type$itertools.takewhile" +py_cobjects(#11831) +#11832 = @"C_type$itertools.islice" +py_cobjects(#11832) +#11833 = @"C_type$itertools.starmap" +py_cobjects(#11833) +#11834 = @"C_type$itertools.imap" +py_cobjects(#11834) +py_cobjects(#11472) +#11835 = @"C_type$itertools.product" +py_cobjects(#11835) +#11836 = @"C_type$itertools.combinations" +py_cobjects(#11836) +#11837 = @"C_type$itertools.combinations_with_replacement" +py_cobjects(#11837) +#11838 = @"C_type$itertools.permutations" +py_cobjects(#11838) +#11839 = @"C_type$itertools.compress" +py_cobjects(#11839) +#11840 = @"C_type$itertools.ifilter" +py_cobjects(#11840) +py_cobjects(#10058) +#11841 = @"C_type$itertools.ifilterfalse" +py_cobjects(#11841) +py_cobjects(#11473) +#11842 = @"C_type$itertools.izip" +py_cobjects(#11842) +py_cobjects(#11474) +#11843 = @"C_type$itertools.izip_longest" +py_cobjects(#11843) +py_cobjects(#10038) +#11844 = @"C_type$symtable entry" +py_cobjects(#11844) +#11845 = @"C_type$basestring" +py_cobjects(#11845) +#11846 = @"C_type$_csv.Dialect" +py_cobjects(#11846) +py_cobjects(#10165) +py_cobjects(#10167) +py_cobjects(#11476) +py_cobjects(#11673) +#11847 = @"C_type$arrayiterator" +py_cobjects(#11847) +py_cobjects(#11480) +#11848 = @"C_type$instance" +py_cobjects(#11848) +py_cobjects(#11690) +py_cobjects(#11662) +py_cobjects(#10082) +py_cobjects(#10201) +py_cobjects(#10204) +py_cobjects(#10314) +py_cobjects(#10315) +py_cobjects(#11483) +#11849 = @"C_type$cPickle.Pdata" +py_cobjects(#11849) +py_cobjects(#10354) +py_cobjects(#10005) +py_cobjects(#11688) +py_cobjects(#10024) +py_cobjects(#10218) +#11850 = @"C_type$classobj" +py_cobjects(#11850) +#11851 = @"C_type$function" +py_cobjects(#11851) +#11852 = @"C_type$builtin_function_or_method" +py_cobjects(#11852) +py_cobjects(#10356) +py_cobjects(#10250) +py_cobjects(#11486) +py_cobjects(#11412) +py_cobjects(#11489) +py_cobjects(#11490) +py_cobjects(#10370) +py_cobjects(#11492) +py_cobjects(#11495) +py_cobjects(#11498) +py_cobjects(#10384) +#11853 = @"C_type$_thread._localdummy" +py_cobjects(#11853) +py_cobjects(#11375) +#11854 = @"C_type$thread._local" +py_cobjects(#11854) +py_cobjects(#11500) +py_cobjects(#11503) +py_cobjects(#11506) +#11855 = @"C_type$hashinheritancetester" +py_cobjects(#11855) +#11856 = @"C_type$memoryviewtester" +py_cobjects(#11856) +#11857 = @"C_type$test_structmembersType" +py_cobjects(#11857) +py_cobjects(#10497) +py_cobjects(#11508) +py_cobjects(#11549) +py_cobjects(#11558) +py_cobjects(#11511) +py_cobjects(#11563) +py_cobjects(#11560) +py_cobjects(#11509) +py_cobjects(#11559) +py_cobjects(#11516) +py_cobjects(#11530) +py_cobjects(#11538) +py_cobjects(#11523) +py_cobjects(#11570) +py_cobjects(#11568) +#11858 = @"C_type$BlockingIOError" +py_cobjects(#11858) +py_cobjects(#11580) +py_cobjects(#10511) +py_cobjects(#10541) +py_cobjects(#11693) +#11859 = @"C_type$weakcallableproxy" +py_cobjects(#11859) +py_cobjects(#10543) +py_cobjects(#10545) +#11860 = @"C_type$_ctypes.CField" +py_cobjects(#11860) +py_cobjects(#11583) +#11861 = @"C_type$_ctypes.CThunkObject" +py_cobjects(#11861) +#11862 = @"C_type$StgDict" +py_cobjects(#11862) +py_cobjects(#11609) +py_cobjects(#11615) +#11863 = @"C_type$_ctypes.Array" +py_cobjects(#11863) +py_cobjects(#11611) +#11864 = @"C_type$_ctypes._Pointer" +py_cobjects(#11864) +#11865 = @"C_type$_ctypes.PyCFuncPtr" +py_cobjects(#11865) +py_cobjects(#11584) +py_cobjects(#11585) +py_cobjects(#10557) +py_cobjects(#11607) +py_cobjects(#11377) +#11866 = @"C_type$_ctypes.DictRemover" +py_cobjects(#11866) +py_cobjects(#11586) +#11867 = @"C_type$_ctypes.Structure" +py_cobjects(#11867) +#11868 = @"C_type$_ctypes.Union" +py_cobjects(#11868) +py_cobjects(#10618) +py_cobjects(#11621) +#11869 = @"C_type$_json.Scanner" +py_cobjects(#11869) +#11870 = @"C_type$_json.Encoder" +py_cobjects(#11870) +py_cobjects(#10575) +py_cobjects(#10578) +py_cobjects(#10580) +py_cobjects(#11640) +py_cobjects(#11629) +py_cobjects(#11655) +py_cobjects(#11631) +py_cobjects(#11635) +#11871 = @"C_type$instancemethod" +py_cobjects(#11871) +#11872 = @"C_type$traceback" +py_cobjects(#11872) +py_cobjects(#10602) +py_cobjects(#11661) +py_cobjects(#10517) +py_cobjects(#11238) +py_cobjects(#11239) +py_cobjects(#11718) +#11873 = @"C_type$classmethod" +py_cobjects(#11873) +#11874 = @"C_type$enumerate" +py_cobjects(#11874) +py_cobjects(#11708) +py_cobjects(#11664) +#11875 = @"C_type$staticmethod" +py_cobjects(#11875) +#11876 = @"C_type$super" +py_cobjects(#11876) +py_cobjects(#11663) +#11877 = @"C_type$PyCObject" +py_cobjects(#11877) +#11878 = @"C_type$ellipsis" +py_cobjects(#11878) +#11879 = @"C_type$cell" +py_cobjects(#11879) +#11880 = @"C_type$PyCapsule" +py_cobjects(#11880) +py_cobjects(#11711) +py_cobjects(#10655) +py_cobjects(#10656) +py_cobjects(#11674) +py_cobjects(#11675) +py_cobjects(#11676) +#11881 = @"C_type$dict_keys" +py_cobjects(#11881) +#11882 = @"C_type$dict_items" +py_cobjects(#11882) +#11883 = @"C_type$dict_values" +py_cobjects(#11883) +#11884 = @"C_type$wrapper_descriptor" +py_cobjects(#11884) +py_cobjects(#11698) +#11885 = @"C_type$getset_descriptor" +py_cobjects(#11885) +#11886 = @"C_type$member_descriptor" +py_cobjects(#11886) +py_cobjects(#11119) +#11887 = @"C_type$exceptions.TypeError" +py_cobjects(#11887) +#11888 = @"C_type$exceptions.StandardError" +py_cobjects(#11888) +#11889 = @"C_type$exceptions.Exception" +py_cobjects(#11889) +py_cobjects(#11668) +#11890 = @"C_type$exceptions.DeprecationWarning" +py_cobjects(#11890) +#11891 = @"C_type$exceptions.Warning" +py_cobjects(#11891) +#11892 = @"C_type$exceptions.AttributeError" +py_cobjects(#11892) +#11893 = @"C_type$exceptions.StopIteration" +py_cobjects(#11893) +#11894 = @"C_type$exceptions.GeneratorExit" +py_cobjects(#11894) +#11895 = @"C_type$exceptions.SystemExit" +py_cobjects(#11895) +#11896 = @"C_type$exceptions.KeyboardInterrupt" +py_cobjects(#11896) +#11897 = @"C_type$exceptions.ImportError" +py_cobjects(#11897) +py_cobjects(#11669) +#11898 = @"C_type$exceptions.IOError" +py_cobjects(#11898) +#11899 = @"C_type$exceptions.OSError" +py_cobjects(#11899) +#11900 = @"C_type$exceptions.EOFError" +py_cobjects(#11900) +#11901 = @"C_type$exceptions.RuntimeError" +py_cobjects(#11901) +#11902 = @"C_type$exceptions.NotImplementedError" +py_cobjects(#11902) +#11903 = @"C_type$exceptions.NameError" +py_cobjects(#11903) +#11904 = @"C_type$exceptions.UnboundLocalError" +py_cobjects(#11904) +#11905 = @"C_type$exceptions.IndexError" +py_cobjects(#11905) +#11906 = @"C_type$exceptions.LookupError" +py_cobjects(#11906) +#11907 = @"C_type$exceptions.SyntaxError" +py_cobjects(#11907) +#11908 = @"C_type$exceptions.IndentationError" +py_cobjects(#11908) +#11909 = @"C_type$exceptions.TabError" +py_cobjects(#11909) +#11910 = @"C_type$exceptions.KeyError" +py_cobjects(#11910) +#11911 = @"C_type$exceptions.ValueError" +py_cobjects(#11911) +#11912 = @"C_type$exceptions.UnicodeError" +py_cobjects(#11912) +#11913 = @"C_type$exceptions.UnicodeEncodeError" +py_cobjects(#11913) +#11914 = @"C_type$exceptions.UnicodeDecodeError" +py_cobjects(#11914) +#11915 = @"C_type$exceptions.UnicodeTranslateError" +py_cobjects(#11915) +#11916 = @"C_type$exceptions.AssertionError" +py_cobjects(#11916) +#11917 = @"C_type$exceptions.ArithmeticError" +py_cobjects(#11917) +#11918 = @"C_type$exceptions.FloatingPointError" +py_cobjects(#11918) +#11919 = @"C_type$exceptions.OverflowError" +py_cobjects(#11919) +#11920 = @"C_type$exceptions.ZeroDivisionError" +py_cobjects(#11920) +#11921 = @"C_type$exceptions.SystemError" +py_cobjects(#11921) +#11922 = @"C_type$exceptions.ReferenceError" +py_cobjects(#11922) +#11923 = @"C_type$exceptions.MemoryError" +py_cobjects(#11923) +#11924 = @"C_type$exceptions.BufferError" +py_cobjects(#11924) +#11925 = @"C_type$exceptions.UserWarning" +py_cobjects(#11925) +#11926 = @"C_type$exceptions.PendingDeprecationWarning" +py_cobjects(#11926) +#11927 = @"C_type$exceptions.SyntaxWarning" +py_cobjects(#11927) +#11928 = @"C_type$exceptions.RuntimeWarning" +py_cobjects(#11928) +#11929 = @"C_type$exceptions.FutureWarning" +py_cobjects(#11929) +#11930 = @"C_type$exceptions.ImportWarning" +py_cobjects(#11930) +#11931 = @"C_type$exceptions.UnicodeWarning" +py_cobjects(#11931) +#11932 = @"C_type$exceptions.BytesWarning" +py_cobjects(#11932) +py_cobjects(#11671) +py_cobjects(#11192) +#11933 = @"C_type$cmpwrapper" +py_cobjects(#11933) +#11934 = @"C_type$sortwrapper" +py_cobjects(#11934) +#11935 = @"C_type$NotImplementedType" +py_cobjects(#11935) +py_cobjects(#10003) +py_cobjects(#11695) +py_cobjects(#11158) +#11936 = @"C_type$fieldnameiterator" +py_cobjects(#11936) +#11937 = @"C_type$method-wrapper" +py_cobjects(#11937) +#11938 = @"C_type$method_descriptor" +py_cobjects(#11938) +#11939 = @"C_type$classmethod_descriptor" +py_cobjects(#11939) +py_cobjects(#11717) +py_cobjects(#11719) +py_cobjects(#11720) +py_cobjects(#11721) +py_cobjects(#11722) +#11940 = @"C_type$_ssl._SSLSocket$context" +py_cobjects(#11940) +py_cobjects(#11723) +py_cobjects(#11724) +py_cobjects(#11725) +py_cobjects(#11726) +py_cobjects(#11727) +py_cobjects(#11728) +py_cobjects(#11729) +py_cobjects(#11730) +py_cobjects(#11731) +py_cobjects(#11732) +py_cobjects(#11733) +py_cobjects(#11734) +py_cobjects(#11735) +#11941 = @"C_type$_csv.Dialect$lineterminator" +py_cobjects(#11941) +py_cobjects(#11736) +py_cobjects(#11737) +py_cobjects(#11738) +py_cobjects(#11739) +#11942 = @"C_type$_hotshot.ProfilerType$closed" +py_cobjects(#11942) +#11943 = @"C_type$_hotshot.LogReaderType$closed" +py_cobjects(#11943) +py_cobjects(#11740) +py_cobjects(#11741) +#11944 = @"C_type$Struct$2format" +py_cobjects(#11944) +py_cobjects(#11742) +#11945 = @"C_type$cPickle.Pickler$persistent_id" +py_cobjects(#11945) +#11946 = @"C_type$cPickle.Pickler$inst_persistent_id" +py_cobjects(#11946) +#11947 = @"C_type$cPickle.Pickler$memo" +py_cobjects(#11947) +#11948 = @"C_type$cPickle.Pickler$PicklingError" +py_cobjects(#11948) +py_cobjects(#11743) +py_cobjects(#11744) +py_cobjects(#11745) +py_cobjects(#11746) +py_cobjects(#11747) +py_cobjects(#11748) +#11949 = @"C_type$bz2.BZ2File$mode" +py_cobjects(#11949) +#11950 = @"C_type$bz2.BZ2File$name" +py_cobjects(#11950) +py_cobjects(#11749) +py_cobjects(#11750) +#11951 = @"C_type$_io.BufferedReader$closed" +py_cobjects(#11951) +#11952 = @"C_type$_io.BufferedReader$name" +py_cobjects(#11952) +#11953 = @"C_type$_io.BufferedReader$mode" +py_cobjects(#11953) +#11954 = @"C_type$_io.BufferedRandom$closed" +py_cobjects(#11954) +#11955 = @"C_type$_io.BufferedRandom$name" +py_cobjects(#11955) +#11956 = @"C_type$_io.BufferedRandom$mode" +py_cobjects(#11956) +#11957 = @"C_type$_io.BufferedWriter$closed" +py_cobjects(#11957) +#11958 = @"C_type$_io.BufferedWriter$name" +py_cobjects(#11958) +#11959 = @"C_type$_io.BufferedWriter$mode" +py_cobjects(#11959) +#11960 = @"C_type$_io.BufferedRWPair$closed" +py_cobjects(#11960) +py_cobjects(#11751) +py_cobjects(#11752) +py_cobjects(#11753) +py_cobjects(#11754) +py_cobjects(#11755) +py_cobjects(#11756) +py_cobjects(#11757) +py_cobjects(#11758) +py_cobjects(#11759) +py_cobjects(#11760) +py_cobjects(#11761) +#11961 = @"C_type$_io.TextIOWrapper$name" +py_cobjects(#11961) +#11962 = @"C_type$_io.TextIOWrapper$closed" +py_cobjects(#11962) +py_cobjects(#11762) +#11963 = @"C_type$_io.TextIOWrapper$errors" +py_cobjects(#11963) +py_cobjects(#11763) +#11964 = @"C_type$functools.partial$__dict__" +py_cobjects(#11964) +py_cobjects(#11764) +py_cobjects(#11765) +#11965 = @"C_type$_ctypes._Pointer$contents" +py_cobjects(#11965) +py_cobjects(#11766) +py_cobjects(#11767) +py_cobjects(#11768) +#11966 = @"C_type$_ctypes._SimpleCData$value" +py_cobjects(#11966) +py_cobjects(#11769) +py_cobjects(#11770) +py_cobjects(#11771) +py_cobjects(#11772) +#11967 = @"C_type$datetime.time$tzinfo" +py_cobjects(#11967) +py_cobjects(#11773) +py_cobjects(#11774) +py_cobjects(#11775) +py_cobjects(#11776) +#11968 = @"C_type$datetime.datetime$tzinfo" +py_cobjects(#11968) +py_cobjects(#11777) +py_cobjects(#11778) +py_cobjects(#11779) +#11969 = @"C_type$frame$2f_locals" +py_cobjects(#11969) +py_cobjects(#11780) +py_cobjects(#11781) +py_cobjects(#11782) +py_cobjects(#11783) +py_cobjects(#11784) +py_cobjects(#11785) +#11970 = @"C_type$exceptions.BaseException$__dict__" +py_cobjects(#11970) +py_cobjects(#11786) +#11971 = @"C_type$exceptions.BaseException$message" +py_cobjects(#11971) +py_cobjects(#11787) +py_cobjects(#11788) +py_cobjects(#11789) +py_cobjects(#11790) +py_cobjects(#11791) +py_cobjects(#11792) +py_cobjects(#11793) +py_cobjects(#11794) +py_cobjects(#11795) +py_cobjects(#11796) +py_cobjects(#11797) +#11972 = @"C_type$generator$2__name__" +py_cobjects(#11972) +py_cobjects(#11798) +#11973 = @"C_type$type$2__bases__" +py_cobjects(#11973) +py_cobjects(#11799) +#11974 = @"C_type$type$2__abstractmethods__" +py_cobjects(#11974) +py_cobjects(#11800) +py_cobjects(#11801) +#11975 = @"C_type$object$2__class__" +py_cobjects(#11975) +#11976 = @"C_type$function$2func_code" +py_cobjects(#11976) +#11977 = @"C_type$function$2__code__" +py_cobjects(#11977) +py_cobjects(#11802) +py_cobjects(#11803) +#11978 = @"C_type$function$2func_dict" +py_cobjects(#11978) +#11979 = @"C_type$function$2__dict__" +py_cobjects(#11979) +#11980 = @"C_type$function$2func_name" +py_cobjects(#11980) +#11981 = @"C_type$function$2__name__" +py_cobjects(#11981) +py_cobjects(#11804) +py_cobjects(#11805) +py_cobjects(#11806) +py_cobjects(#11807) +py_cobjects(#11808) +#11982 = @"C_type$cell$2cell_contents" +py_cobjects(#11982) +#11983 = @"C_type$instancemethod$2__doc__" +py_cobjects(#11983) +#11984 = @"C_type$method-wrapper$__objclass__" +py_cobjects(#11984) +py_cobjects(#11809) +py_cobjects(#11810) +py_cobjects(#11811) +py_cobjects(#11812) +py_cobjects(#11813) +py_cobjects(#11814) +py_cobjects(#11815) +py_cobjects(#11816) +py_cobjects(#11817) +py_cobjects(#11818) +py_cobjects(#11819) +py_cobjects(#11820) +py_cobjects(#11821) +py_cobjects(#11822) +py_cobjects(#10000) +py_cobjects(#10002) +py_cobjects(#10004) +py_cobjects(#10006) +py_cobjects(#10008) +py_cobjects(#10009) +py_cobjects(#10010) +py_cobjects(#10011) +py_cobjects(#10012) +py_cobjects(#10013) +#11985 = @"C_builtin_function_or_method$_sre.compile" +py_cobjects(#11985) +py_cobjects(#10014) +py_cobjects(#10015) +py_cobjects(#10016) +py_cobjects(#10018) +#11986 = @"C_builtin_function_or_method$_heapq.heappushpop" +py_cobjects(#11986) +py_cobjects(#11376) +#11987 = @"C_builtin_function_or_method$_heapq.heapreplace" +py_cobjects(#11987) +py_cobjects(#10019) +py_cobjects(#10020) +py_cobjects(#10022) +py_cobjects(#10023) +py_cobjects(#10025) +py_cobjects(#10026) +py_cobjects(#10027) +py_cobjects(#11378) +py_cobjects(#11379) +py_cobjects(#10028) +py_cobjects(#10029) +py_cobjects(#10030) +py_cobjects(#10031) +py_cobjects(#10032) +py_cobjects(#10033) +py_cobjects(#10034) +py_cobjects(#10035) +py_cobjects(#10036) +py_cobjects(#10037) +py_cobjects(#10039) +py_cobjects(#10040) +py_cobjects(#10041) +py_cobjects(#10042) +py_cobjects(#10043) +py_cobjects(#10044) +py_cobjects(#10045) +py_cobjects(#10046) +py_cobjects(#10047) +py_cobjects(#10048) +py_cobjects(#10049) +py_cobjects(#10050) +py_cobjects(#10051) +py_cobjects(#10052) +py_cobjects(#10053) +py_cobjects(#10054) +py_cobjects(#11380) +py_cobjects(#11381) +py_cobjects(#11382) +py_cobjects(#11383) +py_cobjects(#11384) +py_cobjects(#11385) +py_cobjects(#10055) +py_cobjects(#10057) +py_cobjects(#10059) +py_cobjects(#10060) +py_cobjects(#10061) +py_cobjects(#10062) +py_cobjects(#10063) +py_cobjects(#10064) +py_cobjects(#10065) +py_cobjects(#10066) +py_cobjects(#10067) +#11988 = @"C_builtin_function_or_method$operator.is_" +py_cobjects(#11988) +#11989 = @"C_builtin_function_or_method$operator.is_not" +py_cobjects(#11989) +py_cobjects(#11386) +py_cobjects(#11387) +#11990 = @"C_builtin_function_or_method$operator.add" +py_cobjects(#11990) +#11991 = @"C_builtin_function_or_method$operator.__add__" +py_cobjects(#11991) +#11992 = @"C_builtin_function_or_method$operator.sub" +py_cobjects(#11992) +#11993 = @"C_builtin_function_or_method$operator.__sub__" +py_cobjects(#11993) +#11994 = @"C_builtin_function_or_method$operator.mul" +py_cobjects(#11994) +#11995 = @"C_builtin_function_or_method$operator.__mul__" +py_cobjects(#11995) +#11996 = @"C_builtin_function_or_method$operator.div" +py_cobjects(#11996) +#11997 = @"C_builtin_function_or_method$operator.__div__" +py_cobjects(#11997) +#11998 = @"C_builtin_function_or_method$operator.floordiv" +py_cobjects(#11998) +#11999 = @"C_builtin_function_or_method$operator.__floordiv__" +py_cobjects(#11999) +#12000 = @"C_builtin_function_or_method$operator.truediv" +py_cobjects(#12000) +#12001 = @"C_builtin_function_or_method$operator.__truediv__" +py_cobjects(#12001) +#12002 = @"C_builtin_function_or_method$operator.mod" +py_cobjects(#12002) +#12003 = @"C_builtin_function_or_method$operator.__mod__" +py_cobjects(#12003) +py_cobjects(#11388) +py_cobjects(#11389) +py_cobjects(#11390) +py_cobjects(#11391) +py_cobjects(#11392) +py_cobjects(#11393) +py_cobjects(#11394) +py_cobjects(#11395) +py_cobjects(#11396) +py_cobjects(#11397) +#12004 = @"C_builtin_function_or_method$operator.lshift" +py_cobjects(#12004) +#12005 = @"C_builtin_function_or_method$operator.__lshift__" +py_cobjects(#12005) +#12006 = @"C_builtin_function_or_method$operator.rshift" +py_cobjects(#12006) +#12007 = @"C_builtin_function_or_method$operator.__rshift__" +py_cobjects(#12007) +py_cobjects(#10068) +py_cobjects(#10069) +#12008 = @"C_builtin_function_or_method$operator.and_" +py_cobjects(#12008) +#12009 = @"C_builtin_function_or_method$operator.__and__" +py_cobjects(#12009) +#12010 = @"C_builtin_function_or_method$operator.xor" +py_cobjects(#12010) +#12011 = @"C_builtin_function_or_method$operator.__xor__" +py_cobjects(#12011) +#12012 = @"C_builtin_function_or_method$operator.or_" +py_cobjects(#12012) +#12013 = @"C_builtin_function_or_method$operator.__or__" +py_cobjects(#12013) +#12014 = @"C_builtin_function_or_method$operator.iadd" +py_cobjects(#12014) +#12015 = @"C_builtin_function_or_method$operator.__iadd__" +py_cobjects(#12015) +#12016 = @"C_builtin_function_or_method$operator.isub" +py_cobjects(#12016) +#12017 = @"C_builtin_function_or_method$operator.__isub__" +py_cobjects(#12017) +#12018 = @"C_builtin_function_or_method$operator.imul" +py_cobjects(#12018) +#12019 = @"C_builtin_function_or_method$operator.__imul__" +py_cobjects(#12019) +#12020 = @"C_builtin_function_or_method$operator.idiv" +py_cobjects(#12020) +#12021 = @"C_builtin_function_or_method$operator.__idiv__" +py_cobjects(#12021) +#12022 = @"C_builtin_function_or_method$operator.ifloordiv" +py_cobjects(#12022) +#12023 = @"C_builtin_function_or_method$operator.__ifloordiv__" +py_cobjects(#12023) +#12024 = @"C_builtin_function_or_method$operator.itruediv" +py_cobjects(#12024) +#12025 = @"C_builtin_function_or_method$operator.__itruediv__" +py_cobjects(#12025) +#12026 = @"C_builtin_function_or_method$operator.imod" +py_cobjects(#12026) +#12027 = @"C_builtin_function_or_method$operator.__imod__" +py_cobjects(#12027) +#12028 = @"C_builtin_function_or_method$operator.ilshift" +py_cobjects(#12028) +#12029 = @"C_builtin_function_or_method$operator.__ilshift__" +py_cobjects(#12029) +#12030 = @"C_builtin_function_or_method$operator.irshift" +py_cobjects(#12030) +#12031 = @"C_builtin_function_or_method$operator.__irshift__" +py_cobjects(#12031) +#12032 = @"C_builtin_function_or_method$operator.iand" +py_cobjects(#12032) +#12033 = @"C_builtin_function_or_method$operator.__iand__" +py_cobjects(#12033) +#12034 = @"C_builtin_function_or_method$operator.ixor" +py_cobjects(#12034) +#12035 = @"C_builtin_function_or_method$operator.__ixor__" +py_cobjects(#12035) +#12036 = @"C_builtin_function_or_method$operator.ior" +py_cobjects(#12036) +#12037 = @"C_builtin_function_or_method$operator.__ior__" +py_cobjects(#12037) +#12038 = @"C_builtin_function_or_method$operator.concat" +py_cobjects(#12038) +#12039 = @"C_builtin_function_or_method$operator.__concat__" +py_cobjects(#12039) +py_cobjects(#11398) +py_cobjects(#11399) +#12040 = @"C_builtin_function_or_method$operator.iconcat" +py_cobjects(#12040) +#12041 = @"C_builtin_function_or_method$operator.__iconcat__" +py_cobjects(#12041) +py_cobjects(#11400) +py_cobjects(#11401) +#12042 = @"C_builtin_function_or_method$operator.getitem" +py_cobjects(#12042) +#12043 = @"C_builtin_function_or_method$operator.__getitem__" +py_cobjects(#12043) +py_cobjects(#10070) +py_cobjects(#10071) +py_cobjects(#10072) +py_cobjects(#10073) +#12044 = @"C_builtin_function_or_method$operator.pow" +py_cobjects(#12044) +#12045 = @"C_builtin_function_or_method$operator.__pow__" +py_cobjects(#12045) +#12046 = @"C_builtin_function_or_method$operator.ipow" +py_cobjects(#12046) +#12047 = @"C_builtin_function_or_method$operator.__ipow__" +py_cobjects(#12047) +py_cobjects(#11402) +py_cobjects(#11403) +py_cobjects(#10074) +py_cobjects(#10075) +py_cobjects(#10076) +py_cobjects(#10077) +#12048 = @"C_builtin_function_or_method$operator.lt" +py_cobjects(#12048) +#12049 = @"C_builtin_function_or_method$operator.__lt__" +py_cobjects(#12049) +#12050 = @"C_builtin_function_or_method$operator.le" +py_cobjects(#12050) +#12051 = @"C_builtin_function_or_method$operator.__le__" +py_cobjects(#12051) +#12052 = @"C_builtin_function_or_method$operator.eq" +py_cobjects(#12052) +#12053 = @"C_builtin_function_or_method$operator.__eq__" +py_cobjects(#12053) +#12054 = @"C_builtin_function_or_method$operator.ne" +py_cobjects(#12054) +#12055 = @"C_builtin_function_or_method$operator.__ne__" +py_cobjects(#12055) +#12056 = @"C_builtin_function_or_method$operator.gt" +py_cobjects(#12056) +#12057 = @"C_builtin_function_or_method$operator.__gt__" +py_cobjects(#12057) +#12058 = @"C_builtin_function_or_method$operator.ge" +py_cobjects(#12058) +#12059 = @"C_builtin_function_or_method$operator.__ge__" +py_cobjects(#12059) +py_cobjects(#10078) +py_cobjects(#10079) +py_cobjects(#10080) +py_cobjects(#10081) +py_cobjects(#10083) +py_cobjects(#10084) +#12060 = @"C_builtin_function_or_method$parser.isexpr" +py_cobjects(#12060) +#12061 = @"C_builtin_function_or_method$parser.issuite" +py_cobjects(#12061) +py_cobjects(#10086) +py_cobjects(#10087) +py_cobjects(#10088) +py_cobjects(#10089) +py_cobjects(#10090) +py_cobjects(#10091) +py_cobjects(#10092) +py_cobjects(#10093) +py_cobjects(#10094) +py_cobjects(#10095) +py_cobjects(#10096) +py_cobjects(#10097) +py_cobjects(#10098) +py_cobjects(#10099) +py_cobjects(#10100) +py_cobjects(#10101) +py_cobjects(#10103) +py_cobjects(#10104) +py_cobjects(#10105) +py_cobjects(#10106) +py_cobjects(#10107) +py_cobjects(#10108) +py_cobjects(#10109) +py_cobjects(#10110) +py_cobjects(#10111) +py_cobjects(#10112) +py_cobjects(#10113) +py_cobjects(#10114) +py_cobjects(#10115) +py_cobjects(#10116) +py_cobjects(#10117) +py_cobjects(#10118) +py_cobjects(#10119) +py_cobjects(#10120) +py_cobjects(#10121) +py_cobjects(#10122) +py_cobjects(#10123) +py_cobjects(#10124) +py_cobjects(#10125) +py_cobjects(#10126) +py_cobjects(#10127) +py_cobjects(#10128) +py_cobjects(#10129) +py_cobjects(#10130) +py_cobjects(#10131) +py_cobjects(#10132) +py_cobjects(#10133) +py_cobjects(#10134) +py_cobjects(#10135) +py_cobjects(#10136) +py_cobjects(#10137) +py_cobjects(#10138) +py_cobjects(#10139) +py_cobjects(#10140) +py_cobjects(#10141) +py_cobjects(#10142) +py_cobjects(#10143) +py_cobjects(#10144) +py_cobjects(#10145) +py_cobjects(#10146) +py_cobjects(#10147) +py_cobjects(#10148) +py_cobjects(#10149) +py_cobjects(#10150) +py_cobjects(#10151) +py_cobjects(#10152) +py_cobjects(#10153) +py_cobjects(#10154) +py_cobjects(#10155) +py_cobjects(#11404) +py_cobjects(#11405) +py_cobjects(#10156) +py_cobjects(#10157) +py_cobjects(#10158) +py_cobjects(#10159) +py_cobjects(#10160) +py_cobjects(#10161) +py_cobjects(#10162) +py_cobjects(#10163) +#12062 = @"C_builtin_function_or_method$signal.default_int_handler" +py_cobjects(#12062) +py_cobjects(#10164) +py_cobjects(#10166) +py_cobjects(#10168) +py_cobjects(#10169) +py_cobjects(#10170) +py_cobjects(#11406) +py_cobjects(#10171) +py_cobjects(#10172) +py_cobjects(#10173) +py_cobjects(#10174) +py_cobjects(#10175) +py_cobjects(#10176) +py_cobjects(#10177) +py_cobjects(#10178) +py_cobjects(#10179) +py_cobjects(#10180) +py_cobjects(#10181) +py_cobjects(#10182) +py_cobjects(#10183) +py_cobjects(#10184) +py_cobjects(#10185) +py_cobjects(#10186) +py_cobjects(#10187) +py_cobjects(#10188) +py_cobjects(#10189) +py_cobjects(#10190) +py_cobjects(#11407) +py_cobjects(#11408) +py_cobjects(#10191) +py_cobjects(#10192) +py_cobjects(#10193) +py_cobjects(#10194) +#12063 = @"C_builtin_function_or_method$time.gmtime" +py_cobjects(#12063) +#12064 = @"C_builtin_function_or_method$time.localtime" +py_cobjects(#12064) +py_cobjects(#10195) +py_cobjects(#10196) +py_cobjects(#10197) +py_cobjects(#10198) +#12065 = @"C_builtin_function_or_method$time.strptime" +py_cobjects(#12065) +py_cobjects(#10199) +py_cobjects(#10200) +py_cobjects(#10202) +py_cobjects(#10203) +py_cobjects(#10205) +py_cobjects(#10206) +py_cobjects(#10207) +py_cobjects(#10208) +py_cobjects(#10209) +py_cobjects(#10210) +py_cobjects(#10211) +py_cobjects(#10212) +py_cobjects(#10213) +py_cobjects(#10214) +py_cobjects(#10215) +py_cobjects(#10216) +py_cobjects(#10217) +py_cobjects(#10219) +py_cobjects(#10220) +#12066 = @"C_builtin_function_or_method$posix.lstat" +py_cobjects(#12066) +py_cobjects(#10221) +py_cobjects(#10222) +py_cobjects(#10223) +py_cobjects(#10224) +py_cobjects(#10225) +#12067 = @"C_builtin_function_or_method$posix.stat" +py_cobjects(#12067) +py_cobjects(#10226) +py_cobjects(#10227) +py_cobjects(#10228) +py_cobjects(#10229) +py_cobjects(#10230) +py_cobjects(#10231) +py_cobjects(#10232) +py_cobjects(#10233) +py_cobjects(#10234) +#12068 = @"C_builtin_function_or_method$posix._exit" +py_cobjects(#12068) +#12069 = @"C_builtin_function_or_method$posix.execv" +py_cobjects(#12069) +#12070 = @"C_builtin_function_or_method$posix.execve" +py_cobjects(#12070) +py_cobjects(#10235) +py_cobjects(#10236) +py_cobjects(#10237) +py_cobjects(#10238) +py_cobjects(#10239) +py_cobjects(#10240) +py_cobjects(#10241) +py_cobjects(#10242) +py_cobjects(#10243) +py_cobjects(#10244) +py_cobjects(#10245) +py_cobjects(#10246) +py_cobjects(#10247) +py_cobjects(#10248) +py_cobjects(#10249) +py_cobjects(#10251) +py_cobjects(#10252) +py_cobjects(#10253) +py_cobjects(#10254) +py_cobjects(#10255) +py_cobjects(#10256) +py_cobjects(#10257) +py_cobjects(#10258) +py_cobjects(#10259) +py_cobjects(#10260) +py_cobjects(#10261) +py_cobjects(#10262) +py_cobjects(#10263) +py_cobjects(#10264) +py_cobjects(#10265) +py_cobjects(#10266) +py_cobjects(#10267) +py_cobjects(#10268) +py_cobjects(#10269) +py_cobjects(#10270) +py_cobjects(#10271) +py_cobjects(#10272) +py_cobjects(#10273) +py_cobjects(#10274) +py_cobjects(#10275) +#12071 = @"C_builtin_function_or_method$posix.read" +py_cobjects(#12071) +py_cobjects(#10276) +#12072 = @"C_builtin_function_or_method$posix.fstat" +py_cobjects(#12072) +py_cobjects(#10277) +py_cobjects(#10278) +py_cobjects(#10279) +py_cobjects(#10280) +py_cobjects(#10281) +py_cobjects(#10282) +py_cobjects(#10283) +py_cobjects(#10284) +py_cobjects(#10285) +py_cobjects(#10286) +py_cobjects(#10287) +py_cobjects(#10288) +py_cobjects(#10289) +py_cobjects(#10290) +py_cobjects(#10291) +py_cobjects(#10292) +py_cobjects(#10293) +py_cobjects(#10294) +py_cobjects(#10295) +py_cobjects(#10296) +py_cobjects(#10297) +py_cobjects(#10298) +py_cobjects(#10299) +#12073 = @"C_builtin_function_or_method$posix.fstatvfs" +py_cobjects(#12073) +#12074 = @"C_builtin_function_or_method$posix.statvfs" +py_cobjects(#12074) +py_cobjects(#10300) +py_cobjects(#10301) +py_cobjects(#10302) +py_cobjects(#10303) +py_cobjects(#10304) +py_cobjects(#10305) +py_cobjects(#10306) +#12075 = @"C_builtin_function_or_method$posix.abort" +py_cobjects(#12075) +py_cobjects(#10307) +py_cobjects(#10308) +py_cobjects(#10309) +py_cobjects(#10310) +py_cobjects(#10311) +py_cobjects(#10312) +py_cobjects(#10313) +py_cobjects(#10316) +py_cobjects(#10317) +py_cobjects(#10318) +py_cobjects(#10319) +py_cobjects(#10320) +py_cobjects(#10321) +py_cobjects(#10322) +py_cobjects(#10323) +py_cobjects(#10324) +py_cobjects(#10325) +py_cobjects(#10326) +py_cobjects(#10327) +py_cobjects(#10328) +py_cobjects(#10329) +#12076 = @"C_builtin_function_or_method$strop.join" +py_cobjects(#12076) +#12077 = @"C_builtin_function_or_method$strop.joinfields" +py_cobjects(#12077) +py_cobjects(#10330) +py_cobjects(#10331) +py_cobjects(#10332) +py_cobjects(#10333) +py_cobjects(#10334) +py_cobjects(#10335) +py_cobjects(#10336) +py_cobjects(#10337) +py_cobjects(#10338) +py_cobjects(#10339) +#12078 = @"C_builtin_function_or_method$strop.translate" +py_cobjects(#12078) +py_cobjects(#10340) +py_cobjects(#10341) +#12079 = @"C_builtin_function_or_method$binascii.b2a_uu" +py_cobjects(#12079) +#12080 = @"C_builtin_function_or_method$binascii.a2b_base64" +py_cobjects(#12080) +#12081 = @"C_builtin_function_or_method$binascii.b2a_base64" +py_cobjects(#12081) +py_cobjects(#10342) +#12082 = @"C_builtin_function_or_method$binascii.b2a_hqx" +py_cobjects(#12082) +py_cobjects(#10343) +py_cobjects(#10344) +py_cobjects(#10345) +py_cobjects(#10346) +#12083 = @"C_builtin_function_or_method$binascii.rlecode_hqx" +py_cobjects(#12083) +py_cobjects(#10347) +py_cobjects(#10348) +py_cobjects(#10349) +py_cobjects(#10350) +py_cobjects(#10351) +py_cobjects(#10352) +py_cobjects(#11409) +py_cobjects(#11410) +py_cobjects(#11411) +py_cobjects(#10353) +py_cobjects(#10355) +py_cobjects(#10357) +py_cobjects(#10358) +py_cobjects(#10359) +py_cobjects(#10360) +py_cobjects(#10361) +py_cobjects(#10362) +py_cobjects(#10363) +py_cobjects(#10364) +py_cobjects(#10365) +py_cobjects(#10366) +py_cobjects(#10367) +py_cobjects(#11413) +py_cobjects(#10368) +py_cobjects(#10369) +py_cobjects(#10371) +py_cobjects(#10372) +py_cobjects(#10373) +py_cobjects(#10374) +py_cobjects(#10375) +py_cobjects(#10376) +py_cobjects(#10377) +py_cobjects(#10378) +py_cobjects(#10379) +py_cobjects(#11414) +py_cobjects(#10380) +py_cobjects(#11415) +py_cobjects(#11416) +py_cobjects(#10381) +py_cobjects(#10382) +py_cobjects(#10383) +py_cobjects(#10385) +#12084 = @"C_builtin_function_or_method$thread.exit_thread" +py_cobjects(#12084) +#12085 = @"C_builtin_function_or_method$thread.exit" +py_cobjects(#12085) +py_cobjects(#10386) +py_cobjects(#10387) +py_cobjects(#10388) +py_cobjects(#10389) +py_cobjects(#11417) +py_cobjects(#10390) +py_cobjects(#11418) +py_cobjects(#10391) +py_cobjects(#10392) +py_cobjects(#10393) +py_cobjects(#10394) +#12086 = @"C_builtin_function_or_method$_codecs.lookup" +py_cobjects(#12086) +#12087 = @"C_builtin_function_or_method$_codecs.encode" +py_cobjects(#12087) +#12088 = @"C_builtin_function_or_method$_codecs.decode" +py_cobjects(#12088) +py_cobjects(#10395) +py_cobjects(#10396) +py_cobjects(#10397) +py_cobjects(#10398) +py_cobjects(#10399) +py_cobjects(#10400) +py_cobjects(#10401) +py_cobjects(#10402) +py_cobjects(#10403) +py_cobjects(#10404) +py_cobjects(#10405) +py_cobjects(#10406) +py_cobjects(#10407) +py_cobjects(#10408) +py_cobjects(#10409) +py_cobjects(#10410) +py_cobjects(#10411) +py_cobjects(#10412) +py_cobjects(#10413) +py_cobjects(#10414) +py_cobjects(#10415) +py_cobjects(#10416) +py_cobjects(#10417) +py_cobjects(#10418) +py_cobjects(#10419) +py_cobjects(#10420) +py_cobjects(#10421) +py_cobjects(#10422) +py_cobjects(#10423) +py_cobjects(#10424) +py_cobjects(#10425) +py_cobjects(#10426) +py_cobjects(#10427) +py_cobjects(#10428) +py_cobjects(#10429) +py_cobjects(#10430) +#12089 = @"C_builtin_function_or_method$_codecs.lookup_error" +py_cobjects(#12089) +py_cobjects(#10431) +py_cobjects(#10432) +py_cobjects(#10433) +py_cobjects(#10434) +py_cobjects(#10435) +py_cobjects(#10436) +py_cobjects(#10437) +py_cobjects(#10438) +py_cobjects(#10439) +py_cobjects(#10440) +py_cobjects(#10441) +py_cobjects(#10442) +py_cobjects(#10443) +py_cobjects(#10444) +#12090 = @"C_builtin_function_or_method$readline.get_begidx" +py_cobjects(#12090) +#12091 = @"C_builtin_function_or_method$readline.get_endidx" +py_cobjects(#12091) +py_cobjects(#10445) +py_cobjects(#10446) +py_cobjects(#10447) +py_cobjects(#10448) +py_cobjects(#10449) +py_cobjects(#10450) +py_cobjects(#10451) +py_cobjects(#10452) +py_cobjects(#10453) +py_cobjects(#11419) +py_cobjects(#10454) +py_cobjects(#10455) +py_cobjects(#10456) +py_cobjects(#10457) +py_cobjects(#10458) +py_cobjects(#10459) +py_cobjects(#10460) +py_cobjects(#10461) +py_cobjects(#10462) +py_cobjects(#10463) +py_cobjects(#10464) +py_cobjects(#10465) +py_cobjects(#10466) +py_cobjects(#10467) +py_cobjects(#10468) +py_cobjects(#10469) +py_cobjects(#10470) +py_cobjects(#10471) +py_cobjects(#10472) +py_cobjects(#10473) +py_cobjects(#10474) +py_cobjects(#10475) +py_cobjects(#10476) +py_cobjects(#10477) +py_cobjects(#10478) +py_cobjects(#10479) +py_cobjects(#10480) +py_cobjects(#10481) +py_cobjects(#10482) +py_cobjects(#10483) +py_cobjects(#11420) +py_cobjects(#11421) +py_cobjects(#10484) +py_cobjects(#10485) +py_cobjects(#11422) +py_cobjects(#10486) +py_cobjects(#10487) +py_cobjects(#10488) +py_cobjects(#10489) +py_cobjects(#10490) +py_cobjects(#10491) +py_cobjects(#10493) +py_cobjects(#10494) +py_cobjects(#10495) +py_cobjects(#10496) +py_cobjects(#11423) +py_cobjects(#10498) +#12092 = @"C_builtin_function_or_method$_io.open" +py_cobjects(#12092) +#12093 = @"C_builtin_function_or_method$_functools.reduce" +py_cobjects(#12093) +py_cobjects(#10499) +py_cobjects(#10500) +py_cobjects(#10501) +py_cobjects(#10502) +py_cobjects(#10503) +py_cobjects(#10504) +py_cobjects(#10505) +py_cobjects(#10506) +py_cobjects(#10507) +py_cobjects(#10508) +py_cobjects(#10509) +py_cobjects(#10510) +py_cobjects(#10512) +py_cobjects(#10513) +py_cobjects(#10514) +py_cobjects(#10515) +py_cobjects(#10516) +py_cobjects(#10518) +py_cobjects(#10519) +py_cobjects(#10520) +py_cobjects(#10521) +py_cobjects(#10522) +py_cobjects(#10523) +py_cobjects(#10524) +py_cobjects(#10525) +py_cobjects(#10526) +py_cobjects(#10527) +py_cobjects(#10528) +py_cobjects(#10529) +py_cobjects(#10530) +py_cobjects(#10531) +py_cobjects(#10532) +py_cobjects(#10533) +py_cobjects(#10534) +py_cobjects(#10535) +py_cobjects(#10536) +py_cobjects(#10537) +py_cobjects(#10538) +py_cobjects(#10539) +py_cobjects(#10540) +py_cobjects(#10542) +py_cobjects(#10544) +py_cobjects(#10546) +py_cobjects(#10547) +py_cobjects(#11424) +py_cobjects(#11425) +py_cobjects(#11426) +py_cobjects(#10548) +py_cobjects(#10549) +py_cobjects(#10550) +py_cobjects(#10551) +py_cobjects(#10552) +py_cobjects(#10553) +py_cobjects(#10554) +py_cobjects(#10555) +py_cobjects(#10556) +py_cobjects(#10558) +py_cobjects(#10559) +py_cobjects(#10560) +py_cobjects(#11427) +py_cobjects(#11428) +py_cobjects(#11429) +py_cobjects(#10561) +py_cobjects(#10562) +py_cobjects(#10563) +py_cobjects(#10564) +py_cobjects(#10565) +py_cobjects(#10566) +py_cobjects(#11430) +py_cobjects(#10567) +py_cobjects(#10568) +py_cobjects(#10569) +py_cobjects(#10570) +py_cobjects(#10571) +py_cobjects(#10572) +py_cobjects(#10573) +py_cobjects(#10574) +py_cobjects(#10576) +py_cobjects(#10577) +py_cobjects(#10579) +py_cobjects(#10581) +py_cobjects(#10582) +py_cobjects(#10583) +py_cobjects(#10584) +py_cobjects(#10585) +py_cobjects(#10586) +py_cobjects(#10587) +py_cobjects(#10588) +py_cobjects(#10589) +py_cobjects(#10590) +py_cobjects(#10591) +py_cobjects(#10592) +py_cobjects(#10593) +py_cobjects(#10594) +#12094 = @"C_builtin_function_or_method$sys.exit" +py_cobjects(#12094) +py_cobjects(#10595) +py_cobjects(#10596) +py_cobjects(#10597) +py_cobjects(#10598) +py_cobjects(#10599) +py_cobjects(#10600) +py_cobjects(#10601) +py_cobjects(#10603) +py_cobjects(#10604) +py_cobjects(#10605) +py_cobjects(#10606) +py_cobjects(#10607) +py_cobjects(#10608) +py_cobjects(#10609) +py_cobjects(#10610) +py_cobjects(#10611) +py_cobjects(#11431) +py_cobjects(#10612) +py_cobjects(#10613) +py_cobjects(#10614) +py_cobjects(#10615) +#12095 = @"C_builtin_function_or_method$marshal.dumps" +py_cobjects(#12095) +py_cobjects(#10616) +py_cobjects(#10617) +py_cobjects(#10619) +py_cobjects(#10620) +py_cobjects(#10621) +py_cobjects(#10622) +py_cobjects(#10623) +py_cobjects(#10624) +py_cobjects(#10625) +py_cobjects(#10626) +py_cobjects(#10627) +py_cobjects(#10628) +py_cobjects(#10629) +py_cobjects(#10630) +py_cobjects(#10631) +py_cobjects(#11432) +py_cobjects(#10632) +py_cobjects(#10633) +py_cobjects(#11433) +py_cobjects(#10634) +py_cobjects(#11434) +py_cobjects(#10635) +py_cobjects(#10636) +#12096 = @"C_builtin_function_or_method$builtins.apply" +py_cobjects(#12096) +py_cobjects(#10637) +py_cobjects(#10638) +py_cobjects(#10639) +py_cobjects(#10640) +py_cobjects(#10641) +py_cobjects(#10642) +py_cobjects(#10643) +py_cobjects(#10644) +#12097 = @"C_builtin_function_or_method$builtins.divmod" +py_cobjects(#12097) +#12098 = @"C_builtin_function_or_method$builtins.eval" +py_cobjects(#12098) +py_cobjects(#11435) +py_cobjects(#10645) +py_cobjects(#10646) +#12099 = @"C_builtin_function_or_method$builtins.getattr" +py_cobjects(#12099) +py_cobjects(#10647) +py_cobjects(#10648) +py_cobjects(#10649) +py_cobjects(#11436) +py_cobjects(#10650) +py_cobjects(#10651) +py_cobjects(#11437) +py_cobjects(#10652) +py_cobjects(#10653) +py_cobjects(#10654) +py_cobjects(#10657) +py_cobjects(#10658) +py_cobjects(#10659) +#12100 = @"C_builtin_function_or_method$builtins.max" +py_cobjects(#12100) +#12101 = @"C_builtin_function_or_method$builtins.min" +py_cobjects(#12101) +#12102 = @"C_builtin_function_or_method$builtins.next" +py_cobjects(#12102) +py_cobjects(#11438) +py_cobjects(#10660) +py_cobjects(#10661) +#12103 = @"C_builtin_function_or_method$builtins.pow" +py_cobjects(#12103) +py_cobjects(#10662) +py_cobjects(#10663) +py_cobjects(#10664) +#12104 = @"C_builtin_function_or_method$builtins.reduce" +py_cobjects(#12104) +py_cobjects(#10665) +py_cobjects(#10666) +py_cobjects(#10667) +py_cobjects(#10668) +py_cobjects(#10669) +py_cobjects(#10670) +py_cobjects(#10671) +py_cobjects(#10672) +py_cobjects(#10673) +py_cobjects(#10674) +py_cobjects(#10675) +py_cobjects(#10676) +py_cobjects(#10677) +py_cobjects(#10678) +py_cobjects(#10679) +py_cobjects(#10680) +py_cobjects(#10681) +py_cobjects(#11440) +py_cobjects(#10682) +py_cobjects(#10683) +py_cobjects(#10684) +py_cobjects(#10685) +py_cobjects(#10686) +py_cobjects(#11442) +py_cobjects(#10687) +py_cobjects(#10688) +py_cobjects(#10689) +py_cobjects(#10690) +py_cobjects(#10692) +py_cobjects(#10693) +py_cobjects(#10694) +py_cobjects(#10695) +py_cobjects(#10696) +py_cobjects(#10697) +py_cobjects(#10698) +py_cobjects(#10699) +py_cobjects(#10700) +py_cobjects(#10701) +py_cobjects(#10702) +py_cobjects(#10703) +py_cobjects(#10704) +py_cobjects(#10705) +py_cobjects(#10706) +py_cobjects(#10707) +py_cobjects(#10708) +py_cobjects(#10709) +py_cobjects(#10710) +py_cobjects(#10711) +py_cobjects(#10712) +py_cobjects(#10713) +py_cobjects(#10714) +py_cobjects(#10715) +py_cobjects(#10716) +py_cobjects(#10717) +py_cobjects(#10718) +py_cobjects(#10719) +py_cobjects(#11445) +py_cobjects(#11446) +py_cobjects(#11447) +py_cobjects(#10720) +py_cobjects(#10721) +py_cobjects(#10722) +py_cobjects(#10723) +py_cobjects(#10724) +py_cobjects(#10725) +py_cobjects(#10726) +py_cobjects(#10727) +py_cobjects(#10728) +py_cobjects(#11450) +py_cobjects(#11451) +py_cobjects(#11452) +py_cobjects(#11453) +py_cobjects(#10729) +py_cobjects(#10730) +py_cobjects(#10731) +py_cobjects(#10732) +py_cobjects(#10733) +py_cobjects(#10734) +py_cobjects(#10735) +py_cobjects(#10736) +py_cobjects(#10737) +py_cobjects(#10738) +py_cobjects(#10739) +py_cobjects(#10740) +py_cobjects(#10741) +py_cobjects(#11455) +py_cobjects(#10742) +py_cobjects(#10743) +py_cobjects(#10744) +py_cobjects(#10745) +py_cobjects(#10746) +py_cobjects(#10747) +py_cobjects(#10748) +py_cobjects(#10749) +py_cobjects(#10750) +py_cobjects(#10751) +py_cobjects(#10752) +py_cobjects(#10753) +py_cobjects(#10754) +py_cobjects(#11461) +py_cobjects(#10755) +py_cobjects(#10756) +py_cobjects(#10757) +py_cobjects(#11462) +py_cobjects(#11463) +py_cobjects(#10758) +py_cobjects(#10759) +py_cobjects(#10760) +py_cobjects(#10762) +py_cobjects(#10763) +py_cobjects(#10764) +py_cobjects(#11464) +py_cobjects(#11466) +py_cobjects(#11467) +py_cobjects(#10765) +py_cobjects(#10766) +py_cobjects(#11468) +py_cobjects(#11469) +py_cobjects(#10767) +py_cobjects(#10768) +py_cobjects(#10769) +py_cobjects(#10770) +py_cobjects(#10771) +py_cobjects(#10772) +py_cobjects(#10773) +py_cobjects(#10774) +py_cobjects(#10775) +py_cobjects(#10776) +py_cobjects(#10777) +py_cobjects(#10778) +py_cobjects(#10779) +py_cobjects(#10780) +py_cobjects(#10781) +py_cobjects(#11470) +py_cobjects(#10782) +py_cobjects(#10783) +py_cobjects(#10784) +py_cobjects(#10785) +py_cobjects(#10786) +py_cobjects(#10787) +py_cobjects(#10788) +py_cobjects(#10789) +py_cobjects(#10790) +py_cobjects(#10791) +py_cobjects(#10792) +py_cobjects(#10793) +py_cobjects(#11471) +py_cobjects(#10795) +py_cobjects(#10796) +py_cobjects(#11475) +py_cobjects(#10797) +py_cobjects(#10798) +py_cobjects(#10799) +py_cobjects(#10800) +py_cobjects(#11477) +py_cobjects(#10801) +py_cobjects(#11478) +py_cobjects(#10802) +py_cobjects(#10803) +py_cobjects(#10804) +py_cobjects(#10805) +py_cobjects(#10806) +py_cobjects(#10807) +py_cobjects(#10808) +py_cobjects(#11479) +py_cobjects(#10809) +py_cobjects(#10810) +py_cobjects(#10811) +py_cobjects(#10812) +py_cobjects(#10813) +py_cobjects(#10814) +py_cobjects(#10815) +py_cobjects(#10816) +py_cobjects(#10817) +py_cobjects(#10818) +py_cobjects(#10819) +py_cobjects(#10820) +py_cobjects(#10821) +py_cobjects(#10822) +py_cobjects(#10823) +py_cobjects(#10824) +py_cobjects(#10825) +py_cobjects(#10826) +py_cobjects(#10827) +py_cobjects(#10828) +py_cobjects(#10829) +py_cobjects(#10830) +py_cobjects(#10831) +py_cobjects(#10832) +py_cobjects(#10833) +py_cobjects(#10834) +py_cobjects(#10835) +py_cobjects(#11481) +py_cobjects(#11482) +py_cobjects(#10836) +py_cobjects(#10837) +py_cobjects(#10838) +py_cobjects(#10839) +py_cobjects(#10840) +py_cobjects(#10841) +py_cobjects(#10842) +py_cobjects(#10843) +py_cobjects(#10844) +py_cobjects(#10845) +py_cobjects(#10846) +py_cobjects(#10847) +py_cobjects(#10848) +py_cobjects(#10849) +py_cobjects(#10850) +py_cobjects(#10851) +py_cobjects(#10852) +py_cobjects(#10853) +py_cobjects(#10854) +py_cobjects(#10855) +py_cobjects(#10856) +py_cobjects(#10857) +py_cobjects(#10858) +py_cobjects(#10859) +py_cobjects(#10860) +py_cobjects(#10861) +py_cobjects(#10862) +py_cobjects(#10863) +py_cobjects(#10864) +py_cobjects(#10865) +py_cobjects(#10866) +py_cobjects(#10867) +py_cobjects(#10868) +py_cobjects(#10869) +py_cobjects(#10870) +py_cobjects(#10871) +py_cobjects(#11484) +py_cobjects(#11485) +py_cobjects(#10872) +py_cobjects(#11487) +py_cobjects(#10873) +py_cobjects(#10874) +py_cobjects(#10875) +py_cobjects(#10876) +py_cobjects(#10877) +py_cobjects(#10878) +py_cobjects(#10879) +py_cobjects(#10880) +py_cobjects(#10881) +py_cobjects(#10882) +py_cobjects(#10883) +py_cobjects(#10884) +py_cobjects(#10885) +py_cobjects(#10886) +py_cobjects(#10887) +py_cobjects(#10888) +py_cobjects(#11488) +py_cobjects(#10889) +py_cobjects(#10890) +py_cobjects(#10891) +py_cobjects(#10892) +py_cobjects(#10893) +py_cobjects(#10894) +py_cobjects(#10895) +py_cobjects(#10896) +py_cobjects(#10897) +py_cobjects(#10898) +py_cobjects(#11491) +py_cobjects(#10899) +py_cobjects(#11493) +py_cobjects(#11494) +py_cobjects(#11496) +py_cobjects(#11497) +py_cobjects(#10900) +py_cobjects(#10901) +py_cobjects(#10902) +py_cobjects(#10903) +py_cobjects(#10904) +py_cobjects(#10905) +py_cobjects(#10906) +py_cobjects(#10907) +py_cobjects(#10908) +py_cobjects(#10909) +py_cobjects(#10910) +py_cobjects(#10911) +py_cobjects(#10912) +py_cobjects(#10913) +py_cobjects(#11499) +py_cobjects(#10914) +py_cobjects(#10915) +py_cobjects(#11501) +py_cobjects(#10916) +py_cobjects(#10917) +py_cobjects(#10918) +py_cobjects(#10919) +py_cobjects(#10920) +py_cobjects(#11502) +py_cobjects(#10921) +py_cobjects(#10922) +py_cobjects(#11504) +py_cobjects(#11505) +py_cobjects(#10923) +py_cobjects(#10924) +py_cobjects(#10925) +py_cobjects(#10926) +py_cobjects(#11507) +py_cobjects(#10927) +py_cobjects(#10928) +py_cobjects(#10929) +py_cobjects(#10930) +py_cobjects(#10931) +py_cobjects(#10932) +py_cobjects(#10933) +py_cobjects(#10934) +py_cobjects(#10935) +py_cobjects(#10936) +py_cobjects(#10937) +py_cobjects(#10938) +py_cobjects(#10939) +py_cobjects(#10940) +py_cobjects(#10941) +py_cobjects(#10942) +py_cobjects(#10943) +py_cobjects(#10944) +py_cobjects(#10945) +py_cobjects(#10946) +py_cobjects(#10947) +py_cobjects(#10948) +py_cobjects(#10949) +py_cobjects(#10950) +py_cobjects(#10951) +py_cobjects(#10952) +py_cobjects(#11510) +py_cobjects(#11512) +py_cobjects(#11513) +py_cobjects(#10953) +py_cobjects(#11514) +py_cobjects(#11515) +py_cobjects(#11517) +py_cobjects(#10954) +py_cobjects(#11518) +py_cobjects(#11519) +py_cobjects(#11520) +py_cobjects(#11521) +py_cobjects(#11522) +py_cobjects(#10955) +py_cobjects(#10956) +py_cobjects(#10957) +py_cobjects(#10958) +py_cobjects(#10959) +py_cobjects(#10960) +py_cobjects(#10961) +py_cobjects(#10962) +py_cobjects(#10963) +py_cobjects(#11524) +py_cobjects(#11525) +py_cobjects(#11526) +py_cobjects(#11527) +py_cobjects(#11528) +py_cobjects(#11529) +py_cobjects(#10964) +py_cobjects(#10965) +py_cobjects(#10966) +py_cobjects(#10967) +py_cobjects(#10968) +py_cobjects(#10969) +py_cobjects(#10970) +py_cobjects(#10971) +py_cobjects(#10972) +py_cobjects(#10973) +py_cobjects(#10974) +py_cobjects(#10975) +py_cobjects(#11531) +py_cobjects(#11532) +py_cobjects(#11533) +py_cobjects(#11534) +py_cobjects(#11535) +py_cobjects(#11536) +py_cobjects(#10976) +py_cobjects(#10977) +py_cobjects(#10978) +py_cobjects(#10979) +py_cobjects(#10980) +py_cobjects(#10981) +py_cobjects(#11537) +py_cobjects(#11539) +py_cobjects(#11540) +py_cobjects(#11541) +py_cobjects(#11542) +py_cobjects(#11543) +py_cobjects(#11544) +py_cobjects(#11545) +py_cobjects(#11546) +py_cobjects(#11547) +py_cobjects(#11548) +py_cobjects(#11550) +py_cobjects(#11551) +py_cobjects(#10982) +py_cobjects(#10983) +py_cobjects(#10984) +py_cobjects(#10985) +py_cobjects(#10986) +py_cobjects(#10987) +py_cobjects(#11552) +py_cobjects(#11553) +py_cobjects(#11554) +py_cobjects(#11555) +py_cobjects(#10988) +py_cobjects(#11556) +py_cobjects(#11557) +py_cobjects(#10989) +py_cobjects(#10990) +py_cobjects(#10991) +py_cobjects(#10992) +py_cobjects(#10993) +py_cobjects(#10994) +py_cobjects(#10995) +py_cobjects(#10996) +py_cobjects(#10997) +py_cobjects(#10998) +py_cobjects(#10999) +py_cobjects(#11000) +py_cobjects(#11001) +py_cobjects(#11002) +py_cobjects(#11003) +py_cobjects(#11004) +py_cobjects(#11005) +py_cobjects(#11006) +py_cobjects(#11007) +py_cobjects(#11008) +py_cobjects(#11009) +py_cobjects(#11010) +py_cobjects(#11011) +py_cobjects(#11012) +py_cobjects(#11561) +py_cobjects(#11013) +py_cobjects(#11014) +py_cobjects(#11015) +py_cobjects(#11016) +py_cobjects(#11017) +py_cobjects(#11018) +py_cobjects(#11562) +py_cobjects(#11564) +py_cobjects(#11565) +py_cobjects(#11566) +py_cobjects(#11567) +py_cobjects(#11019) +py_cobjects(#11020) +py_cobjects(#11021) +py_cobjects(#11569) +py_cobjects(#11022) +py_cobjects(#11023) +py_cobjects(#11571) +py_cobjects(#11572) +py_cobjects(#11024) +py_cobjects(#11573) +py_cobjects(#11574) +py_cobjects(#11575) +py_cobjects(#11576) +py_cobjects(#11577) +py_cobjects(#11578) +py_cobjects(#11025) +py_cobjects(#11579) +py_cobjects(#11026) +py_cobjects(#11027) +py_cobjects(#11028) +py_cobjects(#11029) +py_cobjects(#11030) +py_cobjects(#11031) +py_cobjects(#11032) +py_cobjects(#11033) +py_cobjects(#11034) +py_cobjects(#11035) +py_cobjects(#11581) +py_cobjects(#11036) +py_cobjects(#11037) +py_cobjects(#11038) +py_cobjects(#11039) +py_cobjects(#11040) +py_cobjects(#11041) +py_cobjects(#11042) +py_cobjects(#11043) +py_cobjects(#11044) +py_cobjects(#11045) +py_cobjects(#11046) +py_cobjects(#11047) +py_cobjects(#11048) +py_cobjects(#11049) +py_cobjects(#11050) +py_cobjects(#11051) +py_cobjects(#11052) +py_cobjects(#11053) +py_cobjects(#11054) +py_cobjects(#11055) +py_cobjects(#11056) +py_cobjects(#11057) +py_cobjects(#11058) +py_cobjects(#11059) +py_cobjects(#11060) +py_cobjects(#11061) +py_cobjects(#11062) +py_cobjects(#11582) +py_cobjects(#11587) +py_cobjects(#11588) +py_cobjects(#11589) +py_cobjects(#11590) +py_cobjects(#11591) +py_cobjects(#11592) +py_cobjects(#11593) +py_cobjects(#11594) +py_cobjects(#11595) +py_cobjects(#11596) +py_cobjects(#11597) +py_cobjects(#11598) +py_cobjects(#11599) +py_cobjects(#11600) +py_cobjects(#11601) +py_cobjects(#11602) +py_cobjects(#11603) +py_cobjects(#11604) +py_cobjects(#11605) +py_cobjects(#11606) +py_cobjects(#11608) +py_cobjects(#11063) +py_cobjects(#11064) +py_cobjects(#11610) +py_cobjects(#11612) +py_cobjects(#11613) +py_cobjects(#11614) +py_cobjects(#11065) +py_cobjects(#11066) +py_cobjects(#11067) +py_cobjects(#11616) +py_cobjects(#11617) +py_cobjects(#11618) +py_cobjects(#11619) +py_cobjects(#11620) +py_cobjects(#11068) +py_cobjects(#11069) +py_cobjects(#11070) +py_cobjects(#11071) +py_cobjects(#11622) +py_cobjects(#11072) +py_cobjects(#11073) +py_cobjects(#11074) +py_cobjects(#11075) +py_cobjects(#11076) +py_cobjects(#11077) +py_cobjects(#11078) +py_cobjects(#11079) +py_cobjects(#11623) +py_cobjects(#11624) +py_cobjects(#11625) +py_cobjects(#11626) +py_cobjects(#11080) +py_cobjects(#11081) +py_cobjects(#11082) +py_cobjects(#11083) +py_cobjects(#11084) +py_cobjects(#11085) +py_cobjects(#11086) +py_cobjects(#11087) +py_cobjects(#11088) +py_cobjects(#11627) +py_cobjects(#11089) +py_cobjects(#11090) +py_cobjects(#11091) +py_cobjects(#11092) +py_cobjects(#11093) +py_cobjects(#11094) +py_cobjects(#11628) +py_cobjects(#11095) +py_cobjects(#11630) +py_cobjects(#11632) +py_cobjects(#11096) +py_cobjects(#11097) +py_cobjects(#11098) +py_cobjects(#11099) +py_cobjects(#11633) +py_cobjects(#11100) +py_cobjects(#11634) +py_cobjects(#11636) +py_cobjects(#11637) +py_cobjects(#11638) +py_cobjects(#11101) +py_cobjects(#11639) +py_cobjects(#11641) +py_cobjects(#11642) +py_cobjects(#11643) +py_cobjects(#11644) +py_cobjects(#11645) +py_cobjects(#11646) +py_cobjects(#11647) +py_cobjects(#11648) +py_cobjects(#11102) +py_cobjects(#11649) +py_cobjects(#11650) +py_cobjects(#11651) +py_cobjects(#11103) +py_cobjects(#11104) +py_cobjects(#11105) +py_cobjects(#11652) +py_cobjects(#11653) +py_cobjects(#11106) +py_cobjects(#11654) +py_cobjects(#11656) +py_cobjects(#11657) +py_cobjects(#11107) +py_cobjects(#11658) +py_cobjects(#11108) +py_cobjects(#11659) +py_cobjects(#11109) +py_cobjects(#11110) +py_cobjects(#11111) +py_cobjects(#11112) +py_cobjects(#11113) +py_cobjects(#11660) +py_cobjects(#11114) +py_cobjects(#11115) +py_cobjects(#11116) +py_cobjects(#11117) +py_cobjects(#11118) +py_cobjects(#11120) +py_cobjects(#11121) +py_cobjects(#11122) +py_cobjects(#11123) +py_cobjects(#11124) +py_cobjects(#11125) +py_cobjects(#11126) +py_cobjects(#11127) +py_cobjects(#11128) +py_cobjects(#11129) +py_cobjects(#11130) +py_cobjects(#11131) +py_cobjects(#11132) +py_cobjects(#11133) +py_cobjects(#11134) +py_cobjects(#11135) +py_cobjects(#11136) +py_cobjects(#11137) +py_cobjects(#11138) +py_cobjects(#11139) +py_cobjects(#11140) +py_cobjects(#11141) +py_cobjects(#11142) +py_cobjects(#11143) +py_cobjects(#11144) +py_cobjects(#11145) +py_cobjects(#11146) +py_cobjects(#11147) +py_cobjects(#11148) +py_cobjects(#11149) +py_cobjects(#11150) +py_cobjects(#11151) +py_cobjects(#11152) +py_cobjects(#11153) +py_cobjects(#11154) +py_cobjects(#11665) +py_cobjects(#11155) +py_cobjects(#11156) +py_cobjects(#11157) +py_cobjects(#11666) +py_cobjects(#11667) +py_cobjects(#11159) +py_cobjects(#11160) +py_cobjects(#11161) +py_cobjects(#11162) +py_cobjects(#11163) +py_cobjects(#11164) +py_cobjects(#11165) +py_cobjects(#11166) +py_cobjects(#11167) +py_cobjects(#11168) +py_cobjects(#11670) +py_cobjects(#11169) +py_cobjects(#11170) +py_cobjects(#11171) +py_cobjects(#11172) +py_cobjects(#11173) +py_cobjects(#11174) +py_cobjects(#11175) +py_cobjects(#11176) +py_cobjects(#11177) +py_cobjects(#11178) +py_cobjects(#11179) +py_cobjects(#11180) +py_cobjects(#11181) +py_cobjects(#11182) +py_cobjects(#11183) +py_cobjects(#11184) +py_cobjects(#11185) +py_cobjects(#11186) +py_cobjects(#11187) +py_cobjects(#11188) +py_cobjects(#11189) +py_cobjects(#11190) +py_cobjects(#11191) +py_cobjects(#11193) +py_cobjects(#11194) +py_cobjects(#11195) +py_cobjects(#11196) +py_cobjects(#11672) +py_cobjects(#11197) +py_cobjects(#11198) +py_cobjects(#11199) +py_cobjects(#11200) +py_cobjects(#11201) +py_cobjects(#11202) +py_cobjects(#11203) +py_cobjects(#11204) +py_cobjects(#11205) +py_cobjects(#11206) +py_cobjects(#11207) +py_cobjects(#11677) +py_cobjects(#11208) +py_cobjects(#11209) +py_cobjects(#11678) +py_cobjects(#11679) +py_cobjects(#11680) +py_cobjects(#11210) +py_cobjects(#11211) +py_cobjects(#11212) +py_cobjects(#11213) +py_cobjects(#11681) +py_cobjects(#11682) +py_cobjects(#11683) +py_cobjects(#11214) +py_cobjects(#11684) +py_cobjects(#11215) +py_cobjects(#11216) +py_cobjects(#11685) +py_cobjects(#11686) +py_cobjects(#11687) +py_cobjects(#11217) +py_cobjects(#11218) +py_cobjects(#11219) +py_cobjects(#11220) +py_cobjects(#11221) +py_cobjects(#11222) +py_cobjects(#11689) +py_cobjects(#11691) +py_cobjects(#11223) +py_cobjects(#11692) +py_cobjects(#11224) +py_cobjects(#11225) +py_cobjects(#11226) +py_cobjects(#11227) +py_cobjects(#11228) +py_cobjects(#11229) +py_cobjects(#11230) +py_cobjects(#11231) +py_cobjects(#11232) +py_cobjects(#11694) +py_cobjects(#11233) +py_cobjects(#11234) +py_cobjects(#11235) +py_cobjects(#11236) +py_cobjects(#11237) +py_cobjects(#11240) +py_cobjects(#11241) +py_cobjects(#11242) +py_cobjects(#11243) +py_cobjects(#11244) +py_cobjects(#11245) +py_cobjects(#11246) +py_cobjects(#11247) +py_cobjects(#11248) +py_cobjects(#11249) +py_cobjects(#11250) +py_cobjects(#11251) +py_cobjects(#11252) +py_cobjects(#11253) +py_cobjects(#11254) +py_cobjects(#11255) +py_cobjects(#11256) +py_cobjects(#11257) +py_cobjects(#11258) +py_cobjects(#11259) +py_cobjects(#11260) +py_cobjects(#11696) +py_cobjects(#11261) +py_cobjects(#11262) +py_cobjects(#11263) +py_cobjects(#11264) +py_cobjects(#11265) +py_cobjects(#11266) +py_cobjects(#11267) +py_cobjects(#11268) +py_cobjects(#11269) +py_cobjects(#11270) +py_cobjects(#11271) +py_cobjects(#11697) +py_cobjects(#11272) +py_cobjects(#11273) +py_cobjects(#11274) +py_cobjects(#11275) +py_cobjects(#11276) +py_cobjects(#11277) +py_cobjects(#11278) +py_cobjects(#11699) +py_cobjects(#11700) +py_cobjects(#11701) +py_cobjects(#11702) +py_cobjects(#11703) +py_cobjects(#11704) +py_cobjects(#11705) +py_cobjects(#11706) +py_cobjects(#11707) +py_cobjects(#11709) +py_cobjects(#11710) +py_cobjects(#11279) +py_cobjects(#11280) +py_cobjects(#11281) +py_cobjects(#11282) +py_cobjects(#11283) +py_cobjects(#11284) +py_cobjects(#11286) +py_cobjects(#11287) +py_cobjects(#11712) +py_cobjects(#11288) +py_cobjects(#11289) +py_cobjects(#11290) +py_cobjects(#11291) +py_cobjects(#11292) +py_cobjects(#11293) +py_cobjects(#11294) +py_cobjects(#11295) +py_cobjects(#11296) +py_cobjects(#11297) +py_cobjects(#11298) +py_cobjects(#11299) +py_cobjects(#11300) +py_cobjects(#11301) +py_cobjects(#11302) +py_cobjects(#11303) +py_cobjects(#11304) +py_cobjects(#11305) +py_cobjects(#11306) +py_cobjects(#11307) +py_cobjects(#11308) +py_cobjects(#11309) +py_cobjects(#11310) +py_cobjects(#11311) +py_cobjects(#11312) +py_cobjects(#11313) +py_cobjects(#11314) +py_cobjects(#11315) +py_cobjects(#11316) +py_cobjects(#11317) +py_cobjects(#11318) +py_cobjects(#11319) +py_cobjects(#11320) +py_cobjects(#11321) +py_cobjects(#11322) +py_cobjects(#11323) +py_cobjects(#11324) +py_cobjects(#11325) +py_cobjects(#11713) +py_cobjects(#11326) +py_cobjects(#11327) +py_cobjects(#11328) +py_cobjects(#11329) +py_cobjects(#11330) +py_cobjects(#11331) +py_cobjects(#11332) +py_cobjects(#11333) +py_cobjects(#11334) +py_cobjects(#11335) +py_cobjects(#11336) +py_cobjects(#11337) +py_cobjects(#11338) +py_cobjects(#11339) +py_cobjects(#11340) +py_cobjects(#11714) +py_cobjects(#11341) +py_cobjects(#11342) +py_cobjects(#11343) +py_cobjects(#11344) +py_cobjects(#11345) +py_cobjects(#11346) +py_cobjects(#11347) +py_cobjects(#11348) +py_cobjects(#11715) +py_cobjects(#11349) +py_cobjects(#11350) +py_cobjects(#11351) +py_cobjects(#11352) +py_cobjects(#11353) +py_cobjects(#11354) +py_cobjects(#11355) +py_cobjects(#11356) +py_cobjects(#11357) +py_cobjects(#11358) +py_cobjects(#11359) +py_cobjects(#11360) +py_cobjects(#11361) +py_cobjects(#11716) +py_cobjects(#11362) +py_cobjects(#11363) +py_cobjects(#11364) +py_cobjects(#11365) +py_cobjects(#11366) +py_cobjects(#11367) +py_cobjects(#11368) +py_cobjects(#11369) +py_cobjects(#11370) +py_cobjects(#11371) +py_cobjects(#11372) +py_cobjects(#11373) +py_cobjects(#11374) +py_cobject_sources(#11441, 1) +py_cobject_sources(#11439, 1) +py_cobject_sources(#10691, 1) +py_cobject_sources(#11443, 1) +py_cobject_sources(#11285, 1) +py_cobject_sources(#11444, 1) +py_cobject_sources(#11448, 1) +py_cobject_sources(#11449, 1) +py_cobject_sources(#10021, 1) +py_cobject_sources(#10492, 1) +py_cobject_sources(#10017, 1) +py_cobject_sources(#10001, 1) +py_cobject_sources(#10056, 1) +py_cobject_sources(#11454, 1) +py_cobject_sources(#11456, 1) +py_cobject_sources(#11457, 1) +py_cobject_sources(#11458, 1) +py_cobject_sources(#11823, 1) +py_cobject_sources(#11824, 1) +py_cobject_sources(#11825, 1) +py_cobject_sources(#11460, 1) +py_cobject_sources(#11459, 1) +py_cobject_sources(#10761, 1) +py_cobject_sources(#11465, 1) +py_cobject_sources(#10007, 1) +py_cobject_sources(#10085, 1) +py_cobject_sources(#10102, 1) +py_cobject_sources(#11826, 1) +py_cobject_sources(#11827, 1) +py_cobject_sources(#11828, 1) +py_cobject_sources(#10794, 1) +py_cobject_sources(#11829, 1) +py_cobject_sources(#11830, 1) +py_cobject_sources(#11831, 1) +py_cobject_sources(#11832, 1) +py_cobject_sources(#11833, 1) +py_cobject_sources(#11834, 1) +py_cobject_sources(#11472, 1) +py_cobject_sources(#11835, 1) +py_cobject_sources(#11836, 1) +py_cobject_sources(#11837, 1) +py_cobject_sources(#11838, 1) +py_cobject_sources(#11839, 1) +py_cobject_sources(#11840, 1) +py_cobject_sources(#10058, 1) +py_cobject_sources(#11841, 1) +py_cobject_sources(#11473, 1) +py_cobject_sources(#11842, 1) +py_cobject_sources(#11474, 1) +py_cobject_sources(#11843, 1) +py_cobject_sources(#10038, 1) +py_cobject_sources(#11844, 1) +py_cobject_sources(#11845, 1) +py_cobject_sources(#11846, 1) +py_cobject_sources(#10165, 1) +py_cobject_sources(#10167, 1) +py_cobject_sources(#11476, 1) +py_cobject_sources(#11673, 1) +py_cobject_sources(#11847, 1) +py_cobject_sources(#11480, 1) +py_cobject_sources(#11848, 1) +py_cobject_sources(#11690, 1) +py_cobject_sources(#11662, 1) +py_cobject_sources(#10082, 1) +py_cobject_sources(#10201, 1) +py_cobject_sources(#10204, 1) +py_cobject_sources(#10314, 1) +py_cobject_sources(#10315, 1) +py_cobject_sources(#11483, 1) +py_cobject_sources(#11849, 1) +py_cobject_sources(#10354, 1) +py_cobject_sources(#10005, 1) +py_cobject_sources(#11688, 1) +py_cobject_sources(#10024, 1) +py_cobject_sources(#10218, 1) +py_cobject_sources(#11850, 1) +py_cobject_sources(#11851, 1) +py_cobject_sources(#11852, 1) +py_cobject_sources(#10356, 1) +py_cobject_sources(#10250, 1) +py_cobject_sources(#11486, 1) +py_cobject_sources(#11412, 1) +py_cobject_sources(#11489, 1) +py_cobject_sources(#11490, 1) +py_cobject_sources(#10370, 1) +py_cobject_sources(#11492, 1) +py_cobject_sources(#11495, 1) +py_cobject_sources(#11498, 1) +py_cobject_sources(#10384, 1) +py_cobject_sources(#11853, 1) +py_cobject_sources(#11375, 1) +py_cobject_sources(#11854, 1) +py_cobject_sources(#11500, 1) +py_cobject_sources(#11503, 1) +py_cobject_sources(#11506, 1) +py_cobject_sources(#11855, 1) +py_cobject_sources(#11856, 1) +py_cobject_sources(#11857, 1) +py_cobject_sources(#10497, 1) +py_cobject_sources(#11508, 1) +py_cobject_sources(#11549, 1) +py_cobject_sources(#11558, 1) +py_cobject_sources(#11511, 1) +py_cobject_sources(#11563, 1) +py_cobject_sources(#11560, 1) +py_cobject_sources(#11509, 1) +py_cobject_sources(#11559, 1) +py_cobject_sources(#11516, 1) +py_cobject_sources(#11530, 1) +py_cobject_sources(#11538, 1) +py_cobject_sources(#11523, 1) +py_cobject_sources(#11570, 1) +py_cobject_sources(#11568, 1) +py_cobject_sources(#11858, 1) +py_cobject_sources(#11580, 1) +py_cobject_sources(#10511, 1) +py_cobject_sources(#10541, 1) +py_cobject_sources(#11693, 1) +py_cobject_sources(#11859, 1) +py_cobject_sources(#10543, 1) +py_cobject_sources(#10545, 1) +py_cobject_sources(#11860, 1) +py_cobject_sources(#11583, 1) +py_cobject_sources(#11861, 1) +py_cobject_sources(#11862, 1) +py_cobject_sources(#11609, 1) +py_cobject_sources(#11615, 1) +py_cobject_sources(#11863, 1) +py_cobject_sources(#11611, 1) +py_cobject_sources(#11864, 1) +py_cobject_sources(#11865, 1) +py_cobject_sources(#11584, 1) +py_cobject_sources(#11585, 1) +py_cobject_sources(#10557, 1) +py_cobject_sources(#11607, 1) +py_cobject_sources(#11377, 1) +py_cobject_sources(#11866, 1) +py_cobject_sources(#11586, 1) +py_cobject_sources(#11867, 1) +py_cobject_sources(#11868, 1) +py_cobject_sources(#10618, 1) +py_cobject_sources(#11621, 1) +py_cobject_sources(#11869, 1) +py_cobject_sources(#11870, 1) +py_cobject_sources(#10575, 1) +py_cobject_sources(#10578, 1) +py_cobject_sources(#10580, 1) +py_cobject_sources(#11640, 1) +py_cobject_sources(#11629, 1) +py_cobject_sources(#11655, 1) +py_cobject_sources(#11631, 1) +py_cobject_sources(#11635, 1) +py_cobject_sources(#11871, 1) +py_cobject_sources(#11872, 1) +py_cobject_sources(#10602, 1) +py_cobject_sources(#11661, 1) +py_cobject_sources(#10517, 1) +py_cobject_sources(#11238, 1) +py_cobject_sources(#11239, 1) +py_cobject_sources(#11718, 1) +py_cobject_sources(#11873, 1) +py_cobject_sources(#11874, 1) +py_cobject_sources(#11708, 1) +py_cobject_sources(#11664, 1) +py_cobject_sources(#11875, 1) +py_cobject_sources(#11876, 1) +py_cobject_sources(#11663, 1) +py_cobject_sources(#11877, 1) +py_cobject_sources(#11878, 1) +py_cobject_sources(#11879, 1) +py_cobject_sources(#11880, 1) +py_cobject_sources(#11711, 1) +py_cobject_sources(#10655, 1) +py_cobject_sources(#10656, 1) +py_cobject_sources(#11674, 1) +py_cobject_sources(#11675, 1) +py_cobject_sources(#11676, 1) +py_cobject_sources(#11881, 1) +py_cobject_sources(#11882, 1) +py_cobject_sources(#11883, 1) +py_cobject_sources(#11884, 1) +py_cobject_sources(#11698, 1) +py_cobject_sources(#11885, 1) +py_cobject_sources(#11886, 1) +py_cobject_sources(#11119, 1) +py_cobject_sources(#11887, 1) +py_cobject_sources(#11888, 1) +py_cobject_sources(#11889, 1) +py_cobject_sources(#11668, 1) +py_cobject_sources(#11890, 1) +py_cobject_sources(#11891, 1) +py_cobject_sources(#11892, 1) +py_cobject_sources(#11893, 1) +py_cobject_sources(#11894, 1) +py_cobject_sources(#11895, 1) +py_cobject_sources(#11896, 1) +py_cobject_sources(#11897, 1) +py_cobject_sources(#11669, 1) +py_cobject_sources(#11898, 1) +py_cobject_sources(#11899, 1) +py_cobject_sources(#11900, 1) +py_cobject_sources(#11901, 1) +py_cobject_sources(#11902, 1) +py_cobject_sources(#11903, 1) +py_cobject_sources(#11904, 1) +py_cobject_sources(#11905, 1) +py_cobject_sources(#11906, 1) +py_cobject_sources(#11907, 1) +py_cobject_sources(#11908, 1) +py_cobject_sources(#11909, 1) +py_cobject_sources(#11910, 1) +py_cobject_sources(#11911, 1) +py_cobject_sources(#11912, 1) +py_cobject_sources(#11913, 1) +py_cobject_sources(#11914, 1) +py_cobject_sources(#11915, 1) +py_cobject_sources(#11916, 1) +py_cobject_sources(#11917, 1) +py_cobject_sources(#11918, 1) +py_cobject_sources(#11919, 1) +py_cobject_sources(#11920, 1) +py_cobject_sources(#11921, 1) +py_cobject_sources(#11922, 1) +py_cobject_sources(#11923, 1) +py_cobject_sources(#11924, 1) +py_cobject_sources(#11925, 1) +py_cobject_sources(#11926, 1) +py_cobject_sources(#11927, 1) +py_cobject_sources(#11928, 1) +py_cobject_sources(#11929, 1) +py_cobject_sources(#11930, 1) +py_cobject_sources(#11931, 1) +py_cobject_sources(#11932, 1) +py_cobject_sources(#11671, 1) +py_cobject_sources(#11192, 1) +py_cobject_sources(#11933, 1) +py_cobject_sources(#11934, 1) +py_cobject_sources(#11935, 1) +py_cobject_sources(#10003, 1) +py_cobject_sources(#11695, 1) +py_cobject_sources(#11158, 1) +py_cobject_sources(#11936, 1) +py_cobject_sources(#11937, 1) +py_cobject_sources(#11938, 1) +py_cobject_sources(#11939, 1) +py_cobject_sources(#11717, 1) +py_cobject_sources(#11719, 1) +py_cobject_sources(#11720, 1) +py_cobject_sources(#11721, 1) +py_cobject_sources(#11722, 1) +py_cobject_sources(#11940, 1) +py_cobject_sources(#11723, 1) +py_cobject_sources(#11724, 1) +py_cobject_sources(#11725, 1) +py_cobject_sources(#11726, 1) +py_cobject_sources(#11727, 1) +py_cobject_sources(#11728, 1) +py_cobject_sources(#11729, 1) +py_cobject_sources(#11730, 1) +py_cobject_sources(#11731, 1) +py_cobject_sources(#11732, 1) +py_cobject_sources(#11733, 1) +py_cobject_sources(#11734, 1) +py_cobject_sources(#11735, 1) +py_cobject_sources(#11941, 1) +py_cobject_sources(#11736, 1) +py_cobject_sources(#11737, 1) +py_cobject_sources(#11738, 1) +py_cobject_sources(#11739, 1) +py_cobject_sources(#11942, 1) +py_cobject_sources(#11943, 1) +py_cobject_sources(#11740, 1) +py_cobject_sources(#11741, 1) +py_cobject_sources(#11944, 1) +py_cobject_sources(#11742, 1) +py_cobject_sources(#11945, 1) +py_cobject_sources(#11946, 1) +py_cobject_sources(#11947, 1) +py_cobject_sources(#11948, 1) +py_cobject_sources(#11743, 1) +py_cobject_sources(#11744, 1) +py_cobject_sources(#11745, 1) +py_cobject_sources(#11746, 1) +py_cobject_sources(#11747, 1) +py_cobject_sources(#11748, 1) +py_cobject_sources(#11949, 1) +py_cobject_sources(#11950, 1) +py_cobject_sources(#11749, 1) +py_cobject_sources(#11750, 1) +py_cobject_sources(#11951, 1) +py_cobject_sources(#11952, 1) +py_cobject_sources(#11953, 1) +py_cobject_sources(#11954, 1) +py_cobject_sources(#11955, 1) +py_cobject_sources(#11956, 1) +py_cobject_sources(#11957, 1) +py_cobject_sources(#11958, 1) +py_cobject_sources(#11959, 1) +py_cobject_sources(#11960, 1) +py_cobject_sources(#11751, 1) +py_cobject_sources(#11752, 1) +py_cobject_sources(#11753, 1) +py_cobject_sources(#11754, 1) +py_cobject_sources(#11755, 1) +py_cobject_sources(#11756, 1) +py_cobject_sources(#11757, 1) +py_cobject_sources(#11758, 1) +py_cobject_sources(#11759, 1) +py_cobject_sources(#11760, 1) +py_cobject_sources(#11761, 1) +py_cobject_sources(#11961, 1) +py_cobject_sources(#11962, 1) +py_cobject_sources(#11762, 1) +py_cobject_sources(#11963, 1) +py_cobject_sources(#11763, 1) +py_cobject_sources(#11964, 1) +py_cobject_sources(#11764, 1) +py_cobject_sources(#11765, 1) +py_cobject_sources(#11965, 1) +py_cobject_sources(#11766, 1) +py_cobject_sources(#11767, 1) +py_cobject_sources(#11768, 1) +py_cobject_sources(#11966, 1) +py_cobject_sources(#11769, 1) +py_cobject_sources(#11770, 1) +py_cobject_sources(#11771, 1) +py_cobject_sources(#11772, 1) +py_cobject_sources(#11967, 1) +py_cobject_sources(#11773, 1) +py_cobject_sources(#11774, 1) +py_cobject_sources(#11775, 1) +py_cobject_sources(#11776, 1) +py_cobject_sources(#11968, 1) +py_cobject_sources(#11777, 1) +py_cobject_sources(#11778, 1) +py_cobject_sources(#11779, 1) +py_cobject_sources(#11969, 1) +py_cobject_sources(#11780, 1) +py_cobject_sources(#11781, 1) +py_cobject_sources(#11782, 1) +py_cobject_sources(#11783, 1) +py_cobject_sources(#11784, 1) +py_cobject_sources(#11785, 1) +py_cobject_sources(#11970, 1) +py_cobject_sources(#11786, 1) +py_cobject_sources(#11971, 1) +py_cobject_sources(#11787, 1) +py_cobject_sources(#11788, 1) +py_cobject_sources(#11789, 1) +py_cobject_sources(#11790, 1) +py_cobject_sources(#11791, 1) +py_cobject_sources(#11792, 1) +py_cobject_sources(#11793, 1) +py_cobject_sources(#11794, 1) +py_cobject_sources(#11795, 1) +py_cobject_sources(#11796, 1) +py_cobject_sources(#11797, 1) +py_cobject_sources(#11972, 1) +py_cobject_sources(#11798, 1) +py_cobject_sources(#11973, 1) +py_cobject_sources(#11799, 1) +py_cobject_sources(#11974, 1) +py_cobject_sources(#11800, 1) +py_cobject_sources(#11801, 1) +py_cobject_sources(#11975, 1) +py_cobject_sources(#11976, 1) +py_cobject_sources(#11977, 1) +py_cobject_sources(#11802, 1) +py_cobject_sources(#11803, 1) +py_cobject_sources(#11978, 1) +py_cobject_sources(#11979, 1) +py_cobject_sources(#11980, 1) +py_cobject_sources(#11981, 1) +py_cobject_sources(#11804, 1) +py_cobject_sources(#11805, 1) +py_cobject_sources(#11806, 1) +py_cobject_sources(#11807, 1) +py_cobject_sources(#11808, 1) +py_cobject_sources(#11982, 1) +py_cobject_sources(#11983, 1) +py_cobject_sources(#11984, 1) +py_cobject_sources(#11809, 1) +py_cobject_sources(#11810, 1) +py_cobject_sources(#11811, 1) +py_cobject_sources(#11812, 1) +py_cobject_sources(#11813, 1) +py_cobject_sources(#11814, 1) +py_cobject_sources(#11815, 1) +py_cobject_sources(#11816, 1) +py_cobject_sources(#11817, 1) +py_cobject_sources(#11818, 1) +py_cobject_sources(#11819, 1) +py_cobject_sources(#11820, 1) +py_cobject_sources(#11821, 1) +py_cobject_sources(#11822, 1) +py_cobject_sources(#10000, 1) +py_cobject_sources(#10002, 1) +py_cobject_sources(#10004, 1) +py_cobject_sources(#10006, 1) +py_cobject_sources(#10008, 1) +py_cobject_sources(#10009, 1) +py_cobject_sources(#10010, 1) +py_cobject_sources(#10011, 1) +py_cobject_sources(#10012, 1) +py_cobject_sources(#10013, 1) +py_cobject_sources(#11985, 1) +py_cobject_sources(#10014, 1) +py_cobject_sources(#10015, 1) +py_cobject_sources(#10016, 1) +py_cobject_sources(#10018, 1) +py_cobject_sources(#11986, 1) +py_cobject_sources(#11376, 1) +py_cobject_sources(#11987, 1) +py_cobject_sources(#10019, 1) +py_cobject_sources(#10020, 1) +py_cobject_sources(#10022, 1) +py_cobject_sources(#10023, 1) +py_cobject_sources(#10025, 1) +py_cobject_sources(#10026, 1) +py_cobject_sources(#10027, 1) +py_cobject_sources(#11378, 1) +py_cobject_sources(#11379, 1) +py_cobject_sources(#10028, 1) +py_cobject_sources(#10029, 1) +py_cobject_sources(#10030, 1) +py_cobject_sources(#10031, 1) +py_cobject_sources(#10032, 1) +py_cobject_sources(#10033, 1) +py_cobject_sources(#10034, 1) +py_cobject_sources(#10035, 1) +py_cobject_sources(#10036, 1) +py_cobject_sources(#10037, 1) +py_cobject_sources(#10039, 1) +py_cobject_sources(#10040, 1) +py_cobject_sources(#10041, 1) +py_cobject_sources(#10042, 1) +py_cobject_sources(#10043, 1) +py_cobject_sources(#10044, 1) +py_cobject_sources(#10045, 1) +py_cobject_sources(#10046, 1) +py_cobject_sources(#10047, 1) +py_cobject_sources(#10048, 1) +py_cobject_sources(#10049, 1) +py_cobject_sources(#10050, 1) +py_cobject_sources(#10051, 1) +py_cobject_sources(#10052, 1) +py_cobject_sources(#10053, 1) +py_cobject_sources(#10054, 1) +py_cobject_sources(#11380, 1) +py_cobject_sources(#11381, 1) +py_cobject_sources(#11382, 1) +py_cobject_sources(#11383, 1) +py_cobject_sources(#11384, 1) +py_cobject_sources(#11385, 1) +py_cobject_sources(#10055, 1) +py_cobject_sources(#10057, 1) +py_cobject_sources(#10059, 1) +py_cobject_sources(#10060, 1) +py_cobject_sources(#10061, 1) +py_cobject_sources(#10062, 1) +py_cobject_sources(#10063, 1) +py_cobject_sources(#10064, 1) +py_cobject_sources(#10065, 1) +py_cobject_sources(#10066, 1) +py_cobject_sources(#10067, 1) +py_cobject_sources(#11988, 1) +py_cobject_sources(#11989, 1) +py_cobject_sources(#11386, 1) +py_cobject_sources(#11387, 1) +py_cobject_sources(#11990, 1) +py_cobject_sources(#11991, 1) +py_cobject_sources(#11992, 1) +py_cobject_sources(#11993, 1) +py_cobject_sources(#11994, 1) +py_cobject_sources(#11995, 1) +py_cobject_sources(#11996, 1) +py_cobject_sources(#11997, 1) +py_cobject_sources(#11998, 1) +py_cobject_sources(#11999, 1) +py_cobject_sources(#12000, 1) +py_cobject_sources(#12001, 1) +py_cobject_sources(#12002, 1) +py_cobject_sources(#12003, 1) +py_cobject_sources(#11388, 1) +py_cobject_sources(#11389, 1) +py_cobject_sources(#11390, 1) +py_cobject_sources(#11391, 1) +py_cobject_sources(#11392, 1) +py_cobject_sources(#11393, 1) +py_cobject_sources(#11394, 1) +py_cobject_sources(#11395, 1) +py_cobject_sources(#11396, 1) +py_cobject_sources(#11397, 1) +py_cobject_sources(#12004, 1) +py_cobject_sources(#12005, 1) +py_cobject_sources(#12006, 1) +py_cobject_sources(#12007, 1) +py_cobject_sources(#10068, 1) +py_cobject_sources(#10069, 1) +py_cobject_sources(#12008, 1) +py_cobject_sources(#12009, 1) +py_cobject_sources(#12010, 1) +py_cobject_sources(#12011, 1) +py_cobject_sources(#12012, 1) +py_cobject_sources(#12013, 1) +py_cobject_sources(#12014, 1) +py_cobject_sources(#12015, 1) +py_cobject_sources(#12016, 1) +py_cobject_sources(#12017, 1) +py_cobject_sources(#12018, 1) +py_cobject_sources(#12019, 1) +py_cobject_sources(#12020, 1) +py_cobject_sources(#12021, 1) +py_cobject_sources(#12022, 1) +py_cobject_sources(#12023, 1) +py_cobject_sources(#12024, 1) +py_cobject_sources(#12025, 1) +py_cobject_sources(#12026, 1) +py_cobject_sources(#12027, 1) +py_cobject_sources(#12028, 1) +py_cobject_sources(#12029, 1) +py_cobject_sources(#12030, 1) +py_cobject_sources(#12031, 1) +py_cobject_sources(#12032, 1) +py_cobject_sources(#12033, 1) +py_cobject_sources(#12034, 1) +py_cobject_sources(#12035, 1) +py_cobject_sources(#12036, 1) +py_cobject_sources(#12037, 1) +py_cobject_sources(#12038, 1) +py_cobject_sources(#12039, 1) +py_cobject_sources(#11398, 1) +py_cobject_sources(#11399, 1) +py_cobject_sources(#12040, 1) +py_cobject_sources(#12041, 1) +py_cobject_sources(#11400, 1) +py_cobject_sources(#11401, 1) +py_cobject_sources(#12042, 1) +py_cobject_sources(#12043, 1) +py_cobject_sources(#10070, 1) +py_cobject_sources(#10071, 1) +py_cobject_sources(#10072, 1) +py_cobject_sources(#10073, 1) +py_cobject_sources(#12044, 1) +py_cobject_sources(#12045, 1) +py_cobject_sources(#12046, 1) +py_cobject_sources(#12047, 1) +py_cobject_sources(#11402, 1) +py_cobject_sources(#11403, 1) +py_cobject_sources(#10074, 1) +py_cobject_sources(#10075, 1) +py_cobject_sources(#10076, 1) +py_cobject_sources(#10077, 1) +py_cobject_sources(#12048, 1) +py_cobject_sources(#12049, 1) +py_cobject_sources(#12050, 1) +py_cobject_sources(#12051, 1) +py_cobject_sources(#12052, 1) +py_cobject_sources(#12053, 1) +py_cobject_sources(#12054, 1) +py_cobject_sources(#12055, 1) +py_cobject_sources(#12056, 1) +py_cobject_sources(#12057, 1) +py_cobject_sources(#12058, 1) +py_cobject_sources(#12059, 1) +py_cobject_sources(#10078, 1) +py_cobject_sources(#10079, 1) +py_cobject_sources(#10080, 1) +py_cobject_sources(#10081, 1) +py_cobject_sources(#10083, 1) +py_cobject_sources(#10084, 1) +py_cobject_sources(#12060, 1) +py_cobject_sources(#12061, 1) +py_cobject_sources(#10086, 1) +py_cobject_sources(#10087, 1) +py_cobject_sources(#10088, 1) +py_cobject_sources(#10089, 1) +py_cobject_sources(#10090, 1) +py_cobject_sources(#10091, 1) +py_cobject_sources(#10092, 1) +py_cobject_sources(#10093, 1) +py_cobject_sources(#10094, 1) +py_cobject_sources(#10095, 1) +py_cobject_sources(#10096, 1) +py_cobject_sources(#10097, 1) +py_cobject_sources(#10098, 1) +py_cobject_sources(#10099, 1) +py_cobject_sources(#10100, 1) +py_cobject_sources(#10101, 1) +py_cobject_sources(#10103, 1) +py_cobject_sources(#10104, 1) +py_cobject_sources(#10105, 1) +py_cobject_sources(#10106, 1) +py_cobject_sources(#10107, 1) +py_cobject_sources(#10108, 1) +py_cobject_sources(#10109, 1) +py_cobject_sources(#10110, 1) +py_cobject_sources(#10111, 1) +py_cobject_sources(#10112, 1) +py_cobject_sources(#10113, 1) +py_cobject_sources(#10114, 1) +py_cobject_sources(#10115, 1) +py_cobject_sources(#10116, 1) +py_cobject_sources(#10117, 1) +py_cobject_sources(#10118, 1) +py_cobject_sources(#10119, 1) +py_cobject_sources(#10120, 1) +py_cobject_sources(#10121, 1) +py_cobject_sources(#10122, 1) +py_cobject_sources(#10123, 1) +py_cobject_sources(#10124, 1) +py_cobject_sources(#10125, 1) +py_cobject_sources(#10126, 1) +py_cobject_sources(#10127, 1) +py_cobject_sources(#10128, 1) +py_cobject_sources(#10129, 1) +py_cobject_sources(#10130, 1) +py_cobject_sources(#10131, 1) +py_cobject_sources(#10132, 1) +py_cobject_sources(#10133, 1) +py_cobject_sources(#10134, 1) +py_cobject_sources(#10135, 1) +py_cobject_sources(#10136, 1) +py_cobject_sources(#10137, 1) +py_cobject_sources(#10138, 1) +py_cobject_sources(#10139, 1) +py_cobject_sources(#10140, 1) +py_cobject_sources(#10141, 1) +py_cobject_sources(#10142, 1) +py_cobject_sources(#10143, 1) +py_cobject_sources(#10144, 1) +py_cobject_sources(#10145, 1) +py_cobject_sources(#10146, 1) +py_cobject_sources(#10147, 1) +py_cobject_sources(#10148, 1) +py_cobject_sources(#10149, 1) +py_cobject_sources(#10150, 1) +py_cobject_sources(#10151, 1) +py_cobject_sources(#10152, 1) +py_cobject_sources(#10153, 1) +py_cobject_sources(#10154, 1) +py_cobject_sources(#10155, 1) +py_cobject_sources(#11404, 1) +py_cobject_sources(#11405, 1) +py_cobject_sources(#10156, 1) +py_cobject_sources(#10157, 1) +py_cobject_sources(#10158, 1) +py_cobject_sources(#10159, 1) +py_cobject_sources(#10160, 1) +py_cobject_sources(#10161, 1) +py_cobject_sources(#10162, 1) +py_cobject_sources(#10163, 1) +py_cobject_sources(#12062, 1) +py_cobject_sources(#10164, 1) +py_cobject_sources(#10166, 1) +py_cobject_sources(#10168, 1) +py_cobject_sources(#10169, 1) +py_cobject_sources(#10170, 1) +py_cobject_sources(#11406, 1) +py_cobject_sources(#10171, 1) +py_cobject_sources(#10172, 1) +py_cobject_sources(#10173, 1) +py_cobject_sources(#10174, 1) +py_cobject_sources(#10175, 1) +py_cobject_sources(#10176, 1) +py_cobject_sources(#10177, 1) +py_cobject_sources(#10178, 1) +py_cobject_sources(#10179, 1) +py_cobject_sources(#10180, 1) +py_cobject_sources(#10181, 1) +py_cobject_sources(#10182, 1) +py_cobject_sources(#10183, 1) +py_cobject_sources(#10184, 1) +py_cobject_sources(#10185, 1) +py_cobject_sources(#10186, 1) +py_cobject_sources(#10187, 1) +py_cobject_sources(#10188, 1) +py_cobject_sources(#10189, 1) +py_cobject_sources(#10190, 1) +py_cobject_sources(#11407, 1) +py_cobject_sources(#11408, 1) +py_cobject_sources(#10191, 1) +py_cobject_sources(#10192, 1) +py_cobject_sources(#10193, 1) +py_cobject_sources(#10194, 1) +py_cobject_sources(#12063, 1) +py_cobject_sources(#12064, 1) +py_cobject_sources(#10195, 1) +py_cobject_sources(#10196, 1) +py_cobject_sources(#10197, 1) +py_cobject_sources(#10198, 1) +py_cobject_sources(#12065, 1) +py_cobject_sources(#10199, 1) +py_cobject_sources(#10200, 1) +py_cobject_sources(#10202, 1) +py_cobject_sources(#10203, 1) +py_cobject_sources(#10205, 1) +py_cobject_sources(#10206, 1) +py_cobject_sources(#10207, 1) +py_cobject_sources(#10208, 1) +py_cobject_sources(#10209, 1) +py_cobject_sources(#10210, 1) +py_cobject_sources(#10211, 1) +py_cobject_sources(#10212, 1) +py_cobject_sources(#10213, 1) +py_cobject_sources(#10214, 1) +py_cobject_sources(#10215, 1) +py_cobject_sources(#10216, 1) +py_cobject_sources(#10217, 1) +py_cobject_sources(#10219, 1) +py_cobject_sources(#10220, 1) +py_cobject_sources(#12066, 1) +py_cobject_sources(#10221, 1) +py_cobject_sources(#10222, 1) +py_cobject_sources(#10223, 1) +py_cobject_sources(#10224, 1) +py_cobject_sources(#10225, 1) +py_cobject_sources(#12067, 1) +py_cobject_sources(#10226, 1) +py_cobject_sources(#10227, 1) +py_cobject_sources(#10228, 1) +py_cobject_sources(#10229, 1) +py_cobject_sources(#10230, 1) +py_cobject_sources(#10231, 1) +py_cobject_sources(#10232, 1) +py_cobject_sources(#10233, 1) +py_cobject_sources(#10234, 1) +py_cobject_sources(#12068, 1) +py_cobject_sources(#12069, 1) +py_cobject_sources(#12070, 1) +py_cobject_sources(#10235, 1) +py_cobject_sources(#10236, 1) +py_cobject_sources(#10237, 1) +py_cobject_sources(#10238, 1) +py_cobject_sources(#10239, 1) +py_cobject_sources(#10240, 1) +py_cobject_sources(#10241, 1) +py_cobject_sources(#10242, 1) +py_cobject_sources(#10243, 1) +py_cobject_sources(#10244, 1) +py_cobject_sources(#10245, 1) +py_cobject_sources(#10246, 1) +py_cobject_sources(#10247, 1) +py_cobject_sources(#10248, 1) +py_cobject_sources(#10249, 1) +py_cobject_sources(#10251, 1) +py_cobject_sources(#10252, 1) +py_cobject_sources(#10253, 1) +py_cobject_sources(#10254, 1) +py_cobject_sources(#10255, 1) +py_cobject_sources(#10256, 1) +py_cobject_sources(#10257, 1) +py_cobject_sources(#10258, 1) +py_cobject_sources(#10259, 1) +py_cobject_sources(#10260, 1) +py_cobject_sources(#10261, 1) +py_cobject_sources(#10262, 1) +py_cobject_sources(#10263, 1) +py_cobject_sources(#10264, 1) +py_cobject_sources(#10265, 1) +py_cobject_sources(#10266, 1) +py_cobject_sources(#10267, 1) +py_cobject_sources(#10268, 1) +py_cobject_sources(#10269, 1) +py_cobject_sources(#10270, 1) +py_cobject_sources(#10271, 1) +py_cobject_sources(#10272, 1) +py_cobject_sources(#10273, 1) +py_cobject_sources(#10274, 1) +py_cobject_sources(#10275, 1) +py_cobject_sources(#12071, 1) +py_cobject_sources(#10276, 1) +py_cobject_sources(#12072, 1) +py_cobject_sources(#10277, 1) +py_cobject_sources(#10278, 1) +py_cobject_sources(#10279, 1) +py_cobject_sources(#10280, 1) +py_cobject_sources(#10281, 1) +py_cobject_sources(#10282, 1) +py_cobject_sources(#10283, 1) +py_cobject_sources(#10284, 1) +py_cobject_sources(#10285, 1) +py_cobject_sources(#10286, 1) +py_cobject_sources(#10287, 1) +py_cobject_sources(#10288, 1) +py_cobject_sources(#10289, 1) +py_cobject_sources(#10290, 1) +py_cobject_sources(#10291, 1) +py_cobject_sources(#10292, 1) +py_cobject_sources(#10293, 1) +py_cobject_sources(#10294, 1) +py_cobject_sources(#10295, 1) +py_cobject_sources(#10296, 1) +py_cobject_sources(#10297, 1) +py_cobject_sources(#10298, 1) +py_cobject_sources(#10299, 1) +py_cobject_sources(#12073, 1) +py_cobject_sources(#12074, 1) +py_cobject_sources(#10300, 1) +py_cobject_sources(#10301, 1) +py_cobject_sources(#10302, 1) +py_cobject_sources(#10303, 1) +py_cobject_sources(#10304, 1) +py_cobject_sources(#10305, 1) +py_cobject_sources(#10306, 1) +py_cobject_sources(#12075, 1) +py_cobject_sources(#10307, 1) +py_cobject_sources(#10308, 1) +py_cobject_sources(#10309, 1) +py_cobject_sources(#10310, 1) +py_cobject_sources(#10311, 1) +py_cobject_sources(#10312, 1) +py_cobject_sources(#10313, 1) +py_cobject_sources(#10316, 1) +py_cobject_sources(#10317, 1) +py_cobject_sources(#10318, 1) +py_cobject_sources(#10319, 1) +py_cobject_sources(#10320, 1) +py_cobject_sources(#10321, 1) +py_cobject_sources(#10322, 1) +py_cobject_sources(#10323, 1) +py_cobject_sources(#10324, 1) +py_cobject_sources(#10325, 1) +py_cobject_sources(#10326, 1) +py_cobject_sources(#10327, 1) +py_cobject_sources(#10328, 1) +py_cobject_sources(#10329, 1) +py_cobject_sources(#12076, 1) +py_cobject_sources(#12077, 1) +py_cobject_sources(#10330, 1) +py_cobject_sources(#10331, 1) +py_cobject_sources(#10332, 1) +py_cobject_sources(#10333, 1) +py_cobject_sources(#10334, 1) +py_cobject_sources(#10335, 1) +py_cobject_sources(#10336, 1) +py_cobject_sources(#10337, 1) +py_cobject_sources(#10338, 1) +py_cobject_sources(#10339, 1) +py_cobject_sources(#12078, 1) +py_cobject_sources(#10340, 1) +py_cobject_sources(#10341, 1) +py_cobject_sources(#12079, 1) +py_cobject_sources(#12080, 1) +py_cobject_sources(#12081, 1) +py_cobject_sources(#10342, 1) +py_cobject_sources(#12082, 1) +py_cobject_sources(#10343, 1) +py_cobject_sources(#10344, 1) +py_cobject_sources(#10345, 1) +py_cobject_sources(#10346, 1) +py_cobject_sources(#12083, 1) +py_cobject_sources(#10347, 1) +py_cobject_sources(#10348, 1) +py_cobject_sources(#10349, 1) +py_cobject_sources(#10350, 1) +py_cobject_sources(#10351, 1) +py_cobject_sources(#10352, 1) +py_cobject_sources(#11409, 1) +py_cobject_sources(#11410, 1) +py_cobject_sources(#11411, 1) +py_cobject_sources(#10353, 1) +py_cobject_sources(#10355, 1) +py_cobject_sources(#10357, 1) +py_cobject_sources(#10358, 1) +py_cobject_sources(#10359, 1) +py_cobject_sources(#10360, 1) +py_cobject_sources(#10361, 1) +py_cobject_sources(#10362, 1) +py_cobject_sources(#10363, 1) +py_cobject_sources(#10364, 1) +py_cobject_sources(#10365, 1) +py_cobject_sources(#10366, 1) +py_cobject_sources(#10367, 1) +py_cobject_sources(#11413, 1) +py_cobject_sources(#10368, 1) +py_cobject_sources(#10369, 1) +py_cobject_sources(#10371, 1) +py_cobject_sources(#10372, 1) +py_cobject_sources(#10373, 1) +py_cobject_sources(#10374, 1) +py_cobject_sources(#10375, 1) +py_cobject_sources(#10376, 1) +py_cobject_sources(#10377, 1) +py_cobject_sources(#10378, 1) +py_cobject_sources(#10379, 1) +py_cobject_sources(#11414, 1) +py_cobject_sources(#10380, 1) +py_cobject_sources(#11415, 1) +py_cobject_sources(#11416, 1) +py_cobject_sources(#10381, 1) +py_cobject_sources(#10382, 1) +py_cobject_sources(#10383, 1) +py_cobject_sources(#10385, 1) +py_cobject_sources(#12084, 1) +py_cobject_sources(#12085, 1) +py_cobject_sources(#10386, 1) +py_cobject_sources(#10387, 1) +py_cobject_sources(#10388, 1) +py_cobject_sources(#10389, 1) +py_cobject_sources(#11417, 1) +py_cobject_sources(#10390, 1) +py_cobject_sources(#11418, 1) +py_cobject_sources(#10391, 1) +py_cobject_sources(#10392, 1) +py_cobject_sources(#10393, 1) +py_cobject_sources(#10394, 1) +py_cobject_sources(#12086, 1) +py_cobject_sources(#12087, 1) +py_cobject_sources(#12088, 1) +py_cobject_sources(#10395, 1) +py_cobject_sources(#10396, 1) +py_cobject_sources(#10397, 1) +py_cobject_sources(#10398, 1) +py_cobject_sources(#10399, 1) +py_cobject_sources(#10400, 1) +py_cobject_sources(#10401, 1) +py_cobject_sources(#10402, 1) +py_cobject_sources(#10403, 1) +py_cobject_sources(#10404, 1) +py_cobject_sources(#10405, 1) +py_cobject_sources(#10406, 1) +py_cobject_sources(#10407, 1) +py_cobject_sources(#10408, 1) +py_cobject_sources(#10409, 1) +py_cobject_sources(#10410, 1) +py_cobject_sources(#10411, 1) +py_cobject_sources(#10412, 1) +py_cobject_sources(#10413, 1) +py_cobject_sources(#10414, 1) +py_cobject_sources(#10415, 1) +py_cobject_sources(#10416, 1) +py_cobject_sources(#10417, 1) +py_cobject_sources(#10418, 1) +py_cobject_sources(#10419, 1) +py_cobject_sources(#10420, 1) +py_cobject_sources(#10421, 1) +py_cobject_sources(#10422, 1) +py_cobject_sources(#10423, 1) +py_cobject_sources(#10424, 1) +py_cobject_sources(#10425, 1) +py_cobject_sources(#10426, 1) +py_cobject_sources(#10427, 1) +py_cobject_sources(#10428, 1) +py_cobject_sources(#10429, 1) +py_cobject_sources(#10430, 1) +py_cobject_sources(#12089, 1) +py_cobject_sources(#10431, 1) +py_cobject_sources(#10432, 1) +py_cobject_sources(#10433, 1) +py_cobject_sources(#10434, 1) +py_cobject_sources(#10435, 1) +py_cobject_sources(#10436, 1) +py_cobject_sources(#10437, 1) +py_cobject_sources(#10438, 1) +py_cobject_sources(#10439, 1) +py_cobject_sources(#10440, 1) +py_cobject_sources(#10441, 1) +py_cobject_sources(#10442, 1) +py_cobject_sources(#10443, 1) +py_cobject_sources(#10444, 1) +py_cobject_sources(#12090, 1) +py_cobject_sources(#12091, 1) +py_cobject_sources(#10445, 1) +py_cobject_sources(#10446, 1) +py_cobject_sources(#10447, 1) +py_cobject_sources(#10448, 1) +py_cobject_sources(#10449, 1) +py_cobject_sources(#10450, 1) +py_cobject_sources(#10451, 1) +py_cobject_sources(#10452, 1) +py_cobject_sources(#10453, 1) +py_cobject_sources(#11419, 1) +py_cobject_sources(#10454, 1) +py_cobject_sources(#10455, 1) +py_cobject_sources(#10456, 1) +py_cobject_sources(#10457, 1) +py_cobject_sources(#10458, 1) +py_cobject_sources(#10459, 1) +py_cobject_sources(#10460, 1) +py_cobject_sources(#10461, 1) +py_cobject_sources(#10462, 1) +py_cobject_sources(#10463, 1) +py_cobject_sources(#10464, 1) +py_cobject_sources(#10465, 1) +py_cobject_sources(#10466, 1) +py_cobject_sources(#10467, 1) +py_cobject_sources(#10468, 1) +py_cobject_sources(#10469, 1) +py_cobject_sources(#10470, 1) +py_cobject_sources(#10471, 1) +py_cobject_sources(#10472, 1) +py_cobject_sources(#10473, 1) +py_cobject_sources(#10474, 1) +py_cobject_sources(#10475, 1) +py_cobject_sources(#10476, 1) +py_cobject_sources(#10477, 1) +py_cobject_sources(#10478, 1) +py_cobject_sources(#10479, 1) +py_cobject_sources(#10480, 1) +py_cobject_sources(#10481, 1) +py_cobject_sources(#10482, 1) +py_cobject_sources(#10483, 1) +py_cobject_sources(#11420, 1) +py_cobject_sources(#11421, 1) +py_cobject_sources(#10484, 1) +py_cobject_sources(#10485, 1) +py_cobject_sources(#11422, 1) +py_cobject_sources(#10486, 1) +py_cobject_sources(#10487, 1) +py_cobject_sources(#10488, 1) +py_cobject_sources(#10489, 1) +py_cobject_sources(#10490, 1) +py_cobject_sources(#10491, 1) +py_cobject_sources(#10493, 1) +py_cobject_sources(#10494, 1) +py_cobject_sources(#10495, 1) +py_cobject_sources(#10496, 1) +py_cobject_sources(#11423, 1) +py_cobject_sources(#10498, 1) +py_cobject_sources(#12092, 1) +py_cobject_sources(#12093, 1) +py_cobject_sources(#10499, 1) +py_cobject_sources(#10500, 1) +py_cobject_sources(#10501, 1) +py_cobject_sources(#10502, 1) +py_cobject_sources(#10503, 1) +py_cobject_sources(#10504, 1) +py_cobject_sources(#10505, 1) +py_cobject_sources(#10506, 1) +py_cobject_sources(#10507, 1) +py_cobject_sources(#10508, 1) +py_cobject_sources(#10509, 1) +py_cobject_sources(#10510, 1) +py_cobject_sources(#10512, 1) +py_cobject_sources(#10513, 1) +py_cobject_sources(#10514, 1) +py_cobject_sources(#10515, 1) +py_cobject_sources(#10516, 1) +py_cobject_sources(#10518, 1) +py_cobject_sources(#10519, 1) +py_cobject_sources(#10520, 1) +py_cobject_sources(#10521, 1) +py_cobject_sources(#10522, 1) +py_cobject_sources(#10523, 1) +py_cobject_sources(#10524, 1) +py_cobject_sources(#10525, 1) +py_cobject_sources(#10526, 1) +py_cobject_sources(#10527, 1) +py_cobject_sources(#10528, 1) +py_cobject_sources(#10529, 1) +py_cobject_sources(#10530, 1) +py_cobject_sources(#10531, 1) +py_cobject_sources(#10532, 1) +py_cobject_sources(#10533, 1) +py_cobject_sources(#10534, 1) +py_cobject_sources(#10535, 1) +py_cobject_sources(#10536, 1) +py_cobject_sources(#10537, 1) +py_cobject_sources(#10538, 1) +py_cobject_sources(#10539, 1) +py_cobject_sources(#10540, 1) +py_cobject_sources(#10542, 1) +py_cobject_sources(#10544, 1) +py_cobject_sources(#10546, 1) +py_cobject_sources(#10547, 1) +py_cobject_sources(#11424, 1) +py_cobject_sources(#11425, 1) +py_cobject_sources(#11426, 1) +py_cobject_sources(#10548, 1) +py_cobject_sources(#10549, 1) +py_cobject_sources(#10550, 1) +py_cobject_sources(#10551, 1) +py_cobject_sources(#10552, 1) +py_cobject_sources(#10553, 1) +py_cobject_sources(#10554, 1) +py_cobject_sources(#10555, 1) +py_cobject_sources(#10556, 1) +py_cobject_sources(#10558, 1) +py_cobject_sources(#10559, 1) +py_cobject_sources(#10560, 1) +py_cobject_sources(#11427, 1) +py_cobject_sources(#11428, 1) +py_cobject_sources(#11429, 1) +py_cobject_sources(#10561, 1) +py_cobject_sources(#10562, 1) +py_cobject_sources(#10563, 1) +py_cobject_sources(#10564, 1) +py_cobject_sources(#10565, 1) +py_cobject_sources(#10566, 1) +py_cobject_sources(#11430, 1) +py_cobject_sources(#10567, 1) +py_cobject_sources(#10568, 1) +py_cobject_sources(#10569, 1) +py_cobject_sources(#10570, 1) +py_cobject_sources(#10571, 1) +py_cobject_sources(#10572, 1) +py_cobject_sources(#10573, 1) +py_cobject_sources(#10574, 1) +py_cobject_sources(#10576, 1) +py_cobject_sources(#10577, 1) +py_cobject_sources(#10579, 1) +py_cobject_sources(#10581, 1) +py_cobject_sources(#10582, 1) +py_cobject_sources(#10583, 1) +py_cobject_sources(#10584, 1) +py_cobject_sources(#10585, 1) +py_cobject_sources(#10586, 1) +py_cobject_sources(#10587, 1) +py_cobject_sources(#10588, 1) +py_cobject_sources(#10589, 1) +py_cobject_sources(#10590, 1) +py_cobject_sources(#10591, 1) +py_cobject_sources(#10592, 1) +py_cobject_sources(#10593, 1) +py_cobject_sources(#10594, 1) +py_cobject_sources(#12094, 1) +py_cobject_sources(#10595, 1) +py_cobject_sources(#10596, 1) +py_cobject_sources(#10597, 1) +py_cobject_sources(#10598, 1) +py_cobject_sources(#10599, 1) +py_cobject_sources(#10600, 1) +py_cobject_sources(#10601, 1) +py_cobject_sources(#10603, 1) +py_cobject_sources(#10604, 1) +py_cobject_sources(#10605, 1) +py_cobject_sources(#10606, 1) +py_cobject_sources(#10607, 1) +py_cobject_sources(#10608, 1) +py_cobject_sources(#10609, 1) +py_cobject_sources(#10610, 1) +py_cobject_sources(#10611, 1) +py_cobject_sources(#11431, 1) +py_cobject_sources(#10612, 1) +py_cobject_sources(#10613, 1) +py_cobject_sources(#10614, 1) +py_cobject_sources(#10615, 1) +py_cobject_sources(#12095, 1) +py_cobject_sources(#10616, 1) +py_cobject_sources(#10617, 1) +py_cobject_sources(#10619, 1) +py_cobject_sources(#10620, 1) +py_cobject_sources(#10621, 1) +py_cobject_sources(#10622, 1) +py_cobject_sources(#10623, 1) +py_cobject_sources(#10624, 1) +py_cobject_sources(#10625, 1) +py_cobject_sources(#10626, 1) +py_cobject_sources(#10627, 1) +py_cobject_sources(#10628, 1) +py_cobject_sources(#10629, 1) +py_cobject_sources(#10630, 1) +py_cobject_sources(#10631, 1) +py_cobject_sources(#11432, 1) +py_cobject_sources(#10632, 1) +py_cobject_sources(#10633, 1) +py_cobject_sources(#11433, 1) +py_cobject_sources(#10634, 1) +py_cobject_sources(#11434, 1) +py_cobject_sources(#10635, 1) +py_cobject_sources(#10636, 1) +py_cobject_sources(#12096, 1) +py_cobject_sources(#10637, 1) +py_cobject_sources(#10638, 1) +py_cobject_sources(#10639, 1) +py_cobject_sources(#10640, 1) +py_cobject_sources(#10641, 1) +py_cobject_sources(#10642, 1) +py_cobject_sources(#10643, 1) +py_cobject_sources(#10644, 1) +py_cobject_sources(#12097, 1) +py_cobject_sources(#12098, 1) +py_cobject_sources(#11435, 1) +py_cobject_sources(#10645, 1) +py_cobject_sources(#10646, 1) +py_cobject_sources(#12099, 1) +py_cobject_sources(#10647, 1) +py_cobject_sources(#10648, 1) +py_cobject_sources(#10649, 1) +py_cobject_sources(#11436, 1) +py_cobject_sources(#10650, 1) +py_cobject_sources(#10651, 1) +py_cobject_sources(#11437, 1) +py_cobject_sources(#10652, 1) +py_cobject_sources(#10653, 1) +py_cobject_sources(#10654, 1) +py_cobject_sources(#10657, 1) +py_cobject_sources(#10658, 1) +py_cobject_sources(#10659, 1) +py_cobject_sources(#12100, 1) +py_cobject_sources(#12101, 1) +py_cobject_sources(#12102, 1) +py_cobject_sources(#11438, 1) +py_cobject_sources(#10660, 1) +py_cobject_sources(#10661, 1) +py_cobject_sources(#12103, 1) +py_cobject_sources(#10662, 1) +py_cobject_sources(#10663, 1) +py_cobject_sources(#10664, 1) +py_cobject_sources(#12104, 1) +py_cobject_sources(#10665, 1) +py_cobject_sources(#10666, 1) +py_cobject_sources(#10667, 1) +py_cobject_sources(#10668, 1) +py_cobject_sources(#10669, 1) +py_cobject_sources(#10670, 1) +py_cobject_sources(#10671, 1) +py_cobject_sources(#10672, 1) +py_cobject_sources(#10673, 1) +py_cobject_sources(#10674, 1) +py_cobject_sources(#10675, 1) +py_cobject_sources(#10676, 1) +py_cobject_sources(#10677, 1) +py_cobject_sources(#10678, 1) +py_cobject_sources(#10679, 1) +py_cobject_sources(#10680, 1) +py_cobject_sources(#10681, 1) +py_cobject_sources(#11440, 1) +py_cobject_sources(#10682, 1) +py_cobject_sources(#10683, 1) +py_cobject_sources(#10684, 1) +py_cobject_sources(#10685, 1) +py_cobject_sources(#10686, 1) +py_cobject_sources(#11442, 1) +py_cobject_sources(#10687, 1) +py_cobject_sources(#10688, 1) +py_cobject_sources(#10689, 1) +py_cobject_sources(#10690, 1) +py_cobject_sources(#10692, 1) +py_cobject_sources(#10693, 1) +py_cobject_sources(#10694, 1) +py_cobject_sources(#10695, 1) +py_cobject_sources(#10696, 1) +py_cobject_sources(#10697, 1) +py_cobject_sources(#10698, 1) +py_cobject_sources(#10699, 1) +py_cobject_sources(#10700, 1) +py_cobject_sources(#10701, 1) +py_cobject_sources(#10702, 1) +py_cobject_sources(#10703, 1) +py_cobject_sources(#10704, 1) +py_cobject_sources(#10705, 1) +py_cobject_sources(#10706, 1) +py_cobject_sources(#10707, 1) +py_cobject_sources(#10708, 1) +py_cobject_sources(#10709, 1) +py_cobject_sources(#10710, 1) +py_cobject_sources(#10711, 1) +py_cobject_sources(#10712, 1) +py_cobject_sources(#10713, 1) +py_cobject_sources(#10714, 1) +py_cobject_sources(#10715, 1) +py_cobject_sources(#10716, 1) +py_cobject_sources(#10717, 1) +py_cobject_sources(#10718, 1) +py_cobject_sources(#10719, 1) +py_cobject_sources(#11445, 1) +py_cobject_sources(#11446, 1) +py_cobject_sources(#11447, 1) +py_cobject_sources(#10720, 1) +py_cobject_sources(#10721, 1) +py_cobject_sources(#10722, 1) +py_cobject_sources(#10723, 1) +py_cobject_sources(#10724, 1) +py_cobject_sources(#10725, 1) +py_cobject_sources(#10726, 1) +py_cobject_sources(#10727, 1) +py_cobject_sources(#10728, 1) +py_cobject_sources(#11450, 1) +py_cobject_sources(#11451, 1) +py_cobject_sources(#11452, 1) +py_cobject_sources(#11453, 1) +py_cobject_sources(#10729, 1) +py_cobject_sources(#10730, 1) +py_cobject_sources(#10731, 1) +py_cobject_sources(#10732, 1) +py_cobject_sources(#10733, 1) +py_cobject_sources(#10734, 1) +py_cobject_sources(#10735, 1) +py_cobject_sources(#10736, 1) +py_cobject_sources(#10737, 1) +py_cobject_sources(#10738, 1) +py_cobject_sources(#10739, 1) +py_cobject_sources(#10740, 1) +py_cobject_sources(#10741, 1) +py_cobject_sources(#11455, 1) +py_cobject_sources(#10742, 1) +py_cobject_sources(#10743, 1) +py_cobject_sources(#10744, 1) +py_cobject_sources(#10745, 1) +py_cobject_sources(#10746, 1) +py_cobject_sources(#10747, 1) +py_cobject_sources(#10748, 1) +py_cobject_sources(#10749, 1) +py_cobject_sources(#10750, 1) +py_cobject_sources(#10751, 1) +py_cobject_sources(#10752, 1) +py_cobject_sources(#10753, 1) +py_cobject_sources(#10754, 1) +py_cobject_sources(#11461, 1) +py_cobject_sources(#10755, 1) +py_cobject_sources(#10756, 1) +py_cobject_sources(#10757, 1) +py_cobject_sources(#11462, 1) +py_cobject_sources(#11463, 1) +py_cobject_sources(#10758, 1) +py_cobject_sources(#10759, 1) +py_cobject_sources(#10760, 1) +py_cobject_sources(#10762, 1) +py_cobject_sources(#10763, 1) +py_cobject_sources(#10764, 1) +py_cobject_sources(#11464, 1) +py_cobject_sources(#11466, 1) +py_cobject_sources(#11467, 1) +py_cobject_sources(#10765, 1) +py_cobject_sources(#10766, 1) +py_cobject_sources(#11468, 1) +py_cobject_sources(#11469, 1) +py_cobject_sources(#10767, 1) +py_cobject_sources(#10768, 1) +py_cobject_sources(#10769, 1) +py_cobject_sources(#10770, 1) +py_cobject_sources(#10771, 1) +py_cobject_sources(#10772, 1) +py_cobject_sources(#10773, 1) +py_cobject_sources(#10774, 1) +py_cobject_sources(#10775, 1) +py_cobject_sources(#10776, 1) +py_cobject_sources(#10777, 1) +py_cobject_sources(#10778, 1) +py_cobject_sources(#10779, 1) +py_cobject_sources(#10780, 1) +py_cobject_sources(#10781, 1) +py_cobject_sources(#11470, 1) +py_cobject_sources(#10782, 1) +py_cobject_sources(#10783, 1) +py_cobject_sources(#10784, 1) +py_cobject_sources(#10785, 1) +py_cobject_sources(#10786, 1) +py_cobject_sources(#10787, 1) +py_cobject_sources(#10788, 1) +py_cobject_sources(#10789, 1) +py_cobject_sources(#10790, 1) +py_cobject_sources(#10791, 1) +py_cobject_sources(#10792, 1) +py_cobject_sources(#10793, 1) +py_cobject_sources(#11471, 1) +py_cobject_sources(#10795, 1) +py_cobject_sources(#10796, 1) +py_cobject_sources(#11475, 1) +py_cobject_sources(#10797, 1) +py_cobject_sources(#10798, 1) +py_cobject_sources(#10799, 1) +py_cobject_sources(#10800, 1) +py_cobject_sources(#11477, 1) +py_cobject_sources(#10801, 1) +py_cobject_sources(#11478, 1) +py_cobject_sources(#10802, 1) +py_cobject_sources(#10803, 1) +py_cobject_sources(#10804, 1) +py_cobject_sources(#10805, 1) +py_cobject_sources(#10806, 1) +py_cobject_sources(#10807, 1) +py_cobject_sources(#10808, 1) +py_cobject_sources(#11479, 1) +py_cobject_sources(#10809, 1) +py_cobject_sources(#10810, 1) +py_cobject_sources(#10811, 1) +py_cobject_sources(#10812, 1) +py_cobject_sources(#10813, 1) +py_cobject_sources(#10814, 1) +py_cobject_sources(#10815, 1) +py_cobject_sources(#10816, 1) +py_cobject_sources(#10817, 1) +py_cobject_sources(#10818, 1) +py_cobject_sources(#10819, 1) +py_cobject_sources(#10820, 1) +py_cobject_sources(#10821, 1) +py_cobject_sources(#10822, 1) +py_cobject_sources(#10823, 1) +py_cobject_sources(#10824, 1) +py_cobject_sources(#10825, 1) +py_cobject_sources(#10826, 1) +py_cobject_sources(#10827, 1) +py_cobject_sources(#10828, 1) +py_cobject_sources(#10829, 1) +py_cobject_sources(#10830, 1) +py_cobject_sources(#10831, 1) +py_cobject_sources(#10832, 1) +py_cobject_sources(#10833, 1) +py_cobject_sources(#10834, 1) +py_cobject_sources(#10835, 1) +py_cobject_sources(#11481, 1) +py_cobject_sources(#11482, 1) +py_cobject_sources(#10836, 1) +py_cobject_sources(#10837, 1) +py_cobject_sources(#10838, 1) +py_cobject_sources(#10839, 1) +py_cobject_sources(#10840, 1) +py_cobject_sources(#10841, 1) +py_cobject_sources(#10842, 1) +py_cobject_sources(#10843, 1) +py_cobject_sources(#10844, 1) +py_cobject_sources(#10845, 1) +py_cobject_sources(#10846, 1) +py_cobject_sources(#10847, 1) +py_cobject_sources(#10848, 1) +py_cobject_sources(#10849, 1) +py_cobject_sources(#10850, 1) +py_cobject_sources(#10851, 1) +py_cobject_sources(#10852, 1) +py_cobject_sources(#10853, 1) +py_cobject_sources(#10854, 1) +py_cobject_sources(#10855, 1) +py_cobject_sources(#10856, 1) +py_cobject_sources(#10857, 1) +py_cobject_sources(#10858, 1) +py_cobject_sources(#10859, 1) +py_cobject_sources(#10860, 1) +py_cobject_sources(#10861, 1) +py_cobject_sources(#10862, 1) +py_cobject_sources(#10863, 1) +py_cobject_sources(#10864, 1) +py_cobject_sources(#10865, 1) +py_cobject_sources(#10866, 1) +py_cobject_sources(#10867, 1) +py_cobject_sources(#10868, 1) +py_cobject_sources(#10869, 1) +py_cobject_sources(#10870, 1) +py_cobject_sources(#10871, 1) +py_cobject_sources(#11484, 1) +py_cobject_sources(#11485, 1) +py_cobject_sources(#10872, 1) +py_cobject_sources(#11487, 1) +py_cobject_sources(#10873, 1) +py_cobject_sources(#10874, 1) +py_cobject_sources(#10875, 1) +py_cobject_sources(#10876, 1) +py_cobject_sources(#10877, 1) +py_cobject_sources(#10878, 1) +py_cobject_sources(#10879, 1) +py_cobject_sources(#10880, 1) +py_cobject_sources(#10881, 1) +py_cobject_sources(#10882, 1) +py_cobject_sources(#10883, 1) +py_cobject_sources(#10884, 1) +py_cobject_sources(#10885, 1) +py_cobject_sources(#10886, 1) +py_cobject_sources(#10887, 1) +py_cobject_sources(#10888, 1) +py_cobject_sources(#11488, 1) +py_cobject_sources(#10889, 1) +py_cobject_sources(#10890, 1) +py_cobject_sources(#10891, 1) +py_cobject_sources(#10892, 1) +py_cobject_sources(#10893, 1) +py_cobject_sources(#10894, 1) +py_cobject_sources(#10895, 1) +py_cobject_sources(#10896, 1) +py_cobject_sources(#10897, 1) +py_cobject_sources(#10898, 1) +py_cobject_sources(#11491, 1) +py_cobject_sources(#10899, 1) +py_cobject_sources(#11493, 1) +py_cobject_sources(#11494, 1) +py_cobject_sources(#11496, 1) +py_cobject_sources(#11497, 1) +py_cobject_sources(#10900, 1) +py_cobject_sources(#10901, 1) +py_cobject_sources(#10902, 1) +py_cobject_sources(#10903, 1) +py_cobject_sources(#10904, 1) +py_cobject_sources(#10905, 1) +py_cobject_sources(#10906, 1) +py_cobject_sources(#10907, 1) +py_cobject_sources(#10908, 1) +py_cobject_sources(#10909, 1) +py_cobject_sources(#10910, 1) +py_cobject_sources(#10911, 1) +py_cobject_sources(#10912, 1) +py_cobject_sources(#10913, 1) +py_cobject_sources(#11499, 1) +py_cobject_sources(#10914, 1) +py_cobject_sources(#10915, 1) +py_cobject_sources(#11501, 1) +py_cobject_sources(#10916, 1) +py_cobject_sources(#10917, 1) +py_cobject_sources(#10918, 1) +py_cobject_sources(#10919, 1) +py_cobject_sources(#10920, 1) +py_cobject_sources(#11502, 1) +py_cobject_sources(#10921, 1) +py_cobject_sources(#10922, 1) +py_cobject_sources(#11504, 1) +py_cobject_sources(#11505, 1) +py_cobject_sources(#10923, 1) +py_cobject_sources(#10924, 1) +py_cobject_sources(#10925, 1) +py_cobject_sources(#10926, 1) +py_cobject_sources(#11507, 1) +py_cobject_sources(#10927, 1) +py_cobject_sources(#10928, 1) +py_cobject_sources(#10929, 1) +py_cobject_sources(#10930, 1) +py_cobject_sources(#10931, 1) +py_cobject_sources(#10932, 1) +py_cobject_sources(#10933, 1) +py_cobject_sources(#10934, 1) +py_cobject_sources(#10935, 1) +py_cobject_sources(#10936, 1) +py_cobject_sources(#10937, 1) +py_cobject_sources(#10938, 1) +py_cobject_sources(#10939, 1) +py_cobject_sources(#10940, 1) +py_cobject_sources(#10941, 1) +py_cobject_sources(#10942, 1) +py_cobject_sources(#10943, 1) +py_cobject_sources(#10944, 1) +py_cobject_sources(#10945, 1) +py_cobject_sources(#10946, 1) +py_cobject_sources(#10947, 1) +py_cobject_sources(#10948, 1) +py_cobject_sources(#10949, 1) +py_cobject_sources(#10950, 1) +py_cobject_sources(#10951, 1) +py_cobject_sources(#10952, 1) +py_cobject_sources(#11510, 1) +py_cobject_sources(#11512, 1) +py_cobject_sources(#11513, 1) +py_cobject_sources(#10953, 1) +py_cobject_sources(#11514, 1) +py_cobject_sources(#11515, 1) +py_cobject_sources(#11517, 1) +py_cobject_sources(#10954, 1) +py_cobject_sources(#11518, 1) +py_cobject_sources(#11519, 1) +py_cobject_sources(#11520, 1) +py_cobject_sources(#11521, 1) +py_cobject_sources(#11522, 1) +py_cobject_sources(#10955, 1) +py_cobject_sources(#10956, 1) +py_cobject_sources(#10957, 1) +py_cobject_sources(#10958, 1) +py_cobject_sources(#10959, 1) +py_cobject_sources(#10960, 1) +py_cobject_sources(#10961, 1) +py_cobject_sources(#10962, 1) +py_cobject_sources(#10963, 1) +py_cobject_sources(#11524, 1) +py_cobject_sources(#11525, 1) +py_cobject_sources(#11526, 1) +py_cobject_sources(#11527, 1) +py_cobject_sources(#11528, 1) +py_cobject_sources(#11529, 1) +py_cobject_sources(#10964, 1) +py_cobject_sources(#10965, 1) +py_cobject_sources(#10966, 1) +py_cobject_sources(#10967, 1) +py_cobject_sources(#10968, 1) +py_cobject_sources(#10969, 1) +py_cobject_sources(#10970, 1) +py_cobject_sources(#10971, 1) +py_cobject_sources(#10972, 1) +py_cobject_sources(#10973, 1) +py_cobject_sources(#10974, 1) +py_cobject_sources(#10975, 1) +py_cobject_sources(#11531, 1) +py_cobject_sources(#11532, 1) +py_cobject_sources(#11533, 1) +py_cobject_sources(#11534, 1) +py_cobject_sources(#11535, 1) +py_cobject_sources(#11536, 1) +py_cobject_sources(#10976, 1) +py_cobject_sources(#10977, 1) +py_cobject_sources(#10978, 1) +py_cobject_sources(#10979, 1) +py_cobject_sources(#10980, 1) +py_cobject_sources(#10981, 1) +py_cobject_sources(#11537, 1) +py_cobject_sources(#11539, 1) +py_cobject_sources(#11540, 1) +py_cobject_sources(#11541, 1) +py_cobject_sources(#11542, 1) +py_cobject_sources(#11543, 1) +py_cobject_sources(#11544, 1) +py_cobject_sources(#11545, 1) +py_cobject_sources(#11546, 1) +py_cobject_sources(#11547, 1) +py_cobject_sources(#11548, 1) +py_cobject_sources(#11550, 1) +py_cobject_sources(#11551, 1) +py_cobject_sources(#10982, 1) +py_cobject_sources(#10983, 1) +py_cobject_sources(#10984, 1) +py_cobject_sources(#10985, 1) +py_cobject_sources(#10986, 1) +py_cobject_sources(#10987, 1) +py_cobject_sources(#11552, 1) +py_cobject_sources(#11553, 1) +py_cobject_sources(#11554, 1) +py_cobject_sources(#11555, 1) +py_cobject_sources(#10988, 1) +py_cobject_sources(#11556, 1) +py_cobject_sources(#11557, 1) +py_cobject_sources(#10989, 1) +py_cobject_sources(#10990, 1) +py_cobject_sources(#10991, 1) +py_cobject_sources(#10992, 1) +py_cobject_sources(#10993, 1) +py_cobject_sources(#10994, 1) +py_cobject_sources(#10995, 1) +py_cobject_sources(#10996, 1) +py_cobject_sources(#10997, 1) +py_cobject_sources(#10998, 1) +py_cobject_sources(#10999, 1) +py_cobject_sources(#11000, 1) +py_cobject_sources(#11001, 1) +py_cobject_sources(#11002, 1) +py_cobject_sources(#11003, 1) +py_cobject_sources(#11004, 1) +py_cobject_sources(#11005, 1) +py_cobject_sources(#11006, 1) +py_cobject_sources(#11007, 1) +py_cobject_sources(#11008, 1) +py_cobject_sources(#11009, 1) +py_cobject_sources(#11010, 1) +py_cobject_sources(#11011, 1) +py_cobject_sources(#11012, 1) +py_cobject_sources(#11561, 1) +py_cobject_sources(#11013, 1) +py_cobject_sources(#11014, 1) +py_cobject_sources(#11015, 1) +py_cobject_sources(#11016, 1) +py_cobject_sources(#11017, 1) +py_cobject_sources(#11018, 1) +py_cobject_sources(#11562, 1) +py_cobject_sources(#11564, 1) +py_cobject_sources(#11565, 1) +py_cobject_sources(#11566, 1) +py_cobject_sources(#11567, 1) +py_cobject_sources(#11019, 1) +py_cobject_sources(#11020, 1) +py_cobject_sources(#11021, 1) +py_cobject_sources(#11569, 1) +py_cobject_sources(#11022, 1) +py_cobject_sources(#11023, 1) +py_cobject_sources(#11571, 1) +py_cobject_sources(#11572, 1) +py_cobject_sources(#11024, 1) +py_cobject_sources(#11573, 1) +py_cobject_sources(#11574, 1) +py_cobject_sources(#11575, 1) +py_cobject_sources(#11576, 1) +py_cobject_sources(#11577, 1) +py_cobject_sources(#11578, 1) +py_cobject_sources(#11025, 1) +py_cobject_sources(#11579, 1) +py_cobject_sources(#11026, 1) +py_cobject_sources(#11027, 1) +py_cobject_sources(#11028, 1) +py_cobject_sources(#11029, 1) +py_cobject_sources(#11030, 1) +py_cobject_sources(#11031, 1) +py_cobject_sources(#11032, 1) +py_cobject_sources(#11033, 1) +py_cobject_sources(#11034, 1) +py_cobject_sources(#11035, 1) +py_cobject_sources(#11581, 1) +py_cobject_sources(#11036, 1) +py_cobject_sources(#11037, 1) +py_cobject_sources(#11038, 1) +py_cobject_sources(#11039, 1) +py_cobject_sources(#11040, 1) +py_cobject_sources(#11041, 1) +py_cobject_sources(#11042, 1) +py_cobject_sources(#11043, 1) +py_cobject_sources(#11044, 1) +py_cobject_sources(#11045, 1) +py_cobject_sources(#11046, 1) +py_cobject_sources(#11047, 1) +py_cobject_sources(#11048, 1) +py_cobject_sources(#11049, 1) +py_cobject_sources(#11050, 1) +py_cobject_sources(#11051, 1) +py_cobject_sources(#11052, 1) +py_cobject_sources(#11053, 1) +py_cobject_sources(#11054, 1) +py_cobject_sources(#11055, 1) +py_cobject_sources(#11056, 1) +py_cobject_sources(#11057, 1) +py_cobject_sources(#11058, 1) +py_cobject_sources(#11059, 1) +py_cobject_sources(#11060, 1) +py_cobject_sources(#11061, 1) +py_cobject_sources(#11062, 1) +py_cobject_sources(#11582, 1) +py_cobject_sources(#11587, 1) +py_cobject_sources(#11588, 1) +py_cobject_sources(#11589, 1) +py_cobject_sources(#11590, 1) +py_cobject_sources(#11591, 1) +py_cobject_sources(#11592, 1) +py_cobject_sources(#11593, 1) +py_cobject_sources(#11594, 1) +py_cobject_sources(#11595, 1) +py_cobject_sources(#11596, 1) +py_cobject_sources(#11597, 1) +py_cobject_sources(#11598, 1) +py_cobject_sources(#11599, 1) +py_cobject_sources(#11600, 1) +py_cobject_sources(#11601, 1) +py_cobject_sources(#11602, 1) +py_cobject_sources(#11603, 1) +py_cobject_sources(#11604, 1) +py_cobject_sources(#11605, 1) +py_cobject_sources(#11606, 1) +py_cobject_sources(#11608, 1) +py_cobject_sources(#11063, 1) +py_cobject_sources(#11064, 1) +py_cobject_sources(#11610, 1) +py_cobject_sources(#11612, 1) +py_cobject_sources(#11613, 1) +py_cobject_sources(#11614, 1) +py_cobject_sources(#11065, 1) +py_cobject_sources(#11066, 1) +py_cobject_sources(#11067, 1) +py_cobject_sources(#11616, 1) +py_cobject_sources(#11617, 1) +py_cobject_sources(#11618, 1) +py_cobject_sources(#11619, 1) +py_cobject_sources(#11620, 1) +py_cobject_sources(#11068, 1) +py_cobject_sources(#11069, 1) +py_cobject_sources(#11070, 1) +py_cobject_sources(#11071, 1) +py_cobject_sources(#11622, 1) +py_cobject_sources(#11072, 1) +py_cobject_sources(#11073, 1) +py_cobject_sources(#11074, 1) +py_cobject_sources(#11075, 1) +py_cobject_sources(#11076, 1) +py_cobject_sources(#11077, 1) +py_cobject_sources(#11078, 1) +py_cobject_sources(#11079, 1) +py_cobject_sources(#11623, 1) +py_cobject_sources(#11624, 1) +py_cobject_sources(#11625, 1) +py_cobject_sources(#11626, 1) +py_cobject_sources(#11080, 1) +py_cobject_sources(#11081, 1) +py_cobject_sources(#11082, 1) +py_cobject_sources(#11083, 1) +py_cobject_sources(#11084, 1) +py_cobject_sources(#11085, 1) +py_cobject_sources(#11086, 1) +py_cobject_sources(#11087, 1) +py_cobject_sources(#11088, 1) +py_cobject_sources(#11627, 1) +py_cobject_sources(#11089, 1) +py_cobject_sources(#11090, 1) +py_cobject_sources(#11091, 1) +py_cobject_sources(#11092, 1) +py_cobject_sources(#11093, 1) +py_cobject_sources(#11094, 1) +py_cobject_sources(#11628, 1) +py_cobject_sources(#11095, 1) +py_cobject_sources(#11630, 1) +py_cobject_sources(#11632, 1) +py_cobject_sources(#11096, 1) +py_cobject_sources(#11097, 1) +py_cobject_sources(#11098, 1) +py_cobject_sources(#11099, 1) +py_cobject_sources(#11633, 1) +py_cobject_sources(#11100, 1) +py_cobject_sources(#11634, 1) +py_cobject_sources(#11636, 1) +py_cobject_sources(#11637, 1) +py_cobject_sources(#11638, 1) +py_cobject_sources(#11101, 1) +py_cobject_sources(#11639, 1) +py_cobject_sources(#11641, 1) +py_cobject_sources(#11642, 1) +py_cobject_sources(#11643, 1) +py_cobject_sources(#11644, 1) +py_cobject_sources(#11645, 1) +py_cobject_sources(#11646, 1) +py_cobject_sources(#11647, 1) +py_cobject_sources(#11648, 1) +py_cobject_sources(#11102, 1) +py_cobject_sources(#11649, 1) +py_cobject_sources(#11650, 1) +py_cobject_sources(#11651, 1) +py_cobject_sources(#11103, 1) +py_cobject_sources(#11104, 1) +py_cobject_sources(#11105, 1) +py_cobject_sources(#11652, 1) +py_cobject_sources(#11653, 1) +py_cobject_sources(#11106, 1) +py_cobject_sources(#11654, 1) +py_cobject_sources(#11656, 1) +py_cobject_sources(#11657, 1) +py_cobject_sources(#11107, 1) +py_cobject_sources(#11658, 1) +py_cobject_sources(#11108, 1) +py_cobject_sources(#11659, 1) +py_cobject_sources(#11109, 1) +py_cobject_sources(#11110, 1) +py_cobject_sources(#11111, 1) +py_cobject_sources(#11112, 1) +py_cobject_sources(#11113, 1) +py_cobject_sources(#11660, 1) +py_cobject_sources(#11114, 1) +py_cobject_sources(#11115, 1) +py_cobject_sources(#11116, 1) +py_cobject_sources(#11117, 1) +py_cobject_sources(#11118, 1) +py_cobject_sources(#11120, 1) +py_cobject_sources(#11121, 1) +py_cobject_sources(#11122, 1) +py_cobject_sources(#11123, 1) +py_cobject_sources(#11124, 1) +py_cobject_sources(#11125, 1) +py_cobject_sources(#11126, 1) +py_cobject_sources(#11127, 1) +py_cobject_sources(#11128, 1) +py_cobject_sources(#11129, 1) +py_cobject_sources(#11130, 1) +py_cobject_sources(#11131, 1) +py_cobject_sources(#11132, 1) +py_cobject_sources(#11133, 1) +py_cobject_sources(#11134, 1) +py_cobject_sources(#11135, 1) +py_cobject_sources(#11136, 1) +py_cobject_sources(#11137, 1) +py_cobject_sources(#11138, 1) +py_cobject_sources(#11139, 1) +py_cobject_sources(#11140, 1) +py_cobject_sources(#11141, 1) +py_cobject_sources(#11142, 1) +py_cobject_sources(#11143, 1) +py_cobject_sources(#11144, 1) +py_cobject_sources(#11145, 1) +py_cobject_sources(#11146, 1) +py_cobject_sources(#11147, 1) +py_cobject_sources(#11148, 1) +py_cobject_sources(#11149, 1) +py_cobject_sources(#11150, 1) +py_cobject_sources(#11151, 1) +py_cobject_sources(#11152, 1) +py_cobject_sources(#11153, 1) +py_cobject_sources(#11154, 1) +py_cobject_sources(#11665, 1) +py_cobject_sources(#11155, 1) +py_cobject_sources(#11156, 1) +py_cobject_sources(#11157, 1) +py_cobject_sources(#11666, 1) +py_cobject_sources(#11667, 1) +py_cobject_sources(#11159, 1) +py_cobject_sources(#11160, 1) +py_cobject_sources(#11161, 1) +py_cobject_sources(#11162, 1) +py_cobject_sources(#11163, 1) +py_cobject_sources(#11164, 1) +py_cobject_sources(#11165, 1) +py_cobject_sources(#11166, 1) +py_cobject_sources(#11167, 1) +py_cobject_sources(#11168, 1) +py_cobject_sources(#11670, 1) +py_cobject_sources(#11169, 1) +py_cobject_sources(#11170, 1) +py_cobject_sources(#11171, 1) +py_cobject_sources(#11172, 1) +py_cobject_sources(#11173, 1) +py_cobject_sources(#11174, 1) +py_cobject_sources(#11175, 1) +py_cobject_sources(#11176, 1) +py_cobject_sources(#11177, 1) +py_cobject_sources(#11178, 1) +py_cobject_sources(#11179, 1) +py_cobject_sources(#11180, 1) +py_cobject_sources(#11181, 1) +py_cobject_sources(#11182, 1) +py_cobject_sources(#11183, 1) +py_cobject_sources(#11184, 1) +py_cobject_sources(#11185, 1) +py_cobject_sources(#11186, 1) +py_cobject_sources(#11187, 1) +py_cobject_sources(#11188, 1) +py_cobject_sources(#11189, 1) +py_cobject_sources(#11190, 1) +py_cobject_sources(#11191, 1) +py_cobject_sources(#11193, 1) +py_cobject_sources(#11194, 1) +py_cobject_sources(#11195, 1) +py_cobject_sources(#11196, 1) +py_cobject_sources(#11672, 1) +py_cobject_sources(#11197, 1) +py_cobject_sources(#11198, 1) +py_cobject_sources(#11199, 1) +py_cobject_sources(#11200, 1) +py_cobject_sources(#11201, 1) +py_cobject_sources(#11202, 1) +py_cobject_sources(#11203, 1) +py_cobject_sources(#11204, 1) +py_cobject_sources(#11205, 1) +py_cobject_sources(#11206, 1) +py_cobject_sources(#11207, 1) +py_cobject_sources(#11677, 1) +py_cobject_sources(#11208, 1) +py_cobject_sources(#11209, 1) +py_cobject_sources(#11678, 1) +py_cobject_sources(#11679, 1) +py_cobject_sources(#11680, 1) +py_cobject_sources(#11210, 1) +py_cobject_sources(#11211, 1) +py_cobject_sources(#11212, 1) +py_cobject_sources(#11213, 1) +py_cobject_sources(#11681, 1) +py_cobject_sources(#11682, 1) +py_cobject_sources(#11683, 1) +py_cobject_sources(#11214, 1) +py_cobject_sources(#11684, 1) +py_cobject_sources(#11215, 1) +py_cobject_sources(#11216, 1) +py_cobject_sources(#11685, 1) +py_cobject_sources(#11686, 1) +py_cobject_sources(#11687, 1) +py_cobject_sources(#11217, 1) +py_cobject_sources(#11218, 1) +py_cobject_sources(#11219, 1) +py_cobject_sources(#11220, 1) +py_cobject_sources(#11221, 1) +py_cobject_sources(#11222, 1) +py_cobject_sources(#11689, 1) +py_cobject_sources(#11691, 1) +py_cobject_sources(#11223, 1) +py_cobject_sources(#11692, 1) +py_cobject_sources(#11224, 1) +py_cobject_sources(#11225, 1) +py_cobject_sources(#11226, 1) +py_cobject_sources(#11227, 1) +py_cobject_sources(#11228, 1) +py_cobject_sources(#11229, 1) +py_cobject_sources(#11230, 1) +py_cobject_sources(#11231, 1) +py_cobject_sources(#11232, 1) +py_cobject_sources(#11694, 1) +py_cobject_sources(#11233, 1) +py_cobject_sources(#11234, 1) +py_cobject_sources(#11235, 1) +py_cobject_sources(#11236, 1) +py_cobject_sources(#11237, 1) +py_cobject_sources(#11240, 1) +py_cobject_sources(#11241, 1) +py_cobject_sources(#11242, 1) +py_cobject_sources(#11243, 1) +py_cobject_sources(#11244, 1) +py_cobject_sources(#11245, 1) +py_cobject_sources(#11246, 1) +py_cobject_sources(#11247, 1) +py_cobject_sources(#11248, 1) +py_cobject_sources(#11249, 1) +py_cobject_sources(#11250, 1) +py_cobject_sources(#11251, 1) +py_cobject_sources(#11252, 1) +py_cobject_sources(#11253, 1) +py_cobject_sources(#11254, 1) +py_cobject_sources(#11255, 1) +py_cobject_sources(#11256, 1) +py_cobject_sources(#11257, 1) +py_cobject_sources(#11258, 1) +py_cobject_sources(#11259, 1) +py_cobject_sources(#11260, 1) +py_cobject_sources(#11696, 1) +py_cobject_sources(#11261, 1) +py_cobject_sources(#11262, 1) +py_cobject_sources(#11263, 1) +py_cobject_sources(#11264, 1) +py_cobject_sources(#11265, 1) +py_cobject_sources(#11266, 1) +py_cobject_sources(#11267, 1) +py_cobject_sources(#11268, 1) +py_cobject_sources(#11269, 1) +py_cobject_sources(#11270, 1) +py_cobject_sources(#11271, 1) +py_cobject_sources(#11697, 1) +py_cobject_sources(#11272, 1) +py_cobject_sources(#11273, 1) +py_cobject_sources(#11274, 1) +py_cobject_sources(#11275, 1) +py_cobject_sources(#11276, 1) +py_cobject_sources(#11277, 1) +py_cobject_sources(#11278, 1) +py_cobject_sources(#11699, 1) +py_cobject_sources(#11700, 1) +py_cobject_sources(#11701, 1) +py_cobject_sources(#11702, 1) +py_cobject_sources(#11703, 1) +py_cobject_sources(#11704, 1) +py_cobject_sources(#11705, 1) +py_cobject_sources(#11706, 1) +py_cobject_sources(#11707, 1) +py_cobject_sources(#11709, 1) +py_cobject_sources(#11710, 1) +py_cobject_sources(#11279, 1) +py_cobject_sources(#11280, 1) +py_cobject_sources(#11281, 1) +py_cobject_sources(#11282, 1) +py_cobject_sources(#11283, 1) +py_cobject_sources(#11284, 1) +py_cobject_sources(#11286, 1) +py_cobject_sources(#11287, 1) +py_cobject_sources(#11712, 1) +py_cobject_sources(#11288, 1) +py_cobject_sources(#11289, 1) +py_cobject_sources(#11290, 1) +py_cobject_sources(#11291, 1) +py_cobject_sources(#11292, 1) +py_cobject_sources(#11293, 1) +py_cobject_sources(#11294, 1) +py_cobject_sources(#11295, 1) +py_cobject_sources(#11296, 1) +py_cobject_sources(#11297, 1) +py_cobject_sources(#11298, 1) +py_cobject_sources(#11299, 1) +py_cobject_sources(#11300, 1) +py_cobject_sources(#11301, 1) +py_cobject_sources(#11302, 1) +py_cobject_sources(#11303, 1) +py_cobject_sources(#11304, 1) +py_cobject_sources(#11305, 1) +py_cobject_sources(#11306, 1) +py_cobject_sources(#11307, 1) +py_cobject_sources(#11308, 1) +py_cobject_sources(#11309, 1) +py_cobject_sources(#11310, 1) +py_cobject_sources(#11311, 1) +py_cobject_sources(#11312, 1) +py_cobject_sources(#11313, 1) +py_cobject_sources(#11314, 1) +py_cobject_sources(#11315, 1) +py_cobject_sources(#11316, 1) +py_cobject_sources(#11317, 1) +py_cobject_sources(#11318, 1) +py_cobject_sources(#11319, 1) +py_cobject_sources(#11320, 1) +py_cobject_sources(#11321, 1) +py_cobject_sources(#11322, 1) +py_cobject_sources(#11323, 1) +py_cobject_sources(#11324, 1) +py_cobject_sources(#11325, 1) +py_cobject_sources(#11713, 1) +py_cobject_sources(#11326, 1) +py_cobject_sources(#11327, 1) +py_cobject_sources(#11328, 1) +py_cobject_sources(#11329, 1) +py_cobject_sources(#11330, 1) +py_cobject_sources(#11331, 1) +py_cobject_sources(#11332, 1) +py_cobject_sources(#11333, 1) +py_cobject_sources(#11334, 1) +py_cobject_sources(#11335, 1) +py_cobject_sources(#11336, 1) +py_cobject_sources(#11337, 1) +py_cobject_sources(#11338, 1) +py_cobject_sources(#11339, 1) +py_cobject_sources(#11340, 1) +py_cobject_sources(#11714, 1) +py_cobject_sources(#11341, 1) +py_cobject_sources(#11342, 1) +py_cobject_sources(#11343, 1) +py_cobject_sources(#11344, 1) +py_cobject_sources(#11345, 1) +py_cobject_sources(#11346, 1) +py_cobject_sources(#11347, 1) +py_cobject_sources(#11348, 1) +py_cobject_sources(#11715, 1) +py_cobject_sources(#11349, 1) +py_cobject_sources(#11350, 1) +py_cobject_sources(#11351, 1) +py_cobject_sources(#11352, 1) +py_cobject_sources(#11353, 1) +py_cobject_sources(#11354, 1) +py_cobject_sources(#11355, 1) +py_cobject_sources(#11356, 1) +py_cobject_sources(#11357, 1) +py_cobject_sources(#11358, 1) +py_cobject_sources(#11359, 1) +py_cobject_sources(#11360, 1) +py_cobject_sources(#11361, 1) +py_cobject_sources(#11716, 1) +py_cobject_sources(#11362, 1) +py_cobject_sources(#11363, 1) +py_cobject_sources(#11364, 1) +py_cobject_sources(#11365, 1) +py_cobject_sources(#11366, 1) +py_cobject_sources(#11367, 1) +py_cobject_sources(#11368, 1) +py_cobject_sources(#11369, 1) +py_cobject_sources(#11370, 1) +py_cobject_sources(#11371, 1) +py_cobject_sources(#11372, 1) +py_cobject_sources(#11373, 1) +py_cobject_sources(#11374, 1) + diff --git a/python/extractor/semmle/data/$stdlib_33.trap b/python/extractor/semmle/data/$stdlib_33.trap new file mode 100644 index 00000000000..1e49ba73101 --- /dev/null +++ b/python/extractor/semmle/data/$stdlib_33.trap @@ -0,0 +1,11130 @@ +#10000 = @"C_builtin_function_or_method$time.time" +#10001 = @"C_type$float" +ext_rettype(#10000, #10001) +#10002 = @"C_builtin_function_or_method$time.clock" +ext_rettype(#10002, #10001) +#10003 = @"C_builtin_function_or_method$time.clock_gettime" +ext_rettype(#10003, #10001) +#10004 = @"C_builtin_function_or_method$time.clock_settime" +#10005 = @"C_type$NoneType" +ext_rettype(#10004, #10005) +#10006 = @"C_builtin_function_or_method$time.clock_getres" +ext_rettype(#10006, #10001) +#10007 = @"C_builtin_function_or_method$time.sleep" +ext_rettype(#10007, #10005) +#10008 = @"C_builtin_function_or_method$time.mktime" +ext_rettype(#10008, #10001) +#10009 = @"C_builtin_function_or_method$time.strftime" +#10010 = @"C_type$unicode" +ext_rettype(#10009, #10010) +#10011 = @"C_builtin_function_or_method$time.tzset" +ext_rettype(#10011, #10005) +#10012 = @"C_builtin_function_or_method$time.monotonic" +ext_rettype(#10012, #10001) +#10013 = @"C_builtin_function_or_method$time.process_time" +ext_rettype(#10013, #10001) +#10014 = @"C_builtin_function_or_method$time.perf_counter" +ext_rettype(#10014, #10001) +#10015 = @"C_builtin_function_or_method$_csv.reader" +#10016 = @"C_type$_csv.reader" +ext_rettype(#10015, #10016) +#10017 = @"C_builtin_function_or_method$_csv.writer" +#10018 = @"C_type$_csv.writer" +ext_rettype(#10017, #10018) +#10019 = @"C_builtin_function_or_method$_csv.list_dialects" +#10020 = @"C_type$list" +ext_rettype(#10019, #10020) +#10021 = @"C_builtin_function_or_method$_csv.register_dialect" +ext_rettype(#10021, #10005) +#10022 = @"C_builtin_function_or_method$_csv.unregister_dialect" +ext_rettype(#10022, #10005) +#10023 = @"C_builtin_function_or_method$_csv.field_size_limit" +#10024 = @"C_type$int" +ext_rettype(#10023, #10024) +#10025 = @"C_builtin_function_or_method$xxsubtype.bench" +ext_rettype(#10025, #10001) +#10026 = @"C_builtin_function_or_method$_collections._count_elements" +ext_rettype(#10026, #10005) +#10027 = @"C_builtin_function_or_method$parser.compilest" +#10028 = @"C_type$code" +ext_rettype(#10027, #10028) +#10029 = @"C_builtin_function_or_method$parser.expr" +#10030 = @"C_type$parser.st" +ext_rettype(#10029, #10030) +#10031 = @"C_builtin_function_or_method$parser.suite" +ext_rettype(#10031, #10030) +#10032 = @"C_builtin_function_or_method$parser.sequence2st" +ext_rettype(#10032, #10030) +#10033 = @"C_builtin_function_or_method$parser.st2tuple" +ext_rettype(#10033, #10005) +#10034 = @"C_builtin_function_or_method$parser.st2list" +ext_rettype(#10034, #10005) +#10035 = @"C_builtin_function_or_method$parser.tuple2st" +ext_rettype(#10035, #10030) +#10036 = @"C_builtin_function_or_method$parser._pickler" +#10037 = @"C_type$tuple" +ext_rettype(#10036, #10037) +#10038 = @"C_builtin_function_or_method$decimal.getcontext" +#10039 = @"C_type$decimal.Context" +ext_rettype(#10038, #10039) +#10040 = @"C_builtin_function_or_method$decimal.setcontext" +ext_rettype(#10040, #10005) +#10041 = @"C_builtin_function_or_method$decimal.localcontext" +#10042 = @"C_type$decimal.ContextManager" +ext_rettype(#10041, #10042) +#10043 = @"C_builtin_function_or_method$_weakref.getweakrefcount" +ext_rettype(#10043, #10024) +#10044 = @"C_builtin_function_or_method$_weakref.getweakrefs" +ext_rettype(#10044, #10020) +#10045 = @"C_builtin_function_or_method$_weakref.proxy" +#10046 = @"C_type$weakref" +ext_rettype(#10045, #10046) +#10047 = @"C_builtin_function_or_method$gc.enable" +ext_rettype(#10047, #10005) +#10048 = @"C_builtin_function_or_method$gc.disable" +ext_rettype(#10048, #10005) +#10049 = @"C_builtin_function_or_method$gc.isenabled" +#10050 = @"C_type$bool" +ext_rettype(#10049, #10050) +#10051 = @"C_builtin_function_or_method$gc.set_debug" +ext_rettype(#10051, #10005) +#10052 = @"C_builtin_function_or_method$gc.get_debug" +ext_rettype(#10052, #10024) +#10053 = @"C_builtin_function_or_method$gc.get_count" +ext_rettype(#10053, #10037) +#10054 = @"C_builtin_function_or_method$gc.set_threshold" +ext_rettype(#10054, #10005) +#10055 = @"C_builtin_function_or_method$gc.get_threshold" +ext_rettype(#10055, #10037) +#10056 = @"C_builtin_function_or_method$gc.collect" +ext_rettype(#10056, #10024) +#10057 = @"C_builtin_function_or_method$gc.get_objects" +ext_rettype(#10057, #10020) +#10058 = @"C_builtin_function_or_method$gc.is_tracked" +ext_rettype(#10058, #10050) +#10059 = @"C_builtin_function_or_method$gc.get_referrers" +ext_rettype(#10059, #10020) +#10060 = @"C_builtin_function_or_method$gc.get_referents" +ext_rettype(#10060, #10020) +#10061 = @"C_builtin_function_or_method$_multibytecodec.__create_codec" +#10062 = @"C_type$MultibyteCodec" +ext_rettype(#10061, #10062) +#10063 = @"C_builtin_function_or_method$signal.alarm" +ext_rettype(#10063, #10024) +#10064 = @"C_builtin_function_or_method$signal.setitimer" +ext_rettype(#10064, #10037) +#10065 = @"C_builtin_function_or_method$signal.getitimer" +ext_rettype(#10065, #10037) +#10066 = @"C_builtin_function_or_method$signal.signal" +ext_rettype(#10066, #10005) +#10067 = @"C_builtin_function_or_method$signal.getsignal" +ext_rettype(#10067, #10005) +#10068 = @"C_builtin_function_or_method$signal.set_wakeup_fd" +ext_rettype(#10068, #10024) +#10069 = @"C_builtin_function_or_method$signal.siginterrupt" +ext_rettype(#10069, #10005) +#10070 = @"C_builtin_function_or_method$signal.pause" +ext_rettype(#10070, #10005) +#10071 = @"C_builtin_function_or_method$signal.pthread_kill" +ext_rettype(#10071, #10005) +#10072 = @"C_builtin_function_or_method$signal.pthread_sigmask" +#10073 = @"C_type$set" +ext_rettype(#10072, #10073) +#10074 = @"C_type$frozenset" +ext_rettype(#10072, #10074) +#10075 = @"C_builtin_function_or_method$signal.sigpending" +ext_rettype(#10075, #10073) +ext_rettype(#10075, #10074) +#10076 = @"C_builtin_function_or_method$signal.sigwait" +ext_rettype(#10076, #10024) +#10077 = @"C_builtin_function_or_method$signal.sigtimedwait" +ext_rettype(#10077, #10005) +#10078 = @"C_builtin_function_or_method$_struct._clearcache" +ext_rettype(#10078, #10005) +#10079 = @"C_builtin_function_or_method$_struct.calcsize" +ext_rettype(#10079, #10024) +#10080 = @"C_builtin_function_or_method$_struct.pack" +#10081 = @"C_type$bytes" +ext_rettype(#10080, #10081) +#10082 = @"C_builtin_function_or_method$_struct.pack_into" +ext_rettype(#10082, #10005) +#10083 = @"C_builtin_function_or_method$_struct.unpack" +ext_rettype(#10083, #10037) +#10084 = @"C_builtin_function_or_method$_struct.unpack_from" +ext_rettype(#10084, #10037) +#10085 = @"C_builtin_function_or_method$audioop.max" +ext_rettype(#10085, #10024) +#10086 = @"C_builtin_function_or_method$audioop.minmax" +ext_rettype(#10086, #10037) +#10087 = @"C_builtin_function_or_method$audioop.avg" +ext_rettype(#10087, #10024) +#10088 = @"C_builtin_function_or_method$audioop.maxpp" +ext_rettype(#10088, #10024) +#10089 = @"C_builtin_function_or_method$audioop.avgpp" +ext_rettype(#10089, #10024) +#10090 = @"C_builtin_function_or_method$audioop.rms" +ext_rettype(#10090, #10024) +#10091 = @"C_builtin_function_or_method$audioop.findfit" +ext_rettype(#10091, #10037) +#10092 = @"C_builtin_function_or_method$audioop.findmax" +ext_rettype(#10092, #10024) +#10093 = @"C_builtin_function_or_method$audioop.findfactor" +ext_rettype(#10093, #10001) +#10094 = @"C_builtin_function_or_method$audioop.cross" +ext_rettype(#10094, #10024) +#10095 = @"C_builtin_function_or_method$audioop.mul" +ext_rettype(#10095, #10081) +#10096 = @"C_builtin_function_or_method$audioop.add" +ext_rettype(#10096, #10081) +#10097 = @"C_builtin_function_or_method$audioop.bias" +ext_rettype(#10097, #10081) +#10098 = @"C_builtin_function_or_method$audioop.ulaw2lin" +ext_rettype(#10098, #10081) +#10099 = @"C_builtin_function_or_method$audioop.lin2ulaw" +ext_rettype(#10099, #10081) +#10100 = @"C_builtin_function_or_method$audioop.alaw2lin" +ext_rettype(#10100, #10081) +#10101 = @"C_builtin_function_or_method$audioop.lin2alaw" +ext_rettype(#10101, #10081) +#10102 = @"C_builtin_function_or_method$audioop.lin2lin" +ext_rettype(#10102, #10081) +#10103 = @"C_builtin_function_or_method$audioop.adpcm2lin" +ext_rettype(#10103, #10037) +#10104 = @"C_builtin_function_or_method$audioop.lin2adpcm" +ext_rettype(#10104, #10037) +#10105 = @"C_builtin_function_or_method$audioop.tomono" +ext_rettype(#10105, #10081) +#10106 = @"C_builtin_function_or_method$audioop.tostereo" +ext_rettype(#10106, #10081) +#10107 = @"C_builtin_function_or_method$audioop.getsample" +ext_rettype(#10107, #10024) +#10108 = @"C_builtin_function_or_method$audioop.reverse" +ext_rettype(#10108, #10081) +#10109 = @"C_builtin_function_or_method$audioop.ratecv" +ext_rettype(#10109, #10037) +ext_rettype(#10109, #10081) +#10110 = @"C_builtin_function_or_method$_ssl._test_decode_cert" +#10111 = @"C_type$dict" +ext_rettype(#10110, #10111) +#10112 = @"C_builtin_function_or_method$_ssl.RAND_add" +ext_rettype(#10112, #10005) +#10113 = @"C_builtin_function_or_method$_ssl.RAND_bytes" +ext_rettype(#10113, #10037) +ext_rettype(#10113, #10081) +#10114 = @"C_builtin_function_or_method$_ssl.RAND_pseudo_bytes" +ext_rettype(#10114, #10037) +ext_rettype(#10114, #10081) +#10115 = @"C_builtin_function_or_method$_ssl.RAND_egd" +ext_rettype(#10115, #10024) +#10116 = @"C_builtin_function_or_method$_ssl.RAND_status" +ext_rettype(#10116, #10024) +#10117 = @"C_builtin_function_or_method$fcntl.fcntl" +ext_rettype(#10117, #10024) +ext_rettype(#10117, #10081) +#10118 = @"C_builtin_function_or_method$fcntl.ioctl" +ext_rettype(#10118, #10024) +ext_rettype(#10118, #10081) +#10119 = @"C_builtin_function_or_method$fcntl.flock" +ext_rettype(#10119, #10005) +#10120 = @"C_builtin_function_or_method$fcntl.lockf" +ext_rettype(#10120, #10005) +#10121 = @"C_builtin_function_or_method$_thread.start_new_thread" +ext_rettype(#10121, #10024) +#10122 = @"C_builtin_function_or_method$_thread.start_new" +ext_rettype(#10122, #10024) +#10123 = @"C_builtin_function_or_method$_thread.allocate_lock" +#10124 = @"C_type$_thread.lock" +ext_rettype(#10123, #10124) +#10125 = @"C_builtin_function_or_method$_thread.allocate" +ext_rettype(#10125, #10124) +#10126 = @"C_builtin_function_or_method$_thread.interrupt_main" +ext_rettype(#10126, #10005) +#10127 = @"C_builtin_function_or_method$_thread.get_ident" +ext_rettype(#10127, #10024) +#10128 = @"C_builtin_function_or_method$_thread._count" +ext_rettype(#10128, #10024) +#10129 = @"C_builtin_function_or_method$_thread.stack_size" +ext_rettype(#10129, #10024) +#10130 = @"C_builtin_function_or_method$_codecs.register" +ext_rettype(#10130, #10005) +#10131 = @"C_builtin_function_or_method$_codecs.escape_encode" +ext_rettype(#10131, #10037) +#10132 = @"C_builtin_function_or_method$_codecs.escape_decode" +ext_rettype(#10132, #10037) +#10133 = @"C_builtin_function_or_method$_codecs.utf_8_encode" +ext_rettype(#10133, #10037) +#10134 = @"C_builtin_function_or_method$_codecs.utf_8_decode" +ext_rettype(#10134, #10037) +#10135 = @"C_builtin_function_or_method$_codecs.utf_7_encode" +ext_rettype(#10135, #10037) +#10136 = @"C_builtin_function_or_method$_codecs.utf_7_decode" +ext_rettype(#10136, #10037) +#10137 = @"C_builtin_function_or_method$_codecs.utf_16_encode" +ext_rettype(#10137, #10037) +#10138 = @"C_builtin_function_or_method$_codecs.utf_16_le_encode" +ext_rettype(#10138, #10037) +#10139 = @"C_builtin_function_or_method$_codecs.utf_16_be_encode" +ext_rettype(#10139, #10037) +#10140 = @"C_builtin_function_or_method$_codecs.utf_16_decode" +ext_rettype(#10140, #10037) +#10141 = @"C_builtin_function_or_method$_codecs.utf_16_le_decode" +ext_rettype(#10141, #10037) +#10142 = @"C_builtin_function_or_method$_codecs.utf_16_be_decode" +ext_rettype(#10142, #10037) +#10143 = @"C_builtin_function_or_method$_codecs.utf_16_ex_decode" +ext_rettype(#10143, #10037) +#10144 = @"C_builtin_function_or_method$_codecs.utf_32_encode" +ext_rettype(#10144, #10037) +#10145 = @"C_builtin_function_or_method$_codecs.utf_32_le_encode" +ext_rettype(#10145, #10037) +#10146 = @"C_builtin_function_or_method$_codecs.utf_32_be_encode" +ext_rettype(#10146, #10037) +#10147 = @"C_builtin_function_or_method$_codecs.utf_32_decode" +ext_rettype(#10147, #10037) +#10148 = @"C_builtin_function_or_method$_codecs.utf_32_le_decode" +ext_rettype(#10148, #10037) +#10149 = @"C_builtin_function_or_method$_codecs.utf_32_be_decode" +ext_rettype(#10149, #10037) +#10150 = @"C_builtin_function_or_method$_codecs.utf_32_ex_decode" +ext_rettype(#10150, #10037) +#10151 = @"C_builtin_function_or_method$_codecs.unicode_escape_encode" +ext_rettype(#10151, #10037) +#10152 = @"C_builtin_function_or_method$_codecs.unicode_escape_decode" +ext_rettype(#10152, #10037) +#10153 = @"C_builtin_function_or_method$_codecs.unicode_internal_encode" +ext_rettype(#10153, #10037) +#10154 = @"C_builtin_function_or_method$_codecs.unicode_internal_decode" +ext_rettype(#10154, #10037) +#10155 = @"C_builtin_function_or_method$_codecs.raw_unicode_escape_encode" +ext_rettype(#10155, #10037) +#10156 = @"C_builtin_function_or_method$_codecs.raw_unicode_escape_decode" +ext_rettype(#10156, #10037) +#10157 = @"C_builtin_function_or_method$_codecs.latin_1_encode" +ext_rettype(#10157, #10037) +#10158 = @"C_builtin_function_or_method$_codecs.latin_1_decode" +ext_rettype(#10158, #10037) +#10159 = @"C_builtin_function_or_method$_codecs.ascii_encode" +ext_rettype(#10159, #10037) +#10160 = @"C_builtin_function_or_method$_codecs.ascii_decode" +ext_rettype(#10160, #10037) +#10161 = @"C_builtin_function_or_method$_codecs.charmap_encode" +ext_rettype(#10161, #10037) +#10162 = @"C_builtin_function_or_method$_codecs.charmap_decode" +ext_rettype(#10162, #10037) +#10163 = @"C_builtin_function_or_method$_codecs.charmap_build" +ext_rettype(#10163, #10111) +#10164 = @"C_builtin_function_or_method$_codecs.readbuffer_encode" +ext_rettype(#10164, #10037) +#10165 = @"C_builtin_function_or_method$_codecs.register_error" +ext_rettype(#10165, #10005) +#10166 = @"C_builtin_function_or_method$xxlimited.roj" +ext_rettype(#10166, #10005) +#10167 = @"C_builtin_function_or_method$xxlimited.foo" +ext_rettype(#10167, #10024) +#10168 = @"C_builtin_function_or_method$_hashlib.new" +#10169 = @"C_type$_hashlib.HASH" +ext_rettype(#10168, #10169) +#10170 = @"C_builtin_function_or_method$_hashlib.openssl_md5" +ext_rettype(#10170, #10169) +#10171 = @"C_builtin_function_or_method$_hashlib.openssl_sha1" +ext_rettype(#10171, #10169) +#10172 = @"C_builtin_function_or_method$_hashlib.openssl_sha224" +ext_rettype(#10172, #10169) +#10173 = @"C_builtin_function_or_method$_hashlib.openssl_sha256" +ext_rettype(#10173, #10169) +#10174 = @"C_builtin_function_or_method$_hashlib.openssl_sha384" +ext_rettype(#10174, #10169) +#10175 = @"C_builtin_function_or_method$_hashlib.openssl_sha512" +ext_rettype(#10175, #10169) +#10176 = @"C_builtin_function_or_method$termios.tcgetattr" +ext_rettype(#10176, #10020) +#10177 = @"C_builtin_function_or_method$termios.tcsetattr" +ext_rettype(#10177, #10005) +#10178 = @"C_builtin_function_or_method$termios.tcsendbreak" +ext_rettype(#10178, #10005) +#10179 = @"C_builtin_function_or_method$termios.tcdrain" +ext_rettype(#10179, #10005) +#10180 = @"C_builtin_function_or_method$termios.tcflush" +ext_rettype(#10180, #10005) +#10181 = @"C_builtin_function_or_method$termios.tcflow" +ext_rettype(#10181, #10005) +#10182 = @"C_builtin_function_or_method$_bisect.bisect_right" +ext_rettype(#10182, #10024) +#10183 = @"C_builtin_function_or_method$_bisect.bisect" +ext_rettype(#10183, #10024) +#10184 = @"C_builtin_function_or_method$_bisect.insort_right" +ext_rettype(#10184, #10005) +#10185 = @"C_builtin_function_or_method$_bisect.insort" +ext_rettype(#10185, #10005) +#10186 = @"C_builtin_function_or_method$_bisect.bisect_left" +ext_rettype(#10186, #10024) +#10187 = @"C_builtin_function_or_method$_bisect.insort_left" +ext_rettype(#10187, #10005) +#10188 = @"C_builtin_function_or_method$_sha256.sha256" +#10189 = @"C_type$_sha256.sha256" +ext_rettype(#10188, #10189) +#10190 = @"C_builtin_function_or_method$_sha256.sha224" +#10191 = @"C_type$_sha256.sha224" +ext_rettype(#10190, #10191) +#10192 = @"C_builtin_function_or_method$faulthandler.enable" +ext_rettype(#10192, #10005) +#10193 = @"C_builtin_function_or_method$faulthandler.disable" +ext_rettype(#10193, #10050) +#10194 = @"C_builtin_function_or_method$faulthandler.is_enabled" +ext_rettype(#10194, #10050) +#10195 = @"C_builtin_function_or_method$faulthandler.dump_traceback" +ext_rettype(#10195, #10005) +#10196 = @"C_builtin_function_or_method$faulthandler.dump_traceback_later" +ext_rettype(#10196, #10005) +#10197 = @"C_builtin_function_or_method$faulthandler.cancel_dump_traceback_later" +ext_rettype(#10197, #10005) +#10198 = @"C_builtin_function_or_method$faulthandler.register" +ext_rettype(#10198, #10005) +#10199 = @"C_builtin_function_or_method$faulthandler.unregister" +ext_rettype(#10199, #10050) +#10200 = @"C_builtin_function_or_method$faulthandler._read_null" +ext_rettype(#10200, #10024) +#10201 = @"C_builtin_function_or_method$faulthandler._sigsegv" +ext_rettype(#10201, #10005) +#10202 = @"C_builtin_function_or_method$faulthandler._sigabrt" +ext_rettype(#10202, #10005) +#10203 = @"C_builtin_function_or_method$faulthandler._sigfpe" +ext_rettype(#10203, #10024) +#10204 = @"C_builtin_function_or_method$faulthandler._sigbus" +ext_rettype(#10204, #10005) +#10205 = @"C_builtin_function_or_method$faulthandler._sigill" +ext_rettype(#10205, #10005) +#10206 = @"C_builtin_function_or_method$faulthandler._fatal_error" +ext_rettype(#10206, #10005) +#10207 = @"C_builtin_function_or_method$_functools.cmp_to_key" +#10208 = @"C_type$functools.KeyWrapper" +ext_rettype(#10207, #10208) +#10209 = @"C_builtin_function_or_method$_locale.setlocale" +ext_rettype(#10209, #10010) +#10210 = @"C_builtin_function_or_method$_locale.localeconv" +ext_rettype(#10210, #10111) +#10211 = @"C_builtin_function_or_method$_locale.strcoll" +ext_rettype(#10211, #10024) +#10212 = @"C_builtin_function_or_method$_locale.strxfrm" +ext_rettype(#10212, #10010) +#10213 = @"C_builtin_function_or_method$_locale.nl_langinfo" +ext_rettype(#10213, #10010) +#10214 = @"C_builtin_function_or_method$_locale.gettext" +ext_rettype(#10214, #10010) +#10215 = @"C_builtin_function_or_method$_locale.dgettext" +ext_rettype(#10215, #10010) +#10216 = @"C_builtin_function_or_method$_locale.dcgettext" +ext_rettype(#10216, #10010) +#10217 = @"C_builtin_function_or_method$_locale.textdomain" +ext_rettype(#10217, #10010) +#10218 = @"C_builtin_function_or_method$_locale.bindtextdomain" +ext_rettype(#10218, #10010) +#10219 = @"C_builtin_function_or_method$_locale.bind_textdomain_codeset" +ext_rettype(#10219, #10010) +ext_rettype(#10219, #10005) +#10220 = @"C_builtin_function_or_method$grp.getgrall" +ext_rettype(#10220, #10020) +#10221 = @"C_builtin_function_or_method$_pickle.dump" +ext_rettype(#10221, #10005) +#10222 = @"C_builtin_function_or_method$_md5.md5" +#10223 = @"C_type$_md5.md5" +ext_rettype(#10222, #10223) +#10224 = @"C_builtin_function_or_method$_crypt.crypt" +ext_rettype(#10224, #10010) +#10225 = @"C_builtin_function_or_method$cmath.acos" +#10226 = @"C_type$complex" +ext_rettype(#10225, #10226) +#10227 = @"C_builtin_function_or_method$cmath.acosh" +ext_rettype(#10227, #10226) +#10228 = @"C_builtin_function_or_method$cmath.asin" +ext_rettype(#10228, #10226) +#10229 = @"C_builtin_function_or_method$cmath.asinh" +ext_rettype(#10229, #10226) +#10230 = @"C_builtin_function_or_method$cmath.atan" +ext_rettype(#10230, #10226) +#10231 = @"C_builtin_function_or_method$cmath.atanh" +ext_rettype(#10231, #10226) +#10232 = @"C_builtin_function_or_method$cmath.cos" +ext_rettype(#10232, #10226) +#10233 = @"C_builtin_function_or_method$cmath.cosh" +ext_rettype(#10233, #10226) +#10234 = @"C_builtin_function_or_method$cmath.exp" +ext_rettype(#10234, #10226) +#10235 = @"C_builtin_function_or_method$cmath.isfinite" +ext_rettype(#10235, #10050) +#10236 = @"C_builtin_function_or_method$cmath.isinf" +ext_rettype(#10236, #10050) +#10237 = @"C_builtin_function_or_method$cmath.isnan" +ext_rettype(#10237, #10050) +#10238 = @"C_builtin_function_or_method$cmath.log" +ext_rettype(#10238, #10226) +#10239 = @"C_builtin_function_or_method$cmath.log10" +ext_rettype(#10239, #10226) +#10240 = @"C_builtin_function_or_method$cmath.phase" +ext_rettype(#10240, #10001) +#10241 = @"C_builtin_function_or_method$cmath.polar" +ext_rettype(#10241, #10037) +#10242 = @"C_builtin_function_or_method$cmath.rect" +ext_rettype(#10242, #10226) +#10243 = @"C_builtin_function_or_method$cmath.sin" +ext_rettype(#10243, #10226) +#10244 = @"C_builtin_function_or_method$cmath.sinh" +ext_rettype(#10244, #10226) +#10245 = @"C_builtin_function_or_method$cmath.sqrt" +ext_rettype(#10245, #10226) +#10246 = @"C_builtin_function_or_method$cmath.tan" +ext_rettype(#10246, #10226) +#10247 = @"C_builtin_function_or_method$cmath.tanh" +ext_rettype(#10247, #10226) +#10248 = @"C_builtin_function_or_method$_sha1.sha1" +#10249 = @"C_type$_sha1.sha1" +ext_rettype(#10248, #10249) +#10250 = @"C_builtin_function_or_method$_sre.getcodesize" +ext_rettype(#10250, #10024) +#10251 = @"C_builtin_function_or_method$_sre.getlower" +ext_rettype(#10251, #10024) +#10252 = @"C_builtin_function_or_method$syslog.openlog" +ext_rettype(#10252, #10005) +#10253 = @"C_builtin_function_or_method$syslog.closelog" +ext_rettype(#10253, #10005) +#10254 = @"C_builtin_function_or_method$syslog.syslog" +ext_rettype(#10254, #10005) +#10255 = @"C_builtin_function_or_method$syslog.setlogmask" +ext_rettype(#10255, #10024) +#10256 = @"C_builtin_function_or_method$syslog.LOG_MASK" +ext_rettype(#10256, #10024) +#10257 = @"C_builtin_function_or_method$syslog.LOG_UPTO" +ext_rettype(#10257, #10024) +#10258 = @"C_builtin_function_or_method$binascii.a2b_uu" +ext_rettype(#10258, #10081) +#10259 = @"C_builtin_function_or_method$binascii.a2b_hqx" +ext_rettype(#10259, #10037) +#10260 = @"C_builtin_function_or_method$binascii.b2a_hex" +ext_rettype(#10260, #10081) +#10261 = @"C_builtin_function_or_method$binascii.a2b_hex" +ext_rettype(#10261, #10081) +#10262 = @"C_builtin_function_or_method$binascii.hexlify" +ext_rettype(#10262, #10081) +#10263 = @"C_builtin_function_or_method$binascii.unhexlify" +ext_rettype(#10263, #10081) +#10264 = @"C_builtin_function_or_method$binascii.rledecode_hqx" +ext_rettype(#10264, #10081) +#10265 = @"C_builtin_function_or_method$binascii.crc_hqx" +ext_rettype(#10265, #10024) +#10266 = @"C_builtin_function_or_method$binascii.crc32" +ext_rettype(#10266, #10024) +#10267 = @"C_builtin_function_or_method$binascii.a2b_qp" +ext_rettype(#10267, #10081) +#10268 = @"C_builtin_function_or_method$binascii.b2a_qp" +ext_rettype(#10268, #10081) +#10269 = @"C_builtin_function_or_method$posix.access" +ext_rettype(#10269, #10050) +#10270 = @"C_builtin_function_or_method$posix.ttyname" +ext_rettype(#10270, #10010) +#10271 = @"C_builtin_function_or_method$posix.chdir" +ext_rettype(#10271, #10005) +#10272 = @"C_builtin_function_or_method$posix.chmod" +ext_rettype(#10272, #10005) +#10273 = @"C_builtin_function_or_method$posix.fchmod" +ext_rettype(#10273, #10005) +#10274 = @"C_builtin_function_or_method$posix.chown" +ext_rettype(#10274, #10005) +#10275 = @"C_builtin_function_or_method$posix.fchown" +ext_rettype(#10275, #10005) +#10276 = @"C_builtin_function_or_method$posix.lchown" +ext_rettype(#10276, #10005) +#10277 = @"C_builtin_function_or_method$posix.chroot" +ext_rettype(#10277, #10005) +#10278 = @"C_builtin_function_or_method$posix.ctermid" +ext_rettype(#10278, #10010) +#10279 = @"C_builtin_function_or_method$posix.getcwd" +ext_rettype(#10279, #10081) +ext_rettype(#10279, #10010) +#10280 = @"C_builtin_function_or_method$posix.getcwdb" +ext_rettype(#10280, #10081) +ext_rettype(#10280, #10010) +#10281 = @"C_builtin_function_or_method$posix.link" +ext_rettype(#10281, #10005) +#10282 = @"C_builtin_function_or_method$posix.listdir" +ext_rettype(#10282, #10020) +#10283 = @"C_builtin_function_or_method$posix.mkdir" +ext_rettype(#10283, #10005) +#10284 = @"C_builtin_function_or_method$posix.nice" +ext_rettype(#10284, #10024) +#10285 = @"C_builtin_function_or_method$posix.getpriority" +ext_rettype(#10285, #10024) +#10286 = @"C_builtin_function_or_method$posix.setpriority" +ext_rettype(#10286, #10005) +#10287 = @"C_builtin_function_or_method$posix.readlink" +ext_rettype(#10287, #10081) +ext_rettype(#10287, #10010) +#10288 = @"C_builtin_function_or_method$posix.rename" +ext_rettype(#10288, #10005) +#10289 = @"C_builtin_function_or_method$posix.replace" +ext_rettype(#10289, #10005) +#10290 = @"C_builtin_function_or_method$posix.rmdir" +ext_rettype(#10290, #10005) +#10291 = @"C_builtin_function_or_method$posix.stat_float_times" +ext_rettype(#10291, #10005) +ext_rettype(#10291, #10050) +#10292 = @"C_builtin_function_or_method$posix.symlink" +ext_rettype(#10292, #10005) +#10293 = @"C_builtin_function_or_method$posix.system" +ext_rettype(#10293, #10024) +#10294 = @"C_builtin_function_or_method$posix.umask" +ext_rettype(#10294, #10024) +#10295 = @"C_builtin_function_or_method$posix.unlink" +ext_rettype(#10295, #10005) +#10296 = @"C_builtin_function_or_method$posix.remove" +ext_rettype(#10296, #10005) +#10297 = @"C_builtin_function_or_method$posix.utime" +ext_rettype(#10297, #10005) +#10298 = @"C_builtin_function_or_method$posix.fork" +ext_rettype(#10298, #10024) +#10299 = @"C_builtin_function_or_method$posix.sched_get_priority_max" +ext_rettype(#10299, #10024) +#10300 = @"C_builtin_function_or_method$posix.sched_get_priority_min" +ext_rettype(#10300, #10024) +#10301 = @"C_builtin_function_or_method$posix.sched_getscheduler" +ext_rettype(#10301, #10024) +#10302 = @"C_builtin_function_or_method$posix.sched_rr_get_interval" +ext_rettype(#10302, #10001) +#10303 = @"C_builtin_function_or_method$posix.sched_setparam" +ext_rettype(#10303, #10005) +#10304 = @"C_builtin_function_or_method$posix.sched_setscheduler" +ext_rettype(#10304, #10005) +#10305 = @"C_builtin_function_or_method$posix.sched_yield" +ext_rettype(#10305, #10005) +#10306 = @"C_builtin_function_or_method$posix.sched_setaffinity" +ext_rettype(#10306, #10005) +#10307 = @"C_builtin_function_or_method$posix.sched_getaffinity" +ext_rettype(#10307, #10073) +ext_rettype(#10307, #10074) +#10308 = @"C_builtin_function_or_method$posix.openpty" +ext_rettype(#10308, #10037) +#10309 = @"C_builtin_function_or_method$posix.forkpty" +ext_rettype(#10309, #10037) +#10310 = @"C_builtin_function_or_method$posix.getegid" +ext_rettype(#10310, #10024) +#10311 = @"C_builtin_function_or_method$posix.geteuid" +ext_rettype(#10311, #10024) +#10312 = @"C_builtin_function_or_method$posix.getgid" +ext_rettype(#10312, #10024) +#10313 = @"C_builtin_function_or_method$posix.getgrouplist" +ext_rettype(#10313, #10020) +#10314 = @"C_builtin_function_or_method$posix.getgroups" +ext_rettype(#10314, #10020) +#10315 = @"C_builtin_function_or_method$posix.getpid" +ext_rettype(#10315, #10024) +#10316 = @"C_builtin_function_or_method$posix.getpgrp" +ext_rettype(#10316, #10024) +#10317 = @"C_builtin_function_or_method$posix.getppid" +ext_rettype(#10317, #10024) +#10318 = @"C_builtin_function_or_method$posix.getuid" +ext_rettype(#10318, #10024) +#10319 = @"C_builtin_function_or_method$posix.getlogin" +ext_rettype(#10319, #10010) +#10320 = @"C_builtin_function_or_method$posix.kill" +ext_rettype(#10320, #10005) +#10321 = @"C_builtin_function_or_method$posix.killpg" +ext_rettype(#10321, #10005) +#10322 = @"C_builtin_function_or_method$posix.setuid" +ext_rettype(#10322, #10005) +#10323 = @"C_builtin_function_or_method$posix.seteuid" +ext_rettype(#10323, #10005) +#10324 = @"C_builtin_function_or_method$posix.setegid" +ext_rettype(#10324, #10005) +#10325 = @"C_builtin_function_or_method$posix.setreuid" +ext_rettype(#10325, #10005) +#10326 = @"C_builtin_function_or_method$posix.setregid" +ext_rettype(#10326, #10005) +#10327 = @"C_builtin_function_or_method$posix.setgid" +ext_rettype(#10327, #10005) +#10328 = @"C_builtin_function_or_method$posix.setgroups" +ext_rettype(#10328, #10005) +#10329 = @"C_builtin_function_or_method$posix.initgroups" +ext_rettype(#10329, #10005) +#10330 = @"C_builtin_function_or_method$posix.getpgid" +ext_rettype(#10330, #10024) +#10331 = @"C_builtin_function_or_method$posix.setpgrp" +ext_rettype(#10331, #10005) +#10332 = @"C_builtin_function_or_method$posix.wait" +ext_rettype(#10332, #10037) +#10333 = @"C_builtin_function_or_method$posix.wait3" +ext_rettype(#10333, #10037) +#10334 = @"C_builtin_function_or_method$posix.wait4" +ext_rettype(#10334, #10037) +#10335 = @"C_builtin_function_or_method$posix.waitid" +ext_rettype(#10335, #10005) +#10336 = @"C_builtin_function_or_method$posix.waitpid" +ext_rettype(#10336, #10037) +#10337 = @"C_builtin_function_or_method$posix.getsid" +ext_rettype(#10337, #10024) +#10338 = @"C_builtin_function_or_method$posix.setsid" +ext_rettype(#10338, #10005) +#10339 = @"C_builtin_function_or_method$posix.setpgid" +ext_rettype(#10339, #10005) +#10340 = @"C_builtin_function_or_method$posix.tcgetpgrp" +ext_rettype(#10340, #10024) +#10341 = @"C_builtin_function_or_method$posix.tcsetpgrp" +ext_rettype(#10341, #10005) +#10342 = @"C_builtin_function_or_method$posix.open" +ext_rettype(#10342, #10024) +#10343 = @"C_builtin_function_or_method$posix.close" +ext_rettype(#10343, #10005) +#10344 = @"C_builtin_function_or_method$posix.closerange" +ext_rettype(#10344, #10005) +#10345 = @"C_builtin_function_or_method$posix.device_encoding" +ext_rettype(#10345, #10005) +#10346 = @"C_builtin_function_or_method$posix.dup" +ext_rettype(#10346, #10024) +#10347 = @"C_builtin_function_or_method$posix.dup2" +ext_rettype(#10347, #10005) +#10348 = @"C_builtin_function_or_method$posix.lockf" +ext_rettype(#10348, #10005) +#10349 = @"C_builtin_function_or_method$posix.lseek" +ext_rettype(#10349, #10024) +#10350 = @"C_builtin_function_or_method$posix.readv" +ext_rettype(#10350, #10024) +#10351 = @"C_builtin_function_or_method$posix.write" +ext_rettype(#10351, #10024) +#10352 = @"C_builtin_function_or_method$posix.writev" +ext_rettype(#10352, #10024) +#10353 = @"C_builtin_function_or_method$posix.pwrite" +ext_rettype(#10353, #10024) +#10354 = @"C_builtin_function_or_method$posix.sendfile" +ext_rettype(#10354, #10024) +#10355 = @"C_builtin_function_or_method$posix.isatty" +ext_rettype(#10355, #10050) +#10356 = @"C_builtin_function_or_method$posix.pipe" +ext_rettype(#10356, #10037) +#10357 = @"C_builtin_function_or_method$posix.pipe2" +ext_rettype(#10357, #10037) +#10358 = @"C_builtin_function_or_method$posix.mkfifo" +ext_rettype(#10358, #10005) +#10359 = @"C_builtin_function_or_method$posix.mknod" +ext_rettype(#10359, #10005) +#10360 = @"C_builtin_function_or_method$posix.major" +ext_rettype(#10360, #10024) +#10361 = @"C_builtin_function_or_method$posix.minor" +ext_rettype(#10361, #10024) +#10362 = @"C_builtin_function_or_method$posix.makedev" +ext_rettype(#10362, #10024) +#10363 = @"C_builtin_function_or_method$posix.ftruncate" +ext_rettype(#10363, #10005) +#10364 = @"C_builtin_function_or_method$posix.truncate" +ext_rettype(#10364, #10005) +#10365 = @"C_builtin_function_or_method$posix.posix_fallocate" +ext_rettype(#10365, #10005) +#10366 = @"C_builtin_function_or_method$posix.posix_fadvise" +ext_rettype(#10366, #10005) +#10367 = @"C_builtin_function_or_method$posix.putenv" +ext_rettype(#10367, #10005) +#10368 = @"C_builtin_function_or_method$posix.unsetenv" +ext_rettype(#10368, #10005) +#10369 = @"C_builtin_function_or_method$posix.strerror" +ext_rettype(#10369, #10010) +#10370 = @"C_builtin_function_or_method$posix.fchdir" +ext_rettype(#10370, #10005) +#10371 = @"C_builtin_function_or_method$posix.fsync" +ext_rettype(#10371, #10005) +#10372 = @"C_builtin_function_or_method$posix.sync" +ext_rettype(#10372, #10005) +#10373 = @"C_builtin_function_or_method$posix.fdatasync" +ext_rettype(#10373, #10005) +#10374 = @"C_builtin_function_or_method$posix.WCOREDUMP" +ext_rettype(#10374, #10050) +#10375 = @"C_builtin_function_or_method$posix.WIFCONTINUED" +ext_rettype(#10375, #10050) +#10376 = @"C_builtin_function_or_method$posix.WIFSTOPPED" +ext_rettype(#10376, #10050) +#10377 = @"C_builtin_function_or_method$posix.WIFSIGNALED" +ext_rettype(#10377, #10050) +#10378 = @"C_builtin_function_or_method$posix.WIFEXITED" +ext_rettype(#10378, #10050) +#10379 = @"C_builtin_function_or_method$posix.WEXITSTATUS" +ext_rettype(#10379, #10024) +#10380 = @"C_builtin_function_or_method$posix.WTERMSIG" +ext_rettype(#10380, #10024) +#10381 = @"C_builtin_function_or_method$posix.WSTOPSIG" +ext_rettype(#10381, #10024) +#10382 = @"C_builtin_function_or_method$posix.confstr" +ext_rettype(#10382, #10010) +ext_rettype(#10382, #10005) +#10383 = @"C_builtin_function_or_method$posix.sysconf" +ext_rettype(#10383, #10024) +#10384 = @"C_builtin_function_or_method$posix.fpathconf" +ext_rettype(#10384, #10024) +#10385 = @"C_builtin_function_or_method$posix.pathconf" +ext_rettype(#10385, #10024) +#10386 = @"C_builtin_function_or_method$posix.getloadavg" +ext_rettype(#10386, #10037) +#10387 = @"C_builtin_function_or_method$posix.urandom" +ext_rettype(#10387, #10081) +#10388 = @"C_builtin_function_or_method$posix.setresuid" +ext_rettype(#10388, #10005) +#10389 = @"C_builtin_function_or_method$posix.setresgid" +ext_rettype(#10389, #10005) +#10390 = @"C_builtin_function_or_method$posix.getresuid" +ext_rettype(#10390, #10037) +#10391 = @"C_builtin_function_or_method$posix.getresgid" +ext_rettype(#10391, #10037) +#10392 = @"C_builtin_function_or_method$posix.setxattr" +ext_rettype(#10392, #10005) +#10393 = @"C_builtin_function_or_method$posix.removexattr" +ext_rettype(#10393, #10005) +#10394 = @"C_builtin_function_or_method$posix.listxattr" +ext_rettype(#10394, #10020) +#10395 = @"C_builtin_function_or_method$atexit._clear" +ext_rettype(#10395, #10005) +#10396 = @"C_builtin_function_or_method$atexit.unregister" +ext_rettype(#10396, #10005) +#10397 = @"C_builtin_function_or_method$atexit._run_exitfuncs" +ext_rettype(#10397, #10005) +#10398 = @"C_builtin_function_or_method$_posixsubprocess.fork_exec" +ext_rettype(#10398, #10024) +#10399 = @"C_builtin_function_or_method$_posixsubprocess.cloexec_pipe" +ext_rettype(#10399, #10037) +#10400 = @"C_builtin_function_or_method$_heapq.heappush" +ext_rettype(#10400, #10005) +#10401 = @"C_builtin_function_or_method$_heapq.heapify" +ext_rettype(#10401, #10005) +#10402 = @"C_builtin_function_or_method$_heapq.nlargest" +ext_rettype(#10402, #10020) +#10403 = @"C_builtin_function_or_method$_heapq.nsmallest" +ext_rettype(#10403, #10020) +#10404 = @"C_builtin_function_or_method$_testbuffer.slice_indices" +ext_rettype(#10404, #10037) +#10405 = @"C_builtin_function_or_method$_testbuffer.get_sizeof_void_p" +ext_rettype(#10405, #10024) +#10406 = @"C_builtin_function_or_method$_testbuffer.get_contiguous" +#10407 = @"C_type$memoryview" +ext_rettype(#10406, #10407) +#10408 = @"C_builtin_function_or_method$_testbuffer.py_buffer_to_contiguous" +ext_rettype(#10408, #10081) +#10409 = @"C_builtin_function_or_method$select.select" +ext_rettype(#10409, #10037) +#10410 = @"C_builtin_function_or_method$select.poll" +#10411 = @"C_type$select.poll" +ext_rettype(#10410, #10411) +#10412 = @"C_builtin_function_or_method$operator.truth" +ext_rettype(#10412, #10050) +#10413 = @"C_builtin_function_or_method$operator.contains" +ext_rettype(#10413, #10050) +#10414 = @"C_builtin_function_or_method$operator.__contains__" +ext_rettype(#10414, #10050) +#10415 = @"C_builtin_function_or_method$operator.indexOf" +ext_rettype(#10415, #10024) +#10416 = @"C_builtin_function_or_method$operator.countOf" +ext_rettype(#10416, #10024) +#10417 = @"C_builtin_function_or_method$operator.not_" +ext_rettype(#10417, #10050) +#10418 = @"C_builtin_function_or_method$operator.__not__" +ext_rettype(#10418, #10050) +#10419 = @"C_builtin_function_or_method$operator.setitem" +ext_rettype(#10419, #10005) +#10420 = @"C_builtin_function_or_method$operator.__setitem__" +ext_rettype(#10420, #10005) +#10421 = @"C_builtin_function_or_method$operator.delitem" +ext_rettype(#10421, #10005) +#10422 = @"C_builtin_function_or_method$operator.__delitem__" +ext_rettype(#10422, #10005) +#10423 = @"C_builtin_function_or_method$operator._compare_digest" +ext_rettype(#10423, #10050) +#10424 = @"C_builtin_function_or_method$nis.match" +ext_rettype(#10424, #10010) +#10425 = @"C_builtin_function_or_method$nis.cat" +ext_rettype(#10425, #10111) +#10426 = @"C_builtin_function_or_method$nis.maps" +ext_rettype(#10426, #10020) +#10427 = @"C_builtin_function_or_method$nis.get_default_domain" +ext_rettype(#10427, #10010) +#10428 = @"C_builtin_function_or_method$readline.parse_and_bind" +ext_rettype(#10428, #10005) +#10429 = @"C_builtin_function_or_method$readline.insert_text" +ext_rettype(#10429, #10005) +#10430 = @"C_builtin_function_or_method$readline.redisplay" +ext_rettype(#10430, #10005) +#10431 = @"C_builtin_function_or_method$readline.read_init_file" +ext_rettype(#10431, #10005) +#10432 = @"C_builtin_function_or_method$readline.read_history_file" +ext_rettype(#10432, #10005) +#10433 = @"C_builtin_function_or_method$readline.write_history_file" +ext_rettype(#10433, #10005) +#10434 = @"C_builtin_function_or_method$readline.get_history_item" +ext_rettype(#10434, #10005) +#10435 = @"C_builtin_function_or_method$readline.get_current_history_length" +ext_rettype(#10435, #10024) +#10436 = @"C_builtin_function_or_method$readline.set_history_length" +ext_rettype(#10436, #10005) +#10437 = @"C_builtin_function_or_method$readline.get_history_length" +ext_rettype(#10437, #10024) +#10438 = @"C_builtin_function_or_method$readline.set_completer" +ext_rettype(#10438, #10005) +#10439 = @"C_builtin_function_or_method$readline.get_completer" +ext_rettype(#10439, #10005) +#10440 = @"C_builtin_function_or_method$readline.get_completion_type" +ext_rettype(#10440, #10024) +#10441 = @"C_builtin_function_or_method$readline.set_completer_delims" +ext_rettype(#10441, #10005) +#10442 = @"C_builtin_function_or_method$readline.add_history" +ext_rettype(#10442, #10005) +#10443 = @"C_builtin_function_or_method$readline.remove_history_item" +ext_rettype(#10443, #10005) +#10444 = @"C_builtin_function_or_method$readline.replace_history_item" +ext_rettype(#10444, #10005) +#10445 = @"C_builtin_function_or_method$readline.set_completion_display_matches_hook" +ext_rettype(#10445, #10005) +#10446 = @"C_builtin_function_or_method$readline.set_startup_hook" +ext_rettype(#10446, #10005) +#10447 = @"C_builtin_function_or_method$readline.set_pre_input_hook" +ext_rettype(#10447, #10005) +#10448 = @"C_builtin_function_or_method$readline.clear_history" +ext_rettype(#10448, #10005) +#10449 = @"C_builtin_function_or_method$_testcapi.test_config" +ext_rettype(#10449, #10005) +#10450 = @"C_builtin_function_or_method$_testcapi.test_datetime_capi" +ext_rettype(#10450, #10005) +#10451 = @"C_builtin_function_or_method$_testcapi.test_list_api" +ext_rettype(#10451, #10005) +#10452 = @"C_builtin_function_or_method$_testcapi.test_dict_iteration" +ext_rettype(#10452, #10005) +#10453 = @"C_builtin_function_or_method$_testcapi.test_lazy_hash_inheritance" +ext_rettype(#10453, #10005) +#10454 = @"C_builtin_function_or_method$_testcapi.test_long_api" +ext_rettype(#10454, #10005) +#10455 = @"C_builtin_function_or_method$_testcapi.test_long_and_overflow" +ext_rettype(#10455, #10005) +#10456 = @"C_builtin_function_or_method$_testcapi.test_long_as_double" +ext_rettype(#10456, #10005) +#10457 = @"C_builtin_function_or_method$_testcapi.test_long_as_size_t" +ext_rettype(#10457, #10005) +#10458 = @"C_builtin_function_or_method$_testcapi.test_long_numbits" +ext_rettype(#10458, #10005) +#10459 = @"C_builtin_function_or_method$_testcapi.test_k_code" +ext_rettype(#10459, #10005) +#10460 = @"C_builtin_function_or_method$_testcapi.test_empty_argparse" +ext_rettype(#10460, #10005) +#10461 = @"C_builtin_function_or_method$_testcapi.parse_tuple_and_keywords" +ext_rettype(#10461, #10005) +#10462 = @"C_builtin_function_or_method$_testcapi.test_null_strings" +ext_rettype(#10462, #10037) +#10463 = @"C_builtin_function_or_method$_testcapi.test_string_from_format" +ext_rettype(#10463, #10005) +#10464 = @"C_builtin_function_or_method$_testcapi.test_with_docstring" +ext_rettype(#10464, #10005) +#10465 = @"C_builtin_function_or_method$_testcapi.test_string_to_double" +ext_rettype(#10465, #10005) +#10466 = @"C_builtin_function_or_method$_testcapi.test_unicode_compare_with_ascii" +ext_rettype(#10466, #10005) +#10467 = @"C_builtin_function_or_method$_testcapi.test_capsule" +ext_rettype(#10467, #10005) +#10468 = @"C_builtin_function_or_method$_testcapi.getargs_tuple" +ext_rettype(#10468, #10037) +#10469 = @"C_builtin_function_or_method$_testcapi.getargs_keywords" +ext_rettype(#10469, #10037) +#10470 = @"C_builtin_function_or_method$_testcapi.getargs_keyword_only" +ext_rettype(#10470, #10037) +#10471 = @"C_builtin_function_or_method$_testcapi.getargs_b" +ext_rettype(#10471, #10024) +#10472 = @"C_builtin_function_or_method$_testcapi.getargs_B" +ext_rettype(#10472, #10024) +#10473 = @"C_builtin_function_or_method$_testcapi.getargs_h" +ext_rettype(#10473, #10024) +#10474 = @"C_builtin_function_or_method$_testcapi.getargs_H" +ext_rettype(#10474, #10024) +#10475 = @"C_builtin_function_or_method$_testcapi.getargs_I" +ext_rettype(#10475, #10024) +#10476 = @"C_builtin_function_or_method$_testcapi.getargs_k" +ext_rettype(#10476, #10024) +#10477 = @"C_builtin_function_or_method$_testcapi.getargs_i" +ext_rettype(#10477, #10024) +#10478 = @"C_builtin_function_or_method$_testcapi.getargs_l" +ext_rettype(#10478, #10024) +#10479 = @"C_builtin_function_or_method$_testcapi.getargs_n" +ext_rettype(#10479, #10024) +#10480 = @"C_builtin_function_or_method$_testcapi.getargs_p" +ext_rettype(#10480, #10024) +#10481 = @"C_builtin_function_or_method$_testcapi.getargs_L" +ext_rettype(#10481, #10024) +#10482 = @"C_builtin_function_or_method$_testcapi.getargs_K" +ext_rettype(#10482, #10024) +#10483 = @"C_builtin_function_or_method$_testcapi.test_longlong_api" +ext_rettype(#10483, #10005) +#10484 = @"C_builtin_function_or_method$_testcapi.test_long_long_and_overflow" +ext_rettype(#10484, #10005) +#10485 = @"C_builtin_function_or_method$_testcapi.test_L_code" +ext_rettype(#10485, #10005) +#10486 = @"C_builtin_function_or_method$_testcapi.getargs_c" +ext_rettype(#10486, #10081) +#10487 = @"C_builtin_function_or_method$_testcapi.getargs_s" +ext_rettype(#10487, #10081) +#10488 = @"C_builtin_function_or_method$_testcapi.getargs_s_star" +ext_rettype(#10488, #10081) +#10489 = @"C_builtin_function_or_method$_testcapi.getargs_s_hash" +ext_rettype(#10489, #10081) +#10490 = @"C_builtin_function_or_method$_testcapi.getargs_z" +ext_rettype(#10490, #10081) +ext_rettype(#10490, #10005) +#10491 = @"C_builtin_function_or_method$_testcapi.getargs_z_star" +ext_rettype(#10491, #10081) +ext_rettype(#10491, #10005) +#10492 = @"C_builtin_function_or_method$_testcapi.getargs_z_hash" +ext_rettype(#10492, #10081) +ext_rettype(#10492, #10005) +#10493 = @"C_builtin_function_or_method$_testcapi.getargs_y" +ext_rettype(#10493, #10081) +#10494 = @"C_builtin_function_or_method$_testcapi.getargs_y_star" +ext_rettype(#10494, #10081) +#10495 = @"C_builtin_function_or_method$_testcapi.getargs_y_hash" +ext_rettype(#10495, #10081) +#10496 = @"C_builtin_function_or_method$_testcapi.getargs_u" +ext_rettype(#10496, #10010) +#10497 = @"C_builtin_function_or_method$_testcapi.getargs_u_hash" +ext_rettype(#10497, #10010) +#10498 = @"C_builtin_function_or_method$_testcapi.getargs_Z" +ext_rettype(#10498, #10010) +ext_rettype(#10498, #10005) +#10499 = @"C_builtin_function_or_method$_testcapi.getargs_Z_hash" +ext_rettype(#10499, #10010) +ext_rettype(#10499, #10005) +#10500 = @"C_builtin_function_or_method$_testcapi.getargs_w_star" +ext_rettype(#10500, #10081) +#10501 = @"C_builtin_function_or_method$_testcapi.test_s_code" +ext_rettype(#10501, #10005) +#10502 = @"C_builtin_function_or_method$_testcapi.test_u_code" +ext_rettype(#10502, #10005) +#10503 = @"C_builtin_function_or_method$_testcapi.test_Z_code" +ext_rettype(#10503, #10005) +#10504 = @"C_builtin_function_or_method$_testcapi.test_widechar" +ext_rettype(#10504, #10005) +#10505 = @"C_builtin_function_or_method$_testcapi.unicode_aswidechar" +ext_rettype(#10505, #10037) +#10506 = @"C_builtin_function_or_method$_testcapi.unicode_aswidecharstring" +ext_rettype(#10506, #10037) +#10507 = @"C_builtin_function_or_method$_testcapi.unicode_legacy_string" +ext_rettype(#10507, #10010) +#10508 = @"C_builtin_function_or_method$_testcapi._test_thread_state" +ext_rettype(#10508, #10005) +#10509 = @"C_builtin_function_or_method$_testcapi._pending_threadfunc" +ext_rettype(#10509, #10050) +#10510 = @"C_builtin_function_or_method$_testcapi.profile_int" +ext_rettype(#10510, #10005) +#10511 = @"C_builtin_function_or_method$_testcapi.traceback_print" +ext_rettype(#10511, #10005) +#10512 = @"C_builtin_function_or_method$_testcapi.exception_print" +ext_rettype(#10512, #10005) +#10513 = @"C_builtin_function_or_method$_testcapi.set_exc_info" +ext_rettype(#10513, #10037) +#10514 = @"C_builtin_function_or_method$_testcapi.argparsing" +ext_rettype(#10514, #10024) +ext_rettype(#10514, #10005) +#10515 = @"C_builtin_function_or_method$_testcapi.code_newempty" +ext_rettype(#10515, #10028) +#10516 = @"C_builtin_function_or_method$_testcapi.make_exception_with_doc" +#10517 = @"C_type$type" +ext_rettype(#10516, #10517) +#10518 = @"C_builtin_function_or_method$_testcapi.make_memoryview_from_NULL_pointer" +ext_rettype(#10518, #10407) +#10519 = @"C_builtin_function_or_method$_testcapi.run_in_subinterp" +ext_rettype(#10519, #10024) +#10520 = @"C_builtin_function_or_method$_testcapi.pytime_object_to_time_t" +ext_rettype(#10520, #10024) +#10521 = @"C_builtin_function_or_method$_testcapi.pytime_object_to_timeval" +ext_rettype(#10521, #10037) +#10522 = @"C_builtin_function_or_method$_testcapi.pytime_object_to_timespec" +ext_rettype(#10522, #10037) +#10523 = @"C_builtin_function_or_method$_testcapi.call_in_temporary_c_thread" +ext_rettype(#10523, #10005) +#10524 = @"C_builtin_function_or_method$_json.scanstring" +ext_rettype(#10524, #10037) +#10525 = @"C_builtin_function_or_method$_sha512.sha512" +#10526 = @"C_type$_sha512.sha512" +ext_rettype(#10525, #10526) +#10527 = @"C_builtin_function_or_method$_sha512.sha384" +#10528 = @"C_type$_sha512.sha384" +ext_rettype(#10527, #10528) +#10529 = @"C_builtin_function_or_method$spwd.getspall" +ext_rettype(#10529, #10020) +#10530 = @"C_builtin_function_or_method$_elementtree.SubElement" +#10531 = @"C_type$xml.etree.ElementTree.Element" +ext_rettype(#10530, #10531) +#10532 = @"C_builtin_function_or_method$_ctypes.get_errno" +ext_rettype(#10532, #10024) +#10533 = @"C_builtin_function_or_method$_ctypes.set_errno" +ext_rettype(#10533, #10024) +#10534 = @"C_builtin_function_or_method$_ctypes.buffer_info" +ext_rettype(#10534, #10037) +#10535 = @"C_builtin_function_or_method$_ctypes.resize" +ext_rettype(#10535, #10005) +#10536 = @"C_builtin_function_or_method$_ctypes.dlopen" +ext_rettype(#10536, #10024) +#10537 = @"C_builtin_function_or_method$_ctypes.dlclose" +ext_rettype(#10537, #10005) +#10538 = @"C_builtin_function_or_method$_ctypes.dlsym" +ext_rettype(#10538, #10024) +#10539 = @"C_builtin_function_or_method$_ctypes.alignment" +ext_rettype(#10539, #10024) +#10540 = @"C_builtin_function_or_method$_ctypes.sizeof" +ext_rettype(#10540, #10024) +#10541 = @"C_builtin_function_or_method$_ctypes.byref" +#10542 = @"C_type$CArgObject" +ext_rettype(#10541, #10542) +#10543 = @"C_builtin_function_or_method$_ctypes.addressof" +ext_rettype(#10543, #10024) +#10544 = @"C_builtin_function_or_method$_ctypes.call_function" +ext_rettype(#10544, #10024) +ext_rettype(#10544, #10005) +#10545 = @"C_builtin_function_or_method$_ctypes.call_cdeclfunction" +ext_rettype(#10545, #10024) +ext_rettype(#10545, #10005) +#10546 = @"C_builtin_function_or_method$_ctypes_test.func_si" +ext_rettype(#10546, #10005) +#10547 = @"C_builtin_function_or_method$_ctypes_test.func" +ext_rettype(#10547, #10005) +#10548 = @"C_builtin_function_or_method$pwd.getpwall" +ext_rettype(#10548, #10020) +#10549 = @"C_builtin_function_or_method$zlib.adler32" +ext_rettype(#10549, #10024) +#10550 = @"C_builtin_function_or_method$zlib.compress" +ext_rettype(#10550, #10081) +#10551 = @"C_builtin_function_or_method$zlib.crc32" +ext_rettype(#10551, #10024) +#10552 = @"C_builtin_function_or_method$unicodedata.decimal" +ext_rettype(#10552, #10024) +#10553 = @"C_builtin_function_or_method$unicodedata.digit" +ext_rettype(#10553, #10024) +#10554 = @"C_builtin_function_or_method$unicodedata.numeric" +ext_rettype(#10554, #10001) +#10555 = @"C_builtin_function_or_method$unicodedata.combining" +ext_rettype(#10555, #10024) +#10556 = @"C_builtin_function_or_method$unicodedata.mirrored" +ext_rettype(#10556, #10024) +#10557 = @"C_builtin_function_or_method$unicodedata.decomposition" +ext_rettype(#10557, #10010) +#10558 = @"C_builtin_function_or_method$itertools.tee" +ext_rettype(#10558, #10037) +#10559 = @"C_builtin_function_or_method$math.atan2" +ext_rettype(#10559, #10001) +#10560 = @"C_builtin_function_or_method$math.copysign" +ext_rettype(#10560, #10001) +#10561 = @"C_builtin_function_or_method$math.degrees" +ext_rettype(#10561, #10001) +#10562 = @"C_builtin_function_or_method$math.erf" +ext_rettype(#10562, #10001) +#10563 = @"C_builtin_function_or_method$math.erfc" +ext_rettype(#10563, #10001) +#10564 = @"C_builtin_function_or_method$math.factorial" +ext_rettype(#10564, #10024) +#10565 = @"C_builtin_function_or_method$math.fmod" +ext_rettype(#10565, #10001) +#10566 = @"C_builtin_function_or_method$math.frexp" +ext_rettype(#10566, #10037) +#10567 = @"C_builtin_function_or_method$math.fsum" +ext_rettype(#10567, #10001) +#10568 = @"C_builtin_function_or_method$math.gamma" +ext_rettype(#10568, #10001) +#10569 = @"C_builtin_function_or_method$math.hypot" +ext_rettype(#10569, #10001) +#10570 = @"C_builtin_function_or_method$math.isfinite" +ext_rettype(#10570, #10050) +#10571 = @"C_builtin_function_or_method$math.isinf" +ext_rettype(#10571, #10050) +#10572 = @"C_builtin_function_or_method$math.isnan" +ext_rettype(#10572, #10050) +#10573 = @"C_builtin_function_or_method$math.ldexp" +ext_rettype(#10573, #10001) +#10574 = @"C_builtin_function_or_method$math.lgamma" +ext_rettype(#10574, #10001) +#10575 = @"C_builtin_function_or_method$math.log" +ext_rettype(#10575, #10001) +#10576 = @"C_builtin_function_or_method$math.log10" +ext_rettype(#10576, #10001) +#10577 = @"C_builtin_function_or_method$math.log2" +ext_rettype(#10577, #10001) +#10578 = @"C_builtin_function_or_method$math.modf" +ext_rettype(#10578, #10037) +#10579 = @"C_builtin_function_or_method$math.pow" +ext_rettype(#10579, #10001) +#10580 = @"C_builtin_function_or_method$math.radians" +ext_rettype(#10580, #10001) +#10581 = @"C_builtin_function_or_method$ossaudiodev.open" +#10582 = @"C_type$ossaudiodev.oss_audio_device" +ext_rettype(#10581, #10582) +#10583 = @"C_builtin_function_or_method$ossaudiodev.openmixer" +#10584 = @"C_type$ossaudiodev.oss_mixer_device" +ext_rettype(#10583, #10584) +#10585 = @"C_builtin_function_or_method$pyexpat.ParserCreate" +#10586 = @"C_type$pyexpat.xmlparser" +ext_rettype(#10585, #10586) +#10587 = @"C_builtin_function_or_method$pyexpat.ErrorString" +ext_rettype(#10587, #10010) +#10588 = @"C_builtin_function_or_method$_socket.gethostbyname_ex" +ext_rettype(#10588, #10037) +#10589 = @"C_builtin_function_or_method$_socket.gethostbyaddr" +ext_rettype(#10589, #10037) +#10590 = @"C_builtin_function_or_method$_socket.gethostname" +ext_rettype(#10590, #10010) +#10591 = @"C_builtin_function_or_method$_socket.sethostname" +ext_rettype(#10591, #10005) +#10592 = @"C_builtin_function_or_method$_socket.getservbyname" +ext_rettype(#10592, #10024) +#10593 = @"C_builtin_function_or_method$_socket.getprotobyname" +ext_rettype(#10593, #10024) +#10594 = @"C_builtin_function_or_method$_socket.dup" +ext_rettype(#10594, #10024) +#10595 = @"C_builtin_function_or_method$_socket.socketpair" +ext_rettype(#10595, #10037) +#10596 = @"C_builtin_function_or_method$_socket.ntohs" +ext_rettype(#10596, #10024) +#10597 = @"C_builtin_function_or_method$_socket.ntohl" +ext_rettype(#10597, #10024) +#10598 = @"C_builtin_function_or_method$_socket.htons" +ext_rettype(#10598, #10024) +#10599 = @"C_builtin_function_or_method$_socket.htonl" +ext_rettype(#10599, #10024) +#10600 = @"C_builtin_function_or_method$_socket.inet_aton" +ext_rettype(#10600, #10081) +#10601 = @"C_builtin_function_or_method$_socket.inet_pton" +ext_rettype(#10601, #10081) +#10602 = @"C_builtin_function_or_method$_socket.getaddrinfo" +ext_rettype(#10602, #10020) +#10603 = @"C_builtin_function_or_method$_socket.getnameinfo" +ext_rettype(#10603, #10037) +#10604 = @"C_builtin_function_or_method$_socket.getdefaulttimeout" +ext_rettype(#10604, #10001) +ext_rettype(#10604, #10005) +#10605 = @"C_builtin_function_or_method$_socket.setdefaulttimeout" +ext_rettype(#10605, #10005) +#10606 = @"C_builtin_function_or_method$_socket.if_nameindex" +ext_rettype(#10606, #10020) +#10607 = @"C_builtin_function_or_method$_socket.if_nametoindex" +ext_rettype(#10607, #10024) +#10608 = @"C_builtin_function_or_method$_socket.if_indextoname" +ext_rettype(#10608, #10010) +#10609 = @"C_builtin_function_or_method$_socket.CMSG_LEN" +ext_rettype(#10609, #10024) +#10610 = @"C_builtin_function_or_method$_socket.CMSG_SPACE" +ext_rettype(#10610, #10024) +#10611 = @"C_builtin_function_or_method$resource.getrlimit" +ext_rettype(#10611, #10037) +#10612 = @"C_builtin_function_or_method$resource.setrlimit" +ext_rettype(#10612, #10005) +#10613 = @"C_builtin_function_or_method$resource.getpagesize" +ext_rettype(#10613, #10024) +#10614 = @"C_builtin_function_or_method$_warnings.warn" +ext_rettype(#10614, #10005) +#10615 = @"C_builtin_function_or_method$_warnings.warn_explicit" +ext_rettype(#10615, #10005) +#10616 = @"C_builtin_function_or_method$sys.callstats" +ext_rettype(#10616, #10005) +#10617 = @"C_builtin_function_or_method$sys._clear_type_cache" +ext_rettype(#10617, #10005) +#10618 = @"C_builtin_function_or_method$sys._current_frames" +ext_rettype(#10618, #10111) +#10619 = @"C_builtin_function_or_method$sys.displayhook" +ext_rettype(#10619, #10005) +#10620 = @"C_builtin_function_or_method$sys.exc_info" +ext_rettype(#10620, #10037) +#10621 = @"C_builtin_function_or_method$sys.excepthook" +ext_rettype(#10621, #10005) +#10622 = @"C_builtin_function_or_method$sys.getdlopenflags" +ext_rettype(#10622, #10024) +#10623 = @"C_builtin_function_or_method$sys.getrefcount" +ext_rettype(#10623, #10024) +#10624 = @"C_builtin_function_or_method$sys.getrecursionlimit" +ext_rettype(#10624, #10024) +#10625 = @"C_builtin_function_or_method$sys._getframe" +#10626 = @"C_type$frame" +ext_rettype(#10625, #10626) +#10627 = @"C_builtin_function_or_method$sys.setcheckinterval" +ext_rettype(#10627, #10005) +#10628 = @"C_builtin_function_or_method$sys.getcheckinterval" +ext_rettype(#10628, #10024) +#10629 = @"C_builtin_function_or_method$sys.setswitchinterval" +ext_rettype(#10629, #10005) +#10630 = @"C_builtin_function_or_method$sys.getswitchinterval" +ext_rettype(#10630, #10001) +#10631 = @"C_builtin_function_or_method$sys.setdlopenflags" +ext_rettype(#10631, #10005) +#10632 = @"C_builtin_function_or_method$sys.setprofile" +ext_rettype(#10632, #10005) +#10633 = @"C_builtin_function_or_method$sys.getprofile" +ext_rettype(#10633, #10005) +#10634 = @"C_builtin_function_or_method$sys.setrecursionlimit" +ext_rettype(#10634, #10005) +#10635 = @"C_builtin_function_or_method$sys.settrace" +ext_rettype(#10635, #10005) +#10636 = @"C_builtin_function_or_method$sys.gettrace" +ext_rettype(#10636, #10005) +#10637 = @"C_builtin_function_or_method$sys._debugmallocstats" +ext_rettype(#10637, #10005) +#10638 = @"C_builtin_function_or_method$marshal.load" +ext_rettype(#10638, #10024) +ext_rettype(#10638, #10020) +ext_rettype(#10638, #10111) +ext_rettype(#10638, #10001) +ext_rettype(#10638, #10226) +ext_rettype(#10638, #10037) +ext_rettype(#10638, #10028) +ext_rettype(#10638, #10081) +ext_rettype(#10638, #10005) +ext_rettype(#10638, #10050) +#10639 = @"C_builtin_function_or_method$marshal.loads" +ext_rettype(#10639, #10024) +ext_rettype(#10639, #10020) +ext_rettype(#10639, #10111) +ext_rettype(#10639, #10001) +ext_rettype(#10639, #10226) +ext_rettype(#10639, #10037) +ext_rettype(#10639, #10028) +ext_rettype(#10639, #10081) +ext_rettype(#10639, #10005) +ext_rettype(#10639, #10050) +#10640 = @"C_builtin_function_or_method$_imp.extension_suffixes" +ext_rettype(#10640, #10020) +#10641 = @"C_builtin_function_or_method$_imp.lock_held" +ext_rettype(#10641, #10050) +#10642 = @"C_builtin_function_or_method$_imp.acquire_lock" +ext_rettype(#10642, #10005) +#10643 = @"C_builtin_function_or_method$_imp.release_lock" +ext_rettype(#10643, #10005) +#10644 = @"C_builtin_function_or_method$_imp.get_frozen_object" +ext_rettype(#10644, #10024) +ext_rettype(#10644, #10020) +ext_rettype(#10644, #10111) +ext_rettype(#10644, #10001) +ext_rettype(#10644, #10226) +ext_rettype(#10644, #10037) +ext_rettype(#10644, #10028) +ext_rettype(#10644, #10081) +ext_rettype(#10644, #10005) +ext_rettype(#10644, #10050) +#10645 = @"C_builtin_function_or_method$_imp.is_frozen_package" +ext_rettype(#10645, #10050) +#10646 = @"C_builtin_function_or_method$_imp.init_builtin" +#10647 = @"C_type$module" +ext_rettype(#10646, #10647) +ext_rettype(#10646, #10005) +#10648 = @"C_builtin_function_or_method$_imp.init_frozen" +ext_rettype(#10648, #10647) +ext_rettype(#10648, #10005) +#10649 = @"C_builtin_function_or_method$_imp.is_builtin" +ext_rettype(#10649, #10024) +#10650 = @"C_builtin_function_or_method$_imp.is_frozen" +ext_rettype(#10650, #10050) +#10651 = @"C_builtin_function_or_method$_imp.load_dynamic" +ext_rettype(#10651, #10647) +#10652 = @"C_builtin_function_or_method$_imp._fix_co_filename" +ext_rettype(#10652, #10005) +#10653 = @"C_builtin_function_or_method$builtins.all" +ext_rettype(#10653, #10050) +#10654 = @"C_builtin_function_or_method$builtins.any" +ext_rettype(#10654, #10050) +#10655 = @"C_builtin_function_or_method$builtins.callable" +ext_rettype(#10655, #10050) +#10656 = @"C_builtin_function_or_method$builtins.compile" +ext_rettype(#10656, #10028) +ext_rettype(#10656, #10005) +#10657 = @"C_builtin_function_or_method$builtins.delattr" +ext_rettype(#10657, #10005) +#10658 = @"C_builtin_function_or_method$builtins.exec" +ext_rettype(#10658, #10005) +#10659 = @"C_builtin_function_or_method$builtins.globals" +ext_rettype(#10659, #10111) +#10660 = @"C_builtin_function_or_method$builtins.hasattr" +ext_rettype(#10660, #10050) +#10661 = @"C_builtin_function_or_method$builtins.hash" +ext_rettype(#10661, #10024) +#10662 = @"C_builtin_function_or_method$builtins.id" +ext_rettype(#10662, #10024) +#10663 = @"C_builtin_function_or_method$builtins.isinstance" +ext_rettype(#10663, #10050) +#10664 = @"C_builtin_function_or_method$builtins.issubclass" +ext_rettype(#10664, #10050) +#10665 = @"C_builtin_function_or_method$builtins.iter" +#10666 = @"C_type$iterator" +ext_rettype(#10665, #10666) +#10667 = @"C_type$callable_iterator" +ext_rettype(#10665, #10667) +#10668 = @"C_builtin_function_or_method$builtins.len" +ext_rettype(#10668, #10024) +#10669 = @"C_builtin_function_or_method$builtins.locals" +ext_rettype(#10669, #10111) +#10670 = @"C_builtin_function_or_method$builtins.ord" +ext_rettype(#10670, #10024) +#10671 = @"C_builtin_function_or_method$builtins.print" +ext_rettype(#10671, #10005) +#10672 = @"C_builtin_function_or_method$builtins.setattr" +ext_rettype(#10672, #10005) +#10673 = @"C_builtin_function_or_method$builtins.sorted" +ext_rettype(#10673, #10020) +#10674 = @"C_builtin_function_or_method$builtins.sum" +ext_rettype(#10674, #10024) +ext_rettype(#10674, #10001) +#10675 = @"C_builtin_function_or_method$builtins.vars" +ext_rettype(#10675, #10111) +#10676 = @"C_builtin_function_or_method$_string.formatter_field_name_split" +ext_rettype(#10676, #10037) +#10677 = @"C_builtin_function_or_method$_string.formatter_parser" +#10678 = @"C_type$formatteriterator" +ext_rettype(#10677, #10678) +#10679 = @"C_type$_multiprocessing.SemLock$acquire" +ext_rettype(#10679, #10050) +#10680 = @"C_type$_multiprocessing.SemLock$release" +ext_rettype(#10680, #10005) +#10681 = @"C_type$_multiprocessing.SemLock$__enter__" +ext_rettype(#10681, #10050) +#10682 = @"C_type$_multiprocessing.SemLock$__exit__" +ext_rettype(#10682, #10005) +#10683 = @"C_type$_multiprocessing.SemLock$_count" +ext_rettype(#10683, #10024) +#10684 = @"C_type$_multiprocessing.SemLock$_is_mine" +ext_rettype(#10684, #10050) +#10685 = @"C_type$_multiprocessing.SemLock$_get_value" +ext_rettype(#10685, #10024) +#10686 = @"C_type$_multiprocessing.SemLock$_is_zero" +ext_rettype(#10686, #10050) +#10687 = @"C_type$_multiprocessing.SemLock$_after_fork" +ext_rettype(#10687, #10005) +#10688 = @"C_type$_random.Random$random" +ext_rettype(#10688, #10001) +#10689 = @"C_type$_random.Random$seed" +ext_rettype(#10689, #10005) +#10690 = @"C_type$_random.Random$getstate" +ext_rettype(#10690, #10037) +#10691 = @"C_type$_random.Random$setstate" +ext_rettype(#10691, #10005) +#10692 = @"C_type$_random.Random$getrandbits" +ext_rettype(#10692, #10024) +#10693 = @"C_type$_csv.writer$writerows" +ext_rettype(#10693, #10005) +#10694 = @"C_type$xxsubtype.spamlist$getstate" +ext_rettype(#10694, #10024) +#10695 = @"C_type$xxsubtype.spamlist$setstate" +ext_rettype(#10695, #10005) +#10696 = @"C_type$xxsubtype.spamlist$classmeth" +ext_rettype(#10696, #10037) +#10697 = @"C_type$xxsubtype.spamlist$staticmeth" +ext_rettype(#10697, #10037) +#10698 = @"C_type$xxsubtype.spamdict$getstate" +ext_rettype(#10698, #10024) +#10699 = @"C_type$xxsubtype.spamdict$setstate" +ext_rettype(#10699, #10005) +#10700 = @"C_type$_collections._deque_iterator$__length_hint__" +ext_rettype(#10700, #10024) +#10701 = @"C_type$_collections._deque_iterator$__reduce__" +ext_rettype(#10701, #10037) +#10702 = @"C_type$_collections._deque_reverse_iterator$__length_hint__" +ext_rettype(#10702, #10024) +#10703 = @"C_type$_collections._deque_reverse_iterator$__reduce__" +ext_rettype(#10703, #10037) +#10704 = @"C_type$collections.deque$append" +ext_rettype(#10704, #10005) +#10705 = @"C_type$collections.deque$appendleft" +ext_rettype(#10705, #10005) +#10706 = @"C_type$collections.deque$clear" +ext_rettype(#10706, #10005) +#10707 = @"C_type$collections.deque$count" +ext_rettype(#10707, #10024) +#10708 = @"C_type$collections.deque$extend" +ext_rettype(#10708, #10005) +#10709 = @"C_type$collections.deque$extendleft" +ext_rettype(#10709, #10005) +#10710 = @"C_type$collections.deque$__reduce__" +ext_rettype(#10710, #10037) +#10711 = @"C_type$collections.deque$remove" +ext_rettype(#10711, #10005) +#10712 = @"C_type$collections.deque$__reversed__" +#10713 = @"C_type$_collections._deque_reverse_iterator" +ext_rettype(#10712, #10713) +#10714 = @"C_type$collections.deque$reverse" +ext_rettype(#10714, #10005) +#10715 = @"C_type$collections.deque$rotate" +ext_rettype(#10715, #10005) +#10716 = @"C_type$collections.deque$__sizeof__" +ext_rettype(#10716, #10024) +#10717 = @"C_type$collections.defaultdict$__reduce__" +ext_rettype(#10717, #10037) +#10718 = @"C_type$parser.st$compile" +ext_rettype(#10718, #10028) +#10719 = @"C_type$parser.st$tolist" +ext_rettype(#10719, #10005) +#10720 = @"C_type$parser.st$totuple" +ext_rettype(#10720, #10005) +#10721 = @"C_type$parser.st$__sizeof__" +ext_rettype(#10721, #10024) +#10722 = @"C_type$decimal.Context$abs" +#10723 = @"C_type$decimal.Decimal" +ext_rettype(#10722, #10723) +#10724 = @"C_type$decimal.Context$exp" +ext_rettype(#10724, #10723) +#10725 = @"C_type$decimal.Context$ln" +ext_rettype(#10725, #10723) +#10726 = @"C_type$decimal.Context$log10" +ext_rettype(#10726, #10723) +#10727 = @"C_type$decimal.Context$minus" +ext_rettype(#10727, #10723) +#10728 = @"C_type$decimal.Context$next_minus" +ext_rettype(#10728, #10723) +#10729 = @"C_type$decimal.Context$next_plus" +ext_rettype(#10729, #10723) +#10730 = @"C_type$decimal.Context$normalize" +ext_rettype(#10730, #10723) +#10731 = @"C_type$decimal.Context$plus" +ext_rettype(#10731, #10723) +#10732 = @"C_type$decimal.Context$to_integral" +ext_rettype(#10732, #10723) +#10733 = @"C_type$decimal.Context$to_integral_exact" +ext_rettype(#10733, #10723) +#10734 = @"C_type$decimal.Context$to_integral_value" +ext_rettype(#10734, #10723) +#10735 = @"C_type$decimal.Context$sqrt" +ext_rettype(#10735, #10723) +#10736 = @"C_type$decimal.Context$add" +ext_rettype(#10736, #10723) +#10737 = @"C_type$decimal.Context$compare" +ext_rettype(#10737, #10723) +#10738 = @"C_type$decimal.Context$compare_signal" +ext_rettype(#10738, #10723) +#10739 = @"C_type$decimal.Context$divide" +ext_rettype(#10739, #10723) +#10740 = @"C_type$decimal.Context$divide_int" +ext_rettype(#10740, #10723) +#10741 = @"C_type$decimal.Context$divmod" +ext_rettype(#10741, #10037) +#10742 = @"C_type$decimal.Context$max" +ext_rettype(#10742, #10723) +#10743 = @"C_type$decimal.Context$max_mag" +ext_rettype(#10743, #10723) +#10744 = @"C_type$decimal.Context$min" +ext_rettype(#10744, #10723) +#10745 = @"C_type$decimal.Context$min_mag" +ext_rettype(#10745, #10723) +#10746 = @"C_type$decimal.Context$multiply" +ext_rettype(#10746, #10723) +#10747 = @"C_type$decimal.Context$next_toward" +ext_rettype(#10747, #10723) +#10748 = @"C_type$decimal.Context$quantize" +ext_rettype(#10748, #10723) +#10749 = @"C_type$decimal.Context$remainder" +ext_rettype(#10749, #10723) +#10750 = @"C_type$decimal.Context$remainder_near" +ext_rettype(#10750, #10723) +#10751 = @"C_type$decimal.Context$subtract" +ext_rettype(#10751, #10723) +#10752 = @"C_type$decimal.Context$power" +ext_rettype(#10752, #10723) +#10753 = @"C_type$decimal.Context$fma" +ext_rettype(#10753, #10723) +#10754 = @"C_type$decimal.Context$Etiny" +ext_rettype(#10754, #10024) +#10755 = @"C_type$decimal.Context$Etop" +ext_rettype(#10755, #10024) +#10756 = @"C_type$decimal.Context$radix" +ext_rettype(#10756, #10723) +#10757 = @"C_type$decimal.Context$_apply" +ext_rettype(#10757, #10723) +#10758 = @"C_type$decimal.Context$copy_abs" +ext_rettype(#10758, #10723) +#10759 = @"C_type$decimal.Context$copy_negate" +ext_rettype(#10759, #10723) +#10760 = @"C_type$decimal.Context$logb" +ext_rettype(#10760, #10723) +#10761 = @"C_type$decimal.Context$logical_invert" +ext_rettype(#10761, #10723) +#10762 = @"C_type$decimal.Context$compare_total" +ext_rettype(#10762, #10723) +#10763 = @"C_type$decimal.Context$compare_total_mag" +ext_rettype(#10763, #10723) +#10764 = @"C_type$decimal.Context$copy_sign" +ext_rettype(#10764, #10723) +#10765 = @"C_type$decimal.Context$logical_and" +ext_rettype(#10765, #10723) +#10766 = @"C_type$decimal.Context$logical_or" +ext_rettype(#10766, #10723) +#10767 = @"C_type$decimal.Context$logical_xor" +ext_rettype(#10767, #10723) +#10768 = @"C_type$decimal.Context$rotate" +ext_rettype(#10768, #10723) +#10769 = @"C_type$decimal.Context$scaleb" +ext_rettype(#10769, #10723) +#10770 = @"C_type$decimal.Context$shift" +ext_rettype(#10770, #10723) +#10771 = @"C_type$decimal.Context$clear_flags" +ext_rettype(#10771, #10005) +#10772 = @"C_type$decimal.Context$clear_traps" +ext_rettype(#10772, #10005) +#10773 = @"C_type$decimal.Context$__copy__" +ext_rettype(#10773, #10039) +#10774 = @"C_type$decimal.Context$__reduce__" +ext_rettype(#10774, #10037) +#10775 = @"C_type$decimal.Context$copy" +ext_rettype(#10775, #10039) +#10776 = @"C_type$decimal.Context$create_decimal" +ext_rettype(#10776, #10723) +#10777 = @"C_type$decimal.Context$create_decimal_from_float" +ext_rettype(#10777, #10723) +#10778 = @"C_type$decimal.Decimal$exp" +ext_rettype(#10778, #10723) +#10779 = @"C_type$decimal.Decimal$ln" +ext_rettype(#10779, #10723) +#10780 = @"C_type$decimal.Decimal$log10" +ext_rettype(#10780, #10723) +#10781 = @"C_type$decimal.Decimal$next_minus" +ext_rettype(#10781, #10723) +#10782 = @"C_type$decimal.Decimal$next_plus" +ext_rettype(#10782, #10723) +#10783 = @"C_type$decimal.Decimal$normalize" +ext_rettype(#10783, #10723) +#10784 = @"C_type$decimal.Decimal$to_integral" +ext_rettype(#10784, #10723) +#10785 = @"C_type$decimal.Decimal$to_integral_exact" +ext_rettype(#10785, #10723) +#10786 = @"C_type$decimal.Decimal$to_integral_value" +ext_rettype(#10786, #10723) +#10787 = @"C_type$decimal.Decimal$sqrt" +ext_rettype(#10787, #10723) +#10788 = @"C_type$decimal.Decimal$compare" +ext_rettype(#10788, #10723) +#10789 = @"C_type$decimal.Decimal$compare_signal" +ext_rettype(#10789, #10723) +#10790 = @"C_type$decimal.Decimal$max" +ext_rettype(#10790, #10723) +#10791 = @"C_type$decimal.Decimal$max_mag" +ext_rettype(#10791, #10723) +#10792 = @"C_type$decimal.Decimal$min" +ext_rettype(#10792, #10723) +#10793 = @"C_type$decimal.Decimal$min_mag" +ext_rettype(#10793, #10723) +#10794 = @"C_type$decimal.Decimal$next_toward" +ext_rettype(#10794, #10723) +#10795 = @"C_type$decimal.Decimal$quantize" +ext_rettype(#10795, #10723) +#10796 = @"C_type$decimal.Decimal$remainder_near" +ext_rettype(#10796, #10723) +#10797 = @"C_type$decimal.Decimal$fma" +ext_rettype(#10797, #10723) +#10798 = @"C_type$decimal.Decimal$adjusted" +ext_rettype(#10798, #10024) +#10799 = @"C_type$decimal.Decimal$radix" +ext_rettype(#10799, #10723) +#10800 = @"C_type$decimal.Decimal$copy_abs" +ext_rettype(#10800, #10723) +#10801 = @"C_type$decimal.Decimal$copy_negate" +ext_rettype(#10801, #10723) +#10802 = @"C_type$decimal.Decimal$logb" +ext_rettype(#10802, #10723) +#10803 = @"C_type$decimal.Decimal$logical_invert" +ext_rettype(#10803, #10723) +#10804 = @"C_type$decimal.Decimal$compare_total" +ext_rettype(#10804, #10723) +#10805 = @"C_type$decimal.Decimal$compare_total_mag" +ext_rettype(#10805, #10723) +#10806 = @"C_type$decimal.Decimal$copy_sign" +ext_rettype(#10806, #10723) +#10807 = @"C_type$decimal.Decimal$logical_and" +ext_rettype(#10807, #10723) +#10808 = @"C_type$decimal.Decimal$logical_or" +ext_rettype(#10808, #10723) +#10809 = @"C_type$decimal.Decimal$logical_xor" +ext_rettype(#10809, #10723) +#10810 = @"C_type$decimal.Decimal$rotate" +ext_rettype(#10810, #10723) +#10811 = @"C_type$decimal.Decimal$scaleb" +ext_rettype(#10811, #10723) +#10812 = @"C_type$decimal.Decimal$shift" +ext_rettype(#10812, #10723) +#10813 = @"C_type$decimal.Decimal$from_float" +ext_rettype(#10813, #10723) +#10814 = @"C_type$decimal.Decimal$__reduce__" +ext_rettype(#10814, #10037) +#10815 = @"C_type$decimal.Decimal$__round__" +ext_rettype(#10815, #10024) +ext_rettype(#10815, #10723) +#10816 = @"C_type$decimal.Decimal$__ceil__" +ext_rettype(#10816, #10024) +#10817 = @"C_type$decimal.Decimal$__floor__" +ext_rettype(#10817, #10024) +#10818 = @"C_type$decimal.Decimal$__trunc__" +ext_rettype(#10818, #10024) +#10819 = @"C_type$decimal.Decimal$__complex__" +ext_rettype(#10819, #10226) +#10820 = @"C_type$decimal.Decimal$__sizeof__" +ext_rettype(#10820, #10024) +#10821 = @"C_type$decimal.ContextManager$__exit__" +ext_rettype(#10821, #10005) +#10822 = @"C_type$decimal.SignalDictMixin$copy" +ext_rettype(#10822, #10111) +#10823 = @"C_type$zipimport.zipimporter$find_module" +ext_rettype(#10823, #10005) +#10824 = @"C_type$zipimport.zipimporter$find_loader" +ext_rettype(#10824, #10037) +#10825 = @"C_type$zipimport.zipimporter$get_data" +ext_rettype(#10825, #10081) +#10826 = @"C_type$zipimport.zipimporter$get_code" +ext_rettype(#10826, #10024) +ext_rettype(#10826, #10020) +ext_rettype(#10826, #10111) +ext_rettype(#10826, #10001) +ext_rettype(#10826, #10226) +ext_rettype(#10826, #10037) +ext_rettype(#10826, #10028) +ext_rettype(#10826, #10081) +ext_rettype(#10826, #10005) +ext_rettype(#10826, #10050) +#10827 = @"C_type$zipimport.zipimporter$get_source" +ext_rettype(#10827, #10010) +ext_rettype(#10827, #10005) +#10828 = @"C_type$zipimport.zipimporter$is_package" +ext_rettype(#10828, #10050) +#10829 = @"C_type$arrayiterator$33__reduce__" +ext_rettype(#10829, #10037) +#10830 = @"C_type$arrayiterator$3__setstate__" +ext_rettype(#10830, #10005) +#10831 = @"C_type$array.array$append" +ext_rettype(#10831, #10005) +#10832 = @"C_type$array.array$buffer_info" +ext_rettype(#10832, #10037) +#10833 = @"C_type$array.array$byteswap" +ext_rettype(#10833, #10005) +#10834 = @"C_type$array.array$count" +ext_rettype(#10834, #10024) +#10835 = @"C_type$array.array$extend" +ext_rettype(#10835, #10005) +#10836 = @"C_type$array.array$fromfile" +ext_rettype(#10836, #10005) +#10837 = @"C_type$array.array$fromlist" +ext_rettype(#10837, #10005) +#10838 = @"C_type$array.array$fromstring" +ext_rettype(#10838, #10005) +#10839 = @"C_type$array.array$frombytes" +ext_rettype(#10839, #10005) +#10840 = @"C_type$array.array$fromunicode" +ext_rettype(#10840, #10005) +#10841 = @"C_type$array.array$index" +ext_rettype(#10841, #10024) +#10842 = @"C_type$array.array$insert" +ext_rettype(#10842, #10005) +#10843 = @"C_type$array.array$__reduce_ex__" +ext_rettype(#10843, #10037) +#10844 = @"C_type$array.array$remove" +ext_rettype(#10844, #10005) +#10845 = @"C_type$array.array$reverse" +ext_rettype(#10845, #10005) +#10846 = @"C_type$array.array$tofile" +ext_rettype(#10846, #10005) +#10847 = @"C_type$array.array$tolist" +ext_rettype(#10847, #10020) +#10848 = @"C_type$array.array$tostring" +ext_rettype(#10848, #10081) +#10849 = @"C_type$array.array$tobytes" +ext_rettype(#10849, #10081) +#10850 = @"C_type$array.array$tounicode" +ext_rettype(#10850, #10010) +#10851 = @"C_type$array.array$__sizeof__" +ext_rettype(#10851, #10024) +#10852 = @"C_type$MultibyteCodec$3encode" +ext_rettype(#10852, #10037) +#10853 = @"C_type$MultibyteCodec$3decode" +ext_rettype(#10853, #10037) +#10854 = @"C_type$MultibyteIncrementalEncoder$3encode" +ext_rettype(#10854, #10081) +#10855 = @"C_type$MultibyteIncrementalEncoder$3reset" +ext_rettype(#10855, #10005) +#10856 = @"C_type$MultibyteIncrementalDecoder$3reset" +ext_rettype(#10856, #10005) +#10857 = @"C_type$MultibyteStreamReader$3readlines" +ext_rettype(#10857, #10020) +#10858 = @"C_type$MultibyteStreamReader$3reset" +ext_rettype(#10858, #10005) +#10859 = @"C_type$MultibyteStreamWriter$3write" +ext_rettype(#10859, #10005) +#10860 = @"C_type$MultibyteStreamWriter$3writelines" +ext_rettype(#10860, #10005) +#10861 = @"C_type$MultibyteStreamWriter$3reset" +ext_rettype(#10861, #10005) +#10862 = @"C_type$Struct$3pack" +ext_rettype(#10862, #10081) +#10863 = @"C_type$Struct$3pack_into" +ext_rettype(#10863, #10005) +#10864 = @"C_type$Struct$3unpack" +ext_rettype(#10864, #10037) +#10865 = @"C_type$Struct$3unpack_from" +ext_rettype(#10865, #10037) +#10866 = @"C_type$Struct$3__sizeof__" +ext_rettype(#10866, #10024) +#10867 = @"C_type$_ssl._SSLContext$_wrap_socket" +#10868 = @"C_type$_ssl._SSLSocket" +ext_rettype(#10867, #10868) +#10869 = @"C_type$_ssl._SSLContext$set_ciphers" +ext_rettype(#10869, #10005) +#10870 = @"C_type$_ssl._SSLContext$_set_npn_protocols" +ext_rettype(#10870, #10005) +#10871 = @"C_type$_ssl._SSLContext$load_cert_chain" +ext_rettype(#10871, #10005) +#10872 = @"C_type$_ssl._SSLContext$load_dh_params" +ext_rettype(#10872, #10005) +#10873 = @"C_type$_ssl._SSLContext$load_verify_locations" +ext_rettype(#10873, #10005) +#10874 = @"C_type$_ssl._SSLContext$session_stats" +ext_rettype(#10874, #10111) +#10875 = @"C_type$_ssl._SSLContext$set_default_verify_paths" +ext_rettype(#10875, #10005) +#10876 = @"C_type$_ssl._SSLContext$set_ecdh_curve" +ext_rettype(#10876, #10005) +#10877 = @"C_type$_ssl._SSLSocket$do_handshake" +ext_rettype(#10877, #10005) +#10878 = @"C_type$_ssl._SSLSocket$write" +ext_rettype(#10878, #10024) +#10879 = @"C_type$_ssl._SSLSocket$read" +ext_rettype(#10879, #10024) +#10880 = @"C_type$_ssl._SSLSocket$pending" +ext_rettype(#10880, #10024) +#10881 = @"C_type$_ssl._SSLSocket$peer_certificate" +ext_rettype(#10881, #10111) +ext_rettype(#10881, #10081) +ext_rettype(#10881, #10005) +#10882 = @"C_type$_ssl._SSLSocket$cipher" +ext_rettype(#10882, #10037) +ext_rettype(#10882, #10005) +#10883 = @"C_type$_ssl._SSLSocket$selected_npn_protocol" +ext_rettype(#10883, #10010) +ext_rettype(#10883, #10005) +#10884 = @"C_type$_ssl._SSLSocket$compression" +ext_rettype(#10884, #10010) +ext_rettype(#10884, #10005) +#10885 = @"C_type$_ssl._SSLSocket$shutdown" +#10886 = @"C_type$_socket.socket" +ext_rettype(#10885, #10886) +#10887 = @"C_type$_ssl._SSLSocket$tls_unique_cb" +ext_rettype(#10887, #10081) +ext_rettype(#10887, #10005) +#10888 = @"C_type$_thread.lock$acquire_lock" +ext_rettype(#10888, #10050) +#10889 = @"C_type$_thread.lock$acquire" +ext_rettype(#10889, #10050) +#10890 = @"C_type$_thread.lock$release_lock" +ext_rettype(#10890, #10005) +#10891 = @"C_type$_thread.lock$release" +ext_rettype(#10891, #10005) +#10892 = @"C_type$_thread.lock$locked_lock" +ext_rettype(#10892, #10050) +#10893 = @"C_type$_thread.lock$locked" +ext_rettype(#10893, #10050) +#10894 = @"C_type$_thread.lock$__enter__" +ext_rettype(#10894, #10050) +#10895 = @"C_type$_thread.lock$__exit__" +ext_rettype(#10895, #10005) +#10896 = @"C_type$_thread.RLock$acquire" +ext_rettype(#10896, #10050) +#10897 = @"C_type$_thread.RLock$release" +ext_rettype(#10897, #10005) +#10898 = @"C_type$_thread.RLock$_is_owned" +ext_rettype(#10898, #10050) +#10899 = @"C_type$_thread.RLock$_acquire_restore" +ext_rettype(#10899, #10005) +#10900 = @"C_type$_thread.RLock$_release_save" +ext_rettype(#10900, #10037) +#10901 = @"C_type$_thread.RLock$__enter__" +ext_rettype(#10901, #10050) +#10902 = @"C_type$_thread.RLock$__exit__" +ext_rettype(#10902, #10005) +#10903 = @"C_type$_hashlib.HASH$update" +ext_rettype(#10903, #10005) +#10904 = @"C_type$_hashlib.HASH$digest" +ext_rettype(#10904, #10081) +#10905 = @"C_type$_hashlib.HASH$hexdigest" +ext_rettype(#10905, #10010) +#10906 = @"C_type$_hashlib.HASH$copy" +ext_rettype(#10906, #10169) +#10907 = @"C_type$_sha256.sha256$copy" +ext_rettype(#10907, #10189) +ext_rettype(#10907, #10191) +#10908 = @"C_type$_sha256.sha256$digest" +ext_rettype(#10908, #10081) +#10909 = @"C_type$_sha256.sha256$update" +ext_rettype(#10909, #10005) +#10910 = @"C_type$_sha256.sha224$copy" +ext_rettype(#10910, #10189) +ext_rettype(#10910, #10191) +#10911 = @"C_type$_sha256.sha224$digest" +ext_rettype(#10911, #10081) +#10912 = @"C_type$_sha256.sha224$update" +ext_rettype(#10912, #10005) +#10913 = @"C_type$functools.partial$__reduce__" +ext_rettype(#10913, #10037) +#10914 = @"C_type$functools.partial$__setstate__" +ext_rettype(#10914, #10005) +#10915 = @"C_type$_pickle.Pickler$dump" +ext_rettype(#10915, #10005) +#10916 = @"C_type$_pickle.Pickler$clear_memo" +ext_rettype(#10916, #10005) +#10917 = @"C_type$_pickle.PicklerMemoProxy$clear" +ext_rettype(#10917, #10005) +#10918 = @"C_type$_pickle.PicklerMemoProxy$copy" +ext_rettype(#10918, #10111) +#10919 = @"C_type$_pickle.PicklerMemoProxy$__reduce__" +ext_rettype(#10919, #10037) +#10920 = @"C_type$_pickle.UnpicklerMemoProxy$clear" +ext_rettype(#10920, #10005) +#10921 = @"C_type$_pickle.UnpicklerMemoProxy$copy" +ext_rettype(#10921, #10111) +#10922 = @"C_type$_pickle.UnpicklerMemoProxy$__reduce__" +ext_rettype(#10922, #10037) +#10923 = @"C_type$_md5.md5$copy" +ext_rettype(#10923, #10223) +#10924 = @"C_type$_md5.md5$digest" +ext_rettype(#10924, #10081) +#10925 = @"C_type$_md5.md5$update" +ext_rettype(#10925, #10005) +#10926 = @"C_type$_sha1.sha1$copy" +ext_rettype(#10926, #10249) +#10927 = @"C_type$_sha1.sha1$digest" +ext_rettype(#10927, #10081) +#10928 = @"C_type$_sha1.sha1$update" +ext_rettype(#10928, #10005) +#10929 = @"C_type$_sre.SRE_Match$group" +ext_rettype(#10929, #10037) +#10930 = @"C_type$_sre.SRE_Match$start" +ext_rettype(#10930, #10024) +#10931 = @"C_type$_sre.SRE_Match$end" +ext_rettype(#10931, #10024) +#10932 = @"C_type$_sre.SRE_Match$span" +ext_rettype(#10932, #10037) +#10933 = @"C_type$_sre.SRE_Match$groups" +ext_rettype(#10933, #10037) +#10934 = @"C_type$_sre.SRE_Match$groupdict" +ext_rettype(#10934, #10111) +#10935 = @"C_type$_sre.SRE_Scanner$match" +ext_rettype(#10935, #10005) +#10936 = @"C_type$_sre.SRE_Scanner$search" +ext_rettype(#10936, #10005) +#10937 = @"C_type$_sre.SRE_Pattern$match" +ext_rettype(#10937, #10005) +#10938 = @"C_type$_sre.SRE_Pattern$search" +ext_rettype(#10938, #10005) +#10939 = @"C_type$_sre.SRE_Pattern$sub" +ext_rettype(#10939, #10037) +#10940 = @"C_type$_sre.SRE_Pattern$subn" +ext_rettype(#10940, #10037) +#10941 = @"C_type$_sre.SRE_Pattern$split" +ext_rettype(#10941, #10020) +#10942 = @"C_type$_sre.SRE_Pattern$findall" +ext_rettype(#10942, #10020) +#10943 = @"C_type$_sre.SRE_Pattern$finditer" +ext_rettype(#10943, #10667) +#10944 = @"C_type$datetime.timedelta$__reduce__" +ext_rettype(#10944, #10037) +#10945 = @"C_type$datetime.tzinfo$__reduce__" +ext_rettype(#10945, #10037) +#10946 = @"C_type$datetime.datetime$timestamp" +ext_rettype(#10946, #10001) +#10947 = @"C_type$datetime.datetime$utcoffset" +ext_rettype(#10947, #10005) +#10948 = @"C_type$datetime.datetime$tzname" +ext_rettype(#10948, #10005) +#10949 = @"C_type$datetime.datetime$dst" +ext_rettype(#10949, #10005) +#10950 = @"C_type$datetime.datetime$__reduce__" +ext_rettype(#10950, #10037) +#10951 = @"C_type$datetime.time$utcoffset" +ext_rettype(#10951, #10005) +#10952 = @"C_type$datetime.time$tzname" +ext_rettype(#10952, #10005) +#10953 = @"C_type$datetime.time$dst" +ext_rettype(#10953, #10005) +#10954 = @"C_type$datetime.time$__reduce__" +ext_rettype(#10954, #10037) +#10955 = @"C_type$datetime.timezone$dst" +ext_rettype(#10955, #10005) +#10956 = @"C_type$datetime.timezone$__getinitargs__" +ext_rettype(#10956, #10037) +#10957 = @"C_type$datetime.date$isocalendar" +ext_rettype(#10957, #10037) +#10958 = @"C_type$datetime.date$isoweekday" +ext_rettype(#10958, #10024) +#10959 = @"C_type$datetime.date$toordinal" +ext_rettype(#10959, #10024) +#10960 = @"C_type$datetime.date$weekday" +ext_rettype(#10960, #10024) +#10961 = @"C_type$datetime.date$__reduce__" +ext_rettype(#10961, #10037) +#10962 = @"C_type$ndarray$3tolist" +ext_rettype(#10962, #10020) +#10963 = @"C_type$ndarray$3tobytes" +ext_rettype(#10963, #10081) +#10964 = @"C_type$ndarray$3push" +ext_rettype(#10964, #10005) +#10965 = @"C_type$ndarray$3pop" +ext_rettype(#10965, #10005) +#10966 = @"C_type$ndarray$3add_suboffsets" +ext_rettype(#10966, #10005) +#10967 = @"C_type$ndarray$3memoryview_from_buffer" +ext_rettype(#10967, #10407) +#10968 = @"C_type$mmap.mmap$close" +ext_rettype(#10968, #10005) +#10969 = @"C_type$mmap.mmap$find" +ext_rettype(#10969, #10024) +#10970 = @"C_type$mmap.mmap$rfind" +ext_rettype(#10970, #10024) +#10971 = @"C_type$mmap.mmap$flush" +ext_rettype(#10971, #10024) +#10972 = @"C_type$mmap.mmap$move" +ext_rettype(#10972, #10005) +#10973 = @"C_type$mmap.mmap$read" +ext_rettype(#10973, #10081) +#10974 = @"C_type$mmap.mmap$read_byte" +ext_rettype(#10974, #10024) +#10975 = @"C_type$mmap.mmap$readline" +ext_rettype(#10975, #10081) +#10976 = @"C_type$mmap.mmap$resize" +ext_rettype(#10976, #10005) +#10977 = @"C_type$mmap.mmap$seek" +ext_rettype(#10977, #10005) +#10978 = @"C_type$mmap.mmap$size" +ext_rettype(#10978, #10024) +#10979 = @"C_type$mmap.mmap$tell" +ext_rettype(#10979, #10024) +#10980 = @"C_type$mmap.mmap$write" +ext_rettype(#10980, #10005) +#10981 = @"C_type$mmap.mmap$write_byte" +ext_rettype(#10981, #10005) +#10982 = @"C_type$select.poll$register" +ext_rettype(#10982, #10005) +#10983 = @"C_type$select.poll$modify" +ext_rettype(#10983, #10005) +#10984 = @"C_type$select.poll$unregister" +ext_rettype(#10984, #10005) +#10985 = @"C_type$select.poll$poll" +ext_rettype(#10985, #10020) +#10986 = @"C_type$select.epoll$close" +ext_rettype(#10986, #10005) +#10987 = @"C_type$select.epoll$fileno" +ext_rettype(#10987, #10024) +#10988 = @"C_type$select.epoll$modify" +ext_rettype(#10988, #10005) +#10989 = @"C_type$select.epoll$register" +ext_rettype(#10989, #10005) +#10990 = @"C_type$select.epoll$unregister" +ext_rettype(#10990, #10005) +#10991 = @"C_type$select.epoll$poll" +ext_rettype(#10991, #10020) +#10992 = @"C_type$_io.IncrementalNewlineDecoder$getstate" +ext_rettype(#10992, #10037) +#10993 = @"C_type$_io.IncrementalNewlineDecoder$setstate" +ext_rettype(#10993, #10005) +#10994 = @"C_type$_io.IncrementalNewlineDecoder$reset" +ext_rettype(#10994, #10005) +#10995 = @"C_type$_io.TextIOWrapper$write" +ext_rettype(#10995, #10024) +#10996 = @"C_type$_io.TextIOWrapper$close" +ext_rettype(#10996, #10005) +#10997 = @"C_type$_io.TextIOWrapper$tell" +ext_rettype(#10997, #10024) +#10998 = @"C_type$_io.BytesIO$readable" +ext_rettype(#10998, #10050) +#10999 = @"C_type$_io.BytesIO$seekable" +ext_rettype(#10999, #10050) +#11000 = @"C_type$_io.BytesIO$writable" +ext_rettype(#11000, #10050) +#11001 = @"C_type$_io.BytesIO$close" +ext_rettype(#11001, #10005) +#11002 = @"C_type$_io.BytesIO$flush" +ext_rettype(#11002, #10005) +#11003 = @"C_type$_io.BytesIO$isatty" +ext_rettype(#11003, #10050) +#11004 = @"C_type$_io.BytesIO$tell" +ext_rettype(#11004, #10024) +#11005 = @"C_type$_io.BytesIO$write" +ext_rettype(#11005, #10024) +#11006 = @"C_type$_io.BytesIO$writelines" +ext_rettype(#11006, #10005) +#11007 = @"C_type$_io.BytesIO$read1" +ext_rettype(#11007, #10081) +#11008 = @"C_type$_io.BytesIO$readinto" +ext_rettype(#11008, #10024) +#11009 = @"C_type$_io.BytesIO$readline" +ext_rettype(#11009, #10081) +#11010 = @"C_type$_io.BytesIO$readlines" +ext_rettype(#11010, #10020) +#11011 = @"C_type$_io.BytesIO$read" +ext_rettype(#11011, #10081) +#11012 = @"C_type$_io.BytesIO$getbuffer" +ext_rettype(#11012, #10407) +#11013 = @"C_type$_io.BytesIO$getvalue" +ext_rettype(#11013, #10081) +#11014 = @"C_type$_io.BytesIO$seek" +ext_rettype(#11014, #10024) +#11015 = @"C_type$_io.BytesIO$truncate" +ext_rettype(#11015, #10024) +#11016 = @"C_type$_io.BytesIO$__getstate__" +ext_rettype(#11016, #10037) +#11017 = @"C_type$_io.BytesIO$__setstate__" +ext_rettype(#11017, #10005) +#11018 = @"C_type$_io.BytesIO$__sizeof__" +ext_rettype(#11018, #10024) +#11019 = @"C_type$_io._IOBase$flush" +ext_rettype(#11019, #10005) +#11020 = @"C_type$_io._IOBase$close" +ext_rettype(#11020, #10005) +#11021 = @"C_type$_io._IOBase$seekable" +ext_rettype(#11021, #10050) +#11022 = @"C_type$_io._IOBase$readable" +ext_rettype(#11022, #10050) +#11023 = @"C_type$_io._IOBase$writable" +ext_rettype(#11023, #10050) +#11024 = @"C_type$_io._IOBase$_checkClosed" +ext_rettype(#11024, #10005) +#11025 = @"C_type$_io._IOBase$isatty" +ext_rettype(#11025, #10050) +#11026 = @"C_type$_io._IOBase$readline" +ext_rettype(#11026, #10081) +#11027 = @"C_type$_io._IOBase$readlines" +ext_rettype(#11027, #10020) +#11028 = @"C_type$_io._IOBase$writelines" +ext_rettype(#11028, #10005) +#11029 = @"C_type$_io._RawIOBase$read" +ext_rettype(#11029, #10081) +#11030 = @"C_type$_io._RawIOBase$readall" +ext_rettype(#11030, #10081) +#11031 = @"C_type$_io._BufferedIOBase$readinto" +ext_rettype(#11031, #10024) +#11032 = @"C_type$_io.BufferedReader$close" +ext_rettype(#11032, #10005) +#11033 = @"C_type$_io.BufferedReader$_dealloc_warn" +ext_rettype(#11033, #10005) +#11034 = @"C_type$_io.BufferedReader$read" +ext_rettype(#11034, #10081) +ext_rettype(#11034, #10005) +#11035 = @"C_type$_io.BufferedReader$peek" +ext_rettype(#11035, #10081) +ext_rettype(#11035, #10005) +#11036 = @"C_type$_io.BufferedReader$read1" +ext_rettype(#11036, #10081) +#11037 = @"C_type$_io.BufferedReader$readinto" +ext_rettype(#11037, #10024) +ext_rettype(#11037, #10005) +#11038 = @"C_type$_io.BufferedReader$readline" +ext_rettype(#11038, #10081) +#11039 = @"C_type$_io.BufferedReader$seek" +ext_rettype(#11039, #10024) +ext_rettype(#11039, #10005) +#11040 = @"C_type$_io.BufferedReader$tell" +ext_rettype(#11040, #10024) +#11041 = @"C_type$_io.BufferedReader$truncate" +ext_rettype(#11041, #10005) +#11042 = @"C_type$_io.BufferedReader$__sizeof__" +ext_rettype(#11042, #10024) +#11043 = @"C_type$_io.BufferedRandom$close" +ext_rettype(#11043, #10005) +#11044 = @"C_type$_io.BufferedRandom$_dealloc_warn" +ext_rettype(#11044, #10005) +#11045 = @"C_type$_io.BufferedRandom$flush" +ext_rettype(#11045, #10005) +#11046 = @"C_type$_io.BufferedRandom$seek" +ext_rettype(#11046, #10024) +ext_rettype(#11046, #10005) +#11047 = @"C_type$_io.BufferedRandom$tell" +ext_rettype(#11047, #10024) +#11048 = @"C_type$_io.BufferedRandom$truncate" +ext_rettype(#11048, #10005) +#11049 = @"C_type$_io.BufferedRandom$read" +ext_rettype(#11049, #10081) +ext_rettype(#11049, #10005) +#11050 = @"C_type$_io.BufferedRandom$read1" +ext_rettype(#11050, #10081) +#11051 = @"C_type$_io.BufferedRandom$readinto" +ext_rettype(#11051, #10024) +ext_rettype(#11051, #10005) +#11052 = @"C_type$_io.BufferedRandom$readline" +ext_rettype(#11052, #10081) +#11053 = @"C_type$_io.BufferedRandom$peek" +ext_rettype(#11053, #10081) +ext_rettype(#11053, #10005) +#11054 = @"C_type$_io.BufferedRandom$write" +ext_rettype(#11054, #10024) +ext_rettype(#11054, #10005) +#11055 = @"C_type$_io.BufferedRandom$__sizeof__" +ext_rettype(#11055, #10024) +#11056 = @"C_type$_io.BufferedWriter$close" +ext_rettype(#11056, #10005) +#11057 = @"C_type$_io.BufferedWriter$_dealloc_warn" +ext_rettype(#11057, #10005) +#11058 = @"C_type$_io.BufferedWriter$write" +ext_rettype(#11058, #10024) +ext_rettype(#11058, #10005) +#11059 = @"C_type$_io.BufferedWriter$truncate" +ext_rettype(#11059, #10005) +#11060 = @"C_type$_io.BufferedWriter$flush" +ext_rettype(#11060, #10005) +#11061 = @"C_type$_io.BufferedWriter$seek" +ext_rettype(#11061, #10024) +ext_rettype(#11061, #10005) +#11062 = @"C_type$_io.BufferedWriter$tell" +ext_rettype(#11062, #10024) +#11063 = @"C_type$_io.BufferedWriter$__sizeof__" +ext_rettype(#11063, #10024) +#11064 = @"C_type$_io.StringIO$close" +ext_rettype(#11064, #10005) +#11065 = @"C_type$_io.StringIO$tell" +ext_rettype(#11065, #10024) +#11066 = @"C_type$_io.StringIO$truncate" +ext_rettype(#11066, #10024) +#11067 = @"C_type$_io.StringIO$seek" +ext_rettype(#11067, #10024) +#11068 = @"C_type$_io.StringIO$write" +ext_rettype(#11068, #10024) +#11069 = @"C_type$_io.StringIO$seekable" +ext_rettype(#11069, #10050) +#11070 = @"C_type$_io.StringIO$readable" +ext_rettype(#11070, #10050) +#11071 = @"C_type$_io.StringIO$writable" +ext_rettype(#11071, #10050) +#11072 = @"C_type$_io.StringIO$__getstate__" +ext_rettype(#11072, #10037) +#11073 = @"C_type$_io.StringIO$__setstate__" +ext_rettype(#11073, #10005) +#11074 = @"C_type$_io.FileIO$read" +ext_rettype(#11074, #10005) +#11075 = @"C_type$_io.FileIO$readall" +ext_rettype(#11075, #10005) +#11076 = @"C_type$_io.FileIO$readinto" +ext_rettype(#11076, #10024) +ext_rettype(#11076, #10005) +#11077 = @"C_type$_io.FileIO$write" +ext_rettype(#11077, #10024) +ext_rettype(#11077, #10005) +#11078 = @"C_type$_io.FileIO$seek" +ext_rettype(#11078, #10024) +#11079 = @"C_type$_io.FileIO$tell" +ext_rettype(#11079, #10024) +#11080 = @"C_type$_io.FileIO$close" +ext_rettype(#11080, #10005) +#11081 = @"C_type$_io.FileIO$seekable" +ext_rettype(#11081, #10050) +#11082 = @"C_type$_io.FileIO$readable" +ext_rettype(#11082, #10050) +#11083 = @"C_type$_io.FileIO$writable" +ext_rettype(#11083, #10050) +#11084 = @"C_type$_io.FileIO$fileno" +ext_rettype(#11084, #10024) +#11085 = @"C_type$_io.FileIO$isatty" +ext_rettype(#11085, #10050) +#11086 = @"C_type$_io.FileIO$_dealloc_warn" +ext_rettype(#11086, #10005) +#11087 = @"C_type$_sha512.sha512$copy" +ext_rettype(#11087, #10526) +ext_rettype(#11087, #10528) +#11088 = @"C_type$_sha512.sha512$digest" +ext_rettype(#11088, #10081) +#11089 = @"C_type$_sha512.sha512$update" +ext_rettype(#11089, #10005) +#11090 = @"C_type$_sha512.sha384$copy" +ext_rettype(#11090, #10526) +ext_rettype(#11090, #10528) +#11091 = @"C_type$_sha512.sha384$digest" +ext_rettype(#11091, #10081) +#11092 = @"C_type$_sha512.sha384$update" +ext_rettype(#11092, #10005) +#11093 = @"C_type$_lsprof.Profiler$enable" +ext_rettype(#11093, #10005) +#11094 = @"C_type$_lsprof.Profiler$disable" +ext_rettype(#11094, #10005) +#11095 = @"C_type$_lsprof.Profiler$clear" +ext_rettype(#11095, #10005) +#11096 = @"C_type$xml.etree.ElementTree.Element$clear" +ext_rettype(#11096, #10005) +#11097 = @"C_type$xml.etree.ElementTree.Element$set" +ext_rettype(#11097, #10005) +#11098 = @"C_type$xml.etree.ElementTree.Element$find" +ext_rettype(#11098, #10005) +#11099 = @"C_type$xml.etree.ElementTree.Element$findall" +ext_rettype(#11099, #10020) +#11100 = @"C_type$xml.etree.ElementTree.Element$append" +ext_rettype(#11100, #10005) +#11101 = @"C_type$xml.etree.ElementTree.Element$extend" +ext_rettype(#11101, #10005) +#11102 = @"C_type$xml.etree.ElementTree.Element$insert" +ext_rettype(#11102, #10005) +#11103 = @"C_type$xml.etree.ElementTree.Element$remove" +ext_rettype(#11103, #10005) +#11104 = @"C_type$xml.etree.ElementTree.Element$iter" +#11105 = @"C_type$_elementtree._element_iterator" +ext_rettype(#11104, #11105) +#11106 = @"C_type$xml.etree.ElementTree.Element$itertext" +ext_rettype(#11106, #11105) +#11107 = @"C_type$xml.etree.ElementTree.Element$getiterator" +ext_rettype(#11107, #11105) +#11108 = @"C_type$xml.etree.ElementTree.Element$getchildren" +ext_rettype(#11108, #10020) +#11109 = @"C_type$xml.etree.ElementTree.Element$items" +ext_rettype(#11109, #10020) +#11110 = @"C_type$xml.etree.ElementTree.Element$keys" +ext_rettype(#11110, #10020) +#11111 = @"C_type$xml.etree.ElementTree.Element$makeelement" +ext_rettype(#11111, #10531) +#11112 = @"C_type$xml.etree.ElementTree.Element$__copy__" +ext_rettype(#11112, #10531) +#11113 = @"C_type$xml.etree.ElementTree.Element$__deepcopy__" +ext_rettype(#11113, #10531) +#11114 = @"C_type$xml.etree.ElementTree.Element$__sizeof__" +ext_rettype(#11114, #10024) +#11115 = @"C_type$xml.etree.ElementTree.Element$__getstate__" +ext_rettype(#11115, #10111) +#11116 = @"C_type$xml.etree.ElementTree.Element$__setstate__" +ext_rettype(#11116, #10005) +#11117 = @"C_type$xml.etree.ElementTree.TreeBuilder$data" +ext_rettype(#11117, #10005) +#11118 = @"C_type$xml.etree.ElementTree.TreeBuilder$start" +ext_rettype(#11118, #10531) +#11119 = @"C_type$xml.etree.ElementTree.TreeBuilder$close" +ext_rettype(#11119, #10005) +#11120 = @"C_type$xml.etree.ElementTree.XMLParser$feed" +ext_rettype(#11120, #10005) +#11121 = @"C_type$xml.etree.ElementTree.XMLParser$close" +ext_rettype(#11121, #10005) +#11122 = @"C_type$xml.etree.ElementTree.XMLParser$_parse" +ext_rettype(#11122, #10005) +#11123 = @"C_type$xml.etree.ElementTree.XMLParser$_setevents" +ext_rettype(#11123, #10005) +#11124 = @"C_type$xml.etree.ElementTree.XMLParser$doctype" +ext_rettype(#11124, #10005) +#11125 = @"C_type$_ctypes._CData$__reduce__" +ext_rettype(#11125, #10037) +#11126 = @"C_type$_ctypes._CData$__setstate__" +ext_rettype(#11126, #10005) +#11127 = @"C_type$_ctypes.PyCPointerType$from_param" +ext_rettype(#11127, #10542) +#11128 = @"C_type$_ctypes.PyCPointerType$set_type" +ext_rettype(#11128, #10005) +#11129 = @"C_type$_ctypes.PyCSimpleType$from_param" +ext_rettype(#11129, #10542) +#11130 = @"C_type$zlib.Compress$flush" +ext_rettype(#11130, #10081) +#11131 = @"C_type$unicodedata.UCD$decimal" +ext_rettype(#11131, #10024) +#11132 = @"C_type$unicodedata.UCD$digit" +ext_rettype(#11132, #10024) +#11133 = @"C_type$unicodedata.UCD$numeric" +ext_rettype(#11133, #10001) +#11134 = @"C_type$unicodedata.UCD$combining" +ext_rettype(#11134, #10024) +#11135 = @"C_type$unicodedata.UCD$mirrored" +ext_rettype(#11135, #10024) +#11136 = @"C_type$unicodedata.UCD$decomposition" +ext_rettype(#11136, #10010) +#11137 = @"C_type$itertools._grouper$__reduce__" +ext_rettype(#11137, #10037) +#11138 = @"C_type$itertools.groupby$__reduce__" +ext_rettype(#11138, #10037) +#11139 = @"C_type$itertools.groupby$__setstate__" +ext_rettype(#11139, #10005) +#11140 = @"C_type$itertools._tee_dataobject$__reduce__" +ext_rettype(#11140, #10037) +#11141 = @"C_type$itertools._tee$__copy__" +#11142 = @"C_type$itertools._tee" +ext_rettype(#11141, #11142) +#11143 = @"C_type$itertools._tee$__reduce__" +ext_rettype(#11143, #10037) +#11144 = @"C_type$itertools._tee$__setstate__" +ext_rettype(#11144, #10005) +#11145 = @"C_type$itertools.cycle$__reduce__" +ext_rettype(#11145, #10037) +#11146 = @"C_type$itertools.cycle$__setstate__" +ext_rettype(#11146, #10005) +#11147 = @"C_type$itertools.dropwhile$__reduce__" +ext_rettype(#11147, #10037) +#11148 = @"C_type$itertools.dropwhile$__setstate__" +ext_rettype(#11148, #10005) +#11149 = @"C_type$itertools.takewhile$__reduce__" +ext_rettype(#11149, #10037) +#11150 = @"C_type$itertools.takewhile$__setstate__" +ext_rettype(#11150, #10005) +#11151 = @"C_type$itertools.islice$__reduce__" +ext_rettype(#11151, #10037) +#11152 = @"C_type$itertools.islice$__setstate__" +ext_rettype(#11152, #10005) +#11153 = @"C_type$itertools.starmap$__reduce__" +ext_rettype(#11153, #10037) +#11154 = @"C_type$itertools.chain$__reduce__" +ext_rettype(#11154, #10037) +#11155 = @"C_type$itertools.chain$__setstate__" +ext_rettype(#11155, #10005) +#11156 = @"C_type$itertools.product$__reduce__" +ext_rettype(#11156, #10037) +#11157 = @"C_type$itertools.product$__setstate__" +ext_rettype(#11157, #10005) +#11158 = @"C_type$itertools.combinations$__reduce__" +ext_rettype(#11158, #10037) +#11159 = @"C_type$itertools.combinations$__setstate__" +ext_rettype(#11159, #10005) +#11160 = @"C_type$itertools.combinations_with_replacement$__reduce__" +ext_rettype(#11160, #10037) +#11161 = @"C_type$itertools.combinations_with_replacement$__setstate__" +ext_rettype(#11161, #10005) +#11162 = @"C_type$itertools.permutations$__reduce__" +ext_rettype(#11162, #10037) +#11163 = @"C_type$itertools.permutations$__setstate__" +ext_rettype(#11163, #10005) +#11164 = @"C_type$itertools.accumulate$__reduce__" +ext_rettype(#11164, #10037) +#11165 = @"C_type$itertools.accumulate$__setstate__" +ext_rettype(#11165, #10005) +#11166 = @"C_type$itertools.compress$__reduce__" +ext_rettype(#11166, #10037) +#11167 = @"C_type$itertools.filterfalse$__reduce__" +ext_rettype(#11167, #10037) +#11168 = @"C_type$itertools.count$__reduce__" +ext_rettype(#11168, #10037) +#11169 = @"C_type$itertools.repeat$__length_hint__" +ext_rettype(#11169, #10024) +#11170 = @"C_type$itertools.repeat$__reduce__" +ext_rettype(#11170, #10037) +#11171 = @"C_type$itertools.zip_longest$__reduce__" +ext_rettype(#11171, #10037) +#11172 = @"C_type$itertools.zip_longest$__setstate__" +ext_rettype(#11172, #10005) +#11173 = @"C_type$ossaudiodev.oss_audio_device$write" +ext_rettype(#11173, #10024) +#11174 = @"C_type$ossaudiodev.oss_audio_device$writeall" +ext_rettype(#11174, #10005) +#11175 = @"C_type$ossaudiodev.oss_audio_device$close" +ext_rettype(#11175, #10005) +#11176 = @"C_type$ossaudiodev.oss_audio_device$fileno" +ext_rettype(#11176, #10024) +#11177 = @"C_type$ossaudiodev.oss_audio_device$nonblock" +ext_rettype(#11177, #10005) +#11178 = @"C_type$ossaudiodev.oss_audio_device$setfmt" +ext_rettype(#11178, #10024) +#11179 = @"C_type$ossaudiodev.oss_audio_device$getfmts" +ext_rettype(#11179, #10024) +#11180 = @"C_type$ossaudiodev.oss_audio_device$channels" +ext_rettype(#11180, #10024) +#11181 = @"C_type$ossaudiodev.oss_audio_device$speed" +ext_rettype(#11181, #10024) +#11182 = @"C_type$ossaudiodev.oss_audio_device$sync" +ext_rettype(#11182, #10005) +#11183 = @"C_type$ossaudiodev.oss_audio_device$reset" +ext_rettype(#11183, #10005) +#11184 = @"C_type$ossaudiodev.oss_audio_device$post" +ext_rettype(#11184, #10005) +#11185 = @"C_type$ossaudiodev.oss_audio_device$setparameters" +ext_rettype(#11185, #10037) +#11186 = @"C_type$ossaudiodev.oss_audio_device$bufsize" +ext_rettype(#11186, #10024) +#11187 = @"C_type$ossaudiodev.oss_audio_device$obufcount" +ext_rettype(#11187, #10024) +#11188 = @"C_type$ossaudiodev.oss_audio_device$obuffree" +ext_rettype(#11188, #10024) +#11189 = @"C_type$ossaudiodev.oss_audio_device$getptr" +ext_rettype(#11189, #10037) +#11190 = @"C_type$ossaudiodev.oss_audio_device$flush" +ext_rettype(#11190, #10005) +#11191 = @"C_type$ossaudiodev.oss_audio_device$__exit__" +ext_rettype(#11191, #10005) +#11192 = @"C_type$ossaudiodev.oss_mixer_device$close" +ext_rettype(#11192, #10005) +#11193 = @"C_type$ossaudiodev.oss_mixer_device$fileno" +ext_rettype(#11193, #10024) +#11194 = @"C_type$ossaudiodev.oss_mixer_device$__exit__" +ext_rettype(#11194, #10005) +#11195 = @"C_type$ossaudiodev.oss_mixer_device$controls" +ext_rettype(#11195, #10024) +#11196 = @"C_type$ossaudiodev.oss_mixer_device$stereocontrols" +ext_rettype(#11196, #10024) +#11197 = @"C_type$ossaudiodev.oss_mixer_device$reccontrols" +ext_rettype(#11197, #10024) +#11198 = @"C_type$ossaudiodev.oss_mixer_device$get" +ext_rettype(#11198, #10037) +#11199 = @"C_type$ossaudiodev.oss_mixer_device$set" +ext_rettype(#11199, #10037) +#11200 = @"C_type$ossaudiodev.oss_mixer_device$get_recsrc" +ext_rettype(#11200, #10024) +#11201 = @"C_type$ossaudiodev.oss_mixer_device$set_recsrc" +ext_rettype(#11201, #10024) +#11202 = @"C_type$pyexpat.xmlparser$Parse" +ext_rettype(#11202, #10024) +#11203 = @"C_type$pyexpat.xmlparser$ParseFile" +ext_rettype(#11203, #10024) +#11204 = @"C_type$pyexpat.xmlparser$SetBase" +ext_rettype(#11204, #10005) +#11205 = @"C_type$pyexpat.xmlparser$GetBase" +ext_rettype(#11205, #10010) +#11206 = @"C_type$pyexpat.xmlparser$ExternalEntityParserCreate" +ext_rettype(#11206, #10586) +#11207 = @"C_type$pyexpat.xmlparser$SetParamEntityParsing" +ext_rettype(#11207, #10024) +#11208 = @"C_type$pyexpat.xmlparser$GetInputContext" +ext_rettype(#11208, #10081) +ext_rettype(#11208, #10005) +#11209 = @"C_type$pyexpat.xmlparser$UseForeignDTD" +ext_rettype(#11209, #10005) +#11210 = @"C_type$pyexpat.xmlparser$__dir__" +ext_rettype(#11210, #10020) +#11211 = @"C_type$_socket.socket$_accept" +ext_rettype(#11211, #10037) +#11212 = @"C_type$_socket.socket$bind" +ext_rettype(#11212, #10005) +#11213 = @"C_type$_socket.socket$close" +ext_rettype(#11213, #10005) +#11214 = @"C_type$_socket.socket$connect" +ext_rettype(#11214, #10005) +#11215 = @"C_type$_socket.socket$connect_ex" +ext_rettype(#11215, #10024) +#11216 = @"C_type$_socket.socket$detach" +ext_rettype(#11216, #10024) +#11217 = @"C_type$_socket.socket$fileno" +ext_rettype(#11217, #10024) +#11218 = @"C_type$_socket.socket$getpeername" +ext_rettype(#11218, #10037) +ext_rettype(#11218, #10081) +ext_rettype(#11218, #10010) +ext_rettype(#11218, #10005) +#11219 = @"C_type$_socket.socket$getsockname" +ext_rettype(#11219, #10037) +ext_rettype(#11219, #10081) +ext_rettype(#11219, #10010) +ext_rettype(#11219, #10005) +#11220 = @"C_type$_socket.socket$getsockopt" +ext_rettype(#11220, #10024) +#11221 = @"C_type$_socket.socket$listen" +ext_rettype(#11221, #10005) +#11222 = @"C_type$_socket.socket$recv_into" +ext_rettype(#11222, #10024) +#11223 = @"C_type$_socket.socket$recvfrom" +ext_rettype(#11223, #10037) +#11224 = @"C_type$_socket.socket$recvfrom_into" +ext_rettype(#11224, #10037) +#11225 = @"C_type$_socket.socket$send" +ext_rettype(#11225, #10024) +#11226 = @"C_type$_socket.socket$sendall" +ext_rettype(#11226, #10005) +#11227 = @"C_type$_socket.socket$sendto" +ext_rettype(#11227, #10024) +#11228 = @"C_type$_socket.socket$setblocking" +ext_rettype(#11228, #10005) +#11229 = @"C_type$_socket.socket$settimeout" +ext_rettype(#11229, #10005) +#11230 = @"C_type$_socket.socket$gettimeout" +ext_rettype(#11230, #10001) +ext_rettype(#11230, #10005) +#11231 = @"C_type$_socket.socket$setsockopt" +ext_rettype(#11231, #10005) +#11232 = @"C_type$_socket.socket$shutdown" +ext_rettype(#11232, #10005) +#11233 = @"C_type$_socket.socket$recvmsg" +ext_rettype(#11233, #10037) +#11234 = @"C_type$_socket.socket$recvmsg_into" +ext_rettype(#11234, #10037) +#11235 = @"C_type$_socket.socket$sendmsg" +ext_rettype(#11235, #10024) +#11236 = @"C_type$_ast.AST$__reduce__" +ext_rettype(#11236, #10037) +#11237 = @"C_type$traceback$3__dir__" +ext_rettype(#11237, #10037) +#11238 = @"C_type$filter$3__reduce__" +ext_rettype(#11238, #10037) +#11239 = @"C_type$map$3__reduce__" +ext_rettype(#11239, #10037) +#11240 = @"C_type$zip$3__reduce__" +ext_rettype(#11240, #10037) +#11241 = @"C_type$type$3mro" +ext_rettype(#11241, #10037) +#11242 = @"C_type$type$3__subclasses__" +ext_rettype(#11242, #10020) +#11243 = @"C_type$type$3__prepare__" +ext_rettype(#11243, #10111) +#11244 = @"C_type$type$3__instancecheck__" +ext_rettype(#11244, #10050) +#11245 = @"C_type$type$3__subclasscheck__" +ext_rettype(#11245, #10050) +#11246 = @"C_type$type$3__dir__" +ext_rettype(#11246, #10020) +#11247 = @"C_type$type$3__sizeof__" +ext_rettype(#11247, #10024) +#11248 = @"C_type$object$3__reduce_ex__" +ext_rettype(#11248, #10037) +#11249 = @"C_type$object$3__reduce__" +ext_rettype(#11249, #10037) +#11250 = @"C_type$object$3__sizeof__" +ext_rettype(#11250, #10024) +#11251 = @"C_type$object$3__dir__" +ext_rettype(#11251, #10020) +#11252 = @"C_type$dict_keyiterator$3__length_hint__" +ext_rettype(#11252, #10024) +#11253 = @"C_type$dict_keyiterator$3__reduce__" +ext_rettype(#11253, #10037) +#11254 = @"C_type$dict_valueiterator$3__length_hint__" +ext_rettype(#11254, #10024) +#11255 = @"C_type$dict_valueiterator$3__reduce__" +ext_rettype(#11255, #10037) +#11256 = @"C_type$dict_itemiterator$3__length_hint__" +ext_rettype(#11256, #10024) +#11257 = @"C_type$dict_itemiterator$3__reduce__" +ext_rettype(#11257, #10037) +#11258 = @"C_type$dict$3__contains__" +ext_rettype(#11258, #10050) +#11259 = @"C_type$dict$3__sizeof__" +ext_rettype(#11259, #10024) +#11260 = @"C_type$dict$3popitem" +ext_rettype(#11260, #10037) +#11261 = @"C_type$dict$3update" +ext_rettype(#11261, #10005) +#11262 = @"C_type$dict$3clear" +ext_rettype(#11262, #10005) +#11263 = @"C_type$dict$3copy" +ext_rettype(#11263, #10111) +#11264 = @"C_type$dict_items$3isdisjoint" +ext_rettype(#11264, #10050) +#11265 = @"C_type$dict_keys$3isdisjoint" +ext_rettype(#11265, #10050) +#11266 = @"C_type$module$3__dir__" +ext_rettype(#11266, #10020) +#11267 = @"C_type$bytearray_iterator$3__length_hint__" +ext_rettype(#11267, #10024) +#11268 = @"C_type$bytearray_iterator$3__reduce__" +ext_rettype(#11268, #10037) +#11269 = @"C_type$bytearray_iterator$3__setstate__" +ext_rettype(#11269, #10005) +#11270 = @"C_type$bytearray$3__alloc__" +ext_rettype(#11270, #10024) +#11271 = @"C_type$bytearray$3__reduce__" +ext_rettype(#11271, #10037) +#11272 = @"C_type$bytearray$3__reduce_ex__" +ext_rettype(#11272, #10037) +#11273 = @"C_type$bytearray$3__sizeof__" +ext_rettype(#11273, #10024) +#11274 = @"C_type$bytearray$3append" +ext_rettype(#11274, #10005) +#11275 = @"C_type$bytearray$3capitalize" +#11276 = @"C_type$bytearray" +ext_rettype(#11275, #11276) +ext_rettype(#11275, #10081) +#11277 = @"C_type$bytearray$3center" +ext_rettype(#11277, #11276) +ext_rettype(#11277, #10081) +#11278 = @"C_type$bytearray$3clear" +ext_rettype(#11278, #10005) +#11279 = @"C_type$bytearray$3copy" +ext_rettype(#11279, #11276) +#11280 = @"C_type$bytearray$3count" +ext_rettype(#11280, #10024) +#11281 = @"C_type$bytearray$3endswith" +ext_rettype(#11281, #10050) +#11282 = @"C_type$bytearray$3expandtabs" +ext_rettype(#11282, #11276) +ext_rettype(#11282, #10081) +#11283 = @"C_type$bytearray$3extend" +ext_rettype(#11283, #10005) +#11284 = @"C_type$bytearray$3find" +ext_rettype(#11284, #10024) +#11285 = @"C_type$bytearray$3fromhex" +ext_rettype(#11285, #11276) +#11286 = @"C_type$bytearray$3index" +ext_rettype(#11286, #10024) +#11287 = @"C_type$bytearray$3insert" +ext_rettype(#11287, #10005) +#11288 = @"C_type$bytearray$3isalnum" +ext_rettype(#11288, #10050) +#11289 = @"C_type$bytearray$3isalpha" +ext_rettype(#11289, #10050) +#11290 = @"C_type$bytearray$3isdigit" +ext_rettype(#11290, #10050) +#11291 = @"C_type$bytearray$3islower" +ext_rettype(#11291, #10050) +#11292 = @"C_type$bytearray$3isspace" +ext_rettype(#11292, #10050) +#11293 = @"C_type$bytearray$3istitle" +ext_rettype(#11293, #10050) +#11294 = @"C_type$bytearray$3isupper" +ext_rettype(#11294, #10050) +#11295 = @"C_type$bytearray$3join" +ext_rettype(#11295, #11276) +#11296 = @"C_type$bytearray$3ljust" +ext_rettype(#11296, #11276) +ext_rettype(#11296, #10081) +#11297 = @"C_type$bytearray$3lower" +ext_rettype(#11297, #11276) +ext_rettype(#11297, #10081) +#11298 = @"C_type$bytearray$3lstrip" +ext_rettype(#11298, #11276) +#11299 = @"C_type$bytearray$3maketrans" +ext_rettype(#11299, #10081) +#11300 = @"C_type$bytearray$3partition" +ext_rettype(#11300, #10037) +#11301 = @"C_type$bytearray$3pop" +ext_rettype(#11301, #10024) +#11302 = @"C_type$bytearray$3remove" +ext_rettype(#11302, #10005) +#11303 = @"C_type$bytearray$3replace" +ext_rettype(#11303, #11276) +#11304 = @"C_type$bytearray$3reverse" +ext_rettype(#11304, #10005) +#11305 = @"C_type$bytearray$3rfind" +ext_rettype(#11305, #10024) +#11306 = @"C_type$bytearray$3rindex" +ext_rettype(#11306, #10024) +#11307 = @"C_type$bytearray$3rjust" +ext_rettype(#11307, #11276) +ext_rettype(#11307, #10081) +#11308 = @"C_type$bytearray$3rpartition" +ext_rettype(#11308, #10037) +#11309 = @"C_type$bytearray$3rsplit" +ext_rettype(#11309, #10020) +#11310 = @"C_type$bytearray$3rstrip" +ext_rettype(#11310, #11276) +#11311 = @"C_type$bytearray$3split" +ext_rettype(#11311, #10020) +#11312 = @"C_type$bytearray$3splitlines" +ext_rettype(#11312, #10020) +#11313 = @"C_type$bytearray$3startswith" +ext_rettype(#11313, #10050) +#11314 = @"C_type$bytearray$3strip" +ext_rettype(#11314, #11276) +#11315 = @"C_type$bytearray$3swapcase" +ext_rettype(#11315, #11276) +ext_rettype(#11315, #10081) +#11316 = @"C_type$bytearray$3title" +ext_rettype(#11316, #11276) +ext_rettype(#11316, #10081) +#11317 = @"C_type$bytearray$3translate" +ext_rettype(#11317, #11276) +#11318 = @"C_type$bytearray$3upper" +ext_rettype(#11318, #11276) +ext_rettype(#11318, #10081) +#11319 = @"C_type$bytearray$3zfill" +ext_rettype(#11319, #11276) +ext_rettype(#11319, #10081) +#11320 = @"C_type$frame$3__sizeof__" +ext_rettype(#11320, #10024) +#11321 = @"C_type$list_iterator$3__length_hint__" +ext_rettype(#11321, #10024) +#11322 = @"C_type$list_iterator$3__reduce__" +ext_rettype(#11322, #10037) +#11323 = @"C_type$list_iterator$3__setstate__" +ext_rettype(#11323, #10005) +#11324 = @"C_type$list_reverseiterator$3__length_hint__" +ext_rettype(#11324, #10024) +#11325 = @"C_type$list_reverseiterator$3__reduce__" +ext_rettype(#11325, #10037) +#11326 = @"C_type$list_reverseiterator$3__setstate__" +ext_rettype(#11326, #10005) +#11327 = @"C_type$list$3__getitem__" +ext_rettype(#11327, #10020) +#11328 = @"C_type$list$3__reversed__" +#11329 = @"C_type$list_reverseiterator" +ext_rettype(#11328, #11329) +#11330 = @"C_type$list$3__sizeof__" +ext_rettype(#11330, #10024) +#11331 = @"C_type$list$3clear" +ext_rettype(#11331, #10005) +#11332 = @"C_type$list$3copy" +ext_rettype(#11332, #10020) +#11333 = @"C_type$list$3append" +ext_rettype(#11333, #10005) +#11334 = @"C_type$list$3insert" +ext_rettype(#11334, #10005) +#11335 = @"C_type$list$3extend" +ext_rettype(#11335, #10005) +#11336 = @"C_type$list$3remove" +ext_rettype(#11336, #10005) +#11337 = @"C_type$list$3index" +ext_rettype(#11337, #10024) +#11338 = @"C_type$list$3count" +ext_rettype(#11338, #10024) +#11339 = @"C_type$list$3reverse" +ext_rettype(#11339, #10005) +#11340 = @"C_type$list$3sort" +ext_rettype(#11340, #10005) +#11341 = @"C_type$int$3conjugate" +ext_rettype(#11341, #10024) +#11342 = @"C_type$int$3bit_length" +ext_rettype(#11342, #10024) +#11343 = @"C_type$int$3to_bytes" +ext_rettype(#11343, #10081) +#11344 = @"C_type$int$3from_bytes" +ext_rettype(#11344, #10024) +#11345 = @"C_type$int$3__trunc__" +ext_rettype(#11345, #10024) +#11346 = @"C_type$int$3__floor__" +ext_rettype(#11346, #10024) +#11347 = @"C_type$int$3__ceil__" +ext_rettype(#11347, #10024) +#11348 = @"C_type$int$3__round__" +ext_rettype(#11348, #10024) +#11349 = @"C_type$int$3__getnewargs__" +ext_rettype(#11349, #10037) +#11350 = @"C_type$int$3__sizeof__" +ext_rettype(#11350, #10024) +#11351 = @"C_type$generator$3close" +ext_rettype(#11351, #10005) +#11352 = @"C_type$stderrprinter$3close" +ext_rettype(#11352, #10005) +#11353 = @"C_type$stderrprinter$3flush" +ext_rettype(#11353, #10005) +#11354 = @"C_type$stderrprinter$3fileno" +ext_rettype(#11354, #10024) +#11355 = @"C_type$stderrprinter$3isatty" +ext_rettype(#11355, #10050) +#11356 = @"C_type$stderrprinter$3write" +ext_rettype(#11356, #10024) +ext_rettype(#11356, #10005) +#11357 = @"C_type$slice$3indices" +ext_rettype(#11357, #10037) +#11358 = @"C_type$slice$3__reduce__" +ext_rettype(#11358, #10037) +#11359 = @"C_type$BaseException$3__reduce__" +ext_rettype(#11359, #10037) +#11360 = @"C_type$BaseException$3__setstate__" +ext_rettype(#11360, #10005) +#11361 = @"C_type$OSError$3__reduce__" +ext_rettype(#11361, #10037) +#11362 = @"C_type$float$3conjugate" +ext_rettype(#11362, #10001) +#11363 = @"C_type$float$3__trunc__" +ext_rettype(#11363, #10024) +#11364 = @"C_type$float$3__round__" +ext_rettype(#11364, #10024) +ext_rettype(#11364, #10001) +#11365 = @"C_type$float$3as_integer_ratio" +ext_rettype(#11365, #10037) +#11366 = @"C_type$float$3is_integer" +ext_rettype(#11366, #10050) +#11367 = @"C_type$float$3__getnewargs__" +ext_rettype(#11367, #10037) +#11368 = @"C_type$float$3__setformat__" +ext_rettype(#11368, #10005) +#11369 = @"C_type$bytes_iterator$3__length_hint__" +ext_rettype(#11369, #10024) +#11370 = @"C_type$bytes_iterator$3__reduce__" +ext_rettype(#11370, #10037) +#11371 = @"C_type$bytes_iterator$3__setstate__" +ext_rettype(#11371, #10005) +#11372 = @"C_type$bytes$3__getnewargs__" +ext_rettype(#11372, #10037) +#11373 = @"C_type$bytes$3capitalize" +ext_rettype(#11373, #11276) +ext_rettype(#11373, #10081) +#11374 = @"C_type$bytes$3center" +ext_rettype(#11374, #11276) +ext_rettype(#11374, #10081) +#11375 = @"C_type$bytes$3count" +ext_rettype(#11375, #10024) +#11376 = @"C_type$bytes$3endswith" +ext_rettype(#11376, #10050) +#11377 = @"C_type$bytes$3expandtabs" +ext_rettype(#11377, #11276) +ext_rettype(#11377, #10081) +#11378 = @"C_type$bytes$3find" +ext_rettype(#11378, #10024) +#11379 = @"C_type$bytes$3index" +ext_rettype(#11379, #10024) +#11380 = @"C_type$bytes$3isalnum" +ext_rettype(#11380, #10050) +#11381 = @"C_type$bytes$3isalpha" +ext_rettype(#11381, #10050) +#11382 = @"C_type$bytes$3isdigit" +ext_rettype(#11382, #10050) +#11383 = @"C_type$bytes$3islower" +ext_rettype(#11383, #10050) +#11384 = @"C_type$bytes$3isspace" +ext_rettype(#11384, #10050) +#11385 = @"C_type$bytes$3istitle" +ext_rettype(#11385, #10050) +#11386 = @"C_type$bytes$3isupper" +ext_rettype(#11386, #10050) +#11387 = @"C_type$bytes$3join" +ext_rettype(#11387, #10081) +#11388 = @"C_type$bytes$3ljust" +ext_rettype(#11388, #11276) +ext_rettype(#11388, #10081) +#11389 = @"C_type$bytes$3lower" +ext_rettype(#11389, #11276) +ext_rettype(#11389, #10081) +#11390 = @"C_type$bytes$3lstrip" +ext_rettype(#11390, #10081) +#11391 = @"C_type$bytes$3maketrans" +ext_rettype(#11391, #10081) +#11392 = @"C_type$bytes$3partition" +ext_rettype(#11392, #10037) +#11393 = @"C_type$bytes$3replace" +ext_rettype(#11393, #10081) +#11394 = @"C_type$bytes$3rfind" +ext_rettype(#11394, #10024) +#11395 = @"C_type$bytes$3rindex" +ext_rettype(#11395, #10024) +#11396 = @"C_type$bytes$3rjust" +ext_rettype(#11396, #11276) +ext_rettype(#11396, #10081) +#11397 = @"C_type$bytes$3rpartition" +ext_rettype(#11397, #10037) +#11398 = @"C_type$bytes$3rsplit" +ext_rettype(#11398, #10020) +#11399 = @"C_type$bytes$3rstrip" +ext_rettype(#11399, #10081) +#11400 = @"C_type$bytes$3split" +ext_rettype(#11400, #10020) +#11401 = @"C_type$bytes$3splitlines" +ext_rettype(#11401, #10020) +#11402 = @"C_type$bytes$3startswith" +ext_rettype(#11402, #10050) +#11403 = @"C_type$bytes$3strip" +ext_rettype(#11403, #10081) +#11404 = @"C_type$bytes$3swapcase" +ext_rettype(#11404, #11276) +ext_rettype(#11404, #10081) +#11405 = @"C_type$bytes$3title" +ext_rettype(#11405, #11276) +ext_rettype(#11405, #10081) +#11406 = @"C_type$bytes$3translate" +ext_rettype(#11406, #10081) +#11407 = @"C_type$bytes$3upper" +ext_rettype(#11407, #11276) +ext_rettype(#11407, #10081) +#11408 = @"C_type$bytes$3zfill" +ext_rettype(#11408, #11276) +ext_rettype(#11408, #10081) +#11409 = @"C_type$bytes$3__sizeof__" +ext_rettype(#11409, #10024) +#11410 = @"C_type$set_iterator$3__length_hint__" +ext_rettype(#11410, #10024) +#11411 = @"C_type$set_iterator$3__reduce__" +ext_rettype(#11411, #10037) +#11412 = @"C_type$frozenset$3__contains__" +ext_rettype(#11412, #10050) +#11413 = @"C_type$frozenset$3copy" +ext_rettype(#11413, #10073) +ext_rettype(#11413, #10074) +#11414 = @"C_type$frozenset$3difference" +ext_rettype(#11414, #10073) +ext_rettype(#11414, #10074) +#11415 = @"C_type$frozenset$3intersection" +ext_rettype(#11415, #10073) +ext_rettype(#11415, #10074) +#11416 = @"C_type$frozenset$3isdisjoint" +ext_rettype(#11416, #10050) +#11417 = @"C_type$frozenset$3issubset" +ext_rettype(#11417, #10050) +#11418 = @"C_type$frozenset$3issuperset" +ext_rettype(#11418, #10050) +#11419 = @"C_type$frozenset$3__reduce__" +ext_rettype(#11419, #10037) +#11420 = @"C_type$frozenset$3__sizeof__" +ext_rettype(#11420, #10024) +#11421 = @"C_type$frozenset$3symmetric_difference" +ext_rettype(#11421, #10073) +ext_rettype(#11421, #10074) +#11422 = @"C_type$frozenset$3union" +ext_rettype(#11422, #10073) +ext_rettype(#11422, #10074) +#11423 = @"C_type$set$3add" +ext_rettype(#11423, #10005) +#11424 = @"C_type$set$3clear" +ext_rettype(#11424, #10005) +#11425 = @"C_type$set$3__contains__" +ext_rettype(#11425, #10050) +#11426 = @"C_type$set$3copy" +ext_rettype(#11426, #10073) +ext_rettype(#11426, #10074) +#11427 = @"C_type$set$3discard" +ext_rettype(#11427, #10005) +#11428 = @"C_type$set$3difference" +ext_rettype(#11428, #10073) +ext_rettype(#11428, #10074) +#11429 = @"C_type$set$3difference_update" +ext_rettype(#11429, #10005) +#11430 = @"C_type$set$3intersection" +ext_rettype(#11430, #10073) +ext_rettype(#11430, #10074) +#11431 = @"C_type$set$3intersection_update" +ext_rettype(#11431, #10005) +#11432 = @"C_type$set$3isdisjoint" +ext_rettype(#11432, #10050) +#11433 = @"C_type$set$3issubset" +ext_rettype(#11433, #10050) +#11434 = @"C_type$set$3issuperset" +ext_rettype(#11434, #10050) +#11435 = @"C_type$set$3__reduce__" +ext_rettype(#11435, #10037) +#11436 = @"C_type$set$3remove" +ext_rettype(#11436, #10005) +#11437 = @"C_type$set$3__sizeof__" +ext_rettype(#11437, #10024) +#11438 = @"C_type$set$3symmetric_difference" +ext_rettype(#11438, #10073) +ext_rettype(#11438, #10074) +#11439 = @"C_type$set$3symmetric_difference_update" +ext_rettype(#11439, #10005) +#11440 = @"C_type$set$3union" +ext_rettype(#11440, #10073) +ext_rettype(#11440, #10074) +#11441 = @"C_type$set$3update" +ext_rettype(#11441, #10005) +#11442 = @"C_type$code$3__sizeof__" +ext_rettype(#11442, #10024) +#11443 = @"C_type$tuple_iterator$3__length_hint__" +ext_rettype(#11443, #10024) +#11444 = @"C_type$tuple_iterator$3__reduce__" +ext_rettype(#11444, #10037) +#11445 = @"C_type$tuple_iterator$3__setstate__" +ext_rettype(#11445, #10005) +#11446 = @"C_type$tuple$3__getnewargs__" +ext_rettype(#11446, #10037) +#11447 = @"C_type$tuple$3__sizeof__" +ext_rettype(#11447, #10024) +#11448 = @"C_type$tuple$3index" +ext_rettype(#11448, #10024) +#11449 = @"C_type$tuple$3count" +ext_rettype(#11449, #10024) +#11450 = @"C_type$iterator$3__length_hint__" +ext_rettype(#11450, #10024) +#11451 = @"C_type$iterator$3__reduce__" +ext_rettype(#11451, #10037) +#11452 = @"C_type$iterator$3__setstate__" +ext_rettype(#11452, #10005) +#11453 = @"C_type$callable_iterator$3__reduce__" +ext_rettype(#11453, #10037) +#11454 = @"C_type$str_iterator$3__length_hint__" +ext_rettype(#11454, #10024) +#11455 = @"C_type$str_iterator$3__reduce__" +ext_rettype(#11455, #10037) +#11456 = @"C_type$str_iterator$3__setstate__" +ext_rettype(#11456, #10005) +#11457 = @"C_type$str$3encode" +ext_rettype(#11457, #10081) +#11458 = @"C_type$str$3split" +ext_rettype(#11458, #10020) +#11459 = @"C_type$str$3rsplit" +ext_rettype(#11459, #10020) +#11460 = @"C_type$str$3count" +ext_rettype(#11460, #10024) +#11461 = @"C_type$str$3find" +ext_rettype(#11461, #10024) +#11462 = @"C_type$str$3partition" +ext_rettype(#11462, #10037) +#11463 = @"C_type$str$3index" +ext_rettype(#11463, #10024) +#11464 = @"C_type$str$3rfind" +ext_rettype(#11464, #10024) +#11465 = @"C_type$str$3rindex" +ext_rettype(#11465, #10024) +#11466 = @"C_type$str$3rpartition" +ext_rettype(#11466, #10037) +#11467 = @"C_type$str$3splitlines" +ext_rettype(#11467, #10020) +#11468 = @"C_type$str$3startswith" +ext_rettype(#11468, #10050) +#11469 = @"C_type$str$3endswith" +ext_rettype(#11469, #10050) +#11470 = @"C_type$str$3islower" +ext_rettype(#11470, #10050) +#11471 = @"C_type$str$3isupper" +ext_rettype(#11471, #10050) +#11472 = @"C_type$str$3istitle" +ext_rettype(#11472, #10050) +#11473 = @"C_type$str$3isspace" +ext_rettype(#11473, #10050) +#11474 = @"C_type$str$3isdecimal" +ext_rettype(#11474, #10050) +#11475 = @"C_type$str$3isdigit" +ext_rettype(#11475, #10050) +#11476 = @"C_type$str$3isnumeric" +ext_rettype(#11476, #10050) +#11477 = @"C_type$str$3isalpha" +ext_rettype(#11477, #10050) +#11478 = @"C_type$str$3isalnum" +ext_rettype(#11478, #10050) +#11479 = @"C_type$str$3isidentifier" +ext_rettype(#11479, #10050) +#11480 = @"C_type$str$3isprintable" +ext_rettype(#11480, #10050) +#11481 = @"C_type$str$3maketrans" +ext_rettype(#11481, #10111) +#11482 = @"C_type$str$3__sizeof__" +ext_rettype(#11482, #10024) +#11483 = @"C_type$str$3__getnewargs__" +ext_rettype(#11483, #10037) +#11484 = @"C_type$EncodingMap$3size" +ext_rettype(#11484, #10024) +#11485 = @"C_type$range_iterator$3__length_hint__" +ext_rettype(#11485, #10024) +#11486 = @"C_type$range_iterator$3__reduce__" +ext_rettype(#11486, #10037) +#11487 = @"C_type$range_iterator$3__setstate__" +ext_rettype(#11487, #10005) +#11488 = @"C_type$longrange_iterator$3__reduce__" +ext_rettype(#11488, #10037) +#11489 = @"C_type$longrange_iterator$3__setstate__" +ext_rettype(#11489, #10005) +#11490 = @"C_type$range$3__reversed__" +#11491 = @"C_type$range_iterator" +ext_rettype(#11490, #11491) +#11492 = @"C_type$longrange_iterator" +ext_rettype(#11490, #11492) +#11493 = @"C_type$range$3__reduce__" +ext_rettype(#11493, #10037) +#11494 = @"C_type$range$3count" +ext_rettype(#11494, #10024) +#11495 = @"C_type$range$3index" +ext_rettype(#11495, #10024) +#11496 = @"C_type$complex$3conjugate" +ext_rettype(#11496, #10226) +#11497 = @"C_type$complex$3__getnewargs__" +ext_rettype(#11497, #10037) +#11498 = @"C_type$memoryview$3release" +ext_rettype(#11498, #10005) +#11499 = @"C_type$memoryview$3tobytes" +ext_rettype(#11499, #10081) +#11500 = @"C_type$memoryview$3tolist" +ext_rettype(#11500, #10024) +ext_rettype(#11500, #10020) +ext_rettype(#11500, #10001) +ext_rettype(#11500, #10081) +ext_rettype(#11500, #10050) +#11501 = @"C_type$memoryview$3cast" +ext_rettype(#11501, #10407) +#11502 = @"C_type$memoryview$3__exit__" +ext_rettype(#11502, #10005) +#11503 = @"C_type$enumerate$3__reduce__" +ext_rettype(#11503, #10037) +#11504 = @"C_type$reversed$3__length_hint__" +ext_rettype(#11504, #10024) +#11505 = @"C_type$reversed$3__reduce__" +ext_rettype(#11505, #10037) +#11506 = @"C_type$reversed$3__setstate__" +ext_rettype(#11506, #10005) +ext_argtype(#10003, 0, #10024) +ext_argtype(#10004, 0, #10024) +#11507 = @"C_type$object" +ext_argtype(#10004, 1, #11507) +ext_argtype(#10006, 0, #10024) +ext_argtype(#10007, 0, #10001) +ext_argtype(#10008, 0, #11507) +ext_argtype(#10009, 1, #11507) +#11508 = @"C_builtin_function_or_method$time.get_clock_info" +ext_argtype(#11508, 0, #10010) +ext_argtype(#10022, 0, #11507) +#11509 = @"C_builtin_function_or_method$_csv.get_dialect" +ext_argtype(#11509, 0, #11507) +ext_argtype(#10025, 0, #11507) +ext_argtype(#10025, 1, #10010) +ext_argtype(#10025, 2, #10024) +ext_argtype(#10032, 0, #11507) +ext_argtype(#10035, 0, #11507) +ext_argtype(#10036, 0, #10030) +ext_argtype(#10040, 0, #11507) +ext_argtype(#10041, 0, #11507) +ext_argtype(#10043, 0, #11507) +ext_argtype(#10044, 0, #11507) +ext_argtype(#10051, 0, #10024) +ext_argtype(#10054, 0, #10024) +ext_argtype(#10054, 1, #10024) +ext_argtype(#10054, 2, #10024) +ext_argtype(#10056, 0, #10024) +ext_argtype(#10058, 0, #11507) +#11510 = @"C_builtin_function_or_method$_codecs_jp.getcodec" +ext_argtype(#11510, 0, #11507) +#11511 = @"C_builtin_function_or_method$_codecs_tw.getcodec" +ext_argtype(#11511, 0, #11507) +#11512 = @"C_builtin_function_or_method$_codecs_hk.getcodec" +ext_argtype(#11512, 0, #11507) +#11513 = @"C_builtin_function_or_method$_codecs_iso2022.getcodec" +ext_argtype(#11513, 0, #11507) +#11514 = @"C_builtin_function_or_method$_codecs_kr.getcodec" +ext_argtype(#11514, 0, #11507) +#11515 = @"C_builtin_function_or_method$_codecs_cn.getcodec" +ext_argtype(#11515, 0, #11507) +ext_argtype(#10061, 0, #11507) +ext_argtype(#10063, 0, #10024) +ext_argtype(#10064, 0, #10024) +ext_argtype(#10064, 1, #10001) +ext_argtype(#10064, 2, #10001) +ext_argtype(#10065, 0, #10024) +ext_argtype(#10066, 0, #10024) +ext_argtype(#10066, 1, #11507) +ext_argtype(#10067, 0, #10024) +ext_argtype(#10068, 0, #10024) +ext_argtype(#10069, 0, #10024) +ext_argtype(#10069, 1, #10024) +ext_argtype(#10071, 0, #10024) +ext_argtype(#10071, 1, #10024) +ext_argtype(#10072, 0, #10024) +ext_argtype(#10072, 1, #11507) +ext_argtype(#10076, 0, #11507) +#11516 = @"C_builtin_function_or_method$signal.sigwaitinfo" +ext_argtype(#11516, 0, #11507) +ext_argtype(#10077, 0, #11507) +ext_argtype(#10077, 1, #11507) +ext_argtype(#10079, 0, #11507) +ext_argtype(#10110, 0, #11507) +ext_argtype(#10112, 0, #10010) +ext_argtype(#10112, 1, #10001) +ext_argtype(#10113, 0, #10024) +ext_argtype(#10114, 0, #10024) +ext_argtype(#10115, 0, #11507) +ext_argtype(#10129, 0, #10024) +ext_argtype(#10130, 0, #11507) +ext_argtype(#10167, 0, #10024) +ext_argtype(#10167, 1, #10024) +ext_argtype(#10176, 0, #11507) +ext_argtype(#10177, 0, #11507) +ext_argtype(#10177, 1, #10024) +ext_argtype(#10177, 2, #11507) +ext_argtype(#10178, 0, #11507) +ext_argtype(#10178, 1, #10024) +ext_argtype(#10179, 0, #11507) +ext_argtype(#10180, 0, #11507) +ext_argtype(#10180, 1, #10024) +ext_argtype(#10181, 0, #11507) +ext_argtype(#10181, 1, #10024) +ext_argtype(#10188, 0, #11507) +ext_argtype(#10190, 0, #11507) +ext_argtype(#10192, 0, #11507) +ext_argtype(#10192, 1, #10024) +ext_argtype(#10195, 0, #11507) +ext_argtype(#10195, 1, #10024) +ext_argtype(#10196, 0, #10001) +ext_argtype(#10196, 1, #10024) +ext_argtype(#10196, 2, #11507) +ext_argtype(#10196, 3, #10024) +ext_argtype(#10198, 0, #10024) +ext_argtype(#10198, 1, #11507) +ext_argtype(#10198, 2, #10024) +ext_argtype(#10198, 3, #10024) +ext_argtype(#10199, 0, #10024) +ext_argtype(#10200, 0, #10024) +ext_argtype(#10206, 0, #10081) +ext_argtype(#10207, 0, #11507) +#11517 = @"C_builtin_function_or_method$grp.getgrgid" +ext_argtype(#11517, 0, #11507) +ext_argtype(#10221, 0, #11507) +ext_argtype(#10221, 1, #11507) +ext_argtype(#10221, 2, #11507) +ext_argtype(#10221, 3, #11507) +#11518 = @"C_builtin_function_or_method$_pickle.dumps" +ext_argtype(#11518, 0, #11507) +ext_argtype(#11518, 1, #11507) +ext_argtype(#11518, 2, #11507) +#11519 = @"C_builtin_function_or_method$_pickle.load" +ext_argtype(#11519, 0, #11507) +ext_argtype(#11519, 1, #11507) +ext_argtype(#11519, 2, #10010) +ext_argtype(#11519, 3, #10010) +#11520 = @"C_builtin_function_or_method$_pickle.loads" +ext_argtype(#11520, 0, #11507) +ext_argtype(#11520, 1, #11507) +ext_argtype(#11520, 2, #10010) +ext_argtype(#11520, 3, #10010) +ext_argtype(#10222, 0, #11507) +ext_argtype(#10224, 0, #10010) +ext_argtype(#10224, 1, #10010) +ext_argtype(#10235, 0, #10226) +ext_argtype(#10236, 0, #10226) +ext_argtype(#10237, 0, #10226) +ext_argtype(#10238, 0, #10226) +ext_argtype(#10238, 1, #10226) +ext_argtype(#10240, 0, #10226) +ext_argtype(#10241, 0, #10226) +ext_argtype(#10242, 0, #10001) +ext_argtype(#10242, 1, #10001) +ext_argtype(#10248, 0, #11507) +ext_argtype(#10252, 1, #10024) +ext_argtype(#10252, 2, #10024) +ext_argtype(#10255, 0, #10024) +ext_argtype(#10256, 0, #10024) +ext_argtype(#10257, 0, #10024) +ext_argtype(#10328, 0, #11507) +ext_argtype(#10357, 0, #11507) +ext_argtype(#10370, 0, #11507) +ext_argtype(#10371, 0, #11507) +ext_argtype(#10373, 0, #11507) +ext_argtype(#10396, 0, #11507) +ext_argtype(#10398, 0, #11507) +ext_argtype(#10398, 1, #11507) +ext_argtype(#10398, 2, #11507) +ext_argtype(#10398, 3, #11507) +ext_argtype(#10398, 4, #11507) +ext_argtype(#10398, 5, #11507) +ext_argtype(#10398, 6, #10024) +ext_argtype(#10398, 7, #10024) +ext_argtype(#10398, 8, #10024) +ext_argtype(#10398, 9, #10024) +ext_argtype(#10398, 10, #10024) +ext_argtype(#10398, 11, #10024) +ext_argtype(#10398, 12, #10024) +ext_argtype(#10398, 13, #10024) +ext_argtype(#10398, 14, #10024) +ext_argtype(#10398, 15, #10024) +ext_argtype(#10398, 16, #11507) +#11521 = @"C_builtin_function_or_method$_heapq.heappop" +ext_argtype(#11521, 0, #11507) +ext_argtype(#10401, 0, #11507) +ext_argtype(#10402, 0, #10024) +ext_argtype(#10402, 1, #11507) +ext_argtype(#10403, 0, #10024) +ext_argtype(#10403, 1, #11507) +ext_argtype(#10412, 0, #11507) +#11522 = @"C_builtin_function_or_method$operator.index" +ext_argtype(#11522, 0, #11507) +#11523 = @"C_builtin_function_or_method$operator.__index__" +ext_argtype(#11523, 0, #11507) +#11524 = @"C_builtin_function_or_method$operator.neg" +ext_argtype(#11524, 0, #11507) +#11525 = @"C_builtin_function_or_method$operator.__neg__" +ext_argtype(#11525, 0, #11507) +#11526 = @"C_builtin_function_or_method$operator.pos" +ext_argtype(#11526, 0, #11507) +#11527 = @"C_builtin_function_or_method$operator.__pos__" +ext_argtype(#11527, 0, #11507) +#11528 = @"C_builtin_function_or_method$operator.abs" +ext_argtype(#11528, 0, #11507) +#11529 = @"C_builtin_function_or_method$operator.__abs__" +ext_argtype(#11529, 0, #11507) +#11530 = @"C_builtin_function_or_method$operator.inv" +ext_argtype(#11530, 0, #11507) +#11531 = @"C_builtin_function_or_method$operator.__inv__" +ext_argtype(#11531, 0, #11507) +#11532 = @"C_builtin_function_or_method$operator.invert" +ext_argtype(#11532, 0, #11507) +#11533 = @"C_builtin_function_or_method$operator.__invert__" +ext_argtype(#11533, 0, #11507) +ext_argtype(#10417, 0, #11507) +ext_argtype(#10418, 0, #11507) +ext_argtype(#10423, 0, #11507) +ext_argtype(#10423, 1, #11507) +ext_argtype(#10424, 1, #10010) +ext_argtype(#10424, 2, #10010) +ext_argtype(#10425, 0, #10010) +ext_argtype(#10425, 1, #10010) +ext_argtype(#10426, 0, #10010) +ext_argtype(#10428, 0, #10010) +ext_argtype(#10429, 0, #10010) +ext_argtype(#10431, 0, #11507) +ext_argtype(#10432, 0, #11507) +ext_argtype(#10433, 0, #11507) +ext_argtype(#10434, 0, #10024) +ext_argtype(#10436, 0, #10024) +ext_argtype(#10441, 0, #10010) +ext_argtype(#10442, 0, #10010) +ext_argtype(#10443, 0, #10024) +ext_argtype(#10444, 0, #10024) +ext_argtype(#10444, 1, #10010) +ext_argtype(#10523, 0, #11507) +#11534 = @"C_builtin_function_or_method$_json.encode_basestring_ascii" +ext_argtype(#11534, 0, #11507) +ext_argtype(#10524, 0, #11507) +ext_argtype(#10524, 1, #11507) +ext_argtype(#10524, 2, #10024) +ext_argtype(#10525, 0, #11507) +ext_argtype(#10527, 0, #11507) +ext_argtype(#10530, 0, #10531) +ext_argtype(#10530, 1, #11507) +ext_argtype(#10530, 2, #10111) +#11535 = @"C_builtin_function_or_method$_ctypes.POINTER" +ext_argtype(#11535, 0, #11507) +#11536 = @"C_builtin_function_or_method$_ctypes.pointer" +ext_argtype(#11536, 0, #11507) +#11537 = @"C_builtin_function_or_method$_ctypes._unpickle" +ext_argtype(#11537, 0, #11507) +ext_argtype(#11537, 1, #11507) +ext_argtype(#10534, 0, #11507) +ext_argtype(#10535, 0, #11507) +ext_argtype(#10535, 1, #10024) +ext_argtype(#10536, 0, #11507) +ext_argtype(#10536, 1, #10024) +ext_argtype(#10537, 0, #11507) +ext_argtype(#10538, 0, #11507) +ext_argtype(#10538, 1, #10010) +ext_argtype(#10539, 0, #11507) +ext_argtype(#10540, 0, #11507) +ext_argtype(#10543, 0, #11507) +ext_argtype(#10544, 0, #11507) +ext_argtype(#10544, 1, #10037) +ext_argtype(#10545, 0, #11507) +ext_argtype(#10545, 1, #10037) +#11538 = @"C_builtin_function_or_method$_ctypes.PyObj_FromPtr" +ext_argtype(#11538, 0, #11507) +#11539 = @"C_builtin_function_or_method$_ctypes.Py_INCREF" +ext_argtype(#11539, 0, #11507) +#11540 = @"C_builtin_function_or_method$_ctypes.Py_DECREF" +ext_argtype(#11540, 0, #11507) +ext_argtype(#10546, 0, #10010) +ext_argtype(#10546, 1, #10024) +#11541 = @"C_builtin_function_or_method$pwd.getpwuid" +ext_argtype(#11541, 0, #11507) +#11542 = @"C_builtin_function_or_method$_symtable.symtable" +ext_argtype(#11542, 0, #10010) +ext_argtype(#11542, 1, #10010) +ext_argtype(#11542, 2, #10010) +ext_argtype(#10549, 0, #11276) +ext_argtype(#10549, 0, #10081) +ext_argtype(#10549, 1, #10024) +ext_argtype(#10550, 0, #11276) +ext_argtype(#10550, 0, #10081) +ext_argtype(#10550, 1, #10024) +#11543 = @"C_builtin_function_or_method$zlib.compressobj" +ext_argtype(#11543, 0, #10024) +ext_argtype(#11543, 1, #10024) +ext_argtype(#11543, 2, #10024) +ext_argtype(#11543, 3, #10024) +ext_argtype(#11543, 4, #10024) +ext_argtype(#11543, 5, #11276) +ext_argtype(#11543, 5, #10081) +ext_argtype(#10551, 0, #11276) +ext_argtype(#10551, 0, #10081) +ext_argtype(#10551, 1, #10024) +#11544 = @"C_builtin_function_or_method$zlib.decompress" +ext_argtype(#11544, 0, #11276) +ext_argtype(#11544, 0, #10081) +ext_argtype(#11544, 1, #10024) +ext_argtype(#11544, 2, #10024) +#11545 = @"C_builtin_function_or_method$zlib.decompressobj" +ext_argtype(#11545, 0, #10024) +ext_argtype(#11545, 1, #11507) +#11546 = @"C_type$unicodedata.UCD" +ext_argtype(#10552, 0, #11546) +ext_argtype(#10552, 1, #10010) +ext_argtype(#10552, 2, #11507) +ext_argtype(#10553, 0, #11546) +ext_argtype(#10553, 1, #10010) +ext_argtype(#10553, 2, #11507) +ext_argtype(#10554, 0, #11546) +ext_argtype(#10554, 1, #10010) +ext_argtype(#10554, 2, #11507) +#11547 = @"C_builtin_function_or_method$unicodedata.category" +ext_argtype(#11547, 0, #11546) +ext_argtype(#11547, 1, #10010) +#11548 = @"C_builtin_function_or_method$unicodedata.bidirectional" +ext_argtype(#11548, 0, #11546) +ext_argtype(#11548, 1, #10010) +ext_argtype(#10555, 0, #11546) +ext_argtype(#10555, 1, #10010) +ext_argtype(#10556, 0, #11546) +ext_argtype(#10556, 1, #10010) +#11549 = @"C_builtin_function_or_method$unicodedata.east_asian_width" +ext_argtype(#11549, 0, #11546) +ext_argtype(#11549, 1, #10010) +ext_argtype(#10557, 0, #11546) +ext_argtype(#10557, 1, #10010) +#11550 = @"C_builtin_function_or_method$unicodedata.name" +ext_argtype(#11550, 0, #11546) +ext_argtype(#11550, 1, #10010) +ext_argtype(#11550, 2, #11507) +#11551 = @"C_builtin_function_or_method$unicodedata.lookup" +ext_argtype(#11551, 0, #11546) +ext_argtype(#11551, 1, #10010) +#11552 = @"C_builtin_function_or_method$unicodedata.normalize" +ext_argtype(#11552, 0, #11546) +ext_argtype(#11552, 1, #10010) +ext_argtype(#11552, 2, #10010) +ext_argtype(#10558, 0, #11507) +ext_argtype(#10558, 1, #10024) +#11553 = @"C_builtin_function_or_method$math.acos" +ext_argtype(#11553, 0, #11507) +#11554 = @"C_builtin_function_or_method$math.acosh" +ext_argtype(#11554, 0, #11507) +#11555 = @"C_builtin_function_or_method$math.asin" +ext_argtype(#11555, 0, #11507) +#11556 = @"C_builtin_function_or_method$math.asinh" +ext_argtype(#11556, 0, #11507) +#11557 = @"C_builtin_function_or_method$math.atan" +ext_argtype(#11557, 0, #11507) +#11558 = @"C_builtin_function_or_method$math.atanh" +ext_argtype(#11558, 0, #11507) +#11559 = @"C_builtin_function_or_method$math.ceil" +ext_argtype(#11559, 0, #11507) +#11560 = @"C_builtin_function_or_method$math.cos" +ext_argtype(#11560, 0, #11507) +#11561 = @"C_builtin_function_or_method$math.cosh" +ext_argtype(#11561, 0, #11507) +ext_argtype(#10561, 0, #11507) +ext_argtype(#10562, 0, #11507) +ext_argtype(#10563, 0, #11507) +#11562 = @"C_builtin_function_or_method$math.exp" +ext_argtype(#11562, 0, #11507) +#11563 = @"C_builtin_function_or_method$math.expm1" +ext_argtype(#11563, 0, #11507) +#11564 = @"C_builtin_function_or_method$math.fabs" +ext_argtype(#11564, 0, #11507) +ext_argtype(#10564, 0, #11507) +#11565 = @"C_builtin_function_or_method$math.floor" +ext_argtype(#11565, 0, #11507) +ext_argtype(#10566, 0, #11507) +ext_argtype(#10567, 0, #11507) +ext_argtype(#10568, 0, #11507) +ext_argtype(#10570, 0, #11507) +ext_argtype(#10571, 0, #11507) +ext_argtype(#10572, 0, #11507) +ext_argtype(#10573, 0, #10001) +ext_argtype(#10573, 1, #11507) +ext_argtype(#10574, 0, #11507) +#11566 = @"C_builtin_function_or_method$math.log1p" +ext_argtype(#11566, 0, #11507) +ext_argtype(#10576, 0, #11507) +ext_argtype(#10577, 0, #11507) +ext_argtype(#10578, 0, #11507) +ext_argtype(#10580, 0, #11507) +#11567 = @"C_builtin_function_or_method$math.sin" +ext_argtype(#11567, 0, #11507) +#11568 = @"C_builtin_function_or_method$math.sinh" +ext_argtype(#11568, 0, #11507) +#11569 = @"C_builtin_function_or_method$math.sqrt" +ext_argtype(#11569, 0, #11507) +#11570 = @"C_builtin_function_or_method$math.tan" +ext_argtype(#11570, 0, #11507) +#11571 = @"C_builtin_function_or_method$math.tanh" +ext_argtype(#11571, 0, #11507) +#11572 = @"C_builtin_function_or_method$math.trunc" +ext_argtype(#11572, 0, #11507) +ext_argtype(#10585, 0, #10010) +ext_argtype(#10585, 0, #10005) +ext_argtype(#10585, 1, #10010) +ext_argtype(#10585, 1, #10005) +ext_argtype(#10585, 2, #11507) +ext_argtype(#10587, 0, #10024) +#11573 = @"C_builtin_function_or_method$_socket.gethostbyname" +ext_argtype(#11573, 0, #10010) +ext_argtype(#10588, 0, #10010) +ext_argtype(#10589, 0, #10010) +ext_argtype(#10592, 0, #10010) +ext_argtype(#10592, 1, #10010) +#11574 = @"C_builtin_function_or_method$_socket.getservbyport" +ext_argtype(#11574, 0, #10024) +ext_argtype(#11574, 1, #10010) +ext_argtype(#10593, 0, #10010) +ext_argtype(#10594, 0, #11507) +ext_argtype(#10595, 0, #10024) +ext_argtype(#10595, 1, #10024) +ext_argtype(#10595, 2, #10024) +ext_argtype(#10596, 0, #10024) +ext_argtype(#10597, 0, #11507) +ext_argtype(#10598, 0, #10024) +ext_argtype(#10599, 0, #11507) +ext_argtype(#10600, 0, #10010) +#11575 = @"C_builtin_function_or_method$_socket.inet_ntoa" +ext_argtype(#11575, 0, #11276) +ext_argtype(#11575, 0, #10081) +ext_argtype(#10601, 0, #10024) +ext_argtype(#10601, 1, #10010) +#11576 = @"C_builtin_function_or_method$_socket.inet_ntop" +ext_argtype(#11576, 0, #10024) +ext_argtype(#11576, 1, #11276) +ext_argtype(#11576, 1, #10081) +ext_argtype(#10602, 0, #11507) +ext_argtype(#10602, 1, #11507) +ext_argtype(#10602, 2, #10024) +ext_argtype(#10602, 3, #10024) +ext_argtype(#10602, 4, #10024) +ext_argtype(#10602, 5, #10024) +ext_argtype(#10603, 0, #11507) +ext_argtype(#10603, 1, #10024) +ext_argtype(#10605, 0, #11507) +ext_argtype(#10607, 0, #11507) +ext_argtype(#10608, 0, #11507) +ext_argtype(#10609, 0, #10024) +ext_argtype(#10610, 0, #10024) +#11577 = @"C_builtin_function_or_method$resource.getrusage" +ext_argtype(#11577, 0, #10024) +ext_argtype(#10611, 0, #10024) +ext_argtype(#10612, 0, #10024) +ext_argtype(#10612, 1, #11507) +ext_argtype(#10614, 0, #11507) +ext_argtype(#10614, 1, #11507) +ext_argtype(#10614, 2, #10024) +ext_argtype(#10615, 0, #11507) +ext_argtype(#10615, 1, #11507) +ext_argtype(#10615, 2, #11507) +ext_argtype(#10615, 3, #10024) +ext_argtype(#10615, 4, #11507) +ext_argtype(#10615, 5, #11507) +ext_argtype(#10615, 6, #11507) +ext_argtype(#10619, 0, #11507) +ext_argtype(#10623, 0, #11507) +#11578 = @"C_builtin_function_or_method$sys.getsizeof" +ext_argtype(#11578, 0, #11507) +ext_argtype(#11578, 1, #11507) +ext_argtype(#10625, 0, #10024) +ext_argtype(#10627, 0, #10024) +ext_argtype(#10629, 0, #10001) +ext_argtype(#10631, 0, #10024) +ext_argtype(#10632, 0, #11507) +ext_argtype(#10634, 0, #10024) +ext_argtype(#10635, 0, #11507) +#11579 = @"C_builtin_function_or_method$sys.call_tracing" +ext_argtype(#11579, 0, #11507) +ext_argtype(#11579, 1, #10037) +ext_argtype(#10638, 0, #11507) +ext_argtype(#10651, 1, #11507) +ext_argtype(#10651, 2, #11507) +ext_argtype(#10652, 0, #11507) +ext_argtype(#10652, 1, #11507) +#11580 = @"C_builtin_function_or_method$builtins.__import__" +ext_argtype(#11580, 1, #11507) +ext_argtype(#11580, 2, #11507) +ext_argtype(#11580, 3, #11507) +ext_argtype(#11580, 4, #10024) +#11581 = @"C_builtin_function_or_method$builtins.abs" +ext_argtype(#11581, 0, #11507) +ext_argtype(#10653, 0, #11507) +ext_argtype(#10654, 0, #11507) +#11582 = @"C_builtin_function_or_method$builtins.ascii" +ext_argtype(#11582, 0, #11507) +#11583 = @"C_builtin_function_or_method$builtins.bin" +ext_argtype(#11583, 0, #11507) +ext_argtype(#10655, 0, #11507) +#11584 = @"C_builtin_function_or_method$builtins.chr" +ext_argtype(#11584, 0, #10024) +ext_argtype(#10656, 0, #11507) +ext_argtype(#10656, 1, #11507) +ext_argtype(#10656, 2, #10010) +ext_argtype(#10656, 3, #10024) +ext_argtype(#10656, 4, #10024) +ext_argtype(#10656, 5, #10024) +#11585 = @"C_builtin_function_or_method$builtins.format" +ext_argtype(#11585, 0, #11507) +ext_argtype(#10661, 0, #11507) +#11586 = @"C_builtin_function_or_method$builtins.hex" +ext_argtype(#11586, 0, #11507) +ext_argtype(#10662, 0, #11507) +ext_argtype(#10668, 0, #11507) +#11587 = @"C_builtin_function_or_method$builtins.oct" +ext_argtype(#11587, 0, #11507) +ext_argtype(#10670, 0, #11507) +#11588 = @"C_builtin_function_or_method$builtins.repr" +ext_argtype(#11588, 0, #11507) +#11589 = @"C_builtin_function_or_method$builtins.round" +ext_argtype(#11589, 0, #11507) +ext_argtype(#11589, 1, #11507) +ext_argtype(#10673, 0, #11507) +ext_argtype(#10673, 1, #11507) +ext_argtype(#10673, 2, #10024) +ext_argtype(#10676, 0, #11507) +ext_argtype(#10677, 0, #11507) +#11590 = @"C_type$_multiprocessing.SemLock" +ext_argtype(#10679, 0, #11590) +ext_argtype(#10680, 0, #11590) +ext_argtype(#10681, 0, #11590) +ext_argtype(#10682, 0, #11590) +ext_argtype(#10683, 0, #11590) +ext_argtype(#10684, 0, #11590) +ext_argtype(#10685, 0, #11590) +ext_argtype(#10686, 0, #11590) +#11591 = @"C_type$_multiprocessing.SemLock$_rebuild" +ext_argtype(#11591, 0, #11590) +ext_argtype(#10687, 0, #11590) +#11592 = @"C_type$_bz2.BZ2Compressor$compress" +#11593 = @"C_type$_bz2.BZ2Compressor" +ext_argtype(#11592, 0, #11593) +#11594 = @"C_type$_bz2.BZ2Compressor$flush" +ext_argtype(#11594, 0, #11593) +#11595 = @"C_type$_bz2.BZ2Compressor$__getstate__" +ext_argtype(#11595, 0, #11593) +#11596 = @"C_type$_bz2.BZ2Decompressor$decompress" +#11597 = @"C_type$_bz2.BZ2Decompressor" +ext_argtype(#11596, 0, #11597) +#11598 = @"C_type$_bz2.BZ2Decompressor$__getstate__" +ext_argtype(#11598, 0, #11597) +#11599 = @"C_type$_random.Random" +ext_argtype(#10688, 0, #11599) +ext_argtype(#10689, 0, #11599) +ext_argtype(#10690, 0, #11599) +ext_argtype(#10691, 0, #11599) +ext_argtype(#10691, 1, #11507) +ext_argtype(#10692, 0, #11599) +ext_argtype(#10692, 1, #10024) +#11600 = @"C_type$_csv.writer$writerow" +ext_argtype(#11600, 0, #10018) +ext_argtype(#11600, 1, #11507) +ext_argtype(#10693, 0, #10018) +ext_argtype(#10693, 1, #11507) +#11601 = @"C_type$xxsubtype.spamlist" +ext_argtype(#10694, 0, #11601) +ext_argtype(#10695, 0, #11601) +ext_argtype(#10695, 1, #10024) +ext_argtype(#10696, 0, #11601) +#11602 = @"C_type$xxsubtype.spamdict" +ext_argtype(#10698, 0, #11602) +ext_argtype(#10699, 0, #11602) +ext_argtype(#10699, 1, #10024) +#11603 = @"C_type$_collections._deque_iterator" +ext_argtype(#10700, 0, #11603) +ext_argtype(#10700, 0, #10713) +ext_argtype(#10701, 0, #11603) +ext_argtype(#10701, 0, #10713) +ext_argtype(#10702, 0, #11603) +ext_argtype(#10702, 0, #10713) +ext_argtype(#10703, 0, #11603) +ext_argtype(#10703, 0, #10713) +#11604 = @"C_type$collections.deque" +ext_argtype(#10704, 0, #11604) +ext_argtype(#10704, 1, #11507) +ext_argtype(#10705, 0, #11604) +ext_argtype(#10705, 1, #11507) +ext_argtype(#10706, 0, #11604) +#11605 = @"C_type$collections.deque$__copy__" +ext_argtype(#11605, 0, #11604) +ext_argtype(#10707, 0, #11604) +ext_argtype(#10707, 1, #11507) +ext_argtype(#10708, 0, #11604) +ext_argtype(#10708, 1, #11507) +ext_argtype(#10709, 0, #11604) +ext_argtype(#10709, 1, #11507) +#11606 = @"C_type$collections.deque$pop" +ext_argtype(#11606, 0, #11604) +#11607 = @"C_type$collections.deque$popleft" +ext_argtype(#11607, 0, #11604) +ext_argtype(#10710, 0, #11604) +ext_argtype(#10711, 0, #11604) +ext_argtype(#10711, 1, #11507) +ext_argtype(#10712, 0, #11604) +ext_argtype(#10714, 0, #11604) +ext_argtype(#10715, 0, #11604) +ext_argtype(#10715, 1, #10024) +ext_argtype(#10716, 0, #11604) +#11608 = @"C_type$collections.defaultdict$__missing__" +#11609 = @"C_type$collections.defaultdict" +ext_argtype(#11608, 0, #11609) +ext_argtype(#11608, 1, #11507) +#11610 = @"C_type$collections.defaultdict$copy" +ext_argtype(#11610, 0, #11609) +#11611 = @"C_type$collections.defaultdict$__copy__" +ext_argtype(#11611, 0, #11609) +ext_argtype(#10717, 0, #11609) +ext_argtype(#10718, 0, #10030) +#11612 = @"C_type$parser.st$isexpr" +ext_argtype(#11612, 0, #10030) +#11613 = @"C_type$parser.st$issuite" +ext_argtype(#11613, 0, #10030) +ext_argtype(#10719, 0, #10030) +ext_argtype(#10720, 0, #10030) +ext_argtype(#10721, 0, #10030) +ext_argtype(#10722, 0, #10039) +ext_argtype(#10722, 1, #11507) +ext_argtype(#10724, 0, #10039) +ext_argtype(#10724, 1, #11507) +ext_argtype(#10725, 0, #10039) +ext_argtype(#10725, 1, #11507) +ext_argtype(#10726, 0, #10039) +ext_argtype(#10726, 1, #11507) +ext_argtype(#10727, 0, #10039) +ext_argtype(#10727, 1, #11507) +ext_argtype(#10728, 0, #10039) +ext_argtype(#10728, 1, #11507) +ext_argtype(#10729, 0, #10039) +ext_argtype(#10729, 1, #11507) +ext_argtype(#10730, 0, #10039) +ext_argtype(#10730, 1, #11507) +ext_argtype(#10731, 0, #10039) +ext_argtype(#10731, 1, #11507) +ext_argtype(#10732, 0, #10039) +ext_argtype(#10732, 1, #11507) +ext_argtype(#10733, 0, #10039) +ext_argtype(#10733, 1, #11507) +ext_argtype(#10734, 0, #10039) +ext_argtype(#10734, 1, #11507) +ext_argtype(#10735, 0, #10039) +ext_argtype(#10735, 1, #11507) +ext_argtype(#10736, 0, #10039) +ext_argtype(#10736, 1, #11507) +ext_argtype(#10736, 2, #11507) +ext_argtype(#10737, 0, #10039) +ext_argtype(#10737, 1, #11507) +ext_argtype(#10737, 2, #11507) +ext_argtype(#10738, 0, #10039) +ext_argtype(#10738, 1, #11507) +ext_argtype(#10738, 2, #11507) +ext_argtype(#10739, 0, #10039) +ext_argtype(#10739, 1, #11507) +ext_argtype(#10739, 2, #11507) +ext_argtype(#10740, 0, #10039) +ext_argtype(#10740, 1, #11507) +ext_argtype(#10740, 2, #11507) +ext_argtype(#10741, 0, #10039) +ext_argtype(#10741, 1, #11507) +ext_argtype(#10741, 2, #11507) +ext_argtype(#10742, 0, #10039) +ext_argtype(#10742, 1, #11507) +ext_argtype(#10742, 2, #11507) +ext_argtype(#10743, 0, #10039) +ext_argtype(#10743, 1, #11507) +ext_argtype(#10743, 2, #11507) +ext_argtype(#10744, 0, #10039) +ext_argtype(#10744, 1, #11507) +ext_argtype(#10744, 2, #11507) +ext_argtype(#10745, 0, #10039) +ext_argtype(#10745, 1, #11507) +ext_argtype(#10745, 2, #11507) +ext_argtype(#10746, 0, #10039) +ext_argtype(#10746, 1, #11507) +ext_argtype(#10746, 2, #11507) +ext_argtype(#10747, 0, #10039) +ext_argtype(#10747, 1, #11507) +ext_argtype(#10747, 2, #11507) +ext_argtype(#10748, 0, #10039) +ext_argtype(#10748, 1, #11507) +ext_argtype(#10748, 2, #11507) +ext_argtype(#10749, 0, #10039) +ext_argtype(#10749, 1, #11507) +ext_argtype(#10749, 2, #11507) +ext_argtype(#10750, 0, #10039) +ext_argtype(#10750, 1, #11507) +ext_argtype(#10750, 2, #11507) +ext_argtype(#10751, 0, #10039) +ext_argtype(#10751, 1, #11507) +ext_argtype(#10751, 2, #11507) +ext_argtype(#10752, 0, #10039) +ext_argtype(#10752, 1, #11507) +ext_argtype(#10752, 2, #11507) +ext_argtype(#10752, 3, #11507) +ext_argtype(#10753, 0, #10039) +ext_argtype(#10753, 1, #11507) +ext_argtype(#10753, 2, #11507) +ext_argtype(#10753, 3, #11507) +ext_argtype(#10754, 0, #10039) +ext_argtype(#10755, 0, #10039) +ext_argtype(#10756, 0, #10039) +#11614 = @"C_type$decimal.Context$is_canonical" +ext_argtype(#11614, 0, #10039) +ext_argtype(#11614, 1, #11507) +#11615 = @"C_type$decimal.Context$is_finite" +ext_argtype(#11615, 0, #10039) +ext_argtype(#11615, 1, #11507) +#11616 = @"C_type$decimal.Context$is_infinite" +ext_argtype(#11616, 0, #10039) +ext_argtype(#11616, 1, #11507) +#11617 = @"C_type$decimal.Context$is_nan" +ext_argtype(#11617, 0, #10039) +ext_argtype(#11617, 1, #11507) +#11618 = @"C_type$decimal.Context$is_normal" +ext_argtype(#11618, 0, #10039) +ext_argtype(#11618, 1, #11507) +#11619 = @"C_type$decimal.Context$is_qnan" +ext_argtype(#11619, 0, #10039) +ext_argtype(#11619, 1, #11507) +#11620 = @"C_type$decimal.Context$is_signed" +ext_argtype(#11620, 0, #10039) +ext_argtype(#11620, 1, #11507) +#11621 = @"C_type$decimal.Context$is_snan" +ext_argtype(#11621, 0, #10039) +ext_argtype(#11621, 1, #11507) +#11622 = @"C_type$decimal.Context$is_subnormal" +ext_argtype(#11622, 0, #10039) +ext_argtype(#11622, 1, #11507) +#11623 = @"C_type$decimal.Context$is_zero" +ext_argtype(#11623, 0, #10039) +ext_argtype(#11623, 1, #11507) +ext_argtype(#10757, 0, #10039) +ext_argtype(#10757, 1, #11507) +#11624 = @"C_type$decimal.Context$canonical" +ext_argtype(#11624, 0, #10039) +ext_argtype(#11624, 1, #11507) +ext_argtype(#10758, 0, #10039) +ext_argtype(#10758, 1, #11507) +#11625 = @"C_type$decimal.Context$copy_decimal" +ext_argtype(#11625, 0, #10039) +ext_argtype(#11625, 1, #11507) +ext_argtype(#10759, 0, #10039) +ext_argtype(#10759, 1, #11507) +ext_argtype(#10760, 0, #10039) +ext_argtype(#10760, 1, #11507) +ext_argtype(#10761, 0, #10039) +ext_argtype(#10761, 1, #11507) +#11626 = @"C_type$decimal.Context$number_class" +ext_argtype(#11626, 0, #10039) +ext_argtype(#11626, 1, #11507) +#11627 = @"C_type$decimal.Context$to_sci_string" +ext_argtype(#11627, 0, #10039) +ext_argtype(#11627, 1, #11507) +#11628 = @"C_type$decimal.Context$to_eng_string" +ext_argtype(#11628, 0, #10039) +ext_argtype(#11628, 1, #11507) +ext_argtype(#10762, 0, #10039) +ext_argtype(#10762, 1, #11507) +ext_argtype(#10762, 2, #11507) +ext_argtype(#10763, 0, #10039) +ext_argtype(#10763, 1, #11507) +ext_argtype(#10763, 2, #11507) +ext_argtype(#10764, 0, #10039) +ext_argtype(#10764, 1, #11507) +ext_argtype(#10764, 2, #11507) +ext_argtype(#10765, 0, #10039) +ext_argtype(#10765, 1, #11507) +ext_argtype(#10765, 2, #11507) +ext_argtype(#10766, 0, #10039) +ext_argtype(#10766, 1, #11507) +ext_argtype(#10766, 2, #11507) +ext_argtype(#10767, 0, #10039) +ext_argtype(#10767, 1, #11507) +ext_argtype(#10767, 2, #11507) +ext_argtype(#10768, 0, #10039) +ext_argtype(#10768, 1, #11507) +ext_argtype(#10768, 2, #11507) +#11629 = @"C_type$decimal.Context$same_quantum" +ext_argtype(#11629, 0, #10039) +ext_argtype(#11629, 1, #11507) +ext_argtype(#11629, 2, #11507) +ext_argtype(#10769, 0, #10039) +ext_argtype(#10769, 1, #11507) +ext_argtype(#10769, 2, #11507) +ext_argtype(#10770, 0, #10039) +ext_argtype(#10770, 1, #11507) +ext_argtype(#10770, 2, #11507) +ext_argtype(#10771, 0, #10039) +ext_argtype(#10772, 0, #10039) +ext_argtype(#10773, 0, #10039) +ext_argtype(#10774, 0, #10039) +ext_argtype(#10775, 0, #10039) +ext_argtype(#10776, 0, #10039) +ext_argtype(#10776, 1, #11507) +ext_argtype(#10777, 0, #10039) +ext_argtype(#10777, 1, #11507) +ext_argtype(#10778, 0, #10723) +ext_argtype(#10778, 1, #11507) +ext_argtype(#10779, 0, #10723) +ext_argtype(#10779, 1, #11507) +ext_argtype(#10780, 0, #10723) +ext_argtype(#10780, 1, #11507) +ext_argtype(#10781, 0, #10723) +ext_argtype(#10781, 1, #11507) +ext_argtype(#10782, 0, #10723) +ext_argtype(#10782, 1, #11507) +ext_argtype(#10783, 0, #10723) +ext_argtype(#10783, 1, #11507) +ext_argtype(#10784, 0, #10723) +ext_argtype(#10784, 1, #11507) +ext_argtype(#10784, 2, #11507) +ext_argtype(#10785, 0, #10723) +ext_argtype(#10785, 1, #11507) +ext_argtype(#10785, 2, #11507) +ext_argtype(#10786, 0, #10723) +ext_argtype(#10786, 1, #11507) +ext_argtype(#10786, 2, #11507) +ext_argtype(#10787, 0, #10723) +ext_argtype(#10787, 1, #11507) +ext_argtype(#10788, 0, #10723) +ext_argtype(#10788, 1, #11507) +ext_argtype(#10788, 2, #11507) +ext_argtype(#10789, 0, #10723) +ext_argtype(#10789, 1, #11507) +ext_argtype(#10789, 2, #11507) +ext_argtype(#10790, 0, #10723) +ext_argtype(#10790, 1, #11507) +ext_argtype(#10790, 2, #11507) +ext_argtype(#10791, 0, #10723) +ext_argtype(#10791, 1, #11507) +ext_argtype(#10791, 2, #11507) +ext_argtype(#10792, 0, #10723) +ext_argtype(#10792, 1, #11507) +ext_argtype(#10792, 2, #11507) +ext_argtype(#10793, 0, #10723) +ext_argtype(#10793, 1, #11507) +ext_argtype(#10793, 2, #11507) +ext_argtype(#10794, 0, #10723) +ext_argtype(#10794, 1, #11507) +ext_argtype(#10794, 2, #11507) +ext_argtype(#10795, 0, #10723) +ext_argtype(#10795, 1, #11507) +ext_argtype(#10795, 2, #11507) +ext_argtype(#10795, 3, #11507) +ext_argtype(#10796, 0, #10723) +ext_argtype(#10796, 1, #11507) +ext_argtype(#10796, 2, #11507) +ext_argtype(#10797, 0, #10723) +ext_argtype(#10797, 1, #11507) +ext_argtype(#10797, 2, #11507) +ext_argtype(#10797, 3, #11507) +#11630 = @"C_type$decimal.Decimal$is_canonical" +ext_argtype(#11630, 0, #10723) +#11631 = @"C_type$decimal.Decimal$is_finite" +ext_argtype(#11631, 0, #10723) +#11632 = @"C_type$decimal.Decimal$is_infinite" +ext_argtype(#11632, 0, #10723) +#11633 = @"C_type$decimal.Decimal$is_nan" +ext_argtype(#11633, 0, #10723) +#11634 = @"C_type$decimal.Decimal$is_qnan" +ext_argtype(#11634, 0, #10723) +#11635 = @"C_type$decimal.Decimal$is_snan" +ext_argtype(#11635, 0, #10723) +#11636 = @"C_type$decimal.Decimal$is_signed" +ext_argtype(#11636, 0, #10723) +#11637 = @"C_type$decimal.Decimal$is_zero" +ext_argtype(#11637, 0, #10723) +#11638 = @"C_type$decimal.Decimal$is_normal" +ext_argtype(#11638, 0, #10723) +ext_argtype(#11638, 1, #11507) +#11639 = @"C_type$decimal.Decimal$is_subnormal" +ext_argtype(#11639, 0, #10723) +ext_argtype(#11639, 1, #11507) +ext_argtype(#10798, 0, #10723) +#11640 = @"C_type$decimal.Decimal$canonical" +ext_argtype(#11640, 0, #10723) +#11641 = @"C_type$decimal.Decimal$conjugate" +ext_argtype(#11641, 0, #10723) +ext_argtype(#10799, 0, #10723) +ext_argtype(#10800, 0, #10723) +ext_argtype(#10801, 0, #10723) +ext_argtype(#10802, 0, #10723) +ext_argtype(#10802, 1, #11507) +ext_argtype(#10803, 0, #10723) +ext_argtype(#10803, 1, #11507) +#11642 = @"C_type$decimal.Decimal$number_class" +ext_argtype(#11642, 0, #10723) +ext_argtype(#11642, 1, #11507) +#11643 = @"C_type$decimal.Decimal$to_eng_string" +ext_argtype(#11643, 0, #10723) +ext_argtype(#11643, 1, #11507) +ext_argtype(#10804, 0, #10723) +ext_argtype(#10804, 1, #11507) +ext_argtype(#10804, 2, #11507) +ext_argtype(#10805, 0, #10723) +ext_argtype(#10805, 1, #11507) +ext_argtype(#10805, 2, #11507) +ext_argtype(#10806, 0, #10723) +ext_argtype(#10806, 1, #11507) +ext_argtype(#10806, 2, #11507) +#11644 = @"C_type$decimal.Decimal$same_quantum" +ext_argtype(#11644, 0, #10723) +ext_argtype(#11644, 1, #11507) +ext_argtype(#11644, 2, #11507) +ext_argtype(#10807, 0, #10723) +ext_argtype(#10807, 1, #11507) +ext_argtype(#10807, 2, #11507) +ext_argtype(#10808, 0, #10723) +ext_argtype(#10808, 1, #11507) +ext_argtype(#10808, 2, #11507) +ext_argtype(#10809, 0, #10723) +ext_argtype(#10809, 1, #11507) +ext_argtype(#10809, 2, #11507) +ext_argtype(#10810, 0, #10723) +ext_argtype(#10810, 1, #11507) +ext_argtype(#10810, 2, #11507) +ext_argtype(#10811, 0, #10723) +ext_argtype(#10811, 1, #11507) +ext_argtype(#10811, 2, #11507) +ext_argtype(#10812, 0, #10723) +ext_argtype(#10812, 1, #11507) +ext_argtype(#10812, 2, #11507) +ext_argtype(#10813, 0, #10723) +ext_argtype(#10813, 1, #11507) +#11645 = @"C_type$decimal.Decimal$as_tuple" +ext_argtype(#11645, 0, #10723) +#11646 = @"C_type$decimal.Decimal$__copy__" +ext_argtype(#11646, 0, #10723) +#11647 = @"C_type$decimal.Decimal$__deepcopy__" +ext_argtype(#11647, 0, #10723) +ext_argtype(#11647, 1, #11507) +#11648 = @"C_type$decimal.Decimal$__format__" +ext_argtype(#11648, 0, #10723) +ext_argtype(#11648, 1, #11507) +ext_argtype(#11648, 2, #11507) +ext_argtype(#10814, 0, #10723) +ext_argtype(#10815, 0, #10723) +ext_argtype(#10815, 1, #11507) +ext_argtype(#10816, 0, #10723) +ext_argtype(#10817, 0, #10723) +ext_argtype(#10818, 0, #10723) +ext_argtype(#10819, 0, #10723) +ext_argtype(#10820, 0, #10723) +#11649 = @"C_type$decimal.ContextManager$__enter__" +ext_argtype(#11649, 0, #10042) +ext_argtype(#10821, 0, #10042) +#11650 = @"C_type$decimal.SignalDictMixin" +ext_argtype(#10822, 0, #11650) +#11651 = @"C_type$zipimport.zipimporter" +ext_argtype(#10823, 0, #11651) +ext_argtype(#10823, 2, #11507) +ext_argtype(#10824, 0, #11651) +ext_argtype(#10824, 2, #11507) +#11652 = @"C_type$zipimport.zipimporter$load_module" +ext_argtype(#11652, 0, #11651) +ext_argtype(#10825, 0, #11651) +ext_argtype(#10826, 0, #11651) +ext_argtype(#10827, 0, #11651) +#11653 = @"C_type$zipimport.zipimporter$get_filename" +ext_argtype(#11653, 0, #11651) +ext_argtype(#10828, 0, #11651) +#11654 = @"C_type$arrayiterator" +ext_argtype(#10829, 0, #11654) +ext_argtype(#10830, 0, #11654) +ext_argtype(#10830, 1, #11507) +#11655 = @"C_type$array.array" +ext_argtype(#10831, 0, #11655) +ext_argtype(#10831, 1, #11507) +ext_argtype(#10832, 0, #11655) +ext_argtype(#10833, 0, #11655) +#11656 = @"C_type$array.array$__copy__" +ext_argtype(#11656, 0, #11655) +ext_argtype(#10834, 0, #11655) +ext_argtype(#10834, 1, #11507) +#11657 = @"C_type$array.array$__deepcopy__" +ext_argtype(#11657, 0, #11655) +ext_argtype(#11657, 1, #11507) +ext_argtype(#10835, 0, #11655) +ext_argtype(#10835, 1, #11507) +ext_argtype(#10836, 0, #11655) +ext_argtype(#10837, 0, #11655) +ext_argtype(#10837, 1, #11507) +ext_argtype(#10838, 0, #11655) +ext_argtype(#10839, 0, #11655) +ext_argtype(#10840, 0, #11655) +ext_argtype(#10841, 0, #11655) +ext_argtype(#10841, 1, #11507) +ext_argtype(#10842, 0, #11655) +#11658 = @"C_type$array.array$pop" +ext_argtype(#11658, 0, #11655) +ext_argtype(#10843, 0, #11655) +ext_argtype(#10843, 1, #11507) +ext_argtype(#10844, 0, #11655) +ext_argtype(#10844, 1, #11507) +ext_argtype(#10845, 0, #11655) +ext_argtype(#10846, 0, #11655) +ext_argtype(#10846, 1, #11507) +ext_argtype(#10847, 0, #11655) +ext_argtype(#10848, 0, #11655) +ext_argtype(#10849, 0, #11655) +ext_argtype(#10850, 0, #11655) +ext_argtype(#10851, 0, #11655) +ext_argtype(#10852, 0, #10062) +ext_argtype(#10853, 0, #10062) +#11659 = @"C_type$MultibyteIncrementalEncoder" +ext_argtype(#10854, 0, #11659) +ext_argtype(#10855, 0, #11659) +#11660 = @"C_type$MultibyteIncrementalDecoder$3decode" +#11661 = @"C_type$MultibyteIncrementalDecoder" +ext_argtype(#11660, 0, #11661) +ext_argtype(#10856, 0, #11661) +#11662 = @"C_type$MultibyteStreamReader$3read" +#11663 = @"C_type$MultibyteStreamReader" +ext_argtype(#11662, 0, #11663) +#11664 = @"C_type$MultibyteStreamReader$3readline" +ext_argtype(#11664, 0, #11663) +ext_argtype(#10857, 0, #11663) +ext_argtype(#10858, 0, #11663) +#11665 = @"C_type$MultibyteStreamWriter" +ext_argtype(#10859, 0, #11665) +ext_argtype(#10859, 1, #11507) +ext_argtype(#10860, 0, #11665) +ext_argtype(#10860, 1, #11507) +ext_argtype(#10861, 0, #11665) +#11666 = @"C_type$Struct" +ext_argtype(#10862, 0, #11666) +ext_argtype(#10863, 0, #11666) +ext_argtype(#10864, 0, #11666) +ext_argtype(#10864, 1, #11507) +ext_argtype(#10865, 0, #11666) +ext_argtype(#10866, 0, #11666) +#11667 = @"C_type$_ssl._SSLContext" +ext_argtype(#10867, 0, #11667) +ext_argtype(#10869, 0, #11667) +ext_argtype(#10869, 1, #10010) +ext_argtype(#10870, 0, #11667) +ext_argtype(#10870, 1, #11276) +ext_argtype(#10870, 1, #10081) +ext_argtype(#10871, 0, #11667) +ext_argtype(#10871, 1, #11507) +ext_argtype(#10871, 2, #11507) +ext_argtype(#10871, 3, #11507) +ext_argtype(#10872, 0, #11667) +ext_argtype(#10872, 1, #11507) +ext_argtype(#10873, 0, #11667) +ext_argtype(#10873, 1, #11507) +ext_argtype(#10873, 2, #11507) +ext_argtype(#10874, 0, #11667) +ext_argtype(#10875, 0, #11667) +ext_argtype(#10876, 0, #11667) +ext_argtype(#10876, 1, #11507) +ext_argtype(#10877, 0, #10868) +ext_argtype(#10878, 0, #10868) +ext_argtype(#10878, 1, #11276) +ext_argtype(#10878, 1, #10081) +ext_argtype(#10879, 0, #10868) +ext_argtype(#10879, 1, #10024) +ext_argtype(#10880, 0, #10868) +ext_argtype(#10881, 0, #10868) +ext_argtype(#10881, 1, #11507) +ext_argtype(#10882, 0, #10868) +ext_argtype(#10883, 0, #10868) +ext_argtype(#10884, 0, #10868) +ext_argtype(#10885, 0, #10868) +ext_argtype(#10887, 0, #10868) +ext_argtype(#10888, 0, #10124) +ext_argtype(#10888, 1, #10024) +ext_argtype(#10888, 2, #10001) +ext_argtype(#10889, 0, #10124) +ext_argtype(#10889, 1, #10024) +ext_argtype(#10889, 2, #10001) +ext_argtype(#10890, 0, #10124) +ext_argtype(#10891, 0, #10124) +ext_argtype(#10892, 0, #10124) +ext_argtype(#10893, 0, #10124) +ext_argtype(#10894, 0, #10124) +ext_argtype(#10894, 1, #10024) +ext_argtype(#10894, 2, #10001) +ext_argtype(#10895, 0, #10124) +#11668 = @"C_type$_thread.RLock" +ext_argtype(#10896, 0, #11668) +ext_argtype(#10896, 1, #10024) +ext_argtype(#10896, 2, #10001) +ext_argtype(#10897, 0, #11668) +ext_argtype(#10898, 0, #11668) +ext_argtype(#10899, 0, #11668) +ext_argtype(#10899, 1, #11507) +ext_argtype(#10900, 0, #11668) +ext_argtype(#10901, 0, #11668) +ext_argtype(#10901, 1, #10024) +ext_argtype(#10901, 2, #10001) +ext_argtype(#10902, 0, #11668) +ext_argtype(#10903, 0, #10169) +ext_argtype(#10904, 0, #10169) +ext_argtype(#10905, 0, #10169) +ext_argtype(#10906, 0, #10169) +ext_argtype(#10907, 0, #10189) +ext_argtype(#10907, 0, #10191) +ext_argtype(#10908, 0, #10189) +ext_argtype(#10908, 0, #10191) +#11669 = @"C_type$_sha256.sha256$hexdigest" +ext_argtype(#11669, 0, #10189) +ext_argtype(#11669, 0, #10191) +ext_argtype(#10909, 0, #10189) +ext_argtype(#10909, 0, #10191) +ext_argtype(#10909, 1, #11507) +ext_argtype(#10910, 0, #10189) +ext_argtype(#10910, 0, #10191) +ext_argtype(#10911, 0, #10189) +ext_argtype(#10911, 0, #10191) +#11670 = @"C_type$_sha256.sha224$hexdigest" +ext_argtype(#11670, 0, #10189) +ext_argtype(#11670, 0, #10191) +ext_argtype(#10912, 0, #10189) +ext_argtype(#10912, 0, #10191) +ext_argtype(#10912, 1, #11507) +#11671 = @"C_type$functools.partial" +ext_argtype(#10913, 0, #11671) +ext_argtype(#10914, 0, #11671) +ext_argtype(#10914, 1, #11507) +#11672 = @"C_type$_pickle.Pickler" +ext_argtype(#10915, 0, #11672) +ext_argtype(#10915, 1, #11507) +ext_argtype(#10916, 0, #11672) +#11673 = @"C_type$_pickle.PicklerMemoProxy" +ext_argtype(#10917, 0, #11673) +ext_argtype(#10918, 0, #11673) +ext_argtype(#10919, 0, #11673) +#11674 = @"C_type$_pickle.Unpickler$load" +#11675 = @"C_type$_pickle.Unpickler" +ext_argtype(#11674, 0, #11675) +#11676 = @"C_type$_pickle.Unpickler$find_class" +ext_argtype(#11676, 0, #11675) +#11677 = @"C_type$_pickle.UnpicklerMemoProxy" +ext_argtype(#10920, 0, #11677) +ext_argtype(#10921, 0, #11677) +ext_argtype(#10922, 0, #11677) +ext_argtype(#10923, 0, #10223) +ext_argtype(#10924, 0, #10223) +#11678 = @"C_type$_md5.md5$hexdigest" +ext_argtype(#11678, 0, #10223) +ext_argtype(#10925, 0, #10223) +ext_argtype(#10925, 1, #11507) +ext_argtype(#10926, 0, #10249) +ext_argtype(#10927, 0, #10249) +#11679 = @"C_type$_sha1.sha1$hexdigest" +ext_argtype(#11679, 0, #10249) +ext_argtype(#10928, 0, #10249) +ext_argtype(#10928, 1, #11507) +#11680 = @"C_type$_sre.SRE_Match" +ext_argtype(#10929, 0, #11680) +ext_argtype(#10930, 0, #11680) +ext_argtype(#10931, 0, #11680) +ext_argtype(#10932, 0, #11680) +ext_argtype(#10933, 0, #11680) +ext_argtype(#10934, 0, #11680) +#11681 = @"C_type$_sre.SRE_Match$expand" +ext_argtype(#11681, 0, #11680) +ext_argtype(#11681, 1, #11507) +#11682 = @"C_type$_sre.SRE_Match$__copy__" +ext_argtype(#11682, 0, #11680) +#11683 = @"C_type$_sre.SRE_Match$__deepcopy__" +ext_argtype(#11683, 0, #11680) +ext_argtype(#11683, 1, #11507) +#11684 = @"C_type$_sre.SRE_Scanner" +ext_argtype(#10935, 0, #11684) +ext_argtype(#10936, 0, #11684) +#11685 = @"C_type$_sre.SRE_Pattern" +ext_argtype(#10937, 0, #11685) +ext_argtype(#10938, 0, #11685) +ext_argtype(#10939, 0, #11685) +ext_argtype(#10940, 0, #11685) +ext_argtype(#10941, 0, #11685) +ext_argtype(#10942, 0, #11685) +ext_argtype(#10943, 0, #11685) +#11686 = @"C_type$_sre.SRE_Pattern$scanner" +ext_argtype(#11686, 0, #11685) +#11687 = @"C_type$_sre.SRE_Pattern$__copy__" +ext_argtype(#11687, 0, #11685) +#11688 = @"C_type$_sre.SRE_Pattern$__deepcopy__" +ext_argtype(#11688, 0, #11685) +ext_argtype(#11688, 1, #11507) +#11689 = @"C_type$datetime.timedelta$total_seconds" +#11690 = @"C_type$datetime.timedelta" +ext_argtype(#11689, 0, #11690) +ext_argtype(#10944, 0, #11690) +#11691 = @"C_type$datetime.tzinfo$tzname" +#11692 = @"C_type$datetime.tzinfo" +ext_argtype(#11691, 0, #11692) +ext_argtype(#11691, 1, #11507) +#11693 = @"C_type$datetime.tzinfo$utcoffset" +ext_argtype(#11693, 0, #11692) +ext_argtype(#11693, 1, #11507) +#11694 = @"C_type$datetime.tzinfo$dst" +ext_argtype(#11694, 0, #11692) +ext_argtype(#11694, 1, #11507) +#11695 = @"C_type$datetime.tzinfo$fromutc" +ext_argtype(#11695, 0, #11692) +ext_argtype(#11695, 1, #11507) +ext_argtype(#10945, 0, #11692) +#11696 = @"C_type$datetime.datetime$now" +#11697 = @"C_type$datetime.datetime" +ext_argtype(#11696, 0, #11697) +ext_argtype(#11696, 1, #11507) +#11698 = @"C_type$datetime.datetime$utcnow" +ext_argtype(#11698, 0, #11697) +#11699 = @"C_type$datetime.datetime$fromtimestamp" +ext_argtype(#11699, 0, #11697) +ext_argtype(#11699, 1, #11507) +ext_argtype(#11699, 2, #11507) +#11700 = @"C_type$datetime.datetime$utcfromtimestamp" +ext_argtype(#11700, 0, #11697) +ext_argtype(#11700, 1, #11507) +#11701 = @"C_type$datetime.datetime$strptime" +ext_argtype(#11701, 0, #11697) +#11702 = @"C_type$datetime.datetime$combine" +ext_argtype(#11702, 0, #11697) +#11703 = @"C_type$datetime.date" +ext_argtype(#11702, 1, #11703) +#11704 = @"C_type$datetime.time" +ext_argtype(#11702, 2, #11704) +#11705 = @"C_type$datetime.datetime$date" +ext_argtype(#11705, 0, #11697) +#11706 = @"C_type$datetime.datetime$time" +ext_argtype(#11706, 0, #11697) +#11707 = @"C_type$datetime.datetime$timetz" +ext_argtype(#11707, 0, #11697) +#11708 = @"C_type$datetime.datetime$ctime" +ext_argtype(#11708, 0, #11697) +#11709 = @"C_type$datetime.datetime$timetuple" +ext_argtype(#11709, 0, #11697) +ext_argtype(#10946, 0, #11697) +#11710 = @"C_type$datetime.datetime$utctimetuple" +ext_argtype(#11710, 0, #11697) +#11711 = @"C_type$datetime.datetime$isoformat" +ext_argtype(#11711, 0, #11697) +ext_argtype(#10947, 0, #11697) +ext_argtype(#10948, 0, #11697) +ext_argtype(#10949, 0, #11697) +#11712 = @"C_type$datetime.datetime$replace" +ext_argtype(#11712, 0, #11697) +ext_argtype(#11712, 1, #10024) +ext_argtype(#11712, 2, #10024) +ext_argtype(#11712, 3, #10024) +ext_argtype(#11712, 4, #10024) +ext_argtype(#11712, 5, #10024) +ext_argtype(#11712, 6, #10024) +ext_argtype(#11712, 7, #10024) +ext_argtype(#11712, 8, #11507) +#11713 = @"C_type$datetime.datetime$astimezone" +ext_argtype(#11713, 0, #11697) +ext_argtype(#11713, 1, #11507) +ext_argtype(#10950, 0, #11697) +#11714 = @"C_type$datetime.time$isoformat" +ext_argtype(#11714, 0, #11704) +#11715 = @"C_type$datetime.time$strftime" +ext_argtype(#11715, 0, #11704) +#11716 = @"C_type$datetime.time$__format__" +ext_argtype(#11716, 0, #11704) +ext_argtype(#10951, 0, #11704) +ext_argtype(#10952, 0, #11704) +ext_argtype(#10953, 0, #11704) +#11717 = @"C_type$datetime.time$replace" +ext_argtype(#11717, 0, #11704) +ext_argtype(#11717, 1, #10024) +ext_argtype(#11717, 2, #10024) +ext_argtype(#11717, 3, #10024) +ext_argtype(#11717, 4, #10024) +ext_argtype(#11717, 5, #11507) +ext_argtype(#10954, 0, #11704) +#11718 = @"C_type$datetime.timezone$tzname" +#11719 = @"C_type$datetime.timezone" +ext_argtype(#11718, 0, #11719) +ext_argtype(#11718, 1, #11507) +#11720 = @"C_type$datetime.timezone$utcoffset" +ext_argtype(#11720, 0, #11719) +ext_argtype(#11720, 1, #11507) +ext_argtype(#10955, 0, #11719) +ext_argtype(#10955, 1, #11507) +#11721 = @"C_type$datetime.timezone$fromutc" +ext_argtype(#11721, 0, #11719) +ext_argtype(#11721, 1, #11507) +ext_argtype(#10956, 0, #11719) +#11722 = @"C_type$datetime.date$fromtimestamp" +ext_argtype(#11722, 0, #11703) +ext_argtype(#11722, 1, #11507) +#11723 = @"C_type$datetime.date$fromordinal" +ext_argtype(#11723, 0, #11703) +ext_argtype(#11723, 1, #10024) +#11724 = @"C_type$datetime.date$today" +ext_argtype(#11724, 0, #11703) +#11725 = @"C_type$datetime.date$ctime" +ext_argtype(#11725, 0, #11703) +#11726 = @"C_type$datetime.date$strftime" +ext_argtype(#11726, 0, #11703) +#11727 = @"C_type$datetime.date$__format__" +ext_argtype(#11727, 0, #11703) +#11728 = @"C_type$datetime.date$timetuple" +ext_argtype(#11728, 0, #11703) +ext_argtype(#10957, 0, #11703) +#11729 = @"C_type$datetime.date$isoformat" +ext_argtype(#11729, 0, #11703) +ext_argtype(#10958, 0, #11703) +ext_argtype(#10959, 0, #11703) +ext_argtype(#10960, 0, #11703) +#11730 = @"C_type$datetime.date$replace" +ext_argtype(#11730, 0, #11703) +ext_argtype(#11730, 1, #10024) +ext_argtype(#11730, 2, #10024) +ext_argtype(#11730, 3, #10024) +ext_argtype(#10961, 0, #11703) +#11731 = @"C_type$ndarray" +ext_argtype(#10962, 0, #11731) +ext_argtype(#10963, 0, #11731) +ext_argtype(#10964, 0, #11731) +ext_argtype(#10965, 0, #11731) +ext_argtype(#10966, 0, #11731) +ext_argtype(#10967, 0, #11731) +#11732 = @"C_type$mmap.mmap" +ext_argtype(#10968, 0, #11732) +ext_argtype(#10969, 0, #11732) +ext_argtype(#10970, 0, #11732) +ext_argtype(#10971, 0, #11732) +ext_argtype(#10972, 0, #11732) +ext_argtype(#10973, 0, #11732) +ext_argtype(#10974, 0, #11732) +ext_argtype(#10975, 0, #11732) +ext_argtype(#10976, 0, #11732) +ext_argtype(#10977, 0, #11732) +ext_argtype(#10978, 0, #11732) +ext_argtype(#10979, 0, #11732) +ext_argtype(#10980, 0, #11732) +ext_argtype(#10981, 0, #11732) +#11733 = @"C_type$mmap.mmap$__enter__" +ext_argtype(#11733, 0, #11732) +#11734 = @"C_type$mmap.mmap$__exit__" +ext_argtype(#11734, 0, #11732) +ext_argtype(#10982, 0, #10411) +ext_argtype(#10982, 1, #11507) +ext_argtype(#10982, 2, #11507) +ext_argtype(#10983, 0, #10411) +ext_argtype(#10983, 1, #11507) +ext_argtype(#10983, 2, #11507) +ext_argtype(#10984, 0, #10411) +ext_argtype(#10984, 1, #11507) +ext_argtype(#10985, 0, #10411) +#11735 = @"C_type$select.epoll$fromfd" +#11736 = @"C_type$select.epoll" +ext_argtype(#11735, 0, #11736) +ext_argtype(#11735, 1, #10024) +ext_argtype(#10986, 0, #11736) +ext_argtype(#10987, 0, #11736) +ext_argtype(#10988, 0, #11736) +ext_argtype(#10988, 1, #11507) +ext_argtype(#10988, 2, #10024) +ext_argtype(#10989, 0, #11736) +ext_argtype(#10989, 1, #11507) +ext_argtype(#10989, 2, #10024) +ext_argtype(#10990, 0, #11736) +ext_argtype(#10990, 1, #11507) +ext_argtype(#10991, 0, #11736) +ext_argtype(#10991, 1, #10001) +ext_argtype(#10991, 2, #10024) +#11737 = @"C_type$_io._TextIOBase$detach" +#11738 = @"C_type$_io._TextIOBase" +ext_argtype(#11737, 0, #11738) +#11739 = @"C_type$_io._TextIOBase$read" +ext_argtype(#11739, 0, #11738) +#11740 = @"C_type$_io._TextIOBase$readline" +ext_argtype(#11740, 0, #11738) +#11741 = @"C_type$_io._TextIOBase$write" +ext_argtype(#11741, 0, #11738) +#11742 = @"C_type$_io.IncrementalNewlineDecoder$decode" +#11743 = @"C_type$_io.IncrementalNewlineDecoder" +ext_argtype(#11742, 0, #11743) +ext_argtype(#10992, 0, #11743) +ext_argtype(#10993, 0, #11743) +ext_argtype(#10993, 1, #11507) +ext_argtype(#10994, 0, #11743) +#11744 = @"C_type$_io.TextIOWrapper$detach" +#11745 = @"C_type$_io.TextIOWrapper" +ext_argtype(#11744, 0, #11745) +ext_argtype(#10995, 0, #11745) +#11746 = @"C_type$_io.TextIOWrapper$read" +ext_argtype(#11746, 0, #11745) +#11747 = @"C_type$_io.TextIOWrapper$readline" +ext_argtype(#11747, 0, #11745) +#11748 = @"C_type$_io.TextIOWrapper$flush" +ext_argtype(#11748, 0, #11745) +ext_argtype(#10996, 0, #11745) +#11749 = @"C_type$_io.TextIOWrapper$fileno" +ext_argtype(#11749, 0, #11745) +#11750 = @"C_type$_io.TextIOWrapper$seekable" +ext_argtype(#11750, 0, #11745) +#11751 = @"C_type$_io.TextIOWrapper$readable" +ext_argtype(#11751, 0, #11745) +#11752 = @"C_type$_io.TextIOWrapper$writable" +ext_argtype(#11752, 0, #11745) +#11753 = @"C_type$_io.TextIOWrapper$isatty" +ext_argtype(#11753, 0, #11745) +#11754 = @"C_type$_io.TextIOWrapper$__getstate__" +ext_argtype(#11754, 0, #11745) +#11755 = @"C_type$_io.TextIOWrapper$seek" +ext_argtype(#11755, 0, #11745) +ext_argtype(#10997, 0, #11745) +#11756 = @"C_type$_io.TextIOWrapper$truncate" +ext_argtype(#11756, 0, #11745) +#11757 = @"C_type$_io.BytesIO" +ext_argtype(#10998, 0, #11757) +ext_argtype(#10999, 0, #11757) +ext_argtype(#11000, 0, #11757) +ext_argtype(#11001, 0, #11757) +ext_argtype(#11002, 0, #11757) +ext_argtype(#11003, 0, #11757) +ext_argtype(#11004, 0, #11757) +ext_argtype(#11005, 0, #11757) +ext_argtype(#11005, 1, #11507) +ext_argtype(#11006, 0, #11757) +ext_argtype(#11006, 1, #11507) +ext_argtype(#11007, 0, #11757) +ext_argtype(#11007, 1, #11507) +ext_argtype(#11008, 0, #11757) +ext_argtype(#11008, 1, #11507) +ext_argtype(#11009, 0, #11757) +ext_argtype(#11009, 1, #11507) +ext_argtype(#11010, 0, #11757) +ext_argtype(#11010, 1, #11507) +ext_argtype(#11011, 0, #11757) +ext_argtype(#11011, 1, #11507) +ext_argtype(#11012, 0, #11757) +ext_argtype(#11013, 0, #11757) +ext_argtype(#11014, 0, #11757) +ext_argtype(#11014, 1, #10024) +ext_argtype(#11014, 2, #10024) +ext_argtype(#11015, 0, #11757) +ext_argtype(#11015, 1, #11507) +ext_argtype(#11016, 0, #11757) +ext_argtype(#11017, 0, #11757) +ext_argtype(#11017, 1, #11507) +ext_argtype(#11018, 0, #11757) +#11758 = @"C_type$_io._IOBase$seek" +#11759 = @"C_type$_io._IOBase" +ext_argtype(#11758, 0, #11759) +#11760 = @"C_type$_io._IOBase$tell" +ext_argtype(#11760, 0, #11759) +#11761 = @"C_type$_io._IOBase$truncate" +ext_argtype(#11761, 0, #11759) +ext_argtype(#11019, 0, #11759) +ext_argtype(#11020, 0, #11759) +ext_argtype(#11021, 0, #11759) +ext_argtype(#11022, 0, #11759) +ext_argtype(#11023, 0, #11759) +ext_argtype(#11024, 0, #11759) +#11762 = @"C_type$_io._IOBase$_checkSeekable" +ext_argtype(#11762, 0, #11759) +#11763 = @"C_type$_io._IOBase$_checkReadable" +ext_argtype(#11763, 0, #11759) +#11764 = @"C_type$_io._IOBase$_checkWritable" +ext_argtype(#11764, 0, #11759) +#11765 = @"C_type$_io._IOBase$fileno" +ext_argtype(#11765, 0, #11759) +ext_argtype(#11025, 0, #11759) +#11766 = @"C_type$_io._IOBase$__enter__" +ext_argtype(#11766, 0, #11759) +#11767 = @"C_type$_io._IOBase$__exit__" +ext_argtype(#11767, 0, #11759) +ext_argtype(#11026, 0, #11759) +ext_argtype(#11027, 0, #11759) +ext_argtype(#11028, 0, #11759) +#11768 = @"C_type$_io._RawIOBase" +ext_argtype(#11029, 0, #11768) +ext_argtype(#11030, 0, #11768) +#11769 = @"C_type$_io._BufferedIOBase$detach" +#11770 = @"C_type$_io._BufferedIOBase" +ext_argtype(#11769, 0, #11770) +#11771 = @"C_type$_io._BufferedIOBase$read" +ext_argtype(#11771, 0, #11770) +#11772 = @"C_type$_io._BufferedIOBase$read1" +ext_argtype(#11772, 0, #11770) +ext_argtype(#11031, 0, #11770) +#11773 = @"C_type$_io._BufferedIOBase$write" +ext_argtype(#11773, 0, #11770) +#11774 = @"C_type$_io.BufferedReader$detach" +#11775 = @"C_type$_io.BufferedReader" +ext_argtype(#11774, 0, #11775) +#11776 = @"C_type$_io.BufferedReader$flush" +ext_argtype(#11776, 0, #11775) +ext_argtype(#11032, 0, #11775) +#11777 = @"C_type$_io.BufferedReader$seekable" +ext_argtype(#11777, 0, #11775) +#11778 = @"C_type$_io.BufferedReader$readable" +ext_argtype(#11778, 0, #11775) +#11779 = @"C_type$_io.BufferedReader$writable" +ext_argtype(#11779, 0, #11775) +#11780 = @"C_type$_io.BufferedReader$fileno" +ext_argtype(#11780, 0, #11775) +#11781 = @"C_type$_io.BufferedReader$isatty" +ext_argtype(#11781, 0, #11775) +ext_argtype(#11033, 0, #11775) +ext_argtype(#11033, 1, #11507) +#11782 = @"C_type$_io.BufferedReader$__getstate__" +ext_argtype(#11782, 0, #11775) +ext_argtype(#11034, 0, #11775) +ext_argtype(#11035, 0, #11775) +ext_argtype(#11036, 0, #11775) +ext_argtype(#11037, 0, #11775) +ext_argtype(#11038, 0, #11775) +ext_argtype(#11039, 0, #11775) +ext_argtype(#11040, 0, #11775) +ext_argtype(#11041, 0, #11775) +ext_argtype(#11042, 0, #11775) +#11783 = @"C_type$_io.BufferedRandom" +ext_argtype(#11043, 0, #11783) +#11784 = @"C_type$_io.BufferedRandom$detach" +ext_argtype(#11784, 0, #11783) +#11785 = @"C_type$_io.BufferedRandom$seekable" +ext_argtype(#11785, 0, #11783) +#11786 = @"C_type$_io.BufferedRandom$readable" +ext_argtype(#11786, 0, #11783) +#11787 = @"C_type$_io.BufferedRandom$writable" +ext_argtype(#11787, 0, #11783) +#11788 = @"C_type$_io.BufferedRandom$fileno" +ext_argtype(#11788, 0, #11783) +#11789 = @"C_type$_io.BufferedRandom$isatty" +ext_argtype(#11789, 0, #11783) +ext_argtype(#11044, 0, #11783) +ext_argtype(#11044, 1, #11507) +#11790 = @"C_type$_io.BufferedRandom$__getstate__" +ext_argtype(#11790, 0, #11783) +ext_argtype(#11045, 0, #11783) +ext_argtype(#11046, 0, #11783) +ext_argtype(#11047, 0, #11783) +ext_argtype(#11048, 0, #11783) +ext_argtype(#11049, 0, #11783) +ext_argtype(#11050, 0, #11783) +ext_argtype(#11051, 0, #11783) +ext_argtype(#11052, 0, #11783) +ext_argtype(#11053, 0, #11783) +ext_argtype(#11054, 0, #11783) +ext_argtype(#11055, 0, #11783) +#11791 = @"C_type$_io.BufferedWriter" +ext_argtype(#11056, 0, #11791) +#11792 = @"C_type$_io.BufferedWriter$detach" +ext_argtype(#11792, 0, #11791) +#11793 = @"C_type$_io.BufferedWriter$seekable" +ext_argtype(#11793, 0, #11791) +#11794 = @"C_type$_io.BufferedWriter$readable" +ext_argtype(#11794, 0, #11791) +#11795 = @"C_type$_io.BufferedWriter$writable" +ext_argtype(#11795, 0, #11791) +#11796 = @"C_type$_io.BufferedWriter$fileno" +ext_argtype(#11796, 0, #11791) +#11797 = @"C_type$_io.BufferedWriter$isatty" +ext_argtype(#11797, 0, #11791) +ext_argtype(#11057, 0, #11791) +ext_argtype(#11057, 1, #11507) +#11798 = @"C_type$_io.BufferedWriter$__getstate__" +ext_argtype(#11798, 0, #11791) +ext_argtype(#11058, 0, #11791) +ext_argtype(#11059, 0, #11791) +ext_argtype(#11060, 0, #11791) +ext_argtype(#11061, 0, #11791) +ext_argtype(#11062, 0, #11791) +ext_argtype(#11063, 0, #11791) +#11799 = @"C_type$_io.BufferedRWPair$read" +#11800 = @"C_type$_io.BufferedRWPair" +ext_argtype(#11799, 0, #11800) +#11801 = @"C_type$_io.BufferedRWPair$peek" +ext_argtype(#11801, 0, #11800) +#11802 = @"C_type$_io.BufferedRWPair$read1" +ext_argtype(#11802, 0, #11800) +#11803 = @"C_type$_io.BufferedRWPair$readinto" +ext_argtype(#11803, 0, #11800) +#11804 = @"C_type$_io.BufferedRWPair$write" +ext_argtype(#11804, 0, #11800) +#11805 = @"C_type$_io.BufferedRWPair$flush" +ext_argtype(#11805, 0, #11800) +#11806 = @"C_type$_io.BufferedRWPair$readable" +ext_argtype(#11806, 0, #11800) +#11807 = @"C_type$_io.BufferedRWPair$writable" +ext_argtype(#11807, 0, #11800) +#11808 = @"C_type$_io.BufferedRWPair$close" +ext_argtype(#11808, 0, #11800) +#11809 = @"C_type$_io.BufferedRWPair$isatty" +ext_argtype(#11809, 0, #11800) +#11810 = @"C_type$_io.BufferedRWPair$__getstate__" +ext_argtype(#11810, 0, #11800) +#11811 = @"C_type$_io.StringIO" +ext_argtype(#11064, 0, #11811) +#11812 = @"C_type$_io.StringIO$getvalue" +ext_argtype(#11812, 0, #11811) +#11813 = @"C_type$_io.StringIO$read" +ext_argtype(#11813, 0, #11811) +#11814 = @"C_type$_io.StringIO$readline" +ext_argtype(#11814, 0, #11811) +ext_argtype(#11065, 0, #11811) +ext_argtype(#11066, 0, #11811) +ext_argtype(#11067, 0, #11811) +ext_argtype(#11068, 0, #11811) +ext_argtype(#11068, 1, #11507) +ext_argtype(#11069, 0, #11811) +ext_argtype(#11070, 0, #11811) +ext_argtype(#11071, 0, #11811) +ext_argtype(#11072, 0, #11811) +ext_argtype(#11073, 0, #11811) +ext_argtype(#11073, 1, #11507) +#11815 = @"C_type$_io.FileIO" +ext_argtype(#11074, 0, #11815) +ext_argtype(#11075, 0, #11815) +ext_argtype(#11076, 0, #11815) +ext_argtype(#11077, 0, #11815) +ext_argtype(#11078, 0, #11815) +ext_argtype(#11079, 0, #11815) +#11816 = @"C_type$_io.FileIO$truncate" +ext_argtype(#11816, 0, #11815) +ext_argtype(#11080, 0, #11815) +ext_argtype(#11081, 0, #11815) +ext_argtype(#11082, 0, #11815) +ext_argtype(#11083, 0, #11815) +ext_argtype(#11084, 0, #11815) +ext_argtype(#11085, 0, #11815) +ext_argtype(#11086, 0, #11815) +ext_argtype(#11086, 1, #11507) +#11817 = @"C_type$_io.FileIO$__getstate__" +ext_argtype(#11817, 0, #11815) +ext_argtype(#11087, 0, #10526) +ext_argtype(#11087, 0, #10528) +ext_argtype(#11088, 0, #10526) +ext_argtype(#11088, 0, #10528) +#11818 = @"C_type$_sha512.sha512$hexdigest" +ext_argtype(#11818, 0, #10526) +ext_argtype(#11818, 0, #10528) +ext_argtype(#11089, 0, #10526) +ext_argtype(#11089, 0, #10528) +ext_argtype(#11089, 1, #11507) +ext_argtype(#11090, 0, #10526) +ext_argtype(#11090, 0, #10528) +ext_argtype(#11091, 0, #10526) +ext_argtype(#11091, 0, #10528) +#11819 = @"C_type$_sha512.sha384$hexdigest" +ext_argtype(#11819, 0, #10526) +ext_argtype(#11819, 0, #10528) +ext_argtype(#11092, 0, #10526) +ext_argtype(#11092, 0, #10528) +ext_argtype(#11092, 1, #11507) +#11820 = @"C_type$_lsprof.Profiler$getstats" +#11821 = @"C_type$_lsprof.Profiler" +ext_argtype(#11820, 0, #11821) +ext_argtype(#11093, 0, #11821) +ext_argtype(#11093, 1, #10024) +ext_argtype(#11093, 2, #10024) +ext_argtype(#11094, 0, #11821) +ext_argtype(#11095, 0, #11821) +ext_argtype(#11096, 0, #10531) +#11822 = @"C_type$xml.etree.ElementTree.Element$get" +ext_argtype(#11822, 0, #10531) +ext_argtype(#11822, 1, #11507) +ext_argtype(#11822, 2, #11507) +ext_argtype(#11097, 0, #10531) +ext_argtype(#11097, 1, #11507) +ext_argtype(#11097, 2, #11507) +ext_argtype(#11098, 0, #10531) +ext_argtype(#11098, 1, #11507) +ext_argtype(#11098, 2, #11507) +#11823 = @"C_type$xml.etree.ElementTree.Element$findtext" +ext_argtype(#11823, 0, #10531) +ext_argtype(#11823, 1, #11507) +ext_argtype(#11823, 2, #11507) +ext_argtype(#11823, 3, #11507) +ext_argtype(#11099, 0, #10531) +ext_argtype(#11099, 1, #11507) +ext_argtype(#11099, 2, #11507) +ext_argtype(#11100, 0, #10531) +ext_argtype(#11100, 1, #10531) +ext_argtype(#11101, 0, #10531) +ext_argtype(#11101, 1, #11507) +ext_argtype(#11102, 0, #10531) +ext_argtype(#11102, 1, #10024) +ext_argtype(#11102, 2, #10531) +ext_argtype(#11103, 0, #10531) +ext_argtype(#11103, 1, #10531) +ext_argtype(#11104, 0, #10531) +ext_argtype(#11104, 1, #11507) +ext_argtype(#11106, 0, #10531) +#11824 = @"C_type$xml.etree.ElementTree.Element$iterfind" +ext_argtype(#11824, 0, #10531) +ext_argtype(#11824, 1, #11507) +ext_argtype(#11824, 2, #11507) +ext_argtype(#11107, 0, #10531) +ext_argtype(#11107, 1, #11507) +ext_argtype(#11108, 0, #10531) +ext_argtype(#11109, 0, #10531) +ext_argtype(#11110, 0, #10531) +ext_argtype(#11111, 0, #10531) +ext_argtype(#11111, 1, #11507) +ext_argtype(#11111, 2, #11507) +ext_argtype(#11112, 0, #10531) +ext_argtype(#11113, 0, #10531) +ext_argtype(#11113, 1, #11507) +ext_argtype(#11114, 0, #10531) +ext_argtype(#11115, 0, #10531) +ext_argtype(#11116, 0, #10531) +ext_argtype(#11116, 1, #11507) +#11825 = @"C_type$xml.etree.ElementTree.TreeBuilder" +ext_argtype(#11117, 0, #11825) +ext_argtype(#11117, 1, #11507) +ext_argtype(#11118, 0, #11825) +ext_argtype(#11118, 1, #11507) +ext_argtype(#11118, 2, #11507) +#11826 = @"C_type$xml.etree.ElementTree.TreeBuilder$end" +ext_argtype(#11826, 0, #11825) +ext_argtype(#11826, 1, #11507) +ext_argtype(#11119, 0, #11825) +#11827 = @"C_type$xml.etree.ElementTree.XMLParser" +ext_argtype(#11120, 0, #11827) +ext_argtype(#11120, 1, #11507) +ext_argtype(#11121, 0, #11827) +ext_argtype(#11122, 0, #11827) +ext_argtype(#11122, 1, #11507) +ext_argtype(#11123, 0, #11827) +ext_argtype(#11123, 1, #10020) +ext_argtype(#11123, 2, #11507) +ext_argtype(#11124, 0, #11827) +#11828 = @"C_type$_ctypes.PyCArrayType$from_param" +#11829 = @"C_type$_ctypes.PyCArrayType" +ext_argtype(#11828, 0, #11829) +#11830 = @"C_type$_ctypes.PyCFuncPtrType" +ext_argtype(#11828, 0, #11830) +#11831 = @"C_type$_ctypes.PyCStructType" +ext_argtype(#11828, 0, #11831) +#11832 = @"C_type$_ctypes.UnionType" +ext_argtype(#11828, 0, #11832) +ext_argtype(#11828, 1, #11507) +#11833 = @"C_type$_ctypes.PyCArrayType$from_address" +ext_argtype(#11833, 0, #11829) +ext_argtype(#11833, 0, #11830) +ext_argtype(#11833, 0, #11831) +ext_argtype(#11833, 0, #11832) +ext_argtype(#11833, 1, #11507) +#11834 = @"C_type$_ctypes.PyCArrayType$from_buffer" +ext_argtype(#11834, 0, #11829) +ext_argtype(#11834, 0, #11830) +ext_argtype(#11834, 0, #11831) +ext_argtype(#11834, 0, #11832) +#11835 = @"C_type$_ctypes.PyCArrayType$from_buffer_copy" +ext_argtype(#11835, 0, #11829) +ext_argtype(#11835, 0, #11830) +ext_argtype(#11835, 0, #11831) +ext_argtype(#11835, 0, #11832) +#11836 = @"C_type$_ctypes.PyCArrayType$in_dll" +ext_argtype(#11836, 0, #11829) +ext_argtype(#11836, 0, #11830) +ext_argtype(#11836, 0, #11831) +ext_argtype(#11836, 0, #11832) +#11837 = @"C_type$_ctypes.PyCFuncPtrType$from_param" +ext_argtype(#11837, 0, #11829) +ext_argtype(#11837, 0, #11830) +ext_argtype(#11837, 0, #11831) +ext_argtype(#11837, 0, #11832) +ext_argtype(#11837, 1, #11507) +#11838 = @"C_type$_ctypes.PyCFuncPtrType$from_address" +ext_argtype(#11838, 0, #11829) +ext_argtype(#11838, 0, #11830) +ext_argtype(#11838, 0, #11831) +ext_argtype(#11838, 0, #11832) +ext_argtype(#11838, 1, #11507) +#11839 = @"C_type$_ctypes.PyCFuncPtrType$from_buffer" +ext_argtype(#11839, 0, #11829) +ext_argtype(#11839, 0, #11830) +ext_argtype(#11839, 0, #11831) +ext_argtype(#11839, 0, #11832) +#11840 = @"C_type$_ctypes.PyCFuncPtrType$from_buffer_copy" +ext_argtype(#11840, 0, #11829) +ext_argtype(#11840, 0, #11830) +ext_argtype(#11840, 0, #11831) +ext_argtype(#11840, 0, #11832) +#11841 = @"C_type$_ctypes.PyCFuncPtrType$in_dll" +ext_argtype(#11841, 0, #11829) +ext_argtype(#11841, 0, #11830) +ext_argtype(#11841, 0, #11831) +ext_argtype(#11841, 0, #11832) +#11842 = @"C_type$_ctypes.PyCStructType$from_param" +ext_argtype(#11842, 0, #11829) +ext_argtype(#11842, 0, #11830) +ext_argtype(#11842, 0, #11831) +ext_argtype(#11842, 0, #11832) +ext_argtype(#11842, 1, #11507) +#11843 = @"C_type$_ctypes.PyCStructType$from_address" +ext_argtype(#11843, 0, #11829) +ext_argtype(#11843, 0, #11830) +ext_argtype(#11843, 0, #11831) +ext_argtype(#11843, 0, #11832) +ext_argtype(#11843, 1, #11507) +#11844 = @"C_type$_ctypes.PyCStructType$from_buffer" +ext_argtype(#11844, 0, #11829) +ext_argtype(#11844, 0, #11830) +ext_argtype(#11844, 0, #11831) +ext_argtype(#11844, 0, #11832) +#11845 = @"C_type$_ctypes.PyCStructType$from_buffer_copy" +ext_argtype(#11845, 0, #11829) +ext_argtype(#11845, 0, #11830) +ext_argtype(#11845, 0, #11831) +ext_argtype(#11845, 0, #11832) +#11846 = @"C_type$_ctypes.PyCStructType$in_dll" +ext_argtype(#11846, 0, #11829) +ext_argtype(#11846, 0, #11830) +ext_argtype(#11846, 0, #11831) +ext_argtype(#11846, 0, #11832) +#11847 = @"C_type$_ctypes.UnionType$from_param" +ext_argtype(#11847, 0, #11829) +ext_argtype(#11847, 0, #11830) +ext_argtype(#11847, 0, #11831) +ext_argtype(#11847, 0, #11832) +ext_argtype(#11847, 1, #11507) +#11848 = @"C_type$_ctypes.UnionType$from_address" +ext_argtype(#11848, 0, #11829) +ext_argtype(#11848, 0, #11830) +ext_argtype(#11848, 0, #11831) +ext_argtype(#11848, 0, #11832) +ext_argtype(#11848, 1, #11507) +#11849 = @"C_type$_ctypes.UnionType$from_buffer" +ext_argtype(#11849, 0, #11829) +ext_argtype(#11849, 0, #11830) +ext_argtype(#11849, 0, #11831) +ext_argtype(#11849, 0, #11832) +#11850 = @"C_type$_ctypes.UnionType$from_buffer_copy" +ext_argtype(#11850, 0, #11829) +ext_argtype(#11850, 0, #11830) +ext_argtype(#11850, 0, #11831) +ext_argtype(#11850, 0, #11832) +#11851 = @"C_type$_ctypes.UnionType$in_dll" +ext_argtype(#11851, 0, #11829) +ext_argtype(#11851, 0, #11830) +ext_argtype(#11851, 0, #11831) +ext_argtype(#11851, 0, #11832) +#11852 = @"C_type$_ctypes._SimpleCData$__ctypes_from_outparam__" +#11853 = @"C_type$_ctypes._SimpleCData" +ext_argtype(#11852, 0, #11853) +#11854 = @"C_type$_ctypes._CData$__ctypes_from_outparam__" +#11855 = @"C_type$_ctypes._CData" +ext_argtype(#11854, 0, #11855) +ext_argtype(#11125, 0, #11855) +ext_argtype(#11126, 0, #11855) +#11856 = @"C_type$_ctypes.PyCPointerType$from_address" +#11857 = @"C_type$_ctypes.PyCPointerType" +ext_argtype(#11856, 0, #11857) +ext_argtype(#11856, 1, #11507) +#11858 = @"C_type$_ctypes.PyCPointerType$from_buffer" +ext_argtype(#11858, 0, #11857) +#11859 = @"C_type$_ctypes.PyCPointerType$from_buffer_copy" +ext_argtype(#11859, 0, #11857) +#11860 = @"C_type$_ctypes.PyCPointerType$in_dll" +ext_argtype(#11860, 0, #11857) +ext_argtype(#11127, 0, #11857) +ext_argtype(#11127, 1, #11507) +ext_argtype(#11128, 0, #11857) +ext_argtype(#11128, 1, #11507) +#11861 = @"C_type$_ctypes.PyCSimpleType" +ext_argtype(#11129, 0, #11861) +ext_argtype(#11129, 1, #11507) +#11862 = @"C_type$_ctypes.PyCSimpleType$from_address" +ext_argtype(#11862, 0, #11861) +ext_argtype(#11862, 1, #11507) +#11863 = @"C_type$_ctypes.PyCSimpleType$from_buffer" +ext_argtype(#11863, 0, #11861) +#11864 = @"C_type$_ctypes.PyCSimpleType$from_buffer_copy" +ext_argtype(#11864, 0, #11861) +#11865 = @"C_type$_ctypes.PyCSimpleType$in_dll" +ext_argtype(#11865, 0, #11861) +#11866 = @"C_type$zlib.Compress$compress" +#11867 = @"C_type$zlib.Compress" +ext_argtype(#11866, 0, #11867) +ext_argtype(#11866, 1, #11276) +ext_argtype(#11866, 1, #10081) +ext_argtype(#11130, 0, #11867) +ext_argtype(#11130, 1, #10024) +#11868 = @"C_type$zlib.Compress$copy" +ext_argtype(#11868, 0, #11867) +#11869 = @"C_type$zlib.Decompress$decompress" +#11870 = @"C_type$zlib.Decompress" +ext_argtype(#11869, 0, #11870) +ext_argtype(#11869, 1, #11276) +ext_argtype(#11869, 1, #10081) +ext_argtype(#11869, 2, #10024) +#11871 = @"C_type$zlib.Decompress$flush" +ext_argtype(#11871, 0, #11870) +ext_argtype(#11871, 1, #10024) +#11872 = @"C_type$zlib.Decompress$copy" +ext_argtype(#11872, 0, #11870) +ext_argtype(#11131, 0, #11546) +ext_argtype(#11131, 1, #10010) +ext_argtype(#11131, 2, #11507) +ext_argtype(#11132, 0, #11546) +ext_argtype(#11132, 1, #10010) +ext_argtype(#11132, 2, #11507) +ext_argtype(#11133, 0, #11546) +ext_argtype(#11133, 1, #10010) +ext_argtype(#11133, 2, #11507) +#11873 = @"C_type$unicodedata.UCD$category" +ext_argtype(#11873, 0, #11546) +ext_argtype(#11873, 1, #10010) +#11874 = @"C_type$unicodedata.UCD$bidirectional" +ext_argtype(#11874, 0, #11546) +ext_argtype(#11874, 1, #10010) +ext_argtype(#11134, 0, #11546) +ext_argtype(#11134, 1, #10010) +ext_argtype(#11135, 0, #11546) +ext_argtype(#11135, 1, #10010) +#11875 = @"C_type$unicodedata.UCD$east_asian_width" +ext_argtype(#11875, 0, #11546) +ext_argtype(#11875, 1, #10010) +ext_argtype(#11136, 0, #11546) +ext_argtype(#11136, 1, #10010) +#11876 = @"C_type$unicodedata.UCD$name" +ext_argtype(#11876, 0, #11546) +ext_argtype(#11876, 1, #10010) +ext_argtype(#11876, 2, #11507) +#11877 = @"C_type$unicodedata.UCD$lookup" +ext_argtype(#11877, 0, #11546) +ext_argtype(#11877, 1, #10010) +#11878 = @"C_type$unicodedata.UCD$normalize" +ext_argtype(#11878, 0, #11546) +ext_argtype(#11878, 1, #10010) +ext_argtype(#11878, 2, #10010) +#11879 = @"C_type$itertools._grouper" +ext_argtype(#11137, 0, #11879) +#11880 = @"C_type$itertools.groupby" +ext_argtype(#11138, 0, #11880) +ext_argtype(#11139, 0, #11880) +ext_argtype(#11139, 1, #11507) +#11881 = @"C_type$itertools._tee_dataobject" +ext_argtype(#11140, 0, #11881) +ext_argtype(#11141, 0, #11142) +ext_argtype(#11143, 0, #11142) +ext_argtype(#11144, 0, #11142) +ext_argtype(#11144, 1, #11507) +#11882 = @"C_type$itertools.cycle" +ext_argtype(#11145, 0, #11882) +ext_argtype(#11146, 0, #11882) +ext_argtype(#11146, 1, #11507) +#11883 = @"C_type$itertools.dropwhile" +ext_argtype(#11147, 0, #11883) +ext_argtype(#11148, 0, #11883) +ext_argtype(#11148, 1, #11507) +#11884 = @"C_type$itertools.takewhile" +ext_argtype(#11149, 0, #11884) +ext_argtype(#11150, 0, #11884) +ext_argtype(#11150, 1, #11507) +#11885 = @"C_type$itertools.islice" +ext_argtype(#11151, 0, #11885) +ext_argtype(#11152, 0, #11885) +ext_argtype(#11152, 1, #11507) +#11886 = @"C_type$itertools.starmap" +ext_argtype(#11153, 0, #11886) +#11887 = @"C_type$itertools.chain$from_iterable" +#11888 = @"C_type$itertools.chain" +ext_argtype(#11887, 0, #11888) +ext_argtype(#11887, 1, #11507) +ext_argtype(#11154, 0, #11888) +ext_argtype(#11155, 0, #11888) +ext_argtype(#11155, 1, #11507) +#11889 = @"C_type$itertools.product" +ext_argtype(#11156, 0, #11889) +ext_argtype(#11157, 0, #11889) +ext_argtype(#11157, 1, #11507) +#11890 = @"C_type$itertools.combinations" +ext_argtype(#11158, 0, #11890) +ext_argtype(#11159, 0, #11890) +ext_argtype(#11159, 1, #11507) +#11891 = @"C_type$itertools.combinations_with_replacement" +ext_argtype(#11160, 0, #11891) +ext_argtype(#11161, 0, #11891) +ext_argtype(#11161, 1, #11507) +#11892 = @"C_type$itertools.permutations" +ext_argtype(#11162, 0, #11892) +ext_argtype(#11163, 0, #11892) +ext_argtype(#11163, 1, #11507) +#11893 = @"C_type$itertools.accumulate" +ext_argtype(#11164, 0, #11893) +ext_argtype(#11165, 0, #11893) +ext_argtype(#11165, 1, #11507) +#11894 = @"C_type$itertools.compress" +ext_argtype(#11166, 0, #11894) +#11895 = @"C_type$itertools.filterfalse" +ext_argtype(#11167, 0, #11895) +#11896 = @"C_type$itertools.count" +ext_argtype(#11168, 0, #11896) +#11897 = @"C_type$itertools.repeat" +ext_argtype(#11169, 0, #11897) +ext_argtype(#11170, 0, #11897) +#11898 = @"C_type$itertools.zip_longest" +ext_argtype(#11171, 0, #11898) +ext_argtype(#11172, 0, #11898) +ext_argtype(#11172, 1, #11507) +#11899 = @"C_type$ossaudiodev.oss_audio_device$read" +ext_argtype(#11899, 0, #10582) +ext_argtype(#11899, 1, #10024) +ext_argtype(#11173, 0, #10582) +ext_argtype(#11173, 1, #11276) +ext_argtype(#11173, 1, #10081) +ext_argtype(#11174, 0, #10582) +ext_argtype(#11174, 1, #11276) +ext_argtype(#11174, 1, #10081) +ext_argtype(#11175, 0, #10582) +ext_argtype(#11176, 0, #10582) +ext_argtype(#11177, 0, #10582) +ext_argtype(#11178, 0, #10582) +ext_argtype(#11179, 0, #10582) +ext_argtype(#11180, 0, #10582) +ext_argtype(#11181, 0, #10582) +ext_argtype(#11182, 0, #10582) +ext_argtype(#11183, 0, #10582) +ext_argtype(#11184, 0, #10582) +ext_argtype(#11185, 0, #10582) +ext_argtype(#11185, 1, #10024) +ext_argtype(#11185, 2, #10024) +ext_argtype(#11185, 3, #10024) +ext_argtype(#11185, 4, #10024) +ext_argtype(#11186, 0, #10582) +ext_argtype(#11187, 0, #10582) +ext_argtype(#11188, 0, #10582) +ext_argtype(#11189, 0, #10582) +ext_argtype(#11190, 0, #10582) +#11900 = @"C_type$ossaudiodev.oss_audio_device$__enter__" +ext_argtype(#11900, 0, #10582) +ext_argtype(#11191, 0, #10582) +ext_argtype(#11192, 0, #10584) +ext_argtype(#11193, 0, #10584) +#11901 = @"C_type$ossaudiodev.oss_mixer_device$__enter__" +ext_argtype(#11901, 0, #10584) +ext_argtype(#11194, 0, #10584) +ext_argtype(#11195, 0, #10584) +ext_argtype(#11196, 0, #10584) +ext_argtype(#11197, 0, #10584) +ext_argtype(#11198, 0, #10584) +ext_argtype(#11198, 1, #10024) +ext_argtype(#11199, 0, #10584) +ext_argtype(#11199, 1, #10024) +ext_argtype(#11199, 2, #10037) +ext_argtype(#11200, 0, #10584) +ext_argtype(#11201, 0, #10584) +ext_argtype(#11202, 0, #10586) +ext_argtype(#11202, 1, #11507) +ext_argtype(#11202, 2, #10024) +ext_argtype(#11203, 0, #10586) +ext_argtype(#11203, 1, #11507) +ext_argtype(#11204, 0, #10586) +ext_argtype(#11204, 1, #10010) +ext_argtype(#11205, 0, #10586) +ext_argtype(#11206, 0, #10586) +ext_argtype(#11206, 1, #10010) +ext_argtype(#11206, 1, #10005) +ext_argtype(#11206, 2, #10010) +ext_argtype(#11207, 0, #10586) +ext_argtype(#11207, 1, #10024) +ext_argtype(#11208, 0, #10586) +ext_argtype(#11209, 0, #10586) +ext_argtype(#11209, 1, #11507) +ext_argtype(#11210, 0, #10586) +ext_argtype(#11211, 0, #10886) +ext_argtype(#11212, 0, #10886) +ext_argtype(#11212, 1, #11507) +ext_argtype(#11213, 0, #10886) +ext_argtype(#11214, 0, #10886) +ext_argtype(#11214, 1, #11507) +ext_argtype(#11215, 0, #10886) +ext_argtype(#11215, 1, #11507) +ext_argtype(#11216, 0, #10886) +ext_argtype(#11217, 0, #10886) +ext_argtype(#11218, 0, #10886) +ext_argtype(#11219, 0, #10886) +ext_argtype(#11220, 0, #10886) +ext_argtype(#11220, 1, #10024) +ext_argtype(#11220, 2, #10024) +ext_argtype(#11220, 3, #10024) +ext_argtype(#11221, 0, #10886) +ext_argtype(#11221, 1, #11507) +#11902 = @"C_type$_socket.socket$recv" +ext_argtype(#11902, 0, #10886) +ext_argtype(#11902, 1, #10024) +ext_argtype(#11902, 2, #10024) +ext_argtype(#11222, 0, #10886) +ext_argtype(#11222, 2, #10024) +ext_argtype(#11222, 3, #10024) +ext_argtype(#11223, 0, #10886) +ext_argtype(#11223, 1, #10024) +ext_argtype(#11223, 2, #10024) +ext_argtype(#11224, 0, #10886) +ext_argtype(#11224, 2, #10024) +ext_argtype(#11224, 3, #10024) +ext_argtype(#11225, 0, #10886) +ext_argtype(#11225, 1, #11276) +ext_argtype(#11225, 1, #10081) +ext_argtype(#11225, 2, #10024) +ext_argtype(#11226, 0, #10886) +ext_argtype(#11226, 1, #11276) +ext_argtype(#11226, 1, #10081) +ext_argtype(#11226, 2, #10024) +ext_argtype(#11227, 0, #10886) +ext_argtype(#11228, 0, #10886) +ext_argtype(#11228, 1, #11507) +ext_argtype(#11229, 0, #10886) +ext_argtype(#11229, 1, #11507) +ext_argtype(#11230, 0, #10886) +ext_argtype(#11231, 0, #10886) +ext_argtype(#11232, 0, #10886) +ext_argtype(#11232, 1, #11507) +ext_argtype(#11233, 0, #10886) +ext_argtype(#11233, 1, #10024) +ext_argtype(#11233, 2, #10024) +ext_argtype(#11233, 3, #10024) +ext_argtype(#11234, 0, #10886) +ext_argtype(#11234, 1, #11507) +ext_argtype(#11234, 2, #10024) +ext_argtype(#11234, 3, #10024) +ext_argtype(#11235, 0, #10886) +ext_argtype(#11235, 1, #11507) +ext_argtype(#11235, 2, #11507) +ext_argtype(#11235, 3, #10024) +ext_argtype(#11235, 4, #11507) +#11903 = @"C_type$_ast.AST" +ext_argtype(#11236, 0, #11903) +#11904 = @"C_type$traceback" +ext_argtype(#11237, 0, #11904) +#11905 = @"C_type$filter" +ext_argtype(#11238, 0, #11905) +#11906 = @"C_type$map" +ext_argtype(#11239, 0, #11906) +#11907 = @"C_type$zip" +ext_argtype(#11240, 0, #11907) +ext_argtype(#11241, 0, #10517) +ext_argtype(#11242, 0, #10517) +ext_argtype(#11243, 0, #10517) +ext_argtype(#11244, 0, #10517) +ext_argtype(#11244, 1, #11507) +ext_argtype(#11245, 0, #10517) +ext_argtype(#11245, 1, #11507) +ext_argtype(#11246, 0, #10517) +ext_argtype(#11247, 0, #10517) +ext_argtype(#11248, 0, #11507) +ext_argtype(#11248, 1, #10024) +ext_argtype(#11249, 0, #11507) +ext_argtype(#11249, 1, #10024) +#11908 = @"C_type$object$3__subclasshook__" +ext_argtype(#11908, 0, #11507) +#11909 = @"C_type$object$3__format__" +ext_argtype(#11909, 0, #11507) +ext_argtype(#11250, 0, #11507) +ext_argtype(#11251, 0, #11507) +#11910 = @"C_type$dict_keyiterator" +ext_argtype(#11252, 0, #11910) +#11911 = @"C_type$dict_valueiterator" +ext_argtype(#11252, 0, #11911) +#11912 = @"C_type$dict_itemiterator" +ext_argtype(#11252, 0, #11912) +ext_argtype(#11253, 0, #11910) +ext_argtype(#11253, 0, #11911) +ext_argtype(#11253, 0, #11912) +ext_argtype(#11254, 0, #11910) +ext_argtype(#11254, 0, #11911) +ext_argtype(#11254, 0, #11912) +ext_argtype(#11255, 0, #11910) +ext_argtype(#11255, 0, #11911) +ext_argtype(#11255, 0, #11912) +ext_argtype(#11256, 0, #11910) +ext_argtype(#11256, 0, #11911) +ext_argtype(#11256, 0, #11912) +ext_argtype(#11257, 0, #11910) +ext_argtype(#11257, 0, #11911) +ext_argtype(#11257, 0, #11912) +ext_argtype(#11258, 0, #10111) +ext_argtype(#11258, 1, #11507) +#11913 = @"C_type$dict$3__getitem__" +ext_argtype(#11913, 0, #10111) +ext_argtype(#11913, 1, #11507) +ext_argtype(#11259, 0, #10111) +#11914 = @"C_type$dict$3get" +ext_argtype(#11914, 0, #10111) +#11915 = @"C_type$dict$3setdefault" +ext_argtype(#11915, 0, #10111) +#11916 = @"C_type$dict$3pop" +ext_argtype(#11916, 0, #10111) +ext_argtype(#11260, 0, #10111) +#11917 = @"C_type$dict$3keys" +ext_argtype(#11917, 0, #10111) +#11918 = @"C_type$dict$3items" +ext_argtype(#11918, 0, #10111) +#11919 = @"C_type$dict$3values" +ext_argtype(#11919, 0, #10111) +ext_argtype(#11261, 0, #10111) +#11920 = @"C_type$dict$3fromkeys" +ext_argtype(#11920, 0, #10111) +ext_argtype(#11262, 0, #10111) +ext_argtype(#11263, 0, #10111) +#11921 = @"C_type$dict_items" +ext_argtype(#11264, 0, #11921) +ext_argtype(#11264, 1, #11507) +#11922 = @"C_type$dict_keys" +ext_argtype(#11265, 0, #11922) +ext_argtype(#11265, 1, #11507) +ext_argtype(#11266, 0, #10647) +#11923 = @"C_type$bytearray_iterator" +ext_argtype(#11267, 0, #11923) +ext_argtype(#11268, 0, #11923) +ext_argtype(#11269, 0, #11923) +ext_argtype(#11269, 1, #11507) +ext_argtype(#11270, 0, #11276) +ext_argtype(#11271, 0, #11276) +ext_argtype(#11272, 0, #11276) +ext_argtype(#11273, 0, #11276) +ext_argtype(#11274, 0, #11276) +ext_argtype(#11274, 1, #11507) +ext_argtype(#11275, 0, #11276) +ext_argtype(#11277, 0, #11276) +ext_argtype(#11278, 0, #11276) +ext_argtype(#11279, 0, #11276) +ext_argtype(#11280, 0, #11276) +#11924 = @"C_type$bytearray$3decode" +ext_argtype(#11924, 0, #11276) +ext_argtype(#11281, 0, #11276) +ext_argtype(#11282, 0, #11276) +ext_argtype(#11283, 0, #11276) +ext_argtype(#11283, 1, #11507) +ext_argtype(#11284, 0, #11276) +ext_argtype(#11285, 0, #11276) +ext_argtype(#11286, 0, #11276) +ext_argtype(#11287, 0, #11276) +ext_argtype(#11288, 0, #11276) +ext_argtype(#11289, 0, #11276) +ext_argtype(#11290, 0, #11276) +ext_argtype(#11291, 0, #11276) +ext_argtype(#11292, 0, #11276) +ext_argtype(#11293, 0, #11276) +ext_argtype(#11294, 0, #11276) +ext_argtype(#11295, 0, #11276) +ext_argtype(#11295, 1, #11507) +ext_argtype(#11296, 0, #11276) +ext_argtype(#11297, 0, #11276) +ext_argtype(#11298, 0, #11276) +ext_argtype(#11300, 0, #11276) +ext_argtype(#11300, 1, #11507) +ext_argtype(#11301, 0, #11276) +ext_argtype(#11302, 0, #11276) +ext_argtype(#11302, 1, #11507) +ext_argtype(#11303, 0, #11276) +ext_argtype(#11304, 0, #11276) +ext_argtype(#11305, 0, #11276) +ext_argtype(#11306, 0, #11276) +ext_argtype(#11307, 0, #11276) +ext_argtype(#11308, 0, #11276) +ext_argtype(#11308, 1, #11507) +ext_argtype(#11309, 0, #11276) +ext_argtype(#11310, 0, #11276) +ext_argtype(#11311, 0, #11276) +ext_argtype(#11312, 0, #11276) +ext_argtype(#11313, 0, #11276) +ext_argtype(#11314, 0, #11276) +ext_argtype(#11315, 0, #11276) +ext_argtype(#11316, 0, #11276) +ext_argtype(#11317, 0, #11276) +ext_argtype(#11318, 0, #11276) +ext_argtype(#11319, 0, #11276) +ext_argtype(#11320, 0, #10626) +#11925 = @"C_type$list_iterator" +ext_argtype(#11321, 0, #11925) +ext_argtype(#11322, 0, #11925) +ext_argtype(#11323, 0, #11925) +ext_argtype(#11323, 1, #11507) +ext_argtype(#11324, 0, #11329) +ext_argtype(#11325, 0, #11329) +ext_argtype(#11326, 0, #11329) +ext_argtype(#11326, 1, #11507) +ext_argtype(#11327, 0, #10020) +ext_argtype(#11327, 1, #11507) +ext_argtype(#11328, 0, #10020) +ext_argtype(#11330, 0, #10020) +ext_argtype(#11331, 0, #10020) +ext_argtype(#11332, 0, #10020) +ext_argtype(#11333, 0, #10020) +ext_argtype(#11333, 1, #11507) +ext_argtype(#11334, 0, #10020) +ext_argtype(#11334, 1, #10024) +ext_argtype(#11334, 2, #11507) +ext_argtype(#11335, 0, #10020) +ext_argtype(#11335, 1, #11507) +#11926 = @"C_type$list$3pop" +ext_argtype(#11926, 0, #10020) +ext_argtype(#11926, 1, #10024) +ext_argtype(#11336, 0, #10020) +ext_argtype(#11336, 1, #11507) +ext_argtype(#11337, 0, #10020) +ext_argtype(#11337, 1, #11507) +ext_argtype(#11337, 2, #11507) +ext_argtype(#11337, 3, #11507) +ext_argtype(#11338, 0, #10020) +ext_argtype(#11338, 1, #11507) +ext_argtype(#11339, 0, #10020) +ext_argtype(#11340, 0, #10020) +ext_argtype(#11340, 1, #11507) +ext_argtype(#11340, 2, #10024) +ext_argtype(#11341, 0, #10024) +ext_argtype(#11342, 0, #10024) +ext_argtype(#11343, 0, #10024) +ext_argtype(#11343, 1, #10024) +ext_argtype(#11343, 3, #11507) +ext_argtype(#11344, 0, #10024) +ext_argtype(#11344, 1, #11507) +ext_argtype(#11344, 3, #11507) +ext_argtype(#11345, 0, #10024) +ext_argtype(#11346, 0, #10024) +ext_argtype(#11347, 0, #10024) +ext_argtype(#11348, 0, #10024) +ext_argtype(#11348, 1, #11507) +ext_argtype(#11349, 0, #10024) +#11927 = @"C_type$int$3__format__" +ext_argtype(#11927, 0, #10024) +ext_argtype(#11350, 0, #10024) +#11928 = @"C_type$mappingproxy$3get" +#11929 = @"C_type$mappingproxy" +ext_argtype(#11928, 0, #11929) +#11930 = @"C_type$mappingproxy$3keys" +ext_argtype(#11930, 0, #11929) +#11931 = @"C_type$mappingproxy$3values" +ext_argtype(#11931, 0, #11929) +#11932 = @"C_type$mappingproxy$3items" +ext_argtype(#11932, 0, #11929) +#11933 = @"C_type$mappingproxy$3copy" +ext_argtype(#11933, 0, #11929) +#11934 = @"C_type$property$3getter" +#11935 = @"C_type$property" +ext_argtype(#11934, 0, #11935) +ext_argtype(#11934, 1, #11507) +#11936 = @"C_type$property$3setter" +ext_argtype(#11936, 0, #11935) +ext_argtype(#11936, 1, #11507) +#11937 = @"C_type$property$3deleter" +ext_argtype(#11937, 0, #11935) +ext_argtype(#11937, 1, #11507) +#11938 = @"C_type$generator$3send" +#11939 = @"C_type$generator" +ext_argtype(#11938, 0, #11939) +ext_argtype(#11938, 1, #11507) +#11940 = @"C_type$generator$3throw" +ext_argtype(#11940, 0, #11939) +ext_argtype(#11351, 0, #11939) +#11941 = @"C_type$stderrprinter" +ext_argtype(#11352, 0, #11941) +ext_argtype(#11353, 0, #11941) +ext_argtype(#11354, 0, #11941) +ext_argtype(#11355, 0, #11941) +ext_argtype(#11356, 0, #11941) +#11942 = @"C_type$slice" +ext_argtype(#11357, 0, #11942) +ext_argtype(#11357, 1, #11507) +ext_argtype(#11358, 0, #11942) +#11943 = @"C_type$BaseException" +ext_argtype(#11359, 0, #11943) +ext_argtype(#11360, 0, #11943) +ext_argtype(#11360, 1, #11507) +#11944 = @"C_type$BaseException$3with_traceback" +ext_argtype(#11944, 0, #11943) +ext_argtype(#11944, 1, #11507) +#11945 = @"C_type$OSError" +ext_argtype(#11361, 0, #11945) +ext_argtype(#11362, 0, #10001) +ext_argtype(#11363, 0, #10001) +ext_argtype(#11364, 0, #10001) +ext_argtype(#11364, 1, #11507) +ext_argtype(#11365, 0, #10001) +#11946 = @"C_type$float$3fromhex" +ext_argtype(#11946, 0, #10001) +ext_argtype(#11946, 1, #11507) +#11947 = @"C_type$float$3hex" +ext_argtype(#11947, 0, #10001) +ext_argtype(#11366, 0, #10001) +ext_argtype(#11367, 0, #10001) +#11948 = @"C_type$float$3__getformat__" +ext_argtype(#11948, 0, #10001) +ext_argtype(#11948, 1, #11507) +ext_argtype(#11368, 0, #10001) +ext_argtype(#11368, 1, #10010) +ext_argtype(#11368, 2, #10010) +#11949 = @"C_type$float$3__format__" +ext_argtype(#11949, 0, #10001) +#11950 = @"C_type$bytes_iterator" +ext_argtype(#11369, 0, #11950) +ext_argtype(#11370, 0, #11950) +ext_argtype(#11371, 0, #11950) +ext_argtype(#11371, 1, #11507) +ext_argtype(#11372, 0, #10081) +ext_argtype(#11373, 0, #10081) +ext_argtype(#11374, 0, #10081) +ext_argtype(#11375, 0, #10081) +#11951 = @"C_type$bytes$3decode" +ext_argtype(#11951, 0, #10081) +ext_argtype(#11376, 0, #10081) +ext_argtype(#11377, 0, #10081) +ext_argtype(#11378, 0, #10081) +#11952 = @"C_type$bytes$3fromhex" +ext_argtype(#11952, 0, #10081) +ext_argtype(#11379, 0, #10081) +ext_argtype(#11380, 0, #10081) +ext_argtype(#11381, 0, #10081) +ext_argtype(#11382, 0, #10081) +ext_argtype(#11383, 0, #10081) +ext_argtype(#11384, 0, #10081) +ext_argtype(#11385, 0, #10081) +ext_argtype(#11386, 0, #10081) +ext_argtype(#11387, 0, #10081) +ext_argtype(#11387, 1, #11507) +ext_argtype(#11388, 0, #10081) +ext_argtype(#11389, 0, #10081) +ext_argtype(#11390, 0, #10081) +ext_argtype(#11392, 0, #10081) +ext_argtype(#11392, 1, #11507) +ext_argtype(#11393, 0, #10081) +ext_argtype(#11394, 0, #10081) +ext_argtype(#11395, 0, #10081) +ext_argtype(#11396, 0, #10081) +ext_argtype(#11397, 0, #10081) +ext_argtype(#11397, 1, #11507) +ext_argtype(#11398, 0, #10081) +ext_argtype(#11399, 0, #10081) +ext_argtype(#11400, 0, #10081) +ext_argtype(#11401, 0, #10081) +ext_argtype(#11402, 0, #10081) +ext_argtype(#11403, 0, #10081) +ext_argtype(#11404, 0, #10081) +ext_argtype(#11405, 0, #10081) +ext_argtype(#11406, 0, #10081) +ext_argtype(#11407, 0, #10081) +ext_argtype(#11408, 0, #10081) +ext_argtype(#11409, 0, #10081) +#11953 = @"C_type$set_iterator" +ext_argtype(#11410, 0, #11953) +ext_argtype(#11411, 0, #11953) +ext_argtype(#11412, 0, #10074) +ext_argtype(#11412, 1, #11507) +ext_argtype(#11413, 0, #10074) +ext_argtype(#11414, 0, #10074) +ext_argtype(#11415, 0, #10074) +ext_argtype(#11416, 0, #10074) +ext_argtype(#11416, 1, #11507) +ext_argtype(#11417, 0, #10074) +ext_argtype(#11417, 1, #11507) +ext_argtype(#11418, 0, #10074) +ext_argtype(#11418, 1, #11507) +ext_argtype(#11419, 0, #10074) +ext_argtype(#11420, 0, #10074) +ext_argtype(#11421, 0, #10074) +ext_argtype(#11421, 1, #11507) +ext_argtype(#11422, 0, #10074) +ext_argtype(#11423, 0, #10073) +ext_argtype(#11423, 1, #11507) +ext_argtype(#11424, 0, #10073) +ext_argtype(#11425, 0, #10073) +ext_argtype(#11425, 1, #11507) +ext_argtype(#11426, 0, #10073) +ext_argtype(#11427, 0, #10073) +ext_argtype(#11427, 1, #11507) +ext_argtype(#11428, 0, #10073) +ext_argtype(#11429, 0, #10073) +ext_argtype(#11430, 0, #10073) +ext_argtype(#11431, 0, #10073) +ext_argtype(#11432, 0, #10073) +ext_argtype(#11432, 1, #11507) +ext_argtype(#11433, 0, #10073) +ext_argtype(#11433, 1, #11507) +ext_argtype(#11434, 0, #10073) +ext_argtype(#11434, 1, #11507) +#11954 = @"C_type$set$3pop" +ext_argtype(#11954, 0, #10073) +ext_argtype(#11435, 0, #10073) +ext_argtype(#11436, 0, #10073) +ext_argtype(#11436, 1, #11507) +ext_argtype(#11437, 0, #10073) +ext_argtype(#11438, 0, #10073) +ext_argtype(#11438, 1, #11507) +ext_argtype(#11439, 0, #10073) +ext_argtype(#11439, 1, #11507) +ext_argtype(#11440, 0, #10073) +ext_argtype(#11441, 0, #10073) +ext_argtype(#11442, 0, #10028) +#11955 = @"C_type$tuple_iterator" +ext_argtype(#11443, 0, #11955) +ext_argtype(#11444, 0, #11955) +ext_argtype(#11445, 0, #11955) +ext_argtype(#11445, 1, #11507) +ext_argtype(#11446, 0, #10037) +ext_argtype(#11447, 0, #10037) +ext_argtype(#11448, 0, #10037) +ext_argtype(#11448, 1, #11507) +ext_argtype(#11448, 2, #11507) +ext_argtype(#11448, 3, #11507) +ext_argtype(#11449, 0, #10037) +ext_argtype(#11449, 1, #11507) +ext_argtype(#11450, 0, #10666) +ext_argtype(#11451, 0, #10666) +ext_argtype(#11452, 0, #10666) +ext_argtype(#11452, 1, #11507) +ext_argtype(#11453, 0, #10667) +#11956 = @"C_type$str_iterator" +ext_argtype(#11454, 0, #11956) +ext_argtype(#11455, 0, #11956) +ext_argtype(#11456, 0, #11956) +ext_argtype(#11456, 1, #11507) +ext_argtype(#11457, 0, #10010) +#11957 = @"C_type$str$3replace" +ext_argtype(#11957, 0, #10010) +ext_argtype(#11458, 0, #10010) +ext_argtype(#11459, 0, #10010) +#11958 = @"C_type$str$3join" +ext_argtype(#11958, 0, #10010) +ext_argtype(#11958, 1, #11507) +#11959 = @"C_type$str$3capitalize" +ext_argtype(#11959, 0, #10010) +#11960 = @"C_type$str$3casefold" +ext_argtype(#11960, 0, #10010) +#11961 = @"C_type$str$3title" +ext_argtype(#11961, 0, #10010) +#11962 = @"C_type$str$3center" +ext_argtype(#11962, 0, #10010) +ext_argtype(#11460, 0, #10010) +#11963 = @"C_type$str$3expandtabs" +ext_argtype(#11963, 0, #10010) +ext_argtype(#11461, 0, #10010) +ext_argtype(#11462, 0, #10010) +ext_argtype(#11462, 1, #11507) +ext_argtype(#11463, 0, #10010) +#11964 = @"C_type$str$3ljust" +ext_argtype(#11964, 0, #10010) +#11965 = @"C_type$str$3lower" +ext_argtype(#11965, 0, #10010) +#11966 = @"C_type$str$3lstrip" +ext_argtype(#11966, 0, #10010) +ext_argtype(#11464, 0, #10010) +ext_argtype(#11465, 0, #10010) +#11967 = @"C_type$str$3rjust" +ext_argtype(#11967, 0, #10010) +#11968 = @"C_type$str$3rstrip" +ext_argtype(#11968, 0, #10010) +ext_argtype(#11466, 0, #10010) +ext_argtype(#11466, 1, #11507) +ext_argtype(#11467, 0, #10010) +#11969 = @"C_type$str$3strip" +ext_argtype(#11969, 0, #10010) +#11970 = @"C_type$str$3swapcase" +ext_argtype(#11970, 0, #10010) +#11971 = @"C_type$str$3translate" +ext_argtype(#11971, 0, #10010) +ext_argtype(#11971, 1, #11507) +#11972 = @"C_type$str$3upper" +ext_argtype(#11972, 0, #10010) +ext_argtype(#11468, 0, #10010) +ext_argtype(#11469, 0, #10010) +ext_argtype(#11470, 0, #10010) +ext_argtype(#11471, 0, #10010) +ext_argtype(#11472, 0, #10010) +ext_argtype(#11473, 0, #10010) +ext_argtype(#11474, 0, #10010) +ext_argtype(#11475, 0, #10010) +ext_argtype(#11476, 0, #10010) +ext_argtype(#11477, 0, #10010) +ext_argtype(#11478, 0, #10010) +ext_argtype(#11479, 0, #10010) +ext_argtype(#11480, 0, #10010) +#11973 = @"C_type$str$3zfill" +ext_argtype(#11973, 0, #10010) +#11974 = @"C_type$str$3format" +ext_argtype(#11974, 0, #10010) +#11975 = @"C_type$str$3format_map" +ext_argtype(#11975, 0, #10010) +ext_argtype(#11975, 1, #11507) +#11976 = @"C_type$str$3__format__" +ext_argtype(#11976, 0, #10010) +ext_argtype(#11482, 0, #10010) +ext_argtype(#11483, 0, #10010) +#11977 = @"C_type$EncodingMap" +ext_argtype(#11484, 0, #11977) +ext_argtype(#11485, 0, #11491) +ext_argtype(#11486, 0, #11491) +ext_argtype(#11487, 0, #11491) +ext_argtype(#11487, 1, #11507) +#11978 = @"C_type$longrange_iterator$3__length_hint__" +ext_argtype(#11978, 0, #11492) +ext_argtype(#11488, 0, #11492) +ext_argtype(#11489, 0, #11492) +ext_argtype(#11489, 1, #11507) +#11979 = @"C_type$range" +ext_argtype(#11490, 0, #11979) +ext_argtype(#11493, 0, #11979) +ext_argtype(#11494, 0, #11979) +ext_argtype(#11494, 1, #11507) +ext_argtype(#11495, 0, #11979) +ext_argtype(#11495, 1, #11507) +ext_argtype(#11496, 0, #10226) +ext_argtype(#11497, 0, #10226) +#11980 = @"C_type$complex$3__format__" +ext_argtype(#11980, 0, #10226) +#11981 = @"C_type$weakproxy$3__bytes__" +#11982 = @"C_type$weakproxy" +ext_argtype(#11981, 0, #11982) +ext_argtype(#11498, 0, #10407) +ext_argtype(#11499, 0, #10407) +ext_argtype(#11500, 0, #10407) +ext_argtype(#11501, 0, #10407) +ext_argtype(#11501, 1, #11507) +ext_argtype(#11501, 2, #11507) +#11983 = @"C_type$memoryview$3__enter__" +ext_argtype(#11983, 0, #10407) +ext_argtype(#11502, 0, #10407) +#11984 = @"C_type$enumerate" +ext_argtype(#11503, 0, #11984) +#11985 = @"C_type$reversed" +ext_argtype(#11504, 0, #11985) +ext_argtype(#11505, 0, #11985) +ext_argtype(#11506, 0, #11985) +ext_argtype(#11506, 1, #11507) +ext_argreturn(#11539, 1) +ext_argreturn(#11540, 1) +ext_argreturn(#11640, 0) +ext_argreturn(#11641, 0) +ext_argreturn(#11646, 0) +ext_argreturn(#11647, 0) +ext_argreturn(#11854, 0) +ext_argreturn(#11900, 0) +ext_argreturn(#11901, 0) +#11986 = @"C_type$_csv.Dialect$delimiter" +ext_proptype(#11986, #10005) +#11987 = @"C_type$_csv.Dialect$escapechar" +ext_proptype(#11987, #10005) +#11988 = @"C_type$_csv.Dialect$quotechar" +ext_proptype(#11988, #10005) +#11989 = @"C_type$_csv.Dialect$quoting" +ext_proptype(#11989, #10024) +#11990 = @"C_type$xxsubtype.spamlist$state" +ext_proptype(#11990, #10024) +#11991 = @"C_type$collections.deque$maxlen" +ext_proptype(#11991, #10024) +ext_proptype(#11991, #10005) +#11992 = @"C_type$decimal.Context$prec" +ext_proptype(#11992, #10024) +#11993 = @"C_type$decimal.Context$Emax" +ext_proptype(#11993, #10024) +#11994 = @"C_type$decimal.Context$Emin" +ext_proptype(#11994, #10024) +#11995 = @"C_type$decimal.Context$capitals" +ext_proptype(#11995, #10024) +#11996 = @"C_type$decimal.Context$clamp" +ext_proptype(#11996, #10024) +#11997 = @"C_type$decimal.Decimal$imag" +ext_proptype(#11997, #10723) +#11998 = @"C_type$array.array$itemsize" +ext_proptype(#11998, #10024) +#11999 = @"C_type$Struct$3size" +ext_proptype(#11999, #10024) +#12000 = @"C_type$_ssl._SSLContext$options" +ext_proptype(#12000, #10024) +#12001 = @"C_type$_ssl._SSLContext$verify_mode" +ext_proptype(#12001, #10024) +#12002 = @"C_type$_hashlib.HASH$digest_size" +ext_proptype(#12002, #10024) +#12003 = @"C_type$_hashlib.HASH$block_size" +ext_proptype(#12003, #10024) +#12004 = @"C_type$_sha256.sha256$block_size" +ext_proptype(#12004, #10024) +#12005 = @"C_type$_sha256.sha224$block_size" +ext_proptype(#12005, #10024) +#12006 = @"C_type$_sha256.sha256$name" +ext_proptype(#12006, #10010) +#12007 = @"C_type$_sha256.sha224$name" +ext_proptype(#12007, #10010) +#12008 = @"C_type$functools.partial$__dict__" +ext_proptype(#12008, #10111) +#12009 = @"C_type$_pickle.Pickler$memo" +ext_proptype(#12009, #11673) +#12010 = @"C_type$_pickle.Unpickler$memo" +ext_proptype(#12010, #11677) +#12011 = @"C_type$_md5.md5$block_size" +ext_proptype(#12011, #10024) +#12012 = @"C_type$_md5.md5$name" +ext_proptype(#12012, #10010) +#12013 = @"C_type$_md5.md5$digest_size" +ext_proptype(#12013, #10024) +#12014 = @"C_type$_sha1.sha1$block_size" +ext_proptype(#12014, #10024) +#12015 = @"C_type$_sha1.sha1$name" +ext_proptype(#12015, #10010) +#12016 = @"C_type$_sha1.sha1$digest_size" +ext_proptype(#12016, #10024) +#12017 = @"C_type$_sre.SRE_Match$lastindex" +ext_proptype(#12017, #10024) +ext_proptype(#12017, #10005) +#12018 = @"C_type$_sre.SRE_Match$lastgroup" +ext_proptype(#12018, #10005) +#12019 = @"C_type$_sre.SRE_Match$regs" +ext_proptype(#12019, #10037) +#12020 = @"C_type$datetime.time$hour" +ext_proptype(#12020, #10024) +#12021 = @"C_type$datetime.time$minute" +ext_proptype(#12021, #10024) +#12022 = @"C_type$datetime.time$second" +ext_proptype(#12022, #10024) +#12023 = @"C_type$datetime.time$microsecond" +ext_proptype(#12023, #10024) +#12024 = @"C_type$datetime.datetime$hour" +ext_proptype(#12024, #10024) +#12025 = @"C_type$datetime.datetime$minute" +ext_proptype(#12025, #10024) +#12026 = @"C_type$datetime.datetime$second" +ext_proptype(#12026, #10024) +#12027 = @"C_type$datetime.datetime$microsecond" +ext_proptype(#12027, #10024) +#12028 = @"C_type$datetime.date$year" +ext_proptype(#12028, #10024) +#12029 = @"C_type$datetime.date$month" +ext_proptype(#12029, #10024) +#12030 = @"C_type$datetime.date$day" +ext_proptype(#12030, #10024) +#12031 = @"C_type$ndarray$3flags" +ext_proptype(#12031, #10024) +#12032 = @"C_type$ndarray$3offset" +ext_proptype(#12032, #10024) +#12033 = @"C_type$ndarray$3obj" +ext_proptype(#12033, #10005) +#12034 = @"C_type$ndarray$3nbytes" +ext_proptype(#12034, #10024) +#12035 = @"C_type$ndarray$3readonly" +ext_proptype(#12035, #10024) +#12036 = @"C_type$ndarray$3itemsize" +ext_proptype(#12036, #10024) +#12037 = @"C_type$ndarray$3ndim" +ext_proptype(#12037, #10024) +#12038 = @"C_type$ndarray$3shape" +ext_proptype(#12038, #10037) +#12039 = @"C_type$ndarray$3strides" +ext_proptype(#12039, #10037) +#12040 = @"C_type$ndarray$3suboffsets" +ext_proptype(#12040, #10037) +#12041 = @"C_type$ndarray$3c_contiguous" +ext_proptype(#12041, #10050) +#12042 = @"C_type$ndarray$3f_contiguous" +ext_proptype(#12042, #10050) +#12043 = @"C_type$ndarray$3contiguous" +ext_proptype(#12043, #10050) +#12044 = @"C_type$mmap.mmap$closed" +ext_proptype(#12044, #10050) +#12045 = @"C_type$select.epoll$closed" +ext_proptype(#12045, #10050) +#12046 = @"C_type$_io._TextIOBase$encoding" +ext_proptype(#12046, #10005) +#12047 = @"C_type$_io._TextIOBase$newlines" +ext_proptype(#12047, #10005) +#12048 = @"C_type$_io._TextIOBase$errors" +ext_proptype(#12048, #10005) +#12049 = @"C_type$_io.IncrementalNewlineDecoder$newlines" +ext_proptype(#12049, #10037) +ext_proptype(#12049, #10005) +#12050 = @"C_type$_io.TextIOWrapper$newlines" +ext_proptype(#12050, #10005) +#12051 = @"C_type$_io.TextIOWrapper$_CHUNK_SIZE" +ext_proptype(#12051, #10024) +#12052 = @"C_type$_io.BytesIO$closed" +ext_proptype(#12052, #10050) +#12053 = @"C_type$_io._IOBase$__dict__" +ext_proptype(#12053, #10111) +#12054 = @"C_type$_io._IOBase$closed" +ext_proptype(#12054, #10050) +#12055 = @"C_type$_io.StringIO$closed" +ext_proptype(#12055, #10050) +#12056 = @"C_type$_io.StringIO$newlines" +ext_proptype(#12056, #10005) +#12057 = @"C_type$_io.StringIO$line_buffering" +ext_proptype(#12057, #10050) +#12058 = @"C_type$_io.FileIO$closed" +ext_proptype(#12058, #10050) +#12059 = @"C_type$_io.FileIO$closefd" +ext_proptype(#12059, #10050) +#12060 = @"C_type$_sha512.sha512$block_size" +ext_proptype(#12060, #10024) +#12061 = @"C_type$_sha512.sha384$block_size" +ext_proptype(#12061, #10024) +#12062 = @"C_type$_sha512.sha512$name" +ext_proptype(#12062, #10010) +#12063 = @"C_type$_sha512.sha384$name" +ext_proptype(#12063, #10010) +#12064 = @"C_type$_ctypes.PyCFuncPtr$errcheck" +ext_proptype(#12064, #10005) +#12065 = @"C_type$_ctypes.PyCFuncPtr$restype" +ext_proptype(#12065, #10005) +#12066 = @"C_type$_ctypes.PyCFuncPtr$argtypes" +ext_proptype(#12066, #10005) +#12067 = @"C_type$_ctypes.CField$offset" +ext_proptype(#12067, #10024) +#12068 = @"C_type$_ctypes.CField$size" +ext_proptype(#12068, #10024) +#12069 = @"C_type$_ast.AST$__dict__" +ext_proptype(#12069, #10111) +#12070 = @"C_type$type$3__module__" +ext_proptype(#12070, #10010) +#12071 = @"C_type$type$3__dict__" +ext_proptype(#12071, #10005) +ext_proptype(#12071, #11929) +#12072 = @"C_type$type$3__doc__" +ext_proptype(#12072, #10005) +#12073 = @"C_type$frame$3f_lineno" +ext_proptype(#12073, #10024) +#12074 = @"C_type$frame$3f_trace" +ext_proptype(#12074, #10005) +#12075 = @"C_type$int$3real" +ext_proptype(#12075, #10024) +#12076 = @"C_type$int$3imag" +ext_proptype(#12076, #10024) +#12077 = @"C_type$int$3numerator" +ext_proptype(#12077, #10024) +#12078 = @"C_type$int$3denominator" +ext_proptype(#12078, #10024) +#12079 = @"C_type$builtin_function_or_method$3__doc__" +ext_proptype(#12079, #10005) +#12080 = @"C_type$builtin_function_or_method$3__self__" +ext_proptype(#12080, #10005) +#12081 = @"C_type$method-wrapper$__doc__" +ext_proptype(#12081, #10005) +#12082 = @"C_type$classmethod_descriptor$3__doc__" +ext_proptype(#12082, #10005) +#12083 = @"C_type$method_descriptor$3__doc__" +ext_proptype(#12083, #10005) +#12084 = @"C_type$member_descriptor$3__doc__" +ext_proptype(#12084, #10005) +#12085 = @"C_type$getset_descriptor$3__doc__" +ext_proptype(#12085, #10005) +#12086 = @"C_type$wrapper_descriptor$3__doc__" +ext_proptype(#12086, #10005) +#12087 = @"C_type$property$3__isabstractmethod__" +ext_proptype(#12087, #10050) +#12088 = @"C_type$stderrprinter$3closed" +ext_proptype(#12088, #10050) +#12089 = @"C_type$stderrprinter$3encoding" +ext_proptype(#12089, #10005) +#12090 = @"C_type$BaseException$3__dict__" +ext_proptype(#12090, #10111) +#12091 = @"C_type$BaseException$3args" +ext_proptype(#12091, #10005) +#12092 = @"C_type$BaseException$3__traceback__" +ext_proptype(#12092, #10005) +#12093 = @"C_type$BaseException$3__context__" +ext_proptype(#12093, #10005) +#12094 = @"C_type$BaseException$3__cause__" +ext_proptype(#12094, #10005) +#12095 = @"C_type$OSError$3characters_written" +ext_proptype(#12095, #10024) +#12096 = @"C_type$float$3real" +ext_proptype(#12096, #10001) +#12097 = @"C_type$float$3imag" +ext_proptype(#12097, #10001) +#12098 = @"C_type$function$3__defaults__" +ext_proptype(#12098, #10005) +#12099 = @"C_type$function$3__kwdefaults__" +ext_proptype(#12099, #10005) +#12100 = @"C_type$function$3__dict__" +ext_proptype(#12100, #10111) +#12101 = @"C_type$classmethod$3__isabstractmethod__" +ext_proptype(#12101, #10050) +#12102 = @"C_type$classmethod$3__dict__" +ext_proptype(#12102, #10111) +#12103 = @"C_type$staticmethod$3__isabstractmethod__" +ext_proptype(#12103, #10050) +#12104 = @"C_type$staticmethod$3__dict__" +ext_proptype(#12104, #10111) +#12105 = @"C_type$memoryview$3obj" +ext_proptype(#12105, #10005) +#12106 = @"C_type$memoryview$3nbytes" +ext_proptype(#12106, #10024) +#12107 = @"C_type$memoryview$3readonly" +ext_proptype(#12107, #10050) +#12108 = @"C_type$memoryview$3itemsize" +ext_proptype(#12108, #10024) +#12109 = @"C_type$memoryview$3ndim" +ext_proptype(#12109, #10024) +#12110 = @"C_type$memoryview$3shape" +ext_proptype(#12110, #10037) +#12111 = @"C_type$memoryview$3strides" +ext_proptype(#12111, #10037) +#12112 = @"C_type$memoryview$3suboffsets" +ext_proptype(#12112, #10037) +#12113 = @"C_type$memoryview$3c_contiguous" +ext_proptype(#12113, #10050) +#12114 = @"C_type$memoryview$3f_contiguous" +ext_proptype(#12114, #10050) +#12115 = @"C_type$memoryview$3contiguous" +ext_proptype(#12115, #10050) +py_cobjects(#11590) +py_cobjects(#11593) +py_cobjects(#11597) +py_cobjects(#11599) +py_cobjects(#10016) +#12116 = @"C_type$_csv.Dialect" +py_cobjects(#12116) +py_cobjects(#10024) +py_cobjects(#10018) +py_cobjects(#10020) +py_cobjects(#11601) +py_cobjects(#10111) +py_cobjects(#11602) +py_cobjects(#11604) +py_cobjects(#11603) +py_cobjects(#10713) +py_cobjects(#11609) +py_cobjects(#10030) +py_cobjects(#10647) +py_cobjects(#10039) +py_cobjects(#10723) +py_cobjects(#10001) +py_cobjects(#10226) +py_cobjects(#10042) +py_cobjects(#10037) +py_cobjects(#11650) +py_cobjects(#11507) +py_cobjects(#10517) +py_cobjects(#10046) +py_cobjects(#11982) +#12117 = @"C_type$weakcallableproxy" +py_cobjects(#12117) +py_cobjects(#10028) +py_cobjects(#11651) +py_cobjects(#11655) +py_cobjects(#11942) +py_cobjects(#11654) +py_cobjects(#11276) +py_cobjects(#11939) +py_cobjects(#10062) +py_cobjects(#11659) +py_cobjects(#11661) +py_cobjects(#11663) +py_cobjects(#11665) +py_cobjects(#11666) +py_cobjects(#10868) +py_cobjects(#11667) +py_cobjects(#10124) +py_cobjects(#11668) +#12118 = @"C_type$_thread._localdummy" +py_cobjects(#12118) +#12119 = @"C_type$_thread._local" +py_cobjects(#12119) +py_cobjects(#10081) +py_cobjects(#10010) +py_cobjects(#10169) +py_cobjects(#10189) +py_cobjects(#10191) +py_cobjects(#11671) +py_cobjects(#10208) +#12120 = @"C_type$_pickle.Pdata" +py_cobjects(#12120) +py_cobjects(#10005) +#12121 = @"C_type$ellipsis" +py_cobjects(#12121) +#12122 = @"C_type$NotImplementedType" +py_cobjects(#12122) +#12123 = @"C_type$function" +py_cobjects(#12123) +#12124 = @"C_type$builtin_function_or_method" +py_cobjects(#12124) +py_cobjects(#11672) +py_cobjects(#11673) +py_cobjects(#11675) +py_cobjects(#11677) +py_cobjects(#10223) +py_cobjects(#10249) +py_cobjects(#11680) +py_cobjects(#11684) +py_cobjects(#11685) +py_cobjects(#11697) +py_cobjects(#11690) +py_cobjects(#11703) +py_cobjects(#11692) +py_cobjects(#11704) +py_cobjects(#11719) +py_cobjects(#11731) +#12125 = @"C_type$staticarray" +py_cobjects(#12125) +py_cobjects(#11732) +py_cobjects(#10411) +py_cobjects(#11736) +py_cobjects(#11759) +py_cobjects(#11768) +py_cobjects(#11770) +py_cobjects(#11738) +py_cobjects(#11815) +py_cobjects(#11757) +py_cobjects(#11811) +py_cobjects(#11775) +py_cobjects(#11791) +py_cobjects(#11800) +py_cobjects(#11783) +py_cobjects(#11745) +py_cobjects(#11743) +#12126 = @"C_type$_io._BytesIOBuffer" +py_cobjects(#12126) +#12127 = @"C_type$operator.itemgetter" +py_cobjects(#12127) +#12128 = @"C_type$operator.attrgetter" +py_cobjects(#12128) +#12129 = @"C_type$operator.methodcaller" +py_cobjects(#12129) +#12130 = @"C_type$hashinheritancetester" +py_cobjects(#12130) +#12131 = @"C_type$test_structmembersType" +py_cobjects(#12131) +#12132 = @"C_type$instancemethod" +py_cobjects(#12132) +#12133 = @"C_type$_json.Scanner" +py_cobjects(#12133) +#12134 = @"C_type$_json.Encoder" +py_cobjects(#12134) +py_cobjects(#10526) +py_cobjects(#10528) +py_cobjects(#11821) +py_cobjects(#10531) +py_cobjects(#11105) +py_cobjects(#11825) +py_cobjects(#11827) +#12135 = @"C_type$_ctypes.CThunkObject" +py_cobjects(#12135) +#12136 = @"C_type$StgDict" +py_cobjects(#12136) +py_cobjects(#11855) +py_cobjects(#11861) +#12137 = @"C_type$_ctypes.CField" +py_cobjects(#12137) +py_cobjects(#11829) +#12138 = @"C_type$_ctypes.Array" +py_cobjects(#12138) +py_cobjects(#11857) +#12139 = @"C_type$_ctypes._Pointer" +py_cobjects(#12139) +#12140 = @"C_type$_ctypes.PyCFuncPtr" +py_cobjects(#12140) +py_cobjects(#11830) +py_cobjects(#11831) +py_cobjects(#10542) +py_cobjects(#11853) +#12141 = @"C_type$_ctypes.DictRemover" +py_cobjects(#12141) +py_cobjects(#11832) +#12142 = @"C_type$_ctypes.Structure" +py_cobjects(#12142) +#12143 = @"C_type$_ctypes.Union" +py_cobjects(#12143) +#12144 = @"C_type$symtable entry" +py_cobjects(#12144) +py_cobjects(#11867) +py_cobjects(#11870) +py_cobjects(#11546) +py_cobjects(#11879) +py_cobjects(#11880) +py_cobjects(#11881) +py_cobjects(#11142) +py_cobjects(#11882) +py_cobjects(#11883) +py_cobjects(#11884) +py_cobjects(#11885) +py_cobjects(#11886) +py_cobjects(#11888) +py_cobjects(#11889) +py_cobjects(#11890) +py_cobjects(#11891) +py_cobjects(#11892) +py_cobjects(#11893) +py_cobjects(#11894) +py_cobjects(#11895) +py_cobjects(#10050) +py_cobjects(#11896) +py_cobjects(#11897) +py_cobjects(#11898) +py_cobjects(#10582) +py_cobjects(#10584) +py_cobjects(#10586) +py_cobjects(#10886) +py_cobjects(#11903) +#12145 = @"C_type$method" +py_cobjects(#12145) +py_cobjects(#11904) +py_cobjects(#10626) +py_cobjects(#10073) +py_cobjects(#10074) +#12146 = @"C_type$cell" +py_cobjects(#12146) +py_cobjects(#11905) +py_cobjects(#11906) +py_cobjects(#11907) +py_cobjects(#10407) +#12147 = @"C_type$classmethod" +py_cobjects(#12147) +py_cobjects(#11984) +py_cobjects(#11935) +py_cobjects(#11979) +py_cobjects(#11985) +#12148 = @"C_type$staticmethod" +py_cobjects(#12148) +#12149 = @"C_type$super" +py_cobjects(#12149) +py_cobjects(#11955) +py_cobjects(#11923) +py_cobjects(#11941) +py_cobjects(#11910) +py_cobjects(#11911) +py_cobjects(#11912) +py_cobjects(#11922) +py_cobjects(#11921) +#12150 = @"C_type$dict_values" +py_cobjects(#12150) +py_cobjects(#11956) +py_cobjects(#10666) +py_cobjects(#10667) +py_cobjects(#11950) +#12151 = @"C_type$classmethod_descriptor" +py_cobjects(#12151) +#12152 = @"C_type$getset_descriptor" +py_cobjects(#12152) +#12153 = @"C_type$member_descriptor" +py_cobjects(#12153) +#12154 = @"C_type$method_descriptor" +py_cobjects(#12154) +#12155 = @"C_type$wrapper_descriptor" +py_cobjects(#12155) +py_cobjects(#11929) +#12156 = @"C_type$method-wrapper" +py_cobjects(#12156) +#12157 = @"C_type$managedbuffer" +py_cobjects(#12157) +py_cobjects(#11925) +py_cobjects(#11329) +py_cobjects(#11953) +py_cobjects(#11491) +py_cobjects(#11492) +#12158 = @"C_type$PyCapsule" +py_cobjects(#12158) +#12159 = @"C_type$namespace" +py_cobjects(#12159) +#12160 = @"C_type$ type" +py_cobjects(#12160) +#12161 = @"C_type$moduledef" +py_cobjects(#12161) +#12162 = @"C_type$TypeError" +py_cobjects(#12162) +#12163 = @"C_type$Exception" +py_cobjects(#12163) +py_cobjects(#11943) +#12164 = @"C_type$StopIteration" +py_cobjects(#12164) +#12165 = @"C_type$GeneratorExit" +py_cobjects(#12165) +#12166 = @"C_type$SystemExit" +py_cobjects(#12166) +#12167 = @"C_type$KeyboardInterrupt" +py_cobjects(#12167) +#12168 = @"C_type$ImportError" +py_cobjects(#12168) +#12169 = @"C_type$BlockingIOError" +py_cobjects(#12169) +py_cobjects(#11945) +#12170 = @"C_type$AttributeError" +py_cobjects(#12170) +#12171 = @"C_type$ValueError" +py_cobjects(#12171) +#12172 = @"C_type$ConnectionError" +py_cobjects(#12172) +#12173 = @"C_type$ChildProcessError" +py_cobjects(#12173) +#12174 = @"C_type$BrokenPipeError" +py_cobjects(#12174) +#12175 = @"C_type$ConnectionAbortedError" +py_cobjects(#12175) +#12176 = @"C_type$ConnectionRefusedError" +py_cobjects(#12176) +#12177 = @"C_type$ConnectionResetError" +py_cobjects(#12177) +#12178 = @"C_type$FileExistsError" +py_cobjects(#12178) +#12179 = @"C_type$FileNotFoundError" +py_cobjects(#12179) +#12180 = @"C_type$IsADirectoryError" +py_cobjects(#12180) +#12181 = @"C_type$NotADirectoryError" +py_cobjects(#12181) +#12182 = @"C_type$InterruptedError" +py_cobjects(#12182) +#12183 = @"C_type$PermissionError" +py_cobjects(#12183) +#12184 = @"C_type$ProcessLookupError" +py_cobjects(#12184) +#12185 = @"C_type$TimeoutError" +py_cobjects(#12185) +#12186 = @"C_type$EOFError" +py_cobjects(#12186) +#12187 = @"C_type$RuntimeError" +py_cobjects(#12187) +#12188 = @"C_type$NotImplementedError" +py_cobjects(#12188) +#12189 = @"C_type$NameError" +py_cobjects(#12189) +#12190 = @"C_type$UnboundLocalError" +py_cobjects(#12190) +#12191 = @"C_type$IndexError" +py_cobjects(#12191) +#12192 = @"C_type$LookupError" +py_cobjects(#12192) +#12193 = @"C_type$SyntaxError" +py_cobjects(#12193) +#12194 = @"C_type$IndentationError" +py_cobjects(#12194) +#12195 = @"C_type$TabError" +py_cobjects(#12195) +#12196 = @"C_type$KeyError" +py_cobjects(#12196) +#12197 = @"C_type$UnicodeError" +py_cobjects(#12197) +#12198 = @"C_type$UnicodeEncodeError" +py_cobjects(#12198) +#12199 = @"C_type$UnicodeDecodeError" +py_cobjects(#12199) +#12200 = @"C_type$UnicodeTranslateError" +py_cobjects(#12200) +#12201 = @"C_type$AssertionError" +py_cobjects(#12201) +#12202 = @"C_type$ArithmeticError" +py_cobjects(#12202) +#12203 = @"C_type$FloatingPointError" +py_cobjects(#12203) +#12204 = @"C_type$OverflowError" +py_cobjects(#12204) +#12205 = @"C_type$ZeroDivisionError" +py_cobjects(#12205) +#12206 = @"C_type$SystemError" +py_cobjects(#12206) +#12207 = @"C_type$ReferenceError" +py_cobjects(#12207) +#12208 = @"C_type$MemoryError" +py_cobjects(#12208) +#12209 = @"C_type$BufferError" +py_cobjects(#12209) +#12210 = @"C_type$Warning" +py_cobjects(#12210) +#12211 = @"C_type$UserWarning" +py_cobjects(#12211) +#12212 = @"C_type$DeprecationWarning" +py_cobjects(#12212) +#12213 = @"C_type$PendingDeprecationWarning" +py_cobjects(#12213) +#12214 = @"C_type$SyntaxWarning" +py_cobjects(#12214) +#12215 = @"C_type$RuntimeWarning" +py_cobjects(#12215) +#12216 = @"C_type$FutureWarning" +py_cobjects(#12216) +#12217 = @"C_type$ImportWarning" +py_cobjects(#12217) +#12218 = @"C_type$UnicodeWarning" +py_cobjects(#12218) +#12219 = @"C_type$BytesWarning" +py_cobjects(#12219) +#12220 = @"C_type$ResourceWarning" +py_cobjects(#12220) +py_cobjects(#11977) +#12221 = @"C_type$fieldnameiterator" +py_cobjects(#12221) +py_cobjects(#10678) +py_cobjects(#11986) +py_cobjects(#11987) +#12222 = @"C_type$_csv.Dialect$lineterminator" +py_cobjects(#12222) +py_cobjects(#11988) +py_cobjects(#11989) +py_cobjects(#11990) +py_cobjects(#11991) +py_cobjects(#11992) +py_cobjects(#11993) +py_cobjects(#11994) +#12223 = @"C_type$decimal.Context$rounding" +py_cobjects(#12223) +py_cobjects(#11995) +py_cobjects(#11996) +#12224 = @"C_type$decimal.Decimal$real" +py_cobjects(#12224) +py_cobjects(#11997) +#12225 = @"C_type$array.array$typecode" +py_cobjects(#12225) +py_cobjects(#11998) +#12226 = @"C_type$MultibyteIncrementalEncoder$3errors" +py_cobjects(#12226) +#12227 = @"C_type$MultibyteIncrementalDecoder$3errors" +py_cobjects(#12227) +#12228 = @"C_type$MultibyteStreamReader$3errors" +py_cobjects(#12228) +#12229 = @"C_type$MultibyteStreamWriter$3errors" +py_cobjects(#12229) +#12230 = @"C_type$Struct$3format" +py_cobjects(#12230) +py_cobjects(#11999) +py_cobjects(#12000) +py_cobjects(#12001) +py_cobjects(#12002) +py_cobjects(#12003) +py_cobjects(#12004) +py_cobjects(#12005) +py_cobjects(#12006) +py_cobjects(#12007) +py_cobjects(#12008) +py_cobjects(#12009) +#12231 = @"C_type$_pickle.Pickler$persistent_id" +py_cobjects(#12231) +py_cobjects(#12010) +#12232 = @"C_type$_pickle.Unpickler$persistent_load" +py_cobjects(#12232) +py_cobjects(#12011) +py_cobjects(#12012) +py_cobjects(#12013) +py_cobjects(#12014) +py_cobjects(#12015) +py_cobjects(#12016) +py_cobjects(#12017) +py_cobjects(#12018) +py_cobjects(#12019) +py_cobjects(#12020) +py_cobjects(#12021) +py_cobjects(#12022) +py_cobjects(#12023) +#12233 = @"C_type$datetime.time$tzinfo" +py_cobjects(#12233) +py_cobjects(#12024) +py_cobjects(#12025) +py_cobjects(#12026) +py_cobjects(#12027) +#12234 = @"C_type$datetime.datetime$tzinfo" +py_cobjects(#12234) +py_cobjects(#12028) +py_cobjects(#12029) +py_cobjects(#12030) +py_cobjects(#12031) +py_cobjects(#12032) +py_cobjects(#12033) +py_cobjects(#12034) +py_cobjects(#12035) +py_cobjects(#12036) +#12235 = @"C_type$ndarray$3format" +py_cobjects(#12235) +py_cobjects(#12037) +py_cobjects(#12038) +py_cobjects(#12039) +py_cobjects(#12040) +py_cobjects(#12041) +py_cobjects(#12042) +py_cobjects(#12043) +py_cobjects(#12044) +py_cobjects(#12045) +py_cobjects(#12046) +py_cobjects(#12047) +py_cobjects(#12048) +py_cobjects(#12049) +#12236 = @"C_type$_io.TextIOWrapper$name" +py_cobjects(#12236) +#12237 = @"C_type$_io.TextIOWrapper$closed" +py_cobjects(#12237) +py_cobjects(#12050) +#12238 = @"C_type$_io.TextIOWrapper$errors" +py_cobjects(#12238) +py_cobjects(#12051) +py_cobjects(#12052) +py_cobjects(#12053) +py_cobjects(#12054) +#12239 = @"C_type$_io.BufferedReader$closed" +py_cobjects(#12239) +#12240 = @"C_type$_io.BufferedReader$name" +py_cobjects(#12240) +#12241 = @"C_type$_io.BufferedReader$mode" +py_cobjects(#12241) +#12242 = @"C_type$_io.BufferedRandom$closed" +py_cobjects(#12242) +#12243 = @"C_type$_io.BufferedRandom$name" +py_cobjects(#12243) +#12244 = @"C_type$_io.BufferedRandom$mode" +py_cobjects(#12244) +#12245 = @"C_type$_io.BufferedWriter$closed" +py_cobjects(#12245) +#12246 = @"C_type$_io.BufferedWriter$name" +py_cobjects(#12246) +#12247 = @"C_type$_io.BufferedWriter$mode" +py_cobjects(#12247) +#12248 = @"C_type$_io.BufferedRWPair$closed" +py_cobjects(#12248) +py_cobjects(#12055) +py_cobjects(#12056) +py_cobjects(#12057) +py_cobjects(#12058) +py_cobjects(#12059) +#12249 = @"C_type$_io.FileIO$mode" +py_cobjects(#12249) +py_cobjects(#12060) +py_cobjects(#12061) +py_cobjects(#12062) +py_cobjects(#12063) +#12250 = @"C_type$_ctypes._Pointer$contents" +py_cobjects(#12250) +py_cobjects(#12064) +py_cobjects(#12065) +py_cobjects(#12066) +#12251 = @"C_type$_ctypes._SimpleCData$value" +py_cobjects(#12251) +py_cobjects(#12067) +py_cobjects(#12068) +py_cobjects(#12069) +#12252 = @"C_type$type$3__name__" +py_cobjects(#12252) +#12253 = @"C_type$type$3__qualname__" +py_cobjects(#12253) +#12254 = @"C_type$type$3__bases__" +py_cobjects(#12254) +py_cobjects(#12070) +#12255 = @"C_type$type$3__abstractmethods__" +py_cobjects(#12255) +py_cobjects(#12071) +py_cobjects(#12072) +#12256 = @"C_type$object$3__class__" +py_cobjects(#12256) +#12257 = @"C_type$frame$3f_locals" +py_cobjects(#12257) +py_cobjects(#12073) +py_cobjects(#12074) +py_cobjects(#12075) +py_cobjects(#12076) +py_cobjects(#12077) +py_cobjects(#12078) +py_cobjects(#12079) +#12258 = @"C_type$builtin_function_or_method$3__name__" +py_cobjects(#12258) +#12259 = @"C_type$builtin_function_or_method$3__qualname__" +py_cobjects(#12259) +py_cobjects(#12080) +#12260 = @"C_type$method-wrapper$__objclass__" +py_cobjects(#12260) +#12261 = @"C_type$method-wrapper$__name__" +py_cobjects(#12261) +#12262 = @"C_type$method-wrapper$__qualname__" +py_cobjects(#12262) +py_cobjects(#12081) +py_cobjects(#12082) +py_cobjects(#12083) +#12263 = @"C_type$classmethod_descriptor$3__qualname__" +py_cobjects(#12263) +#12264 = @"C_type$method_descriptor$3__qualname__" +py_cobjects(#12264) +py_cobjects(#12084) +#12265 = @"C_type$member_descriptor$3__qualname__" +py_cobjects(#12265) +py_cobjects(#12085) +#12266 = @"C_type$getset_descriptor$3__qualname__" +py_cobjects(#12266) +py_cobjects(#12086) +#12267 = @"C_type$wrapper_descriptor$3__qualname__" +py_cobjects(#12267) +py_cobjects(#12087) +#12268 = @"C_type$generator$3__name__" +py_cobjects(#12268) +py_cobjects(#12088) +py_cobjects(#12089) +#12269 = @"C_type$stderrprinter$3mode" +py_cobjects(#12269) +py_cobjects(#12090) +py_cobjects(#12091) +py_cobjects(#12092) +py_cobjects(#12093) +py_cobjects(#12094) +py_cobjects(#12095) +py_cobjects(#12096) +py_cobjects(#12097) +#12270 = @"C_type$method$3__doc__" +py_cobjects(#12270) +#12271 = @"C_type$instancemethod$3__doc__" +py_cobjects(#12271) +#12272 = @"C_type$function$3__code__" +py_cobjects(#12272) +py_cobjects(#12098) +py_cobjects(#12099) +#12273 = @"C_type$function$3__annotations__" +py_cobjects(#12273) +py_cobjects(#12100) +#12274 = @"C_type$function$3__name__" +py_cobjects(#12274) +#12275 = @"C_type$function$3__qualname__" +py_cobjects(#12275) +py_cobjects(#12101) +py_cobjects(#12102) +py_cobjects(#12103) +py_cobjects(#12104) +#12276 = @"C_type$cell$3cell_contents" +py_cobjects(#12276) +py_cobjects(#12105) +py_cobjects(#12106) +py_cobjects(#12107) +py_cobjects(#12108) +#12277 = @"C_type$memoryview$3format" +py_cobjects(#12277) +py_cobjects(#12109) +py_cobjects(#12110) +py_cobjects(#12111) +py_cobjects(#12112) +py_cobjects(#12113) +py_cobjects(#12114) +py_cobjects(#12115) +py_cobjects(#10000) +py_cobjects(#10002) +py_cobjects(#10003) +py_cobjects(#10004) +py_cobjects(#10006) +py_cobjects(#10007) +#12278 = @"C_builtin_function_or_method$time.gmtime" +py_cobjects(#12278) +#12279 = @"C_builtin_function_or_method$time.localtime" +py_cobjects(#12279) +#12280 = @"C_builtin_function_or_method$time.asctime" +py_cobjects(#12280) +#12281 = @"C_builtin_function_or_method$time.ctime" +py_cobjects(#12281) +py_cobjects(#10008) +py_cobjects(#10009) +#12282 = @"C_builtin_function_or_method$time.strptime" +py_cobjects(#12282) +py_cobjects(#10011) +py_cobjects(#10012) +py_cobjects(#10013) +py_cobjects(#10014) +py_cobjects(#11508) +py_cobjects(#10015) +py_cobjects(#10017) +py_cobjects(#10019) +py_cobjects(#10021) +py_cobjects(#10022) +py_cobjects(#11509) +py_cobjects(#10023) +py_cobjects(#10025) +py_cobjects(#10026) +py_cobjects(#10027) +py_cobjects(#10029) +#12283 = @"C_builtin_function_or_method$parser.isexpr" +py_cobjects(#12283) +#12284 = @"C_builtin_function_or_method$parser.issuite" +py_cobjects(#12284) +py_cobjects(#10031) +py_cobjects(#10032) +py_cobjects(#10033) +py_cobjects(#10034) +py_cobjects(#10035) +py_cobjects(#10036) +py_cobjects(#10038) +py_cobjects(#10040) +py_cobjects(#10041) +py_cobjects(#10043) +py_cobjects(#10044) +py_cobjects(#10045) +#12285 = @"C_builtin_function_or_method$array._array_reconstructor" +py_cobjects(#12285) +py_cobjects(#10047) +py_cobjects(#10048) +py_cobjects(#10049) +py_cobjects(#10051) +py_cobjects(#10052) +py_cobjects(#10053) +py_cobjects(#10054) +py_cobjects(#10055) +py_cobjects(#10056) +py_cobjects(#10057) +py_cobjects(#10058) +py_cobjects(#10059) +py_cobjects(#10060) +py_cobjects(#11510) +py_cobjects(#11511) +py_cobjects(#11512) +py_cobjects(#11513) +py_cobjects(#11514) +py_cobjects(#11515) +py_cobjects(#10061) +py_cobjects(#10063) +py_cobjects(#10064) +py_cobjects(#10065) +py_cobjects(#10066) +py_cobjects(#10067) +py_cobjects(#10068) +py_cobjects(#10069) +py_cobjects(#10070) +#12286 = @"C_builtin_function_or_method$signal.default_int_handler" +py_cobjects(#12286) +py_cobjects(#10071) +py_cobjects(#10072) +py_cobjects(#10075) +py_cobjects(#10076) +py_cobjects(#11516) +py_cobjects(#10077) +py_cobjects(#10078) +py_cobjects(#10079) +py_cobjects(#10080) +py_cobjects(#10082) +py_cobjects(#10083) +py_cobjects(#10084) +py_cobjects(#10085) +py_cobjects(#10086) +py_cobjects(#10087) +py_cobjects(#10088) +py_cobjects(#10089) +py_cobjects(#10090) +py_cobjects(#10091) +py_cobjects(#10092) +py_cobjects(#10093) +py_cobjects(#10094) +py_cobjects(#10095) +py_cobjects(#10096) +py_cobjects(#10097) +py_cobjects(#10098) +py_cobjects(#10099) +py_cobjects(#10100) +py_cobjects(#10101) +py_cobjects(#10102) +py_cobjects(#10103) +py_cobjects(#10104) +py_cobjects(#10105) +py_cobjects(#10106) +py_cobjects(#10107) +py_cobjects(#10108) +py_cobjects(#10109) +py_cobjects(#10110) +py_cobjects(#10112) +py_cobjects(#10113) +py_cobjects(#10114) +py_cobjects(#10115) +py_cobjects(#10116) +py_cobjects(#10117) +py_cobjects(#10118) +py_cobjects(#10119) +py_cobjects(#10120) +py_cobjects(#10121) +py_cobjects(#10122) +py_cobjects(#10123) +py_cobjects(#10125) +#12287 = @"C_builtin_function_or_method$_thread.exit_thread" +py_cobjects(#12287) +#12288 = @"C_builtin_function_or_method$_thread.exit" +py_cobjects(#12288) +py_cobjects(#10126) +py_cobjects(#10127) +py_cobjects(#10128) +py_cobjects(#10129) +py_cobjects(#10130) +#12289 = @"C_builtin_function_or_method$_codecs.lookup" +py_cobjects(#12289) +#12290 = @"C_builtin_function_or_method$_codecs.encode" +py_cobjects(#12290) +#12291 = @"C_builtin_function_or_method$_codecs.decode" +py_cobjects(#12291) +py_cobjects(#10131) +py_cobjects(#10132) +py_cobjects(#10133) +py_cobjects(#10134) +py_cobjects(#10135) +py_cobjects(#10136) +py_cobjects(#10137) +py_cobjects(#10138) +py_cobjects(#10139) +py_cobjects(#10140) +py_cobjects(#10141) +py_cobjects(#10142) +py_cobjects(#10143) +py_cobjects(#10144) +py_cobjects(#10145) +py_cobjects(#10146) +py_cobjects(#10147) +py_cobjects(#10148) +py_cobjects(#10149) +py_cobjects(#10150) +py_cobjects(#10151) +py_cobjects(#10152) +py_cobjects(#10153) +py_cobjects(#10154) +py_cobjects(#10155) +py_cobjects(#10156) +py_cobjects(#10157) +py_cobjects(#10158) +py_cobjects(#10159) +py_cobjects(#10160) +py_cobjects(#10161) +py_cobjects(#10162) +py_cobjects(#10163) +py_cobjects(#10164) +py_cobjects(#10165) +#12292 = @"C_builtin_function_or_method$_codecs.lookup_error" +py_cobjects(#12292) +py_cobjects(#10166) +py_cobjects(#10167) +#12293 = @"C_builtin_function_or_method$xxlimited.new" +py_cobjects(#12293) +py_cobjects(#10168) +py_cobjects(#10170) +py_cobjects(#10171) +py_cobjects(#10172) +py_cobjects(#10173) +py_cobjects(#10174) +py_cobjects(#10175) +py_cobjects(#10176) +py_cobjects(#10177) +py_cobjects(#10178) +py_cobjects(#10179) +py_cobjects(#10180) +py_cobjects(#10181) +py_cobjects(#10182) +py_cobjects(#10183) +py_cobjects(#10184) +py_cobjects(#10185) +py_cobjects(#10186) +py_cobjects(#10187) +py_cobjects(#10188) +py_cobjects(#10190) +py_cobjects(#10192) +py_cobjects(#10193) +py_cobjects(#10194) +py_cobjects(#10195) +py_cobjects(#10196) +py_cobjects(#10197) +py_cobjects(#10198) +py_cobjects(#10199) +py_cobjects(#10200) +py_cobjects(#10201) +py_cobjects(#10202) +py_cobjects(#10203) +py_cobjects(#10204) +py_cobjects(#10205) +py_cobjects(#10206) +#12294 = @"C_builtin_function_or_method$faulthandler._stack_overflow" +py_cobjects(#12294) +#12295 = @"C_builtin_function_or_method$_functools.reduce" +py_cobjects(#12295) +py_cobjects(#10207) +py_cobjects(#10209) +py_cobjects(#10210) +py_cobjects(#10211) +py_cobjects(#10212) +py_cobjects(#10213) +py_cobjects(#10214) +py_cobjects(#10215) +py_cobjects(#10216) +py_cobjects(#10217) +py_cobjects(#10218) +py_cobjects(#10219) +py_cobjects(#11517) +#12296 = @"C_builtin_function_or_method$grp.getgrnam" +py_cobjects(#12296) +py_cobjects(#10220) +py_cobjects(#10221) +py_cobjects(#11518) +py_cobjects(#11519) +py_cobjects(#11520) +py_cobjects(#10222) +py_cobjects(#10224) +py_cobjects(#10225) +py_cobjects(#10227) +py_cobjects(#10228) +py_cobjects(#10229) +py_cobjects(#10230) +py_cobjects(#10231) +py_cobjects(#10232) +py_cobjects(#10233) +py_cobjects(#10234) +py_cobjects(#10235) +py_cobjects(#10236) +py_cobjects(#10237) +py_cobjects(#10238) +py_cobjects(#10239) +py_cobjects(#10240) +py_cobjects(#10241) +py_cobjects(#10242) +py_cobjects(#10243) +py_cobjects(#10244) +py_cobjects(#10245) +py_cobjects(#10246) +py_cobjects(#10247) +py_cobjects(#10248) +#12297 = @"C_builtin_function_or_method$_sre.compile" +py_cobjects(#12297) +py_cobjects(#10250) +py_cobjects(#10251) +py_cobjects(#10252) +py_cobjects(#10253) +py_cobjects(#10254) +py_cobjects(#10255) +py_cobjects(#10256) +py_cobjects(#10257) +py_cobjects(#10258) +#12298 = @"C_builtin_function_or_method$binascii.b2a_uu" +py_cobjects(#12298) +#12299 = @"C_builtin_function_or_method$binascii.a2b_base64" +py_cobjects(#12299) +#12300 = @"C_builtin_function_or_method$binascii.b2a_base64" +py_cobjects(#12300) +py_cobjects(#10259) +#12301 = @"C_builtin_function_or_method$binascii.b2a_hqx" +py_cobjects(#12301) +py_cobjects(#10260) +py_cobjects(#10261) +py_cobjects(#10262) +py_cobjects(#10263) +#12302 = @"C_builtin_function_or_method$binascii.rlecode_hqx" +py_cobjects(#12302) +py_cobjects(#10264) +py_cobjects(#10265) +py_cobjects(#10266) +py_cobjects(#10267) +py_cobjects(#10268) +py_cobjects(#10269) +py_cobjects(#10270) +py_cobjects(#10271) +py_cobjects(#10272) +py_cobjects(#10273) +py_cobjects(#10274) +py_cobjects(#10275) +py_cobjects(#10276) +py_cobjects(#10277) +py_cobjects(#10278) +py_cobjects(#10279) +py_cobjects(#10280) +py_cobjects(#10281) +py_cobjects(#10282) +#12303 = @"C_builtin_function_or_method$posix.lstat" +py_cobjects(#12303) +py_cobjects(#10283) +py_cobjects(#10284) +py_cobjects(#10285) +py_cobjects(#10286) +py_cobjects(#10287) +py_cobjects(#10288) +py_cobjects(#10289) +py_cobjects(#10290) +#12304 = @"C_builtin_function_or_method$posix.stat" +py_cobjects(#12304) +py_cobjects(#10291) +py_cobjects(#10292) +py_cobjects(#10293) +py_cobjects(#10294) +#12305 = @"C_builtin_function_or_method$posix.uname" +py_cobjects(#12305) +py_cobjects(#10295) +py_cobjects(#10296) +py_cobjects(#10297) +#12306 = @"C_builtin_function_or_method$posix.times" +py_cobjects(#12306) +#12307 = @"C_builtin_function_or_method$posix._exit" +py_cobjects(#12307) +#12308 = @"C_builtin_function_or_method$posix.execv" +py_cobjects(#12308) +#12309 = @"C_builtin_function_or_method$posix.execve" +py_cobjects(#12309) +py_cobjects(#10298) +py_cobjects(#10299) +py_cobjects(#10300) +#12310 = @"C_builtin_function_or_method$posix.sched_getparam" +py_cobjects(#12310) +py_cobjects(#10301) +py_cobjects(#10302) +py_cobjects(#10303) +py_cobjects(#10304) +py_cobjects(#10305) +py_cobjects(#10306) +py_cobjects(#10307) +py_cobjects(#10308) +py_cobjects(#10309) +py_cobjects(#10310) +py_cobjects(#10311) +py_cobjects(#10312) +py_cobjects(#10313) +py_cobjects(#10314) +py_cobjects(#10315) +py_cobjects(#10316) +py_cobjects(#10317) +py_cobjects(#10318) +py_cobjects(#10319) +py_cobjects(#10320) +py_cobjects(#10321) +py_cobjects(#10322) +py_cobjects(#10323) +py_cobjects(#10324) +py_cobjects(#10325) +py_cobjects(#10326) +py_cobjects(#10327) +py_cobjects(#10328) +py_cobjects(#10329) +py_cobjects(#10330) +py_cobjects(#10331) +py_cobjects(#10332) +py_cobjects(#10333) +py_cobjects(#10334) +py_cobjects(#10335) +py_cobjects(#10336) +py_cobjects(#10337) +py_cobjects(#10338) +py_cobjects(#10339) +py_cobjects(#10340) +py_cobjects(#10341) +py_cobjects(#10342) +py_cobjects(#10343) +py_cobjects(#10344) +py_cobjects(#10345) +py_cobjects(#10346) +py_cobjects(#10347) +py_cobjects(#10348) +py_cobjects(#10349) +#12311 = @"C_builtin_function_or_method$posix.read" +py_cobjects(#12311) +py_cobjects(#10350) +#12312 = @"C_builtin_function_or_method$posix.pread" +py_cobjects(#12312) +py_cobjects(#10351) +py_cobjects(#10352) +py_cobjects(#10353) +py_cobjects(#10354) +#12313 = @"C_builtin_function_or_method$posix.fstat" +py_cobjects(#12313) +py_cobjects(#10355) +py_cobjects(#10356) +py_cobjects(#10357) +py_cobjects(#10358) +py_cobjects(#10359) +py_cobjects(#10360) +py_cobjects(#10361) +py_cobjects(#10362) +py_cobjects(#10363) +py_cobjects(#10364) +py_cobjects(#10365) +py_cobjects(#10366) +py_cobjects(#10367) +py_cobjects(#10368) +py_cobjects(#10369) +py_cobjects(#10370) +py_cobjects(#10371) +py_cobjects(#10372) +py_cobjects(#10373) +py_cobjects(#10374) +py_cobjects(#10375) +py_cobjects(#10376) +py_cobjects(#10377) +py_cobjects(#10378) +py_cobjects(#10379) +py_cobjects(#10380) +py_cobjects(#10381) +#12314 = @"C_builtin_function_or_method$posix.fstatvfs" +py_cobjects(#12314) +#12315 = @"C_builtin_function_or_method$posix.statvfs" +py_cobjects(#12315) +py_cobjects(#10382) +py_cobjects(#10383) +py_cobjects(#10384) +py_cobjects(#10385) +#12316 = @"C_builtin_function_or_method$posix.abort" +py_cobjects(#12316) +py_cobjects(#10386) +py_cobjects(#10387) +py_cobjects(#10388) +py_cobjects(#10389) +py_cobjects(#10390) +py_cobjects(#10391) +py_cobjects(#10392) +#12317 = @"C_builtin_function_or_method$posix.getxattr" +py_cobjects(#12317) +py_cobjects(#10393) +py_cobjects(#10394) +#12318 = @"C_builtin_function_or_method$posix.get_terminal_size" +py_cobjects(#12318) +#12319 = @"C_builtin_function_or_method$atexit.register" +py_cobjects(#12319) +py_cobjects(#10395) +py_cobjects(#10396) +py_cobjects(#10397) +py_cobjects(#10398) +py_cobjects(#10399) +py_cobjects(#10400) +#12320 = @"C_builtin_function_or_method$_heapq.heappushpop" +py_cobjects(#12320) +py_cobjects(#11521) +#12321 = @"C_builtin_function_or_method$_heapq.heapreplace" +py_cobjects(#12321) +py_cobjects(#10401) +py_cobjects(#10402) +py_cobjects(#10403) +py_cobjects(#10404) +#12322 = @"C_builtin_function_or_method$_testbuffer.get_pointer" +py_cobjects(#12322) +py_cobjects(#10405) +py_cobjects(#10406) +py_cobjects(#10408) +#12323 = @"C_builtin_function_or_method$_testbuffer.is_contiguous" +py_cobjects(#12323) +#12324 = @"C_builtin_function_or_method$_testbuffer.cmp_contig" +py_cobjects(#12324) +py_cobjects(#10409) +py_cobjects(#10410) +#12325 = @"C_builtin_function_or_method$io.open" +py_cobjects(#12325) +py_cobjects(#10412) +py_cobjects(#10413) +py_cobjects(#10414) +py_cobjects(#10415) +py_cobjects(#10416) +#12326 = @"C_builtin_function_or_method$operator.is_" +py_cobjects(#12326) +#12327 = @"C_builtin_function_or_method$operator.is_not" +py_cobjects(#12327) +py_cobjects(#11522) +py_cobjects(#11523) +#12328 = @"C_builtin_function_or_method$operator.add" +py_cobjects(#12328) +#12329 = @"C_builtin_function_or_method$operator.__add__" +py_cobjects(#12329) +#12330 = @"C_builtin_function_or_method$operator.sub" +py_cobjects(#12330) +#12331 = @"C_builtin_function_or_method$operator.__sub__" +py_cobjects(#12331) +#12332 = @"C_builtin_function_or_method$operator.mul" +py_cobjects(#12332) +#12333 = @"C_builtin_function_or_method$operator.__mul__" +py_cobjects(#12333) +#12334 = @"C_builtin_function_or_method$operator.floordiv" +py_cobjects(#12334) +#12335 = @"C_builtin_function_or_method$operator.__floordiv__" +py_cobjects(#12335) +#12336 = @"C_builtin_function_or_method$operator.truediv" +py_cobjects(#12336) +#12337 = @"C_builtin_function_or_method$operator.__truediv__" +py_cobjects(#12337) +#12338 = @"C_builtin_function_or_method$operator.mod" +py_cobjects(#12338) +#12339 = @"C_builtin_function_or_method$operator.__mod__" +py_cobjects(#12339) +py_cobjects(#11524) +py_cobjects(#11525) +py_cobjects(#11526) +py_cobjects(#11527) +py_cobjects(#11528) +py_cobjects(#11529) +py_cobjects(#11530) +py_cobjects(#11531) +py_cobjects(#11532) +py_cobjects(#11533) +#12340 = @"C_builtin_function_or_method$operator.lshift" +py_cobjects(#12340) +#12341 = @"C_builtin_function_or_method$operator.__lshift__" +py_cobjects(#12341) +#12342 = @"C_builtin_function_or_method$operator.rshift" +py_cobjects(#12342) +#12343 = @"C_builtin_function_or_method$operator.__rshift__" +py_cobjects(#12343) +py_cobjects(#10417) +py_cobjects(#10418) +#12344 = @"C_builtin_function_or_method$operator.and_" +py_cobjects(#12344) +#12345 = @"C_builtin_function_or_method$operator.__and__" +py_cobjects(#12345) +#12346 = @"C_builtin_function_or_method$operator.xor" +py_cobjects(#12346) +#12347 = @"C_builtin_function_or_method$operator.__xor__" +py_cobjects(#12347) +#12348 = @"C_builtin_function_or_method$operator.or_" +py_cobjects(#12348) +#12349 = @"C_builtin_function_or_method$operator.__or__" +py_cobjects(#12349) +#12350 = @"C_builtin_function_or_method$operator.iadd" +py_cobjects(#12350) +#12351 = @"C_builtin_function_or_method$operator.__iadd__" +py_cobjects(#12351) +#12352 = @"C_builtin_function_or_method$operator.isub" +py_cobjects(#12352) +#12353 = @"C_builtin_function_or_method$operator.__isub__" +py_cobjects(#12353) +#12354 = @"C_builtin_function_or_method$operator.imul" +py_cobjects(#12354) +#12355 = @"C_builtin_function_or_method$operator.__imul__" +py_cobjects(#12355) +#12356 = @"C_builtin_function_or_method$operator.ifloordiv" +py_cobjects(#12356) +#12357 = @"C_builtin_function_or_method$operator.__ifloordiv__" +py_cobjects(#12357) +#12358 = @"C_builtin_function_or_method$operator.itruediv" +py_cobjects(#12358) +#12359 = @"C_builtin_function_or_method$operator.__itruediv__" +py_cobjects(#12359) +#12360 = @"C_builtin_function_or_method$operator.imod" +py_cobjects(#12360) +#12361 = @"C_builtin_function_or_method$operator.__imod__" +py_cobjects(#12361) +#12362 = @"C_builtin_function_or_method$operator.ilshift" +py_cobjects(#12362) +#12363 = @"C_builtin_function_or_method$operator.__ilshift__" +py_cobjects(#12363) +#12364 = @"C_builtin_function_or_method$operator.irshift" +py_cobjects(#12364) +#12365 = @"C_builtin_function_or_method$operator.__irshift__" +py_cobjects(#12365) +#12366 = @"C_builtin_function_or_method$operator.iand" +py_cobjects(#12366) +#12367 = @"C_builtin_function_or_method$operator.__iand__" +py_cobjects(#12367) +#12368 = @"C_builtin_function_or_method$operator.ixor" +py_cobjects(#12368) +#12369 = @"C_builtin_function_or_method$operator.__ixor__" +py_cobjects(#12369) +#12370 = @"C_builtin_function_or_method$operator.ior" +py_cobjects(#12370) +#12371 = @"C_builtin_function_or_method$operator.__ior__" +py_cobjects(#12371) +#12372 = @"C_builtin_function_or_method$operator.concat" +py_cobjects(#12372) +#12373 = @"C_builtin_function_or_method$operator.__concat__" +py_cobjects(#12373) +#12374 = @"C_builtin_function_or_method$operator.iconcat" +py_cobjects(#12374) +#12375 = @"C_builtin_function_or_method$operator.__iconcat__" +py_cobjects(#12375) +#12376 = @"C_builtin_function_or_method$operator.getitem" +py_cobjects(#12376) +#12377 = @"C_builtin_function_or_method$operator.__getitem__" +py_cobjects(#12377) +py_cobjects(#10419) +py_cobjects(#10420) +py_cobjects(#10421) +py_cobjects(#10422) +#12378 = @"C_builtin_function_or_method$operator.pow" +py_cobjects(#12378) +#12379 = @"C_builtin_function_or_method$operator.__pow__" +py_cobjects(#12379) +#12380 = @"C_builtin_function_or_method$operator.ipow" +py_cobjects(#12380) +#12381 = @"C_builtin_function_or_method$operator.__ipow__" +py_cobjects(#12381) +#12382 = @"C_builtin_function_or_method$operator.lt" +py_cobjects(#12382) +#12383 = @"C_builtin_function_or_method$operator.__lt__" +py_cobjects(#12383) +#12384 = @"C_builtin_function_or_method$operator.le" +py_cobjects(#12384) +#12385 = @"C_builtin_function_or_method$operator.__le__" +py_cobjects(#12385) +#12386 = @"C_builtin_function_or_method$operator.eq" +py_cobjects(#12386) +#12387 = @"C_builtin_function_or_method$operator.__eq__" +py_cobjects(#12387) +#12388 = @"C_builtin_function_or_method$operator.ne" +py_cobjects(#12388) +#12389 = @"C_builtin_function_or_method$operator.__ne__" +py_cobjects(#12389) +#12390 = @"C_builtin_function_or_method$operator.gt" +py_cobjects(#12390) +#12391 = @"C_builtin_function_or_method$operator.__gt__" +py_cobjects(#12391) +#12392 = @"C_builtin_function_or_method$operator.ge" +py_cobjects(#12392) +#12393 = @"C_builtin_function_or_method$operator.__ge__" +py_cobjects(#12393) +py_cobjects(#10423) +py_cobjects(#10424) +py_cobjects(#10425) +py_cobjects(#10426) +py_cobjects(#10427) +py_cobjects(#10428) +#12394 = @"C_builtin_function_or_method$readline.get_line_buffer" +py_cobjects(#12394) +py_cobjects(#10429) +py_cobjects(#10430) +py_cobjects(#10431) +py_cobjects(#10432) +py_cobjects(#10433) +py_cobjects(#10434) +py_cobjects(#10435) +py_cobjects(#10436) +py_cobjects(#10437) +py_cobjects(#10438) +py_cobjects(#10439) +py_cobjects(#10440) +#12395 = @"C_builtin_function_or_method$readline.get_begidx" +py_cobjects(#12395) +#12396 = @"C_builtin_function_or_method$readline.get_endidx" +py_cobjects(#12396) +py_cobjects(#10441) +py_cobjects(#10442) +py_cobjects(#10443) +py_cobjects(#10444) +#12397 = @"C_builtin_function_or_method$readline.get_completer_delims" +py_cobjects(#12397) +py_cobjects(#10445) +py_cobjects(#10446) +py_cobjects(#10447) +py_cobjects(#10448) +#12398 = @"C_builtin_function_or_method$_testcapi.raise_exception" +py_cobjects(#12398) +#12399 = @"C_builtin_function_or_method$_testcapi.raise_memoryerror" +py_cobjects(#12399) +py_cobjects(#10449) +py_cobjects(#10450) +py_cobjects(#10451) +py_cobjects(#10452) +py_cobjects(#10453) +py_cobjects(#10454) +py_cobjects(#10455) +py_cobjects(#10456) +py_cobjects(#10457) +py_cobjects(#10458) +py_cobjects(#10459) +py_cobjects(#10460) +py_cobjects(#10461) +py_cobjects(#10462) +py_cobjects(#10463) +py_cobjects(#10464) +py_cobjects(#10465) +py_cobjects(#10466) +py_cobjects(#10467) +py_cobjects(#10468) +py_cobjects(#10469) +py_cobjects(#10470) +py_cobjects(#10471) +py_cobjects(#10472) +py_cobjects(#10473) +py_cobjects(#10474) +py_cobjects(#10475) +py_cobjects(#10476) +py_cobjects(#10477) +py_cobjects(#10478) +py_cobjects(#10479) +py_cobjects(#10480) +py_cobjects(#10481) +py_cobjects(#10482) +py_cobjects(#10483) +py_cobjects(#10484) +py_cobjects(#10485) +py_cobjects(#10486) +py_cobjects(#10487) +py_cobjects(#10488) +py_cobjects(#10489) +py_cobjects(#10490) +py_cobjects(#10491) +py_cobjects(#10492) +py_cobjects(#10493) +py_cobjects(#10494) +py_cobjects(#10495) +py_cobjects(#10496) +py_cobjects(#10497) +py_cobjects(#10498) +py_cobjects(#10499) +py_cobjects(#10500) +#12400 = @"C_builtin_function_or_method$_testcapi.codec_incrementalencoder" +py_cobjects(#12400) +#12401 = @"C_builtin_function_or_method$_testcapi.codec_incrementaldecoder" +py_cobjects(#12401) +py_cobjects(#10501) +py_cobjects(#10502) +py_cobjects(#10503) +py_cobjects(#10504) +py_cobjects(#10505) +py_cobjects(#10506) +#12402 = @"C_builtin_function_or_method$_testcapi.unicode_encodedecimal" +py_cobjects(#12402) +#12403 = @"C_builtin_function_or_method$_testcapi.unicode_transformdecimaltoascii" +py_cobjects(#12403) +py_cobjects(#10507) +py_cobjects(#10508) +py_cobjects(#10509) +py_cobjects(#10510) +py_cobjects(#10511) +py_cobjects(#10512) +py_cobjects(#10513) +py_cobjects(#10514) +py_cobjects(#10515) +py_cobjects(#10516) +py_cobjects(#10518) +#12404 = @"C_builtin_function_or_method$_testcapi.crash_no_current_thread" +py_cobjects(#12404) +py_cobjects(#10519) +py_cobjects(#10520) +py_cobjects(#10521) +py_cobjects(#10522) +py_cobjects(#10523) +py_cobjects(#11534) +py_cobjects(#10524) +py_cobjects(#10525) +py_cobjects(#10527) +#12405 = @"C_builtin_function_or_method$spwd.getspnam" +py_cobjects(#12405) +py_cobjects(#10529) +py_cobjects(#10530) +py_cobjects(#10532) +py_cobjects(#10533) +py_cobjects(#11535) +py_cobjects(#11536) +py_cobjects(#11537) +py_cobjects(#10534) +py_cobjects(#10535) +py_cobjects(#10536) +py_cobjects(#10537) +py_cobjects(#10538) +py_cobjects(#10539) +py_cobjects(#10540) +py_cobjects(#10541) +py_cobjects(#10543) +py_cobjects(#10544) +py_cobjects(#10545) +py_cobjects(#11538) +py_cobjects(#11539) +py_cobjects(#11540) +py_cobjects(#10546) +py_cobjects(#10547) +py_cobjects(#11541) +#12406 = @"C_builtin_function_or_method$pwd.getpwnam" +py_cobjects(#12406) +py_cobjects(#10548) +py_cobjects(#11542) +py_cobjects(#10549) +py_cobjects(#10550) +py_cobjects(#11543) +py_cobjects(#10551) +py_cobjects(#11544) +py_cobjects(#11545) +py_cobjects(#10552) +py_cobjects(#10553) +py_cobjects(#10554) +py_cobjects(#11547) +py_cobjects(#11548) +py_cobjects(#10555) +py_cobjects(#10556) +py_cobjects(#11549) +py_cobjects(#10557) +py_cobjects(#11550) +py_cobjects(#11551) +py_cobjects(#11552) +py_cobjects(#10558) +py_cobjects(#11553) +py_cobjects(#11554) +py_cobjects(#11555) +py_cobjects(#11556) +py_cobjects(#11557) +py_cobjects(#10559) +py_cobjects(#11558) +py_cobjects(#11559) +py_cobjects(#10560) +py_cobjects(#11560) +py_cobjects(#11561) +py_cobjects(#10561) +py_cobjects(#10562) +py_cobjects(#10563) +py_cobjects(#11562) +py_cobjects(#11563) +py_cobjects(#11564) +py_cobjects(#10564) +py_cobjects(#11565) +py_cobjects(#10565) +py_cobjects(#10566) +py_cobjects(#10567) +py_cobjects(#10568) +py_cobjects(#10569) +py_cobjects(#10570) +py_cobjects(#10571) +py_cobjects(#10572) +py_cobjects(#10573) +py_cobjects(#10574) +py_cobjects(#10575) +py_cobjects(#11566) +py_cobjects(#10576) +py_cobjects(#10577) +py_cobjects(#10578) +py_cobjects(#10579) +py_cobjects(#10580) +py_cobjects(#11567) +py_cobjects(#11568) +py_cobjects(#11569) +py_cobjects(#11570) +py_cobjects(#11571) +py_cobjects(#11572) +py_cobjects(#10581) +py_cobjects(#10583) +py_cobjects(#10585) +py_cobjects(#10587) +py_cobjects(#11573) +py_cobjects(#10588) +py_cobjects(#10589) +py_cobjects(#10590) +py_cobjects(#10591) +py_cobjects(#10592) +py_cobjects(#11574) +py_cobjects(#10593) +py_cobjects(#10594) +py_cobjects(#10595) +py_cobjects(#10596) +py_cobjects(#10597) +py_cobjects(#10598) +py_cobjects(#10599) +py_cobjects(#10600) +py_cobjects(#11575) +py_cobjects(#10601) +py_cobjects(#11576) +py_cobjects(#10602) +py_cobjects(#10603) +py_cobjects(#10604) +py_cobjects(#10605) +py_cobjects(#10606) +py_cobjects(#10607) +py_cobjects(#10608) +py_cobjects(#10609) +py_cobjects(#10610) +py_cobjects(#11577) +py_cobjects(#10611) +py_cobjects(#10612) +py_cobjects(#10613) +py_cobjects(#10614) +py_cobjects(#10615) +py_cobjects(#10616) +py_cobjects(#10617) +py_cobjects(#10618) +py_cobjects(#10619) +py_cobjects(#10620) +py_cobjects(#10621) +#12407 = @"C_builtin_function_or_method$sys.exit" +py_cobjects(#12407) +#12408 = @"C_builtin_function_or_method$sys.getdefaultencoding" +py_cobjects(#12408) +py_cobjects(#10622) +#12409 = @"C_builtin_function_or_method$sys.getfilesystemencoding" +py_cobjects(#12409) +py_cobjects(#10623) +py_cobjects(#10624) +py_cobjects(#11578) +py_cobjects(#10625) +#12410 = @"C_builtin_function_or_method$sys.intern" +py_cobjects(#12410) +py_cobjects(#10627) +py_cobjects(#10628) +py_cobjects(#10629) +py_cobjects(#10630) +py_cobjects(#10631) +py_cobjects(#10632) +py_cobjects(#10633) +py_cobjects(#10634) +py_cobjects(#10635) +py_cobjects(#10636) +py_cobjects(#11579) +py_cobjects(#10637) +#12411 = @"C_builtin_function_or_method$marshal.dump" +py_cobjects(#12411) +py_cobjects(#10638) +#12412 = @"C_builtin_function_or_method$marshal.dumps" +py_cobjects(#12412) +py_cobjects(#10639) +py_cobjects(#10640) +py_cobjects(#10641) +py_cobjects(#10642) +py_cobjects(#10643) +py_cobjects(#10644) +py_cobjects(#10645) +py_cobjects(#10646) +py_cobjects(#10648) +py_cobjects(#10649) +py_cobjects(#10650) +py_cobjects(#10651) +py_cobjects(#10652) +#12413 = @"C_builtin_function_or_method$builtins.__build_class__" +py_cobjects(#12413) +py_cobjects(#11580) +py_cobjects(#11581) +py_cobjects(#10653) +py_cobjects(#10654) +py_cobjects(#11582) +py_cobjects(#11583) +py_cobjects(#10655) +py_cobjects(#11584) +py_cobjects(#10656) +py_cobjects(#10657) +#12414 = @"C_builtin_function_or_method$builtins.dir" +py_cobjects(#12414) +#12415 = @"C_builtin_function_or_method$builtins.divmod" +py_cobjects(#12415) +#12416 = @"C_builtin_function_or_method$builtins.eval" +py_cobjects(#12416) +py_cobjects(#10658) +py_cobjects(#11585) +#12417 = @"C_builtin_function_or_method$builtins.getattr" +py_cobjects(#12417) +py_cobjects(#10659) +py_cobjects(#10660) +py_cobjects(#10661) +py_cobjects(#11586) +py_cobjects(#10662) +#12418 = @"C_builtin_function_or_method$builtins.input" +py_cobjects(#12418) +py_cobjects(#10663) +py_cobjects(#10664) +py_cobjects(#10665) +py_cobjects(#10668) +py_cobjects(#10669) +#12419 = @"C_builtin_function_or_method$builtins.max" +py_cobjects(#12419) +#12420 = @"C_builtin_function_or_method$builtins.min" +py_cobjects(#12420) +#12421 = @"C_builtin_function_or_method$builtins.next" +py_cobjects(#12421) +py_cobjects(#11587) +py_cobjects(#10670) +#12422 = @"C_builtin_function_or_method$builtins.pow" +py_cobjects(#12422) +py_cobjects(#10671) +py_cobjects(#11588) +py_cobjects(#11589) +py_cobjects(#10672) +py_cobjects(#10673) +py_cobjects(#10674) +py_cobjects(#10675) +py_cobjects(#10676) +py_cobjects(#10677) +py_cobjects(#10679) +py_cobjects(#10680) +py_cobjects(#10681) +py_cobjects(#10682) +py_cobjects(#10683) +py_cobjects(#10684) +py_cobjects(#10685) +py_cobjects(#10686) +py_cobjects(#11591) +py_cobjects(#10687) +py_cobjects(#11592) +py_cobjects(#11594) +py_cobjects(#11595) +py_cobjects(#11596) +py_cobjects(#11598) +py_cobjects(#10688) +py_cobjects(#10689) +py_cobjects(#10690) +py_cobjects(#10691) +py_cobjects(#10692) +py_cobjects(#11600) +py_cobjects(#10693) +py_cobjects(#10694) +py_cobjects(#10695) +py_cobjects(#10696) +py_cobjects(#10697) +py_cobjects(#10698) +py_cobjects(#10699) +py_cobjects(#10700) +py_cobjects(#10701) +py_cobjects(#10702) +py_cobjects(#10703) +py_cobjects(#10704) +py_cobjects(#10705) +py_cobjects(#10706) +py_cobjects(#11605) +py_cobjects(#10707) +py_cobjects(#10708) +py_cobjects(#10709) +py_cobjects(#11606) +py_cobjects(#11607) +py_cobjects(#10710) +py_cobjects(#10711) +py_cobjects(#10712) +py_cobjects(#10714) +py_cobjects(#10715) +py_cobjects(#10716) +py_cobjects(#11608) +py_cobjects(#11610) +py_cobjects(#11611) +py_cobjects(#10717) +py_cobjects(#10718) +py_cobjects(#11612) +py_cobjects(#11613) +py_cobjects(#10719) +py_cobjects(#10720) +py_cobjects(#10721) +py_cobjects(#10722) +py_cobjects(#10724) +py_cobjects(#10725) +py_cobjects(#10726) +py_cobjects(#10727) +py_cobjects(#10728) +py_cobjects(#10729) +py_cobjects(#10730) +py_cobjects(#10731) +py_cobjects(#10732) +py_cobjects(#10733) +py_cobjects(#10734) +py_cobjects(#10735) +py_cobjects(#10736) +py_cobjects(#10737) +py_cobjects(#10738) +py_cobjects(#10739) +py_cobjects(#10740) +py_cobjects(#10741) +py_cobjects(#10742) +py_cobjects(#10743) +py_cobjects(#10744) +py_cobjects(#10745) +py_cobjects(#10746) +py_cobjects(#10747) +py_cobjects(#10748) +py_cobjects(#10749) +py_cobjects(#10750) +py_cobjects(#10751) +py_cobjects(#10752) +py_cobjects(#10753) +py_cobjects(#10754) +py_cobjects(#10755) +py_cobjects(#10756) +py_cobjects(#11614) +py_cobjects(#11615) +py_cobjects(#11616) +py_cobjects(#11617) +py_cobjects(#11618) +py_cobjects(#11619) +py_cobjects(#11620) +py_cobjects(#11621) +py_cobjects(#11622) +py_cobjects(#11623) +py_cobjects(#10757) +py_cobjects(#11624) +py_cobjects(#10758) +py_cobjects(#11625) +py_cobjects(#10759) +py_cobjects(#10760) +py_cobjects(#10761) +py_cobjects(#11626) +py_cobjects(#11627) +py_cobjects(#11628) +py_cobjects(#10762) +py_cobjects(#10763) +py_cobjects(#10764) +py_cobjects(#10765) +py_cobjects(#10766) +py_cobjects(#10767) +py_cobjects(#10768) +py_cobjects(#11629) +py_cobjects(#10769) +py_cobjects(#10770) +py_cobjects(#10771) +py_cobjects(#10772) +py_cobjects(#10773) +py_cobjects(#10774) +py_cobjects(#10775) +py_cobjects(#10776) +py_cobjects(#10777) +py_cobjects(#10778) +py_cobjects(#10779) +py_cobjects(#10780) +py_cobjects(#10781) +py_cobjects(#10782) +py_cobjects(#10783) +py_cobjects(#10784) +py_cobjects(#10785) +py_cobjects(#10786) +py_cobjects(#10787) +py_cobjects(#10788) +py_cobjects(#10789) +py_cobjects(#10790) +py_cobjects(#10791) +py_cobjects(#10792) +py_cobjects(#10793) +py_cobjects(#10794) +py_cobjects(#10795) +py_cobjects(#10796) +py_cobjects(#10797) +py_cobjects(#11630) +py_cobjects(#11631) +py_cobjects(#11632) +py_cobjects(#11633) +py_cobjects(#11634) +py_cobjects(#11635) +py_cobjects(#11636) +py_cobjects(#11637) +py_cobjects(#11638) +py_cobjects(#11639) +py_cobjects(#10798) +py_cobjects(#11640) +py_cobjects(#11641) +py_cobjects(#10799) +py_cobjects(#10800) +py_cobjects(#10801) +py_cobjects(#10802) +py_cobjects(#10803) +py_cobjects(#11642) +py_cobjects(#11643) +py_cobjects(#10804) +py_cobjects(#10805) +py_cobjects(#10806) +py_cobjects(#11644) +py_cobjects(#10807) +py_cobjects(#10808) +py_cobjects(#10809) +py_cobjects(#10810) +py_cobjects(#10811) +py_cobjects(#10812) +py_cobjects(#10813) +py_cobjects(#11645) +py_cobjects(#11646) +py_cobjects(#11647) +py_cobjects(#11648) +py_cobjects(#10814) +py_cobjects(#10815) +py_cobjects(#10816) +py_cobjects(#10817) +py_cobjects(#10818) +py_cobjects(#10819) +py_cobjects(#10820) +py_cobjects(#11649) +py_cobjects(#10821) +py_cobjects(#10822) +py_cobjects(#10823) +py_cobjects(#10824) +py_cobjects(#11652) +py_cobjects(#10825) +py_cobjects(#10826) +py_cobjects(#10827) +py_cobjects(#11653) +py_cobjects(#10828) +py_cobjects(#10829) +py_cobjects(#10830) +py_cobjects(#10831) +py_cobjects(#10832) +py_cobjects(#10833) +py_cobjects(#11656) +py_cobjects(#10834) +py_cobjects(#11657) +py_cobjects(#10835) +py_cobjects(#10836) +py_cobjects(#10837) +py_cobjects(#10838) +py_cobjects(#10839) +py_cobjects(#10840) +py_cobjects(#10841) +py_cobjects(#10842) +py_cobjects(#11658) +py_cobjects(#10843) +py_cobjects(#10844) +py_cobjects(#10845) +py_cobjects(#10846) +py_cobjects(#10847) +py_cobjects(#10848) +py_cobjects(#10849) +py_cobjects(#10850) +py_cobjects(#10851) +py_cobjects(#10852) +py_cobjects(#10853) +py_cobjects(#10854) +py_cobjects(#10855) +py_cobjects(#11660) +py_cobjects(#10856) +py_cobjects(#11662) +py_cobjects(#11664) +py_cobjects(#10857) +py_cobjects(#10858) +py_cobjects(#10859) +py_cobjects(#10860) +py_cobjects(#10861) +py_cobjects(#10862) +py_cobjects(#10863) +py_cobjects(#10864) +py_cobjects(#10865) +py_cobjects(#10866) +py_cobjects(#10867) +py_cobjects(#10869) +py_cobjects(#10870) +py_cobjects(#10871) +py_cobjects(#10872) +py_cobjects(#10873) +py_cobjects(#10874) +py_cobjects(#10875) +py_cobjects(#10876) +py_cobjects(#10877) +py_cobjects(#10878) +py_cobjects(#10879) +py_cobjects(#10880) +py_cobjects(#10881) +py_cobjects(#10882) +py_cobjects(#10883) +py_cobjects(#10884) +py_cobjects(#10885) +py_cobjects(#10887) +py_cobjects(#10888) +py_cobjects(#10889) +py_cobjects(#10890) +py_cobjects(#10891) +py_cobjects(#10892) +py_cobjects(#10893) +py_cobjects(#10894) +py_cobjects(#10895) +py_cobjects(#10896) +py_cobjects(#10897) +py_cobjects(#10898) +py_cobjects(#10899) +py_cobjects(#10900) +py_cobjects(#10901) +py_cobjects(#10902) +py_cobjects(#10903) +py_cobjects(#10904) +py_cobjects(#10905) +py_cobjects(#10906) +py_cobjects(#10907) +py_cobjects(#10908) +py_cobjects(#11669) +py_cobjects(#10909) +py_cobjects(#10910) +py_cobjects(#10911) +py_cobjects(#11670) +py_cobjects(#10912) +py_cobjects(#10913) +py_cobjects(#10914) +py_cobjects(#10915) +py_cobjects(#10916) +py_cobjects(#10917) +py_cobjects(#10918) +py_cobjects(#10919) +py_cobjects(#11674) +py_cobjects(#11676) +py_cobjects(#10920) +py_cobjects(#10921) +py_cobjects(#10922) +py_cobjects(#10923) +py_cobjects(#10924) +py_cobjects(#11678) +py_cobjects(#10925) +py_cobjects(#10926) +py_cobjects(#10927) +py_cobjects(#11679) +py_cobjects(#10928) +py_cobjects(#10929) +py_cobjects(#10930) +py_cobjects(#10931) +py_cobjects(#10932) +py_cobjects(#10933) +py_cobjects(#10934) +py_cobjects(#11681) +py_cobjects(#11682) +py_cobjects(#11683) +py_cobjects(#10935) +py_cobjects(#10936) +py_cobjects(#10937) +py_cobjects(#10938) +py_cobjects(#10939) +py_cobjects(#10940) +py_cobjects(#10941) +py_cobjects(#10942) +py_cobjects(#10943) +py_cobjects(#11686) +py_cobjects(#11687) +py_cobjects(#11688) +py_cobjects(#11689) +py_cobjects(#10944) +py_cobjects(#11691) +py_cobjects(#11693) +py_cobjects(#11694) +py_cobjects(#11695) +py_cobjects(#10945) +py_cobjects(#11696) +py_cobjects(#11698) +py_cobjects(#11699) +py_cobjects(#11700) +py_cobjects(#11701) +py_cobjects(#11702) +py_cobjects(#11705) +py_cobjects(#11706) +py_cobjects(#11707) +py_cobjects(#11708) +py_cobjects(#11709) +py_cobjects(#10946) +py_cobjects(#11710) +py_cobjects(#11711) +py_cobjects(#10947) +py_cobjects(#10948) +py_cobjects(#10949) +py_cobjects(#11712) +py_cobjects(#11713) +py_cobjects(#10950) +py_cobjects(#11714) +py_cobjects(#11715) +py_cobjects(#11716) +py_cobjects(#10951) +py_cobjects(#10952) +py_cobjects(#10953) +py_cobjects(#11717) +py_cobjects(#10954) +py_cobjects(#11718) +py_cobjects(#11720) +py_cobjects(#10955) +py_cobjects(#11721) +py_cobjects(#10956) +py_cobjects(#11722) +py_cobjects(#11723) +py_cobjects(#11724) +py_cobjects(#11725) +py_cobjects(#11726) +py_cobjects(#11727) +py_cobjects(#11728) +py_cobjects(#10957) +py_cobjects(#11729) +py_cobjects(#10958) +py_cobjects(#10959) +py_cobjects(#10960) +py_cobjects(#11730) +py_cobjects(#10961) +py_cobjects(#10962) +py_cobjects(#10963) +py_cobjects(#10964) +py_cobjects(#10965) +py_cobjects(#10966) +py_cobjects(#10967) +py_cobjects(#10968) +py_cobjects(#10969) +py_cobjects(#10970) +py_cobjects(#10971) +py_cobjects(#10972) +py_cobjects(#10973) +py_cobjects(#10974) +py_cobjects(#10975) +py_cobjects(#10976) +py_cobjects(#10977) +py_cobjects(#10978) +py_cobjects(#10979) +py_cobjects(#10980) +py_cobjects(#10981) +py_cobjects(#11733) +py_cobjects(#11734) +py_cobjects(#10982) +py_cobjects(#10983) +py_cobjects(#10984) +py_cobjects(#10985) +py_cobjects(#11735) +py_cobjects(#10986) +py_cobjects(#10987) +py_cobjects(#10988) +py_cobjects(#10989) +py_cobjects(#10990) +py_cobjects(#10991) +py_cobjects(#11737) +py_cobjects(#11739) +py_cobjects(#11740) +py_cobjects(#11741) +py_cobjects(#11742) +py_cobjects(#10992) +py_cobjects(#10993) +py_cobjects(#10994) +py_cobjects(#11744) +py_cobjects(#10995) +py_cobjects(#11746) +py_cobjects(#11747) +py_cobjects(#11748) +py_cobjects(#10996) +py_cobjects(#11749) +py_cobjects(#11750) +py_cobjects(#11751) +py_cobjects(#11752) +py_cobjects(#11753) +py_cobjects(#11754) +py_cobjects(#11755) +py_cobjects(#10997) +py_cobjects(#11756) +py_cobjects(#10998) +py_cobjects(#10999) +py_cobjects(#11000) +py_cobjects(#11001) +py_cobjects(#11002) +py_cobjects(#11003) +py_cobjects(#11004) +py_cobjects(#11005) +py_cobjects(#11006) +py_cobjects(#11007) +py_cobjects(#11008) +py_cobjects(#11009) +py_cobjects(#11010) +py_cobjects(#11011) +py_cobjects(#11012) +py_cobjects(#11013) +py_cobjects(#11014) +py_cobjects(#11015) +py_cobjects(#11016) +py_cobjects(#11017) +py_cobjects(#11018) +py_cobjects(#11758) +py_cobjects(#11760) +py_cobjects(#11761) +py_cobjects(#11019) +py_cobjects(#11020) +py_cobjects(#11021) +py_cobjects(#11022) +py_cobjects(#11023) +py_cobjects(#11024) +py_cobjects(#11762) +py_cobjects(#11763) +py_cobjects(#11764) +py_cobjects(#11765) +py_cobjects(#11025) +py_cobjects(#11766) +py_cobjects(#11767) +py_cobjects(#11026) +py_cobjects(#11027) +py_cobjects(#11028) +py_cobjects(#11029) +py_cobjects(#11030) +py_cobjects(#11769) +py_cobjects(#11771) +py_cobjects(#11772) +py_cobjects(#11031) +py_cobjects(#11773) +py_cobjects(#11774) +py_cobjects(#11776) +py_cobjects(#11032) +py_cobjects(#11777) +py_cobjects(#11778) +py_cobjects(#11779) +py_cobjects(#11780) +py_cobjects(#11781) +py_cobjects(#11033) +py_cobjects(#11782) +py_cobjects(#11034) +py_cobjects(#11035) +py_cobjects(#11036) +py_cobjects(#11037) +py_cobjects(#11038) +py_cobjects(#11039) +py_cobjects(#11040) +py_cobjects(#11041) +py_cobjects(#11042) +py_cobjects(#11043) +py_cobjects(#11784) +py_cobjects(#11785) +py_cobjects(#11786) +py_cobjects(#11787) +py_cobjects(#11788) +py_cobjects(#11789) +py_cobjects(#11044) +py_cobjects(#11790) +py_cobjects(#11045) +py_cobjects(#11046) +py_cobjects(#11047) +py_cobjects(#11048) +py_cobjects(#11049) +py_cobjects(#11050) +py_cobjects(#11051) +py_cobjects(#11052) +py_cobjects(#11053) +py_cobjects(#11054) +py_cobjects(#11055) +py_cobjects(#11056) +py_cobjects(#11792) +py_cobjects(#11793) +py_cobjects(#11794) +py_cobjects(#11795) +py_cobjects(#11796) +py_cobjects(#11797) +py_cobjects(#11057) +py_cobjects(#11798) +py_cobjects(#11058) +py_cobjects(#11059) +py_cobjects(#11060) +py_cobjects(#11061) +py_cobjects(#11062) +py_cobjects(#11063) +py_cobjects(#11799) +py_cobjects(#11801) +py_cobjects(#11802) +py_cobjects(#11803) +py_cobjects(#11804) +py_cobjects(#11805) +py_cobjects(#11806) +py_cobjects(#11807) +py_cobjects(#11808) +py_cobjects(#11809) +py_cobjects(#11810) +py_cobjects(#11064) +py_cobjects(#11812) +py_cobjects(#11813) +py_cobjects(#11814) +py_cobjects(#11065) +py_cobjects(#11066) +py_cobjects(#11067) +py_cobjects(#11068) +py_cobjects(#11069) +py_cobjects(#11070) +py_cobjects(#11071) +py_cobjects(#11072) +py_cobjects(#11073) +py_cobjects(#11074) +py_cobjects(#11075) +py_cobjects(#11076) +py_cobjects(#11077) +py_cobjects(#11078) +py_cobjects(#11079) +py_cobjects(#11816) +py_cobjects(#11080) +py_cobjects(#11081) +py_cobjects(#11082) +py_cobjects(#11083) +py_cobjects(#11084) +py_cobjects(#11085) +py_cobjects(#11086) +py_cobjects(#11817) +py_cobjects(#11087) +py_cobjects(#11088) +py_cobjects(#11818) +py_cobjects(#11089) +py_cobjects(#11090) +py_cobjects(#11091) +py_cobjects(#11819) +py_cobjects(#11092) +py_cobjects(#11820) +py_cobjects(#11093) +py_cobjects(#11094) +py_cobjects(#11095) +py_cobjects(#11096) +py_cobjects(#11822) +py_cobjects(#11097) +py_cobjects(#11098) +py_cobjects(#11823) +py_cobjects(#11099) +py_cobjects(#11100) +py_cobjects(#11101) +py_cobjects(#11102) +py_cobjects(#11103) +py_cobjects(#11104) +py_cobjects(#11106) +py_cobjects(#11824) +py_cobjects(#11107) +py_cobjects(#11108) +py_cobjects(#11109) +py_cobjects(#11110) +py_cobjects(#11111) +py_cobjects(#11112) +py_cobjects(#11113) +py_cobjects(#11114) +py_cobjects(#11115) +py_cobjects(#11116) +py_cobjects(#11117) +py_cobjects(#11118) +py_cobjects(#11826) +py_cobjects(#11119) +py_cobjects(#11120) +py_cobjects(#11121) +py_cobjects(#11122) +py_cobjects(#11123) +py_cobjects(#11124) +py_cobjects(#11828) +py_cobjects(#11833) +py_cobjects(#11834) +py_cobjects(#11835) +py_cobjects(#11836) +py_cobjects(#11837) +py_cobjects(#11838) +py_cobjects(#11839) +py_cobjects(#11840) +py_cobjects(#11841) +py_cobjects(#11842) +py_cobjects(#11843) +py_cobjects(#11844) +py_cobjects(#11845) +py_cobjects(#11846) +py_cobjects(#11847) +py_cobjects(#11848) +py_cobjects(#11849) +py_cobjects(#11850) +py_cobjects(#11851) +py_cobjects(#11852) +py_cobjects(#11854) +py_cobjects(#11125) +py_cobjects(#11126) +py_cobjects(#11856) +py_cobjects(#11858) +py_cobjects(#11859) +py_cobjects(#11860) +py_cobjects(#11127) +py_cobjects(#11128) +py_cobjects(#11129) +py_cobjects(#11862) +py_cobjects(#11863) +py_cobjects(#11864) +py_cobjects(#11865) +py_cobjects(#11866) +py_cobjects(#11130) +py_cobjects(#11868) +py_cobjects(#11869) +py_cobjects(#11871) +py_cobjects(#11872) +py_cobjects(#11131) +py_cobjects(#11132) +py_cobjects(#11133) +py_cobjects(#11873) +py_cobjects(#11874) +py_cobjects(#11134) +py_cobjects(#11135) +py_cobjects(#11875) +py_cobjects(#11136) +py_cobjects(#11876) +py_cobjects(#11877) +py_cobjects(#11878) +py_cobjects(#11137) +py_cobjects(#11138) +py_cobjects(#11139) +py_cobjects(#11140) +py_cobjects(#11141) +py_cobjects(#11143) +py_cobjects(#11144) +py_cobjects(#11145) +py_cobjects(#11146) +py_cobjects(#11147) +py_cobjects(#11148) +py_cobjects(#11149) +py_cobjects(#11150) +py_cobjects(#11151) +py_cobjects(#11152) +py_cobjects(#11153) +py_cobjects(#11887) +py_cobjects(#11154) +py_cobjects(#11155) +py_cobjects(#11156) +py_cobjects(#11157) +py_cobjects(#11158) +py_cobjects(#11159) +py_cobjects(#11160) +py_cobjects(#11161) +py_cobjects(#11162) +py_cobjects(#11163) +py_cobjects(#11164) +py_cobjects(#11165) +py_cobjects(#11166) +py_cobjects(#11167) +py_cobjects(#11168) +py_cobjects(#11169) +py_cobjects(#11170) +py_cobjects(#11171) +py_cobjects(#11172) +py_cobjects(#11899) +py_cobjects(#11173) +py_cobjects(#11174) +py_cobjects(#11175) +py_cobjects(#11176) +py_cobjects(#11177) +py_cobjects(#11178) +py_cobjects(#11179) +py_cobjects(#11180) +py_cobjects(#11181) +py_cobjects(#11182) +py_cobjects(#11183) +py_cobjects(#11184) +py_cobjects(#11185) +py_cobjects(#11186) +py_cobjects(#11187) +py_cobjects(#11188) +py_cobjects(#11189) +py_cobjects(#11190) +py_cobjects(#11900) +py_cobjects(#11191) +py_cobjects(#11192) +py_cobjects(#11193) +py_cobjects(#11901) +py_cobjects(#11194) +py_cobjects(#11195) +py_cobjects(#11196) +py_cobjects(#11197) +py_cobjects(#11198) +py_cobjects(#11199) +py_cobjects(#11200) +py_cobjects(#11201) +py_cobjects(#11202) +py_cobjects(#11203) +py_cobjects(#11204) +py_cobjects(#11205) +py_cobjects(#11206) +py_cobjects(#11207) +py_cobjects(#11208) +py_cobjects(#11209) +py_cobjects(#11210) +py_cobjects(#11211) +py_cobjects(#11212) +py_cobjects(#11213) +py_cobjects(#11214) +py_cobjects(#11215) +py_cobjects(#11216) +py_cobjects(#11217) +py_cobjects(#11218) +py_cobjects(#11219) +py_cobjects(#11220) +py_cobjects(#11221) +py_cobjects(#11902) +py_cobjects(#11222) +py_cobjects(#11223) +py_cobjects(#11224) +py_cobjects(#11225) +py_cobjects(#11226) +py_cobjects(#11227) +py_cobjects(#11228) +py_cobjects(#11229) +py_cobjects(#11230) +py_cobjects(#11231) +py_cobjects(#11232) +py_cobjects(#11233) +py_cobjects(#11234) +py_cobjects(#11235) +py_cobjects(#11236) +py_cobjects(#11237) +py_cobjects(#11238) +py_cobjects(#11239) +py_cobjects(#11240) +py_cobjects(#11241) +py_cobjects(#11242) +py_cobjects(#11243) +py_cobjects(#11244) +py_cobjects(#11245) +py_cobjects(#11246) +py_cobjects(#11247) +py_cobjects(#11248) +py_cobjects(#11249) +py_cobjects(#11908) +py_cobjects(#11909) +py_cobjects(#11250) +py_cobjects(#11251) +py_cobjects(#11252) +py_cobjects(#11253) +py_cobjects(#11254) +py_cobjects(#11255) +py_cobjects(#11256) +py_cobjects(#11257) +py_cobjects(#11258) +py_cobjects(#11913) +py_cobjects(#11259) +py_cobjects(#11914) +py_cobjects(#11915) +py_cobjects(#11916) +py_cobjects(#11260) +py_cobjects(#11917) +py_cobjects(#11918) +py_cobjects(#11919) +py_cobjects(#11261) +py_cobjects(#11920) +py_cobjects(#11262) +py_cobjects(#11263) +py_cobjects(#11264) +py_cobjects(#11265) +py_cobjects(#11266) +py_cobjects(#11267) +py_cobjects(#11268) +py_cobjects(#11269) +py_cobjects(#11270) +py_cobjects(#11271) +py_cobjects(#11272) +py_cobjects(#11273) +py_cobjects(#11274) +py_cobjects(#11275) +py_cobjects(#11277) +py_cobjects(#11278) +py_cobjects(#11279) +py_cobjects(#11280) +py_cobjects(#11924) +py_cobjects(#11281) +py_cobjects(#11282) +py_cobjects(#11283) +py_cobjects(#11284) +py_cobjects(#11285) +py_cobjects(#11286) +py_cobjects(#11287) +py_cobjects(#11288) +py_cobjects(#11289) +py_cobjects(#11290) +py_cobjects(#11291) +py_cobjects(#11292) +py_cobjects(#11293) +py_cobjects(#11294) +py_cobjects(#11295) +py_cobjects(#11296) +py_cobjects(#11297) +py_cobjects(#11298) +py_cobjects(#11299) +py_cobjects(#11300) +py_cobjects(#11301) +py_cobjects(#11302) +py_cobjects(#11303) +py_cobjects(#11304) +py_cobjects(#11305) +py_cobjects(#11306) +py_cobjects(#11307) +py_cobjects(#11308) +py_cobjects(#11309) +py_cobjects(#11310) +py_cobjects(#11311) +py_cobjects(#11312) +py_cobjects(#11313) +py_cobjects(#11314) +py_cobjects(#11315) +py_cobjects(#11316) +py_cobjects(#11317) +py_cobjects(#11318) +py_cobjects(#11319) +py_cobjects(#11320) +py_cobjects(#11321) +py_cobjects(#11322) +py_cobjects(#11323) +py_cobjects(#11324) +py_cobjects(#11325) +py_cobjects(#11326) +py_cobjects(#11327) +py_cobjects(#11328) +py_cobjects(#11330) +py_cobjects(#11331) +py_cobjects(#11332) +py_cobjects(#11333) +py_cobjects(#11334) +py_cobjects(#11335) +py_cobjects(#11926) +py_cobjects(#11336) +py_cobjects(#11337) +py_cobjects(#11338) +py_cobjects(#11339) +py_cobjects(#11340) +py_cobjects(#11341) +py_cobjects(#11342) +py_cobjects(#11343) +py_cobjects(#11344) +py_cobjects(#11345) +py_cobjects(#11346) +py_cobjects(#11347) +py_cobjects(#11348) +py_cobjects(#11349) +py_cobjects(#11927) +py_cobjects(#11350) +py_cobjects(#11928) +py_cobjects(#11930) +py_cobjects(#11931) +py_cobjects(#11932) +py_cobjects(#11933) +py_cobjects(#11934) +py_cobjects(#11936) +py_cobjects(#11937) +py_cobjects(#11938) +py_cobjects(#11940) +py_cobjects(#11351) +py_cobjects(#11352) +py_cobjects(#11353) +py_cobjects(#11354) +py_cobjects(#11355) +py_cobjects(#11356) +py_cobjects(#11357) +py_cobjects(#11358) +py_cobjects(#11359) +py_cobjects(#11360) +py_cobjects(#11944) +py_cobjects(#11361) +py_cobjects(#11362) +py_cobjects(#11363) +py_cobjects(#11364) +py_cobjects(#11365) +py_cobjects(#11946) +py_cobjects(#11947) +py_cobjects(#11366) +py_cobjects(#11367) +py_cobjects(#11948) +py_cobjects(#11368) +py_cobjects(#11949) +py_cobjects(#11369) +py_cobjects(#11370) +py_cobjects(#11371) +py_cobjects(#11372) +py_cobjects(#11373) +py_cobjects(#11374) +py_cobjects(#11375) +py_cobjects(#11951) +py_cobjects(#11376) +py_cobjects(#11377) +py_cobjects(#11378) +py_cobjects(#11952) +py_cobjects(#11379) +py_cobjects(#11380) +py_cobjects(#11381) +py_cobjects(#11382) +py_cobjects(#11383) +py_cobjects(#11384) +py_cobjects(#11385) +py_cobjects(#11386) +py_cobjects(#11387) +py_cobjects(#11388) +py_cobjects(#11389) +py_cobjects(#11390) +py_cobjects(#11391) +py_cobjects(#11392) +py_cobjects(#11393) +py_cobjects(#11394) +py_cobjects(#11395) +py_cobjects(#11396) +py_cobjects(#11397) +py_cobjects(#11398) +py_cobjects(#11399) +py_cobjects(#11400) +py_cobjects(#11401) +py_cobjects(#11402) +py_cobjects(#11403) +py_cobjects(#11404) +py_cobjects(#11405) +py_cobjects(#11406) +py_cobjects(#11407) +py_cobjects(#11408) +py_cobjects(#11409) +py_cobjects(#11410) +py_cobjects(#11411) +py_cobjects(#11412) +py_cobjects(#11413) +py_cobjects(#11414) +py_cobjects(#11415) +py_cobjects(#11416) +py_cobjects(#11417) +py_cobjects(#11418) +py_cobjects(#11419) +py_cobjects(#11420) +py_cobjects(#11421) +py_cobjects(#11422) +py_cobjects(#11423) +py_cobjects(#11424) +py_cobjects(#11425) +py_cobjects(#11426) +py_cobjects(#11427) +py_cobjects(#11428) +py_cobjects(#11429) +py_cobjects(#11430) +py_cobjects(#11431) +py_cobjects(#11432) +py_cobjects(#11433) +py_cobjects(#11434) +py_cobjects(#11954) +py_cobjects(#11435) +py_cobjects(#11436) +py_cobjects(#11437) +py_cobjects(#11438) +py_cobjects(#11439) +py_cobjects(#11440) +py_cobjects(#11441) +py_cobjects(#11442) +py_cobjects(#11443) +py_cobjects(#11444) +py_cobjects(#11445) +py_cobjects(#11446) +py_cobjects(#11447) +py_cobjects(#11448) +py_cobjects(#11449) +py_cobjects(#11450) +py_cobjects(#11451) +py_cobjects(#11452) +py_cobjects(#11453) +py_cobjects(#11454) +py_cobjects(#11455) +py_cobjects(#11456) +py_cobjects(#11457) +py_cobjects(#11957) +py_cobjects(#11458) +py_cobjects(#11459) +py_cobjects(#11958) +py_cobjects(#11959) +py_cobjects(#11960) +py_cobjects(#11961) +py_cobjects(#11962) +py_cobjects(#11460) +py_cobjects(#11963) +py_cobjects(#11461) +py_cobjects(#11462) +py_cobjects(#11463) +py_cobjects(#11964) +py_cobjects(#11965) +py_cobjects(#11966) +py_cobjects(#11464) +py_cobjects(#11465) +py_cobjects(#11967) +py_cobjects(#11968) +py_cobjects(#11466) +py_cobjects(#11467) +py_cobjects(#11969) +py_cobjects(#11970) +py_cobjects(#11971) +py_cobjects(#11972) +py_cobjects(#11468) +py_cobjects(#11469) +py_cobjects(#11470) +py_cobjects(#11471) +py_cobjects(#11472) +py_cobjects(#11473) +py_cobjects(#11474) +py_cobjects(#11475) +py_cobjects(#11476) +py_cobjects(#11477) +py_cobjects(#11478) +py_cobjects(#11479) +py_cobjects(#11480) +py_cobjects(#11973) +py_cobjects(#11974) +py_cobjects(#11975) +py_cobjects(#11976) +py_cobjects(#11481) +py_cobjects(#11482) +py_cobjects(#11483) +py_cobjects(#11484) +py_cobjects(#11485) +py_cobjects(#11486) +py_cobjects(#11487) +py_cobjects(#11978) +py_cobjects(#11488) +py_cobjects(#11489) +py_cobjects(#11490) +py_cobjects(#11493) +py_cobjects(#11494) +py_cobjects(#11495) +py_cobjects(#11496) +py_cobjects(#11497) +py_cobjects(#11980) +py_cobjects(#11981) +py_cobjects(#11498) +py_cobjects(#11499) +py_cobjects(#11500) +py_cobjects(#11501) +py_cobjects(#11983) +py_cobjects(#11502) +py_cobjects(#11503) +py_cobjects(#11504) +py_cobjects(#11505) +py_cobjects(#11506) +py_cobject_sources(#11590, 1) +py_cobject_sources(#11593, 1) +py_cobject_sources(#11597, 1) +py_cobject_sources(#11599, 1) +py_cobject_sources(#10016, 1) +py_cobject_sources(#12116, 1) +py_cobject_sources(#10024, 1) +py_cobject_sources(#10018, 1) +py_cobject_sources(#10020, 1) +py_cobject_sources(#11601, 1) +py_cobject_sources(#10111, 1) +py_cobject_sources(#11602, 1) +py_cobject_sources(#11604, 1) +py_cobject_sources(#11603, 1) +py_cobject_sources(#10713, 1) +py_cobject_sources(#11609, 1) +py_cobject_sources(#10030, 1) +py_cobject_sources(#10647, 1) +py_cobject_sources(#10039, 1) +py_cobject_sources(#10723, 1) +py_cobject_sources(#10001, 1) +py_cobject_sources(#10226, 1) +py_cobject_sources(#10042, 1) +py_cobject_sources(#10037, 1) +py_cobject_sources(#11650, 1) +py_cobject_sources(#11507, 1) +py_cobject_sources(#10517, 1) +py_cobject_sources(#10046, 1) +py_cobject_sources(#11982, 1) +py_cobject_sources(#12117, 1) +py_cobject_sources(#10028, 1) +py_cobject_sources(#11651, 1) +py_cobject_sources(#11655, 1) +py_cobject_sources(#11942, 1) +py_cobject_sources(#11654, 1) +py_cobject_sources(#11276, 1) +py_cobject_sources(#11939, 1) +py_cobject_sources(#10062, 1) +py_cobject_sources(#11659, 1) +py_cobject_sources(#11661, 1) +py_cobject_sources(#11663, 1) +py_cobject_sources(#11665, 1) +py_cobject_sources(#11666, 1) +py_cobject_sources(#10868, 1) +py_cobject_sources(#11667, 1) +py_cobject_sources(#10124, 1) +py_cobject_sources(#11668, 1) +py_cobject_sources(#12118, 1) +py_cobject_sources(#12119, 1) +py_cobject_sources(#10081, 1) +py_cobject_sources(#10010, 1) +py_cobject_sources(#10169, 1) +py_cobject_sources(#10189, 1) +py_cobject_sources(#10191, 1) +py_cobject_sources(#11671, 1) +py_cobject_sources(#10208, 1) +py_cobject_sources(#12120, 1) +py_cobject_sources(#10005, 1) +py_cobject_sources(#12121, 1) +py_cobject_sources(#12122, 1) +py_cobject_sources(#12123, 1) +py_cobject_sources(#12124, 1) +py_cobject_sources(#11672, 1) +py_cobject_sources(#11673, 1) +py_cobject_sources(#11675, 1) +py_cobject_sources(#11677, 1) +py_cobject_sources(#10223, 1) +py_cobject_sources(#10249, 1) +py_cobject_sources(#11680, 1) +py_cobject_sources(#11684, 1) +py_cobject_sources(#11685, 1) +py_cobject_sources(#11697, 1) +py_cobject_sources(#11690, 1) +py_cobject_sources(#11703, 1) +py_cobject_sources(#11692, 1) +py_cobject_sources(#11704, 1) +py_cobject_sources(#11719, 1) +py_cobject_sources(#11731, 1) +py_cobject_sources(#12125, 1) +py_cobject_sources(#11732, 1) +py_cobject_sources(#10411, 1) +py_cobject_sources(#11736, 1) +py_cobject_sources(#11759, 1) +py_cobject_sources(#11768, 1) +py_cobject_sources(#11770, 1) +py_cobject_sources(#11738, 1) +py_cobject_sources(#11815, 1) +py_cobject_sources(#11757, 1) +py_cobject_sources(#11811, 1) +py_cobject_sources(#11775, 1) +py_cobject_sources(#11791, 1) +py_cobject_sources(#11800, 1) +py_cobject_sources(#11783, 1) +py_cobject_sources(#11745, 1) +py_cobject_sources(#11743, 1) +py_cobject_sources(#12126, 1) +py_cobject_sources(#12127, 1) +py_cobject_sources(#12128, 1) +py_cobject_sources(#12129, 1) +py_cobject_sources(#12130, 1) +py_cobject_sources(#12131, 1) +py_cobject_sources(#12132, 1) +py_cobject_sources(#12133, 1) +py_cobject_sources(#12134, 1) +py_cobject_sources(#10526, 1) +py_cobject_sources(#10528, 1) +py_cobject_sources(#11821, 1) +py_cobject_sources(#10531, 1) +py_cobject_sources(#11105, 1) +py_cobject_sources(#11825, 1) +py_cobject_sources(#11827, 1) +py_cobject_sources(#12135, 1) +py_cobject_sources(#12136, 1) +py_cobject_sources(#11855, 1) +py_cobject_sources(#11861, 1) +py_cobject_sources(#12137, 1) +py_cobject_sources(#11829, 1) +py_cobject_sources(#12138, 1) +py_cobject_sources(#11857, 1) +py_cobject_sources(#12139, 1) +py_cobject_sources(#12140, 1) +py_cobject_sources(#11830, 1) +py_cobject_sources(#11831, 1) +py_cobject_sources(#10542, 1) +py_cobject_sources(#11853, 1) +py_cobject_sources(#12141, 1) +py_cobject_sources(#11832, 1) +py_cobject_sources(#12142, 1) +py_cobject_sources(#12143, 1) +py_cobject_sources(#12144, 1) +py_cobject_sources(#11867, 1) +py_cobject_sources(#11870, 1) +py_cobject_sources(#11546, 1) +py_cobject_sources(#11879, 1) +py_cobject_sources(#11880, 1) +py_cobject_sources(#11881, 1) +py_cobject_sources(#11142, 1) +py_cobject_sources(#11882, 1) +py_cobject_sources(#11883, 1) +py_cobject_sources(#11884, 1) +py_cobject_sources(#11885, 1) +py_cobject_sources(#11886, 1) +py_cobject_sources(#11888, 1) +py_cobject_sources(#11889, 1) +py_cobject_sources(#11890, 1) +py_cobject_sources(#11891, 1) +py_cobject_sources(#11892, 1) +py_cobject_sources(#11893, 1) +py_cobject_sources(#11894, 1) +py_cobject_sources(#11895, 1) +py_cobject_sources(#10050, 1) +py_cobject_sources(#11896, 1) +py_cobject_sources(#11897, 1) +py_cobject_sources(#11898, 1) +py_cobject_sources(#10582, 1) +py_cobject_sources(#10584, 1) +py_cobject_sources(#10586, 1) +py_cobject_sources(#10886, 1) +py_cobject_sources(#11903, 1) +py_cobject_sources(#12145, 1) +py_cobject_sources(#11904, 1) +py_cobject_sources(#10626, 1) +py_cobject_sources(#10073, 1) +py_cobject_sources(#10074, 1) +py_cobject_sources(#12146, 1) +py_cobject_sources(#11905, 1) +py_cobject_sources(#11906, 1) +py_cobject_sources(#11907, 1) +py_cobject_sources(#10407, 1) +py_cobject_sources(#12147, 1) +py_cobject_sources(#11984, 1) +py_cobject_sources(#11935, 1) +py_cobject_sources(#11979, 1) +py_cobject_sources(#11985, 1) +py_cobject_sources(#12148, 1) +py_cobject_sources(#12149, 1) +py_cobject_sources(#11955, 1) +py_cobject_sources(#11923, 1) +py_cobject_sources(#11941, 1) +py_cobject_sources(#11910, 1) +py_cobject_sources(#11911, 1) +py_cobject_sources(#11912, 1) +py_cobject_sources(#11922, 1) +py_cobject_sources(#11921, 1) +py_cobject_sources(#12150, 1) +py_cobject_sources(#11956, 1) +py_cobject_sources(#10666, 1) +py_cobject_sources(#10667, 1) +py_cobject_sources(#11950, 1) +py_cobject_sources(#12151, 1) +py_cobject_sources(#12152, 1) +py_cobject_sources(#12153, 1) +py_cobject_sources(#12154, 1) +py_cobject_sources(#12155, 1) +py_cobject_sources(#11929, 1) +py_cobject_sources(#12156, 1) +py_cobject_sources(#12157, 1) +py_cobject_sources(#11925, 1) +py_cobject_sources(#11329, 1) +py_cobject_sources(#11953, 1) +py_cobject_sources(#11491, 1) +py_cobject_sources(#11492, 1) +py_cobject_sources(#12158, 1) +py_cobject_sources(#12159, 1) +py_cobject_sources(#12160, 1) +py_cobject_sources(#12161, 1) +py_cobject_sources(#12162, 1) +py_cobject_sources(#12163, 1) +py_cobject_sources(#11943, 1) +py_cobject_sources(#12164, 1) +py_cobject_sources(#12165, 1) +py_cobject_sources(#12166, 1) +py_cobject_sources(#12167, 1) +py_cobject_sources(#12168, 1) +py_cobject_sources(#12169, 1) +py_cobject_sources(#11945, 1) +py_cobject_sources(#12170, 1) +py_cobject_sources(#12171, 1) +py_cobject_sources(#12172, 1) +py_cobject_sources(#12173, 1) +py_cobject_sources(#12174, 1) +py_cobject_sources(#12175, 1) +py_cobject_sources(#12176, 1) +py_cobject_sources(#12177, 1) +py_cobject_sources(#12178, 1) +py_cobject_sources(#12179, 1) +py_cobject_sources(#12180, 1) +py_cobject_sources(#12181, 1) +py_cobject_sources(#12182, 1) +py_cobject_sources(#12183, 1) +py_cobject_sources(#12184, 1) +py_cobject_sources(#12185, 1) +py_cobject_sources(#12186, 1) +py_cobject_sources(#12187, 1) +py_cobject_sources(#12188, 1) +py_cobject_sources(#12189, 1) +py_cobject_sources(#12190, 1) +py_cobject_sources(#12191, 1) +py_cobject_sources(#12192, 1) +py_cobject_sources(#12193, 1) +py_cobject_sources(#12194, 1) +py_cobject_sources(#12195, 1) +py_cobject_sources(#12196, 1) +py_cobject_sources(#12197, 1) +py_cobject_sources(#12198, 1) +py_cobject_sources(#12199, 1) +py_cobject_sources(#12200, 1) +py_cobject_sources(#12201, 1) +py_cobject_sources(#12202, 1) +py_cobject_sources(#12203, 1) +py_cobject_sources(#12204, 1) +py_cobject_sources(#12205, 1) +py_cobject_sources(#12206, 1) +py_cobject_sources(#12207, 1) +py_cobject_sources(#12208, 1) +py_cobject_sources(#12209, 1) +py_cobject_sources(#12210, 1) +py_cobject_sources(#12211, 1) +py_cobject_sources(#12212, 1) +py_cobject_sources(#12213, 1) +py_cobject_sources(#12214, 1) +py_cobject_sources(#12215, 1) +py_cobject_sources(#12216, 1) +py_cobject_sources(#12217, 1) +py_cobject_sources(#12218, 1) +py_cobject_sources(#12219, 1) +py_cobject_sources(#12220, 1) +py_cobject_sources(#11977, 1) +py_cobject_sources(#12221, 1) +py_cobject_sources(#10678, 1) +py_cobject_sources(#11986, 1) +py_cobject_sources(#11987, 1) +py_cobject_sources(#12222, 1) +py_cobject_sources(#11988, 1) +py_cobject_sources(#11989, 1) +py_cobject_sources(#11990, 1) +py_cobject_sources(#11991, 1) +py_cobject_sources(#11992, 1) +py_cobject_sources(#11993, 1) +py_cobject_sources(#11994, 1) +py_cobject_sources(#12223, 1) +py_cobject_sources(#11995, 1) +py_cobject_sources(#11996, 1) +py_cobject_sources(#12224, 1) +py_cobject_sources(#11997, 1) +py_cobject_sources(#12225, 1) +py_cobject_sources(#11998, 1) +py_cobject_sources(#12226, 1) +py_cobject_sources(#12227, 1) +py_cobject_sources(#12228, 1) +py_cobject_sources(#12229, 1) +py_cobject_sources(#12230, 1) +py_cobject_sources(#11999, 1) +py_cobject_sources(#12000, 1) +py_cobject_sources(#12001, 1) +py_cobject_sources(#12002, 1) +py_cobject_sources(#12003, 1) +py_cobject_sources(#12004, 1) +py_cobject_sources(#12005, 1) +py_cobject_sources(#12006, 1) +py_cobject_sources(#12007, 1) +py_cobject_sources(#12008, 1) +py_cobject_sources(#12009, 1) +py_cobject_sources(#12231, 1) +py_cobject_sources(#12010, 1) +py_cobject_sources(#12232, 1) +py_cobject_sources(#12011, 1) +py_cobject_sources(#12012, 1) +py_cobject_sources(#12013, 1) +py_cobject_sources(#12014, 1) +py_cobject_sources(#12015, 1) +py_cobject_sources(#12016, 1) +py_cobject_sources(#12017, 1) +py_cobject_sources(#12018, 1) +py_cobject_sources(#12019, 1) +py_cobject_sources(#12020, 1) +py_cobject_sources(#12021, 1) +py_cobject_sources(#12022, 1) +py_cobject_sources(#12023, 1) +py_cobject_sources(#12233, 1) +py_cobject_sources(#12024, 1) +py_cobject_sources(#12025, 1) +py_cobject_sources(#12026, 1) +py_cobject_sources(#12027, 1) +py_cobject_sources(#12234, 1) +py_cobject_sources(#12028, 1) +py_cobject_sources(#12029, 1) +py_cobject_sources(#12030, 1) +py_cobject_sources(#12031, 1) +py_cobject_sources(#12032, 1) +py_cobject_sources(#12033, 1) +py_cobject_sources(#12034, 1) +py_cobject_sources(#12035, 1) +py_cobject_sources(#12036, 1) +py_cobject_sources(#12235, 1) +py_cobject_sources(#12037, 1) +py_cobject_sources(#12038, 1) +py_cobject_sources(#12039, 1) +py_cobject_sources(#12040, 1) +py_cobject_sources(#12041, 1) +py_cobject_sources(#12042, 1) +py_cobject_sources(#12043, 1) +py_cobject_sources(#12044, 1) +py_cobject_sources(#12045, 1) +py_cobject_sources(#12046, 1) +py_cobject_sources(#12047, 1) +py_cobject_sources(#12048, 1) +py_cobject_sources(#12049, 1) +py_cobject_sources(#12236, 1) +py_cobject_sources(#12237, 1) +py_cobject_sources(#12050, 1) +py_cobject_sources(#12238, 1) +py_cobject_sources(#12051, 1) +py_cobject_sources(#12052, 1) +py_cobject_sources(#12053, 1) +py_cobject_sources(#12054, 1) +py_cobject_sources(#12239, 1) +py_cobject_sources(#12240, 1) +py_cobject_sources(#12241, 1) +py_cobject_sources(#12242, 1) +py_cobject_sources(#12243, 1) +py_cobject_sources(#12244, 1) +py_cobject_sources(#12245, 1) +py_cobject_sources(#12246, 1) +py_cobject_sources(#12247, 1) +py_cobject_sources(#12248, 1) +py_cobject_sources(#12055, 1) +py_cobject_sources(#12056, 1) +py_cobject_sources(#12057, 1) +py_cobject_sources(#12058, 1) +py_cobject_sources(#12059, 1) +py_cobject_sources(#12249, 1) +py_cobject_sources(#12060, 1) +py_cobject_sources(#12061, 1) +py_cobject_sources(#12062, 1) +py_cobject_sources(#12063, 1) +py_cobject_sources(#12250, 1) +py_cobject_sources(#12064, 1) +py_cobject_sources(#12065, 1) +py_cobject_sources(#12066, 1) +py_cobject_sources(#12251, 1) +py_cobject_sources(#12067, 1) +py_cobject_sources(#12068, 1) +py_cobject_sources(#12069, 1) +py_cobject_sources(#12252, 1) +py_cobject_sources(#12253, 1) +py_cobject_sources(#12254, 1) +py_cobject_sources(#12070, 1) +py_cobject_sources(#12255, 1) +py_cobject_sources(#12071, 1) +py_cobject_sources(#12072, 1) +py_cobject_sources(#12256, 1) +py_cobject_sources(#12257, 1) +py_cobject_sources(#12073, 1) +py_cobject_sources(#12074, 1) +py_cobject_sources(#12075, 1) +py_cobject_sources(#12076, 1) +py_cobject_sources(#12077, 1) +py_cobject_sources(#12078, 1) +py_cobject_sources(#12079, 1) +py_cobject_sources(#12258, 1) +py_cobject_sources(#12259, 1) +py_cobject_sources(#12080, 1) +py_cobject_sources(#12260, 1) +py_cobject_sources(#12261, 1) +py_cobject_sources(#12262, 1) +py_cobject_sources(#12081, 1) +py_cobject_sources(#12082, 1) +py_cobject_sources(#12083, 1) +py_cobject_sources(#12263, 1) +py_cobject_sources(#12264, 1) +py_cobject_sources(#12084, 1) +py_cobject_sources(#12265, 1) +py_cobject_sources(#12085, 1) +py_cobject_sources(#12266, 1) +py_cobject_sources(#12086, 1) +py_cobject_sources(#12267, 1) +py_cobject_sources(#12087, 1) +py_cobject_sources(#12268, 1) +py_cobject_sources(#12088, 1) +py_cobject_sources(#12089, 1) +py_cobject_sources(#12269, 1) +py_cobject_sources(#12090, 1) +py_cobject_sources(#12091, 1) +py_cobject_sources(#12092, 1) +py_cobject_sources(#12093, 1) +py_cobject_sources(#12094, 1) +py_cobject_sources(#12095, 1) +py_cobject_sources(#12096, 1) +py_cobject_sources(#12097, 1) +py_cobject_sources(#12270, 1) +py_cobject_sources(#12271, 1) +py_cobject_sources(#12272, 1) +py_cobject_sources(#12098, 1) +py_cobject_sources(#12099, 1) +py_cobject_sources(#12273, 1) +py_cobject_sources(#12100, 1) +py_cobject_sources(#12274, 1) +py_cobject_sources(#12275, 1) +py_cobject_sources(#12101, 1) +py_cobject_sources(#12102, 1) +py_cobject_sources(#12103, 1) +py_cobject_sources(#12104, 1) +py_cobject_sources(#12276, 1) +py_cobject_sources(#12105, 1) +py_cobject_sources(#12106, 1) +py_cobject_sources(#12107, 1) +py_cobject_sources(#12108, 1) +py_cobject_sources(#12277, 1) +py_cobject_sources(#12109, 1) +py_cobject_sources(#12110, 1) +py_cobject_sources(#12111, 1) +py_cobject_sources(#12112, 1) +py_cobject_sources(#12113, 1) +py_cobject_sources(#12114, 1) +py_cobject_sources(#12115, 1) +py_cobject_sources(#10000, 1) +py_cobject_sources(#10002, 1) +py_cobject_sources(#10003, 1) +py_cobject_sources(#10004, 1) +py_cobject_sources(#10006, 1) +py_cobject_sources(#10007, 1) +py_cobject_sources(#12278, 1) +py_cobject_sources(#12279, 1) +py_cobject_sources(#12280, 1) +py_cobject_sources(#12281, 1) +py_cobject_sources(#10008, 1) +py_cobject_sources(#10009, 1) +py_cobject_sources(#12282, 1) +py_cobject_sources(#10011, 1) +py_cobject_sources(#10012, 1) +py_cobject_sources(#10013, 1) +py_cobject_sources(#10014, 1) +py_cobject_sources(#11508, 1) +py_cobject_sources(#10015, 1) +py_cobject_sources(#10017, 1) +py_cobject_sources(#10019, 1) +py_cobject_sources(#10021, 1) +py_cobject_sources(#10022, 1) +py_cobject_sources(#11509, 1) +py_cobject_sources(#10023, 1) +py_cobject_sources(#10025, 1) +py_cobject_sources(#10026, 1) +py_cobject_sources(#10027, 1) +py_cobject_sources(#10029, 1) +py_cobject_sources(#12283, 1) +py_cobject_sources(#12284, 1) +py_cobject_sources(#10031, 1) +py_cobject_sources(#10032, 1) +py_cobject_sources(#10033, 1) +py_cobject_sources(#10034, 1) +py_cobject_sources(#10035, 1) +py_cobject_sources(#10036, 1) +py_cobject_sources(#10038, 1) +py_cobject_sources(#10040, 1) +py_cobject_sources(#10041, 1) +py_cobject_sources(#10043, 1) +py_cobject_sources(#10044, 1) +py_cobject_sources(#10045, 1) +py_cobject_sources(#12285, 1) +py_cobject_sources(#10047, 1) +py_cobject_sources(#10048, 1) +py_cobject_sources(#10049, 1) +py_cobject_sources(#10051, 1) +py_cobject_sources(#10052, 1) +py_cobject_sources(#10053, 1) +py_cobject_sources(#10054, 1) +py_cobject_sources(#10055, 1) +py_cobject_sources(#10056, 1) +py_cobject_sources(#10057, 1) +py_cobject_sources(#10058, 1) +py_cobject_sources(#10059, 1) +py_cobject_sources(#10060, 1) +py_cobject_sources(#11510, 1) +py_cobject_sources(#11511, 1) +py_cobject_sources(#11512, 1) +py_cobject_sources(#11513, 1) +py_cobject_sources(#11514, 1) +py_cobject_sources(#11515, 1) +py_cobject_sources(#10061, 1) +py_cobject_sources(#10063, 1) +py_cobject_sources(#10064, 1) +py_cobject_sources(#10065, 1) +py_cobject_sources(#10066, 1) +py_cobject_sources(#10067, 1) +py_cobject_sources(#10068, 1) +py_cobject_sources(#10069, 1) +py_cobject_sources(#10070, 1) +py_cobject_sources(#12286, 1) +py_cobject_sources(#10071, 1) +py_cobject_sources(#10072, 1) +py_cobject_sources(#10075, 1) +py_cobject_sources(#10076, 1) +py_cobject_sources(#11516, 1) +py_cobject_sources(#10077, 1) +py_cobject_sources(#10078, 1) +py_cobject_sources(#10079, 1) +py_cobject_sources(#10080, 1) +py_cobject_sources(#10082, 1) +py_cobject_sources(#10083, 1) +py_cobject_sources(#10084, 1) +py_cobject_sources(#10085, 1) +py_cobject_sources(#10086, 1) +py_cobject_sources(#10087, 1) +py_cobject_sources(#10088, 1) +py_cobject_sources(#10089, 1) +py_cobject_sources(#10090, 1) +py_cobject_sources(#10091, 1) +py_cobject_sources(#10092, 1) +py_cobject_sources(#10093, 1) +py_cobject_sources(#10094, 1) +py_cobject_sources(#10095, 1) +py_cobject_sources(#10096, 1) +py_cobject_sources(#10097, 1) +py_cobject_sources(#10098, 1) +py_cobject_sources(#10099, 1) +py_cobject_sources(#10100, 1) +py_cobject_sources(#10101, 1) +py_cobject_sources(#10102, 1) +py_cobject_sources(#10103, 1) +py_cobject_sources(#10104, 1) +py_cobject_sources(#10105, 1) +py_cobject_sources(#10106, 1) +py_cobject_sources(#10107, 1) +py_cobject_sources(#10108, 1) +py_cobject_sources(#10109, 1) +py_cobject_sources(#10110, 1) +py_cobject_sources(#10112, 1) +py_cobject_sources(#10113, 1) +py_cobject_sources(#10114, 1) +py_cobject_sources(#10115, 1) +py_cobject_sources(#10116, 1) +py_cobject_sources(#10117, 1) +py_cobject_sources(#10118, 1) +py_cobject_sources(#10119, 1) +py_cobject_sources(#10120, 1) +py_cobject_sources(#10121, 1) +py_cobject_sources(#10122, 1) +py_cobject_sources(#10123, 1) +py_cobject_sources(#10125, 1) +py_cobject_sources(#12287, 1) +py_cobject_sources(#12288, 1) +py_cobject_sources(#10126, 1) +py_cobject_sources(#10127, 1) +py_cobject_sources(#10128, 1) +py_cobject_sources(#10129, 1) +py_cobject_sources(#10130, 1) +py_cobject_sources(#12289, 1) +py_cobject_sources(#12290, 1) +py_cobject_sources(#12291, 1) +py_cobject_sources(#10131, 1) +py_cobject_sources(#10132, 1) +py_cobject_sources(#10133, 1) +py_cobject_sources(#10134, 1) +py_cobject_sources(#10135, 1) +py_cobject_sources(#10136, 1) +py_cobject_sources(#10137, 1) +py_cobject_sources(#10138, 1) +py_cobject_sources(#10139, 1) +py_cobject_sources(#10140, 1) +py_cobject_sources(#10141, 1) +py_cobject_sources(#10142, 1) +py_cobject_sources(#10143, 1) +py_cobject_sources(#10144, 1) +py_cobject_sources(#10145, 1) +py_cobject_sources(#10146, 1) +py_cobject_sources(#10147, 1) +py_cobject_sources(#10148, 1) +py_cobject_sources(#10149, 1) +py_cobject_sources(#10150, 1) +py_cobject_sources(#10151, 1) +py_cobject_sources(#10152, 1) +py_cobject_sources(#10153, 1) +py_cobject_sources(#10154, 1) +py_cobject_sources(#10155, 1) +py_cobject_sources(#10156, 1) +py_cobject_sources(#10157, 1) +py_cobject_sources(#10158, 1) +py_cobject_sources(#10159, 1) +py_cobject_sources(#10160, 1) +py_cobject_sources(#10161, 1) +py_cobject_sources(#10162, 1) +py_cobject_sources(#10163, 1) +py_cobject_sources(#10164, 1) +py_cobject_sources(#10165, 1) +py_cobject_sources(#12292, 1) +py_cobject_sources(#10166, 1) +py_cobject_sources(#10167, 1) +py_cobject_sources(#12293, 1) +py_cobject_sources(#10168, 1) +py_cobject_sources(#10170, 1) +py_cobject_sources(#10171, 1) +py_cobject_sources(#10172, 1) +py_cobject_sources(#10173, 1) +py_cobject_sources(#10174, 1) +py_cobject_sources(#10175, 1) +py_cobject_sources(#10176, 1) +py_cobject_sources(#10177, 1) +py_cobject_sources(#10178, 1) +py_cobject_sources(#10179, 1) +py_cobject_sources(#10180, 1) +py_cobject_sources(#10181, 1) +py_cobject_sources(#10182, 1) +py_cobject_sources(#10183, 1) +py_cobject_sources(#10184, 1) +py_cobject_sources(#10185, 1) +py_cobject_sources(#10186, 1) +py_cobject_sources(#10187, 1) +py_cobject_sources(#10188, 1) +py_cobject_sources(#10190, 1) +py_cobject_sources(#10192, 1) +py_cobject_sources(#10193, 1) +py_cobject_sources(#10194, 1) +py_cobject_sources(#10195, 1) +py_cobject_sources(#10196, 1) +py_cobject_sources(#10197, 1) +py_cobject_sources(#10198, 1) +py_cobject_sources(#10199, 1) +py_cobject_sources(#10200, 1) +py_cobject_sources(#10201, 1) +py_cobject_sources(#10202, 1) +py_cobject_sources(#10203, 1) +py_cobject_sources(#10204, 1) +py_cobject_sources(#10205, 1) +py_cobject_sources(#10206, 1) +py_cobject_sources(#12294, 1) +py_cobject_sources(#12295, 1) +py_cobject_sources(#10207, 1) +py_cobject_sources(#10209, 1) +py_cobject_sources(#10210, 1) +py_cobject_sources(#10211, 1) +py_cobject_sources(#10212, 1) +py_cobject_sources(#10213, 1) +py_cobject_sources(#10214, 1) +py_cobject_sources(#10215, 1) +py_cobject_sources(#10216, 1) +py_cobject_sources(#10217, 1) +py_cobject_sources(#10218, 1) +py_cobject_sources(#10219, 1) +py_cobject_sources(#11517, 1) +py_cobject_sources(#12296, 1) +py_cobject_sources(#10220, 1) +py_cobject_sources(#10221, 1) +py_cobject_sources(#11518, 1) +py_cobject_sources(#11519, 1) +py_cobject_sources(#11520, 1) +py_cobject_sources(#10222, 1) +py_cobject_sources(#10224, 1) +py_cobject_sources(#10225, 1) +py_cobject_sources(#10227, 1) +py_cobject_sources(#10228, 1) +py_cobject_sources(#10229, 1) +py_cobject_sources(#10230, 1) +py_cobject_sources(#10231, 1) +py_cobject_sources(#10232, 1) +py_cobject_sources(#10233, 1) +py_cobject_sources(#10234, 1) +py_cobject_sources(#10235, 1) +py_cobject_sources(#10236, 1) +py_cobject_sources(#10237, 1) +py_cobject_sources(#10238, 1) +py_cobject_sources(#10239, 1) +py_cobject_sources(#10240, 1) +py_cobject_sources(#10241, 1) +py_cobject_sources(#10242, 1) +py_cobject_sources(#10243, 1) +py_cobject_sources(#10244, 1) +py_cobject_sources(#10245, 1) +py_cobject_sources(#10246, 1) +py_cobject_sources(#10247, 1) +py_cobject_sources(#10248, 1) +py_cobject_sources(#12297, 1) +py_cobject_sources(#10250, 1) +py_cobject_sources(#10251, 1) +py_cobject_sources(#10252, 1) +py_cobject_sources(#10253, 1) +py_cobject_sources(#10254, 1) +py_cobject_sources(#10255, 1) +py_cobject_sources(#10256, 1) +py_cobject_sources(#10257, 1) +py_cobject_sources(#10258, 1) +py_cobject_sources(#12298, 1) +py_cobject_sources(#12299, 1) +py_cobject_sources(#12300, 1) +py_cobject_sources(#10259, 1) +py_cobject_sources(#12301, 1) +py_cobject_sources(#10260, 1) +py_cobject_sources(#10261, 1) +py_cobject_sources(#10262, 1) +py_cobject_sources(#10263, 1) +py_cobject_sources(#12302, 1) +py_cobject_sources(#10264, 1) +py_cobject_sources(#10265, 1) +py_cobject_sources(#10266, 1) +py_cobject_sources(#10267, 1) +py_cobject_sources(#10268, 1) +py_cobject_sources(#10269, 1) +py_cobject_sources(#10270, 1) +py_cobject_sources(#10271, 1) +py_cobject_sources(#10272, 1) +py_cobject_sources(#10273, 1) +py_cobject_sources(#10274, 1) +py_cobject_sources(#10275, 1) +py_cobject_sources(#10276, 1) +py_cobject_sources(#10277, 1) +py_cobject_sources(#10278, 1) +py_cobject_sources(#10279, 1) +py_cobject_sources(#10280, 1) +py_cobject_sources(#10281, 1) +py_cobject_sources(#10282, 1) +py_cobject_sources(#12303, 1) +py_cobject_sources(#10283, 1) +py_cobject_sources(#10284, 1) +py_cobject_sources(#10285, 1) +py_cobject_sources(#10286, 1) +py_cobject_sources(#10287, 1) +py_cobject_sources(#10288, 1) +py_cobject_sources(#10289, 1) +py_cobject_sources(#10290, 1) +py_cobject_sources(#12304, 1) +py_cobject_sources(#10291, 1) +py_cobject_sources(#10292, 1) +py_cobject_sources(#10293, 1) +py_cobject_sources(#10294, 1) +py_cobject_sources(#12305, 1) +py_cobject_sources(#10295, 1) +py_cobject_sources(#10296, 1) +py_cobject_sources(#10297, 1) +py_cobject_sources(#12306, 1) +py_cobject_sources(#12307, 1) +py_cobject_sources(#12308, 1) +py_cobject_sources(#12309, 1) +py_cobject_sources(#10298, 1) +py_cobject_sources(#10299, 1) +py_cobject_sources(#10300, 1) +py_cobject_sources(#12310, 1) +py_cobject_sources(#10301, 1) +py_cobject_sources(#10302, 1) +py_cobject_sources(#10303, 1) +py_cobject_sources(#10304, 1) +py_cobject_sources(#10305, 1) +py_cobject_sources(#10306, 1) +py_cobject_sources(#10307, 1) +py_cobject_sources(#10308, 1) +py_cobject_sources(#10309, 1) +py_cobject_sources(#10310, 1) +py_cobject_sources(#10311, 1) +py_cobject_sources(#10312, 1) +py_cobject_sources(#10313, 1) +py_cobject_sources(#10314, 1) +py_cobject_sources(#10315, 1) +py_cobject_sources(#10316, 1) +py_cobject_sources(#10317, 1) +py_cobject_sources(#10318, 1) +py_cobject_sources(#10319, 1) +py_cobject_sources(#10320, 1) +py_cobject_sources(#10321, 1) +py_cobject_sources(#10322, 1) +py_cobject_sources(#10323, 1) +py_cobject_sources(#10324, 1) +py_cobject_sources(#10325, 1) +py_cobject_sources(#10326, 1) +py_cobject_sources(#10327, 1) +py_cobject_sources(#10328, 1) +py_cobject_sources(#10329, 1) +py_cobject_sources(#10330, 1) +py_cobject_sources(#10331, 1) +py_cobject_sources(#10332, 1) +py_cobject_sources(#10333, 1) +py_cobject_sources(#10334, 1) +py_cobject_sources(#10335, 1) +py_cobject_sources(#10336, 1) +py_cobject_sources(#10337, 1) +py_cobject_sources(#10338, 1) +py_cobject_sources(#10339, 1) +py_cobject_sources(#10340, 1) +py_cobject_sources(#10341, 1) +py_cobject_sources(#10342, 1) +py_cobject_sources(#10343, 1) +py_cobject_sources(#10344, 1) +py_cobject_sources(#10345, 1) +py_cobject_sources(#10346, 1) +py_cobject_sources(#10347, 1) +py_cobject_sources(#10348, 1) +py_cobject_sources(#10349, 1) +py_cobject_sources(#12311, 1) +py_cobject_sources(#10350, 1) +py_cobject_sources(#12312, 1) +py_cobject_sources(#10351, 1) +py_cobject_sources(#10352, 1) +py_cobject_sources(#10353, 1) +py_cobject_sources(#10354, 1) +py_cobject_sources(#12313, 1) +py_cobject_sources(#10355, 1) +py_cobject_sources(#10356, 1) +py_cobject_sources(#10357, 1) +py_cobject_sources(#10358, 1) +py_cobject_sources(#10359, 1) +py_cobject_sources(#10360, 1) +py_cobject_sources(#10361, 1) +py_cobject_sources(#10362, 1) +py_cobject_sources(#10363, 1) +py_cobject_sources(#10364, 1) +py_cobject_sources(#10365, 1) +py_cobject_sources(#10366, 1) +py_cobject_sources(#10367, 1) +py_cobject_sources(#10368, 1) +py_cobject_sources(#10369, 1) +py_cobject_sources(#10370, 1) +py_cobject_sources(#10371, 1) +py_cobject_sources(#10372, 1) +py_cobject_sources(#10373, 1) +py_cobject_sources(#10374, 1) +py_cobject_sources(#10375, 1) +py_cobject_sources(#10376, 1) +py_cobject_sources(#10377, 1) +py_cobject_sources(#10378, 1) +py_cobject_sources(#10379, 1) +py_cobject_sources(#10380, 1) +py_cobject_sources(#10381, 1) +py_cobject_sources(#12314, 1) +py_cobject_sources(#12315, 1) +py_cobject_sources(#10382, 1) +py_cobject_sources(#10383, 1) +py_cobject_sources(#10384, 1) +py_cobject_sources(#10385, 1) +py_cobject_sources(#12316, 1) +py_cobject_sources(#10386, 1) +py_cobject_sources(#10387, 1) +py_cobject_sources(#10388, 1) +py_cobject_sources(#10389, 1) +py_cobject_sources(#10390, 1) +py_cobject_sources(#10391, 1) +py_cobject_sources(#10392, 1) +py_cobject_sources(#12317, 1) +py_cobject_sources(#10393, 1) +py_cobject_sources(#10394, 1) +py_cobject_sources(#12318, 1) +py_cobject_sources(#12319, 1) +py_cobject_sources(#10395, 1) +py_cobject_sources(#10396, 1) +py_cobject_sources(#10397, 1) +py_cobject_sources(#10398, 1) +py_cobject_sources(#10399, 1) +py_cobject_sources(#10400, 1) +py_cobject_sources(#12320, 1) +py_cobject_sources(#11521, 1) +py_cobject_sources(#12321, 1) +py_cobject_sources(#10401, 1) +py_cobject_sources(#10402, 1) +py_cobject_sources(#10403, 1) +py_cobject_sources(#10404, 1) +py_cobject_sources(#12322, 1) +py_cobject_sources(#10405, 1) +py_cobject_sources(#10406, 1) +py_cobject_sources(#10408, 1) +py_cobject_sources(#12323, 1) +py_cobject_sources(#12324, 1) +py_cobject_sources(#10409, 1) +py_cobject_sources(#10410, 1) +py_cobject_sources(#12325, 1) +py_cobject_sources(#10412, 1) +py_cobject_sources(#10413, 1) +py_cobject_sources(#10414, 1) +py_cobject_sources(#10415, 1) +py_cobject_sources(#10416, 1) +py_cobject_sources(#12326, 1) +py_cobject_sources(#12327, 1) +py_cobject_sources(#11522, 1) +py_cobject_sources(#11523, 1) +py_cobject_sources(#12328, 1) +py_cobject_sources(#12329, 1) +py_cobject_sources(#12330, 1) +py_cobject_sources(#12331, 1) +py_cobject_sources(#12332, 1) +py_cobject_sources(#12333, 1) +py_cobject_sources(#12334, 1) +py_cobject_sources(#12335, 1) +py_cobject_sources(#12336, 1) +py_cobject_sources(#12337, 1) +py_cobject_sources(#12338, 1) +py_cobject_sources(#12339, 1) +py_cobject_sources(#11524, 1) +py_cobject_sources(#11525, 1) +py_cobject_sources(#11526, 1) +py_cobject_sources(#11527, 1) +py_cobject_sources(#11528, 1) +py_cobject_sources(#11529, 1) +py_cobject_sources(#11530, 1) +py_cobject_sources(#11531, 1) +py_cobject_sources(#11532, 1) +py_cobject_sources(#11533, 1) +py_cobject_sources(#12340, 1) +py_cobject_sources(#12341, 1) +py_cobject_sources(#12342, 1) +py_cobject_sources(#12343, 1) +py_cobject_sources(#10417, 1) +py_cobject_sources(#10418, 1) +py_cobject_sources(#12344, 1) +py_cobject_sources(#12345, 1) +py_cobject_sources(#12346, 1) +py_cobject_sources(#12347, 1) +py_cobject_sources(#12348, 1) +py_cobject_sources(#12349, 1) +py_cobject_sources(#12350, 1) +py_cobject_sources(#12351, 1) +py_cobject_sources(#12352, 1) +py_cobject_sources(#12353, 1) +py_cobject_sources(#12354, 1) +py_cobject_sources(#12355, 1) +py_cobject_sources(#12356, 1) +py_cobject_sources(#12357, 1) +py_cobject_sources(#12358, 1) +py_cobject_sources(#12359, 1) +py_cobject_sources(#12360, 1) +py_cobject_sources(#12361, 1) +py_cobject_sources(#12362, 1) +py_cobject_sources(#12363, 1) +py_cobject_sources(#12364, 1) +py_cobject_sources(#12365, 1) +py_cobject_sources(#12366, 1) +py_cobject_sources(#12367, 1) +py_cobject_sources(#12368, 1) +py_cobject_sources(#12369, 1) +py_cobject_sources(#12370, 1) +py_cobject_sources(#12371, 1) +py_cobject_sources(#12372, 1) +py_cobject_sources(#12373, 1) +py_cobject_sources(#12374, 1) +py_cobject_sources(#12375, 1) +py_cobject_sources(#12376, 1) +py_cobject_sources(#12377, 1) +py_cobject_sources(#10419, 1) +py_cobject_sources(#10420, 1) +py_cobject_sources(#10421, 1) +py_cobject_sources(#10422, 1) +py_cobject_sources(#12378, 1) +py_cobject_sources(#12379, 1) +py_cobject_sources(#12380, 1) +py_cobject_sources(#12381, 1) +py_cobject_sources(#12382, 1) +py_cobject_sources(#12383, 1) +py_cobject_sources(#12384, 1) +py_cobject_sources(#12385, 1) +py_cobject_sources(#12386, 1) +py_cobject_sources(#12387, 1) +py_cobject_sources(#12388, 1) +py_cobject_sources(#12389, 1) +py_cobject_sources(#12390, 1) +py_cobject_sources(#12391, 1) +py_cobject_sources(#12392, 1) +py_cobject_sources(#12393, 1) +py_cobject_sources(#10423, 1) +py_cobject_sources(#10424, 1) +py_cobject_sources(#10425, 1) +py_cobject_sources(#10426, 1) +py_cobject_sources(#10427, 1) +py_cobject_sources(#10428, 1) +py_cobject_sources(#12394, 1) +py_cobject_sources(#10429, 1) +py_cobject_sources(#10430, 1) +py_cobject_sources(#10431, 1) +py_cobject_sources(#10432, 1) +py_cobject_sources(#10433, 1) +py_cobject_sources(#10434, 1) +py_cobject_sources(#10435, 1) +py_cobject_sources(#10436, 1) +py_cobject_sources(#10437, 1) +py_cobject_sources(#10438, 1) +py_cobject_sources(#10439, 1) +py_cobject_sources(#10440, 1) +py_cobject_sources(#12395, 1) +py_cobject_sources(#12396, 1) +py_cobject_sources(#10441, 1) +py_cobject_sources(#10442, 1) +py_cobject_sources(#10443, 1) +py_cobject_sources(#10444, 1) +py_cobject_sources(#12397, 1) +py_cobject_sources(#10445, 1) +py_cobject_sources(#10446, 1) +py_cobject_sources(#10447, 1) +py_cobject_sources(#10448, 1) +py_cobject_sources(#12398, 1) +py_cobject_sources(#12399, 1) +py_cobject_sources(#10449, 1) +py_cobject_sources(#10450, 1) +py_cobject_sources(#10451, 1) +py_cobject_sources(#10452, 1) +py_cobject_sources(#10453, 1) +py_cobject_sources(#10454, 1) +py_cobject_sources(#10455, 1) +py_cobject_sources(#10456, 1) +py_cobject_sources(#10457, 1) +py_cobject_sources(#10458, 1) +py_cobject_sources(#10459, 1) +py_cobject_sources(#10460, 1) +py_cobject_sources(#10461, 1) +py_cobject_sources(#10462, 1) +py_cobject_sources(#10463, 1) +py_cobject_sources(#10464, 1) +py_cobject_sources(#10465, 1) +py_cobject_sources(#10466, 1) +py_cobject_sources(#10467, 1) +py_cobject_sources(#10468, 1) +py_cobject_sources(#10469, 1) +py_cobject_sources(#10470, 1) +py_cobject_sources(#10471, 1) +py_cobject_sources(#10472, 1) +py_cobject_sources(#10473, 1) +py_cobject_sources(#10474, 1) +py_cobject_sources(#10475, 1) +py_cobject_sources(#10476, 1) +py_cobject_sources(#10477, 1) +py_cobject_sources(#10478, 1) +py_cobject_sources(#10479, 1) +py_cobject_sources(#10480, 1) +py_cobject_sources(#10481, 1) +py_cobject_sources(#10482, 1) +py_cobject_sources(#10483, 1) +py_cobject_sources(#10484, 1) +py_cobject_sources(#10485, 1) +py_cobject_sources(#10486, 1) +py_cobject_sources(#10487, 1) +py_cobject_sources(#10488, 1) +py_cobject_sources(#10489, 1) +py_cobject_sources(#10490, 1) +py_cobject_sources(#10491, 1) +py_cobject_sources(#10492, 1) +py_cobject_sources(#10493, 1) +py_cobject_sources(#10494, 1) +py_cobject_sources(#10495, 1) +py_cobject_sources(#10496, 1) +py_cobject_sources(#10497, 1) +py_cobject_sources(#10498, 1) +py_cobject_sources(#10499, 1) +py_cobject_sources(#10500, 1) +py_cobject_sources(#12400, 1) +py_cobject_sources(#12401, 1) +py_cobject_sources(#10501, 1) +py_cobject_sources(#10502, 1) +py_cobject_sources(#10503, 1) +py_cobject_sources(#10504, 1) +py_cobject_sources(#10505, 1) +py_cobject_sources(#10506, 1) +py_cobject_sources(#12402, 1) +py_cobject_sources(#12403, 1) +py_cobject_sources(#10507, 1) +py_cobject_sources(#10508, 1) +py_cobject_sources(#10509, 1) +py_cobject_sources(#10510, 1) +py_cobject_sources(#10511, 1) +py_cobject_sources(#10512, 1) +py_cobject_sources(#10513, 1) +py_cobject_sources(#10514, 1) +py_cobject_sources(#10515, 1) +py_cobject_sources(#10516, 1) +py_cobject_sources(#10518, 1) +py_cobject_sources(#12404, 1) +py_cobject_sources(#10519, 1) +py_cobject_sources(#10520, 1) +py_cobject_sources(#10521, 1) +py_cobject_sources(#10522, 1) +py_cobject_sources(#10523, 1) +py_cobject_sources(#11534, 1) +py_cobject_sources(#10524, 1) +py_cobject_sources(#10525, 1) +py_cobject_sources(#10527, 1) +py_cobject_sources(#12405, 1) +py_cobject_sources(#10529, 1) +py_cobject_sources(#10530, 1) +py_cobject_sources(#10532, 1) +py_cobject_sources(#10533, 1) +py_cobject_sources(#11535, 1) +py_cobject_sources(#11536, 1) +py_cobject_sources(#11537, 1) +py_cobject_sources(#10534, 1) +py_cobject_sources(#10535, 1) +py_cobject_sources(#10536, 1) +py_cobject_sources(#10537, 1) +py_cobject_sources(#10538, 1) +py_cobject_sources(#10539, 1) +py_cobject_sources(#10540, 1) +py_cobject_sources(#10541, 1) +py_cobject_sources(#10543, 1) +py_cobject_sources(#10544, 1) +py_cobject_sources(#10545, 1) +py_cobject_sources(#11538, 1) +py_cobject_sources(#11539, 1) +py_cobject_sources(#11540, 1) +py_cobject_sources(#10546, 1) +py_cobject_sources(#10547, 1) +py_cobject_sources(#11541, 1) +py_cobject_sources(#12406, 1) +py_cobject_sources(#10548, 1) +py_cobject_sources(#11542, 1) +py_cobject_sources(#10549, 1) +py_cobject_sources(#10550, 1) +py_cobject_sources(#11543, 1) +py_cobject_sources(#10551, 1) +py_cobject_sources(#11544, 1) +py_cobject_sources(#11545, 1) +py_cobject_sources(#10552, 1) +py_cobject_sources(#10553, 1) +py_cobject_sources(#10554, 1) +py_cobject_sources(#11547, 1) +py_cobject_sources(#11548, 1) +py_cobject_sources(#10555, 1) +py_cobject_sources(#10556, 1) +py_cobject_sources(#11549, 1) +py_cobject_sources(#10557, 1) +py_cobject_sources(#11550, 1) +py_cobject_sources(#11551, 1) +py_cobject_sources(#11552, 1) +py_cobject_sources(#10558, 1) +py_cobject_sources(#11553, 1) +py_cobject_sources(#11554, 1) +py_cobject_sources(#11555, 1) +py_cobject_sources(#11556, 1) +py_cobject_sources(#11557, 1) +py_cobject_sources(#10559, 1) +py_cobject_sources(#11558, 1) +py_cobject_sources(#11559, 1) +py_cobject_sources(#10560, 1) +py_cobject_sources(#11560, 1) +py_cobject_sources(#11561, 1) +py_cobject_sources(#10561, 1) +py_cobject_sources(#10562, 1) +py_cobject_sources(#10563, 1) +py_cobject_sources(#11562, 1) +py_cobject_sources(#11563, 1) +py_cobject_sources(#11564, 1) +py_cobject_sources(#10564, 1) +py_cobject_sources(#11565, 1) +py_cobject_sources(#10565, 1) +py_cobject_sources(#10566, 1) +py_cobject_sources(#10567, 1) +py_cobject_sources(#10568, 1) +py_cobject_sources(#10569, 1) +py_cobject_sources(#10570, 1) +py_cobject_sources(#10571, 1) +py_cobject_sources(#10572, 1) +py_cobject_sources(#10573, 1) +py_cobject_sources(#10574, 1) +py_cobject_sources(#10575, 1) +py_cobject_sources(#11566, 1) +py_cobject_sources(#10576, 1) +py_cobject_sources(#10577, 1) +py_cobject_sources(#10578, 1) +py_cobject_sources(#10579, 1) +py_cobject_sources(#10580, 1) +py_cobject_sources(#11567, 1) +py_cobject_sources(#11568, 1) +py_cobject_sources(#11569, 1) +py_cobject_sources(#11570, 1) +py_cobject_sources(#11571, 1) +py_cobject_sources(#11572, 1) +py_cobject_sources(#10581, 1) +py_cobject_sources(#10583, 1) +py_cobject_sources(#10585, 1) +py_cobject_sources(#10587, 1) +py_cobject_sources(#11573, 1) +py_cobject_sources(#10588, 1) +py_cobject_sources(#10589, 1) +py_cobject_sources(#10590, 1) +py_cobject_sources(#10591, 1) +py_cobject_sources(#10592, 1) +py_cobject_sources(#11574, 1) +py_cobject_sources(#10593, 1) +py_cobject_sources(#10594, 1) +py_cobject_sources(#10595, 1) +py_cobject_sources(#10596, 1) +py_cobject_sources(#10597, 1) +py_cobject_sources(#10598, 1) +py_cobject_sources(#10599, 1) +py_cobject_sources(#10600, 1) +py_cobject_sources(#11575, 1) +py_cobject_sources(#10601, 1) +py_cobject_sources(#11576, 1) +py_cobject_sources(#10602, 1) +py_cobject_sources(#10603, 1) +py_cobject_sources(#10604, 1) +py_cobject_sources(#10605, 1) +py_cobject_sources(#10606, 1) +py_cobject_sources(#10607, 1) +py_cobject_sources(#10608, 1) +py_cobject_sources(#10609, 1) +py_cobject_sources(#10610, 1) +py_cobject_sources(#11577, 1) +py_cobject_sources(#10611, 1) +py_cobject_sources(#10612, 1) +py_cobject_sources(#10613, 1) +py_cobject_sources(#10614, 1) +py_cobject_sources(#10615, 1) +py_cobject_sources(#10616, 1) +py_cobject_sources(#10617, 1) +py_cobject_sources(#10618, 1) +py_cobject_sources(#10619, 1) +py_cobject_sources(#10620, 1) +py_cobject_sources(#10621, 1) +py_cobject_sources(#12407, 1) +py_cobject_sources(#12408, 1) +py_cobject_sources(#10622, 1) +py_cobject_sources(#12409, 1) +py_cobject_sources(#10623, 1) +py_cobject_sources(#10624, 1) +py_cobject_sources(#11578, 1) +py_cobject_sources(#10625, 1) +py_cobject_sources(#12410, 1) +py_cobject_sources(#10627, 1) +py_cobject_sources(#10628, 1) +py_cobject_sources(#10629, 1) +py_cobject_sources(#10630, 1) +py_cobject_sources(#10631, 1) +py_cobject_sources(#10632, 1) +py_cobject_sources(#10633, 1) +py_cobject_sources(#10634, 1) +py_cobject_sources(#10635, 1) +py_cobject_sources(#10636, 1) +py_cobject_sources(#11579, 1) +py_cobject_sources(#10637, 1) +py_cobject_sources(#12411, 1) +py_cobject_sources(#10638, 1) +py_cobject_sources(#12412, 1) +py_cobject_sources(#10639, 1) +py_cobject_sources(#10640, 1) +py_cobject_sources(#10641, 1) +py_cobject_sources(#10642, 1) +py_cobject_sources(#10643, 1) +py_cobject_sources(#10644, 1) +py_cobject_sources(#10645, 1) +py_cobject_sources(#10646, 1) +py_cobject_sources(#10648, 1) +py_cobject_sources(#10649, 1) +py_cobject_sources(#10650, 1) +py_cobject_sources(#10651, 1) +py_cobject_sources(#10652, 1) +py_cobject_sources(#12413, 1) +py_cobject_sources(#11580, 1) +py_cobject_sources(#11581, 1) +py_cobject_sources(#10653, 1) +py_cobject_sources(#10654, 1) +py_cobject_sources(#11582, 1) +py_cobject_sources(#11583, 1) +py_cobject_sources(#10655, 1) +py_cobject_sources(#11584, 1) +py_cobject_sources(#10656, 1) +py_cobject_sources(#10657, 1) +py_cobject_sources(#12414, 1) +py_cobject_sources(#12415, 1) +py_cobject_sources(#12416, 1) +py_cobject_sources(#10658, 1) +py_cobject_sources(#11585, 1) +py_cobject_sources(#12417, 1) +py_cobject_sources(#10659, 1) +py_cobject_sources(#10660, 1) +py_cobject_sources(#10661, 1) +py_cobject_sources(#11586, 1) +py_cobject_sources(#10662, 1) +py_cobject_sources(#12418, 1) +py_cobject_sources(#10663, 1) +py_cobject_sources(#10664, 1) +py_cobject_sources(#10665, 1) +py_cobject_sources(#10668, 1) +py_cobject_sources(#10669, 1) +py_cobject_sources(#12419, 1) +py_cobject_sources(#12420, 1) +py_cobject_sources(#12421, 1) +py_cobject_sources(#11587, 1) +py_cobject_sources(#10670, 1) +py_cobject_sources(#12422, 1) +py_cobject_sources(#10671, 1) +py_cobject_sources(#11588, 1) +py_cobject_sources(#11589, 1) +py_cobject_sources(#10672, 1) +py_cobject_sources(#10673, 1) +py_cobject_sources(#10674, 1) +py_cobject_sources(#10675, 1) +py_cobject_sources(#10676, 1) +py_cobject_sources(#10677, 1) +py_cobject_sources(#10679, 1) +py_cobject_sources(#10680, 1) +py_cobject_sources(#10681, 1) +py_cobject_sources(#10682, 1) +py_cobject_sources(#10683, 1) +py_cobject_sources(#10684, 1) +py_cobject_sources(#10685, 1) +py_cobject_sources(#10686, 1) +py_cobject_sources(#11591, 1) +py_cobject_sources(#10687, 1) +py_cobject_sources(#11592, 1) +py_cobject_sources(#11594, 1) +py_cobject_sources(#11595, 1) +py_cobject_sources(#11596, 1) +py_cobject_sources(#11598, 1) +py_cobject_sources(#10688, 1) +py_cobject_sources(#10689, 1) +py_cobject_sources(#10690, 1) +py_cobject_sources(#10691, 1) +py_cobject_sources(#10692, 1) +py_cobject_sources(#11600, 1) +py_cobject_sources(#10693, 1) +py_cobject_sources(#10694, 1) +py_cobject_sources(#10695, 1) +py_cobject_sources(#10696, 1) +py_cobject_sources(#10697, 1) +py_cobject_sources(#10698, 1) +py_cobject_sources(#10699, 1) +py_cobject_sources(#10700, 1) +py_cobject_sources(#10701, 1) +py_cobject_sources(#10702, 1) +py_cobject_sources(#10703, 1) +py_cobject_sources(#10704, 1) +py_cobject_sources(#10705, 1) +py_cobject_sources(#10706, 1) +py_cobject_sources(#11605, 1) +py_cobject_sources(#10707, 1) +py_cobject_sources(#10708, 1) +py_cobject_sources(#10709, 1) +py_cobject_sources(#11606, 1) +py_cobject_sources(#11607, 1) +py_cobject_sources(#10710, 1) +py_cobject_sources(#10711, 1) +py_cobject_sources(#10712, 1) +py_cobject_sources(#10714, 1) +py_cobject_sources(#10715, 1) +py_cobject_sources(#10716, 1) +py_cobject_sources(#11608, 1) +py_cobject_sources(#11610, 1) +py_cobject_sources(#11611, 1) +py_cobject_sources(#10717, 1) +py_cobject_sources(#10718, 1) +py_cobject_sources(#11612, 1) +py_cobject_sources(#11613, 1) +py_cobject_sources(#10719, 1) +py_cobject_sources(#10720, 1) +py_cobject_sources(#10721, 1) +py_cobject_sources(#10722, 1) +py_cobject_sources(#10724, 1) +py_cobject_sources(#10725, 1) +py_cobject_sources(#10726, 1) +py_cobject_sources(#10727, 1) +py_cobject_sources(#10728, 1) +py_cobject_sources(#10729, 1) +py_cobject_sources(#10730, 1) +py_cobject_sources(#10731, 1) +py_cobject_sources(#10732, 1) +py_cobject_sources(#10733, 1) +py_cobject_sources(#10734, 1) +py_cobject_sources(#10735, 1) +py_cobject_sources(#10736, 1) +py_cobject_sources(#10737, 1) +py_cobject_sources(#10738, 1) +py_cobject_sources(#10739, 1) +py_cobject_sources(#10740, 1) +py_cobject_sources(#10741, 1) +py_cobject_sources(#10742, 1) +py_cobject_sources(#10743, 1) +py_cobject_sources(#10744, 1) +py_cobject_sources(#10745, 1) +py_cobject_sources(#10746, 1) +py_cobject_sources(#10747, 1) +py_cobject_sources(#10748, 1) +py_cobject_sources(#10749, 1) +py_cobject_sources(#10750, 1) +py_cobject_sources(#10751, 1) +py_cobject_sources(#10752, 1) +py_cobject_sources(#10753, 1) +py_cobject_sources(#10754, 1) +py_cobject_sources(#10755, 1) +py_cobject_sources(#10756, 1) +py_cobject_sources(#11614, 1) +py_cobject_sources(#11615, 1) +py_cobject_sources(#11616, 1) +py_cobject_sources(#11617, 1) +py_cobject_sources(#11618, 1) +py_cobject_sources(#11619, 1) +py_cobject_sources(#11620, 1) +py_cobject_sources(#11621, 1) +py_cobject_sources(#11622, 1) +py_cobject_sources(#11623, 1) +py_cobject_sources(#10757, 1) +py_cobject_sources(#11624, 1) +py_cobject_sources(#10758, 1) +py_cobject_sources(#11625, 1) +py_cobject_sources(#10759, 1) +py_cobject_sources(#10760, 1) +py_cobject_sources(#10761, 1) +py_cobject_sources(#11626, 1) +py_cobject_sources(#11627, 1) +py_cobject_sources(#11628, 1) +py_cobject_sources(#10762, 1) +py_cobject_sources(#10763, 1) +py_cobject_sources(#10764, 1) +py_cobject_sources(#10765, 1) +py_cobject_sources(#10766, 1) +py_cobject_sources(#10767, 1) +py_cobject_sources(#10768, 1) +py_cobject_sources(#11629, 1) +py_cobject_sources(#10769, 1) +py_cobject_sources(#10770, 1) +py_cobject_sources(#10771, 1) +py_cobject_sources(#10772, 1) +py_cobject_sources(#10773, 1) +py_cobject_sources(#10774, 1) +py_cobject_sources(#10775, 1) +py_cobject_sources(#10776, 1) +py_cobject_sources(#10777, 1) +py_cobject_sources(#10778, 1) +py_cobject_sources(#10779, 1) +py_cobject_sources(#10780, 1) +py_cobject_sources(#10781, 1) +py_cobject_sources(#10782, 1) +py_cobject_sources(#10783, 1) +py_cobject_sources(#10784, 1) +py_cobject_sources(#10785, 1) +py_cobject_sources(#10786, 1) +py_cobject_sources(#10787, 1) +py_cobject_sources(#10788, 1) +py_cobject_sources(#10789, 1) +py_cobject_sources(#10790, 1) +py_cobject_sources(#10791, 1) +py_cobject_sources(#10792, 1) +py_cobject_sources(#10793, 1) +py_cobject_sources(#10794, 1) +py_cobject_sources(#10795, 1) +py_cobject_sources(#10796, 1) +py_cobject_sources(#10797, 1) +py_cobject_sources(#11630, 1) +py_cobject_sources(#11631, 1) +py_cobject_sources(#11632, 1) +py_cobject_sources(#11633, 1) +py_cobject_sources(#11634, 1) +py_cobject_sources(#11635, 1) +py_cobject_sources(#11636, 1) +py_cobject_sources(#11637, 1) +py_cobject_sources(#11638, 1) +py_cobject_sources(#11639, 1) +py_cobject_sources(#10798, 1) +py_cobject_sources(#11640, 1) +py_cobject_sources(#11641, 1) +py_cobject_sources(#10799, 1) +py_cobject_sources(#10800, 1) +py_cobject_sources(#10801, 1) +py_cobject_sources(#10802, 1) +py_cobject_sources(#10803, 1) +py_cobject_sources(#11642, 1) +py_cobject_sources(#11643, 1) +py_cobject_sources(#10804, 1) +py_cobject_sources(#10805, 1) +py_cobject_sources(#10806, 1) +py_cobject_sources(#11644, 1) +py_cobject_sources(#10807, 1) +py_cobject_sources(#10808, 1) +py_cobject_sources(#10809, 1) +py_cobject_sources(#10810, 1) +py_cobject_sources(#10811, 1) +py_cobject_sources(#10812, 1) +py_cobject_sources(#10813, 1) +py_cobject_sources(#11645, 1) +py_cobject_sources(#11646, 1) +py_cobject_sources(#11647, 1) +py_cobject_sources(#11648, 1) +py_cobject_sources(#10814, 1) +py_cobject_sources(#10815, 1) +py_cobject_sources(#10816, 1) +py_cobject_sources(#10817, 1) +py_cobject_sources(#10818, 1) +py_cobject_sources(#10819, 1) +py_cobject_sources(#10820, 1) +py_cobject_sources(#11649, 1) +py_cobject_sources(#10821, 1) +py_cobject_sources(#10822, 1) +py_cobject_sources(#10823, 1) +py_cobject_sources(#10824, 1) +py_cobject_sources(#11652, 1) +py_cobject_sources(#10825, 1) +py_cobject_sources(#10826, 1) +py_cobject_sources(#10827, 1) +py_cobject_sources(#11653, 1) +py_cobject_sources(#10828, 1) +py_cobject_sources(#10829, 1) +py_cobject_sources(#10830, 1) +py_cobject_sources(#10831, 1) +py_cobject_sources(#10832, 1) +py_cobject_sources(#10833, 1) +py_cobject_sources(#11656, 1) +py_cobject_sources(#10834, 1) +py_cobject_sources(#11657, 1) +py_cobject_sources(#10835, 1) +py_cobject_sources(#10836, 1) +py_cobject_sources(#10837, 1) +py_cobject_sources(#10838, 1) +py_cobject_sources(#10839, 1) +py_cobject_sources(#10840, 1) +py_cobject_sources(#10841, 1) +py_cobject_sources(#10842, 1) +py_cobject_sources(#11658, 1) +py_cobject_sources(#10843, 1) +py_cobject_sources(#10844, 1) +py_cobject_sources(#10845, 1) +py_cobject_sources(#10846, 1) +py_cobject_sources(#10847, 1) +py_cobject_sources(#10848, 1) +py_cobject_sources(#10849, 1) +py_cobject_sources(#10850, 1) +py_cobject_sources(#10851, 1) +py_cobject_sources(#10852, 1) +py_cobject_sources(#10853, 1) +py_cobject_sources(#10854, 1) +py_cobject_sources(#10855, 1) +py_cobject_sources(#11660, 1) +py_cobject_sources(#10856, 1) +py_cobject_sources(#11662, 1) +py_cobject_sources(#11664, 1) +py_cobject_sources(#10857, 1) +py_cobject_sources(#10858, 1) +py_cobject_sources(#10859, 1) +py_cobject_sources(#10860, 1) +py_cobject_sources(#10861, 1) +py_cobject_sources(#10862, 1) +py_cobject_sources(#10863, 1) +py_cobject_sources(#10864, 1) +py_cobject_sources(#10865, 1) +py_cobject_sources(#10866, 1) +py_cobject_sources(#10867, 1) +py_cobject_sources(#10869, 1) +py_cobject_sources(#10870, 1) +py_cobject_sources(#10871, 1) +py_cobject_sources(#10872, 1) +py_cobject_sources(#10873, 1) +py_cobject_sources(#10874, 1) +py_cobject_sources(#10875, 1) +py_cobject_sources(#10876, 1) +py_cobject_sources(#10877, 1) +py_cobject_sources(#10878, 1) +py_cobject_sources(#10879, 1) +py_cobject_sources(#10880, 1) +py_cobject_sources(#10881, 1) +py_cobject_sources(#10882, 1) +py_cobject_sources(#10883, 1) +py_cobject_sources(#10884, 1) +py_cobject_sources(#10885, 1) +py_cobject_sources(#10887, 1) +py_cobject_sources(#10888, 1) +py_cobject_sources(#10889, 1) +py_cobject_sources(#10890, 1) +py_cobject_sources(#10891, 1) +py_cobject_sources(#10892, 1) +py_cobject_sources(#10893, 1) +py_cobject_sources(#10894, 1) +py_cobject_sources(#10895, 1) +py_cobject_sources(#10896, 1) +py_cobject_sources(#10897, 1) +py_cobject_sources(#10898, 1) +py_cobject_sources(#10899, 1) +py_cobject_sources(#10900, 1) +py_cobject_sources(#10901, 1) +py_cobject_sources(#10902, 1) +py_cobject_sources(#10903, 1) +py_cobject_sources(#10904, 1) +py_cobject_sources(#10905, 1) +py_cobject_sources(#10906, 1) +py_cobject_sources(#10907, 1) +py_cobject_sources(#10908, 1) +py_cobject_sources(#11669, 1) +py_cobject_sources(#10909, 1) +py_cobject_sources(#10910, 1) +py_cobject_sources(#10911, 1) +py_cobject_sources(#11670, 1) +py_cobject_sources(#10912, 1) +py_cobject_sources(#10913, 1) +py_cobject_sources(#10914, 1) +py_cobject_sources(#10915, 1) +py_cobject_sources(#10916, 1) +py_cobject_sources(#10917, 1) +py_cobject_sources(#10918, 1) +py_cobject_sources(#10919, 1) +py_cobject_sources(#11674, 1) +py_cobject_sources(#11676, 1) +py_cobject_sources(#10920, 1) +py_cobject_sources(#10921, 1) +py_cobject_sources(#10922, 1) +py_cobject_sources(#10923, 1) +py_cobject_sources(#10924, 1) +py_cobject_sources(#11678, 1) +py_cobject_sources(#10925, 1) +py_cobject_sources(#10926, 1) +py_cobject_sources(#10927, 1) +py_cobject_sources(#11679, 1) +py_cobject_sources(#10928, 1) +py_cobject_sources(#10929, 1) +py_cobject_sources(#10930, 1) +py_cobject_sources(#10931, 1) +py_cobject_sources(#10932, 1) +py_cobject_sources(#10933, 1) +py_cobject_sources(#10934, 1) +py_cobject_sources(#11681, 1) +py_cobject_sources(#11682, 1) +py_cobject_sources(#11683, 1) +py_cobject_sources(#10935, 1) +py_cobject_sources(#10936, 1) +py_cobject_sources(#10937, 1) +py_cobject_sources(#10938, 1) +py_cobject_sources(#10939, 1) +py_cobject_sources(#10940, 1) +py_cobject_sources(#10941, 1) +py_cobject_sources(#10942, 1) +py_cobject_sources(#10943, 1) +py_cobject_sources(#11686, 1) +py_cobject_sources(#11687, 1) +py_cobject_sources(#11688, 1) +py_cobject_sources(#11689, 1) +py_cobject_sources(#10944, 1) +py_cobject_sources(#11691, 1) +py_cobject_sources(#11693, 1) +py_cobject_sources(#11694, 1) +py_cobject_sources(#11695, 1) +py_cobject_sources(#10945, 1) +py_cobject_sources(#11696, 1) +py_cobject_sources(#11698, 1) +py_cobject_sources(#11699, 1) +py_cobject_sources(#11700, 1) +py_cobject_sources(#11701, 1) +py_cobject_sources(#11702, 1) +py_cobject_sources(#11705, 1) +py_cobject_sources(#11706, 1) +py_cobject_sources(#11707, 1) +py_cobject_sources(#11708, 1) +py_cobject_sources(#11709, 1) +py_cobject_sources(#10946, 1) +py_cobject_sources(#11710, 1) +py_cobject_sources(#11711, 1) +py_cobject_sources(#10947, 1) +py_cobject_sources(#10948, 1) +py_cobject_sources(#10949, 1) +py_cobject_sources(#11712, 1) +py_cobject_sources(#11713, 1) +py_cobject_sources(#10950, 1) +py_cobject_sources(#11714, 1) +py_cobject_sources(#11715, 1) +py_cobject_sources(#11716, 1) +py_cobject_sources(#10951, 1) +py_cobject_sources(#10952, 1) +py_cobject_sources(#10953, 1) +py_cobject_sources(#11717, 1) +py_cobject_sources(#10954, 1) +py_cobject_sources(#11718, 1) +py_cobject_sources(#11720, 1) +py_cobject_sources(#10955, 1) +py_cobject_sources(#11721, 1) +py_cobject_sources(#10956, 1) +py_cobject_sources(#11722, 1) +py_cobject_sources(#11723, 1) +py_cobject_sources(#11724, 1) +py_cobject_sources(#11725, 1) +py_cobject_sources(#11726, 1) +py_cobject_sources(#11727, 1) +py_cobject_sources(#11728, 1) +py_cobject_sources(#10957, 1) +py_cobject_sources(#11729, 1) +py_cobject_sources(#10958, 1) +py_cobject_sources(#10959, 1) +py_cobject_sources(#10960, 1) +py_cobject_sources(#11730, 1) +py_cobject_sources(#10961, 1) +py_cobject_sources(#10962, 1) +py_cobject_sources(#10963, 1) +py_cobject_sources(#10964, 1) +py_cobject_sources(#10965, 1) +py_cobject_sources(#10966, 1) +py_cobject_sources(#10967, 1) +py_cobject_sources(#10968, 1) +py_cobject_sources(#10969, 1) +py_cobject_sources(#10970, 1) +py_cobject_sources(#10971, 1) +py_cobject_sources(#10972, 1) +py_cobject_sources(#10973, 1) +py_cobject_sources(#10974, 1) +py_cobject_sources(#10975, 1) +py_cobject_sources(#10976, 1) +py_cobject_sources(#10977, 1) +py_cobject_sources(#10978, 1) +py_cobject_sources(#10979, 1) +py_cobject_sources(#10980, 1) +py_cobject_sources(#10981, 1) +py_cobject_sources(#11733, 1) +py_cobject_sources(#11734, 1) +py_cobject_sources(#10982, 1) +py_cobject_sources(#10983, 1) +py_cobject_sources(#10984, 1) +py_cobject_sources(#10985, 1) +py_cobject_sources(#11735, 1) +py_cobject_sources(#10986, 1) +py_cobject_sources(#10987, 1) +py_cobject_sources(#10988, 1) +py_cobject_sources(#10989, 1) +py_cobject_sources(#10990, 1) +py_cobject_sources(#10991, 1) +py_cobject_sources(#11737, 1) +py_cobject_sources(#11739, 1) +py_cobject_sources(#11740, 1) +py_cobject_sources(#11741, 1) +py_cobject_sources(#11742, 1) +py_cobject_sources(#10992, 1) +py_cobject_sources(#10993, 1) +py_cobject_sources(#10994, 1) +py_cobject_sources(#11744, 1) +py_cobject_sources(#10995, 1) +py_cobject_sources(#11746, 1) +py_cobject_sources(#11747, 1) +py_cobject_sources(#11748, 1) +py_cobject_sources(#10996, 1) +py_cobject_sources(#11749, 1) +py_cobject_sources(#11750, 1) +py_cobject_sources(#11751, 1) +py_cobject_sources(#11752, 1) +py_cobject_sources(#11753, 1) +py_cobject_sources(#11754, 1) +py_cobject_sources(#11755, 1) +py_cobject_sources(#10997, 1) +py_cobject_sources(#11756, 1) +py_cobject_sources(#10998, 1) +py_cobject_sources(#10999, 1) +py_cobject_sources(#11000, 1) +py_cobject_sources(#11001, 1) +py_cobject_sources(#11002, 1) +py_cobject_sources(#11003, 1) +py_cobject_sources(#11004, 1) +py_cobject_sources(#11005, 1) +py_cobject_sources(#11006, 1) +py_cobject_sources(#11007, 1) +py_cobject_sources(#11008, 1) +py_cobject_sources(#11009, 1) +py_cobject_sources(#11010, 1) +py_cobject_sources(#11011, 1) +py_cobject_sources(#11012, 1) +py_cobject_sources(#11013, 1) +py_cobject_sources(#11014, 1) +py_cobject_sources(#11015, 1) +py_cobject_sources(#11016, 1) +py_cobject_sources(#11017, 1) +py_cobject_sources(#11018, 1) +py_cobject_sources(#11758, 1) +py_cobject_sources(#11760, 1) +py_cobject_sources(#11761, 1) +py_cobject_sources(#11019, 1) +py_cobject_sources(#11020, 1) +py_cobject_sources(#11021, 1) +py_cobject_sources(#11022, 1) +py_cobject_sources(#11023, 1) +py_cobject_sources(#11024, 1) +py_cobject_sources(#11762, 1) +py_cobject_sources(#11763, 1) +py_cobject_sources(#11764, 1) +py_cobject_sources(#11765, 1) +py_cobject_sources(#11025, 1) +py_cobject_sources(#11766, 1) +py_cobject_sources(#11767, 1) +py_cobject_sources(#11026, 1) +py_cobject_sources(#11027, 1) +py_cobject_sources(#11028, 1) +py_cobject_sources(#11029, 1) +py_cobject_sources(#11030, 1) +py_cobject_sources(#11769, 1) +py_cobject_sources(#11771, 1) +py_cobject_sources(#11772, 1) +py_cobject_sources(#11031, 1) +py_cobject_sources(#11773, 1) +py_cobject_sources(#11774, 1) +py_cobject_sources(#11776, 1) +py_cobject_sources(#11032, 1) +py_cobject_sources(#11777, 1) +py_cobject_sources(#11778, 1) +py_cobject_sources(#11779, 1) +py_cobject_sources(#11780, 1) +py_cobject_sources(#11781, 1) +py_cobject_sources(#11033, 1) +py_cobject_sources(#11782, 1) +py_cobject_sources(#11034, 1) +py_cobject_sources(#11035, 1) +py_cobject_sources(#11036, 1) +py_cobject_sources(#11037, 1) +py_cobject_sources(#11038, 1) +py_cobject_sources(#11039, 1) +py_cobject_sources(#11040, 1) +py_cobject_sources(#11041, 1) +py_cobject_sources(#11042, 1) +py_cobject_sources(#11043, 1) +py_cobject_sources(#11784, 1) +py_cobject_sources(#11785, 1) +py_cobject_sources(#11786, 1) +py_cobject_sources(#11787, 1) +py_cobject_sources(#11788, 1) +py_cobject_sources(#11789, 1) +py_cobject_sources(#11044, 1) +py_cobject_sources(#11790, 1) +py_cobject_sources(#11045, 1) +py_cobject_sources(#11046, 1) +py_cobject_sources(#11047, 1) +py_cobject_sources(#11048, 1) +py_cobject_sources(#11049, 1) +py_cobject_sources(#11050, 1) +py_cobject_sources(#11051, 1) +py_cobject_sources(#11052, 1) +py_cobject_sources(#11053, 1) +py_cobject_sources(#11054, 1) +py_cobject_sources(#11055, 1) +py_cobject_sources(#11056, 1) +py_cobject_sources(#11792, 1) +py_cobject_sources(#11793, 1) +py_cobject_sources(#11794, 1) +py_cobject_sources(#11795, 1) +py_cobject_sources(#11796, 1) +py_cobject_sources(#11797, 1) +py_cobject_sources(#11057, 1) +py_cobject_sources(#11798, 1) +py_cobject_sources(#11058, 1) +py_cobject_sources(#11059, 1) +py_cobject_sources(#11060, 1) +py_cobject_sources(#11061, 1) +py_cobject_sources(#11062, 1) +py_cobject_sources(#11063, 1) +py_cobject_sources(#11799, 1) +py_cobject_sources(#11801, 1) +py_cobject_sources(#11802, 1) +py_cobject_sources(#11803, 1) +py_cobject_sources(#11804, 1) +py_cobject_sources(#11805, 1) +py_cobject_sources(#11806, 1) +py_cobject_sources(#11807, 1) +py_cobject_sources(#11808, 1) +py_cobject_sources(#11809, 1) +py_cobject_sources(#11810, 1) +py_cobject_sources(#11064, 1) +py_cobject_sources(#11812, 1) +py_cobject_sources(#11813, 1) +py_cobject_sources(#11814, 1) +py_cobject_sources(#11065, 1) +py_cobject_sources(#11066, 1) +py_cobject_sources(#11067, 1) +py_cobject_sources(#11068, 1) +py_cobject_sources(#11069, 1) +py_cobject_sources(#11070, 1) +py_cobject_sources(#11071, 1) +py_cobject_sources(#11072, 1) +py_cobject_sources(#11073, 1) +py_cobject_sources(#11074, 1) +py_cobject_sources(#11075, 1) +py_cobject_sources(#11076, 1) +py_cobject_sources(#11077, 1) +py_cobject_sources(#11078, 1) +py_cobject_sources(#11079, 1) +py_cobject_sources(#11816, 1) +py_cobject_sources(#11080, 1) +py_cobject_sources(#11081, 1) +py_cobject_sources(#11082, 1) +py_cobject_sources(#11083, 1) +py_cobject_sources(#11084, 1) +py_cobject_sources(#11085, 1) +py_cobject_sources(#11086, 1) +py_cobject_sources(#11817, 1) +py_cobject_sources(#11087, 1) +py_cobject_sources(#11088, 1) +py_cobject_sources(#11818, 1) +py_cobject_sources(#11089, 1) +py_cobject_sources(#11090, 1) +py_cobject_sources(#11091, 1) +py_cobject_sources(#11819, 1) +py_cobject_sources(#11092, 1) +py_cobject_sources(#11820, 1) +py_cobject_sources(#11093, 1) +py_cobject_sources(#11094, 1) +py_cobject_sources(#11095, 1) +py_cobject_sources(#11096, 1) +py_cobject_sources(#11822, 1) +py_cobject_sources(#11097, 1) +py_cobject_sources(#11098, 1) +py_cobject_sources(#11823, 1) +py_cobject_sources(#11099, 1) +py_cobject_sources(#11100, 1) +py_cobject_sources(#11101, 1) +py_cobject_sources(#11102, 1) +py_cobject_sources(#11103, 1) +py_cobject_sources(#11104, 1) +py_cobject_sources(#11106, 1) +py_cobject_sources(#11824, 1) +py_cobject_sources(#11107, 1) +py_cobject_sources(#11108, 1) +py_cobject_sources(#11109, 1) +py_cobject_sources(#11110, 1) +py_cobject_sources(#11111, 1) +py_cobject_sources(#11112, 1) +py_cobject_sources(#11113, 1) +py_cobject_sources(#11114, 1) +py_cobject_sources(#11115, 1) +py_cobject_sources(#11116, 1) +py_cobject_sources(#11117, 1) +py_cobject_sources(#11118, 1) +py_cobject_sources(#11826, 1) +py_cobject_sources(#11119, 1) +py_cobject_sources(#11120, 1) +py_cobject_sources(#11121, 1) +py_cobject_sources(#11122, 1) +py_cobject_sources(#11123, 1) +py_cobject_sources(#11124, 1) +py_cobject_sources(#11828, 1) +py_cobject_sources(#11833, 1) +py_cobject_sources(#11834, 1) +py_cobject_sources(#11835, 1) +py_cobject_sources(#11836, 1) +py_cobject_sources(#11837, 1) +py_cobject_sources(#11838, 1) +py_cobject_sources(#11839, 1) +py_cobject_sources(#11840, 1) +py_cobject_sources(#11841, 1) +py_cobject_sources(#11842, 1) +py_cobject_sources(#11843, 1) +py_cobject_sources(#11844, 1) +py_cobject_sources(#11845, 1) +py_cobject_sources(#11846, 1) +py_cobject_sources(#11847, 1) +py_cobject_sources(#11848, 1) +py_cobject_sources(#11849, 1) +py_cobject_sources(#11850, 1) +py_cobject_sources(#11851, 1) +py_cobject_sources(#11852, 1) +py_cobject_sources(#11854, 1) +py_cobject_sources(#11125, 1) +py_cobject_sources(#11126, 1) +py_cobject_sources(#11856, 1) +py_cobject_sources(#11858, 1) +py_cobject_sources(#11859, 1) +py_cobject_sources(#11860, 1) +py_cobject_sources(#11127, 1) +py_cobject_sources(#11128, 1) +py_cobject_sources(#11129, 1) +py_cobject_sources(#11862, 1) +py_cobject_sources(#11863, 1) +py_cobject_sources(#11864, 1) +py_cobject_sources(#11865, 1) +py_cobject_sources(#11866, 1) +py_cobject_sources(#11130, 1) +py_cobject_sources(#11868, 1) +py_cobject_sources(#11869, 1) +py_cobject_sources(#11871, 1) +py_cobject_sources(#11872, 1) +py_cobject_sources(#11131, 1) +py_cobject_sources(#11132, 1) +py_cobject_sources(#11133, 1) +py_cobject_sources(#11873, 1) +py_cobject_sources(#11874, 1) +py_cobject_sources(#11134, 1) +py_cobject_sources(#11135, 1) +py_cobject_sources(#11875, 1) +py_cobject_sources(#11136, 1) +py_cobject_sources(#11876, 1) +py_cobject_sources(#11877, 1) +py_cobject_sources(#11878, 1) +py_cobject_sources(#11137, 1) +py_cobject_sources(#11138, 1) +py_cobject_sources(#11139, 1) +py_cobject_sources(#11140, 1) +py_cobject_sources(#11141, 1) +py_cobject_sources(#11143, 1) +py_cobject_sources(#11144, 1) +py_cobject_sources(#11145, 1) +py_cobject_sources(#11146, 1) +py_cobject_sources(#11147, 1) +py_cobject_sources(#11148, 1) +py_cobject_sources(#11149, 1) +py_cobject_sources(#11150, 1) +py_cobject_sources(#11151, 1) +py_cobject_sources(#11152, 1) +py_cobject_sources(#11153, 1) +py_cobject_sources(#11887, 1) +py_cobject_sources(#11154, 1) +py_cobject_sources(#11155, 1) +py_cobject_sources(#11156, 1) +py_cobject_sources(#11157, 1) +py_cobject_sources(#11158, 1) +py_cobject_sources(#11159, 1) +py_cobject_sources(#11160, 1) +py_cobject_sources(#11161, 1) +py_cobject_sources(#11162, 1) +py_cobject_sources(#11163, 1) +py_cobject_sources(#11164, 1) +py_cobject_sources(#11165, 1) +py_cobject_sources(#11166, 1) +py_cobject_sources(#11167, 1) +py_cobject_sources(#11168, 1) +py_cobject_sources(#11169, 1) +py_cobject_sources(#11170, 1) +py_cobject_sources(#11171, 1) +py_cobject_sources(#11172, 1) +py_cobject_sources(#11899, 1) +py_cobject_sources(#11173, 1) +py_cobject_sources(#11174, 1) +py_cobject_sources(#11175, 1) +py_cobject_sources(#11176, 1) +py_cobject_sources(#11177, 1) +py_cobject_sources(#11178, 1) +py_cobject_sources(#11179, 1) +py_cobject_sources(#11180, 1) +py_cobject_sources(#11181, 1) +py_cobject_sources(#11182, 1) +py_cobject_sources(#11183, 1) +py_cobject_sources(#11184, 1) +py_cobject_sources(#11185, 1) +py_cobject_sources(#11186, 1) +py_cobject_sources(#11187, 1) +py_cobject_sources(#11188, 1) +py_cobject_sources(#11189, 1) +py_cobject_sources(#11190, 1) +py_cobject_sources(#11900, 1) +py_cobject_sources(#11191, 1) +py_cobject_sources(#11192, 1) +py_cobject_sources(#11193, 1) +py_cobject_sources(#11901, 1) +py_cobject_sources(#11194, 1) +py_cobject_sources(#11195, 1) +py_cobject_sources(#11196, 1) +py_cobject_sources(#11197, 1) +py_cobject_sources(#11198, 1) +py_cobject_sources(#11199, 1) +py_cobject_sources(#11200, 1) +py_cobject_sources(#11201, 1) +py_cobject_sources(#11202, 1) +py_cobject_sources(#11203, 1) +py_cobject_sources(#11204, 1) +py_cobject_sources(#11205, 1) +py_cobject_sources(#11206, 1) +py_cobject_sources(#11207, 1) +py_cobject_sources(#11208, 1) +py_cobject_sources(#11209, 1) +py_cobject_sources(#11210, 1) +py_cobject_sources(#11211, 1) +py_cobject_sources(#11212, 1) +py_cobject_sources(#11213, 1) +py_cobject_sources(#11214, 1) +py_cobject_sources(#11215, 1) +py_cobject_sources(#11216, 1) +py_cobject_sources(#11217, 1) +py_cobject_sources(#11218, 1) +py_cobject_sources(#11219, 1) +py_cobject_sources(#11220, 1) +py_cobject_sources(#11221, 1) +py_cobject_sources(#11902, 1) +py_cobject_sources(#11222, 1) +py_cobject_sources(#11223, 1) +py_cobject_sources(#11224, 1) +py_cobject_sources(#11225, 1) +py_cobject_sources(#11226, 1) +py_cobject_sources(#11227, 1) +py_cobject_sources(#11228, 1) +py_cobject_sources(#11229, 1) +py_cobject_sources(#11230, 1) +py_cobject_sources(#11231, 1) +py_cobject_sources(#11232, 1) +py_cobject_sources(#11233, 1) +py_cobject_sources(#11234, 1) +py_cobject_sources(#11235, 1) +py_cobject_sources(#11236, 1) +py_cobject_sources(#11237, 1) +py_cobject_sources(#11238, 1) +py_cobject_sources(#11239, 1) +py_cobject_sources(#11240, 1) +py_cobject_sources(#11241, 1) +py_cobject_sources(#11242, 1) +py_cobject_sources(#11243, 1) +py_cobject_sources(#11244, 1) +py_cobject_sources(#11245, 1) +py_cobject_sources(#11246, 1) +py_cobject_sources(#11247, 1) +py_cobject_sources(#11248, 1) +py_cobject_sources(#11249, 1) +py_cobject_sources(#11908, 1) +py_cobject_sources(#11909, 1) +py_cobject_sources(#11250, 1) +py_cobject_sources(#11251, 1) +py_cobject_sources(#11252, 1) +py_cobject_sources(#11253, 1) +py_cobject_sources(#11254, 1) +py_cobject_sources(#11255, 1) +py_cobject_sources(#11256, 1) +py_cobject_sources(#11257, 1) +py_cobject_sources(#11258, 1) +py_cobject_sources(#11913, 1) +py_cobject_sources(#11259, 1) +py_cobject_sources(#11914, 1) +py_cobject_sources(#11915, 1) +py_cobject_sources(#11916, 1) +py_cobject_sources(#11260, 1) +py_cobject_sources(#11917, 1) +py_cobject_sources(#11918, 1) +py_cobject_sources(#11919, 1) +py_cobject_sources(#11261, 1) +py_cobject_sources(#11920, 1) +py_cobject_sources(#11262, 1) +py_cobject_sources(#11263, 1) +py_cobject_sources(#11264, 1) +py_cobject_sources(#11265, 1) +py_cobject_sources(#11266, 1) +py_cobject_sources(#11267, 1) +py_cobject_sources(#11268, 1) +py_cobject_sources(#11269, 1) +py_cobject_sources(#11270, 1) +py_cobject_sources(#11271, 1) +py_cobject_sources(#11272, 1) +py_cobject_sources(#11273, 1) +py_cobject_sources(#11274, 1) +py_cobject_sources(#11275, 1) +py_cobject_sources(#11277, 1) +py_cobject_sources(#11278, 1) +py_cobject_sources(#11279, 1) +py_cobject_sources(#11280, 1) +py_cobject_sources(#11924, 1) +py_cobject_sources(#11281, 1) +py_cobject_sources(#11282, 1) +py_cobject_sources(#11283, 1) +py_cobject_sources(#11284, 1) +py_cobject_sources(#11285, 1) +py_cobject_sources(#11286, 1) +py_cobject_sources(#11287, 1) +py_cobject_sources(#11288, 1) +py_cobject_sources(#11289, 1) +py_cobject_sources(#11290, 1) +py_cobject_sources(#11291, 1) +py_cobject_sources(#11292, 1) +py_cobject_sources(#11293, 1) +py_cobject_sources(#11294, 1) +py_cobject_sources(#11295, 1) +py_cobject_sources(#11296, 1) +py_cobject_sources(#11297, 1) +py_cobject_sources(#11298, 1) +py_cobject_sources(#11299, 1) +py_cobject_sources(#11300, 1) +py_cobject_sources(#11301, 1) +py_cobject_sources(#11302, 1) +py_cobject_sources(#11303, 1) +py_cobject_sources(#11304, 1) +py_cobject_sources(#11305, 1) +py_cobject_sources(#11306, 1) +py_cobject_sources(#11307, 1) +py_cobject_sources(#11308, 1) +py_cobject_sources(#11309, 1) +py_cobject_sources(#11310, 1) +py_cobject_sources(#11311, 1) +py_cobject_sources(#11312, 1) +py_cobject_sources(#11313, 1) +py_cobject_sources(#11314, 1) +py_cobject_sources(#11315, 1) +py_cobject_sources(#11316, 1) +py_cobject_sources(#11317, 1) +py_cobject_sources(#11318, 1) +py_cobject_sources(#11319, 1) +py_cobject_sources(#11320, 1) +py_cobject_sources(#11321, 1) +py_cobject_sources(#11322, 1) +py_cobject_sources(#11323, 1) +py_cobject_sources(#11324, 1) +py_cobject_sources(#11325, 1) +py_cobject_sources(#11326, 1) +py_cobject_sources(#11327, 1) +py_cobject_sources(#11328, 1) +py_cobject_sources(#11330, 1) +py_cobject_sources(#11331, 1) +py_cobject_sources(#11332, 1) +py_cobject_sources(#11333, 1) +py_cobject_sources(#11334, 1) +py_cobject_sources(#11335, 1) +py_cobject_sources(#11926, 1) +py_cobject_sources(#11336, 1) +py_cobject_sources(#11337, 1) +py_cobject_sources(#11338, 1) +py_cobject_sources(#11339, 1) +py_cobject_sources(#11340, 1) +py_cobject_sources(#11341, 1) +py_cobject_sources(#11342, 1) +py_cobject_sources(#11343, 1) +py_cobject_sources(#11344, 1) +py_cobject_sources(#11345, 1) +py_cobject_sources(#11346, 1) +py_cobject_sources(#11347, 1) +py_cobject_sources(#11348, 1) +py_cobject_sources(#11349, 1) +py_cobject_sources(#11927, 1) +py_cobject_sources(#11350, 1) +py_cobject_sources(#11928, 1) +py_cobject_sources(#11930, 1) +py_cobject_sources(#11931, 1) +py_cobject_sources(#11932, 1) +py_cobject_sources(#11933, 1) +py_cobject_sources(#11934, 1) +py_cobject_sources(#11936, 1) +py_cobject_sources(#11937, 1) +py_cobject_sources(#11938, 1) +py_cobject_sources(#11940, 1) +py_cobject_sources(#11351, 1) +py_cobject_sources(#11352, 1) +py_cobject_sources(#11353, 1) +py_cobject_sources(#11354, 1) +py_cobject_sources(#11355, 1) +py_cobject_sources(#11356, 1) +py_cobject_sources(#11357, 1) +py_cobject_sources(#11358, 1) +py_cobject_sources(#11359, 1) +py_cobject_sources(#11360, 1) +py_cobject_sources(#11944, 1) +py_cobject_sources(#11361, 1) +py_cobject_sources(#11362, 1) +py_cobject_sources(#11363, 1) +py_cobject_sources(#11364, 1) +py_cobject_sources(#11365, 1) +py_cobject_sources(#11946, 1) +py_cobject_sources(#11947, 1) +py_cobject_sources(#11366, 1) +py_cobject_sources(#11367, 1) +py_cobject_sources(#11948, 1) +py_cobject_sources(#11368, 1) +py_cobject_sources(#11949, 1) +py_cobject_sources(#11369, 1) +py_cobject_sources(#11370, 1) +py_cobject_sources(#11371, 1) +py_cobject_sources(#11372, 1) +py_cobject_sources(#11373, 1) +py_cobject_sources(#11374, 1) +py_cobject_sources(#11375, 1) +py_cobject_sources(#11951, 1) +py_cobject_sources(#11376, 1) +py_cobject_sources(#11377, 1) +py_cobject_sources(#11378, 1) +py_cobject_sources(#11952, 1) +py_cobject_sources(#11379, 1) +py_cobject_sources(#11380, 1) +py_cobject_sources(#11381, 1) +py_cobject_sources(#11382, 1) +py_cobject_sources(#11383, 1) +py_cobject_sources(#11384, 1) +py_cobject_sources(#11385, 1) +py_cobject_sources(#11386, 1) +py_cobject_sources(#11387, 1) +py_cobject_sources(#11388, 1) +py_cobject_sources(#11389, 1) +py_cobject_sources(#11390, 1) +py_cobject_sources(#11391, 1) +py_cobject_sources(#11392, 1) +py_cobject_sources(#11393, 1) +py_cobject_sources(#11394, 1) +py_cobject_sources(#11395, 1) +py_cobject_sources(#11396, 1) +py_cobject_sources(#11397, 1) +py_cobject_sources(#11398, 1) +py_cobject_sources(#11399, 1) +py_cobject_sources(#11400, 1) +py_cobject_sources(#11401, 1) +py_cobject_sources(#11402, 1) +py_cobject_sources(#11403, 1) +py_cobject_sources(#11404, 1) +py_cobject_sources(#11405, 1) +py_cobject_sources(#11406, 1) +py_cobject_sources(#11407, 1) +py_cobject_sources(#11408, 1) +py_cobject_sources(#11409, 1) +py_cobject_sources(#11410, 1) +py_cobject_sources(#11411, 1) +py_cobject_sources(#11412, 1) +py_cobject_sources(#11413, 1) +py_cobject_sources(#11414, 1) +py_cobject_sources(#11415, 1) +py_cobject_sources(#11416, 1) +py_cobject_sources(#11417, 1) +py_cobject_sources(#11418, 1) +py_cobject_sources(#11419, 1) +py_cobject_sources(#11420, 1) +py_cobject_sources(#11421, 1) +py_cobject_sources(#11422, 1) +py_cobject_sources(#11423, 1) +py_cobject_sources(#11424, 1) +py_cobject_sources(#11425, 1) +py_cobject_sources(#11426, 1) +py_cobject_sources(#11427, 1) +py_cobject_sources(#11428, 1) +py_cobject_sources(#11429, 1) +py_cobject_sources(#11430, 1) +py_cobject_sources(#11431, 1) +py_cobject_sources(#11432, 1) +py_cobject_sources(#11433, 1) +py_cobject_sources(#11434, 1) +py_cobject_sources(#11954, 1) +py_cobject_sources(#11435, 1) +py_cobject_sources(#11436, 1) +py_cobject_sources(#11437, 1) +py_cobject_sources(#11438, 1) +py_cobject_sources(#11439, 1) +py_cobject_sources(#11440, 1) +py_cobject_sources(#11441, 1) +py_cobject_sources(#11442, 1) +py_cobject_sources(#11443, 1) +py_cobject_sources(#11444, 1) +py_cobject_sources(#11445, 1) +py_cobject_sources(#11446, 1) +py_cobject_sources(#11447, 1) +py_cobject_sources(#11448, 1) +py_cobject_sources(#11449, 1) +py_cobject_sources(#11450, 1) +py_cobject_sources(#11451, 1) +py_cobject_sources(#11452, 1) +py_cobject_sources(#11453, 1) +py_cobject_sources(#11454, 1) +py_cobject_sources(#11455, 1) +py_cobject_sources(#11456, 1) +py_cobject_sources(#11457, 1) +py_cobject_sources(#11957, 1) +py_cobject_sources(#11458, 1) +py_cobject_sources(#11459, 1) +py_cobject_sources(#11958, 1) +py_cobject_sources(#11959, 1) +py_cobject_sources(#11960, 1) +py_cobject_sources(#11961, 1) +py_cobject_sources(#11962, 1) +py_cobject_sources(#11460, 1) +py_cobject_sources(#11963, 1) +py_cobject_sources(#11461, 1) +py_cobject_sources(#11462, 1) +py_cobject_sources(#11463, 1) +py_cobject_sources(#11964, 1) +py_cobject_sources(#11965, 1) +py_cobject_sources(#11966, 1) +py_cobject_sources(#11464, 1) +py_cobject_sources(#11465, 1) +py_cobject_sources(#11967, 1) +py_cobject_sources(#11968, 1) +py_cobject_sources(#11466, 1) +py_cobject_sources(#11467, 1) +py_cobject_sources(#11969, 1) +py_cobject_sources(#11970, 1) +py_cobject_sources(#11971, 1) +py_cobject_sources(#11972, 1) +py_cobject_sources(#11468, 1) +py_cobject_sources(#11469, 1) +py_cobject_sources(#11470, 1) +py_cobject_sources(#11471, 1) +py_cobject_sources(#11472, 1) +py_cobject_sources(#11473, 1) +py_cobject_sources(#11474, 1) +py_cobject_sources(#11475, 1) +py_cobject_sources(#11476, 1) +py_cobject_sources(#11477, 1) +py_cobject_sources(#11478, 1) +py_cobject_sources(#11479, 1) +py_cobject_sources(#11480, 1) +py_cobject_sources(#11973, 1) +py_cobject_sources(#11974, 1) +py_cobject_sources(#11975, 1) +py_cobject_sources(#11976, 1) +py_cobject_sources(#11481, 1) +py_cobject_sources(#11482, 1) +py_cobject_sources(#11483, 1) +py_cobject_sources(#11484, 1) +py_cobject_sources(#11485, 1) +py_cobject_sources(#11486, 1) +py_cobject_sources(#11487, 1) +py_cobject_sources(#11978, 1) +py_cobject_sources(#11488, 1) +py_cobject_sources(#11489, 1) +py_cobject_sources(#11490, 1) +py_cobject_sources(#11493, 1) +py_cobject_sources(#11494, 1) +py_cobject_sources(#11495, 1) +py_cobject_sources(#11496, 1) +py_cobject_sources(#11497, 1) +py_cobject_sources(#11980, 1) +py_cobject_sources(#11981, 1) +py_cobject_sources(#11498, 1) +py_cobject_sources(#11499, 1) +py_cobject_sources(#11500, 1) +py_cobject_sources(#11501, 1) +py_cobject_sources(#11983, 1) +py_cobject_sources(#11502, 1) +py_cobject_sources(#11503, 1) +py_cobject_sources(#11504, 1) +py_cobject_sources(#11505, 1) +py_cobject_sources(#11506, 1) + diff --git a/python/extractor/semmle/data/README.md b/python/extractor/semmle/data/README.md new file mode 100644 index 00000000000..3ab81ca1f86 --- /dev/null +++ b/python/extractor/semmle/data/README.md @@ -0,0 +1 @@ +The TRAP files in this directory were automatically generated from the cpython source code, copyright PSF. diff --git a/python/extractor/semmle/data/__init__.py b/python/extractor/semmle/data/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/semmle/data/interpreter2.trap b/python/extractor/semmle/data/interpreter2.trap new file mode 100644 index 00000000000..abf2f7e046a --- /dev/null +++ b/python/extractor/semmle/data/interpreter2.trap @@ -0,0 +1,12078 @@ +#10000 = @"C_type$function" +#10001 = @"C_type$type" +py_cobjects(#10001) +py_cobjecttypes(#10001, #10001) +py_cobject_sources(#10001, 0) +#10002 = @"C_type$type$2__abstractmethods__" +#10003 = @"C_type$getset_descriptor" +py_cobjects(#10003) +py_cobjecttypes(#10003, #10001) +py_cobject_sources(#10003, 0) +#10004 = @"C_type$getset_descriptor$2__delete__" +#10005 = @"C_type$wrapper_descriptor" +py_cobjects(#10005) +py_cobjecttypes(#10005, #10001) +py_cobject_sources(#10005, 0) +#10006 = @"C_type$wrapper_descriptor$2__call__" +py_cobjects(#10006) +py_cobjecttypes(#10006, #10005) +py_cobject_sources(#10006, 0) +py_cobjectnames(#10006, "__call__") +py_cmembers_versioned(#10005, "__call__", #10006, "2") +#10007 = @"C_type$wrapper_descriptor$2__doc__" +py_cobjects(#10007) +py_cobjecttypes(#10007, #10003) +py_cobject_sources(#10007, 0) +#10008 = @"C_type$wrapper_descriptor$2__doc__$2__set__" +#10009 = @"C_type$method-wrapper" +py_cobjects(#10009) +py_cobjecttypes(#10009, #10001) +py_cobject_sources(#10009, 0) +#10010 = @"C_type$method-wrapper$2__call__" +py_cobjects(#10010) +py_cobjecttypes(#10010, #10005) +py_cobject_sources(#10010, 0) +py_cobjectnames(#10010, "__call__") +py_cmembers_versioned(#10009, "__call__", #10010, "2") +#10011 = @"C_type$method-wrapper$2__cmp__" +py_cobjects(#10011) +py_cobjecttypes(#10011, #10005) +py_cobject_sources(#10011, 0) +py_cobjectnames(#10011, "__cmp__") +py_cmembers_versioned(#10009, "__cmp__", #10011, "2") +#10012 = @"C_type$method-wrapper$2__doc__" +py_cobjects(#10012) +py_cobjecttypes(#10012, #10003) +py_cobject_sources(#10012, 0) +#10013 = @"C_type$method-wrapper$2__doc__$2__set__" +py_cobjects(#10013) +py_cobjecttypes(#10013, #10009) +py_cobject_sources(#10013, 0) +py_cobjectnames(#10013, "__set__") +py_cmembers_versioned(#10012, "__set__", #10013, "2") +#10014 = @"C_type$method-wrapper$2__doc__$2__getattribute__" +py_cobjects(#10014) +py_cobjecttypes(#10014, #10009) +py_cobject_sources(#10014, 0) +py_cobjectnames(#10014, "__getattribute__") +py_cmembers_versioned(#10012, "__getattribute__", #10014, "2") +py_cmembers_versioned(#10012, "__objclass__", #10009, "2") +#10015 = @"C_type$method-wrapper$2__doc__$2__repr__" +py_cobjects(#10015) +py_cobjecttypes(#10015, #10009) +py_cobject_sources(#10015, 0) +py_cobjectnames(#10015, "__repr__") +py_cmembers_versioned(#10012, "__repr__", #10015, "2") +#10016 = @"C_type$method-wrapper$2__doc__$2__get__" +py_cobjects(#10016) +py_cobjecttypes(#10016, #10009) +py_cobject_sources(#10016, 0) +py_cobjectnames(#10016, "__get__") +py_cmembers_versioned(#10012, "__get__", #10016, "2") +#10017 = @"C_None" +#10018 = @"C_type$NoneType" +py_cobjects(#10018) +py_cobjecttypes(#10018, #10001) +py_cobject_sources(#10018, 0) +py_cmembers_versioned(#10018, "__doc__", #10017, "2") +#10019 = @"C_type$NoneType$2__hash__" +py_cobjects(#10019) +py_cobjecttypes(#10019, #10005) +py_cobject_sources(#10019, 0) +py_cobjectnames(#10019, "__hash__") +py_cmembers_versioned(#10018, "__hash__", #10019, "2") +#10020 = @"C_type$NoneType$2__repr__" +py_cobjects(#10020) +py_cobjecttypes(#10020, #10005) +py_cobject_sources(#10020, 0) +py_cobjectnames(#10020, "__repr__") +py_cmembers_versioned(#10018, "__repr__", #10020, "2") +#10021 = @"C_type$object" +py_cobjects(#10021) +py_cobjecttypes(#10021, #10001) +py_cobject_sources(#10021, 0) +#10022 = @"C_type$object$2__class__" +py_cobjects(#10022) +py_cobjecttypes(#10022, #10003) +py_cobject_sources(#10022, 0) +#10023 = @"C_type$object$2__class__$2__set__" +py_cobjects(#10023) +py_cobjecttypes(#10023, #10009) +py_cobject_sources(#10023, 0) +py_cobjectnames(#10023, "__set__") +py_cmembers_versioned(#10022, "__set__", #10023, "2") +#10024 = @"C_type$object$2__class__$2__getattribute__" +py_cobjects(#10024) +py_cobjecttypes(#10024, #10009) +py_cobject_sources(#10024, 0) +py_cobjectnames(#10024, "__getattribute__") +py_cmembers_versioned(#10022, "__getattribute__", #10024, "2") +py_cmembers_versioned(#10022, "__objclass__", #10021, "2") +#10025 = @"C_type$object$2__class__$2__repr__" +py_cobjects(#10025) +py_cobjecttypes(#10025, #10009) +py_cobject_sources(#10025, 0) +py_cobjectnames(#10025, "__repr__") +py_cmembers_versioned(#10022, "__repr__", #10025, "2") +#10026 = @"C_type$object$2__class__$2__get__" +py_cobjects(#10026) +py_cobjecttypes(#10026, #10009) +py_cobject_sources(#10026, 0) +py_cobjectnames(#10026, "__get__") +py_cmembers_versioned(#10022, "__get__", #10026, "2") +#10027 = @"C_bytes$43668771b159ce5cf2403f7d85b2e7b2cfa0fa17" +#10028 = @"C_type$bytes" +py_cobjects(#10028) +py_cobjecttypes(#10028, #10001) +py_cobject_sources(#10028, 0) +#10029 = @"C_type$bytes$2__add__" +py_cobjects(#10029) +py_cobjecttypes(#10029, #10005) +py_cobject_sources(#10029, 0) +py_cobjectnames(#10029, "__add__") +py_cmembers_versioned(#10028, "__add__", #10029, "2") +#10030 = @"C_type$bytes$2__contains__" +py_cobjects(#10030) +py_cobjecttypes(#10030, #10005) +py_cobject_sources(#10030, 0) +py_cobjectnames(#10030, "__contains__") +py_cmembers_versioned(#10028, "__contains__", #10030, "2") +#10031 = @"C_bytes$89fa4e8b61f4e344a49c8e380b1f1069d190a01c" +py_cobjects(#10031) +py_cobjecttypes(#10031, #10028) +py_cobject_sources(#10031, 0) +py_cobjectnames(#10031, "b'str(object='') -> string + +Return a nice string representation of the object. +If the argument is a string, the return value is the same object.'") +py_cmembers_versioned(#10028, "__doc__", #10031, "2") +#10032 = @"C_type$bytes$2__eq__" +py_cobjects(#10032) +py_cobjecttypes(#10032, #10005) +py_cobject_sources(#10032, 0) +py_cobjectnames(#10032, "__eq__") +py_cmembers_versioned(#10028, "__eq__", #10032, "2") +#10033 = @"C_type$bytes$2__format__" +#10034 = @"C_type$method_descriptor" +py_cobjects(#10034) +py_cobjecttypes(#10034, #10001) +py_cobject_sources(#10034, 0) +#10035 = @"C_type$method_descriptor$2__call__" +py_cobjects(#10035) +py_cobjecttypes(#10035, #10005) +py_cobject_sources(#10035, 0) +py_cobjectnames(#10035, "__call__") +py_cmembers_versioned(#10034, "__call__", #10035, "2") +#10036 = @"C_type$method_descriptor$2__doc__" +py_cobjects(#10036) +py_cobjecttypes(#10036, #10003) +py_cobject_sources(#10036, 0) +#10037 = @"C_type$method_descriptor$2__doc__$2__set__" +py_cobjects(#10037) +py_cobjecttypes(#10037, #10009) +py_cobject_sources(#10037, 0) +py_cobjectnames(#10037, "__set__") +py_cmembers_versioned(#10036, "__set__", #10037, "2") +#10038 = @"C_type$method_descriptor$2__doc__$2__getattribute__" +py_cobjects(#10038) +py_cobjecttypes(#10038, #10009) +py_cobject_sources(#10038, 0) +py_cobjectnames(#10038, "__getattribute__") +py_cmembers_versioned(#10036, "__getattribute__", #10038, "2") +py_cmembers_versioned(#10036, "__objclass__", #10034, "2") +#10039 = @"C_type$method_descriptor$2__doc__$2__repr__" +py_cobjects(#10039) +py_cobjecttypes(#10039, #10009) +py_cobject_sources(#10039, 0) +py_cobjectnames(#10039, "__repr__") +py_cmembers_versioned(#10036, "__repr__", #10039, "2") +#10040 = @"C_type$method_descriptor$2__doc__$2__get__" +py_cobjects(#10040) +py_cobjecttypes(#10040, #10009) +py_cobject_sources(#10040, 0) +py_cobjectnames(#10040, "__get__") +py_cmembers_versioned(#10036, "__get__", #10040, "2") +py_cmembers_versioned(#10036, "__doc__", #10017, "2") +#10041 = @"C_type$method_descriptor$2__doc__$2__delete__" +py_cobjects(#10041) +py_cobjecttypes(#10041, #10009) +py_cobject_sources(#10041, 0) +py_cobjectnames(#10041, "__delete__") +py_cmembers_versioned(#10036, "__delete__", #10041, "2") +py_cobjectnames(#10036, "__doc__") +py_cmembers_versioned(#10034, "__doc__", #10036, "2") +#10042 = @"C_type$method_descriptor$2__get__" +py_cobjects(#10042) +py_cobjecttypes(#10042, #10005) +py_cobject_sources(#10042, 0) +py_cobjectnames(#10042, "__get__") +py_cmembers_versioned(#10034, "__get__", #10042, "2") +#10043 = @"C_type$method_descriptor$2__getattribute__" +py_cobjects(#10043) +py_cobjecttypes(#10043, #10005) +py_cobject_sources(#10043, 0) +py_cobjectnames(#10043, "__getattribute__") +py_cmembers_versioned(#10034, "__getattribute__", #10043, "2") +#10044 = @"C_type$method_descriptor$2__name__" +#10045 = @"C_type$member_descriptor" +py_cobjects(#10045) +py_cobjecttypes(#10045, #10001) +py_cobject_sources(#10045, 0) +#10046 = @"C_type$member_descriptor$2__delete__" +py_cobjects(#10046) +py_cobjecttypes(#10046, #10005) +py_cobject_sources(#10046, 0) +py_cobjectnames(#10046, "__delete__") +py_cmembers_versioned(#10045, "__delete__", #10046, "2") +#10047 = @"C_type$member_descriptor$2__doc__" +py_cobjects(#10047) +py_cobjecttypes(#10047, #10003) +py_cobject_sources(#10047, 0) +#10048 = @"C_type$member_descriptor$2__doc__$2__set__" +py_cobjects(#10048) +py_cobjecttypes(#10048, #10009) +py_cobject_sources(#10048, 0) +py_cobjectnames(#10048, "__set__") +py_cmembers_versioned(#10047, "__set__", #10048, "2") +#10049 = @"C_type$member_descriptor$2__doc__$2__getattribute__" +py_cobjects(#10049) +py_cobjecttypes(#10049, #10009) +py_cobject_sources(#10049, 0) +py_cobjectnames(#10049, "__getattribute__") +py_cmembers_versioned(#10047, "__getattribute__", #10049, "2") +py_cmembers_versioned(#10047, "__objclass__", #10045, "2") +#10050 = @"C_type$member_descriptor$2__doc__$2__repr__" +py_cobjects(#10050) +py_cobjecttypes(#10050, #10009) +py_cobject_sources(#10050, 0) +py_cobjectnames(#10050, "__repr__") +py_cmembers_versioned(#10047, "__repr__", #10050, "2") +#10051 = @"C_type$member_descriptor$2__doc__$2__get__" +py_cobjects(#10051) +py_cobjecttypes(#10051, #10009) +py_cobject_sources(#10051, 0) +py_cobjectnames(#10051, "__get__") +py_cmembers_versioned(#10047, "__get__", #10051, "2") +py_cmembers_versioned(#10047, "__doc__", #10017, "2") +#10052 = @"C_type$member_descriptor$2__doc__$2__delete__" +py_cobjects(#10052) +py_cobjecttypes(#10052, #10009) +py_cobject_sources(#10052, 0) +py_cobjectnames(#10052, "__delete__") +py_cmembers_versioned(#10047, "__delete__", #10052, "2") +py_cobjectnames(#10047, "__doc__") +py_cmembers_versioned(#10045, "__doc__", #10047, "2") +#10053 = @"C_type$member_descriptor$2__get__" +py_cobjects(#10053) +py_cobjecttypes(#10053, #10005) +py_cobject_sources(#10053, 0) +py_cobjectnames(#10053, "__get__") +py_cmembers_versioned(#10045, "__get__", #10053, "2") +#10054 = @"C_type$member_descriptor$2__getattribute__" +py_cobjects(#10054) +py_cobjecttypes(#10054, #10005) +py_cobject_sources(#10054, 0) +py_cobjectnames(#10054, "__getattribute__") +py_cmembers_versioned(#10045, "__getattribute__", #10054, "2") +#10055 = @"C_type$member_descriptor$2__name__" +py_cobjects(#10055) +py_cobjecttypes(#10055, #10045) +py_cobject_sources(#10055, 0) +py_cobjectnames(#10055, "__name__") +py_cmembers_versioned(#10045, "__name__", #10055, "2") +#10056 = @"C_type$member_descriptor$2__objclass__" +py_cobjects(#10056) +py_cobjecttypes(#10056, #10045) +py_cobject_sources(#10056, 0) +py_cobjectnames(#10056, "__objclass__") +py_cmembers_versioned(#10045, "__objclass__", #10056, "2") +#10057 = @"C_type$member_descriptor$2__repr__" +py_cobjects(#10057) +py_cobjecttypes(#10057, #10005) +py_cobject_sources(#10057, 0) +py_cobjectnames(#10057, "__repr__") +py_cmembers_versioned(#10045, "__repr__", #10057, "2") +#10058 = @"C_type$member_descriptor$2__set__" +py_cobjects(#10058) +py_cobjecttypes(#10058, #10005) +py_cobject_sources(#10058, 0) +py_cobjectnames(#10058, "__set__") +py_cmembers_versioned(#10045, "__set__", #10058, "2") +py_cmembers_versioned(#10045, ".super.", #10021, "2") +py_cobjectnames(#10045, "member_descriptor") +py_cobjects(#10044) +py_cobjecttypes(#10044, #10045) +py_cobject_sources(#10044, 0) +py_cobjectnames(#10044, "__name__") +py_cmembers_versioned(#10034, "__name__", #10044, "2") +#10059 = @"C_type$method_descriptor$2__objclass__" +py_cobjects(#10059) +py_cobjecttypes(#10059, #10045) +py_cobject_sources(#10059, 0) +py_cobjectnames(#10059, "__objclass__") +py_cmembers_versioned(#10034, "__objclass__", #10059, "2") +#10060 = @"C_type$method_descriptor$2__repr__" +py_cobjects(#10060) +py_cobjecttypes(#10060, #10005) +py_cobject_sources(#10060, 0) +py_cobjectnames(#10060, "__repr__") +py_cmembers_versioned(#10034, "__repr__", #10060, "2") +py_cmembers_versioned(#10034, ".super.", #10021, "2") +py_cobjectnames(#10034, "method_descriptor") +py_cobjects(#10033) +py_cobjecttypes(#10033, #10034) +py_cobject_sources(#10033, 0) +py_cobjectnames(#10033, "__format__") +py_cmembers_versioned(#10028, "__format__", #10033, "2") +#10061 = @"C_type$bytes$2__ge__" +py_cobjects(#10061) +py_cobjecttypes(#10061, #10005) +py_cobject_sources(#10061, 0) +py_cobjectnames(#10061, "__ge__") +py_cmembers_versioned(#10028, "__ge__", #10061, "2") +#10062 = @"C_type$bytes$2__getattribute__" +py_cobjects(#10062) +py_cobjecttypes(#10062, #10005) +py_cobject_sources(#10062, 0) +py_cobjectnames(#10062, "__getattribute__") +py_cmembers_versioned(#10028, "__getattribute__", #10062, "2") +#10063 = @"C_type$bytes$2__getitem__" +py_cobjects(#10063) +py_cobjecttypes(#10063, #10005) +py_cobject_sources(#10063, 0) +py_cobjectnames(#10063, "__getitem__") +py_cmembers_versioned(#10028, "__getitem__", #10063, "2") +#10064 = @"C_type$bytes$2__getnewargs__" +py_cobjects(#10064) +py_cobjecttypes(#10064, #10034) +py_cobject_sources(#10064, 0) +py_cobjectnames(#10064, "__getnewargs__") +py_cmembers_versioned(#10028, "__getnewargs__", #10064, "2") +#10065 = @"C_type$bytes$2__getslice__" +py_cobjects(#10065) +py_cobjecttypes(#10065, #10005) +py_cobject_sources(#10065, 0) +py_cobjectnames(#10065, "__getslice__") +py_cmembers_versioned(#10028, "__getslice__", #10065, "2") +#10066 = @"C_type$bytes$2__gt__" +py_cobjects(#10066) +py_cobjecttypes(#10066, #10005) +py_cobject_sources(#10066, 0) +py_cobjectnames(#10066, "__gt__") +py_cmembers_versioned(#10028, "__gt__", #10066, "2") +#10067 = @"C_type$bytes$2__hash__" +py_cobjects(#10067) +py_cobjecttypes(#10067, #10005) +py_cobject_sources(#10067, 0) +py_cobjectnames(#10067, "__hash__") +py_cmembers_versioned(#10028, "__hash__", #10067, "2") +#10068 = @"C_type$bytes$2__le__" +py_cobjects(#10068) +py_cobjecttypes(#10068, #10005) +py_cobject_sources(#10068, 0) +py_cobjectnames(#10068, "__le__") +py_cmembers_versioned(#10028, "__le__", #10068, "2") +#10069 = @"C_type$bytes$2__len__" +py_cobjects(#10069) +py_cobjecttypes(#10069, #10005) +py_cobject_sources(#10069, 0) +py_cobjectnames(#10069, "__len__") +py_cmembers_versioned(#10028, "__len__", #10069, "2") +#10070 = @"C_type$bytes$2__lt__" +py_cobjects(#10070) +py_cobjecttypes(#10070, #10005) +py_cobject_sources(#10070, 0) +py_cobjectnames(#10070, "__lt__") +py_cmembers_versioned(#10028, "__lt__", #10070, "2") +#10071 = @"C_type$bytes$2__mod__" +py_cobjects(#10071) +py_cobjecttypes(#10071, #10005) +py_cobject_sources(#10071, 0) +py_cobjectnames(#10071, "__mod__") +py_cmembers_versioned(#10028, "__mod__", #10071, "2") +#10072 = @"C_type$bytes$2__mul__" +py_cobjects(#10072) +py_cobjecttypes(#10072, #10005) +py_cobject_sources(#10072, 0) +py_cobjectnames(#10072, "__mul__") +py_cmembers_versioned(#10028, "__mul__", #10072, "2") +#10073 = @"C_type$bytes$2__ne__" +py_cobjects(#10073) +py_cobjecttypes(#10073, #10005) +py_cobject_sources(#10073, 0) +py_cobjectnames(#10073, "__ne__") +py_cmembers_versioned(#10028, "__ne__", #10073, "2") +#10074 = @"C_type$bytes$2__new__" +#10075 = @"C_type$builtin_function_or_method" +py_cobjects(#10075) +py_cobjecttypes(#10075, #10001) +py_cobject_sources(#10075, 0) +#10076 = @"C_type$builtin_function_or_method$2__call__" +py_cobjects(#10076) +py_cobjecttypes(#10076, #10005) +py_cobject_sources(#10076, 0) +py_cobjectnames(#10076, "__call__") +py_cmembers_versioned(#10075, "__call__", #10076, "2") +#10077 = @"C_type$builtin_function_or_method$2__cmp__" +py_cobjects(#10077) +py_cobjecttypes(#10077, #10005) +py_cobject_sources(#10077, 0) +py_cobjectnames(#10077, "__cmp__") +py_cmembers_versioned(#10075, "__cmp__", #10077, "2") +#10078 = @"C_type$builtin_function_or_method$2__doc__" +py_cobjects(#10078) +py_cobjecttypes(#10078, #10003) +py_cobject_sources(#10078, 0) +#10079 = @"C_type$builtin_function_or_method$2__doc__$2__set__" +py_cobjects(#10079) +py_cobjecttypes(#10079, #10009) +py_cobject_sources(#10079, 0) +py_cobjectnames(#10079, "__set__") +py_cmembers_versioned(#10078, "__set__", #10079, "2") +#10080 = @"C_type$builtin_function_or_method$2__doc__$2__getattribute__" +py_cobjects(#10080) +py_cobjecttypes(#10080, #10009) +py_cobject_sources(#10080, 0) +py_cobjectnames(#10080, "__getattribute__") +py_cmembers_versioned(#10078, "__getattribute__", #10080, "2") +py_cmembers_versioned(#10078, "__objclass__", #10075, "2") +#10081 = @"C_type$builtin_function_or_method$2__doc__$2__repr__" +py_cobjects(#10081) +py_cobjecttypes(#10081, #10009) +py_cobject_sources(#10081, 0) +py_cobjectnames(#10081, "__repr__") +py_cmembers_versioned(#10078, "__repr__", #10081, "2") +#10082 = @"C_type$builtin_function_or_method$2__doc__$2__get__" +py_cobjects(#10082) +py_cobjecttypes(#10082, #10009) +py_cobject_sources(#10082, 0) +py_cobjectnames(#10082, "__get__") +py_cmembers_versioned(#10078, "__get__", #10082, "2") +py_cmembers_versioned(#10078, "__doc__", #10017, "2") +#10083 = @"C_type$builtin_function_or_method$2__doc__$2__delete__" +py_cobjects(#10083) +py_cobjecttypes(#10083, #10009) +py_cobject_sources(#10083, 0) +py_cobjectnames(#10083, "__delete__") +py_cmembers_versioned(#10078, "__delete__", #10083, "2") +py_cobjectnames(#10078, "__doc__") +py_cmembers_versioned(#10075, "__doc__", #10078, "2") +#10084 = @"C_type$builtin_function_or_method$2__eq__" +py_cobjects(#10084) +py_cobjecttypes(#10084, #10005) +py_cobject_sources(#10084, 0) +py_cobjectnames(#10084, "__eq__") +py_cmembers_versioned(#10075, "__eq__", #10084, "2") +#10085 = @"C_type$builtin_function_or_method$2__ge__" +py_cobjects(#10085) +py_cobjecttypes(#10085, #10005) +py_cobject_sources(#10085, 0) +py_cobjectnames(#10085, "__ge__") +py_cmembers_versioned(#10075, "__ge__", #10085, "2") +#10086 = @"C_type$builtin_function_or_method$2__getattribute__" +py_cobjects(#10086) +py_cobjecttypes(#10086, #10005) +py_cobject_sources(#10086, 0) +py_cobjectnames(#10086, "__getattribute__") +py_cmembers_versioned(#10075, "__getattribute__", #10086, "2") +#10087 = @"C_type$builtin_function_or_method$2__gt__" +py_cobjects(#10087) +py_cobjecttypes(#10087, #10005) +py_cobject_sources(#10087, 0) +py_cobjectnames(#10087, "__gt__") +py_cmembers_versioned(#10075, "__gt__", #10087, "2") +#10088 = @"C_type$builtin_function_or_method$2__hash__" +py_cobjects(#10088) +py_cobjecttypes(#10088, #10005) +py_cobject_sources(#10088, 0) +py_cobjectnames(#10088, "__hash__") +py_cmembers_versioned(#10075, "__hash__", #10088, "2") +#10089 = @"C_type$builtin_function_or_method$2__le__" +py_cobjects(#10089) +py_cobjecttypes(#10089, #10005) +py_cobject_sources(#10089, 0) +py_cobjectnames(#10089, "__le__") +py_cmembers_versioned(#10075, "__le__", #10089, "2") +#10090 = @"C_type$builtin_function_or_method$2__lt__" +py_cobjects(#10090) +py_cobjecttypes(#10090, #10005) +py_cobject_sources(#10090, 0) +py_cobjectnames(#10090, "__lt__") +py_cmembers_versioned(#10075, "__lt__", #10090, "2") +#10091 = @"C_type$builtin_function_or_method$2__module__" +py_cobjects(#10091) +py_cobjecttypes(#10091, #10045) +py_cobject_sources(#10091, 0) +py_cobjectnames(#10091, "__module__") +py_cmembers_versioned(#10075, "__module__", #10091, "2") +#10092 = @"C_type$builtin_function_or_method$2__name__" +py_cobjects(#10092) +py_cobjecttypes(#10092, #10003) +py_cobject_sources(#10092, 0) +#10093 = @"C_type$builtin_function_or_method$2__name__$2__set__" +py_cobjects(#10093) +py_cobjecttypes(#10093, #10009) +py_cobject_sources(#10093, 0) +py_cobjectnames(#10093, "__set__") +py_cmembers_versioned(#10092, "__set__", #10093, "2") +#10094 = @"C_type$builtin_function_or_method$2__name__$2__getattribute__" +py_cobjects(#10094) +py_cobjecttypes(#10094, #10009) +py_cobject_sources(#10094, 0) +py_cobjectnames(#10094, "__getattribute__") +py_cmembers_versioned(#10092, "__getattribute__", #10094, "2") +py_cmembers_versioned(#10092, "__objclass__", #10075, "2") +#10095 = @"C_type$builtin_function_or_method$2__name__$2__repr__" +py_cobjects(#10095) +py_cobjecttypes(#10095, #10009) +py_cobject_sources(#10095, 0) +py_cobjectnames(#10095, "__repr__") +py_cmembers_versioned(#10092, "__repr__", #10095, "2") +#10096 = @"C_type$builtin_function_or_method$2__name__$2__get__" +py_cobjects(#10096) +py_cobjecttypes(#10096, #10009) +py_cobject_sources(#10096, 0) +py_cobjectnames(#10096, "__get__") +py_cmembers_versioned(#10092, "__get__", #10096, "2") +py_cmembers_versioned(#10092, "__doc__", #10017, "2") +#10097 = @"C_type$builtin_function_or_method$2__name__$2__delete__" +py_cobjects(#10097) +py_cobjecttypes(#10097, #10009) +py_cobject_sources(#10097, 0) +py_cobjectnames(#10097, "__delete__") +py_cmembers_versioned(#10092, "__delete__", #10097, "2") +py_cobjectnames(#10092, "__name__") +py_cmembers_versioned(#10075, "__name__", #10092, "2") +#10098 = @"C_type$builtin_function_or_method$2__ne__" +py_cobjects(#10098) +py_cobjecttypes(#10098, #10005) +py_cobject_sources(#10098, 0) +py_cobjectnames(#10098, "__ne__") +py_cmembers_versioned(#10075, "__ne__", #10098, "2") +#10099 = @"C_type$builtin_function_or_method$2__repr__" +py_cobjects(#10099) +py_cobjecttypes(#10099, #10005) +py_cobject_sources(#10099, 0) +py_cobjectnames(#10099, "__repr__") +py_cmembers_versioned(#10075, "__repr__", #10099, "2") +#10100 = @"C_type$builtin_function_or_method$2__self__" +py_cobjects(#10100) +py_cobjecttypes(#10100, #10003) +py_cobject_sources(#10100, 0) +#10101 = @"C_type$builtin_function_or_method$2__self__$2__set__" +py_cobjects(#10101) +py_cobjecttypes(#10101, #10009) +py_cobject_sources(#10101, 0) +py_cobjectnames(#10101, "__set__") +py_cmembers_versioned(#10100, "__set__", #10101, "2") +#10102 = @"C_type$builtin_function_or_method$2__self__$2__getattribute__" +py_cobjects(#10102) +py_cobjecttypes(#10102, #10009) +py_cobject_sources(#10102, 0) +py_cobjectnames(#10102, "__getattribute__") +py_cmembers_versioned(#10100, "__getattribute__", #10102, "2") +py_cmembers_versioned(#10100, "__objclass__", #10075, "2") +#10103 = @"C_type$builtin_function_or_method$2__self__$2__repr__" +py_cobjects(#10103) +py_cobjecttypes(#10103, #10009) +py_cobject_sources(#10103, 0) +py_cobjectnames(#10103, "__repr__") +py_cmembers_versioned(#10100, "__repr__", #10103, "2") +#10104 = @"C_type$builtin_function_or_method$2__self__$2__get__" +py_cobjects(#10104) +py_cobjecttypes(#10104, #10009) +py_cobject_sources(#10104, 0) +py_cobjectnames(#10104, "__get__") +py_cmembers_versioned(#10100, "__get__", #10104, "2") +py_cmembers_versioned(#10100, "__doc__", #10017, "2") +#10105 = @"C_type$builtin_function_or_method$2__self__$2__delete__" +py_cobjects(#10105) +py_cobjecttypes(#10105, #10009) +py_cobject_sources(#10105, 0) +py_cobjectnames(#10105, "__delete__") +py_cmembers_versioned(#10100, "__delete__", #10105, "2") +py_cobjectnames(#10100, "__self__") +py_cmembers_versioned(#10075, "__self__", #10100, "2") +py_cmembers_versioned(#10075, ".super.", #10021, "2") +py_cobjectnames(#10075, "builtin_function_or_method") +py_cobjects(#10074) +py_cobjecttypes(#10074, #10075) +py_cobject_sources(#10074, 0) +py_cobjectnames(#10074, "__new__") +py_cmembers_versioned(#10028, "__new__", #10074, "2") +#10106 = @"C_type$bytes$2__repr__" +py_cobjects(#10106) +py_cobjecttypes(#10106, #10005) +py_cobject_sources(#10106, 0) +py_cobjectnames(#10106, "__repr__") +py_cmembers_versioned(#10028, "__repr__", #10106, "2") +#10107 = @"C_type$bytes$2__rmod__" +py_cobjects(#10107) +py_cobjecttypes(#10107, #10005) +py_cobject_sources(#10107, 0) +py_cobjectnames(#10107, "__rmod__") +py_cmembers_versioned(#10028, "__rmod__", #10107, "2") +#10108 = @"C_type$bytes$2__rmul__" +py_cobjects(#10108) +py_cobjecttypes(#10108, #10005) +py_cobject_sources(#10108, 0) +py_cobjectnames(#10108, "__rmul__") +py_cmembers_versioned(#10028, "__rmul__", #10108, "2") +#10109 = @"C_type$bytes$2__sizeof__" +py_cobjects(#10109) +py_cobjecttypes(#10109, #10034) +py_cobject_sources(#10109, 0) +py_cobjectnames(#10109, "__sizeof__") +py_cmembers_versioned(#10028, "__sizeof__", #10109, "2") +#10110 = @"C_type$bytes$2__str__" +py_cobjects(#10110) +py_cobjecttypes(#10110, #10005) +py_cobject_sources(#10110, 0) +py_cobjectnames(#10110, "__str__") +py_cmembers_versioned(#10028, "__str__", #10110, "2") +#10111 = @"C_type$bytes$2_formatter_field_name_split" +py_cobjects(#10111) +py_cobjecttypes(#10111, #10034) +py_cobject_sources(#10111, 0) +py_cobjectnames(#10111, "_formatter_field_name_split") +py_cmembers_versioned(#10028, "_formatter_field_name_split", #10111, "2") +#10112 = @"C_type$bytes$2_formatter_parser" +py_cobjects(#10112) +py_cobjecttypes(#10112, #10034) +py_cobject_sources(#10112, 0) +py_cobjectnames(#10112, "_formatter_parser") +py_cmembers_versioned(#10028, "_formatter_parser", #10112, "2") +#10113 = @"C_type$bytes$2capitalize" +py_cobjects(#10113) +py_cobjecttypes(#10113, #10034) +py_cobject_sources(#10113, 0) +py_cobjectnames(#10113, "capitalize") +py_cmembers_versioned(#10028, "capitalize", #10113, "2") +#10114 = @"C_type$bytes$2center" +py_cobjects(#10114) +py_cobjecttypes(#10114, #10034) +py_cobject_sources(#10114, 0) +py_cobjectnames(#10114, "center") +py_cmembers_versioned(#10028, "center", #10114, "2") +#10115 = @"C_type$bytes$2count" +py_cobjects(#10115) +py_cobjecttypes(#10115, #10034) +py_cobject_sources(#10115, 0) +py_cobjectnames(#10115, "count") +py_cmembers_versioned(#10028, "count", #10115, "2") +#10116 = @"C_type$bytes$2decode" +py_cobjects(#10116) +py_cobjecttypes(#10116, #10034) +py_cobject_sources(#10116, 0) +py_cobjectnames(#10116, "decode") +py_cmembers_versioned(#10028, "decode", #10116, "2") +#10117 = @"C_type$bytes$2encode" +py_cobjects(#10117) +py_cobjecttypes(#10117, #10034) +py_cobject_sources(#10117, 0) +py_cobjectnames(#10117, "encode") +py_cmembers_versioned(#10028, "encode", #10117, "2") +#10118 = @"C_type$bytes$2endswith" +py_cobjects(#10118) +py_cobjecttypes(#10118, #10034) +py_cobject_sources(#10118, 0) +py_cobjectnames(#10118, "endswith") +py_cmembers_versioned(#10028, "endswith", #10118, "2") +#10119 = @"C_type$bytes$2expandtabs" +py_cobjects(#10119) +py_cobjecttypes(#10119, #10034) +py_cobject_sources(#10119, 0) +py_cobjectnames(#10119, "expandtabs") +py_cmembers_versioned(#10028, "expandtabs", #10119, "2") +#10120 = @"C_type$bytes$2find" +py_cobjects(#10120) +py_cobjecttypes(#10120, #10034) +py_cobject_sources(#10120, 0) +py_cobjectnames(#10120, "find") +py_cmembers_versioned(#10028, "find", #10120, "2") +#10121 = @"C_type$bytes$2format" +py_cobjects(#10121) +py_cobjecttypes(#10121, #10034) +py_cobject_sources(#10121, 0) +py_cobjectnames(#10121, "format") +py_cmembers_versioned(#10028, "format", #10121, "2") +#10122 = @"C_type$bytes$2index" +py_cobjects(#10122) +py_cobjecttypes(#10122, #10034) +py_cobject_sources(#10122, 0) +py_cobjectnames(#10122, "index") +py_cmembers_versioned(#10028, "index", #10122, "2") +#10123 = @"C_type$bytes$2isalnum" +py_cobjects(#10123) +py_cobjecttypes(#10123, #10034) +py_cobject_sources(#10123, 0) +py_cobjectnames(#10123, "isalnum") +py_cmembers_versioned(#10028, "isalnum", #10123, "2") +#10124 = @"C_type$bytes$2isalpha" +py_cobjects(#10124) +py_cobjecttypes(#10124, #10034) +py_cobject_sources(#10124, 0) +py_cobjectnames(#10124, "isalpha") +py_cmembers_versioned(#10028, "isalpha", #10124, "2") +#10125 = @"C_type$bytes$2isdigit" +py_cobjects(#10125) +py_cobjecttypes(#10125, #10034) +py_cobject_sources(#10125, 0) +py_cobjectnames(#10125, "isdigit") +py_cmembers_versioned(#10028, "isdigit", #10125, "2") +#10126 = @"C_type$bytes$2islower" +py_cobjects(#10126) +py_cobjecttypes(#10126, #10034) +py_cobject_sources(#10126, 0) +py_cobjectnames(#10126, "islower") +py_cmembers_versioned(#10028, "islower", #10126, "2") +#10127 = @"C_type$bytes$2isspace" +py_cobjects(#10127) +py_cobjecttypes(#10127, #10034) +py_cobject_sources(#10127, 0) +py_cobjectnames(#10127, "isspace") +py_cmembers_versioned(#10028, "isspace", #10127, "2") +#10128 = @"C_type$bytes$2istitle" +py_cobjects(#10128) +py_cobjecttypes(#10128, #10034) +py_cobject_sources(#10128, 0) +py_cobjectnames(#10128, "istitle") +py_cmembers_versioned(#10028, "istitle", #10128, "2") +#10129 = @"C_type$bytes$2isupper" +py_cobjects(#10129) +py_cobjecttypes(#10129, #10034) +py_cobject_sources(#10129, 0) +py_cobjectnames(#10129, "isupper") +py_cmembers_versioned(#10028, "isupper", #10129, "2") +#10130 = @"C_type$bytes$2join" +py_cobjects(#10130) +py_cobjecttypes(#10130, #10034) +py_cobject_sources(#10130, 0) +py_cobjectnames(#10130, "join") +py_cmembers_versioned(#10028, "join", #10130, "2") +#10131 = @"C_type$bytes$2ljust" +py_cobjects(#10131) +py_cobjecttypes(#10131, #10034) +py_cobject_sources(#10131, 0) +py_cobjectnames(#10131, "ljust") +py_cmembers_versioned(#10028, "ljust", #10131, "2") +#10132 = @"C_type$bytes$2lower" +py_cobjects(#10132) +py_cobjecttypes(#10132, #10034) +py_cobject_sources(#10132, 0) +py_cobjectnames(#10132, "lower") +py_cmembers_versioned(#10028, "lower", #10132, "2") +#10133 = @"C_type$bytes$2lstrip" +py_cobjects(#10133) +py_cobjecttypes(#10133, #10034) +py_cobject_sources(#10133, 0) +py_cobjectnames(#10133, "lstrip") +py_cmembers_versioned(#10028, "lstrip", #10133, "2") +#10134 = @"C_type$bytes$2partition" +py_cobjects(#10134) +py_cobjecttypes(#10134, #10034) +py_cobject_sources(#10134, 0) +py_cobjectnames(#10134, "partition") +py_cmembers_versioned(#10028, "partition", #10134, "2") +#10135 = @"C_type$bytes$2replace" +py_cobjects(#10135) +py_cobjecttypes(#10135, #10034) +py_cobject_sources(#10135, 0) +py_cobjectnames(#10135, "replace") +py_cmembers_versioned(#10028, "replace", #10135, "2") +#10136 = @"C_type$bytes$2rfind" +py_cobjects(#10136) +py_cobjecttypes(#10136, #10034) +py_cobject_sources(#10136, 0) +py_cobjectnames(#10136, "rfind") +py_cmembers_versioned(#10028, "rfind", #10136, "2") +#10137 = @"C_type$bytes$2rindex" +py_cobjects(#10137) +py_cobjecttypes(#10137, #10034) +py_cobject_sources(#10137, 0) +py_cobjectnames(#10137, "rindex") +py_cmembers_versioned(#10028, "rindex", #10137, "2") +#10138 = @"C_type$bytes$2rjust" +py_cobjects(#10138) +py_cobjecttypes(#10138, #10034) +py_cobject_sources(#10138, 0) +py_cobjectnames(#10138, "rjust") +py_cmembers_versioned(#10028, "rjust", #10138, "2") +#10139 = @"C_type$bytes$2rpartition" +py_cobjects(#10139) +py_cobjecttypes(#10139, #10034) +py_cobject_sources(#10139, 0) +py_cobjectnames(#10139, "rpartition") +py_cmembers_versioned(#10028, "rpartition", #10139, "2") +#10140 = @"C_type$bytes$2rsplit" +py_cobjects(#10140) +py_cobjecttypes(#10140, #10034) +py_cobject_sources(#10140, 0) +py_cobjectnames(#10140, "rsplit") +py_cmembers_versioned(#10028, "rsplit", #10140, "2") +#10141 = @"C_type$bytes$2rstrip" +py_cobjects(#10141) +py_cobjecttypes(#10141, #10034) +py_cobject_sources(#10141, 0) +py_cobjectnames(#10141, "rstrip") +py_cmembers_versioned(#10028, "rstrip", #10141, "2") +#10142 = @"C_type$bytes$2split" +py_cobjects(#10142) +py_cobjecttypes(#10142, #10034) +py_cobject_sources(#10142, 0) +py_cobjectnames(#10142, "split") +py_cmembers_versioned(#10028, "split", #10142, "2") +#10143 = @"C_type$bytes$2splitlines" +py_cobjects(#10143) +py_cobjecttypes(#10143, #10034) +py_cobject_sources(#10143, 0) +py_cobjectnames(#10143, "splitlines") +py_cmembers_versioned(#10028, "splitlines", #10143, "2") +#10144 = @"C_type$bytes$2startswith" +py_cobjects(#10144) +py_cobjecttypes(#10144, #10034) +py_cobject_sources(#10144, 0) +py_cobjectnames(#10144, "startswith") +py_cmembers_versioned(#10028, "startswith", #10144, "2") +#10145 = @"C_type$bytes$2strip" +py_cobjects(#10145) +py_cobjecttypes(#10145, #10034) +py_cobject_sources(#10145, 0) +py_cobjectnames(#10145, "strip") +py_cmembers_versioned(#10028, "strip", #10145, "2") +#10146 = @"C_type$bytes$2swapcase" +py_cobjects(#10146) +py_cobjecttypes(#10146, #10034) +py_cobject_sources(#10146, 0) +py_cobjectnames(#10146, "swapcase") +py_cmembers_versioned(#10028, "swapcase", #10146, "2") +#10147 = @"C_type$bytes$2title" +py_cobjects(#10147) +py_cobjecttypes(#10147, #10034) +py_cobject_sources(#10147, 0) +py_cobjectnames(#10147, "title") +py_cmembers_versioned(#10028, "title", #10147, "2") +#10148 = @"C_type$bytes$2translate" +py_cobjects(#10148) +py_cobjecttypes(#10148, #10034) +py_cobject_sources(#10148, 0) +py_cobjectnames(#10148, "translate") +py_cmembers_versioned(#10028, "translate", #10148, "2") +#10149 = @"C_type$bytes$2upper" +py_cobjects(#10149) +py_cobjecttypes(#10149, #10034) +py_cobject_sources(#10149, 0) +py_cobjectnames(#10149, "upper") +py_cmembers_versioned(#10028, "upper", #10149, "2") +#10150 = @"C_type$bytes$2zfill" +py_cobjects(#10150) +py_cobjecttypes(#10150, #10034) +py_cobject_sources(#10150, 0) +py_cobjectnames(#10150, "zfill") +py_cmembers_versioned(#10028, "zfill", #10150, "2") +#10151 = @"C_type$basestring" +py_cobjects(#10151) +py_cobjecttypes(#10151, #10001) +py_cobject_sources(#10151, 0) +#10152 = @"C_bytes$e9d1758b62b29cb40786aaa1678574a2917ac3fb" +py_cobjects(#10152) +py_cobjecttypes(#10152, #10028) +py_cobject_sources(#10152, 0) +py_cobjectnames(#10152, "b'Type basestring cannot be instantiated; it is the base for str and unicode.'") +py_cmembers_versioned(#10151, "__doc__", #10152, "2") +#10153 = @"C_type$basestring$2__new__" +py_cobjects(#10153) +py_cobjecttypes(#10153, #10075) +py_cobject_sources(#10153, 0) +py_cobjectnames(#10153, "__new__") +py_cmembers_versioned(#10151, "__new__", #10153, "2") +py_cmembers_versioned(#10151, ".super.", #10021, "2") +py_cobjectnames(#10151, "basestring") +py_cmembers_versioned(#10028, ".super.", #10151, "2") +py_cobjectnames(#10028, "bytes") +py_cobjects(#10027) +py_cobjecttypes(#10027, #10028) +py_cobject_sources(#10027, 0) +py_cobjectnames(#10027, "b'the object's class'") +py_cmembers_versioned(#10022, "__doc__", #10027, "2") +#10154 = @"C_type$object$2__class__$2__delete__" +py_cobjects(#10154) +py_cobjecttypes(#10154, #10009) +py_cobject_sources(#10154, 0) +py_cobjectnames(#10154, "__delete__") +py_cmembers_versioned(#10022, "__delete__", #10154, "2") +py_cobjectnames(#10022, "__class__") +py_cmembers_versioned(#10021, "__class__", #10022, "2") +#10155 = @"C_type$object$2__delattr__" +py_cobjects(#10155) +py_cobjecttypes(#10155, #10005) +py_cobject_sources(#10155, 0) +py_cobjectnames(#10155, "__delattr__") +py_cmembers_versioned(#10021, "__delattr__", #10155, "2") +#10156 = @"C_bytes$ace39eec53ca8b6a7c9df63c8901df2bf11d4e31" +py_cobjects(#10156) +py_cobjecttypes(#10156, #10028) +py_cobject_sources(#10156, 0) +py_cobjectnames(#10156, "b'The most base type'") +py_cmembers_versioned(#10021, "__doc__", #10156, "2") +#10157 = @"C_type$object$2__format__" +py_cobjects(#10157) +py_cobjecttypes(#10157, #10034) +py_cobject_sources(#10157, 0) +py_cobjectnames(#10157, "__format__") +py_cmembers_versioned(#10021, "__format__", #10157, "2") +#10158 = @"C_type$object$2__getattribute__" +py_cobjects(#10158) +py_cobjecttypes(#10158, #10005) +py_cobject_sources(#10158, 0) +py_cobjectnames(#10158, "__getattribute__") +py_cmembers_versioned(#10021, "__getattribute__", #10158, "2") +#10159 = @"C_type$object$2__hash__" +py_cobjects(#10159) +py_cobjecttypes(#10159, #10005) +py_cobject_sources(#10159, 0) +py_cobjectnames(#10159, "__hash__") +py_cmembers_versioned(#10021, "__hash__", #10159, "2") +#10160 = @"C_type$object$2__init__" +py_cobjects(#10160) +py_cobjecttypes(#10160, #10005) +py_cobject_sources(#10160, 0) +py_cobjectnames(#10160, "__init__") +py_cmembers_versioned(#10021, "__init__", #10160, "2") +#10161 = @"C_type$object$2__new__" +py_cobjects(#10161) +py_cobjecttypes(#10161, #10075) +py_cobject_sources(#10161, 0) +py_cobjectnames(#10161, "__new__") +py_cmembers_versioned(#10021, "__new__", #10161, "2") +#10162 = @"C_type$object$2__reduce__" +py_cobjects(#10162) +py_cobjecttypes(#10162, #10034) +py_cobject_sources(#10162, 0) +py_cobjectnames(#10162, "__reduce__") +py_cmembers_versioned(#10021, "__reduce__", #10162, "2") +#10163 = @"C_type$object$2__reduce_ex__" +py_cobjects(#10163) +py_cobjecttypes(#10163, #10034) +py_cobject_sources(#10163, 0) +py_cobjectnames(#10163, "__reduce_ex__") +py_cmembers_versioned(#10021, "__reduce_ex__", #10163, "2") +#10164 = @"C_type$object$2__repr__" +py_cobjects(#10164) +py_cobjecttypes(#10164, #10005) +py_cobject_sources(#10164, 0) +py_cobjectnames(#10164, "__repr__") +py_cmembers_versioned(#10021, "__repr__", #10164, "2") +#10165 = @"C_type$object$2__setattr__" +py_cobjects(#10165) +py_cobjecttypes(#10165, #10005) +py_cobject_sources(#10165, 0) +py_cobjectnames(#10165, "__setattr__") +py_cmembers_versioned(#10021, "__setattr__", #10165, "2") +#10166 = @"C_type$object$2__sizeof__" +py_cobjects(#10166) +py_cobjecttypes(#10166, #10034) +py_cobject_sources(#10166, 0) +py_cobjectnames(#10166, "__sizeof__") +py_cmembers_versioned(#10021, "__sizeof__", #10166, "2") +#10167 = @"C_type$object$2__str__" +py_cobjects(#10167) +py_cobjecttypes(#10167, #10005) +py_cobject_sources(#10167, 0) +py_cobjectnames(#10167, "__str__") +py_cmembers_versioned(#10021, "__str__", #10167, "2") +#10168 = @"C_type$object$2__subclasshook__" +#10169 = @"C_type$classmethod_descriptor" +py_cobjects(#10169) +py_cobjecttypes(#10169, #10001) +py_cobject_sources(#10169, 0) +#10170 = @"C_type$classmethod_descriptor$2__call__" +py_cobjects(#10170) +py_cobjecttypes(#10170, #10005) +py_cobject_sources(#10170, 0) +py_cobjectnames(#10170, "__call__") +py_cmembers_versioned(#10169, "__call__", #10170, "2") +#10171 = @"C_type$classmethod_descriptor$2__doc__" +py_cobjects(#10171) +py_cobjecttypes(#10171, #10003) +py_cobject_sources(#10171, 0) +#10172 = @"C_type$classmethod_descriptor$2__doc__$2__set__" +py_cobjects(#10172) +py_cobjecttypes(#10172, #10009) +py_cobject_sources(#10172, 0) +py_cobjectnames(#10172, "__set__") +py_cmembers_versioned(#10171, "__set__", #10172, "2") +#10173 = @"C_type$classmethod_descriptor$2__doc__$2__getattribute__" +py_cobjects(#10173) +py_cobjecttypes(#10173, #10009) +py_cobject_sources(#10173, 0) +py_cobjectnames(#10173, "__getattribute__") +py_cmembers_versioned(#10171, "__getattribute__", #10173, "2") +py_cmembers_versioned(#10171, "__objclass__", #10169, "2") +#10174 = @"C_type$classmethod_descriptor$2__doc__$2__repr__" +py_cobjects(#10174) +py_cobjecttypes(#10174, #10009) +py_cobject_sources(#10174, 0) +py_cobjectnames(#10174, "__repr__") +py_cmembers_versioned(#10171, "__repr__", #10174, "2") +#10175 = @"C_type$classmethod_descriptor$2__doc__$2__get__" +py_cobjects(#10175) +py_cobjecttypes(#10175, #10009) +py_cobject_sources(#10175, 0) +py_cobjectnames(#10175, "__get__") +py_cmembers_versioned(#10171, "__get__", #10175, "2") +py_cmembers_versioned(#10171, "__doc__", #10017, "2") +#10176 = @"C_type$classmethod_descriptor$2__doc__$2__delete__" +py_cobjects(#10176) +py_cobjecttypes(#10176, #10009) +py_cobject_sources(#10176, 0) +py_cobjectnames(#10176, "__delete__") +py_cmembers_versioned(#10171, "__delete__", #10176, "2") +py_cobjectnames(#10171, "__doc__") +py_cmembers_versioned(#10169, "__doc__", #10171, "2") +#10177 = @"C_type$classmethod_descriptor$2__get__" +py_cobjects(#10177) +py_cobjecttypes(#10177, #10005) +py_cobject_sources(#10177, 0) +py_cobjectnames(#10177, "__get__") +py_cmembers_versioned(#10169, "__get__", #10177, "2") +#10178 = @"C_type$classmethod_descriptor$2__getattribute__" +py_cobjects(#10178) +py_cobjecttypes(#10178, #10005) +py_cobject_sources(#10178, 0) +py_cobjectnames(#10178, "__getattribute__") +py_cmembers_versioned(#10169, "__getattribute__", #10178, "2") +#10179 = @"C_type$classmethod_descriptor$2__name__" +py_cobjects(#10179) +py_cobjecttypes(#10179, #10045) +py_cobject_sources(#10179, 0) +py_cobjectnames(#10179, "__name__") +py_cmembers_versioned(#10169, "__name__", #10179, "2") +#10180 = @"C_type$classmethod_descriptor$2__objclass__" +py_cobjects(#10180) +py_cobjecttypes(#10180, #10045) +py_cobject_sources(#10180, 0) +py_cobjectnames(#10180, "__objclass__") +py_cmembers_versioned(#10169, "__objclass__", #10180, "2") +#10181 = @"C_type$classmethod_descriptor$2__repr__" +py_cobjects(#10181) +py_cobjecttypes(#10181, #10005) +py_cobject_sources(#10181, 0) +py_cobjectnames(#10181, "__repr__") +py_cmembers_versioned(#10169, "__repr__", #10181, "2") +py_cmembers_versioned(#10169, ".super.", #10021, "2") +py_cobjectnames(#10169, "classmethod_descriptor") +py_cobjects(#10168) +py_cobjecttypes(#10168, #10169) +py_cobject_sources(#10168, 0) +py_cobjectnames(#10168, "__subclasshook__") +py_cmembers_versioned(#10021, "__subclasshook__", #10168, "2") +py_cobjectnames(#10021, "object") +py_cmembers_versioned(#10018, ".super.", #10021, "2") +py_cobjectnames(#10018, "NoneType") +py_cobjects(#10017) +py_cobjecttypes(#10017, #10018) +py_cobject_sources(#10017, 0) +py_cobjectnames(#10017, "None") +py_cmembers_versioned(#10012, "__doc__", #10017, "2") +#10182 = @"C_type$method-wrapper$2__doc__$2__delete__" +py_cobjects(#10182) +py_cobjecttypes(#10182, #10009) +py_cobject_sources(#10182, 0) +py_cobjectnames(#10182, "__delete__") +py_cmembers_versioned(#10012, "__delete__", #10182, "2") +py_cobjectnames(#10012, "__doc__") +py_cmembers_versioned(#10009, "__doc__", #10012, "2") +#10183 = @"C_type$method-wrapper$2__getattribute__" +py_cobjects(#10183) +py_cobjecttypes(#10183, #10005) +py_cobject_sources(#10183, 0) +py_cobjectnames(#10183, "__getattribute__") +py_cmembers_versioned(#10009, "__getattribute__", #10183, "2") +#10184 = @"C_type$method-wrapper$2__hash__" +py_cobjects(#10184) +py_cobjecttypes(#10184, #10005) +py_cobject_sources(#10184, 0) +py_cobjectnames(#10184, "__hash__") +py_cmembers_versioned(#10009, "__hash__", #10184, "2") +#10185 = @"C_type$method-wrapper$2__name__" +py_cobjects(#10185) +py_cobjecttypes(#10185, #10003) +py_cobject_sources(#10185, 0) +#10186 = @"C_type$method-wrapper$2__name__$2__set__" +py_cobjects(#10186) +py_cobjecttypes(#10186, #10009) +py_cobject_sources(#10186, 0) +py_cobjectnames(#10186, "__set__") +py_cmembers_versioned(#10185, "__set__", #10186, "2") +#10187 = @"C_type$method-wrapper$2__name__$2__getattribute__" +py_cobjects(#10187) +py_cobjecttypes(#10187, #10009) +py_cobject_sources(#10187, 0) +py_cobjectnames(#10187, "__getattribute__") +py_cmembers_versioned(#10185, "__getattribute__", #10187, "2") +py_cmembers_versioned(#10185, "__objclass__", #10009, "2") +#10188 = @"C_type$method-wrapper$2__name__$2__repr__" +py_cobjects(#10188) +py_cobjecttypes(#10188, #10009) +py_cobject_sources(#10188, 0) +py_cobjectnames(#10188, "__repr__") +py_cmembers_versioned(#10185, "__repr__", #10188, "2") +#10189 = @"C_type$method-wrapper$2__name__$2__get__" +py_cobjects(#10189) +py_cobjecttypes(#10189, #10009) +py_cobject_sources(#10189, 0) +py_cobjectnames(#10189, "__get__") +py_cmembers_versioned(#10185, "__get__", #10189, "2") +py_cmembers_versioned(#10185, "__doc__", #10017, "2") +#10190 = @"C_type$method-wrapper$2__name__$2__delete__" +py_cobjects(#10190) +py_cobjecttypes(#10190, #10009) +py_cobject_sources(#10190, 0) +py_cobjectnames(#10190, "__delete__") +py_cmembers_versioned(#10185, "__delete__", #10190, "2") +py_cobjectnames(#10185, "__name__") +py_cmembers_versioned(#10009, "__name__", #10185, "2") +#10191 = @"C_type$method-wrapper$2__objclass__" +py_cobjects(#10191) +py_cobjecttypes(#10191, #10003) +py_cobject_sources(#10191, 0) +#10192 = @"C_type$method-wrapper$2__objclass__$2__set__" +py_cobjects(#10192) +py_cobjecttypes(#10192, #10009) +py_cobject_sources(#10192, 0) +py_cobjectnames(#10192, "__set__") +py_cmembers_versioned(#10191, "__set__", #10192, "2") +#10193 = @"C_type$method-wrapper$2__objclass__$2__getattribute__" +py_cobjects(#10193) +py_cobjecttypes(#10193, #10009) +py_cobject_sources(#10193, 0) +py_cobjectnames(#10193, "__getattribute__") +py_cmembers_versioned(#10191, "__getattribute__", #10193, "2") +py_cmembers_versioned(#10191, "__objclass__", #10009, "2") +#10194 = @"C_type$method-wrapper$2__objclass__$2__repr__" +py_cobjects(#10194) +py_cobjecttypes(#10194, #10009) +py_cobject_sources(#10194, 0) +py_cobjectnames(#10194, "__repr__") +py_cmembers_versioned(#10191, "__repr__", #10194, "2") +#10195 = @"C_type$method-wrapper$2__objclass__$2__get__" +py_cobjects(#10195) +py_cobjecttypes(#10195, #10009) +py_cobject_sources(#10195, 0) +py_cobjectnames(#10195, "__get__") +py_cmembers_versioned(#10191, "__get__", #10195, "2") +py_cmembers_versioned(#10191, "__doc__", #10017, "2") +#10196 = @"C_type$method-wrapper$2__objclass__$2__delete__" +py_cobjects(#10196) +py_cobjecttypes(#10196, #10009) +py_cobject_sources(#10196, 0) +py_cobjectnames(#10196, "__delete__") +py_cmembers_versioned(#10191, "__delete__", #10196, "2") +py_cobjectnames(#10191, "__objclass__") +py_cmembers_versioned(#10009, "__objclass__", #10191, "2") +#10197 = @"C_type$method-wrapper$2__repr__" +py_cobjects(#10197) +py_cobjecttypes(#10197, #10005) +py_cobject_sources(#10197, 0) +py_cobjectnames(#10197, "__repr__") +py_cmembers_versioned(#10009, "__repr__", #10197, "2") +#10198 = @"C_type$method-wrapper$2__self__" +py_cobjects(#10198) +py_cobjecttypes(#10198, #10045) +py_cobject_sources(#10198, 0) +py_cobjectnames(#10198, "__self__") +py_cmembers_versioned(#10009, "__self__", #10198, "2") +py_cmembers_versioned(#10009, ".super.", #10021, "2") +py_cobjectnames(#10009, "method-wrapper") +py_cobjects(#10008) +py_cobjecttypes(#10008, #10009) +py_cobject_sources(#10008, 0) +py_cobjectnames(#10008, "__set__") +py_cmembers_versioned(#10007, "__set__", #10008, "2") +#10199 = @"C_type$wrapper_descriptor$2__doc__$2__getattribute__" +py_cobjects(#10199) +py_cobjecttypes(#10199, #10009) +py_cobject_sources(#10199, 0) +py_cobjectnames(#10199, "__getattribute__") +py_cmembers_versioned(#10007, "__getattribute__", #10199, "2") +py_cmembers_versioned(#10007, "__objclass__", #10005, "2") +#10200 = @"C_type$wrapper_descriptor$2__doc__$2__repr__" +py_cobjects(#10200) +py_cobjecttypes(#10200, #10009) +py_cobject_sources(#10200, 0) +py_cobjectnames(#10200, "__repr__") +py_cmembers_versioned(#10007, "__repr__", #10200, "2") +#10201 = @"C_type$wrapper_descriptor$2__doc__$2__get__" +py_cobjects(#10201) +py_cobjecttypes(#10201, #10009) +py_cobject_sources(#10201, 0) +py_cobjectnames(#10201, "__get__") +py_cmembers_versioned(#10007, "__get__", #10201, "2") +py_cmembers_versioned(#10007, "__doc__", #10017, "2") +#10202 = @"C_type$wrapper_descriptor$2__doc__$2__delete__" +py_cobjects(#10202) +py_cobjecttypes(#10202, #10009) +py_cobject_sources(#10202, 0) +py_cobjectnames(#10202, "__delete__") +py_cmembers_versioned(#10007, "__delete__", #10202, "2") +py_cobjectnames(#10007, "__doc__") +py_cmembers_versioned(#10005, "__doc__", #10007, "2") +#10203 = @"C_type$wrapper_descriptor$2__get__" +py_cobjects(#10203) +py_cobjecttypes(#10203, #10005) +py_cobject_sources(#10203, 0) +py_cobjectnames(#10203, "__get__") +py_cmembers_versioned(#10005, "__get__", #10203, "2") +#10204 = @"C_type$wrapper_descriptor$2__getattribute__" +py_cobjects(#10204) +py_cobjecttypes(#10204, #10005) +py_cobject_sources(#10204, 0) +py_cobjectnames(#10204, "__getattribute__") +py_cmembers_versioned(#10005, "__getattribute__", #10204, "2") +#10205 = @"C_type$wrapper_descriptor$2__name__" +py_cobjects(#10205) +py_cobjecttypes(#10205, #10045) +py_cobject_sources(#10205, 0) +py_cobjectnames(#10205, "__name__") +py_cmembers_versioned(#10005, "__name__", #10205, "2") +#10206 = @"C_type$wrapper_descriptor$2__objclass__" +py_cobjects(#10206) +py_cobjecttypes(#10206, #10045) +py_cobject_sources(#10206, 0) +py_cobjectnames(#10206, "__objclass__") +py_cmembers_versioned(#10005, "__objclass__", #10206, "2") +#10207 = @"C_type$wrapper_descriptor$2__repr__" +py_cobjects(#10207) +py_cobjecttypes(#10207, #10005) +py_cobject_sources(#10207, 0) +py_cobjectnames(#10207, "__repr__") +py_cmembers_versioned(#10005, "__repr__", #10207, "2") +py_cmembers_versioned(#10005, ".super.", #10021, "2") +py_cobjectnames(#10005, "wrapper_descriptor") +py_cobjects(#10004) +py_cobjecttypes(#10004, #10005) +py_cobject_sources(#10004, 0) +py_cobjectnames(#10004, "__delete__") +py_cmembers_versioned(#10003, "__delete__", #10004, "2") +#10208 = @"C_type$getset_descriptor$2__doc__" +py_cobjects(#10208) +py_cobjecttypes(#10208, #10003) +py_cobject_sources(#10208, 0) +#10209 = @"C_type$getset_descriptor$2__doc__$2__set__" +py_cobjects(#10209) +py_cobjecttypes(#10209, #10009) +py_cobject_sources(#10209, 0) +py_cobjectnames(#10209, "__set__") +py_cmembers_versioned(#10208, "__set__", #10209, "2") +#10210 = @"C_type$getset_descriptor$2__doc__$2__getattribute__" +py_cobjects(#10210) +py_cobjecttypes(#10210, #10009) +py_cobject_sources(#10210, 0) +py_cobjectnames(#10210, "__getattribute__") +py_cmembers_versioned(#10208, "__getattribute__", #10210, "2") +py_cmembers_versioned(#10208, "__objclass__", #10003, "2") +#10211 = @"C_type$getset_descriptor$2__doc__$2__repr__" +py_cobjects(#10211) +py_cobjecttypes(#10211, #10009) +py_cobject_sources(#10211, 0) +py_cobjectnames(#10211, "__repr__") +py_cmembers_versioned(#10208, "__repr__", #10211, "2") +#10212 = @"C_type$getset_descriptor$2__doc__$2__get__" +py_cobjects(#10212) +py_cobjecttypes(#10212, #10009) +py_cobject_sources(#10212, 0) +py_cobjectnames(#10212, "__get__") +py_cmembers_versioned(#10208, "__get__", #10212, "2") +py_cmembers_versioned(#10208, "__doc__", #10017, "2") +#10213 = @"C_type$getset_descriptor$2__doc__$2__delete__" +py_cobjects(#10213) +py_cobjecttypes(#10213, #10009) +py_cobject_sources(#10213, 0) +py_cobjectnames(#10213, "__delete__") +py_cmembers_versioned(#10208, "__delete__", #10213, "2") +py_cobjectnames(#10208, "__doc__") +py_cmembers_versioned(#10003, "__doc__", #10208, "2") +#10214 = @"C_type$getset_descriptor$2__get__" +py_cobjects(#10214) +py_cobjecttypes(#10214, #10005) +py_cobject_sources(#10214, 0) +py_cobjectnames(#10214, "__get__") +py_cmembers_versioned(#10003, "__get__", #10214, "2") +#10215 = @"C_type$getset_descriptor$2__getattribute__" +py_cobjects(#10215) +py_cobjecttypes(#10215, #10005) +py_cobject_sources(#10215, 0) +py_cobjectnames(#10215, "__getattribute__") +py_cmembers_versioned(#10003, "__getattribute__", #10215, "2") +#10216 = @"C_type$getset_descriptor$2__name__" +py_cobjects(#10216) +py_cobjecttypes(#10216, #10045) +py_cobject_sources(#10216, 0) +py_cobjectnames(#10216, "__name__") +py_cmembers_versioned(#10003, "__name__", #10216, "2") +#10217 = @"C_type$getset_descriptor$2__objclass__" +py_cobjects(#10217) +py_cobjecttypes(#10217, #10045) +py_cobject_sources(#10217, 0) +py_cobjectnames(#10217, "__objclass__") +py_cmembers_versioned(#10003, "__objclass__", #10217, "2") +#10218 = @"C_type$getset_descriptor$2__repr__" +py_cobjects(#10218) +py_cobjecttypes(#10218, #10005) +py_cobject_sources(#10218, 0) +py_cobjectnames(#10218, "__repr__") +py_cmembers_versioned(#10003, "__repr__", #10218, "2") +#10219 = @"C_type$getset_descriptor$2__set__" +py_cobjects(#10219) +py_cobjecttypes(#10219, #10005) +py_cobject_sources(#10219, 0) +py_cobjectnames(#10219, "__set__") +py_cmembers_versioned(#10003, "__set__", #10219, "2") +py_cmembers_versioned(#10003, ".super.", #10021, "2") +py_cobjectnames(#10003, "getset_descriptor") +py_cobjects(#10002) +py_cobjecttypes(#10002, #10003) +py_cobject_sources(#10002, 0) +#10220 = @"C_type$type$2__abstractmethods__$2__set__" +py_cobjects(#10220) +py_cobjecttypes(#10220, #10009) +py_cobject_sources(#10220, 0) +py_cobjectnames(#10220, "__set__") +py_cmembers_versioned(#10002, "__set__", #10220, "2") +#10221 = @"C_type$type$2__abstractmethods__$2__getattribute__" +py_cobjects(#10221) +py_cobjecttypes(#10221, #10009) +py_cobject_sources(#10221, 0) +py_cobjectnames(#10221, "__getattribute__") +py_cmembers_versioned(#10002, "__getattribute__", #10221, "2") +py_cmembers_versioned(#10002, "__objclass__", #10001, "2") +#10222 = @"C_type$type$2__abstractmethods__$2__repr__" +py_cobjects(#10222) +py_cobjecttypes(#10222, #10009) +py_cobject_sources(#10222, 0) +py_cobjectnames(#10222, "__repr__") +py_cmembers_versioned(#10002, "__repr__", #10222, "2") +#10223 = @"C_type$type$2__abstractmethods__$2__get__" +py_cobjects(#10223) +py_cobjecttypes(#10223, #10009) +py_cobject_sources(#10223, 0) +py_cobjectnames(#10223, "__get__") +py_cmembers_versioned(#10002, "__get__", #10223, "2") +py_cmembers_versioned(#10002, "__doc__", #10017, "2") +#10224 = @"C_type$type$2__abstractmethods__$2__delete__" +py_cobjects(#10224) +py_cobjecttypes(#10224, #10009) +py_cobject_sources(#10224, 0) +py_cobjectnames(#10224, "__delete__") +py_cmembers_versioned(#10002, "__delete__", #10224, "2") +py_cobjectnames(#10002, "__abstractmethods__") +py_cmembers_versioned(#10001, "__abstractmethods__", #10002, "2") +#10225 = @"C_type$type$2__base__" +py_cobjects(#10225) +py_cobjecttypes(#10225, #10045) +py_cobject_sources(#10225, 0) +py_cobjectnames(#10225, "__base__") +py_cmembers_versioned(#10001, "__base__", #10225, "2") +#10226 = @"C_type$type$2__bases__" +py_cobjects(#10226) +py_cobjecttypes(#10226, #10003) +py_cobject_sources(#10226, 0) +#10227 = @"C_type$type$2__bases__$2__set__" +py_cobjects(#10227) +py_cobjecttypes(#10227, #10009) +py_cobject_sources(#10227, 0) +py_cobjectnames(#10227, "__set__") +py_cmembers_versioned(#10226, "__set__", #10227, "2") +#10228 = @"C_type$type$2__bases__$2__getattribute__" +py_cobjects(#10228) +py_cobjecttypes(#10228, #10009) +py_cobject_sources(#10228, 0) +py_cobjectnames(#10228, "__getattribute__") +py_cmembers_versioned(#10226, "__getattribute__", #10228, "2") +py_cmembers_versioned(#10226, "__objclass__", #10001, "2") +#10229 = @"C_type$type$2__bases__$2__repr__" +py_cobjects(#10229) +py_cobjecttypes(#10229, #10009) +py_cobject_sources(#10229, 0) +py_cobjectnames(#10229, "__repr__") +py_cmembers_versioned(#10226, "__repr__", #10229, "2") +#10230 = @"C_type$type$2__bases__$2__get__" +py_cobjects(#10230) +py_cobjecttypes(#10230, #10009) +py_cobject_sources(#10230, 0) +py_cobjectnames(#10230, "__get__") +py_cmembers_versioned(#10226, "__get__", #10230, "2") +py_cmembers_versioned(#10226, "__doc__", #10017, "2") +#10231 = @"C_type$type$2__bases__$2__delete__" +py_cobjects(#10231) +py_cobjecttypes(#10231, #10009) +py_cobject_sources(#10231, 0) +py_cobjectnames(#10231, "__delete__") +py_cmembers_versioned(#10226, "__delete__", #10231, "2") +py_cobjectnames(#10226, "__bases__") +py_cmembers_versioned(#10001, "__bases__", #10226, "2") +#10232 = @"C_type$type$2__basicsize__" +py_cobjects(#10232) +py_cobjecttypes(#10232, #10045) +py_cobject_sources(#10232, 0) +py_cobjectnames(#10232, "__basicsize__") +py_cmembers_versioned(#10001, "__basicsize__", #10232, "2") +#10233 = @"C_type$type$2__call__" +py_cobjects(#10233) +py_cobjecttypes(#10233, #10005) +py_cobject_sources(#10233, 0) +py_cobjectnames(#10233, "__call__") +py_cmembers_versioned(#10001, "__call__", #10233, "2") +#10234 = @"C_type$type$2__delattr__" +py_cobjects(#10234) +py_cobjecttypes(#10234, #10005) +py_cobject_sources(#10234, 0) +py_cobjectnames(#10234, "__delattr__") +py_cmembers_versioned(#10001, "__delattr__", #10234, "2") +#10235 = @"C_type$type$2__dict__" +py_cobjects(#10235) +py_cobjecttypes(#10235, #10003) +py_cobject_sources(#10235, 0) +#10236 = @"C_type$type$2__dict__$2__set__" +py_cobjects(#10236) +py_cobjecttypes(#10236, #10009) +py_cobject_sources(#10236, 0) +py_cobjectnames(#10236, "__set__") +py_cmembers_versioned(#10235, "__set__", #10236, "2") +#10237 = @"C_type$type$2__dict__$2__getattribute__" +py_cobjects(#10237) +py_cobjecttypes(#10237, #10009) +py_cobject_sources(#10237, 0) +py_cobjectnames(#10237, "__getattribute__") +py_cmembers_versioned(#10235, "__getattribute__", #10237, "2") +py_cmembers_versioned(#10235, "__objclass__", #10001, "2") +#10238 = @"C_type$type$2__dict__$2__repr__" +py_cobjects(#10238) +py_cobjecttypes(#10238, #10009) +py_cobject_sources(#10238, 0) +py_cobjectnames(#10238, "__repr__") +py_cmembers_versioned(#10235, "__repr__", #10238, "2") +#10239 = @"C_type$type$2__dict__$2__get__" +py_cobjects(#10239) +py_cobjecttypes(#10239, #10009) +py_cobject_sources(#10239, 0) +py_cobjectnames(#10239, "__get__") +py_cmembers_versioned(#10235, "__get__", #10239, "2") +py_cmembers_versioned(#10235, "__doc__", #10017, "2") +#10240 = @"C_type$type$2__dict__$2__delete__" +py_cobjects(#10240) +py_cobjecttypes(#10240, #10009) +py_cobject_sources(#10240, 0) +py_cobjectnames(#10240, "__delete__") +py_cmembers_versioned(#10235, "__delete__", #10240, "2") +py_cobjectnames(#10235, "__dict__") +py_cmembers_versioned(#10001, "__dict__", #10235, "2") +#10241 = @"C_type$type$2__dictoffset__" +py_cobjects(#10241) +py_cobjecttypes(#10241, #10045) +py_cobject_sources(#10241, 0) +py_cobjectnames(#10241, "__dictoffset__") +py_cmembers_versioned(#10001, "__dictoffset__", #10241, "2") +#10242 = @"C_type$type$2__doc__" +py_cobjects(#10242) +py_cobjecttypes(#10242, #10003) +py_cobject_sources(#10242, 0) +#10243 = @"C_type$type$2__doc__$2__set__" +py_cobjects(#10243) +py_cobjecttypes(#10243, #10009) +py_cobject_sources(#10243, 0) +py_cobjectnames(#10243, "__set__") +py_cmembers_versioned(#10242, "__set__", #10243, "2") +#10244 = @"C_type$type$2__doc__$2__getattribute__" +py_cobjects(#10244) +py_cobjecttypes(#10244, #10009) +py_cobject_sources(#10244, 0) +py_cobjectnames(#10244, "__getattribute__") +py_cmembers_versioned(#10242, "__getattribute__", #10244, "2") +py_cmembers_versioned(#10242, "__objclass__", #10001, "2") +#10245 = @"C_type$type$2__doc__$2__repr__" +py_cobjects(#10245) +py_cobjecttypes(#10245, #10009) +py_cobject_sources(#10245, 0) +py_cobjectnames(#10245, "__repr__") +py_cmembers_versioned(#10242, "__repr__", #10245, "2") +#10246 = @"C_type$type$2__doc__$2__get__" +py_cobjects(#10246) +py_cobjecttypes(#10246, #10009) +py_cobject_sources(#10246, 0) +py_cobjectnames(#10246, "__get__") +py_cmembers_versioned(#10242, "__get__", #10246, "2") +py_cmembers_versioned(#10242, "__doc__", #10017, "2") +#10247 = @"C_type$type$2__doc__$2__delete__" +py_cobjects(#10247) +py_cobjecttypes(#10247, #10009) +py_cobject_sources(#10247, 0) +py_cobjectnames(#10247, "__delete__") +py_cmembers_versioned(#10242, "__delete__", #10247, "2") +py_cobjectnames(#10242, "__doc__") +py_cmembers_versioned(#10001, "__doc__", #10242, "2") +#10248 = @"C_type$type$2__eq__" +py_cobjects(#10248) +py_cobjecttypes(#10248, #10005) +py_cobject_sources(#10248, 0) +py_cobjectnames(#10248, "__eq__") +py_cmembers_versioned(#10001, "__eq__", #10248, "2") +#10249 = @"C_type$type$2__flags__" +py_cobjects(#10249) +py_cobjecttypes(#10249, #10045) +py_cobject_sources(#10249, 0) +py_cobjectnames(#10249, "__flags__") +py_cmembers_versioned(#10001, "__flags__", #10249, "2") +#10250 = @"C_type$type$2__ge__" +py_cobjects(#10250) +py_cobjecttypes(#10250, #10005) +py_cobject_sources(#10250, 0) +py_cobjectnames(#10250, "__ge__") +py_cmembers_versioned(#10001, "__ge__", #10250, "2") +#10251 = @"C_type$type$2__getattribute__" +py_cobjects(#10251) +py_cobjecttypes(#10251, #10005) +py_cobject_sources(#10251, 0) +py_cobjectnames(#10251, "__getattribute__") +py_cmembers_versioned(#10001, "__getattribute__", #10251, "2") +#10252 = @"C_type$type$2__gt__" +py_cobjects(#10252) +py_cobjecttypes(#10252, #10005) +py_cobject_sources(#10252, 0) +py_cobjectnames(#10252, "__gt__") +py_cmembers_versioned(#10001, "__gt__", #10252, "2") +#10253 = @"C_type$type$2__hash__" +py_cobjects(#10253) +py_cobjecttypes(#10253, #10005) +py_cobject_sources(#10253, 0) +py_cobjectnames(#10253, "__hash__") +py_cmembers_versioned(#10001, "__hash__", #10253, "2") +#10254 = @"C_type$type$2__init__" +py_cobjects(#10254) +py_cobjecttypes(#10254, #10005) +py_cobject_sources(#10254, 0) +py_cobjectnames(#10254, "__init__") +py_cmembers_versioned(#10001, "__init__", #10254, "2") +#10255 = @"C_type$type$2__instancecheck__" +py_cobjects(#10255) +py_cobjecttypes(#10255, #10034) +py_cobject_sources(#10255, 0) +py_cobjectnames(#10255, "__instancecheck__") +py_cmembers_versioned(#10001, "__instancecheck__", #10255, "2") +#10256 = @"C_type$type$2__itemsize__" +py_cobjects(#10256) +py_cobjecttypes(#10256, #10045) +py_cobject_sources(#10256, 0) +py_cobjectnames(#10256, "__itemsize__") +py_cmembers_versioned(#10001, "__itemsize__", #10256, "2") +#10257 = @"C_type$type$2__le__" +py_cobjects(#10257) +py_cobjecttypes(#10257, #10005) +py_cobject_sources(#10257, 0) +py_cobjectnames(#10257, "__le__") +py_cmembers_versioned(#10001, "__le__", #10257, "2") +#10258 = @"C_type$type$2__lt__" +py_cobjects(#10258) +py_cobjecttypes(#10258, #10005) +py_cobject_sources(#10258, 0) +py_cobjectnames(#10258, "__lt__") +py_cmembers_versioned(#10001, "__lt__", #10258, "2") +#10259 = @"C_type$type$2__module__" +py_cobjects(#10259) +py_cobjecttypes(#10259, #10003) +py_cobject_sources(#10259, 0) +#10260 = @"C_type$type$2__module__$2__set__" +py_cobjects(#10260) +py_cobjecttypes(#10260, #10009) +py_cobject_sources(#10260, 0) +py_cobjectnames(#10260, "__set__") +py_cmembers_versioned(#10259, "__set__", #10260, "2") +#10261 = @"C_type$type$2__module__$2__getattribute__" +py_cobjects(#10261) +py_cobjecttypes(#10261, #10009) +py_cobject_sources(#10261, 0) +py_cobjectnames(#10261, "__getattribute__") +py_cmembers_versioned(#10259, "__getattribute__", #10261, "2") +py_cmembers_versioned(#10259, "__objclass__", #10001, "2") +#10262 = @"C_type$type$2__module__$2__repr__" +py_cobjects(#10262) +py_cobjecttypes(#10262, #10009) +py_cobject_sources(#10262, 0) +py_cobjectnames(#10262, "__repr__") +py_cmembers_versioned(#10259, "__repr__", #10262, "2") +#10263 = @"C_type$type$2__module__$2__get__" +py_cobjects(#10263) +py_cobjecttypes(#10263, #10009) +py_cobject_sources(#10263, 0) +py_cobjectnames(#10263, "__get__") +py_cmembers_versioned(#10259, "__get__", #10263, "2") +py_cmembers_versioned(#10259, "__doc__", #10017, "2") +#10264 = @"C_type$type$2__module__$2__delete__" +py_cobjects(#10264) +py_cobjecttypes(#10264, #10009) +py_cobject_sources(#10264, 0) +py_cobjectnames(#10264, "__delete__") +py_cmembers_versioned(#10259, "__delete__", #10264, "2") +py_cobjectnames(#10259, "__module__") +py_cmembers_versioned(#10001, "__module__", #10259, "2") +#10265 = @"C_type$type$2__mro__" +py_cobjects(#10265) +py_cobjecttypes(#10265, #10045) +py_cobject_sources(#10265, 0) +py_cobjectnames(#10265, "__mro__") +py_cmembers_versioned(#10001, "__mro__", #10265, "2") +#10266 = @"C_type$type$2__name__" +py_cobjects(#10266) +py_cobjecttypes(#10266, #10003) +py_cobject_sources(#10266, 0) +#10267 = @"C_type$type$2__name__$2__set__" +py_cobjects(#10267) +py_cobjecttypes(#10267, #10009) +py_cobject_sources(#10267, 0) +py_cobjectnames(#10267, "__set__") +py_cmembers_versioned(#10266, "__set__", #10267, "2") +#10268 = @"C_type$type$2__name__$2__getattribute__" +py_cobjects(#10268) +py_cobjecttypes(#10268, #10009) +py_cobject_sources(#10268, 0) +py_cobjectnames(#10268, "__getattribute__") +py_cmembers_versioned(#10266, "__getattribute__", #10268, "2") +py_cmembers_versioned(#10266, "__objclass__", #10001, "2") +#10269 = @"C_type$type$2__name__$2__repr__" +py_cobjects(#10269) +py_cobjecttypes(#10269, #10009) +py_cobject_sources(#10269, 0) +py_cobjectnames(#10269, "__repr__") +py_cmembers_versioned(#10266, "__repr__", #10269, "2") +#10270 = @"C_type$type$2__name__$2__get__" +py_cobjects(#10270) +py_cobjecttypes(#10270, #10009) +py_cobject_sources(#10270, 0) +py_cobjectnames(#10270, "__get__") +py_cmembers_versioned(#10266, "__get__", #10270, "2") +py_cmembers_versioned(#10266, "__doc__", #10017, "2") +#10271 = @"C_type$type$2__name__$2__delete__" +py_cobjects(#10271) +py_cobjecttypes(#10271, #10009) +py_cobject_sources(#10271, 0) +py_cobjectnames(#10271, "__delete__") +py_cmembers_versioned(#10266, "__delete__", #10271, "2") +py_cobjectnames(#10266, "__name__") +py_cmembers_versioned(#10001, "__name__", #10266, "2") +#10272 = @"C_type$type$2__ne__" +py_cobjects(#10272) +py_cobjecttypes(#10272, #10005) +py_cobject_sources(#10272, 0) +py_cobjectnames(#10272, "__ne__") +py_cmembers_versioned(#10001, "__ne__", #10272, "2") +#10273 = @"C_type$type$2__new__" +py_cobjects(#10273) +py_cobjecttypes(#10273, #10075) +py_cobject_sources(#10273, 0) +py_cobjectnames(#10273, "__new__") +py_cmembers_versioned(#10001, "__new__", #10273, "2") +#10274 = @"C_type$type$2__repr__" +py_cobjects(#10274) +py_cobjecttypes(#10274, #10005) +py_cobject_sources(#10274, 0) +py_cobjectnames(#10274, "__repr__") +py_cmembers_versioned(#10001, "__repr__", #10274, "2") +#10275 = @"C_type$type$2__setattr__" +py_cobjects(#10275) +py_cobjecttypes(#10275, #10005) +py_cobject_sources(#10275, 0) +py_cobjectnames(#10275, "__setattr__") +py_cmembers_versioned(#10001, "__setattr__", #10275, "2") +#10276 = @"C_type$type$2__subclasscheck__" +py_cobjects(#10276) +py_cobjecttypes(#10276, #10034) +py_cobject_sources(#10276, 0) +py_cobjectnames(#10276, "__subclasscheck__") +py_cmembers_versioned(#10001, "__subclasscheck__", #10276, "2") +#10277 = @"C_type$type$2__subclasses__" +py_cobjects(#10277) +py_cobjecttypes(#10277, #10034) +py_cobject_sources(#10277, 0) +py_cobjectnames(#10277, "__subclasses__") +py_cmembers_versioned(#10001, "__subclasses__", #10277, "2") +#10278 = @"C_type$type$2__weakrefoffset__" +py_cobjects(#10278) +py_cobjecttypes(#10278, #10045) +py_cobject_sources(#10278, 0) +py_cobjectnames(#10278, "__weakrefoffset__") +py_cmembers_versioned(#10001, "__weakrefoffset__", #10278, "2") +#10279 = @"C_type$type$2mro" +py_cobjects(#10279) +py_cobjecttypes(#10279, #10034) +py_cobject_sources(#10279, 0) +py_cobjectnames(#10279, "mro") +py_cmembers_versioned(#10001, "mro", #10279, "2") +py_cmembers_versioned(#10001, ".super.", #10021, "2") +py_cobjectnames(#10001, "type") +py_cobjects(#10000) +py_cobjecttypes(#10000, #10001) +py_cobject_sources(#10000, 0) +#10280 = @"C_type$function$2__call__" +py_cobjects(#10280) +py_cobjecttypes(#10280, #10005) +py_cobject_sources(#10280, 0) +py_cobjectnames(#10280, "__call__") +py_cmembers_versioned(#10000, "__call__", #10280, "2") +#10281 = @"C_type$function$2__closure__" +py_cobjects(#10281) +py_cobjecttypes(#10281, #10045) +py_cobject_sources(#10281, 0) +py_cobjectnames(#10281, "__closure__") +py_cmembers_versioned(#10000, "__closure__", #10281, "2") +#10282 = @"C_type$function$2__code__" +py_cobjects(#10282) +py_cobjecttypes(#10282, #10003) +py_cobject_sources(#10282, 0) +#10283 = @"C_type$function$2__code__$2__set__" +py_cobjects(#10283) +py_cobjecttypes(#10283, #10009) +py_cobject_sources(#10283, 0) +py_cobjectnames(#10283, "__set__") +py_cmembers_versioned(#10282, "__set__", #10283, "2") +#10284 = @"C_type$function$2__code__$2__getattribute__" +py_cobjects(#10284) +py_cobjecttypes(#10284, #10009) +py_cobject_sources(#10284, 0) +py_cobjectnames(#10284, "__getattribute__") +py_cmembers_versioned(#10282, "__getattribute__", #10284, "2") +py_cmembers_versioned(#10282, "__objclass__", #10000, "2") +#10285 = @"C_type$function$2__code__$2__repr__" +py_cobjects(#10285) +py_cobjecttypes(#10285, #10009) +py_cobject_sources(#10285, 0) +py_cobjectnames(#10285, "__repr__") +py_cmembers_versioned(#10282, "__repr__", #10285, "2") +#10286 = @"C_type$function$2__code__$2__get__" +py_cobjects(#10286) +py_cobjecttypes(#10286, #10009) +py_cobject_sources(#10286, 0) +py_cobjectnames(#10286, "__get__") +py_cmembers_versioned(#10282, "__get__", #10286, "2") +py_cmembers_versioned(#10282, "__doc__", #10017, "2") +#10287 = @"C_type$function$2__code__$2__delete__" +py_cobjects(#10287) +py_cobjecttypes(#10287, #10009) +py_cobject_sources(#10287, 0) +py_cobjectnames(#10287, "__delete__") +py_cmembers_versioned(#10282, "__delete__", #10287, "2") +py_cobjectnames(#10282, "__code__") +py_cmembers_versioned(#10000, "__code__", #10282, "2") +#10288 = @"C_type$function$2__defaults__" +py_cobjects(#10288) +py_cobjecttypes(#10288, #10003) +py_cobject_sources(#10288, 0) +#10289 = @"C_type$function$2__defaults__$2__set__" +py_cobjects(#10289) +py_cobjecttypes(#10289, #10009) +py_cobject_sources(#10289, 0) +py_cobjectnames(#10289, "__set__") +py_cmembers_versioned(#10288, "__set__", #10289, "2") +#10290 = @"C_type$function$2__defaults__$2__getattribute__" +py_cobjects(#10290) +py_cobjecttypes(#10290, #10009) +py_cobject_sources(#10290, 0) +py_cobjectnames(#10290, "__getattribute__") +py_cmembers_versioned(#10288, "__getattribute__", #10290, "2") +py_cmembers_versioned(#10288, "__objclass__", #10000, "2") +#10291 = @"C_type$function$2__defaults__$2__repr__" +py_cobjects(#10291) +py_cobjecttypes(#10291, #10009) +py_cobject_sources(#10291, 0) +py_cobjectnames(#10291, "__repr__") +py_cmembers_versioned(#10288, "__repr__", #10291, "2") +#10292 = @"C_type$function$2__defaults__$2__get__" +py_cobjects(#10292) +py_cobjecttypes(#10292, #10009) +py_cobject_sources(#10292, 0) +py_cobjectnames(#10292, "__get__") +py_cmembers_versioned(#10288, "__get__", #10292, "2") +py_cmembers_versioned(#10288, "__doc__", #10017, "2") +#10293 = @"C_type$function$2__defaults__$2__delete__" +py_cobjects(#10293) +py_cobjecttypes(#10293, #10009) +py_cobject_sources(#10293, 0) +py_cobjectnames(#10293, "__delete__") +py_cmembers_versioned(#10288, "__delete__", #10293, "2") +py_cobjectnames(#10288, "__defaults__") +py_cmembers_versioned(#10000, "__defaults__", #10288, "2") +#10294 = @"C_type$function$2__delattr__" +py_cobjects(#10294) +py_cobjecttypes(#10294, #10005) +py_cobject_sources(#10294, 0) +py_cobjectnames(#10294, "__delattr__") +py_cmembers_versioned(#10000, "__delattr__", #10294, "2") +#10295 = @"C_type$function$2__dict__" +py_cobjects(#10295) +py_cobjecttypes(#10295, #10003) +py_cobject_sources(#10295, 0) +#10296 = @"C_type$function$2__dict__$2__set__" +py_cobjects(#10296) +py_cobjecttypes(#10296, #10009) +py_cobject_sources(#10296, 0) +py_cobjectnames(#10296, "__set__") +py_cmembers_versioned(#10295, "__set__", #10296, "2") +#10297 = @"C_type$function$2__dict__$2__getattribute__" +py_cobjects(#10297) +py_cobjecttypes(#10297, #10009) +py_cobject_sources(#10297, 0) +py_cobjectnames(#10297, "__getattribute__") +py_cmembers_versioned(#10295, "__getattribute__", #10297, "2") +py_cmembers_versioned(#10295, "__objclass__", #10000, "2") +#10298 = @"C_type$function$2__dict__$2__repr__" +py_cobjects(#10298) +py_cobjecttypes(#10298, #10009) +py_cobject_sources(#10298, 0) +py_cobjectnames(#10298, "__repr__") +py_cmembers_versioned(#10295, "__repr__", #10298, "2") +#10299 = @"C_type$function$2__dict__$2__get__" +py_cobjects(#10299) +py_cobjecttypes(#10299, #10009) +py_cobject_sources(#10299, 0) +py_cobjectnames(#10299, "__get__") +py_cmembers_versioned(#10295, "__get__", #10299, "2") +py_cmembers_versioned(#10295, "__doc__", #10017, "2") +#10300 = @"C_type$function$2__dict__$2__delete__" +py_cobjects(#10300) +py_cobjecttypes(#10300, #10009) +py_cobject_sources(#10300, 0) +py_cobjectnames(#10300, "__delete__") +py_cmembers_versioned(#10295, "__delete__", #10300, "2") +py_cobjectnames(#10295, "__dict__") +py_cmembers_versioned(#10000, "__dict__", #10295, "2") +#10301 = @"C_type$function$2__doc__" +py_cobjects(#10301) +py_cobjecttypes(#10301, #10045) +py_cobject_sources(#10301, 0) +py_cobjectnames(#10301, "__doc__") +py_cmembers_versioned(#10000, "__doc__", #10301, "2") +#10302 = @"C_type$function$2__get__" +py_cobjects(#10302) +py_cobjecttypes(#10302, #10005) +py_cobject_sources(#10302, 0) +py_cobjectnames(#10302, "__get__") +py_cmembers_versioned(#10000, "__get__", #10302, "2") +#10303 = @"C_type$function$2__getattribute__" +py_cobjects(#10303) +py_cobjecttypes(#10303, #10005) +py_cobject_sources(#10303, 0) +py_cobjectnames(#10303, "__getattribute__") +py_cmembers_versioned(#10000, "__getattribute__", #10303, "2") +#10304 = @"C_type$function$2__globals__" +py_cobjects(#10304) +py_cobjecttypes(#10304, #10045) +py_cobject_sources(#10304, 0) +py_cobjectnames(#10304, "__globals__") +py_cmembers_versioned(#10000, "__globals__", #10304, "2") +#10305 = @"C_type$function$2__module__" +py_cobjects(#10305) +py_cobjecttypes(#10305, #10045) +py_cobject_sources(#10305, 0) +py_cobjectnames(#10305, "__module__") +py_cmembers_versioned(#10000, "__module__", #10305, "2") +#10306 = @"C_type$function$2__name__" +py_cobjects(#10306) +py_cobjecttypes(#10306, #10003) +py_cobject_sources(#10306, 0) +#10307 = @"C_type$function$2__name__$2__set__" +py_cobjects(#10307) +py_cobjecttypes(#10307, #10009) +py_cobject_sources(#10307, 0) +py_cobjectnames(#10307, "__set__") +py_cmembers_versioned(#10306, "__set__", #10307, "2") +#10308 = @"C_type$function$2__name__$2__getattribute__" +py_cobjects(#10308) +py_cobjecttypes(#10308, #10009) +py_cobject_sources(#10308, 0) +py_cobjectnames(#10308, "__getattribute__") +py_cmembers_versioned(#10306, "__getattribute__", #10308, "2") +py_cmembers_versioned(#10306, "__objclass__", #10000, "2") +#10309 = @"C_type$function$2__name__$2__repr__" +py_cobjects(#10309) +py_cobjecttypes(#10309, #10009) +py_cobject_sources(#10309, 0) +py_cobjectnames(#10309, "__repr__") +py_cmembers_versioned(#10306, "__repr__", #10309, "2") +#10310 = @"C_type$function$2__name__$2__get__" +py_cobjects(#10310) +py_cobjecttypes(#10310, #10009) +py_cobject_sources(#10310, 0) +py_cobjectnames(#10310, "__get__") +py_cmembers_versioned(#10306, "__get__", #10310, "2") +py_cmembers_versioned(#10306, "__doc__", #10017, "2") +#10311 = @"C_type$function$2__name__$2__delete__" +py_cobjects(#10311) +py_cobjecttypes(#10311, #10009) +py_cobject_sources(#10311, 0) +py_cobjectnames(#10311, "__delete__") +py_cmembers_versioned(#10306, "__delete__", #10311, "2") +py_cobjectnames(#10306, "__name__") +py_cmembers_versioned(#10000, "__name__", #10306, "2") +#10312 = @"C_type$function$2__new__" +py_cobjects(#10312) +py_cobjecttypes(#10312, #10075) +py_cobject_sources(#10312, 0) +py_cobjectnames(#10312, "__new__") +py_cmembers_versioned(#10000, "__new__", #10312, "2") +#10313 = @"C_type$function$2__repr__" +py_cobjects(#10313) +py_cobjecttypes(#10313, #10005) +py_cobject_sources(#10313, 0) +py_cobjectnames(#10313, "__repr__") +py_cmembers_versioned(#10000, "__repr__", #10313, "2") +#10314 = @"C_type$function$2__setattr__" +py_cobjects(#10314) +py_cobjecttypes(#10314, #10005) +py_cobject_sources(#10314, 0) +py_cobjectnames(#10314, "__setattr__") +py_cmembers_versioned(#10000, "__setattr__", #10314, "2") +#10315 = @"C_type$function$2func_closure" +py_cobjects(#10315) +py_cobjecttypes(#10315, #10045) +py_cobject_sources(#10315, 0) +py_cobjectnames(#10315, "func_closure") +py_cmembers_versioned(#10000, "func_closure", #10315, "2") +#10316 = @"C_type$function$2func_code" +py_cobjects(#10316) +py_cobjecttypes(#10316, #10003) +py_cobject_sources(#10316, 0) +#10317 = @"C_type$function$2func_code$2__set__" +py_cobjects(#10317) +py_cobjecttypes(#10317, #10009) +py_cobject_sources(#10317, 0) +py_cobjectnames(#10317, "__set__") +py_cmembers_versioned(#10316, "__set__", #10317, "2") +#10318 = @"C_type$function$2func_code$2__getattribute__" +py_cobjects(#10318) +py_cobjecttypes(#10318, #10009) +py_cobject_sources(#10318, 0) +py_cobjectnames(#10318, "__getattribute__") +py_cmembers_versioned(#10316, "__getattribute__", #10318, "2") +py_cmembers_versioned(#10316, "__objclass__", #10000, "2") +#10319 = @"C_type$function$2func_code$2__repr__" +py_cobjects(#10319) +py_cobjecttypes(#10319, #10009) +py_cobject_sources(#10319, 0) +py_cobjectnames(#10319, "__repr__") +py_cmembers_versioned(#10316, "__repr__", #10319, "2") +#10320 = @"C_type$function$2func_code$2__get__" +py_cobjects(#10320) +py_cobjecttypes(#10320, #10009) +py_cobject_sources(#10320, 0) +py_cobjectnames(#10320, "__get__") +py_cmembers_versioned(#10316, "__get__", #10320, "2") +py_cmembers_versioned(#10316, "__doc__", #10017, "2") +#10321 = @"C_type$function$2func_code$2__delete__" +py_cobjects(#10321) +py_cobjecttypes(#10321, #10009) +py_cobject_sources(#10321, 0) +py_cobjectnames(#10321, "__delete__") +py_cmembers_versioned(#10316, "__delete__", #10321, "2") +py_cobjectnames(#10316, "func_code") +py_cmembers_versioned(#10000, "func_code", #10316, "2") +#10322 = @"C_type$function$2func_defaults" +py_cobjects(#10322) +py_cobjecttypes(#10322, #10003) +py_cobject_sources(#10322, 0) +#10323 = @"C_type$function$2func_defaults$2__set__" +py_cobjects(#10323) +py_cobjecttypes(#10323, #10009) +py_cobject_sources(#10323, 0) +py_cobjectnames(#10323, "__set__") +py_cmembers_versioned(#10322, "__set__", #10323, "2") +#10324 = @"C_type$function$2func_defaults$2__getattribute__" +py_cobjects(#10324) +py_cobjecttypes(#10324, #10009) +py_cobject_sources(#10324, 0) +py_cobjectnames(#10324, "__getattribute__") +py_cmembers_versioned(#10322, "__getattribute__", #10324, "2") +py_cmembers_versioned(#10322, "__objclass__", #10000, "2") +#10325 = @"C_type$function$2func_defaults$2__repr__" +py_cobjects(#10325) +py_cobjecttypes(#10325, #10009) +py_cobject_sources(#10325, 0) +py_cobjectnames(#10325, "__repr__") +py_cmembers_versioned(#10322, "__repr__", #10325, "2") +#10326 = @"C_type$function$2func_defaults$2__get__" +py_cobjects(#10326) +py_cobjecttypes(#10326, #10009) +py_cobject_sources(#10326, 0) +py_cobjectnames(#10326, "__get__") +py_cmembers_versioned(#10322, "__get__", #10326, "2") +py_cmembers_versioned(#10322, "__doc__", #10017, "2") +#10327 = @"C_type$function$2func_defaults$2__delete__" +py_cobjects(#10327) +py_cobjecttypes(#10327, #10009) +py_cobject_sources(#10327, 0) +py_cobjectnames(#10327, "__delete__") +py_cmembers_versioned(#10322, "__delete__", #10327, "2") +py_cobjectnames(#10322, "func_defaults") +py_cmembers_versioned(#10000, "func_defaults", #10322, "2") +#10328 = @"C_type$function$2func_dict" +py_cobjects(#10328) +py_cobjecttypes(#10328, #10003) +py_cobject_sources(#10328, 0) +#10329 = @"C_type$function$2func_dict$2__set__" +py_cobjects(#10329) +py_cobjecttypes(#10329, #10009) +py_cobject_sources(#10329, 0) +py_cobjectnames(#10329, "__set__") +py_cmembers_versioned(#10328, "__set__", #10329, "2") +#10330 = @"C_type$function$2func_dict$2__getattribute__" +py_cobjects(#10330) +py_cobjecttypes(#10330, #10009) +py_cobject_sources(#10330, 0) +py_cobjectnames(#10330, "__getattribute__") +py_cmembers_versioned(#10328, "__getattribute__", #10330, "2") +py_cmembers_versioned(#10328, "__objclass__", #10000, "2") +#10331 = @"C_type$function$2func_dict$2__repr__" +py_cobjects(#10331) +py_cobjecttypes(#10331, #10009) +py_cobject_sources(#10331, 0) +py_cobjectnames(#10331, "__repr__") +py_cmembers_versioned(#10328, "__repr__", #10331, "2") +#10332 = @"C_type$function$2func_dict$2__get__" +py_cobjects(#10332) +py_cobjecttypes(#10332, #10009) +py_cobject_sources(#10332, 0) +py_cobjectnames(#10332, "__get__") +py_cmembers_versioned(#10328, "__get__", #10332, "2") +py_cmembers_versioned(#10328, "__doc__", #10017, "2") +#10333 = @"C_type$function$2func_dict$2__delete__" +py_cobjects(#10333) +py_cobjecttypes(#10333, #10009) +py_cobject_sources(#10333, 0) +py_cobjectnames(#10333, "__delete__") +py_cmembers_versioned(#10328, "__delete__", #10333, "2") +py_cobjectnames(#10328, "func_dict") +py_cmembers_versioned(#10000, "func_dict", #10328, "2") +#10334 = @"C_type$function$2func_doc" +py_cobjects(#10334) +py_cobjecttypes(#10334, #10045) +py_cobject_sources(#10334, 0) +py_cobjectnames(#10334, "func_doc") +py_cmembers_versioned(#10000, "func_doc", #10334, "2") +#10335 = @"C_type$function$2func_globals" +py_cobjects(#10335) +py_cobjecttypes(#10335, #10045) +py_cobject_sources(#10335, 0) +py_cobjectnames(#10335, "func_globals") +py_cmembers_versioned(#10000, "func_globals", #10335, "2") +#10336 = @"C_type$function$2func_name" +py_cobjects(#10336) +py_cobjecttypes(#10336, #10003) +py_cobject_sources(#10336, 0) +#10337 = @"C_type$function$2func_name$2__set__" +py_cobjects(#10337) +py_cobjecttypes(#10337, #10009) +py_cobject_sources(#10337, 0) +py_cobjectnames(#10337, "__set__") +py_cmembers_versioned(#10336, "__set__", #10337, "2") +#10338 = @"C_type$function$2func_name$2__getattribute__" +py_cobjects(#10338) +py_cobjecttypes(#10338, #10009) +py_cobject_sources(#10338, 0) +py_cobjectnames(#10338, "__getattribute__") +py_cmembers_versioned(#10336, "__getattribute__", #10338, "2") +py_cmembers_versioned(#10336, "__objclass__", #10000, "2") +#10339 = @"C_type$function$2func_name$2__repr__" +py_cobjects(#10339) +py_cobjecttypes(#10339, #10009) +py_cobject_sources(#10339, 0) +py_cobjectnames(#10339, "__repr__") +py_cmembers_versioned(#10336, "__repr__", #10339, "2") +#10340 = @"C_type$function$2func_name$2__get__" +py_cobjects(#10340) +py_cobjecttypes(#10340, #10009) +py_cobject_sources(#10340, 0) +py_cobjectnames(#10340, "__get__") +py_cmembers_versioned(#10336, "__get__", #10340, "2") +py_cmembers_versioned(#10336, "__doc__", #10017, "2") +#10341 = @"C_type$function$2func_name$2__delete__" +py_cobjects(#10341) +py_cobjecttypes(#10341, #10009) +py_cobject_sources(#10341, 0) +py_cobjectnames(#10341, "__delete__") +py_cmembers_versioned(#10336, "__delete__", #10341, "2") +py_cobjectnames(#10336, "func_name") +py_cmembers_versioned(#10000, "func_name", #10336, "2") +py_cmembers_versioned(#10000, ".super.", #10021, "2") +py_cobjectnames(#10000, "function") +py_special_objects(#10000, "FunctionType") +py_special_objects(#10021, "object") +#10342 = @"C_type$TypeError" +py_cobjects(#10342) +py_cobjecttypes(#10342, #10001) +py_cobject_sources(#10342, 0) +#10343 = @"C_bytes$dbe7d2774d1f18894c309533ab3e08721cecdf36" +py_cobjects(#10343) +py_cobjecttypes(#10343, #10028) +py_cobject_sources(#10343, 0) +py_cobjectnames(#10343, "b'Inappropriate argument type.'") +py_cmembers_versioned(#10342, "__doc__", #10343, "2") +#10344 = @"C_type$TypeError$2__init__" +py_cobjects(#10344) +py_cobjecttypes(#10344, #10005) +py_cobject_sources(#10344, 0) +py_cobjectnames(#10344, "__init__") +py_cmembers_versioned(#10342, "__init__", #10344, "2") +#10345 = @"C_type$TypeError$2__new__" +py_cobjects(#10345) +py_cobjecttypes(#10345, #10075) +py_cobject_sources(#10345, 0) +py_cobjectnames(#10345, "__new__") +py_cmembers_versioned(#10342, "__new__", #10345, "2") +#10346 = @"C_type$StandardError" +py_cobjects(#10346) +py_cobjecttypes(#10346, #10001) +py_cobject_sources(#10346, 0) +#10347 = @"C_bytes$2b5cdf8ebbb1126d88b513cae277cfecd98d5976" +py_cobjects(#10347) +py_cobjecttypes(#10347, #10028) +py_cobject_sources(#10347, 0) +py_cobjectnames(#10347, "b'Base class for all standard Python exceptions that do not represent +interpreter exiting.'") +py_cmembers_versioned(#10346, "__doc__", #10347, "2") +#10348 = @"C_type$StandardError$2__init__" +py_cobjects(#10348) +py_cobjecttypes(#10348, #10005) +py_cobject_sources(#10348, 0) +py_cobjectnames(#10348, "__init__") +py_cmembers_versioned(#10346, "__init__", #10348, "2") +#10349 = @"C_type$StandardError$2__new__" +py_cobjects(#10349) +py_cobjecttypes(#10349, #10075) +py_cobject_sources(#10349, 0) +py_cobjectnames(#10349, "__new__") +py_cmembers_versioned(#10346, "__new__", #10349, "2") +#10350 = @"C_type$Exception" +py_cobjects(#10350) +py_cobjecttypes(#10350, #10001) +py_cobject_sources(#10350, 0) +#10351 = @"C_bytes$41e6176e60800b98303aa2213339fcea39d59ac8" +py_cobjects(#10351) +py_cobjecttypes(#10351, #10028) +py_cobject_sources(#10351, 0) +py_cobjectnames(#10351, "b'Common base class for all non-exit exceptions.'") +py_cmembers_versioned(#10350, "__doc__", #10351, "2") +#10352 = @"C_type$Exception$2__init__" +py_cobjects(#10352) +py_cobjecttypes(#10352, #10005) +py_cobject_sources(#10352, 0) +py_cobjectnames(#10352, "__init__") +py_cmembers_versioned(#10350, "__init__", #10352, "2") +#10353 = @"C_type$Exception$2__new__" +py_cobjects(#10353) +py_cobjecttypes(#10353, #10075) +py_cobject_sources(#10353, 0) +py_cobjectnames(#10353, "__new__") +py_cmembers_versioned(#10350, "__new__", #10353, "2") +#10354 = @"C_type$BaseException" +py_cobjects(#10354) +py_cobjecttypes(#10354, #10001) +py_cobject_sources(#10354, 0) +#10355 = @"C_type$BaseException$2__delattr__" +py_cobjects(#10355) +py_cobjecttypes(#10355, #10005) +py_cobject_sources(#10355, 0) +py_cobjectnames(#10355, "__delattr__") +py_cmembers_versioned(#10354, "__delattr__", #10355, "2") +#10356 = @"C_type$BaseException$2__dict__" +py_cobjects(#10356) +py_cobjecttypes(#10356, #10003) +py_cobject_sources(#10356, 0) +#10357 = @"C_type$BaseException$2__dict__$2__set__" +py_cobjects(#10357) +py_cobjecttypes(#10357, #10009) +py_cobject_sources(#10357, 0) +py_cobjectnames(#10357, "__set__") +py_cmembers_versioned(#10356, "__set__", #10357, "2") +#10358 = @"C_type$BaseException$2__dict__$2__getattribute__" +py_cobjects(#10358) +py_cobjecttypes(#10358, #10009) +py_cobject_sources(#10358, 0) +py_cobjectnames(#10358, "__getattribute__") +py_cmembers_versioned(#10356, "__getattribute__", #10358, "2") +py_cmembers_versioned(#10356, "__objclass__", #10354, "2") +#10359 = @"C_type$BaseException$2__dict__$2__repr__" +py_cobjects(#10359) +py_cobjecttypes(#10359, #10009) +py_cobject_sources(#10359, 0) +py_cobjectnames(#10359, "__repr__") +py_cmembers_versioned(#10356, "__repr__", #10359, "2") +#10360 = @"C_type$BaseException$2__dict__$2__get__" +py_cobjects(#10360) +py_cobjecttypes(#10360, #10009) +py_cobject_sources(#10360, 0) +py_cobjectnames(#10360, "__get__") +py_cmembers_versioned(#10356, "__get__", #10360, "2") +py_cmembers_versioned(#10356, "__doc__", #10017, "2") +#10361 = @"C_type$BaseException$2__dict__$2__delete__" +py_cobjects(#10361) +py_cobjecttypes(#10361, #10009) +py_cobject_sources(#10361, 0) +py_cobjectnames(#10361, "__delete__") +py_cmembers_versioned(#10356, "__delete__", #10361, "2") +py_cobjectnames(#10356, "__dict__") +py_cmembers_versioned(#10354, "__dict__", #10356, "2") +#10362 = @"C_bytes$537130403a454779c94f7087773406e13b7f8ecd" +py_cobjects(#10362) +py_cobjecttypes(#10362, #10028) +py_cobject_sources(#10362, 0) +py_cobjectnames(#10362, "b'Common base class for all exceptions'") +py_cmembers_versioned(#10354, "__doc__", #10362, "2") +#10363 = @"C_type$BaseException$2__getattribute__" +py_cobjects(#10363) +py_cobjecttypes(#10363, #10005) +py_cobject_sources(#10363, 0) +py_cobjectnames(#10363, "__getattribute__") +py_cmembers_versioned(#10354, "__getattribute__", #10363, "2") +#10364 = @"C_type$BaseException$2__getitem__" +py_cobjects(#10364) +py_cobjecttypes(#10364, #10005) +py_cobject_sources(#10364, 0) +py_cobjectnames(#10364, "__getitem__") +py_cmembers_versioned(#10354, "__getitem__", #10364, "2") +#10365 = @"C_type$BaseException$2__getslice__" +py_cobjects(#10365) +py_cobjecttypes(#10365, #10005) +py_cobject_sources(#10365, 0) +py_cobjectnames(#10365, "__getslice__") +py_cmembers_versioned(#10354, "__getslice__", #10365, "2") +#10366 = @"C_type$BaseException$2__init__" +py_cobjects(#10366) +py_cobjecttypes(#10366, #10005) +py_cobject_sources(#10366, 0) +py_cobjectnames(#10366, "__init__") +py_cmembers_versioned(#10354, "__init__", #10366, "2") +#10367 = @"C_type$BaseException$2__new__" +py_cobjects(#10367) +py_cobjecttypes(#10367, #10075) +py_cobject_sources(#10367, 0) +py_cobjectnames(#10367, "__new__") +py_cmembers_versioned(#10354, "__new__", #10367, "2") +#10368 = @"C_type$BaseException$2__reduce__" +py_cobjects(#10368) +py_cobjecttypes(#10368, #10034) +py_cobject_sources(#10368, 0) +py_cobjectnames(#10368, "__reduce__") +py_cmembers_versioned(#10354, "__reduce__", #10368, "2") +#10369 = @"C_type$BaseException$2__repr__" +py_cobjects(#10369) +py_cobjecttypes(#10369, #10005) +py_cobject_sources(#10369, 0) +py_cobjectnames(#10369, "__repr__") +py_cmembers_versioned(#10354, "__repr__", #10369, "2") +#10370 = @"C_type$BaseException$2__setattr__" +py_cobjects(#10370) +py_cobjecttypes(#10370, #10005) +py_cobject_sources(#10370, 0) +py_cobjectnames(#10370, "__setattr__") +py_cmembers_versioned(#10354, "__setattr__", #10370, "2") +#10371 = @"C_type$BaseException$2__setstate__" +py_cobjects(#10371) +py_cobjecttypes(#10371, #10034) +py_cobject_sources(#10371, 0) +py_cobjectnames(#10371, "__setstate__") +py_cmembers_versioned(#10354, "__setstate__", #10371, "2") +#10372 = @"C_type$BaseException$2__str__" +py_cobjects(#10372) +py_cobjecttypes(#10372, #10005) +py_cobject_sources(#10372, 0) +py_cobjectnames(#10372, "__str__") +py_cmembers_versioned(#10354, "__str__", #10372, "2") +#10373 = @"C_type$BaseException$2__unicode__" +py_cobjects(#10373) +py_cobjecttypes(#10373, #10034) +py_cobject_sources(#10373, 0) +py_cobjectnames(#10373, "__unicode__") +py_cmembers_versioned(#10354, "__unicode__", #10373, "2") +#10374 = @"C_type$BaseException$2args" +py_cobjects(#10374) +py_cobjecttypes(#10374, #10003) +py_cobject_sources(#10374, 0) +#10375 = @"C_type$BaseException$2args$2__set__" +py_cobjects(#10375) +py_cobjecttypes(#10375, #10009) +py_cobject_sources(#10375, 0) +py_cobjectnames(#10375, "__set__") +py_cmembers_versioned(#10374, "__set__", #10375, "2") +#10376 = @"C_type$BaseException$2args$2__getattribute__" +py_cobjects(#10376) +py_cobjecttypes(#10376, #10009) +py_cobject_sources(#10376, 0) +py_cobjectnames(#10376, "__getattribute__") +py_cmembers_versioned(#10374, "__getattribute__", #10376, "2") +py_cmembers_versioned(#10374, "__objclass__", #10354, "2") +#10377 = @"C_type$BaseException$2args$2__repr__" +py_cobjects(#10377) +py_cobjecttypes(#10377, #10009) +py_cobject_sources(#10377, 0) +py_cobjectnames(#10377, "__repr__") +py_cmembers_versioned(#10374, "__repr__", #10377, "2") +#10378 = @"C_type$BaseException$2args$2__get__" +py_cobjects(#10378) +py_cobjecttypes(#10378, #10009) +py_cobject_sources(#10378, 0) +py_cobjectnames(#10378, "__get__") +py_cmembers_versioned(#10374, "__get__", #10378, "2") +py_cmembers_versioned(#10374, "__doc__", #10017, "2") +#10379 = @"C_type$BaseException$2args$2__delete__" +py_cobjects(#10379) +py_cobjecttypes(#10379, #10009) +py_cobject_sources(#10379, 0) +py_cobjectnames(#10379, "__delete__") +py_cmembers_versioned(#10374, "__delete__", #10379, "2") +py_cobjectnames(#10374, "args") +py_cmembers_versioned(#10354, "args", #10374, "2") +#10380 = @"C_type$BaseException$2message" +py_cobjects(#10380) +py_cobjecttypes(#10380, #10003) +py_cobject_sources(#10380, 0) +#10381 = @"C_type$BaseException$2message$2__set__" +py_cobjects(#10381) +py_cobjecttypes(#10381, #10009) +py_cobject_sources(#10381, 0) +py_cobjectnames(#10381, "__set__") +py_cmembers_versioned(#10380, "__set__", #10381, "2") +#10382 = @"C_type$BaseException$2message$2__getattribute__" +py_cobjects(#10382) +py_cobjecttypes(#10382, #10009) +py_cobject_sources(#10382, 0) +py_cobjectnames(#10382, "__getattribute__") +py_cmembers_versioned(#10380, "__getattribute__", #10382, "2") +py_cmembers_versioned(#10380, "__objclass__", #10354, "2") +#10383 = @"C_type$BaseException$2message$2__repr__" +py_cobjects(#10383) +py_cobjecttypes(#10383, #10009) +py_cobject_sources(#10383, 0) +py_cobjectnames(#10383, "__repr__") +py_cmembers_versioned(#10380, "__repr__", #10383, "2") +#10384 = @"C_type$BaseException$2message$2__get__" +py_cobjects(#10384) +py_cobjecttypes(#10384, #10009) +py_cobject_sources(#10384, 0) +py_cobjectnames(#10384, "__get__") +py_cmembers_versioned(#10380, "__get__", #10384, "2") +py_cmembers_versioned(#10380, "__doc__", #10017, "2") +#10385 = @"C_type$BaseException$2message$2__delete__" +py_cobjects(#10385) +py_cobjecttypes(#10385, #10009) +py_cobject_sources(#10385, 0) +py_cobjectnames(#10385, "__delete__") +py_cmembers_versioned(#10380, "__delete__", #10385, "2") +py_cobjectnames(#10380, "message") +py_cmembers_versioned(#10354, "message", #10380, "2") +py_cmembers_versioned(#10354, ".super.", #10021, "2") +py_cobjectnames(#10354, "BaseException") +py_cmembers_versioned(#10350, ".super.", #10354, "2") +py_cobjectnames(#10350, "Exception") +py_cmembers_versioned(#10346, ".super.", #10350, "2") +py_cobjectnames(#10346, "StandardError") +py_cmembers_versioned(#10342, ".super.", #10346, "2") +py_cobjectnames(#10342, "TypeError") +py_special_objects(#10342, "TypeError") +#10386 = @"C_type$dict" +py_cobjects(#10386) +py_cobjecttypes(#10386, #10001) +py_cobject_sources(#10386, 0) +#10387 = @"C_type$dict$2__cmp__" +py_cobjects(#10387) +py_cobjecttypes(#10387, #10005) +py_cobject_sources(#10387, 0) +py_cobjectnames(#10387, "__cmp__") +py_cmembers_versioned(#10386, "__cmp__", #10387, "2") +#10388 = @"C_type$dict$2__contains__" +py_cobjects(#10388) +py_cobjecttypes(#10388, #10034) +py_cobject_sources(#10388, 0) +py_cobjectnames(#10388, "__contains__") +py_cmembers_versioned(#10386, "__contains__", #10388, "2") +#10389 = @"C_type$dict$2__delitem__" +py_cobjects(#10389) +py_cobjecttypes(#10389, #10005) +py_cobject_sources(#10389, 0) +py_cobjectnames(#10389, "__delitem__") +py_cmembers_versioned(#10386, "__delitem__", #10389, "2") +#10390 = @"C_bytes$e965db2620f245e5a5538ab00a16b80b9a5dce95" +py_cobjects(#10390) +py_cobjecttypes(#10390, #10028) +py_cobject_sources(#10390, 0) +py_cobjectnames(#10390, "b'dict() -> new empty dictionary +dict(mapping) -> new dictionary initialized from a mapping object's + (key, value) pairs +dict(iterable) -> new dictionary initialized as if via: + d = {} + for k, v in iterable: + d[k] = v +dict(**kwargs) -> new dictionary initialized with the name=value pairs + in the keyword argument list. For example: dict(one=1, two=2)'") +py_cmembers_versioned(#10386, "__doc__", #10390, "2") +#10391 = @"C_type$dict$2__eq__" +py_cobjects(#10391) +py_cobjecttypes(#10391, #10005) +py_cobject_sources(#10391, 0) +py_cobjectnames(#10391, "__eq__") +py_cmembers_versioned(#10386, "__eq__", #10391, "2") +#10392 = @"C_type$dict$2__ge__" +py_cobjects(#10392) +py_cobjecttypes(#10392, #10005) +py_cobject_sources(#10392, 0) +py_cobjectnames(#10392, "__ge__") +py_cmembers_versioned(#10386, "__ge__", #10392, "2") +#10393 = @"C_type$dict$2__getattribute__" +py_cobjects(#10393) +py_cobjecttypes(#10393, #10005) +py_cobject_sources(#10393, 0) +py_cobjectnames(#10393, "__getattribute__") +py_cmembers_versioned(#10386, "__getattribute__", #10393, "2") +#10394 = @"C_type$dict$2__getitem__" +py_cobjects(#10394) +py_cobjecttypes(#10394, #10034) +py_cobject_sources(#10394, 0) +py_cobjectnames(#10394, "__getitem__") +py_cmembers_versioned(#10386, "__getitem__", #10394, "2") +#10395 = @"C_type$dict$2__gt__" +py_cobjects(#10395) +py_cobjecttypes(#10395, #10005) +py_cobject_sources(#10395, 0) +py_cobjectnames(#10395, "__gt__") +py_cmembers_versioned(#10386, "__gt__", #10395, "2") +py_cmembers_versioned(#10386, "__hash__", #10017, "2") +#10396 = @"C_type$dict$2__init__" +py_cobjects(#10396) +py_cobjecttypes(#10396, #10005) +py_cobject_sources(#10396, 0) +py_cobjectnames(#10396, "__init__") +py_cmembers_versioned(#10386, "__init__", #10396, "2") +#10397 = @"C_type$dict$2__iter__" +py_cobjects(#10397) +py_cobjecttypes(#10397, #10005) +py_cobject_sources(#10397, 0) +py_cobjectnames(#10397, "__iter__") +py_cmembers_versioned(#10386, "__iter__", #10397, "2") +#10398 = @"C_type$dict$2__le__" +py_cobjects(#10398) +py_cobjecttypes(#10398, #10005) +py_cobject_sources(#10398, 0) +py_cobjectnames(#10398, "__le__") +py_cmembers_versioned(#10386, "__le__", #10398, "2") +#10399 = @"C_type$dict$2__len__" +py_cobjects(#10399) +py_cobjecttypes(#10399, #10005) +py_cobject_sources(#10399, 0) +py_cobjectnames(#10399, "__len__") +py_cmembers_versioned(#10386, "__len__", #10399, "2") +#10400 = @"C_type$dict$2__lt__" +py_cobjects(#10400) +py_cobjecttypes(#10400, #10005) +py_cobject_sources(#10400, 0) +py_cobjectnames(#10400, "__lt__") +py_cmembers_versioned(#10386, "__lt__", #10400, "2") +#10401 = @"C_type$dict$2__ne__" +py_cobjects(#10401) +py_cobjecttypes(#10401, #10005) +py_cobject_sources(#10401, 0) +py_cobjectnames(#10401, "__ne__") +py_cmembers_versioned(#10386, "__ne__", #10401, "2") +#10402 = @"C_type$dict$2__new__" +py_cobjects(#10402) +py_cobjecttypes(#10402, #10075) +py_cobject_sources(#10402, 0) +py_cobjectnames(#10402, "__new__") +py_cmembers_versioned(#10386, "__new__", #10402, "2") +#10403 = @"C_type$dict$2__repr__" +py_cobjects(#10403) +py_cobjecttypes(#10403, #10005) +py_cobject_sources(#10403, 0) +py_cobjectnames(#10403, "__repr__") +py_cmembers_versioned(#10386, "__repr__", #10403, "2") +#10404 = @"C_type$dict$2__setitem__" +py_cobjects(#10404) +py_cobjecttypes(#10404, #10005) +py_cobject_sources(#10404, 0) +py_cobjectnames(#10404, "__setitem__") +py_cmembers_versioned(#10386, "__setitem__", #10404, "2") +#10405 = @"C_type$dict$2__sizeof__" +py_cobjects(#10405) +py_cobjecttypes(#10405, #10034) +py_cobject_sources(#10405, 0) +py_cobjectnames(#10405, "__sizeof__") +py_cmembers_versioned(#10386, "__sizeof__", #10405, "2") +#10406 = @"C_type$dict$2clear" +py_cobjects(#10406) +py_cobjecttypes(#10406, #10034) +py_cobject_sources(#10406, 0) +py_cobjectnames(#10406, "clear") +py_cmembers_versioned(#10386, "clear", #10406, "2") +#10407 = @"C_type$dict$2copy" +py_cobjects(#10407) +py_cobjecttypes(#10407, #10034) +py_cobject_sources(#10407, 0) +py_cobjectnames(#10407, "copy") +py_cmembers_versioned(#10386, "copy", #10407, "2") +#10408 = @"C_type$dict$2fromkeys" +py_cobjects(#10408) +py_cobjecttypes(#10408, #10169) +py_cobject_sources(#10408, 0) +py_cobjectnames(#10408, "fromkeys") +py_cmembers_versioned(#10386, "fromkeys", #10408, "2") +#10409 = @"C_type$dict$2get" +py_cobjects(#10409) +py_cobjecttypes(#10409, #10034) +py_cobject_sources(#10409, 0) +py_cobjectnames(#10409, "get") +py_cmembers_versioned(#10386, "get", #10409, "2") +#10410 = @"C_type$dict$2has_key" +py_cobjects(#10410) +py_cobjecttypes(#10410, #10034) +py_cobject_sources(#10410, 0) +py_cobjectnames(#10410, "has_key") +py_cmembers_versioned(#10386, "has_key", #10410, "2") +#10411 = @"C_type$dict$2items" +py_cobjects(#10411) +py_cobjecttypes(#10411, #10034) +py_cobject_sources(#10411, 0) +py_cobjectnames(#10411, "items") +py_cmembers_versioned(#10386, "items", #10411, "2") +#10412 = @"C_type$dict$2iteritems" +py_cobjects(#10412) +py_cobjecttypes(#10412, #10034) +py_cobject_sources(#10412, 0) +py_cobjectnames(#10412, "iteritems") +py_cmembers_versioned(#10386, "iteritems", #10412, "2") +#10413 = @"C_type$dict$2iterkeys" +py_cobjects(#10413) +py_cobjecttypes(#10413, #10034) +py_cobject_sources(#10413, 0) +py_cobjectnames(#10413, "iterkeys") +py_cmembers_versioned(#10386, "iterkeys", #10413, "2") +#10414 = @"C_type$dict$2itervalues" +py_cobjects(#10414) +py_cobjecttypes(#10414, #10034) +py_cobject_sources(#10414, 0) +py_cobjectnames(#10414, "itervalues") +py_cmembers_versioned(#10386, "itervalues", #10414, "2") +#10415 = @"C_type$dict$2keys" +py_cobjects(#10415) +py_cobjecttypes(#10415, #10034) +py_cobject_sources(#10415, 0) +py_cobjectnames(#10415, "keys") +py_cmembers_versioned(#10386, "keys", #10415, "2") +#10416 = @"C_type$dict$2pop" +py_cobjects(#10416) +py_cobjecttypes(#10416, #10034) +py_cobject_sources(#10416, 0) +py_cobjectnames(#10416, "pop") +py_cmembers_versioned(#10386, "pop", #10416, "2") +#10417 = @"C_type$dict$2popitem" +py_cobjects(#10417) +py_cobjecttypes(#10417, #10034) +py_cobject_sources(#10417, 0) +py_cobjectnames(#10417, "popitem") +py_cmembers_versioned(#10386, "popitem", #10417, "2") +#10418 = @"C_type$dict$2setdefault" +py_cobjects(#10418) +py_cobjecttypes(#10418, #10034) +py_cobject_sources(#10418, 0) +py_cobjectnames(#10418, "setdefault") +py_cmembers_versioned(#10386, "setdefault", #10418, "2") +#10419 = @"C_type$dict$2update" +py_cobjects(#10419) +py_cobjecttypes(#10419, #10034) +py_cobject_sources(#10419, 0) +py_cobjectnames(#10419, "update") +py_cmembers_versioned(#10386, "update", #10419, "2") +#10420 = @"C_type$dict$2values" +py_cobjects(#10420) +py_cobjecttypes(#10420, #10034) +py_cobject_sources(#10420, 0) +py_cobjectnames(#10420, "values") +py_cmembers_versioned(#10386, "values", #10420, "2") +#10421 = @"C_type$dict$2viewitems" +py_cobjects(#10421) +py_cobjecttypes(#10421, #10034) +py_cobject_sources(#10421, 0) +py_cobjectnames(#10421, "viewitems") +py_cmembers_versioned(#10386, "viewitems", #10421, "2") +#10422 = @"C_type$dict$2viewkeys" +py_cobjects(#10422) +py_cobjecttypes(#10422, #10034) +py_cobject_sources(#10422, 0) +py_cobjectnames(#10422, "viewkeys") +py_cmembers_versioned(#10386, "viewkeys", #10422, "2") +#10423 = @"C_type$dict$2viewvalues" +py_cobjects(#10423) +py_cobjecttypes(#10423, #10034) +py_cobject_sources(#10423, 0) +py_cobjectnames(#10423, "viewvalues") +py_cmembers_versioned(#10386, "viewvalues", #10423, "2") +py_cmembers_versioned(#10386, ".super.", #10021, "2") +py_cobjectnames(#10386, "dict") +py_special_objects(#10386, "dict") +#10424 = @"C_type$KeyError" +py_cobjects(#10424) +py_cobjecttypes(#10424, #10001) +py_cobject_sources(#10424, 0) +#10425 = @"C_bytes$1bf40bf04fb389deaff59b33a134bd476cbe9941" +py_cobjects(#10425) +py_cobjecttypes(#10425, #10028) +py_cobject_sources(#10425, 0) +py_cobjectnames(#10425, "b'Mapping key not found.'") +py_cmembers_versioned(#10424, "__doc__", #10425, "2") +#10426 = @"C_type$KeyError$2__init__" +py_cobjects(#10426) +py_cobjecttypes(#10426, #10005) +py_cobject_sources(#10426, 0) +py_cobjectnames(#10426, "__init__") +py_cmembers_versioned(#10424, "__init__", #10426, "2") +#10427 = @"C_type$KeyError$2__new__" +py_cobjects(#10427) +py_cobjecttypes(#10427, #10075) +py_cobject_sources(#10427, 0) +py_cobjectnames(#10427, "__new__") +py_cmembers_versioned(#10424, "__new__", #10427, "2") +#10428 = @"C_type$KeyError$2__str__" +py_cobjects(#10428) +py_cobjecttypes(#10428, #10005) +py_cobject_sources(#10428, 0) +py_cobjectnames(#10428, "__str__") +py_cmembers_versioned(#10424, "__str__", #10428, "2") +#10429 = @"C_type$LookupError" +py_cobjects(#10429) +py_cobjecttypes(#10429, #10001) +py_cobject_sources(#10429, 0) +#10430 = @"C_bytes$9f990a862570cd714fcc0cff7871930d3846fee2" +py_cobjects(#10430) +py_cobjecttypes(#10430, #10028) +py_cobject_sources(#10430, 0) +py_cobjectnames(#10430, "b'Base class for lookup errors.'") +py_cmembers_versioned(#10429, "__doc__", #10430, "2") +#10431 = @"C_type$LookupError$2__init__" +py_cobjects(#10431) +py_cobjecttypes(#10431, #10005) +py_cobject_sources(#10431, 0) +py_cobjectnames(#10431, "__init__") +py_cmembers_versioned(#10429, "__init__", #10431, "2") +#10432 = @"C_type$LookupError$2__new__" +py_cobjects(#10432) +py_cobjecttypes(#10432, #10075) +py_cobject_sources(#10432, 0) +py_cobjectnames(#10432, "__new__") +py_cmembers_versioned(#10429, "__new__", #10432, "2") +py_cmembers_versioned(#10429, ".super.", #10346, "2") +py_cobjectnames(#10429, "LookupError") +py_cmembers_versioned(#10424, ".super.", #10429, "2") +py_cobjectnames(#10424, "KeyError") +py_special_objects(#10424, "KeyError") +#10433 = @"C_type$AttributeError" +py_cobjects(#10433) +py_cobjecttypes(#10433, #10001) +py_cobject_sources(#10433, 0) +#10434 = @"C_bytes$764af14d0af6210240b10ad4ed1a62054153f7b3" +py_cobjects(#10434) +py_cobjecttypes(#10434, #10028) +py_cobject_sources(#10434, 0) +py_cobjectnames(#10434, "b'Attribute not found.'") +py_cmembers_versioned(#10433, "__doc__", #10434, "2") +#10435 = @"C_type$AttributeError$2__init__" +py_cobjects(#10435) +py_cobjecttypes(#10435, #10005) +py_cobject_sources(#10435, 0) +py_cobjectnames(#10435, "__init__") +py_cmembers_versioned(#10433, "__init__", #10435, "2") +#10436 = @"C_type$AttributeError$2__new__" +py_cobjects(#10436) +py_cobjecttypes(#10436, #10075) +py_cobject_sources(#10436, 0) +py_cobjectnames(#10436, "__new__") +py_cmembers_versioned(#10433, "__new__", #10436, "2") +py_cmembers_versioned(#10433, ".super.", #10346, "2") +py_cobjectnames(#10433, "AttributeError") +py_special_objects(#10433, "AttributeError") +py_special_objects(#10034, "MethodDescriptorType") +#10437 = @"C_bool$True" +#10438 = @"C_type$bool" +py_cobjects(#10438) +py_cobjecttypes(#10438, #10001) +py_cobject_sources(#10438, 0) +#10439 = @"C_type$bool$2__and__" +py_cobjects(#10439) +py_cobjecttypes(#10439, #10005) +py_cobject_sources(#10439, 0) +py_cobjectnames(#10439, "__and__") +py_cmembers_versioned(#10438, "__and__", #10439, "2") +#10440 = @"C_bytes$2aa545b06094da6ed43e51b4261838ea756ee783" +py_cobjects(#10440) +py_cobjecttypes(#10440, #10028) +py_cobject_sources(#10440, 0) +py_cobjectnames(#10440, "b'bool(x) -> bool + +Returns True when the argument x is true, False otherwise. +The builtins True and False are the only two instances of the class bool. +The class bool is a subclass of the class int, and cannot be subclassed.'") +py_cmembers_versioned(#10438, "__doc__", #10440, "2") +#10441 = @"C_type$bool$2__new__" +py_cobjects(#10441) +py_cobjecttypes(#10441, #10075) +py_cobject_sources(#10441, 0) +py_cobjectnames(#10441, "__new__") +py_cmembers_versioned(#10438, "__new__", #10441, "2") +#10442 = @"C_type$bool$2__or__" +py_cobjects(#10442) +py_cobjecttypes(#10442, #10005) +py_cobject_sources(#10442, 0) +py_cobjectnames(#10442, "__or__") +py_cmembers_versioned(#10438, "__or__", #10442, "2") +#10443 = @"C_type$bool$2__rand__" +py_cobjects(#10443) +py_cobjecttypes(#10443, #10005) +py_cobject_sources(#10443, 0) +py_cobjectnames(#10443, "__rand__") +py_cmembers_versioned(#10438, "__rand__", #10443, "2") +#10444 = @"C_type$bool$2__repr__" +py_cobjects(#10444) +py_cobjecttypes(#10444, #10005) +py_cobject_sources(#10444, 0) +py_cobjectnames(#10444, "__repr__") +py_cmembers_versioned(#10438, "__repr__", #10444, "2") +#10445 = @"C_type$bool$2__ror__" +py_cobjects(#10445) +py_cobjecttypes(#10445, #10005) +py_cobject_sources(#10445, 0) +py_cobjectnames(#10445, "__ror__") +py_cmembers_versioned(#10438, "__ror__", #10445, "2") +#10446 = @"C_type$bool$2__rxor__" +py_cobjects(#10446) +py_cobjecttypes(#10446, #10005) +py_cobject_sources(#10446, 0) +py_cobjectnames(#10446, "__rxor__") +py_cmembers_versioned(#10438, "__rxor__", #10446, "2") +#10447 = @"C_type$bool$2__str__" +py_cobjects(#10447) +py_cobjecttypes(#10447, #10005) +py_cobject_sources(#10447, 0) +py_cobjectnames(#10447, "__str__") +py_cmembers_versioned(#10438, "__str__", #10447, "2") +#10448 = @"C_type$bool$2__xor__" +py_cobjects(#10448) +py_cobjecttypes(#10448, #10005) +py_cobject_sources(#10448, 0) +py_cobjectnames(#10448, "__xor__") +py_cmembers_versioned(#10438, "__xor__", #10448, "2") +#10449 = @"C_type$int" +py_cobjects(#10449) +py_cobjecttypes(#10449, #10001) +py_cobject_sources(#10449, 0) +#10450 = @"C_type$int$2__abs__" +py_cobjects(#10450) +py_cobjecttypes(#10450, #10005) +py_cobject_sources(#10450, 0) +py_cobjectnames(#10450, "__abs__") +py_cmembers_versioned(#10449, "__abs__", #10450, "2") +#10451 = @"C_type$int$2__add__" +py_cobjects(#10451) +py_cobjecttypes(#10451, #10005) +py_cobject_sources(#10451, 0) +py_cobjectnames(#10451, "__add__") +py_cmembers_versioned(#10449, "__add__", #10451, "2") +#10452 = @"C_type$int$2__and__" +py_cobjects(#10452) +py_cobjecttypes(#10452, #10005) +py_cobject_sources(#10452, 0) +py_cobjectnames(#10452, "__and__") +py_cmembers_versioned(#10449, "__and__", #10452, "2") +#10453 = @"C_type$int$2__cmp__" +py_cobjects(#10453) +py_cobjecttypes(#10453, #10005) +py_cobject_sources(#10453, 0) +py_cobjectnames(#10453, "__cmp__") +py_cmembers_versioned(#10449, "__cmp__", #10453, "2") +#10454 = @"C_type$int$2__coerce__" +py_cobjects(#10454) +py_cobjecttypes(#10454, #10005) +py_cobject_sources(#10454, 0) +py_cobjectnames(#10454, "__coerce__") +py_cmembers_versioned(#10449, "__coerce__", #10454, "2") +#10455 = @"C_type$int$2__div__" +py_cobjects(#10455) +py_cobjecttypes(#10455, #10005) +py_cobject_sources(#10455, 0) +py_cobjectnames(#10455, "__div__") +py_cmembers_versioned(#10449, "__div__", #10455, "2") +#10456 = @"C_type$int$2__divmod__" +py_cobjects(#10456) +py_cobjecttypes(#10456, #10005) +py_cobject_sources(#10456, 0) +py_cobjectnames(#10456, "__divmod__") +py_cmembers_versioned(#10449, "__divmod__", #10456, "2") +#10457 = @"C_bytes$ae429bd9441797e46a500607a0749fd432c18680" +py_cobjects(#10457) +py_cobjecttypes(#10457, #10028) +py_cobject_sources(#10457, 0) +py_cobjectnames(#10457, "b'int(x=0) -> int or long +int(x, base=10) -> int or long + +Convert a number or string to an integer, or return 0 if no arguments +are given. If x is floating point, the conversion truncates towards zero. +If x is outside the integer range, the function returns a long instead. + +If x is not a number or if base is given, then x must be a string or +Unicode object representing an integer literal in the given base. The +literal can be preceded by '+' or '-' and be surrounded by whitespace. +The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to +interpret the base from the string as an integer literal. +>>> int('0b100', base=0) +4'") +py_cmembers_versioned(#10449, "__doc__", #10457, "2") +#10458 = @"C_type$int$2__float__" +py_cobjects(#10458) +py_cobjecttypes(#10458, #10005) +py_cobject_sources(#10458, 0) +py_cobjectnames(#10458, "__float__") +py_cmembers_versioned(#10449, "__float__", #10458, "2") +#10459 = @"C_type$int$2__floordiv__" +py_cobjects(#10459) +py_cobjecttypes(#10459, #10005) +py_cobject_sources(#10459, 0) +py_cobjectnames(#10459, "__floordiv__") +py_cmembers_versioned(#10449, "__floordiv__", #10459, "2") +#10460 = @"C_type$int$2__format__" +py_cobjects(#10460) +py_cobjecttypes(#10460, #10034) +py_cobject_sources(#10460, 0) +py_cobjectnames(#10460, "__format__") +py_cmembers_versioned(#10449, "__format__", #10460, "2") +#10461 = @"C_type$int$2__getattribute__" +py_cobjects(#10461) +py_cobjecttypes(#10461, #10005) +py_cobject_sources(#10461, 0) +py_cobjectnames(#10461, "__getattribute__") +py_cmembers_versioned(#10449, "__getattribute__", #10461, "2") +#10462 = @"C_type$int$2__getnewargs__" +py_cobjects(#10462) +py_cobjecttypes(#10462, #10034) +py_cobject_sources(#10462, 0) +py_cobjectnames(#10462, "__getnewargs__") +py_cmembers_versioned(#10449, "__getnewargs__", #10462, "2") +#10463 = @"C_type$int$2__hash__" +py_cobjects(#10463) +py_cobjecttypes(#10463, #10005) +py_cobject_sources(#10463, 0) +py_cobjectnames(#10463, "__hash__") +py_cmembers_versioned(#10449, "__hash__", #10463, "2") +#10464 = @"C_type$int$2__hex__" +py_cobjects(#10464) +py_cobjecttypes(#10464, #10005) +py_cobject_sources(#10464, 0) +py_cobjectnames(#10464, "__hex__") +py_cmembers_versioned(#10449, "__hex__", #10464, "2") +#10465 = @"C_type$int$2__index__" +py_cobjects(#10465) +py_cobjecttypes(#10465, #10005) +py_cobject_sources(#10465, 0) +py_cobjectnames(#10465, "__index__") +py_cmembers_versioned(#10449, "__index__", #10465, "2") +#10466 = @"C_type$int$2__int__" +py_cobjects(#10466) +py_cobjecttypes(#10466, #10005) +py_cobject_sources(#10466, 0) +py_cobjectnames(#10466, "__int__") +py_cmembers_versioned(#10449, "__int__", #10466, "2") +#10467 = @"C_type$int$2__invert__" +py_cobjects(#10467) +py_cobjecttypes(#10467, #10005) +py_cobject_sources(#10467, 0) +py_cobjectnames(#10467, "__invert__") +py_cmembers_versioned(#10449, "__invert__", #10467, "2") +#10468 = @"C_type$int$2__long__" +py_cobjects(#10468) +py_cobjecttypes(#10468, #10005) +py_cobject_sources(#10468, 0) +py_cobjectnames(#10468, "__long__") +py_cmembers_versioned(#10449, "__long__", #10468, "2") +#10469 = @"C_type$int$2__lshift__" +py_cobjects(#10469) +py_cobjecttypes(#10469, #10005) +py_cobject_sources(#10469, 0) +py_cobjectnames(#10469, "__lshift__") +py_cmembers_versioned(#10449, "__lshift__", #10469, "2") +#10470 = @"C_type$int$2__mod__" +py_cobjects(#10470) +py_cobjecttypes(#10470, #10005) +py_cobject_sources(#10470, 0) +py_cobjectnames(#10470, "__mod__") +py_cmembers_versioned(#10449, "__mod__", #10470, "2") +#10471 = @"C_type$int$2__mul__" +py_cobjects(#10471) +py_cobjecttypes(#10471, #10005) +py_cobject_sources(#10471, 0) +py_cobjectnames(#10471, "__mul__") +py_cmembers_versioned(#10449, "__mul__", #10471, "2") +#10472 = @"C_type$int$2__neg__" +py_cobjects(#10472) +py_cobjecttypes(#10472, #10005) +py_cobject_sources(#10472, 0) +py_cobjectnames(#10472, "__neg__") +py_cmembers_versioned(#10449, "__neg__", #10472, "2") +#10473 = @"C_type$int$2__new__" +py_cobjects(#10473) +py_cobjecttypes(#10473, #10075) +py_cobject_sources(#10473, 0) +py_cobjectnames(#10473, "__new__") +py_cmembers_versioned(#10449, "__new__", #10473, "2") +#10474 = @"C_type$int$2__nonzero__" +py_cobjects(#10474) +py_cobjecttypes(#10474, #10005) +py_cobject_sources(#10474, 0) +py_cobjectnames(#10474, "__nonzero__") +py_cmembers_versioned(#10449, "__nonzero__", #10474, "2") +#10475 = @"C_type$int$2__oct__" +py_cobjects(#10475) +py_cobjecttypes(#10475, #10005) +py_cobject_sources(#10475, 0) +py_cobjectnames(#10475, "__oct__") +py_cmembers_versioned(#10449, "__oct__", #10475, "2") +#10476 = @"C_type$int$2__or__" +py_cobjects(#10476) +py_cobjecttypes(#10476, #10005) +py_cobject_sources(#10476, 0) +py_cobjectnames(#10476, "__or__") +py_cmembers_versioned(#10449, "__or__", #10476, "2") +#10477 = @"C_type$int$2__pos__" +py_cobjects(#10477) +py_cobjecttypes(#10477, #10005) +py_cobject_sources(#10477, 0) +py_cobjectnames(#10477, "__pos__") +py_cmembers_versioned(#10449, "__pos__", #10477, "2") +#10478 = @"C_type$int$2__pow__" +py_cobjects(#10478) +py_cobjecttypes(#10478, #10005) +py_cobject_sources(#10478, 0) +py_cobjectnames(#10478, "__pow__") +py_cmembers_versioned(#10449, "__pow__", #10478, "2") +#10479 = @"C_type$int$2__radd__" +py_cobjects(#10479) +py_cobjecttypes(#10479, #10005) +py_cobject_sources(#10479, 0) +py_cobjectnames(#10479, "__radd__") +py_cmembers_versioned(#10449, "__radd__", #10479, "2") +#10480 = @"C_type$int$2__rand__" +py_cobjects(#10480) +py_cobjecttypes(#10480, #10005) +py_cobject_sources(#10480, 0) +py_cobjectnames(#10480, "__rand__") +py_cmembers_versioned(#10449, "__rand__", #10480, "2") +#10481 = @"C_type$int$2__rdiv__" +py_cobjects(#10481) +py_cobjecttypes(#10481, #10005) +py_cobject_sources(#10481, 0) +py_cobjectnames(#10481, "__rdiv__") +py_cmembers_versioned(#10449, "__rdiv__", #10481, "2") +#10482 = @"C_type$int$2__rdivmod__" +py_cobjects(#10482) +py_cobjecttypes(#10482, #10005) +py_cobject_sources(#10482, 0) +py_cobjectnames(#10482, "__rdivmod__") +py_cmembers_versioned(#10449, "__rdivmod__", #10482, "2") +#10483 = @"C_type$int$2__repr__" +py_cobjects(#10483) +py_cobjecttypes(#10483, #10005) +py_cobject_sources(#10483, 0) +py_cobjectnames(#10483, "__repr__") +py_cmembers_versioned(#10449, "__repr__", #10483, "2") +#10484 = @"C_type$int$2__rfloordiv__" +py_cobjects(#10484) +py_cobjecttypes(#10484, #10005) +py_cobject_sources(#10484, 0) +py_cobjectnames(#10484, "__rfloordiv__") +py_cmembers_versioned(#10449, "__rfloordiv__", #10484, "2") +#10485 = @"C_type$int$2__rlshift__" +py_cobjects(#10485) +py_cobjecttypes(#10485, #10005) +py_cobject_sources(#10485, 0) +py_cobjectnames(#10485, "__rlshift__") +py_cmembers_versioned(#10449, "__rlshift__", #10485, "2") +#10486 = @"C_type$int$2__rmod__" +py_cobjects(#10486) +py_cobjecttypes(#10486, #10005) +py_cobject_sources(#10486, 0) +py_cobjectnames(#10486, "__rmod__") +py_cmembers_versioned(#10449, "__rmod__", #10486, "2") +#10487 = @"C_type$int$2__rmul__" +py_cobjects(#10487) +py_cobjecttypes(#10487, #10005) +py_cobject_sources(#10487, 0) +py_cobjectnames(#10487, "__rmul__") +py_cmembers_versioned(#10449, "__rmul__", #10487, "2") +#10488 = @"C_type$int$2__ror__" +py_cobjects(#10488) +py_cobjecttypes(#10488, #10005) +py_cobject_sources(#10488, 0) +py_cobjectnames(#10488, "__ror__") +py_cmembers_versioned(#10449, "__ror__", #10488, "2") +#10489 = @"C_type$int$2__rpow__" +py_cobjects(#10489) +py_cobjecttypes(#10489, #10005) +py_cobject_sources(#10489, 0) +py_cobjectnames(#10489, "__rpow__") +py_cmembers_versioned(#10449, "__rpow__", #10489, "2") +#10490 = @"C_type$int$2__rrshift__" +py_cobjects(#10490) +py_cobjecttypes(#10490, #10005) +py_cobject_sources(#10490, 0) +py_cobjectnames(#10490, "__rrshift__") +py_cmembers_versioned(#10449, "__rrshift__", #10490, "2") +#10491 = @"C_type$int$2__rshift__" +py_cobjects(#10491) +py_cobjecttypes(#10491, #10005) +py_cobject_sources(#10491, 0) +py_cobjectnames(#10491, "__rshift__") +py_cmembers_versioned(#10449, "__rshift__", #10491, "2") +#10492 = @"C_type$int$2__rsub__" +py_cobjects(#10492) +py_cobjecttypes(#10492, #10005) +py_cobject_sources(#10492, 0) +py_cobjectnames(#10492, "__rsub__") +py_cmembers_versioned(#10449, "__rsub__", #10492, "2") +#10493 = @"C_type$int$2__rtruediv__" +py_cobjects(#10493) +py_cobjecttypes(#10493, #10005) +py_cobject_sources(#10493, 0) +py_cobjectnames(#10493, "__rtruediv__") +py_cmembers_versioned(#10449, "__rtruediv__", #10493, "2") +#10494 = @"C_type$int$2__rxor__" +py_cobjects(#10494) +py_cobjecttypes(#10494, #10005) +py_cobject_sources(#10494, 0) +py_cobjectnames(#10494, "__rxor__") +py_cmembers_versioned(#10449, "__rxor__", #10494, "2") +#10495 = @"C_type$int$2__str__" +py_cobjects(#10495) +py_cobjecttypes(#10495, #10005) +py_cobject_sources(#10495, 0) +py_cobjectnames(#10495, "__str__") +py_cmembers_versioned(#10449, "__str__", #10495, "2") +#10496 = @"C_type$int$2__sub__" +py_cobjects(#10496) +py_cobjecttypes(#10496, #10005) +py_cobject_sources(#10496, 0) +py_cobjectnames(#10496, "__sub__") +py_cmembers_versioned(#10449, "__sub__", #10496, "2") +#10497 = @"C_type$int$2__truediv__" +py_cobjects(#10497) +py_cobjecttypes(#10497, #10005) +py_cobject_sources(#10497, 0) +py_cobjectnames(#10497, "__truediv__") +py_cmembers_versioned(#10449, "__truediv__", #10497, "2") +#10498 = @"C_type$int$2__trunc__" +py_cobjects(#10498) +py_cobjecttypes(#10498, #10034) +py_cobject_sources(#10498, 0) +py_cobjectnames(#10498, "__trunc__") +py_cmembers_versioned(#10449, "__trunc__", #10498, "2") +#10499 = @"C_type$int$2__xor__" +py_cobjects(#10499) +py_cobjecttypes(#10499, #10005) +py_cobject_sources(#10499, 0) +py_cobjectnames(#10499, "__xor__") +py_cmembers_versioned(#10449, "__xor__", #10499, "2") +#10500 = @"C_type$int$2bit_length" +py_cobjects(#10500) +py_cobjecttypes(#10500, #10034) +py_cobject_sources(#10500, 0) +py_cobjectnames(#10500, "bit_length") +py_cmembers_versioned(#10449, "bit_length", #10500, "2") +#10501 = @"C_type$int$2conjugate" +py_cobjects(#10501) +py_cobjecttypes(#10501, #10034) +py_cobject_sources(#10501, 0) +py_cobjectnames(#10501, "conjugate") +py_cmembers_versioned(#10449, "conjugate", #10501, "2") +#10502 = @"C_type$int$2denominator" +py_cobjects(#10502) +py_cobjecttypes(#10502, #10003) +py_cobject_sources(#10502, 0) +#10503 = @"C_type$int$2denominator$2__set__" +py_cobjects(#10503) +py_cobjecttypes(#10503, #10009) +py_cobject_sources(#10503, 0) +py_cobjectnames(#10503, "__set__") +py_cmembers_versioned(#10502, "__set__", #10503, "2") +#10504 = @"C_type$int$2denominator$2__getattribute__" +py_cobjects(#10504) +py_cobjecttypes(#10504, #10009) +py_cobject_sources(#10504, 0) +py_cobjectnames(#10504, "__getattribute__") +py_cmembers_versioned(#10502, "__getattribute__", #10504, "2") +py_cmembers_versioned(#10502, "__objclass__", #10449, "2") +#10505 = @"C_type$int$2denominator$2__repr__" +py_cobjects(#10505) +py_cobjecttypes(#10505, #10009) +py_cobject_sources(#10505, 0) +py_cobjectnames(#10505, "__repr__") +py_cmembers_versioned(#10502, "__repr__", #10505, "2") +#10506 = @"C_type$int$2denominator$2__get__" +py_cobjects(#10506) +py_cobjecttypes(#10506, #10009) +py_cobject_sources(#10506, 0) +py_cobjectnames(#10506, "__get__") +py_cmembers_versioned(#10502, "__get__", #10506, "2") +#10507 = @"C_bytes$d787ec075c36417b3622538483449d06564bf83c" +py_cobjects(#10507) +py_cobjecttypes(#10507, #10028) +py_cobject_sources(#10507, 0) +py_cobjectnames(#10507, "b'the denominator of a rational number in lowest terms'") +py_cmembers_versioned(#10502, "__doc__", #10507, "2") +#10508 = @"C_type$int$2denominator$2__delete__" +py_cobjects(#10508) +py_cobjecttypes(#10508, #10009) +py_cobject_sources(#10508, 0) +py_cobjectnames(#10508, "__delete__") +py_cmembers_versioned(#10502, "__delete__", #10508, "2") +py_cobjectnames(#10502, "denominator") +py_cmembers_versioned(#10449, "denominator", #10502, "2") +#10509 = @"C_type$int$2imag" +py_cobjects(#10509) +py_cobjecttypes(#10509, #10003) +py_cobject_sources(#10509, 0) +#10510 = @"C_type$int$2imag$2__set__" +py_cobjects(#10510) +py_cobjecttypes(#10510, #10009) +py_cobject_sources(#10510, 0) +py_cobjectnames(#10510, "__set__") +py_cmembers_versioned(#10509, "__set__", #10510, "2") +#10511 = @"C_type$int$2imag$2__getattribute__" +py_cobjects(#10511) +py_cobjecttypes(#10511, #10009) +py_cobject_sources(#10511, 0) +py_cobjectnames(#10511, "__getattribute__") +py_cmembers_versioned(#10509, "__getattribute__", #10511, "2") +py_cmembers_versioned(#10509, "__objclass__", #10449, "2") +#10512 = @"C_type$int$2imag$2__repr__" +py_cobjects(#10512) +py_cobjecttypes(#10512, #10009) +py_cobject_sources(#10512, 0) +py_cobjectnames(#10512, "__repr__") +py_cmembers_versioned(#10509, "__repr__", #10512, "2") +#10513 = @"C_type$int$2imag$2__get__" +py_cobjects(#10513) +py_cobjecttypes(#10513, #10009) +py_cobject_sources(#10513, 0) +py_cobjectnames(#10513, "__get__") +py_cmembers_versioned(#10509, "__get__", #10513, "2") +#10514 = @"C_bytes$1697c2b9b4c10d325b12cf3fded2fbfc0e15d5f0" +py_cobjects(#10514) +py_cobjecttypes(#10514, #10028) +py_cobject_sources(#10514, 0) +py_cobjectnames(#10514, "b'the imaginary part of a complex number'") +py_cmembers_versioned(#10509, "__doc__", #10514, "2") +#10515 = @"C_type$int$2imag$2__delete__" +py_cobjects(#10515) +py_cobjecttypes(#10515, #10009) +py_cobject_sources(#10515, 0) +py_cobjectnames(#10515, "__delete__") +py_cmembers_versioned(#10509, "__delete__", #10515, "2") +py_cobjectnames(#10509, "imag") +py_cmembers_versioned(#10449, "imag", #10509, "2") +#10516 = @"C_type$int$2numerator" +py_cobjects(#10516) +py_cobjecttypes(#10516, #10003) +py_cobject_sources(#10516, 0) +#10517 = @"C_type$int$2numerator$2__set__" +py_cobjects(#10517) +py_cobjecttypes(#10517, #10009) +py_cobject_sources(#10517, 0) +py_cobjectnames(#10517, "__set__") +py_cmembers_versioned(#10516, "__set__", #10517, "2") +#10518 = @"C_type$int$2numerator$2__getattribute__" +py_cobjects(#10518) +py_cobjecttypes(#10518, #10009) +py_cobject_sources(#10518, 0) +py_cobjectnames(#10518, "__getattribute__") +py_cmembers_versioned(#10516, "__getattribute__", #10518, "2") +py_cmembers_versioned(#10516, "__objclass__", #10449, "2") +#10519 = @"C_type$int$2numerator$2__repr__" +py_cobjects(#10519) +py_cobjecttypes(#10519, #10009) +py_cobject_sources(#10519, 0) +py_cobjectnames(#10519, "__repr__") +py_cmembers_versioned(#10516, "__repr__", #10519, "2") +#10520 = @"C_type$int$2numerator$2__get__" +py_cobjects(#10520) +py_cobjecttypes(#10520, #10009) +py_cobject_sources(#10520, 0) +py_cobjectnames(#10520, "__get__") +py_cmembers_versioned(#10516, "__get__", #10520, "2") +#10521 = @"C_bytes$b003a2de50c1e2b9c0432a073236cd9864f791cb" +py_cobjects(#10521) +py_cobjecttypes(#10521, #10028) +py_cobject_sources(#10521, 0) +py_cobjectnames(#10521, "b'the numerator of a rational number in lowest terms'") +py_cmembers_versioned(#10516, "__doc__", #10521, "2") +#10522 = @"C_type$int$2numerator$2__delete__" +py_cobjects(#10522) +py_cobjecttypes(#10522, #10009) +py_cobject_sources(#10522, 0) +py_cobjectnames(#10522, "__delete__") +py_cmembers_versioned(#10516, "__delete__", #10522, "2") +py_cobjectnames(#10516, "numerator") +py_cmembers_versioned(#10449, "numerator", #10516, "2") +#10523 = @"C_type$int$2real" +py_cobjects(#10523) +py_cobjecttypes(#10523, #10003) +py_cobject_sources(#10523, 0) +#10524 = @"C_type$int$2real$2__set__" +py_cobjects(#10524) +py_cobjecttypes(#10524, #10009) +py_cobject_sources(#10524, 0) +py_cobjectnames(#10524, "__set__") +py_cmembers_versioned(#10523, "__set__", #10524, "2") +#10525 = @"C_type$int$2real$2__getattribute__" +py_cobjects(#10525) +py_cobjecttypes(#10525, #10009) +py_cobject_sources(#10525, 0) +py_cobjectnames(#10525, "__getattribute__") +py_cmembers_versioned(#10523, "__getattribute__", #10525, "2") +py_cmembers_versioned(#10523, "__objclass__", #10449, "2") +#10526 = @"C_type$int$2real$2__repr__" +py_cobjects(#10526) +py_cobjecttypes(#10526, #10009) +py_cobject_sources(#10526, 0) +py_cobjectnames(#10526, "__repr__") +py_cmembers_versioned(#10523, "__repr__", #10526, "2") +#10527 = @"C_type$int$2real$2__get__" +py_cobjects(#10527) +py_cobjecttypes(#10527, #10009) +py_cobject_sources(#10527, 0) +py_cobjectnames(#10527, "__get__") +py_cmembers_versioned(#10523, "__get__", #10527, "2") +#10528 = @"C_bytes$2cb527e0bacedb07e674d6e9890d3d2ab1a8f487" +py_cobjects(#10528) +py_cobjecttypes(#10528, #10028) +py_cobject_sources(#10528, 0) +py_cobjectnames(#10528, "b'the real part of a complex number'") +py_cmembers_versioned(#10523, "__doc__", #10528, "2") +#10529 = @"C_type$int$2real$2__delete__" +py_cobjects(#10529) +py_cobjecttypes(#10529, #10009) +py_cobject_sources(#10529, 0) +py_cobjectnames(#10529, "__delete__") +py_cmembers_versioned(#10523, "__delete__", #10529, "2") +py_cobjectnames(#10523, "real") +py_cmembers_versioned(#10449, "real", #10523, "2") +py_cmembers_versioned(#10449, ".super.", #10021, "2") +py_cobjectnames(#10449, "int") +py_cmembers_versioned(#10438, ".super.", #10449, "2") +py_cobjectnames(#10438, "bool") +py_cobjects(#10437) +py_cobjecttypes(#10437, #10438) +py_cobject_sources(#10437, 0) +py_cobjectnames(#10437, "True") +py_special_objects(#10437, "True") +#10530 = @"C_builtin_function_or_method$builtins.globals" +py_cobjects(#10530) +py_cobjecttypes(#10530, #10075) +py_cobject_sources(#10530, 0) +py_cobjectnames(#10530, "globals") +py_special_objects(#10530, "globals") +#10531 = * +py_cobjects(#10531) +py_cobjecttypes(#10531, #10021) +py_cobject_sources(#10531, 0) +py_cobjectnames(#10531, "object") +py_special_objects(#10531, "_1") +#10532 = @"C_type$instance" +py_cobjects(#10532) +py_cobjecttypes(#10532, #10001) +py_cobject_sources(#10532, 0) +#10533 = @"C_type$instance$2__abs__" +py_cobjects(#10533) +py_cobjecttypes(#10533, #10005) +py_cobject_sources(#10533, 0) +py_cobjectnames(#10533, "__abs__") +py_cmembers_versioned(#10532, "__abs__", #10533, "2") +#10534 = @"C_type$instance$2__add__" +py_cobjects(#10534) +py_cobjecttypes(#10534, #10005) +py_cobject_sources(#10534, 0) +py_cobjectnames(#10534, "__add__") +py_cmembers_versioned(#10532, "__add__", #10534, "2") +#10535 = @"C_type$instance$2__and__" +py_cobjects(#10535) +py_cobjecttypes(#10535, #10005) +py_cobject_sources(#10535, 0) +py_cobjectnames(#10535, "__and__") +py_cmembers_versioned(#10532, "__and__", #10535, "2") +#10536 = @"C_type$instance$2__call__" +py_cobjects(#10536) +py_cobjecttypes(#10536, #10005) +py_cobject_sources(#10536, 0) +py_cobjectnames(#10536, "__call__") +py_cmembers_versioned(#10532, "__call__", #10536, "2") +#10537 = @"C_type$instance$2__cmp__" +py_cobjects(#10537) +py_cobjecttypes(#10537, #10005) +py_cobject_sources(#10537, 0) +py_cobjectnames(#10537, "__cmp__") +py_cmembers_versioned(#10532, "__cmp__", #10537, "2") +#10538 = @"C_type$instance$2__coerce__" +py_cobjects(#10538) +py_cobjecttypes(#10538, #10005) +py_cobject_sources(#10538, 0) +py_cobjectnames(#10538, "__coerce__") +py_cmembers_versioned(#10532, "__coerce__", #10538, "2") +#10539 = @"C_type$instance$2__contains__" +py_cobjects(#10539) +py_cobjecttypes(#10539, #10005) +py_cobject_sources(#10539, 0) +py_cobjectnames(#10539, "__contains__") +py_cmembers_versioned(#10532, "__contains__", #10539, "2") +#10540 = @"C_type$instance$2__delattr__" +py_cobjects(#10540) +py_cobjecttypes(#10540, #10005) +py_cobject_sources(#10540, 0) +py_cobjectnames(#10540, "__delattr__") +py_cmembers_versioned(#10532, "__delattr__", #10540, "2") +#10541 = @"C_type$instance$2__delitem__" +py_cobjects(#10541) +py_cobjecttypes(#10541, #10005) +py_cobject_sources(#10541, 0) +py_cobjectnames(#10541, "__delitem__") +py_cmembers_versioned(#10532, "__delitem__", #10541, "2") +#10542 = @"C_type$instance$2__delslice__" +py_cobjects(#10542) +py_cobjecttypes(#10542, #10005) +py_cobject_sources(#10542, 0) +py_cobjectnames(#10542, "__delslice__") +py_cmembers_versioned(#10532, "__delslice__", #10542, "2") +#10543 = @"C_type$instance$2__div__" +py_cobjects(#10543) +py_cobjecttypes(#10543, #10005) +py_cobject_sources(#10543, 0) +py_cobjectnames(#10543, "__div__") +py_cmembers_versioned(#10532, "__div__", #10543, "2") +#10544 = @"C_type$instance$2__divmod__" +py_cobjects(#10544) +py_cobjecttypes(#10544, #10005) +py_cobject_sources(#10544, 0) +py_cobjectnames(#10544, "__divmod__") +py_cmembers_versioned(#10532, "__divmod__", #10544, "2") +#10545 = @"C_bytes$9c8127711d14f46b4bc2a45fb22ab796798f3915" +py_cobjects(#10545) +py_cobjecttypes(#10545, #10028) +py_cobject_sources(#10545, 0) +py_cobjectnames(#10545, "b'instance(class[, dict]) + +Create an instance without calling its __init__() method. +The class must be a classic class. +If present, dict must be a dictionary or None.'") +py_cmembers_versioned(#10532, "__doc__", #10545, "2") +#10546 = @"C_type$instance$2__eq__" +py_cobjects(#10546) +py_cobjecttypes(#10546, #10005) +py_cobject_sources(#10546, 0) +py_cobjectnames(#10546, "__eq__") +py_cmembers_versioned(#10532, "__eq__", #10546, "2") +#10547 = @"C_type$instance$2__float__" +py_cobjects(#10547) +py_cobjecttypes(#10547, #10005) +py_cobject_sources(#10547, 0) +py_cobjectnames(#10547, "__float__") +py_cmembers_versioned(#10532, "__float__", #10547, "2") +#10548 = @"C_type$instance$2__floordiv__" +py_cobjects(#10548) +py_cobjecttypes(#10548, #10005) +py_cobject_sources(#10548, 0) +py_cobjectnames(#10548, "__floordiv__") +py_cmembers_versioned(#10532, "__floordiv__", #10548, "2") +#10549 = @"C_type$instance$2__ge__" +py_cobjects(#10549) +py_cobjecttypes(#10549, #10005) +py_cobject_sources(#10549, 0) +py_cobjectnames(#10549, "__ge__") +py_cmembers_versioned(#10532, "__ge__", #10549, "2") +#10550 = @"C_type$instance$2__getattribute__" +py_cobjects(#10550) +py_cobjecttypes(#10550, #10005) +py_cobject_sources(#10550, 0) +py_cobjectnames(#10550, "__getattribute__") +py_cmembers_versioned(#10532, "__getattribute__", #10550, "2") +#10551 = @"C_type$instance$2__getitem__" +py_cobjects(#10551) +py_cobjecttypes(#10551, #10005) +py_cobject_sources(#10551, 0) +py_cobjectnames(#10551, "__getitem__") +py_cmembers_versioned(#10532, "__getitem__", #10551, "2") +#10552 = @"C_type$instance$2__getslice__" +py_cobjects(#10552) +py_cobjecttypes(#10552, #10005) +py_cobject_sources(#10552, 0) +py_cobjectnames(#10552, "__getslice__") +py_cmembers_versioned(#10532, "__getslice__", #10552, "2") +#10553 = @"C_type$instance$2__gt__" +py_cobjects(#10553) +py_cobjecttypes(#10553, #10005) +py_cobject_sources(#10553, 0) +py_cobjectnames(#10553, "__gt__") +py_cmembers_versioned(#10532, "__gt__", #10553, "2") +#10554 = @"C_type$instance$2__hash__" +py_cobjects(#10554) +py_cobjecttypes(#10554, #10005) +py_cobject_sources(#10554, 0) +py_cobjectnames(#10554, "__hash__") +py_cmembers_versioned(#10532, "__hash__", #10554, "2") +#10555 = @"C_type$instance$2__hex__" +py_cobjects(#10555) +py_cobjecttypes(#10555, #10005) +py_cobject_sources(#10555, 0) +py_cobjectnames(#10555, "__hex__") +py_cmembers_versioned(#10532, "__hex__", #10555, "2") +#10556 = @"C_type$instance$2__iadd__" +py_cobjects(#10556) +py_cobjecttypes(#10556, #10005) +py_cobject_sources(#10556, 0) +py_cobjectnames(#10556, "__iadd__") +py_cmembers_versioned(#10532, "__iadd__", #10556, "2") +#10557 = @"C_type$instance$2__iand__" +py_cobjects(#10557) +py_cobjecttypes(#10557, #10005) +py_cobject_sources(#10557, 0) +py_cobjectnames(#10557, "__iand__") +py_cmembers_versioned(#10532, "__iand__", #10557, "2") +#10558 = @"C_type$instance$2__idiv__" +py_cobjects(#10558) +py_cobjecttypes(#10558, #10005) +py_cobject_sources(#10558, 0) +py_cobjectnames(#10558, "__idiv__") +py_cmembers_versioned(#10532, "__idiv__", #10558, "2") +#10559 = @"C_type$instance$2__ifloordiv__" +py_cobjects(#10559) +py_cobjecttypes(#10559, #10005) +py_cobject_sources(#10559, 0) +py_cobjectnames(#10559, "__ifloordiv__") +py_cmembers_versioned(#10532, "__ifloordiv__", #10559, "2") +#10560 = @"C_type$instance$2__ilshift__" +py_cobjects(#10560) +py_cobjecttypes(#10560, #10005) +py_cobject_sources(#10560, 0) +py_cobjectnames(#10560, "__ilshift__") +py_cmembers_versioned(#10532, "__ilshift__", #10560, "2") +#10561 = @"C_type$instance$2__imod__" +py_cobjects(#10561) +py_cobjecttypes(#10561, #10005) +py_cobject_sources(#10561, 0) +py_cobjectnames(#10561, "__imod__") +py_cmembers_versioned(#10532, "__imod__", #10561, "2") +#10562 = @"C_type$instance$2__imul__" +py_cobjects(#10562) +py_cobjecttypes(#10562, #10005) +py_cobject_sources(#10562, 0) +py_cobjectnames(#10562, "__imul__") +py_cmembers_versioned(#10532, "__imul__", #10562, "2") +#10563 = @"C_type$instance$2__index__" +py_cobjects(#10563) +py_cobjecttypes(#10563, #10005) +py_cobject_sources(#10563, 0) +py_cobjectnames(#10563, "__index__") +py_cmembers_versioned(#10532, "__index__", #10563, "2") +#10564 = @"C_type$instance$2__int__" +py_cobjects(#10564) +py_cobjecttypes(#10564, #10005) +py_cobject_sources(#10564, 0) +py_cobjectnames(#10564, "__int__") +py_cmembers_versioned(#10532, "__int__", #10564, "2") +#10565 = @"C_type$instance$2__invert__" +py_cobjects(#10565) +py_cobjecttypes(#10565, #10005) +py_cobject_sources(#10565, 0) +py_cobjectnames(#10565, "__invert__") +py_cmembers_versioned(#10532, "__invert__", #10565, "2") +#10566 = @"C_type$instance$2__ior__" +py_cobjects(#10566) +py_cobjecttypes(#10566, #10005) +py_cobject_sources(#10566, 0) +py_cobjectnames(#10566, "__ior__") +py_cmembers_versioned(#10532, "__ior__", #10566, "2") +#10567 = @"C_type$instance$2__ipow__" +py_cobjects(#10567) +py_cobjecttypes(#10567, #10005) +py_cobject_sources(#10567, 0) +py_cobjectnames(#10567, "__ipow__") +py_cmembers_versioned(#10532, "__ipow__", #10567, "2") +#10568 = @"C_type$instance$2__irshift__" +py_cobjects(#10568) +py_cobjecttypes(#10568, #10005) +py_cobject_sources(#10568, 0) +py_cobjectnames(#10568, "__irshift__") +py_cmembers_versioned(#10532, "__irshift__", #10568, "2") +#10569 = @"C_type$instance$2__isub__" +py_cobjects(#10569) +py_cobjecttypes(#10569, #10005) +py_cobject_sources(#10569, 0) +py_cobjectnames(#10569, "__isub__") +py_cmembers_versioned(#10532, "__isub__", #10569, "2") +#10570 = @"C_type$instance$2__iter__" +py_cobjects(#10570) +py_cobjecttypes(#10570, #10005) +py_cobject_sources(#10570, 0) +py_cobjectnames(#10570, "__iter__") +py_cmembers_versioned(#10532, "__iter__", #10570, "2") +#10571 = @"C_type$instance$2__itruediv__" +py_cobjects(#10571) +py_cobjecttypes(#10571, #10005) +py_cobject_sources(#10571, 0) +py_cobjectnames(#10571, "__itruediv__") +py_cmembers_versioned(#10532, "__itruediv__", #10571, "2") +#10572 = @"C_type$instance$2__ixor__" +py_cobjects(#10572) +py_cobjecttypes(#10572, #10005) +py_cobject_sources(#10572, 0) +py_cobjectnames(#10572, "__ixor__") +py_cmembers_versioned(#10532, "__ixor__", #10572, "2") +#10573 = @"C_type$instance$2__le__" +py_cobjects(#10573) +py_cobjecttypes(#10573, #10005) +py_cobject_sources(#10573, 0) +py_cobjectnames(#10573, "__le__") +py_cmembers_versioned(#10532, "__le__", #10573, "2") +#10574 = @"C_type$instance$2__len__" +py_cobjects(#10574) +py_cobjecttypes(#10574, #10005) +py_cobject_sources(#10574, 0) +py_cobjectnames(#10574, "__len__") +py_cmembers_versioned(#10532, "__len__", #10574, "2") +#10575 = @"C_type$instance$2__long__" +py_cobjects(#10575) +py_cobjecttypes(#10575, #10005) +py_cobject_sources(#10575, 0) +py_cobjectnames(#10575, "__long__") +py_cmembers_versioned(#10532, "__long__", #10575, "2") +#10576 = @"C_type$instance$2__lshift__" +py_cobjects(#10576) +py_cobjecttypes(#10576, #10005) +py_cobject_sources(#10576, 0) +py_cobjectnames(#10576, "__lshift__") +py_cmembers_versioned(#10532, "__lshift__", #10576, "2") +#10577 = @"C_type$instance$2__lt__" +py_cobjects(#10577) +py_cobjecttypes(#10577, #10005) +py_cobject_sources(#10577, 0) +py_cobjectnames(#10577, "__lt__") +py_cmembers_versioned(#10532, "__lt__", #10577, "2") +#10578 = @"C_type$instance$2__mod__" +py_cobjects(#10578) +py_cobjecttypes(#10578, #10005) +py_cobject_sources(#10578, 0) +py_cobjectnames(#10578, "__mod__") +py_cmembers_versioned(#10532, "__mod__", #10578, "2") +#10579 = @"C_type$instance$2__mul__" +py_cobjects(#10579) +py_cobjecttypes(#10579, #10005) +py_cobject_sources(#10579, 0) +py_cobjectnames(#10579, "__mul__") +py_cmembers_versioned(#10532, "__mul__", #10579, "2") +#10580 = @"C_type$instance$2__ne__" +py_cobjects(#10580) +py_cobjecttypes(#10580, #10005) +py_cobject_sources(#10580, 0) +py_cobjectnames(#10580, "__ne__") +py_cmembers_versioned(#10532, "__ne__", #10580, "2") +#10581 = @"C_type$instance$2__neg__" +py_cobjects(#10581) +py_cobjecttypes(#10581, #10005) +py_cobject_sources(#10581, 0) +py_cobjectnames(#10581, "__neg__") +py_cmembers_versioned(#10532, "__neg__", #10581, "2") +#10582 = @"C_type$instance$2__new__" +py_cobjects(#10582) +py_cobjecttypes(#10582, #10075) +py_cobject_sources(#10582, 0) +py_cobjectnames(#10582, "__new__") +py_cmembers_versioned(#10532, "__new__", #10582, "2") +#10583 = @"C_type$instance$2__nonzero__" +py_cobjects(#10583) +py_cobjecttypes(#10583, #10005) +py_cobject_sources(#10583, 0) +py_cobjectnames(#10583, "__nonzero__") +py_cmembers_versioned(#10532, "__nonzero__", #10583, "2") +#10584 = @"C_type$instance$2__oct__" +py_cobjects(#10584) +py_cobjecttypes(#10584, #10005) +py_cobject_sources(#10584, 0) +py_cobjectnames(#10584, "__oct__") +py_cmembers_versioned(#10532, "__oct__", #10584, "2") +#10585 = @"C_type$instance$2__or__" +py_cobjects(#10585) +py_cobjecttypes(#10585, #10005) +py_cobject_sources(#10585, 0) +py_cobjectnames(#10585, "__or__") +py_cmembers_versioned(#10532, "__or__", #10585, "2") +#10586 = @"C_type$instance$2__pos__" +py_cobjects(#10586) +py_cobjecttypes(#10586, #10005) +py_cobject_sources(#10586, 0) +py_cobjectnames(#10586, "__pos__") +py_cmembers_versioned(#10532, "__pos__", #10586, "2") +#10587 = @"C_type$instance$2__pow__" +py_cobjects(#10587) +py_cobjecttypes(#10587, #10005) +py_cobject_sources(#10587, 0) +py_cobjectnames(#10587, "__pow__") +py_cmembers_versioned(#10532, "__pow__", #10587, "2") +#10588 = @"C_type$instance$2__radd__" +py_cobjects(#10588) +py_cobjecttypes(#10588, #10005) +py_cobject_sources(#10588, 0) +py_cobjectnames(#10588, "__radd__") +py_cmembers_versioned(#10532, "__radd__", #10588, "2") +#10589 = @"C_type$instance$2__rand__" +py_cobjects(#10589) +py_cobjecttypes(#10589, #10005) +py_cobject_sources(#10589, 0) +py_cobjectnames(#10589, "__rand__") +py_cmembers_versioned(#10532, "__rand__", #10589, "2") +#10590 = @"C_type$instance$2__rdiv__" +py_cobjects(#10590) +py_cobjecttypes(#10590, #10005) +py_cobject_sources(#10590, 0) +py_cobjectnames(#10590, "__rdiv__") +py_cmembers_versioned(#10532, "__rdiv__", #10590, "2") +#10591 = @"C_type$instance$2__rdivmod__" +py_cobjects(#10591) +py_cobjecttypes(#10591, #10005) +py_cobject_sources(#10591, 0) +py_cobjectnames(#10591, "__rdivmod__") +py_cmembers_versioned(#10532, "__rdivmod__", #10591, "2") +#10592 = @"C_type$instance$2__repr__" +py_cobjects(#10592) +py_cobjecttypes(#10592, #10005) +py_cobject_sources(#10592, 0) +py_cobjectnames(#10592, "__repr__") +py_cmembers_versioned(#10532, "__repr__", #10592, "2") +#10593 = @"C_type$instance$2__rfloordiv__" +py_cobjects(#10593) +py_cobjecttypes(#10593, #10005) +py_cobject_sources(#10593, 0) +py_cobjectnames(#10593, "__rfloordiv__") +py_cmembers_versioned(#10532, "__rfloordiv__", #10593, "2") +#10594 = @"C_type$instance$2__rlshift__" +py_cobjects(#10594) +py_cobjecttypes(#10594, #10005) +py_cobject_sources(#10594, 0) +py_cobjectnames(#10594, "__rlshift__") +py_cmembers_versioned(#10532, "__rlshift__", #10594, "2") +#10595 = @"C_type$instance$2__rmod__" +py_cobjects(#10595) +py_cobjecttypes(#10595, #10005) +py_cobject_sources(#10595, 0) +py_cobjectnames(#10595, "__rmod__") +py_cmembers_versioned(#10532, "__rmod__", #10595, "2") +#10596 = @"C_type$instance$2__rmul__" +py_cobjects(#10596) +py_cobjecttypes(#10596, #10005) +py_cobject_sources(#10596, 0) +py_cobjectnames(#10596, "__rmul__") +py_cmembers_versioned(#10532, "__rmul__", #10596, "2") +#10597 = @"C_type$instance$2__ror__" +py_cobjects(#10597) +py_cobjecttypes(#10597, #10005) +py_cobject_sources(#10597, 0) +py_cobjectnames(#10597, "__ror__") +py_cmembers_versioned(#10532, "__ror__", #10597, "2") +#10598 = @"C_type$instance$2__rpow__" +py_cobjects(#10598) +py_cobjecttypes(#10598, #10005) +py_cobject_sources(#10598, 0) +py_cobjectnames(#10598, "__rpow__") +py_cmembers_versioned(#10532, "__rpow__", #10598, "2") +#10599 = @"C_type$instance$2__rrshift__" +py_cobjects(#10599) +py_cobjecttypes(#10599, #10005) +py_cobject_sources(#10599, 0) +py_cobjectnames(#10599, "__rrshift__") +py_cmembers_versioned(#10532, "__rrshift__", #10599, "2") +#10600 = @"C_type$instance$2__rshift__" +py_cobjects(#10600) +py_cobjecttypes(#10600, #10005) +py_cobject_sources(#10600, 0) +py_cobjectnames(#10600, "__rshift__") +py_cmembers_versioned(#10532, "__rshift__", #10600, "2") +#10601 = @"C_type$instance$2__rsub__" +py_cobjects(#10601) +py_cobjecttypes(#10601, #10005) +py_cobject_sources(#10601, 0) +py_cobjectnames(#10601, "__rsub__") +py_cmembers_versioned(#10532, "__rsub__", #10601, "2") +#10602 = @"C_type$instance$2__rtruediv__" +py_cobjects(#10602) +py_cobjecttypes(#10602, #10005) +py_cobject_sources(#10602, 0) +py_cobjectnames(#10602, "__rtruediv__") +py_cmembers_versioned(#10532, "__rtruediv__", #10602, "2") +#10603 = @"C_type$instance$2__rxor__" +py_cobjects(#10603) +py_cobjecttypes(#10603, #10005) +py_cobject_sources(#10603, 0) +py_cobjectnames(#10603, "__rxor__") +py_cmembers_versioned(#10532, "__rxor__", #10603, "2") +#10604 = @"C_type$instance$2__setattr__" +py_cobjects(#10604) +py_cobjecttypes(#10604, #10005) +py_cobject_sources(#10604, 0) +py_cobjectnames(#10604, "__setattr__") +py_cmembers_versioned(#10532, "__setattr__", #10604, "2") +#10605 = @"C_type$instance$2__setitem__" +py_cobjects(#10605) +py_cobjecttypes(#10605, #10005) +py_cobject_sources(#10605, 0) +py_cobjectnames(#10605, "__setitem__") +py_cmembers_versioned(#10532, "__setitem__", #10605, "2") +#10606 = @"C_type$instance$2__setslice__" +py_cobjects(#10606) +py_cobjecttypes(#10606, #10005) +py_cobject_sources(#10606, 0) +py_cobjectnames(#10606, "__setslice__") +py_cmembers_versioned(#10532, "__setslice__", #10606, "2") +#10607 = @"C_type$instance$2__str__" +py_cobjects(#10607) +py_cobjecttypes(#10607, #10005) +py_cobject_sources(#10607, 0) +py_cobjectnames(#10607, "__str__") +py_cmembers_versioned(#10532, "__str__", #10607, "2") +#10608 = @"C_type$instance$2__sub__" +py_cobjects(#10608) +py_cobjecttypes(#10608, #10005) +py_cobject_sources(#10608, 0) +py_cobjectnames(#10608, "__sub__") +py_cmembers_versioned(#10532, "__sub__", #10608, "2") +#10609 = @"C_type$instance$2__truediv__" +py_cobjects(#10609) +py_cobjecttypes(#10609, #10005) +py_cobject_sources(#10609, 0) +py_cobjectnames(#10609, "__truediv__") +py_cmembers_versioned(#10532, "__truediv__", #10609, "2") +#10610 = @"C_type$instance$2__xor__" +py_cobjects(#10610) +py_cobjecttypes(#10610, #10005) +py_cobject_sources(#10610, 0) +py_cobjectnames(#10610, "__xor__") +py_cmembers_versioned(#10532, "__xor__", #10610, "2") +#10611 = @"C_type$instance$2next" +py_cobjects(#10611) +py_cobjecttypes(#10611, #10005) +py_cobject_sources(#10611, 0) +py_cobjectnames(#10611, "next") +py_cmembers_versioned(#10532, "next", #10611, "2") +py_cmembers_versioned(#10532, ".super.", #10021, "2") +py_cobjectnames(#10532, "instance") +py_special_objects(#10532, "InstanceType") +#10612 = @"C_type$classobj" +py_cobjects(#10612) +py_cobjecttypes(#10612, #10001) +py_cobject_sources(#10612, 0) +#10613 = @"C_type$classobj$2__call__" +py_cobjects(#10613) +py_cobjecttypes(#10613, #10005) +py_cobject_sources(#10613, 0) +py_cobjectnames(#10613, "__call__") +py_cmembers_versioned(#10612, "__call__", #10613, "2") +#10614 = @"C_type$classobj$2__delattr__" +py_cobjects(#10614) +py_cobjecttypes(#10614, #10005) +py_cobject_sources(#10614, 0) +py_cobjectnames(#10614, "__delattr__") +py_cmembers_versioned(#10612, "__delattr__", #10614, "2") +#10615 = @"C_bytes$a7256df604b335f986bdeaa2ec3b1c4af8804e05" +py_cobjects(#10615) +py_cobjecttypes(#10615, #10028) +py_cobject_sources(#10615, 0) +py_cobjectnames(#10615, "b'classobj(name, bases, dict) + +Create a class object. The name must be a string; the second argument +a tuple of classes, and the third a dictionary.'") +py_cmembers_versioned(#10612, "__doc__", #10615, "2") +#10616 = @"C_type$classobj$2__getattribute__" +py_cobjects(#10616) +py_cobjecttypes(#10616, #10005) +py_cobject_sources(#10616, 0) +py_cobjectnames(#10616, "__getattribute__") +py_cmembers_versioned(#10612, "__getattribute__", #10616, "2") +#10617 = @"C_type$classobj$2__new__" +py_cobjects(#10617) +py_cobjecttypes(#10617, #10075) +py_cobject_sources(#10617, 0) +py_cobjectnames(#10617, "__new__") +py_cmembers_versioned(#10612, "__new__", #10617, "2") +#10618 = @"C_type$classobj$2__repr__" +py_cobjects(#10618) +py_cobjecttypes(#10618, #10005) +py_cobject_sources(#10618, 0) +py_cobjectnames(#10618, "__repr__") +py_cmembers_versioned(#10612, "__repr__", #10618, "2") +#10619 = @"C_type$classobj$2__setattr__" +py_cobjects(#10619) +py_cobjecttypes(#10619, #10005) +py_cobject_sources(#10619, 0) +py_cobjectnames(#10619, "__setattr__") +py_cmembers_versioned(#10612, "__setattr__", #10619, "2") +#10620 = @"C_type$classobj$2__str__" +py_cobjects(#10620) +py_cobjecttypes(#10620, #10005) +py_cobject_sources(#10620, 0) +py_cobjectnames(#10620, "__str__") +py_cmembers_versioned(#10612, "__str__", #10620, "2") +py_cmembers_versioned(#10612, ".super.", #10021, "2") +py_cobjectnames(#10612, "classobj") +py_special_objects(#10612, "ClassType") +py_special_objects(#10018, "NoneType") +#10621 = @"C_type$instancemethod" +py_cobjects(#10621) +py_cobjecttypes(#10621, #10001) +py_cobject_sources(#10621, 0) +#10622 = @"C_type$instancemethod$2__call__" +py_cobjects(#10622) +py_cobjecttypes(#10622, #10005) +py_cobject_sources(#10622, 0) +py_cobjectnames(#10622, "__call__") +py_cmembers_versioned(#10621, "__call__", #10622, "2") +#10623 = @"C_type$instancemethod$2__cmp__" +py_cobjects(#10623) +py_cobjecttypes(#10623, #10005) +py_cobject_sources(#10623, 0) +py_cobjectnames(#10623, "__cmp__") +py_cmembers_versioned(#10621, "__cmp__", #10623, "2") +#10624 = @"C_type$instancemethod$2__delattr__" +py_cobjects(#10624) +py_cobjecttypes(#10624, #10005) +py_cobject_sources(#10624, 0) +py_cobjectnames(#10624, "__delattr__") +py_cmembers_versioned(#10621, "__delattr__", #10624, "2") +#10625 = @"C_type$instancemethod$2__doc__" +py_cobjects(#10625) +py_cobjecttypes(#10625, #10003) +py_cobject_sources(#10625, 0) +#10626 = @"C_type$instancemethod$2__doc__$2__set__" +py_cobjects(#10626) +py_cobjecttypes(#10626, #10009) +py_cobject_sources(#10626, 0) +py_cobjectnames(#10626, "__set__") +py_cmembers_versioned(#10625, "__set__", #10626, "2") +#10627 = @"C_type$instancemethod$2__doc__$2__getattribute__" +py_cobjects(#10627) +py_cobjecttypes(#10627, #10009) +py_cobject_sources(#10627, 0) +py_cobjectnames(#10627, "__getattribute__") +py_cmembers_versioned(#10625, "__getattribute__", #10627, "2") +py_cmembers_versioned(#10625, "__objclass__", #10621, "2") +#10628 = @"C_type$instancemethod$2__doc__$2__repr__" +py_cobjects(#10628) +py_cobjecttypes(#10628, #10009) +py_cobject_sources(#10628, 0) +py_cobjectnames(#10628, "__repr__") +py_cmembers_versioned(#10625, "__repr__", #10628, "2") +#10629 = @"C_type$instancemethod$2__doc__$2__get__" +py_cobjects(#10629) +py_cobjecttypes(#10629, #10009) +py_cobject_sources(#10629, 0) +py_cobjectnames(#10629, "__get__") +py_cmembers_versioned(#10625, "__get__", #10629, "2") +py_cmembers_versioned(#10625, "__doc__", #10017, "2") +#10630 = @"C_type$instancemethod$2__doc__$2__delete__" +py_cobjects(#10630) +py_cobjecttypes(#10630, #10009) +py_cobject_sources(#10630, 0) +py_cobjectnames(#10630, "__delete__") +py_cmembers_versioned(#10625, "__delete__", #10630, "2") +py_cobjectnames(#10625, "__doc__") +py_cmembers_versioned(#10621, "__doc__", #10625, "2") +#10631 = @"C_type$instancemethod$2__func__" +py_cobjects(#10631) +py_cobjecttypes(#10631, #10045) +py_cobject_sources(#10631, 0) +py_cobjectnames(#10631, "__func__") +py_cmembers_versioned(#10621, "__func__", #10631, "2") +#10632 = @"C_type$instancemethod$2__get__" +py_cobjects(#10632) +py_cobjecttypes(#10632, #10005) +py_cobject_sources(#10632, 0) +py_cobjectnames(#10632, "__get__") +py_cmembers_versioned(#10621, "__get__", #10632, "2") +#10633 = @"C_type$instancemethod$2__getattribute__" +py_cobjects(#10633) +py_cobjecttypes(#10633, #10005) +py_cobject_sources(#10633, 0) +py_cobjectnames(#10633, "__getattribute__") +py_cmembers_versioned(#10621, "__getattribute__", #10633, "2") +#10634 = @"C_type$instancemethod$2__hash__" +py_cobjects(#10634) +py_cobjecttypes(#10634, #10005) +py_cobject_sources(#10634, 0) +py_cobjectnames(#10634, "__hash__") +py_cmembers_versioned(#10621, "__hash__", #10634, "2") +#10635 = @"C_type$instancemethod$2__new__" +py_cobjects(#10635) +py_cobjecttypes(#10635, #10075) +py_cobject_sources(#10635, 0) +py_cobjectnames(#10635, "__new__") +py_cmembers_versioned(#10621, "__new__", #10635, "2") +#10636 = @"C_type$instancemethod$2__repr__" +py_cobjects(#10636) +py_cobjecttypes(#10636, #10005) +py_cobject_sources(#10636, 0) +py_cobjectnames(#10636, "__repr__") +py_cmembers_versioned(#10621, "__repr__", #10636, "2") +#10637 = @"C_type$instancemethod$2__self__" +py_cobjects(#10637) +py_cobjecttypes(#10637, #10045) +py_cobject_sources(#10637, 0) +py_cobjectnames(#10637, "__self__") +py_cmembers_versioned(#10621, "__self__", #10637, "2") +#10638 = @"C_type$instancemethod$2__setattr__" +py_cobjects(#10638) +py_cobjecttypes(#10638, #10005) +py_cobject_sources(#10638, 0) +py_cobjectnames(#10638, "__setattr__") +py_cmembers_versioned(#10621, "__setattr__", #10638, "2") +#10639 = @"C_type$instancemethod$2im_class" +py_cobjects(#10639) +py_cobjecttypes(#10639, #10045) +py_cobject_sources(#10639, 0) +py_cobjectnames(#10639, "im_class") +py_cmembers_versioned(#10621, "im_class", #10639, "2") +#10640 = @"C_type$instancemethod$2im_func" +py_cobjects(#10640) +py_cobjecttypes(#10640, #10045) +py_cobject_sources(#10640, 0) +py_cobjectnames(#10640, "im_func") +py_cmembers_versioned(#10621, "im_func", #10640, "2") +#10641 = @"C_type$instancemethod$2im_self" +py_cobjects(#10641) +py_cobjecttypes(#10641, #10045) +py_cobject_sources(#10641, 0) +py_cobjectnames(#10641, "im_self") +py_cmembers_versioned(#10621, "im_self", #10641, "2") +py_cmembers_versioned(#10621, ".super.", #10021, "2") +py_cobjectnames(#10621, "instancemethod") +py_special_objects(#10621, "MethodType") +#10642 = @"C_bytes$77de68daecd823babbb58edb1c8e14d7106e83bb" +py_cobjects(#10642) +py_cobjecttypes(#10642, #10028) +py_cobject_sources(#10642, 0) +py_cobjectnames(#10642, "b'3'") +py_special_objects(#10642, "u3") +#10643 = @"C_bytes$da4b9237bacccdf19c0760cab7aec4a8359010b0" +py_cobjects(#10643) +py_cobjecttypes(#10643, #10028) +py_cobject_sources(#10643, 0) +py_cobjectnames(#10643, "b'2'") +py_special_objects(#10643, "u2") +#10644 = @"C_bool$False" +py_cobjects(#10644) +py_cobjecttypes(#10644, #10438) +py_cobject_sources(#10644, 0) +py_cobjectnames(#10644, "False") +py_special_objects(#10644, "False") +#10645 = @"C_type$long" +py_cobjects(#10645) +py_cobjecttypes(#10645, #10001) +py_cobject_sources(#10645, 0) +#10646 = @"C_type$long$2__abs__" +py_cobjects(#10646) +py_cobjecttypes(#10646, #10005) +py_cobject_sources(#10646, 0) +py_cobjectnames(#10646, "__abs__") +py_cmembers_versioned(#10645, "__abs__", #10646, "2") +#10647 = @"C_type$long$2__add__" +py_cobjects(#10647) +py_cobjecttypes(#10647, #10005) +py_cobject_sources(#10647, 0) +py_cobjectnames(#10647, "__add__") +py_cmembers_versioned(#10645, "__add__", #10647, "2") +#10648 = @"C_type$long$2__and__" +py_cobjects(#10648) +py_cobjecttypes(#10648, #10005) +py_cobject_sources(#10648, 0) +py_cobjectnames(#10648, "__and__") +py_cmembers_versioned(#10645, "__and__", #10648, "2") +#10649 = @"C_type$long$2__cmp__" +py_cobjects(#10649) +py_cobjecttypes(#10649, #10005) +py_cobject_sources(#10649, 0) +py_cobjectnames(#10649, "__cmp__") +py_cmembers_versioned(#10645, "__cmp__", #10649, "2") +#10650 = @"C_type$long$2__coerce__" +py_cobjects(#10650) +py_cobjecttypes(#10650, #10005) +py_cobject_sources(#10650, 0) +py_cobjectnames(#10650, "__coerce__") +py_cmembers_versioned(#10645, "__coerce__", #10650, "2") +#10651 = @"C_type$long$2__div__" +py_cobjects(#10651) +py_cobjecttypes(#10651, #10005) +py_cobject_sources(#10651, 0) +py_cobjectnames(#10651, "__div__") +py_cmembers_versioned(#10645, "__div__", #10651, "2") +#10652 = @"C_type$long$2__divmod__" +py_cobjects(#10652) +py_cobjecttypes(#10652, #10005) +py_cobject_sources(#10652, 0) +py_cobjectnames(#10652, "__divmod__") +py_cmembers_versioned(#10645, "__divmod__", #10652, "2") +#10653 = @"C_bytes$5bbbbe7e043697c834e9470611c2c45a408c6b4a" +py_cobjects(#10653) +py_cobjecttypes(#10653, #10028) +py_cobject_sources(#10653, 0) +py_cobjectnames(#10653, "b'long(x=0) -> long +long(x, base=10) -> long + +Convert a number or string to a long integer, or return 0L if no arguments +are given. If x is floating point, the conversion truncates towards zero. + +If x is not a number or if base is given, then x must be a string or +Unicode object representing an integer literal in the given base. The +literal can be preceded by '+' or '-' and be surrounded by whitespace. +The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to +interpret the base from the string as an integer literal. +>>> int('0b100', base=0) +4L'") +py_cmembers_versioned(#10645, "__doc__", #10653, "2") +#10654 = @"C_type$long$2__float__" +py_cobjects(#10654) +py_cobjecttypes(#10654, #10005) +py_cobject_sources(#10654, 0) +py_cobjectnames(#10654, "__float__") +py_cmembers_versioned(#10645, "__float__", #10654, "2") +#10655 = @"C_type$long$2__floordiv__" +py_cobjects(#10655) +py_cobjecttypes(#10655, #10005) +py_cobject_sources(#10655, 0) +py_cobjectnames(#10655, "__floordiv__") +py_cmembers_versioned(#10645, "__floordiv__", #10655, "2") +#10656 = @"C_type$long$2__format__" +py_cobjects(#10656) +py_cobjecttypes(#10656, #10034) +py_cobject_sources(#10656, 0) +py_cobjectnames(#10656, "__format__") +py_cmembers_versioned(#10645, "__format__", #10656, "2") +#10657 = @"C_type$long$2__getattribute__" +py_cobjects(#10657) +py_cobjecttypes(#10657, #10005) +py_cobject_sources(#10657, 0) +py_cobjectnames(#10657, "__getattribute__") +py_cmembers_versioned(#10645, "__getattribute__", #10657, "2") +#10658 = @"C_type$long$2__getnewargs__" +py_cobjects(#10658) +py_cobjecttypes(#10658, #10034) +py_cobject_sources(#10658, 0) +py_cobjectnames(#10658, "__getnewargs__") +py_cmembers_versioned(#10645, "__getnewargs__", #10658, "2") +#10659 = @"C_type$long$2__hash__" +py_cobjects(#10659) +py_cobjecttypes(#10659, #10005) +py_cobject_sources(#10659, 0) +py_cobjectnames(#10659, "__hash__") +py_cmembers_versioned(#10645, "__hash__", #10659, "2") +#10660 = @"C_type$long$2__hex__" +py_cobjects(#10660) +py_cobjecttypes(#10660, #10005) +py_cobject_sources(#10660, 0) +py_cobjectnames(#10660, "__hex__") +py_cmembers_versioned(#10645, "__hex__", #10660, "2") +#10661 = @"C_type$long$2__index__" +py_cobjects(#10661) +py_cobjecttypes(#10661, #10005) +py_cobject_sources(#10661, 0) +py_cobjectnames(#10661, "__index__") +py_cmembers_versioned(#10645, "__index__", #10661, "2") +#10662 = @"C_type$long$2__int__" +py_cobjects(#10662) +py_cobjecttypes(#10662, #10005) +py_cobject_sources(#10662, 0) +py_cobjectnames(#10662, "__int__") +py_cmembers_versioned(#10645, "__int__", #10662, "2") +#10663 = @"C_type$long$2__invert__" +py_cobjects(#10663) +py_cobjecttypes(#10663, #10005) +py_cobject_sources(#10663, 0) +py_cobjectnames(#10663, "__invert__") +py_cmembers_versioned(#10645, "__invert__", #10663, "2") +#10664 = @"C_type$long$2__long__" +py_cobjects(#10664) +py_cobjecttypes(#10664, #10005) +py_cobject_sources(#10664, 0) +py_cobjectnames(#10664, "__long__") +py_cmembers_versioned(#10645, "__long__", #10664, "2") +#10665 = @"C_type$long$2__lshift__" +py_cobjects(#10665) +py_cobjecttypes(#10665, #10005) +py_cobject_sources(#10665, 0) +py_cobjectnames(#10665, "__lshift__") +py_cmembers_versioned(#10645, "__lshift__", #10665, "2") +#10666 = @"C_type$long$2__mod__" +py_cobjects(#10666) +py_cobjecttypes(#10666, #10005) +py_cobject_sources(#10666, 0) +py_cobjectnames(#10666, "__mod__") +py_cmembers_versioned(#10645, "__mod__", #10666, "2") +#10667 = @"C_type$long$2__mul__" +py_cobjects(#10667) +py_cobjecttypes(#10667, #10005) +py_cobject_sources(#10667, 0) +py_cobjectnames(#10667, "__mul__") +py_cmembers_versioned(#10645, "__mul__", #10667, "2") +#10668 = @"C_type$long$2__neg__" +py_cobjects(#10668) +py_cobjecttypes(#10668, #10005) +py_cobject_sources(#10668, 0) +py_cobjectnames(#10668, "__neg__") +py_cmembers_versioned(#10645, "__neg__", #10668, "2") +#10669 = @"C_type$long$2__new__" +py_cobjects(#10669) +py_cobjecttypes(#10669, #10075) +py_cobject_sources(#10669, 0) +py_cobjectnames(#10669, "__new__") +py_cmembers_versioned(#10645, "__new__", #10669, "2") +#10670 = @"C_type$long$2__nonzero__" +py_cobjects(#10670) +py_cobjecttypes(#10670, #10005) +py_cobject_sources(#10670, 0) +py_cobjectnames(#10670, "__nonzero__") +py_cmembers_versioned(#10645, "__nonzero__", #10670, "2") +#10671 = @"C_type$long$2__oct__" +py_cobjects(#10671) +py_cobjecttypes(#10671, #10005) +py_cobject_sources(#10671, 0) +py_cobjectnames(#10671, "__oct__") +py_cmembers_versioned(#10645, "__oct__", #10671, "2") +#10672 = @"C_type$long$2__or__" +py_cobjects(#10672) +py_cobjecttypes(#10672, #10005) +py_cobject_sources(#10672, 0) +py_cobjectnames(#10672, "__or__") +py_cmembers_versioned(#10645, "__or__", #10672, "2") +#10673 = @"C_type$long$2__pos__" +py_cobjects(#10673) +py_cobjecttypes(#10673, #10005) +py_cobject_sources(#10673, 0) +py_cobjectnames(#10673, "__pos__") +py_cmembers_versioned(#10645, "__pos__", #10673, "2") +#10674 = @"C_type$long$2__pow__" +py_cobjects(#10674) +py_cobjecttypes(#10674, #10005) +py_cobject_sources(#10674, 0) +py_cobjectnames(#10674, "__pow__") +py_cmembers_versioned(#10645, "__pow__", #10674, "2") +#10675 = @"C_type$long$2__radd__" +py_cobjects(#10675) +py_cobjecttypes(#10675, #10005) +py_cobject_sources(#10675, 0) +py_cobjectnames(#10675, "__radd__") +py_cmembers_versioned(#10645, "__radd__", #10675, "2") +#10676 = @"C_type$long$2__rand__" +py_cobjects(#10676) +py_cobjecttypes(#10676, #10005) +py_cobject_sources(#10676, 0) +py_cobjectnames(#10676, "__rand__") +py_cmembers_versioned(#10645, "__rand__", #10676, "2") +#10677 = @"C_type$long$2__rdiv__" +py_cobjects(#10677) +py_cobjecttypes(#10677, #10005) +py_cobject_sources(#10677, 0) +py_cobjectnames(#10677, "__rdiv__") +py_cmembers_versioned(#10645, "__rdiv__", #10677, "2") +#10678 = @"C_type$long$2__rdivmod__" +py_cobjects(#10678) +py_cobjecttypes(#10678, #10005) +py_cobject_sources(#10678, 0) +py_cobjectnames(#10678, "__rdivmod__") +py_cmembers_versioned(#10645, "__rdivmod__", #10678, "2") +#10679 = @"C_type$long$2__repr__" +py_cobjects(#10679) +py_cobjecttypes(#10679, #10005) +py_cobject_sources(#10679, 0) +py_cobjectnames(#10679, "__repr__") +py_cmembers_versioned(#10645, "__repr__", #10679, "2") +#10680 = @"C_type$long$2__rfloordiv__" +py_cobjects(#10680) +py_cobjecttypes(#10680, #10005) +py_cobject_sources(#10680, 0) +py_cobjectnames(#10680, "__rfloordiv__") +py_cmembers_versioned(#10645, "__rfloordiv__", #10680, "2") +#10681 = @"C_type$long$2__rlshift__" +py_cobjects(#10681) +py_cobjecttypes(#10681, #10005) +py_cobject_sources(#10681, 0) +py_cobjectnames(#10681, "__rlshift__") +py_cmembers_versioned(#10645, "__rlshift__", #10681, "2") +#10682 = @"C_type$long$2__rmod__" +py_cobjects(#10682) +py_cobjecttypes(#10682, #10005) +py_cobject_sources(#10682, 0) +py_cobjectnames(#10682, "__rmod__") +py_cmembers_versioned(#10645, "__rmod__", #10682, "2") +#10683 = @"C_type$long$2__rmul__" +py_cobjects(#10683) +py_cobjecttypes(#10683, #10005) +py_cobject_sources(#10683, 0) +py_cobjectnames(#10683, "__rmul__") +py_cmembers_versioned(#10645, "__rmul__", #10683, "2") +#10684 = @"C_type$long$2__ror__" +py_cobjects(#10684) +py_cobjecttypes(#10684, #10005) +py_cobject_sources(#10684, 0) +py_cobjectnames(#10684, "__ror__") +py_cmembers_versioned(#10645, "__ror__", #10684, "2") +#10685 = @"C_type$long$2__rpow__" +py_cobjects(#10685) +py_cobjecttypes(#10685, #10005) +py_cobject_sources(#10685, 0) +py_cobjectnames(#10685, "__rpow__") +py_cmembers_versioned(#10645, "__rpow__", #10685, "2") +#10686 = @"C_type$long$2__rrshift__" +py_cobjects(#10686) +py_cobjecttypes(#10686, #10005) +py_cobject_sources(#10686, 0) +py_cobjectnames(#10686, "__rrshift__") +py_cmembers_versioned(#10645, "__rrshift__", #10686, "2") +#10687 = @"C_type$long$2__rshift__" +py_cobjects(#10687) +py_cobjecttypes(#10687, #10005) +py_cobject_sources(#10687, 0) +py_cobjectnames(#10687, "__rshift__") +py_cmembers_versioned(#10645, "__rshift__", #10687, "2") +#10688 = @"C_type$long$2__rsub__" +py_cobjects(#10688) +py_cobjecttypes(#10688, #10005) +py_cobject_sources(#10688, 0) +py_cobjectnames(#10688, "__rsub__") +py_cmembers_versioned(#10645, "__rsub__", #10688, "2") +#10689 = @"C_type$long$2__rtruediv__" +py_cobjects(#10689) +py_cobjecttypes(#10689, #10005) +py_cobject_sources(#10689, 0) +py_cobjectnames(#10689, "__rtruediv__") +py_cmembers_versioned(#10645, "__rtruediv__", #10689, "2") +#10690 = @"C_type$long$2__rxor__" +py_cobjects(#10690) +py_cobjecttypes(#10690, #10005) +py_cobject_sources(#10690, 0) +py_cobjectnames(#10690, "__rxor__") +py_cmembers_versioned(#10645, "__rxor__", #10690, "2") +#10691 = @"C_type$long$2__sizeof__" +py_cobjects(#10691) +py_cobjecttypes(#10691, #10034) +py_cobject_sources(#10691, 0) +py_cobjectnames(#10691, "__sizeof__") +py_cmembers_versioned(#10645, "__sizeof__", #10691, "2") +#10692 = @"C_type$long$2__str__" +py_cobjects(#10692) +py_cobjecttypes(#10692, #10005) +py_cobject_sources(#10692, 0) +py_cobjectnames(#10692, "__str__") +py_cmembers_versioned(#10645, "__str__", #10692, "2") +#10693 = @"C_type$long$2__sub__" +py_cobjects(#10693) +py_cobjecttypes(#10693, #10005) +py_cobject_sources(#10693, 0) +py_cobjectnames(#10693, "__sub__") +py_cmembers_versioned(#10645, "__sub__", #10693, "2") +#10694 = @"C_type$long$2__truediv__" +py_cobjects(#10694) +py_cobjecttypes(#10694, #10005) +py_cobject_sources(#10694, 0) +py_cobjectnames(#10694, "__truediv__") +py_cmembers_versioned(#10645, "__truediv__", #10694, "2") +#10695 = @"C_type$long$2__trunc__" +py_cobjects(#10695) +py_cobjecttypes(#10695, #10034) +py_cobject_sources(#10695, 0) +py_cobjectnames(#10695, "__trunc__") +py_cmembers_versioned(#10645, "__trunc__", #10695, "2") +#10696 = @"C_type$long$2__xor__" +py_cobjects(#10696) +py_cobjecttypes(#10696, #10005) +py_cobject_sources(#10696, 0) +py_cobjectnames(#10696, "__xor__") +py_cmembers_versioned(#10645, "__xor__", #10696, "2") +#10697 = @"C_type$long$2bit_length" +py_cobjects(#10697) +py_cobjecttypes(#10697, #10034) +py_cobject_sources(#10697, 0) +py_cobjectnames(#10697, "bit_length") +py_cmembers_versioned(#10645, "bit_length", #10697, "2") +#10698 = @"C_type$long$2conjugate" +py_cobjects(#10698) +py_cobjecttypes(#10698, #10034) +py_cobject_sources(#10698, 0) +py_cobjectnames(#10698, "conjugate") +py_cmembers_versioned(#10645, "conjugate", #10698, "2") +#10699 = @"C_type$long$2denominator" +py_cobjects(#10699) +py_cobjecttypes(#10699, #10003) +py_cobject_sources(#10699, 0) +#10700 = @"C_type$long$2denominator$2__set__" +py_cobjects(#10700) +py_cobjecttypes(#10700, #10009) +py_cobject_sources(#10700, 0) +py_cobjectnames(#10700, "__set__") +py_cmembers_versioned(#10699, "__set__", #10700, "2") +#10701 = @"C_type$long$2denominator$2__getattribute__" +py_cobjects(#10701) +py_cobjecttypes(#10701, #10009) +py_cobject_sources(#10701, 0) +py_cobjectnames(#10701, "__getattribute__") +py_cmembers_versioned(#10699, "__getattribute__", #10701, "2") +py_cmembers_versioned(#10699, "__objclass__", #10645, "2") +#10702 = @"C_type$long$2denominator$2__repr__" +py_cobjects(#10702) +py_cobjecttypes(#10702, #10009) +py_cobject_sources(#10702, 0) +py_cobjectnames(#10702, "__repr__") +py_cmembers_versioned(#10699, "__repr__", #10702, "2") +#10703 = @"C_type$long$2denominator$2__get__" +py_cobjects(#10703) +py_cobjecttypes(#10703, #10009) +py_cobject_sources(#10703, 0) +py_cobjectnames(#10703, "__get__") +py_cmembers_versioned(#10699, "__get__", #10703, "2") +#10704 = @"C_bytes$d787ec075c36417b3622538483449d06564bf83c" +py_cobjects(#10704) +py_cobjecttypes(#10704, #10028) +py_cobject_sources(#10704, 0) +py_cobjectnames(#10704, "b'the denominator of a rational number in lowest terms'") +py_cmembers_versioned(#10699, "__doc__", #10704, "2") +#10705 = @"C_type$long$2denominator$2__delete__" +py_cobjects(#10705) +py_cobjecttypes(#10705, #10009) +py_cobject_sources(#10705, 0) +py_cobjectnames(#10705, "__delete__") +py_cmembers_versioned(#10699, "__delete__", #10705, "2") +py_cobjectnames(#10699, "denominator") +py_cmembers_versioned(#10645, "denominator", #10699, "2") +#10706 = @"C_type$long$2imag" +py_cobjects(#10706) +py_cobjecttypes(#10706, #10003) +py_cobject_sources(#10706, 0) +#10707 = @"C_type$long$2imag$2__set__" +py_cobjects(#10707) +py_cobjecttypes(#10707, #10009) +py_cobject_sources(#10707, 0) +py_cobjectnames(#10707, "__set__") +py_cmembers_versioned(#10706, "__set__", #10707, "2") +#10708 = @"C_type$long$2imag$2__getattribute__" +py_cobjects(#10708) +py_cobjecttypes(#10708, #10009) +py_cobject_sources(#10708, 0) +py_cobjectnames(#10708, "__getattribute__") +py_cmembers_versioned(#10706, "__getattribute__", #10708, "2") +py_cmembers_versioned(#10706, "__objclass__", #10645, "2") +#10709 = @"C_type$long$2imag$2__repr__" +py_cobjects(#10709) +py_cobjecttypes(#10709, #10009) +py_cobject_sources(#10709, 0) +py_cobjectnames(#10709, "__repr__") +py_cmembers_versioned(#10706, "__repr__", #10709, "2") +#10710 = @"C_type$long$2imag$2__get__" +py_cobjects(#10710) +py_cobjecttypes(#10710, #10009) +py_cobject_sources(#10710, 0) +py_cobjectnames(#10710, "__get__") +py_cmembers_versioned(#10706, "__get__", #10710, "2") +#10711 = @"C_bytes$1697c2b9b4c10d325b12cf3fded2fbfc0e15d5f0" +py_cobjects(#10711) +py_cobjecttypes(#10711, #10028) +py_cobject_sources(#10711, 0) +py_cobjectnames(#10711, "b'the imaginary part of a complex number'") +py_cmembers_versioned(#10706, "__doc__", #10711, "2") +#10712 = @"C_type$long$2imag$2__delete__" +py_cobjects(#10712) +py_cobjecttypes(#10712, #10009) +py_cobject_sources(#10712, 0) +py_cobjectnames(#10712, "__delete__") +py_cmembers_versioned(#10706, "__delete__", #10712, "2") +py_cobjectnames(#10706, "imag") +py_cmembers_versioned(#10645, "imag", #10706, "2") +#10713 = @"C_type$long$2numerator" +py_cobjects(#10713) +py_cobjecttypes(#10713, #10003) +py_cobject_sources(#10713, 0) +#10714 = @"C_type$long$2numerator$2__set__" +py_cobjects(#10714) +py_cobjecttypes(#10714, #10009) +py_cobject_sources(#10714, 0) +py_cobjectnames(#10714, "__set__") +py_cmembers_versioned(#10713, "__set__", #10714, "2") +#10715 = @"C_type$long$2numerator$2__getattribute__" +py_cobjects(#10715) +py_cobjecttypes(#10715, #10009) +py_cobject_sources(#10715, 0) +py_cobjectnames(#10715, "__getattribute__") +py_cmembers_versioned(#10713, "__getattribute__", #10715, "2") +py_cmembers_versioned(#10713, "__objclass__", #10645, "2") +#10716 = @"C_type$long$2numerator$2__repr__" +py_cobjects(#10716) +py_cobjecttypes(#10716, #10009) +py_cobject_sources(#10716, 0) +py_cobjectnames(#10716, "__repr__") +py_cmembers_versioned(#10713, "__repr__", #10716, "2") +#10717 = @"C_type$long$2numerator$2__get__" +py_cobjects(#10717) +py_cobjecttypes(#10717, #10009) +py_cobject_sources(#10717, 0) +py_cobjectnames(#10717, "__get__") +py_cmembers_versioned(#10713, "__get__", #10717, "2") +#10718 = @"C_bytes$b003a2de50c1e2b9c0432a073236cd9864f791cb" +py_cobjects(#10718) +py_cobjecttypes(#10718, #10028) +py_cobject_sources(#10718, 0) +py_cobjectnames(#10718, "b'the numerator of a rational number in lowest terms'") +py_cmembers_versioned(#10713, "__doc__", #10718, "2") +#10719 = @"C_type$long$2numerator$2__delete__" +py_cobjects(#10719) +py_cobjecttypes(#10719, #10009) +py_cobject_sources(#10719, 0) +py_cobjectnames(#10719, "__delete__") +py_cmembers_versioned(#10713, "__delete__", #10719, "2") +py_cobjectnames(#10713, "numerator") +py_cmembers_versioned(#10645, "numerator", #10713, "2") +#10720 = @"C_type$long$2real" +py_cobjects(#10720) +py_cobjecttypes(#10720, #10003) +py_cobject_sources(#10720, 0) +#10721 = @"C_type$long$2real$2__set__" +py_cobjects(#10721) +py_cobjecttypes(#10721, #10009) +py_cobject_sources(#10721, 0) +py_cobjectnames(#10721, "__set__") +py_cmembers_versioned(#10720, "__set__", #10721, "2") +#10722 = @"C_type$long$2real$2__getattribute__" +py_cobjects(#10722) +py_cobjecttypes(#10722, #10009) +py_cobject_sources(#10722, 0) +py_cobjectnames(#10722, "__getattribute__") +py_cmembers_versioned(#10720, "__getattribute__", #10722, "2") +py_cmembers_versioned(#10720, "__objclass__", #10645, "2") +#10723 = @"C_type$long$2real$2__repr__" +py_cobjects(#10723) +py_cobjecttypes(#10723, #10009) +py_cobject_sources(#10723, 0) +py_cobjectnames(#10723, "__repr__") +py_cmembers_versioned(#10720, "__repr__", #10723, "2") +#10724 = @"C_type$long$2real$2__get__" +py_cobjects(#10724) +py_cobjecttypes(#10724, #10009) +py_cobject_sources(#10724, 0) +py_cobjectnames(#10724, "__get__") +py_cmembers_versioned(#10720, "__get__", #10724, "2") +#10725 = @"C_bytes$2cb527e0bacedb07e674d6e9890d3d2ab1a8f487" +py_cobjects(#10725) +py_cobjecttypes(#10725, #10028) +py_cobject_sources(#10725, 0) +py_cobjectnames(#10725, "b'the real part of a complex number'") +py_cmembers_versioned(#10720, "__doc__", #10725, "2") +#10726 = @"C_type$long$2real$2__delete__" +py_cobjects(#10726) +py_cobjecttypes(#10726, #10009) +py_cobject_sources(#10726, 0) +py_cobjectnames(#10726, "__delete__") +py_cmembers_versioned(#10720, "__delete__", #10726, "2") +py_cobjectnames(#10720, "real") +py_cmembers_versioned(#10645, "real", #10720, "2") +py_cmembers_versioned(#10645, ".super.", #10021, "2") +py_cobjectnames(#10645, "long") +py_special_objects(#10645, "long") +#10727 = @"C_type$super" +py_cobjects(#10727) +py_cobjecttypes(#10727, #10001) +py_cobject_sources(#10727, 0) +#10728 = @"C_bytes$e8e0c2295a1aa9900ff8db357497a4d4d056ea58" +py_cobjects(#10728) +py_cobjecttypes(#10728, #10028) +py_cobject_sources(#10728, 0) +py_cobjectnames(#10728, "b'super(type, obj) -> bound super object; requires isinstance(obj, type) +super(type) -> unbound super object +super(type, type2) -> bound super object; requires issubclass(type2, type) +Typical use to call a cooperative superclass method: +class C(B): + def meth(self, arg): + super(C, self).meth(arg)'") +py_cmembers_versioned(#10727, "__doc__", #10728, "2") +#10729 = @"C_type$super$2__get__" +py_cobjects(#10729) +py_cobjecttypes(#10729, #10005) +py_cobject_sources(#10729, 0) +py_cobjectnames(#10729, "__get__") +py_cmembers_versioned(#10727, "__get__", #10729, "2") +#10730 = @"C_type$super$2__getattribute__" +py_cobjects(#10730) +py_cobjecttypes(#10730, #10005) +py_cobject_sources(#10730, 0) +py_cobjectnames(#10730, "__getattribute__") +py_cmembers_versioned(#10727, "__getattribute__", #10730, "2") +#10731 = @"C_type$super$2__init__" +py_cobjects(#10731) +py_cobjecttypes(#10731, #10005) +py_cobject_sources(#10731, 0) +py_cobjectnames(#10731, "__init__") +py_cmembers_versioned(#10727, "__init__", #10731, "2") +#10732 = @"C_type$super$2__new__" +py_cobjects(#10732) +py_cobjecttypes(#10732, #10075) +py_cobject_sources(#10732, 0) +py_cobjectnames(#10732, "__new__") +py_cmembers_versioned(#10727, "__new__", #10732, "2") +#10733 = @"C_type$super$2__repr__" +py_cobjects(#10733) +py_cobjecttypes(#10733, #10005) +py_cobject_sources(#10733, 0) +py_cobjectnames(#10733, "__repr__") +py_cmembers_versioned(#10727, "__repr__", #10733, "2") +#10734 = @"C_type$super$2__self__" +py_cobjects(#10734) +py_cobjecttypes(#10734, #10045) +py_cobject_sources(#10734, 0) +py_cobjectnames(#10734, "__self__") +py_cmembers_versioned(#10727, "__self__", #10734, "2") +#10735 = @"C_type$super$2__self_class__" +py_cobjects(#10735) +py_cobjecttypes(#10735, #10045) +py_cobject_sources(#10735, 0) +py_cobjectnames(#10735, "__self_class__") +py_cmembers_versioned(#10727, "__self_class__", #10735, "2") +#10736 = @"C_type$super$2__thisclass__" +py_cobjects(#10736) +py_cobjecttypes(#10736, #10045) +py_cobject_sources(#10736, 0) +py_cobjectnames(#10736, "__thisclass__") +py_cmembers_versioned(#10727, "__thisclass__", #10736, "2") +py_cmembers_versioned(#10727, ".super.", #10021, "2") +py_cobjectnames(#10727, "super") +py_special_objects(#10727, "super") +py_special_objects(#10438, "bool") +#10737 = @"C_type$tuple" +py_cobjects(#10737) +py_cobjecttypes(#10737, #10001) +py_cobject_sources(#10737, 0) +#10738 = @"C_type$tuple$2__add__" +py_cobjects(#10738) +py_cobjecttypes(#10738, #10005) +py_cobject_sources(#10738, 0) +py_cobjectnames(#10738, "__add__") +py_cmembers_versioned(#10737, "__add__", #10738, "2") +#10739 = @"C_type$tuple$2__contains__" +py_cobjects(#10739) +py_cobjecttypes(#10739, #10005) +py_cobject_sources(#10739, 0) +py_cobjectnames(#10739, "__contains__") +py_cmembers_versioned(#10737, "__contains__", #10739, "2") +#10740 = @"C_bytes$0331c2bdf85dc14e29da951fdf1bc3f96a52ce2b" +py_cobjects(#10740) +py_cobjecttypes(#10740, #10028) +py_cobject_sources(#10740, 0) +py_cobjectnames(#10740, "b'tuple() -> empty tuple +tuple(iterable) -> tuple initialized from iterable's items + +If the argument is a tuple, the return value is the same object.'") +py_cmembers_versioned(#10737, "__doc__", #10740, "2") +#10741 = @"C_type$tuple$2__eq__" +py_cobjects(#10741) +py_cobjecttypes(#10741, #10005) +py_cobject_sources(#10741, 0) +py_cobjectnames(#10741, "__eq__") +py_cmembers_versioned(#10737, "__eq__", #10741, "2") +#10742 = @"C_type$tuple$2__ge__" +py_cobjects(#10742) +py_cobjecttypes(#10742, #10005) +py_cobject_sources(#10742, 0) +py_cobjectnames(#10742, "__ge__") +py_cmembers_versioned(#10737, "__ge__", #10742, "2") +#10743 = @"C_type$tuple$2__getattribute__" +py_cobjects(#10743) +py_cobjecttypes(#10743, #10005) +py_cobject_sources(#10743, 0) +py_cobjectnames(#10743, "__getattribute__") +py_cmembers_versioned(#10737, "__getattribute__", #10743, "2") +#10744 = @"C_type$tuple$2__getitem__" +py_cobjects(#10744) +py_cobjecttypes(#10744, #10005) +py_cobject_sources(#10744, 0) +py_cobjectnames(#10744, "__getitem__") +py_cmembers_versioned(#10737, "__getitem__", #10744, "2") +#10745 = @"C_type$tuple$2__getnewargs__" +py_cobjects(#10745) +py_cobjecttypes(#10745, #10034) +py_cobject_sources(#10745, 0) +py_cobjectnames(#10745, "__getnewargs__") +py_cmembers_versioned(#10737, "__getnewargs__", #10745, "2") +#10746 = @"C_type$tuple$2__getslice__" +py_cobjects(#10746) +py_cobjecttypes(#10746, #10005) +py_cobject_sources(#10746, 0) +py_cobjectnames(#10746, "__getslice__") +py_cmembers_versioned(#10737, "__getslice__", #10746, "2") +#10747 = @"C_type$tuple$2__gt__" +py_cobjects(#10747) +py_cobjecttypes(#10747, #10005) +py_cobject_sources(#10747, 0) +py_cobjectnames(#10747, "__gt__") +py_cmembers_versioned(#10737, "__gt__", #10747, "2") +#10748 = @"C_type$tuple$2__hash__" +py_cobjects(#10748) +py_cobjecttypes(#10748, #10005) +py_cobject_sources(#10748, 0) +py_cobjectnames(#10748, "__hash__") +py_cmembers_versioned(#10737, "__hash__", #10748, "2") +#10749 = @"C_type$tuple$2__iter__" +py_cobjects(#10749) +py_cobjecttypes(#10749, #10005) +py_cobject_sources(#10749, 0) +py_cobjectnames(#10749, "__iter__") +py_cmembers_versioned(#10737, "__iter__", #10749, "2") +#10750 = @"C_type$tuple$2__le__" +py_cobjects(#10750) +py_cobjecttypes(#10750, #10005) +py_cobject_sources(#10750, 0) +py_cobjectnames(#10750, "__le__") +py_cmembers_versioned(#10737, "__le__", #10750, "2") +#10751 = @"C_type$tuple$2__len__" +py_cobjects(#10751) +py_cobjecttypes(#10751, #10005) +py_cobject_sources(#10751, 0) +py_cobjectnames(#10751, "__len__") +py_cmembers_versioned(#10737, "__len__", #10751, "2") +#10752 = @"C_type$tuple$2__lt__" +py_cobjects(#10752) +py_cobjecttypes(#10752, #10005) +py_cobject_sources(#10752, 0) +py_cobjectnames(#10752, "__lt__") +py_cmembers_versioned(#10737, "__lt__", #10752, "2") +#10753 = @"C_type$tuple$2__mul__" +py_cobjects(#10753) +py_cobjecttypes(#10753, #10005) +py_cobject_sources(#10753, 0) +py_cobjectnames(#10753, "__mul__") +py_cmembers_versioned(#10737, "__mul__", #10753, "2") +#10754 = @"C_type$tuple$2__ne__" +py_cobjects(#10754) +py_cobjecttypes(#10754, #10005) +py_cobject_sources(#10754, 0) +py_cobjectnames(#10754, "__ne__") +py_cmembers_versioned(#10737, "__ne__", #10754, "2") +#10755 = @"C_type$tuple$2__new__" +py_cobjects(#10755) +py_cobjecttypes(#10755, #10075) +py_cobject_sources(#10755, 0) +py_cobjectnames(#10755, "__new__") +py_cmembers_versioned(#10737, "__new__", #10755, "2") +#10756 = @"C_type$tuple$2__repr__" +py_cobjects(#10756) +py_cobjecttypes(#10756, #10005) +py_cobject_sources(#10756, 0) +py_cobjectnames(#10756, "__repr__") +py_cmembers_versioned(#10737, "__repr__", #10756, "2") +#10757 = @"C_type$tuple$2__rmul__" +py_cobjects(#10757) +py_cobjecttypes(#10757, #10005) +py_cobject_sources(#10757, 0) +py_cobjectnames(#10757, "__rmul__") +py_cmembers_versioned(#10737, "__rmul__", #10757, "2") +#10758 = @"C_type$tuple$2count" +py_cobjects(#10758) +py_cobjecttypes(#10758, #10034) +py_cobject_sources(#10758, 0) +py_cobjectnames(#10758, "count") +py_cmembers_versioned(#10737, "count", #10758, "2") +#10759 = @"C_type$tuple$2index" +py_cobjects(#10759) +py_cobjecttypes(#10759, #10034) +py_cobject_sources(#10759, 0) +py_cobjectnames(#10759, "index") +py_cmembers_versioned(#10737, "index", #10759, "2") +py_cmembers_versioned(#10737, ".super.", #10021, "2") +py_cobjectnames(#10737, "tuple") +py_special_objects(#10737, "tuple") +#10760 = @"C_module$__builtin__" +#10761 = @"C_type$module" +py_cobjects(#10761) +py_cobjecttypes(#10761, #10001) +py_cobject_sources(#10761, 0) +#10762 = @"C_type$module$2__delattr__" +py_cobjects(#10762) +py_cobjecttypes(#10762, #10005) +py_cobject_sources(#10762, 0) +py_cobjectnames(#10762, "__delattr__") +py_cmembers_versioned(#10761, "__delattr__", #10762, "2") +#10763 = @"C_type$module$2__dict__" +py_cobjects(#10763) +py_cobjecttypes(#10763, #10045) +py_cobject_sources(#10763, 0) +py_cobjectnames(#10763, "__dict__") +py_cmembers_versioned(#10761, "__dict__", #10763, "2") +#10764 = @"C_bytes$22b943eaf3d5849337b6f59fba0ae00efc5e0139" +py_cobjects(#10764) +py_cobjecttypes(#10764, #10028) +py_cobject_sources(#10764, 0) +py_cobjectnames(#10764, "b'module(name[, doc]) + +Create a module object. +The name must be a string; the optional doc argument can have any type.'") +py_cmembers_versioned(#10761, "__doc__", #10764, "2") +#10765 = @"C_type$module$2__getattribute__" +py_cobjects(#10765) +py_cobjecttypes(#10765, #10005) +py_cobject_sources(#10765, 0) +py_cobjectnames(#10765, "__getattribute__") +py_cmembers_versioned(#10761, "__getattribute__", #10765, "2") +#10766 = @"C_type$module$2__init__" +py_cobjects(#10766) +py_cobjecttypes(#10766, #10005) +py_cobject_sources(#10766, 0) +py_cobjectnames(#10766, "__init__") +py_cmembers_versioned(#10761, "__init__", #10766, "2") +#10767 = @"C_type$module$2__new__" +py_cobjects(#10767) +py_cobjecttypes(#10767, #10075) +py_cobject_sources(#10767, 0) +py_cobjectnames(#10767, "__new__") +py_cmembers_versioned(#10761, "__new__", #10767, "2") +#10768 = @"C_type$module$2__repr__" +py_cobjects(#10768) +py_cobjecttypes(#10768, #10005) +py_cobject_sources(#10768, 0) +py_cobjectnames(#10768, "__repr__") +py_cmembers_versioned(#10761, "__repr__", #10768, "2") +#10769 = @"C_type$module$2__setattr__" +py_cobjects(#10769) +py_cobjecttypes(#10769, #10005) +py_cobject_sources(#10769, 0) +py_cobjectnames(#10769, "__setattr__") +py_cmembers_versioned(#10761, "__setattr__", #10769, "2") +py_cmembers_versioned(#10761, ".super.", #10021, "2") +py_cobjectnames(#10761, "module") +py_cobjects(#10760) +py_cobjecttypes(#10760, #10761) +py_cobject_sources(#10760, 0) +#10770 = @"C_type$ArithmeticError" +py_cobjects(#10770) +py_cobjecttypes(#10770, #10001) +py_cobject_sources(#10770, 0) +#10771 = @"C_bytes$61a47d6144643be8111a5d6cd38c70451edd75e0" +py_cobjects(#10771) +py_cobjecttypes(#10771, #10028) +py_cobject_sources(#10771, 0) +py_cobjectnames(#10771, "b'Base class for arithmetic errors.'") +py_cmembers_versioned(#10770, "__doc__", #10771, "2") +#10772 = @"C_type$ArithmeticError$2__init__" +py_cobjects(#10772) +py_cobjecttypes(#10772, #10005) +py_cobject_sources(#10772, 0) +py_cobjectnames(#10772, "__init__") +py_cmembers_versioned(#10770, "__init__", #10772, "2") +#10773 = @"C_type$ArithmeticError$2__new__" +py_cobjects(#10773) +py_cobjecttypes(#10773, #10075) +py_cobject_sources(#10773, 0) +py_cobjectnames(#10773, "__new__") +py_cmembers_versioned(#10770, "__new__", #10773, "2") +py_cmembers_versioned(#10770, ".super.", #10346, "2") +py_cobjectnames(#10770, "ArithmeticError") +py_cmembers_versioned(#10760, "ArithmeticError", #10770, "2") +#10774 = @"C_type$AssertionError" +py_cobjects(#10774) +py_cobjecttypes(#10774, #10001) +py_cobject_sources(#10774, 0) +#10775 = @"C_bytes$a42441c349b7bd38d1695189fc7bc6bf3aa17236" +py_cobjects(#10775) +py_cobjecttypes(#10775, #10028) +py_cobject_sources(#10775, 0) +py_cobjectnames(#10775, "b'Assertion failed.'") +py_cmembers_versioned(#10774, "__doc__", #10775, "2") +#10776 = @"C_type$AssertionError$2__init__" +py_cobjects(#10776) +py_cobjecttypes(#10776, #10005) +py_cobject_sources(#10776, 0) +py_cobjectnames(#10776, "__init__") +py_cmembers_versioned(#10774, "__init__", #10776, "2") +#10777 = @"C_type$AssertionError$2__new__" +py_cobjects(#10777) +py_cobjecttypes(#10777, #10075) +py_cobject_sources(#10777, 0) +py_cobjectnames(#10777, "__new__") +py_cmembers_versioned(#10774, "__new__", #10777, "2") +py_cmembers_versioned(#10774, ".super.", #10346, "2") +py_cobjectnames(#10774, "AssertionError") +py_cmembers_versioned(#10760, "AssertionError", #10774, "2") +py_cmembers_versioned(#10760, "AttributeError", #10433, "2") +py_cmembers_versioned(#10760, "BaseException", #10354, "2") +#10778 = @"C_type$BufferError" +py_cobjects(#10778) +py_cobjecttypes(#10778, #10001) +py_cobject_sources(#10778, 0) +#10779 = @"C_bytes$1f79f01081ea50a98f292e69ea9db957594bfa0b" +py_cobjects(#10779) +py_cobjecttypes(#10779, #10028) +py_cobject_sources(#10779, 0) +py_cobjectnames(#10779, "b'Buffer error.'") +py_cmembers_versioned(#10778, "__doc__", #10779, "2") +#10780 = @"C_type$BufferError$2__init__" +py_cobjects(#10780) +py_cobjecttypes(#10780, #10005) +py_cobject_sources(#10780, 0) +py_cobjectnames(#10780, "__init__") +py_cmembers_versioned(#10778, "__init__", #10780, "2") +#10781 = @"C_type$BufferError$2__new__" +py_cobjects(#10781) +py_cobjecttypes(#10781, #10075) +py_cobject_sources(#10781, 0) +py_cobjectnames(#10781, "__new__") +py_cmembers_versioned(#10778, "__new__", #10781, "2") +py_cmembers_versioned(#10778, ".super.", #10346, "2") +py_cobjectnames(#10778, "BufferError") +py_cmembers_versioned(#10760, "BufferError", #10778, "2") +#10782 = @"C_type$BytesWarning" +py_cobjects(#10782) +py_cobjecttypes(#10782, #10001) +py_cobject_sources(#10782, 0) +#10783 = @"C_bytes$9113ec3acba7d6fa8effaddd2e6c74ac46ae6b51" +py_cobjects(#10783) +py_cobjecttypes(#10783, #10028) +py_cobject_sources(#10783, 0) +py_cobjectnames(#10783, "b'Base class for warnings about bytes and bytearray related problems, +mostly related to comparing to str.'") +py_cmembers_versioned(#10782, "__doc__", #10783, "2") +#10784 = @"C_type$BytesWarning$2__init__" +py_cobjects(#10784) +py_cobjecttypes(#10784, #10005) +py_cobject_sources(#10784, 0) +py_cobjectnames(#10784, "__init__") +py_cmembers_versioned(#10782, "__init__", #10784, "2") +#10785 = @"C_type$BytesWarning$2__new__" +py_cobjects(#10785) +py_cobjecttypes(#10785, #10075) +py_cobject_sources(#10785, 0) +py_cobjectnames(#10785, "__new__") +py_cmembers_versioned(#10782, "__new__", #10785, "2") +#10786 = @"C_type$Warning" +py_cobjects(#10786) +py_cobjecttypes(#10786, #10001) +py_cobject_sources(#10786, 0) +#10787 = @"C_bytes$1a767590a449f53c349f02ce7bd8efd407590883" +py_cobjects(#10787) +py_cobjecttypes(#10787, #10028) +py_cobject_sources(#10787, 0) +py_cobjectnames(#10787, "b'Base class for warning categories.'") +py_cmembers_versioned(#10786, "__doc__", #10787, "2") +#10788 = @"C_type$Warning$2__init__" +py_cobjects(#10788) +py_cobjecttypes(#10788, #10005) +py_cobject_sources(#10788, 0) +py_cobjectnames(#10788, "__init__") +py_cmembers_versioned(#10786, "__init__", #10788, "2") +#10789 = @"C_type$Warning$2__new__" +py_cobjects(#10789) +py_cobjecttypes(#10789, #10075) +py_cobject_sources(#10789, 0) +py_cobjectnames(#10789, "__new__") +py_cmembers_versioned(#10786, "__new__", #10789, "2") +py_cmembers_versioned(#10786, ".super.", #10350, "2") +py_cobjectnames(#10786, "Warning") +py_cmembers_versioned(#10782, ".super.", #10786, "2") +py_cobjectnames(#10782, "BytesWarning") +py_cmembers_versioned(#10760, "BytesWarning", #10782, "2") +#10790 = @"C_type$DeprecationWarning" +py_cobjects(#10790) +py_cobjecttypes(#10790, #10001) +py_cobject_sources(#10790, 0) +#10791 = @"C_bytes$c3d3385fbf26988036950ac0c8772d37e0843a0c" +py_cobjects(#10791) +py_cobjecttypes(#10791, #10028) +py_cobject_sources(#10791, 0) +py_cobjectnames(#10791, "b'Base class for warnings about deprecated features.'") +py_cmembers_versioned(#10790, "__doc__", #10791, "2") +#10792 = @"C_type$DeprecationWarning$2__init__" +py_cobjects(#10792) +py_cobjecttypes(#10792, #10005) +py_cobject_sources(#10792, 0) +py_cobjectnames(#10792, "__init__") +py_cmembers_versioned(#10790, "__init__", #10792, "2") +#10793 = @"C_type$DeprecationWarning$2__new__" +py_cobjects(#10793) +py_cobjecttypes(#10793, #10075) +py_cobject_sources(#10793, 0) +py_cobjectnames(#10793, "__new__") +py_cmembers_versioned(#10790, "__new__", #10793, "2") +py_cmembers_versioned(#10790, ".super.", #10786, "2") +py_cobjectnames(#10790, "DeprecationWarning") +py_cmembers_versioned(#10760, "DeprecationWarning", #10790, "2") +#10794 = @"C_type$EOFError" +py_cobjects(#10794) +py_cobjecttypes(#10794, #10001) +py_cobject_sources(#10794, 0) +#10795 = @"C_bytes$bece27985c9f03cabf4c8b7c427263d5276b3f86" +py_cobjects(#10795) +py_cobjecttypes(#10795, #10028) +py_cobject_sources(#10795, 0) +py_cobjectnames(#10795, "b'Read beyond end of file.'") +py_cmembers_versioned(#10794, "__doc__", #10795, "2") +#10796 = @"C_type$EOFError$2__init__" +py_cobjects(#10796) +py_cobjecttypes(#10796, #10005) +py_cobject_sources(#10796, 0) +py_cobjectnames(#10796, "__init__") +py_cmembers_versioned(#10794, "__init__", #10796, "2") +#10797 = @"C_type$EOFError$2__new__" +py_cobjects(#10797) +py_cobjecttypes(#10797, #10075) +py_cobject_sources(#10797, 0) +py_cobjectnames(#10797, "__new__") +py_cmembers_versioned(#10794, "__new__", #10797, "2") +py_cmembers_versioned(#10794, ".super.", #10346, "2") +py_cobjectnames(#10794, "EOFError") +py_cmembers_versioned(#10760, "EOFError", #10794, "2") +#10798 = @"C_module$__builtin__$2Ellipsis" +#10799 = @"C_type$ellipsis" +py_cobjects(#10799) +py_cobjecttypes(#10799, #10001) +py_cobject_sources(#10799, 0) +py_cmembers_versioned(#10799, "__doc__", #10017, "2") +#10800 = @"C_type$ellipsis$2__getattribute__" +py_cobjects(#10800) +py_cobjecttypes(#10800, #10005) +py_cobject_sources(#10800, 0) +py_cobjectnames(#10800, "__getattribute__") +py_cmembers_versioned(#10799, "__getattribute__", #10800, "2") +#10801 = @"C_type$ellipsis$2__repr__" +py_cobjects(#10801) +py_cobjecttypes(#10801, #10005) +py_cobject_sources(#10801, 0) +py_cobjectnames(#10801, "__repr__") +py_cmembers_versioned(#10799, "__repr__", #10801, "2") +py_cmembers_versioned(#10799, ".super.", #10021, "2") +py_cobjectnames(#10799, "ellipsis") +py_cobjects(#10798) +py_cobjecttypes(#10798, #10799) +py_cobject_sources(#10798, 0) +py_cobjectnames(#10798, "object") +py_cmembers_versioned(#10760, "Ellipsis", #10798, "2") +#10802 = @"C_type$EnvironmentError" +py_cobjects(#10802) +py_cobjecttypes(#10802, #10001) +py_cobject_sources(#10802, 0) +#10803 = @"C_bytes$39224d5733534fbf85512214b0f2f0e10441ca46" +py_cobjects(#10803) +py_cobjecttypes(#10803, #10028) +py_cobject_sources(#10803, 0) +py_cobjectnames(#10803, "b'Base class for I/O related errors.'") +py_cmembers_versioned(#10802, "__doc__", #10803, "2") +#10804 = @"C_type$EnvironmentError$2__init__" +py_cobjects(#10804) +py_cobjecttypes(#10804, #10005) +py_cobject_sources(#10804, 0) +py_cobjectnames(#10804, "__init__") +py_cmembers_versioned(#10802, "__init__", #10804, "2") +#10805 = @"C_type$EnvironmentError$2__new__" +py_cobjects(#10805) +py_cobjecttypes(#10805, #10075) +py_cobject_sources(#10805, 0) +py_cobjectnames(#10805, "__new__") +py_cmembers_versioned(#10802, "__new__", #10805, "2") +#10806 = @"C_type$EnvironmentError$2__reduce__" +py_cobjects(#10806) +py_cobjecttypes(#10806, #10034) +py_cobject_sources(#10806, 0) +py_cobjectnames(#10806, "__reduce__") +py_cmembers_versioned(#10802, "__reduce__", #10806, "2") +#10807 = @"C_type$EnvironmentError$2__str__" +py_cobjects(#10807) +py_cobjecttypes(#10807, #10005) +py_cobject_sources(#10807, 0) +py_cobjectnames(#10807, "__str__") +py_cmembers_versioned(#10802, "__str__", #10807, "2") +#10808 = @"C_type$EnvironmentError$2errno" +py_cobjects(#10808) +py_cobjecttypes(#10808, #10045) +py_cobject_sources(#10808, 0) +py_cobjectnames(#10808, "errno") +py_cmembers_versioned(#10802, "errno", #10808, "2") +#10809 = @"C_type$EnvironmentError$2filename" +py_cobjects(#10809) +py_cobjecttypes(#10809, #10045) +py_cobject_sources(#10809, 0) +py_cobjectnames(#10809, "filename") +py_cmembers_versioned(#10802, "filename", #10809, "2") +#10810 = @"C_type$EnvironmentError$2strerror" +py_cobjects(#10810) +py_cobjecttypes(#10810, #10045) +py_cobject_sources(#10810, 0) +py_cobjectnames(#10810, "strerror") +py_cmembers_versioned(#10802, "strerror", #10810, "2") +py_cmembers_versioned(#10802, ".super.", #10346, "2") +py_cobjectnames(#10802, "EnvironmentError") +py_cmembers_versioned(#10760, "EnvironmentError", #10802, "2") +py_cmembers_versioned(#10760, "Exception", #10350, "2") +py_cmembers_versioned(#10760, "False", #10644, "2") +#10811 = @"C_type$FloatingPointError" +py_cobjects(#10811) +py_cobjecttypes(#10811, #10001) +py_cobject_sources(#10811, 0) +#10812 = @"C_bytes$c5dcd934c52b3fc4976bc52155c9333ecc39411b" +py_cobjects(#10812) +py_cobjecttypes(#10812, #10028) +py_cobject_sources(#10812, 0) +py_cobjectnames(#10812, "b'Floating point operation failed.'") +py_cmembers_versioned(#10811, "__doc__", #10812, "2") +#10813 = @"C_type$FloatingPointError$2__init__" +py_cobjects(#10813) +py_cobjecttypes(#10813, #10005) +py_cobject_sources(#10813, 0) +py_cobjectnames(#10813, "__init__") +py_cmembers_versioned(#10811, "__init__", #10813, "2") +#10814 = @"C_type$FloatingPointError$2__new__" +py_cobjects(#10814) +py_cobjecttypes(#10814, #10075) +py_cobject_sources(#10814, 0) +py_cobjectnames(#10814, "__new__") +py_cmembers_versioned(#10811, "__new__", #10814, "2") +py_cmembers_versioned(#10811, ".super.", #10770, "2") +py_cobjectnames(#10811, "FloatingPointError") +py_cmembers_versioned(#10760, "FloatingPointError", #10811, "2") +#10815 = @"C_type$FutureWarning" +py_cobjects(#10815) +py_cobjecttypes(#10815, #10001) +py_cobject_sources(#10815, 0) +#10816 = @"C_bytes$253310a83b68871dc4ca8c07585e813c414089b3" +py_cobjects(#10816) +py_cobjecttypes(#10816, #10028) +py_cobject_sources(#10816, 0) +py_cobjectnames(#10816, "b'Base class for warnings about constructs that will change semantically +in the future.'") +py_cmembers_versioned(#10815, "__doc__", #10816, "2") +#10817 = @"C_type$FutureWarning$2__init__" +py_cobjects(#10817) +py_cobjecttypes(#10817, #10005) +py_cobject_sources(#10817, 0) +py_cobjectnames(#10817, "__init__") +py_cmembers_versioned(#10815, "__init__", #10817, "2") +#10818 = @"C_type$FutureWarning$2__new__" +py_cobjects(#10818) +py_cobjecttypes(#10818, #10075) +py_cobject_sources(#10818, 0) +py_cobjectnames(#10818, "__new__") +py_cmembers_versioned(#10815, "__new__", #10818, "2") +py_cmembers_versioned(#10815, ".super.", #10786, "2") +py_cobjectnames(#10815, "FutureWarning") +py_cmembers_versioned(#10760, "FutureWarning", #10815, "2") +#10819 = @"C_type$GeneratorExit" +py_cobjects(#10819) +py_cobjecttypes(#10819, #10001) +py_cobject_sources(#10819, 0) +#10820 = @"C_bytes$8977819b8e1d63a633bd58892263b5b4b1ce904a" +py_cobjects(#10820) +py_cobjecttypes(#10820, #10028) +py_cobject_sources(#10820, 0) +py_cobjectnames(#10820, "b'Request that a generator exit.'") +py_cmembers_versioned(#10819, "__doc__", #10820, "2") +#10821 = @"C_type$GeneratorExit$2__init__" +py_cobjects(#10821) +py_cobjecttypes(#10821, #10005) +py_cobject_sources(#10821, 0) +py_cobjectnames(#10821, "__init__") +py_cmembers_versioned(#10819, "__init__", #10821, "2") +#10822 = @"C_type$GeneratorExit$2__new__" +py_cobjects(#10822) +py_cobjecttypes(#10822, #10075) +py_cobject_sources(#10822, 0) +py_cobjectnames(#10822, "__new__") +py_cmembers_versioned(#10819, "__new__", #10822, "2") +py_cmembers_versioned(#10819, ".super.", #10354, "2") +py_cobjectnames(#10819, "GeneratorExit") +py_cmembers_versioned(#10760, "GeneratorExit", #10819, "2") +#10823 = @"C_type$IOError" +py_cobjects(#10823) +py_cobjecttypes(#10823, #10001) +py_cobject_sources(#10823, 0) +#10824 = @"C_bytes$d67c8995c9017675bca359c35a060fffc1d2e752" +py_cobjects(#10824) +py_cobjecttypes(#10824, #10028) +py_cobject_sources(#10824, 0) +py_cobjectnames(#10824, "b'I/O operation failed.'") +py_cmembers_versioned(#10823, "__doc__", #10824, "2") +#10825 = @"C_type$IOError$2__init__" +py_cobjects(#10825) +py_cobjecttypes(#10825, #10005) +py_cobject_sources(#10825, 0) +py_cobjectnames(#10825, "__init__") +py_cmembers_versioned(#10823, "__init__", #10825, "2") +#10826 = @"C_type$IOError$2__new__" +py_cobjects(#10826) +py_cobjecttypes(#10826, #10075) +py_cobject_sources(#10826, 0) +py_cobjectnames(#10826, "__new__") +py_cmembers_versioned(#10823, "__new__", #10826, "2") +py_cmembers_versioned(#10823, ".super.", #10802, "2") +py_cobjectnames(#10823, "IOError") +py_cmembers_versioned(#10760, "IOError", #10823, "2") +#10827 = @"C_type$ImportError" +py_cobjects(#10827) +py_cobjecttypes(#10827, #10001) +py_cobject_sources(#10827, 0) +#10828 = @"C_bytes$21c1facbb75e3e004959ce7dac3a8ffa72d14efa" +py_cobjects(#10828) +py_cobjecttypes(#10828, #10028) +py_cobject_sources(#10828, 0) +py_cobjectnames(#10828, "b'Import can't find module, or can't find name in module.'") +py_cmembers_versioned(#10827, "__doc__", #10828, "2") +#10829 = @"C_type$ImportError$2__init__" +py_cobjects(#10829) +py_cobjecttypes(#10829, #10005) +py_cobject_sources(#10829, 0) +py_cobjectnames(#10829, "__init__") +py_cmembers_versioned(#10827, "__init__", #10829, "2") +#10830 = @"C_type$ImportError$2__new__" +py_cobjects(#10830) +py_cobjecttypes(#10830, #10075) +py_cobject_sources(#10830, 0) +py_cobjectnames(#10830, "__new__") +py_cmembers_versioned(#10827, "__new__", #10830, "2") +py_cmembers_versioned(#10827, ".super.", #10346, "2") +py_cobjectnames(#10827, "ImportError") +py_cmembers_versioned(#10760, "ImportError", #10827, "2") +#10831 = @"C_type$ImportWarning" +py_cobjects(#10831) +py_cobjecttypes(#10831, #10001) +py_cobject_sources(#10831, 0) +#10832 = @"C_bytes$72eeb2dd35c8136512635d8b99d694eacacdef0a" +py_cobjects(#10832) +py_cobjecttypes(#10832, #10028) +py_cobject_sources(#10832, 0) +py_cobjectnames(#10832, "b'Base class for warnings about probable mistakes in module imports'") +py_cmembers_versioned(#10831, "__doc__", #10832, "2") +#10833 = @"C_type$ImportWarning$2__init__" +py_cobjects(#10833) +py_cobjecttypes(#10833, #10005) +py_cobject_sources(#10833, 0) +py_cobjectnames(#10833, "__init__") +py_cmembers_versioned(#10831, "__init__", #10833, "2") +#10834 = @"C_type$ImportWarning$2__new__" +py_cobjects(#10834) +py_cobjecttypes(#10834, #10075) +py_cobject_sources(#10834, 0) +py_cobjectnames(#10834, "__new__") +py_cmembers_versioned(#10831, "__new__", #10834, "2") +py_cmembers_versioned(#10831, ".super.", #10786, "2") +py_cobjectnames(#10831, "ImportWarning") +py_cmembers_versioned(#10760, "ImportWarning", #10831, "2") +#10835 = @"C_type$IndentationError" +py_cobjects(#10835) +py_cobjecttypes(#10835, #10001) +py_cobject_sources(#10835, 0) +#10836 = @"C_bytes$d2993333f1c442637c5dd452ecfef78eb9055666" +py_cobjects(#10836) +py_cobjecttypes(#10836, #10028) +py_cobject_sources(#10836, 0) +py_cobjectnames(#10836, "b'Improper indentation.'") +py_cmembers_versioned(#10835, "__doc__", #10836, "2") +#10837 = @"C_type$IndentationError$2__init__" +py_cobjects(#10837) +py_cobjecttypes(#10837, #10005) +py_cobject_sources(#10837, 0) +py_cobjectnames(#10837, "__init__") +py_cmembers_versioned(#10835, "__init__", #10837, "2") +#10838 = @"C_type$IndentationError$2__new__" +py_cobjects(#10838) +py_cobjecttypes(#10838, #10075) +py_cobject_sources(#10838, 0) +py_cobjectnames(#10838, "__new__") +py_cmembers_versioned(#10835, "__new__", #10838, "2") +#10839 = @"C_type$SyntaxError" +py_cobjects(#10839) +py_cobjecttypes(#10839, #10001) +py_cobject_sources(#10839, 0) +#10840 = @"C_bytes$28213b9a5d59b61c3581f42fd6bd800017566bbe" +py_cobjects(#10840) +py_cobjecttypes(#10840, #10028) +py_cobject_sources(#10840, 0) +py_cobjectnames(#10840, "b'Invalid syntax.'") +py_cmembers_versioned(#10839, "__doc__", #10840, "2") +#10841 = @"C_type$SyntaxError$2__init__" +py_cobjects(#10841) +py_cobjecttypes(#10841, #10005) +py_cobject_sources(#10841, 0) +py_cobjectnames(#10841, "__init__") +py_cmembers_versioned(#10839, "__init__", #10841, "2") +#10842 = @"C_type$SyntaxError$2__new__" +py_cobjects(#10842) +py_cobjecttypes(#10842, #10075) +py_cobject_sources(#10842, 0) +py_cobjectnames(#10842, "__new__") +py_cmembers_versioned(#10839, "__new__", #10842, "2") +#10843 = @"C_type$SyntaxError$2__str__" +py_cobjects(#10843) +py_cobjecttypes(#10843, #10005) +py_cobject_sources(#10843, 0) +py_cobjectnames(#10843, "__str__") +py_cmembers_versioned(#10839, "__str__", #10843, "2") +#10844 = @"C_type$SyntaxError$2filename" +py_cobjects(#10844) +py_cobjecttypes(#10844, #10045) +py_cobject_sources(#10844, 0) +py_cobjectnames(#10844, "filename") +py_cmembers_versioned(#10839, "filename", #10844, "2") +#10845 = @"C_type$SyntaxError$2lineno" +py_cobjects(#10845) +py_cobjecttypes(#10845, #10045) +py_cobject_sources(#10845, 0) +py_cobjectnames(#10845, "lineno") +py_cmembers_versioned(#10839, "lineno", #10845, "2") +#10846 = @"C_type$SyntaxError$2msg" +py_cobjects(#10846) +py_cobjecttypes(#10846, #10045) +py_cobject_sources(#10846, 0) +py_cobjectnames(#10846, "msg") +py_cmembers_versioned(#10839, "msg", #10846, "2") +#10847 = @"C_type$SyntaxError$2offset" +py_cobjects(#10847) +py_cobjecttypes(#10847, #10045) +py_cobject_sources(#10847, 0) +py_cobjectnames(#10847, "offset") +py_cmembers_versioned(#10839, "offset", #10847, "2") +#10848 = @"C_type$SyntaxError$2print_file_and_line" +py_cobjects(#10848) +py_cobjecttypes(#10848, #10045) +py_cobject_sources(#10848, 0) +py_cobjectnames(#10848, "print_file_and_line") +py_cmembers_versioned(#10839, "print_file_and_line", #10848, "2") +#10849 = @"C_type$SyntaxError$2text" +py_cobjects(#10849) +py_cobjecttypes(#10849, #10045) +py_cobject_sources(#10849, 0) +py_cobjectnames(#10849, "text") +py_cmembers_versioned(#10839, "text", #10849, "2") +py_cmembers_versioned(#10839, ".super.", #10346, "2") +py_cobjectnames(#10839, "SyntaxError") +py_cmembers_versioned(#10835, ".super.", #10839, "2") +py_cobjectnames(#10835, "IndentationError") +py_cmembers_versioned(#10760, "IndentationError", #10835, "2") +#10850 = @"C_type$IndexError" +py_cobjects(#10850) +py_cobjecttypes(#10850, #10001) +py_cobject_sources(#10850, 0) +#10851 = @"C_bytes$e2bf5d749a504a9653f5e22f9f28b81478510e75" +py_cobjects(#10851) +py_cobjecttypes(#10851, #10028) +py_cobject_sources(#10851, 0) +py_cobjectnames(#10851, "b'Sequence index out of range.'") +py_cmembers_versioned(#10850, "__doc__", #10851, "2") +#10852 = @"C_type$IndexError$2__init__" +py_cobjects(#10852) +py_cobjecttypes(#10852, #10005) +py_cobject_sources(#10852, 0) +py_cobjectnames(#10852, "__init__") +py_cmembers_versioned(#10850, "__init__", #10852, "2") +#10853 = @"C_type$IndexError$2__new__" +py_cobjects(#10853) +py_cobjecttypes(#10853, #10075) +py_cobject_sources(#10853, 0) +py_cobjectnames(#10853, "__new__") +py_cmembers_versioned(#10850, "__new__", #10853, "2") +py_cmembers_versioned(#10850, ".super.", #10429, "2") +py_cobjectnames(#10850, "IndexError") +py_cmembers_versioned(#10760, "IndexError", #10850, "2") +py_cmembers_versioned(#10760, "KeyError", #10424, "2") +#10854 = @"C_type$KeyboardInterrupt" +py_cobjects(#10854) +py_cobjecttypes(#10854, #10001) +py_cobject_sources(#10854, 0) +#10855 = @"C_bytes$3027c1639d9aaf29dbb40c14d49e49b73fcddc02" +py_cobjects(#10855) +py_cobjecttypes(#10855, #10028) +py_cobject_sources(#10855, 0) +py_cobjectnames(#10855, "b'Program interrupted by user.'") +py_cmembers_versioned(#10854, "__doc__", #10855, "2") +#10856 = @"C_type$KeyboardInterrupt$2__init__" +py_cobjects(#10856) +py_cobjecttypes(#10856, #10005) +py_cobject_sources(#10856, 0) +py_cobjectnames(#10856, "__init__") +py_cmembers_versioned(#10854, "__init__", #10856, "2") +#10857 = @"C_type$KeyboardInterrupt$2__new__" +py_cobjects(#10857) +py_cobjecttypes(#10857, #10075) +py_cobject_sources(#10857, 0) +py_cobjectnames(#10857, "__new__") +py_cmembers_versioned(#10854, "__new__", #10857, "2") +py_cmembers_versioned(#10854, ".super.", #10354, "2") +py_cobjectnames(#10854, "KeyboardInterrupt") +py_cmembers_versioned(#10760, "KeyboardInterrupt", #10854, "2") +py_cmembers_versioned(#10760, "LookupError", #10429, "2") +#10858 = @"C_type$MemoryError" +py_cobjects(#10858) +py_cobjecttypes(#10858, #10001) +py_cobject_sources(#10858, 0) +#10859 = @"C_bytes$8287615f2ac89aad252242dec878907206c5210b" +py_cobjects(#10859) +py_cobjecttypes(#10859, #10028) +py_cobject_sources(#10859, 0) +py_cobjectnames(#10859, "b'Out of memory.'") +py_cmembers_versioned(#10858, "__doc__", #10859, "2") +#10860 = @"C_type$MemoryError$2__init__" +py_cobjects(#10860) +py_cobjecttypes(#10860, #10005) +py_cobject_sources(#10860, 0) +py_cobjectnames(#10860, "__init__") +py_cmembers_versioned(#10858, "__init__", #10860, "2") +#10861 = @"C_type$MemoryError$2__new__" +py_cobjects(#10861) +py_cobjecttypes(#10861, #10075) +py_cobject_sources(#10861, 0) +py_cobjectnames(#10861, "__new__") +py_cmembers_versioned(#10858, "__new__", #10861, "2") +py_cmembers_versioned(#10858, ".super.", #10346, "2") +py_cobjectnames(#10858, "MemoryError") +py_cmembers_versioned(#10760, "MemoryError", #10858, "2") +#10862 = @"C_type$NameError" +py_cobjects(#10862) +py_cobjecttypes(#10862, #10001) +py_cobject_sources(#10862, 0) +#10863 = @"C_bytes$3ee40dae3c3262da06ab3dd1f71e2e35167fc2c9" +py_cobjects(#10863) +py_cobjecttypes(#10863, #10028) +py_cobject_sources(#10863, 0) +py_cobjectnames(#10863, "b'Name not found globally.'") +py_cmembers_versioned(#10862, "__doc__", #10863, "2") +#10864 = @"C_type$NameError$2__init__" +py_cobjects(#10864) +py_cobjecttypes(#10864, #10005) +py_cobject_sources(#10864, 0) +py_cobjectnames(#10864, "__init__") +py_cmembers_versioned(#10862, "__init__", #10864, "2") +#10865 = @"C_type$NameError$2__new__" +py_cobjects(#10865) +py_cobjecttypes(#10865, #10075) +py_cobject_sources(#10865, 0) +py_cobjectnames(#10865, "__new__") +py_cmembers_versioned(#10862, "__new__", #10865, "2") +py_cmembers_versioned(#10862, ".super.", #10346, "2") +py_cobjectnames(#10862, "NameError") +py_cmembers_versioned(#10760, "NameError", #10862, "2") +py_cmembers_versioned(#10760, "None", #10017, "2") +#10866 = @"C_module$__builtin__$2NotImplemented" +#10867 = @"C_type$NotImplementedType" +py_cobjects(#10867) +py_cobjecttypes(#10867, #10001) +py_cobject_sources(#10867, 0) +py_cmembers_versioned(#10867, "__doc__", #10017, "2") +#10868 = @"C_type$NotImplementedType$2__repr__" +py_cobjects(#10868) +py_cobjecttypes(#10868, #10005) +py_cobject_sources(#10868, 0) +py_cobjectnames(#10868, "__repr__") +py_cmembers_versioned(#10867, "__repr__", #10868, "2") +py_cmembers_versioned(#10867, ".super.", #10021, "2") +py_cobjectnames(#10867, "NotImplementedType") +py_cobjects(#10866) +py_cobjecttypes(#10866, #10867) +py_cobject_sources(#10866, 0) +py_cobjectnames(#10866, "object") +py_cmembers_versioned(#10760, "NotImplemented", #10866, "2") +#10869 = @"C_type$NotImplementedError" +py_cobjects(#10869) +py_cobjecttypes(#10869, #10001) +py_cobject_sources(#10869, 0) +#10870 = @"C_bytes$e964a68e9c66aee1b350d0f97ba35e25939ba6c5" +py_cobjects(#10870) +py_cobjecttypes(#10870, #10028) +py_cobject_sources(#10870, 0) +py_cobjectnames(#10870, "b'Method or function hasn't been implemented yet.'") +py_cmembers_versioned(#10869, "__doc__", #10870, "2") +#10871 = @"C_type$NotImplementedError$2__init__" +py_cobjects(#10871) +py_cobjecttypes(#10871, #10005) +py_cobject_sources(#10871, 0) +py_cobjectnames(#10871, "__init__") +py_cmembers_versioned(#10869, "__init__", #10871, "2") +#10872 = @"C_type$NotImplementedError$2__new__" +py_cobjects(#10872) +py_cobjecttypes(#10872, #10075) +py_cobject_sources(#10872, 0) +py_cobjectnames(#10872, "__new__") +py_cmembers_versioned(#10869, "__new__", #10872, "2") +#10873 = @"C_type$RuntimeError" +py_cobjects(#10873) +py_cobjecttypes(#10873, #10001) +py_cobject_sources(#10873, 0) +#10874 = @"C_bytes$c32922004f1cab6d2b368005f373dc639dc0003a" +py_cobjects(#10874) +py_cobjecttypes(#10874, #10028) +py_cobject_sources(#10874, 0) +py_cobjectnames(#10874, "b'Unspecified run-time error.'") +py_cmembers_versioned(#10873, "__doc__", #10874, "2") +#10875 = @"C_type$RuntimeError$2__init__" +py_cobjects(#10875) +py_cobjecttypes(#10875, #10005) +py_cobject_sources(#10875, 0) +py_cobjectnames(#10875, "__init__") +py_cmembers_versioned(#10873, "__init__", #10875, "2") +#10876 = @"C_type$RuntimeError$2__new__" +py_cobjects(#10876) +py_cobjecttypes(#10876, #10075) +py_cobject_sources(#10876, 0) +py_cobjectnames(#10876, "__new__") +py_cmembers_versioned(#10873, "__new__", #10876, "2") +py_cmembers_versioned(#10873, ".super.", #10346, "2") +py_cobjectnames(#10873, "RuntimeError") +py_cmembers_versioned(#10869, ".super.", #10873, "2") +py_cobjectnames(#10869, "NotImplementedError") +py_cmembers_versioned(#10760, "NotImplementedError", #10869, "2") +#10877 = @"C_type$OSError" +py_cobjects(#10877) +py_cobjecttypes(#10877, #10001) +py_cobject_sources(#10877, 0) +#10878 = @"C_bytes$7c5e876e4f80392a70ac8970ce5b0afb23116479" +py_cobjects(#10878) +py_cobjecttypes(#10878, #10028) +py_cobject_sources(#10878, 0) +py_cobjectnames(#10878, "b'OS system call failed.'") +py_cmembers_versioned(#10877, "__doc__", #10878, "2") +#10879 = @"C_type$OSError$2__init__" +py_cobjects(#10879) +py_cobjecttypes(#10879, #10005) +py_cobject_sources(#10879, 0) +py_cobjectnames(#10879, "__init__") +py_cmembers_versioned(#10877, "__init__", #10879, "2") +#10880 = @"C_type$OSError$2__new__" +py_cobjects(#10880) +py_cobjecttypes(#10880, #10075) +py_cobject_sources(#10880, 0) +py_cobjectnames(#10880, "__new__") +py_cmembers_versioned(#10877, "__new__", #10880, "2") +py_cmembers_versioned(#10877, ".super.", #10802, "2") +py_cobjectnames(#10877, "OSError") +py_cmembers_versioned(#10760, "OSError", #10877, "2") +#10881 = @"C_type$OverflowError" +py_cobjects(#10881) +py_cobjecttypes(#10881, #10001) +py_cobject_sources(#10881, 0) +#10882 = @"C_bytes$81fc8eb0f559594e6743ac282bd13b3850623c63" +py_cobjects(#10882) +py_cobjecttypes(#10882, #10028) +py_cobject_sources(#10882, 0) +py_cobjectnames(#10882, "b'Result too large to be represented.'") +py_cmembers_versioned(#10881, "__doc__", #10882, "2") +#10883 = @"C_type$OverflowError$2__init__" +py_cobjects(#10883) +py_cobjecttypes(#10883, #10005) +py_cobject_sources(#10883, 0) +py_cobjectnames(#10883, "__init__") +py_cmembers_versioned(#10881, "__init__", #10883, "2") +#10884 = @"C_type$OverflowError$2__new__" +py_cobjects(#10884) +py_cobjecttypes(#10884, #10075) +py_cobject_sources(#10884, 0) +py_cobjectnames(#10884, "__new__") +py_cmembers_versioned(#10881, "__new__", #10884, "2") +py_cmembers_versioned(#10881, ".super.", #10770, "2") +py_cobjectnames(#10881, "OverflowError") +py_cmembers_versioned(#10760, "OverflowError", #10881, "2") +#10885 = @"C_type$PendingDeprecationWarning" +py_cobjects(#10885) +py_cobjecttypes(#10885, #10001) +py_cobject_sources(#10885, 0) +#10886 = @"C_bytes$6ede2da8b6b07148b234b6899810b8c42567c0df" +py_cobjects(#10886) +py_cobjecttypes(#10886, #10028) +py_cobject_sources(#10886, 0) +py_cobjectnames(#10886, "b'Base class for warnings about features which will be deprecated +in the future.'") +py_cmembers_versioned(#10885, "__doc__", #10886, "2") +#10887 = @"C_type$PendingDeprecationWarning$2__init__" +py_cobjects(#10887) +py_cobjecttypes(#10887, #10005) +py_cobject_sources(#10887, 0) +py_cobjectnames(#10887, "__init__") +py_cmembers_versioned(#10885, "__init__", #10887, "2") +#10888 = @"C_type$PendingDeprecationWarning$2__new__" +py_cobjects(#10888) +py_cobjecttypes(#10888, #10075) +py_cobject_sources(#10888, 0) +py_cobjectnames(#10888, "__new__") +py_cmembers_versioned(#10885, "__new__", #10888, "2") +py_cmembers_versioned(#10885, ".super.", #10786, "2") +py_cobjectnames(#10885, "PendingDeprecationWarning") +py_cmembers_versioned(#10760, "PendingDeprecationWarning", #10885, "2") +#10889 = @"C_type$ReferenceError" +py_cobjects(#10889) +py_cobjecttypes(#10889, #10001) +py_cobject_sources(#10889, 0) +#10890 = @"C_bytes$74d9e10154774d897708037af3911e85f791d151" +py_cobjects(#10890) +py_cobjecttypes(#10890, #10028) +py_cobject_sources(#10890, 0) +py_cobjectnames(#10890, "b'Weak ref proxy used after referent went away.'") +py_cmembers_versioned(#10889, "__doc__", #10890, "2") +#10891 = @"C_type$ReferenceError$2__init__" +py_cobjects(#10891) +py_cobjecttypes(#10891, #10005) +py_cobject_sources(#10891, 0) +py_cobjectnames(#10891, "__init__") +py_cmembers_versioned(#10889, "__init__", #10891, "2") +#10892 = @"C_type$ReferenceError$2__new__" +py_cobjects(#10892) +py_cobjecttypes(#10892, #10075) +py_cobject_sources(#10892, 0) +py_cobjectnames(#10892, "__new__") +py_cmembers_versioned(#10889, "__new__", #10892, "2") +py_cmembers_versioned(#10889, ".super.", #10346, "2") +py_cobjectnames(#10889, "ReferenceError") +py_cmembers_versioned(#10760, "ReferenceError", #10889, "2") +py_cmembers_versioned(#10760, "RuntimeError", #10873, "2") +#10893 = @"C_type$RuntimeWarning" +py_cobjects(#10893) +py_cobjecttypes(#10893, #10001) +py_cobject_sources(#10893, 0) +#10894 = @"C_bytes$1d911ad966f332393c3708556614e73ed1cbd284" +py_cobjects(#10894) +py_cobjecttypes(#10894, #10028) +py_cobject_sources(#10894, 0) +py_cobjectnames(#10894, "b'Base class for warnings about dubious runtime behavior.'") +py_cmembers_versioned(#10893, "__doc__", #10894, "2") +#10895 = @"C_type$RuntimeWarning$2__init__" +py_cobjects(#10895) +py_cobjecttypes(#10895, #10005) +py_cobject_sources(#10895, 0) +py_cobjectnames(#10895, "__init__") +py_cmembers_versioned(#10893, "__init__", #10895, "2") +#10896 = @"C_type$RuntimeWarning$2__new__" +py_cobjects(#10896) +py_cobjecttypes(#10896, #10075) +py_cobject_sources(#10896, 0) +py_cobjectnames(#10896, "__new__") +py_cmembers_versioned(#10893, "__new__", #10896, "2") +py_cmembers_versioned(#10893, ".super.", #10786, "2") +py_cobjectnames(#10893, "RuntimeWarning") +py_cmembers_versioned(#10760, "RuntimeWarning", #10893, "2") +py_cmembers_versioned(#10760, "StandardError", #10346, "2") +#10897 = @"C_type$StopIteration" +py_cobjects(#10897) +py_cobjecttypes(#10897, #10001) +py_cobject_sources(#10897, 0) +#10898 = @"C_bytes$54ddb31db0c09a5a734a28d48c4c9b5e24827897" +py_cobjects(#10898) +py_cobjecttypes(#10898, #10028) +py_cobject_sources(#10898, 0) +py_cobjectnames(#10898, "b'Signal the end from iterator.next().'") +py_cmembers_versioned(#10897, "__doc__", #10898, "2") +#10899 = @"C_type$StopIteration$2__init__" +py_cobjects(#10899) +py_cobjecttypes(#10899, #10005) +py_cobject_sources(#10899, 0) +py_cobjectnames(#10899, "__init__") +py_cmembers_versioned(#10897, "__init__", #10899, "2") +#10900 = @"C_type$StopIteration$2__new__" +py_cobjects(#10900) +py_cobjecttypes(#10900, #10075) +py_cobject_sources(#10900, 0) +py_cobjectnames(#10900, "__new__") +py_cmembers_versioned(#10897, "__new__", #10900, "2") +py_cmembers_versioned(#10897, ".super.", #10350, "2") +py_cobjectnames(#10897, "StopIteration") +py_cmembers_versioned(#10760, "StopIteration", #10897, "2") +py_cmembers_versioned(#10760, "SyntaxError", #10839, "2") +#10901 = @"C_type$SyntaxWarning" +py_cobjects(#10901) +py_cobjecttypes(#10901, #10001) +py_cobject_sources(#10901, 0) +#10902 = @"C_bytes$ed11da738626db6bc66dc76605890a35049a6b1f" +py_cobjects(#10902) +py_cobjecttypes(#10902, #10028) +py_cobject_sources(#10902, 0) +py_cobjectnames(#10902, "b'Base class for warnings about dubious syntax.'") +py_cmembers_versioned(#10901, "__doc__", #10902, "2") +#10903 = @"C_type$SyntaxWarning$2__init__" +py_cobjects(#10903) +py_cobjecttypes(#10903, #10005) +py_cobject_sources(#10903, 0) +py_cobjectnames(#10903, "__init__") +py_cmembers_versioned(#10901, "__init__", #10903, "2") +#10904 = @"C_type$SyntaxWarning$2__new__" +py_cobjects(#10904) +py_cobjecttypes(#10904, #10075) +py_cobject_sources(#10904, 0) +py_cobjectnames(#10904, "__new__") +py_cmembers_versioned(#10901, "__new__", #10904, "2") +py_cmembers_versioned(#10901, ".super.", #10786, "2") +py_cobjectnames(#10901, "SyntaxWarning") +py_cmembers_versioned(#10760, "SyntaxWarning", #10901, "2") +#10905 = @"C_type$SystemError" +py_cobjects(#10905) +py_cobjecttypes(#10905, #10001) +py_cobject_sources(#10905, 0) +#10906 = @"C_bytes$c1cf6790d4b65381912240b56b1abfccd1180511" +py_cobjects(#10906) +py_cobjecttypes(#10906, #10028) +py_cobject_sources(#10906, 0) +py_cobjectnames(#10906, "b'Internal error in the Python interpreter. + +Please report this to the Python maintainer, along with the traceback, +the Python version, and the hardware/OS platform and version.'") +py_cmembers_versioned(#10905, "__doc__", #10906, "2") +#10907 = @"C_type$SystemError$2__init__" +py_cobjects(#10907) +py_cobjecttypes(#10907, #10005) +py_cobject_sources(#10907, 0) +py_cobjectnames(#10907, "__init__") +py_cmembers_versioned(#10905, "__init__", #10907, "2") +#10908 = @"C_type$SystemError$2__new__" +py_cobjects(#10908) +py_cobjecttypes(#10908, #10075) +py_cobject_sources(#10908, 0) +py_cobjectnames(#10908, "__new__") +py_cmembers_versioned(#10905, "__new__", #10908, "2") +py_cmembers_versioned(#10905, ".super.", #10346, "2") +py_cobjectnames(#10905, "SystemError") +py_cmembers_versioned(#10760, "SystemError", #10905, "2") +#10909 = @"C_type$SystemExit" +py_cobjects(#10909) +py_cobjecttypes(#10909, #10001) +py_cobject_sources(#10909, 0) +#10910 = @"C_bytes$0f79405337feb97687ba9164ec3f11c719c6781d" +py_cobjects(#10910) +py_cobjecttypes(#10910, #10028) +py_cobject_sources(#10910, 0) +py_cobjectnames(#10910, "b'Request to exit from the interpreter.'") +py_cmembers_versioned(#10909, "__doc__", #10910, "2") +#10911 = @"C_type$SystemExit$2__init__" +py_cobjects(#10911) +py_cobjecttypes(#10911, #10005) +py_cobject_sources(#10911, 0) +py_cobjectnames(#10911, "__init__") +py_cmembers_versioned(#10909, "__init__", #10911, "2") +#10912 = @"C_type$SystemExit$2__new__" +py_cobjects(#10912) +py_cobjecttypes(#10912, #10075) +py_cobject_sources(#10912, 0) +py_cobjectnames(#10912, "__new__") +py_cmembers_versioned(#10909, "__new__", #10912, "2") +#10913 = @"C_type$SystemExit$2code" +py_cobjects(#10913) +py_cobjecttypes(#10913, #10045) +py_cobject_sources(#10913, 0) +py_cobjectnames(#10913, "code") +py_cmembers_versioned(#10909, "code", #10913, "2") +py_cmembers_versioned(#10909, ".super.", #10354, "2") +py_cobjectnames(#10909, "SystemExit") +py_cmembers_versioned(#10760, "SystemExit", #10909, "2") +#10914 = @"C_type$TabError" +py_cobjects(#10914) +py_cobjecttypes(#10914, #10001) +py_cobject_sources(#10914, 0) +#10915 = @"C_bytes$1f00990056c2ec84fb4412b2042ae8b7fa911445" +py_cobjects(#10915) +py_cobjecttypes(#10915, #10028) +py_cobject_sources(#10915, 0) +py_cobjectnames(#10915, "b'Improper mixture of spaces and tabs.'") +py_cmembers_versioned(#10914, "__doc__", #10915, "2") +#10916 = @"C_type$TabError$2__init__" +py_cobjects(#10916) +py_cobjecttypes(#10916, #10005) +py_cobject_sources(#10916, 0) +py_cobjectnames(#10916, "__init__") +py_cmembers_versioned(#10914, "__init__", #10916, "2") +#10917 = @"C_type$TabError$2__new__" +py_cobjects(#10917) +py_cobjecttypes(#10917, #10075) +py_cobject_sources(#10917, 0) +py_cobjectnames(#10917, "__new__") +py_cmembers_versioned(#10914, "__new__", #10917, "2") +py_cmembers_versioned(#10914, ".super.", #10835, "2") +py_cobjectnames(#10914, "TabError") +py_cmembers_versioned(#10760, "TabError", #10914, "2") +py_cmembers_versioned(#10760, "True", #10437, "2") +py_cmembers_versioned(#10760, "TypeError", #10342, "2") +#10918 = @"C_type$UnboundLocalError" +py_cobjects(#10918) +py_cobjecttypes(#10918, #10001) +py_cobject_sources(#10918, 0) +#10919 = @"C_bytes$71efb90adabbeacc59d1e4c9d90d3013f6b44b8d" +py_cobjects(#10919) +py_cobjecttypes(#10919, #10028) +py_cobject_sources(#10919, 0) +py_cobjectnames(#10919, "b'Local name referenced but not bound to a value.'") +py_cmembers_versioned(#10918, "__doc__", #10919, "2") +#10920 = @"C_type$UnboundLocalError$2__init__" +py_cobjects(#10920) +py_cobjecttypes(#10920, #10005) +py_cobject_sources(#10920, 0) +py_cobjectnames(#10920, "__init__") +py_cmembers_versioned(#10918, "__init__", #10920, "2") +#10921 = @"C_type$UnboundLocalError$2__new__" +py_cobjects(#10921) +py_cobjecttypes(#10921, #10075) +py_cobject_sources(#10921, 0) +py_cobjectnames(#10921, "__new__") +py_cmembers_versioned(#10918, "__new__", #10921, "2") +py_cmembers_versioned(#10918, ".super.", #10862, "2") +py_cobjectnames(#10918, "UnboundLocalError") +py_cmembers_versioned(#10760, "UnboundLocalError", #10918, "2") +#10922 = @"C_type$UnicodeDecodeError" +py_cobjects(#10922) +py_cobjecttypes(#10922, #10001) +py_cobject_sources(#10922, 0) +#10923 = @"C_bytes$098d73af685a30da73d6dff0e94c51a62adfb3df" +py_cobjects(#10923) +py_cobjecttypes(#10923, #10028) +py_cobject_sources(#10923, 0) +py_cobjectnames(#10923, "b'Unicode decoding error.'") +py_cmembers_versioned(#10922, "__doc__", #10923, "2") +#10924 = @"C_type$UnicodeDecodeError$2__init__" +py_cobjects(#10924) +py_cobjecttypes(#10924, #10005) +py_cobject_sources(#10924, 0) +py_cobjectnames(#10924, "__init__") +py_cmembers_versioned(#10922, "__init__", #10924, "2") +#10925 = @"C_type$UnicodeDecodeError$2__new__" +py_cobjects(#10925) +py_cobjecttypes(#10925, #10075) +py_cobject_sources(#10925, 0) +py_cobjectnames(#10925, "__new__") +py_cmembers_versioned(#10922, "__new__", #10925, "2") +#10926 = @"C_type$UnicodeDecodeError$2__str__" +py_cobjects(#10926) +py_cobjecttypes(#10926, #10005) +py_cobject_sources(#10926, 0) +py_cobjectnames(#10926, "__str__") +py_cmembers_versioned(#10922, "__str__", #10926, "2") +#10927 = @"C_type$UnicodeDecodeError$2encoding" +py_cobjects(#10927) +py_cobjecttypes(#10927, #10045) +py_cobject_sources(#10927, 0) +py_cobjectnames(#10927, "encoding") +py_cmembers_versioned(#10922, "encoding", #10927, "2") +#10928 = @"C_type$UnicodeDecodeError$2end" +py_cobjects(#10928) +py_cobjecttypes(#10928, #10045) +py_cobject_sources(#10928, 0) +py_cobjectnames(#10928, "end") +py_cmembers_versioned(#10922, "end", #10928, "2") +#10929 = @"C_type$UnicodeDecodeError$2object" +py_cobjects(#10929) +py_cobjecttypes(#10929, #10045) +py_cobject_sources(#10929, 0) +py_cobjectnames(#10929, "object") +py_cmembers_versioned(#10922, "object", #10929, "2") +#10930 = @"C_type$UnicodeDecodeError$2reason" +py_cobjects(#10930) +py_cobjecttypes(#10930, #10045) +py_cobject_sources(#10930, 0) +py_cobjectnames(#10930, "reason") +py_cmembers_versioned(#10922, "reason", #10930, "2") +#10931 = @"C_type$UnicodeDecodeError$2start" +py_cobjects(#10931) +py_cobjecttypes(#10931, #10045) +py_cobject_sources(#10931, 0) +py_cobjectnames(#10931, "start") +py_cmembers_versioned(#10922, "start", #10931, "2") +#10932 = @"C_type$UnicodeError" +py_cobjects(#10932) +py_cobjecttypes(#10932, #10001) +py_cobject_sources(#10932, 0) +#10933 = @"C_bytes$3a19c41c9f0652da65b386921d70709b4c6fa67d" +py_cobjects(#10933) +py_cobjecttypes(#10933, #10028) +py_cobject_sources(#10933, 0) +py_cobjectnames(#10933, "b'Unicode related error.'") +py_cmembers_versioned(#10932, "__doc__", #10933, "2") +#10934 = @"C_type$UnicodeError$2__init__" +py_cobjects(#10934) +py_cobjecttypes(#10934, #10005) +py_cobject_sources(#10934, 0) +py_cobjectnames(#10934, "__init__") +py_cmembers_versioned(#10932, "__init__", #10934, "2") +#10935 = @"C_type$UnicodeError$2__new__" +py_cobjects(#10935) +py_cobjecttypes(#10935, #10075) +py_cobject_sources(#10935, 0) +py_cobjectnames(#10935, "__new__") +py_cmembers_versioned(#10932, "__new__", #10935, "2") +#10936 = @"C_type$ValueError" +py_cobjects(#10936) +py_cobjecttypes(#10936, #10001) +py_cobject_sources(#10936, 0) +#10937 = @"C_bytes$1e87860add337182f95f7a558dc68165585485f7" +py_cobjects(#10937) +py_cobjecttypes(#10937, #10028) +py_cobject_sources(#10937, 0) +py_cobjectnames(#10937, "b'Inappropriate argument value (of correct type).'") +py_cmembers_versioned(#10936, "__doc__", #10937, "2") +#10938 = @"C_type$ValueError$2__init__" +py_cobjects(#10938) +py_cobjecttypes(#10938, #10005) +py_cobject_sources(#10938, 0) +py_cobjectnames(#10938, "__init__") +py_cmembers_versioned(#10936, "__init__", #10938, "2") +#10939 = @"C_type$ValueError$2__new__" +py_cobjects(#10939) +py_cobjecttypes(#10939, #10075) +py_cobject_sources(#10939, 0) +py_cobjectnames(#10939, "__new__") +py_cmembers_versioned(#10936, "__new__", #10939, "2") +py_cmembers_versioned(#10936, ".super.", #10346, "2") +py_cobjectnames(#10936, "ValueError") +py_cmembers_versioned(#10932, ".super.", #10936, "2") +py_cobjectnames(#10932, "UnicodeError") +py_cmembers_versioned(#10922, ".super.", #10932, "2") +py_cobjectnames(#10922, "UnicodeDecodeError") +py_cmembers_versioned(#10760, "UnicodeDecodeError", #10922, "2") +#10940 = @"C_type$UnicodeEncodeError" +py_cobjects(#10940) +py_cobjecttypes(#10940, #10001) +py_cobject_sources(#10940, 0) +#10941 = @"C_bytes$d7f716fab2cf715e5b3c0dc3336bbbdb18e1b03a" +py_cobjects(#10941) +py_cobjecttypes(#10941, #10028) +py_cobject_sources(#10941, 0) +py_cobjectnames(#10941, "b'Unicode encoding error.'") +py_cmembers_versioned(#10940, "__doc__", #10941, "2") +#10942 = @"C_type$UnicodeEncodeError$2__init__" +py_cobjects(#10942) +py_cobjecttypes(#10942, #10005) +py_cobject_sources(#10942, 0) +py_cobjectnames(#10942, "__init__") +py_cmembers_versioned(#10940, "__init__", #10942, "2") +#10943 = @"C_type$UnicodeEncodeError$2__new__" +py_cobjects(#10943) +py_cobjecttypes(#10943, #10075) +py_cobject_sources(#10943, 0) +py_cobjectnames(#10943, "__new__") +py_cmembers_versioned(#10940, "__new__", #10943, "2") +#10944 = @"C_type$UnicodeEncodeError$2__str__" +py_cobjects(#10944) +py_cobjecttypes(#10944, #10005) +py_cobject_sources(#10944, 0) +py_cobjectnames(#10944, "__str__") +py_cmembers_versioned(#10940, "__str__", #10944, "2") +#10945 = @"C_type$UnicodeEncodeError$2encoding" +py_cobjects(#10945) +py_cobjecttypes(#10945, #10045) +py_cobject_sources(#10945, 0) +py_cobjectnames(#10945, "encoding") +py_cmembers_versioned(#10940, "encoding", #10945, "2") +#10946 = @"C_type$UnicodeEncodeError$2end" +py_cobjects(#10946) +py_cobjecttypes(#10946, #10045) +py_cobject_sources(#10946, 0) +py_cobjectnames(#10946, "end") +py_cmembers_versioned(#10940, "end", #10946, "2") +#10947 = @"C_type$UnicodeEncodeError$2object" +py_cobjects(#10947) +py_cobjecttypes(#10947, #10045) +py_cobject_sources(#10947, 0) +py_cobjectnames(#10947, "object") +py_cmembers_versioned(#10940, "object", #10947, "2") +#10948 = @"C_type$UnicodeEncodeError$2reason" +py_cobjects(#10948) +py_cobjecttypes(#10948, #10045) +py_cobject_sources(#10948, 0) +py_cobjectnames(#10948, "reason") +py_cmembers_versioned(#10940, "reason", #10948, "2") +#10949 = @"C_type$UnicodeEncodeError$2start" +py_cobjects(#10949) +py_cobjecttypes(#10949, #10045) +py_cobject_sources(#10949, 0) +py_cobjectnames(#10949, "start") +py_cmembers_versioned(#10940, "start", #10949, "2") +py_cmembers_versioned(#10940, ".super.", #10932, "2") +py_cobjectnames(#10940, "UnicodeEncodeError") +py_cmembers_versioned(#10760, "UnicodeEncodeError", #10940, "2") +py_cmembers_versioned(#10760, "UnicodeError", #10932, "2") +#10950 = @"C_type$UnicodeTranslateError" +py_cobjects(#10950) +py_cobjecttypes(#10950, #10001) +py_cobject_sources(#10950, 0) +#10951 = @"C_bytes$cee41dba9177b2a51dac7bada4e5d4506e08c9ba" +py_cobjects(#10951) +py_cobjecttypes(#10951, #10028) +py_cobject_sources(#10951, 0) +py_cobjectnames(#10951, "b'Unicode translation error.'") +py_cmembers_versioned(#10950, "__doc__", #10951, "2") +#10952 = @"C_type$UnicodeTranslateError$2__init__" +py_cobjects(#10952) +py_cobjecttypes(#10952, #10005) +py_cobject_sources(#10952, 0) +py_cobjectnames(#10952, "__init__") +py_cmembers_versioned(#10950, "__init__", #10952, "2") +#10953 = @"C_type$UnicodeTranslateError$2__new__" +py_cobjects(#10953) +py_cobjecttypes(#10953, #10075) +py_cobject_sources(#10953, 0) +py_cobjectnames(#10953, "__new__") +py_cmembers_versioned(#10950, "__new__", #10953, "2") +#10954 = @"C_type$UnicodeTranslateError$2__str__" +py_cobjects(#10954) +py_cobjecttypes(#10954, #10005) +py_cobject_sources(#10954, 0) +py_cobjectnames(#10954, "__str__") +py_cmembers_versioned(#10950, "__str__", #10954, "2") +#10955 = @"C_type$UnicodeTranslateError$2encoding" +py_cobjects(#10955) +py_cobjecttypes(#10955, #10045) +py_cobject_sources(#10955, 0) +py_cobjectnames(#10955, "encoding") +py_cmembers_versioned(#10950, "encoding", #10955, "2") +#10956 = @"C_type$UnicodeTranslateError$2end" +py_cobjects(#10956) +py_cobjecttypes(#10956, #10045) +py_cobject_sources(#10956, 0) +py_cobjectnames(#10956, "end") +py_cmembers_versioned(#10950, "end", #10956, "2") +#10957 = @"C_type$UnicodeTranslateError$2object" +py_cobjects(#10957) +py_cobjecttypes(#10957, #10045) +py_cobject_sources(#10957, 0) +py_cobjectnames(#10957, "object") +py_cmembers_versioned(#10950, "object", #10957, "2") +#10958 = @"C_type$UnicodeTranslateError$2reason" +py_cobjects(#10958) +py_cobjecttypes(#10958, #10045) +py_cobject_sources(#10958, 0) +py_cobjectnames(#10958, "reason") +py_cmembers_versioned(#10950, "reason", #10958, "2") +#10959 = @"C_type$UnicodeTranslateError$2start" +py_cobjects(#10959) +py_cobjecttypes(#10959, #10045) +py_cobject_sources(#10959, 0) +py_cobjectnames(#10959, "start") +py_cmembers_versioned(#10950, "start", #10959, "2") +py_cmembers_versioned(#10950, ".super.", #10932, "2") +py_cobjectnames(#10950, "UnicodeTranslateError") +py_cmembers_versioned(#10760, "UnicodeTranslateError", #10950, "2") +#10960 = @"C_type$UnicodeWarning" +py_cobjects(#10960) +py_cobjecttypes(#10960, #10001) +py_cobject_sources(#10960, 0) +#10961 = @"C_bytes$267b90f523a75b12513886062a42ff88d744c729" +py_cobjects(#10961) +py_cobjecttypes(#10961, #10028) +py_cobject_sources(#10961, 0) +py_cobjectnames(#10961, "b'Base class for warnings about Unicode related problems, mostly +related to conversion problems.'") +py_cmembers_versioned(#10960, "__doc__", #10961, "2") +#10962 = @"C_type$UnicodeWarning$2__init__" +py_cobjects(#10962) +py_cobjecttypes(#10962, #10005) +py_cobject_sources(#10962, 0) +py_cobjectnames(#10962, "__init__") +py_cmembers_versioned(#10960, "__init__", #10962, "2") +#10963 = @"C_type$UnicodeWarning$2__new__" +py_cobjects(#10963) +py_cobjecttypes(#10963, #10075) +py_cobject_sources(#10963, 0) +py_cobjectnames(#10963, "__new__") +py_cmembers_versioned(#10960, "__new__", #10963, "2") +py_cmembers_versioned(#10960, ".super.", #10786, "2") +py_cobjectnames(#10960, "UnicodeWarning") +py_cmembers_versioned(#10760, "UnicodeWarning", #10960, "2") +#10964 = @"C_type$UserWarning" +py_cobjects(#10964) +py_cobjecttypes(#10964, #10001) +py_cobject_sources(#10964, 0) +#10965 = @"C_bytes$a020b0a894b4052b6ee113d3143b9d2aef84bb79" +py_cobjects(#10965) +py_cobjecttypes(#10965, #10028) +py_cobject_sources(#10965, 0) +py_cobjectnames(#10965, "b'Base class for warnings generated by user code.'") +py_cmembers_versioned(#10964, "__doc__", #10965, "2") +#10966 = @"C_type$UserWarning$2__init__" +py_cobjects(#10966) +py_cobjecttypes(#10966, #10005) +py_cobject_sources(#10966, 0) +py_cobjectnames(#10966, "__init__") +py_cmembers_versioned(#10964, "__init__", #10966, "2") +#10967 = @"C_type$UserWarning$2__new__" +py_cobjects(#10967) +py_cobjecttypes(#10967, #10075) +py_cobject_sources(#10967, 0) +py_cobjectnames(#10967, "__new__") +py_cmembers_versioned(#10964, "__new__", #10967, "2") +py_cmembers_versioned(#10964, ".super.", #10786, "2") +py_cobjectnames(#10964, "UserWarning") +py_cmembers_versioned(#10760, "UserWarning", #10964, "2") +py_cmembers_versioned(#10760, "ValueError", #10936, "2") +py_cmembers_versioned(#10760, "Warning", #10786, "2") +#10968 = @"C_type$ZeroDivisionError" +py_cobjects(#10968) +py_cobjecttypes(#10968, #10001) +py_cobject_sources(#10968, 0) +#10969 = @"C_bytes$ac840e5e9ea92a5fee400dc28afbc156de91a254" +py_cobjects(#10969) +py_cobjecttypes(#10969, #10028) +py_cobject_sources(#10969, 0) +py_cobjectnames(#10969, "b'Second argument to a division or modulo operation was zero.'") +py_cmembers_versioned(#10968, "__doc__", #10969, "2") +#10970 = @"C_type$ZeroDivisionError$2__init__" +py_cobjects(#10970) +py_cobjecttypes(#10970, #10005) +py_cobject_sources(#10970, 0) +py_cobjectnames(#10970, "__init__") +py_cmembers_versioned(#10968, "__init__", #10970, "2") +#10971 = @"C_type$ZeroDivisionError$2__new__" +py_cobjects(#10971) +py_cobjecttypes(#10971, #10075) +py_cobject_sources(#10971, 0) +py_cobjectnames(#10971, "__new__") +py_cmembers_versioned(#10968, "__new__", #10971, "2") +py_cmembers_versioned(#10968, ".super.", #10770, "2") +py_cobjectnames(#10968, "ZeroDivisionError") +py_cmembers_versioned(#10760, "ZeroDivisionError", #10968, "2") +py_cmembers_versioned(#10760, "__debug__", #10437, "2") +#10972 = @"C_bytes$f54dca68bb1cb438b5052c4a03ef13626ccf985f" +py_cobjects(#10972) +py_cobjecttypes(#10972, #10028) +py_cobject_sources(#10972, 0) +py_cobjectnames(#10972, "b'Built-in functions, exceptions, and other objects. + +Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.'") +py_cmembers_versioned(#10760, "__doc__", #10972, "2") +#10973 = @"C_builtin_function_or_method$builtins.__import__" +py_cobjects(#10973) +py_cobjecttypes(#10973, #10075) +py_cobject_sources(#10973, 0) +py_cobjectnames(#10973, "__import__") +py_cmembers_versioned(#10760, "__import__", #10973, "2") +#10974 = @"C_bytes$3f91ef9b413ce508f0382fd3b182901dfb6bb0ce" +py_cobjects(#10974) +py_cobjecttypes(#10974, #10028) +py_cobject_sources(#10974, 0) +py_cobjectnames(#10974, "b'__builtin__'") +py_cmembers_versioned(#10760, "__name__", #10974, "2") +py_cmembers_versioned(#10760, "__package__", #10017, "2") +#10975 = @"C_builtin_function_or_method$builtins.abs" +py_cobjects(#10975) +py_cobjecttypes(#10975, #10075) +py_cobject_sources(#10975, 0) +py_cobjectnames(#10975, "abs") +py_cmembers_versioned(#10760, "abs", #10975, "2") +#10976 = @"C_builtin_function_or_method$builtins.all" +py_cobjects(#10976) +py_cobjecttypes(#10976, #10075) +py_cobject_sources(#10976, 0) +py_cobjectnames(#10976, "all") +py_cmembers_versioned(#10760, "all", #10976, "2") +#10977 = @"C_builtin_function_or_method$builtins.any" +py_cobjects(#10977) +py_cobjecttypes(#10977, #10075) +py_cobject_sources(#10977, 0) +py_cobjectnames(#10977, "any") +py_cmembers_versioned(#10760, "any", #10977, "2") +#10978 = @"C_builtin_function_or_method$builtins.apply" +py_cobjects(#10978) +py_cobjecttypes(#10978, #10075) +py_cobject_sources(#10978, 0) +py_cobjectnames(#10978, "apply") +py_cmembers_versioned(#10760, "apply", #10978, "2") +py_cmembers_versioned(#10760, "basestring", #10151, "2") +#10979 = @"C_builtin_function_or_method$builtins.bin" +py_cobjects(#10979) +py_cobjecttypes(#10979, #10075) +py_cobject_sources(#10979, 0) +py_cobjectnames(#10979, "bin") +py_cmembers_versioned(#10760, "bin", #10979, "2") +py_cmembers_versioned(#10760, "bool", #10438, "2") +#10980 = @"C_type$buffer" +py_cobjects(#10980) +py_cobjecttypes(#10980, #10001) +py_cobject_sources(#10980, 0) +#10981 = @"C_type$buffer$2__add__" +py_cobjects(#10981) +py_cobjecttypes(#10981, #10005) +py_cobject_sources(#10981, 0) +py_cobjectnames(#10981, "__add__") +py_cmembers_versioned(#10980, "__add__", #10981, "2") +#10982 = @"C_type$buffer$2__cmp__" +py_cobjects(#10982) +py_cobjecttypes(#10982, #10005) +py_cobject_sources(#10982, 0) +py_cobjectnames(#10982, "__cmp__") +py_cmembers_versioned(#10980, "__cmp__", #10982, "2") +#10983 = @"C_type$buffer$2__delitem__" +py_cobjects(#10983) +py_cobjecttypes(#10983, #10005) +py_cobject_sources(#10983, 0) +py_cobjectnames(#10983, "__delitem__") +py_cmembers_versioned(#10980, "__delitem__", #10983, "2") +#10984 = @"C_type$buffer$2__delslice__" +py_cobjects(#10984) +py_cobjecttypes(#10984, #10005) +py_cobject_sources(#10984, 0) +py_cobjectnames(#10984, "__delslice__") +py_cmembers_versioned(#10980, "__delslice__", #10984, "2") +#10985 = @"C_bytes$3e544df634e6e37fcef65d071bf3d36d7bca6069" +py_cobjects(#10985) +py_cobjecttypes(#10985, #10028) +py_cobject_sources(#10985, 0) +py_cobjectnames(#10985, "b'buffer(object [, offset[, size]]) + +Create a new buffer object which references the given object. +The buffer will reference a slice of the target object from the +start of the object (or at the specified offset). The slice will +extend to the end of the target object (or with the specified size).'") +py_cmembers_versioned(#10980, "__doc__", #10985, "2") +#10986 = @"C_type$buffer$2__getattribute__" +py_cobjects(#10986) +py_cobjecttypes(#10986, #10005) +py_cobject_sources(#10986, 0) +py_cobjectnames(#10986, "__getattribute__") +py_cmembers_versioned(#10980, "__getattribute__", #10986, "2") +#10987 = @"C_type$buffer$2__getitem__" +py_cobjects(#10987) +py_cobjecttypes(#10987, #10005) +py_cobject_sources(#10987, 0) +py_cobjectnames(#10987, "__getitem__") +py_cmembers_versioned(#10980, "__getitem__", #10987, "2") +#10988 = @"C_type$buffer$2__getslice__" +py_cobjects(#10988) +py_cobjecttypes(#10988, #10005) +py_cobject_sources(#10988, 0) +py_cobjectnames(#10988, "__getslice__") +py_cmembers_versioned(#10980, "__getslice__", #10988, "2") +#10989 = @"C_type$buffer$2__hash__" +py_cobjects(#10989) +py_cobjecttypes(#10989, #10005) +py_cobject_sources(#10989, 0) +py_cobjectnames(#10989, "__hash__") +py_cmembers_versioned(#10980, "__hash__", #10989, "2") +#10990 = @"C_type$buffer$2__len__" +py_cobjects(#10990) +py_cobjecttypes(#10990, #10005) +py_cobject_sources(#10990, 0) +py_cobjectnames(#10990, "__len__") +py_cmembers_versioned(#10980, "__len__", #10990, "2") +#10991 = @"C_type$buffer$2__mul__" +py_cobjects(#10991) +py_cobjecttypes(#10991, #10005) +py_cobject_sources(#10991, 0) +py_cobjectnames(#10991, "__mul__") +py_cmembers_versioned(#10980, "__mul__", #10991, "2") +#10992 = @"C_type$buffer$2__new__" +py_cobjects(#10992) +py_cobjecttypes(#10992, #10075) +py_cobject_sources(#10992, 0) +py_cobjectnames(#10992, "__new__") +py_cmembers_versioned(#10980, "__new__", #10992, "2") +#10993 = @"C_type$buffer$2__repr__" +py_cobjects(#10993) +py_cobjecttypes(#10993, #10005) +py_cobject_sources(#10993, 0) +py_cobjectnames(#10993, "__repr__") +py_cmembers_versioned(#10980, "__repr__", #10993, "2") +#10994 = @"C_type$buffer$2__rmul__" +py_cobjects(#10994) +py_cobjecttypes(#10994, #10005) +py_cobject_sources(#10994, 0) +py_cobjectnames(#10994, "__rmul__") +py_cmembers_versioned(#10980, "__rmul__", #10994, "2") +#10995 = @"C_type$buffer$2__setitem__" +py_cobjects(#10995) +py_cobjecttypes(#10995, #10005) +py_cobject_sources(#10995, 0) +py_cobjectnames(#10995, "__setitem__") +py_cmembers_versioned(#10980, "__setitem__", #10995, "2") +#10996 = @"C_type$buffer$2__setslice__" +py_cobjects(#10996) +py_cobjecttypes(#10996, #10005) +py_cobject_sources(#10996, 0) +py_cobjectnames(#10996, "__setslice__") +py_cmembers_versioned(#10980, "__setslice__", #10996, "2") +#10997 = @"C_type$buffer$2__str__" +py_cobjects(#10997) +py_cobjecttypes(#10997, #10005) +py_cobject_sources(#10997, 0) +py_cobjectnames(#10997, "__str__") +py_cmembers_versioned(#10980, "__str__", #10997, "2") +py_cmembers_versioned(#10980, ".super.", #10021, "2") +py_cobjectnames(#10980, "buffer") +py_cmembers_versioned(#10760, "buffer", #10980, "2") +#10998 = @"C_type$bytearray" +py_cobjects(#10998) +py_cobjecttypes(#10998, #10001) +py_cobject_sources(#10998, 0) +#10999 = @"C_type$bytearray$2__add__" +py_cobjects(#10999) +py_cobjecttypes(#10999, #10005) +py_cobject_sources(#10999, 0) +py_cobjectnames(#10999, "__add__") +py_cmembers_versioned(#10998, "__add__", #10999, "2") +#11000 = @"C_type$bytearray$2__alloc__" +py_cobjects(#11000) +py_cobjecttypes(#11000, #10034) +py_cobject_sources(#11000, 0) +py_cobjectnames(#11000, "__alloc__") +py_cmembers_versioned(#10998, "__alloc__", #11000, "2") +#11001 = @"C_type$bytearray$2__contains__" +py_cobjects(#11001) +py_cobjecttypes(#11001, #10005) +py_cobject_sources(#11001, 0) +py_cobjectnames(#11001, "__contains__") +py_cmembers_versioned(#10998, "__contains__", #11001, "2") +#11002 = @"C_type$bytearray$2__delitem__" +py_cobjects(#11002) +py_cobjecttypes(#11002, #10005) +py_cobject_sources(#11002, 0) +py_cobjectnames(#11002, "__delitem__") +py_cmembers_versioned(#10998, "__delitem__", #11002, "2") +#11003 = @"C_bytes$a16af28a6e31a275c76a7782f231d141e5b94cc0" +py_cobjects(#11003) +py_cobjecttypes(#11003, #10028) +py_cobject_sources(#11003, 0) +py_cobjectnames(#11003, "b'bytearray(iterable_of_ints) -> bytearray. +bytearray(string, encoding[, errors]) -> bytearray. +bytearray(bytes_or_bytearray) -> mutable copy of bytes_or_bytearray. +bytearray(memory_view) -> bytearray. + +Construct a mutable bytearray object from: + - an iterable yielding integers in range(256) + - a text string encoded using the specified encoding + - a bytes or a bytearray object + - any object implementing the buffer API. + +bytearray(int) -> bytearray. + +Construct a zero-initialized bytearray of the given length.'") +py_cmembers_versioned(#10998, "__doc__", #11003, "2") +#11004 = @"C_type$bytearray$2__eq__" +py_cobjects(#11004) +py_cobjecttypes(#11004, #10005) +py_cobject_sources(#11004, 0) +py_cobjectnames(#11004, "__eq__") +py_cmembers_versioned(#10998, "__eq__", #11004, "2") +#11005 = @"C_type$bytearray$2__ge__" +py_cobjects(#11005) +py_cobjecttypes(#11005, #10005) +py_cobject_sources(#11005, 0) +py_cobjectnames(#11005, "__ge__") +py_cmembers_versioned(#10998, "__ge__", #11005, "2") +#11006 = @"C_type$bytearray$2__getattribute__" +py_cobjects(#11006) +py_cobjecttypes(#11006, #10005) +py_cobject_sources(#11006, 0) +py_cobjectnames(#11006, "__getattribute__") +py_cmembers_versioned(#10998, "__getattribute__", #11006, "2") +#11007 = @"C_type$bytearray$2__getitem__" +py_cobjects(#11007) +py_cobjecttypes(#11007, #10005) +py_cobject_sources(#11007, 0) +py_cobjectnames(#11007, "__getitem__") +py_cmembers_versioned(#10998, "__getitem__", #11007, "2") +#11008 = @"C_type$bytearray$2__gt__" +py_cobjects(#11008) +py_cobjecttypes(#11008, #10005) +py_cobject_sources(#11008, 0) +py_cobjectnames(#11008, "__gt__") +py_cmembers_versioned(#10998, "__gt__", #11008, "2") +#11009 = @"C_type$bytearray$2__iadd__" +py_cobjects(#11009) +py_cobjecttypes(#11009, #10005) +py_cobject_sources(#11009, 0) +py_cobjectnames(#11009, "__iadd__") +py_cmembers_versioned(#10998, "__iadd__", #11009, "2") +#11010 = @"C_type$bytearray$2__imul__" +py_cobjects(#11010) +py_cobjecttypes(#11010, #10005) +py_cobject_sources(#11010, 0) +py_cobjectnames(#11010, "__imul__") +py_cmembers_versioned(#10998, "__imul__", #11010, "2") +#11011 = @"C_type$bytearray$2__init__" +py_cobjects(#11011) +py_cobjecttypes(#11011, #10005) +py_cobject_sources(#11011, 0) +py_cobjectnames(#11011, "__init__") +py_cmembers_versioned(#10998, "__init__", #11011, "2") +#11012 = @"C_type$bytearray$2__iter__" +py_cobjects(#11012) +py_cobjecttypes(#11012, #10005) +py_cobject_sources(#11012, 0) +py_cobjectnames(#11012, "__iter__") +py_cmembers_versioned(#10998, "__iter__", #11012, "2") +#11013 = @"C_type$bytearray$2__le__" +py_cobjects(#11013) +py_cobjecttypes(#11013, #10005) +py_cobject_sources(#11013, 0) +py_cobjectnames(#11013, "__le__") +py_cmembers_versioned(#10998, "__le__", #11013, "2") +#11014 = @"C_type$bytearray$2__len__" +py_cobjects(#11014) +py_cobjecttypes(#11014, #10005) +py_cobject_sources(#11014, 0) +py_cobjectnames(#11014, "__len__") +py_cmembers_versioned(#10998, "__len__", #11014, "2") +#11015 = @"C_type$bytearray$2__lt__" +py_cobjects(#11015) +py_cobjecttypes(#11015, #10005) +py_cobject_sources(#11015, 0) +py_cobjectnames(#11015, "__lt__") +py_cmembers_versioned(#10998, "__lt__", #11015, "2") +#11016 = @"C_type$bytearray$2__mul__" +py_cobjects(#11016) +py_cobjecttypes(#11016, #10005) +py_cobject_sources(#11016, 0) +py_cobjectnames(#11016, "__mul__") +py_cmembers_versioned(#10998, "__mul__", #11016, "2") +#11017 = @"C_type$bytearray$2__ne__" +py_cobjects(#11017) +py_cobjecttypes(#11017, #10005) +py_cobject_sources(#11017, 0) +py_cobjectnames(#11017, "__ne__") +py_cmembers_versioned(#10998, "__ne__", #11017, "2") +#11018 = @"C_type$bytearray$2__new__" +py_cobjects(#11018) +py_cobjecttypes(#11018, #10075) +py_cobject_sources(#11018, 0) +py_cobjectnames(#11018, "__new__") +py_cmembers_versioned(#10998, "__new__", #11018, "2") +#11019 = @"C_type$bytearray$2__reduce__" +py_cobjects(#11019) +py_cobjecttypes(#11019, #10034) +py_cobject_sources(#11019, 0) +py_cobjectnames(#11019, "__reduce__") +py_cmembers_versioned(#10998, "__reduce__", #11019, "2") +#11020 = @"C_type$bytearray$2__repr__" +py_cobjects(#11020) +py_cobjecttypes(#11020, #10005) +py_cobject_sources(#11020, 0) +py_cobjectnames(#11020, "__repr__") +py_cmembers_versioned(#10998, "__repr__", #11020, "2") +#11021 = @"C_type$bytearray$2__rmul__" +py_cobjects(#11021) +py_cobjecttypes(#11021, #10005) +py_cobject_sources(#11021, 0) +py_cobjectnames(#11021, "__rmul__") +py_cmembers_versioned(#10998, "__rmul__", #11021, "2") +#11022 = @"C_type$bytearray$2__setitem__" +py_cobjects(#11022) +py_cobjecttypes(#11022, #10005) +py_cobject_sources(#11022, 0) +py_cobjectnames(#11022, "__setitem__") +py_cmembers_versioned(#10998, "__setitem__", #11022, "2") +#11023 = @"C_type$bytearray$2__sizeof__" +py_cobjects(#11023) +py_cobjecttypes(#11023, #10034) +py_cobject_sources(#11023, 0) +py_cobjectnames(#11023, "__sizeof__") +py_cmembers_versioned(#10998, "__sizeof__", #11023, "2") +#11024 = @"C_type$bytearray$2__str__" +py_cobjects(#11024) +py_cobjecttypes(#11024, #10005) +py_cobject_sources(#11024, 0) +py_cobjectnames(#11024, "__str__") +py_cmembers_versioned(#10998, "__str__", #11024, "2") +#11025 = @"C_type$bytearray$2append" +py_cobjects(#11025) +py_cobjecttypes(#11025, #10034) +py_cobject_sources(#11025, 0) +py_cobjectnames(#11025, "append") +py_cmembers_versioned(#10998, "append", #11025, "2") +#11026 = @"C_type$bytearray$2capitalize" +py_cobjects(#11026) +py_cobjecttypes(#11026, #10034) +py_cobject_sources(#11026, 0) +py_cobjectnames(#11026, "capitalize") +py_cmembers_versioned(#10998, "capitalize", #11026, "2") +#11027 = @"C_type$bytearray$2center" +py_cobjects(#11027) +py_cobjecttypes(#11027, #10034) +py_cobject_sources(#11027, 0) +py_cobjectnames(#11027, "center") +py_cmembers_versioned(#10998, "center", #11027, "2") +#11028 = @"C_type$bytearray$2count" +py_cobjects(#11028) +py_cobjecttypes(#11028, #10034) +py_cobject_sources(#11028, 0) +py_cobjectnames(#11028, "count") +py_cmembers_versioned(#10998, "count", #11028, "2") +#11029 = @"C_type$bytearray$2decode" +py_cobjects(#11029) +py_cobjecttypes(#11029, #10034) +py_cobject_sources(#11029, 0) +py_cobjectnames(#11029, "decode") +py_cmembers_versioned(#10998, "decode", #11029, "2") +#11030 = @"C_type$bytearray$2endswith" +py_cobjects(#11030) +py_cobjecttypes(#11030, #10034) +py_cobject_sources(#11030, 0) +py_cobjectnames(#11030, "endswith") +py_cmembers_versioned(#10998, "endswith", #11030, "2") +#11031 = @"C_type$bytearray$2expandtabs" +py_cobjects(#11031) +py_cobjecttypes(#11031, #10034) +py_cobject_sources(#11031, 0) +py_cobjectnames(#11031, "expandtabs") +py_cmembers_versioned(#10998, "expandtabs", #11031, "2") +#11032 = @"C_type$bytearray$2extend" +py_cobjects(#11032) +py_cobjecttypes(#11032, #10034) +py_cobject_sources(#11032, 0) +py_cobjectnames(#11032, "extend") +py_cmembers_versioned(#10998, "extend", #11032, "2") +#11033 = @"C_type$bytearray$2find" +py_cobjects(#11033) +py_cobjecttypes(#11033, #10034) +py_cobject_sources(#11033, 0) +py_cobjectnames(#11033, "find") +py_cmembers_versioned(#10998, "find", #11033, "2") +#11034 = @"C_type$bytearray$2fromhex" +py_cobjects(#11034) +py_cobjecttypes(#11034, #10169) +py_cobject_sources(#11034, 0) +py_cobjectnames(#11034, "fromhex") +py_cmembers_versioned(#10998, "fromhex", #11034, "2") +#11035 = @"C_type$bytearray$2index" +py_cobjects(#11035) +py_cobjecttypes(#11035, #10034) +py_cobject_sources(#11035, 0) +py_cobjectnames(#11035, "index") +py_cmembers_versioned(#10998, "index", #11035, "2") +#11036 = @"C_type$bytearray$2insert" +py_cobjects(#11036) +py_cobjecttypes(#11036, #10034) +py_cobject_sources(#11036, 0) +py_cobjectnames(#11036, "insert") +py_cmembers_versioned(#10998, "insert", #11036, "2") +#11037 = @"C_type$bytearray$2isalnum" +py_cobjects(#11037) +py_cobjecttypes(#11037, #10034) +py_cobject_sources(#11037, 0) +py_cobjectnames(#11037, "isalnum") +py_cmembers_versioned(#10998, "isalnum", #11037, "2") +#11038 = @"C_type$bytearray$2isalpha" +py_cobjects(#11038) +py_cobjecttypes(#11038, #10034) +py_cobject_sources(#11038, 0) +py_cobjectnames(#11038, "isalpha") +py_cmembers_versioned(#10998, "isalpha", #11038, "2") +#11039 = @"C_type$bytearray$2isdigit" +py_cobjects(#11039) +py_cobjecttypes(#11039, #10034) +py_cobject_sources(#11039, 0) +py_cobjectnames(#11039, "isdigit") +py_cmembers_versioned(#10998, "isdigit", #11039, "2") +#11040 = @"C_type$bytearray$2islower" +py_cobjects(#11040) +py_cobjecttypes(#11040, #10034) +py_cobject_sources(#11040, 0) +py_cobjectnames(#11040, "islower") +py_cmembers_versioned(#10998, "islower", #11040, "2") +#11041 = @"C_type$bytearray$2isspace" +py_cobjects(#11041) +py_cobjecttypes(#11041, #10034) +py_cobject_sources(#11041, 0) +py_cobjectnames(#11041, "isspace") +py_cmembers_versioned(#10998, "isspace", #11041, "2") +#11042 = @"C_type$bytearray$2istitle" +py_cobjects(#11042) +py_cobjecttypes(#11042, #10034) +py_cobject_sources(#11042, 0) +py_cobjectnames(#11042, "istitle") +py_cmembers_versioned(#10998, "istitle", #11042, "2") +#11043 = @"C_type$bytearray$2isupper" +py_cobjects(#11043) +py_cobjecttypes(#11043, #10034) +py_cobject_sources(#11043, 0) +py_cobjectnames(#11043, "isupper") +py_cmembers_versioned(#10998, "isupper", #11043, "2") +#11044 = @"C_type$bytearray$2join" +py_cobjects(#11044) +py_cobjecttypes(#11044, #10034) +py_cobject_sources(#11044, 0) +py_cobjectnames(#11044, "join") +py_cmembers_versioned(#10998, "join", #11044, "2") +#11045 = @"C_type$bytearray$2ljust" +py_cobjects(#11045) +py_cobjecttypes(#11045, #10034) +py_cobject_sources(#11045, 0) +py_cobjectnames(#11045, "ljust") +py_cmembers_versioned(#10998, "ljust", #11045, "2") +#11046 = @"C_type$bytearray$2lower" +py_cobjects(#11046) +py_cobjecttypes(#11046, #10034) +py_cobject_sources(#11046, 0) +py_cobjectnames(#11046, "lower") +py_cmembers_versioned(#10998, "lower", #11046, "2") +#11047 = @"C_type$bytearray$2lstrip" +py_cobjects(#11047) +py_cobjecttypes(#11047, #10034) +py_cobject_sources(#11047, 0) +py_cobjectnames(#11047, "lstrip") +py_cmembers_versioned(#10998, "lstrip", #11047, "2") +#11048 = @"C_type$bytearray$2partition" +py_cobjects(#11048) +py_cobjecttypes(#11048, #10034) +py_cobject_sources(#11048, 0) +py_cobjectnames(#11048, "partition") +py_cmembers_versioned(#10998, "partition", #11048, "2") +#11049 = @"C_type$bytearray$2pop" +py_cobjects(#11049) +py_cobjecttypes(#11049, #10034) +py_cobject_sources(#11049, 0) +py_cobjectnames(#11049, "pop") +py_cmembers_versioned(#10998, "pop", #11049, "2") +#11050 = @"C_type$bytearray$2remove" +py_cobjects(#11050) +py_cobjecttypes(#11050, #10034) +py_cobject_sources(#11050, 0) +py_cobjectnames(#11050, "remove") +py_cmembers_versioned(#10998, "remove", #11050, "2") +#11051 = @"C_type$bytearray$2replace" +py_cobjects(#11051) +py_cobjecttypes(#11051, #10034) +py_cobject_sources(#11051, 0) +py_cobjectnames(#11051, "replace") +py_cmembers_versioned(#10998, "replace", #11051, "2") +#11052 = @"C_type$bytearray$2reverse" +py_cobjects(#11052) +py_cobjecttypes(#11052, #10034) +py_cobject_sources(#11052, 0) +py_cobjectnames(#11052, "reverse") +py_cmembers_versioned(#10998, "reverse", #11052, "2") +#11053 = @"C_type$bytearray$2rfind" +py_cobjects(#11053) +py_cobjecttypes(#11053, #10034) +py_cobject_sources(#11053, 0) +py_cobjectnames(#11053, "rfind") +py_cmembers_versioned(#10998, "rfind", #11053, "2") +#11054 = @"C_type$bytearray$2rindex" +py_cobjects(#11054) +py_cobjecttypes(#11054, #10034) +py_cobject_sources(#11054, 0) +py_cobjectnames(#11054, "rindex") +py_cmembers_versioned(#10998, "rindex", #11054, "2") +#11055 = @"C_type$bytearray$2rjust" +py_cobjects(#11055) +py_cobjecttypes(#11055, #10034) +py_cobject_sources(#11055, 0) +py_cobjectnames(#11055, "rjust") +py_cmembers_versioned(#10998, "rjust", #11055, "2") +#11056 = @"C_type$bytearray$2rpartition" +py_cobjects(#11056) +py_cobjecttypes(#11056, #10034) +py_cobject_sources(#11056, 0) +py_cobjectnames(#11056, "rpartition") +py_cmembers_versioned(#10998, "rpartition", #11056, "2") +#11057 = @"C_type$bytearray$2rsplit" +py_cobjects(#11057) +py_cobjecttypes(#11057, #10034) +py_cobject_sources(#11057, 0) +py_cobjectnames(#11057, "rsplit") +py_cmembers_versioned(#10998, "rsplit", #11057, "2") +#11058 = @"C_type$bytearray$2rstrip" +py_cobjects(#11058) +py_cobjecttypes(#11058, #10034) +py_cobject_sources(#11058, 0) +py_cobjectnames(#11058, "rstrip") +py_cmembers_versioned(#10998, "rstrip", #11058, "2") +#11059 = @"C_type$bytearray$2split" +py_cobjects(#11059) +py_cobjecttypes(#11059, #10034) +py_cobject_sources(#11059, 0) +py_cobjectnames(#11059, "split") +py_cmembers_versioned(#10998, "split", #11059, "2") +#11060 = @"C_type$bytearray$2splitlines" +py_cobjects(#11060) +py_cobjecttypes(#11060, #10034) +py_cobject_sources(#11060, 0) +py_cobjectnames(#11060, "splitlines") +py_cmembers_versioned(#10998, "splitlines", #11060, "2") +#11061 = @"C_type$bytearray$2startswith" +py_cobjects(#11061) +py_cobjecttypes(#11061, #10034) +py_cobject_sources(#11061, 0) +py_cobjectnames(#11061, "startswith") +py_cmembers_versioned(#10998, "startswith", #11061, "2") +#11062 = @"C_type$bytearray$2strip" +py_cobjects(#11062) +py_cobjecttypes(#11062, #10034) +py_cobject_sources(#11062, 0) +py_cobjectnames(#11062, "strip") +py_cmembers_versioned(#10998, "strip", #11062, "2") +#11063 = @"C_type$bytearray$2swapcase" +py_cobjects(#11063) +py_cobjecttypes(#11063, #10034) +py_cobject_sources(#11063, 0) +py_cobjectnames(#11063, "swapcase") +py_cmembers_versioned(#10998, "swapcase", #11063, "2") +#11064 = @"C_type$bytearray$2title" +py_cobjects(#11064) +py_cobjecttypes(#11064, #10034) +py_cobject_sources(#11064, 0) +py_cobjectnames(#11064, "title") +py_cmembers_versioned(#10998, "title", #11064, "2") +#11065 = @"C_type$bytearray$2translate" +py_cobjects(#11065) +py_cobjecttypes(#11065, #10034) +py_cobject_sources(#11065, 0) +py_cobjectnames(#11065, "translate") +py_cmembers_versioned(#10998, "translate", #11065, "2") +#11066 = @"C_type$bytearray$2upper" +py_cobjects(#11066) +py_cobjecttypes(#11066, #10034) +py_cobject_sources(#11066, 0) +py_cobjectnames(#11066, "upper") +py_cmembers_versioned(#10998, "upper", #11066, "2") +#11067 = @"C_type$bytearray$2zfill" +py_cobjects(#11067) +py_cobjecttypes(#11067, #10034) +py_cobject_sources(#11067, 0) +py_cobjectnames(#11067, "zfill") +py_cmembers_versioned(#10998, "zfill", #11067, "2") +py_cmembers_versioned(#10998, ".super.", #10021, "2") +py_cobjectnames(#10998, "bytearray") +py_cmembers_versioned(#10760, "bytearray", #10998, "2") +py_cmembers_versioned(#10760, "bytes", #10028, "2") +#11068 = @"C_builtin_function_or_method$builtins.callable" +py_cobjects(#11068) +py_cobjecttypes(#11068, #10075) +py_cobject_sources(#11068, 0) +py_cobjectnames(#11068, "callable") +py_cmembers_versioned(#10760, "callable", #11068, "2") +#11069 = @"C_builtin_function_or_method$builtins.chr" +py_cobjects(#11069) +py_cobjecttypes(#11069, #10075) +py_cobject_sources(#11069, 0) +py_cobjectnames(#11069, "chr") +py_cmembers_versioned(#10760, "chr", #11069, "2") +#11070 = @"C_type$classmethod" +py_cobjects(#11070) +py_cobjecttypes(#11070, #10001) +py_cobject_sources(#11070, 0) +#11071 = @"C_bytes$130f63dbc708a2d4f999a418ea2ea63a247b3168" +py_cobjects(#11071) +py_cobjecttypes(#11071, #10028) +py_cobject_sources(#11071, 0) +py_cobjectnames(#11071, "b'classmethod(function) -> method + +Convert a function to be a class method. + +A class method receives the class as implicit first argument, +just like an instance method receives the instance. +To declare a class method, use this idiom: + + class C: + @classmethod + def f(cls, arg1, arg2, ...): + ... + +It can be called either on the class (e.g. C.f()) or on an instance +(e.g. C().f()). The instance is ignored except for its class. +If a class method is called for a derived class, the derived class +object is passed as the implied first argument. + +Class methods are different than C++ or Java static methods. +If you want those, see the staticmethod builtin.'") +py_cmembers_versioned(#11070, "__doc__", #11071, "2") +#11072 = @"C_type$classmethod$2__func__" +py_cobjects(#11072) +py_cobjecttypes(#11072, #10045) +py_cobject_sources(#11072, 0) +py_cobjectnames(#11072, "__func__") +py_cmembers_versioned(#11070, "__func__", #11072, "2") +#11073 = @"C_type$classmethod$2__get__" +py_cobjects(#11073) +py_cobjecttypes(#11073, #10005) +py_cobject_sources(#11073, 0) +py_cobjectnames(#11073, "__get__") +py_cmembers_versioned(#11070, "__get__", #11073, "2") +#11074 = @"C_type$classmethod$2__getattribute__" +py_cobjects(#11074) +py_cobjecttypes(#11074, #10005) +py_cobject_sources(#11074, 0) +py_cobjectnames(#11074, "__getattribute__") +py_cmembers_versioned(#11070, "__getattribute__", #11074, "2") +#11075 = @"C_type$classmethod$2__init__" +py_cobjects(#11075) +py_cobjecttypes(#11075, #10005) +py_cobject_sources(#11075, 0) +py_cobjectnames(#11075, "__init__") +py_cmembers_versioned(#11070, "__init__", #11075, "2") +#11076 = @"C_type$classmethod$2__new__" +py_cobjects(#11076) +py_cobjecttypes(#11076, #10075) +py_cobject_sources(#11076, 0) +py_cobjectnames(#11076, "__new__") +py_cmembers_versioned(#11070, "__new__", #11076, "2") +py_cmembers_versioned(#11070, ".super.", #10021, "2") +py_cobjectnames(#11070, "classmethod") +py_cmembers_versioned(#10760, "classmethod", #11070, "2") +#11077 = @"C_builtin_function_or_method$builtins.cmp" +py_cobjects(#11077) +py_cobjecttypes(#11077, #10075) +py_cobject_sources(#11077, 0) +py_cobjectnames(#11077, "cmp") +py_cmembers_versioned(#10760, "cmp", #11077, "2") +#11078 = @"C_builtin_function_or_method$builtins.coerce" +py_cobjects(#11078) +py_cobjecttypes(#11078, #10075) +py_cobject_sources(#11078, 0) +py_cobjectnames(#11078, "coerce") +py_cmembers_versioned(#10760, "coerce", #11078, "2") +#11079 = @"C_builtin_function_or_method$builtins.compile" +py_cobjects(#11079) +py_cobjecttypes(#11079, #10075) +py_cobject_sources(#11079, 0) +py_cobjectnames(#11079, "compile") +py_cmembers_versioned(#10760, "compile", #11079, "2") +#11080 = @"C_type$complex" +py_cobjects(#11080) +py_cobjecttypes(#11080, #10001) +py_cobject_sources(#11080, 0) +#11081 = @"C_type$complex$2__abs__" +py_cobjects(#11081) +py_cobjecttypes(#11081, #10005) +py_cobject_sources(#11081, 0) +py_cobjectnames(#11081, "__abs__") +py_cmembers_versioned(#11080, "__abs__", #11081, "2") +#11082 = @"C_type$complex$2__add__" +py_cobjects(#11082) +py_cobjecttypes(#11082, #10005) +py_cobject_sources(#11082, 0) +py_cobjectnames(#11082, "__add__") +py_cmembers_versioned(#11080, "__add__", #11082, "2") +#11083 = @"C_type$complex$2__coerce__" +py_cobjects(#11083) +py_cobjecttypes(#11083, #10005) +py_cobject_sources(#11083, 0) +py_cobjectnames(#11083, "__coerce__") +py_cmembers_versioned(#11080, "__coerce__", #11083, "2") +#11084 = @"C_type$complex$2__div__" +py_cobjects(#11084) +py_cobjecttypes(#11084, #10005) +py_cobject_sources(#11084, 0) +py_cobjectnames(#11084, "__div__") +py_cmembers_versioned(#11080, "__div__", #11084, "2") +#11085 = @"C_type$complex$2__divmod__" +py_cobjects(#11085) +py_cobjecttypes(#11085, #10005) +py_cobject_sources(#11085, 0) +py_cobjectnames(#11085, "__divmod__") +py_cmembers_versioned(#11080, "__divmod__", #11085, "2") +#11086 = @"C_bytes$cc8fe749bc4fe2677c3c5d821e7a3a812ccd31fa" +py_cobjects(#11086) +py_cobjecttypes(#11086, #10028) +py_cobject_sources(#11086, 0) +py_cobjectnames(#11086, "b'complex(real[, imag]) -> complex number + +Create a complex number from a real part and an optional imaginary part. +This is equivalent to (real + imag*1j) where imag defaults to 0.'") +py_cmembers_versioned(#11080, "__doc__", #11086, "2") +#11087 = @"C_type$complex$2__eq__" +py_cobjects(#11087) +py_cobjecttypes(#11087, #10005) +py_cobject_sources(#11087, 0) +py_cobjectnames(#11087, "__eq__") +py_cmembers_versioned(#11080, "__eq__", #11087, "2") +#11088 = @"C_type$complex$2__float__" +py_cobjects(#11088) +py_cobjecttypes(#11088, #10005) +py_cobject_sources(#11088, 0) +py_cobjectnames(#11088, "__float__") +py_cmembers_versioned(#11080, "__float__", #11088, "2") +#11089 = @"C_type$complex$2__floordiv__" +py_cobjects(#11089) +py_cobjecttypes(#11089, #10005) +py_cobject_sources(#11089, 0) +py_cobjectnames(#11089, "__floordiv__") +py_cmembers_versioned(#11080, "__floordiv__", #11089, "2") +#11090 = @"C_type$complex$2__format__" +py_cobjects(#11090) +py_cobjecttypes(#11090, #10034) +py_cobject_sources(#11090, 0) +py_cobjectnames(#11090, "__format__") +py_cmembers_versioned(#11080, "__format__", #11090, "2") +#11091 = @"C_type$complex$2__ge__" +py_cobjects(#11091) +py_cobjecttypes(#11091, #10005) +py_cobject_sources(#11091, 0) +py_cobjectnames(#11091, "__ge__") +py_cmembers_versioned(#11080, "__ge__", #11091, "2") +#11092 = @"C_type$complex$2__getattribute__" +py_cobjects(#11092) +py_cobjecttypes(#11092, #10005) +py_cobject_sources(#11092, 0) +py_cobjectnames(#11092, "__getattribute__") +py_cmembers_versioned(#11080, "__getattribute__", #11092, "2") +#11093 = @"C_type$complex$2__getnewargs__" +py_cobjects(#11093) +py_cobjecttypes(#11093, #10034) +py_cobject_sources(#11093, 0) +py_cobjectnames(#11093, "__getnewargs__") +py_cmembers_versioned(#11080, "__getnewargs__", #11093, "2") +#11094 = @"C_type$complex$2__gt__" +py_cobjects(#11094) +py_cobjecttypes(#11094, #10005) +py_cobject_sources(#11094, 0) +py_cobjectnames(#11094, "__gt__") +py_cmembers_versioned(#11080, "__gt__", #11094, "2") +#11095 = @"C_type$complex$2__hash__" +py_cobjects(#11095) +py_cobjecttypes(#11095, #10005) +py_cobject_sources(#11095, 0) +py_cobjectnames(#11095, "__hash__") +py_cmembers_versioned(#11080, "__hash__", #11095, "2") +#11096 = @"C_type$complex$2__int__" +py_cobjects(#11096) +py_cobjecttypes(#11096, #10005) +py_cobject_sources(#11096, 0) +py_cobjectnames(#11096, "__int__") +py_cmembers_versioned(#11080, "__int__", #11096, "2") +#11097 = @"C_type$complex$2__le__" +py_cobjects(#11097) +py_cobjecttypes(#11097, #10005) +py_cobject_sources(#11097, 0) +py_cobjectnames(#11097, "__le__") +py_cmembers_versioned(#11080, "__le__", #11097, "2") +#11098 = @"C_type$complex$2__long__" +py_cobjects(#11098) +py_cobjecttypes(#11098, #10005) +py_cobject_sources(#11098, 0) +py_cobjectnames(#11098, "__long__") +py_cmembers_versioned(#11080, "__long__", #11098, "2") +#11099 = @"C_type$complex$2__lt__" +py_cobjects(#11099) +py_cobjecttypes(#11099, #10005) +py_cobject_sources(#11099, 0) +py_cobjectnames(#11099, "__lt__") +py_cmembers_versioned(#11080, "__lt__", #11099, "2") +#11100 = @"C_type$complex$2__mod__" +py_cobjects(#11100) +py_cobjecttypes(#11100, #10005) +py_cobject_sources(#11100, 0) +py_cobjectnames(#11100, "__mod__") +py_cmembers_versioned(#11080, "__mod__", #11100, "2") +#11101 = @"C_type$complex$2__mul__" +py_cobjects(#11101) +py_cobjecttypes(#11101, #10005) +py_cobject_sources(#11101, 0) +py_cobjectnames(#11101, "__mul__") +py_cmembers_versioned(#11080, "__mul__", #11101, "2") +#11102 = @"C_type$complex$2__ne__" +py_cobjects(#11102) +py_cobjecttypes(#11102, #10005) +py_cobject_sources(#11102, 0) +py_cobjectnames(#11102, "__ne__") +py_cmembers_versioned(#11080, "__ne__", #11102, "2") +#11103 = @"C_type$complex$2__neg__" +py_cobjects(#11103) +py_cobjecttypes(#11103, #10005) +py_cobject_sources(#11103, 0) +py_cobjectnames(#11103, "__neg__") +py_cmembers_versioned(#11080, "__neg__", #11103, "2") +#11104 = @"C_type$complex$2__new__" +py_cobjects(#11104) +py_cobjecttypes(#11104, #10075) +py_cobject_sources(#11104, 0) +py_cobjectnames(#11104, "__new__") +py_cmembers_versioned(#11080, "__new__", #11104, "2") +#11105 = @"C_type$complex$2__nonzero__" +py_cobjects(#11105) +py_cobjecttypes(#11105, #10005) +py_cobject_sources(#11105, 0) +py_cobjectnames(#11105, "__nonzero__") +py_cmembers_versioned(#11080, "__nonzero__", #11105, "2") +#11106 = @"C_type$complex$2__pos__" +py_cobjects(#11106) +py_cobjecttypes(#11106, #10005) +py_cobject_sources(#11106, 0) +py_cobjectnames(#11106, "__pos__") +py_cmembers_versioned(#11080, "__pos__", #11106, "2") +#11107 = @"C_type$complex$2__pow__" +py_cobjects(#11107) +py_cobjecttypes(#11107, #10005) +py_cobject_sources(#11107, 0) +py_cobjectnames(#11107, "__pow__") +py_cmembers_versioned(#11080, "__pow__", #11107, "2") +#11108 = @"C_type$complex$2__radd__" +py_cobjects(#11108) +py_cobjecttypes(#11108, #10005) +py_cobject_sources(#11108, 0) +py_cobjectnames(#11108, "__radd__") +py_cmembers_versioned(#11080, "__radd__", #11108, "2") +#11109 = @"C_type$complex$2__rdiv__" +py_cobjects(#11109) +py_cobjecttypes(#11109, #10005) +py_cobject_sources(#11109, 0) +py_cobjectnames(#11109, "__rdiv__") +py_cmembers_versioned(#11080, "__rdiv__", #11109, "2") +#11110 = @"C_type$complex$2__rdivmod__" +py_cobjects(#11110) +py_cobjecttypes(#11110, #10005) +py_cobject_sources(#11110, 0) +py_cobjectnames(#11110, "__rdivmod__") +py_cmembers_versioned(#11080, "__rdivmod__", #11110, "2") +#11111 = @"C_type$complex$2__repr__" +py_cobjects(#11111) +py_cobjecttypes(#11111, #10005) +py_cobject_sources(#11111, 0) +py_cobjectnames(#11111, "__repr__") +py_cmembers_versioned(#11080, "__repr__", #11111, "2") +#11112 = @"C_type$complex$2__rfloordiv__" +py_cobjects(#11112) +py_cobjecttypes(#11112, #10005) +py_cobject_sources(#11112, 0) +py_cobjectnames(#11112, "__rfloordiv__") +py_cmembers_versioned(#11080, "__rfloordiv__", #11112, "2") +#11113 = @"C_type$complex$2__rmod__" +py_cobjects(#11113) +py_cobjecttypes(#11113, #10005) +py_cobject_sources(#11113, 0) +py_cobjectnames(#11113, "__rmod__") +py_cmembers_versioned(#11080, "__rmod__", #11113, "2") +#11114 = @"C_type$complex$2__rmul__" +py_cobjects(#11114) +py_cobjecttypes(#11114, #10005) +py_cobject_sources(#11114, 0) +py_cobjectnames(#11114, "__rmul__") +py_cmembers_versioned(#11080, "__rmul__", #11114, "2") +#11115 = @"C_type$complex$2__rpow__" +py_cobjects(#11115) +py_cobjecttypes(#11115, #10005) +py_cobject_sources(#11115, 0) +py_cobjectnames(#11115, "__rpow__") +py_cmembers_versioned(#11080, "__rpow__", #11115, "2") +#11116 = @"C_type$complex$2__rsub__" +py_cobjects(#11116) +py_cobjecttypes(#11116, #10005) +py_cobject_sources(#11116, 0) +py_cobjectnames(#11116, "__rsub__") +py_cmembers_versioned(#11080, "__rsub__", #11116, "2") +#11117 = @"C_type$complex$2__rtruediv__" +py_cobjects(#11117) +py_cobjecttypes(#11117, #10005) +py_cobject_sources(#11117, 0) +py_cobjectnames(#11117, "__rtruediv__") +py_cmembers_versioned(#11080, "__rtruediv__", #11117, "2") +#11118 = @"C_type$complex$2__str__" +py_cobjects(#11118) +py_cobjecttypes(#11118, #10005) +py_cobject_sources(#11118, 0) +py_cobjectnames(#11118, "__str__") +py_cmembers_versioned(#11080, "__str__", #11118, "2") +#11119 = @"C_type$complex$2__sub__" +py_cobjects(#11119) +py_cobjecttypes(#11119, #10005) +py_cobject_sources(#11119, 0) +py_cobjectnames(#11119, "__sub__") +py_cmembers_versioned(#11080, "__sub__", #11119, "2") +#11120 = @"C_type$complex$2__truediv__" +py_cobjects(#11120) +py_cobjecttypes(#11120, #10005) +py_cobject_sources(#11120, 0) +py_cobjectnames(#11120, "__truediv__") +py_cmembers_versioned(#11080, "__truediv__", #11120, "2") +#11121 = @"C_type$complex$2conjugate" +py_cobjects(#11121) +py_cobjecttypes(#11121, #10034) +py_cobject_sources(#11121, 0) +py_cobjectnames(#11121, "conjugate") +py_cmembers_versioned(#11080, "conjugate", #11121, "2") +#11122 = @"C_type$complex$2imag" +py_cobjects(#11122) +py_cobjecttypes(#11122, #10045) +py_cobject_sources(#11122, 0) +py_cobjectnames(#11122, "imag") +py_cmembers_versioned(#11080, "imag", #11122, "2") +#11123 = @"C_type$complex$2real" +py_cobjects(#11123) +py_cobjecttypes(#11123, #10045) +py_cobject_sources(#11123, 0) +py_cobjectnames(#11123, "real") +py_cmembers_versioned(#11080, "real", #11123, "2") +py_cmembers_versioned(#11080, ".super.", #10021, "2") +py_cobjectnames(#11080, "complex") +py_cmembers_versioned(#10760, "complex", #11080, "2") +#11124 = @"C_module$__builtin__$2copyright" +#11125 = @"C_type$site._Printer" +py_cobjects(#11125) +py_cobjecttypes(#11125, #10001) +py_cobject_sources(#11125, 0) +#11126 = @"C_int$23" +py_cobjects(#11126) +py_cobjecttypes(#11126, #10449) +py_cobject_sources(#11126, 0) +py_cobjectnames(#11126, "23") +py_cmembers_versioned(#11125, "MAXLINES", #11126, "2") +#11127 = @"C_type$site._Printer$2_Printer__setup" +py_cobjects(#11127) +py_cobjecttypes(#11127, #10000) +py_cobject_sources(#11127, 0) +py_cobjectnames(#11127, "__setup") +py_cmembers_versioned(#11125, "_Printer__setup", #11127, "2") +#11128 = @"C_type$site._Printer$2__call__" +py_cobjects(#11128) +py_cobjecttypes(#11128, #10000) +py_cobject_sources(#11128, 0) +py_cobjectnames(#11128, "__call__") +py_cmembers_versioned(#11125, "__call__", #11128, "2") +#11129 = @"C_type$site._Printer$2__dict__" +py_cobjects(#11129) +py_cobjecttypes(#11129, #10003) +py_cobject_sources(#11129, 0) +#11130 = @"C_type$site._Printer$2__dict__$2__set__" +py_cobjects(#11130) +py_cobjecttypes(#11130, #10009) +py_cobject_sources(#11130, 0) +py_cobjectnames(#11130, "__set__") +py_cmembers_versioned(#11129, "__set__", #11130, "2") +#11131 = @"C_type$site._Printer$2__dict__$2__getattribute__" +py_cobjects(#11131) +py_cobjecttypes(#11131, #10009) +py_cobject_sources(#11131, 0) +py_cobjectnames(#11131, "__getattribute__") +py_cmembers_versioned(#11129, "__getattribute__", #11131, "2") +py_cmembers_versioned(#11129, "__objclass__", #11125, "2") +#11132 = @"C_type$site._Printer$2__dict__$2__repr__" +py_cobjects(#11132) +py_cobjecttypes(#11132, #10009) +py_cobject_sources(#11132, 0) +py_cobjectnames(#11132, "__repr__") +py_cmembers_versioned(#11129, "__repr__", #11132, "2") +#11133 = @"C_type$site._Printer$2__dict__$2__get__" +py_cobjects(#11133) +py_cobjecttypes(#11133, #10009) +py_cobject_sources(#11133, 0) +py_cobjectnames(#11133, "__get__") +py_cmembers_versioned(#11129, "__get__", #11133, "2") +#11134 = @"C_bytes$1caffae7c2cd65c04c7d894ccd85fd466c39c173" +py_cobjects(#11134) +py_cobjecttypes(#11134, #10028) +py_cobject_sources(#11134, 0) +py_cobjectnames(#11134, "b'dictionary for instance variables (if defined)'") +py_cmembers_versioned(#11129, "__doc__", #11134, "2") +#11135 = @"C_type$site._Printer$2__dict__$2__delete__" +py_cobjects(#11135) +py_cobjecttypes(#11135, #10009) +py_cobject_sources(#11135, 0) +py_cobjectnames(#11135, "__delete__") +py_cmembers_versioned(#11129, "__delete__", #11135, "2") +py_cobjectnames(#11129, "__dict__") +py_cmembers_versioned(#11125, "__dict__", #11129, "2") +#11136 = @"C_bytes$8fb02d5dbf98d031459d7bd7dcfcd6f7d0a6501e" +py_cobjects(#11136) +py_cobjecttypes(#11136, #10028) +py_cobject_sources(#11136, 0) +py_cobjectnames(#11136, "b'interactive prompt objects for printing the license text, a list of + contributors and the copyright notice.'") +py_cmembers_versioned(#11125, "__doc__", #11136, "2") +#11137 = @"C_type$site._Printer$2__init__" +py_cobjects(#11137) +py_cobjecttypes(#11137, #10000) +py_cobject_sources(#11137, 0) +py_cobjectnames(#11137, "__init__") +py_cmembers_versioned(#11125, "__init__", #11137, "2") +#11138 = @"C_bytes$c099a42a5555825cdb50df0c04932bcd29613457" +py_cobjects(#11138) +py_cobjecttypes(#11138, #10028) +py_cobject_sources(#11138, 0) +py_cobjectnames(#11138, "b'site'") +py_cmembers_versioned(#11125, "__module__", #11138, "2") +#11139 = @"C_type$site._Printer$2__repr__" +py_cobjects(#11139) +py_cobjecttypes(#11139, #10000) +py_cobject_sources(#11139, 0) +py_cobjectnames(#11139, "__repr__") +py_cmembers_versioned(#11125, "__repr__", #11139, "2") +#11140 = @"C_type$site._Printer$2__weakref__" +py_cobjects(#11140) +py_cobjecttypes(#11140, #10003) +py_cobject_sources(#11140, 0) +#11141 = @"C_type$site._Printer$2__weakref__$2__set__" +py_cobjects(#11141) +py_cobjecttypes(#11141, #10009) +py_cobject_sources(#11141, 0) +py_cobjectnames(#11141, "__set__") +py_cmembers_versioned(#11140, "__set__", #11141, "2") +#11142 = @"C_type$site._Printer$2__weakref__$2__getattribute__" +py_cobjects(#11142) +py_cobjecttypes(#11142, #10009) +py_cobject_sources(#11142, 0) +py_cobjectnames(#11142, "__getattribute__") +py_cmembers_versioned(#11140, "__getattribute__", #11142, "2") +py_cmembers_versioned(#11140, "__objclass__", #11125, "2") +#11143 = @"C_type$site._Printer$2__weakref__$2__repr__" +py_cobjects(#11143) +py_cobjecttypes(#11143, #10009) +py_cobject_sources(#11143, 0) +py_cobjectnames(#11143, "__repr__") +py_cmembers_versioned(#11140, "__repr__", #11143, "2") +#11144 = @"C_type$site._Printer$2__weakref__$2__get__" +py_cobjects(#11144) +py_cobjecttypes(#11144, #10009) +py_cobject_sources(#11144, 0) +py_cobjectnames(#11144, "__get__") +py_cmembers_versioned(#11140, "__get__", #11144, "2") +#11145 = @"C_bytes$288bf61a8280860bb3d2b542aa2ec112948d35b5" +py_cobjects(#11145) +py_cobjecttypes(#11145, #10028) +py_cobject_sources(#11145, 0) +py_cobjectnames(#11145, "b'list of weak references to the object (if defined)'") +py_cmembers_versioned(#11140, "__doc__", #11145, "2") +#11146 = @"C_type$site._Printer$2__weakref__$2__delete__" +py_cobjects(#11146) +py_cobjecttypes(#11146, #10009) +py_cobject_sources(#11146, 0) +py_cobjectnames(#11146, "__delete__") +py_cmembers_versioned(#11140, "__delete__", #11146, "2") +py_cobjectnames(#11140, "__weakref__") +py_cmembers_versioned(#11125, "__weakref__", #11140, "2") +py_cmembers_versioned(#11125, ".super.", #10021, "2") +py_cobjectnames(#11125, "site._Printer") +py_cobjects(#11124) +py_cobjecttypes(#11124, #11125) +py_cobject_sources(#11124, 0) +py_cobjectnames(#11124, "object") +py_cmembers_versioned(#10760, "copyright", #11124, "2") +#11147 = @"C_module$__builtin__$2credits" +py_cobjects(#11147) +py_cobjecttypes(#11147, #11125) +py_cobject_sources(#11147, 0) +py_cobjectnames(#11147, "object") +py_cmembers_versioned(#10760, "credits", #11147, "2") +#11148 = @"C_builtin_function_or_method$builtins.delattr" +py_cobjects(#11148) +py_cobjecttypes(#11148, #10075) +py_cobject_sources(#11148, 0) +py_cobjectnames(#11148, "delattr") +py_cmembers_versioned(#10760, "delattr", #11148, "2") +py_cmembers_versioned(#10760, "dict", #10386, "2") +#11149 = @"C_builtin_function_or_method$builtins.dir" +py_cobjects(#11149) +py_cobjecttypes(#11149, #10075) +py_cobject_sources(#11149, 0) +py_cobjectnames(#11149, "dir") +py_cmembers_versioned(#10760, "dir", #11149, "2") +#11150 = @"C_builtin_function_or_method$builtins.divmod" +py_cobjects(#11150) +py_cobjecttypes(#11150, #10075) +py_cobject_sources(#11150, 0) +py_cobjectnames(#11150, "divmod") +py_cmembers_versioned(#10760, "divmod", #11150, "2") +#11151 = @"C_type$enumerate" +py_cobjects(#11151) +py_cobjecttypes(#11151, #10001) +py_cobject_sources(#11151, 0) +#11152 = @"C_bytes$bc46bf57a82047977c76afa6b32299957b9ed9b9" +py_cobjects(#11152) +py_cobjecttypes(#11152, #10028) +py_cobject_sources(#11152, 0) +py_cobjectnames(#11152, "b'enumerate(iterable[, start]) -> iterator for index, value of iterable + +Return an enumerate object. iterable must be another object that supports +iteration. The enumerate object yields pairs containing a count (from +start, which defaults to zero) and a value yielded by the iterable argument. +enumerate is useful for obtaining an indexed list: + (0, seq[0]), (1, seq[1]), (2, seq[2]), ...'") +py_cmembers_versioned(#11151, "__doc__", #11152, "2") +#11153 = @"C_type$enumerate$2__getattribute__" +py_cobjects(#11153) +py_cobjecttypes(#11153, #10005) +py_cobject_sources(#11153, 0) +py_cobjectnames(#11153, "__getattribute__") +py_cmembers_versioned(#11151, "__getattribute__", #11153, "2") +#11154 = @"C_type$enumerate$2__iter__" +py_cobjects(#11154) +py_cobjecttypes(#11154, #10005) +py_cobject_sources(#11154, 0) +py_cobjectnames(#11154, "__iter__") +py_cmembers_versioned(#11151, "__iter__", #11154, "2") +#11155 = @"C_type$enumerate$2__new__" +py_cobjects(#11155) +py_cobjecttypes(#11155, #10075) +py_cobject_sources(#11155, 0) +py_cobjectnames(#11155, "__new__") +py_cmembers_versioned(#11151, "__new__", #11155, "2") +#11156 = @"C_type$enumerate$2next" +py_cobjects(#11156) +py_cobjecttypes(#11156, #10005) +py_cobject_sources(#11156, 0) +py_cobjectnames(#11156, "next") +py_cmembers_versioned(#11151, "next", #11156, "2") +py_cmembers_versioned(#11151, ".super.", #10021, "2") +py_cobjectnames(#11151, "enumerate") +py_cmembers_versioned(#10760, "enumerate", #11151, "2") +#11157 = @"C_builtin_function_or_method$builtins.eval" +py_cobjects(#11157) +py_cobjecttypes(#11157, #10075) +py_cobject_sources(#11157, 0) +py_cobjectnames(#11157, "eval") +py_cmembers_versioned(#10760, "eval", #11157, "2") +#11158 = @"C_module$__builtin__$2exec" +py_cobjects(#11158) +py_cobjecttypes(#11158, #10075) +py_cobject_sources(#11158, 0) +py_cobjectnames(#11158, "exec") +py_cmembers_versioned(#10760, "exec", #11158, "2") +#11159 = @"C_builtin_function_or_method$builtins.execfile" +py_cobjects(#11159) +py_cobjecttypes(#11159, #10075) +py_cobject_sources(#11159, 0) +py_cobjectnames(#11159, "execfile") +py_cmembers_versioned(#10760, "execfile", #11159, "2") +#11160 = @"C_module$__builtin__$2exit" +#11161 = @"C_type$site.Quitter" +py_cobjects(#11161) +py_cobjecttypes(#11161, #10001) +py_cobject_sources(#11161, 0) +#11162 = @"C_type$site.Quitter$2__call__" +py_cobjects(#11162) +py_cobjecttypes(#11162, #10000) +py_cobject_sources(#11162, 0) +py_cobjectnames(#11162, "__call__") +py_cmembers_versioned(#11161, "__call__", #11162, "2") +#11163 = @"C_type$site.Quitter$2__dict__" +py_cobjects(#11163) +py_cobjecttypes(#11163, #10003) +py_cobject_sources(#11163, 0) +#11164 = @"C_type$site.Quitter$2__dict__$2__set__" +py_cobjects(#11164) +py_cobjecttypes(#11164, #10009) +py_cobject_sources(#11164, 0) +py_cobjectnames(#11164, "__set__") +py_cmembers_versioned(#11163, "__set__", #11164, "2") +#11165 = @"C_type$site.Quitter$2__dict__$2__getattribute__" +py_cobjects(#11165) +py_cobjecttypes(#11165, #10009) +py_cobject_sources(#11165, 0) +py_cobjectnames(#11165, "__getattribute__") +py_cmembers_versioned(#11163, "__getattribute__", #11165, "2") +py_cmembers_versioned(#11163, "__objclass__", #11161, "2") +#11166 = @"C_type$site.Quitter$2__dict__$2__repr__" +py_cobjects(#11166) +py_cobjecttypes(#11166, #10009) +py_cobject_sources(#11166, 0) +py_cobjectnames(#11166, "__repr__") +py_cmembers_versioned(#11163, "__repr__", #11166, "2") +#11167 = @"C_type$site.Quitter$2__dict__$2__get__" +py_cobjects(#11167) +py_cobjecttypes(#11167, #10009) +py_cobject_sources(#11167, 0) +py_cobjectnames(#11167, "__get__") +py_cmembers_versioned(#11163, "__get__", #11167, "2") +#11168 = @"C_bytes$1caffae7c2cd65c04c7d894ccd85fd466c39c173" +py_cobjects(#11168) +py_cobjecttypes(#11168, #10028) +py_cobject_sources(#11168, 0) +py_cobjectnames(#11168, "b'dictionary for instance variables (if defined)'") +py_cmembers_versioned(#11163, "__doc__", #11168, "2") +#11169 = @"C_type$site.Quitter$2__dict__$2__delete__" +py_cobjects(#11169) +py_cobjecttypes(#11169, #10009) +py_cobject_sources(#11169, 0) +py_cobjectnames(#11169, "__delete__") +py_cmembers_versioned(#11163, "__delete__", #11169, "2") +py_cobjectnames(#11163, "__dict__") +py_cmembers_versioned(#11161, "__dict__", #11163, "2") +py_cmembers_versioned(#11161, "__doc__", #10017, "2") +#11170 = @"C_type$site.Quitter$2__init__" +py_cobjects(#11170) +py_cobjecttypes(#11170, #10000) +py_cobject_sources(#11170, 0) +py_cobjectnames(#11170, "__init__") +py_cmembers_versioned(#11161, "__init__", #11170, "2") +py_cmembers_versioned(#11161, "__module__", #11138, "2") +#11171 = @"C_type$site.Quitter$2__repr__" +py_cobjects(#11171) +py_cobjecttypes(#11171, #10000) +py_cobject_sources(#11171, 0) +py_cobjectnames(#11171, "__repr__") +py_cmembers_versioned(#11161, "__repr__", #11171, "2") +#11172 = @"C_type$site.Quitter$2__weakref__" +py_cobjects(#11172) +py_cobjecttypes(#11172, #10003) +py_cobject_sources(#11172, 0) +#11173 = @"C_type$site.Quitter$2__weakref__$2__set__" +py_cobjects(#11173) +py_cobjecttypes(#11173, #10009) +py_cobject_sources(#11173, 0) +py_cobjectnames(#11173, "__set__") +py_cmembers_versioned(#11172, "__set__", #11173, "2") +#11174 = @"C_type$site.Quitter$2__weakref__$2__getattribute__" +py_cobjects(#11174) +py_cobjecttypes(#11174, #10009) +py_cobject_sources(#11174, 0) +py_cobjectnames(#11174, "__getattribute__") +py_cmembers_versioned(#11172, "__getattribute__", #11174, "2") +py_cmembers_versioned(#11172, "__objclass__", #11161, "2") +#11175 = @"C_type$site.Quitter$2__weakref__$2__repr__" +py_cobjects(#11175) +py_cobjecttypes(#11175, #10009) +py_cobject_sources(#11175, 0) +py_cobjectnames(#11175, "__repr__") +py_cmembers_versioned(#11172, "__repr__", #11175, "2") +#11176 = @"C_type$site.Quitter$2__weakref__$2__get__" +py_cobjects(#11176) +py_cobjecttypes(#11176, #10009) +py_cobject_sources(#11176, 0) +py_cobjectnames(#11176, "__get__") +py_cmembers_versioned(#11172, "__get__", #11176, "2") +#11177 = @"C_bytes$288bf61a8280860bb3d2b542aa2ec112948d35b5" +py_cobjects(#11177) +py_cobjecttypes(#11177, #10028) +py_cobject_sources(#11177, 0) +py_cobjectnames(#11177, "b'list of weak references to the object (if defined)'") +py_cmembers_versioned(#11172, "__doc__", #11177, "2") +#11178 = @"C_type$site.Quitter$2__weakref__$2__delete__" +py_cobjects(#11178) +py_cobjecttypes(#11178, #10009) +py_cobject_sources(#11178, 0) +py_cobjectnames(#11178, "__delete__") +py_cmembers_versioned(#11172, "__delete__", #11178, "2") +py_cobjectnames(#11172, "__weakref__") +py_cmembers_versioned(#11161, "__weakref__", #11172, "2") +py_cmembers_versioned(#11161, ".super.", #10021, "2") +py_cobjectnames(#11161, "site.Quitter") +py_cobjects(#11160) +py_cobjecttypes(#11160, #11161) +py_cobject_sources(#11160, 0) +py_cobjectnames(#11160, "object") +py_cmembers_versioned(#10760, "exit", #11160, "2") +#11179 = @"C_type$file" +py_cobjects(#11179) +py_cobjecttypes(#11179, #10001) +py_cobject_sources(#11179, 0) +#11180 = @"C_type$file$2__delattr__" +py_cobjects(#11180) +py_cobjecttypes(#11180, #10005) +py_cobject_sources(#11180, 0) +py_cobjectnames(#11180, "__delattr__") +py_cmembers_versioned(#11179, "__delattr__", #11180, "2") +#11181 = @"C_bytes$6cea74c971d3f1ead7e6ee9948113b38a1b6f069" +py_cobjects(#11181) +py_cobjecttypes(#11181, #10028) +py_cobject_sources(#11181, 0) +py_cobjectnames(#11181, "b'file(name[, mode[, buffering]]) -> file object + +Open a file. The mode can be 'r', 'w' or 'a' for reading (default), +writing or appending. The file will be created if it doesn't exist +when opened for writing or appending; it will be truncated when +opened for writing. Add a 'b' to the mode for binary files. +Add a '+' to the mode to allow simultaneous reading and writing. +If the buffering argument is given, 0 means unbuffered, 1 means line +buffered, and larger numbers specify the buffer size. The preferred way +to open a file is with the builtin open() function. +Add a 'U' to mode to open the file for input with universal newline +support. Any line ending in the input file will be seen as a '\n' +in Python. Also, a file so opened gains the attribute 'newlines'; +the value for this attribute is one of None (no newline read yet), +'\r', '\n', '\r\n' or a tuple containing all the newline types seen. + +'U' cannot be combined with 'w' or '+' mode. +'") +py_cmembers_versioned(#11179, "__doc__", #11181, "2") +#11182 = @"C_type$file$2__enter__" +py_cobjects(#11182) +py_cobjecttypes(#11182, #10034) +py_cobject_sources(#11182, 0) +py_cobjectnames(#11182, "__enter__") +py_cmembers_versioned(#11179, "__enter__", #11182, "2") +#11183 = @"C_type$file$2__exit__" +py_cobjects(#11183) +py_cobjecttypes(#11183, #10034) +py_cobject_sources(#11183, 0) +py_cobjectnames(#11183, "__exit__") +py_cmembers_versioned(#11179, "__exit__", #11183, "2") +#11184 = @"C_type$file$2__getattribute__" +py_cobjects(#11184) +py_cobjecttypes(#11184, #10005) +py_cobject_sources(#11184, 0) +py_cobjectnames(#11184, "__getattribute__") +py_cmembers_versioned(#11179, "__getattribute__", #11184, "2") +#11185 = @"C_type$file$2__init__" +py_cobjects(#11185) +py_cobjecttypes(#11185, #10005) +py_cobject_sources(#11185, 0) +py_cobjectnames(#11185, "__init__") +py_cmembers_versioned(#11179, "__init__", #11185, "2") +#11186 = @"C_type$file$2__iter__" +py_cobjects(#11186) +py_cobjecttypes(#11186, #10005) +py_cobject_sources(#11186, 0) +py_cobjectnames(#11186, "__iter__") +py_cmembers_versioned(#11179, "__iter__", #11186, "2") +#11187 = @"C_type$file$2__new__" +py_cobjects(#11187) +py_cobjecttypes(#11187, #10075) +py_cobject_sources(#11187, 0) +py_cobjectnames(#11187, "__new__") +py_cmembers_versioned(#11179, "__new__", #11187, "2") +#11188 = @"C_type$file$2__repr__" +py_cobjects(#11188) +py_cobjecttypes(#11188, #10005) +py_cobject_sources(#11188, 0) +py_cobjectnames(#11188, "__repr__") +py_cmembers_versioned(#11179, "__repr__", #11188, "2") +#11189 = @"C_type$file$2__setattr__" +py_cobjects(#11189) +py_cobjecttypes(#11189, #10005) +py_cobject_sources(#11189, 0) +py_cobjectnames(#11189, "__setattr__") +py_cmembers_versioned(#11179, "__setattr__", #11189, "2") +#11190 = @"C_type$file$2close" +py_cobjects(#11190) +py_cobjecttypes(#11190, #10034) +py_cobject_sources(#11190, 0) +py_cobjectnames(#11190, "close") +py_cmembers_versioned(#11179, "close", #11190, "2") +#11191 = @"C_type$file$2closed" +py_cobjects(#11191) +py_cobjecttypes(#11191, #10003) +py_cobject_sources(#11191, 0) +#11192 = @"C_type$file$2closed$2__set__" +py_cobjects(#11192) +py_cobjecttypes(#11192, #10009) +py_cobject_sources(#11192, 0) +py_cobjectnames(#11192, "__set__") +py_cmembers_versioned(#11191, "__set__", #11192, "2") +#11193 = @"C_type$file$2closed$2__getattribute__" +py_cobjects(#11193) +py_cobjecttypes(#11193, #10009) +py_cobject_sources(#11193, 0) +py_cobjectnames(#11193, "__getattribute__") +py_cmembers_versioned(#11191, "__getattribute__", #11193, "2") +py_cmembers_versioned(#11191, "__objclass__", #11179, "2") +#11194 = @"C_type$file$2closed$2__repr__" +py_cobjects(#11194) +py_cobjecttypes(#11194, #10009) +py_cobject_sources(#11194, 0) +py_cobjectnames(#11194, "__repr__") +py_cmembers_versioned(#11191, "__repr__", #11194, "2") +#11195 = @"C_type$file$2closed$2__get__" +py_cobjects(#11195) +py_cobjecttypes(#11195, #10009) +py_cobject_sources(#11195, 0) +py_cobjectnames(#11195, "__get__") +py_cmembers_versioned(#11191, "__get__", #11195, "2") +#11196 = @"C_bytes$4cd5ab8a4e71869ab7f338711b6c851a495d5dc0" +py_cobjects(#11196) +py_cobjecttypes(#11196, #10028) +py_cobject_sources(#11196, 0) +py_cobjectnames(#11196, "b'True if the file is closed'") +py_cmembers_versioned(#11191, "__doc__", #11196, "2") +#11197 = @"C_type$file$2closed$2__delete__" +py_cobjects(#11197) +py_cobjecttypes(#11197, #10009) +py_cobject_sources(#11197, 0) +py_cobjectnames(#11197, "__delete__") +py_cmembers_versioned(#11191, "__delete__", #11197, "2") +py_cobjectnames(#11191, "closed") +py_cmembers_versioned(#11179, "closed", #11191, "2") +#11198 = @"C_type$file$2encoding" +py_cobjects(#11198) +py_cobjecttypes(#11198, #10045) +py_cobject_sources(#11198, 0) +py_cobjectnames(#11198, "encoding") +py_cmembers_versioned(#11179, "encoding", #11198, "2") +#11199 = @"C_type$file$2errors" +py_cobjects(#11199) +py_cobjecttypes(#11199, #10045) +py_cobject_sources(#11199, 0) +py_cobjectnames(#11199, "errors") +py_cmembers_versioned(#11179, "errors", #11199, "2") +#11200 = @"C_type$file$2fileno" +py_cobjects(#11200) +py_cobjecttypes(#11200, #10034) +py_cobject_sources(#11200, 0) +py_cobjectnames(#11200, "fileno") +py_cmembers_versioned(#11179, "fileno", #11200, "2") +#11201 = @"C_type$file$2flush" +py_cobjects(#11201) +py_cobjecttypes(#11201, #10034) +py_cobject_sources(#11201, 0) +py_cobjectnames(#11201, "flush") +py_cmembers_versioned(#11179, "flush", #11201, "2") +#11202 = @"C_type$file$2isatty" +py_cobjects(#11202) +py_cobjecttypes(#11202, #10034) +py_cobject_sources(#11202, 0) +py_cobjectnames(#11202, "isatty") +py_cmembers_versioned(#11179, "isatty", #11202, "2") +#11203 = @"C_type$file$2mode" +py_cobjects(#11203) +py_cobjecttypes(#11203, #10045) +py_cobject_sources(#11203, 0) +py_cobjectnames(#11203, "mode") +py_cmembers_versioned(#11179, "mode", #11203, "2") +#11204 = @"C_type$file$2name" +py_cobjects(#11204) +py_cobjecttypes(#11204, #10045) +py_cobject_sources(#11204, 0) +py_cobjectnames(#11204, "name") +py_cmembers_versioned(#11179, "name", #11204, "2") +#11205 = @"C_type$file$2newlines" +py_cobjects(#11205) +py_cobjecttypes(#11205, #10003) +py_cobject_sources(#11205, 0) +#11206 = @"C_type$file$2newlines$2__set__" +py_cobjects(#11206) +py_cobjecttypes(#11206, #10009) +py_cobject_sources(#11206, 0) +py_cobjectnames(#11206, "__set__") +py_cmembers_versioned(#11205, "__set__", #11206, "2") +#11207 = @"C_type$file$2newlines$2__getattribute__" +py_cobjects(#11207) +py_cobjecttypes(#11207, #10009) +py_cobject_sources(#11207, 0) +py_cobjectnames(#11207, "__getattribute__") +py_cmembers_versioned(#11205, "__getattribute__", #11207, "2") +py_cmembers_versioned(#11205, "__objclass__", #11179, "2") +#11208 = @"C_type$file$2newlines$2__repr__" +py_cobjects(#11208) +py_cobjecttypes(#11208, #10009) +py_cobject_sources(#11208, 0) +py_cobjectnames(#11208, "__repr__") +py_cmembers_versioned(#11205, "__repr__", #11208, "2") +#11209 = @"C_type$file$2newlines$2__get__" +py_cobjects(#11209) +py_cobjecttypes(#11209, #10009) +py_cobject_sources(#11209, 0) +py_cobjectnames(#11209, "__get__") +py_cmembers_versioned(#11205, "__get__", #11209, "2") +#11210 = @"C_bytes$c0d8ab59effeef9fd438a7cca51589a1d26a9bea" +py_cobjects(#11210) +py_cobjecttypes(#11210, #10028) +py_cobject_sources(#11210, 0) +py_cobjectnames(#11210, "b'end-of-line convention used in this file'") +py_cmembers_versioned(#11205, "__doc__", #11210, "2") +#11211 = @"C_type$file$2newlines$2__delete__" +py_cobjects(#11211) +py_cobjecttypes(#11211, #10009) +py_cobject_sources(#11211, 0) +py_cobjectnames(#11211, "__delete__") +py_cmembers_versioned(#11205, "__delete__", #11211, "2") +py_cobjectnames(#11205, "newlines") +py_cmembers_versioned(#11179, "newlines", #11205, "2") +#11212 = @"C_type$file$2next" +py_cobjects(#11212) +py_cobjecttypes(#11212, #10005) +py_cobject_sources(#11212, 0) +py_cobjectnames(#11212, "next") +py_cmembers_versioned(#11179, "next", #11212, "2") +#11213 = @"C_type$file$2read" +py_cobjects(#11213) +py_cobjecttypes(#11213, #10034) +py_cobject_sources(#11213, 0) +py_cobjectnames(#11213, "read") +py_cmembers_versioned(#11179, "read", #11213, "2") +#11214 = @"C_type$file$2readinto" +py_cobjects(#11214) +py_cobjecttypes(#11214, #10034) +py_cobject_sources(#11214, 0) +py_cobjectnames(#11214, "readinto") +py_cmembers_versioned(#11179, "readinto", #11214, "2") +#11215 = @"C_type$file$2readline" +py_cobjects(#11215) +py_cobjecttypes(#11215, #10034) +py_cobject_sources(#11215, 0) +py_cobjectnames(#11215, "readline") +py_cmembers_versioned(#11179, "readline", #11215, "2") +#11216 = @"C_type$file$2readlines" +py_cobjects(#11216) +py_cobjecttypes(#11216, #10034) +py_cobject_sources(#11216, 0) +py_cobjectnames(#11216, "readlines") +py_cmembers_versioned(#11179, "readlines", #11216, "2") +#11217 = @"C_type$file$2seek" +py_cobjects(#11217) +py_cobjecttypes(#11217, #10034) +py_cobject_sources(#11217, 0) +py_cobjectnames(#11217, "seek") +py_cmembers_versioned(#11179, "seek", #11217, "2") +#11218 = @"C_type$file$2softspace" +py_cobjects(#11218) +py_cobjecttypes(#11218, #10003) +py_cobject_sources(#11218, 0) +#11219 = @"C_type$file$2softspace$2__set__" +py_cobjects(#11219) +py_cobjecttypes(#11219, #10009) +py_cobject_sources(#11219, 0) +py_cobjectnames(#11219, "__set__") +py_cmembers_versioned(#11218, "__set__", #11219, "2") +#11220 = @"C_type$file$2softspace$2__getattribute__" +py_cobjects(#11220) +py_cobjecttypes(#11220, #10009) +py_cobject_sources(#11220, 0) +py_cobjectnames(#11220, "__getattribute__") +py_cmembers_versioned(#11218, "__getattribute__", #11220, "2") +py_cmembers_versioned(#11218, "__objclass__", #11179, "2") +#11221 = @"C_type$file$2softspace$2__repr__" +py_cobjects(#11221) +py_cobjecttypes(#11221, #10009) +py_cobject_sources(#11221, 0) +py_cobjectnames(#11221, "__repr__") +py_cmembers_versioned(#11218, "__repr__", #11221, "2") +#11222 = @"C_type$file$2softspace$2__get__" +py_cobjects(#11222) +py_cobjecttypes(#11222, #10009) +py_cobject_sources(#11222, 0) +py_cobjectnames(#11222, "__get__") +py_cmembers_versioned(#11218, "__get__", #11222, "2") +#11223 = @"C_bytes$be4f12d9d1611c73ef9e7410a5d10ffc7bcce51a" +py_cobjects(#11223) +py_cobjecttypes(#11223, #10028) +py_cobject_sources(#11223, 0) +py_cobjectnames(#11223, "b'flag indicating that a space needs to be printed; used by print'") +py_cmembers_versioned(#11218, "__doc__", #11223, "2") +#11224 = @"C_type$file$2softspace$2__delete__" +py_cobjects(#11224) +py_cobjecttypes(#11224, #10009) +py_cobject_sources(#11224, 0) +py_cobjectnames(#11224, "__delete__") +py_cmembers_versioned(#11218, "__delete__", #11224, "2") +py_cobjectnames(#11218, "softspace") +py_cmembers_versioned(#11179, "softspace", #11218, "2") +#11225 = @"C_type$file$2tell" +py_cobjects(#11225) +py_cobjecttypes(#11225, #10034) +py_cobject_sources(#11225, 0) +py_cobjectnames(#11225, "tell") +py_cmembers_versioned(#11179, "tell", #11225, "2") +#11226 = @"C_type$file$2truncate" +py_cobjects(#11226) +py_cobjecttypes(#11226, #10034) +py_cobject_sources(#11226, 0) +py_cobjectnames(#11226, "truncate") +py_cmembers_versioned(#11179, "truncate", #11226, "2") +#11227 = @"C_type$file$2write" +py_cobjects(#11227) +py_cobjecttypes(#11227, #10034) +py_cobject_sources(#11227, 0) +py_cobjectnames(#11227, "write") +py_cmembers_versioned(#11179, "write", #11227, "2") +#11228 = @"C_type$file$2writelines" +py_cobjects(#11228) +py_cobjecttypes(#11228, #10034) +py_cobject_sources(#11228, 0) +py_cobjectnames(#11228, "writelines") +py_cmembers_versioned(#11179, "writelines", #11228, "2") +#11229 = @"C_type$file$2xreadlines" +py_cobjects(#11229) +py_cobjecttypes(#11229, #10034) +py_cobject_sources(#11229, 0) +py_cobjectnames(#11229, "xreadlines") +py_cmembers_versioned(#11179, "xreadlines", #11229, "2") +py_cmembers_versioned(#11179, ".super.", #10021, "2") +py_cobjectnames(#11179, "file") +py_cmembers_versioned(#10760, "file", #11179, "2") +#11230 = @"C_builtin_function_or_method$builtins.filter" +py_cobjects(#11230) +py_cobjecttypes(#11230, #10075) +py_cobject_sources(#11230, 0) +py_cobjectnames(#11230, "filter") +py_cmembers_versioned(#10760, "filter", #11230, "2") +#11231 = @"C_type$float" +py_cobjects(#11231) +py_cobjecttypes(#11231, #10001) +py_cobject_sources(#11231, 0) +#11232 = @"C_type$float$2__abs__" +py_cobjects(#11232) +py_cobjecttypes(#11232, #10005) +py_cobject_sources(#11232, 0) +py_cobjectnames(#11232, "__abs__") +py_cmembers_versioned(#11231, "__abs__", #11232, "2") +#11233 = @"C_type$float$2__add__" +py_cobjects(#11233) +py_cobjecttypes(#11233, #10005) +py_cobject_sources(#11233, 0) +py_cobjectnames(#11233, "__add__") +py_cmembers_versioned(#11231, "__add__", #11233, "2") +#11234 = @"C_type$float$2__coerce__" +py_cobjects(#11234) +py_cobjecttypes(#11234, #10005) +py_cobject_sources(#11234, 0) +py_cobjectnames(#11234, "__coerce__") +py_cmembers_versioned(#11231, "__coerce__", #11234, "2") +#11235 = @"C_type$float$2__div__" +py_cobjects(#11235) +py_cobjecttypes(#11235, #10005) +py_cobject_sources(#11235, 0) +py_cobjectnames(#11235, "__div__") +py_cmembers_versioned(#11231, "__div__", #11235, "2") +#11236 = @"C_type$float$2__divmod__" +py_cobjects(#11236) +py_cobjecttypes(#11236, #10005) +py_cobject_sources(#11236, 0) +py_cobjectnames(#11236, "__divmod__") +py_cmembers_versioned(#11231, "__divmod__", #11236, "2") +#11237 = @"C_bytes$8365cc677c8272c38289c9bfa732faf18370a91b" +py_cobjects(#11237) +py_cobjecttypes(#11237, #10028) +py_cobject_sources(#11237, 0) +py_cobjectnames(#11237, "b'float(x) -> floating point number + +Convert a string or number to a floating point number, if possible.'") +py_cmembers_versioned(#11231, "__doc__", #11237, "2") +#11238 = @"C_type$float$2__eq__" +py_cobjects(#11238) +py_cobjecttypes(#11238, #10005) +py_cobject_sources(#11238, 0) +py_cobjectnames(#11238, "__eq__") +py_cmembers_versioned(#11231, "__eq__", #11238, "2") +#11239 = @"C_type$float$2__float__" +py_cobjects(#11239) +py_cobjecttypes(#11239, #10005) +py_cobject_sources(#11239, 0) +py_cobjectnames(#11239, "__float__") +py_cmembers_versioned(#11231, "__float__", #11239, "2") +#11240 = @"C_type$float$2__floordiv__" +py_cobjects(#11240) +py_cobjecttypes(#11240, #10005) +py_cobject_sources(#11240, 0) +py_cobjectnames(#11240, "__floordiv__") +py_cmembers_versioned(#11231, "__floordiv__", #11240, "2") +#11241 = @"C_type$float$2__format__" +py_cobjects(#11241) +py_cobjecttypes(#11241, #10034) +py_cobject_sources(#11241, 0) +py_cobjectnames(#11241, "__format__") +py_cmembers_versioned(#11231, "__format__", #11241, "2") +#11242 = @"C_type$float$2__ge__" +py_cobjects(#11242) +py_cobjecttypes(#11242, #10005) +py_cobject_sources(#11242, 0) +py_cobjectnames(#11242, "__ge__") +py_cmembers_versioned(#11231, "__ge__", #11242, "2") +#11243 = @"C_type$float$2__getattribute__" +py_cobjects(#11243) +py_cobjecttypes(#11243, #10005) +py_cobject_sources(#11243, 0) +py_cobjectnames(#11243, "__getattribute__") +py_cmembers_versioned(#11231, "__getattribute__", #11243, "2") +#11244 = @"C_type$float$2__getformat__" +py_cobjects(#11244) +py_cobjecttypes(#11244, #10169) +py_cobject_sources(#11244, 0) +py_cobjectnames(#11244, "__getformat__") +py_cmembers_versioned(#11231, "__getformat__", #11244, "2") +#11245 = @"C_type$float$2__getnewargs__" +py_cobjects(#11245) +py_cobjecttypes(#11245, #10034) +py_cobject_sources(#11245, 0) +py_cobjectnames(#11245, "__getnewargs__") +py_cmembers_versioned(#11231, "__getnewargs__", #11245, "2") +#11246 = @"C_type$float$2__gt__" +py_cobjects(#11246) +py_cobjecttypes(#11246, #10005) +py_cobject_sources(#11246, 0) +py_cobjectnames(#11246, "__gt__") +py_cmembers_versioned(#11231, "__gt__", #11246, "2") +#11247 = @"C_type$float$2__hash__" +py_cobjects(#11247) +py_cobjecttypes(#11247, #10005) +py_cobject_sources(#11247, 0) +py_cobjectnames(#11247, "__hash__") +py_cmembers_versioned(#11231, "__hash__", #11247, "2") +#11248 = @"C_type$float$2__int__" +py_cobjects(#11248) +py_cobjecttypes(#11248, #10005) +py_cobject_sources(#11248, 0) +py_cobjectnames(#11248, "__int__") +py_cmembers_versioned(#11231, "__int__", #11248, "2") +#11249 = @"C_type$float$2__le__" +py_cobjects(#11249) +py_cobjecttypes(#11249, #10005) +py_cobject_sources(#11249, 0) +py_cobjectnames(#11249, "__le__") +py_cmembers_versioned(#11231, "__le__", #11249, "2") +#11250 = @"C_type$float$2__long__" +py_cobjects(#11250) +py_cobjecttypes(#11250, #10005) +py_cobject_sources(#11250, 0) +py_cobjectnames(#11250, "__long__") +py_cmembers_versioned(#11231, "__long__", #11250, "2") +#11251 = @"C_type$float$2__lt__" +py_cobjects(#11251) +py_cobjecttypes(#11251, #10005) +py_cobject_sources(#11251, 0) +py_cobjectnames(#11251, "__lt__") +py_cmembers_versioned(#11231, "__lt__", #11251, "2") +#11252 = @"C_type$float$2__mod__" +py_cobjects(#11252) +py_cobjecttypes(#11252, #10005) +py_cobject_sources(#11252, 0) +py_cobjectnames(#11252, "__mod__") +py_cmembers_versioned(#11231, "__mod__", #11252, "2") +#11253 = @"C_type$float$2__mul__" +py_cobjects(#11253) +py_cobjecttypes(#11253, #10005) +py_cobject_sources(#11253, 0) +py_cobjectnames(#11253, "__mul__") +py_cmembers_versioned(#11231, "__mul__", #11253, "2") +#11254 = @"C_type$float$2__ne__" +py_cobjects(#11254) +py_cobjecttypes(#11254, #10005) +py_cobject_sources(#11254, 0) +py_cobjectnames(#11254, "__ne__") +py_cmembers_versioned(#11231, "__ne__", #11254, "2") +#11255 = @"C_type$float$2__neg__" +py_cobjects(#11255) +py_cobjecttypes(#11255, #10005) +py_cobject_sources(#11255, 0) +py_cobjectnames(#11255, "__neg__") +py_cmembers_versioned(#11231, "__neg__", #11255, "2") +#11256 = @"C_type$float$2__new__" +py_cobjects(#11256) +py_cobjecttypes(#11256, #10075) +py_cobject_sources(#11256, 0) +py_cobjectnames(#11256, "__new__") +py_cmembers_versioned(#11231, "__new__", #11256, "2") +#11257 = @"C_type$float$2__nonzero__" +py_cobjects(#11257) +py_cobjecttypes(#11257, #10005) +py_cobject_sources(#11257, 0) +py_cobjectnames(#11257, "__nonzero__") +py_cmembers_versioned(#11231, "__nonzero__", #11257, "2") +#11258 = @"C_type$float$2__pos__" +py_cobjects(#11258) +py_cobjecttypes(#11258, #10005) +py_cobject_sources(#11258, 0) +py_cobjectnames(#11258, "__pos__") +py_cmembers_versioned(#11231, "__pos__", #11258, "2") +#11259 = @"C_type$float$2__pow__" +py_cobjects(#11259) +py_cobjecttypes(#11259, #10005) +py_cobject_sources(#11259, 0) +py_cobjectnames(#11259, "__pow__") +py_cmembers_versioned(#11231, "__pow__", #11259, "2") +#11260 = @"C_type$float$2__radd__" +py_cobjects(#11260) +py_cobjecttypes(#11260, #10005) +py_cobject_sources(#11260, 0) +py_cobjectnames(#11260, "__radd__") +py_cmembers_versioned(#11231, "__radd__", #11260, "2") +#11261 = @"C_type$float$2__rdiv__" +py_cobjects(#11261) +py_cobjecttypes(#11261, #10005) +py_cobject_sources(#11261, 0) +py_cobjectnames(#11261, "__rdiv__") +py_cmembers_versioned(#11231, "__rdiv__", #11261, "2") +#11262 = @"C_type$float$2__rdivmod__" +py_cobjects(#11262) +py_cobjecttypes(#11262, #10005) +py_cobject_sources(#11262, 0) +py_cobjectnames(#11262, "__rdivmod__") +py_cmembers_versioned(#11231, "__rdivmod__", #11262, "2") +#11263 = @"C_type$float$2__repr__" +py_cobjects(#11263) +py_cobjecttypes(#11263, #10005) +py_cobject_sources(#11263, 0) +py_cobjectnames(#11263, "__repr__") +py_cmembers_versioned(#11231, "__repr__", #11263, "2") +#11264 = @"C_type$float$2__rfloordiv__" +py_cobjects(#11264) +py_cobjecttypes(#11264, #10005) +py_cobject_sources(#11264, 0) +py_cobjectnames(#11264, "__rfloordiv__") +py_cmembers_versioned(#11231, "__rfloordiv__", #11264, "2") +#11265 = @"C_type$float$2__rmod__" +py_cobjects(#11265) +py_cobjecttypes(#11265, #10005) +py_cobject_sources(#11265, 0) +py_cobjectnames(#11265, "__rmod__") +py_cmembers_versioned(#11231, "__rmod__", #11265, "2") +#11266 = @"C_type$float$2__rmul__" +py_cobjects(#11266) +py_cobjecttypes(#11266, #10005) +py_cobject_sources(#11266, 0) +py_cobjectnames(#11266, "__rmul__") +py_cmembers_versioned(#11231, "__rmul__", #11266, "2") +#11267 = @"C_type$float$2__rpow__" +py_cobjects(#11267) +py_cobjecttypes(#11267, #10005) +py_cobject_sources(#11267, 0) +py_cobjectnames(#11267, "__rpow__") +py_cmembers_versioned(#11231, "__rpow__", #11267, "2") +#11268 = @"C_type$float$2__rsub__" +py_cobjects(#11268) +py_cobjecttypes(#11268, #10005) +py_cobject_sources(#11268, 0) +py_cobjectnames(#11268, "__rsub__") +py_cmembers_versioned(#11231, "__rsub__", #11268, "2") +#11269 = @"C_type$float$2__rtruediv__" +py_cobjects(#11269) +py_cobjecttypes(#11269, #10005) +py_cobject_sources(#11269, 0) +py_cobjectnames(#11269, "__rtruediv__") +py_cmembers_versioned(#11231, "__rtruediv__", #11269, "2") +#11270 = @"C_type$float$2__setformat__" +py_cobjects(#11270) +py_cobjecttypes(#11270, #10169) +py_cobject_sources(#11270, 0) +py_cobjectnames(#11270, "__setformat__") +py_cmembers_versioned(#11231, "__setformat__", #11270, "2") +#11271 = @"C_type$float$2__str__" +py_cobjects(#11271) +py_cobjecttypes(#11271, #10005) +py_cobject_sources(#11271, 0) +py_cobjectnames(#11271, "__str__") +py_cmembers_versioned(#11231, "__str__", #11271, "2") +#11272 = @"C_type$float$2__sub__" +py_cobjects(#11272) +py_cobjecttypes(#11272, #10005) +py_cobject_sources(#11272, 0) +py_cobjectnames(#11272, "__sub__") +py_cmembers_versioned(#11231, "__sub__", #11272, "2") +#11273 = @"C_type$float$2__truediv__" +py_cobjects(#11273) +py_cobjecttypes(#11273, #10005) +py_cobject_sources(#11273, 0) +py_cobjectnames(#11273, "__truediv__") +py_cmembers_versioned(#11231, "__truediv__", #11273, "2") +#11274 = @"C_type$float$2__trunc__" +py_cobjects(#11274) +py_cobjecttypes(#11274, #10034) +py_cobject_sources(#11274, 0) +py_cobjectnames(#11274, "__trunc__") +py_cmembers_versioned(#11231, "__trunc__", #11274, "2") +#11275 = @"C_type$float$2as_integer_ratio" +py_cobjects(#11275) +py_cobjecttypes(#11275, #10034) +py_cobject_sources(#11275, 0) +py_cobjectnames(#11275, "as_integer_ratio") +py_cmembers_versioned(#11231, "as_integer_ratio", #11275, "2") +#11276 = @"C_type$float$2conjugate" +py_cobjects(#11276) +py_cobjecttypes(#11276, #10034) +py_cobject_sources(#11276, 0) +py_cobjectnames(#11276, "conjugate") +py_cmembers_versioned(#11231, "conjugate", #11276, "2") +#11277 = @"C_type$float$2fromhex" +py_cobjects(#11277) +py_cobjecttypes(#11277, #10169) +py_cobject_sources(#11277, 0) +py_cobjectnames(#11277, "fromhex") +py_cmembers_versioned(#11231, "fromhex", #11277, "2") +#11278 = @"C_type$float$2hex" +py_cobjects(#11278) +py_cobjecttypes(#11278, #10034) +py_cobject_sources(#11278, 0) +py_cobjectnames(#11278, "hex") +py_cmembers_versioned(#11231, "hex", #11278, "2") +#11279 = @"C_type$float$2imag" +py_cobjects(#11279) +py_cobjecttypes(#11279, #10003) +py_cobject_sources(#11279, 0) +#11280 = @"C_type$float$2imag$2__set__" +py_cobjects(#11280) +py_cobjecttypes(#11280, #10009) +py_cobject_sources(#11280, 0) +py_cobjectnames(#11280, "__set__") +py_cmembers_versioned(#11279, "__set__", #11280, "2") +#11281 = @"C_type$float$2imag$2__getattribute__" +py_cobjects(#11281) +py_cobjecttypes(#11281, #10009) +py_cobject_sources(#11281, 0) +py_cobjectnames(#11281, "__getattribute__") +py_cmembers_versioned(#11279, "__getattribute__", #11281, "2") +py_cmembers_versioned(#11279, "__objclass__", #11231, "2") +#11282 = @"C_type$float$2imag$2__repr__" +py_cobjects(#11282) +py_cobjecttypes(#11282, #10009) +py_cobject_sources(#11282, 0) +py_cobjectnames(#11282, "__repr__") +py_cmembers_versioned(#11279, "__repr__", #11282, "2") +#11283 = @"C_type$float$2imag$2__get__" +py_cobjects(#11283) +py_cobjecttypes(#11283, #10009) +py_cobject_sources(#11283, 0) +py_cobjectnames(#11283, "__get__") +py_cmembers_versioned(#11279, "__get__", #11283, "2") +#11284 = @"C_bytes$1697c2b9b4c10d325b12cf3fded2fbfc0e15d5f0" +py_cobjects(#11284) +py_cobjecttypes(#11284, #10028) +py_cobject_sources(#11284, 0) +py_cobjectnames(#11284, "b'the imaginary part of a complex number'") +py_cmembers_versioned(#11279, "__doc__", #11284, "2") +#11285 = @"C_type$float$2imag$2__delete__" +py_cobjects(#11285) +py_cobjecttypes(#11285, #10009) +py_cobject_sources(#11285, 0) +py_cobjectnames(#11285, "__delete__") +py_cmembers_versioned(#11279, "__delete__", #11285, "2") +py_cobjectnames(#11279, "imag") +py_cmembers_versioned(#11231, "imag", #11279, "2") +#11286 = @"C_type$float$2is_integer" +py_cobjects(#11286) +py_cobjecttypes(#11286, #10034) +py_cobject_sources(#11286, 0) +py_cobjectnames(#11286, "is_integer") +py_cmembers_versioned(#11231, "is_integer", #11286, "2") +#11287 = @"C_type$float$2real" +py_cobjects(#11287) +py_cobjecttypes(#11287, #10003) +py_cobject_sources(#11287, 0) +#11288 = @"C_type$float$2real$2__set__" +py_cobjects(#11288) +py_cobjecttypes(#11288, #10009) +py_cobject_sources(#11288, 0) +py_cobjectnames(#11288, "__set__") +py_cmembers_versioned(#11287, "__set__", #11288, "2") +#11289 = @"C_type$float$2real$2__getattribute__" +py_cobjects(#11289) +py_cobjecttypes(#11289, #10009) +py_cobject_sources(#11289, 0) +py_cobjectnames(#11289, "__getattribute__") +py_cmembers_versioned(#11287, "__getattribute__", #11289, "2") +py_cmembers_versioned(#11287, "__objclass__", #11231, "2") +#11290 = @"C_type$float$2real$2__repr__" +py_cobjects(#11290) +py_cobjecttypes(#11290, #10009) +py_cobject_sources(#11290, 0) +py_cobjectnames(#11290, "__repr__") +py_cmembers_versioned(#11287, "__repr__", #11290, "2") +#11291 = @"C_type$float$2real$2__get__" +py_cobjects(#11291) +py_cobjecttypes(#11291, #10009) +py_cobject_sources(#11291, 0) +py_cobjectnames(#11291, "__get__") +py_cmembers_versioned(#11287, "__get__", #11291, "2") +#11292 = @"C_bytes$2cb527e0bacedb07e674d6e9890d3d2ab1a8f487" +py_cobjects(#11292) +py_cobjecttypes(#11292, #10028) +py_cobject_sources(#11292, 0) +py_cobjectnames(#11292, "b'the real part of a complex number'") +py_cmembers_versioned(#11287, "__doc__", #11292, "2") +#11293 = @"C_type$float$2real$2__delete__" +py_cobjects(#11293) +py_cobjecttypes(#11293, #10009) +py_cobject_sources(#11293, 0) +py_cobjectnames(#11293, "__delete__") +py_cmembers_versioned(#11287, "__delete__", #11293, "2") +py_cobjectnames(#11287, "real") +py_cmembers_versioned(#11231, "real", #11287, "2") +py_cmembers_versioned(#11231, ".super.", #10021, "2") +py_cobjectnames(#11231, "float") +py_cmembers_versioned(#10760, "float", #11231, "2") +#11294 = @"C_builtin_function_or_method$builtins.format" +py_cobjects(#11294) +py_cobjecttypes(#11294, #10075) +py_cobject_sources(#11294, 0) +py_cobjectnames(#11294, "format") +py_cmembers_versioned(#10760, "format", #11294, "2") +#11295 = @"C_type$frozenset" +py_cobjects(#11295) +py_cobjecttypes(#11295, #10001) +py_cobject_sources(#11295, 0) +#11296 = @"C_type$frozenset$2__and__" +py_cobjects(#11296) +py_cobjecttypes(#11296, #10005) +py_cobject_sources(#11296, 0) +py_cobjectnames(#11296, "__and__") +py_cmembers_versioned(#11295, "__and__", #11296, "2") +#11297 = @"C_type$frozenset$2__cmp__" +py_cobjects(#11297) +py_cobjecttypes(#11297, #10005) +py_cobject_sources(#11297, 0) +py_cobjectnames(#11297, "__cmp__") +py_cmembers_versioned(#11295, "__cmp__", #11297, "2") +#11298 = @"C_type$frozenset$2__contains__" +py_cobjects(#11298) +py_cobjecttypes(#11298, #10034) +py_cobject_sources(#11298, 0) +py_cobjectnames(#11298, "__contains__") +py_cmembers_versioned(#11295, "__contains__", #11298, "2") +#11299 = @"C_bytes$dd2991949f142904935210689ba50c9ae0a87b00" +py_cobjects(#11299) +py_cobjecttypes(#11299, #10028) +py_cobject_sources(#11299, 0) +py_cobjectnames(#11299, "b'frozenset() -> empty frozenset object +frozenset(iterable) -> frozenset object + +Build an immutable unordered collection of unique elements.'") +py_cmembers_versioned(#11295, "__doc__", #11299, "2") +#11300 = @"C_type$frozenset$2__eq__" +py_cobjects(#11300) +py_cobjecttypes(#11300, #10005) +py_cobject_sources(#11300, 0) +py_cobjectnames(#11300, "__eq__") +py_cmembers_versioned(#11295, "__eq__", #11300, "2") +#11301 = @"C_type$frozenset$2__ge__" +py_cobjects(#11301) +py_cobjecttypes(#11301, #10005) +py_cobject_sources(#11301, 0) +py_cobjectnames(#11301, "__ge__") +py_cmembers_versioned(#11295, "__ge__", #11301, "2") +#11302 = @"C_type$frozenset$2__getattribute__" +py_cobjects(#11302) +py_cobjecttypes(#11302, #10005) +py_cobject_sources(#11302, 0) +py_cobjectnames(#11302, "__getattribute__") +py_cmembers_versioned(#11295, "__getattribute__", #11302, "2") +#11303 = @"C_type$frozenset$2__gt__" +py_cobjects(#11303) +py_cobjecttypes(#11303, #10005) +py_cobject_sources(#11303, 0) +py_cobjectnames(#11303, "__gt__") +py_cmembers_versioned(#11295, "__gt__", #11303, "2") +#11304 = @"C_type$frozenset$2__hash__" +py_cobjects(#11304) +py_cobjecttypes(#11304, #10005) +py_cobject_sources(#11304, 0) +py_cobjectnames(#11304, "__hash__") +py_cmembers_versioned(#11295, "__hash__", #11304, "2") +#11305 = @"C_type$frozenset$2__iter__" +py_cobjects(#11305) +py_cobjecttypes(#11305, #10005) +py_cobject_sources(#11305, 0) +py_cobjectnames(#11305, "__iter__") +py_cmembers_versioned(#11295, "__iter__", #11305, "2") +#11306 = @"C_type$frozenset$2__le__" +py_cobjects(#11306) +py_cobjecttypes(#11306, #10005) +py_cobject_sources(#11306, 0) +py_cobjectnames(#11306, "__le__") +py_cmembers_versioned(#11295, "__le__", #11306, "2") +#11307 = @"C_type$frozenset$2__len__" +py_cobjects(#11307) +py_cobjecttypes(#11307, #10005) +py_cobject_sources(#11307, 0) +py_cobjectnames(#11307, "__len__") +py_cmembers_versioned(#11295, "__len__", #11307, "2") +#11308 = @"C_type$frozenset$2__lt__" +py_cobjects(#11308) +py_cobjecttypes(#11308, #10005) +py_cobject_sources(#11308, 0) +py_cobjectnames(#11308, "__lt__") +py_cmembers_versioned(#11295, "__lt__", #11308, "2") +#11309 = @"C_type$frozenset$2__ne__" +py_cobjects(#11309) +py_cobjecttypes(#11309, #10005) +py_cobject_sources(#11309, 0) +py_cobjectnames(#11309, "__ne__") +py_cmembers_versioned(#11295, "__ne__", #11309, "2") +#11310 = @"C_type$frozenset$2__new__" +py_cobjects(#11310) +py_cobjecttypes(#11310, #10075) +py_cobject_sources(#11310, 0) +py_cobjectnames(#11310, "__new__") +py_cmembers_versioned(#11295, "__new__", #11310, "2") +#11311 = @"C_type$frozenset$2__or__" +py_cobjects(#11311) +py_cobjecttypes(#11311, #10005) +py_cobject_sources(#11311, 0) +py_cobjectnames(#11311, "__or__") +py_cmembers_versioned(#11295, "__or__", #11311, "2") +#11312 = @"C_type$frozenset$2__rand__" +py_cobjects(#11312) +py_cobjecttypes(#11312, #10005) +py_cobject_sources(#11312, 0) +py_cobjectnames(#11312, "__rand__") +py_cmembers_versioned(#11295, "__rand__", #11312, "2") +#11313 = @"C_type$frozenset$2__reduce__" +py_cobjects(#11313) +py_cobjecttypes(#11313, #10034) +py_cobject_sources(#11313, 0) +py_cobjectnames(#11313, "__reduce__") +py_cmembers_versioned(#11295, "__reduce__", #11313, "2") +#11314 = @"C_type$frozenset$2__repr__" +py_cobjects(#11314) +py_cobjecttypes(#11314, #10005) +py_cobject_sources(#11314, 0) +py_cobjectnames(#11314, "__repr__") +py_cmembers_versioned(#11295, "__repr__", #11314, "2") +#11315 = @"C_type$frozenset$2__ror__" +py_cobjects(#11315) +py_cobjecttypes(#11315, #10005) +py_cobject_sources(#11315, 0) +py_cobjectnames(#11315, "__ror__") +py_cmembers_versioned(#11295, "__ror__", #11315, "2") +#11316 = @"C_type$frozenset$2__rsub__" +py_cobjects(#11316) +py_cobjecttypes(#11316, #10005) +py_cobject_sources(#11316, 0) +py_cobjectnames(#11316, "__rsub__") +py_cmembers_versioned(#11295, "__rsub__", #11316, "2") +#11317 = @"C_type$frozenset$2__rxor__" +py_cobjects(#11317) +py_cobjecttypes(#11317, #10005) +py_cobject_sources(#11317, 0) +py_cobjectnames(#11317, "__rxor__") +py_cmembers_versioned(#11295, "__rxor__", #11317, "2") +#11318 = @"C_type$frozenset$2__sizeof__" +py_cobjects(#11318) +py_cobjecttypes(#11318, #10034) +py_cobject_sources(#11318, 0) +py_cobjectnames(#11318, "__sizeof__") +py_cmembers_versioned(#11295, "__sizeof__", #11318, "2") +#11319 = @"C_type$frozenset$2__sub__" +py_cobjects(#11319) +py_cobjecttypes(#11319, #10005) +py_cobject_sources(#11319, 0) +py_cobjectnames(#11319, "__sub__") +py_cmembers_versioned(#11295, "__sub__", #11319, "2") +#11320 = @"C_type$frozenset$2__xor__" +py_cobjects(#11320) +py_cobjecttypes(#11320, #10005) +py_cobject_sources(#11320, 0) +py_cobjectnames(#11320, "__xor__") +py_cmembers_versioned(#11295, "__xor__", #11320, "2") +#11321 = @"C_type$frozenset$2copy" +py_cobjects(#11321) +py_cobjecttypes(#11321, #10034) +py_cobject_sources(#11321, 0) +py_cobjectnames(#11321, "copy") +py_cmembers_versioned(#11295, "copy", #11321, "2") +#11322 = @"C_type$frozenset$2difference" +py_cobjects(#11322) +py_cobjecttypes(#11322, #10034) +py_cobject_sources(#11322, 0) +py_cobjectnames(#11322, "difference") +py_cmembers_versioned(#11295, "difference", #11322, "2") +#11323 = @"C_type$frozenset$2intersection" +py_cobjects(#11323) +py_cobjecttypes(#11323, #10034) +py_cobject_sources(#11323, 0) +py_cobjectnames(#11323, "intersection") +py_cmembers_versioned(#11295, "intersection", #11323, "2") +#11324 = @"C_type$frozenset$2isdisjoint" +py_cobjects(#11324) +py_cobjecttypes(#11324, #10034) +py_cobject_sources(#11324, 0) +py_cobjectnames(#11324, "isdisjoint") +py_cmembers_versioned(#11295, "isdisjoint", #11324, "2") +#11325 = @"C_type$frozenset$2issubset" +py_cobjects(#11325) +py_cobjecttypes(#11325, #10034) +py_cobject_sources(#11325, 0) +py_cobjectnames(#11325, "issubset") +py_cmembers_versioned(#11295, "issubset", #11325, "2") +#11326 = @"C_type$frozenset$2issuperset" +py_cobjects(#11326) +py_cobjecttypes(#11326, #10034) +py_cobject_sources(#11326, 0) +py_cobjectnames(#11326, "issuperset") +py_cmembers_versioned(#11295, "issuperset", #11326, "2") +#11327 = @"C_type$frozenset$2symmetric_difference" +py_cobjects(#11327) +py_cobjecttypes(#11327, #10034) +py_cobject_sources(#11327, 0) +py_cobjectnames(#11327, "symmetric_difference") +py_cmembers_versioned(#11295, "symmetric_difference", #11327, "2") +#11328 = @"C_type$frozenset$2union" +py_cobjects(#11328) +py_cobjecttypes(#11328, #10034) +py_cobject_sources(#11328, 0) +py_cobjectnames(#11328, "union") +py_cmembers_versioned(#11295, "union", #11328, "2") +py_cmembers_versioned(#11295, ".super.", #10021, "2") +py_cobjectnames(#11295, "frozenset") +py_cmembers_versioned(#10760, "frozenset", #11295, "2") +#11329 = @"C_builtin_function_or_method$builtins.getattr" +py_cobjects(#11329) +py_cobjecttypes(#11329, #10075) +py_cobject_sources(#11329, 0) +py_cobjectnames(#11329, "getattr") +py_cmembers_versioned(#10760, "getattr", #11329, "2") +py_cmembers_versioned(#10760, "globals", #10530, "2") +#11330 = @"C_builtin_function_or_method$builtins.hasattr" +py_cobjects(#11330) +py_cobjecttypes(#11330, #10075) +py_cobject_sources(#11330, 0) +py_cobjectnames(#11330, "hasattr") +py_cmembers_versioned(#10760, "hasattr", #11330, "2") +#11331 = @"C_builtin_function_or_method$builtins.hash" +py_cobjects(#11331) +py_cobjecttypes(#11331, #10075) +py_cobject_sources(#11331, 0) +py_cobjectnames(#11331, "hash") +py_cmembers_versioned(#10760, "hash", #11331, "2") +#11332 = @"C_module$__builtin__$2help" +#11333 = @"C_type$site._Helper" +py_cobjects(#11333) +py_cobjecttypes(#11333, #10001) +py_cobject_sources(#11333, 0) +#11334 = @"C_type$site._Helper$2__call__" +py_cobjects(#11334) +py_cobjecttypes(#11334, #10000) +py_cobject_sources(#11334, 0) +py_cobjectnames(#11334, "__call__") +py_cmembers_versioned(#11333, "__call__", #11334, "2") +#11335 = @"C_type$site._Helper$2__dict__" +py_cobjects(#11335) +py_cobjecttypes(#11335, #10003) +py_cobject_sources(#11335, 0) +#11336 = @"C_type$site._Helper$2__dict__$2__set__" +py_cobjects(#11336) +py_cobjecttypes(#11336, #10009) +py_cobject_sources(#11336, 0) +py_cobjectnames(#11336, "__set__") +py_cmembers_versioned(#11335, "__set__", #11336, "2") +#11337 = @"C_type$site._Helper$2__dict__$2__getattribute__" +py_cobjects(#11337) +py_cobjecttypes(#11337, #10009) +py_cobject_sources(#11337, 0) +py_cobjectnames(#11337, "__getattribute__") +py_cmembers_versioned(#11335, "__getattribute__", #11337, "2") +py_cmembers_versioned(#11335, "__objclass__", #11333, "2") +#11338 = @"C_type$site._Helper$2__dict__$2__repr__" +py_cobjects(#11338) +py_cobjecttypes(#11338, #10009) +py_cobject_sources(#11338, 0) +py_cobjectnames(#11338, "__repr__") +py_cmembers_versioned(#11335, "__repr__", #11338, "2") +#11339 = @"C_type$site._Helper$2__dict__$2__get__" +py_cobjects(#11339) +py_cobjecttypes(#11339, #10009) +py_cobject_sources(#11339, 0) +py_cobjectnames(#11339, "__get__") +py_cmembers_versioned(#11335, "__get__", #11339, "2") +#11340 = @"C_bytes$1caffae7c2cd65c04c7d894ccd85fd466c39c173" +py_cobjects(#11340) +py_cobjecttypes(#11340, #10028) +py_cobject_sources(#11340, 0) +py_cobjectnames(#11340, "b'dictionary for instance variables (if defined)'") +py_cmembers_versioned(#11335, "__doc__", #11340, "2") +#11341 = @"C_type$site._Helper$2__dict__$2__delete__" +py_cobjects(#11341) +py_cobjecttypes(#11341, #10009) +py_cobject_sources(#11341, 0) +py_cobjectnames(#11341, "__delete__") +py_cmembers_versioned(#11335, "__delete__", #11341, "2") +py_cobjectnames(#11335, "__dict__") +py_cmembers_versioned(#11333, "__dict__", #11335, "2") +#11342 = @"C_bytes$c78bbc1f1f8c49e5dde8a64e59e2614c395b4d56" +py_cobjects(#11342) +py_cobjecttypes(#11342, #10028) +py_cobject_sources(#11342, 0) +py_cobjectnames(#11342, "b'Define the builtin 'help'. + This is a wrapper around pydoc.help (with a twist). + + '") +py_cmembers_versioned(#11333, "__doc__", #11342, "2") +py_cmembers_versioned(#11333, "__module__", #11138, "2") +#11343 = @"C_type$site._Helper$2__repr__" +py_cobjects(#11343) +py_cobjecttypes(#11343, #10000) +py_cobject_sources(#11343, 0) +py_cobjectnames(#11343, "__repr__") +py_cmembers_versioned(#11333, "__repr__", #11343, "2") +#11344 = @"C_type$site._Helper$2__weakref__" +py_cobjects(#11344) +py_cobjecttypes(#11344, #10003) +py_cobject_sources(#11344, 0) +#11345 = @"C_type$site._Helper$2__weakref__$2__set__" +py_cobjects(#11345) +py_cobjecttypes(#11345, #10009) +py_cobject_sources(#11345, 0) +py_cobjectnames(#11345, "__set__") +py_cmembers_versioned(#11344, "__set__", #11345, "2") +#11346 = @"C_type$site._Helper$2__weakref__$2__getattribute__" +py_cobjects(#11346) +py_cobjecttypes(#11346, #10009) +py_cobject_sources(#11346, 0) +py_cobjectnames(#11346, "__getattribute__") +py_cmembers_versioned(#11344, "__getattribute__", #11346, "2") +py_cmembers_versioned(#11344, "__objclass__", #11333, "2") +#11347 = @"C_type$site._Helper$2__weakref__$2__repr__" +py_cobjects(#11347) +py_cobjecttypes(#11347, #10009) +py_cobject_sources(#11347, 0) +py_cobjectnames(#11347, "__repr__") +py_cmembers_versioned(#11344, "__repr__", #11347, "2") +#11348 = @"C_type$site._Helper$2__weakref__$2__get__" +py_cobjects(#11348) +py_cobjecttypes(#11348, #10009) +py_cobject_sources(#11348, 0) +py_cobjectnames(#11348, "__get__") +py_cmembers_versioned(#11344, "__get__", #11348, "2") +#11349 = @"C_bytes$288bf61a8280860bb3d2b542aa2ec112948d35b5" +py_cobjects(#11349) +py_cobjecttypes(#11349, #10028) +py_cobject_sources(#11349, 0) +py_cobjectnames(#11349, "b'list of weak references to the object (if defined)'") +py_cmembers_versioned(#11344, "__doc__", #11349, "2") +#11350 = @"C_type$site._Helper$2__weakref__$2__delete__" +py_cobjects(#11350) +py_cobjecttypes(#11350, #10009) +py_cobject_sources(#11350, 0) +py_cobjectnames(#11350, "__delete__") +py_cmembers_versioned(#11344, "__delete__", #11350, "2") +py_cobjectnames(#11344, "__weakref__") +py_cmembers_versioned(#11333, "__weakref__", #11344, "2") +py_cmembers_versioned(#11333, ".super.", #10021, "2") +py_cobjectnames(#11333, "site._Helper") +py_cobjects(#11332) +py_cobjecttypes(#11332, #11333) +py_cobject_sources(#11332, 0) +py_cobjectnames(#11332, "object") +py_cmembers_versioned(#10760, "help", #11332, "2") +#11351 = @"C_builtin_function_or_method$builtins.hex" +py_cobjects(#11351) +py_cobjecttypes(#11351, #10075) +py_cobject_sources(#11351, 0) +py_cobjectnames(#11351, "hex") +py_cmembers_versioned(#10760, "hex", #11351, "2") +#11352 = @"C_builtin_function_or_method$builtins.id" +py_cobjects(#11352) +py_cobjecttypes(#11352, #10075) +py_cobject_sources(#11352, 0) +py_cobjectnames(#11352, "id") +py_cmembers_versioned(#10760, "id", #11352, "2") +#11353 = @"C_builtin_function_or_method$builtins.input" +py_cobjects(#11353) +py_cobjecttypes(#11353, #10075) +py_cobject_sources(#11353, 0) +py_cobjectnames(#11353, "input") +py_cmembers_versioned(#10760, "input", #11353, "2") +py_cmembers_versioned(#10760, "int", #10449, "2") +#11354 = @"C_builtin_function_or_method$builtins.intern" +py_cobjects(#11354) +py_cobjecttypes(#11354, #10075) +py_cobject_sources(#11354, 0) +py_cobjectnames(#11354, "intern") +py_cmembers_versioned(#10760, "intern", #11354, "2") +#11355 = @"C_builtin_function_or_method$builtins.isinstance" +py_cobjects(#11355) +py_cobjecttypes(#11355, #10075) +py_cobject_sources(#11355, 0) +py_cobjectnames(#11355, "isinstance") +py_cmembers_versioned(#10760, "isinstance", #11355, "2") +#11356 = @"C_builtin_function_or_method$builtins.issubclass" +py_cobjects(#11356) +py_cobjecttypes(#11356, #10075) +py_cobject_sources(#11356, 0) +py_cobjectnames(#11356, "issubclass") +py_cmembers_versioned(#10760, "issubclass", #11356, "2") +#11357 = @"C_builtin_function_or_method$builtins.iter" +py_cobjects(#11357) +py_cobjecttypes(#11357, #10075) +py_cobject_sources(#11357, 0) +py_cobjectnames(#11357, "iter") +py_cmembers_versioned(#10760, "iter", #11357, "2") +#11358 = @"C_builtin_function_or_method$builtins.len" +py_cobjects(#11358) +py_cobjecttypes(#11358, #10075) +py_cobject_sources(#11358, 0) +py_cobjectnames(#11358, "len") +py_cmembers_versioned(#10760, "len", #11358, "2") +#11359 = @"C_module$__builtin__$2license" +py_cobjects(#11359) +py_cobjecttypes(#11359, #11125) +py_cobject_sources(#11359, 0) +py_cobjectnames(#11359, "object") +py_cmembers_versioned(#10760, "license", #11359, "2") +#11360 = @"C_type$list" +py_cobjects(#11360) +py_cobjecttypes(#11360, #10001) +py_cobject_sources(#11360, 0) +#11361 = @"C_type$list$2__add__" +py_cobjects(#11361) +py_cobjecttypes(#11361, #10005) +py_cobject_sources(#11361, 0) +py_cobjectnames(#11361, "__add__") +py_cmembers_versioned(#11360, "__add__", #11361, "2") +#11362 = @"C_type$list$2__contains__" +py_cobjects(#11362) +py_cobjecttypes(#11362, #10005) +py_cobject_sources(#11362, 0) +py_cobjectnames(#11362, "__contains__") +py_cmembers_versioned(#11360, "__contains__", #11362, "2") +#11363 = @"C_type$list$2__delitem__" +py_cobjects(#11363) +py_cobjecttypes(#11363, #10005) +py_cobject_sources(#11363, 0) +py_cobjectnames(#11363, "__delitem__") +py_cmembers_versioned(#11360, "__delitem__", #11363, "2") +#11364 = @"C_type$list$2__delslice__" +py_cobjects(#11364) +py_cobjecttypes(#11364, #10005) +py_cobject_sources(#11364, 0) +py_cobjectnames(#11364, "__delslice__") +py_cmembers_versioned(#11360, "__delslice__", #11364, "2") +#11365 = @"C_bytes$e11af338beeb141135c0e1af1300e77bd0820043" +py_cobjects(#11365) +py_cobjecttypes(#11365, #10028) +py_cobject_sources(#11365, 0) +py_cobjectnames(#11365, "b'list() -> new empty list +list(iterable) -> new list initialized from iterable's items'") +py_cmembers_versioned(#11360, "__doc__", #11365, "2") +#11366 = @"C_type$list$2__eq__" +py_cobjects(#11366) +py_cobjecttypes(#11366, #10005) +py_cobject_sources(#11366, 0) +py_cobjectnames(#11366, "__eq__") +py_cmembers_versioned(#11360, "__eq__", #11366, "2") +#11367 = @"C_type$list$2__ge__" +py_cobjects(#11367) +py_cobjecttypes(#11367, #10005) +py_cobject_sources(#11367, 0) +py_cobjectnames(#11367, "__ge__") +py_cmembers_versioned(#11360, "__ge__", #11367, "2") +#11368 = @"C_type$list$2__getattribute__" +py_cobjects(#11368) +py_cobjecttypes(#11368, #10005) +py_cobject_sources(#11368, 0) +py_cobjectnames(#11368, "__getattribute__") +py_cmembers_versioned(#11360, "__getattribute__", #11368, "2") +#11369 = @"C_type$list$2__getitem__" +py_cobjects(#11369) +py_cobjecttypes(#11369, #10034) +py_cobject_sources(#11369, 0) +py_cobjectnames(#11369, "__getitem__") +py_cmembers_versioned(#11360, "__getitem__", #11369, "2") +#11370 = @"C_type$list$2__getslice__" +py_cobjects(#11370) +py_cobjecttypes(#11370, #10005) +py_cobject_sources(#11370, 0) +py_cobjectnames(#11370, "__getslice__") +py_cmembers_versioned(#11360, "__getslice__", #11370, "2") +#11371 = @"C_type$list$2__gt__" +py_cobjects(#11371) +py_cobjecttypes(#11371, #10005) +py_cobject_sources(#11371, 0) +py_cobjectnames(#11371, "__gt__") +py_cmembers_versioned(#11360, "__gt__", #11371, "2") +py_cmembers_versioned(#11360, "__hash__", #10017, "2") +#11372 = @"C_type$list$2__iadd__" +py_cobjects(#11372) +py_cobjecttypes(#11372, #10005) +py_cobject_sources(#11372, 0) +py_cobjectnames(#11372, "__iadd__") +py_cmembers_versioned(#11360, "__iadd__", #11372, "2") +#11373 = @"C_type$list$2__imul__" +py_cobjects(#11373) +py_cobjecttypes(#11373, #10005) +py_cobject_sources(#11373, 0) +py_cobjectnames(#11373, "__imul__") +py_cmembers_versioned(#11360, "__imul__", #11373, "2") +#11374 = @"C_type$list$2__init__" +py_cobjects(#11374) +py_cobjecttypes(#11374, #10005) +py_cobject_sources(#11374, 0) +py_cobjectnames(#11374, "__init__") +py_cmembers_versioned(#11360, "__init__", #11374, "2") +#11375 = @"C_type$list$2__iter__" +py_cobjects(#11375) +py_cobjecttypes(#11375, #10005) +py_cobject_sources(#11375, 0) +py_cobjectnames(#11375, "__iter__") +py_cmembers_versioned(#11360, "__iter__", #11375, "2") +#11376 = @"C_type$list$2__le__" +py_cobjects(#11376) +py_cobjecttypes(#11376, #10005) +py_cobject_sources(#11376, 0) +py_cobjectnames(#11376, "__le__") +py_cmembers_versioned(#11360, "__le__", #11376, "2") +#11377 = @"C_type$list$2__len__" +py_cobjects(#11377) +py_cobjecttypes(#11377, #10005) +py_cobject_sources(#11377, 0) +py_cobjectnames(#11377, "__len__") +py_cmembers_versioned(#11360, "__len__", #11377, "2") +#11378 = @"C_type$list$2__lt__" +py_cobjects(#11378) +py_cobjecttypes(#11378, #10005) +py_cobject_sources(#11378, 0) +py_cobjectnames(#11378, "__lt__") +py_cmembers_versioned(#11360, "__lt__", #11378, "2") +#11379 = @"C_type$list$2__mul__" +py_cobjects(#11379) +py_cobjecttypes(#11379, #10005) +py_cobject_sources(#11379, 0) +py_cobjectnames(#11379, "__mul__") +py_cmembers_versioned(#11360, "__mul__", #11379, "2") +#11380 = @"C_type$list$2__ne__" +py_cobjects(#11380) +py_cobjecttypes(#11380, #10005) +py_cobject_sources(#11380, 0) +py_cobjectnames(#11380, "__ne__") +py_cmembers_versioned(#11360, "__ne__", #11380, "2") +#11381 = @"C_type$list$2__new__" +py_cobjects(#11381) +py_cobjecttypes(#11381, #10075) +py_cobject_sources(#11381, 0) +py_cobjectnames(#11381, "__new__") +py_cmembers_versioned(#11360, "__new__", #11381, "2") +#11382 = @"C_type$list$2__repr__" +py_cobjects(#11382) +py_cobjecttypes(#11382, #10005) +py_cobject_sources(#11382, 0) +py_cobjectnames(#11382, "__repr__") +py_cmembers_versioned(#11360, "__repr__", #11382, "2") +#11383 = @"C_type$list$2__reversed__" +py_cobjects(#11383) +py_cobjecttypes(#11383, #10034) +py_cobject_sources(#11383, 0) +py_cobjectnames(#11383, "__reversed__") +py_cmembers_versioned(#11360, "__reversed__", #11383, "2") +#11384 = @"C_type$list$2__rmul__" +py_cobjects(#11384) +py_cobjecttypes(#11384, #10005) +py_cobject_sources(#11384, 0) +py_cobjectnames(#11384, "__rmul__") +py_cmembers_versioned(#11360, "__rmul__", #11384, "2") +#11385 = @"C_type$list$2__setitem__" +py_cobjects(#11385) +py_cobjecttypes(#11385, #10005) +py_cobject_sources(#11385, 0) +py_cobjectnames(#11385, "__setitem__") +py_cmembers_versioned(#11360, "__setitem__", #11385, "2") +#11386 = @"C_type$list$2__setslice__" +py_cobjects(#11386) +py_cobjecttypes(#11386, #10005) +py_cobject_sources(#11386, 0) +py_cobjectnames(#11386, "__setslice__") +py_cmembers_versioned(#11360, "__setslice__", #11386, "2") +#11387 = @"C_type$list$2__sizeof__" +py_cobjects(#11387) +py_cobjecttypes(#11387, #10034) +py_cobject_sources(#11387, 0) +py_cobjectnames(#11387, "__sizeof__") +py_cmembers_versioned(#11360, "__sizeof__", #11387, "2") +#11388 = @"C_type$list$2append" +py_cobjects(#11388) +py_cobjecttypes(#11388, #10034) +py_cobject_sources(#11388, 0) +py_cobjectnames(#11388, "append") +py_cmembers_versioned(#11360, "append", #11388, "2") +#11389 = @"C_type$list$2count" +py_cobjects(#11389) +py_cobjecttypes(#11389, #10034) +py_cobject_sources(#11389, 0) +py_cobjectnames(#11389, "count") +py_cmembers_versioned(#11360, "count", #11389, "2") +#11390 = @"C_type$list$2extend" +py_cobjects(#11390) +py_cobjecttypes(#11390, #10034) +py_cobject_sources(#11390, 0) +py_cobjectnames(#11390, "extend") +py_cmembers_versioned(#11360, "extend", #11390, "2") +#11391 = @"C_type$list$2index" +py_cobjects(#11391) +py_cobjecttypes(#11391, #10034) +py_cobject_sources(#11391, 0) +py_cobjectnames(#11391, "index") +py_cmembers_versioned(#11360, "index", #11391, "2") +#11392 = @"C_type$list$2insert" +py_cobjects(#11392) +py_cobjecttypes(#11392, #10034) +py_cobject_sources(#11392, 0) +py_cobjectnames(#11392, "insert") +py_cmembers_versioned(#11360, "insert", #11392, "2") +#11393 = @"C_type$list$2pop" +py_cobjects(#11393) +py_cobjecttypes(#11393, #10034) +py_cobject_sources(#11393, 0) +py_cobjectnames(#11393, "pop") +py_cmembers_versioned(#11360, "pop", #11393, "2") +#11394 = @"C_type$list$2remove" +py_cobjects(#11394) +py_cobjecttypes(#11394, #10034) +py_cobject_sources(#11394, 0) +py_cobjectnames(#11394, "remove") +py_cmembers_versioned(#11360, "remove", #11394, "2") +#11395 = @"C_type$list$2reverse" +py_cobjects(#11395) +py_cobjecttypes(#11395, #10034) +py_cobject_sources(#11395, 0) +py_cobjectnames(#11395, "reverse") +py_cmembers_versioned(#11360, "reverse", #11395, "2") +#11396 = @"C_type$list$2sort" +py_cobjects(#11396) +py_cobjecttypes(#11396, #10034) +py_cobject_sources(#11396, 0) +py_cobjectnames(#11396, "sort") +py_cmembers_versioned(#11360, "sort", #11396, "2") +py_cmembers_versioned(#11360, ".super.", #10021, "2") +py_cobjectnames(#11360, "list") +py_cmembers_versioned(#10760, "list", #11360, "2") +#11397 = @"C_builtin_function_or_method$builtins.locals" +py_cobjects(#11397) +py_cobjecttypes(#11397, #10075) +py_cobject_sources(#11397, 0) +py_cobjectnames(#11397, "locals") +py_cmembers_versioned(#10760, "locals", #11397, "2") +py_cmembers_versioned(#10760, "long", #10645, "2") +#11398 = @"C_builtin_function_or_method$builtins.map" +py_cobjects(#11398) +py_cobjecttypes(#11398, #10075) +py_cobject_sources(#11398, 0) +py_cobjectnames(#11398, "map") +py_cmembers_versioned(#10760, "map", #11398, "2") +#11399 = @"C_builtin_function_or_method$builtins.max" +py_cobjects(#11399) +py_cobjecttypes(#11399, #10075) +py_cobject_sources(#11399, 0) +py_cobjectnames(#11399, "max") +py_cmembers_versioned(#10760, "max", #11399, "2") +#11400 = @"C_type$memoryview" +py_cobjects(#11400) +py_cobjecttypes(#11400, #10001) +py_cobject_sources(#11400, 0) +#11401 = @"C_type$memoryview$2__delitem__" +py_cobjects(#11401) +py_cobjecttypes(#11401, #10005) +py_cobject_sources(#11401, 0) +py_cobjectnames(#11401, "__delitem__") +py_cmembers_versioned(#11400, "__delitem__", #11401, "2") +#11402 = @"C_bytes$b3ac8d0c2d7a0879057bd5af570219c76d846a9b" +py_cobjects(#11402) +py_cobjecttypes(#11402, #10028) +py_cobject_sources(#11402, 0) +py_cobjectnames(#11402, "b'memoryview(object) + +Create a new memoryview object which references the given object.'") +py_cmembers_versioned(#11400, "__doc__", #11402, "2") +#11403 = @"C_type$memoryview$2__eq__" +py_cobjects(#11403) +py_cobjecttypes(#11403, #10005) +py_cobject_sources(#11403, 0) +py_cobjectnames(#11403, "__eq__") +py_cmembers_versioned(#11400, "__eq__", #11403, "2") +#11404 = @"C_type$memoryview$2__ge__" +py_cobjects(#11404) +py_cobjecttypes(#11404, #10005) +py_cobject_sources(#11404, 0) +py_cobjectnames(#11404, "__ge__") +py_cmembers_versioned(#11400, "__ge__", #11404, "2") +#11405 = @"C_type$memoryview$2__getattribute__" +py_cobjects(#11405) +py_cobjecttypes(#11405, #10005) +py_cobject_sources(#11405, 0) +py_cobjectnames(#11405, "__getattribute__") +py_cmembers_versioned(#11400, "__getattribute__", #11405, "2") +#11406 = @"C_type$memoryview$2__getitem__" +py_cobjects(#11406) +py_cobjecttypes(#11406, #10005) +py_cobject_sources(#11406, 0) +py_cobjectnames(#11406, "__getitem__") +py_cmembers_versioned(#11400, "__getitem__", #11406, "2") +#11407 = @"C_type$memoryview$2__gt__" +py_cobjects(#11407) +py_cobjecttypes(#11407, #10005) +py_cobject_sources(#11407, 0) +py_cobjectnames(#11407, "__gt__") +py_cmembers_versioned(#11400, "__gt__", #11407, "2") +#11408 = @"C_type$memoryview$2__le__" +py_cobjects(#11408) +py_cobjecttypes(#11408, #10005) +py_cobject_sources(#11408, 0) +py_cobjectnames(#11408, "__le__") +py_cmembers_versioned(#11400, "__le__", #11408, "2") +#11409 = @"C_type$memoryview$2__len__" +py_cobjects(#11409) +py_cobjecttypes(#11409, #10005) +py_cobject_sources(#11409, 0) +py_cobjectnames(#11409, "__len__") +py_cmembers_versioned(#11400, "__len__", #11409, "2") +#11410 = @"C_type$memoryview$2__lt__" +py_cobjects(#11410) +py_cobjecttypes(#11410, #10005) +py_cobject_sources(#11410, 0) +py_cobjectnames(#11410, "__lt__") +py_cmembers_versioned(#11400, "__lt__", #11410, "2") +#11411 = @"C_type$memoryview$2__ne__" +py_cobjects(#11411) +py_cobjecttypes(#11411, #10005) +py_cobject_sources(#11411, 0) +py_cobjectnames(#11411, "__ne__") +py_cmembers_versioned(#11400, "__ne__", #11411, "2") +#11412 = @"C_type$memoryview$2__new__" +py_cobjects(#11412) +py_cobjecttypes(#11412, #10075) +py_cobject_sources(#11412, 0) +py_cobjectnames(#11412, "__new__") +py_cmembers_versioned(#11400, "__new__", #11412, "2") +#11413 = @"C_type$memoryview$2__repr__" +py_cobjects(#11413) +py_cobjecttypes(#11413, #10005) +py_cobject_sources(#11413, 0) +py_cobjectnames(#11413, "__repr__") +py_cmembers_versioned(#11400, "__repr__", #11413, "2") +#11414 = @"C_type$memoryview$2__setitem__" +py_cobjects(#11414) +py_cobjecttypes(#11414, #10005) +py_cobject_sources(#11414, 0) +py_cobjectnames(#11414, "__setitem__") +py_cmembers_versioned(#11400, "__setitem__", #11414, "2") +#11415 = @"C_type$memoryview$2format" +py_cobjects(#11415) +py_cobjecttypes(#11415, #10003) +py_cobject_sources(#11415, 0) +#11416 = @"C_type$memoryview$2format$2__set__" +py_cobjects(#11416) +py_cobjecttypes(#11416, #10009) +py_cobject_sources(#11416, 0) +py_cobjectnames(#11416, "__set__") +py_cmembers_versioned(#11415, "__set__", #11416, "2") +#11417 = @"C_type$memoryview$2format$2__getattribute__" +py_cobjects(#11417) +py_cobjecttypes(#11417, #10009) +py_cobject_sources(#11417, 0) +py_cobjectnames(#11417, "__getattribute__") +py_cmembers_versioned(#11415, "__getattribute__", #11417, "2") +py_cmembers_versioned(#11415, "__objclass__", #11400, "2") +#11418 = @"C_type$memoryview$2format$2__repr__" +py_cobjects(#11418) +py_cobjecttypes(#11418, #10009) +py_cobject_sources(#11418, 0) +py_cobjectnames(#11418, "__repr__") +py_cmembers_versioned(#11415, "__repr__", #11418, "2") +#11419 = @"C_type$memoryview$2format$2__get__" +py_cobjects(#11419) +py_cobjecttypes(#11419, #10009) +py_cobject_sources(#11419, 0) +py_cobjectnames(#11419, "__get__") +py_cmembers_versioned(#11415, "__get__", #11419, "2") +py_cmembers_versioned(#11415, "__doc__", #10017, "2") +#11420 = @"C_type$memoryview$2format$2__delete__" +py_cobjects(#11420) +py_cobjecttypes(#11420, #10009) +py_cobject_sources(#11420, 0) +py_cobjectnames(#11420, "__delete__") +py_cmembers_versioned(#11415, "__delete__", #11420, "2") +py_cobjectnames(#11415, "format") +py_cmembers_versioned(#11400, "format", #11415, "2") +#11421 = @"C_type$memoryview$2itemsize" +py_cobjects(#11421) +py_cobjecttypes(#11421, #10003) +py_cobject_sources(#11421, 0) +#11422 = @"C_type$memoryview$2itemsize$2__set__" +py_cobjects(#11422) +py_cobjecttypes(#11422, #10009) +py_cobject_sources(#11422, 0) +py_cobjectnames(#11422, "__set__") +py_cmembers_versioned(#11421, "__set__", #11422, "2") +#11423 = @"C_type$memoryview$2itemsize$2__getattribute__" +py_cobjects(#11423) +py_cobjecttypes(#11423, #10009) +py_cobject_sources(#11423, 0) +py_cobjectnames(#11423, "__getattribute__") +py_cmembers_versioned(#11421, "__getattribute__", #11423, "2") +py_cmembers_versioned(#11421, "__objclass__", #11400, "2") +#11424 = @"C_type$memoryview$2itemsize$2__repr__" +py_cobjects(#11424) +py_cobjecttypes(#11424, #10009) +py_cobject_sources(#11424, 0) +py_cobjectnames(#11424, "__repr__") +py_cmembers_versioned(#11421, "__repr__", #11424, "2") +#11425 = @"C_type$memoryview$2itemsize$2__get__" +py_cobjects(#11425) +py_cobjecttypes(#11425, #10009) +py_cobject_sources(#11425, 0) +py_cobjectnames(#11425, "__get__") +py_cmembers_versioned(#11421, "__get__", #11425, "2") +py_cmembers_versioned(#11421, "__doc__", #10017, "2") +#11426 = @"C_type$memoryview$2itemsize$2__delete__" +py_cobjects(#11426) +py_cobjecttypes(#11426, #10009) +py_cobject_sources(#11426, 0) +py_cobjectnames(#11426, "__delete__") +py_cmembers_versioned(#11421, "__delete__", #11426, "2") +py_cobjectnames(#11421, "itemsize") +py_cmembers_versioned(#11400, "itemsize", #11421, "2") +#11427 = @"C_type$memoryview$2ndim" +py_cobjects(#11427) +py_cobjecttypes(#11427, #10003) +py_cobject_sources(#11427, 0) +#11428 = @"C_type$memoryview$2ndim$2__set__" +py_cobjects(#11428) +py_cobjecttypes(#11428, #10009) +py_cobject_sources(#11428, 0) +py_cobjectnames(#11428, "__set__") +py_cmembers_versioned(#11427, "__set__", #11428, "2") +#11429 = @"C_type$memoryview$2ndim$2__getattribute__" +py_cobjects(#11429) +py_cobjecttypes(#11429, #10009) +py_cobject_sources(#11429, 0) +py_cobjectnames(#11429, "__getattribute__") +py_cmembers_versioned(#11427, "__getattribute__", #11429, "2") +py_cmembers_versioned(#11427, "__objclass__", #11400, "2") +#11430 = @"C_type$memoryview$2ndim$2__repr__" +py_cobjects(#11430) +py_cobjecttypes(#11430, #10009) +py_cobject_sources(#11430, 0) +py_cobjectnames(#11430, "__repr__") +py_cmembers_versioned(#11427, "__repr__", #11430, "2") +#11431 = @"C_type$memoryview$2ndim$2__get__" +py_cobjects(#11431) +py_cobjecttypes(#11431, #10009) +py_cobject_sources(#11431, 0) +py_cobjectnames(#11431, "__get__") +py_cmembers_versioned(#11427, "__get__", #11431, "2") +py_cmembers_versioned(#11427, "__doc__", #10017, "2") +#11432 = @"C_type$memoryview$2ndim$2__delete__" +py_cobjects(#11432) +py_cobjecttypes(#11432, #10009) +py_cobject_sources(#11432, 0) +py_cobjectnames(#11432, "__delete__") +py_cmembers_versioned(#11427, "__delete__", #11432, "2") +py_cobjectnames(#11427, "ndim") +py_cmembers_versioned(#11400, "ndim", #11427, "2") +#11433 = @"C_type$memoryview$2readonly" +py_cobjects(#11433) +py_cobjecttypes(#11433, #10003) +py_cobject_sources(#11433, 0) +#11434 = @"C_type$memoryview$2readonly$2__set__" +py_cobjects(#11434) +py_cobjecttypes(#11434, #10009) +py_cobject_sources(#11434, 0) +py_cobjectnames(#11434, "__set__") +py_cmembers_versioned(#11433, "__set__", #11434, "2") +#11435 = @"C_type$memoryview$2readonly$2__getattribute__" +py_cobjects(#11435) +py_cobjecttypes(#11435, #10009) +py_cobject_sources(#11435, 0) +py_cobjectnames(#11435, "__getattribute__") +py_cmembers_versioned(#11433, "__getattribute__", #11435, "2") +py_cmembers_versioned(#11433, "__objclass__", #11400, "2") +#11436 = @"C_type$memoryview$2readonly$2__repr__" +py_cobjects(#11436) +py_cobjecttypes(#11436, #10009) +py_cobject_sources(#11436, 0) +py_cobjectnames(#11436, "__repr__") +py_cmembers_versioned(#11433, "__repr__", #11436, "2") +#11437 = @"C_type$memoryview$2readonly$2__get__" +py_cobjects(#11437) +py_cobjecttypes(#11437, #10009) +py_cobject_sources(#11437, 0) +py_cobjectnames(#11437, "__get__") +py_cmembers_versioned(#11433, "__get__", #11437, "2") +py_cmembers_versioned(#11433, "__doc__", #10017, "2") +#11438 = @"C_type$memoryview$2readonly$2__delete__" +py_cobjects(#11438) +py_cobjecttypes(#11438, #10009) +py_cobject_sources(#11438, 0) +py_cobjectnames(#11438, "__delete__") +py_cmembers_versioned(#11433, "__delete__", #11438, "2") +py_cobjectnames(#11433, "readonly") +py_cmembers_versioned(#11400, "readonly", #11433, "2") +#11439 = @"C_type$memoryview$2shape" +py_cobjects(#11439) +py_cobjecttypes(#11439, #10003) +py_cobject_sources(#11439, 0) +#11440 = @"C_type$memoryview$2shape$2__set__" +py_cobjects(#11440) +py_cobjecttypes(#11440, #10009) +py_cobject_sources(#11440, 0) +py_cobjectnames(#11440, "__set__") +py_cmembers_versioned(#11439, "__set__", #11440, "2") +#11441 = @"C_type$memoryview$2shape$2__getattribute__" +py_cobjects(#11441) +py_cobjecttypes(#11441, #10009) +py_cobject_sources(#11441, 0) +py_cobjectnames(#11441, "__getattribute__") +py_cmembers_versioned(#11439, "__getattribute__", #11441, "2") +py_cmembers_versioned(#11439, "__objclass__", #11400, "2") +#11442 = @"C_type$memoryview$2shape$2__repr__" +py_cobjects(#11442) +py_cobjecttypes(#11442, #10009) +py_cobject_sources(#11442, 0) +py_cobjectnames(#11442, "__repr__") +py_cmembers_versioned(#11439, "__repr__", #11442, "2") +#11443 = @"C_type$memoryview$2shape$2__get__" +py_cobjects(#11443) +py_cobjecttypes(#11443, #10009) +py_cobject_sources(#11443, 0) +py_cobjectnames(#11443, "__get__") +py_cmembers_versioned(#11439, "__get__", #11443, "2") +py_cmembers_versioned(#11439, "__doc__", #10017, "2") +#11444 = @"C_type$memoryview$2shape$2__delete__" +py_cobjects(#11444) +py_cobjecttypes(#11444, #10009) +py_cobject_sources(#11444, 0) +py_cobjectnames(#11444, "__delete__") +py_cmembers_versioned(#11439, "__delete__", #11444, "2") +py_cobjectnames(#11439, "shape") +py_cmembers_versioned(#11400, "shape", #11439, "2") +#11445 = @"C_type$memoryview$2strides" +py_cobjects(#11445) +py_cobjecttypes(#11445, #10003) +py_cobject_sources(#11445, 0) +#11446 = @"C_type$memoryview$2strides$2__set__" +py_cobjects(#11446) +py_cobjecttypes(#11446, #10009) +py_cobject_sources(#11446, 0) +py_cobjectnames(#11446, "__set__") +py_cmembers_versioned(#11445, "__set__", #11446, "2") +#11447 = @"C_type$memoryview$2strides$2__getattribute__" +py_cobjects(#11447) +py_cobjecttypes(#11447, #10009) +py_cobject_sources(#11447, 0) +py_cobjectnames(#11447, "__getattribute__") +py_cmembers_versioned(#11445, "__getattribute__", #11447, "2") +py_cmembers_versioned(#11445, "__objclass__", #11400, "2") +#11448 = @"C_type$memoryview$2strides$2__repr__" +py_cobjects(#11448) +py_cobjecttypes(#11448, #10009) +py_cobject_sources(#11448, 0) +py_cobjectnames(#11448, "__repr__") +py_cmembers_versioned(#11445, "__repr__", #11448, "2") +#11449 = @"C_type$memoryview$2strides$2__get__" +py_cobjects(#11449) +py_cobjecttypes(#11449, #10009) +py_cobject_sources(#11449, 0) +py_cobjectnames(#11449, "__get__") +py_cmembers_versioned(#11445, "__get__", #11449, "2") +py_cmembers_versioned(#11445, "__doc__", #10017, "2") +#11450 = @"C_type$memoryview$2strides$2__delete__" +py_cobjects(#11450) +py_cobjecttypes(#11450, #10009) +py_cobject_sources(#11450, 0) +py_cobjectnames(#11450, "__delete__") +py_cmembers_versioned(#11445, "__delete__", #11450, "2") +py_cobjectnames(#11445, "strides") +py_cmembers_versioned(#11400, "strides", #11445, "2") +#11451 = @"C_type$memoryview$2suboffsets" +py_cobjects(#11451) +py_cobjecttypes(#11451, #10003) +py_cobject_sources(#11451, 0) +#11452 = @"C_type$memoryview$2suboffsets$2__set__" +py_cobjects(#11452) +py_cobjecttypes(#11452, #10009) +py_cobject_sources(#11452, 0) +py_cobjectnames(#11452, "__set__") +py_cmembers_versioned(#11451, "__set__", #11452, "2") +#11453 = @"C_type$memoryview$2suboffsets$2__getattribute__" +py_cobjects(#11453) +py_cobjecttypes(#11453, #10009) +py_cobject_sources(#11453, 0) +py_cobjectnames(#11453, "__getattribute__") +py_cmembers_versioned(#11451, "__getattribute__", #11453, "2") +py_cmembers_versioned(#11451, "__objclass__", #11400, "2") +#11454 = @"C_type$memoryview$2suboffsets$2__repr__" +py_cobjects(#11454) +py_cobjecttypes(#11454, #10009) +py_cobject_sources(#11454, 0) +py_cobjectnames(#11454, "__repr__") +py_cmembers_versioned(#11451, "__repr__", #11454, "2") +#11455 = @"C_type$memoryview$2suboffsets$2__get__" +py_cobjects(#11455) +py_cobjecttypes(#11455, #10009) +py_cobject_sources(#11455, 0) +py_cobjectnames(#11455, "__get__") +py_cmembers_versioned(#11451, "__get__", #11455, "2") +py_cmembers_versioned(#11451, "__doc__", #10017, "2") +#11456 = @"C_type$memoryview$2suboffsets$2__delete__" +py_cobjects(#11456) +py_cobjecttypes(#11456, #10009) +py_cobject_sources(#11456, 0) +py_cobjectnames(#11456, "__delete__") +py_cmembers_versioned(#11451, "__delete__", #11456, "2") +py_cobjectnames(#11451, "suboffsets") +py_cmembers_versioned(#11400, "suboffsets", #11451, "2") +#11457 = @"C_type$memoryview$2tobytes" +py_cobjects(#11457) +py_cobjecttypes(#11457, #10034) +py_cobject_sources(#11457, 0) +py_cobjectnames(#11457, "tobytes") +py_cmembers_versioned(#11400, "tobytes", #11457, "2") +#11458 = @"C_type$memoryview$2tolist" +py_cobjects(#11458) +py_cobjecttypes(#11458, #10034) +py_cobject_sources(#11458, 0) +py_cobjectnames(#11458, "tolist") +py_cmembers_versioned(#11400, "tolist", #11458, "2") +py_cmembers_versioned(#11400, ".super.", #10021, "2") +py_cobjectnames(#11400, "memoryview") +py_cmembers_versioned(#10760, "memoryview", #11400, "2") +#11459 = @"C_builtin_function_or_method$builtins.min" +py_cobjects(#11459) +py_cobjecttypes(#11459, #10075) +py_cobject_sources(#11459, 0) +py_cobjectnames(#11459, "min") +py_cmembers_versioned(#10760, "min", #11459, "2") +#11460 = @"C_builtin_function_or_method$builtins.next" +py_cobjects(#11460) +py_cobjecttypes(#11460, #10075) +py_cobject_sources(#11460, 0) +py_cobjectnames(#11460, "next") +py_cmembers_versioned(#10760, "next", #11460, "2") +py_cmembers_versioned(#10760, "object", #10021, "2") +#11461 = @"C_builtin_function_or_method$builtins.oct" +py_cobjects(#11461) +py_cobjecttypes(#11461, #10075) +py_cobject_sources(#11461, 0) +py_cobjectnames(#11461, "oct") +py_cmembers_versioned(#10760, "oct", #11461, "2") +#11462 = @"C_builtin_function_or_method$builtins.open" +py_cobjects(#11462) +py_cobjecttypes(#11462, #10075) +py_cobject_sources(#11462, 0) +py_cobjectnames(#11462, "open") +py_cmembers_versioned(#10760, "open", #11462, "2") +#11463 = @"C_builtin_function_or_method$builtins.ord" +py_cobjects(#11463) +py_cobjecttypes(#11463, #10075) +py_cobject_sources(#11463, 0) +py_cobjectnames(#11463, "ord") +py_cmembers_versioned(#10760, "ord", #11463, "2") +#11464 = @"C_builtin_function_or_method$builtins.pow" +py_cobjects(#11464) +py_cobjecttypes(#11464, #10075) +py_cobject_sources(#11464, 0) +py_cobjectnames(#11464, "pow") +py_cmembers_versioned(#10760, "pow", #11464, "2") +#11465 = @"C_builtin_function_or_method$builtins.print" +py_cobjects(#11465) +py_cobjecttypes(#11465, #10075) +py_cobject_sources(#11465, 0) +py_cobjectnames(#11465, "print") +py_cmembers_versioned(#10760, "print", #11465, "2") +#11466 = @"C_type$property" +py_cobjects(#11466) +py_cobjecttypes(#11466, #10001) +py_cobject_sources(#11466, 0) +#11467 = @"C_type$property$2__delete__" +py_cobjects(#11467) +py_cobjecttypes(#11467, #10005) +py_cobject_sources(#11467, 0) +py_cobjectnames(#11467, "__delete__") +py_cmembers_versioned(#11466, "__delete__", #11467, "2") +#11468 = @"C_type$property$2__doc__" +py_cobjects(#11468) +py_cobjecttypes(#11468, #10045) +py_cobject_sources(#11468, 0) +py_cobjectnames(#11468, "__doc__") +py_cmembers_versioned(#11466, "__doc__", #11468, "2") +#11469 = @"C_type$property$2__get__" +py_cobjects(#11469) +py_cobjecttypes(#11469, #10005) +py_cobject_sources(#11469, 0) +py_cobjectnames(#11469, "__get__") +py_cmembers_versioned(#11466, "__get__", #11469, "2") +#11470 = @"C_type$property$2__getattribute__" +py_cobjects(#11470) +py_cobjecttypes(#11470, #10005) +py_cobject_sources(#11470, 0) +py_cobjectnames(#11470, "__getattribute__") +py_cmembers_versioned(#11466, "__getattribute__", #11470, "2") +#11471 = @"C_type$property$2__init__" +py_cobjects(#11471) +py_cobjecttypes(#11471, #10005) +py_cobject_sources(#11471, 0) +py_cobjectnames(#11471, "__init__") +py_cmembers_versioned(#11466, "__init__", #11471, "2") +#11472 = @"C_type$property$2__new__" +py_cobjects(#11472) +py_cobjecttypes(#11472, #10075) +py_cobject_sources(#11472, 0) +py_cobjectnames(#11472, "__new__") +py_cmembers_versioned(#11466, "__new__", #11472, "2") +#11473 = @"C_type$property$2__set__" +py_cobjects(#11473) +py_cobjecttypes(#11473, #10005) +py_cobject_sources(#11473, 0) +py_cobjectnames(#11473, "__set__") +py_cmembers_versioned(#11466, "__set__", #11473, "2") +#11474 = @"C_type$property$2deleter" +py_cobjects(#11474) +py_cobjecttypes(#11474, #10034) +py_cobject_sources(#11474, 0) +py_cobjectnames(#11474, "deleter") +py_cmembers_versioned(#11466, "deleter", #11474, "2") +#11475 = @"C_type$property$2fdel" +py_cobjects(#11475) +py_cobjecttypes(#11475, #10045) +py_cobject_sources(#11475, 0) +py_cobjectnames(#11475, "fdel") +py_cmembers_versioned(#11466, "fdel", #11475, "2") +#11476 = @"C_type$property$2fget" +py_cobjects(#11476) +py_cobjecttypes(#11476, #10045) +py_cobject_sources(#11476, 0) +py_cobjectnames(#11476, "fget") +py_cmembers_versioned(#11466, "fget", #11476, "2") +#11477 = @"C_type$property$2fset" +py_cobjects(#11477) +py_cobjecttypes(#11477, #10045) +py_cobject_sources(#11477, 0) +py_cobjectnames(#11477, "fset") +py_cmembers_versioned(#11466, "fset", #11477, "2") +#11478 = @"C_type$property$2getter" +py_cobjects(#11478) +py_cobjecttypes(#11478, #10034) +py_cobject_sources(#11478, 0) +py_cobjectnames(#11478, "getter") +py_cmembers_versioned(#11466, "getter", #11478, "2") +#11479 = @"C_type$property$2setter" +py_cobjects(#11479) +py_cobjecttypes(#11479, #10034) +py_cobject_sources(#11479, 0) +py_cobjectnames(#11479, "setter") +py_cmembers_versioned(#11466, "setter", #11479, "2") +py_cmembers_versioned(#11466, ".super.", #10021, "2") +py_cobjectnames(#11466, "property") +py_cmembers_versioned(#10760, "property", #11466, "2") +#11480 = @"C_module$__builtin__$2quit" +py_cobjects(#11480) +py_cobjecttypes(#11480, #11161) +py_cobject_sources(#11480, 0) +py_cobjectnames(#11480, "object") +py_cmembers_versioned(#10760, "quit", #11480, "2") +#11481 = @"C_builtin_function_or_method$builtins.range" +py_cobjects(#11481) +py_cobjecttypes(#11481, #10075) +py_cobject_sources(#11481, 0) +py_cobjectnames(#11481, "range") +py_cmembers_versioned(#10760, "range", #11481, "2") +#11482 = @"C_builtin_function_or_method$builtins.raw_input" +py_cobjects(#11482) +py_cobjecttypes(#11482, #10075) +py_cobject_sources(#11482, 0) +py_cobjectnames(#11482, "raw_input") +py_cmembers_versioned(#10760, "raw_input", #11482, "2") +#11483 = @"C_builtin_function_or_method$builtins.reduce" +py_cobjects(#11483) +py_cobjecttypes(#11483, #10075) +py_cobject_sources(#11483, 0) +py_cobjectnames(#11483, "reduce") +py_cmembers_versioned(#10760, "reduce", #11483, "2") +#11484 = @"C_builtin_function_or_method$builtins.reload" +py_cobjects(#11484) +py_cobjecttypes(#11484, #10075) +py_cobject_sources(#11484, 0) +py_cobjectnames(#11484, "reload") +py_cmembers_versioned(#10760, "reload", #11484, "2") +#11485 = @"C_builtin_function_or_method$builtins.repr" +py_cobjects(#11485) +py_cobjecttypes(#11485, #10075) +py_cobject_sources(#11485, 0) +py_cobjectnames(#11485, "repr") +py_cmembers_versioned(#10760, "repr", #11485, "2") +#11486 = @"C_type$reversed" +py_cobjects(#11486) +py_cobjecttypes(#11486, #10001) +py_cobject_sources(#11486, 0) +#11487 = @"C_bytes$6da37b9b1c31af888f1f9f59964dfc588ba6792d" +py_cobjects(#11487) +py_cobjecttypes(#11487, #10028) +py_cobject_sources(#11487, 0) +py_cobjectnames(#11487, "b'reversed(sequence) -> reverse iterator over values of the sequence + +Return a reverse iterator'") +py_cmembers_versioned(#11486, "__doc__", #11487, "2") +#11488 = @"C_type$reversed$2__getattribute__" +py_cobjects(#11488) +py_cobjecttypes(#11488, #10005) +py_cobject_sources(#11488, 0) +py_cobjectnames(#11488, "__getattribute__") +py_cmembers_versioned(#11486, "__getattribute__", #11488, "2") +#11489 = @"C_type$reversed$2__iter__" +py_cobjects(#11489) +py_cobjecttypes(#11489, #10005) +py_cobject_sources(#11489, 0) +py_cobjectnames(#11489, "__iter__") +py_cmembers_versioned(#11486, "__iter__", #11489, "2") +#11490 = @"C_type$reversed$2__length_hint__" +py_cobjects(#11490) +py_cobjecttypes(#11490, #10034) +py_cobject_sources(#11490, 0) +py_cobjectnames(#11490, "__length_hint__") +py_cmembers_versioned(#11486, "__length_hint__", #11490, "2") +#11491 = @"C_type$reversed$2__new__" +py_cobjects(#11491) +py_cobjecttypes(#11491, #10075) +py_cobject_sources(#11491, 0) +py_cobjectnames(#11491, "__new__") +py_cmembers_versioned(#11486, "__new__", #11491, "2") +#11492 = @"C_type$reversed$2next" +py_cobjects(#11492) +py_cobjecttypes(#11492, #10005) +py_cobject_sources(#11492, 0) +py_cobjectnames(#11492, "next") +py_cmembers_versioned(#11486, "next", #11492, "2") +py_cmembers_versioned(#11486, ".super.", #10021, "2") +py_cobjectnames(#11486, "reversed") +py_cmembers_versioned(#10760, "reversed", #11486, "2") +#11493 = @"C_builtin_function_or_method$builtins.round" +py_cobjects(#11493) +py_cobjecttypes(#11493, #10075) +py_cobject_sources(#11493, 0) +py_cobjectnames(#11493, "round") +py_cmembers_versioned(#10760, "round", #11493, "2") +#11494 = @"C_type$set" +py_cobjects(#11494) +py_cobjecttypes(#11494, #10001) +py_cobject_sources(#11494, 0) +#11495 = @"C_type$set$2__and__" +py_cobjects(#11495) +py_cobjecttypes(#11495, #10005) +py_cobject_sources(#11495, 0) +py_cobjectnames(#11495, "__and__") +py_cmembers_versioned(#11494, "__and__", #11495, "2") +#11496 = @"C_type$set$2__cmp__" +py_cobjects(#11496) +py_cobjecttypes(#11496, #10005) +py_cobject_sources(#11496, 0) +py_cobjectnames(#11496, "__cmp__") +py_cmembers_versioned(#11494, "__cmp__", #11496, "2") +#11497 = @"C_type$set$2__contains__" +py_cobjects(#11497) +py_cobjecttypes(#11497, #10034) +py_cobject_sources(#11497, 0) +py_cobjectnames(#11497, "__contains__") +py_cmembers_versioned(#11494, "__contains__", #11497, "2") +#11498 = @"C_bytes$a7ef6bafd940a4f5b51773728e9aeb96cfb181c2" +py_cobjects(#11498) +py_cobjecttypes(#11498, #10028) +py_cobject_sources(#11498, 0) +py_cobjectnames(#11498, "b'set() -> new empty set object +set(iterable) -> new set object + +Build an unordered collection of unique elements.'") +py_cmembers_versioned(#11494, "__doc__", #11498, "2") +#11499 = @"C_type$set$2__eq__" +py_cobjects(#11499) +py_cobjecttypes(#11499, #10005) +py_cobject_sources(#11499, 0) +py_cobjectnames(#11499, "__eq__") +py_cmembers_versioned(#11494, "__eq__", #11499, "2") +#11500 = @"C_type$set$2__ge__" +py_cobjects(#11500) +py_cobjecttypes(#11500, #10005) +py_cobject_sources(#11500, 0) +py_cobjectnames(#11500, "__ge__") +py_cmembers_versioned(#11494, "__ge__", #11500, "2") +#11501 = @"C_type$set$2__getattribute__" +py_cobjects(#11501) +py_cobjecttypes(#11501, #10005) +py_cobject_sources(#11501, 0) +py_cobjectnames(#11501, "__getattribute__") +py_cmembers_versioned(#11494, "__getattribute__", #11501, "2") +#11502 = @"C_type$set$2__gt__" +py_cobjects(#11502) +py_cobjecttypes(#11502, #10005) +py_cobject_sources(#11502, 0) +py_cobjectnames(#11502, "__gt__") +py_cmembers_versioned(#11494, "__gt__", #11502, "2") +py_cmembers_versioned(#11494, "__hash__", #10017, "2") +#11503 = @"C_type$set$2__iand__" +py_cobjects(#11503) +py_cobjecttypes(#11503, #10005) +py_cobject_sources(#11503, 0) +py_cobjectnames(#11503, "__iand__") +py_cmembers_versioned(#11494, "__iand__", #11503, "2") +#11504 = @"C_type$set$2__init__" +py_cobjects(#11504) +py_cobjecttypes(#11504, #10005) +py_cobject_sources(#11504, 0) +py_cobjectnames(#11504, "__init__") +py_cmembers_versioned(#11494, "__init__", #11504, "2") +#11505 = @"C_type$set$2__ior__" +py_cobjects(#11505) +py_cobjecttypes(#11505, #10005) +py_cobject_sources(#11505, 0) +py_cobjectnames(#11505, "__ior__") +py_cmembers_versioned(#11494, "__ior__", #11505, "2") +#11506 = @"C_type$set$2__isub__" +py_cobjects(#11506) +py_cobjecttypes(#11506, #10005) +py_cobject_sources(#11506, 0) +py_cobjectnames(#11506, "__isub__") +py_cmembers_versioned(#11494, "__isub__", #11506, "2") +#11507 = @"C_type$set$2__iter__" +py_cobjects(#11507) +py_cobjecttypes(#11507, #10005) +py_cobject_sources(#11507, 0) +py_cobjectnames(#11507, "__iter__") +py_cmembers_versioned(#11494, "__iter__", #11507, "2") +#11508 = @"C_type$set$2__ixor__" +py_cobjects(#11508) +py_cobjecttypes(#11508, #10005) +py_cobject_sources(#11508, 0) +py_cobjectnames(#11508, "__ixor__") +py_cmembers_versioned(#11494, "__ixor__", #11508, "2") +#11509 = @"C_type$set$2__le__" +py_cobjects(#11509) +py_cobjecttypes(#11509, #10005) +py_cobject_sources(#11509, 0) +py_cobjectnames(#11509, "__le__") +py_cmembers_versioned(#11494, "__le__", #11509, "2") +#11510 = @"C_type$set$2__len__" +py_cobjects(#11510) +py_cobjecttypes(#11510, #10005) +py_cobject_sources(#11510, 0) +py_cobjectnames(#11510, "__len__") +py_cmembers_versioned(#11494, "__len__", #11510, "2") +#11511 = @"C_type$set$2__lt__" +py_cobjects(#11511) +py_cobjecttypes(#11511, #10005) +py_cobject_sources(#11511, 0) +py_cobjectnames(#11511, "__lt__") +py_cmembers_versioned(#11494, "__lt__", #11511, "2") +#11512 = @"C_type$set$2__ne__" +py_cobjects(#11512) +py_cobjecttypes(#11512, #10005) +py_cobject_sources(#11512, 0) +py_cobjectnames(#11512, "__ne__") +py_cmembers_versioned(#11494, "__ne__", #11512, "2") +#11513 = @"C_type$set$2__new__" +py_cobjects(#11513) +py_cobjecttypes(#11513, #10075) +py_cobject_sources(#11513, 0) +py_cobjectnames(#11513, "__new__") +py_cmembers_versioned(#11494, "__new__", #11513, "2") +#11514 = @"C_type$set$2__or__" +py_cobjects(#11514) +py_cobjecttypes(#11514, #10005) +py_cobject_sources(#11514, 0) +py_cobjectnames(#11514, "__or__") +py_cmembers_versioned(#11494, "__or__", #11514, "2") +#11515 = @"C_type$set$2__rand__" +py_cobjects(#11515) +py_cobjecttypes(#11515, #10005) +py_cobject_sources(#11515, 0) +py_cobjectnames(#11515, "__rand__") +py_cmembers_versioned(#11494, "__rand__", #11515, "2") +#11516 = @"C_type$set$2__reduce__" +py_cobjects(#11516) +py_cobjecttypes(#11516, #10034) +py_cobject_sources(#11516, 0) +py_cobjectnames(#11516, "__reduce__") +py_cmembers_versioned(#11494, "__reduce__", #11516, "2") +#11517 = @"C_type$set$2__repr__" +py_cobjects(#11517) +py_cobjecttypes(#11517, #10005) +py_cobject_sources(#11517, 0) +py_cobjectnames(#11517, "__repr__") +py_cmembers_versioned(#11494, "__repr__", #11517, "2") +#11518 = @"C_type$set$2__ror__" +py_cobjects(#11518) +py_cobjecttypes(#11518, #10005) +py_cobject_sources(#11518, 0) +py_cobjectnames(#11518, "__ror__") +py_cmembers_versioned(#11494, "__ror__", #11518, "2") +#11519 = @"C_type$set$2__rsub__" +py_cobjects(#11519) +py_cobjecttypes(#11519, #10005) +py_cobject_sources(#11519, 0) +py_cobjectnames(#11519, "__rsub__") +py_cmembers_versioned(#11494, "__rsub__", #11519, "2") +#11520 = @"C_type$set$2__rxor__" +py_cobjects(#11520) +py_cobjecttypes(#11520, #10005) +py_cobject_sources(#11520, 0) +py_cobjectnames(#11520, "__rxor__") +py_cmembers_versioned(#11494, "__rxor__", #11520, "2") +#11521 = @"C_type$set$2__sizeof__" +py_cobjects(#11521) +py_cobjecttypes(#11521, #10034) +py_cobject_sources(#11521, 0) +py_cobjectnames(#11521, "__sizeof__") +py_cmembers_versioned(#11494, "__sizeof__", #11521, "2") +#11522 = @"C_type$set$2__sub__" +py_cobjects(#11522) +py_cobjecttypes(#11522, #10005) +py_cobject_sources(#11522, 0) +py_cobjectnames(#11522, "__sub__") +py_cmembers_versioned(#11494, "__sub__", #11522, "2") +#11523 = @"C_type$set$2__xor__" +py_cobjects(#11523) +py_cobjecttypes(#11523, #10005) +py_cobject_sources(#11523, 0) +py_cobjectnames(#11523, "__xor__") +py_cmembers_versioned(#11494, "__xor__", #11523, "2") +#11524 = @"C_type$set$2add" +py_cobjects(#11524) +py_cobjecttypes(#11524, #10034) +py_cobject_sources(#11524, 0) +py_cobjectnames(#11524, "add") +py_cmembers_versioned(#11494, "add", #11524, "2") +#11525 = @"C_type$set$2clear" +py_cobjects(#11525) +py_cobjecttypes(#11525, #10034) +py_cobject_sources(#11525, 0) +py_cobjectnames(#11525, "clear") +py_cmembers_versioned(#11494, "clear", #11525, "2") +#11526 = @"C_type$set$2copy" +py_cobjects(#11526) +py_cobjecttypes(#11526, #10034) +py_cobject_sources(#11526, 0) +py_cobjectnames(#11526, "copy") +py_cmembers_versioned(#11494, "copy", #11526, "2") +#11527 = @"C_type$set$2difference" +py_cobjects(#11527) +py_cobjecttypes(#11527, #10034) +py_cobject_sources(#11527, 0) +py_cobjectnames(#11527, "difference") +py_cmembers_versioned(#11494, "difference", #11527, "2") +#11528 = @"C_type$set$2difference_update" +py_cobjects(#11528) +py_cobjecttypes(#11528, #10034) +py_cobject_sources(#11528, 0) +py_cobjectnames(#11528, "difference_update") +py_cmembers_versioned(#11494, "difference_update", #11528, "2") +#11529 = @"C_type$set$2discard" +py_cobjects(#11529) +py_cobjecttypes(#11529, #10034) +py_cobject_sources(#11529, 0) +py_cobjectnames(#11529, "discard") +py_cmembers_versioned(#11494, "discard", #11529, "2") +#11530 = @"C_type$set$2intersection" +py_cobjects(#11530) +py_cobjecttypes(#11530, #10034) +py_cobject_sources(#11530, 0) +py_cobjectnames(#11530, "intersection") +py_cmembers_versioned(#11494, "intersection", #11530, "2") +#11531 = @"C_type$set$2intersection_update" +py_cobjects(#11531) +py_cobjecttypes(#11531, #10034) +py_cobject_sources(#11531, 0) +py_cobjectnames(#11531, "intersection_update") +py_cmembers_versioned(#11494, "intersection_update", #11531, "2") +#11532 = @"C_type$set$2isdisjoint" +py_cobjects(#11532) +py_cobjecttypes(#11532, #10034) +py_cobject_sources(#11532, 0) +py_cobjectnames(#11532, "isdisjoint") +py_cmembers_versioned(#11494, "isdisjoint", #11532, "2") +#11533 = @"C_type$set$2issubset" +py_cobjects(#11533) +py_cobjecttypes(#11533, #10034) +py_cobject_sources(#11533, 0) +py_cobjectnames(#11533, "issubset") +py_cmembers_versioned(#11494, "issubset", #11533, "2") +#11534 = @"C_type$set$2issuperset" +py_cobjects(#11534) +py_cobjecttypes(#11534, #10034) +py_cobject_sources(#11534, 0) +py_cobjectnames(#11534, "issuperset") +py_cmembers_versioned(#11494, "issuperset", #11534, "2") +#11535 = @"C_type$set$2pop" +py_cobjects(#11535) +py_cobjecttypes(#11535, #10034) +py_cobject_sources(#11535, 0) +py_cobjectnames(#11535, "pop") +py_cmembers_versioned(#11494, "pop", #11535, "2") +#11536 = @"C_type$set$2remove" +py_cobjects(#11536) +py_cobjecttypes(#11536, #10034) +py_cobject_sources(#11536, 0) +py_cobjectnames(#11536, "remove") +py_cmembers_versioned(#11494, "remove", #11536, "2") +#11537 = @"C_type$set$2symmetric_difference" +py_cobjects(#11537) +py_cobjecttypes(#11537, #10034) +py_cobject_sources(#11537, 0) +py_cobjectnames(#11537, "symmetric_difference") +py_cmembers_versioned(#11494, "symmetric_difference", #11537, "2") +#11538 = @"C_type$set$2symmetric_difference_update" +py_cobjects(#11538) +py_cobjecttypes(#11538, #10034) +py_cobject_sources(#11538, 0) +py_cobjectnames(#11538, "symmetric_difference_update") +py_cmembers_versioned(#11494, "symmetric_difference_update", #11538, "2") +#11539 = @"C_type$set$2union" +py_cobjects(#11539) +py_cobjecttypes(#11539, #10034) +py_cobject_sources(#11539, 0) +py_cobjectnames(#11539, "union") +py_cmembers_versioned(#11494, "union", #11539, "2") +#11540 = @"C_type$set$2update" +py_cobjects(#11540) +py_cobjecttypes(#11540, #10034) +py_cobject_sources(#11540, 0) +py_cobjectnames(#11540, "update") +py_cmembers_versioned(#11494, "update", #11540, "2") +py_cmembers_versioned(#11494, ".super.", #10021, "2") +py_cobjectnames(#11494, "set") +py_cmembers_versioned(#10760, "set", #11494, "2") +#11541 = @"C_builtin_function_or_method$builtins.setattr" +py_cobjects(#11541) +py_cobjecttypes(#11541, #10075) +py_cobject_sources(#11541, 0) +py_cobjectnames(#11541, "setattr") +py_cmembers_versioned(#10760, "setattr", #11541, "2") +#11542 = @"C_type$slice" +py_cobjects(#11542) +py_cobjecttypes(#11542, #10001) +py_cobject_sources(#11542, 0) +#11543 = @"C_type$slice$2__cmp__" +py_cobjects(#11543) +py_cobjecttypes(#11543, #10005) +py_cobject_sources(#11543, 0) +py_cobjectnames(#11543, "__cmp__") +py_cmembers_versioned(#11542, "__cmp__", #11543, "2") +#11544 = @"C_bytes$db6464eb4169e8521ac23a1e7dab248186db2769" +py_cobjects(#11544) +py_cobjecttypes(#11544, #10028) +py_cobject_sources(#11544, 0) +py_cobjectnames(#11544, "b'slice(stop) +slice(start, stop[, step]) + +Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).'") +py_cmembers_versioned(#11542, "__doc__", #11544, "2") +#11545 = @"C_type$slice$2__getattribute__" +py_cobjects(#11545) +py_cobjecttypes(#11545, #10005) +py_cobject_sources(#11545, 0) +py_cobjectnames(#11545, "__getattribute__") +py_cmembers_versioned(#11542, "__getattribute__", #11545, "2") +#11546 = @"C_type$slice$2__hash__" +py_cobjects(#11546) +py_cobjecttypes(#11546, #10005) +py_cobject_sources(#11546, 0) +py_cobjectnames(#11546, "__hash__") +py_cmembers_versioned(#11542, "__hash__", #11546, "2") +#11547 = @"C_type$slice$2__new__" +py_cobjects(#11547) +py_cobjecttypes(#11547, #10075) +py_cobject_sources(#11547, 0) +py_cobjectnames(#11547, "__new__") +py_cmembers_versioned(#11542, "__new__", #11547, "2") +#11548 = @"C_type$slice$2__reduce__" +py_cobjects(#11548) +py_cobjecttypes(#11548, #10034) +py_cobject_sources(#11548, 0) +py_cobjectnames(#11548, "__reduce__") +py_cmembers_versioned(#11542, "__reduce__", #11548, "2") +#11549 = @"C_type$slice$2__repr__" +py_cobjects(#11549) +py_cobjecttypes(#11549, #10005) +py_cobject_sources(#11549, 0) +py_cobjectnames(#11549, "__repr__") +py_cmembers_versioned(#11542, "__repr__", #11549, "2") +#11550 = @"C_type$slice$2indices" +py_cobjects(#11550) +py_cobjecttypes(#11550, #10034) +py_cobject_sources(#11550, 0) +py_cobjectnames(#11550, "indices") +py_cmembers_versioned(#11542, "indices", #11550, "2") +#11551 = @"C_type$slice$2start" +py_cobjects(#11551) +py_cobjecttypes(#11551, #10045) +py_cobject_sources(#11551, 0) +py_cobjectnames(#11551, "start") +py_cmembers_versioned(#11542, "start", #11551, "2") +#11552 = @"C_type$slice$2step" +py_cobjects(#11552) +py_cobjecttypes(#11552, #10045) +py_cobject_sources(#11552, 0) +py_cobjectnames(#11552, "step") +py_cmembers_versioned(#11542, "step", #11552, "2") +#11553 = @"C_type$slice$2stop" +py_cobjects(#11553) +py_cobjecttypes(#11553, #10045) +py_cobject_sources(#11553, 0) +py_cobjectnames(#11553, "stop") +py_cmembers_versioned(#11542, "stop", #11553, "2") +py_cmembers_versioned(#11542, ".super.", #10021, "2") +py_cobjectnames(#11542, "slice") +py_cmembers_versioned(#10760, "slice", #11542, "2") +#11554 = @"C_builtin_function_or_method$builtins.sorted" +py_cobjects(#11554) +py_cobjecttypes(#11554, #10075) +py_cobject_sources(#11554, 0) +py_cobjectnames(#11554, "sorted") +py_cmembers_versioned(#10760, "sorted", #11554, "2") +#11555 = @"C_type$staticmethod" +py_cobjects(#11555) +py_cobjecttypes(#11555, #10001) +py_cobject_sources(#11555, 0) +#11556 = @"C_bytes$47a8ab94971b2e5e792ad5a9765d65e14fe8d0d5" +py_cobjects(#11556) +py_cobjecttypes(#11556, #10028) +py_cobject_sources(#11556, 0) +py_cobjectnames(#11556, "b'staticmethod(function) -> method + +Convert a function to be a static method. + +A static method does not receive an implicit first argument. +To declare a static method, use this idiom: + + class C: + @staticmethod + def f(arg1, arg2, ...): + ... + +It can be called either on the class (e.g. C.f()) or on an instance +(e.g. C().f()). The instance is ignored except for its class. + +Static methods in Python are similar to those found in Java or C++. +For a more advanced concept, see the classmethod builtin.'") +py_cmembers_versioned(#11555, "__doc__", #11556, "2") +#11557 = @"C_type$staticmethod$2__func__" +py_cobjects(#11557) +py_cobjecttypes(#11557, #10045) +py_cobject_sources(#11557, 0) +py_cobjectnames(#11557, "__func__") +py_cmembers_versioned(#11555, "__func__", #11557, "2") +#11558 = @"C_type$staticmethod$2__get__" +py_cobjects(#11558) +py_cobjecttypes(#11558, #10005) +py_cobject_sources(#11558, 0) +py_cobjectnames(#11558, "__get__") +py_cmembers_versioned(#11555, "__get__", #11558, "2") +#11559 = @"C_type$staticmethod$2__getattribute__" +py_cobjects(#11559) +py_cobjecttypes(#11559, #10005) +py_cobject_sources(#11559, 0) +py_cobjectnames(#11559, "__getattribute__") +py_cmembers_versioned(#11555, "__getattribute__", #11559, "2") +#11560 = @"C_type$staticmethod$2__init__" +py_cobjects(#11560) +py_cobjecttypes(#11560, #10005) +py_cobject_sources(#11560, 0) +py_cobjectnames(#11560, "__init__") +py_cmembers_versioned(#11555, "__init__", #11560, "2") +#11561 = @"C_type$staticmethod$2__new__" +py_cobjects(#11561) +py_cobjecttypes(#11561, #10075) +py_cobject_sources(#11561, 0) +py_cobjectnames(#11561, "__new__") +py_cmembers_versioned(#11555, "__new__", #11561, "2") +py_cmembers_versioned(#11555, ".super.", #10021, "2") +py_cobjectnames(#11555, "staticmethod") +py_cmembers_versioned(#10760, "staticmethod", #11555, "2") +py_cmembers_versioned(#10760, "str", #10028, "2") +#11562 = @"C_builtin_function_or_method$builtins.sum" +py_cobjects(#11562) +py_cobjecttypes(#11562, #10075) +py_cobject_sources(#11562, 0) +py_cobjectnames(#11562, "sum") +py_cmembers_versioned(#10760, "sum", #11562, "2") +py_cmembers_versioned(#10760, "super", #10727, "2") +py_cmembers_versioned(#10760, "tuple", #10737, "2") +py_cmembers_versioned(#10760, "type", #10001, "2") +#11563 = @"C_builtin_function_or_method$builtins.unichr" +py_cobjects(#11563) +py_cobjecttypes(#11563, #10075) +py_cobject_sources(#11563, 0) +py_cobjectnames(#11563, "unichr") +py_cmembers_versioned(#10760, "unichr", #11563, "2") +#11564 = @"C_type$unicode" +py_cobjects(#11564) +py_cobjecttypes(#11564, #10001) +py_cobject_sources(#11564, 0) +#11565 = @"C_type$unicode$2__add__" +py_cobjects(#11565) +py_cobjecttypes(#11565, #10005) +py_cobject_sources(#11565, 0) +py_cobjectnames(#11565, "__add__") +py_cmembers_versioned(#11564, "__add__", #11565, "2") +#11566 = @"C_type$unicode$2__contains__" +py_cobjects(#11566) +py_cobjecttypes(#11566, #10005) +py_cobject_sources(#11566, 0) +py_cobjectnames(#11566, "__contains__") +py_cmembers_versioned(#11564, "__contains__", #11566, "2") +#11567 = @"C_bytes$255b372fb10fef3a09539a5d31c8a8abafd67366" +py_cobjects(#11567) +py_cobjecttypes(#11567, #10028) +py_cobject_sources(#11567, 0) +py_cobjectnames(#11567, "b'unicode(object='') -> unicode object +unicode(string[, encoding[, errors]]) -> unicode object + +Create a new Unicode object from the given encoded string. +encoding defaults to the current default string encoding. +errors can be 'strict', 'replace' or 'ignore' and defaults to 'strict'.'") +py_cmembers_versioned(#11564, "__doc__", #11567, "2") +#11568 = @"C_type$unicode$2__eq__" +py_cobjects(#11568) +py_cobjecttypes(#11568, #10005) +py_cobject_sources(#11568, 0) +py_cobjectnames(#11568, "__eq__") +py_cmembers_versioned(#11564, "__eq__", #11568, "2") +#11569 = @"C_type$unicode$2__format__" +py_cobjects(#11569) +py_cobjecttypes(#11569, #10034) +py_cobject_sources(#11569, 0) +py_cobjectnames(#11569, "__format__") +py_cmembers_versioned(#11564, "__format__", #11569, "2") +#11570 = @"C_type$unicode$2__ge__" +py_cobjects(#11570) +py_cobjecttypes(#11570, #10005) +py_cobject_sources(#11570, 0) +py_cobjectnames(#11570, "__ge__") +py_cmembers_versioned(#11564, "__ge__", #11570, "2") +#11571 = @"C_type$unicode$2__getattribute__" +py_cobjects(#11571) +py_cobjecttypes(#11571, #10005) +py_cobject_sources(#11571, 0) +py_cobjectnames(#11571, "__getattribute__") +py_cmembers_versioned(#11564, "__getattribute__", #11571, "2") +#11572 = @"C_type$unicode$2__getitem__" +py_cobjects(#11572) +py_cobjecttypes(#11572, #10005) +py_cobject_sources(#11572, 0) +py_cobjectnames(#11572, "__getitem__") +py_cmembers_versioned(#11564, "__getitem__", #11572, "2") +#11573 = @"C_type$unicode$2__getnewargs__" +py_cobjects(#11573) +py_cobjecttypes(#11573, #10034) +py_cobject_sources(#11573, 0) +py_cobjectnames(#11573, "__getnewargs__") +py_cmembers_versioned(#11564, "__getnewargs__", #11573, "2") +#11574 = @"C_type$unicode$2__getslice__" +py_cobjects(#11574) +py_cobjecttypes(#11574, #10005) +py_cobject_sources(#11574, 0) +py_cobjectnames(#11574, "__getslice__") +py_cmembers_versioned(#11564, "__getslice__", #11574, "2") +#11575 = @"C_type$unicode$2__gt__" +py_cobjects(#11575) +py_cobjecttypes(#11575, #10005) +py_cobject_sources(#11575, 0) +py_cobjectnames(#11575, "__gt__") +py_cmembers_versioned(#11564, "__gt__", #11575, "2") +#11576 = @"C_type$unicode$2__hash__" +py_cobjects(#11576) +py_cobjecttypes(#11576, #10005) +py_cobject_sources(#11576, 0) +py_cobjectnames(#11576, "__hash__") +py_cmembers_versioned(#11564, "__hash__", #11576, "2") +#11577 = @"C_type$unicode$2__le__" +py_cobjects(#11577) +py_cobjecttypes(#11577, #10005) +py_cobject_sources(#11577, 0) +py_cobjectnames(#11577, "__le__") +py_cmembers_versioned(#11564, "__le__", #11577, "2") +#11578 = @"C_type$unicode$2__len__" +py_cobjects(#11578) +py_cobjecttypes(#11578, #10005) +py_cobject_sources(#11578, 0) +py_cobjectnames(#11578, "__len__") +py_cmembers_versioned(#11564, "__len__", #11578, "2") +#11579 = @"C_type$unicode$2__lt__" +py_cobjects(#11579) +py_cobjecttypes(#11579, #10005) +py_cobject_sources(#11579, 0) +py_cobjectnames(#11579, "__lt__") +py_cmembers_versioned(#11564, "__lt__", #11579, "2") +#11580 = @"C_type$unicode$2__mod__" +py_cobjects(#11580) +py_cobjecttypes(#11580, #10005) +py_cobject_sources(#11580, 0) +py_cobjectnames(#11580, "__mod__") +py_cmembers_versioned(#11564, "__mod__", #11580, "2") +#11581 = @"C_type$unicode$2__mul__" +py_cobjects(#11581) +py_cobjecttypes(#11581, #10005) +py_cobject_sources(#11581, 0) +py_cobjectnames(#11581, "__mul__") +py_cmembers_versioned(#11564, "__mul__", #11581, "2") +#11582 = @"C_type$unicode$2__ne__" +py_cobjects(#11582) +py_cobjecttypes(#11582, #10005) +py_cobject_sources(#11582, 0) +py_cobjectnames(#11582, "__ne__") +py_cmembers_versioned(#11564, "__ne__", #11582, "2") +#11583 = @"C_type$unicode$2__new__" +py_cobjects(#11583) +py_cobjecttypes(#11583, #10075) +py_cobject_sources(#11583, 0) +py_cobjectnames(#11583, "__new__") +py_cmembers_versioned(#11564, "__new__", #11583, "2") +#11584 = @"C_type$unicode$2__repr__" +py_cobjects(#11584) +py_cobjecttypes(#11584, #10005) +py_cobject_sources(#11584, 0) +py_cobjectnames(#11584, "__repr__") +py_cmembers_versioned(#11564, "__repr__", #11584, "2") +#11585 = @"C_type$unicode$2__rmod__" +py_cobjects(#11585) +py_cobjecttypes(#11585, #10005) +py_cobject_sources(#11585, 0) +py_cobjectnames(#11585, "__rmod__") +py_cmembers_versioned(#11564, "__rmod__", #11585, "2") +#11586 = @"C_type$unicode$2__rmul__" +py_cobjects(#11586) +py_cobjecttypes(#11586, #10005) +py_cobject_sources(#11586, 0) +py_cobjectnames(#11586, "__rmul__") +py_cmembers_versioned(#11564, "__rmul__", #11586, "2") +#11587 = @"C_type$unicode$2__sizeof__" +py_cobjects(#11587) +py_cobjecttypes(#11587, #10034) +py_cobject_sources(#11587, 0) +py_cobjectnames(#11587, "__sizeof__") +py_cmembers_versioned(#11564, "__sizeof__", #11587, "2") +#11588 = @"C_type$unicode$2__str__" +py_cobjects(#11588) +py_cobjecttypes(#11588, #10005) +py_cobject_sources(#11588, 0) +py_cobjectnames(#11588, "__str__") +py_cmembers_versioned(#11564, "__str__", #11588, "2") +#11589 = @"C_type$unicode$2_formatter_field_name_split" +py_cobjects(#11589) +py_cobjecttypes(#11589, #10034) +py_cobject_sources(#11589, 0) +py_cobjectnames(#11589, "_formatter_field_name_split") +py_cmembers_versioned(#11564, "_formatter_field_name_split", #11589, "2") +#11590 = @"C_type$unicode$2_formatter_parser" +py_cobjects(#11590) +py_cobjecttypes(#11590, #10034) +py_cobject_sources(#11590, 0) +py_cobjectnames(#11590, "_formatter_parser") +py_cmembers_versioned(#11564, "_formatter_parser", #11590, "2") +#11591 = @"C_type$unicode$2capitalize" +py_cobjects(#11591) +py_cobjecttypes(#11591, #10034) +py_cobject_sources(#11591, 0) +py_cobjectnames(#11591, "capitalize") +py_cmembers_versioned(#11564, "capitalize", #11591, "2") +#11592 = @"C_type$unicode$2center" +py_cobjects(#11592) +py_cobjecttypes(#11592, #10034) +py_cobject_sources(#11592, 0) +py_cobjectnames(#11592, "center") +py_cmembers_versioned(#11564, "center", #11592, "2") +#11593 = @"C_type$unicode$2count" +py_cobjects(#11593) +py_cobjecttypes(#11593, #10034) +py_cobject_sources(#11593, 0) +py_cobjectnames(#11593, "count") +py_cmembers_versioned(#11564, "count", #11593, "2") +#11594 = @"C_type$unicode$2decode" +py_cobjects(#11594) +py_cobjecttypes(#11594, #10034) +py_cobject_sources(#11594, 0) +py_cobjectnames(#11594, "decode") +py_cmembers_versioned(#11564, "decode", #11594, "2") +#11595 = @"C_type$unicode$2encode" +py_cobjects(#11595) +py_cobjecttypes(#11595, #10034) +py_cobject_sources(#11595, 0) +py_cobjectnames(#11595, "encode") +py_cmembers_versioned(#11564, "encode", #11595, "2") +#11596 = @"C_type$unicode$2endswith" +py_cobjects(#11596) +py_cobjecttypes(#11596, #10034) +py_cobject_sources(#11596, 0) +py_cobjectnames(#11596, "endswith") +py_cmembers_versioned(#11564, "endswith", #11596, "2") +#11597 = @"C_type$unicode$2expandtabs" +py_cobjects(#11597) +py_cobjecttypes(#11597, #10034) +py_cobject_sources(#11597, 0) +py_cobjectnames(#11597, "expandtabs") +py_cmembers_versioned(#11564, "expandtabs", #11597, "2") +#11598 = @"C_type$unicode$2find" +py_cobjects(#11598) +py_cobjecttypes(#11598, #10034) +py_cobject_sources(#11598, 0) +py_cobjectnames(#11598, "find") +py_cmembers_versioned(#11564, "find", #11598, "2") +#11599 = @"C_type$unicode$2format" +py_cobjects(#11599) +py_cobjecttypes(#11599, #10034) +py_cobject_sources(#11599, 0) +py_cobjectnames(#11599, "format") +py_cmembers_versioned(#11564, "format", #11599, "2") +#11600 = @"C_type$unicode$2index" +py_cobjects(#11600) +py_cobjecttypes(#11600, #10034) +py_cobject_sources(#11600, 0) +py_cobjectnames(#11600, "index") +py_cmembers_versioned(#11564, "index", #11600, "2") +#11601 = @"C_type$unicode$2isalnum" +py_cobjects(#11601) +py_cobjecttypes(#11601, #10034) +py_cobject_sources(#11601, 0) +py_cobjectnames(#11601, "isalnum") +py_cmembers_versioned(#11564, "isalnum", #11601, "2") +#11602 = @"C_type$unicode$2isalpha" +py_cobjects(#11602) +py_cobjecttypes(#11602, #10034) +py_cobject_sources(#11602, 0) +py_cobjectnames(#11602, "isalpha") +py_cmembers_versioned(#11564, "isalpha", #11602, "2") +#11603 = @"C_type$unicode$2isdecimal" +py_cobjects(#11603) +py_cobjecttypes(#11603, #10034) +py_cobject_sources(#11603, 0) +py_cobjectnames(#11603, "isdecimal") +py_cmembers_versioned(#11564, "isdecimal", #11603, "2") +#11604 = @"C_type$unicode$2isdigit" +py_cobjects(#11604) +py_cobjecttypes(#11604, #10034) +py_cobject_sources(#11604, 0) +py_cobjectnames(#11604, "isdigit") +py_cmembers_versioned(#11564, "isdigit", #11604, "2") +#11605 = @"C_type$unicode$2islower" +py_cobjects(#11605) +py_cobjecttypes(#11605, #10034) +py_cobject_sources(#11605, 0) +py_cobjectnames(#11605, "islower") +py_cmembers_versioned(#11564, "islower", #11605, "2") +#11606 = @"C_type$unicode$2isnumeric" +py_cobjects(#11606) +py_cobjecttypes(#11606, #10034) +py_cobject_sources(#11606, 0) +py_cobjectnames(#11606, "isnumeric") +py_cmembers_versioned(#11564, "isnumeric", #11606, "2") +#11607 = @"C_type$unicode$2isspace" +py_cobjects(#11607) +py_cobjecttypes(#11607, #10034) +py_cobject_sources(#11607, 0) +py_cobjectnames(#11607, "isspace") +py_cmembers_versioned(#11564, "isspace", #11607, "2") +#11608 = @"C_type$unicode$2istitle" +py_cobjects(#11608) +py_cobjecttypes(#11608, #10034) +py_cobject_sources(#11608, 0) +py_cobjectnames(#11608, "istitle") +py_cmembers_versioned(#11564, "istitle", #11608, "2") +#11609 = @"C_type$unicode$2isupper" +py_cobjects(#11609) +py_cobjecttypes(#11609, #10034) +py_cobject_sources(#11609, 0) +py_cobjectnames(#11609, "isupper") +py_cmembers_versioned(#11564, "isupper", #11609, "2") +#11610 = @"C_type$unicode$2join" +py_cobjects(#11610) +py_cobjecttypes(#11610, #10034) +py_cobject_sources(#11610, 0) +py_cobjectnames(#11610, "join") +py_cmembers_versioned(#11564, "join", #11610, "2") +#11611 = @"C_type$unicode$2ljust" +py_cobjects(#11611) +py_cobjecttypes(#11611, #10034) +py_cobject_sources(#11611, 0) +py_cobjectnames(#11611, "ljust") +py_cmembers_versioned(#11564, "ljust", #11611, "2") +#11612 = @"C_type$unicode$2lower" +py_cobjects(#11612) +py_cobjecttypes(#11612, #10034) +py_cobject_sources(#11612, 0) +py_cobjectnames(#11612, "lower") +py_cmembers_versioned(#11564, "lower", #11612, "2") +#11613 = @"C_type$unicode$2lstrip" +py_cobjects(#11613) +py_cobjecttypes(#11613, #10034) +py_cobject_sources(#11613, 0) +py_cobjectnames(#11613, "lstrip") +py_cmembers_versioned(#11564, "lstrip", #11613, "2") +#11614 = @"C_type$unicode$2partition" +py_cobjects(#11614) +py_cobjecttypes(#11614, #10034) +py_cobject_sources(#11614, 0) +py_cobjectnames(#11614, "partition") +py_cmembers_versioned(#11564, "partition", #11614, "2") +#11615 = @"C_type$unicode$2replace" +py_cobjects(#11615) +py_cobjecttypes(#11615, #10034) +py_cobject_sources(#11615, 0) +py_cobjectnames(#11615, "replace") +py_cmembers_versioned(#11564, "replace", #11615, "2") +#11616 = @"C_type$unicode$2rfind" +py_cobjects(#11616) +py_cobjecttypes(#11616, #10034) +py_cobject_sources(#11616, 0) +py_cobjectnames(#11616, "rfind") +py_cmembers_versioned(#11564, "rfind", #11616, "2") +#11617 = @"C_type$unicode$2rindex" +py_cobjects(#11617) +py_cobjecttypes(#11617, #10034) +py_cobject_sources(#11617, 0) +py_cobjectnames(#11617, "rindex") +py_cmembers_versioned(#11564, "rindex", #11617, "2") +#11618 = @"C_type$unicode$2rjust" +py_cobjects(#11618) +py_cobjecttypes(#11618, #10034) +py_cobject_sources(#11618, 0) +py_cobjectnames(#11618, "rjust") +py_cmembers_versioned(#11564, "rjust", #11618, "2") +#11619 = @"C_type$unicode$2rpartition" +py_cobjects(#11619) +py_cobjecttypes(#11619, #10034) +py_cobject_sources(#11619, 0) +py_cobjectnames(#11619, "rpartition") +py_cmembers_versioned(#11564, "rpartition", #11619, "2") +#11620 = @"C_type$unicode$2rsplit" +py_cobjects(#11620) +py_cobjecttypes(#11620, #10034) +py_cobject_sources(#11620, 0) +py_cobjectnames(#11620, "rsplit") +py_cmembers_versioned(#11564, "rsplit", #11620, "2") +#11621 = @"C_type$unicode$2rstrip" +py_cobjects(#11621) +py_cobjecttypes(#11621, #10034) +py_cobject_sources(#11621, 0) +py_cobjectnames(#11621, "rstrip") +py_cmembers_versioned(#11564, "rstrip", #11621, "2") +#11622 = @"C_type$unicode$2split" +py_cobjects(#11622) +py_cobjecttypes(#11622, #10034) +py_cobject_sources(#11622, 0) +py_cobjectnames(#11622, "split") +py_cmembers_versioned(#11564, "split", #11622, "2") +#11623 = @"C_type$unicode$2splitlines" +py_cobjects(#11623) +py_cobjecttypes(#11623, #10034) +py_cobject_sources(#11623, 0) +py_cobjectnames(#11623, "splitlines") +py_cmembers_versioned(#11564, "splitlines", #11623, "2") +#11624 = @"C_type$unicode$2startswith" +py_cobjects(#11624) +py_cobjecttypes(#11624, #10034) +py_cobject_sources(#11624, 0) +py_cobjectnames(#11624, "startswith") +py_cmembers_versioned(#11564, "startswith", #11624, "2") +#11625 = @"C_type$unicode$2strip" +py_cobjects(#11625) +py_cobjecttypes(#11625, #10034) +py_cobject_sources(#11625, 0) +py_cobjectnames(#11625, "strip") +py_cmembers_versioned(#11564, "strip", #11625, "2") +#11626 = @"C_type$unicode$2swapcase" +py_cobjects(#11626) +py_cobjecttypes(#11626, #10034) +py_cobject_sources(#11626, 0) +py_cobjectnames(#11626, "swapcase") +py_cmembers_versioned(#11564, "swapcase", #11626, "2") +#11627 = @"C_type$unicode$2title" +py_cobjects(#11627) +py_cobjecttypes(#11627, #10034) +py_cobject_sources(#11627, 0) +py_cobjectnames(#11627, "title") +py_cmembers_versioned(#11564, "title", #11627, "2") +#11628 = @"C_type$unicode$2translate" +py_cobjects(#11628) +py_cobjecttypes(#11628, #10034) +py_cobject_sources(#11628, 0) +py_cobjectnames(#11628, "translate") +py_cmembers_versioned(#11564, "translate", #11628, "2") +#11629 = @"C_type$unicode$2upper" +py_cobjects(#11629) +py_cobjecttypes(#11629, #10034) +py_cobject_sources(#11629, 0) +py_cobjectnames(#11629, "upper") +py_cmembers_versioned(#11564, "upper", #11629, "2") +#11630 = @"C_type$unicode$2zfill" +py_cobjects(#11630) +py_cobjecttypes(#11630, #10034) +py_cobject_sources(#11630, 0) +py_cobjectnames(#11630, "zfill") +py_cmembers_versioned(#11564, "zfill", #11630, "2") +py_cmembers_versioned(#11564, ".super.", #10151, "2") +py_cobjectnames(#11564, "unicode") +py_cmembers_versioned(#10760, "unicode", #11564, "2") +#11631 = @"C_builtin_function_or_method$builtins.vars" +py_cobjects(#11631) +py_cobjecttypes(#11631, #10075) +py_cobject_sources(#11631, 0) +py_cobjectnames(#11631, "vars") +py_cmembers_versioned(#10760, "vars", #11631, "2") +#11632 = @"C_type$xrange" +py_cobjects(#11632) +py_cobjecttypes(#11632, #10001) +py_cobject_sources(#11632, 0) +#11633 = @"C_bytes$d297279d6128eac5ba64bea2d4201509cec3ec6b" +py_cobjects(#11633) +py_cobjecttypes(#11633, #10028) +py_cobject_sources(#11633, 0) +py_cobjectnames(#11633, "b'xrange(stop) -> xrange object +xrange(start, stop[, step]) -> xrange object + +Like range(), but instead of returning a list, returns an object that +generates the numbers in the range on demand. For looping, this is +slightly faster than range() and more memory efficient.'") +py_cmembers_versioned(#11632, "__doc__", #11633, "2") +#11634 = @"C_type$xrange$2__getattribute__" +py_cobjects(#11634) +py_cobjecttypes(#11634, #10005) +py_cobject_sources(#11634, 0) +py_cobjectnames(#11634, "__getattribute__") +py_cmembers_versioned(#11632, "__getattribute__", #11634, "2") +#11635 = @"C_type$xrange$2__getitem__" +py_cobjects(#11635) +py_cobjecttypes(#11635, #10005) +py_cobject_sources(#11635, 0) +py_cobjectnames(#11635, "__getitem__") +py_cmembers_versioned(#11632, "__getitem__", #11635, "2") +#11636 = @"C_type$xrange$2__iter__" +py_cobjects(#11636) +py_cobjecttypes(#11636, #10005) +py_cobject_sources(#11636, 0) +py_cobjectnames(#11636, "__iter__") +py_cmembers_versioned(#11632, "__iter__", #11636, "2") +#11637 = @"C_type$xrange$2__len__" +py_cobjects(#11637) +py_cobjecttypes(#11637, #10005) +py_cobject_sources(#11637, 0) +py_cobjectnames(#11637, "__len__") +py_cmembers_versioned(#11632, "__len__", #11637, "2") +#11638 = @"C_type$xrange$2__new__" +py_cobjects(#11638) +py_cobjecttypes(#11638, #10075) +py_cobject_sources(#11638, 0) +py_cobjectnames(#11638, "__new__") +py_cmembers_versioned(#11632, "__new__", #11638, "2") +#11639 = @"C_type$xrange$2__reduce__" +py_cobjects(#11639) +py_cobjecttypes(#11639, #10034) +py_cobject_sources(#11639, 0) +py_cobjectnames(#11639, "__reduce__") +py_cmembers_versioned(#11632, "__reduce__", #11639, "2") +#11640 = @"C_type$xrange$2__repr__" +py_cobjects(#11640) +py_cobjecttypes(#11640, #10005) +py_cobject_sources(#11640, 0) +py_cobjectnames(#11640, "__repr__") +py_cmembers_versioned(#11632, "__repr__", #11640, "2") +#11641 = @"C_type$xrange$2__reversed__" +py_cobjects(#11641) +py_cobjecttypes(#11641, #10034) +py_cobject_sources(#11641, 0) +py_cobjectnames(#11641, "__reversed__") +py_cmembers_versioned(#11632, "__reversed__", #11641, "2") +py_cmembers_versioned(#11632, ".super.", #10021, "2") +py_cobjectnames(#11632, "xrange") +py_cmembers_versioned(#10760, "xrange", #11632, "2") +#11642 = @"C_builtin_function_or_method$builtins.zip" +py_cobjects(#11642) +py_cobjecttypes(#11642, #10075) +py_cobject_sources(#11642, 0) +py_cobjectnames(#11642, "zip") +py_cmembers_versioned(#10760, "zip", #11642, "2") +py_cobjectnames(#10760, "__builtin__") +py_special_objects(#10760, "builtin_module") +py_special_objects(#11494, "set") +py_special_objects(#11564, "unicode") +#11643 = @"C_module$sys" +py_cobjects(#11643) +py_cobjecttypes(#11643, #10761) +py_cobject_sources(#11643, 0) +#11644 = @"C_module$sys$2__displayhook__" +py_cobjects(#11644) +py_cobjecttypes(#11644, #10075) +py_cobject_sources(#11644, 0) +py_cobjectnames(#11644, "displayhook") +py_cmembers_versioned(#11643, "__displayhook__", #11644, "2") +#11645 = @"C_bytes$2382b15d634ee6ef231da5102b7a4db3f8d9fa8d" +py_cobjects(#11645) +py_cobjecttypes(#11645, #10028) +py_cobject_sources(#11645, 0) +py_cobjectnames(#11645, "b'This module provides access to some objects used or maintained by the +interpreter and to functions that interact strongly with the interpreter. + +Dynamic objects: + +argv -- command line arguments; argv[0] is the script pathname if known +path -- module search path; path[0] is the script directory, else '' +modules -- dictionary of loaded modules + +displayhook -- called to show results in an interactive session +excepthook -- called to handle any uncaught exception other than SystemExit + To customize printing in an interactive session or to install a custom + top-level exception handler, assign other functions to replace these. + +exitfunc -- if sys.exitfunc exists, this routine is called when Python exits + Assigning to sys.exitfunc is deprecated; use the atexit module instead. + +stdin -- standard input file object; used by raw_input() and input() +stdout -- standard output file object; used by the print statement +stderr -- standard error object; used for error messages + By assigning other file objects (or objects that behave like files) + to these, it is possible to redirect all of the interpreter's I/O. + +last_type -- type of last uncaught exception +last_value -- value of last uncaught exception +last_traceback -- traceback of last uncaught exception + These three are only available in an interactive session after a + traceback has been printed. + +exc_type -- type of exception currently being handled +exc_value -- value of exception currently being handled +exc_traceback -- traceback of exception currently being handled + The function exc_info() should be used instead of these three, + because it is thread-safe. + +Static objects: + +float_info -- a dict with information about the float inplementation. +long_info -- a struct sequence with information about the long implementation. +maxint -- the largest supported integer (the smallest is -maxint-1) +maxsize -- the largest supported length of containers. +maxunicode -- the largest supported character +builtin_module_names -- tuple of module names built into this interpreter +version -- the version of this interpreter as a string +version_info -- version information as a named tuple +hexversion -- version information encoded as a single integer +copyright -- copyright notice pertaining to this interpreter +platform -- platform identifier +executable -- absolute path of the executable binary of the Python interpreter +prefix -- prefix used to find the Python library +exec_prefix -- prefix used to find the machine-specific Python library +float_repr_style -- string indicating the style of repr() output for floats +__stdin__ -- the original stdin; don't touch! +__stdout__ -- the original stdout; don't touch! +__stderr__ -- the original stderr; don't touch! +__displayhook__ -- the original displayhook; don't touch! +__excepthook__ -- the original excepthook; don't touch! + +Functions: + +displayhook() -- print an object to the screen, and save it in __builtin__._ +excepthook() -- print an exception and its traceback to sys.stderr +exc_info() -- return thread-safe information about the current exception +exc_clear() -- clear the exception state for the current thread +exit() -- exit the interpreter by raising SystemExit +getdlopenflags() -- returns flags to be used for dlopen() calls +getprofile() -- get the global profiling function +getrefcount() -- return the reference count for an object (plus one :-) +getrecursionlimit() -- return the max recursion depth for the interpreter +getsizeof() -- return the size of an object in bytes +gettrace() -- get the global debug tracing function +setcheckinterval() -- control how often the interpreter checks for events +setdlopenflags() -- set the flags to be used for dlopen() calls +setprofile() -- set the global profiling function +setrecursionlimit() -- set the max recursion depth for the interpreter +settrace() -- set the global debug tracing function +'") +py_cmembers_versioned(#11643, "__doc__", #11645, "2") +#11646 = @"C_module$sys$2__excepthook__" +py_cobjects(#11646) +py_cobjecttypes(#11646, #10075) +py_cobject_sources(#11646, 0) +py_cobjectnames(#11646, "excepthook") +py_cmembers_versioned(#11643, "__excepthook__", #11646, "2") +#11647 = @"C_bytes$b4c56ee8d2854166dec66644f541b85247105b2c" +py_cobjects(#11647) +py_cobjecttypes(#11647, #10028) +py_cobject_sources(#11647, 0) +py_cobjectnames(#11647, "b'sys'") +py_cmembers_versioned(#11643, "__name__", #11647, "2") +py_cmembers_versioned(#11643, "__package__", #10017, "2") +#11648 = @"C_module$sys$2__stderr__" +py_cobjects(#11648) +py_cobjecttypes(#11648, #11179) +py_cobject_sources(#11648, 0) +py_cobjectnames(#11648, "object") +py_cmembers_versioned(#11643, "__stderr__", #11648, "2") +#11649 = @"C_module$sys$2__stdin__" +py_cobjects(#11649) +py_cobjecttypes(#11649, #11179) +py_cobject_sources(#11649, 0) +py_cobjectnames(#11649, "object") +py_cmembers_versioned(#11643, "__stdin__", #11649, "2") +#11650 = @"C_module$sys$2__stdout__" +py_cobjects(#11650) +py_cobjecttypes(#11650, #11179) +py_cobject_sources(#11650, 0) +py_cobjectnames(#11650, "object") +py_cmembers_versioned(#11643, "__stdout__", #11650, "2") +#11651 = @"C_module$sys$2_clear_type_cache" +py_cobjects(#11651) +py_cobjecttypes(#11651, #10075) +py_cobject_sources(#11651, 0) +py_cobjectnames(#11651, "_clear_type_cache") +py_cmembers_versioned(#11643, "_clear_type_cache", #11651, "2") +#11652 = @"C_module$sys$2_current_frames" +py_cobjects(#11652) +py_cobjecttypes(#11652, #10075) +py_cobject_sources(#11652, 0) +py_cobjectnames(#11652, "_current_frames") +py_cmembers_versioned(#11643, "_current_frames", #11652, "2") +#11653 = @"C_module$sys$2_getframe" +py_cobjects(#11653) +py_cobjecttypes(#11653, #10075) +py_cobject_sources(#11653, 0) +py_cobjectnames(#11653, "_getframe") +py_cmembers_versioned(#11643, "_getframe", #11653, "2") +#11654 = @"C_module$sys$2_git" +py_cobjects(#11654) +py_cobjecttypes(#11654, #10737) +py_cobject_sources(#11654, 0) +#11655 = @"C_bytes$3348cc07058a464ebb973af5bfdb70ca7968c2db" +py_cobjects(#11655) +py_cobjecttypes(#11655, #10028) +py_cobject_sources(#11655, 0) +py_cobjectnames(#11655, "b'CPython'") +py_citems(#11654, 0, #11655) +#11656 = @"C_bytes$da39a3ee5e6b4b0d3255bfef95601890afd80709" +py_cobjects(#11656) +py_cobjecttypes(#11656, #10028) +py_cobject_sources(#11656, 0) +py_cobjectnames(#11656, "b''") +py_citems(#11654, 1, #11656) +py_citems(#11654, 2, #11656) +py_cobjectnames(#11654, "object") +py_cmembers_versioned(#11643, "_git", #11654, "2") +#11657 = @"C_bytes$606cb74201e7d8dbdf8268c2eaaf1339a46e918f" +py_cobjects(#11657) +py_cobjecttypes(#11657, #10028) +py_cobject_sources(#11657, 0) +py_cobjectnames(#11657, "b'x86_64-linux-gnu'") +py_cmembers_versioned(#11643, "_multiarch", #11657, "2") +#11658 = @"C_int$1013" +py_cobjects(#11658) +py_cobjecttypes(#11658, #10449) +py_cobject_sources(#11658, 0) +py_cobjectnames(#11658, "1013") +py_cmembers_versioned(#11643, "api_version", #11658, "2") +#11659 = @"C_module$sys$2argv" +py_cobjects(#11659) +py_cobjecttypes(#11659, #11360) +py_cobject_sources(#11659, 0) +#11660 = @"C_bytes$3525e833c783a558fedf8363ced06fbd55ba3fde" +py_cobjects(#11660) +py_cobjecttypes(#11660, #10028) +py_cobject_sources(#11660, 0) +py_cobjectnames(#11660, "b'/workspaces/semmle-code/target/intree/codeql-python/python/tools/python_tracer.py'") +py_citems(#11659, 0, #11660) +#11661 = @"C_bytes$4d784a907a3cc0f3fd96b4e3f625477b38bee0be" +py_cobjects(#11661) +py_cobjecttypes(#11661, #10028) +py_cobject_sources(#11661, 0) +py_cobjectnames(#11661, "b'--lang=2'") +py_citems(#11659, 1, #11661) +#11662 = @"C_bytes$1d553e9f135045e774e0da5c3598818711d8b00e" +py_cobjects(#11662) +py_cobjecttypes(#11662, #10028) +py_cobject_sources(#11662, 0) +py_cobjectnames(#11662, "b'--filter=exclude:**/*.testproj/**'") +py_citems(#11659, 2, #11662) +#11663 = @"C_bytes$a94a8fe5ccb19ba61c4c0873d391e987982fbbd3" +py_cobjects(#11663) +py_cobjecttypes(#11663, #10028) +py_cobject_sources(#11663, 0) +py_cobjectnames(#11663, "b'test'") +py_citems(#11659, 3, #11663) +#11664 = @"C_bytes$61adf419d11f4120dca81c8a4723b29f991057ae" +py_cobjects(#11664) +py_cobjecttypes(#11664, #10028) +py_cobject_sources(#11664, 0) +py_cobjectnames(#11664, "b'--path'") +py_citems(#11659, 4, #11664) +#11665 = @"C_bytes$f2389c259ec2ef77490e6ddf8541bcf8aac70ec5" +py_cobjects(#11665) +py_cobjecttypes(#11665, #10028) +py_cobject_sources(#11665, 0) +py_cobjectnames(#11665, "b'/workspaces/semmle-code/semmlecode-python-tests/2/extractor-tests/old_style_disequality'") +py_citems(#11659, 5, #11665) +#11666 = @"C_bytes$ae835d85f6fdd7ac1cd47d7547e266fd5322d1fd" +py_cobjects(#11666) +py_cobjecttypes(#11666, #10028) +py_cobject_sources(#11666, 0) +py_cobjectnames(#11666, "b'--verbosity'") +py_citems(#11659, 6, #11666) +py_citems(#11659, 7, #10642) +#11667 = @"C_bytes$b31f41bd9ba68328bfcf0fa41365ff5b3f60be99" +py_cobjects(#11667) +py_cobjecttypes(#11667, #10028) +py_cobject_sources(#11667, 0) +py_cobjectnames(#11667, "b'--colorize'") +py_citems(#11659, 8, #11667) +py_cobjectnames(#11659, "object") +py_cmembers_versioned(#11643, "argv", #11659, "2") +#11668 = @"C_module$sys$2builtin_module_names" +py_cobjects(#11668) +py_cobjecttypes(#11668, #10737) +py_cobject_sources(#11668, 0) +#11669 = @"C_bytes$3f91ef9b413ce508f0382fd3b182901dfb6bb0ce" +py_cobjects(#11669) +py_cobjecttypes(#11669, #10028) +py_cobject_sources(#11669, 0) +py_cobjectnames(#11669, "b'__builtin__'") +py_citems(#11668, 0, #11669) +#11670 = @"C_bytes$3a64a9fca18e24c6cc560c53c3603d38f21d45e1" +py_cobjects(#11670) +py_cobjecttypes(#11670, #10028) +py_cobject_sources(#11670, 0) +py_cobjectnames(#11670, "b'__main__'") +py_citems(#11668, 1, #11670) +#11671 = @"C_bytes$7f2b7c5a60c2644f250e9dc7ff7fa02592aea266" +py_cobjects(#11671) +py_cobjecttypes(#11671, #10028) +py_cobject_sources(#11671, 0) +py_cobjectnames(#11671, "b'_ast'") +py_citems(#11668, 2, #11671) +#11672 = @"C_bytes$579c90c0e572bc4bbbd532c809cc7f3f9556e817" +py_cobjects(#11672) +py_cobjecttypes(#11672, #10028) +py_cobject_sources(#11672, 0) +py_cobjectnames(#11672, "b'_bisect'") +py_citems(#11668, 3, #11672) +#11673 = @"C_bytes$a5513e85db2649ca88ef79d90f9b5ec947daa37a" +py_cobjects(#11673) +py_cobjecttypes(#11673, #10028) +py_cobject_sources(#11673, 0) +py_cobjectnames(#11673, "b'_codecs'") +py_citems(#11668, 4, #11673) +#11674 = @"C_bytes$2746b94ac2170388acf8ef9c5235281512a0b70b" +py_cobjects(#11674) +py_cobjecttypes(#11674, #10028) +py_cobject_sources(#11674, 0) +py_cobjectnames(#11674, "b'_collections'") +py_citems(#11668, 5, #11674) +#11675 = @"C_bytes$373d3cb70f3711a68632cf0ac8abac03b9be62c0" +py_cobjects(#11675) +py_cobjecttypes(#11675, #10028) +py_cobject_sources(#11675, 0) +py_cobjectnames(#11675, "b'_functools'") +py_citems(#11668, 6, #11675) +#11676 = @"C_bytes$4884118d98d0aede7dbe8a7716c62711f537c647" +py_cobjects(#11676) +py_cobjecttypes(#11676, #10028) +py_cobject_sources(#11676, 0) +py_cobjectnames(#11676, "b'_heapq'") +py_citems(#11668, 7, #11676) +#11677 = @"C_bytes$49e43a67a5b4471f57ac2bd55af13ff7ecec742c" +py_cobjects(#11677) +py_cobjecttypes(#11677, #10028) +py_cobject_sources(#11677, 0) +py_cobjectnames(#11677, "b'_io'") +py_citems(#11668, 8, #11677) +#11678 = @"C_bytes$bb60618a3277db614bb1bf9d31e93549d8a807e6" +py_cobjects(#11678) +py_cobjecttypes(#11678, #10028) +py_cobject_sources(#11678, 0) +py_cobjectnames(#11678, "b'_locale'") +py_citems(#11668, 9, #11678) +#11679 = @"C_bytes$d1a7b4357d59cd4c4148040383196bab2ccf8555" +py_cobjects(#11679) +py_cobjecttypes(#11679, #10028) +py_cobject_sources(#11679, 0) +py_cobjectnames(#11679, "b'_md5'") +py_citems(#11668, 10, #11679) +#11680 = @"C_bytes$24052cebfe42e91a49777122be7c3f21c156a0ab" +py_cobjects(#11680) +py_cobjecttypes(#11680, #10028) +py_cobject_sources(#11680, 0) +py_cobjectnames(#11680, "b'_random'") +py_citems(#11668, 11, #11680) +#11681 = @"C_bytes$0762689429334731c7dac22f446b8c834bae8f7f" +py_cobjects(#11681) +py_cobjecttypes(#11681, #10028) +py_cobject_sources(#11681, 0) +py_cobjectnames(#11681, "b'_sha'") +py_citems(#11668, 12, #11681) +#11682 = @"C_bytes$d75584fc276a600d1be0adf40497ceb4424302e3" +py_cobjects(#11682) +py_cobjecttypes(#11682, #10028) +py_cobject_sources(#11682, 0) +py_cobjectnames(#11682, "b'_sha256'") +py_citems(#11668, 13, #11682) +#11683 = @"C_bytes$b3c56529fe2d273d138f9dab908f168f0ab71f90" +py_cobjects(#11683) +py_cobjecttypes(#11683, #10028) +py_cobject_sources(#11683, 0) +py_cobjectnames(#11683, "b'_sha512'") +py_citems(#11668, 14, #11683) +#11684 = @"C_bytes$fb6e6f2753b5318a7c94409f2d24464dc2a501e6" +py_cobjects(#11684) +py_cobjecttypes(#11684, #10028) +py_cobject_sources(#11684, 0) +py_cobjectnames(#11684, "b'_socket'") +py_citems(#11668, 15, #11684) +#11685 = @"C_bytes$c85d64f512bebf46e4b005eac3b2a4d793990c41" +py_cobjects(#11685) +py_cobjecttypes(#11685, #10028) +py_cobject_sources(#11685, 0) +py_cobjectnames(#11685, "b'_sre'") +py_citems(#11668, 16, #11685) +#11686 = @"C_bytes$20c7ae9aa8121530a5f9beadc347387ffc7c5047" +py_cobjects(#11686) +py_cobjecttypes(#11686, #10028) +py_cobject_sources(#11686, 0) +py_cobjectnames(#11686, "b'_struct'") +py_citems(#11668, 17, #11686) +#11687 = @"C_bytes$25d3812809eac256ba6e983daf04ba4514944b98" +py_cobjects(#11687) +py_cobjecttypes(#11687, #10028) +py_cobject_sources(#11687, 0) +py_cobjectnames(#11687, "b'_symtable'") +py_citems(#11668, 18, #11687) +#11688 = @"C_bytes$cad00083c035d5c5a9920f1d6ab0aa725d6b2a62" +py_cobjects(#11688) +py_cobjecttypes(#11688, #10028) +py_cobject_sources(#11688, 0) +py_cobjectnames(#11688, "b'_warnings'") +py_citems(#11668, 19, #11688) +#11689 = @"C_bytes$5b3590706710d2ebcfefaee3bcd9cb5d86d57638" +py_cobjects(#11689) +py_cobjecttypes(#11689, #10028) +py_cobject_sources(#11689, 0) +py_cobjectnames(#11689, "b'_weakref'") +py_citems(#11668, 20, #11689) +#11690 = @"C_bytes$19edc1210777ba4d45049c29280d9cc5e1064c25" +py_cobjects(#11690) +py_cobjecttypes(#11690, #10028) +py_cobject_sources(#11690, 0) +py_cobjectnames(#11690, "b'array'") +py_citems(#11668, 21, #11690) +#11691 = @"C_bytes$e18849f6ba6a1716be9658bf2e81dabf5cc87e08" +py_cobjects(#11691) +py_cobjecttypes(#11691, #10028) +py_cobject_sources(#11691, 0) +py_cobjectnames(#11691, "b'binascii'") +py_citems(#11668, 22, #11691) +#11692 = @"C_bytes$c23743518188a296469ec72037c11849dd828f2e" +py_cobjects(#11692) +py_cobjecttypes(#11692, #10028) +py_cobject_sources(#11692, 0) +py_cobjectnames(#11692, "b'cPickle'") +py_citems(#11668, 23, #11692) +#11693 = @"C_bytes$238fb40c01b6c32b54e6cf6c6535669b4bfe3fd6" +py_cobjects(#11693) +py_cobjecttypes(#11693, #10028) +py_cobject_sources(#11693, 0) +py_cobjectnames(#11693, "b'cStringIO'") +py_citems(#11668, 24, #11693) +#11694 = @"C_bytes$db9c549ff758cb4652abd88be911451e1d14b690" +py_cobjects(#11694) +py_cobjecttypes(#11694, #10028) +py_cobject_sources(#11694, 0) +py_cobjectnames(#11694, "b'cmath'") +py_citems(#11668, 25, #11694) +#11695 = @"C_bytes$89ffad089c042f31dcc81269da38bef3ca44ab1f" +py_cobjects(#11695) +py_cobjecttypes(#11695, #10028) +py_cobject_sources(#11695, 0) +py_cobjectnames(#11695, "b'datetime'") +py_citems(#11668, 26, #11695) +#11696 = @"C_bytes$2798a19580337f0834e0b47679f7519778234ff2" +py_cobjects(#11696) +py_cobjecttypes(#11696, #10028) +py_cobject_sources(#11696, 0) +py_cobjectnames(#11696, "b'errno'") +py_citems(#11668, 27, #11696) +#11697 = @"C_bytes$be51ea0d2df953559db847ba84b885b258389873" +py_cobjects(#11697) +py_cobjecttypes(#11697, #10028) +py_cobject_sources(#11697, 0) +py_cobjectnames(#11697, "b'exceptions'") +py_citems(#11668, 28, #11697) +#11698 = @"C_bytes$6937c060e9afe977761075e2fefb163b45e0f03f" +py_cobjects(#11698) +py_cobjecttypes(#11698, #10028) +py_cobject_sources(#11698, 0) +py_cobjectnames(#11698, "b'fcntl'") +py_citems(#11668, 29, #11698) +#11699 = @"C_bytes$ec6d9083d77b970950e8340ff01d89108b346e38" +py_cobjects(#11699) +py_cobjecttypes(#11699, #10028) +py_cobject_sources(#11699, 0) +py_cobjectnames(#11699, "b'gc'") +py_citems(#11668, 30, #11699) +#11700 = @"C_bytes$6567df49fab5b0928c13f561b7181fed734b915d" +py_cobjects(#11700) +py_cobjecttypes(#11700, #10028) +py_cobject_sources(#11700, 0) +py_cobjectnames(#11700, "b'grp'") +py_citems(#11668, 31, #11700) +#11701 = @"C_bytes$7ebbccbf2a9ebaa9338648798afddf195f6f1b63" +py_cobjects(#11701) +py_cobjecttypes(#11701, #10028) +py_cobject_sources(#11701, 0) +py_cobjectnames(#11701, "b'imp'") +py_citems(#11668, 32, #11701) +#11702 = @"C_bytes$9e9cf1097fbb8c0af843641c0e32781c81ce4931" +py_cobjects(#11702) +py_cobjecttypes(#11702, #10028) +py_cobject_sources(#11702, 0) +py_cobjectnames(#11702, "b'itertools'") +py_citems(#11668, 33, #11702) +#11703 = @"C_bytes$4ab93184b1744659f5162beef22b666b5411ac26" +py_cobjects(#11703) +py_cobjecttypes(#11703, #10028) +py_cobject_sources(#11703, 0) +py_cobjectnames(#11703, "b'marshal'") +py_citems(#11668, 34, #11703) +#11704 = @"C_bytes$7a488390a939c4795cc1a801e51751d5f25d800d" +py_cobjects(#11704) +py_cobjecttypes(#11704, #10028) +py_cobject_sources(#11704, 0) +py_cobjectnames(#11704, "b'math'") +py_citems(#11668, 35, #11704) +#11705 = @"C_bytes$fe96dd39756ac41b74283a9292652d366d73931f" +py_cobjects(#11705) +py_cobjecttypes(#11705, #10028) +py_cobject_sources(#11705, 0) +py_cobjectnames(#11705, "b'operator'") +py_citems(#11668, 36, #11705) +#11706 = @"C_bytes$bfdba57c2ea525d68cd766e6ddc87ae634e2c0ff" +py_cobjects(#11706) +py_cobjecttypes(#11706, #10028) +py_cobject_sources(#11706, 0) +py_cobjectnames(#11706, "b'posix'") +py_citems(#11668, 37, #11706) +#11707 = @"C_bytes$37fa265330ad83eaa879efb1e2db6380896cf639" +py_cobjects(#11707) +py_cobjecttypes(#11707, #10028) +py_cobject_sources(#11707, 0) +py_cobjectnames(#11707, "b'pwd'") +py_citems(#11668, 38, #11707) +#11708 = @"C_bytes$81448fe273247b533b9f018e96c158cab7901247" +py_cobjects(#11708) +py_cobjecttypes(#11708, #10028) +py_cobject_sources(#11708, 0) +py_cobjectnames(#11708, "b'select'") +py_citems(#11668, 39, #11708) +#11709 = @"C_bytes$36ab4aaa56c8fea2a7afdfa5b5fcd28c9e178754" +py_cobjects(#11709) +py_cobjecttypes(#11709, #10028) +py_cobject_sources(#11709, 0) +py_cobjectnames(#11709, "b'signal'") +py_citems(#11668, 40, #11709) +#11710 = @"C_bytes$1c4930bf21779b36a222bcf4a7b2ef9f901c7ea5" +py_cobjects(#11710) +py_cobjecttypes(#11710, #10028) +py_cobject_sources(#11710, 0) +py_cobjectnames(#11710, "b'spwd'") +py_citems(#11668, 41, #11710) +#11711 = @"C_bytes$3eb8d4a57d237be3b4f016fc859f173c6358a3a9" +py_cobjects(#11711) +py_cobjecttypes(#11711, #10028) +py_cobject_sources(#11711, 0) +py_cobjectnames(#11711, "b'strop'") +py_citems(#11668, 42, #11711) +#11712 = @"C_bytes$b4c56ee8d2854166dec66644f541b85247105b2c" +py_cobjects(#11712) +py_cobjecttypes(#11712, #10028) +py_cobject_sources(#11712, 0) +py_cobjectnames(#11712, "b'sys'") +py_citems(#11668, 43, #11712) +#11713 = @"C_bytes$e0543ba22ccc80a5d2365241ee2adb754f80be19" +py_cobjects(#11713) +py_cobjecttypes(#11713, #10028) +py_cobject_sources(#11713, 0) +py_cobjectnames(#11713, "b'syslog'") +py_citems(#11668, 44, #11713) +#11714 = @"C_bytes$c283e375ed8cebf3b8d1b5101fd51bb522961656" +py_cobjects(#11714) +py_cobjecttypes(#11714, #10028) +py_cobject_sources(#11714, 0) +py_cobjectnames(#11714, "b'thread'") +py_citems(#11668, 45, #11714) +#11715 = @"C_bytes$714eea0f4c980736bde0065fe73f573487f08e3a" +py_cobjects(#11715) +py_cobjecttypes(#11715, #10028) +py_cobject_sources(#11715, 0) +py_cobjectnames(#11715, "b'time'") +py_citems(#11668, 46, #11715) +#11716 = @"C_bytes$61e641afa9068a62e8107e67e70787c7e3dadd3f" +py_cobjects(#11716) +py_cobjecttypes(#11716, #10028) +py_cobject_sources(#11716, 0) +py_cobjectnames(#11716, "b'unicodedata'") +py_citems(#11668, 47, #11716) +#11717 = @"C_bytes$176b85ad73d71f4fd2df7eb79cf4950d1b4516b4" +py_cobjects(#11717) +py_cobjecttypes(#11717, #10028) +py_cobject_sources(#11717, 0) +py_cobjectnames(#11717, "b'xxsubtype'") +py_citems(#11668, 48, #11717) +#11718 = @"C_bytes$458148110bacc19758d7f559121f6768feb64dd0" +py_cobjects(#11718) +py_cobjecttypes(#11718, #10028) +py_cobject_sources(#11718, 0) +py_cobjectnames(#11718, "b'zipimport'") +py_citems(#11668, 49, #11718) +#11719 = @"C_bytes$57968f12798767ae5da8b15a0c383ad79d0f338b" +py_cobjects(#11719) +py_cobjecttypes(#11719, #10028) +py_cobject_sources(#11719, 0) +py_cobjectnames(#11719, "b'zlib'") +py_citems(#11668, 50, #11719) +py_cobjectnames(#11668, "object") +py_cmembers_versioned(#11643, "builtin_module_names", #11668, "2") +#11720 = @"C_bytes$4502229742dda5345d35a1c216dfadb1a96b3c68" +py_cobjects(#11720) +py_cobjecttypes(#11720, #10028) +py_cobject_sources(#11720, 0) +py_cobjectnames(#11720, "b'little'") +py_cmembers_versioned(#11643, "byteorder", #11720, "2") +#11721 = @"C_module$sys$2call_tracing" +py_cobjects(#11721) +py_cobjecttypes(#11721, #10075) +py_cobject_sources(#11721, 0) +py_cobjectnames(#11721, "call_tracing") +py_cmembers_versioned(#11643, "call_tracing", #11721, "2") +#11722 = @"C_module$sys$2callstats" +py_cobjects(#11722) +py_cobjecttypes(#11722, #10075) +py_cobject_sources(#11722, 0) +py_cobjectnames(#11722, "callstats") +py_cmembers_versioned(#11643, "callstats", #11722, "2") +#11723 = @"C_bytes$3729d369b12aaead877cfb632b4f72b7fa82ec27" +py_cobjects(#11723) +py_cobjecttypes(#11723, #10028) +py_cobject_sources(#11723, 0) +py_cobjectnames(#11723, "b'Copyright (c) 2001-2020 Python Software Foundation. +All Rights Reserved. + +Copyright (c) 2000 BeOpen.com. +All Rights Reserved. + +Copyright (c) 1995-2001 Corporation for National Research Initiatives. +All Rights Reserved. + +Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. +All Rights Reserved.'") +py_cmembers_versioned(#11643, "copyright", #11723, "2") +py_cmembers_versioned(#11643, "displayhook", #11644, "2") +py_cmembers_versioned(#11643, "dont_write_bytecode", #10644, "2") +#11724 = @"C_module$sys$2exc_clear" +py_cobjects(#11724) +py_cobjecttypes(#11724, #10075) +py_cobject_sources(#11724, 0) +py_cobjectnames(#11724, "exc_clear") +py_cmembers_versioned(#11643, "exc_clear", #11724, "2") +#11725 = @"C_module$sys$2exc_info" +py_cobjects(#11725) +py_cobjecttypes(#11725, #10075) +py_cobject_sources(#11725, 0) +py_cobjectnames(#11725, "exc_info") +py_cmembers_versioned(#11643, "exc_info", #11725, "2") +py_cmembers_versioned(#11643, "excepthook", #11646, "2") +#11726 = @"C_bytes$5c0e77c46be77719bc1c0a5ec9c64b94d2a2e50c" +py_cobjects(#11726) +py_cobjecttypes(#11726, #10028) +py_cobject_sources(#11726, 0) +py_cobjectnames(#11726, "b'/usr'") +py_cmembers_versioned(#11643, "exec_prefix", #11726, "2") +#11727 = @"C_bytes$ff88ec09d47f04c9e62b5e5731d143c909d2b88f" +py_cobjects(#11727) +py_cobjecttypes(#11727, #10028) +py_cobject_sources(#11727, 0) +py_cobjectnames(#11727, "b'/usr/bin/python2'") +py_cmembers_versioned(#11643, "executable", #11727, "2") +#11728 = @"C_module$sys$2exit" +py_cobjects(#11728) +py_cobjecttypes(#11728, #10075) +py_cobject_sources(#11728, 0) +py_cobjectnames(#11728, "exit") +py_cmembers_versioned(#11643, "exit", #11728, "2") +#11729 = @"C_module$sys$2exitfunc" +py_cobjects(#11729) +py_cobjecttypes(#11729, #10000) +py_cobject_sources(#11729, 0) +py_cobjectnames(#11729, "_run_exitfuncs") +py_cmembers_versioned(#11643, "exitfunc", #11729, "2") +#11730 = @"C_module$sys$2flags" +#11731 = @"C_type$sys.flags" +py_cobjects(#11731) +py_cobjecttypes(#11731, #10001) +py_cobject_sources(#11731, 0) +#11732 = @"C_type$sys.flags$2__add__" +py_cobjects(#11732) +py_cobjecttypes(#11732, #10005) +py_cobject_sources(#11732, 0) +py_cobjectnames(#11732, "__add__") +py_cmembers_versioned(#11731, "__add__", #11732, "2") +#11733 = @"C_type$sys.flags$2__contains__" +py_cobjects(#11733) +py_cobjecttypes(#11733, #10005) +py_cobject_sources(#11733, 0) +py_cobjectnames(#11733, "__contains__") +py_cmembers_versioned(#11731, "__contains__", #11733, "2") +#11734 = @"C_bytes$c5f0683e524addae0a4a9017696f4f973c26b979" +py_cobjects(#11734) +py_cobjecttypes(#11734, #10028) +py_cobject_sources(#11734, 0) +py_cobjectnames(#11734, "b'sys.flags + +Flags provided through command line arguments or environment vars.'") +py_cmembers_versioned(#11731, "__doc__", #11734, "2") +#11735 = @"C_type$sys.flags$2__eq__" +py_cobjects(#11735) +py_cobjecttypes(#11735, #10005) +py_cobject_sources(#11735, 0) +py_cobjectnames(#11735, "__eq__") +py_cmembers_versioned(#11731, "__eq__", #11735, "2") +#11736 = @"C_type$sys.flags$2__ge__" +py_cobjects(#11736) +py_cobjecttypes(#11736, #10005) +py_cobject_sources(#11736, 0) +py_cobjectnames(#11736, "__ge__") +py_cmembers_versioned(#11731, "__ge__", #11736, "2") +#11737 = @"C_type$sys.flags$2__getitem__" +py_cobjects(#11737) +py_cobjecttypes(#11737, #10005) +py_cobject_sources(#11737, 0) +py_cobjectnames(#11737, "__getitem__") +py_cmembers_versioned(#11731, "__getitem__", #11737, "2") +#11738 = @"C_type$sys.flags$2__getslice__" +py_cobjects(#11738) +py_cobjecttypes(#11738, #10005) +py_cobject_sources(#11738, 0) +py_cobjectnames(#11738, "__getslice__") +py_cmembers_versioned(#11731, "__getslice__", #11738, "2") +#11739 = @"C_type$sys.flags$2__gt__" +py_cobjects(#11739) +py_cobjecttypes(#11739, #10005) +py_cobject_sources(#11739, 0) +py_cobjectnames(#11739, "__gt__") +py_cmembers_versioned(#11731, "__gt__", #11739, "2") +#11740 = @"C_type$sys.flags$2__hash__" +py_cobjects(#11740) +py_cobjecttypes(#11740, #10005) +py_cobject_sources(#11740, 0) +py_cobjectnames(#11740, "__hash__") +py_cmembers_versioned(#11731, "__hash__", #11740, "2") +#11741 = @"C_type$sys.flags$2__le__" +py_cobjects(#11741) +py_cobjecttypes(#11741, #10005) +py_cobject_sources(#11741, 0) +py_cobjectnames(#11741, "__le__") +py_cmembers_versioned(#11731, "__le__", #11741, "2") +#11742 = @"C_type$sys.flags$2__len__" +py_cobjects(#11742) +py_cobjecttypes(#11742, #10005) +py_cobject_sources(#11742, 0) +py_cobjectnames(#11742, "__len__") +py_cmembers_versioned(#11731, "__len__", #11742, "2") +#11743 = @"C_type$sys.flags$2__lt__" +py_cobjects(#11743) +py_cobjecttypes(#11743, #10005) +py_cobject_sources(#11743, 0) +py_cobjectnames(#11743, "__lt__") +py_cmembers_versioned(#11731, "__lt__", #11743, "2") +#11744 = @"C_type$sys.flags$2__mul__" +py_cobjects(#11744) +py_cobjecttypes(#11744, #10005) +py_cobject_sources(#11744, 0) +py_cobjectnames(#11744, "__mul__") +py_cmembers_versioned(#11731, "__mul__", #11744, "2") +#11745 = @"C_type$sys.flags$2__ne__" +py_cobjects(#11745) +py_cobjecttypes(#11745, #10005) +py_cobject_sources(#11745, 0) +py_cobjectnames(#11745, "__ne__") +py_cmembers_versioned(#11731, "__ne__", #11745, "2") +#11746 = @"C_type$sys.flags$2__new__" +py_cobjects(#11746) +py_cobjecttypes(#11746, #10075) +py_cobject_sources(#11746, 0) +py_cobjectnames(#11746, "__new__") +py_cmembers_versioned(#11731, "__new__", #11746, "2") +#11747 = @"C_type$sys.flags$2__reduce__" +py_cobjects(#11747) +py_cobjecttypes(#11747, #10034) +py_cobject_sources(#11747, 0) +py_cobjectnames(#11747, "__reduce__") +py_cmembers_versioned(#11731, "__reduce__", #11747, "2") +#11748 = @"C_type$sys.flags$2__repr__" +py_cobjects(#11748) +py_cobjecttypes(#11748, #10005) +py_cobject_sources(#11748, 0) +py_cobjectnames(#11748, "__repr__") +py_cmembers_versioned(#11731, "__repr__", #11748, "2") +#11749 = @"C_type$sys.flags$2__rmul__" +py_cobjects(#11749) +py_cobjecttypes(#11749, #10005) +py_cobject_sources(#11749, 0) +py_cobjectnames(#11749, "__rmul__") +py_cmembers_versioned(#11731, "__rmul__", #11749, "2") +#11750 = @"C_type$sys.flags$2bytes_warning" +py_cobjects(#11750) +py_cobjecttypes(#11750, #10045) +py_cobject_sources(#11750, 0) +py_cobjectnames(#11750, "bytes_warning") +py_cmembers_versioned(#11731, "bytes_warning", #11750, "2") +#11751 = @"C_type$sys.flags$2debug" +py_cobjects(#11751) +py_cobjecttypes(#11751, #10045) +py_cobject_sources(#11751, 0) +py_cobjectnames(#11751, "debug") +py_cmembers_versioned(#11731, "debug", #11751, "2") +#11752 = @"C_type$sys.flags$2division_new" +py_cobjects(#11752) +py_cobjecttypes(#11752, #10045) +py_cobject_sources(#11752, 0) +py_cobjectnames(#11752, "division_new") +py_cmembers_versioned(#11731, "division_new", #11752, "2") +#11753 = @"C_type$sys.flags$2division_warning" +py_cobjects(#11753) +py_cobjecttypes(#11753, #10045) +py_cobject_sources(#11753, 0) +py_cobjectnames(#11753, "division_warning") +py_cmembers_versioned(#11731, "division_warning", #11753, "2") +#11754 = @"C_type$sys.flags$2dont_write_bytecode" +py_cobjects(#11754) +py_cobjecttypes(#11754, #10045) +py_cobject_sources(#11754, 0) +py_cobjectnames(#11754, "dont_write_bytecode") +py_cmembers_versioned(#11731, "dont_write_bytecode", #11754, "2") +#11755 = @"C_type$sys.flags$2hash_randomization" +py_cobjects(#11755) +py_cobjecttypes(#11755, #10045) +py_cobject_sources(#11755, 0) +py_cobjectnames(#11755, "hash_randomization") +py_cmembers_versioned(#11731, "hash_randomization", #11755, "2") +#11756 = @"C_type$sys.flags$2ignore_environment" +py_cobjects(#11756) +py_cobjecttypes(#11756, #10045) +py_cobject_sources(#11756, 0) +py_cobjectnames(#11756, "ignore_environment") +py_cmembers_versioned(#11731, "ignore_environment", #11756, "2") +#11757 = @"C_type$sys.flags$2inspect" +py_cobjects(#11757) +py_cobjecttypes(#11757, #10045) +py_cobject_sources(#11757, 0) +py_cobjectnames(#11757, "inspect") +py_cmembers_versioned(#11731, "inspect", #11757, "2") +#11758 = @"C_type$sys.flags$2interactive" +py_cobjects(#11758) +py_cobjecttypes(#11758, #10045) +py_cobject_sources(#11758, 0) +py_cobjectnames(#11758, "interactive") +py_cmembers_versioned(#11731, "interactive", #11758, "2") +#11759 = @"C_int$16" +py_cobjects(#11759) +py_cobjecttypes(#11759, #10449) +py_cobject_sources(#11759, 0) +py_cobjectnames(#11759, "16") +py_cmembers_versioned(#11731, "n_fields", #11759, "2") +py_cmembers_versioned(#11731, "n_sequence_fields", #11759, "2") +#11760 = @"C_int$0" +py_cobjects(#11760) +py_cobjecttypes(#11760, #10449) +py_cobject_sources(#11760, 0) +py_cobjectnames(#11760, "0") +py_cmembers_versioned(#11731, "n_unnamed_fields", #11760, "2") +#11761 = @"C_type$sys.flags$2no_site" +py_cobjects(#11761) +py_cobjecttypes(#11761, #10045) +py_cobject_sources(#11761, 0) +py_cobjectnames(#11761, "no_site") +py_cmembers_versioned(#11731, "no_site", #11761, "2") +#11762 = @"C_type$sys.flags$2no_user_site" +py_cobjects(#11762) +py_cobjecttypes(#11762, #10045) +py_cobject_sources(#11762, 0) +py_cobjectnames(#11762, "no_user_site") +py_cmembers_versioned(#11731, "no_user_site", #11762, "2") +#11763 = @"C_type$sys.flags$2optimize" +py_cobjects(#11763) +py_cobjecttypes(#11763, #10045) +py_cobject_sources(#11763, 0) +py_cobjectnames(#11763, "optimize") +py_cmembers_versioned(#11731, "optimize", #11763, "2") +#11764 = @"C_type$sys.flags$2py3k_warning" +py_cobjects(#11764) +py_cobjecttypes(#11764, #10045) +py_cobject_sources(#11764, 0) +py_cobjectnames(#11764, "py3k_warning") +py_cmembers_versioned(#11731, "py3k_warning", #11764, "2") +#11765 = @"C_type$sys.flags$2tabcheck" +py_cobjects(#11765) +py_cobjecttypes(#11765, #10045) +py_cobject_sources(#11765, 0) +py_cobjectnames(#11765, "tabcheck") +py_cmembers_versioned(#11731, "tabcheck", #11765, "2") +#11766 = @"C_type$sys.flags$2unicode" +py_cobjects(#11766) +py_cobjecttypes(#11766, #10045) +py_cobject_sources(#11766, 0) +py_cobjectnames(#11766, "unicode") +py_cmembers_versioned(#11731, "unicode", #11766, "2") +#11767 = @"C_type$sys.flags$2verbose" +py_cobjects(#11767) +py_cobjecttypes(#11767, #10045) +py_cobject_sources(#11767, 0) +py_cobjectnames(#11767, "verbose") +py_cmembers_versioned(#11731, "verbose", #11767, "2") +py_cmembers_versioned(#11731, ".super.", #10021, "2") +py_cobjectnames(#11731, "sys.flags") +py_cobjects(#11730) +py_cobjecttypes(#11730, #11731) +py_cobject_sources(#11730, 0) +py_cobjectnames(#11730, "object") +py_cmembers_versioned(#11643, "flags", #11730, "2") +#11768 = @"C_module$sys$2float_info" +#11769 = @"C_type$sys.float_info" +py_cobjects(#11769) +py_cobjecttypes(#11769, #10001) +py_cobject_sources(#11769, 0) +#11770 = @"C_type$sys.float_info$2__add__" +py_cobjects(#11770) +py_cobjecttypes(#11770, #10005) +py_cobject_sources(#11770, 0) +py_cobjectnames(#11770, "__add__") +py_cmembers_versioned(#11769, "__add__", #11770, "2") +#11771 = @"C_type$sys.float_info$2__contains__" +py_cobjects(#11771) +py_cobjecttypes(#11771, #10005) +py_cobject_sources(#11771, 0) +py_cobjectnames(#11771, "__contains__") +py_cmembers_versioned(#11769, "__contains__", #11771, "2") +#11772 = @"C_bytes$935b023aceb2b524c5055152b512bae674cf28fd" +py_cobjects(#11772) +py_cobjecttypes(#11772, #10028) +py_cobject_sources(#11772, 0) +py_cobjectnames(#11772, "b'sys.float_info + +A structseq holding information about the float type. It contains low level +information about the precision and internal representation. Please study +your system's :file:`float.h` for more information.'") +py_cmembers_versioned(#11769, "__doc__", #11772, "2") +#11773 = @"C_type$sys.float_info$2__eq__" +py_cobjects(#11773) +py_cobjecttypes(#11773, #10005) +py_cobject_sources(#11773, 0) +py_cobjectnames(#11773, "__eq__") +py_cmembers_versioned(#11769, "__eq__", #11773, "2") +#11774 = @"C_type$sys.float_info$2__ge__" +py_cobjects(#11774) +py_cobjecttypes(#11774, #10005) +py_cobject_sources(#11774, 0) +py_cobjectnames(#11774, "__ge__") +py_cmembers_versioned(#11769, "__ge__", #11774, "2") +#11775 = @"C_type$sys.float_info$2__getitem__" +py_cobjects(#11775) +py_cobjecttypes(#11775, #10005) +py_cobject_sources(#11775, 0) +py_cobjectnames(#11775, "__getitem__") +py_cmembers_versioned(#11769, "__getitem__", #11775, "2") +#11776 = @"C_type$sys.float_info$2__getslice__" +py_cobjects(#11776) +py_cobjecttypes(#11776, #10005) +py_cobject_sources(#11776, 0) +py_cobjectnames(#11776, "__getslice__") +py_cmembers_versioned(#11769, "__getslice__", #11776, "2") +#11777 = @"C_type$sys.float_info$2__gt__" +py_cobjects(#11777) +py_cobjecttypes(#11777, #10005) +py_cobject_sources(#11777, 0) +py_cobjectnames(#11777, "__gt__") +py_cmembers_versioned(#11769, "__gt__", #11777, "2") +#11778 = @"C_type$sys.float_info$2__hash__" +py_cobjects(#11778) +py_cobjecttypes(#11778, #10005) +py_cobject_sources(#11778, 0) +py_cobjectnames(#11778, "__hash__") +py_cmembers_versioned(#11769, "__hash__", #11778, "2") +#11779 = @"C_type$sys.float_info$2__le__" +py_cobjects(#11779) +py_cobjecttypes(#11779, #10005) +py_cobject_sources(#11779, 0) +py_cobjectnames(#11779, "__le__") +py_cmembers_versioned(#11769, "__le__", #11779, "2") +#11780 = @"C_type$sys.float_info$2__len__" +py_cobjects(#11780) +py_cobjecttypes(#11780, #10005) +py_cobject_sources(#11780, 0) +py_cobjectnames(#11780, "__len__") +py_cmembers_versioned(#11769, "__len__", #11780, "2") +#11781 = @"C_type$sys.float_info$2__lt__" +py_cobjects(#11781) +py_cobjecttypes(#11781, #10005) +py_cobject_sources(#11781, 0) +py_cobjectnames(#11781, "__lt__") +py_cmembers_versioned(#11769, "__lt__", #11781, "2") +#11782 = @"C_type$sys.float_info$2__mul__" +py_cobjects(#11782) +py_cobjecttypes(#11782, #10005) +py_cobject_sources(#11782, 0) +py_cobjectnames(#11782, "__mul__") +py_cmembers_versioned(#11769, "__mul__", #11782, "2") +#11783 = @"C_type$sys.float_info$2__ne__" +py_cobjects(#11783) +py_cobjecttypes(#11783, #10005) +py_cobject_sources(#11783, 0) +py_cobjectnames(#11783, "__ne__") +py_cmembers_versioned(#11769, "__ne__", #11783, "2") +#11784 = @"C_type$sys.float_info$2__new__" +py_cobjects(#11784) +py_cobjecttypes(#11784, #10075) +py_cobject_sources(#11784, 0) +py_cobjectnames(#11784, "__new__") +py_cmembers_versioned(#11769, "__new__", #11784, "2") +#11785 = @"C_type$sys.float_info$2__reduce__" +py_cobjects(#11785) +py_cobjecttypes(#11785, #10034) +py_cobject_sources(#11785, 0) +py_cobjectnames(#11785, "__reduce__") +py_cmembers_versioned(#11769, "__reduce__", #11785, "2") +#11786 = @"C_type$sys.float_info$2__repr__" +py_cobjects(#11786) +py_cobjecttypes(#11786, #10005) +py_cobject_sources(#11786, 0) +py_cobjectnames(#11786, "__repr__") +py_cmembers_versioned(#11769, "__repr__", #11786, "2") +#11787 = @"C_type$sys.float_info$2__rmul__" +py_cobjects(#11787) +py_cobjecttypes(#11787, #10005) +py_cobject_sources(#11787, 0) +py_cobjectnames(#11787, "__rmul__") +py_cmembers_versioned(#11769, "__rmul__", #11787, "2") +#11788 = @"C_type$sys.float_info$2dig" +py_cobjects(#11788) +py_cobjecttypes(#11788, #10045) +py_cobject_sources(#11788, 0) +py_cobjectnames(#11788, "dig") +py_cmembers_versioned(#11769, "dig", #11788, "2") +#11789 = @"C_type$sys.float_info$2epsilon" +py_cobjects(#11789) +py_cobjecttypes(#11789, #10045) +py_cobject_sources(#11789, 0) +py_cobjectnames(#11789, "epsilon") +py_cmembers_versioned(#11769, "epsilon", #11789, "2") +#11790 = @"C_type$sys.float_info$2mant_dig" +py_cobjects(#11790) +py_cobjecttypes(#11790, #10045) +py_cobject_sources(#11790, 0) +py_cobjectnames(#11790, "mant_dig") +py_cmembers_versioned(#11769, "mant_dig", #11790, "2") +#11791 = @"C_type$sys.float_info$2max" +py_cobjects(#11791) +py_cobjecttypes(#11791, #10045) +py_cobject_sources(#11791, 0) +py_cobjectnames(#11791, "max") +py_cmembers_versioned(#11769, "max", #11791, "2") +#11792 = @"C_type$sys.float_info$2max_10_exp" +py_cobjects(#11792) +py_cobjecttypes(#11792, #10045) +py_cobject_sources(#11792, 0) +py_cobjectnames(#11792, "max_10_exp") +py_cmembers_versioned(#11769, "max_10_exp", #11792, "2") +#11793 = @"C_type$sys.float_info$2max_exp" +py_cobjects(#11793) +py_cobjecttypes(#11793, #10045) +py_cobject_sources(#11793, 0) +py_cobjectnames(#11793, "max_exp") +py_cmembers_versioned(#11769, "max_exp", #11793, "2") +#11794 = @"C_type$sys.float_info$2min" +py_cobjects(#11794) +py_cobjecttypes(#11794, #10045) +py_cobject_sources(#11794, 0) +py_cobjectnames(#11794, "min") +py_cmembers_versioned(#11769, "min", #11794, "2") +#11795 = @"C_type$sys.float_info$2min_10_exp" +py_cobjects(#11795) +py_cobjecttypes(#11795, #10045) +py_cobject_sources(#11795, 0) +py_cobjectnames(#11795, "min_10_exp") +py_cmembers_versioned(#11769, "min_10_exp", #11795, "2") +#11796 = @"C_type$sys.float_info$2min_exp" +py_cobjects(#11796) +py_cobjecttypes(#11796, #10045) +py_cobject_sources(#11796, 0) +py_cobjectnames(#11796, "min_exp") +py_cmembers_versioned(#11769, "min_exp", #11796, "2") +#11797 = @"C_int$11" +py_cobjects(#11797) +py_cobjecttypes(#11797, #10449) +py_cobject_sources(#11797, 0) +py_cobjectnames(#11797, "11") +py_cmembers_versioned(#11769, "n_fields", #11797, "2") +py_cmembers_versioned(#11769, "n_sequence_fields", #11797, "2") +py_cmembers_versioned(#11769, "n_unnamed_fields", #11760, "2") +#11798 = @"C_type$sys.float_info$2radix" +py_cobjects(#11798) +py_cobjecttypes(#11798, #10045) +py_cobject_sources(#11798, 0) +py_cobjectnames(#11798, "radix") +py_cmembers_versioned(#11769, "radix", #11798, "2") +#11799 = @"C_type$sys.float_info$2rounds" +py_cobjects(#11799) +py_cobjecttypes(#11799, #10045) +py_cobject_sources(#11799, 0) +py_cobjectnames(#11799, "rounds") +py_cmembers_versioned(#11769, "rounds", #11799, "2") +py_cmembers_versioned(#11769, ".super.", #10021, "2") +py_cobjectnames(#11769, "sys.float_info") +py_cobjects(#11768) +py_cobjecttypes(#11768, #11769) +py_cobject_sources(#11768, 0) +py_cobjectnames(#11768, "object") +py_cmembers_versioned(#11643, "float_info", #11768, "2") +#11800 = @"C_bytes$a0f4ea7d91495df92bbac2e2149dfb850fe81396" +py_cobjects(#11800) +py_cobjecttypes(#11800, #10028) +py_cobject_sources(#11800, 0) +py_cobjectnames(#11800, "b'short'") +py_cmembers_versioned(#11643, "float_repr_style", #11800, "2") +#11801 = @"C_module$sys$2getcheckinterval" +py_cobjects(#11801) +py_cobjecttypes(#11801, #10075) +py_cobject_sources(#11801, 0) +py_cobjectnames(#11801, "getcheckinterval") +py_cmembers_versioned(#11643, "getcheckinterval", #11801, "2") +#11802 = @"C_module$sys$2getdefaultencoding" +py_cobjects(#11802) +py_cobjecttypes(#11802, #10075) +py_cobject_sources(#11802, 0) +py_cobjectnames(#11802, "getdefaultencoding") +py_cmembers_versioned(#11643, "getdefaultencoding", #11802, "2") +#11803 = @"C_module$sys$2getdlopenflags" +py_cobjects(#11803) +py_cobjecttypes(#11803, #10075) +py_cobject_sources(#11803, 0) +py_cobjectnames(#11803, "getdlopenflags") +py_cmembers_versioned(#11643, "getdlopenflags", #11803, "2") +#11804 = @"C_module$sys$2getfilesystemencoding" +py_cobjects(#11804) +py_cobjecttypes(#11804, #10075) +py_cobject_sources(#11804, 0) +py_cobjectnames(#11804, "getfilesystemencoding") +py_cmembers_versioned(#11643, "getfilesystemencoding", #11804, "2") +#11805 = @"C_module$sys$2getprofile" +py_cobjects(#11805) +py_cobjecttypes(#11805, #10075) +py_cobject_sources(#11805, 0) +py_cobjectnames(#11805, "getprofile") +py_cmembers_versioned(#11643, "getprofile", #11805, "2") +#11806 = @"C_module$sys$2getrecursionlimit" +py_cobjects(#11806) +py_cobjecttypes(#11806, #10075) +py_cobject_sources(#11806, 0) +py_cobjectnames(#11806, "getrecursionlimit") +py_cmembers_versioned(#11643, "getrecursionlimit", #11806, "2") +#11807 = @"C_module$sys$2getrefcount" +py_cobjects(#11807) +py_cobjecttypes(#11807, #10075) +py_cobject_sources(#11807, 0) +py_cobjectnames(#11807, "getrefcount") +py_cmembers_versioned(#11643, "getrefcount", #11807, "2") +#11808 = @"C_module$sys$2getsizeof" +py_cobjects(#11808) +py_cobjecttypes(#11808, #10075) +py_cobject_sources(#11808, 0) +py_cobjectnames(#11808, "getsizeof") +py_cmembers_versioned(#11643, "getsizeof", #11808, "2") +#11809 = @"C_module$sys$2gettrace" +py_cobjects(#11809) +py_cobjecttypes(#11809, #10075) +py_cobject_sources(#11809, 0) +py_cobjectnames(#11809, "gettrace") +py_cmembers_versioned(#11643, "gettrace", #11809, "2") +#11810 = @"C_int$34018032" +py_cobjects(#11810) +py_cobjecttypes(#11810, #10449) +py_cobject_sources(#11810, 0) +py_cobjectnames(#11810, "34018032") +py_cmembers_versioned(#11643, "hexversion", #11810, "2") +#11811 = @"C_module$sys$2long_info" +#11812 = @"C_type$sys.long_info" +py_cobjects(#11812) +py_cobjecttypes(#11812, #10001) +py_cobject_sources(#11812, 0) +#11813 = @"C_type$sys.long_info$2__add__" +py_cobjects(#11813) +py_cobjecttypes(#11813, #10005) +py_cobject_sources(#11813, 0) +py_cobjectnames(#11813, "__add__") +py_cmembers_versioned(#11812, "__add__", #11813, "2") +#11814 = @"C_type$sys.long_info$2__contains__" +py_cobjects(#11814) +py_cobjecttypes(#11814, #10005) +py_cobject_sources(#11814, 0) +py_cobjectnames(#11814, "__contains__") +py_cmembers_versioned(#11812, "__contains__", #11814, "2") +#11815 = @"C_bytes$3079de10197f97ccf4003107de0dcbfaa45945d0" +py_cobjects(#11815) +py_cobjecttypes(#11815, #10028) +py_cobject_sources(#11815, 0) +py_cobjectnames(#11815, "b'sys.long_info + +A struct sequence that holds information about Python's +internal representation of integers. The attributes are read only.'") +py_cmembers_versioned(#11812, "__doc__", #11815, "2") +#11816 = @"C_type$sys.long_info$2__eq__" +py_cobjects(#11816) +py_cobjecttypes(#11816, #10005) +py_cobject_sources(#11816, 0) +py_cobjectnames(#11816, "__eq__") +py_cmembers_versioned(#11812, "__eq__", #11816, "2") +#11817 = @"C_type$sys.long_info$2__ge__" +py_cobjects(#11817) +py_cobjecttypes(#11817, #10005) +py_cobject_sources(#11817, 0) +py_cobjectnames(#11817, "__ge__") +py_cmembers_versioned(#11812, "__ge__", #11817, "2") +#11818 = @"C_type$sys.long_info$2__getitem__" +py_cobjects(#11818) +py_cobjecttypes(#11818, #10005) +py_cobject_sources(#11818, 0) +py_cobjectnames(#11818, "__getitem__") +py_cmembers_versioned(#11812, "__getitem__", #11818, "2") +#11819 = @"C_type$sys.long_info$2__getslice__" +py_cobjects(#11819) +py_cobjecttypes(#11819, #10005) +py_cobject_sources(#11819, 0) +py_cobjectnames(#11819, "__getslice__") +py_cmembers_versioned(#11812, "__getslice__", #11819, "2") +#11820 = @"C_type$sys.long_info$2__gt__" +py_cobjects(#11820) +py_cobjecttypes(#11820, #10005) +py_cobject_sources(#11820, 0) +py_cobjectnames(#11820, "__gt__") +py_cmembers_versioned(#11812, "__gt__", #11820, "2") +#11821 = @"C_type$sys.long_info$2__hash__" +py_cobjects(#11821) +py_cobjecttypes(#11821, #10005) +py_cobject_sources(#11821, 0) +py_cobjectnames(#11821, "__hash__") +py_cmembers_versioned(#11812, "__hash__", #11821, "2") +#11822 = @"C_type$sys.long_info$2__le__" +py_cobjects(#11822) +py_cobjecttypes(#11822, #10005) +py_cobject_sources(#11822, 0) +py_cobjectnames(#11822, "__le__") +py_cmembers_versioned(#11812, "__le__", #11822, "2") +#11823 = @"C_type$sys.long_info$2__len__" +py_cobjects(#11823) +py_cobjecttypes(#11823, #10005) +py_cobject_sources(#11823, 0) +py_cobjectnames(#11823, "__len__") +py_cmembers_versioned(#11812, "__len__", #11823, "2") +#11824 = @"C_type$sys.long_info$2__lt__" +py_cobjects(#11824) +py_cobjecttypes(#11824, #10005) +py_cobject_sources(#11824, 0) +py_cobjectnames(#11824, "__lt__") +py_cmembers_versioned(#11812, "__lt__", #11824, "2") +#11825 = @"C_type$sys.long_info$2__mul__" +py_cobjects(#11825) +py_cobjecttypes(#11825, #10005) +py_cobject_sources(#11825, 0) +py_cobjectnames(#11825, "__mul__") +py_cmembers_versioned(#11812, "__mul__", #11825, "2") +#11826 = @"C_type$sys.long_info$2__ne__" +py_cobjects(#11826) +py_cobjecttypes(#11826, #10005) +py_cobject_sources(#11826, 0) +py_cobjectnames(#11826, "__ne__") +py_cmembers_versioned(#11812, "__ne__", #11826, "2") +#11827 = @"C_type$sys.long_info$2__new__" +py_cobjects(#11827) +py_cobjecttypes(#11827, #10075) +py_cobject_sources(#11827, 0) +py_cobjectnames(#11827, "__new__") +py_cmembers_versioned(#11812, "__new__", #11827, "2") +#11828 = @"C_type$sys.long_info$2__reduce__" +py_cobjects(#11828) +py_cobjecttypes(#11828, #10034) +py_cobject_sources(#11828, 0) +py_cobjectnames(#11828, "__reduce__") +py_cmembers_versioned(#11812, "__reduce__", #11828, "2") +#11829 = @"C_type$sys.long_info$2__repr__" +py_cobjects(#11829) +py_cobjecttypes(#11829, #10005) +py_cobject_sources(#11829, 0) +py_cobjectnames(#11829, "__repr__") +py_cmembers_versioned(#11812, "__repr__", #11829, "2") +#11830 = @"C_type$sys.long_info$2__rmul__" +py_cobjects(#11830) +py_cobjecttypes(#11830, #10005) +py_cobject_sources(#11830, 0) +py_cobjectnames(#11830, "__rmul__") +py_cmembers_versioned(#11812, "__rmul__", #11830, "2") +#11831 = @"C_type$sys.long_info$2bits_per_digit" +py_cobjects(#11831) +py_cobjecttypes(#11831, #10045) +py_cobject_sources(#11831, 0) +py_cobjectnames(#11831, "bits_per_digit") +py_cmembers_versioned(#11812, "bits_per_digit", #11831, "2") +#11832 = @"C_int$2" +py_cobjects(#11832) +py_cobjecttypes(#11832, #10449) +py_cobject_sources(#11832, 0) +py_cobjectnames(#11832, "2") +py_cmembers_versioned(#11812, "n_fields", #11832, "2") +py_cmembers_versioned(#11812, "n_sequence_fields", #11832, "2") +py_cmembers_versioned(#11812, "n_unnamed_fields", #11760, "2") +#11833 = @"C_type$sys.long_info$2sizeof_digit" +py_cobjects(#11833) +py_cobjecttypes(#11833, #10045) +py_cobject_sources(#11833, 0) +py_cobjectnames(#11833, "sizeof_digit") +py_cmembers_versioned(#11812, "sizeof_digit", #11833, "2") +py_cmembers_versioned(#11812, ".super.", #10021, "2") +py_cobjectnames(#11812, "sys.long_info") +py_cobjects(#11811) +py_cobjecttypes(#11811, #11812) +py_cobject_sources(#11811, 0) +py_cobjectnames(#11811, "object") +py_cmembers_versioned(#11643, "long_info", #11811, "2") +#11834 = @"C_int$9223372036854775807" +py_cobjects(#11834) +py_cobjecttypes(#11834, #10449) +py_cobject_sources(#11834, 0) +py_cobjectnames(#11834, "9223372036854775807") +py_cmembers_versioned(#11643, "maxint", #11834, "2") +#11835 = @"C_int$9223372036854775807" +py_cobjects(#11835) +py_cobjecttypes(#11835, #10449) +py_cobject_sources(#11835, 0) +py_cobjectnames(#11835, "9223372036854775807") +py_cmembers_versioned(#11643, "maxsize", #11835, "2") +#11836 = @"C_int$1114111" +py_cobjects(#11836) +py_cobjecttypes(#11836, #10449) +py_cobject_sources(#11836, 0) +py_cobjectnames(#11836, "1114111") +py_cmembers_versioned(#11643, "maxunicode", #11836, "2") +#11837 = @"C_module$sys$2meta_path" +py_cobjects(#11837) +py_cobjecttypes(#11837, #11360) +py_cobject_sources(#11837, 0) +py_cobjectnames(#11837, "object") +py_cmembers_versioned(#11643, "meta_path", #11837, "2") +#11838 = @"C_module$sys$2modules" +py_cobjects(#11838) +py_cobjecttypes(#11838, #10386) +py_cobject_sources(#11838, 0) +py_cobjectnames(#11838, "object") +py_cmembers_versioned(#11643, "modules", #11838, "2") +#11839 = @"C_module$sys$2path" +py_cobjects(#11839) +py_cobjecttypes(#11839, #11360) +py_cobject_sources(#11839, 0) +#11840 = @"C_bytes$efb8145a2b5da8ef405c09c84a18c90edccd541a" +py_cobjects(#11840) +py_cobjecttypes(#11840, #10028) +py_cobject_sources(#11840, 0) +py_cobjectnames(#11840, "b'/workspaces/semmle-code/target/intree/codeql-python/python/tools/python2.7.zip'") +py_citems(#11839, 0, #11840) +#11841 = @"C_bytes$fa65de5b131ee4329913b3ead2895c3c234fc758" +py_cobjects(#11841) +py_cobjecttypes(#11841, #10028) +py_cobject_sources(#11841, 0) +py_cobjectnames(#11841, "b'/workspaces/semmle-code/target/intree/codeql-python/python/tools'") +py_citems(#11839, 1, #11841) +#11842 = @"C_bytes$c7224070988605c1ddb329e10b116de47fe6bf5c" +py_cobjects(#11842) +py_cobjecttypes(#11842, #10028) +py_cobject_sources(#11842, 0) +py_cobjectnames(#11842, "b'/usr/lib/python2.7'") +py_citems(#11839, 2, #11842) +#11843 = @"C_bytes$349ca952d5a923bbfb29607f56493c4920f938f6" +py_cobjects(#11843) +py_cobjecttypes(#11843, #10028) +py_cobject_sources(#11843, 0) +py_cobjectnames(#11843, "b'/usr/lib/python2.7/plat-x86_64-linux-gnu'") +py_citems(#11839, 3, #11843) +#11844 = @"C_bytes$caace35464f93ae3361f69382760e1b558fcf7aa" +py_cobjects(#11844) +py_cobjecttypes(#11844, #10028) +py_cobject_sources(#11844, 0) +py_cobjectnames(#11844, "b'/usr/lib/python2.7/lib-tk'") +py_citems(#11839, 4, #11844) +#11845 = @"C_bytes$ea726fcf860a32500651bb90e9b83b758b87353a" +py_cobjects(#11845) +py_cobjecttypes(#11845, #10028) +py_cobject_sources(#11845, 0) +py_cobjectnames(#11845, "b'/usr/lib/python2.7/lib-old'") +py_citems(#11839, 5, #11845) +#11846 = @"C_bytes$dcfdcdb573f2f25fc4b0324cab8e960c840fa208" +py_cobjects(#11846) +py_cobjecttypes(#11846, #10028) +py_cobject_sources(#11846, 0) +py_cobjectnames(#11846, "b'/usr/lib/python2.7/lib-dynload'") +py_citems(#11839, 6, #11846) +#11847 = @"C_bytes$d97021114fe7afd96e842fe6937049e0459d35d3" +py_cobjects(#11847) +py_cobjecttypes(#11847, #10028) +py_cobject_sources(#11847, 0) +py_cobjectnames(#11847, "b'/usr/local/lib/python2.7/dist-packages'") +py_citems(#11839, 7, #11847) +#11848 = @"C_bytes$fd8e1150b06a91ba24459b1b1fdc6a38c2b363f4" +py_cobjects(#11848) +py_cobjecttypes(#11848, #10028) +py_cobject_sources(#11848, 0) +py_cobjectnames(#11848, "b'/usr/lib/python2.7/dist-packages'") +py_citems(#11839, 8, #11848) +py_cobjectnames(#11839, "object") +py_cmembers_versioned(#11643, "path", #11839, "2") +#11849 = @"C_module$sys$2path_hooks" +py_cobjects(#11849) +py_cobjecttypes(#11849, #11360) +py_cobject_sources(#11849, 0) +#11850 = @"C_type$zipimport.zipimporter" +py_cobjects(#11850) +py_cobjecttypes(#11850, #10001) +py_cobject_sources(#11850, 0) +#11851 = @"C_bytes$d5f944c873ea5f089da3fdcb81a1f1d5f7c52748" +py_cobjects(#11851) +py_cobjecttypes(#11851, #10028) +py_cobject_sources(#11851, 0) +py_cobjectnames(#11851, "b'zipimporter(archivepath) -> zipimporter object + +Create a new zipimporter instance. 'archivepath' must be a path to +a zipfile, or to a specific path inside a zipfile. For example, it can be +'/tmp/myimport.zip', or '/tmp/myimport.zip/mydirectory', if mydirectory is a +valid directory inside the archive. + +'ZipImportError is raised if 'archivepath' doesn't point to a valid Zip +archive. + +The 'archive' attribute of zipimporter objects contains the name of the +zipfile targeted.'") +py_cmembers_versioned(#11850, "__doc__", #11851, "2") +#11852 = @"C_type$zipimport.zipimporter$2__getattribute__" +py_cobjects(#11852) +py_cobjecttypes(#11852, #10005) +py_cobject_sources(#11852, 0) +py_cobjectnames(#11852, "__getattribute__") +py_cmembers_versioned(#11850, "__getattribute__", #11852, "2") +#11853 = @"C_type$zipimport.zipimporter$2__init__" +py_cobjects(#11853) +py_cobjecttypes(#11853, #10005) +py_cobject_sources(#11853, 0) +py_cobjectnames(#11853, "__init__") +py_cmembers_versioned(#11850, "__init__", #11853, "2") +#11854 = @"C_type$zipimport.zipimporter$2__new__" +py_cobjects(#11854) +py_cobjecttypes(#11854, #10075) +py_cobject_sources(#11854, 0) +py_cobjectnames(#11854, "__new__") +py_cmembers_versioned(#11850, "__new__", #11854, "2") +#11855 = @"C_type$zipimport.zipimporter$2__repr__" +py_cobjects(#11855) +py_cobjecttypes(#11855, #10005) +py_cobject_sources(#11855, 0) +py_cobjectnames(#11855, "__repr__") +py_cmembers_versioned(#11850, "__repr__", #11855, "2") +#11856 = @"C_type$zipimport.zipimporter$2_files" +py_cobjects(#11856) +py_cobjecttypes(#11856, #10045) +py_cobject_sources(#11856, 0) +py_cobjectnames(#11856, "_files") +py_cmembers_versioned(#11850, "_files", #11856, "2") +#11857 = @"C_type$zipimport.zipimporter$2archive" +py_cobjects(#11857) +py_cobjecttypes(#11857, #10045) +py_cobject_sources(#11857, 0) +py_cobjectnames(#11857, "archive") +py_cmembers_versioned(#11850, "archive", #11857, "2") +#11858 = @"C_type$zipimport.zipimporter$2find_module" +py_cobjects(#11858) +py_cobjecttypes(#11858, #10034) +py_cobject_sources(#11858, 0) +py_cobjectnames(#11858, "find_module") +py_cmembers_versioned(#11850, "find_module", #11858, "2") +#11859 = @"C_type$zipimport.zipimporter$2get_code" +py_cobjects(#11859) +py_cobjecttypes(#11859, #10034) +py_cobject_sources(#11859, 0) +py_cobjectnames(#11859, "get_code") +py_cmembers_versioned(#11850, "get_code", #11859, "2") +#11860 = @"C_type$zipimport.zipimporter$2get_data" +py_cobjects(#11860) +py_cobjecttypes(#11860, #10034) +py_cobject_sources(#11860, 0) +py_cobjectnames(#11860, "get_data") +py_cmembers_versioned(#11850, "get_data", #11860, "2") +#11861 = @"C_type$zipimport.zipimporter$2get_filename" +py_cobjects(#11861) +py_cobjecttypes(#11861, #10034) +py_cobject_sources(#11861, 0) +py_cobjectnames(#11861, "get_filename") +py_cmembers_versioned(#11850, "get_filename", #11861, "2") +#11862 = @"C_type$zipimport.zipimporter$2get_source" +py_cobjects(#11862) +py_cobjecttypes(#11862, #10034) +py_cobject_sources(#11862, 0) +py_cobjectnames(#11862, "get_source") +py_cmembers_versioned(#11850, "get_source", #11862, "2") +#11863 = @"C_type$zipimport.zipimporter$2is_package" +py_cobjects(#11863) +py_cobjecttypes(#11863, #10034) +py_cobject_sources(#11863, 0) +py_cobjectnames(#11863, "is_package") +py_cmembers_versioned(#11850, "is_package", #11863, "2") +#11864 = @"C_type$zipimport.zipimporter$2load_module" +py_cobjects(#11864) +py_cobjecttypes(#11864, #10034) +py_cobject_sources(#11864, 0) +py_cobjectnames(#11864, "load_module") +py_cmembers_versioned(#11850, "load_module", #11864, "2") +#11865 = @"C_type$zipimport.zipimporter$2prefix" +py_cobjects(#11865) +py_cobjecttypes(#11865, #10045) +py_cobject_sources(#11865, 0) +py_cobjectnames(#11865, "prefix") +py_cmembers_versioned(#11850, "prefix", #11865, "2") +py_cmembers_versioned(#11850, ".super.", #10021, "2") +py_cobjectnames(#11850, "zipimport.zipimporter") +py_citems(#11849, 0, #11850) +py_cobjectnames(#11849, "object") +py_cmembers_versioned(#11643, "path_hooks", #11849, "2") +#11866 = @"C_module$sys$2path_importer_cache" +py_cobjects(#11866) +py_cobjecttypes(#11866, #10386) +py_cobject_sources(#11866, 0) +py_cobjectnames(#11866, "object") +py_cmembers_versioned(#11643, "path_importer_cache", #11866, "2") +#11867 = @"C_bytes$29f466375b3518f6e00d7cd0afc4ba3d2ad38671" +py_cobjects(#11867) +py_cobjecttypes(#11867, #10028) +py_cobject_sources(#11867, 0) +py_cobjectnames(#11867, "b'linux2'") +py_cmembers_versioned(#11643, "platform", #11867, "2") +#11868 = @"C_bytes$5c0e77c46be77719bc1c0a5ec9c64b94d2a2e50c" +py_cobjects(#11868) +py_cobjecttypes(#11868, #10028) +py_cobject_sources(#11868, 0) +py_cobjectnames(#11868, "b'/usr'") +py_cmembers_versioned(#11643, "prefix", #11868, "2") +py_cmembers_versioned(#11643, "py3kwarning", #10644, "2") +py_cmembers_versioned(#11643, "pydebug", #10644, "2") +#11869 = @"C_module$sys$2setcheckinterval" +py_cobjects(#11869) +py_cobjecttypes(#11869, #10075) +py_cobject_sources(#11869, 0) +py_cobjectnames(#11869, "setcheckinterval") +py_cmembers_versioned(#11643, "setcheckinterval", #11869, "2") +#11870 = @"C_module$sys$2setdlopenflags" +py_cobjects(#11870) +py_cobjecttypes(#11870, #10075) +py_cobject_sources(#11870, 0) +py_cobjectnames(#11870, "setdlopenflags") +py_cmembers_versioned(#11643, "setdlopenflags", #11870, "2") +#11871 = @"C_module$sys$2setprofile" +py_cobjects(#11871) +py_cobjecttypes(#11871, #10075) +py_cobject_sources(#11871, 0) +py_cobjectnames(#11871, "setprofile") +py_cmembers_versioned(#11643, "setprofile", #11871, "2") +#11872 = @"C_module$sys$2setrecursionlimit" +py_cobjects(#11872) +py_cobjecttypes(#11872, #10075) +py_cobject_sources(#11872, 0) +py_cobjectnames(#11872, "setrecursionlimit") +py_cmembers_versioned(#11643, "setrecursionlimit", #11872, "2") +#11873 = @"C_module$sys$2settrace" +py_cobjects(#11873) +py_cobjecttypes(#11873, #10075) +py_cobject_sources(#11873, 0) +py_cobjectnames(#11873, "settrace") +py_cmembers_versioned(#11643, "settrace", #11873, "2") +py_cmembers_versioned(#11643, "stderr", #11648, "2") +#11874 = @"C_module$sys$2stdin" +py_cobjects(#11874) +py_cobjecttypes(#11874, #11179) +py_cobject_sources(#11874, 0) +py_cobjectnames(#11874, "object") +py_cmembers_versioned(#11643, "stdin", #11874, "2") +py_cmembers_versioned(#11643, "stdout", #11650, "2") +#11875 = @"C_module$sys$2subversion" +py_cobjects(#11875) +py_cobjecttypes(#11875, #10737) +py_cobject_sources(#11875, 0) +#11876 = @"C_bytes$3348cc07058a464ebb973af5bfdb70ca7968c2db" +py_cobjects(#11876) +py_cobjecttypes(#11876, #10028) +py_cobject_sources(#11876, 0) +py_cobjectnames(#11876, "b'CPython'") +py_citems(#11875, 0, #11876) +py_citems(#11875, 1, #11656) +py_citems(#11875, 2, #11656) +py_cobjectnames(#11875, "object") +py_cmembers_versioned(#11643, "subversion", #11875, "2") +#11877 = @"C_bytes$2c6c60b105f32b49a3571c1bb365905989630d2e" +py_cobjects(#11877) +py_cobjecttypes(#11877, #10028) +py_cobject_sources(#11877, 0) +py_cobjectnames(#11877, "b'2.7.18 (default, Jul 1 2022, 12:27:04) +[GCC 9.4.0]'") +py_cmembers_versioned(#11643, "version", #11877, "2") +#11878 = @"C_module$sys$2version_info" +#11879 = @"C_type$sys.version_info" +py_cobjects(#11879) +py_cobjecttypes(#11879, #10001) +py_cobject_sources(#11879, 0) +#11880 = @"C_type$sys.version_info$2__add__" +py_cobjects(#11880) +py_cobjecttypes(#11880, #10005) +py_cobject_sources(#11880, 0) +py_cobjectnames(#11880, "__add__") +py_cmembers_versioned(#11879, "__add__", #11880, "2") +#11881 = @"C_type$sys.version_info$2__contains__" +py_cobjects(#11881) +py_cobjecttypes(#11881, #10005) +py_cobject_sources(#11881, 0) +py_cobjectnames(#11881, "__contains__") +py_cmembers_versioned(#11879, "__contains__", #11881, "2") +#11882 = @"C_bytes$bb652b3ae5c81a17bbc0ee6a92a78ac720655a87" +py_cobjects(#11882) +py_cobjecttypes(#11882, #10028) +py_cobject_sources(#11882, 0) +py_cobjectnames(#11882, "b'sys.version_info + +Version information as a named tuple.'") +py_cmembers_versioned(#11879, "__doc__", #11882, "2") +#11883 = @"C_type$sys.version_info$2__eq__" +py_cobjects(#11883) +py_cobjecttypes(#11883, #10005) +py_cobject_sources(#11883, 0) +py_cobjectnames(#11883, "__eq__") +py_cmembers_versioned(#11879, "__eq__", #11883, "2") +#11884 = @"C_type$sys.version_info$2__ge__" +py_cobjects(#11884) +py_cobjecttypes(#11884, #10005) +py_cobject_sources(#11884, 0) +py_cobjectnames(#11884, "__ge__") +py_cmembers_versioned(#11879, "__ge__", #11884, "2") +#11885 = @"C_type$sys.version_info$2__getitem__" +py_cobjects(#11885) +py_cobjecttypes(#11885, #10005) +py_cobject_sources(#11885, 0) +py_cobjectnames(#11885, "__getitem__") +py_cmembers_versioned(#11879, "__getitem__", #11885, "2") +#11886 = @"C_type$sys.version_info$2__getslice__" +py_cobjects(#11886) +py_cobjecttypes(#11886, #10005) +py_cobject_sources(#11886, 0) +py_cobjectnames(#11886, "__getslice__") +py_cmembers_versioned(#11879, "__getslice__", #11886, "2") +#11887 = @"C_type$sys.version_info$2__gt__" +py_cobjects(#11887) +py_cobjecttypes(#11887, #10005) +py_cobject_sources(#11887, 0) +py_cobjectnames(#11887, "__gt__") +py_cmembers_versioned(#11879, "__gt__", #11887, "2") +#11888 = @"C_type$sys.version_info$2__hash__" +py_cobjects(#11888) +py_cobjecttypes(#11888, #10005) +py_cobject_sources(#11888, 0) +py_cobjectnames(#11888, "__hash__") +py_cmembers_versioned(#11879, "__hash__", #11888, "2") +#11889 = @"C_type$sys.version_info$2__le__" +py_cobjects(#11889) +py_cobjecttypes(#11889, #10005) +py_cobject_sources(#11889, 0) +py_cobjectnames(#11889, "__le__") +py_cmembers_versioned(#11879, "__le__", #11889, "2") +#11890 = @"C_type$sys.version_info$2__len__" +py_cobjects(#11890) +py_cobjecttypes(#11890, #10005) +py_cobject_sources(#11890, 0) +py_cobjectnames(#11890, "__len__") +py_cmembers_versioned(#11879, "__len__", #11890, "2") +#11891 = @"C_type$sys.version_info$2__lt__" +py_cobjects(#11891) +py_cobjecttypes(#11891, #10005) +py_cobject_sources(#11891, 0) +py_cobjectnames(#11891, "__lt__") +py_cmembers_versioned(#11879, "__lt__", #11891, "2") +#11892 = @"C_type$sys.version_info$2__mul__" +py_cobjects(#11892) +py_cobjecttypes(#11892, #10005) +py_cobject_sources(#11892, 0) +py_cobjectnames(#11892, "__mul__") +py_cmembers_versioned(#11879, "__mul__", #11892, "2") +#11893 = @"C_type$sys.version_info$2__ne__" +py_cobjects(#11893) +py_cobjecttypes(#11893, #10005) +py_cobject_sources(#11893, 0) +py_cobjectnames(#11893, "__ne__") +py_cmembers_versioned(#11879, "__ne__", #11893, "2") +#11894 = @"C_type$sys.version_info$2__new__" +py_cobjects(#11894) +py_cobjecttypes(#11894, #10075) +py_cobject_sources(#11894, 0) +py_cobjectnames(#11894, "__new__") +py_cmembers_versioned(#11879, "__new__", #11894, "2") +#11895 = @"C_type$sys.version_info$2__reduce__" +py_cobjects(#11895) +py_cobjecttypes(#11895, #10034) +py_cobject_sources(#11895, 0) +py_cobjectnames(#11895, "__reduce__") +py_cmembers_versioned(#11879, "__reduce__", #11895, "2") +#11896 = @"C_type$sys.version_info$2__repr__" +py_cobjects(#11896) +py_cobjecttypes(#11896, #10005) +py_cobject_sources(#11896, 0) +py_cobjectnames(#11896, "__repr__") +py_cmembers_versioned(#11879, "__repr__", #11896, "2") +#11897 = @"C_type$sys.version_info$2__rmul__" +py_cobjects(#11897) +py_cobjecttypes(#11897, #10005) +py_cobject_sources(#11897, 0) +py_cobjectnames(#11897, "__rmul__") +py_cmembers_versioned(#11879, "__rmul__", #11897, "2") +#11898 = @"C_type$sys.version_info$2major" +py_cobjects(#11898) +py_cobjecttypes(#11898, #10045) +py_cobject_sources(#11898, 0) +py_cobjectnames(#11898, "major") +py_cmembers_versioned(#11879, "major", #11898, "2") +#11899 = @"C_type$sys.version_info$2micro" +py_cobjects(#11899) +py_cobjecttypes(#11899, #10045) +py_cobject_sources(#11899, 0) +py_cobjectnames(#11899, "micro") +py_cmembers_versioned(#11879, "micro", #11899, "2") +#11900 = @"C_type$sys.version_info$2minor" +py_cobjects(#11900) +py_cobjecttypes(#11900, #10045) +py_cobject_sources(#11900, 0) +py_cobjectnames(#11900, "minor") +py_cmembers_versioned(#11879, "minor", #11900, "2") +#11901 = @"C_int$5" +py_cobjects(#11901) +py_cobjecttypes(#11901, #10449) +py_cobject_sources(#11901, 0) +py_cobjectnames(#11901, "5") +py_cmembers_versioned(#11879, "n_fields", #11901, "2") +py_cmembers_versioned(#11879, "n_sequence_fields", #11901, "2") +py_cmembers_versioned(#11879, "n_unnamed_fields", #11760, "2") +#11902 = @"C_type$sys.version_info$2releaselevel" +py_cobjects(#11902) +py_cobjecttypes(#11902, #10045) +py_cobject_sources(#11902, 0) +py_cobjectnames(#11902, "releaselevel") +py_cmembers_versioned(#11879, "releaselevel", #11902, "2") +#11903 = @"C_type$sys.version_info$2serial" +py_cobjects(#11903) +py_cobjecttypes(#11903, #10045) +py_cobject_sources(#11903, 0) +py_cobjectnames(#11903, "serial") +py_cmembers_versioned(#11879, "serial", #11903, "2") +py_cmembers_versioned(#11879, ".super.", #10021, "2") +py_cobjectnames(#11879, "sys.version_info") +py_cobjects(#11878) +py_cobjecttypes(#11878, #11879) +py_cobject_sources(#11878, 0) +py_cobjectnames(#11878, "object") +py_cmembers_versioned(#11643, "version_info", #11878, "2") +#11904 = @"C_module$sys$2warnoptions" +py_cobjects(#11904) +py_cobjecttypes(#11904, #11360) +py_cobject_sources(#11904, 0) +py_cobjectnames(#11904, "object") +py_cmembers_versioned(#11643, "warnoptions", #11904, "2") +py_cobjectnames(#11643, "sys") +py_special_objects(#11643, "sys") +py_special_objects(#11466, "property") +py_special_objects(#11231, "float") +py_special_objects(#11397, "locals") +py_special_objects(#10350, "Exception") +py_special_objects(#10028, "bytes") +py_special_objects(#11070, "ClassMethod") +py_special_objects(#11555, "StaticMethod") +#11905 = * +py_cobjects(#11905) +py_cobjecttypes(#11905, #10021) +py_cobject_sources(#11905, 0) +py_cobjectnames(#11905, "object") +py_special_objects(#11905, "_2") +py_special_objects(#10761, "ModuleType") +py_special_objects(#10449, "int") +py_special_objects(#10001, "type") +py_special_objects(#11360, "list") +py_special_objects(#10017, "None") +py_special_objects(#10354, "BaseException") +py_special_objects(#10075, "BuiltinFunctionType") +#11906 = @"C_type$generator" +py_cobjects(#11906) +py_cobjecttypes(#11906, #10001) +py_cobject_sources(#11906, 0) +py_cmembers_versioned(#11906, "__doc__", #10017, "2") +#11907 = @"C_type$generator$2__getattribute__" +py_cobjects(#11907) +py_cobjecttypes(#11907, #10005) +py_cobject_sources(#11907, 0) +py_cobjectnames(#11907, "__getattribute__") +py_cmembers_versioned(#11906, "__getattribute__", #11907, "2") +#11908 = @"C_type$generator$2__iter__" +py_cobjects(#11908) +py_cobjecttypes(#11908, #10005) +py_cobject_sources(#11908, 0) +py_cobjectnames(#11908, "__iter__") +py_cmembers_versioned(#11906, "__iter__", #11908, "2") +#11909 = @"C_type$generator$2__name__" +py_cobjects(#11909) +py_cobjecttypes(#11909, #10003) +py_cobject_sources(#11909, 0) +#11910 = @"C_type$generator$2__name__$2__set__" +py_cobjects(#11910) +py_cobjecttypes(#11910, #10009) +py_cobject_sources(#11910, 0) +py_cobjectnames(#11910, "__set__") +py_cmembers_versioned(#11909, "__set__", #11910, "2") +#11911 = @"C_type$generator$2__name__$2__getattribute__" +py_cobjects(#11911) +py_cobjecttypes(#11911, #10009) +py_cobject_sources(#11911, 0) +py_cobjectnames(#11911, "__getattribute__") +py_cmembers_versioned(#11909, "__getattribute__", #11911, "2") +py_cmembers_versioned(#11909, "__objclass__", #11906, "2") +#11912 = @"C_type$generator$2__name__$2__repr__" +py_cobjects(#11912) +py_cobjecttypes(#11912, #10009) +py_cobject_sources(#11912, 0) +py_cobjectnames(#11912, "__repr__") +py_cmembers_versioned(#11909, "__repr__", #11912, "2") +#11913 = @"C_type$generator$2__name__$2__get__" +py_cobjects(#11913) +py_cobjecttypes(#11913, #10009) +py_cobject_sources(#11913, 0) +py_cobjectnames(#11913, "__get__") +py_cmembers_versioned(#11909, "__get__", #11913, "2") +#11914 = @"C_bytes$23069b0900e4d3bd2800b9a2e39b6ebbae74db26" +py_cobjects(#11914) +py_cobjecttypes(#11914, #10028) +py_cobject_sources(#11914, 0) +py_cobjectnames(#11914, "b'Return the name of the generator's associated code object.'") +py_cmembers_versioned(#11909, "__doc__", #11914, "2") +#11915 = @"C_type$generator$2__name__$2__delete__" +py_cobjects(#11915) +py_cobjecttypes(#11915, #10009) +py_cobject_sources(#11915, 0) +py_cobjectnames(#11915, "__delete__") +py_cmembers_versioned(#11909, "__delete__", #11915, "2") +py_cobjectnames(#11909, "__name__") +py_cmembers_versioned(#11906, "__name__", #11909, "2") +#11916 = @"C_type$generator$2__repr__" +py_cobjects(#11916) +py_cobjecttypes(#11916, #10005) +py_cobject_sources(#11916, 0) +py_cobjectnames(#11916, "__repr__") +py_cmembers_versioned(#11906, "__repr__", #11916, "2") +#11917 = @"C_type$generator$2close" +py_cobjects(#11917) +py_cobjecttypes(#11917, #10034) +py_cobject_sources(#11917, 0) +py_cobjectnames(#11917, "close") +py_cmembers_versioned(#11906, "close", #11917, "2") +#11918 = @"C_type$generator$2gi_code" +py_cobjects(#11918) +py_cobjecttypes(#11918, #10045) +py_cobject_sources(#11918, 0) +py_cobjectnames(#11918, "gi_code") +py_cmembers_versioned(#11906, "gi_code", #11918, "2") +#11919 = @"C_type$generator$2gi_frame" +py_cobjects(#11919) +py_cobjecttypes(#11919, #10045) +py_cobject_sources(#11919, 0) +py_cobjectnames(#11919, "gi_frame") +py_cmembers_versioned(#11906, "gi_frame", #11919, "2") +#11920 = @"C_type$generator$2gi_running" +py_cobjects(#11920) +py_cobjecttypes(#11920, #10045) +py_cobject_sources(#11920, 0) +py_cobjectnames(#11920, "gi_running") +py_cmembers_versioned(#11906, "gi_running", #11920, "2") +#11921 = @"C_type$generator$2next" +py_cobjects(#11921) +py_cobjecttypes(#11921, #10005) +py_cobject_sources(#11921, 0) +py_cobjectnames(#11921, "next") +py_cmembers_versioned(#11906, "next", #11921, "2") +#11922 = @"C_type$generator$2send" +py_cobjects(#11922) +py_cobjecttypes(#11922, #10034) +py_cobject_sources(#11922, 0) +py_cobjectnames(#11922, "send") +py_cmembers_versioned(#11906, "send", #11922, "2") +#11923 = @"C_type$generator$2throw" +py_cobjects(#11923) +py_cobjecttypes(#11923, #10034) +py_cobject_sources(#11923, 0) +py_cobjectnames(#11923, "throw") +py_cmembers_versioned(#11906, "throw", #11923, "2") +py_cmembers_versioned(#11906, ".super.", #10021, "2") +py_cobjectnames(#11906, "generator") +py_special_objects(#11906, "generator") +#11924 = @"$_semmle_unknown_type" +py_cobjects(#11924) +py_cobjecttypes(#11924, #10021) +py_cobject_sources(#11924, 0) +py_cobjectnames(#11924, "object") +py_special_objects(#11924, "_semmle_unknown_type") +#11925 = @"$_semmle_undefined_value" +py_cobjects(#11925) +py_cobjecttypes(#11925, #10021) +py_cobject_sources(#11925, 0) +py_cobjectnames(#11925, "object") +py_special_objects(#11925, "_semmle_undefined_value") diff --git a/python/extractor/semmle/dbscheme.template b/python/extractor/semmle/dbscheme.template new file mode 100644 index 00000000000..07b65434bbd --- /dev/null +++ b/python/extractor/semmle/dbscheme.template @@ -0,0 +1,422 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2020-07-02 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/*- DEPRECATED: External defects and metrics -*/ + +externalDefects( + unique int id : @externalDefect, + varchar(900) queryPath : string ref, + int location : @location ref, + varchar(900) message : string ref, + float severity : float ref +); + +externalMetrics( + unique int id : @externalMetric, + varchar(900) queryPath : string ref, + int location : @location ref, + float value : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- DEPRECATED: Snapshot date -*/ + +snapshotDate(unique date snapshotDate : date ref); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- DEPRECATED: Duplicate code -*/ + +duplicateCode( + unique int id : @duplication, + string relativePath : string ref, + int equivClass : int ref +); + +similarCode( + unique int id : @similarity, + string relativePath : string ref, + int equivClass : int ref +); + +@duplication_or_similarity = @duplication | @similarity + +tokens( + int id : @duplication_or_similarity ref, + int offset : int ref, + int beginLine : int ref, + int beginColumn : int ref, + int endLine : int ref, + int endColumn : int ref +); + +/*- DEPRECATED: Version control data -*/ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error; + +/*- Python dbscheme -*/ + +/* + * Line metrics + */ +py_codelines(int id : @py_scope ref, + int count : int ref); + +py_commentlines(int id : @py_scope ref, + int count : int ref); + +py_docstringlines(int id : @py_scope ref, + int count : int ref); + +py_alllines(int id : @py_scope ref, + int count : int ref); + +/**************************** + Python dbscheme +****************************/ + +@sourceline = @file | @py_Module | @xmllocatable; + +@location = @location_ast | @location_default ; + +locations_ast(unique int id: @location_ast, + int module: @py_Module ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +file_contents(unique int file: @file ref, string contents: string ref); + +py_module_path(int module: @py_Module ref, int file: @container ref); + +variable(unique int id : @py_variable, + int scope : @py_scope ref, + varchar(1) name : string ref); + +py_line_lengths(unique int id : @py_line, + int file: @py_Module ref, + int line : int ref, + int length : int ref); + +py_extracted_version(int module : @py_Module ref, + varchar(1) version : string ref); + +$AST_SCHEME$ + +/* Map relative names to absolute names for imports */ +py_absolute_names(int module : @py_Module ref, + varchar(1) relname : string ref, + varchar(1) absname : string ref); + +py_exports(int id : @py_Module ref, + varchar(1) name : string ref); + +/* Successor information */ +py_successors(int predecessor : @py_flow_node ref, + int successor : @py_flow_node ref); + +py_true_successors(int predecessor : @py_flow_node ref, + int successor : @py_flow_node ref); + +py_exception_successors(int predecessor : @py_flow_node ref, + int successor : @py_flow_node ref); + +py_false_successors(int predecessor : @py_flow_node ref, + int successor : @py_flow_node ref); + +py_flow_bb_node(unique int flownode : @py_flow_node, + int realnode : @py_ast_node ref, + int basicblock : @py_flow_node ref, + int index : int ref); + +py_scope_flow(int flow : @py_flow_node ref, + int scope : @py_scope ref, + int kind : int ref); + +py_idoms(unique int node : @py_flow_node ref, + int immediate_dominator : @py_flow_node ref); + +py_ssa_phi(int phi : @py_ssa_var ref, + int arg: @py_ssa_var ref); + +py_ssa_var(unique int id : @py_ssa_var, + int var : @py_variable ref); + +py_ssa_use(int node: @py_flow_node ref, + int var : @py_ssa_var ref); + +py_ssa_defn(unique int id : @py_ssa_var ref, + int node: @py_flow_node ref); + +@py_base_var = @py_variable | @py_ssa_var; + +py_scopes(unique int node : @py_expr_or_stmt ref, + int scope : @py_scope ref); + +py_scope_location(unique int id : @location ref, + unique int scope : @py_scope ref); + +py_flags_versioned(varchar(1) name : string ref, + varchar(1) value : string ref, + varchar(1) version : string ref); + +py_syntax_error_versioned(unique int id : @location ref, + varchar(1) message : string ref, + varchar(1) version : string ref); + +py_comments(unique int id : @py_comment, + varchar(1) text : string ref, + unique int location : @location ref); + +/* Type information support */ + +py_cobjects(unique int obj : @py_cobject); + +py_cobjecttypes(unique int obj : @py_cobject ref, + int typeof : @py_cobject ref); + +py_cobjectnames(unique int obj : @py_cobject ref, + varchar(1) name : string ref); + +/* Kind should be 0 for introspection, > 0 from source, as follows: + 1 from C extension source + */ +py_cobject_sources(int obj : @py_cobject ref, + int kind : int ref); + +py_cmembers_versioned(int object : @py_cobject ref, + varchar(1) name : string ref, + int member : @py_cobject ref, + varchar(1) version : string ref); + +py_citems(int object : @py_cobject ref, + int index : int ref, + int member : @py_cobject ref); + +ext_argtype(int funcid : @py_object ref, + int arg : int ref, + int typeid : @py_object ref); + +ext_rettype(int funcid : @py_object ref, + int typeid : @py_object ref); + +ext_proptype(int propid : @py_object ref, + int typeid : @py_object ref); + +ext_argreturn(int funcid : @py_object ref, + int arg : int ref); + +py_special_objects(unique int obj : @py_cobject ref, + unique varchar(1) name : string ref); + +py_decorated_object(int object : @py_object ref, + int level: int ref); + +@py_object = @py_cobject | @py_flow_node; + +@py_source_element = @py_ast_node | @container; diff --git a/python/extractor/semmle/dbscheme_gen.py b/python/extractor/semmle/dbscheme_gen.py new file mode 100644 index 00000000000..7c3a79fc371 --- /dev/null +++ b/python/extractor/semmle/dbscheme_gen.py @@ -0,0 +1,104 @@ +'''Tool for generating the dbscheme from the relation tree described in +'master.py' and the part scheme in dbscheme.template''' + + + +from semmle.util import fprintf +from semmle import util +from semmle.python import master + +import sys +import os.path + + +def write(nodes, out): + nodes = set(nodes) + #Emit in sorted order to reduce diffs. + sorted_nodes = sorted(nodes, key = lambda n: n.__name__) + fprintf(out, '\n') + for n in sorted_nodes: + if n.layout: + fprintf(out, '\n') + for name, f_t, offset, _, _, _ in n.layout: + fprintf(out, '/* %s.%s = %s, %s */\n', + n.ql_name(), name, offset, f_t.__name__) + if n.parents: + fprintf(out, '/* %s = %s */\n', + n.ql_name(), n.parents.ql_name()) + parents = set() + for n in sorted_nodes: + if n.is_sub_type() or n.is_union_type(): + continue + fprintf(out, u'%s(', n.relation_name()) + if n.__name__ == "bool": + fields = [] + else: + fields = [ n.db_key('id') ] + if n.is_case_type(): + fields.append('int kind: int ref') + if n.parents: + parents.add(n.parents) + if n.unique_parent: + fields.append('unique int parent : %s ref' % n.parents.db_name()) + else: + fields.append('int parent : %s ref' % n.parents.db_name()) + fields.append('int idx : int ref') + fprintf(out, ',\n '.join(fields)) + fprintf(out, ');\n\n') + nodes = nodes | parents + sorted_nodes = sorted(nodes, key = lambda n: n.__name__) + for n in sorted_nodes: + if n.is_case_type(): + fprintf(out, 'case %s.kind of\n ', n.db_name()) + subtypes = sorted(n.subclasses, key = lambda x : x.index) + body = '\n| '.join(['%s = %s' % (s.index, s.db_name()) + for s in subtypes]) + fprintf(out, '%s;\n\n' % body) + for n in sorted_nodes: + if n.is_union_type(): + fprintf(out, '%s = ', n.db_name()) + body = ' | '.join(sorted([item.db_name() for item in n.types])) + fprintf(out, '%s;\n\n' % body) + +HEADER = '''/* + * This dbscheme is auto-generated by '%s'. + * WARNING: Any modifications to this file will be lost. + * Relations can be changed by modifying master.py or + * by adding rules to dbscheme.template + */ + +''' + +AUTO_GEN_END = ''' +/* + * End of auto-generated part + */ + +''' + +def main(): + run(master) + +def run(nodes_module): + use_file = len(sys.argv) > 1 + if use_file: + out = open(sys.argv[1], 'w', encoding='utf-8') + else: + out = sys.stdout + try: + nodes = nodes_module.all_nodes() + this_dir, _ = os.path.split(sys.argv[0]) + with open(os.path.join(this_dir, 'dbscheme.template')) as template_file: + t0, t1 = template_file.read().split('$AST_SCHEME$') + out.write(HEADER % '/'.join(__file__.split(os.path.sep)[-2:])) + out.write(t0) + out.write(util.AUTO_GEN_STRING) + write(nodes.values(), out) + out.write(AUTO_GEN_END) + out.write(t1) + finally: + if use_file: + out.close() + +if __name__ == '__main__': + main() diff --git a/python/extractor/semmle/extractors/__init__.py b/python/extractor/semmle/extractors/__init__.py new file mode 100644 index 00000000000..2cb4c9d454f --- /dev/null +++ b/python/extractor/semmle/extractors/__init__.py @@ -0,0 +1,5 @@ + +from .super_extractor import SuperExtractor +from .py_extractor import PythonExtractor +from .builtin_extractor import BuiltinExtractor, SkippedBuiltin +from .module_printer import ModulePrinter diff --git a/python/extractor/semmle/extractors/base.py b/python/extractor/semmle/extractors/base.py new file mode 100644 index 00000000000..5d4afbd45c8 --- /dev/null +++ b/python/extractor/semmle/extractors/base.py @@ -0,0 +1,14 @@ +from semmle.logging import Logger + + +class BaseExtractor(object): + '''Base class for extractors.''' + + def __init__(self, options, trap_folder, src_archive, logger: Logger): + self.options = options + self.trap_folder = trap_folder + self.src_archive = src_archive + self.logger = logger + + def process(self, unit): + raise NotImplementedError() diff --git a/python/extractor/semmle/extractors/builtin_extractor.py b/python/extractor/semmle/extractors/builtin_extractor.py new file mode 100644 index 00000000000..f1493b50a3d --- /dev/null +++ b/python/extractor/semmle/extractors/builtin_extractor.py @@ -0,0 +1,41 @@ +import sys +from semmle import util +from semmle.python.passes.objects import ObjectPass +from semmle.extractors.base import BaseExtractor + +# A sentinel object representing a built-in that should be skipped. +# Unlike returning `NotImplemented`, this prevents other extractors from +# attempting to extract the same file/module and/or reporting an extraction error. +SkippedBuiltin = object() + +class BuiltinExtractor(BaseExtractor): + '''Extractor that can extract built-in Python modules, such as the `sys` module.''' + + name = "built-in extractor" + + def process(self, unit): + # Modules in the standard library (e.g. `os`) + if not self.options.extract_stdlib and \ + isinstance(unit, util.FileExtractable) and \ + unit.path.startswith(util.STDLIB_PATH): + return SkippedBuiltin + if not isinstance(unit, util.BuiltinModuleExtractable): + return NotImplemented + name = unit.name + # If a Shared Object file fails to import, we want to prevent the `ImportError` from + # propagating further up. Instead, we simply behave as if the module is not extractable. + try: + module = __import__(name) + except ImportError as e: + if e.path.endswith(".so"): + return NotImplemented + else: + raise e + writer = util.TrapWriter() + ObjectPass().extract_builtin(module, writer) + output = writer.get_compressed() + self.trap_folder.write_trap("builtin", name, output) + return () + + def close(self): + pass diff --git a/python/extractor/semmle/extractors/file_extractor.py b/python/extractor/semmle/extractors/file_extractor.py new file mode 100644 index 00000000000..17e6dbb8757 --- /dev/null +++ b/python/extractor/semmle/extractors/file_extractor.py @@ -0,0 +1,33 @@ + +from semmle import util +from semmle.extractors.base import BaseExtractor + +HALF_MB = 1 << 19 + +class FileExtractor(BaseExtractor): + '''Extractor for extracting arbitrary 'text' files.''' + + name = "file extractor" + + def process(self, unit): + if not isinstance(unit, util.FileExtractable): + return NotImplemented + if util.isdir(unit.path): + return NotImplemented + with open(unit.path, "rb") as fd: + data = fd.read() + source = data.decode("latin-1") + if len(source) > HALF_MB: + self.logger.info("Skipping overly large file: '%s'", unit.path) + return () + file_tag = util.get_source_file_tag(unit.path) + writer = util.TrapWriter() + writer.write_tuple("file_contents", "gS", file_tag, source) + writer.write_file(unit.path) + output = writer.get_compressed() + self.trap_folder.write_trap("file", unit.path, output) + self.src_archive.write(unit.path, data) + return () + + def close(self): + pass diff --git a/python/extractor/semmle/extractors/module_printer.py b/python/extractor/semmle/extractors/module_printer.py new file mode 100644 index 00000000000..d2f4a6cc92b --- /dev/null +++ b/python/extractor/semmle/extractors/module_printer.py @@ -0,0 +1,31 @@ +import sys +from semmle import util +from .py_extractor import PythonExtractor + +class ModulePrinter(object): + + name = "module printer" + + def __init__(self, options, trap_folder, src_archive, renamer, logger): + self.logger = logger + self.py_extractor = PythonExtractor(options, trap_folder, src_archive, logger) + + def process(self, unit): + imports = () + if isinstance(unit, util.BuiltinModuleExtractable): + name = unit.name + self.logger.info("Found builtin module '%s'", name) + elif isinstance(unit, util.FileExtractable): + self.logger.info("Found file '%s'", unit.path) + _, imports = self.py_extractor._get_module_and_imports(unit) + elif isinstance(unit, util.FolderExtractable): + self.logger.info("Found folder '%s'", unit.path) + else: + self.logger.error("Unexpected object: %s", unit) + return imports + + def close(self): + pass + + def write_global_data(self): + pass diff --git a/python/extractor/semmle/extractors/py_extractor.py b/python/extractor/semmle/extractors/py_extractor.py new file mode 100644 index 00000000000..8014063b3cb --- /dev/null +++ b/python/extractor/semmle/extractors/py_extractor.py @@ -0,0 +1,102 @@ +import os.path + +from semmle import util +from semmle.python import extractor, finder, imports +import re +from semmle.extractors.base import BaseExtractor +from semmle.logging import Logger + +class PythonExtractor(BaseExtractor): + '''Extractor that can extract Python source code.''' + + name = "Python extractor" + + def __init__(self, options, trap_folder, src_archive, logger: Logger, diagnostics_writer): + super(PythonExtractor, self).__init__(options, trap_folder, src_archive, logger) + self.module_extractor = extractor.Extractor.from_options(options, trap_folder, src_archive, logger, diagnostics_writer) + self.finder = finder.Finder.from_options_and_env(options, logger) + self.importer = imports.importer_from_options(options, self.finder, logger) + + def _get_module_and_imports(self, unit): + if not isinstance(unit, util.FileExtractable): + return None, () + #Convert unit to module. + module = self.finder.from_extractable(unit) + if module is None: + return None, () + py_module = module.load(self.logger) + if py_module is None: + return None, () + imports = set(mod.get_extractable() for mod in self.importer.get_imports(module, py_module)) + for imp in imports: + self.logger.trace("%s imports %s", module, imp) + package = module.package + while package: + ex = package.get_extractable() + if ex is None: + break + self.logger.debug("Requiring package %s", ex) + imports.add(ex) + package = package.package + return py_module, imports + + def process(self, unit): + py_module, imports = self._get_module_and_imports(unit) + if py_module is None: + return NotImplemented + self.module_extractor.process_source_module(py_module) + return imports + + def close(self): + self.module_extractor.close() + + def write_interpreter_data(self, options): + self.module_extractor.write_interpreter_data(options) + +LEGAL_NAME = re.compile(r"[^\W0-9]\w+$") + +class PackageExtractor(object): + '''Extractor that can extract folders as Python packages.''' + + name = "package extractor" + + def __init__(self, options, trap_folder, src_archive, logger): + self.trap_folder = trap_folder + self.src_archive = src_archive + self.logger = logger + self.respect_init = options.respect_init + + def process(self, unit): + if not isinstance(unit, util.FolderExtractable): + return NotImplemented + _, name = os.path.split(unit.path) + init_path = os.path.join(unit.path, "__init__.py") + if (self.respect_init and not os.path.exists(init_path)) or not LEGAL_NAME.match(name): + self.logger.debug("Ignoring non-package folder %s", unit.path) + return () + writer = util.TrapWriter() + trap_name = u'py-package:' + unit.path + vpath = self.src_archive.get_virtual_path(unit.path) + folder_tag = writer.write_folder(vpath) + writer.write_tuple(u'py_Modules', 'g', trap_name) + writer.write_tuple(u'py_module_path', 'gg', trap_name, folder_tag) + #Add fake CFG entry node to represent the PackageObject. + entry_node = object() + entry_id = trap_name + ":entry-point" + entry_tag = writer.get_labelled_id(entry_node, entry_id) + writer.write_tuple(u'py_flow_bb_node', 'rgrd', entry_tag, trap_name, entry_tag, 0) + writer.write_tuple(u'py_scope_flow', 'rgd', entry_tag, trap_name, -1) + #Add dummy location + loc = object() + loc_id = trap_name + ":location" + loc_tag = writer.get_labelled_id(loc, loc_id) + writer.write_tuple(u'locations_ast', 'rgdddd', loc_tag, trap_name, 0, 0, 0, 0) + output = writer.get_compressed() + self.trap_folder.write_trap('$package', unit.path, output) + if os.path.exists(init_path): + return util.FileExtractable(init_path), + else: + return () + + def close(self): + pass diff --git a/python/extractor/semmle/extractors/super_extractor.py b/python/extractor/semmle/extractors/super_extractor.py new file mode 100644 index 00000000000..24edff70e0a --- /dev/null +++ b/python/extractor/semmle/extractors/super_extractor.py @@ -0,0 +1,69 @@ +from .builtin_extractor import BuiltinExtractor +from .py_extractor import PythonExtractor +from .py_extractor import PackageExtractor +from .file_extractor import FileExtractor +from .thrift_extractor import ThriftExtractor +from semmle.files import TrapFolder, SourceArchive, NullArchive +from semmle.profiling import MillisecondTimer +from semmle.logging import DEBUG, Logger + +class SuperExtractor(object): + '''Extractor that can extract any 'extractable'. + Delegates to the relevant extractor.''' + + def __init__(self, options, trap_dir, archive, renamer, logger: Logger, diagnostics_writer): + trap_folder = TrapFolder(trap_dir, renamer, logger) + if archive is None: + src_archive = NullArchive(renamer) + else: + src_archive = SourceArchive(archive, renamer, logger) + bltn_extractor = BuiltinExtractor(options, trap_folder, src_archive, logger) + package_extractor = PackageExtractor(options, trap_folder, src_archive, logger) + gen_extractor = FileExtractor(options, trap_folder, src_archive, logger) + thrift_extractor = ThriftExtractor(options, trap_folder, src_archive, logger) + self.py_extractor = PythonExtractor(options, trap_folder, src_archive, logger, diagnostics_writer) + self.extractors = [ bltn_extractor, thrift_extractor, self.py_extractor, package_extractor, gen_extractor] + if logger.level >= DEBUG: + self.extractors = [ TimingExtractor(extractor, logger) for extractor in self.extractors ] + self.logger = logger + self.options = options + + def process(self, unit): + for extractor in self.extractors: + self.logger.debug("Trying %s on %s",extractor.name, unit) + res = extractor.process(unit) + if res is not NotImplemented: + self.logger.debug("%s extracted by the %s.", unit, extractor.name) + break + else: + self.logger.error("Could not extract %s", unit) + res = () + return res + + def add_extractor(self, extractor): + #Insert after built-in extractor + self.extractors.insert(1, extractor) + + def close(self): + for ex in self.extractors: + ex.close() + + def write_global_data(self): + self.py_extractor.write_interpreter_data(self.options) + + +class TimingExtractor(object): + + def __init__(self, extractor, logger): + self.timer = MillisecondTimer() + self.extractor = extractor + self.logger = logger + self.name = self.extractor.name + + def process(self, unit): + with self.timer: + return self.extractor.process(unit) + + def close(self): + self.logger.debug(self.name + " time %0.1fs", self.timer.elapsed/1000) + self.extractor.close() diff --git a/python/extractor/semmle/extractors/thrift_extractor.py b/python/extractor/semmle/extractors/thrift_extractor.py new file mode 100644 index 00000000000..62c9b25dba5 --- /dev/null +++ b/python/extractor/semmle/extractors/thrift_extractor.py @@ -0,0 +1,28 @@ + + +import os.path +import semmle.thrift +import semmle.util +from semmle.extractors.base import BaseExtractor + +class ThriftExtractor(BaseExtractor): + '''Extractor that can extract Apache thrift IDL files.''' + + name = "thrift extractor" + + def __init__(self, options, trap_folder, src_archive, logger): + super(ThriftExtractor, self).__init__(options, trap_folder, src_archive, logger) + self.thrift_extractor = semmle.thrift.Extractor(trap_folder, src_archive) + + def process(self, unit): + if not isinstance(unit, semmle.util.FileExtractable): + return NotImplemented + if semmle.util.isdir(unit.path): + return NotImplemented + if not unit.path.endswith(".thrift"): + return NotImplemented + self.thrift_extractor.extract_file(unit.path) + return () + + def close(self): + pass diff --git a/python/extractor/semmle/files.py b/python/extractor/semmle/files.py new file mode 100644 index 00000000000..49eeb63199c --- /dev/null +++ b/python/extractor/semmle/files.py @@ -0,0 +1,97 @@ +import os.path +import sys + +from semmle.util import base64digest, makedirs + +_WINDOWS = os.name == "nt" + +LONG_PATH_PREFIX = "\\\\?\\" + +def make_renamer(renamer): + if os.name == "nt": + if renamer is None: + return lambda path : path.replace('\\', '/') + else: + return lambda path : renamer(path).replace('\\', '/') + else: + if renamer is None: + return lambda path : path + else: + return renamer + + +class NullArchive(object): + '''A fake source archive object for use when there is no + source archive folder. For example, by qltest.''' + + def __init__(self, renamer=None): + self.renamer = make_renamer(renamer) + + def write(self, path, source, encoding=None): + pass + + def get_virtual_path(self, real_path): + '''Gets the virtual (potentially renamed) path for the given real path''' + return self.renamer(real_path) + +class RenamingFolder(object): + '''A folder that can rename its contents according to the given renamer + (usually derived from a project layout file).''' + + def __init__(self, folder, renamer, logger): + assert folder is not None + self.folder = folder + self.renamer = make_renamer(renamer) + self.logger = logger + + def get_virtual_path(self, real_path): + '''Gets the virtual (potentially renamed) path for the given real path''' + return self.renamer(real_path) + + def get_storage_path(self, *subpath): + '''Gets the path for storing an item at. + Creates the necessary sub folders and + handles long paths on Windows.''' + #Remove empty path elements + subpath = [ p for p in subpath if p ] + suffix = os.sep.join(subpath) + suffix = suffix.replace(':', '_') + if suffix[0] in '/\\': + result = self.folder + suffix + else: + result = self.folder + os.sep + suffix + if _WINDOWS and len(result) > 240: + result = LONG_PATH_PREFIX + result + folder = os.path.dirname(result) + if not os.path.exists(folder): + makedirs(folder) + return result + +class TrapFolder(RenamingFolder): + + def _trap_path(self, namespace, path, extension='.trap.gz'): + vpath = self.get_virtual_path(path) + parts = vpath.split('/') + basename = parts[-1] + hashcode = base64digest(vpath + namespace) + filename = basename + '.' + hashcode + extension + return self.get_storage_path(filename) + + def write_trap(self, namespace, path, data, extension='.trap.gz'): + '''Write the trap file for `path` in `namespace` using the given file extension (defaults to .trap.gz)''' + outpath = self._trap_path(namespace, path, extension) + with open(outpath, "wb") as out: + out.write(data) + +class SourceArchive(RenamingFolder): + + def write(self, path, bytes_source): + '''Write the `source` to `path` in this source archive folder.''' + vpath = self.get_virtual_path(path) + if vpath != path: + self.logger.debug("Renaming '%s' to '%s'", path, vpath) + self.logger.debug("Writing source to '%s'", vpath) + subpath = vpath.split('/') + outpath = self.get_storage_path(*subpath) + with open(outpath, "wb") as out: + out.write(bytes_source) diff --git a/python/extractor/semmle/graph.py b/python/extractor/semmle/graph.py new file mode 100755 index 00000000000..8f93768767f --- /dev/null +++ b/python/extractor/semmle/graph.py @@ -0,0 +1,837 @@ + +class SmallSet(list): + + __slots__ = [] + + def update(self, other): + filtered = [x for x in other if x not in self] + self.extend(filtered) + + def add(self, item): + if item not in self: + self.append(item) + +class DiGraph(object): + '''A simple directed graph class (not necessarily a DAG). + Nodes must be hashable''' + + def __init__(self, name = ""): + self.name = name + self.pred = {} + self.succ = {} + self.all_nodes = [] + self.node_annotations = {} + self.edge_annotations = {} + + def add_node(self, n): + 'Add a node to the graph' + if n not in self.succ: + self.pred[n] = SmallSet() + self.succ[n] = SmallSet() + self.all_nodes.append(n) + + def add_edge(self, x, y): + '''Add an edge (x -> y) to the graph. Return true if x, y was + previously in graph''' + if x in self.succ: + if y in self.succ[x]: + return True + else: + self.add_node(x) + self.add_node(y) + self.pred[y].add(x) + self.succ[x].add(y) + return False + + def remove_node(self, x): + if x not in self.succ: + raise ValueError("Node %s does not exist." % x) + preds = self.pred[x] + succs = self.succ[x] + for p in preds: + self.succ[p].remove(x) + for s in succs: + self.pred[s].remove(x) + del self.succ[x] + del self.pred[x] + + def remove_edge(self, x, y): + self.pred[y].remove(x) + self.succ[x].remove(y) + + def annotate_edge(self, x, y, note): + '''Set the annotation on the edge (x -> y) to note. + ''' + if x not in self.succ or y not in self.succ[x]: + raise ValueError("Edge %s -> %s does not exist." % (x, y)) + self.edge_annotations[(x,y)] = note + + def annotate_node(self, x, note): + '''Set the annotation on the node x to note. + ''' + if x not in self.succ: + raise ValueError("Node %s does not exist." % x) + self.node_annotations[x] = note + + def nodes(self): + '''Return an iterator for all nodes, in the form (node, note) pairs. + Do not modify the graph while using this iterator''' + for node in self.all_nodes: + yield node, self.node_annotations.get(node) + + def edges(self): + '''Return an iterator for all edges, in the form of (pred, succ, note) triple. + Do not modify the graph while using this iterator''' + index = dict((n, i) for i, n in enumerate(self.all_nodes)) + for n in self.all_nodes: + n_succs = self.succ[n] + for succ in sorted(n_succs, key = lambda n : index[n]): + yield n, succ, self.edge_annotations.get((n,succ)) + + def sources(self): + '''Return an iterator for all nodes with no predecessors. + Do not modify the graph while using this iterator''' + for n, p in self.pred.items(): + if not p: + yield n + + def __contains__(self, node): + return node in self.succ + + +class FlowGraph(DiGraph): + '''A DiGraph that supports the concept of definitions and variables. + Used to compute dominance and SSA form. + For more explanation of the algorithms used see + 'Modern Compiler Implementation by Andrew W. Appel. + ''' + + def __init__(self, root, name = ""): + DiGraph.__init__(self, name) + self.definitions = {} + self.deletions = {} + self.uses = {} + self.use_all_nodes = set() + self.root = root + + def clear_computed(self): + to_be_deleted = [attr for attr in self.__dict__ if attr[0] == '_'] + for attr in to_be_deleted: + delattr(self, attr) + + def _require(self, what): + '''Ensures that 'what' has been computed (computing if needed).''' + if hasattr(self, "_" + what): + return + setattr(self, "_" + what, getattr(self, "_compute_" + what)()) + + def add_deletion(self, node, var): + assert node in self.succ + self.deletions[node] = var + + def add_definition(self, node, var): + assert node in self.succ + self.definitions[node] = var + + def add_use(self, node, var): + assert node in self.succ, node + self.uses[node] = var + + def use_all_defined_variables(self, node): + assert node in self.succ + self.use_all_nodes.add(node) + + def _compute_depth_first_pre_order(self): + self._require("depth_first_pre_order_labels") + reachable = [ f for f in self.all_nodes if f in self._depth_first_pre_order_labels ] + return sorted(reachable, key = lambda f : -self._depth_first_pre_order_labels[f]) + + def _compute_reachable(self): + self._require("depth_first_pre_order") + return frozenset(self._depth_first_pre_order) + + def reachable_nodes(self): + self._require("reachable") + return self._reachable + + def _compute_reversed_depth_first_pre_order(self): + self._require("depth_first_pre_order") + return reversed(self._depth_first_pre_order) + + def _compute_bb_depth_first_pre_order(self): + self._require('depth_first_pre_order') + self._require('bb_heads') + bbs = [] + for n in self._depth_first_pre_order: + if n in self._bb_heads: + bbs.append(n) + return bbs + + def _compute_bb_reversed_depth_first_pre_order(self): + self._require("bb_depth_first_pre_order") + return reversed(self._bb_depth_first_pre_order) + + def _compute_depth_first_pre_order_labels(self): + 'Compute order with depth first search.' + orders = {} + order = 0 + nodes_to_visit = [ self.root ] + while nodes_to_visit: + node = nodes_to_visit[-1] + orders[node] = 0 + if node in self.succ: + for succ in self.succ[node]: + if succ not in orders: + nodes_to_visit.append(succ) + else: + order += 1 + orders[node] = order + if node is nodes_to_visit[-1]: + nodes_to_visit.pop() + order += 1 + orders[node] = order + return orders + + def _compute_idoms(self): + self._require("depth_first_pre_order") + idoms = {} + + def idom_intersection(n1, n2): + 'Determine the last common idom of n1, n2' + orders = self._depth_first_pre_order_labels + while n1 is not n2: + while orders[n1] < orders[n2]: + n1 = idoms[n1] + while orders[n2] < orders[n1]: + n2 = idoms[n2] + return n1 + + for node in self._depth_first_pre_order: + if len(self.pred[node]) == 1: + idoms[node] = next(iter(self.pred[node])) + else: + idom = None + for p in self.pred[node]: + if p == self.root: + idom = p + elif p in idoms: + if idom is None: + idom = p + else: + idom = idom_intersection(idom, p) + if idom is not None: + idoms[node] = idom + return idoms + + def idoms(self): + '''Returns an iterable of node pairs: node, idom(node)''' + self._require('idoms') + idoms = self._idoms + for n in self.all_nodes: + if n in idoms: + yield n, idoms[n] + + + def _compute_dominance_frontier(self): + '''Compute the dominance frontier: + DF[n] = DF_local[n] Union over C in children DF_up[c]''' + + def dominates(dom, node): + while node in idoms: + next_node = idoms[node] + if dom == next_node: + return True + node = next_node + return False + + self._require('idoms') + idoms = self._idoms + dominance_frontier = {} + df_up = {} + dom_tree = _reverse_map(idoms) + self._require('reversed_depth_first_pre_order') + for node in self._reversed_depth_first_pre_order: + df_local_n = set(n for n in self.succ[node] if node != idoms[n]) + dfn = df_local_n + if node in dom_tree: + for child in dom_tree[node]: + dfn.update(df_up[child]) + dominance_frontier[node] = dfn + if node in idoms: + imm_dom = idoms[node] + df_up[node] = set(n for n in dfn if not dominates(imm_dom, n)) + else: + df_up[node] = dfn + return dominance_frontier + + def _compute_phi_nodes(self): + '''Compute the phi nodes for this graph. + A minimal set of phi-nodes are computed; + No phi-nodes are added unless the variable is live. + ''' + self._require('dominance_frontier') + self._require('liveness') + dominance_frontier = self._dominance_frontier + definitions = dict(self.definitions) + # We must count deletions as definitions here. Otherwise, we can have + # uses of a deleted variable whose SSA definition is an actual definition, + # rather than a deletion. + definitions.update(self.deletions) + phi_nodes = {} + defsites = {} + for a in definitions.values(): + defsites[a] = set() + for n in definitions: + a = definitions[n] + defsites[a].add(n) + for a in defsites: + W = set(defsites[a]) + while W: + n = W.pop() + if n not in dominance_frontier: + continue + for y in dominance_frontier[n]: + if y not in phi_nodes: + phi_nodes[y] = set() + if a not in phi_nodes[y]: + phi_nodes[y].add(a) + if y not in definitions or a != definitions[y]: + W.add(y) + trimmed = {} + for node in phi_nodes: + assert node in self._bb_heads + if node not in self._liveness: + continue + new_phi_vars = set() + phi_vars = phi_nodes[node] + for v in phi_vars: + if v in self._liveness[node]: + new_phi_vars.add(v) + if new_phi_vars: + trimmed[node] = new_phi_vars + return trimmed + + def _compute_ssa_data(self): + ''' Compute the SSA variables, definitions, uses and phi-inputs. + ''' + self._require('basic_blocks') + self._require('phi_nodes') + self._require('bb_depth_first_pre_order') + self._require('use_all') + phi_nodes = self._phi_nodes + reaching_ssa_vars = {} + work_set = set() + work_set.add(self.root) + ssa_defns = {} + ssa_uses = {} + ssa_phis = {} + ssa_vars = set() + ssa_var_cache = {} + + def make_ssa_var(variable, node): + '''Ensure that there is no more than one SSA variable for each (variable, node) pair.''' + uid = (variable, node) + if uid in ssa_var_cache: + return ssa_var_cache[uid] + var = SSA_Var(variable, node) + ssa_var_cache[uid] = var + return var + + for bb in self._bb_depth_first_pre_order: + #Track SSA variables in each BB. + reaching_ssa_vars[bb] = {} + for bb in self._bb_depth_first_pre_order: + live_vars = reaching_ssa_vars[bb].copy() + #Add an SSA definition for each phi-node. + if bb in phi_nodes: + variables = phi_nodes[bb] + for v in variables: + var = make_ssa_var(v, bb) + ssa_defns[var] = bb + live_vars[v] = var + for node in self.nodes_in_bb(bb): + #Add an SSA use for each use. + if node in self.uses: + a = self.uses[node] + if a not in live_vars: + #Treat a use as adding a reaching variable, + #since a second use, if it can be reached, + #will always find the variable defined. + var = make_ssa_var(a, node) + live_vars[a] = var + else: + var = live_vars[a] + ssa_vars.add(var) + ssa_uses[node] = [ var ] + #Add an SSA use for all live SSA variables for + #each use_all (end of module/class scope). + if node in self._use_all: + all_live = [ var for var in live_vars.values() if var.variable in self._use_all[node]] + ssa_uses[node] = all_live + ssa_vars.update(all_live) + #Add an SSA definition for each definition. + if node in self.definitions: + a = self.definitions[node] + var = make_ssa_var(a, node) + ssa_defns[var] = node + live_vars[a] = var + #Although deletions are not definitions, we treat them as such. + #SSA form has no concept of deletion, so we have to treat `del x` + #as `x = Undefined`. + if node in self.deletions: + a = self.deletions[node] + if a in live_vars: + var = live_vars[a] + ssa_vars.add(var) + ssa_uses[node] = [ var ] + else: + #If no var is defined here we don't need to create one + #as a new one will be immediately be defined by the deletion. + pass + var = make_ssa_var(a, node) + ssa_defns[var] = node + live_vars[a] = var + #Propagate set of reaching variables to + #successor blocks. + for n in self.succ[node]: + reaching_ssa_vars[n].update(live_vars) + if n in phi_nodes: + for v in phi_nodes[n]: + if v in live_vars: + var = make_ssa_var(v, n) + if var not in ssa_phis: + ssa_phis[var] = set() + ssa_vars.add(live_vars[v]) + ssa_phis[var].add(live_vars[v]) + #Prune unused definitions. + used_ssa_defns = {} + for var in ssa_defns: + if var in ssa_vars: + used_ssa_defns[var] = ssa_defns[var] + ssa_defns = used_ssa_defns + sorted_vars = list(self._sort_ssa_variables(ssa_vars)) + assert set(sorted_vars) == ssa_vars + assert len(sorted_vars) == len(ssa_vars) + ssa_vars = sorted_vars + return ssa_vars, ssa_defns, ssa_uses, ssa_phis + + + def ssa_variables(self): + '''Returns all the SSA variables for this graph''' + self._require('ssa_data') + return self._ssa_data[0] + + def _sort_ssa_variables(self, ssa_vars): + node_to_var = {} + for v in ssa_vars: + node = v.node + if node in node_to_var: + vset = node_to_var[node] + else: + vset = set() + node_to_var[node] = vset + vset.add(v) + for n in self.all_nodes: + if n in node_to_var: + variables = node_to_var[n] + for v in sorted(variables, key=lambda v:v.variable.id): + yield v + + def ssa_definitions(self): + '''Returns all the SSA definition as an iterator of (node, variable) pairs.''' + self._require('ssa_data') + ssa_defns = self._ssa_data[1] + reversed_defns = _reverse_map(ssa_defns) + for n in self.all_nodes: + if n in reversed_defns: + variables = reversed_defns[n] + for v in sorted(variables, key=lambda v:v.variable.id): + yield n, v + + def get_ssa_definition(self, var): + '''Returns the definition node of var. Returns None if there is no definition.''' + self._require('ssa_data') + ssa_defns = self._ssa_data[1] + return ssa_defns.get(var) + + def ssa_uses(self): + '''Returns all the SSA uses as an iterator of (node, variable) pairs.''' + self._require('ssa_data') + ssa_uses = self._ssa_data[2] + for n in self.all_nodes: + if n in ssa_uses: + variables = ssa_uses[n] + for v in sorted(variables, key=lambda v:v.variable.id): + yield n, v + + def get_ssa_variables_used(self, node): + '''Returns all the SSA variables used at this node''' + self._require('ssa_data') + ssa_uses = self._ssa_data[2] + return ssa_uses.get(node, ()) + + def ssa_phis(self): + '''Return all SSA phi inputs as an iterator of (variable, input-variable) pairs.''' + self._require('ssa_data') + ssa_phis = self._ssa_data[3] + ssa_vars = self._ssa_data[0] + indexed = dict((v, index) for index, v in enumerate(ssa_vars)) + for v in ssa_vars: + if v not in ssa_phis: + continue + phis = ssa_phis[v] + for phi in sorted(phis, key=lambda v:indexed[v]): + yield v, phi + + def _compute_bb_heads(self): + '''Compute all flow nodes that are the first node in a basic block.''' + bb_heads = set() + for node in self.all_nodes: + preds = self.pred[node] + if len(preds) != 1 or len(self.succ[preds[0]]) != 1: + bb_heads.add(node) + return bb_heads + + def _compute_basic_blocks(self): + '''Compute Basic blocks membership''' + self._require('bb_heads') + basic_blocks = {} + bb_tails = {} + for bb in self._bb_heads: + for index, node in enumerate(self.nodes_in_bb(bb)): + basic_blocks[node] = bb, index + bb_tails[bb] = node + self._bb_tails = bb_tails + return basic_blocks + + def get_basic_blocks(self): + self._require('basic_blocks') + return self._basic_blocks + + def _compute_bb_succ(self): + self._require('basic_blocks') + bb_succs = {} + for bb in self._bb_heads: + bb_succs[bb] = self.succ[self._bb_tails[bb]] + return bb_succs + + def _compute_bb_pred(self): + self._require('basic_blocks') + bb_preds = {} + for bb in self._bb_heads: + preds_of_bb = self.pred[bb] + bb_preds[bb] = SmallSet(self._basic_blocks[p][0] for p in preds_of_bb) + return bb_preds + + def nodes_in_bb(self, bb): + '''Return an iterator over all node in basic block 'bb.''' + node = bb + while True: + yield node + succs = self.succ[node] + if not succs: + return + node = succs[0] + if node in self._bb_heads: + return + + + def _compute_use_all(self): + '''Compute which variables have been defined. + A variable is defined at node n, if there is a path to n which + passes through a definition, but not through a subsequent deletion. + ''' + + self._require('bb_heads') + self._require('bb_succ') + self._require('bb_pred') + use_all = {} + + def defined_in_block(bb): + defined = defined_at_start[bb].copy() + for node in self.nodes_in_bb(bb): + if node in self.definitions: + var = self.definitions[node] + defined.add(var) + if node in self.deletions: + var = self.deletions[node] + defined.discard(var) + if node in self.use_all_nodes: + use_all[node] = frozenset(defined) + return defined + + defined_at_start = {} + work_set = set() + for bb in self._bb_heads: + if not self._bb_pred[bb]: + work_set.add(bb) + defined_at_start[bb] = set() + work_list = list(work_set) + while work_list: + bb = work_list.pop() + work_set.remove(bb) + defined_at_bb_end = defined_in_block(bb) + for succ in self._bb_succ[bb]: + if succ not in defined_at_start: + defined_at_start[succ] = set() + elif defined_at_start[succ] >= defined_at_bb_end: + continue + defined_at_start[succ].update(defined_at_bb_end) + if succ not in work_set: + work_list.append(succ) + work_set.add(succ) + return use_all + + def _compute_liveness(self): + '''Compute liveness of all variables in this flow-graph. + Return a mapping of basic blocks to the set of variables + that are live at the start of that basic block. + See http://en.wikipedia.org/wiki/Live_variable_analysis.''' + + self._require('bb_pred') + self._require('use_all') + + def gen_and_kill_for_block(bb): + gen = set() + kill = set() + for node in reversed(list(self.nodes_in_bb(bb))): + if node in self.uses: + var = self.uses[node] + gen.add(var) + kill.discard(var) + if node in self.deletions: + var = self.deletions[node] + gen.add(var) + kill.discard(var) + if node in self.definitions: + var = self.definitions[node] + gen.discard(var) + kill.add(var) + if node in self._use_all: + for var in self._use_all[node]: + gen.add(var) + kill.discard(var) + return gen, kill + + def liveness_for_block(bb, live_out): + return gens[bb].union(live_out.difference(kills[bb])) + + live_at_end = {} + live_at_start = {} + gens = {} + kills = {} + work_set = set() + #Initialise + for bb in self._bb_heads: + gens[bb], kills[bb] = gen_and_kill_for_block(bb) + live_at_end[bb] = set() + live_at_start[bb] = set() + work_set.add(bb) + #Find fixed point + while work_set: + bb = work_set.pop() + live_in = liveness_for_block(bb, live_at_end[bb]) + if live_in != live_at_start[bb]: + assert len(live_in) > len(live_at_start[bb]) + live_at_start[bb] = live_in + for pred in self._bb_pred[bb]: + work_set.add(pred) + live_at_end[pred] = live_at_end[pred].union(live_in) + return live_at_start + + + def delete_unreachable_nodes(self): + self._require("reachable") + unreachable = [u for u in self.all_nodes if u not in self._reachable] + if not unreachable: + return + for mapping in (self.definitions, self.deletions, self.uses): + for u in unreachable: + if u in mapping: + del mapping[u] + for u in unreachable: + self.use_all_nodes.discard(u) + self.remove_node(u) + #Make sure we retain the order of all_nodes. + self.all_nodes = [r for r in self.all_nodes if r in self._reachable] + self.clear_computed() + + def dominated_by(self, node): + self._require('idoms') + assert node in self, str(node) + " is not in graph" + dominated = set([node]) + todo = set(self.succ[node]) + while todo: + n = todo.pop() + if n in dominated: + continue + #Unreachable nodes will not be in self._idoms + if n in self._idoms and self._idoms[n] in dominated: + dominated.add(n) + todo.update(self.succ[n]) + return dominated + + def strictly_dominates(self, pre, post): + self._require('idoms') + while post in self._idoms: + post = self._idoms[post] + if pre == post: + return True + return False + + def reaches_while_dominated(self, pre, post, control): + ''' Holds if `pre` reaches `post` while remaining in the + region dominated by `control`.''' + self._require('dominance_frontier') + dominance_frontier = self._dominance_frontier[control] + todo = { pre } + reached = set() + while todo: + node = todo.pop() + if node in dominance_frontier: + continue + if node == post: + return True + if node in reached: + continue + reached.add(node) + todo.update(self.succ[node]) + return False + + def split(self, splits): + #We expect the following to be true (we assert it later): + #top dominates heads for all splits. + # Key class for (partially) ordering node by inverse dominance + class DominanceKey(object): + def __init__(this, node): + this.node = node + def __lt__(this, other): + return self.strictly_dominates(other.node, this.node) + splits.sort(key=lambda arg: DominanceKey(arg[0])) + for top, heads in splits: + self.single_split(top, heads) + + def single_split(self, top, heads): + '''Splits the flow-graph from the branches. All code that succeeds each head + becomes unique to that head, limited to those nodes that are strictly dominated by top, + excluding exit nodes. + ''' + assert top in self, "top " + str(top) + " is not in graph" + strictly_dominated_by_top = self.dominated_by(top) + strictly_dominated_by_top.remove(top) + for head in heads: + assert head in self, "head " + str(head) + " is not in graph" + assert head in strictly_dominated_by_top, str(head) + " is not dominated by " + str(top) + + def successors_within_region(start, region): + #Find all nodes in region, that are reached from start (without leaving region) + nodes = set([start]) + todo = set(self.succ[start]) + while todo: + s = todo.pop() + if s not in nodes and s in region: + nodes.add(s) + todo.update(self.succ[s]) + return nodes + + subgraphs = [ (head, successors_within_region(head, strictly_dominated_by_top)) for head in heads ] + + #Copy the two subgraphs + head_copies = [] + branch_copies = [] + for head, branch in subgraphs: + head_copy, branch_copy = self._copy_subgraph(head, branch, True) + head_copies.append(head_copy) + branch_copies.append(branch_copy) + #The original will be deleted by `delete_unreachable_nodes()` + + #Make sure we retain the order of all_nodes. + self.all_nodes = [n for n in self.all_nodes if n in self.succ] + #All computed values are now invalid. + self.clear_computed() + self.delete_unreachable_nodes() + return head_copies, branch_copies + + def _copy_subgraph(self, entry, to_copy, remove_links): + copies = {} + assert entry in to_copy, repr(entry) + " is not in sub-graph " + str(to_copy) + for node in to_copy: + copy = node.copy() + copies[node] = copy + self.add_node(copy) + ann = self.node_annotations.get(node) + self.annotate_node(copy, ann) + if node == entry: + res = copy + for mapping in (self.definitions, self.deletions, self.uses): + if node in mapping: + mapping[copy] = mapping[node] + if node in self.use_all_nodes: + self.use_all_nodes.add(copy) + + for node in to_copy: + for s in self.succ[node]: + ann = self.edge_annotations.get((node,s)) + if s in to_copy: + self.add_edge(copies[node], copies[s]) + self.annotate_edge(copies[node], copies[s], ann) + else: + self.add_edge(copies[node], s) + self.annotate_edge(copies[node], s, ann) + if remove_links: + predecessors_to_remove = set() + for p in self.pred[entry]: + ann = self.edge_annotations.get((p, entry)) + if p not in to_copy: + self.add_edge(p, copies[entry]) + self.annotate_edge(p, copies[entry], ann) + predecessors_to_remove.add(p) + for p in predecessors_to_remove: + self.remove_edge(p, entry) + return res, set(copies.values()) + + def unroll(self, head, bodystart): + body = self.dominated_by(bodystart) + entries = [p for p in self.pred[head] if p not in body] + bodystart2, _ = self._copy_subgraph(bodystart, body, False) + prehead = head.copy() + self.add_node(prehead) + ann = self.node_annotations.get(head) + self.annotate_node(prehead, ann) + for s in self.succ[head]: + if s is not bodystart: + self.add_edge(prehead, s) + ann = self.edge_annotations.get((head, s)) + self.annotate_edge(prehead, s, ann) + self.add_edge(prehead, bodystart2) + ann = self.edge_annotations.get((head, bodystart)) + self.annotate_edge(prehead, bodystart2, ann) + for p in entries: + ann = self.edge_annotations.get((p, head)) + self.remove_edge(p, head) + self.add_edge(p, prehead) + self.annotate_edge(p, prehead, ann) + self.clear_computed() + self.delete_unreachable_nodes() + +class SSA_Var(object): + 'A single static assignment variable' + + __slots__ = [ 'variable', 'node' ] + + def __init__(self, variable, node): + self.variable = variable + self.node = node + + def __repr__(self): + return 'SSA_Var(%r, %r)' % (self.variable.id, self.node) + + +def _reverse_map(mapping): + 'Reverse a mapping of keys -> values to value->set(keys)' + inv_map = {} + for k, v in mapping.items(): + if v not in inv_map: + inv_map[v] = SmallSet() + inv_map[v].add(k) + return inv_map diff --git a/python/extractor/semmle/logging.py b/python/extractor/semmle/logging.py new file mode 100644 index 00000000000..fd2dc6a1916 --- /dev/null +++ b/python/extractor/semmle/logging.py @@ -0,0 +1,393 @@ +''' +Support for multi-process safe logging with colorized output. +''' + +import os +import sys +import traceback +import multiprocessing +import enum +import datetime + + +#Use standard Semmle logging levels + +OFF = 0 +ERROR = 1 +WARN = 2 +INFO = 3 +DEBUG = 4 +TRACE = 5 +TRACEBACK = 6 + +COLOR = 8 + +if os.name == "nt": + MAGENTA = "" + GREY = "" + BLUE = "" + YELLOW = "" + RED = "" + RESET = "" +else: + MAGENTA = "\x1b[35m" + GREY = "\x1b[2m\x1b[37m" + BLUE = "\x1b[34m" + YELLOW = "\x1b[33m" + RED = "\x1b[31m" + RESET = '\x1b[0m' + +LOG_PREFIX = { + TRACE: "[TRACE] ", + DEBUG: "[DEBUG] ", + INFO: "[INFO] ", + WARN: "[WARN] ", + ERROR: "[ERROR] ", + TRACEBACK: "[TRACEBACK] ", + COLOR | TRACE: GREY + "[TRACE] ", + COLOR | DEBUG: "[DEBUG] ", + COLOR | INFO: BLUE + "[INFO] ", + COLOR | WARN: YELLOW + "[WARN] ", + COLOR | ERROR: RED + "[ERROR] ", + COLOR | TRACEBACK: MAGENTA + "[TRACEBACK] ", +} + +def write_message(level, text): + '''Write a message direct to stdout without queueing.''' + reset = RESET if level & COLOR == COLOR else '' + print(LOG_PREFIX[level] + text + reset) + sys.stdout.flush() + +def write_message_with_proc(level, proc_id, text): + reset = RESET if level & COLOR == COLOR else '' + print(LOG_PREFIX[level] + proc_id + text + reset) + sys.stdout.flush() + +_logging_process = None + +def stop(): + _logging_process.join() + +class Logger(object): + '''Multi-process safe logger''' + + def __init__(self, level=WARN, color=False): + global _logging_process + self.proc_id = "" + self.level = level + # macOS does not support `fork` properly, so we must use `spawn` instead. + method = 'spawn' if sys.platform == "darwin" else None + try: + ctx = multiprocessing.get_context(method) + except AttributeError: + # `get_context` doesn't exist -- we must be running an old version of Python. + ctx = multiprocessing + self.queue = ctx.Queue() + _logging_process = ctx.Process(target=_message_loop, args=(self.queue,)) + _logging_process.start() + self.color = COLOR if color else 0 + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.close() + return False + + def set_process_id(self, proc_id): + '''Set the process id to be included in log messages.''' + self.proc_id = "[%d] " % proc_id + + def setLevel(self, level): + self.level = level + + def log(self, level, fmt, *args): + '''Log a message in a process safe fashion. + Message will be of the form [level] fmt%args.''' + if level <= self.level: + txt = fmt % args + try: + self.queue.put((self.color | level, self.proc_id, txt), False) + except Exception: + self.write_message(self.color | level, txt) + + def debug(self, fmt, *args): + self.log(DEBUG, fmt, *args) + + def info(self, fmt, *args): + self.log(INFO, fmt, *args) + + def warning(self, fmt, *args): + self.log(WARN, fmt, *args) + + def error(self, fmt, *args): + self.log(ERROR, fmt, *args) + + def trace(self, fmt, *args): + self.log(TRACE, fmt, *args) + + def traceback(self, level=INFO): + if level > self.level: + return + lines = trim_traceback(traceback.format_exc()) + for line in lines: + try: + self.queue.put((self.color | TRACEBACK, self.proc_id, line), False) + except Exception: + self.write_message(TRACEBACK, line) + + def close(self): + self.queue.put(None) + + def write_message(self, level, text): + '''Write a message direct to stdout without queueing. + Safe to use even after logger is closed. + Calling this concurrently from different processes or before calling logger.close() + may cause messages to become interleaved.''' + if level <= self.level: + write_message_with_proc(self.color | level, self.proc_id, text) + +#Function run by logger output process +def _message_loop(log_queue): + # use utf-8 as the character encoding for stdout/stderr to be able to properly + # log/print things on systems that use bad default encodings (windows). + sys.stdout.reconfigure(encoding='utf-8') + sys.stderr.reconfigure(encoding='utf-8') + + common = set() + while True: + try: + msg = log_queue.get() + if msg is None: + return + level, proc_id, text = msg + if proc_id: + write_message_with_proc(level, proc_id, text) + elif (level, text) not in common: + write_message(level, text) + common.add((level, text)) + except KeyboardInterrupt: + #Will be handled in other processes. + pass + +def select_traceback_lines(lines, limit_start=30, limit_end=12): + '''Select a subset of traceback lines to be displayed, cutting out the middle part of the + traceback if the length exceeds `limit_start + limit_end`. + This is intended to avoid displaying too many lines of tracebacks + that are not relevant to the user.''' + lines = lines.splitlines() + num_lines = len(lines) + limit = limit_start + limit_end + if num_lines <= limit: + yield from lines + else: + yield from lines[:limit_start] + yield "... {} lines skipped".format(num_lines - limit) + yield from lines[-limit_end:] + + +def trim_traceback(lines): + trimmed = [] + for line in select_traceback_lines(lines): + shortline = line.strip() + try: + if shortline.startswith("File"): + shortline = '"semmle' + shortline.split("semmle")[-1] + elif shortline.startswith("..."): + pass + else: + continue + except Exception: + #Formatting error, just emit line as-is. + pass + trimmed.append(shortline) + return trimmed + +class StructuredLogObject(object): + """ + Base class for CodeQL diagnostic message format + + see https://github.com/github/code-scanning/blob/main/docs/adrs/0035-diagnostics.md#codeql-diagnostic-message-format + """ + def to_dict(self): + # Discard any entries with a value of `None` + def f(v): + if isinstance(v, StructuredLogObject): + return v.to_dict() + return v + return {k: f(v) for k, v in self.__dict__.items() if v is not None} + +class Severity(StructuredLogObject, enum.Enum): + ERROR = "error" + WARNING = "warning" + NOTE = "note" + + def to_dict(self): + return self.value + +class Source(StructuredLogObject): + def __init__(self, id, name, extractorName="python"): + self.id = id + self.name = name + self.extractorName = extractorName + + def extractorName(self, extractorName): + self.extractorName = extractorName + return self + +class Visibility(StructuredLogObject): + def __init__(self, statusPage=False, cliSummaryTable=False, telemetry=False): + self.statusPage = statusPage + self.cliSummaryTable = cliSummaryTable + self.telemetry = telemetry + + def statusPage(self, statusPage): + self.statusPage = statusPage + return self + + def cliSummaryTable(self, cliSummaryTable): + self.cliSummaryTable = cliSummaryTable + return self + + def telemetry(self, telemetry): + self.telemetry = telemetry + return self + +class Location(StructuredLogObject): + def __init__(self, file=None, startLine=None, startColumn=None, endLine=None, endColumn=None): + self.file = file + self.startLine = startLine + self.startColumn = startColumn + + # If you set startline/startColumn you MUST also set endLine/endColumn, so we + # ensure they are also set. + self.endLine = endLine + if endLine is None and startLine is not None: + self.endLine = startLine + + self.endColumn = endColumn + if endColumn is None and startColumn is not None: + self.endColumn = startColumn + + def file(self, file): + self.file = file + return self + + def startLine(self, startLine): + self.startLine = startLine + return self + + def startColumn(self, startColumn): + self.startColumn = startColumn + return self + + def endLine(self, endLine): + self.endLine = endLine + return self + + def endColumn(self, endColumn): + self.endColumn = endColumn + return self + +class DiagnosticMessage(StructuredLogObject): + def __init__(self, source, severity=Severity.WARNING, location=None, markdownMessage=None, plaintextMessage=None, helpLinks=None, visibility=None, attributes=None, timestamp=None): + self.timestamp = timestamp or datetime.datetime.now().isoformat() + self.source = source + self.severity = severity + self.location = location + self.markdownMessage = markdownMessage + self.plaintextMessage = plaintextMessage + self.helpLinks = helpLinks + if visibility is None: + visibility = Visibility() + self.visibility = visibility + self.attributes = attributes + + def with_severity(self, severity): + self.severity = severity + return self + + def with_location(self, location): + self.location = location + return self + + def markdown(self, message): + self.markdownMessage = message + return self + + def text(self, message): + self.plaintextMessage = message + return self + + def help_link(self, link): + if self.helpLinks is None: + self.helpLinks = [] + self.helpLinks.append(link) + return self + + def cli_summary_table(self): + self.visibility.cliSummaryTable = True + return self + + def status_page(self): + self.visibility.statusPage = True + return self + + def telemetry(self): + self.visibility.telemetry = True + return self + + def attribute(self, key, value): + if self.attributes is None: + self.attributes = {} + self.attributes[key] = value + return self + + def with_timestamp(self, timestamp): + self.timestamp = timestamp + return self + +def get_stack_trace_lines(): + """Creates a stack trace for inclusion into the `attributes` part of a diagnostic message. + Limits the size of the stack trace to 5000 characters, so as to not make the SARIF file overly big. + """ + lines = trim_traceback(traceback.format_exc()) + trace_length = 0 + for i, line in enumerate(lines): + trace_length += len(line) + if trace_length > 5000: + return lines[:i] + return lines + +def syntax_error_message(exception, unit): + l = Location(file=unit.path, startLine=exception.lineno, startColumn=exception.offset) + error = (DiagnosticMessage(Source("py/diagnostics/syntax-error", "Could not process some files due to syntax errors"), Severity.WARNING) + .with_location(l) + .markdown("A parse error occurred while processing `{}`, and as a result this file could not be analyzed. Check the syntax of the file using the `python -m py_compile` command and correct any invalid syntax.".format(unit.path)) + .attribute("traceback", get_stack_trace_lines()) + .attribute("args", exception.args) + .status_page() + .cli_summary_table() + .telemetry() + ) + return error + +def recursion_error_message(exception, unit): + l = Location(file=unit.path) + return (DiagnosticMessage(Source("py/diagnostics/recursion-error", "Recursion error in Python extractor"), Severity.ERROR) + .with_location(l) + .text(exception.args[0]) + .attribute("traceback", get_stack_trace_lines()) + .attribute("args", exception.args) + .telemetry() + ) + +def internal_error_message(exception, unit): + l = Location(file=unit.path) + return (DiagnosticMessage(Source("py/diagnostics/internal-error", "Internal error in Python extractor"), Severity.ERROR) + .with_location(l) + .text("Internal error") + .attribute("traceback", get_stack_trace_lines()) + .attribute("args", exception.args) + .telemetry() + ) diff --git a/python/extractor/semmle/path_filters.py b/python/extractor/semmle/path_filters.py new file mode 100644 index 00000000000..cb1a4d9b8bc --- /dev/null +++ b/python/extractor/semmle/path_filters.py @@ -0,0 +1,71 @@ +import os +import re + +def escape(pattern): + '''Escape special characters''' + ESCAPE = "(){}[].^$+\\?|" + def escape_char(char): + if char in ESCAPE: + return "\\" + char + else: + return char + return ''.join(escape_char(c) for c in pattern) + +SEP = escape(os.sep) + +STAR_STAR_REGEX = "([^%s]*%s)*" % (SEP, SEP) +STAR_REGEX = "[^%s]*" % SEP + +def validate_pattern(pattern): + '''Validate that an include/exclude pattern is of the correct syntax.''' + kind, glob = pattern.split(":") + if not kind in ("include", "exclude"): + raise SyntaxError("Illegal type: '%s'" % kind) + parts = glob.split("/") + for p in parts: + if "**" in p and p != "**": + raise SyntaxError("Illegal path element: '%s'" % p) + +def glob_part_to_regex(glob, add_sep): + '''Convert glob part to regex pattern''' + if glob == "**": + return STAR_STAR_REGEX + if '*' in glob: + pattern = glob.replace('*', STAR_REGEX) + else: + pattern = glob + if add_sep: + return pattern + SEP + else: + return pattern + +def glob_to_regex(glob, prefix=""): + '''Convert entire glob to a compiled regex''' + glob = glob.strip().strip("/") + parts = glob.split("/") + #Trailing '**' is redundant, so strip it off. + if parts[-1] == "**": + parts = parts[:-1] + if not parts: + return ".*" + parts = [ glob_part_to_regex(escape(p), True) for p in parts[:-1] ] + [ glob_part_to_regex(escape(parts[-1]), False) ] + # we need to escape the prefix, specifically because on windows the prefix will be + # something like `C:\\folder\\subfolder\\` and without escaping the + # backslash-path-separators will get interpreted as regex escapes (which might be + # invalid sequences, causing the extractor to crash) + full_pattern = escape(prefix) + ''.join(parts) + "(?:" + SEP + ".*|$)" + return re.compile(full_pattern) + +def filter_from_pattern(pattern, prev_filter, prefix): + '''Create a filter function from a pattern and the previous filter. + The pattern takes precedence over the previous filter + ''' + validate_pattern(pattern) + kind, glob = pattern.strip().split(":") + result = kind == "include" + regex = glob_to_regex(glob, prefix) + def filter(path): + if regex.match(path): + return result + return prev_filter(path) + return filter diff --git a/python/extractor/semmle/path_rename.py b/python/extractor/semmle/path_rename.py new file mode 100644 index 00000000000..3a72d41e971 --- /dev/null +++ b/python/extractor/semmle/path_rename.py @@ -0,0 +1,44 @@ +import os +import semmle.projectlayout as projectlayout +from semmle.util import SemmleError + +__all__ = "renamer_from_options_and_env" + +def _realpath(path): + try: + return os.path.realpath(path) + except IOError: + return os.path.abspath(path) + +def renamer_from_options_and_env(options, logger): + 'Returns a renamer function which takes a path and returns the nominal path' + preserve_symlinks = os.environ.get('SEMMLE_PRESERVE_SYMLINKS', "") + if options.no_symlinks or preserve_symlinks.lower() == "true": + pre_rename = os.path.abspath + else: + pre_rename = _realpath + + if options.renamer: + try: + module = __import__(options.renamer, fromlist=['get_renamer']) + rename = module.get_renamer() + except (AttributeError, ImportError): + raise SemmleError("Cannot get renamer from module " + options.renamer) + else: + path_transformer = os.environ.get("SEMMLE_PATH_TRANSFORMER", None) + if path_transformer: + logger.info("Using path transformer '%s'", path_transformer) + rename = projectlayout.get_renamer(path_transformer) + else: + rename = lambda path : path + + if os.name == "nt": + def post_rename(path): + if path[1] == ':': + path = path[0].upper() + path[1:] + return path + else: + post_rename = lambda path : path + + renamer = lambda path : post_rename(rename(pre_rename(path))) + return renamer diff --git a/python/extractor/semmle/populator.py b/python/extractor/semmle/populator.py new file mode 100644 index 00000000000..c2d6b6277c9 --- /dev/null +++ b/python/extractor/semmle/populator.py @@ -0,0 +1,148 @@ +import sys +import os +import subprocess +from ast import literal_eval + +from semmle import logging +from semmle import traverser +from semmle import cmdline +from semmle import worker +from semmle.util import VERSION, update_analysis_version, get_analysis_major_version +from buildtools.version import executable + +'''The populator generates trap files from a Python project. +The populator consists of two parts: a traverser front end which traverses the file +system and multiple worker back ends which extract information from the modules. +''' + +#NOTE: The front-end is simply an iterable of "extractables" and it should be easy to +#plug-in new front-ends if needed. + +def cleanup_sys_path(path): + '''Clean up sys.path removing duplicates and + current working directory, making it safe for analysis. + ''' + #Remove duplicates + path = [ p for i, p in enumerate(path) if i == 0 or p != path[i-1] ] + #Remove curent working directory + cwd = os.getcwd() + if cwd in path: + path.remove(cwd) + return path + +def get_py2_sys_path(logger, py3_sys_path): + '''Get the sys.path for Python 2, if it is available. If no Python 2 is available, + simply return the Python 3 sys.path. Returns a tuple of the sys.path and a boolean indicating + whether Python 2 is available.''' + try: + command = " ".join(executable(2) + ['-c "import sys; print(sys.path)"']) + # We need `shell=True` here in order for the test framework to function correctly. For + # whatever reason, the `PATH` variable is ignored if `shell=False`. + # Also, this in turn forces us to give the whole command as a string, rather than a list. + # Otherwise, the effect is that the Python interpreter is invoked _as a REPL_, rather than + # with the given piece of code. + output = subprocess.check_output(command, shell=True).decode(sys.getfilesystemencoding()) + py2_sys_path = literal_eval(output) + # Ensure that the first element of the sys.path is the same as the Python 3 sys.path -- + # specifically a reference to our local `tools` directory. This ensures that the `six` stubs + # are picked up from there. The item we're overwriting here is '', which would be cleaned up + # later anyway. + py2_sys_path[0] = py3_sys_path[0] + return py2_sys_path, True + except (subprocess.CalledProcessError, ValueError, SyntaxError) as e: + logger.error("Error while getting Python 2 sys.path:") + logger.error(e) + logger.info("No Python 2 found. Using Python 3 sys.path.") + return py3_sys_path, False + +def main(sys_path = sys.path[:]): + options, args = cmdline.parse(sys.argv[1:]) + logger = logging.Logger(options.verbosity, options.colorize) + # This is not the prettiest way to do it, but when running tests we want to ensure that the + # `--lang` flag influences the analysis version (e.g. so that we include the correct stdlib TRAP + # file). So, we change the values of the appropriate variables (which would otherwise be based + # on `CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION`), overwriting the previous values. + if options.language_version: + last_version = options.language_version[-1] + update_analysis_version(last_version) + + found_py2 = False + if get_analysis_major_version() == 2: + # Setup `sys_path` to use the Python 2 standard library + sys_path, found_py2 = get_py2_sys_path(logger, sys_path) + + # use utf-8 as the character encoding for stdout/stderr to be able to properly + # log/print things on systems that use bad default encodings (windows). + sys.stdout.reconfigure(encoding='utf-8') + sys.stderr.reconfigure(encoding='utf-8') + + sys.setrecursionlimit(2000) + sys_path = cleanup_sys_path(sys_path) + options.sys_path = sys_path[1:] + + if sys.version_info.major == 2: + logger.error("Extraction using Python 2 is not supported.") + logger.warning("To use the Python extractor, please ensure that Python 3 is available on your system.") + logger.warning("For more information, see https://codeql.github.com/docs/codeql-overview/system-requirements/#additional-software-requirements") + logger.warning("and https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/#languages-and-compilers") + logger.close() + logging.stop() + sys.exit(1) + elif found_py2: + logger.info("Extraction will use the Python 2 standard library.") + else: + logger.info("Extraction will use the Python 3 standard library.") + logger.info("sys_path is: %s", sys_path) + try: + the_traverser = traverser.Traverser(options, args, logger) + except Exception as ex: + logger.error("%s", ex) + logger.close() + logging.stop() + sys.exit(1) + run(options, args, the_traverser, logger) + + +def run(options, args, the_traverser, logger: logging.Logger): + logger.info("Python version %s", sys.version.split()[0]) + logger.info("Python extractor version %s", VERSION) + if 'CODEQL_EXTRACTOR_PYTHON_SOURCE_ARCHIVE_DIR' in os.environ: + archive = os.environ['CODEQL_EXTRACTOR_PYTHON_SOURCE_ARCHIVE_DIR'] + elif 'SOURCE_ARCHIVE' in os.environ: + archive = os.environ['SOURCE_ARCHIVE'] + else: + archive = None + trap_dir = cmdline.output_dir_from_options_and_env(options) + try: + pool = worker.ExtractorPool.from_options(options, trap_dir, archive, logger) + except ValueError as ve: + logger.error("%s", ve) + logger.close() + sys.exit(1) + try: + exitcode = 0 + pool.extract(the_traverser) + except worker.ExtractorFailure: + exitcode = 1 + except KeyboardInterrupt: + exitcode = 2 + logger.info("Keyboard interrupt") + except BaseException as ex: + exitcode = 3 + logger.error("Unexpected exception: %s ", ex) + logger.traceback(logging.WARN) + finally: + if exitcode: + logger.debug("Stopping...") + pool.stop() + else: + logger.debug("Writing interpreter trap") + pool.close() + logger.close() + logging.stop() + logger.write_message(logging.DEBUG, "Stopped." if exitcode else "Done.") + if exitcode: + sys.exit(exitcode) + +if __name__ == "__main__": + main() diff --git a/python/extractor/semmle/profiling.py b/python/extractor/semmle/profiling.py new file mode 100644 index 00000000000..02308434096 --- /dev/null +++ b/python/extractor/semmle/profiling.py @@ -0,0 +1,70 @@ +from . import util +import os.path +import sys +from time import time +import collections + +__all__ = [ 'get_profiler' ] + +class NoProfiler(object): + '''Dummy profiler''' + + def __init__(self): + pass + + def __enter__(self): + return self + + def __exit__(self, *args): + pass + +class StatProfiler(object): + ''' statprof based statistical profiler''' + + def __init__(self, outpath): + self.outpath = outpath + + def __enter__(self): + statprof.start() + return self + + def __exit__(self, *args): + statprof.stop() + with open(self.outpath, "w") as fd: + statprof.display(fd) + + +def get_profiler(options, id, logger): + '''Returns a profile based on options and version. `id` is used to + label the output file.''' + global statprof + if options.profile_out: + if sys.version_info >= (3,0): + logger.warning("Cannot create profiler: statprof is Python2 only.") + else: + try: + import statprof + util.makedirs(options.profile_out) + outpath = os.path.join(options.profile_out, "profile-%s.txt" % id) + logger.info("Writing profile information to %s", outpath) + return StatProfiler(outpath) + except ImportError: + logger.warning("Cannot create profiler: no statprof module.") + except Exception as ex: + logger.warning("Cannot create profiler: %s", ex) + return NoProfiler() + +class MillisecondTimer(object): + + def __init__(self): + self.elapsed = 0.0 + + def __enter__(self): + self.start = time() + return self + + def __exit__(self, *_): + self.elapsed += (time() - self.start)*1000 + + +timers = collections.defaultdict(MillisecondTimer) diff --git a/python/extractor/semmle/projectlayout.py b/python/extractor/semmle/projectlayout.py new file mode 100644 index 00000000000..ec657d2ae24 --- /dev/null +++ b/python/extractor/semmle/projectlayout.py @@ -0,0 +1,364 @@ +# +# This is a port of com.semmle.extractor.projectstructure.ProjectLayout +# and must be kept in sync +# + +"""Project-layout files are used to transform or exclude paths. The format +is described at https://semmle.com/wiki/display/SD/project-layout+format""" + +__ALL__ = [ 'load', 'ProjectLayout' ] + +import collections +import re +from functools import total_ordering +import sys + +def get_renamer(filename): + layout = load(filename) + def rename(path): + renamed = layout.artificial_path(path) + return path if renamed is None else renamed + return rename + +def load(filename): + """Load a project-layout file from 'filename'.""" + with open(filename, 'rb') as f: + content = f.read().decode('utf-8') + lines = [ line.strip() for line in content.split('\n') ] + return ProjectLayout(lines) + +def _escape_string_literal_for_regexp(literal, preserve): + ESCAPE = u"(){}[].^$+\\*?" + def escape(char): + if char in ESCAPE and not char in preserve: + return u"\\" + char + else: + return char + return u"".join(escape(c) for c in literal) + + +class ProjectLayout(object): + """ A project-layout file optionally begins with an '@' + followed by the name the project should be renamed to. + Optionally, it can then be followed by a list of + include/exclude patterns (see below) which are kept + as untransformed paths. This is followed by one or + more clauses. Each clause has the following form: + + #virtual-path + path/to/include + another/path/to/include + -/path/to/include/except/this + + i.e. one or more paths (to include) and zero or more paths + prefixed by minus-signs (to exclude).""" + + def __init__(self, lines): + """Construct a project-layout object from an array of strings, each + corresponding to one line of the project-layout. This constructor is + for testing. Usually, use the 'load' function.""" + + self._project = None + # Map from virtual path prefixes (following the '#' in the + # project-layout) to the sequence of patterns that fall into that + # section. Declared as an OrderedDict since iteration order matters -- + # the blocks are processed in the same order as they occur in the + # project-layout. + self._rewrites = collections.OrderedDict() + virtual = u"" + section = _Section() + self._rewrites[virtual] = section + num = 0 + for line in lines: + num += 1 + if not line: + continue + if line[0] == u'@': + if self._project is not None: + raise _error(u"Multiple project names in project-layout", num) + self._project = self._tail(line) + elif line[0] == u'#': + virtual = self._tail(line) + if virtual in self._rewrites: + raise _error(u"Duplicate virtual path prefix " + virtual, num) + section = _Section(virtual) + self._rewrites[virtual] = section + elif line[0] == u'-': + section.add(_Rewrite(self._tail(line), num)) + else: + section.add(_Rewrite(line, num, virtual)) + + @classmethod + def _tail(cls, line): + return line[1:].strip() + + def project_name(self, default=None): + """ Get the project name, if specified by the project-layout. + If default is specified, it will be returned if no project name + is specified. Otherwise, an exception is thrown.""" + + if self._project is not None: + return self._project + if default is not None: + return default + raise Exception(u"Project specificatino does not define a project name.") + + def sections(self): + """return the section headings (aka virtual paths)""" + return self._rewrites.keys() + + def section_is_empty(self, section): + """Determine whether or not a particular section in this + project-layout is empty (has no include/exclude patterns).""" + + if section in self._rewrites: + return self._rewrites[section].is_empty() + raise Exception(u"Section does not exist: " + section) + + def rename_section(self, old, new): + """Reaname a section in this project-layout.""" + + if not old in self._rewrites: + raise Exception(u"Section does not exist: " + old) + section = self._rewrites.pop(old) + section.rename(new) + self._rewrites[new] = section + + def sub_layout(self, section_name): + """Return a project-layout file for just one of the sections in this + project-layout. This is done by copying all the rules from the + section, and changing the section heading (beginning with '#') + to a project name (beginning with '@').""" + + section = self._rewrites.get(section_name, None) + if section is None: + raise Exception(u"Section does not exist: " + section) + return section.to_layout() + + def artificial_path(self, path): + """Maps a path to its corresponding artificial path according to the + rules in this project-layout. If the path is excluded (either + explicitly, or because it is not mentioned in the project-layout) + then None is returned. + + Paths should start with a leading forward-slash.""" + + prefixes = _Section.prefixes(path) + for section in self._rewrites.values(): + rewrite = section.match(prefixes); + rewritten = None; + if rewrite is not None: + rewritten = rewrite.rewrite(path); + if rewritten is not None: + return rewritten + return None + + def include_file(self, path): + """Checks whether a path should be included in the project specified by + this file. A file is included if it is mapped to some location. + + Paths should start with a leading forward-slash.""" + + return self.artificial_path(path) is not None + + +class _Section(object): + """Each section corresponds to a block beginning with '#some/path'. There + is also an initial section for any include/exclude patterns before the + first '#'.""" + + def __init__(self, virtual=u""): + self._virtual = virtual + self._simple_rewrites = collections.OrderedDict() + self._complex_rewrites = [] + + def to_layout(self): + result = [] + rewrites = [] + rewrites.extend(self._simple_rewrites.values()) + rewrites.extend(self._complex_rewrites) + rewrites.sort() + + result.append(u'@' + self._virtual) + for rewrite in rewrites: + result.append(str(rewrite)) + result.append(u'') + return u'\n'.join(result) + + def rename(self, new): + self._virtual = new + for rewrite in self._simple_rewrites.values(): + rewrite.virtual = new + for rewrite in self._complex_rewrites: + rewrite.virtual = new + + def add(self, rewrite): + if rewrite.is_simple(): + self._simple_rewrites[rewrite.simple_prefix()] = rewrite + else: + self._complex_rewrites.append(rewrite) + + def is_empty(self): + return not self._simple_rewrites and not self._complex_rewrites + + @classmethod + def prefixes(cls, path): + result = [path] + i = len(path) + while (i > 1): + i = path.rfind(u'/', 0, i) + result.append(path[:i]) + result.append(u"/") + return result; + + def match(self, prefixes): + best = None + for prefix in prefixes: + match = self._simple_rewrites.get(prefix, None) + if match is not None: + if best is None or best._line < match._line: + best = match; + # Last matching rewrite 'wins' + for rewrite in reversed(self._complex_rewrites): + if rewrite.matches(prefixes[0]): + if best is None or best._line < rewrite._line: + best = rewrite; + # no point continuing + break; + return best; + +@total_ordering +class _Rewrite(object): + """Each Rewrite corresponds to a single include or exclude line in the + project-layout. For example, for following clause there would be three + Rewrite objects: + + #Source + /src + /lib + -/src/tests + + For includes use the two-argument constructor; for excludes the + one-argument constructor.""" + + # The intention is to allow the ** wildcard when followed by a slash only. The + # following should be invalid: + # - a / *** / b (too many stars) + # - a / ** (** at the end should be omitted) + # - a / **b (illegal) + # - a / b** (illegal) + # - ** (the same as a singleton '/') + # This regular expression matches ** when followed by a non-/ character, + # or the end of string. + _verify_stars = re.compile(u".*(?:\\*\\*[^/].*|\\*\\*$|[^/]\\*\\*.*)") + + def __init__(self, path, line, virtual=None): + if virtual is None: + exclude = path + self._line = line; + self._original = u'-' + exclude; + if not exclude.startswith(u"/"): + exclude = u'/' + exclude + if exclude.find(u"//") != -1: + raise _error(u"Illegal '//' in exclude path", line) + if self._verify_stars.match(exclude): + raise _error(u"Illegal use of '**' in exclude path", line) + if exclude.endswith(u"/"): + exclude = exclude[0 : -1] + self._pattern = self._compile_prefix(exclude); + exclude = exclude.replace(u"//", u"/") + if len(exclude) > 1 and exclude.endswith(u"/"): + exclude = exclude[0 : -1] + self._simple = None if exclude.find(u"*") != -1 else exclude + else: + include = path + self._line = line; + self._original = include; + if not include.startswith(u"/"): + include = u'/' + include + doubleslash = include.find(u"//") + if doubleslash != include.find(u"//"): + raise _error(u"More than one '//' in include path (project-layout)", line) + if self._verify_stars.match(include): + raise _error(u"Illegal use of '**' in include path (project-layout)", line) + if not virtual.startswith(u"/"): + virtual = u"/" + virtual + if virtual.endswith(u"/"): + virtual = virtual[0 : -1] + self._pattern = self._compile_prefix(include); + include = include.replace(u"//", u"/"); + if len(include) > 1 and include.endswith(u"/"): + include = include[0 : -1] + self._simple = None if include.find(u"*") != -1 else include + self._virtual = virtual; + + @classmethod + def _compile_prefix(cls, pattern): + """ + Patterns are matched by translation to regex. The following invariants + are assumed to hold: + + - The pattern starts with a '/'. + - There are no occurrences of '**' that is not surrounded by slashes + (unless it is at the start of a pattern). + - There is at most one double slash. + + The result of the translation has precisely one capture group, which + (after successful matching) will contain the part of the path that + should be glued to the virtual prefix. + + It proceeds by starting the capture group either after the double + slash or at the start of the pattern, and then replacing '*' with + '[^/]*' (meaning any number of non-slash characters) and '/**' with + '(?:|/.*)' (meaning empty string or a slash followed by any number of + characters including '/'). + + The pattern is terminated by the term '(?:/.*|$)', saying 'either the + next character is a '/' or the string ends' -- this avoids accidental + matching of partial directory/file names. + + IMPORTANT: Run the ProjectLayoutTests when changing this! + """ + + pattern = _escape_string_literal_for_regexp(pattern, u"*") + if pattern.find(u"//") != -1: + pattern = pattern.replace(u"//", u"(/") + else: + pattern = u"(" + pattern + if pattern.endswith(u"/"): + pattern = pattern[0 : -1] + pattern = pattern.replace(u"/**", u"-///-") + pattern = pattern.replace(u"*", u"[^/]*") + pattern = pattern.replace(u"-///-", u"(?:|/.*)") + return re.compile(pattern + u"(?:/.*|$))") + + def is_simple(self): + return self._simple is not None + + def simple_prefix(self): + """Returns the path included/excluded by this rewrite, if it is + simple, or null if it is not.""" + + return self._simple + + def matches(self, path): + return bool(self._pattern.match(path)) + + def rewrite(self, path): + if self._virtual is None: + return None + matcher = self._pattern.match(path) + if not matcher: + return None + return self._virtual + matcher.group(1); + + def __unicode__(self): + return self._original + + def __lt__(self, other): + return self._line < other._line + + __hash__ = None + +def _error(message, line): + raise Exception(u"%s (line %d)" % (message, line)) diff --git a/python/extractor/semmle/python/AstMeta.py b/python/extractor/semmle/python/AstMeta.py new file mode 100644 index 00000000000..db0e7560fe2 --- /dev/null +++ b/python/extractor/semmle/python/AstMeta.py @@ -0,0 +1,560 @@ +'''Meta nodes for defining database relations''' + +from abc import abstractmethod + +from semmle.util import fprintf + +PREFIX = 'py_' + +__all__ = [ 'order' ] + + +parent_nodes = {} + +class Node(object): + 'Node in the attribute tree, describing relations' + + next_id = 0 + + def __init__(self): + Node.next_id += 1 + self._index = Node.next_id + self._unique_parent = None + + @property + def parents(self): + return parent_of(self) + + def add_child(self, child): + child.add_parent(self) + + def db_key(self, name): + return 'unique int ' + name + ' : ' + self.db_name() + + def is_sub_type(self): + return False + + @staticmethod + def is_union_type(): + return False + + def is_case_type(self): + return False + + @staticmethod + def is_list(): + return False + + @staticmethod + def is_primitive(): + return False + + def prune(self, node_set): + return self + + @abstractmethod + def child_offsets(self, n): + pass + + @abstractmethod + def write_fields(self, out): + pass + + @abstractmethod + def ql_name(self): + pass + + @property + def unique_parent(self): + if self._unique_parent is None: + parents = self.parents + if len(parents.child_offsets(self)) < 2: + self._unique_parent = True + elif parents.is_union_type(): + self._unique_parent = False + for t in parents.types: + if len(t.child_offsets(self)) > 1: + break + else: + self._unique_parent = True + return self._unique_parent + + +class PrimitiveNode(Node): + 'A primitive node: int, str, etc' + + def __init__(self, name, db_name, key, descriptive_name = None): + Node.__init__(self) + assert isinstance(name, str) + self.name = name + self.super_type = None + self.layout = [] + self.fields = [] + self.subclasses = set() + self._key = key + self._db_name = db_name + if descriptive_name is None: + self.descriptive_name = self.name + else: + self.descriptive_name = descriptive_name + + def db_key(self, name): + return self._key + ' ' + name + ' : ' + self._db_name + ' ref' + + @property + def __name__(self): + return self.name + + def ql_name(self): + 'Return Java style name if a schema type, otherwise the specified name' + if self._db_name[0] == '@': + return capitalize(self.name) + else: + return self._db_name + + def relation_name(self): + return pluralize(PREFIX + self.name) + + def db_name(self): + return self._db_name + + def add_parent(self, p): + parent_nodes[self] = UnionNode.join(parent_of(self), p) + + def fixup(self): + pass + + @staticmethod + def is_primitive(): + return True + + def child_offsets(self, n): + return set() + + def write_init(self, out): + fprintf(out, "%s = PrimitiveNode(%s, %s, %s)\n", self.name, + self.name, self._db_name, self._key) + + def write_fields(self, out): + pass + + +def parent_of(node): + if node in parent_nodes: + return parent_nodes[node] + else: + return None + +class ClassNode(Node): + 'A node corresponding to a single AST type' + + def __init__(self, name, super_type = None, descriptive_name = None): + Node.__init__(self) + assert isinstance(name, str) + self.name = name + self._db_name = name + self.super_type = super_type + self.layout = [] + if super_type: + self.fields = list(super_type.fields) + else: + self.fields = [] + self.subclasses = set() + if super_type: + super_type.subclasses.add(self) + if descriptive_name is None: + self.descriptive_name = self.name.lower() + else: + self.descriptive_name = descriptive_name + if self.descriptive_name[0] == '$': + self.descriptive_name = self.descriptive_name[1:] + elif super_type and ' ' not in self.descriptive_name: + self.descriptive_name += ' ' + super_type.descriptive_name + + def field(self, name, field_type, descriptive_name = None, artificial=False, parser_type = None): + if descriptive_name is None: + self.fields.append((name, field_type, name, artificial, parser_type)) + else: + self.fields.append((name, field_type, descriptive_name, artificial, parser_type)) + + def is_stmt_or_expr_subclass(self): + if self.super_type is None: + return False + return self.super_type.name in ('expr', 'stmt') + + def is_sub_type(self): + if self.super_type is None: + return False + return self.super_type.is_case_type() + + def is_case_type(self): + return (self.subclasses + and parent_of(self)) + + def fixup(self): + self.add_children() + self.compute_layout() + + def add_parent(self, p): + parent_nodes[self] = UnionNode.join(parent_of(self), p) + if self.super_type: + self.super_type.add_parent(p) + + def add_children(self): + for f, f_node, _, _, _ in self.fields: + self.add_child(f_node) + + def compute_layout(self): + fields = self.fields + lists = 0 + for f, f_node, _, _, _ in fields: + if (isinstance(f_node, ListNode) and + f_node.item_type.__name__ != 'stmt'): + lists += 1 + index = 0 + inc = 1 + for f, f_node, docname, artificial, pt in fields: + self.layout.append((f, f_node, index, docname, artificial, pt)) + index += inc + + def relation_name(self): + return pluralize(PREFIX + self._db_name) + + def set_name(self, name): + self._db_name = name + + @property + def __name__(self): + return self.name + + def ql_name(self): + if self._db_name == 'str': + return 'string' + elif self._db_name in ('int', 'float'): + return self.db_name + name = self._db_name + return ''.join(capitalize(part) for part in name.split('_')) + + def db_name(self): + return '@' + PREFIX + self._db_name + + def dump(self, out): + def yes_no(b): + return "yes" if b else "no" + fprintf(out, "'%s' :\n", self.name) + fprintf(out, " QL name: %s\n", self.ql_name()) + fprintf(out, " Relation name: %s\n", self.relation_name()) + fprintf(out, " Is case_type %s\n", yes_no(self.is_case_type())) + fprintf(out, " Super type: %s\n", self.super_type) + fprintf(out, " Layout:\n") + for l in self.layout: + fprintf(out, " %s, %s, %s, '%s, %s'\n" % l) + fprintf(out, " Parents: %s\n\n", parent_of(self)) + + def write_init(self, out): + if self.super_type: + fprintf(out, "%s = ClassNode('%s', %s)\n", self.name, + self.name, self.super_type.name) + else: + fprintf(out, "%s = ClassNode('%s')\n", self.name, self.name) + + def write_fields(self, out): + for name, field_type, docname, _, _ in self.fields: + fprintf(out, "%s.field('%s', %s, '%s')\n", self.name, + name, field_type.__name__, docname) + if self.layout: + fprintf(out, "\n") + + def __repr__(self): + return "Node('%s')" % self.name + + def child_offsets(self, n): + #Only used by db-scheme generator, so can be slow + found = set() + for name, node, offset, _, artificial, _ in self.layout: + if node is n: + found.add(offset) + if self.subclasses: + for s in self.subclasses: + found.update(s.child_offsets(n)) + return found + +class ListNode(Node): + "Node corresponding to a list, parameterized by its member's type" + + def __init__(self, item_node, name=None): + Node.__init__(self) + self.list_type = None + self.layout = () + self.super_type = None + self.item_type = item_node + self.subclasses = () + self.add_child(item_node) + self.name = name + + def relation_name(self): + return pluralize(PREFIX + self.__name__) + + def dump(self, out): + fprintf(out, "List of %s\n", self.name) + fprintf(out, " Parents: %s\n\n", parent_of(self)) + + def write_init(self, out): + fprintf(out, "%s = ListNode(%s)\n", + self.__name__, self.item_type.__name__) + + def write_fields(self, out): + pass + + @staticmethod + def is_list(): + return True + + @property + def __name__(self): + if self.name is None: + assert isinstance(self.item_type.__name__, str) + return self.item_type.__name__ + '_list' + else: + return self.name + + @property + def descriptive_name(self): + return self.item_type.descriptive_name + ' list' + + def db_name(self): + return '@' + PREFIX + self.__name__ + + def ql_name(self): + if self.name is not None: + return capitalize(self.name) + if self.item_type is str: + return 'StringList' + elif self.item_type is int: + return 'IntList' + elif self.item_type is float: + return 'FloatList' + return capitalize(self.item_type.ql_name()) + 'List' + + def __repr__(self): + return "ListNode(%s)" % self.__name__ + + def fixup(self): + pass + + def add_parent(self, p): + parent_nodes[self] = UnionNode.join(parent_of(self), p) + + def child_offsets(self, n): + return set((0,1,2,3)) + +_all_unions = {} + +class UnionNode(Node): + 'Node representing a set of AST types' + + def __init__(self, *types): + Node.__init__(self) + assert len(types) > 1 + self.types = frozenset(types) + self.name = None + self.super_type = None + self.layout = [] + self.subclasses = () + #Whether this node should be visited in auto-generated extractor. + self.visit = False + + @staticmethod + def join(t1, t2): + if t1 is None: + return t2 + if t2 is None: + return t1 + if isinstance(t1, UnionNode): + all_types = set(t1.types) + else: + all_types = set([t1]) + if isinstance(t2, UnionNode): + all_types = all_types.union(t2.types) + else: + all_types.add(t2) + done = False + while not done: + for n in all_types: + if n.super_type in all_types: + all_types.remove(n) + break + else: + done = True + return UnionNode._make_union(all_types) + + @staticmethod + def _make_union(all_types): + if len(all_types) == 1: + return next(iter(all_types)) + else: + key = frozenset(all_types) + if key in _all_unions: + u = _all_unions[key] + else: + u = UnionNode(*all_types) + _all_unions[key] = u + return u + + def set_name(self, name): + self.name = name + + @staticmethod + def is_union_type(): + return True + + def write_init(self, out): + fprintf(out, "%s = UnionNode(%s)\n", self.__name__, + ', '.join(t.__name__ for t in self.types)) + if self.name: + fprintf(out, "%s.setname('%s')\n", self.name, self.name) + + def write_fields(self, out): + pass + + def fixup(self): + pass + + def __hash__(self): + return hash(self.types) + + def __eq__(self, other): + assert len(self.types) > 1 + if isinstance(other, UnionNode): + return self.types == other.types + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + @property + def __name__(self): + if self.name is None: + names = [ n.__name__ for n in self.types ] + return '_or_'.join(sorted(names)) + else: + return self.name + + @property + def descriptive_name(self): + if self.name is None: + names = [ n.descriptive_name for n in self.types ] + return '_or_'.join(sorted(names)) + else: + return self.name + + def db_name(self): + return '@' + PREFIX + self.__name__ + + def relation_name(self): + return pluralize(PREFIX + self.__name__) + + def ql_name(self): + if self.name is None: + assert len(self.types) > 1 + names = [ n.ql_name() for n in self.types ] + return 'Or'.join(sorted(names)) + else: + + return ''.join(capitalize(part) for part in self.name.split('_')) + + def add_parent(self, p): + for n in self.types: + n.add_parent(p) + + def child_offsets(self, n): + res = set() + for t in self.types: + res = res.union(t.child_offsets(n)) + return res + + def prune(self, node_set): + new_set = self.types.intersection(node_set) + if len(new_set) == len(self.types): + return self + if not new_set: + return None + return UnionNode._make_union(new_set) + +def shorten_name(node): + p = parent_of(node) + if (isinstance(p, UnionNode) and len(p.__name__) > 16 + and len(p.__name__) > len(node.__name__) + 4): + p.set_name(node.__name__ + '_parent') + + +def build_node_relations(nodes): + nodes = set(nodes) + for node in nodes: + node.fixup() + for node in sorted(nodes, key=lambda n : n.__name__): + shorten_name(node) + node_set = set(nodes) + for node in (str, int, float, bytes): + p = parent_of(node) + if p is not None: + node_set.add(p) + for node in nodes: + p = parent_of(node) + if p is not None: + node_set.add(p) + for n in nodes: + sub_types = sorted(n.subclasses, key = lambda x : x._index) + if n.is_case_type(): + for index, item in enumerate(sub_types): + item.index = index + for n in list(nodes): + if not n.parents and n.is_list() and n.name is None: + #Discard lists with no parents and no name as unreachable + node_set.remove(n) + #Prune unused nodes from unions. + node_set = set(node.prune(node_set) for node in node_set) + for node in node_set: + if node in parent_nodes: + parent_nodes[node] = parent_nodes[node].prune(node_set) + for node in node_set: + shorten_name(node) + result_nodes = {} + for n in node_set: + if n: + result_nodes[n.__name__] = n + return result_nodes + +def pluralize(name): + if name[-1] == 's': + if name[-2] in 'aiuos': + return name + 'es' + else: + #Already plural + return name + elif name.endswith('ex'): + return name[:-2] + 'ices' + elif name.endswith('y'): + return name[:-1] + 'ies' + else: + return name + 's' + +def capitalize(name): + 'Unlike the str method capitalize(), leave upper case letters alone' + return name[0].upper() + name[1:] + +def order(node): + if node.is_primitive(): + return 0 + if isinstance(node, ClassNode): + res = 1 + while node.super_type: + node = node.super_type + res += 1 + return res + if isinstance(node, ListNode): + return order(node.item_type) + 1 + else: + assert isinstance(node, UnionNode) + return max(order(t) for t in node.types)+1 diff --git a/python/extractor/semmle/python/__init__.py b/python/extractor/semmle/python/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/semmle/python/ast.py b/python/extractor/semmle/python/ast.py new file mode 100644 index 00000000000..25b93cae72a --- /dev/null +++ b/python/extractor/semmle/python/ast.py @@ -0,0 +1,949 @@ +''' +Abstract syntax tree classes. +This is designed to replace the stdlib ast module. +Unlike the stdlib module, it is version independent. + +The classes in this file are based on the corresponding types in the cpython interpreter, copyright PSF. +''' + + +class AstBase(object): + __slots__ = "lineno", "col_offset", "_end", + + def __repr__(self): + args = ",".join(repr(getattr(self, field, None)) for field in self.__slots__) + return "%s(%s)" % (self.__class__.__name__, args) + +class Class(AstBase): + 'AST node representing a class definition' + + __slots__ = "name", "body", + + def __init__(self, name, body): + self.name = name + self.body = body + + +class Function(AstBase): + 'AST node representing a function definition' + + __slots__ = "is_async", "name", "type_parameters", "args", "vararg", "kwonlyargs", "kwarg", "body", + + def __init__(self, name, type_parameters, args, vararg, kwonlyargs, kwarg, body, is_async=False): + self.name = name + self.type_parameters = type_parameters + self.args = args + self.vararg = vararg + self.kwonlyargs = kwonlyargs + self.kwarg = kwarg + self.body = body + self.is_async = is_async + + +class Module(AstBase): + + def __init__(self, body): + self.body = body + + +class StringPart(AstBase): + '''Implicitly concatenated part of string literal''' + + __slots__ = "prefix", "text", "s", + + def __init__(self, prefix, text, s): + self.prefix = prefix + self.text = text + self.s = s + +class alias(AstBase): + __slots__ = "value", "asname", + + def __init__(self, value, asname): + self.value = value + self.asname = asname + + +class arguments(AstBase): + __slots__ = "defaults", "kw_defaults", "annotations", "varargannotation", "kwargannotation", "kw_annotations", + + def __init__(self, defaults, kw_defaults, annotations, varargannotation, kwargannotation, kw_annotations): + if len(defaults) != len(annotations): + raise AssertionError('len(defaults) != len(annotations)') + if len(kw_defaults) != len(kw_annotations): + raise AssertionError('len(kw_defaults) != len(kw_annotations)') + self.kw_defaults = kw_defaults + self.defaults = defaults + self.annotations = annotations + self.varargannotation = varargannotation + self.kwargannotation = kwargannotation + self.kw_annotations = kw_annotations + + +class boolop(AstBase): + pass + +class cmpop(AstBase): + pass + +class comprehension(AstBase): + __slots__ = "is_async", "target", "iter", "ifs", + + def __init__(self, target, iter, ifs, is_async=False): + self.target = target + self.iter = iter + self.ifs = ifs + self.is_async = is_async + +class dict_item(AstBase): + pass + +class type_parameter(AstBase): + pass + +class expr(AstBase): + __slots__ = "parenthesised", + +class expr_context(AstBase): + pass + +class operator(AstBase): + pass + +class stmt(AstBase): + pass + +class unaryop(AstBase): + pass + +class pattern(AstBase): + __slots__ = "parenthesised", + +class And(boolop): + pass + +class Or(boolop): + pass + +class Eq(cmpop): + pass + +class Gt(cmpop): + pass + +class GtE(cmpop): + pass + +class In(cmpop): + pass + +class Is(cmpop): + pass + +class IsNot(cmpop): + pass + +class Lt(cmpop): + pass + +class LtE(cmpop): + pass + +class NotEq(cmpop): + pass + +class NotIn(cmpop): + pass + +class DictUnpacking(dict_item): + __slots__ = "value", + + def __init__(self, value): + self.value = value + + +class KeyValuePair(dict_item): + __slots__ = "key", "value", + + def __init__(self, key, value): + self.key = key + self.value = value + + +class keyword(dict_item): + __slots__ = "arg", "value", + + def __init__(self, arg, value): + self.arg = arg + self.value = value + + +class AssignExpr(expr): + __slots__ = "target", "value", + + def __init__(self, value, target): + self.value = value + self.target = target + + +class Attribute(expr): + __slots__ = "value", "attr", "ctx", + + def __init__(self, value, attr, ctx): + self.value = value + self.attr = attr + self.ctx = ctx + + +class Await(expr): + __slots__ = "value", + + def __init__(self, value): + self.value = value + + +class BinOp(expr): + __slots__ = "left", "op", "right", + + def __init__(self, left, op, right): + self.left = left + self.op = op + self.right = right + + +class BoolOp(expr): + __slots__ = "op", "values", + + def __init__(self, op, values): + self.op = op + self.values = values + + +class Bytes(expr): + __slots__ = "s", "prefix", "implicitly_concatenated_parts", + + def __init__(self, s, prefix, implicitly_concatenated_parts): + self.s = s + self.prefix = prefix + self.implicitly_concatenated_parts = implicitly_concatenated_parts + + +class Call(expr): + __slots__ = "func", "positional_args", "named_args", + + def __init__(self, func, positional_args, named_args): + self.func = func + self.positional_args = positional_args + self.named_args = named_args + + +class ClassExpr(expr): + 'AST node representing class creation' + + __slots__ = "name", "type_parameters", "bases", "keywords", "inner_scope", + + def __init__(self, name, type_parameters, bases, keywords, inner_scope): + self.name = name + self.type_parameters = type_parameters + self.bases = bases + self.keywords = keywords + self.inner_scope = inner_scope + + +class Compare(expr): + __slots__ = "left", "ops", "comparators", + + def __init__(self, left, ops, comparators): + self.left = left + self.ops = ops + self.comparators = comparators + + +class Dict(expr): + __slots__ = "items", + + def __init__(self, items): + self.items = items + + +class DictComp(expr): + __slots__ = "key", "value", "generators", "function", "iterable", + + def __init__(self, key, value, generators): + self.key = key + self.value = value + self.generators = generators + + +class Ellipsis(expr): + pass + +class Filter(expr): + '''Filtered expression in a template''' + + __slots__ = "value", "filter", + + def __init__(self, value, filter): + self.value = value + self.filter = filter + + +class FormattedValue(expr): + __slots__ = "value", "conversion", "format_spec", + + def __init__(self, value, conversion, format_spec): + self.value = value + self.conversion = conversion + self.format_spec = format_spec + + +class FunctionExpr(expr): + + 'AST node representing function creation' + + __slots__ = "name", "args", "returns", "inner_scope", + + def __init__(self, name, args, returns, inner_scope): + self.name = name + self.args = args + self.returns = returns + self.inner_scope = inner_scope + + +class GeneratorExp(expr): + __slots__ = "elt", "generators", "function", "iterable", + + def __init__(self, elt, generators): + self.elt = elt + self.generators = generators + + +class IfExp(expr): + __slots__ = "test", "body", "orelse", + + def __init__(self, test, body, orelse): + self.test = test + self.body = body + self.orelse = orelse + + +class ImportExpr(expr): + '''AST node representing module import + (roughly equivalent to the runtime call to __import__)''' + + __slots__ = "level", "name", "top", + + def __init__(self, level, name, top): + self.level = level + self.name = name + self.top = top + + +class ImportMember(expr): + '''AST node representing 'from import'. Similar to Attribute access, + but during import''' + + __slots__ = "module", "name", + + def __init__(self, module, name): + self.module = module + self.name = name + + +class JoinedStr(expr): + __slots__ = "values", + + def __init__(self, values): + self.values = values + + +class Lambda(expr): + __slots__ = "args", "inner_scope", + + def __init__(self, args, inner_scope): + self.args = args + self.inner_scope = inner_scope + + +class List(expr): + __slots__ = "elts", "ctx", + + def __init__(self, elts, ctx): + self.elts = elts + self.ctx = ctx + + +class ListComp(expr): + __slots__ = "elt", "generators", "function", "iterable", + + def __init__(self, elt, generators): + self.elt = elt + self.generators = generators + +class Match(stmt): + __slots__ = "subject", "cases", + + def __init__(self, subject, cases): + self.subject = subject + self.cases = cases + +class Case(stmt): + __slots__ = "pattern", "guard", "body", + + def __init__(self, pattern, guard, body): + self.pattern = pattern + self.guard = guard + self.body = body + +class Guard(expr): + __slots__ = "test", + + def __init__(self, test): + self.test = test + +class MatchAsPattern(pattern): + __slots__ = "pattern", "alias", + + def __init__(self, pattern, alias): + self.pattern = pattern + self.alias = alias + +class MatchOrPattern(pattern): + __slots__ = "patterns", + + def __init__(self, patterns): + self.patterns = patterns + +class MatchLiteralPattern(pattern): + __slots__ = "literal", + + def __init__(self, literal): + self.literal = literal + +class MatchCapturePattern(pattern): + __slots__ = "variable", + + def __init__(self, variable): + self.variable = variable + +class MatchWildcardPattern(pattern): + __slots__ = [] + +class MatchValuePattern(pattern): + __slots__ = "value", + + def __init__(self, value): + self.value = value + +class MatchSequencePattern(pattern): + __slots__ = "patterns", + + def __init__(self, patterns): + self.patterns = patterns + +class MatchStarPattern(pattern): + __slots__ = "target", + + def __init__(self, target): + self.target = target + +class MatchMappingPattern(pattern): + __slots__ = "mappings", + + def __init__(self, mappings): + self.mappings = mappings + +class MatchDoubleStarPattern(pattern): + __slots__ = "target", + + def __init__(self, target): + self.target = target + +class MatchKeyValuePattern(pattern): + __slots__ = "key", "value", + + def __init__(self, key, value): + self.key = key + self.value = value + +class MatchClassPattern(pattern): + __slots__ = "class_name", "positional", "keyword", + + def __init__(self, class_name, positional, keyword): + self.class_name = class_name + self.positional = positional + self.keyword = keyword + +class MatchKeywordPattern(pattern): + __slots__ = "attribute", "value", + + def __init__(self, attribute, value): + self.attribute = attribute + self.value = value + +class Name(expr): + __slots__ = "variable", "ctx", + + def __init__(self, variable, ctx): + self.variable = variable + self.ctx = ctx + + @property + def id(self): + return self.variable.id + +class Num(expr): + __slots__ = "n", "text", + + def __init__(self, n, text): + self.n = n + self.text = text + +class ParamSpec(type_parameter): + __slots__ = "name", + + def __init__(self, name): + self.name = name + + + +class PlaceHolder(expr): + '''PlaceHolder variable in template ($name)''' + + __slots__ = "variable", "ctx", + + def __init__(self, variable, ctx): + self.variable = variable + self.ctx = ctx + + @property + def id(self): + return self.variable.id + +class Repr(expr): + __slots__ = "value", + + def __init__(self, value): + self.value = value + + +class Set(expr): + __slots__ = "elts", + + def __init__(self, elts): + self.elts = elts + + +class SetComp(expr): + __slots__ = "elt", "generators", "function", "iterable", + + def __init__(self, elt, generators): + self.elt = elt + self.generators = generators + + +class Slice(expr): + '''AST node for a slice as a subclass of expr to simplify Subscripts''' + + __slots__ = "start", "stop", "step", + + def __init__(self, start, stop, step): + self.start = start + self.stop = stop + self.step = step + + +class Starred(expr): + __slots__ = "value", "ctx", + + def __init__(self, value, ctx): + self.value = value + self.ctx = ctx + + +class Str(expr): + __slots__ = "s", "prefix", "implicitly_concatenated_parts", + + def __init__(self, s, prefix, implicitly_concatenated_parts): + self.s = s + self.prefix = prefix + self.implicitly_concatenated_parts = implicitly_concatenated_parts + + +class Subscript(expr): + __slots__ = "value", "index", "ctx", + + def __init__(self, value, index, ctx): + self.value = value + self.index = index + self.ctx = ctx + + +class TemplateDottedNotation(expr): + '''Unified dot notation expression in a template''' + + __slots__ = "value", "attr", "ctx", + + def __init__(self, value, attr, ctx): + self.value = value + self.attr = attr + self.ctx = ctx + + +class Tuple(expr): + __slots__ = "elts", "ctx", + + def __init__(self, elts, ctx): + self.elts = elts + self.ctx = ctx + + +class TypeAlias(stmt): + __slots__ = "name", "type_parameters", "value", + + def __init__(self, name, type_parameters, value): + self.name = name + self.type_parameters = type_parameters + self.value = value + +class TypeVar(type_parameter): + __slots__ = "name", "bound", + + def __init__(self, name, bound): + self.name = name + self.bound = bound + +class TypeVarTuple(type_parameter): + __slots__ = "name", + + def __init__(self, name): + self.name = name + +class UnaryOp(expr): + __slots__ = "op", "operand", + + def __init__(self, op, operand): + self.op = op + self.operand = operand + + +class Yield(expr): + __slots__ = "value", + + def __init__(self, value): + self.value = value + + +class YieldFrom(expr): + __slots__ = "value", + + def __init__(self, value): + self.value = value + + +class SpecialOperation(expr): + __slots__ = "name", "arguments" + + def __init__(self, name, arguments): + self.name = name + self.arguments = arguments + + +class AugLoad(expr_context): + pass + +class AugStore(expr_context): + pass + +class Del(expr_context): + pass + +class Load(expr_context): + pass + +class Param(expr_context): + pass + +class Store(expr_context): + pass + +class Add(operator): + pass + +class BitAnd(operator): + pass + +class BitOr(operator): + pass + +class BitXor(operator): + pass + +class Div(operator): + pass + +class FloorDiv(operator): + pass + +class LShift(operator): + pass + +class MatMult(operator): + pass + +class Mod(operator): + pass + +class Mult(operator): + pass + +class Pow(operator): + pass + +class RShift(operator): + pass + +class Sub(operator): + pass + +class AnnAssign(stmt): + __slots__ = "value", "annotation", "target", + + def __init__(self, value, annotation, target): + self.value = value + self.annotation = annotation + self.target = target + + +class Assert(stmt): + __slots__ = "test", "msg", + + def __init__(self, test, msg): + self.test = test + self.msg = msg + + +class Assign(stmt): + __slots__ = "targets", "value", + + def __init__(self, value, targets): + self.value = value + assert isinstance(targets, list) + self.targets = targets + + +class AugAssign(stmt): + __slots__ = "operation", + + def __init__(self, operation): + self.operation = operation + + +class Break(stmt): + pass + +class Continue(stmt): + pass + +class Delete(stmt): + __slots__ = "targets", + + def __init__(self, targets): + self.targets = targets + + +class ExceptStmt(stmt): + '''AST node for except handler, as a subclass of stmt in order + to better support location and flow control''' + + __slots__ = "type", "name", "body", + + def __init__(self, type, name, body): + self.type = type + self.name = name + self.body = body + + +class ExceptGroupStmt(stmt): + '''AST node for except* handler, as a subclass of stmt in order + to better support location and flow control''' + + __slots__ = "type", "name", "body", + + def __init__(self, type, name, body): + self.type = type + self.name = name + self.body = body + + +class Exec(stmt): + __slots__ = "body", "globals", "locals", + + def __init__(self, body, globals, locals): + self.body = body + self.globals = globals + self.locals = locals + + +class Expr(stmt): + __slots__ = "value", + + def __init__(self, value): + self.value = value + + +class For(stmt): + __slots__ = "is_async", "target", "iter", "body", "orelse", + + def __init__(self, target, iter, body, orelse, is_async=False): + self.target = target + self.iter = iter + self.body = body + self.orelse = orelse + self.is_async = is_async + + +class Global(stmt): + __slots__ = "names", + + def __init__(self, names): + self.names = names + + +class If(stmt): + __slots__ = "test", "body", "orelse", + + def __init__(self, test, body, orelse): + self.test = test + self.body = body + self.orelse = orelse + + +class Import(stmt): + __slots__ = "names", + + def __init__(self, names): + self.names = names + + +class ImportFrom(stmt): + __slots__ = "module", + + def __init__(self, module): + self.module = module + + +class Nonlocal(stmt): + __slots__ = "names", + + def __init__(self, names): + self.names = names + + +class Pass(stmt): + pass + +class Print(stmt): + __slots__ = "dest", "values", "nl", + + def __init__(self, dest, values, nl): + self.dest = dest + self.values = values + self.nl = nl + + +class Raise(stmt): + __slots__ = "exc", "cause", "type", "inst", "tback", + + +class Return(stmt): + __slots__ = "value", + + def __init__(self, value): + self.value = value + + +class TemplateWrite(stmt): + '''Template text''' + + __slots__ = "value", + + def __init__(self, value): + self.value = value + + +class Try(stmt): + __slots__ = "body", "orelse", "handlers", "finalbody", + + def __init__(self, body, orelse, handlers, finalbody): + self.body = body + self.orelse = orelse + self.handlers = handlers + self.finalbody = finalbody + + +class While(stmt): + __slots__ = "test", "body", "orelse", + + def __init__(self, test, body, orelse): + self.test = test + self.body = body + self.orelse = orelse + + +class With(stmt): + __slots__ = "is_async", "context_expr", "optional_vars", "body", + + def __init__(self, context_expr, optional_vars, body, is_async=False): + self.context_expr = context_expr + self.optional_vars = optional_vars + self.body = body + self.is_async = is_async + + +class Invert(unaryop): + pass + +class Not(unaryop): + pass + +class UAdd(unaryop): + pass + +class USub(unaryop): + pass + + +class Variable(object): + 'A variable' + + def __init__(self, var_id, scope = None): + assert isinstance(var_id, str), type(var_id) + self.id = var_id + self.scope = scope + + def __repr__(self): + return 'Variable(%r, %r)' % (self.id, self.scope) + + def __eq__(self, other): + if type(other) is not Variable: + return False + if self.scope is None or other.scope is None: + raise TypeError("Scope not set") + return self.scope == other.scope and self.id == other.id + + def __ne__(self, other): + return not self == other + + def __hash__(self): + if self.scope is None: + raise TypeError("Scope not set") + return 391246 ^ hash(self.id) ^ hash(self.scope) + + def is_global(self): + return isinstance(self.scope, Module) + +def iter_fields(node): + for name in node.__slots__: + if hasattr(node, name): + yield name, getattr(node, name) diff --git a/python/extractor/semmle/python/extractor.py b/python/extractor/semmle/python/extractor.py new file mode 100644 index 00000000000..cafb7ff4ec0 --- /dev/null +++ b/python/extractor/semmle/python/extractor.py @@ -0,0 +1,284 @@ +import sys +import os +import inspect +import pkgutil +from semmle.python import ast + +from semmle.python.passes.exports import ExportsPass +from semmle.python.passes.lexical import LexicalPass +from semmle.python.passes.flow import FlowPass +from semmle.python.passes.ast_pass import ASTPass +from semmle.python.passes.objects import ObjectPass +from semmle.util import VERSION, uuid, get_analysis_version, get_analysis_major_version +from semmle.util import makedirs, get_source_file_tag, TrapWriter, base64digest +from semmle.cache import Cache +from semmle.logging import WARN, syntax_error_message, Logger +from semmle.profiling import timers + +UTRAP_KEY = 'utrap%s' % VERSION + +__all__ = [ 'Extractor', 'CachingExtractor' ] + +FLAG_SAVE_TYPES = float, complex, bool, int, bytes, str + +class Extractor(object): + '''The extractor controls the execution of the all the + specialised passes''' + + def __init__(self, trap_folder, src_archive, options, logger: Logger, diagnostics_writer): + assert trap_folder + self.trap_folder = trap_folder + self.src_archive = src_archive + self.object_pass = ObjectPass() + self.passes = [ + ASTPass(), + ExportsPass(), + FlowPass(options.split, options.prune, options.unroll, logger) + ] + self.lexical = LexicalPass() + self.files = {} + self.options = options + self.handle_syntax_errors = not options.no_syntax_errors + self.logger = logger + self.diagnostics_writer = diagnostics_writer + + def _handle_syntax_error(self, module, ex): + # Write out diagnostics for the syntax error. + error = syntax_error_message(ex, module) + self.diagnostics_writer.write(error) + + # Emit trap for the syntax error + self.logger.debug("Emitting trap for syntax error in %s", module.path) + writer = TrapWriter() + module_id = writer.get_node_id(module) + # Report syntax error as an alert. + # Ensure line and col are ints (not None). + line = ex.lineno if ex.lineno else 0 + if line > len(module.lines): + line = len(module.lines) + col = len(module.lines[-1])-1 + else: + col = ex.offset if ex.offset else 0 + loc_id = writer.get_unique_id() + writer.write_tuple(u'locations_ast', 'rrdddd', + loc_id, module_id, 0, 0, 0, 0) + syntax_id = u'syntax%d:%d' % (line, col) + writer.write_tuple(u'locations_ast', 'nrdddd', + syntax_id, module_id, line, col+1, line, col+1) + writer.write_tuple(u'py_syntax_error_versioned', 'nss', syntax_id, ex.msg, get_analysis_major_version()) + trap = writer.get_compressed() + self.trap_folder.write_trap("syntax-error", module.path, trap) + #Create an AST equivalent to an empty file, so that the other passes produce consistent output. + return ast.Module([]) + + def _extract_trap_file(self, ast, comments, path): + writer = TrapWriter() + file_tag = get_source_file_tag(self.src_archive.get_virtual_path(path)) + writer.write_tuple(u'py_Modules', 'g', ast.trap_name) + writer.write_tuple(u'py_module_path', 'gg', ast.trap_name, file_tag) + try: + for ex in self.passes: + with timers[ex.name]: + if isinstance(ex, FlowPass): + ex.set_filename(path) + ex.extract(ast, writer) + with timers['lexical']: + self.lexical.extract(ast, comments, writer) + with timers['object']: + self.object_pass.extract(ast, path, writer) + except Exception as ex: + self.logger.error("Exception extracting module %s: %s", path, ex) + self.logger.traceback(WARN) + return None + return writer.get_compressed() + + def process_source_module(self, module): + '''Process a Python source module. Checks that module has valid syntax, + then passes passes ast, source, etc to `process_module` + ''' + try: + #Ensure that module does not have invalid syntax before extracting it. + ast = module.ast + except SyntaxError as ex: + self.logger.debug("handle syntax errors is %s", self.handle_syntax_errors) + if self.handle_syntax_errors: + ast = self._handle_syntax_error(module, ex) + else: + return None + ast.name = module.name + ast.kind = module.kind + ast.trap_name = module.trap_name + return self.process_module(ast, module.trap_name, module.bytes_source, + module.path, module.comments) + + def process_module(self, ast, module_tag, bytes_source, path, comments): + 'Process a module, generating the trap file for that module' + self.logger.debug(u"Populating trap file for %s", path) + ast.trap_name = module_tag + trap = self._extract_trap_file(ast, comments, path) + if trap is None: + return None + with timers['trap']: + self.trap_folder.write_trap("python", path, trap) + try: + with timers['archive']: + self.copy_source(bytes_source, module_tag, path) + except Exception: + import traceback + traceback.print_exc() + return trap + + def copy_source(self, bytes_source, module_tag, path): + if bytes_source is None: + return + self.files[module_tag] = self.src_archive.get_virtual_path(path) + self.src_archive.write(path, bytes_source) + + def write_interpreter_data(self, options): + '''Write interpreter data, such as version numbers and flags.''' + + def write_flag(name, value): + writer.write_tuple(u'py_flags_versioned', 'uus', name, value, get_analysis_major_version()) + + def write_flags(obj, prefix): + pre = prefix + u"." + for name, value in inspect.getmembers(obj): + if name[0] == "_": + continue + if type(value) in FLAG_SAVE_TYPES: + write_flag(pre + name, str(value)) + + writer = TrapWriter() + for index, name in enumerate((u'major', u'minor', u'micro', u'releaselevel', u'serial')): + writer.write_tuple(u'py_flags_versioned', 'sss', u'extractor_python_version.' + name, str(sys.version_info[index]), get_analysis_major_version()) + write_flags(sys.flags, u'flags') + write_flags(sys.float_info, u'float') + write_flags(self.options, u'options') + write_flag(u'sys.prefix', sys.prefix) + path = os.pathsep.join(os.path.abspath(p) for p in options.sys_path) + write_flag(u'sys.path', path) + if options.path is None: + path = '' + else: + path = os.pathsep.join(self.src_archive.get_virtual_path(p) for p in options.path) + if options.language_version: + write_flag(u'language.version', options.language_version[-1]) + else: + write_flag(u'language.version', get_analysis_version()) + write_flag(u'extractor.path', path) + write_flag(u'sys.platform', sys.platform) + write_flag(u'os.sep', os.sep) + write_flag(u'os.pathsep', os.pathsep) + write_flag(u'extractor.version', VERSION) + if options.context_cost is not None: + write_flag(u'context.cost', options.context_cost) + self.trap_folder.write_trap("flags", "$flags", writer.get_compressed()) + if get_analysis_major_version() == 2: + # Copy the pre-extracted builtins trap + builtins_trap_data = pkgutil.get_data('semmle.data', 'interpreter2.trap') + self.trap_folder.write_trap("interpreter", '$interpreter2', builtins_trap_data, extension=".trap") + else: + writer = TrapWriter() + self.object_pass.write_special_objects(writer) + self.trap_folder.write_trap("interpreter", '$interpreter3', writer.get_compressed()) + # Copy stdlib trap + if get_analysis_major_version() == 2: + stdlib_trap_name = '$stdlib_27.trap' + else: + stdlib_trap_name = '$stdlib_33.trap' + stdlib_trap_data = pkgutil.get_data('semmle.data', stdlib_trap_name) + self.trap_folder.write_trap("stdlib", stdlib_trap_name[:-5], stdlib_trap_data, extension=".trap") + + @staticmethod + def from_options(options, trap_dir, archive, logger: Logger, diagnostics_writer): + '''Convenience method to create extractor from options''' + try: + trap_copy_dir = options.trap_cache + caching_extractor = CachingExtractor(trap_copy_dir, options, logger) + except Exception as ex: + if options.verbose and trap_copy_dir is not None: + print ("Failed to create caching extractor: " + str(ex)) + caching_extractor = None + worker = Extractor(trap_dir, archive, options, logger, diagnostics_writer) + if caching_extractor: + caching_extractor.set_worker(worker) + return caching_extractor + else: + return worker + + def stop(self): + pass + + def close(self): + 'close() must be called, or some information will be not be written' + #Add name tag to file name, so that multiple extractors do not overwrite each other + if self.files: + trapwriter = TrapWriter() + for _, filepath in self.files.items(): + trapwriter.write_file(filepath) + self.trap_folder.write_trap('folders', uuid('python') + '/$files', trapwriter.get_compressed()) + self.files = set() + for name, timer in sorted(timers.items()): + self.logger.debug("Total time for pass '%s': %0.0fms", name, timer.elapsed) + + +def hash_combine(x, y): + return base64digest(x + u":" + y) + + +class CachingExtractor(object): + '''The caching extractor has a two stage initialization process. + After creating the extractor (which will check that the cachedir is valid) + set_worker(worker) must be called before the CachingExtractor is valid''' + + def __init__(self, cachedir, options, logger: Logger): + if cachedir is None: + raise IOError("No cache directory") + makedirs(cachedir) + self.worker = None + self.cache = Cache.for_directory(cachedir, options.verbose) + self.logger = logger + self.split = options.split + + def set_worker(self, worker): + self.worker = worker + + def get_cache_key(self, module): + key = hash_combine(module.path, module.source) + if not self.split: + #Use different key, as not splitting will modify the trap file. + key = hash_combine(UTRAP_KEY, key) + return hash_combine(key, module.source) + + def process_source_module(self, module): + '''Process a Python source module. First look up trap file in cache. + In no cached trap file is found, then delegate to normal extractor. + ''' + if self.worker is None: + raise Exception("worker is not set") + key = self.get_cache_key(module) + trap = self.cache.get(key) + if trap is None: + trap = self.worker.process_source_module(module) + if trap is not None: + self.cache.set(key, trap) + else: + self.logger.debug(u"Found cached trap file for %s", module.path) + self.worker.trap_folder.write_trap("python", module.path, trap) + try: + self.worker.copy_source(module.bytes_source, module.trap_name, module.path) + except Exception: + self.logger.traceback(WARN) + return trap + + def process_module(self, ast, module_tag, source_code, path, comments): + self.worker.process_module(ast, module_tag, source_code, path, comments) + + def close(self): + self.worker.close() + + def write_interpreter_data(self, sys_path): + self.worker.write_interpreter_data(sys_path) + + def stop(self): + self.worker.stop() diff --git a/python/extractor/semmle/python/finder.py b/python/extractor/semmle/python/finder.py new file mode 100644 index 00000000000..632ef920d05 --- /dev/null +++ b/python/extractor/semmle/python/finder.py @@ -0,0 +1,377 @@ +''' +Classes and functions for converting module names into paths and Extractables. +Implements standard Python import semantics, and is designed to be extensible +to handle additional features like stub and template files. +''' + +import sys +import imp +import os.path +from semmle.util import FileExtractable, FolderExtractable, BuiltinModuleExtractable, PY_EXTENSIONS, get_analysis_major_version +from semmle.python.modules import PythonSourceModule, is_script + +class Module(object): + '''A module. Modules are approximations + to Python module objects and are used for + analyzing imports.''' + + IS_PACKAGE = False + path = None + respect_init = True + + def __init__(self, name, package): + self.name = name + self.package = package + + def get_sub_module(self, name): + '''gets the (immediate) sub-module with the given name''' + raise NotImplementedError() + + def all_sub_modules(self): + '''returns an iterable of all the sub-modules of this module''' + raise NotImplementedError() + + def get_extractable(self): + '''gets the Extractable for this module''' + raise NotImplementedError() + + def find(self, name): + '''Returns the named sub-module of this module if this module + is a package, otherwise returns `None`''' + if '.' in name: + top, rest = name.split(".", 1) + pkg = self.get_sub_module(top) + return pkg.find(rest) if pkg else None + else: + return self.get_sub_module(name) + + def is_package(self): + return self.IS_PACKAGE + +class PyModule(Module): + ' A Python source code module' + + def __init__(self, name, package, path): + Module.__init__(self, name, package) + assert isinstance(path, str) + self.path = path + + def get_sub_module(self, name): + return None + + def all_sub_modules(self): + return () + + def get_extractable(self): + return FileExtractable(self.path) + + def load(self, logger=None): + return PythonSourceModule(self.name, self.path, logger=logger) + + def __str__(self): + return "Python module at %s" % self.path + +class BuiltinModule(Module): + ' A built-in module' + + def __init__(self, name, package): + Module.__init__(self, name, package) + + def get_sub_module(self, name): + return None + + def all_sub_modules(self): + return () + + def get_extractable(self): + return BuiltinModuleExtractable(self.name) + + def __str__(self): + return "Builtin module %s" % self.name + +class FilePackage(Module): + ' A normal package. That is a folder with an __init__.py' + + IS_PACKAGE = True + + def __init__(self, name, package, path, respect_init=True): + Module.__init__(self, name, package) + assert isinstance(path, str), type(path) + self.path = path + self.respect_init = respect_init + + def get_sub_module(self, name): + modname = self.name + "." + name if self.name else None + basepath = os.path.join(self.path, name) + return _from_base(modname, basepath, self, self.respect_init) + + def all_sub_modules(self): + return _from_folder(self.name, self.path, self, self.respect_init) + + def load(self): + return None + + def get_extractable(self): + return FolderExtractable(self.path) + + def __str__(self): + return "Package at %s" % self.path + +class PthPackage(Module): + "A built-in package object generated from a '.pth' file" + + IS_PACKAGE = True + + def __init__(self, name, package, search_path): + Module.__init__(self, name, package) + self.search_path = search_path + + def get_sub_module(self, name): + mname = self.name + "." + name + for path in self.search_path: + mod = _from_base(mname, os.path.join(path, name), self) + if mod is not None: + return mod + return None + + def all_sub_modules(self): + for path in self.search_path: + for mod in _from_folder(self.name, path, self): + yield mod + + def load(self): + return None + + def __str__(self): + return "Builtin package (.pth) %s %s" % (self.name, self.search_path) + + def get_extractable(self): + return None + +#Helper functions + +def _from_base(name, basepath, pkg, respect_init=True): + if os.path.isdir(basepath): + if os.path.exists(os.path.join(basepath, "__init__.py")) or not respect_init: + return FilePackage(name, pkg, basepath, respect_init) + else: + return None + for ext in PY_EXTENSIONS: + filepath = basepath + ext + if os.path.isfile(filepath): + return PyModule(name, pkg, filepath) + return None + +def _from_folder(name, path, pkg, respect_init=True): + for file in os.listdir(path): + fullpath = os.path.join(path, file) + if os.path.isdir(fullpath): + if os.path.exists(os.path.join(fullpath, "__init__.py")) or not respect_init: + yield FilePackage(name + "." + file if name else None, pkg, fullpath, respect_init) + base, ext = os.path.splitext(file) + if ext not in PY_EXTENSIONS: + continue + if os.path.isfile(fullpath): + yield PyModule(name + "." + base if name else None, pkg, fullpath) + +class AbstractFinder(object): + + def find(self, mod_name): + '''Find an extractable object given a module name''' + if '.' in mod_name: + top, rest = mod_name.split(".", 1) + pkg = self.find_top(top) + return pkg.find(rest) if pkg else None + else: + return self.find_top(mod_name) + + def find_top(self, name): + '''Find module or package object given a simple (dot-less) name''' + raise NotImplementedError() + + def name_from_path(self, path, extensions): + '''Find module or package object given a path''' + raise NotImplementedError() + +class PyFinder(AbstractFinder): + + __slots__ = [ 'path', 'respect_init', 'logger' ] + + def __init__(self, path, respect_init, logger): + assert isinstance(path, str), path + self.path = os.path.abspath(path) + self.respect_init = respect_init + self.logger = logger + + def find_top(self, mod_name): + basepath = os.path.join(self.path, mod_name) + return _from_base(mod_name, basepath, None, self.respect_init) + + def name_from_path(self, path, extensions): + rel_path = _relative_subpath(path, self.path) + if rel_path is None: + return None + base, ext = os.path.splitext(rel_path) + if ext and ext not in extensions: + return None + return ".".join(base.split(os.path.sep)) + +def _relative_subpath(subpath, root): + 'Returns the relative path if `subpath` is within `root` or `None` otherwise' + try: + relpath = os.path.relpath(subpath, root) + except ValueError: + #No relative path possible + return None + if relpath.startswith(os.pardir): + #Not in root: + return None + return relpath + +class BuiltinFinder(AbstractFinder): + '''Finder for builtin modules that are already present in the VM + or can be guaranteed to load successfully''' + + def __init__(self, logger): + self.modules = {} + for name, module in sys.modules.items(): + self.modules[name] = module + try: + self.dynload_path = os.path.dirname(imp.find_module("_json")[1]) + except Exception: + if os.name != "nt": + logger.warning("Failed to find dynload path") + self.dynload_path = None + + def builtin_module(self, name): + if "." in name: + pname, name = name.rsplit(".", 1) + return BuiltinModule(name, self.builtin_module(pname)) + return BuiltinModule(name, None) + + def find(self, mod_name): + mod = super(BuiltinFinder, self).find(mod_name) + if mod is not None: + return mod + #Use `imp` module to find module + try: + _, filepath, mod_t = imp.find_module(mod_name) + except ImportError: + return None + #Accept builtin dynamically loaded modules like _ctypes or _json + if filepath and os.path.dirname(filepath) == self.dynload_path: + return BuiltinModule(mod_name, None) + return None + + def find_top(self, mod_name): + if mod_name in self.modules: + mod = self.modules[mod_name] + if hasattr(mod, "__file__"): + return None + if hasattr(mod, "__path__"): + return PthPackage(mod_name, None, mod.__path__) + return BuiltinModule(mod_name, None) + if mod_name in sys.builtin_module_names: + return BuiltinModule(mod_name, None) + return None + + def name_from_path(self, path, extensions): + return None + +#Stub file handling + +class StubFinder(PyFinder): + + def __init__(self, logger): + try: + tools = os.environ['ODASA_TOOLS'] + except KeyError: + tools = sys.path[1] + logger.debug("StubFinder: can't find ODASA_TOOLS, using '%s' instead", tools) + path = os.path.join(tools, "data", "python", "stubs") + super(StubFinder, self).__init__(path, True, logger) + + +def _finders_for_path(path, respect_init, logger): + finders = [ StubFinder(logger) ] + for p in path: + if p: + finders.append(PyFinder(p, respect_init, logger)) + finders.append(BuiltinFinder(logger)) + return finders + + +def finders_from_options_and_env(options, logger): + '''Return a list of finders from the given command line options''' + if options.path: + path = options.path + options.sys_path + else: + path = options.sys_path + path = [os.path.abspath(p) for p in path] + if options.exclude: + exclude = set(options.exclude) + trimmed_path = [] + for p in path: + for x in exclude: + if p.startswith(x): + break + else: + trimmed_path.append(p) + path = trimmed_path + logger.debug("Finder path: %s", path) + logger.debug("sys path: %s", sys.path) + return _finders_for_path(path, options.respect_init, logger) + + +class Finder(object): + + def __init__(self, finders, options, logger): + self.finders = finders + self.path_map = {} + self.logger = logger + self.respect_init = options.respect_init + + def find(self, mod_name): + for finder in self.finders: + mod = finder.find(mod_name) + if mod is not None: + return mod + self.logger.debug("Cannot find module '%s'", mod_name) + return None + + @staticmethod + def from_options_and_env(options, logger): + return Finder(finders_from_options_and_env(options, logger), options, logger) + + def from_extractable(self, unit): + if isinstance(unit, FolderExtractable) or isinstance(unit, FileExtractable): + return self.from_path(unit.path) + return None + + def from_path(self, path, extensions=PY_EXTENSIONS): + if path in self.path_map: + return self.path_map[path] + if not path or path == "/": + return None + is_python_2 = (get_analysis_major_version() == 2) + if os.path.isdir(path) and not os.path.exists(os.path.join(path, "__init__.py")) and (self.respect_init or not is_python_2): + return None + pkg = self.from_path(os.path.dirname(path)) + mod = None + if os.path.isdir(path): + mod = FilePackage(None, pkg, path) + if os.path.isfile(path): + base, ext = os.path.splitext(path) + if ext in extensions: + mod = PyModule(None, pkg, path) + if is_script(path): + mod = PyModule(None, None, path) + self.path_map[path] = mod + return mod + + def name_from_path(self, path, extensions=PY_EXTENSIONS): + for finder in self.finders: + name = finder.name_from_path(path, extensions) + if name is not None: + return name + return None diff --git a/python/extractor/semmle/python/imports.py b/python/extractor/semmle/python/imports.py new file mode 100644 index 00000000000..851193e89f5 --- /dev/null +++ b/python/extractor/semmle/python/imports.py @@ -0,0 +1,256 @@ +import sys +from semmle.python import ast + +from collections import namedtuple + +from semmle.util import VERSION, get_analysis_major_version +from semmle.cache import Cache +from semmle.logging import INFO + +#Maintain distinct version strings for distinct versions of Python +IMPORTS_KEY = 'import%s_%x%x' % (VERSION, sys.version_info[0], sys.version_info[1]) + +import pickle + +__all__ = [ 'CachingModuleImporter', 'ModuleImporter', 'importer_from_options' ] + +ImportStar = namedtuple('ImportStar', 'level module') +ImportExpr = namedtuple('ImportExpr', 'level module') +ImportMember = namedtuple('ImportMember', 'level module name') + +def safe_string(txt): + try: + if isinstance(txt, bytes): + try: + return txt.decode(sys.getfilesystemencoding(), errors="replace") + except Exception: + return txt.decode("latin-1") + else: + return str(txt) + except Exception: + return u"?" + +class SemmleImportError(Exception): + + def __init__(self, module_name, *reasons): + reason_txt = u"".join(safe_string(reason) for reason in reasons) + module_name = safe_string(module_name) + if reason_txt: + message = u"Import of %s failed: %s.\n" % (module_name, reason_txt) + else: + message = u"Import of %s failed.\n" % module_name + Exception.__init__(self, message) + + def write(self, out=sys.stdout): + out.write(self.args[0]) + + +class CachingModuleImporter(object): + + def __init__(self, cachedir, finder, logger): + self.worker = ModuleImporter(finder, logger) + if cachedir is None: + raise IOError("No cache directory") + self.cache = Cache.for_directory(cachedir, logger) + self.logger = logger + + def get_imports(self, module, loaded_module): + import_nodes = self.get_import_nodes(loaded_module) + return self.worker.parse_imports(module, import_nodes) + + def get_import_nodes(self, loaded_module): + key = loaded_module.get_hash_key(IMPORTS_KEY) + if key is None: + return self.worker.get_import_nodes(loaded_module) + imports = self.cache.get(key) + #Unpickle the data + if imports is not None: + try: + imports = pickle.loads(imports) + except Exception: + self.logger.debug("Failed to unpickle imports for %s", loaded_module.path) + imports = None + if imports is None: + imports = self.worker.get_import_nodes(loaded_module) + try: + data = pickle.dumps(imports) + self.cache.set(key, data) + except Exception as ex: + # Shouldn't really fail, but carry on anyway + self.logger.debug("Failed to save pickled imports to cache for %s: %s", loaded_module.path, ex) + else: + self.logger.debug("Cached imports file found for %s", loaded_module.path) + return imports + +class ModuleImporter(object): + 'Discovers and records which modules import which other modules' + + def __init__(self, finder, logger): + + self.finder = finder + self.logger = logger + self.failures = {} + + def get_imports(self, module, loaded_module): + import_nodes = self.get_import_nodes(loaded_module) + return self.parse_imports(module, import_nodes) + + def get_import_nodes(self, loaded_module): + 'Return list of AST nodes representing imports' + try: + return imports_from_ast(loaded_module.py_ast) + except Exception as ex: + if isinstance(ex, SyntaxError): + # Example: `Syntax Error (line 123) in /home/.../file.py` + self.logger.warning("%s in %s", ex, loaded_module.path) + # no need to show traceback, it's not an internal bug + else: + self.logger.warning("Failed to analyse imports of %s : %s", loaded_module.path, ex) + self.logger.traceback(INFO) + return [] + + def _relative_import(self, module, level, mod_name, report_failure = True): + for i in range(level): + parent = module.package + if parent is None: + relative_name = level * u'.' + mod_name + if relative_name not in self.failures: + if report_failure: + self.logger.warning("Failed to find %s, no parent package of %s", relative_name, module) + self.failures[relative_name] = str(module) + return None + module = parent + res = module + if mod_name: + res = res.get_sub_module(mod_name) + if res is None and report_failure: + relative_name = level * '.' + mod_name + if relative_name not in self.failures: + self.logger.warning("Failed to find %s, %s has no module %s", relative_name, module, mod_name) + self.failures[relative_name] = str(module) + return res + + def _absolute_import(self, module, mod_name): + try: + mod = self.finder.find(mod_name) + except SemmleImportError as ex: + if mod_name not in self.failures: + self.logger.warning("%s", ex) + self.failures[mod_name] = str(module) + return None + return mod + + def parse_imports(self, module, import_nodes): + imports = set() + #If an imported module is a package, then yield its __init__ module as well + for imported in self._parse_imports_no_init(module, import_nodes): + if imported not in imports: + imports.add(imported) + assert imported is not None + yield imported + if not imported.is_package(): + continue + init = imported.get_sub_module(u"__init__") + if init is not None and init not in imports: + yield init + + def _parse_imports_no_init(self, module, import_nodes): + assert not module.is_package() + for node in import_nodes: + if node.module is None: + top = '' + parts = [] + else: + parts = node.module.split('.') + top, parts = parts[0], parts[1:] + if node.level <= 0: + if get_analysis_major_version() < 3: + #Attempt relative import with level 1 + imported = self._relative_import(module, 1, top, False) + if imported is None: + imported = self._absolute_import(module, top) + else: + imported = self._absolute_import(module, top) + else: + imported = self._relative_import(module, node.level, top) + if imported is None: + self.logger.debug("Unable to resolve import: %s", top) + continue + yield imported + for p in parts: + inner = imported.get_sub_module(p) + if inner is None: + self.logger.debug("Unable to resolve import: %s", p) + break + imported = inner + yield imported + if isinstance(node, ImportStar): + self.logger.debug("Importing all sub modules of %s", imported) + #If import module is a package then yield all sub_modules. + for mod in imported.all_sub_modules(): + yield mod + elif isinstance(node, ImportMember): + mod = imported.get_sub_module(node.name) + if mod is not None: + self.logger.debug("Unable to resolve import: %s", node.name) + yield mod + +def imports_from_ast(the_ast): + def walk(node, in_function, in_name_main): + if isinstance(node, ast.Module): + for import_node in walk(node.body, in_function, in_name_main): + yield import_node + elif isinstance(node, ast.ImportFrom): + yield ImportStar(node.module.level, node.module.name) + elif isinstance(node, ast.Import): + for alias in node.names: + imp = alias.value + if isinstance(imp, ast.ImportExpr): + yield ImportExpr(imp.level, imp.name) + else: + assert isinstance(imp, ast.ImportMember) + yield ImportMember(imp.module.level, imp.module.name, imp.name) + elif isinstance(node, ast.FunctionExpr): + for _, child in ast.iter_fields(node.inner_scope): + for import_node in walk(child, True, in_name_main): + yield import_node + elif isinstance(node, ast.Call): + # Might be a decorator + for import_node in walk(node.positional_args, in_function, in_name_main): + yield import_node + elif isinstance(node, list): + for n in node: + for import_node in walk(n, in_function, in_name_main): + yield import_node + elif isinstance(node, ast.stmt): + name_eq_main = is_name_eq_main(node) + for _, child in ast.iter_fields(node): + for import_node in walk(child, in_function, name_eq_main or in_name_main): + yield import_node + return list(walk(the_ast, False, False)) + +def name_from_expr(expr): + if isinstance(expr, ast.Name): + return expr.id + if isinstance(expr, ast.Attribute): + return name_from_expr(expr.value) + "." + expr.attr + raise ValueError("%s is not a name" % expr) + +def is_name_eq_main(node): + if not isinstance(node, ast.If): + return False + try: + lhs = node.test.left + rhs = node.test.comparators[0] + return rhs.s == "__main__" and lhs.id == "__name__" + except Exception: + return False + +def importer_from_options(options, finder, logger): + try: + importer = CachingModuleImporter(options.trap_cache, finder, logger) + except Exception as ex: + if options.trap_cache is not None: + logger.warn("Failed to create caching importer: %s", ex) + importer = ModuleImporter(finder, logger) + return importer diff --git a/python/extractor/semmle/python/master.py b/python/extractor/semmle/python/master.py new file mode 100755 index 00000000000..200340061fc --- /dev/null +++ b/python/extractor/semmle/python/master.py @@ -0,0 +1,504 @@ +#Much of the information in this file is hardcoded into parser. +#Modify with care and test well. +#It should be relatively safe to add fields. + + +from semmle.python.AstMeta import Node, PrimitiveNode, ClassNode, UnionNode, ListNode +from semmle.python.AstMeta import build_node_relations as _build_node_relations + +string = PrimitiveNode('str', 'string', 'varchar(1)', 'string') +bytes_ = PrimitiveNode('bytes', 'string', 'varchar(1)') + +location = PrimitiveNode('location', '@location', 'unique int') +variable = PrimitiveNode('variable', '@py_variable', 'int') + +int_ = PrimitiveNode('int', 'int', 'int') +bool_ = PrimitiveNode('bool', 'boolean', 'boolean') +number = PrimitiveNode('number', 'string', 'varchar(1)') + +Module = ClassNode('Module') +Class = ClassNode('Class') +Function = ClassNode('Function') + +alias = ClassNode('alias') +arguments = ClassNode('arguments', None, 'parameters definition') +boolop = ClassNode('boolop', None, 'boolean operator') +cmpop = ClassNode('cmpop', None, 'comparison operator') +comprehension = ClassNode('comprehension') +comprehension.field('location', location) +expr = ClassNode('expr', None, 'expression') +expr.field('location', location) +expr.field('parenthesised', bool_, 'parenthesised') +expr_context = ClassNode('expr_context', None, 'expression context') +operator = ClassNode('operator') +stmt = ClassNode('stmt', None, 'statement') +stmt.field('location', location) +unaryop = ClassNode('unaryop', None, 'unary operation') +pattern = ClassNode('pattern') +pattern.field('location', location) +pattern.field('parenthesised', bool_, 'parenthesised') +Add = ClassNode('Add', operator, '+') +And = ClassNode('And', boolop, 'and') +Assert = ClassNode('Assert', stmt) +Assign = ClassNode('Assign', stmt, 'assignment') +Attribute = ClassNode('Attribute', expr) +AugAssign = ClassNode('AugAssign', stmt, 'augmented assignment statement') +AugLoad = ClassNode('AugLoad', expr_context, 'augmented-load') +AugStore = ClassNode('AugStore', expr_context, 'augmented-store') +BinOp = ClassNode('BinOp', expr, 'binary') +#Choose a name more consistent with other Exprs. +BinOp.set_name("BinaryExpr") +BitAnd = ClassNode('BitAnd', operator, '&') +BitOr = ClassNode('BitOr', operator, '|') +BitXor = ClassNode('BitXor', operator, '^') +BoolOp = ClassNode('BoolOp', expr, 'boolean') +#Avoid name clash with boolop +BoolOp.set_name('BoolExpr') +Break = ClassNode('Break', stmt) +Bytes = ClassNode('Bytes', expr) +Call = ClassNode('Call', expr) +ClassExpr = ClassNode('ClassExpr', expr, 'class definition') +Compare = ClassNode('Compare', expr) +Continue = ClassNode('Continue', stmt) +Del = ClassNode('Del', expr_context, 'deletion') +Delete = ClassNode('Delete', stmt) +Dict = ClassNode('Dict', expr, 'dictionary') +DictComp = ClassNode('DictComp', expr, 'dictionary comprehension') +Div = ClassNode('Div', operator, '/') +Ellipsis = ClassNode('Ellipsis', expr) +Eq = ClassNode('Eq', cmpop, '==') +ExceptStmt = ClassNode('ExceptStmt', stmt, 'except block') +ExceptGroupStmt = ClassNode('ExceptGroupStmt', stmt, 'except group block') +Exec = ClassNode('Exec', stmt) +Expr_stmt = ClassNode('Expr', stmt) +Expr_stmt.set_name('Expr_stmt') +FloorDiv = ClassNode('FloorDiv', operator, '//') +For = ClassNode('For', stmt) +FunctionExpr = ClassNode('FunctionExpr', expr, 'function definition') +GeneratorExp = ClassNode('GeneratorExp', expr, 'generator') +Global = ClassNode('Global', stmt) +Gt = ClassNode('Gt', cmpop, '>') +GtE = ClassNode('GtE', cmpop, '>=') +If = ClassNode('If', stmt) +IfExp = ClassNode('IfExp', expr, 'if') +Import = ClassNode('Import', stmt) +ImportExpr = ClassNode('ImportExpr', expr, 'import') +ImportMember = ClassNode('ImportMember', expr, 'from import') +ImportFrom = ClassNode('ImportFrom', stmt, 'import * statement') +In = ClassNode('In', cmpop) +Invert = ClassNode('Invert', unaryop, '~') +Is = ClassNode('Is', cmpop) +IsNot = ClassNode('IsNot', cmpop, 'is not') +LShift = ClassNode('LShift', operator, '<<') +Lambda = ClassNode('Lambda', expr) +List = ClassNode('List', expr) +ListComp = ClassNode('ListComp', expr, 'list comprehension') +Load = ClassNode('Load', expr_context) +Lt = ClassNode('Lt', cmpop, '<') +LtE = ClassNode('LtE', cmpop, '<=') +Match = ClassNode('Match', stmt) +#Avoid name clash with regex match +Match.set_name('MatchStmt') +Case = ClassNode('Case', stmt) +Guard = ClassNode('Guard', expr) +MatchAsPattern = ClassNode('MatchAsPattern', pattern) +MatchOrPattern = ClassNode('MatchOrPattern', pattern) +MatchLiteralPattern = ClassNode('MatchLiteralPattern', pattern) +MatchCapturePattern = ClassNode('MatchCapturePattern', pattern) +MatchWildcardPattern = ClassNode('MatchWildcardPattern', pattern) +MatchValuePattern = ClassNode('MatchValuePattern', pattern) +MatchSequencePattern = ClassNode('MatchSequencePattern', pattern) +MatchStarPattern = ClassNode('MatchStarPattern', pattern) +MatchMappingPattern = ClassNode('MatchMappingPattern', pattern) +MatchDoubleStarPattern = ClassNode('MatchDoubleStarPattern', pattern) +MatchKeyValuePattern = ClassNode('MatchKeyValuePattern', pattern) +MatchClassPattern = ClassNode('MatchClassPattern', pattern) +MatchKeywordPattern = ClassNode('MatchKeywordPattern', pattern) +Mod = ClassNode('Mod', operator, '%') +Mult = ClassNode('Mult', operator, '*') +Name = ClassNode('Name', expr) +Nonlocal = ClassNode('Nonlocal', stmt) +Not = ClassNode('Not', unaryop) +NotEq = ClassNode('NotEq', cmpop, '!=') +NotIn = ClassNode('NotIn', cmpop, 'not in') +Num = ClassNode('Num', expr, 'numeric literal') +Or = ClassNode('Or', boolop) +Param = ClassNode('Param', expr_context, 'parameter') +Pass = ClassNode('Pass', stmt) +Pow = ClassNode('Pow', operator, '**') +Print = ClassNode('Print', stmt) +RShift = ClassNode('RShift', operator, '>>') +Raise = ClassNode('Raise', stmt) +Repr = ClassNode('Repr', expr, 'backtick') +Return = ClassNode('Return', stmt) +Set = ClassNode('Set', expr) +SetComp = ClassNode('SetComp', expr, 'set comprehension') +#Add $ to name to prevent doc-gen adding sub type name +Slice = ClassNode('Slice', expr, '$slice') +Starred = ClassNode('Starred', expr) +Store = ClassNode('Store', expr_context) +Str = ClassNode('Str', expr, 'string literal') +Sub = ClassNode('Sub', operator, '-') +Subscript = ClassNode('Subscript', expr) +Try = ClassNode('Try', stmt) +Tuple = ClassNode('Tuple', expr) +UAdd = ClassNode('UAdd', unaryop, '+') +USub = ClassNode('USub', unaryop, '-') +UnaryOp = ClassNode('UnaryOp', expr, 'unary') +#Avoid name clash with 'unaryop' +UnaryOp.set_name('UnaryExpr') +While = ClassNode('While', stmt) +With = ClassNode('With', stmt) +Yield = ClassNode('Yield', expr) +YieldFrom = ClassNode('YieldFrom', expr, 'yield-from') +alias_list = ListNode(alias) +cmpop_list = ListNode(cmpop) +comprehension_list = ListNode(comprehension) +expr_list = ListNode(expr) +stmt_list = ListNode(stmt) +string_list = ListNode(string) +StringPart = ClassNode('StringPart', None, "implicitly concatenated part") +string_parts_list = ListNode(StringPart) +pattern_list = ListNode(pattern) + +#Template AST Nodes +TemplateWrite = ClassNode('TemplateWrite', stmt, "template write statement") +TemplateDottedNotation = ClassNode('TemplateDottedNotation', expr, "template dotted notation expression") +Filter = ClassNode("Filter", expr, "template filter expression") +PlaceHolder = ClassNode('PlaceHolder', expr, "template place-holder expression") + +Await = ClassNode('Await', expr) +MatMult = ClassNode('MatMult', operator, '@') + +scope = UnionNode(Module, Class, Function) +scope.set_name('scope') + +dict_item = ClassNode('dict_item') + +#DoubleStar in calls fn(**{'a': 1, 'c': 3}, **{'b': 2, 'd': 4}) or dict displays {'a': 1, **{'b': 2, 'd': 4}} +DictUnpacking = ClassNode('DictUnpacking', dict_item, descriptive_name='dictionary unpacking') +KeyValuePair = ClassNode('KeyValuePair', dict_item, descriptive_name='key-value pair') +keyword = ClassNode('keyword', dict_item, descriptive_name='keyword argument') + +#Initial name must match that in ast module. +FormattedStringLiteral = ClassNode("JoinedStr", expr, descriptive_name='formatted string literal') +FormattedStringLiteral.set_name("Fstring") + +FormattedValue = ClassNode("FormattedValue", expr, descriptive_name='formatted value') + +AnnAssign = ClassNode("AnnAssign", stmt, descriptive_name='annotated assignment') + +AssignExpr = ClassNode('AssignExpr', expr, "assignment expression") + +SpecialOperation = ClassNode('SpecialOperation', expr, "special operation") + +type_parameter = ClassNode('type_parameter', descriptive_name='type parameter') +type_parameter.field('location', location) +type_parameter_list = ListNode(type_parameter) + +TypeAlias = ClassNode('TypeAlias', stmt, 'type alias') +ParamSpec = ClassNode('ParamSpec', type_parameter, 'parameter spec') +TypeVar = ClassNode('TypeVar', type_parameter, 'type variable') +TypeVarTuple = ClassNode('TypeVarTuple', type_parameter, 'type variable tuple') + + +expr_or_stmt = UnionNode(expr, stmt) + +dict_item_list = ListNode(dict_item) + +ast_node = UnionNode(expr, stmt, pattern, Module, Class, Function, comprehension, StringPart, dict_item, type_parameter) +ast_node.set_name('ast_node') + +parameter = UnionNode(Name, Tuple) +parameter.set_name('parameter') + +parameter_list = ListNode(parameter) + +alias.field('value', expr) +alias.field('asname', expr, 'name') + +arguments.field('kw_defaults', expr_list, 'keyword-only default values') +arguments.field('defaults', expr_list, 'default values') +arguments.field('annotations', expr_list) +arguments.field('varargannotation', expr, '*arg annotation') +arguments.field('kwargannotation', expr, '**kwarg annotation') +arguments.field('kw_annotations', expr_list, 'keyword-only annotations') + +Assert.field('test', expr, 'value being tested') +Assert.field('msg', expr, 'failure message') + +Assign.field('value', expr) +Assign.field('targets', expr_list, 'targets') + +Attribute.field('value', expr, 'object') +Attribute.field('attr', string, 'attribute name') +Attribute.field('ctx', expr_context, 'context') + +AugAssign.field('operation', BinOp) + +BinOp.field('left', expr, 'left sub-expression') +BinOp.field('op', operator, 'operator') +BinOp.field('right', expr, 'right sub-expression') + +BoolOp.field('op', boolop, 'operator') +BoolOp.field('values', expr_list, 'sub-expressions') + +Bytes.field('s', bytes_, 'value') +Bytes.field('prefix', bytes_, 'prefix') +Bytes.field('implicitly_concatenated_parts', string_parts_list) + +Call.field('func', expr, 'callable') +Call.field('positional_args', expr_list, 'positional arguments') +Call.field('named_args', dict_item_list, 'named arguments') + +Class.field('name', string) +Class.field('body', stmt_list) + +ClassExpr.field('name', string) +ClassExpr.field('bases', expr_list) +ClassExpr.field('keywords', dict_item_list, 'keyword arguments') +ClassExpr.field('inner_scope', Class, 'class scope') +ClassExpr.field('type_parameters', type_parameter_list, 'type parameters') + +Compare.field('left', expr, 'left sub-expression') +Compare.field('ops', cmpop_list, 'comparison operators') +Compare.field('comparators', expr_list, 'right sub-expressions') + +comprehension.field('iter', expr, 'iterable') +comprehension.field('target', expr) +comprehension.field('ifs', expr_list, 'conditions') + +Delete.field('targets', expr_list) + +Dict.field('items', dict_item_list) + +DictUnpacking.field('location', location) +DictUnpacking.field('value', expr) + +DictComp.field('function', Function, 'implementation') +DictComp.field('iterable', expr) + +ExceptStmt.field('type', expr) +ExceptStmt.field('name', expr) +ExceptStmt.field('body', stmt_list) + +ExceptGroupStmt.field('type', expr) +ExceptGroupStmt.field('name', expr) +ExceptGroupStmt.field('body', stmt_list) + +Exec.field('body', expr) +Exec.field('globals', expr) +Exec.field('locals', expr) + +Expr_stmt.field('value', expr) + +For.field('target', expr) +For.field('iter', expr, 'iterable') +For.field('body', stmt_list) +For.field('orelse', stmt_list, 'else block') +For.field('is_async', bool_, 'async') + +Function.field('name', string) +Function.field('args', parameter_list, 'positional parameter list') +Function.field('vararg', expr, 'tuple (*) parameter') +Function.field('kwonlyargs', expr_list, 'keyword-only parameter list') +Function.field('kwarg', expr, 'dictionary (**) parameter') +Function.field('body', stmt_list) +Function.field('is_async', bool_, 'async') +Function.field('type_parameters', type_parameter_list, 'type parameters') + +FunctionExpr.field('name', string) +FunctionExpr.field('args', arguments, 'parameters') +FunctionExpr.field('returns', expr, 'return annotation') +FunctionExpr.field('inner_scope', Function, 'function scope') + +GeneratorExp.field('function', Function, 'implementation') +GeneratorExp.field('iterable', expr) + +Global.field('names', string_list) + +If.field('test', expr) +If.field('body', stmt_list, 'if-true block') +If.field('orelse', stmt_list, 'if-false block') + +IfExp.field('test', expr) +IfExp.field('body', expr, 'if-true expression') +IfExp.field('orelse', expr, 'if-false expression') + +Import.field('names', alias_list, 'alias list') + +ImportFrom.set_name('ImportStar') +ImportFrom.field('module', expr) + +ImportMember.field('module', expr) +ImportMember.field('name', string) + +keyword.field('location', location) +keyword.field('value', expr) +keyword.field('arg', string) + +KeyValuePair.field('location', location) +KeyValuePair.field('value', expr) +KeyValuePair.field('key', expr) + +Lambda.field('args', arguments, 'arguments') +Lambda.field('inner_scope', Function, 'function scope') + +List.field('elts', expr_list, 'element list') +List.field('ctx', expr_context, 'context') + +#For Python 3 a new scope is created and these fields are populated: +ListComp.field('function', Function, 'implementation') +ListComp.field('iterable', expr) +#For Python 2 no new scope is created and these are populated: +ListComp.field('generators', comprehension_list) +ListComp.field('elt', expr, 'elements') + +Match.field('subject', expr) +Match.field('cases', stmt_list) +Case.field('pattern', pattern) +Case.field('guard', expr) +Case.field('body', stmt_list) +Guard.field('test', expr) +MatchStarPattern.field('target', pattern) +MatchDoubleStarPattern.field('target', pattern) +MatchKeyValuePattern.field('key', pattern) +MatchKeyValuePattern.field('value', pattern) +MatchClassPattern.field('class', expr) +MatchKeywordPattern.field('attribute', expr) +MatchKeywordPattern.field('value', pattern) +MatchAsPattern.field('pattern', pattern) +MatchAsPattern.field('alias', expr) +MatchOrPattern.field('patterns', pattern_list) +MatchLiteralPattern.field('literal', expr) +MatchCapturePattern.field('variable', expr) +MatchValuePattern.field('value', expr) +MatchSequencePattern.field('patterns', pattern_list) +MatchMappingPattern.field('mappings', pattern_list) +MatchClassPattern.field('class_name', expr) +MatchClassPattern.field('positional', pattern_list) +MatchClassPattern.field('keyword', pattern_list) + +Module.field('name', string) +Module.field('hash', string , 'hash (not populated)') +Module.field('body', stmt_list) +Module.field('kind', string) + +ImportExpr.field('level', int_) +ImportExpr.field('name', string) +ImportExpr.field('top', bool_, 'top level') + +Name.field('variable', variable) +Name.field('ctx', expr_context, 'context') + +Nonlocal.field('names', string_list) + +Num.field('n', number, 'value') +Num.field('text', number) + +ParamSpec.field('name', expr) + +Print.field('dest', expr, 'destination') +Print.field('values', expr_list) +Print.field('nl', bool_, 'new line') + +#Python3 has exc & cause +Raise.field('exc', expr, 'exception') +Raise.field('cause', expr) +#Python2 has type, inst, tback +Raise.field('type', expr) +Raise.field('inst', expr, 'instance') +Raise.field('tback', expr, 'traceback') + +Repr.field('value', expr) + +Return.field('value', expr) + +Set.field('elts', expr_list, 'elements') + +SetComp.field('function', Function, 'implementation') +SetComp.field('iterable', expr) + +Slice.field('start', expr) +Slice.field('stop', expr) +Slice.field('step', expr) + +Starred.field('value', expr) +Starred.field('ctx', expr_context, 'context') + +Str.field('s', string, 'text') +Str.field('prefix', string, 'prefix') +Str.field('implicitly_concatenated_parts', string_parts_list) + +Subscript.field('value', expr) +Subscript.field('index', expr) +Subscript.field('ctx', expr_context, 'context') + +Try.field('body', stmt_list) +Try.field('orelse', stmt_list, 'else block') +Try.field('handlers', stmt_list, 'exception handlers') +Try.field('finalbody', stmt_list, 'finally block') + +Tuple.field('elts', expr_list, 'elements') +Tuple.field('ctx', expr_context, 'context') + +TypeAlias.field('name', expr) +TypeAlias.field('type_parameters', type_parameter_list) +TypeAlias.field('value', expr) + +TypeVar.field('name', expr) +TypeVar.field('bound', expr) + +TypeVarTuple.field('name', expr) + +UnaryOp.field('op', unaryop, 'operator') +UnaryOp.field('operand', expr) + +While.field('test', expr) +While.field('body', stmt_list) +While.field('orelse', stmt_list, 'else block') + +With.field('context_expr', expr, 'context manager') +With.field('optional_vars', expr, 'optional variable') +With.field('body', stmt_list) +With.field('is_async', bool_, 'async') + +Yield.field('value', expr) + +YieldFrom.field('value', expr) + +#Template AST Nodes +TemplateWrite.field('value', expr) +TemplateDottedNotation.field('value', expr, 'object') +TemplateDottedNotation.field('attr', string, 'attribute name') +TemplateDottedNotation.field('ctx', expr_context, 'context') +Filter.field('value', expr, 'filtered value') +Filter.field('filter', expr, 'filter') + +PlaceHolder.field('variable', variable) +PlaceHolder.field('ctx', expr_context, 'context') + +StringPart.field('text', string) +StringPart.field('location', location) + +Await.field('value', expr, 'expression waited upon') + +FormattedStringLiteral.field('values', expr_list) + +FormattedValue.field('value', expr, "expression to be formatted") +FormattedValue.field('conversion', string, 'type conversion') +FormattedValue.field('format_spec', FormattedStringLiteral, 'format specifier') + +AnnAssign.field('value', expr) +AnnAssign.field('annotation', expr) +AnnAssign.field('target', expr) + +SpecialOperation.field('name', string) +SpecialOperation.field('arguments', expr_list) + +AssignExpr.field('value', expr) +AssignExpr.field('target', expr) + +def all_nodes(): + nodes = [ val for val in globals().values() if isinstance(val, Node) ] + return _build_node_relations(nodes) diff --git a/python/extractor/semmle/python/modules.py b/python/extractor/semmle/python/modules.py new file mode 100644 index 00000000000..8934d810eb8 --- /dev/null +++ b/python/extractor/semmle/python/modules.py @@ -0,0 +1,214 @@ +'''MODULE_TYPES: mapping from type-code returned by +imp.find_module to Module subclass''' + +import semmle.python.parser.tokenizer +import semmle.python.parser.tsg_parser +import re +import os +from blib2to3.pgen2 import tokenize +import codecs + +from semmle.python.passes.labeller import Labeller +from semmle.util import base64digest +from semmle.profiling import timers + +__all__ = [ 'PythonSourceModule' ] + +class PythonSourceModule(object): + + kind = None + + def __init__(self, name, path, logger, bytes_source = None): + assert isinstance(path, str), path + self.name = name # May be None + self.path = path + if bytes_source is None: + with timers["load"]: + with open(self.path, 'rb') as src: + bytes_source = src.read() + if BIN_PYTHON.match(bytes_source): + self.kind = "Script" + self._ast = None + self._py_ast = None + self._lines = None + self._line_types = None + self._comments = None + self._tokens = None + self.logger = logger + with timers["decode"]: + self.encoding, self.bytes_source = semmle.python.parser.tokenizer.encoding_from_source(bytes_source) + if self.encoding != 'utf-8': + logger.debug("File '%s' has encoding %s.", path, self.encoding) + try: + self._source = self.bytes_source.decode(self.encoding) + self._illegal_encoding = False + except Exception as ex: + self.logger.warning("%s has encoding '%s'", path, self.encoding) + #Set source to a latin-1 decoding of source string (which cannot fail). + #Attempting to get the AST will raise a syntax error as expected. + self._source = self.bytes_source.decode("latin-1") + self._illegal_encoding = str(ex) + self._source = normalize_line_endings(self._source) + #Strip BOM + if self._source.startswith(u'\ufeff'): + self._source = self._source[1:] + self._secure_hash = base64digest(self._source) + assert isinstance(self._source, str) + + @property + def source(self): + return self._source + + @property + def lines(self): + if self._lines is None: + def genline(): + src = self._source + #Handle non-linux line endings + src = src.replace("\r\n", "\n").replace("\r", "\n") + length = len(src) + start = 0 + while True: + end = src.find(u'\n', start) + if end < 0: + if start < length: + yield src[start:] + return + yield src[start:end+1] + start = end+1 + self._lines = list(genline()) + return self._lines + + @property + def tokens(self): + if self._tokens is None: + with timers["tokenize"]: + tokenizer = semmle.python.parser.tokenizer.Tokenizer(self._source) + self._tokens = list(tokenizer.tokens()) + return self._tokens + + @property + def ast(self): + # The ast will be modified by the labeller, so we cannot share it with the py_ast property. + # However, we expect py_ast to be accessed and used before ast, so we avoid reparsing in that case. + if self._ast is None: + if self._illegal_encoding: + message = self._illegal_encoding + error = SyntaxError(message) + error.filename = self.path + error.lineno, error.offset = offending_byte_position(message, self.bytes_source) + raise error + self._ast = self.py_ast + self._ast.trap_name = self.trap_name + self._py_ast = None + with timers["label"]: + Labeller().apply(self) + return self._ast + + @property + def old_py_ast(self): + # The py_ast is the raw ast from the Python parser. + if self._py_ast is None: + self._py_ast = semmle.python.parser.parse(self.tokens, self.logger) + return self._py_ast + + @property + def py_ast(self): + try: + # First, try to parse the source with the old Python parser. + return self.old_py_ast + except Exception as ex: + # If that fails, try to parse the source with the new Python parser (unless it has been + # explicitly disabled). + # + # Like PYTHONUNBUFFERED for Python, we treat any non-empty string as meaning the + # flag is enabled. + # https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUNBUFFERED + if os.environ.get("CODEQL_PYTHON_DISABLE_TSG_PARSER"): + if isinstance(ex, SyntaxError): + raise ex + else: + raise SyntaxError("Exception %s while parsing %s" % (ex, self.path)) + else: + try: + self._py_ast = semmle.python.parser.tsg_parser.parse(self.path, self.logger) + return self._py_ast + except SyntaxError as ex: + raise ex + except Exception as ex: + raise SyntaxError("Exception %s in tsg-python while parsing %s" % (ex, self.path)) + + + @property + def trap_name(self): + return type(self).__name__ + ':' + self.path + ":" + self._secure_hash + + def get_hash_key(self, token): + return base64digest(self.path + u":" + self._secure_hash + token) + + def get_encoding(self): + 'Returns encoding of source' + return self.encoding + + @property + def comments(self): + ''' Returns an iterable of comments in the form: + test, start, end where start and end are line. column + pairs''' + if self._comments is None: + self._lexical() + return self._comments + + def close(self): + self.bytes_source = None + self._source = None + self._ast = None + self._line_types = None + self._comments = None + self._lines = None + + def _lexical(self): + self._comments = [] + for kind, text, start, end in self.tokens: + if kind == tokenize.COMMENT: + self._comments.append((text, start, end)) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + +NEWLINE = b'\n' +OFFENDING_BYTE_RE = re.compile(r"decode byte \w+ in position (\d+):") + +def offending_byte_position(message, string): + m = OFFENDING_BYTE_RE.search(message) + if m is None: + return (0,0) + badposition = int(m.group(1)) + prefix = string[:badposition] + line = prefix.count(NEWLINE) + 1 + column = badposition - prefix.rfind(NEWLINE) - 1 + return (line, column) + + +BIN_PYTHON = re.compile(b'#! *(/usr|/bin|/local)*/?(env)? *python') + +def is_script(path): + '''Is the file at `path` a script? (does it start with #!... python)''' + try: + with open(path, "rb") as contents: + start = contents.read(100) + return bool(BIN_PYTHON.match(start)) + except Exception: + return False + +def normalize_line_endings(src): + #Our tokenizer expects single character `\n`, `\r` or `\f` as line endings. + src = src.replace(u'\r\n', u'\n') + #Our parser expects that there are no unterminated lines. + if src and src[-1] != u'\n': + return src + u'\n' + return src diff --git a/python/extractor/semmle/python/parser/__init__.py b/python/extractor/semmle/python/parser/__init__.py new file mode 100644 index 00000000000..d5eb021f8d3 --- /dev/null +++ b/python/extractor/semmle/python/parser/__init__.py @@ -0,0 +1,153 @@ + +# Black's version of lib2to3 (modified) +from blib2to3.pytree import type_repr +from blib2to3 import pygram +from blib2to3.pgen2 import driver, token +from blib2to3.pgen2.parse import ParseError, Parser +from . import ast +from blib2to3.pgen2 import tokenize, grammar +from blib2to3.pgen2.token import tok_name +from semmle.profiling import timers + +pygram.initialize() +syms = pygram.python_symbols + + +GRAMMARS = [ + ("Python 3", pygram.python3_grammar), + ("Python 3 without async", pygram.python3_grammar_no_async), + ("Python 2 with print as function", pygram.python2_grammar_no_print_statement), + ("Python 2", pygram.python2_grammar), +] + + +SKIP_IF_SINGLE_CHILD_NAMES = { + 'atom', + 'power', + 'test', + 'not_test', + 'and_test', + 'or_test', + 'suite', + 'testlist', + 'expr', + 'xor_expr', + 'and_expr', + 'shift_expr', + 'arith_expr', + 'term', + 'factor', + 'testlist_gexp', + 'exprlist', + 'testlist_safe', + 'old_test', + 'comparison', +} + +SKIP_IF_SINGLE_CHILD = { + val for name, val in + syms.__dict__.items() + if name in SKIP_IF_SINGLE_CHILD_NAMES +} + + +class Leaf(object): + + __slots__ = "type", "value", "start", "end" + + def __init__(self, type, value, start, end): + self.type = type + self.value = value + self.start = start + self.end = end + + def __repr__(self): + """Return a canonical string representation.""" + return "%s(%s, %r)" % (self.__class__.__name__, + self.name, + self.value) + + @property + def name(self): + return tok_name.get(self.type, self.type) + +class Node(object): + + __slots__ = "type", "children", "used_names" + + def __init__(self, type, children): + self.type = type + self.children = children + + @property + def start(self): + node = self + while isinstance(node, Node): + node = node.children[0] + return node.start + + @property + def end(self): + node = self + while isinstance(node, Node): + node = node.children[-1] + return node.end + + def __repr__(self): + """Return a canonical string representation.""" + return "%s(%s, %r)" % (self.__class__.__name__, + self.name, + self.children) + + @property + def name(self): + return type_repr(self.type) + +def convert(gr, raw_node): + type, value, context, children = raw_node + if children or type in gr.number2symbol: + # If there's exactly one child, return that child instead of + # creating a new node. + if len(children) == 1 and type in SKIP_IF_SINGLE_CHILD: + return children[0] + return Node(type, children) + else: + start, end = context + return Leaf(type, value, start, end) + +def parse_tokens(gr, tokens): + """Parse a series of tokens and return the syntax tree.""" + p = Parser(gr, convert) + p.setup() + for tkn in tokens: + type, value, start, end = tkn + if type in (tokenize.COMMENT, tokenize.NL): + continue + if type == token.OP: + type = grammar.opmap[value] + if type == token.INDENT: + value = "" + if p.addtoken(type, value, (start, end)): + break + else: + # We never broke out -- EOF is too soon (how can this happen???) + raise parse.ParseError("incomplete input", + type, value, ("", start)) + return p.rootnode + + +def parse(tokens, logger): + """Given a string with source, return the lib2to3 Node.""" + for name, grammar in GRAMMARS: + try: + with timers["parse"]: + cpt = parse_tokens(grammar, tokens) + with timers["rewrite"]: + return ast.convert(logger, cpt) + except ParseError as pe: + lineno, column = pe.context[1] + logger.debug("%s at line %d, column %d using grammar for %s", pe, lineno, column, name) + exc = SyntaxError("Syntax Error") + exc.lineno = lineno + exc.offset = column + raise exc diff --git a/python/extractor/semmle/python/parser/ast.py b/python/extractor/semmle/python/parser/ast.py new file mode 100644 index 00000000000..85d87108e35 --- /dev/null +++ b/python/extractor/semmle/python/parser/ast.py @@ -0,0 +1,1491 @@ +from blib2to3.pgen2 import token +from ast import literal_eval +from semmle.python import ast +from blib2to3.pgen2.parse import ParseError +import sys + +LOAD = ast.Load() +STORE = ast.Store() +PARAM = ast.Param() +DEL = ast.Del() + +POSITIONAL = 1 +KEYWORD = 2 + + +class ParseTreeVisitor(object): + '''Standard tree-walking visitor, + using `node.name` rather than `type(node).__name__` + ''' + + def visit(self, node, extra_arg=None): + method = 'visit_' + node.name + if extra_arg is None: + return getattr(self, method)(node) + else: + return getattr(self, method)(node, extra_arg) + +class Convertor(ParseTreeVisitor): + ''' Walk the conrete parse tree, returning an AST. + The CPT is specified by blib2to3/Grammar.txt. + The AST specified by semmle/python/master.py. + Each `visit_X` method takes a `X` node in the CFG and + produces some part of the AST, usually a single node. + ''' + + def __init__(self, logger): + self.logger = logger + # To handle f-strings nested inside other f-strings, we must keep track of the stack of + # surrounding prefixes while walking the tree. This is necessary because inside an f-string + # like `f"hello{f'to{you}dear'}world"`, the string part containing "world" has (in terms of + # the concrete parse tree) a prefix of `}`, which doesn't tell us how to interpret it (in + # particular, we can't tell if it's a raw string or not). So instead we look at the top of + # the prefix stack to figure out what the "current prefix" is. The nested f-string in the + # example above demonstrates why we must do this as a stack -- we must restore the outer + # `f"` prefix when we're done with the inner `f'`-prefix string. + # + # The stack manipulation itself takes place in the `visit_FSTRING_START` and + # `visit_FSTRING_END` methods. The text wrangling takes place in the `parse_string` helper + # function. + + self.outer_prefix_stack = [] + + + def visit_file_input(self, node): + body = [] + for s in [self.visit(s) for s in node.children if s.name not in ("ENDMARKER", "NEWLINE")]: + if isinstance(s, list): + body.extend(s) + else: + body.append(s) + result = ast.Module(body) + set_location(result, node) + return result + + def visit_import_from(self, node): + level = 0 + index = 1 + module_start = node.children[index].start + while is_token(node.children[index], "."): + level += 1 + index += 1 + if is_token(node.children[index], "import"): + module_end = node.children[index-1].end + index += 1 + module_name = None + else: + module_end = node.children[index].end + module_name = self.visit(node.children[index]) + index += 2 + if is_token(node.children[index], "*"): + module = ast.ImportExpr(level, module_name, False) + set_location(module, module_start, module_end) + result = ast.ImportFrom(module) + set_location(result, node) + return result + if is_token(node.children[index], "("): + import_as_names = node.children[index+1] + else: + import_as_names = node.children[index] + aliases = [] + for import_as_name in import_as_names.children[::2]: + module = ast.ImportExpr(level, module_name, False) + set_location(module, module_start, module_end) + aliases.append(self._import_as_name(import_as_name, module)) + result = ast.Import(aliases) + set_location(result, node) + return result + + #Helper for visit_import_from + def _import_as_name(self, node, module): + name = node.children[0].value + if len(node.children) == 3: + asname = node.children[2] + else: + asname = node.children[0] + expr = ast.ImportMember(module, name) + set_location(expr, node) + rhs = make_name(asname.value, STORE, asname.start, asname.end) + result = ast.alias(expr, rhs) + set_location(result, node) + return result + + def visit_small_stmt(self, node): + return self.visit(node.children[0]) + + def visit_simple_stmt(self, node): + return [self.visit(s) for s in node.children if s.name not in ("SEMI", "NEWLINE")] + + def visit_stmt(self, node): + return self.visit(node.children[0]) + + def visit_compound_stmt(self, node): + return self.visit(node.children[0]) + + def visit_pass_stmt(self, node): + p = ast.Pass() + set_location(p, node) + return p + + def visit_classdef(self, node): + if len(node.children) == 4: + cls, name, colon, suite = node.children + args, keywords = [], [] + elif len(node.children) == 7: + cls, name, _, args, _, colon, suite = node.children + args, keywords = self.visit(args) + else: + assert len(node.children) == 6 + cls, name, _, _, colon, suite = node.children + args, keywords = [], [] + start = cls.start + end = colon.end + suite = self.visit(suite) + inner = ast.Class(name.value, suite) + set_location(inner, start, end) + cls_expr = ast.ClassExpr(name.value, [], args, keywords, inner) + set_location(cls_expr, start, end) + name_expr = make_name(name.value, STORE, name.start, name.end) + result = ast.Assign(cls_expr, [name_expr]) + set_location(result, start, end) + return result + + def visit_arglist(self, node): + all_args = self._visit_list(node.children[::2]) + args = [ arg for kind, arg in all_args if kind is POSITIONAL ] + keywords = [ arg for kind, arg in all_args if kind is KEYWORD ] + return args, keywords + + def visit_argument(self, node): + child = node.children[0] + if is_token(child, "*"): + kind, arg = POSITIONAL, ast.Starred(self.visit(node.children[1], LOAD), LOAD) + elif is_token(child, "**"): + kind, arg = KEYWORD, ast.DictUnpacking(self.visit(node.children[1], LOAD)) + elif len(node.children) == 3 and is_token(node.children[1], "="): + try: + name = get_node_value(child) + except Exception: + #Not a legal name + name = None + self.logger.warning("Illegal name for keyword on line %s", child.start[0]) + kind, arg = KEYWORD, ast.keyword(name, self.visit(node.children[2], LOAD)) + else: + arg = self.visit(child, LOAD) + if len(node.children) == 1: + return POSITIONAL, arg + elif len(node.children) == 3 and is_token(node.children[1], ":="): + return POSITIONAL, self.visit_namedexpr_test(node, LOAD) + generators = self.visit(node.children[1]) + kind, arg = POSITIONAL, ast.GeneratorExp(arg, generators) + set_location(arg, node) + rewrite_comp(arg) + set_location(arg, node) + return kind, arg + + def visit_namedexpr_test(self, node, ctx): + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + target = self.visit(node.children[0], STORE) + value = self.visit(node.children[-1], LOAD) + result = ast.AssignExpr(value, target) + set_location(result, node) + return result + + def visit_test(self, node, ctx): + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + else: + if ctx is not LOAD: + context_error(node) + body = self.visit(node.children[0], ctx) + test = self.visit(node.children[2], ctx) + orelse = self.visit(node.children[4], ctx) + ifexp = ast.IfExp(test, body, orelse) + set_location(ifexp, node) + return ifexp + + def visit_or_test(self, node, ctx): + return self._boolop(node, ast.Or, ctx) + + def visit_and_test(self, node, ctx): + return self._boolop(node, ast.And, ctx) + + def visit_not_test(self, node, ctx): + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + if ctx is not LOAD: + context_error(node) + result = ast.UnaryOp( + ast.Not(), + self.visit(node.children[1], ctx) + ) + set_location(result, node) + return result + + # Helper for `or` and `and`. + def _boolop(self, node, opcls, ctx): + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + values = [ self.visit(s, ctx) for s in node.children[::2] ] + result = ast.BoolOp(opcls(), values) + set_location(result, node) + return result + + # Helper for various binary expression visitors. + def _binary(self, node, opfact, ctx): + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + if ctx is not LOAD: + context_error(node) + children = iter(node.children) + result = self.visit(next(children), LOAD) + for op in children: + item = next(children) + rhs = self.visit(item, LOAD) + result = ast.BinOp(result, opfact(op), rhs) + set_location(result, node.start, item.end) + return result + + def visit_suite(self, node): + if len(node.children) == 1: + return self.visit(node.children[0]) + result = [] + for s in [self.visit(s) for s in node.children[2:-1]]: + if isinstance(s, list): + result.extend(s) + else: + result.append(s) + return result + + def visit_expr_stmt(self, node): + if len(node.children) == 1: + result = ast.Expr(self.visit(node.children[0], LOAD)) + set_location(result, node) + return result + if len(node.children) > 1 and is_token(node.children[1], "="): + return self._assign(node) + if len(node.children) == 2: + # Annotated assignment + target = self.visit(node.children[0], STORE) + ann = node.children[1] + type_anno = self.visit(ann.children[1], LOAD) + if len(ann.children) > 2: + value = self.visit(ann.children[3], LOAD) + else: + value = None + result = ast.AnnAssign(value, type_anno, target) + else: + #Augmented assignment + lhs = self.visit(node.children[0], LOAD) + op = self.visit(node.children[1]) + rhs = self.visit(node.children[2], LOAD) + expr = ast.BinOp(lhs, op, rhs) + set_location(expr, node) + result = ast.AugAssign(expr) + set_location(result, node) + return result + + def visit_augassign(self, node): + return AUG_ASSIGN_OPS[node.children[0].value]() + + #Helper for visit_expr_stmt (for assignment) + def _assign(self, node): + targets = [ self.visit(t, STORE) for t in node.children[:-1:2]] + result = ast.Assign(self.visit(node.children[-1], LOAD), targets) + set_location(result, node) + return result + + def visit_testlist(self, node, ctx): + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + elts = self._visit_list(node.children[::2], ctx) + result = ast.Tuple(elts, ctx) + set_location(result, node) + return result + + visit_testlist_star_expr = visit_testlist + + def visit_comparison(self, node, ctx): + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + if ctx is not LOAD: + context_error(node) + left = self.visit(node.children[0], ctx) + ops = [ self.visit(op) for op in node.children[1::2]] + comps = [ self.visit(op, ctx) for op in node.children[2::2]] + result = ast.Compare(left, ops, comps) + set_location(result, node) + return result + + def visit_comp_op(self, node): + if len(node.children) == 1: + return COMP_OP_CLASSES[node.children[0].value]() + else: + assert len(node.children) == 2 + return ast.IsNot() if node.children[0].value == "is" else ast.NotIn() + + def visit_expr(self, node, ctx): + return self._binary(node, lambda _: ast.BitOr(), ctx) + + def visit_xor_expr(self, node, ctx): + return self._binary(node, lambda _: ast.BitXor(), ctx) + + def visit_and_expr(self, node, ctx): + return self._binary(node, lambda _: ast.BitAnd(), ctx) + + def visit_shift_expr(self, node, ctx): + return self._binary( + node, + lambda op: ast.LShift() if op.value == "<<" else ast.RShift(), + ctx + ) + + def visit_arith_expr(self, node, ctx): + return self._binary( + node, + lambda op: ast.Add() if op.value == "+" else ast.Sub(), + ctx + ) + + def visit_term(self, node, ctx): + return self._binary( + node, + lambda op: TERM_OP_CLASSES[op.value](), + ctx + ) + + def visit_factor(self, node, ctx): + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + result = ast.UnaryOp( + FACTOR_OP_CLASSES[node.children[0].value](), + self.visit(node.children[1], ctx) + ) + set_location(result, node) + return result + + def visit_power(self, node, ctx): + '''This part of the Grammar is formulated in a slightly + awkward way, so we need to recursively handle the `await` + prefix, then the `** factor` suffix, then the atom and trailers. + ''' + + # Because `await` was a valid identifier in earlier versions of Python, + # we cannot assume it indicates an `await` expression. We therefore + # have to look at what follows in order to make a decision. The + # relevant part of the grammar is + # + # power: ['await'] atom trailer* ['**' factor] + # + # The case we wish to identify is when 'await' appears, but as an + # `atom`, and not an `await` token. + # + # Because `atom` nodes may no longer be present (see + # `SKIP_IF_SINGLE_CHILD_NAMES` in `__init__.py`) we instead look at the + # node following the (potentially) skipped `atom`. In particular, if + # the following node is a `trailer` or "**" token, we know that the + # given node cannot be an `await` token, and must be an `atom` instead. + try: + next_node = node.children[1] + next_is_atom = next_node.name != "trailer" and not is_token(next_node, "**") + except (IndexError, AttributeError): + # IndexError if `node` has at most one child. + # AttributeError if `next_node` is a `Leaf` instead of a `Node`. + next_is_atom = False + if is_token(node.children[0], "await") and next_is_atom: + if ctx is not LOAD: + context_error(node) + pow = self._power(node.children[1:], ctx) + result = ast.Await(pow) + set_location(result, node) + return result + else: + return self._power(node.children, ctx) + + #Helper for visit_power + def _power(self, children, ctx): + start = children[0].start + if len(children) > 1 and is_token(children[-2], "**"): + if ctx is not LOAD: + context_error(children[0]) + trailers = children[1:-2] + pow_expr = self.visit(children[-1], ctx) + else: + trailers = children[1:] + pow_expr = None + if trailers: + expr = self.visit(children[0], LOAD) + for trailer in trailers[:-1]: + expr = self._apply_trailer(expr, trailer, start, LOAD) + expr = self._apply_trailer(expr, trailers[-1], start, ctx) + else: + expr = self.visit(children[0], ctx) + if pow_expr: + expr = ast.BinOp(expr, ast.Pow(), pow_expr) + set_location(expr, children[0].start, children[-1].end) + return expr + + #Helper for _power + def _atom(self, children, ctx): + start = children[0].start + if len(children) == 1: + return self.visit(children[0], ctx) + atom = self.visit(children[0], LOAD) + for trailer in children[1:-1]: + atom = self._apply_trailer(atom, trailer, start, LOAD) + atom = self._apply_trailer(atom, children[-1], start, ctx) + return atom + + #Helper for _atom + def _apply_trailer(self, atom, trailer, start, ctx): + children = trailer.children + left = children[0] + if is_token(left, "("): + if is_token(children[1], ")"): + args, keywords = [], [] + end = children[1].end + else: + args, keywords = self.visit(children[1]) + end = children[2].end + result = ast.Call(atom, args, keywords) + elif is_token(left, "["): + result = ast.Subscript(atom, self.visit(children[1], LOAD), ctx) + end = children[2].end + else: + assert is_token(left, ".") + result = ast.Attribute(atom, children[1].value, ctx) + end = children[1].end + set_location(result, start, end) + return result + + def visit_atom(self, node, ctx): + left = node.children[0] + if left.value in "[({": + n = node.children[1] + if hasattr(n, "value") and n.value in "])}": + if n.value == ")": + result = ast.Tuple([], ctx) + elif n.value == "]": + result = ast.List([], ctx) + else: + result = ast.Dict([]) + set_location(result, node) + return result + else: + result = self.visit(node.children[1], ctx) + if left.value == "(": + result.parenthesised = True + else: + #Meaningful bracketing + set_location(result, node) + if isinstance(result, (ast.GeneratorExp, ast.ListComp, ast.SetComp, ast.DictComp)): + rewrite_comp(result) + return result + if left.type == token.NAME: + return make_name(left.value, ctx, left.start, left.end) + if ctx is not LOAD: + context_error(node) + if left.type == token.NUMBER: + val = get_numeric_value(left) + result = ast.Num(val, left.value) + set_location(result, left) + return result + if left.value == ".": + assert len(node.children) == 3 and node.children[2].value == "." + result = ast.Ellipsis() + set_location(result, node) + return result + assert left.type == token.BACKQUOTE + result = ast.Repr(self.visit(node.children[1], LOAD)) + set_location(result, node) + return result + + def visit_STRING(self, node, ctx): + if ctx is not LOAD: + context_error(node) + outer_prefix = self.outer_prefix_stack[-1] if self.outer_prefix_stack else None + prefix, s = parse_string(node.value, self.logger, outer_prefix) + text = get_text(node.value, outer_prefix) + result = ast.StringPart(prefix, text, s) + set_location(result, node) + return result + + def visit_NUMBER(self, node, ctx): + if ctx is not LOAD: + context_error(node) + val = get_numeric_value(node) + result = ast.Num(val, node.value) + set_location(result, node) + return result + + def visit_funcdef(self, node, is_async=False): + # funcdef: 'def' NAME parameters ['->' test] ':' suite + name = node.children[1].value + if node.children[3].value == "->": + return_type = self.visit(node.children[4], LOAD) + end = node.children[5].end + body = self.visit(node.children[6]) + else: + return_type = None + end = node.children[3].end + body = self.visit(node.children[4]) + start = node.children[0].start + params = node.children[2] + if len(params.children) == 2: + args, vararg, kwonlyargs, kwarg = [], None, [], None + else: + args, vararg, kwonlyargs, kwarg = self._get_parameters(params.children[1]) + func = ast.Function(name, [], args, vararg, kwonlyargs, kwarg, body, is_async) + set_location(func, start, end) + if len(params.children) == 2: + args = ast.arguments([], [], [], None, None, []) + else: + args = self._get_defaults_and_annotations(params.children[1]) + funcexpr = ast.FunctionExpr(name, args, return_type, func) + set_location(funcexpr, start, end) + name_expr = make_name(name, STORE, node.children[1].start, node.children[1].end) + result = ast.Assign(funcexpr, [name_expr]) + set_location(result, start, end) + return result + + #Helper for visit_funcdef and visit_lambdef + def _get_parameters(self, node): + '''Returns the quadruple: args, vararg, kwonlyargs, kwarg + ''' + args = [] + vararg = None + kwonlyargs = [] + kwarg = None + children = iter(node.children) + arg = None + for child in children: + if is_token(child, "*"): + try: + child = next(children) + except StopIteration: + pass + else: + if not is_token(child, ","): + vararg = self.visit(child, PARAM) + break + if is_token(child, ","): + pass + elif is_token(child, "/"): + pass + elif is_token(child, "="): + next(children) + elif is_token(child, "**"): + child = next(children) + kwarg = self.visit(child, PARAM) + else: + arg = self.visit(child, PARAM) + args.append(arg) + #kwonly args + for child in children: + if is_token(child, ","): + pass + elif is_token(child, "="): + next(children) + elif is_token(child, "**"): + child = next(children) + kwarg = self.visit(child, PARAM) + else: + arg = self.visit(child, PARAM) + kwonlyargs.append(arg) + return args, vararg, kwonlyargs, kwarg + + #Helper for visit_funcdef and visit_lambdef + def _get_defaults_and_annotations(self, node): + defaults = [] + kw_defaults = [] + annotations = [] + varargannotation = None + kwargannotation = None + kw_annotations = [] + children = iter(node.children) + # Because we want the i'th element of `kw_defaults` to be the default value for + # the i'th keyword-only argument, when encountering the combined token for the + # argument name and optional annotation, we add a `None` to `kw_defaults` assuming + # that there is no default value. If there turns out to be a default value, we + # remove the `None` and add the real default value. Like-wise for `defaults`. + + # positional-only args and "normal" args + for child in children: + if is_token(child, "*"): + try: + child = next(children) + except StopIteration: + pass + else: + if not is_token(child, ","): + varargannotation = self.visit(child, LOAD) + break + if is_token(child, ","): + pass + elif is_token(child, "/"): + pass + elif is_token(child, "="): + child = next(children) + defaults.pop() + defaults.append(self.visit(child, LOAD)) + elif is_token(child, "**"): + child = next(children) + kwargannotation = self.visit(child, LOAD) + arg = None + else: + # Preemptively assume there is no default argument (indicated by None) + defaults.append(None) + annotations.append(self.visit(child, LOAD)) + + #kwonly args + for child in children: + if is_token(child, ","): + pass + elif is_token(child, "="): + child = next(children) + kw_defaults.pop() + kw_defaults.append(self.visit(child, LOAD)) + elif is_token(child, "**"): + child = next(children) + kwargannotation = self.visit(child, LOAD) + else: + # Preemptively assume there is no default argument (indicated by None) + kw_defaults.append(None) + kw_annotations.append(self.visit(child, LOAD)) + result = ast.arguments(defaults, kw_defaults, annotations, varargannotation, kwargannotation, kw_annotations) + set_location(result, node) + return result + + def visit_tfpdef(self, node, ctx): + # TO DO Support tuple parameters + # No one uses them any more, so this isn't super important. + child = node.children[0] + if is_token(child, "("): + return None + return self.visit(child, ctx) + + def visit_tname(self, node, ctx): + if ctx is PARAM: + child = node.children[0] + return make_name(child.value, ctx, child.start, child.end) + elif len(node.children) > 1: + return self.visit(node.children[2], ctx) + else: + return None + + def visit_decorated(self, node): + asgn = self.visit(node.children[1]) + value = asgn.value + for deco in reversed(node.children[0].children): + defn = value + decorator = self.visit(deco) + value = ast.Call(decorator, [defn], []) + copy_location(decorator, value) + asgn.value = value + return asgn + + def visit_decorators(self, node): + return self._visit_list(node.children) + + def visit_decorator(self, node): + namedexpr_test = node.children[1] + result = self.visit_namedexpr_test(namedexpr_test, LOAD) + set_location(result, namedexpr_test) + return result + + def _visit_list(self, items, ctx=None): + if ctx is None: + return [ self.visit(i) for i in items ] + else: + return [ self.visit(i, ctx) for i in items ] + + def visit_dotted_name(self, node): + return ".".join(name.value for name in node.children[::2]) + + def visit_NAME(self, name, ctx): + return make_name(name.value, ctx, name.start, name.end) + + def visit_listmaker(self, node, ctx): + if len(node.children) == 1 or is_token(node.children[1], ","): + items = [self.visit(c, ctx) for c in node.children[::2]] + result = ast.List(items, ctx) + else: + if ctx is not LOAD: + context_error(node) + elt = self.visit(node.children[0], ctx) + generators = self.visit(node.children[1]) + result = ast.ListComp(elt, generators) + set_location(result, node) + return result + + def visit_testlist_gexp(self, node, ctx): + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + if is_token(node.children[1], ","): + items = [self.visit(c, ctx) for c in node.children[::2]] + result = ast.Tuple(items, ctx) + else: + if ctx is not LOAD: + context_error(node) + elt = self.visit(node.children[0], ctx) + generators = self.visit(node.children[1]) + result = ast.GeneratorExp(elt, generators) + set_location(result, node) + return result + + def visit_comp_for(self, node): + is_async = is_token(node.children[0], "async") + target = self.visit(node.children[1+is_async], STORE) + iter = self.visit(node.children[3+is_async], LOAD) + if len(node.children) == 5+is_async: + ifs = [] + end = iter._end + comp_iter = self.visit(node.children[4+is_async]) + while comp_iter and not isinstance(comp_iter[0], ast.comprehension): + ifs.append(comp_iter[0]) + end = comp_iter[0]._end + comp_iter = comp_iter[1:] + comp = ast.comprehension(target, iter, ifs) + comp.is_async = is_async + set_location(comp, node.children[0].start, end) + return [comp] + comp_iter + else: + comp = ast.comprehension(target, iter, []) + comp.is_async = is_async + set_location(comp, node) + return [comp] + + visit_old_comp_for = visit_comp_for + + def visit_comp_iter(self, node): + return self.visit(node.children[0]) + + def visit_comp_if(self, node): + cond = self.visit(node.children[1], LOAD) + if len(node.children) == 3: + comp_list = self.visit(node.children[2]) + return [cond] + comp_list + else: + return [cond] + + visit_old_comp_if = visit_comp_if + + visit_old_comp_iter = visit_comp_iter + + def visit_exprlist(self, node, ctx): + #Despite the name this returns a single expression + if len(node.children) == 1: + return self.visit(node.children[0], ctx) + else: + elts = self._visit_list(node.children[::2], ctx) + result = ast.Tuple(elts, ctx) + set_location(result, node) + return result + + visit_testlist_safe = visit_exprlist + + def visit_old_test(self, node, ctx): + return self.visit(node.children[0], ctx) + + def visit_if_stmt(self, node): + endindex = len(node.children) + if is_token(node.children[-3], "else"): + orelse = self.visit(node.children[-1]) + endindex -= 3 + else: + orelse = None + while endindex: + test = self.visit(node.children[endindex-3], LOAD) + body = self.visit(node.children[endindex-1]) + result = ast.If(test, body, orelse) + start = node.children[endindex-4].start + end = node.children[endindex-2].end + set_location(result, start, end) + orelse = [result] + endindex -= 4 + return result + + def visit_import_stmt(self, node): + return self.visit(node.children[0]) + + def visit_import_name(self, node): + aliases = self.visit(node.children[1]) + result = ast.Import(aliases) + set_location(result, node) + return result + + def visit_dotted_as_names(self, node): + return self._visit_list(node.children[::2]) + + def visit_dotted_as_name(self, node): + child0 = node.children[0] + dotted_name = self.visit(child0) + if len(node.children) == 3: + value = ast.ImportExpr(0, dotted_name, False) + child2 = node.children[2] + asname = make_name(child2.value, STORE, child2.start, child2.end) + else: + value = ast.ImportExpr(0, dotted_name, True) + topname = dotted_name.split(".")[0] + asname = make_name(topname, STORE, child0.start, child0.end) + set_location(value, child0) + result = ast.alias(value, asname) + set_location(result, node) + return result + + def visit_dictsetmaker(self, node, ctx): + if ctx is not LOAD: + context_error(node) + if is_token(node.children[0], "**") or len(node.children) > 1 and is_token(node.children[1], ":"): + return self._dictmaker(node) + else: + return self._setmaker(node) + + #Helper for visit_dictsetmaker (for dictionaries) + def _dictmaker(self, node): + if len(node.children) == 4 and is_token(node.children[1], ":") and not is_token(node.children[3], ","): + #Comprehension form + key = self.visit(node.children[0], LOAD) + value = self.visit(node.children[2], LOAD) + generators = self.visit(node.children[3]) + result = ast.DictComp(key, value, generators) + set_location(result, node) + return result + index = 0 + items = [] + while len(node.children) > index: + if is_token(node.children[index], "**"): + d = self.visit(node.children[index+1], LOAD) + item = ast.DictUnpacking(d) + set_location(item, node.children[index].start, node.children[index+1].end) + index += 3 + else: + key = self.visit(node.children[index], LOAD) + value = self.visit(node.children[index+2], LOAD) + item = ast.KeyValuePair(key, value) + set_location(item, node.children[index].start, node.children[index+2].end) + index += 4 + items.append(item) + result = ast.Dict(items) + set_location(result, node) + return result + + #Helper for visit_dictsetmaker (for sets) + def _setmaker(self, node): + if len(node.children) == 2 and not is_token(node.children[1], ","): + #Comprehension form + elt = self.visit(node.children[0], LOAD) + generators = self.visit(node.children[1]) + result = ast.SetComp(elt, generators) + set_location(result, node) + return result + items = self._visit_list(node.children[::2], LOAD) + result = ast.Set(items) + set_location(result, node) + return result + + def visit_while_stmt(self, node): + test = self.visit(node.children[1], LOAD) + body = self.visit(node.children[3]) + if len(node.children) == 7: + orelse = self.visit(node.children[6]) + else: + orelse = None + result = ast.While(test, body, orelse) + set_location(result, node.children[0].start, node.children[2].end) + return result + + def visit_flow_stmt(self, node): + return self.visit(node.children[0]) + + def visit_break_stmt(self, node): + result = ast.Break() + set_location(result, node) + return result + + def visit_continue_stmt(self, node): + result = ast.Continue() + set_location(result, node) + return result + + def visit_return_stmt(self, node): + if len(node.children) == 2: + result = ast.Return(self.visit(node.children[1], LOAD)) + else: + result = ast.Return(None) + set_location(result, node) + return result + + def visit_raise_stmt(self, node): + result = ast.Raise() + set_location(result, node) + if len(node.children) == 1: + return result + result.exc = self.visit(node.children[1], LOAD) + if len(node.children) > 3: + if is_token(node.children[2], "from"): + result.cause = self.visit(node.children[3], LOAD) + else: + result.type = result.exc + del result.exc + result.inst = self.visit(node.children[3], LOAD) + if len(node.children) == 6: + result.tback = self.visit(node.children[5], LOAD) + return result + + def visit_yield_stmt(self, node): + result = ast.Expr(self.visit(node.children[0], LOAD)) + set_location(result, node) + return result + + def visit_yield_expr(self, node, ctx): + if ctx is not LOAD: + context_error(node) + if len(node.children) == 1: + result = ast.Yield(None) + else: + if is_token(node.children[1].children[0], "from"): + result = ast.YieldFrom(self.visit(node.children[1].children[1], LOAD)) + else: + result = ast.Yield(self.visit(node.children[1].children[0], LOAD)) + set_location(result, node) + return result + + def visit_try_stmt(self, node): + body = self.visit(node.children[2]) + index = 3 + handlers = [] + while len(node.children) > index and not hasattr(node.children[index], "value"): + #Except block. + type, name = self.visit(node.children[index]) + handler_body = self.visit(node.children[index+2]) + handler = ast.ExceptStmt(type, name, handler_body) + set_location(handler, node.children[index].start , node.children[index+1].end) + handlers.append(handler) + index += 3 + if len(node.children) > index and is_token(node.children[index], "else"): + orelse = self.visit(node.children[index+2]) + else: + orelse = [] + if is_token(node.children[-3], "finally"): + finalbody = self.visit(node.children[-1]) + else: + finalbody = [] + result = ast.Try(body, orelse, handlers, finalbody) + set_location(result, node.start, node.children[1].end) + return result + + def visit_except_clause(self, node): + type, name = None, None + if len(node.children) > 1: + type = self.visit(node.children[1], LOAD) + if len(node.children) > 3: + name = self.visit(node.children[3], STORE) + return type, name + + def visit_del_stmt(self, node): + if len(node.children) > 1: + result = ast.Delete(self._visit_list(node.children[1].children[::2], DEL)) + else: + result = ast.Delete([]) + set_location(result, node) + return result + + visit_subscriptlist = visit_testlist + visit_testlist1 = visit_testlist + + def visit_subscript(self, node, ctx): + if len(node.children) == 1 and not is_token(node.children[0], ":"): + return self.visit(node.children[0], ctx) + values = [None, None, None] + index = 0 + for child in node.children: + if is_token(child, ":"): + index += 1 + else: + values[index] = self.visit(child, LOAD) + result = ast.Slice(*values) + set_location(result, node) + return result + + def visit_sliceop(self, node, ctx): + if ctx is not LOAD: + context_error(node) + if len(node.children) == 2: + return self.visit(node.children[1], LOAD) + else: + return None + + def visit_assert_stmt(self, node): + test = self.visit(node.children[1], LOAD) + if len(node.children) > 2: + msg = self.visit(node.children[3], LOAD) + else: + msg = None + result = ast.Assert(test, msg) + set_location(result, node) + return result + + def visit_for_stmt(self, node, is_async=False): + target = self.visit(node.children[1], STORE) + iter = self.visit(node.children[3], LOAD) + body = self.visit(node.children[5]) + if len(node.children) == 9: + orelse = self.visit(node.children[8]) + else: + orelse = None + result = ast.For(target, iter, body, orelse) + result.is_async = is_async + set_location(result, node.children[0].start, node.children[4].end) + return result + + def visit_global_stmt(self, node): + cls = ast.Global if node.children[0].value == "global" else ast.Nonlocal + names = [child.value for child in node.children[1::2]] + result = cls(names) + set_location(result, node) + return result + + def visit_lambdef(self, node, ctx): + if ctx is not LOAD: + context_error(node) + test = self.visit(node.children[-1], LOAD) + stmt = ast.Return(test) + set_location(stmt, node.children[-1]) + if is_token(node.children[1], ":"): + args, vararg, kwonlyargs, kwarg = [], None, [], None + else: + args, vararg, kwonlyargs, kwarg = self._get_parameters(node.children[1]) + func = ast.Function("lambda", [], args, vararg, kwonlyargs, kwarg, [stmt], False) + set_location(func, node) + if is_token(node.children[1], ":"): + args = ast.arguments([], [], [], None, None, []) + else: + args = self._get_defaults_and_annotations(node.children[1]) + result = ast.Lambda(args, func) + set_location(result, node) + return result + + visit_old_lambdef = visit_lambdef + + visit_vfpdef = visit_tfpdef + + def visit_vname(self, node, ctx): + if ctx is PARAM: + child = node.children[0] + return make_name(child.value, ctx, child.start, child.end) + else: + return None + + def visit_star_expr(self, node, ctx): + result = ast.Starred(self.visit(node.children[1], ctx), ctx) + set_location(result, node) + return result + + def visit_with_stmt(self, node, is_async=False): + body = self.visit(node.children[-1]) + for item in node.children[-3:0:-2]: + ctx_mngr, opt_vars = self.visit(item) + withstmt = ast.With(ctx_mngr, opt_vars, body) + set_location(withstmt, item) + body = [withstmt] + set_location(withstmt, node.children[0].start, node.children[-2].end) + withstmt.is_async = is_async + return withstmt + + def visit_with_item(self, node): + ctx_mngr = self.visit(node.children[0], LOAD) + if len(node.children) == 1: + return ctx_mngr, None + else: + return ctx_mngr, self.visit(node.children[2], STORE) + + def visit_async_stmt(self, node): + return self.visit(node.children[1], True) + + visit_async_funcdef = visit_async_stmt + + def visit_print_stmt(self, node): + if len(node.children) > 1 and is_token(node.children[1], ">>"): + dest = self.visit(node.children[2], LOAD) + items = node.children[4::2] + else: + dest = None + items = node.children[1::2] + values = self._visit_list(items, LOAD) + nl = not is_token(node.children[-1], ",") + result = ast.Print(dest, values, nl) + set_location(result, node) + return result + + def visit_exec_stmt(self, node): + body = self.visit(node.children[1], LOAD) + globals, locals = None, None + if len(node.children) > 3: + globals = self.visit(node.children[3], LOAD) + if len(node.children) > 5: + locals = self.visit(node.children[5], LOAD) + result = ast.Exec(body, globals, locals) + set_location(result, node) + return result + + def visit_special_operation(self, node, ctx): + if ctx is not LOAD: + context_error(node) + name = node.children[0].value + if len(node.children) == 3: + args = [] + else: + args = self._visit_list(node.children[2].children[::2], LOAD) + result = ast.SpecialOperation(name, args) + set_location(result, node) + return result + + def visit_string(self, node, ctx): + + def convert_parts_to_expr(): + if not current_parts: + return None + if len(current_parts) == 1: + string = ast.Str(current_parts[0].s, current_parts[0].prefix, None) + else: + # Our string parts may be any combination of byte and unicode + # strings, as this is valid in Python 2. We therefore decode + # the strings into unicode before concatenating. + text = "".join(decode_str(p.s) for p in current_parts) + string = ast.Str(text, current_parts[0].prefix, current_parts[:]) + start = current_parts[0].lineno, current_parts[0].col_offset + set_location(string, start, current_parts[-1]._end) + current_parts[:] = [] + return string + + if ctx is not LOAD: + context_error(node) + parts = [] + for p in self._visit_list(node.children, LOAD): + if isinstance(p, list): + parts.extend(p) + else: + parts.append(p) + current_parts = [] + exprs = [] + for part in parts: + if part is None: + #Conversion -- currently ignored. + pass + elif isinstance(part, ast.StringPart): + current_parts.append(part) + else: + assert isinstance(part, ast.expr), part + string = convert_parts_to_expr() + if string: + exprs.append(string) + exprs.append(part) + string = convert_parts_to_expr() + if string: + exprs.append(string) + if len(exprs) == 1: + return exprs[0] + result = ast.JoinedStr(exprs) + set_location(result, node) + return result + + def visit_fstring_part(self, node, ctx): + nodes_to_visit = [] + for node in node.children: + if node.name == 'format_specifier': + # Flatten format_specifiers first + nodes_to_visit += [ n for n in node.children if not n.name == 'FSTRING_SPEC' ] + else: + nodes_to_visit += [node] + + return self._visit_list(nodes_to_visit, ctx) + + def visit_format_specifier(self, node, ctx): + # This will currently never be visited because of the above flattening + assert ctx is LOAD + #Currently ignored + return None + + def visit_CONVERSION(self, node, ctx): + return None + + def visit_COLON(self, node, ctx): + return None + + def visit_EQUAL(self, node, ctx): + return None + + def visit_FSTRING_START(self, node, ctx): + string = self.visit_STRING(node, ctx) + # Push the current prefix onto the prefix stack + self.outer_prefix_stack.append(string.prefix) + return string + + def visit_FSTRING_END(self, node, ctx): + string = self.visit_STRING(node, ctx) + # We're done with this f-string, so pop its prefix off the prefix stack + self.outer_prefix_stack.pop() + return string + + visit_FSTRING_MID = visit_STRING + +# In the following function, we decode to `latin-1` in order to preserve +# the byte values present in the string. This is an undocumented feature of +# this encoding. See also the `test_python_sanity.py` test file in `/tests`. + +def decode_str(s): + if isinstance(s, bytes): + return str(s, 'latin-1') + else: + return s + +def context_error(node): + s = SyntaxError("Invalid context") + s.lineno, s.offset = node.start + raise s + +def is_token(node, text): + '''Holds if `node` is a token (terminal) and its textual value is `text`''' + return hasattr(node, "value") and node.value == text + +def get_node_value(node): + '''Get the value from a NAME node, + stripping redundant CPT nodes''' + while hasattr(node, "children"): + assert len(node.children) == 1 + node = node.children[0] + return node.value + +#Mapping from comparison operator strings to ast classes. +COMP_OP_CLASSES = { + "<": ast.Lt, + "<=": ast.LtE, + ">": ast.Gt, + ">=": ast.GtE, + "==": ast.Eq, + "<>": ast.NotEq, + "!=": ast.NotEq, + "in": ast.In, + "not in": ast.NotIn, + "is": ast.Is, + "is not": ast.IsNot, +} + +#Mapping from multiplicative operator strings to ast classes. +TERM_OP_CLASSES = { + '*': ast.Mult, + '/': ast.Div, + '%': ast.Mod, + '//': ast.FloorDiv, + '@': ast.MatMult, +} + +#Mapping from additive operator strings to ast classes. +FACTOR_OP_CLASSES = { + '+': ast.UAdd, + '-': ast.USub, + '~': ast.Invert, +} + +#Mapping from assignment operator strings to ast classes. +AUG_ASSIGN_OPS = { + '+=': ast.Add, + '-=': ast.Sub, + '*=': ast.Mult, + '/=': ast.Div, + '%=': ast.Mod, + '&=': ast.BitAnd, + '|=': ast.BitOr, + '^=': ast.BitXor, + '<<=': ast.LShift, + '>>=': ast.RShift, + '**=': ast.Pow, + '//=': ast.FloorDiv, + '@=': ast.MatMult, +} + +def make_name(name, ctx, start, end): + '''Create a `Name` ast node''' + variable = ast.Variable(name) + node = ast.Name(variable, ctx) + set_location(node, start, end) + return node + +def set_location(astnode, cptnode_or_start, end=None): + '''Set the location of `astnode` from + either the CPT node or pair of locations. + ''' + if end is None: + astnode.lineno, astnode.col_offset = cptnode_or_start.start + astnode._end = cptnode_or_start.end + else: + astnode.lineno, astnode.col_offset = cptnode_or_start + astnode._end = end + +def split_full_prefix(s): + """Splits a prefix (or a string starting with a prefix) into prefix and quote parts.""" + quote_start = 0 + # First, locate the end of the prefix (and the start of the quotes) + while s[quote_start] not in "'\"}": + quote_start += 1 + # Next, find the end of the quotes. This is either one character past `quote_start`, or three + # (for triple-quoted strings). + if s[quote_start:quote_start + 3] in ("'''",'"""'): + prefix_end = quote_start + 3 + else: + prefix_end = quote_start + 1 + + return s[:quote_start], s[quote_start:prefix_end] + + +def split_string(s, outer_prefix): + """Splits a string into prefix, quotes, and content.""" + s_prefix, s_quotes = split_full_prefix(s) + + quote_start = len(s_prefix) + prefix_end = quote_start + len(s_quotes) + + # If the string starts with `}`, it is a non-inital string part of an f-string. In this case we + # must use the prefix and quotes from the outer f-string. + if s[0] == '}': + prefix, quotes = split_full_prefix(outer_prefix) + else: + prefix, quotes = s_prefix, s_quotes + + # The string either ends with a `{` (if it comes before an interpolation inside an f-string) + # or else it ends with the same quotes as it begins with. + if s[-1] == "{": + content = s[prefix_end:-1] + else: + content = s[prefix_end:-len(quotes)] + + return prefix.lower(), quotes, content + +def get_text(s, outer_prefix): + """Returns a cleaned-up text version of the string, normalizing the quotes and removing any + format string marker.""" + prefix, quotes, content = split_string(s, outer_prefix) + return prefix.strip("fF") + quotes + content + quotes + +def parse_string(s, logger, outer_prefix): + '''Gets the prefix and escaped string text''' + prefix, quotes, content = split_string(s, outer_prefix) + saved_content = content + try: + ends_with_illegal_character = False + # If the string ends with the same quote character as the outer quotes (and/or backslashes) + # (e.g. the first string part of `f"""hello"{0}"""`), we must take care to not accidently create + # the ending quotes at the wrong place. (`literal_eval` would be unhappy with `"""hello""""` + # as an input.) To do this, we insert an extra space at the end (that we then must remember + # to remove later on). + if content.endswith(quotes[0]) or content.endswith('\\'): + ends_with_illegal_character = True + content = content + " " + text = prefix.strip("fF") + quotes + content + quotes + s = literal_eval(text) + except Exception as ex: + # Something has gone wrong, but we still have the original form - Should be OK. + logger.warning("Unable to parse string %s: %s", text, ex) + logger.traceback() + ends_with_illegal_character = False + s = saved_content + if isinstance(s, bytes): + try: + s = s.decode(sys.getfilesystemencoding()) + except UnicodeDecodeError: + s = decode_str(s) + if ends_with_illegal_character: + s = s[:-1] + return prefix + quotes, s + +ESCAPES = "" + +def get_numeric_value(node): + '''Gets numeric value from a CPT leaf node.''' + value = node.value + value = value.replace("_", "") + chars = set(value.lower()) + try: + if u'.' in chars or u'e' in chars or u'j' in chars: + # Probable float or hex or imaginary + return literal_eval(value) + if len(value) > 1 and value[0] == u'0' and value[1] not in u'boxlBOXL': + # Old-style octal + value = u'0o' + value[1:] + if value[-1] in u'lL': + return literal_eval(value[:-1]) + return literal_eval(value) + except ValueError: + raise ParseError("Not a valid numeric value", node.type, node.value, (node.start, node.end)) + +#This rewriting step is performed separately for two reasons. +# 1. It is complicated +# 2. In future, we may want to make the AST more like the syntax and less like the semantics. +# Keeping step separate should make that a bit easier. +def rewrite_comp(node): + if hasattr(node, "function"): + return + gens = node.generators + if hasattr(node, "elt"): + elt = node.elt + del node.elt + else: + elt = ast.Tuple([node.value, node.key], LOAD) + elt.lineno = node.key.lineno + elt.col_offset = node.key.col_offset + elt._end = node.value._end + del node.key + del node.value + y = ast.Yield(elt) + copy_location(elt, y) + stmt = ast.Expr(y) + copy_location(elt, stmt) + for gen in reversed(gens[1:]): + for if_ in gen.ifs: + stmt = ast.If(if_, [stmt], None) + copy_location(if_, stmt) + stmt = ast.For(gen.target, gen.iter, [stmt], None) + if getattr(gen, "is_async", False): + stmt.is_async = True + copy_location(node, stmt) + for if_ in gens[0].ifs: + stmt = ast.If(if_, [stmt], None) + copy_location(if_, stmt) + p0 = ".0" + pvar = ast.Variable(p0) + arg = ast.Name(pvar, LOAD) + copy_location(node, arg) + stmt = ast.For(gens[0].target, arg, [stmt], None) + if getattr(gens[0], "is_async", False): + stmt.is_async = True + copy_location(node, stmt) + pvar = ast.Variable(p0) + arg = ast.Name(pvar, PARAM) + copy_location(node, arg) + function = ast.Function(COMP_NAMES[type(node).__name__], [],[arg], None, None, None, [ stmt ]) + copy_location(node, function) + node.function = function + node.iterable = gens[0].iter + del node.generators + + +COMP_NAMES = { + 'GeneratorExp' : 'genexpr', + 'DictComp' : 'dictcomp', + 'ListComp' : 'listcomp', + 'SetComp' : 'setcomp' +} + +def copy_location(src, dest): + '''Copy location from `src` to `dest`''' + dest.lineno = src.lineno + dest.col_offset = src.col_offset + dest._end = src._end + +def convert(logger, cpt): + '''Covert concrete parse tree as specified by blib2to3/Grammar.txt + to the AST specified by semmle/python/master.py + ''' + return Convertor(logger).visit(cpt) diff --git a/python/extractor/semmle/python/parser/dump_ast.py b/python/extractor/semmle/python/parser/dump_ast.py new file mode 100644 index 00000000000..fbeaabb2939 --- /dev/null +++ b/python/extractor/semmle/python/parser/dump_ast.py @@ -0,0 +1,151 @@ +# dump_ast.py + +# Functions for dumping the internal Python AST in a human-readable format. + +import sys +import semmle.python.parser.tokenizer +import semmle.python.parser.tsg_parser +from semmle.python.parser.tsg_parser import ast_fields +from semmle.python import ast +from semmle import logging +from semmle.python.modules import PythonSourceModule + + + +def get_fields(cls): + """Gets the fields of the given class, followed by the fields of its (single-inheritance) + superclasses, if any. + Only includes fields for classes in `ast_fields`.""" + if cls not in ast_fields: + return () + s = cls.__bases__[0] + return ast_fields[cls] + get_fields(s) + +def missing_fields(known, node): + """Returns a list of fields in `node` that are not in `known`.""" + return [field + for field in dir(node) + if field not in known + and not field.startswith("_") + and not field in ("lineno", "col_offset") + and not (isinstance(node, ast.Name) and field == "id") + ] + +class AstDumper(object): + def __init__(self, output=sys.stdout, no_locations=False): + self.output = output + self.show_locations = not no_locations + + def visit(self, node, level=0, visited=None): + if visited is None: + visited = set() + if node in visited: + output.write("{} CYCLE DETECTED!\n".format(indent)) + return + visited = visited.union({node}) + output = self.output + cls = node.__class__ + name = cls.__name__ + indent = ' ' * level + if node is None: # Special case for `None` to avoid printing `NoneType`. + name = 'None' + if cls == str: # Special case for bare strings + output.write("{}{}\n".format(indent, repr(node))) + return + # In some places, we have non-AST nodes in lists, and since these don't have a location, we + # simply print their name instead. + # `ast.arguments` is special -- it has fields but no location + if hasattr(node, 'lineno') and not isinstance(node, ast.arguments) and self.show_locations: + position = (node.lineno, node.col_offset, node._end[0], node._end[1]) + output.write("{}{}: [{}, {}] - [{}, {}]\n".format(indent, name, *position)) + else: + output.write("{}{}\n".format(indent, name)) + + + fields = get_fields(cls) + unknown = missing_fields(fields, node) + if unknown: + output.write("{}UNKNOWN FIELDS: {}\n".format(indent, unknown)) + for field in fields: + value = getattr(node, field, None) + # By default, the `parenthesised` field on expressions has no value, so it's easier to + # just not print it in that case. + if field == "parenthesised" and value is None: + continue + # Likewise, the default value for `is_async` is `False`, so we don't need to print it. + if field == "is_async" and value is False: + continue + output.write("{} {}:".format(indent,field)) + if isinstance(value, list): + output.write(" [") + if len(value) == 0: + output.write("]\n") + continue + output.write("\n") + for n in value: + self.visit(n, level+2, visited) + output.write("{} ]\n".format(indent)) + # Some AST classes are special in that the identity of the object is the only thing + # that matters (and they have no location info). For this reason we simply print the name. + elif isinstance(value, (ast.expr_context, ast.boolop, ast.cmpop, ast.operator, ast.unaryop)): + output.write(' {}\n'.format(value.__class__.__name__)) + elif isinstance(value, ast.AstBase): + output.write("\n") + self.visit(value, level+2, visited) + else: + output.write(' {}\n'.format(repr(value))) + + +class StdoutLogger(logging.Logger): + def log(self, level, fmt, *args): + sys.stdout.write(fmt % args + "\n") + +def old_parser(inputfile, logger): + mod = PythonSourceModule(None, inputfile, logger) + logger.close() + return mod.old_py_ast + +def args_parser(): + 'Parse command_line, returning options, arguments' + from optparse import OptionParser + usage = "usage: %prog [options] python-file" + parser = OptionParser(usage=usage) + parser.add_option("-o", "--old", help="Dump old AST.", action="store_true") + parser.add_option("-n", "--new", help="Dump new AST.", action="store_true") + parser.add_option("-l", "--no-locations", help="Don't include location info in dump", action="store_true") + parser.add_option("-d", "--debug", help="Print debug information.", action="store_true") + return parser + +def main(): + parser = args_parser() + options, args = parser.parse_args(sys.argv[1:]) + + if options.debug: + global DEBUG + DEBUG = True + + if len(args) != 1: + sys.stderr.write("Error: wrong number of arguments.\n") + parser.print_help() + sys.exit(1) + + inputfile = args[0] + + if options.old and options.new: + sys.stderr.write("Error: options --old and --new are mutually exclusive.\n") + sys.exit(1) + + if not (options.old or options.new): + sys.stderr.write("Error: Must specify either --old or --new.\n") + sys.exit(1) + + with StdoutLogger() as logger: + + if options.old: + ast = old_parser(inputfile, logger) + else: + ast = semmle.python.parser.tsg_parser.parse(inputfile, logger) + AstDumper(no_locations=options.no_locations).visit(ast) + +if __name__ == '__main__': + main() diff --git a/python/extractor/semmle/python/parser/tokenizer.py b/python/extractor/semmle/python/parser/tokenizer.py new file mode 100644 index 00000000000..6ddf3fa4d03 --- /dev/null +++ b/python/extractor/semmle/python/parser/tokenizer.py @@ -0,0 +1,1146 @@ +# This file is AUTO-GENERATED. DO NOT MODIFY +# To regenerate: run "python3 -m tokenizer_generator.gen_state_machine tokenizer_generator/state_transition.txt tokenizer_generator/tokenizer_template.py" + +import codecs +import re +import sys + +from blib2to3.pgen2.token import * + +if sys.version < '3': + from array import array + def toarray(b): + return array('B', b) +else: + def toarray(b): + return b + +IDENTIFIER_CLASS = 1 +IDENTIFIER_CONTINUE_CLASS = 2 +ERROR_CLASS = 0 +# 3586 entries in ID index +ID_INDEX = toarray( + b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x01\x11\x12\x13\x01\x14\x15\x16\x17\x18\x19\x1a\x1b\x01\x1c' + b'\x1d\x1e\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f !"\x1f#$\x1f\x1f\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01%\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01&' + b"\x01\x01\x01\x01'\x01()*+,-\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01" + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01.\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x01/0\x01123' + b'456789\x01:;<=>?@\x1fABCDEFGHIJKL\x1fMNO\x1f' + b'\x01\x01\x01PQR\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x01\x01\x01\x01S\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x01\x01T\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x01\x01UV\x1f\x1fWX\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01Y\x01\x01Z\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x01[\\\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f]\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f^_\x1f`abc\x1f\x1fd\x1f\x1f\x1f\x1f\x1f' + b'efg\x1f\x1f\x1f\x1f\x1fhi\x1f\x1f\x1f\x1fj\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01k\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01lm\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01n\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' + b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01o\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x01\x01p\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f' + b'\x1fq' +) +ID_CHUNKS = ( + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\n\x00TUUUUU\x15\x80TUUUUU\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x84\x10\x00UUUUU\x15UUUUUUU\x15UU'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x05PUU\x05\x00\x00\x00U\x01\x00\x11\x00\x00\x00\x00'), + toarray(b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaaUQPE\x00\x90\x15QUUUUEUUUUUUUUUUUUUUUUUUUUEUU'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x85\xaaPUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'), + toarray(b'UUUUUUUUUUUUTUUUUUUUU\x15\x04\x00UUUUUUUUUU\x01\x00\xa8\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x8a(\x8a\x00\x00UUUUUU\x15@\x15\x00\x00\x00'), + toarray(b'\x00\x00\x00\x00\xaa\xaa*\x00UUUUUUUUUU\x95\xaa\xaa\xaa\xaa\xaa\xaa\xaa\nPVUUUUUUUUUUUUUUUUUUUUUUUU\xa4\xaa\x82\xaa\x96\xa2Z\xaa\xaaZA'), + toarray(b'\x00\x00\x00\x00YUUUUUUU\xaa\xaa\xaa\xaa\xaa\xaa*TUUUUUUUUUUUUUUUUUUUUU\xa5\xaa\xaa\x06\x00\x00\x00\xaa\xaaZUUUUUUU\x95\xaa\xaa\x05\x10\x08'), + toarray(b'UUUUU\xa5\x9a\xaa\xaa\xa9\xa9\n\x00\x00\x00\x00UUUUUU\xa9\x00UU\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUQU\x05\x00\x00\x00\x00\x80\xaa\xaa\xaa\x8a\xaa\xaa\xaa\xaa\xaa\xaa\xaa'), + toarray(b'\xaaUUUUUUUUUUUUU\xa5\xa6\xaa\xaa\xaa\xaa\xa9\xaaUU\xa5\xa0\xaa\xaaTUUU\xa9TUAAUUUUUQU\x11P\x05\xa6\xaa\x82\x82\x1a\x00\x80\x00E\xa5\xa0\xaa\xaa\x05\x00\x00!'), + toarray(b'\xa8T\x15@AUUUUUQUQ\x14\x05\xa2*\x80\x82\n\x08\x00T\x11\x00\xa0\xaa\xaaZ\t\x00\x00\xa8TUEEUUUUUQUQT\x05\xa6\xaa\x8a\x8a\n\x01\x00\x00\x00\xa5\xa0\xaa\xaa\x00\x00\xa4\xaa'), + toarray(b'\xa8TUAAUUUUUQUQT\x05\xa6\xaa\x82\x82\n\x00\xa0\x00E\xa5\xa0\xaa\xaa\x04\x00\x00\x00`T\x15PQ\x05\x14Q@\x01\x15PUU\x05\xa0*\xa0\xa2\n\x01\x80\x00\x00\x00\xa0\xaa\xaa\x00\x00\x00\x00'), + toarray(b'\xaaVUQQUUUUUQUUU\x05\xa4\xaa\xa2\xa2\n\x00(\x15\x00\xa5\xa0\xaa\xaa\x00\x00\x00\x00\xa9TUQQUUUUUQUUT\x05\xa6\xaa\xa2\xa2\n\x00(\x00\x10\xa5\xa0\xaa\xaa\x14\x00\x00\x00'), + toarray(b'\xaaTUQQUUUUUUUUU\x95\xa6\xaa\xa2\xa2\x1a\x00\x95\x00@\xa5\xa0\xaa\xaa\x00\x00PU\xa0TUUU\x15PUUUUUEUU\x04U\x15 \x80\xaa"\xaa\xaa\x00\xa0\xaa\xaa\xa0\x00\x00\x00'), + toarray(b'TUUUUUUUUUUUY\xaa*\x00U\x95\xaa*\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14Q\x15UUUUUUDUUY\xaa\xaa\x06U\x11\xaa\n\xaa\xaa\nU\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\x01\x00\x00\x00\x00\x00\n\x00\xaa\xaa\n\x00\x00\x88\x08\xa0UUTUUUUUUUU\x01\xa8\xaa\xaa\xaa\xaa\xa2U\xa9\xaa\xaa\xa8\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x02\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUU\x95\xaa\xaa\xaa\xaaj\xaa\xaa\n\x00U\xa5Z\xa5\xa6\x96\xaaZ\xa9VUU\xa5\xaa\xaa\x9a\xaa\xaa\xaa\nUUUUUUUUUE\x00\x04UUUUUUUUUU\x15U'), + toarray(b'UUUUUUUUUUUUUUUUUUQ\x05U\x15Q\x05UUUUUUUUUUQ\x05UUUUUUUUQ\x05U\x15Q\x05UUU\x15UUUUUUUUUU'), + toarray(b'UUUUQ\x05UUUUUUUUUUUUUUUU\x15\xa8\x00\x00\xa8\xaa\n\x00\x00\x00UUUU\x00\x00\x00\x00UUUUUUUUUUUUUUUUUUUUU\x05U\x05'), + toarray(b'TUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUAUUUUTUUUUU\x15\x00UUUUUUUUUUUUUUUUUU\x15PUU\x01\x00'), + toarray(b'UUUQ\xa5\x02\x00\x00UUUU\xa5\x02\x00\x00UUUU\xa5\x00\x00\x00UUUQ\xa1\x00\x00\x00UUUUUUUUUUUUU\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa@\x00\t\xaa\xaa\n\x00\x00\x00\x00\x00'), + toarray(b'\x00\x00\x80\n\xaa\xaa\n\x00UUUUUUUUUUUUUUUUUUUUUU\x01\x00UUUUUUUUUU\x19\x00UUUUUUUUUUUUUUUUU\x05\x00\x00'), + toarray(b'UUUUUUU\x15\xaa\xaa\xaa\x00\xaa\xaa\xaa\x00\x00\xa0\xaa\xaaUUUUUUU\x05U\x01\x00\x00UUUUUUUUUUU\x00UUUUUU\x05\x00\xaa\xaa*\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUU\x95\xaa\x00UUUUUUUUUUUUU\xa9\xaa*\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x82\xaa\xaa\n\x00\xaa\xaa\n\x00\x00@\x00\x00\xaa\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\xaaVUUUUUUUUUUU\xaa\xaa\xaa\xaaVU\x00\xaa\xaa\n\x00\x00\x00\x80\xaa\xaa\x00\x00\x00jUUUUUUU\xa9\xaa\xaaZ\xaa\xaaZUUUUUUUUUU\xa5\xaa\xaa\xaa\x00\x00\x00'), + toarray(b'UUUUUUUUU\xaa\xaa\xaa\xaa\xaa\x00\x00\xaa\xaa\nT\xaa\xaaZUUUUUUUU\x05UU\x01\x00UUUUUUUUUU\x15T\x00\x00\x00\x00*\xaa\xaa\xaa\xaa\xaaVYU\x96\x1a\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x8a\xaa'), + toarray(b'UUUUU\x05U\x05UUUUUUUUU\x05U\x05UUDDUUUUUUU\x05UUUUUUUUUUUUUQU\x11PQU\x01UPU\x00UUU\x01PQU\x01'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x04\x00\x00@\x00\x00\x00\x00UUU\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\xaa\x02\x08\xa8\xaa\xaa\x02\x00\x00\x00'), + toarray(b'\x10@PUU\x04U\x05\x00\x11QUUU\x05U\x00T\x05\x10\x00\x00\x00\x00UUUUUUUUUU\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUU\x15UUUUUUUUUUU\x15UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x01@\x95Z\x00\x00\x00'), + toarray(b'UUUUUUUUUE\x00\x04UUUUUUUUUUUUUU\x00@\x00\x00\x00\x80UUUUU\x15\x00\x00U\x15U\x15U\x15U\x15U\x15U\x15U\x15U\x15\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\x00T\x00\x00\x00\x00\x00\x00TU\xa5\xaaT\x05U\x01TUUUUUUUUUUUUUUUUUUUU\x15hUTUUUUUUUUUUUUUUUUUUUUU\x15U'), + toarray(b'\x00TUUUUUUUUUUTUUUUUUUUUUUUUUUUUUUUUU\x15\x00\x00\x00\x00UUUUUU\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUU'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUU\x05'), + toarray(b'UUU\x01UUUU\xaa\xaaZ\x00\x00\x00\x00\x00UUUUUUUUUUU\x95\x00\xaa\xaaJUUUUUUU\xa5UUUUUUUUUUUUUUUUUUUU\n\x00\x00\x00'), + toarray(b'\x00\x00\x00\x00\x00@UUPUUUUUUUUUUUUUUUUUUUUUUUUUAUUUUUUUUUUUUUP\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@UU'), + toarray(b'ee\x95UUUUU\x95\xaa\x00\x00\x00\x00\x00\x00UUUUUUUUUUUUU\x00\x00\x00ZUUUUUUUUUUUU\xaa\xaa\xaa\xaa\n\x00\x00\xaa\xaa\n\x00\xaa\xaa\xaa\xaaZU@\x94'), + toarray(b'\xaa\xaaZUUUUUU\xa5\xaa\nUUUUU\x95\xaa\xaa\xaa\x00\x00\x00UUUUUUU\x01\xaaUUUUUUUUUUU\x95\xaa\xaa\xaa\x02\x00\x00@\xaa\xaa\n\x00UYUU\xaa\xaaZ\x15'), + toarray(b'UUUUUUUUUU\xa9\xaa\xaa*\x00\x00\x95UU\n\xaa\xaa\n\x00UUUUU\x15\x90ZUUUUUUUUUUUU\xa6\x96V\xa5\x19\x00\x00\x00\x00\x00@\x05UU\x95\xaaP)\x00\x00'), + toarray(b'T\x15T\x15T\x15\x00\x00U\x15U\x15UUUUUUUUUU\x15UUU\x00\x00UUUUUUUUUUUUUUUUUUUUUUUUUUUU\x95\xaa*\n\xaa\xaa\n\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x00\x00\x00UUUUU\x15@UUUUUUUUUUUU\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUU\x05UUUUUUUUUUUUUUUUUUUUUUUUUU\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'U\x15\x00\x00@U\x00dUUQUU\x15U\x11EQUUUUUUUUUUUUUUUUUUUUUUUUUU\x05\x00\x00\x00\x00\x00\x00\x00@UUUUUUUUUUU'), + toarray(b'UUUUUUUUUUUUUUU\x05\x00\x00\x00\x00UUUUUUUUUUUUUUUUPUUUUUUUUUUUUU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUU\x00'), + toarray(b'\xaa\xaa\xaa\xaa\x00\x00\x00\x00\xaa\xaa\xaa\xaa\x80\x02\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00UQUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x01'), + toarray(b'\x00\x00\x00\x00\xaa\xaa\n\x00TUUUUU\x15\x80TUUUUU\x15\x00\x00PUUUUUUUUUUUUUUUUUUUUU\x15PUPUPUP\x01\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUTUUUUU\x15UUUU\x15EUUU\x05UUU\x05\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x15\x00'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUUUU\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUU\x01UUUUUUUUUUUU\x01\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUU\x00\x00\x00TUUUUUU\x15\x00UUUUUUUUU\xa5*\x00UUUUUUU\x05UUUUUUUUU\x00UUT\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x05\xaa\xaa\n\x00UUUUUUUUU\x00UUUUUUUUU\x00'), + toarray(b'UUUUUUUUUU\x00\x00UUUUUUUUUUUUU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUU\x15\x00\x00UUUUU\x05\x00\x00UU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'U\x05QUUUUUUUUUUE\x01AUUUUU\x05\x00\x00UUUUU\x15\x00\x00UUUUUUU\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUU\x15\x05\x00\x00'), + toarray(b'UUUUU\x05\x00\x00UUUUUU\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUUUUU\x00P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\xa9(\x00\xaaUTTUUUUUU\x05*\x80\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUU\x01UUUUUUU\x01\x00\x00\x00\x00\x00\x00\x00\x00UUTUUUUUU)\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUU\x05\x00\x00UUUUU\x05\x00\x00UUUU\x15\x00\x00\x00UUUU\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUU\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUUU\x15\x00\x00\x00UUUUUUUUUUUU\x15\x00\x00\x00'), + toarray(b'UUUUUUUUU\xaa\x00\x00\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUU\x01\x00@\x00\x00UUUUU\xa5\xaa\xaa\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUU\x15\x00\x00'), + toarray(b'jUUUUUUUUUUUUU\xaa\xaa\xaa*\x00\x00\x00\x00\x00\x00\x00\xa0\xaa\xaa\x00\x00\x00\x80jUUUUUUUUUUU\xaa\xaa*\x00\x00\x00\x00\x00UUUUUU\x01\x00\xaa\xaa\n\x00'), + toarray(b'jUUUUUUUU\x95\xaa\xaa\xaa\xa2\xaa\xaa\x00)\x00\x00UUUUUUUU\x95\x10\x00\x00jUUUUUUUUUUU\x95\xaa\xaa\xaaV\x01\xa8\x02\xaa\xaa\x1a\x01\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUEUUUUUU\xaa\xaa\xaa\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00U\x15QEUUUEUU\x01\x00UUUUUUUUUUU\x95\xaa\xaa*\x00\xaa\xaa\n\x00'), + toarray(b'\xaaTUAAUUUUUQUQT\x85\xa6\xaa\x82\x82\n\x01\x80\x00T\xa5\xa0\xaa\x02\xaa\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUU\xa9\xaa\xaa\xaaj\x15\x00\xaa\xaa\n`\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUUU\xaa\xaa\xaa\xaa\xaaE\x00\x00\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUU\x95\xaa\n\xaa\xaa\x02\x00\x00\x00\x00\x00U\n\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUU\xaa\xaa\xaa\xaa\x02\x01\x00\x00\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUU\x95\xaa\xaa\xaa\x01\x00\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUU\x15\xa8\xaa\xaa\xaa\x00\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUU\xaa\xaa\xaa*\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUUUUUUU\xaa\xaa\n\x00\x00\x00\x00@'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUPUUUUUUUUU\xa9\xaa\xa0\xaaF\x02\x00\x00\x00\x00\x00\x00'), + toarray(b'\xa9\xaajUUUUUUUUU\x95\xaa\x9a*\x00\x80\x00\x00\xa9\xaa\xaaUUUUUUUUUUU\xa5\xaa\xaa\xaa\n\x04\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUUUUU\x01\x00'), + toarray(b'UUQUUUUUUUU\x95\xaa*\xaa\xaa\x01\x00\x00\x00\xaa\xaa\n\x00\x00\x00\x00\x00PUUUUUUU\xa0\xaa\xaa\xaa\xaa\xaa\xa8\xaa\xaa*\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'U\x15EUUUUUUUUU\xa9* \x8a\xaa\x9a\x00\x00\xaa\xaa\n\x00UEQUUUUUUU\xa5*\x8a\xaa\x01\x00\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUU\x95*\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUU\x15\x00\x00\x00\x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'), + toarray(b'UUUUUUUUUUUUUUUUU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUU\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUU\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUU\x01\x00UUUUUUU\x15\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUU\x05\xaa\x02\x00\x00'), + toarray(b'UUUUUUUUUUUU\xaa*\x00\x00U\x00\x00\x00\xaa\xaa\n\x00@UUUUU\x00TUUUU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUUUUUUU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUU\x15\x80\xa9\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x00\x80jUUU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00E\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x15\x00\x00\x00'), + toarray(b'UUUUUUU\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00U\x00\x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUU\x15\x00UUU\x01UU\x01\x00UU\x05(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\n\xa8*\x00\x80\xaa*\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\xa0\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUQUUUUUUUUUUUUUUUUUQ\x10\x14TQUUETUTUUUUUUUUUUUUUU'), + toarray(b'UE\x15TUQUQUUUUUUE\x15U\x11PUQUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x05UUUUUUQUUUUU\x15UUUUUUU\x15U'), + toarray(b'UUUUUQUUUUUUUQUUUUU\x15UUUUUUU\x15UUUUUUQUUUUUUUQUUUUU\x15UU\xa0\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa'), + toarray(b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa*\x80\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x02\x00\x08\x00\x00\x00\x02\x00\x00\x00\x00\x80\xaa\xa8\xaa\xaa\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\xaa*\xaa\xaa\xaa\xaa\x82\xaa\x8a\xa2*\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUU\x01\xaajU\x05\xaa\xaa\n\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00UUUUUUUUUUU\xaa\xaa\xaa\n\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x01\x00\x00\xaa*\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUU\xaaj\x00\xaa\xaa\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UTUUUUUU\x14ATU\x15UD\x00\x10@DT\x14ADD\x14A\x15U\x15UT\x11UUEUUUU\x00TTEUUUU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUUUUUUUU\x01\x00\x00UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'), + toarray(b'UUUUUUU\x05UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x05\x00\x00\x00UUUUUUUUUUUUUUUUUUUU'), + toarray(b'UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x01\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'UUUUUUU\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), + toarray(b'\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x00\x00\x00\x00'), +) +#0 = ERROR_CLASS(0) +#1 = IDENTIFIER_CLASS(1) +#2 = CharacterClass 2 [] +#3 = CharacterClass 3 ['\t', ' '] +#4 = CharacterClass 4 ['\n', '\r'] +#5 = CharacterClass 5 ['\x0c'] +#6 = CharacterClass 6 ['!'] +#7 = CharacterClass 7 ['"'] +#8 = CharacterClass 8 ['#'] +#9 = CharacterClass 9 ['$'] +#10 = CharacterClass 10 ['%', '&', '^', '|'] +#11 = CharacterClass 11 ["'"] +#12 = CharacterClass 12 ['('] +#13 = CharacterClass 13 [')'] +#14 = CharacterClass 14 ['*'] +#15 = CharacterClass 15 ['+'] +#16 = CharacterClass 16 [','] +#17 = CharacterClass 17 ['-'] +#18 = CharacterClass 18 ['.'] +#19 = CharacterClass 19 ['/'] +#20 = CharacterClass 20 ['0'] +#21 = CharacterClass 21 ['1'] +#22 = CharacterClass 22 ['2', '3', '4', '5', '6', '7'] +#23 = CharacterClass 23 ['8', '9'] +#24 = CharacterClass 24 [':'] +#25 = CharacterClass 25 [';'] +#26 = CharacterClass 26 ['<'] +#27 = CharacterClass 27 ['='] +#28 = CharacterClass 28 ['>'] +#29 = CharacterClass 29 ['@'] +#30 = CharacterClass 30 ['A', 'C', 'D', 'c'] +#31 = CharacterClass 31 ['B', 'b'] +#32 = CharacterClass 32 ['E'] +#33 = CharacterClass 33 ['F', 'f'] +#34 = CharacterClass 34 ['J', 'j'] +#35 = CharacterClass 35 ['L'] +#36 = CharacterClass 36 ['N'] +#37 = CharacterClass 37 ['O', 'o'] +#38 = CharacterClass 38 ['R'] +#39 = CharacterClass 39 ['U', 'u'] +#40 = CharacterClass 40 ['X', 'x'] +#41 = CharacterClass 41 ['['] +#42 = CharacterClass 42 ['\\'] +#43 = CharacterClass 43 [']'] +#44 = CharacterClass 44 ['_'] +#45 = CharacterClass 45 ['`'] +#46 = CharacterClass 46 ['a', 'd'] +#47 = CharacterClass 47 ['e'] +#48 = CharacterClass 48 ['l'] +#49 = CharacterClass 49 ['r'] +#50 = CharacterClass 50 ['s'] +#51 = CharacterClass 51 ['{'] +#52 = CharacterClass 52 ['}'] +#53 = CharacterClass 53 ['~'] +CLASS_TABLE = toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x04\x00\x05\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x06\x07\x08\t\n\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x16\x16\x16\x16\x16\x17\x17\x18\x19\x1a\x1b\x1c\x00\x1d\x1e\x1f\x1e\x1e !\x01\x01\x01"\x01#\x01$%\x01\x01&\x01\x01\'\x01\x01(\x01\x01)*+\n,-.\x1f\x1e./!\x01\x01\x01"\x010\x01\x01%\x01\x0112\x01\'\x01\x01(\x01\x013\n45\x00') + +B00 = toarray(b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01') +B01 = toarray(b'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii') +B02 = toarray(b'cccabaccdccccccccccccccccccccccccccccccccccccccccccccc') +B03 = toarray(b'jUje`j*\x07[W=\x06 #9=2;6:D???/3(\')4U\x02U\x10UUUU\x02\x02U!f$U&UUU\x02U"%>') +B04 = toarray(b'\x08\x08\x08\x08\x08\x08\x08\x05\x08\x08\x08\x04\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x03\x08\x11\x08\x08\x08\x08\x03\x03\x08\x08\x08\x08\x08\x08\x08\x08\x08\x03\x08\x08\x08\x08') +B05 = toarray(b'\x08\x08\x08\x08\x08\x08\x08\x05\x08\x08\x08\x04\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08') +B06 = toarray(b'\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\t\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b') +B07 = toarray(b'\x0e\x0e\x0e\x0e\x0e\x0e\x0e\n\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e') +B08 = toarray(b'YVVYYYYYYYYYYYYYYYYYVVVVYYYYYYVVVVVVVVVVVYYYVYVVVVVYYY') +B09 = toarray(b'\r\r\r\r\r\r\r\r\r\r\r\x0c\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r') +B10 = toarray(b'\r\r\r\r\r\r\r\x0f\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r') +B11 = toarray(b'\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a') +B12 = toarray(b'\x08\x08\x08\x08\x08\x08\x08\x13\x08\x08\x08\x12\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x11\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x11\x08\x08\x08\x08') +B13 = toarray(b'\x08\x08\x08\x08\x08\x08\x08\x13\x08\x08\x08\x12\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08') +B14 = toarray(b'\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x14\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16') +B15 = toarray(b'\x18\x18\x18\x18\x18\x18\x18\x15\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18\x18') +B16 = toarray(b'\r\r\r\r\r\r\r\r\r\r\r\x17\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r') +B17 = toarray(b'\r\r\r\r\r\r\r\x19\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r') +B18 = toarray(b'\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1c\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e') +B19 = toarray(b'\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1d\x1a\x1a') +B20 = toarray(b'\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1d\x1a\x1d') +B21 = toarray(b'\x1a\x1a\x1a\x1a\x1f\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a') +B22 = toarray(b'---------------------------,--------------------------') +B23 = toarray(b'--------------------------+,,-------------------------') +B24 = toarray(b'---------------------------,+-------------------------') +B25 = toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00,\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00..\x00\x00\x00') +B26 = toarray(b'111111111111111111111111111011111111111111111111111111') +B27 = toarray(b'555555555555555555555555555,55555555555555555555555555') +B28 = toarray(b'888888888888888888887777888888888888888888888888888888') +B29 = toarray(b'IIIIIIIIIIIIIIIIIIII7777IIIIIIIIQIAIIIIIIIIIOIIPIIIIII') +B30 = toarray(b'-------------------+-------,--------------------------') +B31 = toarray(b'--------------+------------,--------------------------') +B32 = toarray(b'---------------------------,<-------------------------') +B33 = toarray(b'IIIIIIIIIIIIIIIIIINI@@@@IIIIIIIIQIAAIIIIIIIIBIIPAIIIII') +B34 = toarray(b'IIIIIIIIIIIIIIIIIINIEEEEIIIIIIIJQIAAIGIILIIIFIIPAIIIII') +B35 = toarray(b'IIIIIIIIIIIIIIIIIINIEEEEIIIIIIIIQIAAIIIIIIIIFIIPAIIIII') +B36 = toarray(b'IIIIIIIIIIIIIIIIIIIIJJIIIIIIIIIIIIIAIIIIIIIIKIIIAIIIII') +B37 = toarray(b'IIIIIIIIIIIIIIIIIIIIGGGIIIIIIIIIIIIAIIIIIIIIHIIIAIIIII') +B38 = toarray(b'IIIIIIIIIIIIIIIIIIIILLLLIIIIIILLLLIAIIIIIIIIMILLAIIIII') +B39 = toarray(b'CCCCCCCCCCCCCCCCCCCC@@@@CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC') +B40 = toarray(b'CCCCCCCCCCCCCCCCCCCCEEEECCCCCCCCCCCCCCCCCCCCCCCCCCCCCC') +B41 = toarray(b'CCCCCCCCCCCCCCCCCCCCGGGCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC') +B42 = toarray(b'CCCCCCCCCCCCCCCCCCCCJJCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC') +B43 = toarray(b'CCCCCCCCCCCCCCCCCCCCLLLLCCCCCCLLLLCCCCCCCCCCCCLLCCCCCC') +B44 = toarray(b'IIIIIIIIIIIIIIIIIIII7777IIIIIIIIQIAIIIIIIIIIIIIPIIIIII') +B45 = toarray(b'CCCCCCCCCCCCCCCCCCCC7777CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC') +B46 = toarray(b'CCCCCCCCCCCCCCCQCQCCSSSSCCCCCCCCCCCCCCCCCCCCCCCCRCCCCC') +B47 = toarray(b'CCCCCCCCCCCCCCCQCQCCSSSSCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC') +B48 = toarray(b'IIIIIIIIIIIIIIIIIIIISSSSIIIIIIIIIIAIIIIIIIIITIIIIIIIII') +B49 = toarray(b'CCCCCCCCCCCCCCCCCCCCSSSSCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC') +B50 = toarray(b'ZXXZZZZZZZZZZZZZZZZZXXXXZZZZZZXXXXXXXXXXXZZZXZXXXXXZZZ') +B51 = toarray(b']]]]\\]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]') +B52 = toarray(b'____^_________________________________________________') +B53 = toarray(b'CCCCgCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC') +B54 = toarray(b'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh') +B55 = toarray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +B56 = toarray(b'jUjekj*\x07[W=\x06 l9=2;6:D???/3(\')4U\x02U\x10UUUU\x02\x02U!fmU&UUU\x02U"n>') +B57 = toarray(b'\x1a\x1a\x1a\x1ap\x1a\x1a\x1a\x1a\x1a\x1ao\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a') +B58 = toarray(b'\x1a\x1a\x1a\x1ap\x1a\x1ao\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a') +B59 = toarray(b'\x1a\x1a\x1a\x1a\x1f\x1a\x1a\x1a\x1a\x1a\x1aq\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a') +B60 = toarray(b'ssss\x1fssssssrssssssssssssssssssssssssssssssssssssssssss') +B61 = toarray(b'ssss\x1fssssssossssssssssssssssssssssssssssssssssssssssss') +B62 = toarray(b'\x1a\x1a\x1a\x1a\x1f\x1a\x1aq\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a') +B63 = toarray(b'ssss\x1fssrssssssssssssssssssssssssssssssssssssssssssssss') +B64 = toarray(b'ssss\x1fssossssssssssssssssssssssssssssssssssssssssssssss') +B65 = toarray(b'\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B66 = toarray(b'\x1a\x1a\x1a\x1a\x1f\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B67 = toarray(b'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu\x1auu') +B68 = toarray(b'\x1a\x1a\x1a\x1ap\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B69 = toarray(b'\x1a\x1a\x1a\x1ap\x1a\x1a\x1a\x1a\x1a\x1ao\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B70 = toarray(b'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\x1avv') +B71 = toarray(b'\x1a\x1a\x1a\x1ap\x1a\x1a\x1a\x1a\x1a\x1aw\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B72 = toarray(b'\x1a\x1a\x1a\x1ap\x1a\x1ao\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B73 = toarray(b'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\x1axx') +B74 = toarray(b'\x1a\x1a\x1a\x1ap\x1a\x1aw\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B75 = toarray(b'\x1a\x1a\x1a\x1a\x1f\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B76 = toarray(b'ssss\x1fsssssssssssssssssssssssssssssssssssssssssssssssss') +B77 = toarray(b'\x1a\x1a\x1a\x1a\x1f\x1a\x1a\x1a\x1a\x1a\x1aq\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B78 = toarray(b'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\x1ayy') +B79 = toarray(b'ssss\x1fsssssswssssssssssssssssssssssssssssssssssssssssss') +B80 = toarray(b'\x1a\x1a\x1a\x1a\x1f\x1a\x1aq\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1at\x1a\x1a') +B81 = toarray(b'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\x1azz') +B82 = toarray(b'ssss\x1fsswssssssssssssssssssssssssssssssssssssssssssssss') +B83 = toarray(b'jUjekj*\x07[W=\x06 l9=2;6:D???|3(\')4U\x02U\x10UUUU\x02\x02U!fmU&UUU\x02U"{>') +B84 = toarray(b'\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a{\x1a') +B85 = toarray(b'jUje`j*\x07[W=\x06 #9=2;6:D???/3(\')4U\x02U\x10UUUU\x02\x02U!f$U&UUU\x02U"\x7f>') +B86 = toarray(b'\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1b\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a}~\x1a') +B87 = toarray(b'\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80') + +DEFAULT = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B55, ) +PAREN = (B00, B01, B02, B56, B04, B05, B06, B07, B08, B09, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B55, ) +STRING_S = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B57, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B55, ) +STRING_D = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B58, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B55, ) +STRING_SSS = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B59, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B60, B61, B55, ) +STRING_DDD = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B62, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B63, B64, B55, ) +FSTRING_SDSSSDDD = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B65, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B67, ) +FSTRING_SD = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B68, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B67, ) +FSTRING_START_S = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B69, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B70, ) +FSTRING_S = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B71, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B67, ) +FSTRING_START_D = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B72, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B73, ) +FSTRING_D = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B74, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B67, ) +FSTRING_SSSDDD = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B75, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B76, B76, B67, ) +FSTRING_START_SSS = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B77, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B60, B61, B78, ) +FSTRING_SSS = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B77, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B60, B79, B67, ) +FSTRING_START_DDD = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B80, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B63, B64, B81, ) +FSTRING_DDD = (B00, B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B80, B12, B13, B14, B15, B16, B17, B18, B19, B20, B66, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B63, B82, B67, ) +FSTRING_EXPR = (B00, B01, B02, B83, B04, B05, B06, B07, B08, B09, B10, B84, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B55, ) +FORMAT_SPECIFIER = (B00, B01, B02, B85, B04, B05, B06, B07, B08, B09, B10, B86, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B55, ) +PENDING_DEDENT = (B00, B01, B02, B87, B04, B05, B06, B07, B08, B09, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B22, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B55, B55, ) + +TRANSITION_STATE_NAMES = { + id(DEFAULT): 'default', + id(PAREN): 'paren', + id(STRING_S): 'string_s', + id(STRING_D): 'string_d', + id(STRING_SSS): 'string_sss', + id(STRING_DDD): 'string_ddd', + id(FSTRING_SDSSSDDD): 'fstring_sdsssddd', + id(FSTRING_SD): 'fstring_sd', + id(FSTRING_START_S): 'fstring_start_s', + id(FSTRING_S): 'fstring_s', + id(FSTRING_START_D): 'fstring_start_d', + id(FSTRING_D): 'fstring_d', + id(FSTRING_SSSDDD): 'fstring_sssddd', + id(FSTRING_START_SSS): 'fstring_start_sss', + id(FSTRING_SSS): 'fstring_sss', + id(FSTRING_START_DDD): 'fstring_start_ddd', + id(FSTRING_DDD): 'fstring_ddd', + id(FSTRING_EXPR): 'fstring_expr', + id(FORMAT_SPECIFIER): 'format_specifier', + id(PENDING_DEDENT): 'pending_dedent', +} +START_SUPER_STATE = DEFAULT +''' +Lookup table based tokenizer with state popping and pushing capabilities. +The ability to push and pop state is required for handling parenthesised expressions, +indentation, and f-strings. We also use it for handling the different quotation mark types, +but it is not essential for that, merely convenient. + +''' + + + +class Tokenizer(object): + + def __init__(self, text): + self.text = text + self.index = 0 + self.line_start_index = 0 + self.token_start_index = 0 + self.token_start = 1, 0 + self.line = 1 + self.super_state = START_SUPER_STATE + self.state_stack = [] + self.indents = [0] + + def action_0(self): + self.index -= 1 + self.index += 1 + return None + + def action_1(self): + self.token_start_index = self.index + self.token_start = self.line, self.index-self.line_start_index + self.index += 1 + return None + + def action_2(self): + self.index -= 1 + self.state_stack.append(self.super_state) + self.super_state = STRING_S + self.index += 1 + return None + + def action_3(self): + self.state_stack.append(self.super_state) + self.super_state = STRING_SSS + self.index += 1 + return None + + def action_4(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [STRING, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_5(self): + self.index -= 1 + self.state_stack.append(self.super_state) + self.super_state = STRING_D + self.index += 1 + return None + + def action_6(self): + self.state_stack.append(self.super_state) + self.super_state = STRING_DDD + self.index += 1 + return None + + def action_7(self): + self.index -= 1 + self.state_stack.append(self.super_state) + self.super_state = FSTRING_START_S + self.index += 1 + return None + + def action_8(self): + self.state_stack.append(self.super_state) + self.super_state = FSTRING_START_SSS + self.index += 1 + return None + + def action_9(self): + self.index -= 1 + self.state_stack.append(self.super_state) + self.super_state = FSTRING_START_D + self.index += 1 + return None + + def action_10(self): + self.state_stack.append(self.super_state) + self.super_state = FSTRING_START_DDD + self.index += 1 + return None + + def action_11(self): + self.line_start_index = self.index+1 + self.line += 1 + self.index += 1 + return None + + def action_12(self): + end = self.line, self.index-self.line_start_index+1 + result = [LPAR, u"(", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.state_stack.append(self.super_state) + self.super_state = PAREN + self.index += 1 + return result + + def action_13(self): + end = self.line, self.index-self.line_start_index+1 + result = [LSQB, u"[", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.state_stack.append(self.super_state) + self.super_state = PAREN + self.index += 1 + return result + + def action_14(self): + end = self.line, self.index-self.line_start_index+1 + result = [LBRACE, u"{", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.state_stack.append(self.super_state) + self.super_state = PAREN + self.index += 1 + return result + + def action_15(self): + end = self.line, self.index-self.line_start_index+1 + result = [RPAR, u")", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_16(self): + end = self.line, self.index-self.line_start_index+1 + result = [RSQB, u"]", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_17(self): + end = self.line, self.index-self.line_start_index+1 + result = [RBRACE, u"}", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_18(self): + end = self.line, self.index-self.line_start_index+1 + result = [BACKQUOTE, u'`', (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_19(self): + end = self.line, self.index-self.line_start_index+1 + result = [OP, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_20(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [OP, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_21(self): + end = self.line, self.index-self.line_start_index+1 + result = [CONVERSION, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_22(self): + end = self.line, self.index-self.line_start_index+1 + result = [COLONEQUAL, u":=", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_23(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [COLON, u":", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_24(self): + end = self.line, self.index-self.line_start_index+1 + result = [COMMA, u",", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_25(self): + end = self.line, self.index-self.line_start_index+1 + result = [SEMI, u";", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_26(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [AT, u"@", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_27(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [DOT, u".", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_28(self): + end = self.line, self.index-self.line_start_index+1 + result = [RARROW, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_29(self): + end = self.line, self.index-self.line_start_index+1 + result = [OP, u'~', (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_30(self): + end = self.line, self.index-self.line_start_index+1 + result = [NUMBER, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_31(self): + end = self.line, self.index-self.line_start_index+1 + result = [ERRORTOKEN, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_32(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [NUMBER, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_33(self): + self.index -= 1 + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [NUMBER, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_34(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [NAME, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_35(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [DOLLARNAME, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_36(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [COMMENT, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_37(self): + end = self.line, self.index-self.line_start_index+1 + result = [NEWLINE, u"\n", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.line_start_index = self.index+1 + self.line += 1 + self.index += 1 + return result + + def action_38(self): + return self.emit_indent() + + def action_39(self): + self.index -= 1 + self.token_start_index = self.index + self.token_start = self.line, self.index-self.line_start_index + self.index += 1 + return None + + def action_40(self): + self.token_start_index = self.index + self.token_start = self.line, self.index-self.line_start_index + end = self.line, self.index-self.line_start_index+1 + result = [ERRORTOKEN, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_41(self): + self.token_start_index = self.index + self.token_start = self.line, self.index-self.line_start_index + self.line_start_index = self.index+1 + self.line += 1 + self.index += 1 + return None + + def action_42(self): + end = self.line, self.index-self.line_start_index+1 + result = [RPAR, u")", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.super_state = self.state_stack.pop() + self.index += 1 + return result + + def action_43(self): + end = self.line, self.index-self.line_start_index+1 + result = [RSQB, u"]", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.super_state = self.state_stack.pop() + self.index += 1 + return result + + def action_44(self): + end = self.line, self.index-self.line_start_index+1 + result = [RBRACE, u"}", (self.line, self.index-self.line_start_index), end] + self.token_start = end + self.token_start_index = self.index+1 + self.super_state = self.state_stack.pop() + self.index += 1 + return result + + def action_45(self): + self.super_state = self.state_stack.pop() + end = self.line, self.index-self.line_start_index+1 + result = [STRING, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_46(self): + self.super_state = self.state_stack.pop() + end = self.line, self.index-self.line_start_index+1 + result = [ERRORTOKEN, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.line_start_index = self.index+1 + self.line += 1 + self.index += 1 + return result + + def action_47(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [FSTRING_MID, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.state_stack.append(self.super_state) + self.super_state = FSTRING_EXPR + self.index += 1 + return result + + def action_48(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [FSTRING_START, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.super_state = self.state_stack.pop() + self.state_stack.append(self.super_state) + self.super_state = FSTRING_S + self.state_stack.append(self.super_state) + self.super_state = FSTRING_EXPR + self.index += 1 + return result + + def action_49(self): + self.super_state = self.state_stack.pop() + end = self.line, self.index-self.line_start_index+1 + result = [FSTRING_END, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_50(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [FSTRING_START, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.super_state = self.state_stack.pop() + self.state_stack.append(self.super_state) + self.super_state = FSTRING_D + self.state_stack.append(self.super_state) + self.super_state = FSTRING_EXPR + self.index += 1 + return result + + def action_51(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [FSTRING_START, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.super_state = self.state_stack.pop() + self.state_stack.append(self.super_state) + self.super_state = FSTRING_SSS + self.state_stack.append(self.super_state) + self.super_state = FSTRING_EXPR + self.index += 1 + return result + + def action_52(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [FSTRING_START, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.super_state = self.state_stack.pop() + self.state_stack.append(self.super_state) + self.super_state = FSTRING_DDD + self.state_stack.append(self.super_state) + self.super_state = FSTRING_EXPR + self.index += 1 + return result + + def action_53(self): + self.super_state = self.state_stack.pop() + self.token_start_index = self.index + self.token_start = self.line, self.index-self.line_start_index + self.index += 1 + return None + + def action_54(self): + end = self.line, self.index-self.line_start_index+1 + result = [COLON, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.state_stack.append(self.super_state) + self.super_state = FORMAT_SPECIFIER + self.index += 1 + return result + + def action_55(self): + end = self.line, self.index-self.line_start_index+1 + result = [FSTRING_SPEC, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.index += 1 + return result + + def action_56(self): + self.index -= 1 + end = self.line, self.index-self.line_start_index+1 + result = [FSTRING_SPEC, self.text[self.token_start_index:self.index+1], self.token_start, end] + self.token_start = end + self.token_start_index = self.index+1 + self.super_state = self.state_stack.pop() + self.index += 1 + return result + + def action_57(self): + self.super_state = self.state_stack.pop() + return self.emit_indent() + + + def tokens(self, debug=False): + text = self.text + cls_table = CLASS_TABLE + id_index = ID_INDEX + id_chunks = ID_CHUNKS + max_id = len(id_index)*256 + action_table = [ + (1, None), (2, self.action_0), (4, self.action_1), (5, None), + (6, None), (7, None), (6, self.action_1), (7, self.action_1), + (8, self.action_0), (9, None), (10, None), (11, self.action_2), + (11, self.action_3), (3, self.action_4), (11, self.action_5), (11, self.action_6), + (12, self.action_1), (13, None), (14, None), (15, None), + (16, None), (17, None), (11, self.action_7), (11, self.action_8), + (11, self.action_9), (11, self.action_10), (11, None), (18, None), + (19, None), (20, None), (21, self.action_0), (11, self.action_11), + (3, self.action_12), (3, self.action_13), (3, self.action_14), (3, self.action_15), + (3, self.action_16), (3, self.action_17), (3, self.action_18), (22, self.action_1), + (23, self.action_1), (24, self.action_1), (25, self.action_1), (26, None), + (3, self.action_19), (3, self.action_20), (3, self.action_21), (27, None), + (3, self.action_22), (3, self.action_23), (3, self.action_24), (3, self.action_25), + (28, self.action_1), (3, self.action_26), (29, self.action_1), (30, None), + (3, self.action_27), (32, self.action_1), (31, self.action_1), (33, self.action_1), + (3, self.action_28), (26, self.action_1), (3, self.action_29), (34, self.action_1), + (34, None), (3, self.action_30), (40, None), (1, self.action_31), + (35, self.action_1), (36, None), (41, None), (38, None), + (42, None), (3, self.action_32), (37, None), (43, None), + (39, None), (44, None), (45, None), (46, None), + (47, None), (48, None), (3, self.action_33), (49, None), + (50, None), (8, self.action_1), (8, None), (51, self.action_1), + (51, None), (3, self.action_34), (3, self.action_35), (52, self.action_1), + (3, self.action_36), (52, None), (2, self.action_36), (53, None), + (2, self.action_37), (2, None), (2, self.action_11), (3, self.action_38), + (53, self.action_1), (3, None), (54, None), (55, self.action_11), + (3, self.action_39), (3, self.action_0), (3, self.action_40), (3, self.action_41), + (3, self.action_42), (3, self.action_43), (3, self.action_44), (3, self.action_45), + (1, self.action_46), (56, None), (57, None), (11, self.action_0), + (58, None), (3, self.action_47), (3, self.action_48), (3, self.action_49), + (3, self.action_50), (3, self.action_51), (3, self.action_52), (11, self.action_53), + (11, self.action_54), (3, self.action_55), (11, self.action_56), (11, self.action_1), + (3, self.action_57), + ] + state = 0 + try: + if debug: + while True: + c = ord(text[self.index]) + if c < 128: + cls = cls_table[c] + elif c >= max_id: + cls = ERROR_CLASS + else: + b = id_chunks[id_index[c>>8]][(c>>2)&63] + cls = (b>>((c&3)*2))&3 + prev_state = state + print("char = '%s', state=%d, cls=%d" % (text[self.index], state, cls)) + state, transition = action_table[self.super_state[state][cls]] + print ("%s -> %s on %r in %s" % (prev_state, state, text[self.index], TRANSITION_STATE_NAMES[id(self.super_state)])) + if transition: + tkn = transition() + if tkn: + yield tkn + else: + self.index += 1 + else: + while True: + c = ord(text[self.index]) + if c < 128: + cls = cls_table[c] + elif c >= max_id: + cls = ERROR_CLASS + else: + b = id_chunks[id_index[c>>8]][(c>>2)&63] + cls = (b>>((c&3)*2))&3 + state, transition = action_table[self.super_state[state][cls]] + if transition: + tkn = transition() + if tkn: + yield tkn + else: + self.index += 1 + except IndexError as ex: + if self.index != len(text): + #Reraise index error + cls = cls_table[c] + trans = self.super_state[state] + action_index = trans[cls] + action_table[action_index] + # Not raised? Must have been raised in transition function. + raise ex + tkn = self.emit_indent() + while tkn is not None: + yield tkn + tkn = self.emit_indent() + end = self.line, self.index-self.line_start_index + yield ENDMARKER, u"", self.token_start, end + return + + def emit_indent(self): + indent = 0 + index = self.line_start_index + current = self.index + here = self.line, current-self.line_start_index + while index < current: + if self.text[index] == ' ': + indent += 1 + elif self.text[index] == '\t': + indent = (indent+8) & -8 + elif self.text[index] == '\f': + indent = 0 + else: + #Unexpected state. Emit error token + while len(self.indents) > 1: + self.indents.pop() + result = ERRORTOKEN, self.text[self.token_start_index:self.index+1], self.token_start, here + self.token_start = here + self.line_start_index = self.index + return result + index += 1 + if indent == self.indents[-1]: + self.token_start = here + self.token_start_index = self.index + return None + elif indent > self.indents[-1]: + self.indents.append(indent) + start = self.line, 0 + result = INDENT, self.text[self.line_start_index:current], start, here + self.token_start = here + self.token_start_index = current + return result + else: + self.indents.pop() + if indent > self.indents[-1]: + #Illegal indent + result = ILLEGALINDENT, u"", here, here + else: + result = DEDENT, u"", here, here + if indent < self.indents[-1]: + #More dedents to do + self.state_stack.append(self.super_state) + self.super_state = PENDING_DEDENT + self.token_start = here + self.token_start_index = self.index + return result + + +ENCODING_RE = re.compile(br'.*coding[:=]\s*([-\w.]+).*') +NEWLINE_BYTES = b'\n' + +def encoding_from_source(source): + 'Returns encoding of source (bytes), plus source strip of any BOM markers.' + #Check for BOM + if source.startswith(codecs.BOM_UTF8): + return 'utf8', source[len(codecs.BOM_UTF8):] + if source.startswith(codecs.BOM_UTF16_BE): + return 'utf-16be', source[len(codecs.BOM_UTF16_BE):] + if source.startswith(codecs.BOM_UTF16_LE): + return 'utf-16le', source[len(codecs.BOM_UTF16_LE):] + try: + first_new_line = source.find(NEWLINE_BYTES) + first_line = source[:first_new_line] + second_new_line = source.find(NEWLINE_BYTES, first_new_line+1) + second_line = source[first_new_line+1:second_new_line] + match = ENCODING_RE.match(first_line) or ENCODING_RE.match(second_line) + if match: + ascii_encoding = match.groups()[0] + if sys.version < "3": + encoding = ascii_encoding + else: + encoding = ascii_encoding.decode("ascii") + # Handle non-standard encodings that are recognised by the interpreter. + if encoding.startswith("utf-8-"): + encoding = "utf-8" + elif encoding == "iso-latin-1": + encoding = "iso-8859-1" + elif encoding.startswith("latin-1-"): + encoding = "iso-8859-1" + elif encoding.startswith("iso-8859-1-"): + encoding = "iso-8859-1" + elif encoding.startswith("iso-latin-1-"): + encoding = "iso-8859-1" + return encoding, source + except Exception as ex: + print(ex) + #Failed to determine encoding -- Just treat as default. + pass + return 'utf-8', source + diff --git a/python/extractor/semmle/python/parser/tsg_parser.py b/python/extractor/semmle/python/parser/tsg_parser.py new file mode 100644 index 00000000000..46784c4e860 --- /dev/null +++ b/python/extractor/semmle/python/parser/tsg_parser.py @@ -0,0 +1,495 @@ +# tsg_parser.py + +# Functions and classes used for parsing Python files using `tree-sitter-graph` + +from ast import literal_eval +import sys +import os +import semmle.python.parser +from semmle.python.parser.ast import copy_location, decode_str, split_string +from semmle.python import ast +import subprocess +from itertools import groupby + +DEBUG = False +def debug_print(*args, **kwargs): + if DEBUG: + print(*args, **kwargs) + +# Node ids are integers, and so to distinguish them from actual integers we wrap them in this class. +class Node(object): + def __init__(self, id): + self.id = id + def __repr__(self): + return "Node({})".format(self.id) + +# A wrapper for nodes containing comments. The old parser does not create such nodes (and therefore +# there is no `ast.Comment` class) since it accesses the comments via the tokens for the given file. +class Comment(object): + def __init__(self, text): + self.text = text + def __repr__(self): + return "Comment({})".format(self.text) + +class SyntaxErrorNode(object): + def __init__(self, source): + self.source = source + def __repr__(self): + return "SyntaxErrorNode({})".format(self.source) + +# Mapping from tree-sitter CPT node kinds to their corresponding AST node classes. +tsg_to_ast = {name: cls + for name, cls in semmle.python.ast.__dict__.items() + if isinstance(cls, type) and ast.AstBase in cls.__mro__ +} +tsg_to_ast["Comment"] = Comment +tsg_to_ast["SyntaxErrorNode"] = SyntaxErrorNode + +# Mapping from AST node class to the fields of the node. The order of the fields is the order in +# which they will be output in the AST dump. +# +# These fields cannot be extracted automatically, so we set them manually. +ast_fields = { + ast.Module: ("body",), # Note: has no `__slots__` to inspect + Comment: ("text",), # Note: not an `ast` class + SyntaxErrorNode: ("source",), # Note: not an `ast` class + ast.Continue: (), + ast.Break: (), + ast.Pass: (), + ast.Ellipsis: (), + ast.MatchWildcardPattern: (), +} + +# Fields that we don't want to dump on every single AST node. These are just the slots of the AST +# base class, consisting of all of the location information (which we print in a different way). +ignored_fields = semmle.python.ast.AstBase.__slots__ + +# Extract fields for the remaining AST classes +for name, cls in semmle.python.ast.__dict__.items(): + if name.startswith("_"): + continue + if not hasattr(cls, "__slots__"): + continue + slots = tuple(field for field in cls.__slots__ if field not in ignored_fields) + if not slots: + continue + ast_fields[cls] = slots + +# A mapping from strings to the AST node classes that represent things like operators. +# These have to be handled specially, because they have no location information. +locationless = { + "and": ast.And, + "or": ast.Or, + "not": ast.Not, + "uadd": ast.UAdd, + "usub": ast.USub, + "+": ast.Add, + "-": ast.Sub, + "~": ast.Invert, + "**": ast.Pow, + "<<": ast.LShift, + ">>": ast.RShift, + "&": ast.BitAnd, + "|": ast.BitOr, + "^": ast.BitXor, + "load": ast.Load, + "store": ast.Store, + "del" : ast.Del, + "param" : ast.Param, +} +locationless.update(semmle.python.parser.ast.TERM_OP_CLASSES) +locationless.update(semmle.python.parser.ast.COMP_OP_CLASSES) +locationless.update(semmle.python.parser.ast.AUG_ASSIGN_OPS) + +if 'CODEQL_EXTRACTOR_PYTHON_ROOT' in os.environ: + platform = os.environ['CODEQL_PLATFORM'] + ext = ".exe" if platform == "win64" else "" + tools = os.path.join(os.environ['CODEQL_EXTRACTOR_PYTHON_ROOT'], "tools", platform) + tsg_command = [os.path.join(tools, "tsg-python" + ext )] +else: + # Get the path to the current script + script_path = os.path.dirname(os.path.realpath(__file__)) + tsg_python_path = os.path.join(script_path, "../../../tsg-python") + cargo_file = os.path.join(tsg_python_path, "Cargo.toml") + tsg_command = ["cargo", "run", "--quiet", "--release", "--manifest-path="+cargo_file] + +def read_tsg_python_output(path, logger): + # Mapping from node id (an integer) to a dictionary containing attribute data. + node_attr = {} + # Mapping a start node to a map from attribute names to lists of (value, end_node) pairs. + edge_attr = {} + + command_args = tsg_command + [path] + p = subprocess.Popen(command_args, stdout=subprocess.PIPE) + for line in p.stdout: + line = line.decode(sys.getfilesystemencoding()) + line = line.rstrip() + if line.startswith("node"): # e.g. `node 5` + current_node = int(line.split(" ")[1]) + d = {} + node_attr[current_node] = d + in_node = True + elif line.startswith("edge"): # e.g. `edge 5 -> 6` + current_start, current_end = tuple(map(int, line[4:].split("->"))) + d = edge_attr.setdefault(current_start, {}) + in_node = False + else: # attribute, e.g. `_kind: "Class"` + key, value = line[2:].split(": ", 1) + if value.startswith("[graph node"): # e.g. `_skip_to: [graph node 5]` + value = Node(int(value.split(" ")[2][:-1])) + elif value == "#true": # e.g. `_is_parenthesised: #true` + value = True + elif value == "#false": # e.g. `top: #false` + value = False + elif value == "#null": # e.g. `exc: #null` + value = None + else: # literal values, e.g. `name: "k1.k2"` or `level: 5` + try: + if key =="s" and value[0] == '"': # e.g. `s: "k1.k2"` + value = evaluate_string(value) + else: + value = literal_eval(value) + if isinstance(value, bytes): + try: + value = value.decode(sys.getfilesystemencoding()) + except UnicodeDecodeError: + # just include the bytes as-is + pass + except Exception as ex: + # We may not know the location at this point -- for instance if we forgot to set + # it -- but `get_location_info` will degrade gracefully in this case. + loc = ":".join(str(i) for i in get_location_info(d)) + error = ex.args[0] if ex.args else "unknown" + logger.warning("Error '{}' while parsing value {} at {}:{}\n".format(error, repr(value), path, loc)) + if in_node: + d[key] = value + else: + d.setdefault(key, []).append((value, current_end)) + p.stdout.close() + p.terminate() + p.wait() + logger.info("Read {} nodes and {} edges from TSG output".format(len(node_attr), len(edge_attr))) + return node_attr, edge_attr + +def evaluate_string(s): + s = literal_eval(s) + prefix, quotes, content = split_string(s, None) + ends_with_illegal_character = False + # If the string ends with the same quote character as the outer quotes (and/or backslashes) + # (e.g. the first string part of `f"""hello"{0}"""`), we must take care to not accidently create + # the ending quotes at the wrong place. To do this, we insert an extra space at the end (that we + # then must remember to remove later on.) + if content.endswith(quotes[0]) or content.endswith('\\'): + ends_with_illegal_character = True + content = content + " " + s = prefix.strip("fF") + quotes + content + quotes + s = literal_eval(s) + if isinstance(s, bytes): + s = decode_str(s) + if ends_with_illegal_character: + s = s[:-1] + return s + +def resolve_node_id(id, node_attr): + """Finds the end of a sequence of nodes linked by `_skip_to` fields, starting at `id`.""" + while "_skip_to" in node_attr[id]: + id = node_attr[id]["_skip_to"].id + return id + +def get_context(id, node_attr, logger): + """Gets the context of the node with the given `id`. This is either whatever is stored in the + `ctx` attribute of the node, or the result of dereferencing a sequence of `_inherited_ctx` attributes.""" + + while "ctx" not in node_attr[id]: + if "_inherited_ctx" not in node_attr[id]: + logger.error("No context for node {} with attributes {}\n".format(id, node_attr[id])) + # A missing context is most likely to be a "load", so return that. + return ast.Load() + id = node_attr[id]["_inherited_ctx"].id + return locationless[node_attr[id]["ctx"]]() + +def get_location_info(attrs): + """Returns the location information for a node, depending on which fields are set. + + In particular, more specific fields take precedence over (and overwrite) less specific fields. + So, `_start_line` and `_start_column` take precedence over `location_start`, which takes + precedence over `_location`. Likewise when `end` replaces `start` above. + + If part of the location information is missing, the string `"???"` is substituted for the + missing bits. + """ + start_line = "???" + start_column = "???" + end_line = "???" + end_column = "???" + if "_location" in attrs: + (start_line, start_column, end_line, end_column) = attrs["_location"] + if "_location_start" in attrs: + (start_line, start_column) = attrs["_location_start"] + if "_location_end" in attrs: + (end_line, end_column) = attrs["_location_end"] + if "_start_line" in attrs: + start_line = attrs["_start_line"] + if "_start_column" in attrs: + start_column = attrs["_start_column"] + if "_end_line" in attrs: + end_line = attrs["_end_line"] + if "_end_column" in attrs: + end_column = attrs["_end_column"] + # Lines in the `tsg-python` output is 0-indexed, but the AST expects them to be 1-indexed. + if start_line != "???": + start_line += 1 + if end_line != "???": + end_line += 1 + return (start_line, start_column, end_line, end_column) + +list_fields = { + ast.arguments: ("annotations", "defaults", "kw_defaults", "kw_annotations"), + ast.Assign: ("targets",), + ast.BoolOp: ("values",), + ast.Bytes: ("implicitly_concatenated_parts",), + ast.Call: ("positional_args", "named_args"), + ast.Case: ("body",), + ast.Class: ("body",), + ast.ClassExpr: ("type_parameters", "bases", "keywords"), + ast.Compare: ("ops", "comparators",), + ast.comprehension: ("ifs",), + ast.Delete: ("targets",), + ast.Dict: ("items",), + ast.ExceptStmt: ("body",), + ast.For: ("body",), + ast.Function: ("type_parameters", "args", "kwonlyargs", "body"), + ast.Global: ("names",), + ast.If: ("body",), + ast.Import: ("names",), + ast.List: ("elts",), + ast.Match: ("cases",), + ast.MatchClassPattern: ("positional", "keyword"), + ast.MatchMappingPattern: ("mappings",), + ast.MatchOrPattern: ("patterns",), + ast.MatchSequencePattern: ("patterns",), + ast.Module: ("body",), + ast.Nonlocal: ("names",), + ast.Print: ("values",), + ast.Set: ("elts",), + ast.Str: ("implicitly_concatenated_parts",), + ast.TypeAlias: ("type_parameters",), + ast.Try: ("body", "handlers", "orelse", "finalbody"), + ast.Tuple: ("elts",), + ast.While: ("body",), +# ast.FormattedStringLiteral: ("arguments",), +} + +def create_placeholder_args(cls): + """ Returns a dictionary containing the placeholder arguments necessary to create an AST node. + + In most cases these arguments will be assigned the value `None`, however for a few classes we + must substitute the empty list, as this is enforced by asserts in the constructor. + """ + if cls in (ast.Raise, ast.Ellipsis): + return {} + fields = ast_fields[cls] + args = {field: None for field in fields if field != "is_async"} + for field in list_fields.get(cls, ()): + args[field] = [] + if cls in (ast.GeneratorExp, ast.ListComp, ast.SetComp, ast.DictComp): + del args["function"] + del args["iterable"] + return args + +def parse(path, logger): + node_attr, edge_attr = read_tsg_python_output(path, logger) + debug_print("node_attr:", node_attr) + debug_print("edge_attr:", edge_attr) + nodes = {} + # Nodes that need to be fixed up after building the graph + fixups = {} + # Reverse index from node object to node id. + node_id = {} + # Create all the node objects + for id, attrs in node_attr.items(): + if "_is_literal" in attrs: + nodes[id] = attrs["_is_literal"] + continue + if "_kind" not in attrs: + logger.error("Error: Graph node {} with attributes {} has no `_kind`!\n".format(id, attrs)) + continue + # This is not the node we are looking for (so don't bother creating it). + if "_skip_to" in attrs: + continue + cls = tsg_to_ast[attrs["_kind"]] + args = ast_fields[cls] + obj = cls(**create_placeholder_args(cls)) + nodes[id] = obj + node_id[obj] = id + # If this node needs fixing up afterwards, add it to the fixups map. + if "_fixup" in attrs: + fixups[id] = obj + # Set all of the node attributes + for id, node in nodes.items(): + attrs = node_attr[id] + if "_is_literal" in attrs: + continue + expected_fields = ast_fields[type(node)] + + # Set up location information. + node.lineno, node.col_offset, end_line, end_column = get_location_info(attrs) + node._end = (end_line, end_column) + + if isinstance(node, SyntaxErrorNode): + exc = SyntaxError("Syntax Error") + exc.lineno = node.lineno + exc.offset = node.col_offset + raise exc + + # Set up context information, if any + if "ctx" in expected_fields: + node.ctx = get_context(id, node_attr, logger) + # Set the fields. + for field, val in attrs.items(): + if field.startswith("_"): continue + if field == "ctx": continue + if field != "parenthesised" and field not in expected_fields: + logger.warning("Unknown field {} found among {} in node {}\n".format(field, attrs, id)) + + # For fields that point to other AST nodes. + if isinstance(val, Node): + val = resolve_node_id(val.id, node_attr) + setattr(node, field, nodes[val]) + # Special case for `Num.n`, which should be coerced to an int. + elif isinstance(node, ast.Num) and field == "n": + node.n = literal_eval(val.rstrip("lL")) + # Special case for `Name.variable`, for which we must create a new `Variable` object + elif isinstance(node, ast.Name) and field == "variable": + node.variable = ast.Variable(val) + # Special case for location-less leaf-node subclasses of `ast.Node`, such as `ast.Add`. + elif field == "op" and val in locationless.keys(): + setattr(node, field, locationless[val]()) + else: # Any other value, usually literals of various kinds. + setattr(node, field, val) + + # Create all fields pointing to lists of values. + for start, field_map in edge_attr.items(): + start = resolve_node_id(start, node_attr) + parent = nodes[start] + extra_fields = {} + for field_name, value_end in field_map.items(): + # Sort children by index (in case they were visited out of order) + children = [nodes[resolve_node_id(end, node_attr)] for _index, end in sorted(value_end)] + # Skip any comments. + children = [child for child in children if not isinstance(child, Comment)] + # Special case for `Compare.ops`, a list of comparison operators + if isinstance(parent, ast.Compare) and field_name == "ops": + parent.ops = [locationless[v]() for v in children] + elif field_name.startswith("_"): + # We can only set the attributes given in `__slots__` on the `start` node, and so we + # must handle fields starting with `_` specially. In this case, we simply record the + # values and then subsequently update `edge_attr` to refer to these values. This + # makes it act as a pseudo-field, that we can access as long as we know the `id` + # corresponding to a given node (for which we have the `node_id` map). + extra_fields[field_name] = children + else: + setattr(parent, field_name, children) + if extra_fields: + # Extend the existing map in `node_attr` with the extra fields. + node_attr[start].update(extra_fields) + + # Fixup any nodes that need it. + for id, node in fixups.items(): + if isinstance(node, (ast.JoinedStr, ast.Str)): + fix_strings(id, node, node_attr, node_id, logger) + + debug_print("nodes:", nodes) + if not nodes: + # if the file referenced by path is empty, return an empty module: + if os.path.getsize(path) == 0: + module = ast.Module([]) + module.lineno = 1 + module.col_offset = 0 + module._end = (1, 0) + return module + else: + raise SyntaxError("Syntax Error") + # Fix up start location of outer `Module`. + module = nodes[0] + if module.body: + # Get the location of the first non-comment node. + module.lineno = module.body[0].lineno + else: + # No children! File must contain only comments! Pick the end location as the start location. + module.lineno = module._end[0] + return module + + +def get_JoinedStr_children(children): + """ + Folds the `Str` and `expr` parts of a `JoinedStr` into a single list, and does this for each + `JoinedStr` in `children`. Top-level `StringPart`s are included in the output directly. + """ + for child in children: + if isinstance(child, ast.JoinedStr): + for value in child.values: + yield value + elif isinstance(child, ast.StringPart): + yield child + else: + raise ValueError("Unexpected node type: {}".format(type(child))) + +def concatenate_stringparts(stringparts, logger): + """Concatenates the strings contained in the list of `stringparts`.""" + try: + return "".join(decode_str(stringpart.s) for stringpart in stringparts) + except Exception as ex: + logger.error("Unable to concatenate string %s getting error %s", stringparts, ex) + return stringparts[0].s + + +def fix_strings(id, node, node_attr, node_id, logger): + """ + Reassociates the `StringPart` children of an implicitly concatenated f-string (`JoinedStr`) + """ + # Tests whether something is a string child + is_string = lambda node: isinstance(node, ast.StringPart) + + # We have two cases to consider. Either we're given something that came from a + # `concatenated_string`, or something that came from an `formatted_string`. The latter case can + # be seen as a special case of the former where the list of children we consider is just the + # single f-string. + children = node_attr[id].get("_children", [node]) + if isinstance(node, ast.Str): + # If the outer node is a `Str`, then we don't have to reassociate, since there are no + # f-strings. + # In this case we simply have to create the concatenation of its constituent parts. + node.implicitly_concatenated_parts = children + node.s = concatenate_stringparts(children, logger) + node.prefix = children[0].prefix + else: + # Otherwise, we first have to get the flattened list of all of the strings and/or + # expressions. + flattened_children = get_JoinedStr_children(children) + groups = [list(n) for _, n in groupby(flattened_children, key=is_string)] + # At this point, `values` is a list of lists, where each sublist is either: + # - a list of `StringPart`s, or + # - a singleton list containing an `expr`. + # Crucially, `StringPart` is _not_ an `expr`. + combined_values = [] + for group in groups: + first = group[0] + if isinstance(first, ast.expr): + # If we have a list of expressions (which may happen if an interpolation contains + # multiple distinct expressions, such as f"{foo:{bar}}", which uses interpolation to + # also specify the padding dynamically), we simply append it. + combined_values.extend(group) + else: + # Otherwise, we have a list of `StringPart`s, and we need to create a `Str` node to + # it. + + combined_string = concatenate_stringparts(group, logger) + str_node = ast.Str(combined_string, first.prefix, None) + copy_location(first, str_node) + # The end location should be the end of the last part (even if there is only one part). + str_node._end = group[-1]._end + if len(group) > 1: + str_node.implicitly_concatenated_parts = group + combined_values.append(str_node) + node.values = combined_values diff --git a/python/extractor/semmle/python/passes/__init__.py b/python/extractor/semmle/python/passes/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/semmle/python/passes/_pass.py b/python/extractor/semmle/python/passes/_pass.py new file mode 100644 index 00000000000..94c3b77a63d --- /dev/null +++ b/python/extractor/semmle/python/passes/_pass.py @@ -0,0 +1,11 @@ + +from abc import abstractmethod + +class Pass(object): + '''The base class for all extractor passes. + Defines a single method 'extract' for all extractors to override''' + + @abstractmethod + def extract(self, module, writer): + '''Extract trap file data from 'module', writing it to the writer.''' + pass diff --git a/python/extractor/semmle/python/passes/ast_pass.py b/python/extractor/semmle/python/passes/ast_pass.py new file mode 100644 index 00000000000..363e1007c64 --- /dev/null +++ b/python/extractor/semmle/python/passes/ast_pass.py @@ -0,0 +1,232 @@ + +from semmle.python import ast +import semmle.python.master +import sys +from semmle.python.passes._pass import Pass +from semmle.util import get_analysis_major_version + +__all__ = [ 'ASTPass' ] + +class ASTPass(Pass): + '''Extract relations from AST. + Use AST.Node objects to guide _walking of AST''' + + name = "ast" + + def __init__(self): + self.offsets = get_offset_table() + + #Entry point + def extract(self, root, writer): + try: + self.writer = writer + if root is None: + return + self._emit_variable(ast.Variable("__name__", root)) + self._emit_variable(ast.Variable("__package__", root)) + # Introduce special variable "$" for use by the points-to library. + self._emit_variable(ast.Variable("$", root)) + writer.write_tuple(u'py_extracted_version', 'gs', root.trap_name, get_analysis_major_version()) + self._walk(root, None, 0, root, None) + finally: + self.writer = None + + #Tree _walkers + + def _get_walker(self, node): + if isinstance(node, list): + return self._walk_list + elif isinstance(node, ast.AstBase): + return self._walk_node + else: + return self._emit_primitive + + def _walk(self, node, parent, index, scope, description): + self._get_walker(node)(node, parent, index, scope, description) + + def _walk_node(self, node, parent, index, scope, _unused): + self._emit_node(node, parent, index, scope) + if type(node) is ast.Name: + assert (hasattr(node, 'variable') and + type(node.variable) is ast.Variable), (node, parent, index, scope) + if type(node) in (ast.Class, ast.Function): + scope = node + # For scopes with a `from ... import *` statement introduce special variable "*" for use by the points-to library. + if isinstance(node, ast.ImportFrom): + self._emit_variable(ast.Variable("*", scope)) + for field_name, desc, child_node in iter_fields(node): + try: + index = self.offsets[(type(node).__name__, field_name)] + self._walk(child_node, node, index, scope, desc) + except ConsistencyError: + ex = sys.exc_info()[1] + ex.message += ' in ' + type(node).__name__ + if hasattr(node, 'rewritten') and node.rewritten: + ex.message += '(rewritten)' + ex.message += '.' + field_name + raise + + def _walk_list(self, node, parent, index, scope, description): + assert description.is_list(), description + if len(node) == 0: + return + else: + self._emit_list(node, parent, index, description) + for i, child in enumerate(node): + self._get_walker(child)(child, node, i, scope, description.item_type) + + #Emitters + def _emit_node(self, ast_node, parent, index, scope): + t = type(ast_node) + node = _ast_nodes[t.__name__] + #Ensure all stmts have a list as a parent. + if isinstance(ast_node, ast.stmt): + assert isinstance(parent, list), (ast_node, parent) + if node.is_sub_type(): + rel_name = node.super_type.relation_name() + shared_parent = not node.super_type.unique_parent + else: + rel_name = node.relation_name() + shared_parent = node.parents is None or not node.unique_parent + if rel_name[-1] != 's': + rel_name += 's' + if t.__mro__[1] in (ast.cmpop, ast.operator, ast.expr_context, ast.unaryop, ast.boolop): + #These nodes may be used more than once, but must have a + #unique id for each occurrence in the AST + fields = [ self.writer.get_unique_id() ] + fmt = 'r' + else: + fields = [ ast_node ] + fmt = 'n' + if node.is_sub_type(): + fields.append(node.index) + fmt += 'd' + if parent: + fields.append(parent) + fmt += 'n' + if shared_parent: + fields.append(index) + fmt += 'd' + self.writer.write_tuple(rel_name, fmt, *fields) + if t.__mro__[1] in (ast.expr, ast.stmt): + self.writer.write_tuple(u'py_scopes', 'nn', ast_node, scope) + + def _emit_variable(self, ast_node): + self.writer.write_tuple(u'variable', 'nns', ast_node, ast_node.scope, ast_node.id) + + def _emit_name(self, ast_node, parent): + self._emit_variable(ast_node) + self.writer.write_tuple(u'py_variables', 'nn', ast_node, parent) + + def _emit_primitive(self, val, parent, index, scope, description): + if val is None or val is False: + return + if isinstance(val, ast.Variable): + self._emit_name(val, parent) + return + assert not isinstance(val, ast.AstBase) + rel = description.relation_name() + if val is True: + if description.unique_parent: + self.writer.write_tuple(rel, 'n', parent) + else: + self.writer.write_tuple(rel, 'nd', parent, index) + else: + f = format_for_primitive(val, description) + if description.unique_parent: + self.writer.write_tuple(rel, f + 'n', val, parent) + else: + self.writer.write_tuple(rel, f + 'nd', val, parent, index) + + def _emit_list(self, node, parent, index, description): + rel_name = description.relation_name() + if description.unique_parent: + self.writer.write_tuple(rel_name, 'nn', node, parent) + else: + self.writer.write_tuple(rel_name, 'nnd', node, parent, index) + +_ast_nodes = semmle.python.master.all_nodes() +if get_analysis_major_version() < 3: + _ast_nodes['TryExcept'] = _ast_nodes['Try'] + _ast_nodes['TryFinally'] = _ast_nodes['Try'] + +class ConsistencyError(Exception): + + def __str__(self): + return self.message + +def iter_fields(node): + desc = _ast_nodes[type(node).__name__] + for name, description, _, _, _ in desc.fields: + if hasattr(node, name): + yield name, description, getattr(node, name) + + +NUMBER_TYPES = (int, float) + +def check_matches(node, node_type, owner, field): + if node_type is list: + if node.is_list(): + return + else: + for t in node_type.__mro__: + if t.__name__ == node.__name__: + return + if node_type in NUMBER_TYPES and node.__name__ == 'number': + return + raise ConsistencyError("Found %s expected %s for field %s of %s" % + (node_type.__name__, node.__name__, field, owner.__name__)) + +def get_offset_table(): + '''Returns mapping of (class_name, field_name) + pairs to offsets (in relation)''' + table = {} + nodes = _ast_nodes.values() + for node in nodes: + for field, _, offset, _, _, _ in node.layout: + table[(node.__name__, field)] = offset + try_node = _ast_nodes['Try'] + for field, _, offset, _, _, _ in try_node.layout: + table[('TryFinally', field)] = offset + table[('TryExcept', field)] = offset + return table + + +def format_for_primitive(val, description): + if isinstance(val, str): + return 'u' + elif isinstance(val, bytes): + return 'b' + elif description.__name__ == 'int': + return 'd' + else: + return 'q' + +class ASTVisitor(object): + """ + A node visitor base class that walks the abstract syntax tree and calls a + visitor function for every node found. This function may return a value + which is forwarded by the `visit` method. + + This class is meant to be subclassed, with the subclass adding visitor + methods. + + The visitor functions for the nodes are ``'visit_'`` + class name of the node. + """ + + def _get_visit_method(self, node): + method = 'visit_' + node.__class__.__name__ + return getattr(self, method, self.generic_visit) + + def visit(self, node): + """Visit a node.""" + self._get_visit_method(node)(node) + + def generic_visit(self, node): + """Called if no explicit visitor function exists for a node.""" + if isinstance(node, ast.AstBase): + for _, _, child in iter_fields(node): + self.visit(child) + elif isinstance(node, list): + for item in node: + self._get_visit_method(item)(item) diff --git a/python/extractor/semmle/python/passes/exports.py b/python/extractor/semmle/python/passes/exports.py new file mode 100644 index 00000000000..5fd69c8e093 --- /dev/null +++ b/python/extractor/semmle/python/passes/exports.py @@ -0,0 +1,113 @@ + +from semmle.python import ast +from semmle.python.passes._pass import Pass + +def write_exports(module, exports, writer): + for sym in exports: + writer.write_tuple(u'py_exports', 'ns', module, sym) + +def list_of_symbols_from_expr(expr): + #This should be a list of constant strings + if isinstance(expr, (ast.List, ast.Tuple)): + exports = [] + for item in expr.elts: + if isinstance(item, ast.Str): + exports.append(item.s) + return exports + return [] + +def is___all__(node): + try: + return isinstance(node, ast.Name) and node.variable.id == '__all__' + except Exception: + return False + +def __all___from_stmt(stmt): + '''Returns None if __all__ is not defined. + If __all__ may be defined then return a conservative approximation''' + assert isinstance(stmt, ast.stmt) + if isinstance(stmt, ast.If): + body_exports = __all___from_stmt_list(stmt.body) + if stmt.orelse: + orelse_exports = __all___from_stmt_list(stmt.orelse) + else: + orelse_exports = None + # If __all__ = ... on one branch but not other then return [] + # If defined on neither branch return None + if body_exports is None: + if orelse_exports is None: + return None + else: + return [] + else: + if orelse_exports is None: + return [] + else: + return set(body_exports).intersection(set(orelse_exports)) + elif isinstance(stmt, ast.Assign): + for target in stmt.targets: + if is___all__(target): + return list_of_symbols_from_expr(stmt.value) + return None + +def __all___from_stmt_list(stmts): + assert isinstance(stmts, list) + exports = None + for stmt in stmts: + ex = __all___from_stmt(stmt) + if ex is not None: + exports = ex + return exports + +def is_private_symbol(sym): + if sym[0] != '_': + return False + if len(sym) >= 4 and sym[:2] == '__' and sym[-2:] == '__': + return False + return True + +def globals_from_tree(node, names): + 'Add all globals defined in the tree to names' + if isinstance(node, list): + for subnode in node: + globals_from_tree(subnode, names) + elif isinstance(node, ast.Assign): + for target in node.targets: + if isinstance(target, ast.Name): + names.add(target.variable.id) + elif isinstance(node, ast.If): + if node.orelse: + left = set() + right = set() + globals_from_tree(node.body, left) + globals_from_tree(node.orelse, right) + names.update(left.intersection(right)) + # Don't decent into other nodes. + +def exports_from_ast(node): + 'Get a list of symbols exported by the module from its ast.' + #Look for assignments to __all__ + #If not available at top-level, then check if-statements, + #but ignore try-except and loops + assert type(node) is ast.Module + exports = __all___from_stmt_list(node.body) + if exports is not None: + return exports + # No explicit __all__ assignment so gather global assignments + exports = set() + globals_from_tree(node.body, exports) + return [ ex for ex in exports if not is_private_symbol(ex) ] + +class ExportsPass(Pass): + '''Finds all 'exports' of a module. An export is a symbol that is defined + in the __all__ list or, if __all__ is undefined, is defined at top-level + and is not private''' + + name = "exports" + + def __init__(self): + pass + + def extract(self, ast, writer): + exported = exports_from_ast(ast) + write_exports(ast, exported, writer) diff --git a/python/extractor/semmle/python/passes/flow.py b/python/extractor/semmle/python/passes/flow.py new file mode 100755 index 00000000000..a9148aefd0f --- /dev/null +++ b/python/extractor/semmle/python/passes/flow.py @@ -0,0 +1,1927 @@ +import sys +import os.path +import traceback +from typing import Optional + +from semmle.python import ast +from semmle import util +from semmle.python.passes.ast_pass import iter_fields +from semmle.python.passes._pass import Pass +from semmle.python.passes import pruner +from semmle.python.passes import splitter +from semmle.python.passes import unroller +from semmle.python import modules +import semmle.graph as graph +from semmle.logging import Logger + +__all__ = [ 'FlowPass' ] + +class ConsistencyError(util.SemmleError): + pass + +def error(node, _): + raise ConsistencyError("Unexpected node type " + type(node).__name__) + + +class FlowNode(object): + __slots__ = [ 'node' ] + + def __init__(self, node): + self.node = node + + def __repr__(self): + if hasattr(self.node, "lineno"): + return 'FlowNode(%s at %d)' % (type(self.node), self.node.lineno) + else: + return 'FlowNode(%r)' % self.node + + def copy(self): + return FlowNode(self.node) + +#Kinds of node sets. +NORMAL = util.NORMAL_EDGE +TRUE = util.TRUE_EDGE +FALSE = util.FALSE_EDGE +EXCEPTION = util.EXCEPTIONAL_EDGE +EXHAUSTED = util.EXHAUSTED_EDGE + +TRUE_OR_FALSE = TRUE | FALSE + +#Set of names of modules that are guaranteed to be in the interpreter regardless of platform +GUARANTEED_MODULES = { + "_ast", + "_bisect", + "_codecs", + "_collections", + "_functools", + "_heapq", + "_io", + "_locale", + "_md5", + "_operator", + "_random", + "_sha256", + "_sha512", + "_socket", + "_sre", + "_struct", + "_symtable", + "_warnings", + "_weakref", + "array", + "binascii", + "cmath", + "errno", + "gc", + "itertools", + "marshal", + "math", + "sys", + "syslog", + "time", + "unicodedata", + "zipimport", + "zlib", +} + + +_py3_names = { + "ArithmeticError", + "AssertionError", + "AttributeError", + "BaseException", + "BlockingIOError", + "BrokenPipeError", + "BufferError", + "BytesWarning", + "ChildProcessError", + "ConnectionAbortedError", + "ConnectionError", + "ConnectionRefusedError", + "ConnectionResetError", + "DeprecationWarning", + "EOFError", + "Ellipsis", + "EnvironmentError", + "Exception", + "False", + "FileExistsError", + "FileNotFoundError", + "FloatingPointError", + "FutureWarning", + "GeneratorExit", + "IOError", + "ImportError", + "ImportWarning", + "IndentationError", + "IndexError", + "InterruptedError", + "IsADirectoryError", + "KeyError", + "KeyboardInterrupt", + "LookupError", + "MemoryError", + "NameError", + "None", + "NotADirectoryError", + "NotImplemented", + "NotImplementedError", + "OSError", + "OverflowError", + "PendingDeprecationWarning", + "PermissionError", + "ProcessLookupError", + "ReferenceError", + "ResourceWarning", + "RuntimeError", + "RuntimeWarning", + "StopIteration", + "SyntaxError", + "SyntaxWarning", + "SystemError", + "SystemExit", + "TabError", + "TimeoutError", + "True", + "TypeError", + "UnboundLocalError", + "UnicodeDecodeError", + "UnicodeEncodeError", + "UnicodeError", + "UnicodeTranslateError", + "UnicodeWarning", + "UserWarning", + "ValueError", + "Warning", + "ZeroDivisionError", + "__build_class__", + "__debug__", + "__doc__", + "__import__", + "__loader__", + "__name__", + "__package__", + "__spec__", + "abs", + "all", + "any", + "ascii", + "bin", + "bool", + "bytearray", + "bytes", + # "callable", only 3.2+ + "chr", + "classmethod", + "compile", + "complex", + "copyright", + "credits", + "delattr", + "dict", + "dir", + "divmod", + "enumerate", + "eval", + "exec", + "exit", + "filter", + "float", + "format", + "frozenset", + "getattr", + "globals", + "hasattr", + "hash", + "help", + "hex", + "id", + "input", + "int", + "isinstance", + "issubclass", + "iter", + "len", + "license", + "list", + "locals", + "map", + "max", + "memoryview", + "min", + "next", + "object", + "oct", + "open", + "ord", + "pow", + "print", + "property", + "quit", + "range", + "repr", + "reversed", + "round", + "set", + "setattr", + "slice", + "sorted", + "staticmethod", + "str", + "sum", + "super", + "tuple", + "type", + "vars", + "zip", +} + +_py2_names = { + "ArithmeticError", + "AssertionError", + "AttributeError", + "BaseException", + "BufferError", + "BytesWarning", + "DeprecationWarning", + "EOFError", + "Ellipsis", + "EnvironmentError", + "Exception", + "False", + "FloatingPointError", + "FutureWarning", + "GeneratorExit", + "IOError", + "ImportError", + "ImportWarning", + "IndentationError", + "IndexError", + "KeyError", + "KeyboardInterrupt", + "LookupError", + "MemoryError", + "NameError", + "None", + "NotImplemented", + "NotImplementedError", + "OSError", + "OverflowError", + "PendingDeprecationWarning", + "ReferenceError", + "RuntimeError", + "RuntimeWarning", + "StandardError", + "StopIteration", + "SyntaxError", + "SyntaxWarning", + "SystemError", + "SystemExit", + "TabError", + "True", + "TypeError", + "UnboundLocalError", + "UnicodeDecodeError", + "UnicodeEncodeError", + "UnicodeError", + "UnicodeTranslateError", + "UnicodeWarning", + "UserWarning", + "ValueError", + "Warning", + "ZeroDivisionError", + "__debug__", + "__doc__", + "__import__", + "__name__", + "__package__", + "abs", + "all", + "any", + "apply", + "basestring", + "bin", + "bool", + "buffer", + "bytearray", + "bytes", + "callable", + "chr", + "classmethod", + "cmp", + "coerce", + "compile", + "complex", + "copyright", + "credits", + "delattr", + "dict", + "dir", + "divmod", + "enumerate", + "eval", + "execfile", + "exit", + "file", + "filter", + "float", + "format", + "frozenset", + "getattr", + "globals", + "hasattr", + "hash", + "help", + "hex", + "id", + "input", + "int", + "intern", + "isinstance", + "issubclass", + "iter", + "len", + "license", + "list", + "locals", + "long", + "map", + "max", + "memoryview", + "min", + "next", + "object", + "oct", + "open", + "ord", + "pow", + "print", + "property", + "quit", + "range", + "raw_input", + "reduce", + "reload", + "repr", + "reversed", + "round", + "set", + "setattr", + "slice", + "sorted", + "staticmethod", + "str", + "sum", + "super", + "tuple", + "type", + "unichr", + "unicode", + "vars", + "xrange", + "zip", +} + +#Set of names that always exist (for both Python 2 and 3) +BUILTIN_NAME_ALWAYS_EXISTS = _py2_names.intersection(_py3_names) + +# A NodeSet is a conceptually a set of (FlowNode, kind) pairs. +#This class exists to document the interface. +class ExampleNodeSet(object): + '''This class exists for documentation purposes only.''' + + def branch(self): + '''Branch into (true, false) pair of nodesets.''' + + def __add__(self, other): + '''Add this node set to another, returning the union''' + + def normalise(self): + '''Return normalise form of this node set, turning all kinds into NORMAL''' + + def exception(self): + '''Return exception form of this node set, turning all kinds into EXCEPTION''' + + def merge_true_false_pairs(self): + '''Return copy of this node set with all pairs of TRUE and FALSE kinds for the same node turned into NORMAL''' + + def add_node(self, node, kind): + '''Return a new node set with (node, kind) pair added.''' + + def invert(self): + '''Return copy of this node set with all TRUE kinds set to FALSE and vice versa.''' + +class EmptyNodeSet(object): + + def branch(self): + return self, self + + def __add__(self, other): + return other + + def normalise(self): + return self + + def exception(self): + return self + + def merge_true_false_pairs(self): + return self + + def add_node(self, node, kind): + return SingletonNodeSet(node, kind) + + def __iter__(self): + return iter(()) + + def __len__(self): + return 0 + + def __str__(self): + return "{}" + + def invert(self): + return self + +EMPTY = EmptyNodeSet() + +class SingletonNodeSet(object): + + __slots__ = [ 'node', 'kind'] + + def __init__(self, node, kind): + self.node = node + self.kind = kind + + def branch(self): + if self.kind == TRUE: + return self, EMPTY + elif self.kind == FALSE: + return EMPTY, self + elif self.kind == NORMAL: + return SingletonNodeSet(self.node, TRUE), SingletonNodeSet(self.node, FALSE) + else: + return self, self + + def __add__(self, other): + if other is EMPTY: + return self + else: + return other.add_node(self.node, self.kind) + + def normalise(self): + return SingletonNodeSet(self.node, NORMAL) + + def exception(self): + return SingletonNodeSet(self.node, EXCEPTION) + + def merge_true_false_pairs(self): + return self + + def add_node(self, node, kind): + if node == self.node and kind == self.kind: + return self + other = MultiNodeSet() + other.append((self.node, self.kind)) + other.append((node, kind)) + return other + + def __iter__(self): + yield self.node, self.kind + + def __len__(self): + return 1 + + def invert(self): + if self.kind & TRUE_OR_FALSE: + return SingletonNodeSet(self.node, self.kind ^ TRUE_OR_FALSE) + else: + return self + + def unique_node(self): + return self.node + + def __str__(self): + return "{(%s, %d)}" % (self.node, self.kind) + +class MultiNodeSet(list): + + __slots__ = [] + + def branch(self): + '''Branch into (true, false) pair of nodesets.''' + l = EMPTY + for node, kind in self: + if kind != FALSE: + l = l.add_node(node, kind) + r = EMPTY + for node, kind in self: + if kind != TRUE: + r = r.add_node(node, kind) + return l, r + + def __add__(self, other): + if other is EMPTY: + return self + res = MultiNodeSet(self) + if isinstance(other, SingletonNodeSet): + res.insert_node(other.node, other.kind) + return res + for node, kind in other: + res.insert_node(node, kind) + return res + + def convert(self, the_kind): + the_node = self[0][0] + for node, kind in self: + if node != the_node: + break + else: + return SingletonNodeSet(node, the_kind) + res = MultiNodeSet() + for node, kind in self: + res.insert_node(node, the_kind) + return res + + def normalise(self): + return self.convert(NORMAL) + + def exception(self): + return self.convert(EXCEPTION) + + def merge_true_false_pairs(self): + #Common case len() == 2 + if len(self) == 2: + if (self[0][1] | self[0][1]) == TRUE_OR_FALSE and self[0][0] == self[1][0]: + return SingletonNodeSet(self[0][0], NORMAL) + else: + return self + #Either no true, or no false edges. + all_kinds = 0 + for node, kind in self: + all_kinds |= kind + if (all_kinds & TRUE_OR_FALSE) != TRUE_OR_FALSE: + return self + + #General, slow and hopefully rare case. + nodes = {} + for node, kind in self: + if node in nodes: + nodes[node] |= kind + else: + nodes[node] = kind + res = MultiNodeSet() + for node, kind in nodes.items(): + if (kind & TRUE_OR_FALSE)== TRUE_OR_FALSE: + kind = (kind | NORMAL) & (NORMAL | EXCEPTION) + for K in (NORMAL, TRUE, FALSE, EXCEPTION): + if kind & K: + res.insert_node(node, K) + return res + + def add_node(self, *t): + res = MultiNodeSet(self) + res.insert_node(*t) + return res + + def insert_node(self, *t): + if t not in self: + self.append(t) + + def __str__(self): + return "{" + ",".join(self) + "}" + + def invert(self): + res = MultiNodeSet() + for node, kind in self: + if kind & TRUE_OR_FALSE: + res.insert_node(node, kind ^ TRUE_OR_FALSE) + else: + res.insert_node(node, kind) + return res + +class BlockStack(list): + '''A stack of blocks (loops or tries).''' + + + def push_block(self): + self.append(EMPTY) + + def pop_block(self): + return self.pop() + + def add(self, node_set): + self[-1] = self[-1] + node_set + +class FlowScope(object): + + def __init__(self, depth, ast_scope): + self.entry = FlowNode(ast_scope) + self.graph = graph.FlowGraph(self.entry) + self.exceptional_exit = FlowNode(ast_scope) + self.graph.add_node(self.exceptional_exit) + self.graph.annotate_node(self.exceptional_exit, EXCEPTION_EXIT) + self.depth = depth + self.exception_stack = BlockStack() + self.exception_stack.push_block() + self.breaking_stack = BlockStack() + self.continuing_stack = BlockStack() + self.return_stack = BlockStack() + self.return_stack.push_block() + self.ast_scope = ast_scope + + def inner(self, ast_scope): + return FlowScope(self.depth+1, ast_scope) + + def pop_exceptions(self): + return self.exception_stack.pop_block() + + def split(self): + splitter.do_split(self.ast_scope, self.graph) + + def prune(self): + #Remove the always false condition edges. + pruner.do_pruning(self.ast_scope, self.graph) + + def unroll(self): + unroller.do_unrolling(self.ast_scope, self.graph) + + def write_graph(self, writer): + self.graph.delete_unreachable_nodes() + #Emit flow graph + self._write_flow_nodes(writer) + for pred, succ, kind in self.graph.edges(): + write_successors(writer, pred, succ, kind) + if kind != NORMAL and kind != EXHAUSTED: + write_successors(writer, pred, succ, NORMAL) + #Emit idoms + for node, idom in self.graph.idoms(): + write_idoms(writer, node, idom) + #Emit SSA variables + for var in self.graph.ssa_variables(): + write_ssa_var(writer, var) + for node, var in self.graph.ssa_definitions(): + write_ssa_defn(writer, var, node) + for node, var in self.graph.ssa_uses(): + write_ssa_use(writer, node, var) + for var, arg in self.graph.ssa_phis(): + write_ssa_phi(writer, var, arg) + + def _write_flow_nodes(self, writer): + blocks = self.graph.get_basic_blocks() + for flow, note in self.graph.nodes(): + if note is not None: + write_scope_node(writer, flow, self.ast_scope, note) + if flow in blocks: + head, index = blocks[flow] + write_flow_node(writer, flow, head, index) + + +#Codes for scope entry/exit nodes. +#These are hardcoded in QL. Do not change them. +FALL_THROUGH_EXIT = 0 +EXCEPTION_EXIT = 1 +RETURN_EXIT = 2 +ENTRY = -1 + +class FlowPass(Pass): + '''Extracts flow-control information. Currently generates a flow control + graph. There is a many-to-one relation between flow-nodes and ast nodes. + This enables precise flow control for 'try' statements. + Each flow node also has a number. If there are several flow nodes for + one ast node, they will all have different numbers. + For flow nodes representing a scope (class, function or module) then + the numbers are as follows: entry=-1, exceptional exit=1, + fallthrough exit=0, explicit return=2 + ''' + + name = "flow" + + def __init__(self, split, prune=True, unroll=False, logger:Optional[Logger] = None): + 'Initialize all the tree walkers' + self._walkers = { + list : self._walk_list, + bool : self.skip, + int : self.skip, + float : self.skip, + bytes : self.skip, + str : self.skip, + complex : self.skip, + type(None) : self.skip, + ast.Lambda : self._walk_scope_defn, + ast.ClassExpr : self._walk_class_expr, + ast.FunctionExpr : self._walk_scope_defn, + ast.For : self._walk_for_loop, + ast.Pass : self._walk_stmt_only, + ast.Global : self._walk_stmt_only, + ast.Break : self._walk_break, + ast.BinOp : self._walk_binop, + ast.Compare : self._walk_compare, + ast.Continue : self._walk_continue, + ast.Raise : self._walk_raise, + ast.Return : self._walk_return, + ast.Delete : self._walk_delete, + ast.While : self._walk_while, + ast.If : self._walk_if_stmt, + ast.IfExp : self._walk_if_expr, + ast.expr_context : self.skip, + ast.Slice : self._walk_slice, + ast.ExceptStmt : error, + ast.comprehension : error, + ast.ListComp: self._walk_generator, + ast.SetComp: self._walk_generator, + ast.DictComp: self._walk_generator, + ast.Dict : self._walk_dict, + ast.keyword : self._walk_expr_no_raise, + ast.KeyValuePair : self._walk_keyword, + ast.DictUnpacking : self._walk_yield, + ast.Starred : self._walk_yield, + ast.arguments : self._walk_arguments, + ast.Name : self._walk_name, + ast.PlaceHolder : self._walk_name, + ast.Num : self._walk_atom, + ast.Str : self._walk_atom, + ast.Try : self._walk_try, + ast.List : self._walk_sequence, + ast.Tuple : self._walk_sequence, + ast.UnaryOp : self._walk_expr_no_raise, + ast.UnaryOp : self._walk_unary_op, + ast.Assign : self._walk_assign, + ast.ImportExpr : self._walk_import_expr, + ast.ImportMember : self._walk_expr, + ast.Ellipsis : self._walk_atom, + ast.Print : self._walk_post_stmt, + ast.alias : self._walk_alias, + ast.GeneratorExp: self._walk_generator, + ast.Assert: self._walk_assert, + ast.AssignExpr: self._walk_assignexpr, + ast.AugAssign : self._walk_augassign, + ast.Attribute : self._walk_attribute, + ast.Subscript : self._walk_subscript, + ast.BoolOp : self._walk_bool_expr, + ast.TemplateWrite : self._walk_post_stmt, + ast.Filter : self._walk_expr_no_raise, + ast.Yield : self._walk_yield, + ast.YieldFrom : self._walk_yield, + ast.Expr : self._walk_skip_stmt, + ast.Import : self._walk_skip_stmt, + ast.ImportFrom : self._walk_post_stmt, + ast.With: self._walk_with, + ast.Match: self._walk_match, + ast.Case: self._walk_case, + ast.Repr : self._walk_expr_no_raise, + ast.Nonlocal : self._walk_stmt_only, + ast.Exec : self._walk_exec, + ast.AnnAssign : self._walk_ann_assign, + ast.TypeAlias : self._walk_stmt_only, + ast.TypeVar: self.skip, + ast.TypeVarTuple: self.skip, + ast.ParamSpec: self.skip, + ast.SpecialOperation: self._walk_expr_no_raise, + ast.Module : error, + ast.expr : error, + ast.stmt : error, + ast.cmpop : error, + ast.boolop : error, + ast.operator : error, + ast.expr_context : error, + ast.unaryop : error, + ast.AstBase : error, + } + for t in ast.__dict__.values(): + if isinstance(t, type) and ast.AstBase in t.__mro__: + #Setup walkers + expr_walker = self._walk_expr + if t.__mro__[1] is ast.expr: + if t not in self._walkers: + self._walkers[t] = expr_walker + elif t.__mro__[1] in (ast.cmpop, ast.boolop, ast.operator, + ast.expr_context, ast.unaryop): + self._walkers[t] = self.skip + self._walkers[ast.TemplateDottedNotation] = self._walkers[ast.Attribute] + + # Initialize walkers for patterns, + # These return both a tree and a list of nodes: + # - the tree represents the computation needed to evaluate whether the pattern matches, + # - the list of nodes represents the bindings resulting from a successful match. + self._pattern_walkers = { + ast.MatchAsPattern: self._walk_as_pattern, + ast.MatchOrPattern: self._walk_or_pattern, + ast.MatchLiteralPattern: self._walk_literal_pattern, + ast.MatchCapturePattern: self._walk_capture_pattern, + ast.MatchWildcardPattern: self._walk_wildcard_pattern, + ast.MatchValuePattern: self._walk_value_pattern, + ast.MatchSequencePattern: self._walk_sequence_pattern, + ast.MatchStarPattern: self._walk_star_pattern, + ast.MatchMappingPattern: self._walk_mapping_pattern, + ast.MatchDoubleStarPattern: self._walk_double_star_pattern, + ast.MatchKeyValuePattern: self._walk_key_value_pattern, + ast.MatchClassPattern: self._walk_class_pattern, + ast.MatchKeywordPattern: self._walk_keyword_pattern, + } + + self.scope = None + self.in_try = 0 + self.in_try_name = 0 + self.split = split + self.prune = prune + self.unroll = unroll + self.logger = logger or Logger() + self.filename = "" + + #Entry point to the tree walker + def extract(self, ast, writer): + if ast is None: + return + self.writer = writer + self._walk_scope(ast) + + def set_filename(self, filename): + self.filename = filename + + #Walkers + + def _walk_arguments(self, node, predecessors): + for _, _, child_node in iter_fields(node): + predecessors = self._walk(child_node, predecessors) + return predecessors + + def _walk_generator(self, node, predecessors): + res = self._walk(node.iterable, predecessors) + res = self.add_successor(res, node) + raises = self._walk_scope(node.function) + if raises: + self._raise_exception(res) + return res + + def _walk_comprehension(self, node, predecessors): + return self._walk_generators(node, node.generators, predecessors) + + def _walk_generators(self, node, generators, predecessors): + if not generators: + if isinstance(node, ast.DictComp): + predecessors = self.add_successor(predecessors, node.value) + predecessors = self.add_successor(predecessors, node.key) + else: + predecessors = self.add_successor(predecessors, node.elt) + return predecessors + else: + gen = generators[0] + predecessors = self._walk(gen.iter, predecessors) + predecessors = self.add_successor(predecessors, gen) + loop_node = predecessors.unique_node() + predecessors = self._walk(gen.target, predecessors) + skip = EMPTY + for test in gen.ifs: + predecessors = self._walk(test, predecessors) + true_nodes, false_nodes = predecessors.branch() + predecessors += true_nodes + skip += false_nodes + predecessors = self._walk_generators(node, generators[1:], predecessors) + predecessors += skip + self.add_successor_node(predecessors, loop_node) + return predecessors + + def _walk_if_expr(self, node, predecessors): + test_successors = self._walk(node.test, predecessors) + true_successors, false_successors = test_successors.branch() + body_successors = self._walk(node.body, true_successors) + orelse_successors = self._walk(node.orelse, false_successors) + predecessors = body_successors + orelse_successors + predecessors = self.add_successor(predecessors, node) + return predecessors + + def _walk_dict(self, node, predecessors): + for item in node.items: + predecessors = self._walk(item, predecessors) + return self.add_successor(predecessors, node) + + def _walk_alias(self, node, predecessors): + predecessors = self._walk(node.value, predecessors) + return self._walk(node.asname , predecessors) + + def _walk_slice(self, node, predecessors): + predecessors = self._walk(node.start, predecessors) + predecessors = self._walk(node.stop, predecessors) + predecessors = self._walk(node.step, predecessors) + return self.add_successor(predecessors, node) + + def _walk_break(self, node, predecessors): + #A break statement counts as an exit to the enclosing loop statement + predecessors = self.add_successor(predecessors, node) + self.scope.breaking_stack.add(predecessors) + #Provide no predecessors to following statement + return EMPTY + + def _walk_continue(self, node, predecessors): + #A continue statement counts as an exit to the following orelse + predecessors = self.add_successor(predecessors, node) + self.scope.continuing_stack.add(predecessors) + #Provide no predecessors to following statement + return EMPTY + + def _raise_exception(self, predecessors): + predecessors = predecessors.exception() + self.scope.exception_stack.add(predecessors) + + def _walk_raise(self, node, predecessors): + for _, _, child_node in iter_fields(node): + predecessors = self._walk(child_node, predecessors) + predecessors = self.add_successor(predecessors, node) + self._raise_exception(predecessors) + return EMPTY + + def _walk_return(self, node, predecessors): + for _, _, child_node in iter_fields(node): + predecessors = self._walk(child_node, predecessors) + predecessors = self.add_successor(predecessors, node) + self.scope.return_stack.add(predecessors) + return EMPTY + + def _walk_delete(self, node, predecessors): + '''The CFG for the delete statement `del a, b` + looks like `a -> del -> b -> del` to ensure that + the implied use occurs before the deletion and that + `del x, x` has the correct semantics.''' + for item in node.targets: + predecessors = self._walk(item, predecessors) + predecessors = self.add_successor(predecessors, node) + return predecessors + + def _walk_stmt_only(self, node, predecessors): + return self.add_successor(predecessors, node) + + def _walk_scope(self, scope_node): + '''Returns: whether this scope raises an exception (or not)''' + prev_flow_scope = self.scope + if prev_flow_scope is None: + self.scope = FlowScope(0, scope_node) + else: + self.scope = prev_flow_scope.inner(scope_node) + predecessors = SingletonNodeSet(self.scope.entry, NORMAL) + for _, _, child_node in iter_fields(scope_node): + predecessors = self._walk(child_node, predecessors) + implicit_exit = self.add_successor(predecessors, scope_node).unique_node() + self.scope.graph.annotate_node(implicit_exit, FALL_THROUGH_EXIT) + if isinstance(scope_node, (ast.Module, ast.Class)): + self.scope.graph.use_all_defined_variables(implicit_exit) + #Mark all nodes that raise unhandled exceptions. + exceptions = self.scope.pop_exceptions() + for node, kind in exceptions: + if kind == NORMAL or kind == EXCEPTION: + self.scope.graph.annotate_node(node, EXCEPTION_EXIT) + else: + self.scope.graph.add_edge(node, self.scope.exceptional_exit) + self.scope.graph.annotate_edge(node, self.scope.exceptional_exit, kind) + self.scope.graph.annotate_node(self.scope.entry, ENTRY) + if not isinstance(scope_node, ast.Module): + returns = self.scope.return_stack.pop_block() + return_exit = self.add_successor(returns, scope_node).unique_node() + self.scope.graph.annotate_node(return_exit, RETURN_EXIT) + if self.split: + try: + self.scope.split() + # we found a regression in the split logic, where in some scenarios a split head would not be in the subgraph. + # Instead of aborting extracting the whole file, we can continue and just not split the graph. + # see semmlecode-python-tests/extractor-tests/splitter-regression/failure.py + except AssertionError: + self.logger.warning("Failed to split in " + self.filename + ", continuing anyway") + if self.prune: + self.scope.prune() + if self.unroll: + self.scope.unroll() + self.scope.write_graph(self.writer) + self.scope = prev_flow_scope + return bool(exceptions) + + def _walk_scope_defn(self, node, predecessors): + for field_name, _, child_node in iter_fields(node): + if field_name == 'inner_scope': + continue + predecessors = self._walk(child_node, predecessors) + predecessors = self.add_successor(predecessors, node) + sub_node = node.inner_scope + self._walk_scope(sub_node) + return predecessors + + def _walk_class_expr(self, node, predecessors): + predecessors = self._walk_scope_defn(node, predecessors) + self._raise_exception(predecessors) + return predecessors + + def _walk_post_stmt(self, node, predecessors): + for _, _, child_node in iter_fields(node): + predecessors = self._walk(child_node, predecessors) + return self.add_successor(predecessors, node) + + def _walk_skip_stmt(self, node, predecessors): + for _, _, child_node in iter_fields(node): + predecessors = self._walk(child_node, predecessors) + return predecessors + + def _walk_with(self, node, predecessors): + nodes = self._walk(node.context_expr, predecessors) + #The with statement has side effects which occur after the context manager has been computed + nodes = self.add_successor(nodes, node) + nodes = self._walk(node.optional_vars, nodes) + return self._walk(node.body, nodes) + + def _walk_match(self, node, predecessors): + pre_subject = self.add_successor(predecessors, node) + subject_successors = self._walk(node.subject, pre_subject) + final_successors = EMPTY + case_predecessors = subject_successors + for case in node.cases: + case_match_successors, case_nomatch_successors = self._walk_case(case, case_predecessors) + case_predecessors = case_nomatch_successors + final_successors += case_match_successors + return final_successors + case_nomatch_successors + + def _walk_case(self, node, predecessors): + """Returns: (match_successors, nomatch_successors)""" + + pre_test = self.add_successor(predecessors, node) + pattern_successors, pattern_captures = self._walk_pattern(node.pattern, pre_test) + + pattern_match_successors, pattern_nomatch_successors = pattern_successors.branch() + + for capture in pattern_captures: + pattern_match_successors = self._walk(capture, pattern_match_successors) + + if node.guard: + guard_successors = self._walk_guard(node.guard, pattern_match_successors) + guard_true_successors, guard_false_successors = guard_successors.branch() + pattern_match_successors = guard_true_successors + pattern_nomatch_successors += guard_false_successors + + body_successors = self._walk(node.body, pattern_match_successors) + return body_successors, pattern_nomatch_successors + + def _walk_pattern(self, node, predecessors): + """Walking a pattern results in a tree and a list of nodes: + - the tree represents the computation needed to evaluate whether the pattern matches, + - the list of nodes represents the bindings resulting from a successful match.""" + + return self._pattern_walkers[type(node)](node, predecessors) + + def _walk_patterns_in_sequence(self, patterns, predecessors): + bindings = [] + for pattern in patterns: + predecessors, new_bindings = self._walk_pattern(pattern, predecessors) + bindings += new_bindings + return predecessors, bindings + + def _walk_as_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + pattern_successors, bindings = self._walk_pattern(node.pattern, predecessors) + return pattern_successors, bindings + [node.alias] + + def _walk_or_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + # We cannot use `self._walk_patterns_in_sequence` as we only want + # to capture the bindings of the first pattern in the sequence + # (the bindings of the subsequent patterns are simply repetitions) + bindings = [] + first = True + for pattern in node.patterns: + predecessors, new_bindings = self._walk_pattern(pattern, predecessors) + if first: + bindings += new_bindings + first = False + return predecessors, bindings + + def _walk_literal_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + predecessors = self._walk(node.literal, predecessors) + return predecessors, [] + + def _walk_capture_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + return predecessors, [node.variable] + + def _walk_wildcard_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + return predecessors, [] + + def _walk_value_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + predecessors = self._walk(node.value, predecessors) + return predecessors, [] + + def _walk_sequence_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + return self._walk_patterns_in_sequence(node.patterns, predecessors) + + def _walk_star_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + return self._walk_pattern(node.target, predecessors) + + def _walk_mapping_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + return self._walk_patterns_in_sequence(node.mappings, predecessors) + + def _walk_double_star_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + return self._walk_pattern(node.target, predecessors) + + def _walk_key_value_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + key_successors, bindings = self._walk_pattern(node.key, predecessors) + # The key should have no bindings + assert not bindings, "Unexpected bindings in key pattern: %s" % bindings + return self._walk_pattern(node.value, key_successors) + + def _walk_class_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + class_name_successors = self._walk(node.class_name, predecessors) + bindings = EMPTY + positional_successors = class_name_successors + if node.positional: + for positional in node.positional: + positional_successors, new_bindings = self._walk_pattern(positional, positional_successors) + bindings += new_bindings + keyword_successors = positional_successors + if node.keyword: + for keyword in node.keyword: + keyword_successors, new_bindings = self._walk_pattern(keyword, keyword_successors) + bindings += new_bindings + return keyword_successors, bindings + + def _walk_keyword_pattern(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + attribute_successors = self._walk(node.attribute, predecessors) + return self._walk_pattern(node.value, attribute_successors) + + def _walk_guard(self, node, predecessors): + pre_test = self.add_successor(predecessors, node) + return self._walk(node.test, pre_test) + + def _walk_exec(self, node, predecessors): + for _, _, child_node in iter_fields(node): + predecessors = self._walk(child_node, predecessors) + exit = self.add_successor(predecessors, node) + self._raise_exception(exit) + if isinstance(node.body, ast.Str) and node.body.s.startswith("raise "): + #Due to syntactic differences between Python 2 and Python 3 + #`exec("raise ...")` can sometimes be used instead of `raise ...` + return EMPTY + return exit + + def _walk_assert(self, node, predecessors): + predecessors = self._walk(node.test, predecessors) + if is_false_constant(node.test): + msg = self._walk(node.msg, predecessors) + assert_ = self.add_successor(msg, node) + self._raise_exception(assert_) + return EMPTY + if is_true_constant(node.test): + return self.add_successor(predecessors, node) + true_succ, false_succ = predecessors.branch() + assert_ok = self.add_successor(true_succ, node) + msg = self._walk(node.msg, false_succ) + assert_fail = self.add_successor(msg, node) + self._raise_exception(assert_fail) + return assert_ok + + def _walk_assign(self, node, predecessors): + value = self._walk(node.value, predecessors) + rhs_count = self._count_items(node.value) + if rhs_count > 0: + for target in node.targets: + if rhs_count != self._count_items(target): + break + else: + #All targets and rhs are sequences of the same length + for target in node.targets: + value = self._walk_sequence(target, value, True) + return value + #All other cases + for target in node.targets: + value = self._walk(target, value) + return value + + def _count_items(self, node): + if isinstance(node, (ast.Tuple, ast.List)): + return len(node.elts) + return 0 + + def _walk_expr_no_raise(self, node, predecessors): + for _, _, child_node in iter_fields(node): + predecessors = self._walk(child_node, predecessors) + res = self.add_successor(predecessors, node) + return res + + def _walk_arg(self, node, predecessors): + return self._walk(node.arg, predecessors) + + def _walk_keyword(self, node, predecessors): + predecessors = self._walk(node.key, predecessors) + predecessors = self._walk(node.value, predecessors) + return self.add_successor(predecessors, node) + + def _walk_yield(self, node, predecessors): + predecessors = self._walk(node.value, predecessors) + res = self.add_successor(predecessors, node) + if self.in_try: + self._raise_exception(res) + return res + + def _walk_sequence(self, node, predecessors, safe=False): + #In the case of a store the list/tuple is "evaluated" first, + #i.e. it is exploded before the parts are stored. + #This operation may raise an exception, unless the + #corresponding tuple of exactly the same size exists on the rhs + #of the assignment. + if isinstance(node.ctx, (ast.Store, ast.Param)): + predecessors = self.add_successor(predecessors, node) + if self.in_try and not safe: + self._raise_exception(predecessors) + for child_node in node.elts: + predecessors = self._walk(child_node, predecessors) + else: + for child_node in node.elts: + predecessors = self._walk(child_node, predecessors) + predecessors = self.add_successor(predecessors, node) + return predecessors + + def _walk_unary_op(self, node, predecessors): + predecessors = self._walk(node.operand, predecessors) + if not isinstance(node.op, ast.Not): + return self.add_successor(predecessors, node) + if len(predecessors) <= 1: + successors = self.add_successor(predecessors, node) + else: + #Avoid merging true/false branches. + successors = EMPTY + flownodes = {} + for pred, kind in predecessors: + if kind not in flownodes: + flownodes[kind] = FlowNode(node) + successors = successors.add_node(flownodes[kind], kind) + self.scope.graph.add_node(flownodes[kind]) + self.scope.graph.add_edge(pred, flownodes[kind]) + self.scope.graph.annotate_edge(pred, flownodes[kind], kind) + return successors.invert() + + def _walk_import_expr(self, node, predecessors): + for _, _, child_node in iter_fields(node): + predecessors = self._walk(child_node, predecessors) + res = self.add_successor(predecessors, node) + if node.name not in GUARANTEED_MODULES: + #Can raise an exception + self._raise_exception(res) + return res + + def _walk_expr(self, node, predecessors): + for _, _, child_node in iter_fields(node): + predecessors = self._walk(child_node, predecessors) + res = self.add_successor(predecessors, node) + #Many expressions can raise an exception + self._raise_exception(res) + return res + + def _walk_bool_expr(self, node, predecessors): + other = self.add_successor(predecessors, node) + short_circuit = EMPTY + for operand in node.values: + predecessors = self._walk(operand, other) + true_pred, false_pred = predecessors.branch() + if isinstance(node.op, ast.And): + short_circuit += false_pred + other = true_pred + else: + short_circuit += true_pred + other = false_pred + return other + short_circuit + + def _walk_name(self, node, predecessors, ctx_type = None): + # Too many exception edges make analysis slower and adds almost no accuracy + # Assume that Name may only raise an exception if global in scope and + # not a store + res = self.add_successor(predecessors, node) + if ctx_type is None: + ctx_type = type(node.ctx) + assert ctx_type not in (ast.AugAssign, ast.AugLoad) + #Only generate SSA variables for variables local to scope + if node.variable.scope == self.scope.ast_scope: + if ctx_type in (ast.Store, ast.Param, ast.AugStore): + for flow_node, kind in res: + self.scope.graph.add_definition(flow_node, node.variable) + elif ctx_type is ast.Del: + for flow_node, kind in res: + self.scope.graph.add_deletion(flow_node, node.variable) + elif ctx_type in (ast.Load, ast.AugLoad): + for flow_node, kind in res: + self.scope.graph.add_use(flow_node, node.variable) + if self.in_try and ctx_type is not ast.Store: + if self.scope.depth == 0 or node.variable.is_global(): + # Use the common subset of Py2/3 names when determining which Name node can never raise. + # Ensures that code is not marked as unreachable by the Python 2 extractor, + # when it could be reached in Python 3 (and vice verse). + if node.variable.id not in BUILTIN_NAME_ALWAYS_EXISTS: + self._raise_exception(res) + elif self.in_try_name: + #If code explicitly catches NameError we need to raise from names. + self._raise_exception(res) + return res + + def _walk_subscript(self, node, predecessors, ctx_type = None): + if ctx_type is not ast.AugStore: + predecessors = self._walk(node.value, predecessors) + predecessors = self._walk(node.index, predecessors) + res = self.add_successor(predecessors, node) + self._raise_exception(res) + return res + + def _walk_attribute(self, node, predecessors, ctx_type = None): + if ctx_type is not ast.AugStore: + predecessors = self._walk(node.value, predecessors) + res = self.add_successor(predecessors, node) + if self.in_try: + self._raise_exception(res) + return res + + def _walk_atom(self, node, predecessors): + #Do not raise exception. Should have queries for undefined values. + return self.add_successor(predecessors, node) + + def _walk_if_stmt(self, node, predecessors): + test_successors = self._walk(node.test, predecessors) + true_successors, false_successors = test_successors.branch() + body_successors = self._walk(node.body, true_successors) + orelse_successors = self._walk(node.orelse, false_successors) + return body_successors + orelse_successors + + def _walk_compare(self, node, predecessors): + #TO DO -- Handle the (rare) case of multiple comparators; + #a < b < c is equivalent to a < b and b < c (without reevaluating b) + predecessors = self._walk(node.left, predecessors) + for comp in node.comparators: + predecessors = self._walk(comp, predecessors) + res = self.add_successor(predecessors, node) + #All comparisons except 'is' can (theoretically) raise an exception + #However == and != should never do so. + if self.in_try and node.ops[0].__class__ not in NON_RAISING_COMPARISON_OPS: + self._raise_exception(res) + return res + + def _walk_binop(self, node, predecessors, ctx_type = None): + left = node.left + if ctx_type is not None: + predecessors = self._walkers[type(left)](left, predecessors, ctx_type) + else: + predecessors = self._walk(left, predecessors) + predecessors = self._walk(node.right, predecessors) + res = self.add_successor(predecessors, node) + if self.in_try: + self._raise_exception(res) + return res + + def _walk_assignexpr(self, node, predecessors): + flow = self._walk(node.value, predecessors) + flow = self._walk_name(node.target, flow, ast.Store) + flow = self.add_successor(flow, node) + return flow + + def _walk_augassign(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + predecessors = self._walk_binop(node.operation, predecessors, ast.AugLoad) + target = node.operation.left + return self._walkers[type(target)](target, predecessors, ast.AugStore) + + def _walk_for_loop(self, node, predecessors): + loop_entry = self._walk(node.iter, predecessors) + pre_target = self.add_successor(loop_entry, node) + #Getting the iterator from the iterable may raise + if self.in_try: + self._raise_exception(pre_target) + body_entry = self._walk(node.target, pre_target) + return self._walk_loop_body(node, pre_target, body_entry, SingletonNodeSet(pre_target.node, EXHAUSTED)) + + def _walk_while(self, node, predecessors): + #return self._walk_loop(None, node.test, node, predecessors) + pre_test = self.add_successor(predecessors, node) + test_out = self._walk(node.test, pre_test) + body_entry, loop_exit = test_out.branch() + return self._walk_loop_body(node, pre_test, body_entry, loop_exit, is_true_constant(node.test)) + + def _walk_loop_body(self, node, top, body_entry, loop_exit, infinite = False): + self.scope.breaking_stack.push_block() + self.scope.continuing_stack.push_block() + body_exit = self._walk(node.body, body_entry) + breaks = self.scope.breaking_stack.pop_block() + continues = self.scope.continuing_stack.pop_block() + top_node = top.unique_node() + self.add_successor_node(continues, top_node) + self.add_successor_node(body_exit, top_node) + if infinite: + return breaks + if node.orelse: + loop_exit = self._walk(node.orelse, loop_exit) + return loop_exit + breaks + + def _walk_try_finally(self, node, predecessors): + assert node.finalbody + + self.scope.exception_stack.push_block() + self.scope.return_stack.push_block() + self.scope.continuing_stack.push_block() + self.scope.breaking_stack.push_block() + self.in_try += 1 + body_exit = self._walk_try_except(node, predecessors) + self.in_try -= 1 + continuing = self.scope.continuing_stack.pop_block() + returning = self.scope.return_stack.pop_block() + breaking = self.scope.breaking_stack.pop_block() + exceptions = self.scope.pop_exceptions() + if exceptions: + self.scope.exception_stack.add(self._walk(node.finalbody, exceptions)) + if continuing: + assert self.scope.continuing_stack, continuing + self.scope.continuing_stack.add(self._walk(node.finalbody, continuing)) + if breaking: + self.scope.breaking_stack.add(self._walk(node.finalbody, breaking)) + if returning: + self.scope.return_stack.add(self._walk(node.finalbody, returning)) + finally_exit = self._walk(node.finalbody, body_exit) + return finally_exit + + def _walk_try(self, node, predecessors): + predecessors = self.add_successor(predecessors, node) + if node.finalbody: + return self._walk_try_finally(node, predecessors) + else: + return self._walk_try_except(node, predecessors) + + def _walk_try_except(self, node, predecessors): + if not node.handlers: + self.in_try += 1 + body_exit = self._walk(node.body, predecessors) + res = self._walk(node.orelse, body_exit) + self.in_try -= 1 + return res + # check if there is a handler for exception groups (PEP 654) + handles_grouped = [h for h in node.handlers if isinstance(h, ast.ExceptGroupStmt)] + if handles_grouped: + return self._walk_try_except_groups(node, predecessors) + else: + return self._walk_try_except_no_groups(node, predecessors) + + def _walk_try_body(self, node, predecessors): + self.in_try += 1 + in_try_name = 0 + for handler in node.handlers: + if hasattr(handler.type, "variable") and handler.type.variable.id == "NameError": + in_try_name = 1 + self.in_try_name += in_try_name + self.scope.exception_stack.push_block() + body_exit = self._walk(node.body, predecessors) + self.in_try -= 1 + self.in_try_name -= in_try_name + exceptions = self.scope.pop_exceptions() + return body_exit, exceptions + + def _walk_try_except_groups(self, node, predecessors): + body_exit, exceptions = self._walk_try_body(node, predecessors) + + for handler in node.handlers: + # the handler test might fail, meaning the handler does not match the + # exception group. In this case, the exception is propagated, so the + # test node gets its own variable. + handler_test = self.add_successor(exceptions, handler) + handler_test = self._walk(handler.type, handler_test) + + # Assuming the handler does match, the handler body is executed. + handled = handler_test + if handler.name is not None: + handled = self._walk(handler.name, handled) + + handled = self._walk(handler.body, handled) + + # The next handler only sees unhandled exceptions from this handler + # _not_ exceptions raised from the body of the handler. + # If this handler did not match, there is an exceptional transition from the test + # otherwise, there is one from the body exit. + exceptions = handler_test.exception() + handled.exception() + + body_exit = self._walk(node.orelse, body_exit) + + # When we run out of handlers, there might still be unhandled exceptions. + # We add them to the current stack, so they can be picked up by the finally block + # or the scope exit. + self.scope.exception_stack.add(exceptions) + + # normal exit includes the last handler in case it handled all remaining exceptions + return handled + body_exit + + def _walk_try_except_no_groups(self, node, predecessors): + body_exit, exceptions = self._walk_try_body(node, predecessors) + + handler_exit = EMPTY + catch_all = False + for handler in node.handlers: + handled = self.add_successor(exceptions, handler).normalise() + if handler.type is None: + catch_all = True + else: + handled = self._walk(handler.type, handled) + if handler.name is not None: + handled = self._walk(handler.name, handled) + handler_exit += self._walk(handler.body, handled) + if not catch_all: + self.scope.exception_stack.add(exceptions) + body_exit = self._walk(node.orelse, body_exit) + return handler_exit + body_exit + + def _walk_ann_assign(self, node, predecessors): + flow = self._walk(node.value, predecessors) + flow = self._walk(node.target, flow) + # PEP 526 specifies that only annotations outside functions will be evaluated + if not isinstance(self.scope.ast_scope, ast.Function): + flow = self._walk(node.annotation, flow) + flow = self.add_successor(flow, node) + return flow + + def _walk(self, node, predecessors): + res = self._walkers[type(node)](node, predecessors) + return res + + def _walk_list(self, node, predecessors): + for child in node: + predecessors = self._walkers[type(child)](child, predecessors) + return predecessors + + def skip(self, _, predecessors): + return predecessors + + def add_successor_node(self, predecessors, flow_node): + for n, kind in predecessors: + self.scope.graph.add_edge(n, flow_node) + self.scope.graph.annotate_edge(n, flow_node, kind) + + def add_successor(self, predecessors, node, kind=NORMAL): + '''Add successor relations between all nodes + in the iterable predecessors and node.''' + assert isinstance(node, ast.AstBase) + flow_node = FlowNode(node) + predecessors = predecessors.merge_true_false_pairs() + #Ensure node is in graph, even if unreachable, so it can be annotated. + self.scope.graph.add_node(flow_node) + self.add_successor_node(predecessors, flow_node) + return SingletonNodeSet(flow_node, kind) + +NON_RAISING_COMPARISON_OPS = (ast.Is, ast.IsNot, ast.Eq, ast.NotEq) + + +SUCCESSOR_RELATIONS = { + TRUE: u'py_true_successors', + FALSE: u'py_false_successors', + NORMAL: u'py_successors', + EXCEPTION: u'py_exception_successors', + EXHAUSTED: u'py_successors', +} + +def write_successors(writer, from_node, to_node, kind): + writer.write_tuple(SUCCESSOR_RELATIONS[kind], 'nn', from_node, to_node) + +def write_flow_node(writer, flow, bb, index): + writer.write_tuple(u'py_flow_bb_node', 'nnnd', flow, flow.node, bb, index) + +def write_idoms(writer, node, idom): + writer.write_tuple(u'py_idoms', 'nn', node, idom) + +def write_ssa_var(writer, var): + writer.write_tuple(u'py_ssa_var', 'nn', var, var.variable) + +def write_ssa_defn(writer, var, node): + writer.write_tuple(u'py_ssa_defn', 'nn', var, node) + +def write_ssa_use(writer, node, var): + writer.write_tuple(u'py_ssa_use', 'nn', node, var) + +def write_ssa_phi(writer, var, arg): + writer.write_tuple(u'py_ssa_phi', 'nn', var, arg) + +def write_scope_node(writer, node, scope, index): + writer.write_tuple(u'py_scope_flow', 'nnd', node, scope, index) + +def is_true_constant(condition): + 'Determine if (AST node) condition is both constant and evaluates to True' + if isinstance(condition, ast.Num): + return condition.n + elif isinstance(condition, ast.Name): + return condition.variable.id == "True" + elif isinstance(condition, ast.Str): + return condition.s + return False + +def is_false_constant(condition): + 'Determine if (AST node) condition is both constant and evaluates to False' + if isinstance(condition, ast.Num): + return not condition.n + elif isinstance(condition, ast.Name): + return condition.variable.id == "False" or condition.variable.id == "None" + elif isinstance(condition, ast.Str): + return not condition.s + return False + + +TEMPLATE = '''"%s" [ +label = "%s" +color = "%s" +shape = "%s" +]; +''' + +class GraphVizIdPool(object): + '''This class provides the same interface as IDPool. + It outputs nodes in graphviz format''' + + def __init__(self, out, options): + self.out = out + self.pool = {} + self.next_id = 1000 + self.ranks = {} + self.node_colours = {} + self.options = options + + def get(self, node, name=None): + 'Return an id (in this pool) for node' + assert node is not None + #Use id() except for strings. + col = "black" + if isinstance(node, str): + node_id = node + else: + node_id = id(node) + if node_id in self.pool: + return self.pool[node_id] + next_id = 'ID_%d' % self.next_id + show = isinstance(node, FlowNode) or self.options.ast + if isinstance(node, FlowNode) and not self.options.ast: + col = self.node_colours.get(node, "black") + node = node.node + if name is None: + if hasattr(node, "is_async") and node.is_async: + name = "Async " + type(node).__name__ + else: + name = type(node).__name__ + if isinstance(node, FlowNode): + col = self.node_colours.get(node, "black") + name = type(node.node).__name__[:6] + if node.node not in self.ranks: + self.ranks[node.node] = set() + self.ranks[node.node].add(node) + else: + if name in ('Name', 'PlaceHolder'): + ctx_name = node.ctx.__class__.__name__ + name += ' (%s) id=%s' % (ctx_name, node.variable.id) + elif hasattr(node, "op"): + name = type(node.op).__name__ + else: + for field_name, _, child_node in iter_fields(node): + if field_name == "is_async": + continue + if type(child_node) in (str, int, float, bool): + txt = str(child_node) + if len(txt) > 16: + txt = txt[:13] + '...' + txt = txt.replace('\n', '\\n').replace('"', '\\"') + name += ' ' + field_name + '=' + txt + if isinstance(node, ast.stmt): + shape = 'rectangle' + elif type(node) in (ast.Function, ast.Module, ast.Class): + shape = 'octagon' + elif isinstance(node, FlowNode): + shape = "diamond" + else: + shape = 'oval' + if show: + util.fprintf(self.out, TEMPLATE, next_id, name, col, shape) + self.pool[node_id] = next_id + self.next_id += 1 + return next_id + + def print_ranks(self): + for node, flows in self.ranks.items(): + if not self.options.ast: + continue + node_id = self.get(node) + ids = [ node_id ] + for flow in flows: + flow_id = self.get(flow) + ids.append(flow_id) + util.fprintf(self.out, "{rank=same; %s;}\n", ' '.join(ids)) + +class GraphVizTrapWriter(object): + + def __init__(self, options): + if options.out is None: + self.out = sys.stdout + else: + self.out = open(options.out, 'w') + self.pool = GraphVizIdPool(self.out, options) + util.fprintf(self.out, HEADER) + + def close(self): + self.pool.print_ranks() + util.fprintf(self.out, FOOTER) + if self.out != sys.stdout: + self.out.close() + self.out = None + + def __del__(self): + if self.out and self.out != sys.stdout: + self.out.close() + +HEADER = '''digraph g { +graph [ +rankdir = "TB" +]; +''' + +FOOTER = '''} +''' + +FORMAT = '%s -> %s [color="%s"];\n' + +EDGE_COLOURS = {TRUE: "green", FALSE: "blue", NORMAL: "black", EXCEPTION: "red", EXHAUSTED: "brown" } +NODE_COLOURS = {EXCEPTION_EXIT: "red", ENTRY: "orange", FALL_THROUGH_EXIT: "grey", RETURN_EXIT: "blue" } + +EXTENDED_HELP = """Edge types: + +- Green, solid :: True successor of branching node. +- Blue, solid :: False successor of branching node. +- Brown, solid:: Exhausted successor of for node. +- Brown, dashed :: Target is corresponding AST node. + +- option -s (--ssa) :: + - Green, dashed :: Source is a place where the variable is used, target is the place + where the variable is defined. Edge marked with variable + name. + - Blue, dashed :: Target is phi node, source is where the variable comes from. + Edge marked with variable name. +- option -b (--basic_blocks) :: + - Purple, dashed :: Points from a node to the first node in its basic + block. Labelled with index of node within its basic block. +- option -i (--idoms) :: + - Yellow, solid :: Shows the immediate dominator (source) of a node (target). + +Node shapes: + +- Rectangle :: Statement. +- Octagon :: Function / module / class. +- Diamond :: Flow node. +- Oval :: Everything else. + +Node colours: +- Red :: Exception exit. +- Orange :: Entry. +- Grey :: Fall-through exit. +- Blue :: Return exit. +- Black :: Everything else. +""" + +def print_extended_help(option, opt_str, value, parser): + print(EXTENDED_HELP) + sys.exit(0) + +def args_parser(): + 'Parse command_line, returning options, arguments' + from optparse import OptionParser + usage = "usage: %prog [options] python-file" + parser = OptionParser(usage=usage) + parser.add_option("-i", "--idoms", help="Show immediate dominators", action="store_true") + parser.add_option("-s", "--ssa", help="Show SSA phis and uses.", action="store_true") + parser.add_option("-b", "--basic_blocks", help="Show basic-blocks.", action="store_true") + parser.add_option("-o", "--out", dest="out", + help="Output directory for writing gv file") + parser.add_option("--dont-split-graph", dest="split", default=True, action="store_false", + help = """Do not perform splitting on the flow graph.""") + parser.add_option("--dont-prune-graph", dest="prune", default=True, action="store_false", + help = """Do not perform pruning on the flow graph.""") + parser.add_option("--dont-unroll-graph", dest="unroll", action="store_false", + help = """DEPRECATED. Do not perform unrolling on the flow graph.""") + parser.add_option("--unroll-graph", dest="unroll", default=False, action="store_true", + help = """Perform unrolling on the flow graph. Default false.""") + parser.add_option("--no-ast", dest="ast", default=True, action="store_false", + help = """Do not output AST nodes.""") + parser.add_option("--extended-help", help="Print extended help.", action="callback", + callback=print_extended_help) + parser.add_option("--tsg", dest="tsg", default=False, action="store_true", + help="Use tgs based parser.") + return parser + +def main(): + 'Write out flow graph (as computed by FlowPass) in graphviz format' + import re + definitions = {} + + _UNDEFINED_NAME = ast.Name("Not defined", ast.Load()) + _UNDEFINED_NAME.variable = ast.Variable("Not defined", None) + UNDEFINED_NODE = FlowNode(_UNDEFINED_NAME) + + global write_successors, write_flow_node, write_idoms, write_special_successors + global write_ssa_var, write_ssa_use, write_ssa_phi, write_ssa_defn, write_scope_node + + parser = args_parser() + options, args = parser.parse_args(sys.argv[1:]) + + if len(args) != 1: + sys.stderr.write("Error: wrong number of arguments.\n") + parser.print_help() + return + + inputfile = args[0] + + if not os.path.isfile(inputfile): + sys.stderr.write("Error: input file does not exist.\n") + return + + writer = GraphVizTrapWriter(options) + def write(*args): + util.fprintf(writer.out, *args) + + successors = set() + def write_successors(writer, from_node, to_node, kind): + from_id = writer.pool.get(from_node) + to_id = writer.pool.get(to_node) + if (from_node, to_node) not in successors: + write(FORMAT, from_id, to_id, EDGE_COLOURS[kind]) + successors.add((from_node, to_node)) + + def write_flow_node(out, flow, bb, index): + flow_id = writer.pool.get(flow) + if options.ast: + node_id = writer.pool.get(flow.node) + write('%s->%s [ style = "dashed" color = "brown" ];\n', flow_id, node_id) + if options.basic_blocks: + bb_id = writer.pool.get(bb) + write('%s->%s [ style = "dashed" color = "purple" label = "%d" ];\n', + flow_id, bb_id, index) + + if options.idoms: + def write_idoms(out, node, idom): + node_id = writer.pool.get(node) + idom_id = writer.pool.get(idom) + write('%s->%s [ color = "yellow" ];\n', idom_id, node_id) + else: + def write_idoms(out, node, idom): + pass + + def write_scope_node(writer, node, scope, index): + writer.pool.node_colours[node] = NODE_COLOURS[index] + + def write_ssa_var(out, ssa_var): + pass + + def write_ssa_defn(out, ssa_var, node): + definitions[ssa_var] = node + + def get_ssa_node(var): + '''If SSA_Var node is undefined, then FlowGraph inserts a None - + Change to UNDEFINED''' + if var in definitions: + return definitions[var] + else: + return UNDEFINED_NODE + + if options.ssa: + def write_ssa_use(out, node, var): + var_id = writer.pool.get(get_ssa_node(var)) + node_id = writer.pool.get(node) + write('%s->%s [ color = "green", style="dashed", label="use(%s)" ]\n' + % (node_id, var_id, var.variable.id)) + + def write_ssa_phi(out, phi, arg): + phi_id = writer.pool.get(get_ssa_node(phi)) + arg_id = writer.pool.get(get_ssa_node(arg)) + write('%s->%s [ color = "blue", style="dashed", label="phi(%s)" ]\n' + % (arg_id, phi_id, arg.variable.id)) + else: + def write_ssa_use(out, node, var): + pass + + def write_ssa_phi(out, phi, arg): + pass + if options.tsg: + import semmle.python.parser.tsg_parser + parsed_ast = semmle.python.parser.tsg_parser.parse(inputfile, FakeLogger()) + else: + module = modules.PythonSourceModule("__main__", inputfile, FakeLogger()) + parsed_ast = module.ast + FlowPass(options.split, options.prune, options.unroll).extract(parsed_ast, writer) + writer.close() + +class FakeLogger(object): + + def debug(self, fmt, *args): + print(fmt % args) + + def traceback(self): + print(traceback.format_exc()) + + info = warning = error = trace = debug + +if __name__ == '__main__': + main() diff --git a/python/extractor/semmle/python/passes/labeller.py b/python/extractor/semmle/python/passes/labeller.py new file mode 100644 index 00000000000..d093aee6547 --- /dev/null +++ b/python/extractor/semmle/python/passes/labeller.py @@ -0,0 +1,117 @@ +# Label an AST with symbol-tables. +# Follow ordering specified in Python/symtable.c + +from semmle.python import ast + +from semmle.python.passes.ast_pass import iter_fields, ASTVisitor + +__all__ = [ 'Labeller' ] + +class SymbolTable(ASTVisitor): + '''A symbol table for a Python scope. + Records uses and definitions, `global` and `nonlocal` statements for names in that scope''' + + def __init__(self, scope): + self.definitions = set() + self.uses = set() + self.declared_as_global = set() + self.declared_as_nonlocal = set() + for _, _, child in iter_fields(scope): + self.visit(child) + + def visit_Class(self, node): + pass + + def visit_Function(self, node): + pass + + def visit_Name(self, node): + name = node.variable.id + if isinstance(node.ctx, ast.Load): + self.uses.add(name) + elif isinstance(node.ctx, (ast.Store, ast.Param, ast.Del)): + self.definitions.add(name) + else: + raise Exception("Unknown context for name: %s" % node.ctx) + + def visit_Global(self, node): + self.declared_as_global.update(node.names) + + def visit_Nonlocal(self, node): + self.declared_as_nonlocal.update(node.names) + + def is_bound(self, name): + declared_free = name in self.declared_as_global or name in self.declared_as_nonlocal + return name in self.definitions and not declared_free + +class _LabellingContext(ASTVisitor): + + def __init__(self, scope, module = None, outer = None): + '''Create a labelling context for `scope`. `module` is the module containing the scope, + and outer is the enclosing context, if any''' + self.symbols = SymbolTable(scope) + self.scope = scope + self.outer = outer + if module is None: + module = scope + self.module = module + + def label(self): + 'Label the node with this context' + self.visit(self.module) + + def visit_Function(self, node): + sub_context = _LabellingContext(node, self.module, self) + for _, _, child in iter_fields(node): + sub_context.visit(child) + + visit_Class = visit_Function + + def visit_Variable(self, node): + if node.scope is not None: + return + name = node.id + if name in self.symbols.declared_as_global: + node.scope = self.module + elif self.symbols.is_bound(name): + node.scope = self.scope + else: # Free variable, either implicitly or explicitly via nonlocal. + outer = self.outer + while outer is not None: + if isinstance(outer.scope, ast.Class): + # in the code example below, the use of `baz` inside `func` is NOT a reference to the + # function defined on the class, but is a reference to a global variable. + # + # The use of `baz` on class scope -- `bazzed = baz("class-scope")` + # -- is a reference to the function defined on the + # + # ```py + # class Foo + # def baz(arg): + # return arg + "-baz" + # def func(self): + # return baz("global-scope") + # bazzed = baz("class-scope") + # ``` + # + # So we skip over class scopes. + # + # See ql/python/ql/test/library-tests/variables/scopes/in_class.py + # added in https://github.com/github/codeql/pull/10171 + pass + elif outer.symbols.is_bound(name): + node.scope = outer.scope + break + outer = outer.outer + else: + node.scope = self.module + +class Labeller(object): + '''Labels the ast using symbols generated by the symtable module''' + + def apply(self, module): + 'Apply this Labeller to the module' + #Ensure that AST root nodes have a globally consistent identifier + if module.ast is None: + return + _LabellingContext(module.ast).label() diff --git a/python/extractor/semmle/python/passes/lexical.py b/python/extractor/semmle/python/passes/lexical.py new file mode 100644 index 00000000000..31c52c2a959 --- /dev/null +++ b/python/extractor/semmle/python/passes/lexical.py @@ -0,0 +1,153 @@ +import ast +import sys +import math + +from semmle.python.passes.ast_pass import iter_fields +from semmle.python import ast +from semmle.python.passes._pass import Pass + +__all__ = [ 'LexicalPass' ] + +STMT_OR_EXPR = ast.expr, ast.stmt +LOCATABLE = STMT_OR_EXPR + (ast.pattern, ast.comprehension, ast.StringPart, ast.keyword, ast.KeyValuePair, ast.DictUnpacking, ast.type_parameter) +CLASS_OR_FUNCTION = ast.Class, ast.Function +SCOPES = ast.Class, ast.Function, ast.Module + +class LexicalPass(Pass): + + def extract(self, ast, comments, writer): + 'The entry point' + LexicalModule(ast, comments, writer).extract() + + +class LexicalModule(object): + 'Object for extracting lexical information for the given module.' + + def __init__(self, ast, comments, writer): + assert ast is not None and comments is not None + self.ast = ast + self.comments = comments + self.writer = writer + self.module_id = writer.get_node_id(ast) + + def extract(self): + loc_id = self.get_location(0, 0, 0, 0) + self.writer.write_tuple(u'py_scope_location', 'rr', loc_id, self.module_id) + self.emit_line_info() + self.emit_locations(self.ast) + + def emit_line_info(self): + for text, start, end in self.comments: + #Generate a unique string for comment based on location + comment_id = str(start + end) + loc_id = self.get_location(start[0], start[1]+1, + end[0], end[1]) + try: + self.writer.write_tuple(u'py_comments', 'nsr', + comment_id, text, loc_id) + except UnicodeDecodeError: + # Handle non-ascii comments. Should only happen in Py2 + assert sys.hexversion < 0x03000000 + text = text.decode("latin8") + self.writer.write_tuple(u'py_comments', 'nsr', + comment_id, text, loc_id) + comment_bits = get_comment_bits(self.comments) + self.emit_line_counts(self.ast, set(), comment_bits) + + def emit_line_counts(self, node, code_lines, comment_bits): + if isinstance(node, SCOPES) and node.body: + doc_line_count = 0 + stmt0 = node.body[0] + if type(stmt0) == ast.Expr: + docstring = stmt0.value + if isinstance(docstring, ast.Str): + doc_line_count = docstring._end[0] - docstring.lineno + 1 + inner_code_lines = set() + inner_code_lines.add(node.lineno) + for _, _, child_node in iter_fields(node): + self.emit_line_counts(child_node, inner_code_lines, comment_bits) + assert inner_code_lines + startline = min(inner_code_lines) + endline = max(inner_code_lines) + if isinstance(node, ast.Module): + endline = max(endline, last_line(comment_bits)) + comment_line_count = get_lines_in_range(comment_bits, startline, endline) + code_line_count = len(inner_code_lines) - doc_line_count + code_lines.update(inner_code_lines) + self.print_lines(u'code', node, code_line_count) + self.print_lines(u'comment', node, comment_line_count) + self.print_lines(u'docstring', node, doc_line_count) + self.print_lines(u'all', node, endline - startline + 1) + if isinstance(node, ast.Module): + total_lines = code_line_count + comment_line_count + doc_line_count + self.writer.write_tuple(u'numlines', 'rddd', self.module_id, total_lines, code_line_count, comment_line_count + doc_line_count) + elif isinstance(node, list): + for n in node: + self.emit_line_counts(n, code_lines, comment_bits) + elif isinstance(node, STMT_OR_EXPR): + for _, _, child_node in iter_fields(node): + self.emit_line_counts(child_node, code_lines, comment_bits) + assert hasattr(node, "lineno"), node + line = node.lineno + endline, _ = node._end + while line <= endline: + code_lines.add(line) + line += 1 + + def print_lines(self, name, node, count): + self.writer.write_tuple(u'py_%slines' % name, 'nd', node, count) + + def get_location(self, bl, bc, el, ec): + loc_id = self.writer.get_unique_id() + self.writer.write_tuple(u'locations_ast', 'rrdddd', + loc_id, self.module_id, bl, bc, el, ec) + return loc_id + + def emit_locations(self, node): + if isinstance(node, ast.AstBase): + if isinstance(node, LOCATABLE): + self._write_location(node) + elif isinstance(node, CLASS_OR_FUNCTION): + bl, bc = node.lineno, node.col_offset+1 + el, ec = node._end + loc_id = self.get_location(bl, bc, el, ec) + self.writer.write_tuple(u'py_scope_location', 'rn', loc_id, node) + for _, _, child_node in iter_fields(node): + self.emit_locations(child_node) + elif isinstance(node, list): + for n in node: + self.emit_locations(n) + + def _write_location(self, node): + bl, bc = node.lineno, node.col_offset+1 + assert len(node._end) == 2, node + el, ec = node._end + loc_id = self.get_location(bl, bc, el, ec) + self.writer.write_tuple(u'py_locations', 'rn', loc_id, node) + +def get_comment_bits(comments): + comment_bits = 0 + for _, start, end in comments: + line, _ = start + end_line, _ = end + while line <= end_line: + comment_bits |= (1<= 0: + length = end - start + 1 + if length < 0: + return 0 + section = bits >> start + section &= (1 << length) - 1 + else: + section = bits >> start + return bin(section).count('1') + +def last_line(n): + if n <= 0: + return 0 + return int(math.log(n, 2)) diff --git a/python/extractor/semmle/python/passes/objects.py b/python/extractor/semmle/python/passes/objects.py new file mode 100644 index 00000000000..599539bc541 --- /dev/null +++ b/python/extractor/semmle/python/passes/objects.py @@ -0,0 +1,380 @@ + +import ast +import sys +from types import ModuleType, GetSetDescriptorType +import hashlib +import os + +from semmle.python import ast +from semmle.python.passes._pass import Pass +from semmle.util import get_analysis_major_version +from semmle.python.passes.ast_pass import iter_fields +from semmle.cmdline import is_legal_module_name + + +''' +The QL library depends on a reasonable one-to-one correspondence +between DB entities and Python objects. However, since QL has only +one notion of equality, but Python has two (`__eq__` and `is`) we need to be careful. +What we want to do is to treat objects like builtin functions and classes as using +reference equality and numbers and strings as using value equality. + +In practice this is impossible as we want to distinguish `True` from `1` from `1.0` +even though all these values are equal. However, we want to get as close as possible. + +''' + + +__all__ = [ 'ObjectPass' ] + +OBJECT_TYPES = set([ ast.ClassExpr, ast.Call, + ast.FunctionExpr, ast.Tuple, + ast.Str, ast.Num, ast.List, ast.ListComp, ast.Module, + ast.Dict, ast.Ellipsis, ast.Lambda]) + +# Types from Python 2.7 onwards +OBJECT_TYPES.add(ast.DictComp) +OBJECT_TYPES.add(ast.SetComp) +OBJECT_TYPES.add(ast.Set) + +NUMERIC_TYPES = set([int, float, bool]) + +BUILTINS_NAME = 'builtins' + +LITERALS = (ast.Num, ast.Str) + +class _CObject(object): + '''Utility class to wrap arbitrary C objects. + Treat all objects as unique. Rely on naming in the + trap files to merge the objects that we want merged. + ''' + __slots__ = ['obj'] + + def __init__(self, obj): + self.obj = obj + + def __eq__(self, other): + if isinstance(other, _CObject): + return self.obj is other.obj + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def __hash__(self): + return id(self.obj) + +class ObjectPass(Pass): + '''Generates relations for objects. This includes information about + builtin objects, including their types and members. + It also generates objects for all literal values present in the Python source.''' + + def extract(self, ast, path, writer): + self.writer = writer + try: + self._extract_py(ast) + self._extract_possible_module_names(path) + finally: + self.writer = None + + def _extract_possible_module_names(self, path): + maybe_name, _ = os.path.splitext(path) + maybe_name = maybe_name.replace(os.sep, ".") + while maybe_name.count(".") > 3: + _, maybe_name = maybe_name.split(".", 1) + while True: + if is_legal_module_name(maybe_name): + self._write_module_and_package_names(maybe_name) + if "." not in maybe_name: + return + _, maybe_name = maybe_name.split(".", 1) + + def _write_module_and_package_names(self, module_name): + self._write_c_object(module_name, None, False) + while "." in module_name: + module_name, _ = module_name.rsplit(".", 1) + self._write_c_object(module_name, None, False) + + def extract_builtin(self, module, writer): + self.writer = writer + try: + self._extract_c(module) + finally: + self.writer = None + + def _extract_c(self, mod): + self.next_address_label = 0 + self.address_labels = {} + self._write_c_object(mod, None, False) + self.address_labels = None + + def _write_str(self, s): + assert type(s) is str + self._write_c_object(s, None, False) + + def _write_c_object(self, obj, label, write_special, string_prefix=""): + ANALYSIS_MAJOR_VERSION = get_analysis_major_version() + # If we're extracting Python 2 code using Python 3, we want to treat `str` as `bytes` for + # the purposes of determining the type, but we still want to treat the _value_ as if it's a `str`. + obj_type = type(obj) + if obj_type == str and ANALYSIS_MAJOR_VERSION == 2 and 'u' not in string_prefix: + obj_type = bytes + + cobj = _CObject(obj) + if self.writer.has_written(cobj): + return self.writer.get_node_id(cobj) + obj_label = self.get_label_for_object(obj, label, obj_type) + obj_id = self.writer.get_labelled_id(cobj, obj_label) + #Avoid writing out all the basic types for every C module. + if not write_special and cobj in SPECIAL_OBJECTS: + return obj_id + type_id = self._write_c_object(obj_type, None, write_special) + self.writer.write_tuple(u'py_cobjects', 'r', obj_id) + self.writer.write_tuple(u'py_cobjecttypes', 'rr', obj_id, type_id) + self.writer.write_tuple(u'py_cobject_sources', 'rd', obj_id, 0) + if isinstance(obj, ModuleType) or isinstance(obj, type): + for name, value in sorted(obj.__dict__.items()): + if (obj, name) in SKIPLIST: + continue + val_id = self._write_c_object(value, obj_label + u'$%d' % ANALYSIS_MAJOR_VERSION + name, write_special) + self.writer.write_tuple(u'py_cmembers_versioned', 'rsrs', + obj_id, name, val_id, ANALYSIS_MAJOR_VERSION) + if isinstance(obj, type) and obj is not object: + super_id = self._write_c_object(obj.__mro__[1], None, write_special) + self.writer.write_tuple(u'py_cmembers_versioned', 'rsrs', + obj_id, u".super.", super_id, ANALYSIS_MAJOR_VERSION) + if isinstance(obj, (list, tuple)): + for index, item in enumerate(obj): + item_id = self._write_c_object(item, obj_label + u'$' + str(index), write_special) + self.writer.write_tuple(u'py_citems', 'rdr', + obj_id, index, item_id) + if type(obj) is GetSetDescriptorType: + for name in type(obj).__dict__: + if name == '__name__' or not hasattr(obj, name): + continue + val_id = self._write_c_object(getattr(obj, name), obj_label + u'$%d' % ANALYSIS_MAJOR_VERSION + name, write_special) + self.writer.write_tuple(u'py_cmembers_versioned', 'rsrs', + obj_id, name, val_id, ANALYSIS_MAJOR_VERSION) + if hasattr(obj, '__name__'): + #Use qualified names for classes. + if isinstance(obj, type): + name = qualified_type_name(obj) + # https://bugs.python.org/issue18602 + elif isinstance(obj, ModuleType) and obj.__name__ == "io": + name = "_io" + elif obj is EXEC: + name = "exec" + else: + name = obj.__name__ + self.writer.write_tuple(u'py_cobjectnames', 'rs', + obj_id, name) + elif type(obj) in NUMERIC_TYPES: + self.writer.write_tuple(u'py_cobjectnames', 'rq', + obj_id, obj) + elif type(obj) is str: + if 'b' in string_prefix: + prefix = u"b" + elif 'u' in string_prefix: + prefix = u"u" + else: + if ANALYSIS_MAJOR_VERSION == 2: + prefix = u"b" + else: + prefix = u"u" + self.writer.write_tuple(u'py_cobjectnames', 'rs', + obj_id, prefix + u"'" + obj + u"'") + elif type(obj) is bytes: + #Convert bytes to a unicode characters one-to-one. + obj_string = u"b'" + obj.decode("latin-1") + u"'" + self.writer.write_tuple(u'py_cobjectnames', 'rs', + obj_id, obj_string) + elif type(obj) is type(None): + self.writer.write_tuple(u'py_cobjectnames', 'rs', + obj_id, u'None') + else: + self.writer.write_tuple(u'py_cobjectnames', 'rs', + obj_id, u'object') + return obj_id + + def write_special_objects(self, writer): + '''Write important builtin objects to the trap file''' + self.writer = writer + self.next_address_label = 0 + self.address_labels = {} + + def write(obj, name, label=None): + obj_id = self._write_c_object(obj, label, True) + self.writer.write_tuple(u'py_special_objects', 'rs', obj_id, name) + + for obj, name in SPECIAL_OBJECTS.items(): + write(obj.obj, name) + + ###Artificial objects for use by the type-inferencer - Make sure that they are unique. + write(object(), u"_semmle_unknown_type", u"$_semmle_unknown_type") + write(object(), u"_semmle_undefined_value", u"$_semmle_undefined_value") + + self.writer = None + self.address_labels = None + + def get_label_for_object(self, obj, default_label, obj_type): + """Gets a label for an object. Attempt to make this as universal as possible. + The object graph in the database should reflect the real object graph, + only rarely diverging. This should be true even in highly parallel environments + including cases where trap files may be overwritten. + Proviso: Distinct immutable primitive objects may be merged (which should be benign) + For objects without a unambiguous global name, 'default_label' is used. + """ + #This code must be robust against (possibly intentionally) incorrect implementations + #of the object model. + if obj is None: + return u"C_None" + t = type(obj) + t_name = t.__name__ + if t is tuple and len(obj) == 0: + return u"C_EmptyTuple" + + if obj_type is str: + prefix = u"C_unicode$" + else: + prefix = u"C_bytes$" + if t is str: + obj = obj.encode("utf8", errors='replace') + return prefix + hashlib.sha1(obj).hexdigest() + if t is bytes: + return prefix + hashlib.sha1(obj).hexdigest() + if t in NUMERIC_TYPES: + return u"C_" + t_name + u"$" + repr(obj) + try: + if isinstance(obj, type): + return u"C_" + t_name + u"$" + qualified_type_name(obj) + except Exception: + #Misbehaved object. + return default_label + if t is ModuleType: + return u"C_" + t_name + u"$" + obj.__name__ + if t is type(len): + mod_name = obj.__module__ + if isinstance(mod_name, str): + if mod_name == BUILTINS_NAME: + mod_name = "builtins" + return u"C_" + t_name + u"$" + mod_name + "." + obj.__name__ + return default_label + + # Python files -- Extract objects for all numeric and string values. + + def _extract_py(self, ast): + self._walk_py(ast) + + def _write_literal(self, node): + if isinstance(node, ast.Num): + self._write_c_object(node.n, None, False) + else: + prefix = getattr(node, "prefix", "") + # Output both byte and unicode objects if the relevant objects could exist + # Non-prefixed strings can be either bytes or unicode. + if 'u' not in prefix: + try: + self._write_c_object(node.s.encode("latin-1"), None, False, string_prefix=prefix) + except UnicodeEncodeError: + #If not encodeable as latin-1 then it cannot be bytes + pass + if 'b' not in prefix: + self._write_c_object(node.s, None, False, string_prefix=prefix) + + def _walk_py(self, node): + if isinstance(node, ast.AstBase): + if isinstance(node, LITERALS): + self._write_literal(node) + else: + for _, _, child_node in iter_fields(node): + self._walk_py(child_node) + elif isinstance(node, list): + for n in node: + self._walk_py(n) + +def a_function(): + pass + +def a_generator_function(): + yield None + +class C(object): + def meth(self): + pass + +#Create an object for 'exec', as parser no longer treats it as statement. +# Use `[].append` as it has the same type as `exec`. +EXEC = [].append + +SPECIAL_OBJECTS = { + type(a_function): u"FunctionType", + type(len): u"BuiltinFunctionType", + classmethod: u"ClassMethod", + staticmethod: u"StaticMethod", + type(sys): u"ModuleType", + type(a_generator_function()): u"generator", + None: u"None", + type(None): u"NoneType", + True: u"True", + False: u"False", + bool: u"bool", + sys: u"sys", + Exception: u"Exception", + BaseException: u"BaseException", + TypeError: u"TypeError", + AttributeError: u"AttributeError", + KeyError: u"KeyError", + int: u"int", + float: u"float", + object: u"object", + type: u"type", + tuple: u"tuple", + dict: u"dict", + list: u"list", + set: u"set", + locals: u"locals", + globals: u"globals", + property: u"property", + type(list.append): u"MethodDescriptorType", + super: u"super", + type(C().meth): u"MethodType", + #For future enhancements + object(): u"_1", + object(): u"_2", + #Make sure we have all version numbers as single character strings. + b'2': u'b2', + b'3': u'b3', + u'2': u'u2', + u'3': u'u3', +} + +SPECIAL_OBJECTS[__import__(BUILTINS_NAME)] = u"builtin_module" +SPECIAL_OBJECTS[str] = u"unicode" +SPECIAL_OBJECTS[bytes] = u"bytes" + +#Store wrapped versions of special objects, so that they compare correctly. +tmp = {} +for obj, name in SPECIAL_OBJECTS.items(): + tmp[_CObject(obj)] = name +SPECIAL_OBJECTS = tmp +del tmp + +#List of various attributes VM implementation details we want to skip. +SKIPLIST = set([ + (sys, "exc_value"), + (sys, "exc_type"), + (sys, "exc_traceback"), + (__import__(BUILTINS_NAME), "_"), +]) + +def qualified_type_name(cls): + #Special case bytes/str/unicode to make sure they share names across versions + if cls is bytes: + return u"bytes" + if cls is str: + return u"unicode" + if cls.__module__ == BUILTINS_NAME or cls.__module__ == "exceptions": + return cls.__name__ + else: + return cls.__module__ + "." + cls.__name__ diff --git a/python/extractor/semmle/python/passes/pruner.py b/python/extractor/semmle/python/passes/pruner.py new file mode 100644 index 00000000000..d6363e529f1 --- /dev/null +++ b/python/extractor/semmle/python/passes/pruner.py @@ -0,0 +1,450 @@ +''' +Prune the flow-graph, eliminating edges with impossible constraints. +For example: +1. if x: +2. if x == 0: +3. pass +The edge from `x == 0` to pass (line 2 to line 3) is impossible as `x` cannot be zero to +reach line 2. + +While code like the above is unlikely in source code, it is quite common after splitting. + +''' + +from semmle.python import ast +import cmath +from collections import defaultdict + +from semmle.python.passes.ast_pass import ASTVisitor +import semmle.util as util +from semmle.python.ast import Lt, LtE, Eq, NotEq, Gt, GtE, Is, IsNot + +__all__ = [ 'do_pruning' ] + +INT_TYPES = int + +# Classes representing constraint on branches, for pruning. +# For example, the constraint `x` allows pruning and edge with the constraint `x == 0` +# since if `x` is True it cannot be zero. + +class Truthy(object): + '''A test of the form `x` or `not x`''' + + def __init__(self, sense): + self.sense = sense + + def invert(self): + return (VAR_IS_TRUE, VAR_IS_FALSE)[self.sense] + + def contradicts(self, other): + '''Holds if self and other are contradictory.''' + if self.sense: + return other.constrainsVariableToBeFalse() + else: + return other.constrainsVariableToBeTrue() + + def constrainsVariableToBeTrue(self): + '''Holds if this constrains the variable such that `bool(var) is True`''' + return self.sense + + def constrainsVariableToBeFalse(self): + '''Holds if this constrains the variable such that `bool(var) is False`''' + return not self.sense + + def __repr__(self): + return "True" if self.sense else "False" + +class IsNone(object): + '''A test of the form `x is None` or `x is not None`''' + + def __init__(self, sense): + self.sense = sense + + def contradicts(self, other): + if self is VAR_IS_NONE: + return other is VAR_IS_NOT_NONE or other is VAR_IS_TRUE + else: + return other is VAR_IS_NONE + + def invert(self): + return (VAR_IS_NONE, VAR_IS_NOT_NONE)[self.sense] + + def constrainsVariableToBeTrue(self): + return False + + def constrainsVariableToBeFalse(self): + return self is VAR_IS_NONE + + def __repr__(self): + return "Is None" if self.sense else "Is Not None" + +class ComparedToConst(object): + '''A test of the form `x == k`, `x < k`, etc.''' + + def __init__(self, op, k): + #We can treat is/is not as ==/!= as we only + #compare with simple literals which are always interned. + if op is Is: + op = Eq + elif op is IsNot: + op = NotEq + self.op = op + self.k = k + + def invert(self): + return ComparedToConst(INVERT_OP[self.op], self.k) + + def constrainsVariableToBeTrue(self): + if self.op == Eq: + return self.k != 0 + if self.op == NotEq: + return self.k == 0 + if self.op == GtE: + return self.k > 0 + if self.op == Gt: + return self.k >= 0 + if self.op == LtE: + return self.k < 0 + if self.op == Lt: + return self.k <= 0 + return False + + def constrainsVariableToBeFalse(self): + return self.op == Eq and self.k == 0 + + def contradicts(self, other): + if self.constrainsVariableToBeTrue() and other is VAR_IS_FALSE: + return True + if self.constrainsVariableToBeFalse() and other is VAR_IS_TRUE: + return True + if self.op == Eq and other is VAR_IS_NONE: + return True + if not isinstance(other, ComparedToConst): + return False + if self.op == Eq: + if other.op == NotEq: + return self.k == other.k + if other.op == Eq: + return self.k != other.k + if other.op == Lt: + return self.k >= other.k + if other.op == LtE: + return self.k > other.k + if other.op == Gt: + return self.k <= other.k + if other.op == GtE: + return self.k < other.k + return False + if self.op == Lt: + if other.op == Eq or other.op == Gt or other.op == GtE: + return self.k <= other.k + return False + if self.op == LtE: + if other.op == Eq or other.op == GtE: + return self.k < other.k + if other.op == Gt: + return self.k <= other.k + return False + if other.op in (NotEq, Gt, GtE): + return False + return other.contradicts(self) + + def __repr__(self): + return "%s %d" % (OP_NAME[self.op], self.k) + + +INVERT_OP = { + Eq: NotEq, + NotEq: Eq, + Lt: GtE, + LtE: Gt, + Gt: LtE, + GtE: Lt + } + +OP_NAME = { + Eq: "==", + NotEq: "!=", + Lt: "<", + LtE: "<=", + Gt: ">", + GtE: ">=", +} + +VAR_IS_TRUE = Truthy(True) +VAR_IS_FALSE = Truthy(False) + +VAR_IS_NONE = IsNone(True) +VAR_IS_NOT_NONE = IsNone(False) + +NAME_CONSTS = { + "True" : VAR_IS_TRUE, + "False": VAR_IS_FALSE, + "None": VAR_IS_NONE, +} + +class SkippedVisitor(ASTVisitor): + + def __init__(self): + self.nodes = set() + + def visit_Subscript(self, node): + if isinstance(node.value, ast.Name): + self.nodes.add(node.value) + + def visit_Attribute(self, node): + if isinstance(node.value, ast.Name): + self.nodes.add(node.value) + +class NonlocalVisitor(ASTVisitor): + def __init__(self): + self.names = set() + + def visit_Nonlocal(self, node): + for name in node.names: + self.names.add(name) + +class GlobalVisitor(ASTVisitor): + def __init__(self): + self.names = set() + + def visit_Global(self, node): + for name in node.names: + self.names.add(name) + +class KeptVisitor(ASTVisitor): + + def __init__(self): + self.nodes = set() + + #Keep imports + def visit_alias(self, node): + bool_const = const_value(node.value) + if bool_const is None: + return + defn = node.asname + if hasattr(defn, 'variable'): + self.nodes.add(defn) + +def skipped_variables(tree, graph, use_map): + '''Returns a collection of SsaVariables that + are skipped as possibly mutated. + + Variables are skipped if their values may be mutated + in such a way that it might alter their boolean value. + This means that they have an attribute accessed, or are subscripted. + However, modules are always true, so are never skipped. + ''' + variables = use_map.values() + skiplist = set() + v = SkippedVisitor() + v.visit(tree) + ast_skiplist = v.nodes + for node, var in use_map.items(): + if node.node in ast_skiplist: + skiplist.add(var) + v = KeptVisitor() + v.visit(tree) + ast_keeplist = v.nodes + keeplist = set() + for var in variables: + defn = graph.get_ssa_definition(var) + if defn and defn.node in ast_keeplist: + keeplist.add(var) + return skiplist - keeplist + +def get_branching_edges(tree, graph, use_map): + ''''Returns an iterator of pred, succ, var, bool tuples + representing edges and the boolean value or None-ness that + the ssa variable holds on that edge. + ''' + for pred, succ, ann in graph.edges(): + if ann not in (util.TRUE_EDGE, util.FALSE_EDGE): + continue + #Handle 'not' expressions. + invert = ann == util.FALSE_EDGE + test = pred + while isinstance(test.node, ast.UnaryOp): + if not isinstance(test.node.op, ast.Not): + break + preds = graph.pred[test] + if len(preds) != 1: + break + test = preds[0] + invert = not invert + t = comparison_kind(graph, test) + if t is None: + continue + val, use = t + if invert: + val = val.invert() + if use in use_map: + yield pred, succ, use_map[use], val + +def effective_constants_definitions(bool_const_defns, graph, branching_edges): + '''Returns a mapping of var -> list of (node, effective-constant) + representing the effective boolean constant definitions. + A constant definition is an assignment to a + SSA variable 'var' such that bool(var) is a constant + for all uses of that variable dominated by the definition. + + A (SSA) variable is effectively constant if it assigned + a constant, or it is guarded by a test. + ''' + consts = defaultdict(list) + for var in graph.ssa_variables(): + defn = graph.get_ssa_definition(var) + if not defn or defn.node not in bool_const_defns: + continue + consts[var].append((defn, bool_const_defns[defn.node])) + for pred, succ, var, bval in branching_edges: + if len(graph.pred[succ]) != 1: + continue + consts[var].append((succ, bval)) + return consts + +def do_pruning(tree, graph): + v = BoolConstVisitor() + v.visit(tree) + nonlocals = NonlocalVisitor() + nonlocals.visit(tree) + global_vars = GlobalVisitor() + global_vars.visit(tree) + bool_const_defns = v.const_defns + #Need to repeatedly do this until we reach a fixed point + while True: + use_map = {} + for node, var in graph.ssa_uses(): + if isinstance(node.node, ast.Name): + use_map[node] = var + skiplist = skipped_variables(tree, graph, use_map) + edges = list(get_branching_edges(tree, graph, use_map)) + consts = effective_constants_definitions(bool_const_defns, graph, edges) + dominated_by = {} + #Look for effectively constant definitions that dominate edges on + #which the relative variable has the inverse sense. + #Put edges to be removed in a set, as an edge could be removed for + #multiple reasons. + to_be_removed = set() + for pred, succ, var, bval in edges: + if var not in consts: + continue + if var in skiplist and bval in (VAR_IS_TRUE, VAR_IS_FALSE): + continue + if var.variable.id in nonlocals.names: + continue + if var.variable.id in global_vars.names: + continue + for defn, const_kind in consts[var]: + if not const_kind.contradicts(bval): + continue + if defn not in dominated_by: + dominated_by[defn] = graph.dominated_by(defn) + if pred in dominated_by[defn]: + to_be_removed.add((pred, succ)) + #Delete simply dead edges (like `if False: ...` ) + for pred, succ, ann in graph.edges(): + if ann == util.TRUE_EDGE: + val = VAR_IS_TRUE + elif ann == util.FALSE_EDGE: + val = VAR_IS_FALSE + else: + continue + b = const_value(pred.node) + if b is None: + continue + if b.contradicts(val): + to_be_removed.add((pred, succ)) + if not to_be_removed: + break + for pred, succ in to_be_removed: + graph.remove_edge(pred, succ) + graph.clear_computed() + +class BoolConstVisitor(ASTVisitor): + '''Look for assignments of a boolean constant to a variable. + self.const_defns holds a mapping from the AST node for the definition + to the True/False value for the constant.''' + + def __init__(self): + self.const_defns = {} + + + def visit_alias(self, node): + bool_const = const_value(node.value) + if bool_const is None: + return + defn = node.asname + if hasattr(defn, 'variable'): + self.const_defns[defn] = bool_const + + def visit_Assign(self, node): + bool_const = const_value(node.value) + if bool_const is None: + return + for defn in node.targets: + if hasattr(defn, 'variable'): + self.const_defns[defn] = bool_const + +def _comparison(test): + # Comparisons to None or ints + if isinstance(test, ast.Compare) and len(test.ops) == 1: + left = test.left + right = test.comparators[0] + if not hasattr(left, "variable"): + return None + if isinstance(right, ast.Name) and right.id == "None": + if isinstance(test.ops[0], ast.Is): + return VAR_IS_NONE + if isinstance(test.ops[0], ast.IsNot): + return VAR_IS_NOT_NONE + if isinstance(right, ast.Num) and isinstance(right.n, INT_TYPES): + return ComparedToConst(type(test.ops[0]), right.n) + return None + + +def comparison_kind(graph, test): + # Comparisons to None or ints + val = _comparison(test.node) + if val is None: + if hasattr(test.node, "variable"): + return VAR_IS_TRUE, test + return None + use_set = graph.pred[graph.pred[test][0]] + if len(use_set) != 1: + return None + use = use_set[0] + return val, use + +def const_value(ast_node): + '''Returns the boolean value of a boolean or numeric constant AST node or None if not a constant. + NaN is not a constant.''' + if isinstance(ast_node, ast.Name): + if ast_node.id in ("True", "False", "None"): + return NAME_CONSTS[ast_node.id] + else: + return None + if isinstance(ast_node, ast.ImportExpr): + #Modules always evaluate True + return VAR_IS_TRUE + if isinstance(ast_node, ast.Num): + n = ast_node.n + elif isinstance(ast_node, ast.UnaryOp): + if isinstance(ast_node.op, ast.USub) and isinstance(ast_node.operand, ast.Num): + n = ast_node.operand.n + elif isinstance(ast_node.op, ast.Not): + not_value = const_value(ast_node.operand) + if not_value is None: + return None + return not_value.invert() + else: + return None + else: + return None + + #Check for NaN, but be careful not to overflow + #Handle integers first as they may overflow cmath.isnan() + if not isinstance(n, INT_TYPES) and cmath.isnan(n): + return None + #Now have an int or a normal float or complex + return ComparedToConst(Eq, n) diff --git a/python/extractor/semmle/python/passes/splitter.py b/python/extractor/semmle/python/passes/splitter.py new file mode 100755 index 00000000000..06e4c1d19d9 --- /dev/null +++ b/python/extractor/semmle/python/passes/splitter.py @@ -0,0 +1,384 @@ +''' +Split the flow-graph to allow tests to dominate all parts of the code that depends on them. +We split on `if`s and `try`s. Either because of several tests on the same condition or +subsequent tests on a constant determined by the first condition. +E.g. + +if a: + A +B +if a: + C +becomes +if a: + A + B + C +else: + B +ensuring that A dominates C. + +or... + +try: + import foo +except: + foo = None +X +if foo: + Y +becomes +try: + import foo + X + Y +except: + foo = None + X + +To split on CFG node N we require that there exists nodes H1..Hn and N2 such that: + N and N2 are tests or conditional assignments to the same variable. + N dominates H1 .. Hn and N2 + There is no assignment to the variable between N and N2 + H1..Hn are the "split heads" of N, that is: + if N is a test, H1 and H2 are its true and false successors (there is no H3). + if N is a `try` then H1 .. Hn-1 are exists from the try body and Hn is the CFG node for the first (and only) `except` statement. + Within the region strictly dominated by N, N2 must reachable from all of H1..Hn + + For simplicity we limit n (as in Hn) to 2, but that is not required for correctness. +''' + +from collections import defaultdict + +from semmle.python import ast +from semmle.python.passes.ast_pass import iter_fields +from operator import itemgetter +from semmle.graph import FlowGraph + +MAX_SPLITS = 2 + +def do_split(ast_root, graph: FlowGraph): + '''Split the flow graph, using the AST to determine split points.''' + ast_labels = label_ast(ast_root) + cfg_labels = label_cfg(graph, ast_labels) + split_points = choose_split_points(graph, cfg_labels) + graph.split(split_points) + +class ScopedAstLabellingVisitor(object): + '''Visitor for labelling AST nodes in scope. + Does not visit nodes belonging to inner scopes (methods, etc) + ''' + + def __init__(self, labels): + self.labels = labels + self.priority = 0 + + def visit(self, node): + """Visit a node.""" + method = 'visit_' + node.__class__.__name__ + getattr(self, method, self.generic_visit)(node) + + def generic_visit(self, node): + if isinstance(node, ast.AstBase): + for _, _, value in iter_fields(node): + self.visit(value) + + def visit_Class(self, node): + #Do not visit sub-scopes + return + + visit_Function = visit_Class + + def visit_list(self, the_list): + for item in the_list: + method = 'visit_' + item.__class__.__name__ + getattr(self, method, self.generic_visit)(item) + + #Helper methods + + @staticmethod + def get_variable(expr): + '''Returns the variable of this expr. Returns None if no variable.''' + if hasattr(expr, "variable"): + return expr.variable + else: + return None + + @staticmethod + def is_const(expr): + if isinstance(expr, ast.Name): + return expr.variable.id in ("None", "True", "False") + elif isinstance(expr, ast.UnaryOp): + return ScopedAstLabellingVisitor.is_const(expr.operand) + return isinstance(expr, (ast.Num, ast.Str)) + + + +class AstLabeller(ScopedAstLabellingVisitor): + '''Visitor to label tests and assignments + for later scanning to determine split points. + ''' + + def __init__(self, *args): + ScopedAstLabellingVisitor.__init__(self, *args) + self.in_test = 0 + + def _label_for_compare(self, cmp): + if len(cmp.ops) != 1: + return None + var = self.get_variable(cmp.left) + if var is None: + var = self.get_variable(cmp.comparators[0]) + k = cmp.left + else: + k = cmp.comparators[0] + if var is not None and self.is_const(k): + self.priority += 1 + return (var, k, self.priority) + return None + + def visit_Compare(self, cmp): + label = self._label_for_compare(cmp) + if label: + self.labels[cmp].append(label) + + def visit_Name(self, name): + self.priority += 1 + if isinstance(name.ctx, ast.Store): + self.labels[name].append((name.variable, "assign", self.priority)) + elif self.in_test: + self.labels[name].append((name.variable, None, self.priority)) + + def _label_for_unary_operand(self, op): + if not isinstance(op.op, ast.Not): + return None + if isinstance(op.operand, ast.UnaryOp): + return self._label_for_unary_operand(op.operand) + elif isinstance(op.operand, ast.Name): + self.priority += 1 + return (op.operand.variable, None, self.priority) + elif isinstance(op.operand, ast.Compare): + return self._label_for_compare(op.operand) + return None + + def visit_UnaryOp(self, op): + if not self.in_test: + return + label = self._label_for_unary_operand(op) + if label: + self.labels[op].append(label) + else: + self.visit(op.operand) + + def visit_If(self, ifstmt): + # Looking for the pattern: + # if x: k = K0 else: k = K1 + # the test is the split point, but the variable is `k` + self.in_test += 1 + self.visit(ifstmt.test) + self.in_test -= 1 + self.visit(ifstmt.body) + self.visit(ifstmt.orelse) + k1 = {} + ConstantAssignmentVisitor(k1).visit(ifstmt.body) + k2 = {} + ConstantAssignmentVisitor(k2).visit(ifstmt.orelse) + k = set(k1.keys()).union(k2.keys()) + self.priority += 1 + for var in k: + val = k1[var] if var in k1 else k2[var] + self.labels[ifstmt.test].append((var, val, self.priority)) + + def visit_Try(self, stmt): + # Looking for the pattern: + # if try: k = K0 except: k = K1 + # the try is the split point, and the variable is `k` + self.generic_visit(stmt) + if not stmt.handlers or len(stmt.handlers) > 1: + return + k1 = {} + ConstantAssignmentVisitor(k1).visit(stmt.body) + k2 = {} + ConstantAssignmentVisitor(k2).visit(stmt.handlers[0]) + k = set(k1.keys()).union(k2.keys()) + self.priority += 1 + for var in k: + val = k1[var] if var in k1 else k2[var] + self.labels[stmt].append((var, val, self.priority)) + + def visit_ClassExpr(self, node): + # Don't split over class definitions, + # as the presence of multiple ClassObjects for a + # single class can be confusing. + # The same applies to function definitions. + self.priority += 1 + self.labels[node].append((None, "define", self.priority)) + + visit_FunctionExpr = visit_ClassExpr + + +class TryBodyAndHandlerVisitor(ScopedAstLabellingVisitor): + '''Visitor to gather all AST nodes under visited node + including, but not under `ExceptStmt`s.''' + + def generic_visit(self, node): + if isinstance(node, ast.AstBase): + self.labels.add(node) + for _, _, value in iter_fields(node): + self.visit(value) + + def visit_ExceptStmt(self, node): + #Do not visit node below this. + self.labels.add(node) + return + + +class ConstantAssignmentVisitor(ScopedAstLabellingVisitor): + '''Visitor to label assignments where RHS is a constant''' + + def visit_Assign(self, asgn): + if not self.is_const(asgn.value): + return + for target in asgn.targets: + if hasattr(target, "variable"): + self.labels[target.variable] = asgn.value + +def label_ast(ast_root): + '''Visits the AST, returning the labels''' + labels = defaultdict(list) + labeller = AstLabeller(labels) + labeller.generic_visit(ast_root) + return labels + +def _is_branch(node, graph: FlowGraph): + '''Holds if `node` (in `graph`) is a branch point.''' + if len(graph.succ[node]) == 2 or isinstance(node.node, ast.Try): + return True + if len(graph.succ[node]) != 1: + return False + succ = graph.succ[node][0] + if not isinstance(succ.node, ast.UnaryOp): + return False + return _is_branch(succ, graph) + + +def label_cfg(graph: FlowGraph, ast_labels): + '''Copies labels from AST to CFG for branches and assignments.''' + cfg_labels = {} + for node, _ in graph.nodes(): + if node.node not in ast_labels: + continue + labels = ast_labels[node.node] + if not labels: + continue + if _is_branch(node, graph) or labels[0][1] in ("assign", "define", "loop"): + cfg_labels[node] = labels + return cfg_labels + +def usefully_comparable_types(o1, o2): + '''Holds if a test against object o1 can provide any + meaningful information w.r.t. to a test against o2. + ''' + if o1 is None or o2 is None: + return True + return type(o1) is type(o2) + +def exits_from_subtree(head, subtree, graph: FlowGraph): + '''Returns all nodes in `subtree`, that exit + the subtree and are reachable from `head` + ''' + exits = set() + seen = set() + todo = set([head]) + while todo: + node = todo.pop() + if node in seen: + continue + seen.add(node) + if not graph.succ[node]: + continue + is_exit = True + for succ in graph.succ[node]: + if succ.node in subtree: + todo.add(succ) + is_exit = False + if is_exit: + exits.add(node) + return exits + +def get_split_heads(head, graph: FlowGraph): + '''Compute the split tails for the node `head` + That is, the set of nodes from which splitting should commence. + ''' + if isinstance(head.node, ast.Try): + try_body = set() + TryBodyAndHandlerVisitor(try_body).visit(head.node) + if head.node.handlers: + try_body.add(head.node.handlers[0]) + try_split_tails = exits_from_subtree(head, try_body, graph) + return try_split_tails + else: + return graph.succ[head] + + +def choose_split_points(graph: FlowGraph, cfg_labels): + '''Select the set of nodes to be the split heads for the graph, + from the given labels. A maximum of two points are chosen to avoid + excessive blow up. + ''' + candidates = [] + #Find pairs -- N1, N2 where N1 and N2 are tests on the same variable and the tests are similar. + labels = [] + for node, label_list in cfg_labels.items(): + for label in label_list: + labels.append((node, label[0], label[1], label[2])) + labels.sort(key=itemgetter(3)) + for first_node, first_var, first_type, first_priority in labels: + if first_type in ("assign", "define"): + continue + #Avoid splitting if any class or function is defined later in scope. + if 'define' in [type for (_, _, type, priority) in labels if priority > first_priority]: + break + for second_node, second_var, second_type, second_priority in labels: + if second_var != first_var: + continue + # First node must dominate second node to be a viable splitting candidate. + # Quick check to avoid doing pointless dominance checks. + if first_priority >= second_priority: + continue + #Avoid splitting if variable is reassigned + if second_type == "assign": + break + if not graph.strictly_dominates(first_node, second_node): + continue + if not usefully_comparable_types(first_type, second_type): + continue + split_heads = get_split_heads(first_node, graph) + if len(split_heads) != 2: + continue + # Unless both of the split heads reach the second node, + # then there is no benefit to splitting. + for head in split_heads: + if not graph.strictly_dominates(first_node, head): + break + if not graph.reaches_while_dominated(head, second_node, first_node): + break + else: + candidates.append((first_node, split_heads, first_var, first_priority)) + #Candidates is a list of (node, split-heads, variable, priority) tuples. + #Remove any duplicate nodes + candidates = deduplicate(candidates, 0, 3) + #Remove repeated splits on the same variable if more than MAX_SPLITS split and more than one variable. + if len(candidates) > MAX_SPLITS and len({c[2] for c in candidates}) > 1: + candidates = deduplicate(candidates, 2, 3) + # Return best two results, but must return in reverse priority order, + # so that splitting on one node does not remove a later one. + return [c[:2] for c in candidates[MAX_SPLITS-1::-1]] + +def deduplicate(lst, col, sort_col): + '''De-duplicate list `lst` of tuples removing all but the first tuple containing + duplicates of `col`. Sort the result on `sort_col''' + dedupped = {} + for t in reversed(lst): + dedupped[t[col]] = t + return sorted(dedupped.values(), key=itemgetter(sort_col)) diff --git a/python/extractor/semmle/python/passes/unroller.py b/python/extractor/semmle/python/passes/unroller.py new file mode 100644 index 00000000000..ffdee34dbc3 --- /dev/null +++ b/python/extractor/semmle/python/passes/unroller.py @@ -0,0 +1,181 @@ +''' +Unroll loops in the flow-graph once if we know that the iterator is not empty. +E.g. + +if seq: + for x in seq: + y = x + y # y is defined here + +or +if not seq: + raise +for x in seq: + y = x +y # y is defined here + +This is broadly analagous to splitting. +If the edge leaving the test that signifies a non-empty container dominates the loop, then we want to unroll the loop once. + +Loop unrolling will transform +A (loop header), B (loop body) --> A(first loop header), B(first loop body), C(second loop header), D(second loop body) +and is done as follows: + +Make a copy of A as C and make a copy of B as D. +Convert all edges from B to A into edges from B to C. +Convert edge from C to B to an edge from C to D. +Convert all edges from D to A into edges from D to C. + +Subsequent pruning will then remove any dead edges for iterables known to be empty or non-empty. +''' +from collections import defaultdict, namedtuple +from operator import itemgetter + +from semmle.python import ast +from semmle.python.passes.splitter import ScopedAstLabellingVisitor, label_cfg +from semmle.util import EXHAUSTED_EDGE + +class HasDefinitionInLoop(ScopedAstLabellingVisitor): + '''Check to see if a class or function definition occurs + in a loop. Note that this will prevent unrolling of a loop + if a definition occurs in any loop in scope, not just the one + to be unrolled. + ''' + + def __init__(self): + ScopedAstLabellingVisitor.__init__(self, None) + self.has_definition = False + self.in_loopbody = False + + def visit_For(self, loop): + self.visit(loop.iter) + self.in_loopbody = True + self.visit(loop.body) + self.in_loopbody = False + + def visit_ClassExpr(self, node): + # Don't split over class definitions, + # as the presence of multiple ClassObjects for a + # single class can be confusing. + # The same applies to function definitions. + if self.in_loopbody: + self.has_definition = True + + visit_FunctionExpr = visit_ClassExpr + + def __bool__(self): + return self.has_definition + +AstLabel = namedtuple("AstLabel", "variable type priority") +CfgLabel = namedtuple("CfgLabel", "node variable type priority") + +class Labeller(ScopedAstLabellingVisitor): + + def __init__(self, *args): + ScopedAstLabellingVisitor.__init__(self, *args) + self.in_test = 0 + self.in_loop = False + + def visit_If(self, ifstmt): + # Looking for tests for empty sequences. + self.in_test += 1 + self.visit(ifstmt.test) + self.in_test -= 1 + self.visit(ifstmt.body) + self.visit(ifstmt.orelse) + + def visit_UnaryOp(self, op): + if not self.in_test: + return + label = self._label_for_unary_operand(op) + if label: + self.labels[op].append(label) + else: + self.visit(op.operand) + + def _label_for_unary_operand(self, op): + if not isinstance(op.op, ast.Not): + return None + if isinstance(op.operand, ast.UnaryOp): + return self._label_for_unary_operand(op.operand) + elif isinstance(op.operand, ast.Name): + self.priority += 1 + return AstLabel(op.operand.variable, "test", self.priority) + elif isinstance(op.operand, ast.Call): + return self._label_for_call(op.operand) + return None + + def visit_Call(self, call): + if not self.in_test: + return + label = self._label_for_call(call) + if label: + self.labels[call].append(label) + return + + def _label_for_call(self, call): + #TO DO -- Check for calls to len() + pass + + def visit_For(self, loop): + self.in_loop = True + self.visit(loop.iter) + self.in_loop = False + self.visit(loop.body) + + def visit_Name(self, name): + self.priority += 1 + if self.in_test: + self.labels[name].append(AstLabel(name.variable, "test", self.priority)) + elif self.in_loop: + self.labels[name].append(AstLabel(name.variable, "loop", self.priority)) + +def do_unrolling(ast_root, graph): + #Avoid unrolling if any class or function is defined in a loop. + hasdef = HasDefinitionInLoop() + hasdef.generic_visit(ast_root) + if hasdef: + return + ast_labels = defaultdict(list) + labeller = Labeller(ast_labels) + labeller.generic_visit(ast_root) + cfg_labels = label_cfg(graph, ast_labels) + unrolls = choose_loops_to_unroll(graph, cfg_labels) + for head, body in unrolls: + graph.unroll(head, body) + + +def choose_loops_to_unroll(graph, cfg_labels): + '''Select the set of nodes to unroll.''' + candidates = [] + #Find pairs -- N1, N2 where N1 is a test on the variable and N2 is a loop over it. + labels = [] + for node, label_list in cfg_labels.items(): + for label in label_list: + labels.append(CfgLabel(node, label.variable, label.type, label.priority)) + labels.sort(key=itemgetter(3)) + for first_node, first_var, first_type, first_priority in labels: + if first_type == "loop": + continue + for second_node, second_var, second_type, second_priority in labels: + if second_var != first_var: + continue + # First node must dominate second node to be a viable unrolling candidate. + # Quick check to avoid doing pointless dominance checks. + if first_priority >= second_priority: + continue + #Avoid if second use is not a loop + if second_type != "loop": + continue + if not graph.strictly_dominates(first_node, second_node): + continue + candidates.append((second_node, second_priority)) + iters = reversed([c for c, p in sorted(candidates, key=itemgetter(1))]) + result = [] + for iter in iters: + head = graph.succ[iter][0] + for body in graph.succ[head]: + if graph.edge_annotations[head, body] != EXHAUSTED_EDGE: + result.append((head, body)) + break + return result diff --git a/python/extractor/semmle/query_gen.py b/python/extractor/semmle/query_gen.py new file mode 100644 index 00000000000..b3fc2442e8a --- /dev/null +++ b/python/extractor/semmle/query_gen.py @@ -0,0 +1,231 @@ +#Parse the dbscheme file + +#Look for comments or declarations ending with ';' + +import sys +import os.path + +from semmle.python import master + + +def singularize(name): + if name and name[-1] == 's': + return name[:-1] + elif name.endswith('_list'): + return name[:-5] + elif name.endswith('body'): + return name[:-4] + 'stmt' + else: + return name + +def singularize_text(name): + if name.endswith('block'): + return name[:-5] + 'statement' + elif name.endswith('body'): + return name[:-4] + 'statement' + elif name.endswith(' list'): + return name[:-5] + else: + return singularize(name) + +def make_fields(field_type, index): + if field_type.__name__ == 'bool': + fields = [] + else: + fields = [ 'result' ] + if field_type.is_case_type(): + fields.append('_') + fields.append('this') + if not field_type.unique_parent: + fields.append(str(index)) + return ', '.join(fields) + +def get_a(name): + name = capitalize_name(singularize(name)) + if name[0] in 'AEIOU': + return 'getAn' + name + else: + return 'getA' + name + +def indefinite_article(name): + name = capitalize_name(singularize(name)) + if name[0] in 'AEIOU': + return 'an' + else: + return 'a' + +def capitalize_name(name): + 'Capitalize name, forming camel-case from undescores' + return ''.join(part.capitalize() for part in name.split('_')) + +def name_to_query(name): + if name.startswith("is_"): + return "i" + capitalize_name(name)[1:] + else: + return "is" + capitalize_name(name) + +def longer_name(node, name, docname): + return '%s of this %s' % (docname, node.descriptive_name) + +def property_name(node, name, docname): + return '%s property of this %s' % (docname, node.descriptive_name) + +def make_getter(node, name, offset, field_type, docname, override): + txt = [u'\n'] + if field_type.__name__ == 'bool': + txt.append(u' /** Whether the %s is true. */\n' % property_name(node, name, docname)) + txt.append(u' predicate %s() {\n' % name_to_query(name)) + elif name == "location": + txt.append(u' /** Gets the %s. */\n' % longer_name(node, name, docname)) + txt.append(u' %s%s get%s() {\n'%(override , field_type.ql_name(), capitalize_name(name))) + else: + txt.append(u' /** Gets the %s. */\n' % longer_name(node, name, docname)) + txt.append(u' %s get%s() {\n'%(field_type.ql_name(), capitalize_name(name))) + if field_type.super_type: + field_type = field_type.super_type + fields = make_fields(field_type, offset) + txt.append(u' %s(%s)\n' % (field_type.relation_name(), fields)) + txt.append(u' }\n\n') + if field_type.is_list(): + item = field_type.item_type + lname = longer_name(node, singularize(name), singularize_text(docname)) + txt.append('\n') + txt.append(' /** Gets the nth %s. */\n' % lname) + txt.append(' %s get%s(int index) {\n' % + (item.ql_name(), capitalize_name(singularize(name)))) + txt.append(' result = this.get%s().getItem(index)\n' % + capitalize_name(name)) + txt.append(' }\n') + txt.append('\n') + txt.append(' /** Gets %s %s. */\n' % (indefinite_article(lname), lname)) + txt.append(' %s %s() {\n' % (item.ql_name(), get_a(name))) + txt.append(' result = this.get%s().getAnItem()\n' % + capitalize_name(name)) + txt.append(' }\n\n') + + return ''.join(txt) + +def defined_in_supertype(node, name): + if node.super_type: + for fname, _, _, _, _, _ in node.super_type.layout: + if fname == name: + return True + return False + + +def write_queries(nodes, out, lang): + parents = {} + nodes = set(nodes) + done = set() + out.write('import %s\n\n' % lang) + while nodes: + #Emit in (mostly) sorted order to reduce diffs. + node = pop_least_value(nodes) + done.add(node) + if node.is_primitive(): + continue + if node.is_list() and node.item_type.is_union_type(): + #List of unions are best ignored. + #They can be implemented manually if needed. + continue + out.write('/** INTERNAL: See the class `%s` for further information. */\n' % node.ql_name()) + out.write('class %s_ extends %s' % + (node.ql_name(), node.db_name())) + if node.super_type: + out.write(', %s' % node.super_type.ql_name()) + override = "override " if node.super_type else "" + out.write(' {\n\n') + if node.is_sub_type() and node.super_type.is_union_type(): + out.write(' %s() {\n' % node.ql_name()) + out.write(' %s(this, %d, _, _' % + (node.super_type.relation_name(), node.case_index)) + out.write(')\n') + out.write(' }\n\n') + else: + body = [] + for name, field_type, offset, docname, _, _ in node.layout: + if defined_in_supertype(node, name): + continue + body.append(make_getter(node, name, offset, field_type, docname, override)) + out.write(''.join(body)) + if node.parents: + if node.super_type and node.super_type.is_case_type(): + child_node = node.super_type + else: + child_node = node + #Ensure closure + if child_node.parents not in done: + nodes.add(child_node.parents) + if not override: + out.write(' /** Gets a parent of this %s */\n' % node.descriptive_name) + out.write(' %s%s getParent() {\n' % + (override, child_node.parents.ql_name())) + out.write(' %s(' % child_node.relation_name()) + fields = [ 'this', ] + if child_node.is_case_type(): + fields.append('_') + fields.append('result') + if not child_node.unique_parent: + fields.append('_') + out.write('%s)\n' % ', '.join(fields)) + out.write(' }\n\n') + if child_node.parents.ql_name() not in parents: + parents[child_node.parents.ql_name()] = [] + parents[child_node.parents.ql_name()].append(child_node) + if node.is_list(): + fields = [ 'result'] + item = node.item_type + if item.super_type and item.super_type.is_case_type(): + item = item.super_type + if item.is_case_type(): + fields.append('_') + fields.append('this') + fields = ', '.join(fields) + out.write(' /** Gets an item of this %s */\n' % node.descriptive_name) + out.write(' %s getAnItem() {\n' % item.ql_name()) + out.write(' %s(%s, _)\n' % + (item.relation_name(), fields)) + out.write(' }\n\n') + out.write(' /** Gets the nth item of this %s */\n' % node.descriptive_name) + out.write(' %s getItem(int index) {\n' % item.ql_name()) + out.write(' %s(%s, index)\n' % + (item.relation_name(), fields)) + out.write(' }\n\n') + if not override: + out.write(' /** Gets a textual representation of this element. */\n') + out.write(' %sstring toString() {\n' % override) + out.write(' result = "%s"\n' % node.ql_name()) + out.write(' }\n') + out.write('\n}\n\n') + out.close() + +def pop_least_value(nodes): + #This is inefficient, but it doesn't matter + res = min(nodes, key = lambda n: n.__name__) + nodes.remove(res) + return res + + +HEADER = '''/** + * This library file is auto-generated by '%s'. + * WARNING: Any modifications to this file will be lost. + * Relations can be changed by modifying master.py. + */ +''' + +def main(): + run(master) + +def run(nodes_module, lang="python"): + if len(sys.argv) != 2: + print("Usage: %s output-directory" % sys.argv[0]) + sys.exit(1) + outdir = sys.argv[1] + nodes = nodes_module.all_nodes() + outfile = os.path.join(outdir, 'AstGenerated.qll') + with open(outfile, 'w') as out: + out.write(HEADER % '/'.join(__file__.split(os.path.sep)[-2:])) + write_queries(nodes.values(), out, lang) + +if __name__ == '__main__': + main() diff --git a/python/extractor/semmle/thrift/__init__.py b/python/extractor/semmle/thrift/__init__.py new file mode 100644 index 00000000000..52c640f138c --- /dev/null +++ b/python/extractor/semmle/thrift/__init__.py @@ -0,0 +1,34 @@ +import os.path + +from .parse import Parser +from .emit import Emitter + +class Extractor(object): + + def __init__(self, trap_folder, src_archive=None): + self.parser = Parser() + self.emitter = Emitter(trap_folder) + self.src_archive = src_archive + + def _walk(self, path): + for dirpath, _, filenames in os.walk(path): + for filename in filenames: + if filename.endswith(".thrift"): + yield os.path.join(dirpath, filename) + + def extract_files(self, files): + for file in files: + self.extract_file(file) + + def extract_folder(self, path): + for file in self._walk(path): + self.extract_file(file) + + def extract_file(self, file): + with open(file, "rb") as fd: + bytes_source = fd.read() + src = bytes_source.decode('utf-8') + tree = self.parser.parse(src) + self.emitter.emit(file, tree) + if self.src_archive: + self.src_archive.write(file, bytes_source) diff --git a/python/extractor/semmle/thrift/emit.py b/python/extractor/semmle/thrift/emit.py new file mode 100644 index 00000000000..bd0c8c27faa --- /dev/null +++ b/python/extractor/semmle/thrift/emit.py @@ -0,0 +1,52 @@ + +import os.path +import csv +import re +import semmle.util + +IGNORE = re.compile("namespace|fieldreq") + +class Emitter(object): + + def __init__(self, trap_folder): + self.trap_folder = trap_folder + self.lengths = {} + self.next_id = 0 + self.uuid = semmle.util.uuid('thrift') + + def emit(self, file, tree): + trapwriter = semmle.util.TrapWriter() + vpath = self.trap_folder.get_virtual_path(file) + self.emit_recursive(trapwriter, vpath, tree, None, None) + trapwriter.write_file(vpath) + self.trap_folder.write_trap("thrift", file, trapwriter.get_compressed()) + + def emitrow(self, trapwriter, kind, *args): + if kind in self.lengths: + if len(args) != self.lengths[kind]: + raise Exception("Inconsistent row for '%s': %s, expecting %d" % (kind, args, self.lengths[kind])) + else: + self.lengths[kind] = len(args) + qpath = "thrift-"+kind + id = trapwriter.get_unique_id() + for index, value in enumerate(args): + trapwriter.write_tuple("externalData", "rsds", id, qpath, index, value) + + def emit_recursive(self, trapwriter, file, node, index, parent): + self.next_id += 1 + if hasattr(node, "type"): + tag = node.type + assert index >= 0 + name = "%s-%s-%s" % (tag, self.next_id, self.uuid) + self.emitrow(trapwriter, tag, name, index, parent, node.value, file, node.line, node.column) + else: + tag = node.data + if IGNORE.match(tag): + return + name = "%s-%s-%s" % (node.data, self.next_id, self.uuid) + for cindex, child in enumerate(node.children): + self.emit_recursive(trapwriter, file, child, cindex, name) + if index is None: + self.emitrow(trapwriter, tag, name) + else: + self.emitrow(trapwriter, tag, name, index, parent) diff --git a/python/extractor/semmle/thrift/parse.py b/python/extractor/semmle/thrift/parse.py new file mode 100644 index 00000000000..bf1379a9057 --- /dev/null +++ b/python/extractor/semmle/thrift/parse.py @@ -0,0 +1,83 @@ + +# This grammar is based on https://github.com/apache/thrift/blob/master/doc/specs/idl.md +grammar = r""" +start : document +document : header* definition* +header : include | cppinclude | namespace +include : "include" LITERAL +cppinclude : "cpp_include" LITERAL +namespace : ( "namespace" ( namespacescope name ) + | ( "smalltalk.prefix" name ) ) + | ( "php_namespace" LITERAL ) + | ( "xsd_namespace" LITERAL ) +!namespacescope : "*" | IDENTIFIER +definition : const | typedef | enum | senum | struct | union | exception | service +const : "const" fieldtype name "=" constvalue _listseparator? +typedef : "typedef" definitiontype type_annotations name type_annotations _listseparator? +enum : "enum" name "{" enumfield* "}" type_annotations +enumfield : name enumvalue type_annotations _listseparator? +enumvalue : ("=" INTCONSTANT)? +senum : "senum" name "{" senumfield* "}" +senumfield : LITERAL _listseparator? +struct : "struct" name "xsd_all"? "{" field* "}" type_annotations +name : IDENTIFIER +union : "union" name "xsd_all"? "{" field* "}" +exception : "exception" name "{" field* "}" +service : "service" name extends? "{" function* "}" type_annotations +extends : "extends" IDENTIFIER +field : fieldid fieldreq fieldtype type_annotations IDENTIFIER fieldvalue xsdfieldoptions type_annotations _listseparator? +fieldvalue : ("=" constvalue)? +fieldid : (INTCONSTANT ":")? +fieldreq : ("required" | "optional")? +?xsdfieldoptions: "xsd_optional"? "xsd_nillable"? xsdattrs? +xsdattrs : "xsd_attrs" "{" field* "}" +function : oneway functiontype name "(" field* ")" throws type_annotations _listseparator? +oneway : ("oneway")? +!functiontype : fieldtype | "void" +throws : ( "throws" "(" field* ")" )? +fieldtype : IDENTIFIER | basetype | containertype +definitiontype : IDENTIFIER | basetype | containertype +!basetype : "bool" | "byte" | "i8" | "i16" | "i32" | "i64" | "double" | "string" | "binary" | "slist" +containertype : maptype | settype | listtype +maptype : "map" cpptype? "<" fieldtype "," fieldtype ">" +settype : "set" cpptype? "<" fieldtype ">" +listtype : "list" "<" fieldtype ">" cpptype? +cpptype : "cpp_type" LITERAL +!constvalue : INTCONSTANT | DOUBLECONSTANT | LITERAL | IDENTIFIER | constlist | constmap +INTCONSTANT : ("+" | "-")? DIGIT+ +DOUBLECONSTANT : ("+" | "-")? DIGIT* "." DIGIT+ ( ("E" | "e") INTCONSTANT )? +constlist : "[" constlistelt* "]" +constlistelt : constvalue _listseparator? +constmap : "{" constmapelt* "}" +constmapelt : constvalue ":" constvalue _listseparator? + +type_annotations : ( "(" type_annotation* ")" )? +type_annotation : name "=" constvalue _listseparator? + +LITERAL : ("\"" /[^"]/* "\"") | ("'" /[^']/* "'") +IDENTIFIER : ( LETTER | "_" ) ( LETTER | DIGIT | "." | "_" )* +_listseparator : "," | ";" +LETTER : "A".."Z" | "a".."z" +DIGIT : "0".."9" +WHITESPACE : (" " | "\t" | "\r" | "\n")+ + +%import common.NEWLINE +COMMENT : "/*" /(.|\n|\r)*?/ "*/" + | "//" /(.)*/ NEWLINE + | "#" /(.)*/ NEWLINE +%ignore WHITESPACE +%ignore COMMENT +""" + + + + +from lark import Lark + +class Parser(Lark): + + def __init__(self): + Lark.__init__(self, grammar, parser="earley", lexer="standard") + +def parse(src): + return parser.parse(src) diff --git a/python/extractor/semmle/traverser.py b/python/extractor/semmle/traverser.py new file mode 100644 index 00000000000..ad8bd38ae73 --- /dev/null +++ b/python/extractor/semmle/traverser.py @@ -0,0 +1,157 @@ + +'''The traverser is the front-end of the Python extractor. It walks the file system yielding +a sequence of modules to be queued up and processed by the back-end.''' + +import re +import os.path + +from semmle.path_filters import filter_from_pattern +from semmle.util import Extractable, PY_EXTENSIONS, isdir, islink, listdir +from semmle.python import finder, modules +from semmle.worker import ExtractorFailure + +try: + FileNotFoundError +except NameError: + FileNotFoundError = IOError + +__all__ = [ 'Traverser' ] + +class Traverser(object): + '''Default iterable of extractables for the Python extractor, + as specified by the command line options and environment variables. + ''' + + def __init__(self, options, modulenames, logger): + self.paths = set() + if options.files: + py_files = options.files + for p in py_files: + if not os.path.exists(p) and not options.ignore_missing_modules: + raise FileNotFoundError("'%s' does not exist." % p) + self.paths.add(p) + self.exclude_paths = set([ os.path.abspath(f) for f in options.exclude_file ]) + self.exclude = exclude_filter_from_options(options) + self.filter = filter_from_options_and_environment(options) + self.recurse_files = options.recurse_files + self.recurse_packages = options.recursive + self.modulenames = modulenames + self.finder = finder.Finder.from_options_and_env(options, logger) + self.logger = logger + self.ignore_missing_modules = options.ignore_missing_modules + + def __iter__(self): + '''Return an iterator over all the specified files''' + for name in self.modulenames: + if not self.exclude(name): + mod = self.finder.find(name) + if mod is None: + self.logger.error("No module named '%s'.", name) + raise ExtractorFailure() + yield mod.get_extractable() + for path in self.paths: + yield Extractable.from_path(path) + for path in self.recurse_files: + for modpath in self._treewalk(path): + yield Extractable.from_path(modpath) + for name in self.recurse_packages: + mod = self.finder.find(name) + if mod is None: + if self.ignore_missing_modules: + continue + self.logger.error("Package '%s' does not exist.", name) + raise ExtractorFailure() + path = mod.path + if path is None: + self.logger.error("Package '%s' does not have a path.", name) + raise ExtractorFailure() + for modpath in self._treewalk(path): + yield Extractable.from_path(modpath) + + def _treewalk(self, path): + '''Recursively walk the directory tree, skipping sym-links and + hidden files and directories.''' + #Note that if a path is both explicitly specified *and* specifically excluded, + #then the inclusion takes priority + + path = os.path.abspath(path) + self.logger.debug("Traversing %s", path) + filenames = listdir(path) + for filename in filenames: + fullpath = os.path.join(path, filename) + if islink(fullpath): + self.logger.debug("Ignoring %s (symlink)", fullpath) + continue + if isdir(fullpath): + if fullpath in self.exclude_paths or is_hidden(fullpath): + if is_hidden(fullpath): + self.logger.debug("Ignoring %s (hidden)", fullpath) + else: + self.logger.debug("Ignoring %s (excluded)", fullpath) + else: + empty = True + for item in self._treewalk(fullpath): + yield item + empty = False + if not empty: + yield fullpath + elif self.filter(fullpath): + yield fullpath + else: + self.logger.debug("Ignoring %s (filter)", fullpath) + + +if os.name== 'nt': + import ctypes + + def is_hidden(path): + #Magical windows code + try: + attrs = ctypes.windll.kernel32.GetFileAttributesW(str(path)) + if attrs == -1: + return False + if attrs&2: + return True + except Exception: + #Not sure what to log here, probably best to carry on. + pass + return os.path.basename(path).startswith(".") + +else: + + def is_hidden(path): + return os.path.basename(path).startswith(".") + + +def exclude_filter_from_options(options): + if options.exclude_package: + choices = '|'.join(mod.replace('.', r'\.') for mod in options.exclude_package) + pattern = r'(?:%s)(?:\..+)?' % choices + if options.exclude_pattern: + pattern = '^((?:%s)|(?:%s))$' % (pattern, options.exclude_pattern) + else: + pattern = '^%s$' % pattern + elif options.exclude_pattern: + pattern = '^(?:%s)$' % options.exclude_pattern + else: + def no_filter(name): + return False + return no_filter + matcher = re.compile(pattern) + def exclude_filter(name): + return name is not None and bool(matcher.match(name)) + return exclude_filter + +def base_filter(path): + _, ext = os.path.splitext(path) + return ext in PY_EXTENSIONS or not ext and modules.is_script(path) + +def filter_from_options_and_environment(options): + the_filter = base_filter + filter_prefix = "" + src_path = os.environ.get("LGTM_SRC", None) + if src_path is not None: + filter_prefix = os.path.join(src_path, "") + for line in options.path_filter: + the_filter = filter_from_pattern(line, the_filter, filter_prefix) + return the_filter diff --git a/python/extractor/semmle/util.py b/python/extractor/semmle/util.py new file mode 100644 index 00000000000..85868a79351 --- /dev/null +++ b/python/extractor/semmle/util.py @@ -0,0 +1,574 @@ +import sys +import codecs +import gzip +import re +import os.path +import random +import base64 +import hashlib +from io import BytesIO + +#Semantic version of extractor. +#Update this if any changes are made +VERSION = "6.1.1" + +PY_EXTENSIONS = ".py", ".pyw" + +STDLIB_PATH = os.path.dirname(os.__file__) + +def get_analysis_version(): + return PYTHON_ANALYSIS_VERSION + +def get_analysis_major_version(): + return PYTHON_ANALYSIS_MAJOR_VERSION + +def update_analysis_version(version): + global PYTHON_ANALYSIS_VERSION + PYTHON_ANALYSIS_VERSION = version + global PYTHON_ANALYSIS_MAJOR_VERSION + PYTHON_ANALYSIS_MAJOR_VERSION = 2 if PYTHON_ANALYSIS_VERSION.startswith("2") else 3 + +update_analysis_version(os.environ.get("CODEQL_EXTRACTOR_PYTHON_ANALYSIS_VERSION", "3")) + +#Flow graph labels: +#These should be powers of two, to allow use of bitsets. +NORMAL_EDGE = 1 +FALSE_EDGE = 2 +TRUE_EDGE = 4 +EXCEPTIONAL_EDGE = 8 +EXHAUSTED_EDGE = 16 + +class SemmleError(Exception): + 'Custom Error class, for reporting errors.' + pass + +#Define our own printf function to avoid Python2/3 problems. +def printf(fmt, *args): + 'Format arguments using % operator and print to sys.stdout' + sys.stdout.write(fmt % args) + +def fprintf(fout, fmt, *args): + 'Format arguments using % operator and print to file' + fout.write(fmt % args) + +def safe_string(txt): + #Replace all characters after the first 10k + if len(txt) > 10000: + txt = txt[:10000] + u"..." + return txt.replace(u'"', u'""') + +def escaped_string(txt): + return txt.replace(u'"', u'""') + + +if os.name == 'nt': + + MAGIC_PREFIX = u"\\\\?\\" + + def safe_path(path): + 'Returns an absolute path, safe for use on all OSes regardless of length.' + if path.startswith(MAGIC_PREFIX): + return path + return MAGIC_PREFIX + os.path.abspath(path) + + _open = open + + def open(path, *args): + assert safe_path(path) == path + return _open(path, *args) + +else: + + def safe_path(path): + 'Returns an absolute path, safe for use on all OSes regardless of length.' + if os.path.isabs(path): + return path + return os.path.abspath(path) + +AUTO_GEN_STRING = "/* AUTO GENERATED PART STARTS HERE */\n" + +def folder_tag(name): + return name + ';folder' + +def trap_id_escape(s): + """Escapes characters that are interpreted specially in TRAP IDs""" + s = s.replace("&", "&") + s = s.replace("{", "{") + s = s.replace("}", "}") + s = s.replace('"', """) + s = s.replace('@', "@") + s = s.replace('#', "#") + return s + +def generate_formatting_function(fmt): + '''Generate a new function that writes its arguments with the given format. + For example, for the format string "dd", this function will create the following function: + def format_ss(self, name, arg0, arg1): + self.out.write(u'%s(%s %s)\\n' % (name, str(arg0), str(arg1))) + ''' + func_name = 'format_' + fmt + args = ['self', 'name'] + [ 'arg%d' % i for i in range(len(fmt)) ] + defn = 'def %s(%s):\n' % (func_name, ', '.join(args)) + values = [ _formatting_functions[f](a) for f, a in zip(fmt, args[2:])] + format_string = "u'%s(" + ', '.join(['%s'] * len(fmt)) + ")\\n'" + body = ' self.out.write(%s %% (%s))\n' % (format_string, ',\n'.join(['name'] + values)) + func = defn + body + namespace = globals() + exec (func, namespace) + function = namespace[func_name] + del namespace[func_name] + return function + +def _format_d(val): + return 'repr(%s)' % val + +def _format_g(val): + return 'self.pool.get(%s, %s)' % (val, val) + +def _format_n(val): + return '''self.pool.get(%s, %s.trap_name) if hasattr(%s, 'trap_name') else self.pool.get(%s)''' % (val, val, val, val) + +def _format_r(val): + return val + +def _format_u(val): + return '''_INVALID_RE.sub(u'\uFFFD', u'"%%s"' %% safe_string(%s))''' % val + +def _format_b(val): + return '''u'"%%s"' %% safe_string(%s.decode("latin-1"))''' % val + +def _format_s(val): + return '''%s if isinstance(%s, bytes) else _INVALID_RE.sub(u'\uFFFD', u'"%%s"' %% safe_string(str(%s)))''' % (_format_b(val), val, val) + +def _format_B(val): + return '''u'"%%s"' %% escaped_string(%s.decode("latin-1"))''' % val + +def _format_S(val): + return '''%s if isinstance(%s, bytes) else _INVALID_RE.sub(u'\uFFFD', u'"%%s"' %% escaped_string(str(%s)))''' % (_format_B(val), val, val) + +def _format_x(val): + return '''(u"false", u"true")[%s]''' % val + +def _format_q(val): + return 'format_numeric_literal(%s)' % val + +_formatting_functions = { + 'b' : _format_b, + 'd' : _format_d, + 'g' : _format_g, + 'n' : _format_n, + 'r' : _format_r, + 's' : _format_s, + 'u' : _format_u, + 'x' : _format_x, + 'q' : _format_q, + 'B' : _format_B, + 'S' : _format_S, +} + + +def format_numeric_literal(val): + txt = repr(val) + return u'"%s"' % txt + +class Buffer(object): + def __init__(self, out): + self.out = out + self.buf = [] + + def write(self, content): + self.buf.append(content) + if len(self.buf) > 10000: + self.flush() + + def close(self): + self.flush() + self.out.close() + + def flush(self): + self.out.write(u''.join(self.buf)) + self.buf = [] + +class Utf8Zip(object): + + def __init__(self): + self.raw = BytesIO() + gout = gzip.GzipFile('', 'wb', 5, fileobj=self.raw) + self.out = codecs.getwriter('utf-8')(gout, errors='backslashreplace') + + def write(self, data): + self.out.write(data) + + def close(self): + self.out.close() + + def getvalue(self): + return self.raw.getvalue() + + +class TrapWriter(object): + + _format_functions = {} + + def __init__(self): + self.zip = Utf8Zip() + self.out = Buffer(self.zip) + self.pool = IDPool(self.out) + self.written_containers = {} + + def write_tuple(self, name, fmt, *args): + '''Write tuple accepts the following format characters: + 'b' : A bytes object. Limits the resulting string to ~10k. + 'd' : An integer + 'g' : A unicode object, as a globally shared object + 'n' : A node object (any AST, flow or variable node) + 'r' : "Raw", a precomputed id or similar. + 's' : Any object to be written as a unicode string. Limits the string to ~10k. + 'u' : A unicode object, as a string + 'x' : A boolean + 'B' : Like 'b' but not limited to 10k + 'S' : Like 's' but not limited to 10k + ''' + if fmt in self._format_functions: + return self._format_functions[fmt](self, name, *args) + func = generate_formatting_function(fmt) + self._format_functions[fmt] = func + return func(self, name, *args) + + def get_node_id(self, node): + if hasattr(node, 'trap_name'): + return self.pool.get(node, node.trap_name) + else: + return self.pool.get(node) + + def has_written(self, node): + return node in self.pool.pool + + def get_unique_id(self): + return self.pool.get_unique_id() + + '''Return an id that is shared across trap files, + whenever the label is used''' + def get_labelled_id(self, obj, label): + return self.pool.get(obj, label) + + def write_container(self, fullpath, is_file): + if fullpath in self.written_containers: + return self.written_containers[fullpath] + folder, filename = os.path.split(fullpath) + if is_file: + tag = get_source_file_tag(fullpath) + self.write_tuple(u'files', 'gs', tag, fullpath) + else: + tag = get_folder_tag(fullpath) + self.write_tuple(u'folders', 'gs', tag, fullpath) + self.written_containers[fullpath] = tag + if folder and filename: + folder_tag = self.write_container(folder, False) + self.write_tuple(u'containerparent' , 'gg', folder_tag, tag) + return tag + + def write_file(self, fullpath): + '''Writes `files` tuple plus all container tuples, up to the root. + Returns the tag. + Records tuples written to avoid duplication. + ''' + return self.write_container(fullpath, True) + + def write_folder(self, fullpath): + '''Writes `folders` tuple plus all container tuples, up to the root. + Returns the tag. + Records tuples written to avoid duplication. + ''' + return self.write_container(fullpath, False) + + def get_compressed(self): + '''Returns the gzipped compressed, utf-8 encoded contents of this trap file. + Closes the underlying zip stream, which means that no more tuples can be added.''' + self.out.close() + return self.zip.getvalue() + + def write_comment(self, text): + self.out.write(u'// %s\n' % text) + +# RegEx to find invalid characters +_INVALID_RE = re.compile(u'[^\u0000-\uD7FF\uE000-\uFFFF]', re.UNICODE) + +class _HashableList(object): + 'Utility class for handling lists in the IDPool' + + def __init__(self, items): + self.items = items + + def __eq__(self, other): + if not isinstance(other, _HashableList): + return False + return self.items is other.items + + def __ne__(self, other): + if not isinstance(other, _HashableList): + return True + return self.items is not other.items + + def __hash__(self): + return id(self.items) + +class IDPool(object): + + def __init__(self, out, init_id = 10000): + self.out = out + self.pool = {} + self.next_id = init_id + + def get_unique_id(self): + res = u'#' + str(self.next_id) + self.out.write(res + u' = *\n') + self.next_id += 1 + return res + + def get(self, node, name=None): + """Gets the ID for the given node, creating a new one if necessary. + Inside name (if supplied), the characters &, {, }, ", @, and # will be escaped, + as these have special meaning in TRAP IDs + """ + #Need to special case lists as they are unhashable + if type(node) is list: + node = _HashableList(node) + if node in self.pool: + return self.pool[node] + next_id = (u'#' + + str(self.next_id)) + if name is not None: + name = str(name) + name = u'@"%s"' % safe_string(trap_id_escape(name)) + else: + name = u'*' + self.out.write(u"%s = %s\n" % (next_id, name)) + self.pool[node] = next_id + self.next_id += 1 + return next_id + + +def get_folder_tag(folder): + return '/'.join(folder.split(os.path.sep)) + ';folder' + + +def get_source_file_tag(fullpath): + return fullpath, sys.getfilesystemencoding() + u';sourcefile' + +def makedirs(path): + try: + os.makedirs(path) + except OSError: + #If directory does not exist then error was a real one. + if not os.path.isdir(path): + raise + +def clean_cache(subdir, suffix, verbose): + #Remove any pre-existing cached files as they are now out of date + if os.path.exists(subdir): + for filename in os.listdir(subdir): + if not filename.endswith(suffix): + continue + filepath = os.path.join(subdir, filename) + try: + if verbose: + print ("Deleting stale trap file: " + filepath) + os.remove(filepath) + except Exception as ex: + if verbose: + msg = "Failed to remove stale trap file %s due to %s" + print (msg % (filepath, repr(ex))) + else: + makedirs(subdir) + +if os.name == 'nt': + + def storage_path(container, path): + ''' Returns a path in a source archive, trap-output or trap-cache.''' + path = path.replace(":", "_") + if os.path.isabs(path): + path = path[1:] + return safe_path(os.path.join(container, path)) + + def isdir(path): + if len(path) > 240: + path = "\\\\?\\" + path + return os.path.isdir(path) + + def islink(path): + if len(path) > 240: + path = "\\\\?\\" + path + return os.path.islink(path) + + def listdir(path): + if len(path) > 240: + path = "\\\\?\\" + path + return os.listdir(path) + +else: + + def storage_path(container, path): + ''' Returns a path in a source archive, trap-output or trap-cache.''' + if os.path.isabs(path): + path = path[1:] + return safe_path(os.path.join(container, path)) + + isdir = os.path.isdir + islink = os.path.islink + listdir = os.listdir + + +LATIN1 = codecs.lookup("latin-1") +UTF8 = codecs.lookup("utf-8") + +def was_interned_ascii_bytes(txt): + return txt is sys.intern(txt[:]) + +def is_a_number(txt): + try: + float(txt) + return True + except ValueError: + return False + + +#Should only be set to True for debugging and testing +USE_INTOLERANT_ENCODING = False + +def change_default_encoding(): + + if USE_INTOLERANT_ENCODING: + + def _decode(input, errors=None): + '''If the input is interned (program source) or a number, then it is safe to implicitly convert it. + Otherwise it may not be, so raise an exception''' + if not was_interned_ascii_bytes(input) and not is_a_number(input): + f = sys._getframe(1) + if "semmle" in f.f_code.co_filename: + raise SemmleError(b"Implicit decode of '%s' at %s:%d" % (input, f.f_code.co_filename, f.f_lineno)) + try: + return UTF8.decode(input) + except UnicodeDecodeError: + return LATIN1.decode(input) + + def _encode(input, errors=None): + f = sys._getframe(1) + if "semmle" in f.f_code.co_filename: + raise SemmleError("Implicit encode of '%s' at %s:%d" % (UTF8.encode(input), f.f_code.co_filename, f.f_lineno)) + return UTF8.encode(input, "backslashreplace") + + else: + + def _decode(input, errors=None): + '''Convert bytes to unicode without failing.''' + try: + return UTF8.decode(input) + except UnicodeDecodeError: + return LATIN1.decode(input) + + def _encode(input, errors=None): + '''Convert unicode to bytes without failing.''' + return UTF8.encode(input, "backslashreplace") + + def search(name): + if name != "safe": + return None + return codecs.CodecInfo(_encode, _decode, name="safe") + codecs.register(search) + from importlib import reload + reload(sys) + sys.setdefaultencoding("safe") + del sys.setdefaultencoding + +_sys_rand = random.SystemRandom() + +def uuid(local_name): + '''Return a randomised string to use as a UUID. + Do not use the uuid module as it calls out to ldconfig, + which is prohibited in some sandboxed environments. + ''' + hex_string = hex(_sys_rand.randrange(1 << 256)) + #Strip leading '0x' + return hex_string[2:] + "-" + local_name + + +class Extractable(object): + '''Extractable class representing a Extractable of extraction. + Typically a file, but may be other things like a built-in Python module. + ''' + + def __ne__(self, other): + return not self == other + + @staticmethod + def from_path(path): + if os.path.isdir(path): + return FolderExtractable(path) + elif os.path.isfile(path): + return FileExtractable(path) + else: + raise IOError("% does not exist" % path) + +class PathExtractable(Extractable): + + PATTERN = 421706893 + + __slots__ = [ 'path' ] + + def __init__(self, path): + assert "" not in path + self.path = path + + def __eq__(self, other): + return isinstance(other, type(self)) and self.path == other.path + + def __hash__(self): + return hash(self.path) ^ self.PATTERN + +class FileExtractable(PathExtractable): + + PATTERN = 1903946595 + + __slots__ = [ 'path' ] + + def __str__(self): + return "file " + self.path + + def __repr__(self): + return "FileExtractable(%r)" % self.path + + +class FolderExtractable(PathExtractable): + + PATTERN = 712343093 + + __slots__ = [ 'path' ] + + def __str__(self): + return "folder " + self.path + + def __repr__(self): + return "FolderExtractable(%r)" % self.path + +class BuiltinModuleExtractable(Extractable): + + __slots__ = [ 'name' ] + + def __init__(self, name): + self.name = name + + def __str__(self): + return "module " + self.name + + def __repr__(self): + return "BuiltinModuleExtractable(%r)" % self.name + + def __eq__(self, other): + return isinstance(other, BuiltinModuleExtractable) and self.name == other.name + + def __hash__(self): + return hash(self.name) ^ 82753421 + +def base64digest(code): + return base64.b64encode(hashlib.sha1(code.encode("utf8")).digest(), b"_-").decode("ascii") diff --git a/python/extractor/semmle/worker.py b/python/extractor/semmle/worker.py new file mode 100644 index 00000000000..1207caf6727 --- /dev/null +++ b/python/extractor/semmle/worker.py @@ -0,0 +1,305 @@ +import sys, os +from collections import deque, defaultdict +import time +import multiprocessing as mp +import json + +from queue import Empty as _Empty +from queue import Full as _Full + +from semmle.extractors import SuperExtractor, ModulePrinter, SkippedBuiltin +from semmle.profiling import get_profiler +from semmle.path_rename import renamer_from_options_and_env +from semmle.logging import WARN, recursion_error_message, internal_error_message, Logger + +class ExtractorFailure(Exception): + 'Generic exception representing the failure of an extractor.' + pass + + +class ModuleImportGraph(object): + + def __init__(self, max_depth): + self.modules = {} + self.succ = defaultdict(set) + self.todo = set() + self.done = set() + self.max_depth = max_depth + + def add_root(self, mod): + self.modules[mod] = 0 + if mod not in self.done: + self.todo.add(mod) + + def add_import(self, mod, imported): + assert mod in self.modules + self.succ[mod].add(imported) + if imported in self.modules: + if self.modules[imported] > self.modules[mod] + 1: + self._reduce_depth(imported, self.modules[mod] + 1) + else: + if self.modules[mod] < self.max_depth and imported not in self.done: + self.todo.add(imported) + self.modules[imported] = self.modules[mod] + 1 + + def _reduce_depth(self, mod, depth): + if self.modules[mod] <= depth: + return + if depth > self.max_depth: + return + if mod not in self.done: + self.todo.add(mod) + self.modules[mod] = depth + for imp in self.succ[mod]: + self._reduce_depth(imp, depth+1) + + def get(self): + mod = self.todo.pop() + assert not mod in self.done and self.modules[mod] <= self.max_depth + self.done.add(mod) + return mod + + def push_back(self, mod): + self.done.remove(mod) + self.todo.add(mod) + + def empty(self): + return not self.todo + +class ExtractorPool(object): + '''Pool of worker processes running extractors''' + + def __init__(self, outdir, archive, proc_count, options, logger: Logger): + if proc_count < 1: + raise ValueError("Number of processes must be at least one.") + self.verbose = options.verbose + self.outdir = outdir + self.max_import_depth = options.max_import_depth + # macOS does not support `fork` properly, so we must use `spawn` instead. + method = 'spawn' if sys.platform == "darwin" else None + try: + ctx = mp.get_context(method) + except AttributeError: + # `get_context` doesn't exist -- we must be running an old version of Python. + ctx = mp + #Keep queue short to minimise delay when stopping + self.module_queue = ctx.Queue(proc_count*2) + self.reply_queue = ctx.Queue(proc_count*20) + self.archive = archive + self.local_queue = deque() + self.enqueued = set() + self.done = set() + self.requirements = {} + self.import_graph = ModuleImportGraph(options.max_import_depth) + logger.debug("Source archive: %s", archive) + self.logger = logger + DiagnosticsWriter.create_output_dir() + args = (self.module_queue, outdir, archive, options, self.reply_queue, logger) + self.procs = [ + ctx.Process(target=_extract_loop, args=(n+1,) + args + (n == 0,)) for n in range(proc_count) + ] + for p in self.procs: + p.start() + self.start_time = time.time() + + def extract(self, the_traverser): + '''Extract all the files from the given traverser, + and all the imported files up to the depth specified + by the options. + ''' + self.logger.trace("Starting traversal") + for mod in the_traverser: + self.import_graph.add_root(mod) + self.try_to_send() + self.receive(False) + #Prime the queue + while self.try_to_send(): + pass + while self.enqueued or not self.import_graph.empty(): + self.try_to_send() + self.receive(True) + + def try_to_send(self): + if self.import_graph.empty(): + return False + module = self.import_graph.get() + try: + self.module_queue.put(module, False) + self.enqueued.add(module) + self.logger.debug("Enqueued %s", module) + return True + except _Full: + self.import_graph.push_back(module) + return False + + def receive(self, block=False): + try: + what, mod, imp = self.reply_queue.get(block) + if what == "INTERRUPT": + self.logger.debug("Main process received interrupt") + raise KeyboardInterrupt + elif what == "UNRECOVERABLE_FAILURE": + raise ExtractorFailure(str(mod)) + elif what == "FAILURE": + self.enqueued.remove(mod) + elif what == "SUCCESS": + self.enqueued.remove(mod) + else: + assert what == "IMPORT" + assert mod is not None + if imp is None: + self.logger.warning("Unexpected None as import.") + else: + self.import_graph.add_import(mod, imp) + except _Empty: + #Nothing in reply queue. + pass + + def close(self): + self.logger.debug("Closing down workers") + assert not self.enqueued + for p in self.procs: + self.module_queue.put(None) + for p in self.procs: + p.join() + self.logger.info("Processed %d modules in %0.2fs", len(self.import_graph.done), time.time() - self.start_time) + + def stop(self, timeout=2.0): + '''Stop the worker pool, reasonably promptly and as cleanly as possible.''' + try: + _drain_queue(self.module_queue) + for p in self.procs: + self.module_queue.put(None) + _drain_queue(self.reply_queue) + end = time.time() + timeout + running = set(self.procs) + while running and time.time() < end: + time.sleep(0.1) + _drain_queue(self.reply_queue) + running = {p for p in running if p.is_alive()} + if running: + for index, proc in enumerate(self.procs, 1): + if proc.is_alive(): + self.logger.error("Process %d timed out", index) + except Exception as ex: + self.logger.error("Unexpected error when stopping %s", ex) + + @staticmethod + def from_options(options, trap_dir, archive, logger: Logger): + '''Convenience method to create extractor pool from options.''' + cpus = mp.cpu_count() + procs = options.max_procs + if procs == 'all': + procs = cpus + elif procs is None or procs == 'half': + procs = (cpus+1)//2 + else: + procs = int(procs) + return ExtractorPool(trap_dir, archive, procs, options, logger) + +def _drain_queue(queue): + try: + while True: + queue.get(False) + except _Empty: + #Emptied queue as best we can. + pass + +class DiagnosticsWriter(object): + def __init__(self, proc_id): + self.proc_id = proc_id + + def write(self, message): + dir = os.environ.get("CODEQL_EXTRACTOR_PYTHON_DIAGNOSTIC_DIR") + if dir: + with open(os.path.join(dir, "worker-%d.jsonl" % self.proc_id), "a") as output_file: + output_file.write(json.dumps(message.to_dict()) + "\n") + + @staticmethod + def create_output_dir(): + dir = os.environ.get("CODEQL_EXTRACTOR_PYTHON_DIAGNOSTIC_DIR") + if dir: + os.makedirs(os.environ["CODEQL_EXTRACTOR_PYTHON_DIAGNOSTIC_DIR"], exist_ok=True) + + + +# Function run by worker processes +def _extract_loop(proc_id, queue, trap_dir, archive, options, reply_queue, logger: Logger, write_global_data): + diagnostics_writer = DiagnosticsWriter(proc_id) + send_time = 0 + recv_time = 0 + extraction_time = 0 + + # use utf-8 as the character encoding for stdout/stderr to be able to properly + # log/print things on systems that use bad default encodings (windows). + sys.stdout.reconfigure(encoding='utf-8') + sys.stderr.reconfigure(encoding='utf-8') + + try: + renamer = renamer_from_options_and_env(options, logger) + except Exception as ex: + logger.error("Exception: %s", ex) + reply_queue.put(("INTERRUPT", None, None)) + sys.exit(2) + logger.set_process_id(proc_id) + try: + if options.trace_only: + extractor = ModulePrinter(options, trap_dir, archive, renamer, logger) + else: + extractor = SuperExtractor(options, trap_dir, archive, renamer, logger, diagnostics_writer) + profiler = get_profiler(options, id, logger) + with profiler: + while True: + start_recv = time.time() + unit = queue.get() + recv_time += time.time() - start_recv + if unit is None: + if write_global_data: + extractor.write_global_data() + extractor.close() + return + try: + start = time.time() + imports = extractor.process(unit) + end_time = time.time() + extraction_time += end_time - start + if imports is SkippedBuiltin: + logger.info("Skipped built-in %s", unit) + else: + for imp in imports: + reply_queue.put(("IMPORT", unit, imp)) + send_time += time.time() - end_time + logger.info("Extracted %s in %0.0fms", unit, (end_time-start)*1000) + except SyntaxError as ex: + # Syntax errors have already been handled in extractor.py + reply_queue.put(("FAILURE", unit, None)) + except RecursionError as ex: + error = recursion_error_message(ex, unit) + diagnostics_writer.write(error) + logger.error("Failed to extract %s: %s", unit, ex) + logger.traceback(WARN) + reply_queue.put(("FAILURE", unit, None)) + except Exception as ex: + error = internal_error_message(ex, unit) + diagnostics_writer.write(error) + logger.error("Failed to extract %s: %s", unit, ex) + logger.traceback(WARN) + reply_queue.put(("FAILURE", unit, None)) + else: + reply_queue.put(("SUCCESS", unit, None)) + except KeyboardInterrupt: + logger.debug("Worker process received interrupt") + reply_queue.put(("INTERRUPT", None, None)) + except Exception as ex: + logger.error("Exception: %s", ex) + reply_queue.put(("INTERRUPT", None, None)) + # Avoid deadlock and speed up termination by clearing queue. + try: + while True: + msg = queue.get(False) + if msg is None: + break + except _Empty: + #Cleared queue enough to avoid deadlock. + pass + sys.exit(2) diff --git a/python/extractor/setup.py b/python/extractor/setup.py new file mode 100644 index 00000000000..f93051d7cd0 --- /dev/null +++ b/python/extractor/setup.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python + +#This file needs to be able to handle all versions of Python we are likely to encounter +#Which is probably 3.0 and upwards + +'''Run buildtools/install.py''' + +import sys +import os +import subprocess +from python_tracer import getzipfilename + +if 'SEMMLE_DIST' in os.environ: + if 'CODEQL_EXTRACTOR_PYTHON_ROOT' not in os.environ: + os.environ['CODEQL_EXTRACTOR_PYTHON_ROOT'] = os.environ['SEMMLE_DIST'] +else: + os.environ["SEMMLE_DIST"] = os.environ["CODEQL_EXTRACTOR_PYTHON_ROOT"] + +tools = os.path.join(os.environ['SEMMLE_DIST'], "tools") +zippath = os.path.join(tools, getzipfilename()) +sys.path = [ zippath ] + sys.path + +# these are imported from the zip +from buildtools.discover import discover +import buildtools.install + +def main(): + version, root, requirement_files = discover() + buildtools.install.main(version, root, requirement_files) + + +if __name__ == "__main__": + main() diff --git a/python/extractor/test.py b/python/extractor/test.py new file mode 100644 index 00000000000..2f774569753 --- /dev/null +++ b/python/extractor/test.py @@ -0,0 +1 @@ +match() diff --git a/python/extractor/tests/__init__.py b/python/extractor/tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/buildtools/__init__.py b/python/extractor/tests/buildtools/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/buildtools/helper.py b/python/extractor/tests/buildtools/helper.py new file mode 100644 index 00000000000..9ac738a5197 --- /dev/null +++ b/python/extractor/tests/buildtools/helper.py @@ -0,0 +1,102 @@ +import os +import stat +import tempfile +import shutil +import time +import sys +import subprocess +from contextlib import contextmanager +from functools import wraps + + +# Would have liked to use a decorator, but for Python 2 the functools.wraps is not good enough for +# signature preservation that pytest can figure out what is going on. It would be possible to use +# the decorator package, but that seemed like a bit too much of a hassle. +@contextmanager +def in_fresh_temp_dir(): + old_cwd = os.getcwd() + with managed_temp_dir('extractor-python-buildtools-test-') as tmp: + os.chdir(tmp) + try: + yield tmp + finally: + os.chdir(old_cwd) + + +@contextmanager +def managed_temp_dir(prefix=None): + dir = tempfile.mkdtemp(prefix=prefix) + try: + yield dir + finally: + rmtree_robust(dir) + + +def rmtree_robust(dir): + if is_windows(): + # It's important that the path is a Unicode path on Windows, so + # that the right system calls get used. + dir = u'' + dir + if not dir.startswith("\\\\?\\"): + dir = "\\\\?\\" + os.path.abspath(dir) + + # Emulate Python 3 "nonlocal" keyword + class state: pass + state.last_failed_delete = None + + + def _rmtree(path): + """wrapper of shutil.rmtree to handle Python 3.12 rename (onerror => onexc)""" + if sys.version_info >= (3, 12): + shutil.rmtree(path, onexc=remove_error) + else: + shutil.rmtree(path, onerror=remove_error) + + def remove_error(func, path, excinfo): + # If we get an error twice in a row for the same path then just give up. + if state.last_failed_delete == path: + return + state.last_failed_delete = path + + # The problem could be one of permissions, so setting path writable + # might fix it. + os.chmod(path, stat.S_IWRITE) + + # On Windows, we sometimes get errors about directories not being + # empty, but immediately afterwards they are empty. Waiting a bit + # might therefore be sufficient. + t = 0.1 + while (True): + try: + if os.path.isdir(path): + _rmtree(path) + else: + os.remove(path) + except OSError: + if (t > 1): + return # Give up + time.sleep(t) + t *= 2 + _rmtree(dir) + # On Windows, attempting to write immediately after deletion may result in + # an 'access denied' exception, so wait a bit. + if is_windows(): + time.sleep(0.5) + + +def is_windows(): + return os.name == 'nt' + + +@contextmanager +def copy_repo_dir(repo_dir_in): + with managed_temp_dir(prefix="extractor-python-buildtools-test-") as tmp: + repo_dir = os.path.join(tmp, 'repo') + print('copying', repo_dir_in, 'to', repo_dir) + shutil.copytree(repo_dir_in, repo_dir, symlinks=True) + yield repo_dir + +################################################################################ + + +DEVNULL = subprocess.DEVNULL diff --git a/python/extractor/tests/buildtools/test_index.py b/python/extractor/tests/buildtools/test_index.py new file mode 100644 index 00000000000..a0a6e09a952 --- /dev/null +++ b/python/extractor/tests/buildtools/test_index.py @@ -0,0 +1,169 @@ +import os +import pytest +import shutil +import glob + +import buildtools.index +from tests.buildtools.helper import in_fresh_temp_dir + +# we use `monkeypatch.setenv` instead of setting `os.environ` directly, since that produces +# cross-talk between tests. (using mock.patch.dict is only available for Python 3) + + +class TestIncludeOptions: + @staticmethod + def test_LGTM_SRC(monkeypatch): + monkeypatch.setenv("LGTM_SRC", "path/src") + assert buildtools.index.get_include_options() == ["-R", "path/src"] + + @staticmethod + def test_LGTM_INDEX_INCLUDE(monkeypatch): + monkeypatch.setenv("LGTM_INDEX_INCLUDE", "/foo\n/bar") + assert buildtools.index.get_include_options() == ["-R", "/foo", "-R", "/bar"] + + +class TestPip21_3: + @staticmethod + def test_no_build_dir(monkeypatch): + with in_fresh_temp_dir() as path: + os.makedirs(os.path.join(path, "src")) + monkeypatch.setenv("LGTM_SRC", path) + assert buildtools.index.exclude_pip_21_3_build_dir_options() == [] + + @staticmethod + def test_faked_build_dir(monkeypatch): + # since I don't want to introduce specific pip version on our + # testing infrastructure, I'm just going to fake that `pip install .` had + # been called. + with in_fresh_temp_dir() as path: + os.makedirs(os.path.join(path, "build", "lib")) + monkeypatch.setenv("LGTM_SRC", path) + expected = ["-Y", os.path.join(path, "build")] + assert buildtools.index.exclude_pip_21_3_build_dir_options() == expected + + @staticmethod + def test_disable_environment_variable(monkeypatch): + monkeypatch.setenv( + "CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_PIP_BUILD_DIR_EXCLUDE", "1" + ) + with in_fresh_temp_dir() as path: + os.makedirs(os.path.join(path, "build", "lib")) + monkeypatch.setenv("LGTM_SRC", path) + assert buildtools.index.exclude_pip_21_3_build_dir_options() == [] + + @staticmethod + def test_code_build_dir(monkeypatch): + # simulating that you have the module `mypkg.build.lib.foo` + with in_fresh_temp_dir() as path: + os.makedirs(os.path.join(path, "mypkg", "build", "lib")) + open(os.path.join(path, "mypkg", "build", "lib", "foo.py"), "wt").write("print(42)") + open(os.path.join(path, "mypkg", "build", "lib", "__init__.py"), "wt").write("") + open(os.path.join(path, "mypkg", "build", "__init__.py"), "wt").write("") + open(os.path.join(path, "mypkg", "__init__.py"), "wt").write("") + + monkeypatch.setenv("LGTM_SRC", path) + assert buildtools.index.exclude_pip_21_3_build_dir_options() == [] + + +def create_fake_venv(path, is_unix): + os.makedirs(path) + open(os.path.join(path, "pyvenv.cfg"), "wt").write("") + if is_unix: + os.mkdir(os.path.join(path, "bin")) + open(os.path.join(path, "bin", "activate"), "wt").write("") + os.makedirs(os.path.join(path, "lib", "python3.10", "site-packages")) + else: + os.mkdir(os.path.join(path, "Scripts")) + open(os.path.join(path, "Scripts", "activate.bat"), "wt").write("") + os.makedirs(os.path.join(path, "Lib", "site-packages")) + +class TestVenvIgnore: + @staticmethod + def test_no_venv(monkeypatch): + with in_fresh_temp_dir() as path: + monkeypatch.setenv("LGTM_SRC", path) + assert buildtools.index.exclude_venvs_options() == [] + + @staticmethod + @pytest.mark.parametrize("is_unix", [True,False]) + def test_faked_venv_dir(monkeypatch, is_unix): + with in_fresh_temp_dir() as path: + create_fake_venv(os.path.join(path, "venv"), is_unix=is_unix) + monkeypatch.setenv("LGTM_SRC", path) + assert buildtools.index.exclude_venvs_options() == ["-Y", os.path.join(path, "venv")] + + @staticmethod + @pytest.mark.parametrize("is_unix", [True,False]) + def test_multiple_faked_venv_dirs(monkeypatch, is_unix): + with in_fresh_temp_dir() as path: + create_fake_venv(os.path.join(path, "venv"), is_unix=is_unix) + create_fake_venv(os.path.join(path, "venv2"), is_unix=is_unix) + + monkeypatch.setenv("LGTM_SRC", path) + + expected = [ + "-Y", os.path.join(path, "venv"), + "-Y", os.path.join(path, "venv2"), + ] + + actual = buildtools.index.exclude_venvs_options() + assert sorted(actual) == sorted(expected) + + @staticmethod + def test_faked_venv_dir_no_pyvenv_cfg(monkeypatch): + """ + Some times, the `pyvenv.cfg` file is not included when a virtual environment is + added to a git-repo, but we should be able to ignore the venv anyway. + + See + - https://github.com/FiacreT/M-moire/tree/4089755191ffc848614247e98bbb641c1933450d/osintplatform/testNeo/venv + - https://github.com/Lynchie/KCM/tree/ea9eeed07e0c9eec41f9fc7480ce90390ee09876/VENV + """ + with in_fresh_temp_dir() as path: + create_fake_venv(os.path.join(path, "venv"), is_unix=True) + monkeypatch.setenv("LGTM_SRC", path) + os.remove(os.path.join(path, "venv", "pyvenv.cfg")) + assert buildtools.index.exclude_venvs_options() == ["-Y", os.path.join(path, "venv")] + + @staticmethod + def test_faked_venv_no_bin_dir(monkeypatch): + """ + Some times, the activate script is not included when a virtual environment is + added to a git-repo, but we should be able to ignore the venv anyway. + """ + + with in_fresh_temp_dir() as path: + create_fake_venv(os.path.join(path, "venv"), is_unix=True) + monkeypatch.setenv("LGTM_SRC", path) + bin_dir = os.path.join(path, "venv", "bin") + assert os.path.isdir(bin_dir) + shutil.rmtree(bin_dir) + assert buildtools.index.exclude_venvs_options() == ["-Y", os.path.join(path, "venv")] + + @staticmethod + def test_faked_venv_dir_no_lib_python(monkeypatch): + """ + If there are no `lib/pyhton*` dirs within a unix venv, then it doesn't + constitute a functional virtual environment, and we don't exclude it. That's not + going to hurt, since it won't contain any installed packages. + """ + + with in_fresh_temp_dir() as path: + create_fake_venv(os.path.join(path, "venv"), is_unix=True) + monkeypatch.setenv("LGTM_SRC", path) + glob_res = glob.glob(os.path.join(path, "venv", "lib", "python*")) + assert glob_res + for d in glob_res: + shutil.rmtree(d) + assert buildtools.index.exclude_venvs_options() == [] + + @staticmethod + @pytest.mark.parametrize("is_unix", [True,False]) + def test_disable_environment_variable(monkeypatch, is_unix): + monkeypatch.setenv( + "CODEQL_EXTRACTOR_PYTHON_DISABLE_AUTOMATIC_VENV_EXCLUDE", "1" + ) + with in_fresh_temp_dir() as path: + create_fake_venv(os.path.join(path, "venv"), is_unix=is_unix) + monkeypatch.setenv("LGTM_SRC", path) + assert buildtools.index.exclude_venvs_options() == [] diff --git a/python/extractor/tests/buildtools/test_install.py b/python/extractor/tests/buildtools/test_install.py new file mode 100644 index 00000000000..3950e6e853a --- /dev/null +++ b/python/extractor/tests/buildtools/test_install.py @@ -0,0 +1,16 @@ +import pytest + +import buildtools.install +from tests.buildtools.helper import in_fresh_temp_dir + +def test_basic(monkeypatch, mocker): + mocker.patch('subprocess.call') + mocker.patch('subprocess.check_call') + + with in_fresh_temp_dir() as path: + monkeypatch.setenv('LGTM_WORKSPACE', path) + monkeypatch.setenv('SEMMLE_DIST', '') + + with pytest.raises(SystemExit) as exc_info: + buildtools.install.main(3, '.', []) + assert exc_info.value.code == 0 diff --git a/python/extractor/tests/buildtools/test_python_auto_install.py b/python/extractor/tests/buildtools/test_python_auto_install.py new file mode 100755 index 00000000000..277b25475c0 --- /dev/null +++ b/python/extractor/tests/buildtools/test_python_auto_install.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +import buildtools.semmle.requirements as requirements +import unittest + +class RequirementsTests(unittest.TestCase): + + def assertExpected(self, reqs, expected): + self.assertEqual(str(reqs), str(requirements.parse(expected.splitlines()))) + + _input = """\ + SQLAlchemy<1.1.0,>=1.0.10 # MIT + sqlalchemy-migrate>=0.9.6 # Apache-2.0 + stevedore>=1.10.0a4 # Apache-2.0 + WebOb>1.2.3 # MIT + oslo.i18n!=2.1.0,==2.0.7 # Apache-2.0 + foo>=0.9,<0.8 # Contradictory + bar>=1.3, <1.3 # Contradictory, but only just + baz>=3 # No dot in version number. + git+https://github.com/mozilla/elasticutils.git # Requirement in Git. Should be ignored. + -e git+https://github.com/Lasagne/Lasagne.git@8f4f9b2#egg=Lasagne==0.2.git # Another Git requirement. + """ + + def test_clean(self): + reqs = requirements.parse(self._input.splitlines()) + expected = """\ + SQLAlchemy<1.1.0,>=1.0.10 + sqlalchemy-migrate>=0.9.6 + stevedore>=1.10.0a4 + WebOb>1.2.3 + oslo.i18n!=2.1.0,==2.0.7 + foo>=0.9 + bar>=1.3 + baz>=3 + """ + self.assertExpected(requirements.clean(reqs), expected) + + def test_restricted(self): + reqs = requirements.parse(self._input.splitlines()) + expected = """\ + SQLAlchemy<1.1.0,>=1.0.10,==1.* + sqlalchemy-migrate>=0.9.6,==0.* + stevedore>=1.10.0a4,==1.* + WebOb>1.2.3,==1.* + oslo.i18n!=2.1.0,==2.0.7 + foo>=0.9,==0.* + bar>=1.3,==1.* + baz==3.*,>=3 + """ + self.assertExpected(requirements.restrict(reqs), expected) + +if __name__ == "__main__": + unittest.main() diff --git a/python/extractor/tests/buildtools/test_version.py b/python/extractor/tests/buildtools/test_version.py new file mode 100644 index 00000000000..8a3c05e7c0e --- /dev/null +++ b/python/extractor/tests/buildtools/test_version.py @@ -0,0 +1,244 @@ +import os +import re +from textwrap import dedent +import itertools + +import pytest + +import buildtools.version as version +from tests.buildtools.helper import in_fresh_temp_dir + + +class TestTravisVersion: + + # based on https://docs.travis-ci.com/user/customizing-the-build/#build-matrix + # and https://docs.travis-ci.com/user/languages/python/ + + def test_simple(self): + with in_fresh_temp_dir(): + assert version.travis_version('.') is None + + + @pytest.mark.parametrize( + 'name,expected,travis_file',[ + ('empty', None, ''), + ('no_python', None, dedent("""\ + language: ruby + rvm: + - 2.5 + - 2.6 + """)), + + ('both', None, dedent("""\ + language: python + python: + - "2.6" + - "2.7" + - "3.5" + - "3.6" + """)), + + ('only_py2', 2, dedent("""\ + language: python + python: + - "2.6" + - "2.7" + """)), + + ('only_py3', 3, dedent("""\ + language: python + python: + - "3.5" + - "3.6" + """)), + + ('jobs_both', None, dedent("""\ + language: python + jobs: + include: + - python: 2.6 + - python: 2.7 + - python: 3.5 + - python: 3.6 + """)), + + ('jobs_only_py2', 2, dedent("""\ + language: python + jobs: + include: + - python: 2.6 + - python: 2.7 + """)), + + ('jobs_only_py3', 3, dedent("""\ + language: python + jobs: + include: + - python: 3.5 + - python: 3.6 + """)), + + ('top_level_and_jobs', None, dedent("""\ + language: python + python: + - "2.6" + - "2.7" + jobs: + include: + - python: 3.5 + - python: 3.6 + """)), + + ('jobs_unrelated', 2, dedent("""\ + language: python + python: + - "2.6" + - "2.7" + jobs: + include: + - env: FOO=FOO + - env: FOO=BAR + """)), + + ('jobs_no_python', None, dedent("""\ + language: ruby + jobs: + include: + - rvm: 2.5 + - rvm: 2.6 + """)), + + # matrix is the old name for jobs (still supported as of 2019-11) + ('matrix_only_py3', 3, dedent("""\ + language: python + matrix: + include: + - python: 3.5 + - python: 3.6 + """)), + + ('quoted_py2', 2, dedent("""\ + language: python + python: + - "2.7" + """)), + + ('unquoted_py2', 2, dedent("""\ + language: python + python: + - 2.7 + """)), + ]) + def test_with_file(self, name, expected, travis_file): + with in_fresh_temp_dir(): + with open('.travis.yml', 'w') as f: + f.write(travis_file) + assert version.travis_version('.') is expected, name + + def test_filesnames(self): + """Should prefer .travis.yml over travis.yml (which we still support for some legacy reason) + """ + with in_fresh_temp_dir(): + with open('travis.yml', 'w') as f: + f.write(dedent("""\ + language: python + python: + - "2.6" + - "2.7" + """)) + assert version.travis_version('.') is 2 + + with open('.travis.yml', 'w') as f: + f.write(dedent("""\ + language: python + python: + - "3.5" + - "3.6" + """)) + assert version.travis_version('.') is 3 +class TestTroveVersion: + + def test_empty(self): + with in_fresh_temp_dir(): + assert version.trove_version('.') is None + + def test_with_file(self): + def _to_file(classifiers): + with open('setup.py', 'wt') as f: + f.write(dedent("""\ + setup( + classifiers={!r} + ) + """.format(classifiers) + )) + + cases = [ + (2, "Programming Language :: Python :: 2.7"), + (2, "Programming Language :: Python :: 2"), + (2, "Programming Language :: Python :: 2 :: Only"), + (3, "Programming Language :: Python :: 3.7"), + (3, "Programming Language :: Python :: 3"), + (3, "Programming Language :: Python :: 3 :: Only"), + ] + + for expected, classifier in cases: + with in_fresh_temp_dir(): + _to_file([classifier]) + assert version.trove_version('.') == expected + + for combination in itertools.combinations(cases, 2): + with in_fresh_temp_dir(): + versions, classifiers = zip(*combination) + _to_file(classifiers) + expected = 3 if 3 in versions else 2 + assert version.trove_version('.') == expected + + @pytest.mark.xfail() + def test_tricked_regex_is_too_simple(self): + with in_fresh_temp_dir(): + with open('setup.py', 'wt') as f: + f.write(dedent("""\ + setup( + name='Programming Language :: Python :: 2', + classifiers=[], + ) + """ + )) + assert version.trove_version('.') is None + + @pytest.mark.xfail() + def test_tricked_regex_is_too_simple2(self): + with in_fresh_temp_dir(): + with open('setup.py', 'wt') as f: + f.write(dedent("""\ + setup( + # classifiers=['Programming Language :: Python :: 2'], + ) + """ + )) + assert version.trove_version('.') is None + + @pytest.mark.xfail() + def test_tricked_not_running_as_code(self): + with in_fresh_temp_dir(): + with open('setup.py', 'wt') as f: + f.write(dedent("""\ + c = 'Programming Language :: ' + 'Python :: 2' + setup( + classifiers=[c], + ) + """ + )) + assert version.trove_version('.') is 2 + + def test_constructing_other_place(self): + with in_fresh_temp_dir(): + with open('setup.py', 'wt') as f: + f.write(dedent("""\ + c = 'Programming Language :: Python :: 2' + setup( + classifiers=[c], + ) + """ + )) + assert version.trove_version('.') is 2 diff --git a/python/extractor/tests/data-imports/mod1.py b/python/extractor/tests/data-imports/mod1.py new file mode 100644 index 00000000000..176f846316c --- /dev/null +++ b/python/extractor/tests/data-imports/mod1.py @@ -0,0 +1 @@ +import mod2 diff --git a/python/extractor/tests/data-imports/mod2.py b/python/extractor/tests/data-imports/mod2.py new file mode 100644 index 00000000000..5267ffc7b38 --- /dev/null +++ b/python/extractor/tests/data-imports/mod2.py @@ -0,0 +1,2 @@ +import mod3 +import mod4 diff --git a/python/extractor/tests/data-imports/mod3.py b/python/extractor/tests/data-imports/mod3.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data-imports/mod4.py b/python/extractor/tests/data-imports/mod4.py new file mode 100644 index 00000000000..0ec7223a8a1 --- /dev/null +++ b/python/extractor/tests/data-imports/mod4.py @@ -0,0 +1 @@ +import mod5 diff --git a/python/extractor/tests/data-imports/mod5.py b/python/extractor/tests/data-imports/mod5.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data-imports/mod6.py b/python/extractor/tests/data-imports/mod6.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/mod1.py b/python/extractor/tests/data/mod1.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/mod11.py b/python/extractor/tests/data/mod11.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/mod2.py b/python/extractor/tests/data/mod2.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/package/__init__.py b/python/extractor/tests/data/package/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/package/sub/__init__.py b/python/extractor/tests/data/package/sub/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/package/sub/a.py b/python/extractor/tests/data/package/sub/a.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/package/sub/b.py b/python/extractor/tests/data/package/sub/b.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/package/sub2.py b/python/extractor/tests/data/package/sub2.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/package/x.py b/python/extractor/tests/data/package/x.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/data/package/y.py b/python/extractor/tests/data/package/y.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/dot-py/why.py/__init__.py b/python/extractor/tests/dot-py/why.py/__init__.py new file mode 100644 index 00000000000..58ce32f636d --- /dev/null +++ b/python/extractor/tests/dot-py/why.py/__init__.py @@ -0,0 +1,2 @@ +import a +import why diff --git a/python/extractor/tests/dot-py/why.py/a.py b/python/extractor/tests/dot-py/why.py/a.py new file mode 100644 index 00000000000..7d4290a117a --- /dev/null +++ b/python/extractor/tests/dot-py/why.py/a.py @@ -0,0 +1 @@ +x = 1 diff --git a/python/extractor/tests/lgtm_src/x.py b/python/extractor/tests/lgtm_src/x.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/lgtm_src/y.py b/python/extractor/tests/lgtm_src/y.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/off-path/nameless.py b/python/extractor/tests/off-path/nameless.py new file mode 100644 index 00000000000..6b209ec6830 --- /dev/null +++ b/python/extractor/tests/off-path/nameless.py @@ -0,0 +1,2 @@ +import mod1 +import mod2 diff --git a/python/extractor/tests/parser/alternating.py b/python/extractor/tests/parser/alternating.py new file mode 100644 index 00000000000..bf0f8de518d --- /dev/null +++ b/python/extractor/tests/parser/alternating.py @@ -0,0 +1 @@ +(0, [1, (2, [3, (4, [5, 6])])]) diff --git a/python/extractor/tests/parser/assignment.py b/python/extractor/tests/parser/assignment.py new file mode 100644 index 00000000000..c47eec4dd0d --- /dev/null +++ b/python/extractor/tests/parser/assignment.py @@ -0,0 +1,17 @@ + +#foo[bar].baz[(quux := 5)] = 5 +foo = 5 + +baz, quux = 1, 2 + +blah : int = 5 + +just_the_type : float + +x, y = z, w = 3, 4 + +(a, (b, (c, (d, e)))) = (j, (k, (l, (m, n)))) + +s, *t = u + +o,p, = q,r, diff --git a/python/extractor/tests/parser/call.py b/python/extractor/tests/parser/call.py new file mode 100644 index 00000000000..efd14a8c422 --- /dev/null +++ b/python/extractor/tests/parser/call.py @@ -0,0 +1,11 @@ +foo(x,y,z=1,w=2) + +bar()()() + +baz(2+2, kw = 3*4) + +a(*b, **c) + +d(e,) + +f(g.h[i]) diff --git a/python/extractor/tests/parser/class.py b/python/extractor/tests/parser/class.py new file mode 100644 index 00000000000..d1d4694fb3f --- /dev/null +++ b/python/extractor/tests/parser/class.py @@ -0,0 +1,2 @@ +class Foo(int, object, metaclass=type): + x = 5 diff --git a/python/extractor/tests/parser/collections.py b/python/extractor/tests/parser/collections.py new file mode 100644 index 00000000000..4e570fd0adc --- /dev/null +++ b/python/extractor/tests/parser/collections.py @@ -0,0 +1,37 @@ +() + +[] + +{} + +[1,2,3] + +(4,5,6) + +{7: 8, 9: 10, 11: 12} + +{13, 14, 15} + +a = {x:y} + +b = {z:w, **a} + +c = [k,l,*m] + +(o,) + +(p,q,r,) + +s, + +t, u, + +(#comment + v, w +#comment +) + +(#comment + x, y, +#comment +) diff --git a/python/extractor/tests/parser/comment-in-args.py b/python/extractor/tests/parser/comment-in-args.py new file mode 100644 index 00000000000..d5e4400d02e --- /dev/null +++ b/python/extractor/tests/parser/comment-in-args.py @@ -0,0 +1,15 @@ +""" +At the time this test was added, when either comment 2 or comment 3 was present, this +would cause the TSG parser to have an error. +""" + +# comment 0 +print( + # comment 1 + ( + # comment 2 + 1 + # comment 3 +) +# comment 4 +) diff --git a/python/extractor/tests/parser/comprehensions.py b/python/extractor/tests/parser/comprehensions.py new file mode 100644 index 00000000000..52de5828467 --- /dev/null +++ b/python/extractor/tests/parser/comprehensions.py @@ -0,0 +1,57 @@ +(a + for b in c + if d + if e + for f in g + if h + if i +) + +(a1 for b1 in c1) + +(a2 for b2 in c2 if d2) + +[k + for l in m + if n + if o + for p in q + if r + if s +] + +[k1 for l1 in m1] + +[k2 for l2 in m2 if n2] + +{p + for q in r + if s + if t + for u in v + if w + if x +} + +{p1 for q1 in r1} + +{p2 for q2 in r2 if s2} + + +{k3: v3 + for l3 in m3 + if n3 + if o3 + for p3 in q3 + if r3 + if s3 +} + +{k4: v4 for l4 in m4} + +{k5: v5 for l5 in m5 if n5} + +# Special case for generator expressions inside calls +t = tuple(x for y in z) + +[( t, ) for v in w] diff --git a/python/extractor/tests/parser/empty.py b/python/extractor/tests/parser/empty.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/parser/exception_groups_new.expected b/python/extractor/tests/parser/exception_groups_new.expected new file mode 100644 index 00000000000..1d2de92755f --- /dev/null +++ b/python/extractor/tests/parser/exception_groups_new.expected @@ -0,0 +1,136 @@ +Module: [1, 0] - [22, 0] + body: [ + Try: [1, 0] - [1, 4] + body: [ + Expr: [2, 4] - [2, 5] + value: + Name: [2, 4] - [2, 5] + variable: Variable('a', None) + ctx: Load + Expr: [3, 4] - [3, 5] + value: + Name: [3, 4] - [3, 5] + variable: Variable('b', None) + ctx: Load + ] + orelse: [ + Expr: [17, 4] - [17, 5] + value: + Name: [17, 4] - [17, 5] + variable: Variable('s', None) + ctx: Load + Expr: [18, 4] - [18, 5] + value: + Name: [18, 4] - [18, 5] + variable: Variable('t', None) + ctx: Load + ] + handlers: [ + ExceptGroupStmt: [4, 0] - [6, 5] + type: + Name: [4, 8] - [4, 9] + variable: Variable('c', None) + ctx: Load + name: None + body: [ + Expr: [5, 4] - [5, 5] + value: + Name: [5, 4] - [5, 5] + variable: Variable('d', None) + ctx: Load + Expr: [6, 4] - [6, 5] + value: + Name: [6, 4] - [6, 5] + variable: Variable('e', None) + ctx: Load + ] + ExceptGroupStmt: [7, 0] - [9, 5] + type: + Name: [7, 8] - [7, 9] + variable: Variable('f', None) + ctx: Load + name: + Name: [7, 13] - [7, 14] + variable: Variable('g', None) + ctx: Store + body: [ + Expr: [8, 4] - [8, 5] + value: + Name: [8, 4] - [8, 5] + variable: Variable('h', None) + ctx: Load + Expr: [9, 4] - [9, 5] + value: + Name: [9, 4] - [9, 5] + variable: Variable('i', None) + ctx: Load + ] + ExceptGroupStmt: [10, 0] - [12, 5] + type: + Tuple: [10, 9] - [10, 13] + elts: [ + Name: [10, 9] - [10, 10] + variable: Variable('j', None) + ctx: Load + Name: [10, 12] - [10, 13] + variable: Variable('k', None) + ctx: Load + ] + ctx: Load + parenthesised: True + name: None + body: [ + Expr: [11, 4] - [11, 5] + value: + Name: [11, 4] - [11, 5] + variable: Variable('l', None) + ctx: Load + Expr: [12, 4] - [12, 5] + value: + Name: [12, 4] - [12, 5] + variable: Variable('m', None) + ctx: Load + ] + ExceptGroupStmt: [13, 0] - [15, 5] + type: + Tuple: [13, 9] - [13, 13] + elts: [ + Name: [13, 9] - [13, 10] + variable: Variable('n', None) + ctx: Load + Name: [13, 12] - [13, 13] + variable: Variable('o', None) + ctx: Load + ] + ctx: Load + parenthesised: True + name: + Name: [13, 18] - [13, 19] + variable: Variable('p', None) + ctx: Store + body: [ + Expr: [14, 4] - [14, 5] + value: + Name: [14, 4] - [14, 5] + variable: Variable('q', None) + ctx: Load + Expr: [15, 4] - [15, 5] + value: + Name: [15, 4] - [15, 5] + variable: Variable('r', None) + ctx: Load + ] + ] + finalbody: [ + Expr: [20, 4] - [20, 5] + value: + Name: [20, 4] - [20, 5] + variable: Variable('u', None) + ctx: Load + Expr: [21, 4] - [21, 5] + value: + Name: [21, 4] - [21, 5] + variable: Variable('v', None) + ctx: Load + ] + ] diff --git a/python/extractor/tests/parser/exception_groups_new.py b/python/extractor/tests/parser/exception_groups_new.py new file mode 100644 index 00000000000..f24e3b00f4e --- /dev/null +++ b/python/extractor/tests/parser/exception_groups_new.py @@ -0,0 +1,21 @@ +try: + a + b +except* c: + d + e +except* f as g: + h + i +except* (j, k): + l + m +except* (n, o) as p: + q + r +else: + s + t +finally: + u + v diff --git a/python/extractor/tests/parser/exceptions.py b/python/extractor/tests/parser/exceptions.py new file mode 100644 index 00000000000..fe1ca679e6a --- /dev/null +++ b/python/extractor/tests/parser/exceptions.py @@ -0,0 +1,18 @@ +try: + a + b +except c as d: + e + f +except g: + h + i +except: + j + k +else: + l + m +finally: + n + o diff --git a/python/extractor/tests/parser/expressions.py b/python/extractor/tests/parser/expressions.py new file mode 100644 index 00000000000..67f53351265 --- /dev/null +++ b/python/extractor/tests/parser/expressions.py @@ -0,0 +1,14 @@ +1 + +2 + 3 + +4 * 5 / 6 + +(7 + 8) * 9 + +(10, 11) +( 12, 13 ) + +14 , 15 + +(match := 16) diff --git a/python/extractor/tests/parser/for.py b/python/extractor/tests/parser/for.py new file mode 100644 index 00000000000..ccd3f9209cd --- /dev/null +++ b/python/extractor/tests/parser/for.py @@ -0,0 +1,15 @@ +async for x in y: + if z: continue + if w: break +else: + v + +for ham in eggs: + spam + +for (a,b) in c: + pass + +for d, *e in f: + pass + diff --git a/python/extractor/tests/parser/functions.py b/python/extractor/tests/parser/functions.py new file mode 100644 index 00000000000..126c952917e --- /dev/null +++ b/python/extractor/tests/parser/functions.py @@ -0,0 +1,58 @@ +def a(b): pass +def c(*d): pass + +def foo(a, b, c=d, e:f, g:h=i, *j) -> t: + x + y + +def foo(l): + pass + +def bar(*k): + x1 + y1 + +def bar(*k, l, m:n, o:p=q, r=s, **u): + x1 + y1 + +def klef(*): pass + +def main(): pass + +@dec1(a,b) +@dec2(c,d) +def func(e,f,g): + h + i + + +lambda: a + +lambda b: c + +lambda d, *e: f + +lambda *g, h: i + +lambda j=k: l + +lambda *m: n + +lambda **o: p + +lambda *p, q=r: s + +def typed_dictionary_splat(**kw : KEYWORD): + pass +def typed_list_splat(*args : ARGS): + pass + +@False or True +def decorated(): pass + +def all_separators(pos_only, /, pos_or_keyword, *, keyword_only): pass + +@decorator #comment +def decorated_with_comment(): + pass diff --git a/python/extractor/tests/parser/if.py b/python/extractor/tests/parser/if.py new file mode 100644 index 00000000000..8cd53c19e67 --- /dev/null +++ b/python/extractor/tests/parser/if.py @@ -0,0 +1,11 @@ +if x: do_x +elif y: do_y +elif z: do_z +else: do_else + +if a and b: + c +# comment +elif d or e: + f + diff --git a/python/extractor/tests/parser/just_comments.py b/python/extractor/tests/parser/just_comments.py new file mode 100644 index 00000000000..4a6128a7a82 --- /dev/null +++ b/python/extractor/tests/parser/just_comments.py @@ -0,0 +1,8 @@ +# This is a comment +# it goes on for many lines... +# (Well, okay. Three lines.) + +# Here's one that's separated with some whitespace. + +# More whitespace at the end. + diff --git a/python/extractor/tests/parser/just_newlines.py b/python/extractor/tests/parser/just_newlines.py new file mode 100644 index 00000000000..b28b04f6431 --- /dev/null +++ b/python/extractor/tests/parser/just_newlines.py @@ -0,0 +1,3 @@ + + + diff --git a/python/extractor/tests/parser/match_new.expected b/python/extractor/tests/parser/match_new.expected new file mode 100644 index 00000000000..b71bda010ba --- /dev/null +++ b/python/extractor/tests/parser/match_new.expected @@ -0,0 +1,382 @@ +Module: [1, 0] - [43, 0] + body: [ + Match: [1, 0] - [3, 19] + subject: + List: [1, 6] - [1, 11] + elts: [ + Num: [1, 7] - [1, 8] + n: 1 + text: '1' + Num: [1, 9] - [1, 10] + n: 2 + text: '2' + ] + ctx: Load + cases: [ + Case: [2, 4] - [3, 19] + pattern: + MatchSequencePattern: [2, 9] - [2, 15] + patterns: [ + MatchCapturePattern: [2, 10] - [2, 11] + variable: + Name: [2, 10] - [2, 11] + variable: Variable('a', None) + ctx: Store + MatchCapturePattern: [2, 13] - [2, 14] + variable: + Name: [2, 13] - [2, 14] + variable: Variable('b', None) + ctx: Store + ] + guard: None + body: [ + Expr: [3, 8] - [3, 19] + value: + Call: [3, 8] - [3, 19] + func: + Name: [3, 8] - [3, 13] + variable: Variable('print', None) + ctx: Load + positional_args: [ + Name: [3, 14] - [3, 15] + variable: Variable('b', None) + ctx: Load + Name: [3, 17] - [3, 18] + variable: Variable('a', None) + ctx: Load + ] + named_args: [] + ] + ] + Match: [5, 0] - [15, 12] + subject: + BinOp: [5, 6] - [5, 10] + left: + Num: [5, 6] - [5, 7] + n: 1 + text: '1' + op: Add + right: + Num: [5, 8] - [5, 10] + n: 2j + text: '2j' + cases: [ + Case: [6, 4] - [7, 12] + pattern: + MatchLiteralPattern: [6, 9] - [6, 13] + literal: + BinOp: [6, 9] - [6, 13] + left: + Num: [6, 9] - [6, 10] + n: 1 + text: '1' + op: Add + right: + Num: [6, 11] - [6, 13] + n: 2j + text: '2j' + guard: None + body: [ + Pass: [7, 8] - [7, 12] + ] + Case: [8, 4] - [9, 12] + pattern: + MatchLiteralPattern: [8, 9] - [8, 18] + literal: + BinOp: [8, 9] - [8, 18] + left: + UnaryOp: [8, 10] - [8, 11] + op: USub + operand: + Num: [8, 10] - [8, 11] + n: 1 + text: '1' + op: Sub + right: + Num: [8, 12] - [8, 18] + n: 26000000j + text: '2.6e7j' + guard: None + body: [ + Pass: [9, 8] - [9, 12] + ] + Case: [10, 4] - [11, 12] + pattern: + MatchLiteralPattern: [10, 9] - [10, 11] + literal: + UnaryOp: [10, 10] - [10, 11] + op: USub + operand: + Num: [10, 10] - [10, 11] + n: 1 + text: '1' + guard: None + body: [ + Pass: [11, 8] - [11, 12] + ] + Case: [12, 4] - [13, 12] + pattern: + MatchLiteralPattern: [12, 9] - [12, 10] + literal: + Num: [12, 9] - [12, 10] + n: 2 + text: '2' + guard: None + body: [ + Pass: [13, 8] - [13, 12] + ] + Case: [14, 4] - [15, 12] + pattern: + MatchLiteralPattern: [14, 9] - [14, 16] + literal: + BinOp: [14, 9] - [14, 16] + left: + UnaryOp: [14, 10] - [14, 13] + op: USub + operand: + Num: [14, 10] - [14, 13] + n: 1.5 + text: '1.5' + op: Add + right: + Num: [14, 14] - [14, 16] + n: 5j + text: '5j' + guard: None + body: [ + Pass: [15, 8] - [15, 12] + ] + ] + Assign: [17, 0] - [17, 20] + targets: [ + Name: [17, 4] - [17, 17] + variable: Variable('soft_keywords', None) + ctx: Store + ] + value: + FunctionExpr: [17, 0] - [17, 20] + name: 'soft_keywords' + args: + arguments + defaults: [] + kw_defaults: [] + annotations: [] + varargannotation: None + kwargannotation: None + kw_annotations: [] + returns: None + inner_scope: + Function: [17, 0] - [17, 20] + name: 'soft_keywords' + type_parameters: [] + args: [] + vararg: None + kwonlyargs: [] + kwarg: None + body: [ + Assign: [18, 4] - [18, 13] + targets: [ + Name: [18, 4] - [18, 9] + variable: Variable('match', None) + ctx: Store + ] + value: + Num: [18, 12] - [18, 13] + n: 0 + text: '0' + Assign: [19, 4] - [19, 12] + targets: [ + Name: [19, 4] - [19, 8] + variable: Variable('case', None) + ctx: Store + ] + value: + Num: [19, 11] - [19, 12] + n: 0 + text: '0' + Match: [20, 4] - [22, 17] + subject: + Name: [20, 10] - [20, 15] + variable: Variable('match', None) + ctx: Load + cases: [ + Case: [21, 8] - [22, 17] + pattern: + MatchCapturePattern: [21, 13] - [21, 17] + variable: + Name: [21, 13] - [21, 17] + variable: Variable('case', None) + ctx: Store + guard: None + body: [ + Assign: [22, 12] - [22, 17] + targets: [ + Name: [22, 12] - [22, 13] + variable: Variable('x', None) + ctx: Store + ] + value: + Num: [22, 16] - [22, 17] + n: 0 + text: '0' + ] + ] + ] + Match: [24, 0] - [26, 12] + subject: + Tuple: [24, 7] - [24, 10] + elts: [ + Num: [24, 7] - [24, 8] + n: 0 + text: '0' + Num: [24, 9] - [24, 10] + n: 1 + text: '1' + ] + ctx: Load + parenthesised: True + cases: [ + Case: [25, 4] - [26, 12] + pattern: + MatchSequencePattern: [25, 9] - [25, 12] + patterns: [ + MatchStarPattern: [25, 9] - [25, 11] + target: + MatchCapturePattern: [25, 10] - [25, 11] + variable: + Name: [25, 10] - [25, 11] + variable: Variable('x', None) + ctx: Store + ] + guard: None + body: [ + Pass: [26, 8] - [26, 12] + ] + ] + Match: [28, 0] - [30, 12] + subject: + Tuple: [28, 7] - [28, 10] + elts: [ + Num: [28, 7] - [28, 8] + n: 2 + text: '2' + Num: [28, 9] - [28, 10] + n: 3 + text: '3' + ] + ctx: Load + parenthesised: True + cases: [ + Case: [29, 4] - [30, 12] + pattern: + MatchSequencePattern: [29, 9] - [29, 14] + patterns: [ + MatchStarPattern: [29, 10] - [29, 12] + target: + MatchCapturePattern: [29, 11] - [29, 12] + variable: + Name: [29, 11] - [29, 12] + variable: Variable('x', None) + ctx: Store + ] + guard: None + body: [ + Pass: [30, 8] - [30, 12] + ] + ] + Match: [32, 0] - [34, 13] + subject: + Tuple: [32, 6] - [32, 10] + elts: [ + Name: [32, 6] - [32, 7] + variable: Variable('w', None) + ctx: Load + Name: [32, 9] - [32, 10] + variable: Variable('x', None) + ctx: Load + ] + ctx: Load + parenthesised: True + cases: [ + Case: [33, 4] - [34, 13] + pattern: + MatchSequencePattern: [33, 9] - [33, 13] + patterns: [ + MatchCapturePattern: [33, 9] - [33, 10] + variable: + Name: [33, 9] - [33, 10] + variable: Variable('y', None) + ctx: Store + MatchCapturePattern: [33, 12] - [33, 13] + variable: + Name: [33, 12] - [33, 13] + variable: Variable('z', None) + ctx: Store + ] + guard: None + body: [ + Assign: [34, 8] - [34, 13] + targets: [ + Name: [34, 8] - [34, 9] + variable: Variable('v', None) + ctx: Store + ] + value: + Num: [34, 12] - [34, 13] + n: 0 + text: '0' + ] + ] + Match: [36, 0] - [38, 12] + subject: + Tuple: [36, 6] - [36, 10] + elts: [ + Name: [36, 6] - [36, 7] + variable: Variable('x', None) + ctx: Load + Name: [36, 9] - [36, 10] + variable: Variable('y', None) + ctx: Load + ] + ctx: Load + parenthesised: True + cases: [ + Case: [37, 4] - [38, 12] + pattern: + MatchSequencePattern: [37, 9] - [37, 13] + patterns: [ + MatchLiteralPattern: [37, 9] - [37, 10] + literal: + Num: [37, 9] - [37, 10] + n: 1 + text: '1' + MatchLiteralPattern: [37, 12] - [37, 13] + literal: + Num: [37, 12] - [37, 13] + n: 2 + text: '2' + ] + guard: None + body: [ + Pass: [38, 8] - [38, 12] + ] + ] + Match: [40, 0] - [42, 12] + subject: + Name: [40, 6] - [40, 7] + variable: Variable('z', None) + ctx: Load + cases: [ + Case: [41, 4] - [42, 12] + pattern: + MatchCapturePattern: [41, 9] - [41, 10] + variable: + Name: [41, 9] - [41, 10] + variable: Variable('w', None) + ctx: Store + guard: None + body: [ + Pass: [42, 8] - [42, 12] + ] + ] + ] diff --git a/python/extractor/tests/parser/match_new.py b/python/extractor/tests/parser/match_new.py new file mode 100644 index 00000000000..99a06de5b08 --- /dev/null +++ b/python/extractor/tests/parser/match_new.py @@ -0,0 +1,42 @@ +match [1,2]: + case (a, b): + print(b, a) + +match 1+2j: + case 1+2j: + pass + case -1-2.6e7j: + pass + case -1: + pass + case 2: + pass + case -1.5+5j: + pass + +def soft_keywords(): + match = 0 + case = 0 + match match: + case case: + x = 0 + +match (0,1): + case *x,: + pass + +match (2,3): + case (*x,): + pass + +match w, x: + case y, z: + v = 0 + +match x, y: + case 1, 2: + pass + +match z: + case w: + pass diff --git a/python/extractor/tests/parser/misc.py b/python/extractor/tests/parser/misc.py new file mode 100644 index 00000000000..90f60025468 --- /dev/null +++ b/python/extractor/tests/parser/misc.py @@ -0,0 +1,15 @@ +... + +a = (b := c) + +d = e if f else g + +h1[h2] = h3[h4] + +i[i1:i2] + +j[j1:j2:j3] + +k.l = m.n + +o[p,q] diff --git a/python/extractor/tests/parser/numbers.py b/python/extractor/tests/parser/numbers.py new file mode 100644 index 00000000000..ce0027ea2e8 --- /dev/null +++ b/python/extractor/tests/parser/numbers.py @@ -0,0 +1,12 @@ +1 + +2.0 + +3j + +0x4 + +0o5 + +0b110 + diff --git a/python/extractor/tests/parser/operators.py b/python/extractor/tests/parser/operators.py new file mode 100644 index 00000000000..b2b8b2ef328 --- /dev/null +++ b/python/extractor/tests/parser/operators.py @@ -0,0 +1,54 @@ +1 and 2 + +3 or 4 + +5 == 6 + +7 > 8 + +9 >= 10 + +11 in 12 + +13 is 14 + +15 is not 16 + +17 < 18 + +19 <= 20 + +21 != 22 + +23 <> 24 + +25 not in 26 + +27 > 28 >= 29 < 30 <= 31 == 32 != 33 <> 34 + ++35 + +-36 + +~37 + +not 38 + +# or(not(a), b) +not a or b + +# and(c, d, e, f, g) +c and d and e and f and g + +# or(h, i, j, k, l) +h or i or j or k or l + +# or(and(m, n), and(o, p)) +m and n or o and p + +# or(q, and(s, t), u) +q or s and t or u + +a1 or b1 and c1 + +d1 and e1 or f1 diff --git a/python/extractor/tests/parser/simple_statements.py b/python/extractor/tests/parser/simple_statements.py new file mode 100644 index 00000000000..a9d6a845546 --- /dev/null +++ b/python/extractor/tests/parser/simple_statements.py @@ -0,0 +1,70 @@ +# Statements that do not contain any other statements. + +pass + +a = b + +c : int = 1 + +d += e + +del f + +del f1, f2 + +global h + +global h1, h2 + +nonlocal i + +nonlocal i1, i2 + +import j + +import j1, j2 + +import j3.j4.j5, j6.j7.j8 as j9 + +import j10.j11 as j12 + +from k import l + +from ..k1.k2 import l1 as l2, l3 + +from __future__ import print_function, goto_statement + +from . import l4 + +from l5 import * + +from ..l6 import * +from ... import * + +raise + +raise m + +raise m1 from m2 + +raise m3, m4 + +raise m5, m6, m7 + +assert n + +assert n1, n2 + +return o + +return *o1, + +return 1, *o2 + +return 2, *o3, + +yield p + +yield from q + +await r diff --git a/python/extractor/tests/parser/simple_statements_py2.py b/python/extractor/tests/parser/simple_statements_py2.py new file mode 100644 index 00000000000..33f16dddbd6 --- /dev/null +++ b/python/extractor/tests/parser/simple_statements_py2.py @@ -0,0 +1,8 @@ + +exec "ls" + +print "Hello" + +print "two parts", "no newline", + +print >> f, "World" diff --git a/python/extractor/tests/parser/strings.py b/python/extractor/tests/parser/strings.py new file mode 100644 index 00000000000..8d465d25752 --- /dev/null +++ b/python/extractor/tests/parser/strings.py @@ -0,0 +1,79 @@ +if 1: + "double quotes" +if 2: + 'single quotes' +if 3: + """triple double quotes (sextuple quotes?)""" +if 4: + '''triple single quotes''' +if 5: + r"raw string" +if 6: + b"byte string" +if 7: + u"unicode string" +if 8: + br"raw byte string" +if 9: + "Let's put some control\tcharacters in here\n" +if 10: + """ + Multiline + string + time + """ +if 11: + "escaped \"quotes\" here" +if 12: + """Unescaped "quotes" inside triple quotes""" +if 13: + "string" """concatenation""" 'here' '''oh yeah''' +if 14: + f"format string with no funny business" +if 15: + f"format string with {1} interpolation" +if 16: + f"{2}{3}{4}" +if 17: + f"and a format string with {'nested'} string" +if 18: + f"foo{x}bar" "regular string" +if 19: + pass + # This doesn't quite give the right result, but it's close enough. + #f"no interpolation" ' but still implicit concatenation' +if 20: + f"{9}" "blah" f'{10}' +if 21: + f"format{129}string" "not format" +if 21.1: + # regression from https://github.com/github/codeql/issues/9940 + f"format{123}string" f"technically format string\n" +if 22: + "again not format" f"format again{foo}hello" +if 23: + f"""f-string with {"inner " 'implicit ' '''concatenation'''} how awful""" +if 24: + f'''oh no python { f'why do you {"allow"} such'} absolute horrors?''' +if 25: + b"""5""" b"byte format" +if 26: + r'X(\u0061|a)*Y' +if 27: + f"""triple-quoted {11}""f-st""" fr"""ri'''ng\\\\\""{12} with an inner quoted part""" +if 28: + f'{value:{width + padding!r}.{precision}}' +if 29: + f'{1,}' +if 30: + fr"""quotes before interpolation "{123}" are okay.""" +if 31: + fr"""backslash before an interpolation \{456}\ are okay.""" +if 32: + f'' +if 33: + '' +if 34: + b'\xc5\xe5' +if 35: + f"{x=}" diff --git a/python/extractor/tests/parser/strings_3.12_new.expected b/python/extractor/tests/parser/strings_3.12_new.expected new file mode 100644 index 00000000000..835fe157f52 --- /dev/null +++ b/python/extractor/tests/parser/strings_3.12_new.expected @@ -0,0 +1,305 @@ +Module: [2, 0] - [22, 0] + body: [ + Assign: [2, 0] - [2, 60] + targets: [ + Name: [2, 0] - [2, 5] + variable: Variable('songs', None) + ctx: Store + ] + value: + List: [2, 8] - [2, 60] + elts: [ + Str: [2, 9] - [2, 31] + s: 'Take me back to Eden' + prefix: "'" + implicitly_concatenated_parts: None + Str: [2, 33] - [2, 43] + s: 'Alkaline' + prefix: "'" + implicitly_concatenated_parts: None + Str: [2, 45] - [2, 59] + s: 'Ascensionism' + prefix: "'" + implicitly_concatenated_parts: None + ] + ctx: Load + Expr: [3, 0] - [3, 43] + value: + JoinedStr: [3, 0] - [3, 43] + values: [ + Str: [3, 0] - [3, 25] + s: 'This is the playlist: ' + prefix: 'f"' + implicitly_concatenated_parts: None + Call: [3, 25] - [3, 41] + func: + Attribute: [3, 25] - [3, 34] + value: + Str: [3, 25] - [3, 29] + s: ', ' + prefix: '"' + implicitly_concatenated_parts: None + attr: 'join' + ctx: Load + positional_args: [ + Name: [3, 35] - [3, 40] + variable: Variable('songs', None) + ctx: Load + ] + named_args: [] + Str: [3, 41] - [3, 43] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + Expr: [6, 0] - [6, 31] + value: + JoinedStr: [6, 0] - [6, 31] + values: [ + Str: [6, 0] - [6, 5] + s: '' + prefix: 'f"""' + implicitly_concatenated_parts: None + JoinedStr: [6, 5] - [6, 27] + values: [ + Str: [6, 5] - [6, 10] + s: '' + prefix: "f'''" + implicitly_concatenated_parts: None + JoinedStr: [6, 10] - [6, 23] + values: [ + Str: [6, 10] - [6, 13] + s: '' + prefix: "f'" + implicitly_concatenated_parts: None + JoinedStr: [6, 13] - [6, 21] + values: [ + Str: [6, 13] - [6, 16] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + BinOp: [6, 16] - [6, 19] + left: + Num: [6, 16] - [6, 17] + n: 1 + text: '1' + op: Add + right: + Num: [6, 18] - [6, 19] + n: 1 + text: '1' + Str: [6, 19] - [6, 21] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + Str: [6, 21] - [6, 23] + s: '' + prefix: "f'" + implicitly_concatenated_parts: None + ] + Str: [6, 23] - [6, 27] + s: '' + prefix: "f'''" + implicitly_concatenated_parts: None + ] + Str: [6, 27] - [6, 31] + s: '' + prefix: 'f"""' + implicitly_concatenated_parts: None + ] + Expr: [9, 0] - [9, 33] + value: + JoinedStr: [9, 0] - [9, 33] + values: [ + Str: [9, 0] - [9, 3] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + JoinedStr: [9, 3] - [9, 31] + values: [ + Str: [9, 3] - [9, 6] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + JoinedStr: [9, 6] - [9, 29] + values: [ + Str: [9, 6] - [9, 9] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + JoinedStr: [9, 9] - [9, 27] + values: [ + Str: [9, 9] - [9, 12] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + JoinedStr: [9, 12] - [9, 25] + values: [ + Str: [9, 12] - [9, 15] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + JoinedStr: [9, 15] - [9, 23] + values: [ + Str: [9, 15] - [9, 18] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + BinOp: [9, 18] - [9, 21] + left: + Num: [9, 18] - [9, 19] + n: 1 + text: '1' + op: Add + right: + Num: [9, 20] - [9, 21] + n: 1 + text: '1' + Str: [9, 21] - [9, 23] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + Str: [9, 23] - [9, 25] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + Str: [9, 25] - [9, 27] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + Str: [9, 27] - [9, 29] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + Str: [9, 29] - [9, 31] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + Str: [9, 31] - [9, 33] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + Expr: [12, 0] - [16, 4] + value: + JoinedStr: [12, 0] - [16, 4] + values: [ + Str: [12, 0] - [12, 25] + s: 'This is the playlist: ' + prefix: 'f"' + implicitly_concatenated_parts: None + Call: [12, 25] - [16, 2] + func: + Attribute: [12, 25] - [12, 34] + value: + Str: [12, 25] - [12, 29] + s: ', ' + prefix: '"' + implicitly_concatenated_parts: None + attr: 'join' + ctx: Load + positional_args: [ + List: [12, 35] - [16, 1] + elts: [ + Str: [13, 4] - [13, 26] + s: 'Take me back to Eden' + prefix: "'" + implicitly_concatenated_parts: None + Str: [14, 4] - [14, 14] + s: 'Alkaline' + prefix: "'" + implicitly_concatenated_parts: None + Str: [15, 4] - [15, 18] + s: 'Ascensionism' + prefix: "'" + implicitly_concatenated_parts: None + ] + ctx: Load + ] + named_args: [] + Str: [16, 2] - [16, 4] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + Expr: [19, 0] - [19, 50] + value: + Call: [19, 0] - [19, 50] + func: + Name: [19, 0] - [19, 5] + variable: Variable('print', None) + ctx: Load + positional_args: [ + JoinedStr: [19, 6] - [19, 49] + values: [ + Str: [19, 6] - [19, 31] + s: 'This is the playlist: ' + prefix: 'f"' + implicitly_concatenated_parts: None + Call: [19, 31] - [19, 47] + func: + Attribute: [19, 31] - [19, 40] + value: + Str: [19, 31] - [19, 35] + s: '\n' + prefix: '"' + implicitly_concatenated_parts: None + attr: 'join' + ctx: Load + positional_args: [ + Name: [19, 41] - [19, 46] + variable: Variable('songs', None) + ctx: Load + ] + named_args: [] + Str: [19, 47] - [19, 49] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + ] + named_args: [] + Expr: [21, 0] - [21, 68] + value: + Call: [21, 0] - [21, 68] + func: + Name: [21, 0] - [21, 5] + variable: Variable('print', None) + ctx: Load + positional_args: [ + JoinedStr: [21, 6] - [21, 67] + values: [ + Str: [21, 6] - [21, 31] + s: 'This is the playlist: ' + prefix: 'f"' + implicitly_concatenated_parts: None + Call: [21, 31] - [21, 65] + func: + Attribute: [21, 31] - [21, 58] + value: + Str: [21, 31] - [21, 53] + s: '♥' + prefix: '"' + implicitly_concatenated_parts: None + attr: 'join' + ctx: Load + positional_args: [ + Name: [21, 59] - [21, 64] + variable: Variable('songs', None) + ctx: Load + ] + named_args: [] + Str: [21, 65] - [21, 67] + s: '' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + ] + named_args: [] + ] diff --git a/python/extractor/tests/parser/strings_3.12_new.py b/python/extractor/tests/parser/strings_3.12_new.py new file mode 100644 index 00000000000..dda25362bcb --- /dev/null +++ b/python/extractor/tests/parser/strings_3.12_new.py @@ -0,0 +1,21 @@ +# An expression containing the same kind of quotes as the outer f-string +songs = ['Take me back to Eden', 'Alkaline', 'Ascensionism'] +f"This is the playlist: {", ".join(songs)}" + +# An example of the previously maximal level of nesting +f"""{f'''{f'{f"{1+1}"}'}'''}""" + +# An example of the new, unlimited level of nesting +f"{f"{f"{f"{f"{f"{1+1}"}"}"}"}"}" + +# An f-string with newlines inside the expression part +f"This is the playlist: {", ".join([ + 'Take me back to Eden', # My, my, those eyes like fire + 'Alkaline', # Not acid nor alkaline + 'Ascensionism' # Take to the broken skies at last +])}" + +# Two instances of string escaping used inside the expression part +print(f"This is the playlist: {"\n".join(songs)}") + +print(f"This is the playlist: {"\N{BLACK HEART SUIT}".join(songs)}") diff --git a/python/extractor/tests/parser/strings_new.expected b/python/extractor/tests/parser/strings_new.expected new file mode 100644 index 00000000000..7d1f2c647db --- /dev/null +++ b/python/extractor/tests/parser/strings_new.expected @@ -0,0 +1,265 @@ +Module: [1, 0] - [31, 0] + body: [ + If: [1, 0] - [1, 5] + test: + Num: [1, 3] - [1, 4] + n: 1 + text: '1' + body: [ + Expr: [2, 4] - [2, 72] + value: + JoinedStr: [2, 4] - [2, 72] + values: [ + Str: [2, 4] - [2, 61] + s: 'this is not a unicode escape but an interpolation: \\N' + prefix: 'fr"' + implicitly_concatenated_parts: None + Name: [2, 61] - [2, 70] + variable: Variable('AMPERSAND', None) + ctx: Load + Str: [2, 70] - [2, 72] + s: '' + prefix: 'fr"' + implicitly_concatenated_parts: None + ] + ] + orelse: None + If: [3, 0] - [3, 5] + test: + Num: [3, 3] - [3, 4] + n: 2 + text: '2' + body: [ + Expr: [4, 4] - [4, 44] + value: + JoinedStr: [4, 4] - [4, 44] + values: [ + Str: [4, 4] - [4, 33] + s: 'also an interpolation: \\N' + prefix: "f'" + implicitly_concatenated_parts: None + Name: [4, 33] - [4, 42] + variable: Variable('AMPERSAND', None) + ctx: Load + Str: [4, 42] - [4, 44] + s: '' + prefix: "f'" + implicitly_concatenated_parts: None + ] + ] + orelse: None + If: [5, 0] - [5, 5] + test: + Num: [5, 3] - [5, 4] + n: 3 + text: '3' + body: [ + Expr: [6, 4] - [6, 14] + value: + Str: [6, 4] - [6, 14] + s: '\\Nspam' + prefix: "f'" + implicitly_concatenated_parts: None + ] + orelse: None + If: [7, 0] - [7, 5] + test: + Num: [7, 3] - [7, 4] + n: 4 + text: '4' + body: [ + Expr: [8, 4] - [8, 46] + value: + Str: [8, 4] - [8, 46] + s: 'this is a unicode escape: &' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + orelse: None + If: [9, 0] - [9, 5] + test: + Num: [9, 3] - [9, 4] + n: 5 + text: '5' + body: [ + Expr: [10, 4] - [10, 55] + value: + Str: [10, 4] - [10, 55] + s: 'this is also not a unicode escape: \\N{AMPERSAND}' + prefix: 'r"' + implicitly_concatenated_parts: None + ] + orelse: None + If: [11, 0] - [11, 5] + test: + Num: [11, 3] - [11, 4] + n: 6 + text: '6' + body: [ + Expr: [12, 4] - [12, 20] + value: + Str: [12, 4] - [12, 20] + s: '\\N{AMPERSAND}' + prefix: "'" + implicitly_concatenated_parts: None + ] + orelse: None + If: [13, 0] - [13, 5] + test: + Num: [13, 3] - [13, 4] + n: 7 + text: '7' + body: [ + Expr: [14, 4] - [14, 13] + value: + Str: [14, 4] - [14, 13] + s: '\\Nspam' + prefix: "'" + implicitly_concatenated_parts: None + ] + orelse: None + If: [15, 0] - [15, 5] + test: + Num: [15, 3] - [15, 4] + n: 8 + text: '8' + body: [ + Expr: [16, 4] - [16, 55] + value: + Str: [16, 4] - [16, 55] + s: 'this is also also a unicode escape: &' + prefix: '"' + implicitly_concatenated_parts: None + ] + orelse: None + If: [17, 0] - [17, 5] + test: + Num: [17, 3] - [17, 4] + n: 9 + text: '9' + body: [ + Expr: [18, 4] - [18, 56] + value: + Str: [18, 4] - [18, 56] + s: 'this is also not a unicode escape: \\N{AMPERSAND}' + prefix: 'rb"' + implicitly_concatenated_parts: None + ] + orelse: None + If: [19, 0] - [19, 6] + test: + Num: [19, 3] - [19, 5] + n: 10 + text: '10' + body: [ + Expr: [20, 4] - [20, 21] + value: + Str: [20, 4] - [20, 21] + s: '\\N{AMPERSAND}' + prefix: "b'" + implicitly_concatenated_parts: None + ] + orelse: None + If: [21, 0] - [21, 6] + test: + Num: [21, 3] - [21, 5] + n: 11 + text: '11' + body: [ + Expr: [22, 4] - [22, 14] + value: + Str: [22, 4] - [22, 14] + s: '\\Nspam' + prefix: "b'" + implicitly_concatenated_parts: None + ] + orelse: None + If: [23, 0] - [23, 6] + test: + Num: [23, 3] - [23, 5] + n: 12 + text: '12' + body: [ + Expr: [24, 4] - [24, 81] + value: + Str: [24, 4] - [24, 81] + s: 'this is not a unicode escape because we are in a bytestring: \\N{AMPERSAND}' + prefix: 'b"' + implicitly_concatenated_parts: None + ] + orelse: None + If: [25, 0] - [25, 6] + test: + Num: [25, 3] - [25, 5] + n: 13 + text: '13' + body: [ + Expr: [26, 4] - [26, 55] + value: + JoinedStr: [26, 4] - [26, 55] + values: [ + Str: [26, 4] - [26, 39] + s: 'quotes before interpolation "' + prefix: 'fr"""' + implicitly_concatenated_parts: None + Num: [26, 39] - [26, 40] + n: 0 + text: '0' + Str: [26, 40] - [26, 55] + s: '" are okay.' + prefix: 'fr"""' + implicitly_concatenated_parts: None + ] + ] + orelse: None + If: [27, 0] - [27, 6] + test: + Num: [27, 3] - [27, 5] + n: 14 + text: '14' + body: [ + Expr: [28, 4] - [28, 61] + value: + JoinedStr: [28, 4] - [28, 61] + values: [ + Str: [28, 4] - [28, 45] + s: 'backslash before an interpolation \\' + prefix: 'fr"""' + implicitly_concatenated_parts: None + Num: [28, 45] - [28, 46] + n: 1 + text: '1' + Str: [28, 46] - [28, 61] + s: '\\ are okay.' + prefix: 'fr"""' + implicitly_concatenated_parts: None + ] + ] + orelse: None + If: [29, 0] - [29, 6] + test: + Num: [29, 3] - [29, 5] + n: 15 + text: '15' + body: [ + Expr: [30, 4] - [30, 54] + value: + JoinedStr: [30, 4] - [30, 54] + values: [ + Str: [30, 4] - [30, 33] + s: 'Yield inside an f-string: ' + prefix: 'f"' + implicitly_concatenated_parts: None + Yield: [30, 33] - [30, 40] + value: + Num: [30, 39] - [30, 40] + n: 5 + text: '5' + Str: [30, 40] - [30, 54] + s: ' is allowed.' + prefix: 'f"' + implicitly_concatenated_parts: None + ] + ] + orelse: None + ] diff --git a/python/extractor/tests/parser/strings_new.py b/python/extractor/tests/parser/strings_new.py new file mode 100644 index 00000000000..44302fc8756 --- /dev/null +++ b/python/extractor/tests/parser/strings_new.py @@ -0,0 +1,30 @@ +if 1: + fr"this is not a unicode escape but an interpolation: \N{AMPERSAND}" +if 2: + f'also an interpolation: \\N{AMPERSAND}' +if 3: + f'\\Nspam' +if 4: + f"this is a unicode escape: \N{AMPERSAND}" +if 5: + r"this is also not a unicode escape: \N{AMPERSAND}" +if 6: + '\\N{AMPERSAND}' +if 7: + '\\Nspam' +if 8: + "this is also also a unicode escape: \N{AMPERSAND}" +if 9: + rb"this is also not a unicode escape: \N{AMPERSAND}" +if 10: + b'\\N{AMPERSAND}' +if 11: + b'\\Nspam' +if 12: + b"this is not a unicode escape because we are in a bytestring: \N{AMPERSAND}" +if 13: + fr"""quotes before interpolation "{0}" are okay.""" +if 14: + fr"""backslash before an interpolation \{1}\ are okay.""" +if 15: + f"Yield inside an f-string: {yield 5} is allowed." diff --git a/python/extractor/tests/parser/types_new.expected b/python/extractor/tests/parser/types_new.expected new file mode 100644 index 00000000000..be42268c201 --- /dev/null +++ b/python/extractor/tests/parser/types_new.expected @@ -0,0 +1,142 @@ +Module: [1, 0] - [6, 0] + body: [ + TypeAlias: [1, 0] - [1, 34] + name: + Name: [1, 5] - [1, 6] + variable: Variable('T', None) + ctx: Store + type_parameters: [ + TypeVar: [1, 7] - [1, 9] + name: + Name: [1, 7] - [1, 9] + variable: Variable('T1', None) + ctx: Store + bound: None + TypeVar: [1, 11] - [1, 17] + name: + Name: [1, 11] - [1, 13] + variable: Variable('T2', None) + ctx: Store + bound: + Name: [1, 15] - [1, 17] + variable: Variable('E1', None) + ctx: Load + TypeVarTuple: [1, 19] - [1, 22] + name: + Name: [1, 20] - [1, 22] + variable: Variable('T3', None) + ctx: Store + ParamSpec: [1, 24] - [1, 28] + name: + Name: [1, 26] - [1, 28] + variable: Variable('T4', None) + ctx: Store + ] + value: + Name: [1, 32] - [1, 34] + variable: Variable('T5', None) + ctx: Load + Assign: [3, 0] - [3, 31] + targets: [ + Name: [3, 4] - [3, 5] + variable: Variable('f', None) + ctx: Store + ] + value: + FunctionExpr: [3, 0] - [3, 31] + name: 'f' + args: + arguments + defaults: [] + kw_defaults: [] + annotations: [] + varargannotation: None + kwargannotation: None + kw_annotations: [] + returns: None + inner_scope: + Function: [3, 0] - [3, 31] + name: 'f' + type_parameters: [ + TypeVar: [3, 6] - [3, 8] + name: + Name: [3, 6] - [3, 8] + variable: Variable('T6', None) + ctx: Store + bound: None + TypeVar: [3, 10] - [3, 16] + name: + Name: [3, 10] - [3, 12] + variable: Variable('T7', None) + ctx: Store + bound: + Name: [3, 14] - [3, 16] + variable: Variable('E2', None) + ctx: Load + TypeVarTuple: [3, 18] - [3, 21] + name: + Name: [3, 19] - [3, 21] + variable: Variable('T8', None) + ctx: Store + ParamSpec: [3, 23] - [3, 27] + name: + Name: [3, 25] - [3, 27] + variable: Variable('T9', None) + ctx: Store + ] + args: [] + vararg: None + kwonlyargs: [] + kwarg: None + body: [ + Expr: [3, 32] - [3, 35] + value: + Ellipsis: [3, 32] - [3, 35] + ] + Assign: [5, 0] - [5, 35] + targets: [ + Name: [5, 6] - [5, 7] + variable: Variable('C', None) + ctx: Store + ] + value: + ClassExpr: [5, 0] - [5, 35] + name: 'C' + type_parameters: [ + TypeVar: [5, 8] - [5, 11] + name: + Name: [5, 8] - [5, 11] + variable: Variable('T10', None) + ctx: Store + bound: None + TypeVar: [5, 13] - [5, 20] + name: + Name: [5, 13] - [5, 16] + variable: Variable('T11', None) + ctx: Store + bound: + Name: [5, 18] - [5, 20] + variable: Variable('E3', None) + ctx: Load + TypeVarTuple: [5, 22] - [5, 26] + name: + Name: [5, 23] - [5, 26] + variable: Variable('T12', None) + ctx: Store + ParamSpec: [5, 28] - [5, 33] + name: + Name: [5, 30] - [5, 33] + variable: Variable('T13', None) + ctx: Store + ] + bases: [] + keywords: [] + inner_scope: + Class: [5, 0] - [5, 35] + name: 'C' + body: [ + Expr: [5, 36] - [5, 39] + value: + Ellipsis: [5, 36] - [5, 39] + ] + ] diff --git a/python/extractor/tests/parser/types_new.py b/python/extractor/tests/parser/types_new.py new file mode 100644 index 00000000000..844ba4930ed --- /dev/null +++ b/python/extractor/tests/parser/types_new.py @@ -0,0 +1,5 @@ +type T[T1, T2: E1, *T3, **T4] = T5 + +def f[T6, T7: E2, *T8, **T9](): ... + +class C[T10, T11: E3, *T12, **T13]: ... diff --git a/python/extractor/tests/parser/while.py b/python/extractor/tests/parser/while.py new file mode 100644 index 00000000000..3e622e6f87f --- /dev/null +++ b/python/extractor/tests/parser/while.py @@ -0,0 +1,6 @@ +while a: + b + c +else: + d + e diff --git a/python/extractor/tests/parser/with.py b/python/extractor/tests/parser/with.py new file mode 100644 index 00000000000..25022cbb9f9 --- /dev/null +++ b/python/extractor/tests/parser/with.py @@ -0,0 +1,9 @@ +with a as b: + c + d + +with f as g, h as i: + j + +with k, l: + m diff --git a/python/extractor/tests/project_layout/project-layout b/python/extractor/tests/project_layout/project-layout new file mode 100644 index 00000000000..3adda330ddc --- /dev/null +++ b/python/extractor/tests/project_layout/project-layout @@ -0,0 +1,2 @@ +#/target +**//src diff --git a/python/extractor/tests/project_layout/src/mod1.py b/python/extractor/tests/project_layout/src/mod1.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/extractor/tests/source_archive_unchanged/src/no_newline.py b/python/extractor/tests/source_archive_unchanged/src/no_newline.py new file mode 100644 index 00000000000..82129e54245 --- /dev/null +++ b/python/extractor/tests/source_archive_unchanged/src/no_newline.py @@ -0,0 +1 @@ +print("Hello world! This line of code has no newline at the end.") \ No newline at end of file diff --git a/python/extractor/tests/source_archive_unchanged/src/weird_bytes.py b/python/extractor/tests/source_archive_unchanged/src/weird_bytes.py new file mode 100644 index 00000000000..288c4848425 --- /dev/null +++ b/python/extractor/tests/source_archive_unchanged/src/weird_bytes.py @@ -0,0 +1,2 @@ +print("This line of code ends with a non-standard newline:") +print("This string contains weird bytes: ab") \ No newline at end of file diff --git a/python/extractor/tests/syntax-error/error.py b/python/extractor/tests/syntax-error/error.py new file mode 100644 index 00000000000..4cd4b017053 --- /dev/null +++ b/python/extractor/tests/syntax-error/error.py @@ -0,0 +1 @@ +This is a syntax error! diff --git a/python/extractor/tests/test_concurrent_cache.py b/python/extractor/tests/test_concurrent_cache.py new file mode 100644 index 00000000000..6ab4b54633d --- /dev/null +++ b/python/extractor/tests/test_concurrent_cache.py @@ -0,0 +1,95 @@ + +import sys +import os.path +import unittest +import multiprocessing + +import semmle +from tests import test_utils +from semmle.util import makedirs + + +ITERATIONS = 100 +CONCURRENCY = 20 + +class ConcurrentCacheTest(test_utils.ExtractorTest): + ''' + Test the cache under heavy concurrent load. + ''' + + def __init__(self, name): + super(ConcurrentCacheTest, self).__init__(name) + self.cachedir = os.path.abspath(os.path.join(self.here, "cache")) + + def setUp(self): + super(ConcurrentCacheTest, self).setUp() + makedirs(self.cachedir) + self.cache = semmle.cache.Cache(self.cachedir) + + def tearDown(self): + super(ConcurrentCacheTest, self).tearDown() + + def _concurrent_read_and_write(self): + readers = [] + writers = [] + queue = multiprocessing.Queue(CONCURRENCY+1) + for i in range(CONCURRENCY): + readers.append(multiprocessing.Process(target=read_func, args=(self.cache, queue))) + writers.append(multiprocessing.Process(target=write_func, args=(self.cache, ITERATIONS//4))) + for read, write in zip(readers, writers): + read.start() + write.start() + for proc in writers: + proc.join() + for proc in readers: + proc.join() + successes = [ queue.get(False) for i in range(CONCURRENCY) ] + self.assertNotIn(None, successes) + # We expect a fairly low success rate here + # But want to assert that at least one read succeeded. + self.assertGreater(sum(successes), 0) + + def _concurrent_read_ok(self): + readers = [] + queue = multiprocessing.Queue(CONCURRENCY+1) + for i in range(CONCURRENCY): + readers.append(multiprocessing.Process(target=read_func, args=(self.cache, queue))) + for proc in readers: + proc.start() + for proc in readers: + proc.join() + successes = [ queue.get(False) for i in range(CONCURRENCY) ] + self.assertNotIn(None, successes) + self.assertEqual(sum(successes), 2*CONCURRENCY*ITERATIONS) + + def test(self): + #Must run this first as it populates the cache + self._concurrent_read_and_write() + #Then this tests that the cache is correctly populated. + self._concurrent_read_ok() + +def key(i): + return "key%d" % i + +def value(i): + return ("value%d\n" % i).encode("utf-8")*10000 + +def read_func(cache, queue): + successes = 0 + for i in range(ITERATIONS): + val = cache.get(key(i)) + if val is not None: + successes += 1 + assert val == value(i) + for i in range(ITERATIONS): + val = cache.get(key(i)) + if val is not None: + successes += 1 + assert val == value(i) + queue.put(successes) + +def write_func(cache, offset): + for i in range(offset, ITERATIONS): + cache.set(key(i), value(i)) + for i in range(offset-1, -1, -1): + cache.set(key(i), value(i)) diff --git a/python/extractor/tests/test_config1/setup.py b/python/extractor/tests/test_config1/setup.py new file mode 100644 index 00000000000..a3ea90ffa15 --- /dev/null +++ b/python/extractor/tests/test_config1/setup.py @@ -0,0 +1,7 @@ + +classifiers = [ + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Java :: 7', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.7', +] diff --git a/python/extractor/tests/test_config2/setup.py b/python/extractor/tests/test_config2/setup.py new file mode 100644 index 00000000000..984792209c2 --- /dev/null +++ b/python/extractor/tests/test_config2/setup.py @@ -0,0 +1,13 @@ + +classifiers = [ + 'Development Status :: 2 - Pre-Alpha', + 'Environment :: Console', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: POSIX', + 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Topic :: Software Development', +] diff --git a/python/extractor/tests/test_dot_py.py b/python/extractor/tests/test_dot_py.py new file mode 100644 index 00000000000..b8f6b4253c8 --- /dev/null +++ b/python/extractor/tests/test_dot_py.py @@ -0,0 +1,18 @@ + +import sys +import os.path +import shutil +import unittest + +import semmle.populator +from tests import test_utils + +class DotPyPathTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(DotPyPathTest, self).__init__(name) + + def test_dot_py(self): + dot_py = os.path.abspath(os.path.join(self.here, "dot-py")) + self.run_extractor("-R", dot_py, "-p", dot_py) + self.check_only_traps_exists_and_clear('__init__', 'a') diff --git a/python/extractor/tests/test_exclude.py b/python/extractor/tests/test_exclude.py new file mode 100644 index 00000000000..2a41d887541 --- /dev/null +++ b/python/extractor/tests/test_exclude.py @@ -0,0 +1,25 @@ + +import sys +import os.path +import shutil +import unittest + +import semmle.populator +from tests import test_utils + +class ExtractorExcludeTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(ExtractorExcludeTest, self).__init__(name) + + def test_simple_exclude(self): + self.run_extractor("-y", "package.sub", "mod1", "package.x", "package.sub.a") + self.check_only_traps_exists_and_clear("mod1", "package/", "x") + + def test_simple_exclude_pattern(self): + self.run_extractor("--exclude-pattern", ".*(a|x)", "mod1", "package.x", "package.sub.a", "package.sub.b") + self.check_only_traps_exists_and_clear("mod1", "b", "package/", "sub/") + + def test_multiple_exclude(self): + self.run_extractor("-y", "package.sub.x", "mod1", "-y", "package.sub.y", "package.sub.a") + self.check_only_traps_exists_and_clear("mod1", "package/", "sub/", "a") diff --git a/python/extractor/tests/test_file.py b/python/extractor/tests/test_file.py new file mode 100644 index 00000000000..3ef043a509b --- /dev/null +++ b/python/extractor/tests/test_file.py @@ -0,0 +1,30 @@ + +import sys +import os.path +import shutil +import unittest +import subprocess + +import semmle.populator +from tests import test_utils + +class FileOptionTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(FileOptionTest, self).__init__(name) + + def test_file(self): + self.run_extractor("-F", "tests/data/mod1.py") + self.check_only_traps_exists_and_clear("mod1") + + def test_no_file(self): + try: + self.run_extractor("-F", "this-file-does-not-exist.py") + except subprocess.CalledProcessError as ex: + self.assertEqual(ex.returncode, 1) + + def test_no_module(self): + try: + self.run_extractor("this_module_does_not_exist") + except subprocess.CalledProcessError as ex: + self.assertEqual(ex.returncode, 1) diff --git a/python/extractor/tests/test_import_restrict.py b/python/extractor/tests/test_import_restrict.py new file mode 100644 index 00000000000..a2010205b53 --- /dev/null +++ b/python/extractor/tests/test_import_restrict.py @@ -0,0 +1,30 @@ + +import sys +import os.path +import shutil +import unittest + +import semmle.populator +from tests import test_utils + +class ExtractorImportRestrictTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(ExtractorImportRestrictTest, self).__init__(name) + self.module_path = os.path.abspath(os.path.join(self.here, "data-imports")) + + def test_import_unrestricted(self): + self.run_extractor("mod1") + self.check_only_traps_exists_and_clear("mod1", "mod2", "mod3", "mod4", "mod5") + + def test_import_unrestricted_2(self): + self.run_extractor("mod2") + self.check_only_traps_exists_and_clear("mod2", "mod3", "mod4", "mod5") + + def test_import_depth(self): + self.run_extractor("--max-import-depth", "1", "mod1") + self.check_only_traps_exists_and_clear("mod1", "mod2") + + def test_import_depth_2(self): + self.run_extractor("--max-import-depth", "2", "mod1") + self.check_only_traps_exists_and_clear("mod1", "mod2", "mod3", "mod4") diff --git a/python/extractor/tests/test_io_error.py b/python/extractor/tests/test_io_error.py new file mode 100644 index 00000000000..6caa16cd381 --- /dev/null +++ b/python/extractor/tests/test_io_error.py @@ -0,0 +1,45 @@ + +import sys +import os.path +import shutil +import unittest +from contextlib import contextmanager + +import semmle.populator +from tests import test_utils +import subprocess +if sys.version_info < (3,0): + from StringIO import StringIO +else: + from io import StringIO + +ALL_ACCESS = int("777", base=8) + + +@contextmanager +def discard_output(): + new_out, new_err = StringIO(), StringIO() + old_out, old_err = sys.stdout, sys.stderr + try: + sys.stdout, sys.stderr = new_out, new_err + yield + finally: + sys.stdout, sys.stderr = old_out, old_err + +class SingleThreadedTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(SingleThreadedTest, self).__init__(name) + + def test_ioerror(self): + if os.name == "nt": + return + try: + os.chmod(self.trap_path, 0) + with discard_output(): + try: + self.run_extractor("-z1", "-y", "package.sub", "mod1", "package.x", "package.sub.a") + except subprocess.CalledProcessError as ex: + self.assertEqual(ex.returncode, 1) + finally: + os.chmod(self.trap_path, ALL_ACCESS) diff --git a/python/extractor/tests/test_lgtm_relative_path.py b/python/extractor/tests/test_lgtm_relative_path.py new file mode 100644 index 00000000000..432c40811cf --- /dev/null +++ b/python/extractor/tests/test_lgtm_relative_path.py @@ -0,0 +1,14 @@ +import os + +from tests import test_utils + +class ExtractorPatternsTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(ExtractorPatternsTest, self).__init__(name) + + def test(self): + src = os.path.join(self.here, "lgtm_src") + with test_utils.environment("LGTM_SRC", src): + self.run_extractor("-R", src, "--filter", "exclude:*.py", "--filter", "include:x.py") + self.check_only_traps_exists_and_clear("x") diff --git a/python/extractor/tests/test_off_path.py b/python/extractor/tests/test_off_path.py new file mode 100644 index 00000000000..ab6a527c74e --- /dev/null +++ b/python/extractor/tests/test_off_path.py @@ -0,0 +1,18 @@ + +import sys +import os.path +import shutil +import unittest + +import semmle.populator +from tests import test_utils + +class ExtractorOffPathTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(ExtractorOffPathTest, self).__init__(name) + + def test_off_path(self): + off_path = os.path.abspath(os.path.join(self.here, "off-path")) + self.run_extractor("-R", off_path) + self.check_only_traps_exists_and_clear("nameless", "mod1", "mod2") diff --git a/python/extractor/tests/test_omit_syntax_error.py b/python/extractor/tests/test_omit_syntax_error.py new file mode 100644 index 00000000000..8064d2e8972 --- /dev/null +++ b/python/extractor/tests/test_omit_syntax_error.py @@ -0,0 +1,22 @@ + +import sys +import os.path +import shutil +import unittest + +import semmle.populator +from tests import test_utils + +class OmitSyntaxErrorTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(OmitSyntaxErrorTest, self).__init__(name) + self.module_path = os.path.abspath(os.path.join(self.here, "syntax-error")) + + def test_omit(self): + self.run_extractor("--omit-syntax-error", "error") + self.check_only_traps_exists_and_clear() + + def test_dont_omit(self): + self.run_extractor("error") + self.check_only_traps_exists_and_clear("error", "error") diff --git a/python/extractor/tests/test_parser.py b/python/extractor/tests/test_parser.py new file mode 100644 index 00000000000..e93ffd1ffd7 --- /dev/null +++ b/python/extractor/tests/test_parser.py @@ -0,0 +1,107 @@ +import sys +import os.path +import shutil +import unittest +import pytest +import warnings + +from tests import test_utils +from semmle.python.parser.dump_ast import old_parser, AstDumper, StdoutLogger +from semmle.python.parser.tsg_parser import parse as new_parser +import subprocess + +class ParserTest(unittest.TestCase): + def __init__(self, name): + super(ParserTest, self).__init__(name) + self.test_folder = os.path.join(os.path.dirname(__file__), "parser") + self.maxDiff = None + + + @pytest.fixture(autouse=True) + def capsys(self, capsys): + self.capsys = capsys + + def compare_parses(self, filename, logger): + pyfile = os.path.join(self.test_folder, filename) + stem = filename[:-3] + oldfile = os.path.join(self.test_folder, stem + ".old") + newfile = os.path.join(self.test_folder, stem + ".new") + old_error = False + new_error = False + try: + old_ast = old_parser(pyfile, logger) + with open(oldfile, "w") as old: + AstDumper(old).visit(old_ast) + except SyntaxError: + old_error = True + try: + new_ast = new_parser(pyfile, logger) + with open(newfile, "w") as new: + AstDumper(new).visit(new_ast) + except SyntaxError: + new_error = True + + if old_error or new_error: + raise Exception("Parser error: old_error={}, new_error={}".format(old_error, new_error)) + try: + diff = subprocess.check_output(["git", "diff", "--patience", "--no-index", oldfile, newfile]) + except subprocess.CalledProcessError as e: + diff = e.output + if diff: + pytest.fail(diff.decode("utf-8")) + self.assertEqual(self.capsys.readouterr().err, "") + os.remove(oldfile) + os.remove(newfile) + + def compare_expected(self, filename, logger, new=True ): + if sys.version_info.major < 3: + return + pyfile = os.path.join(self.test_folder, filename) + stem = filename[:-3] + expected = os.path.join(self.test_folder, stem + ".expected") + actual = os.path.join(self.test_folder, stem + ".actual") + parser = new_parser if new else old_parser + with warnings.catch_warnings(): + # The test case `b"this is not a unicode escape because we are in a + # bytestring: \N{AMPERSAND}"`` in strings_new.py gives a DeprecationWarning, + # however we are actually testing the parser behavior on such bad code, so + # we can't just "fix" the code. You would think we could use the Python + # warning filter to ignore this specific warning, but that doesn't work -- + # furthermore, using `error::DeprecationWarning` makes the *output* of the + # test change :O + # + # This was the best solution I could come up with that _both_ allows pytest + # to error on normal deprecation warnings, but also allows this one case to + # exist. + if filename == "strings_new.py": + warnings.simplefilter("ignore", DeprecationWarning) + ast = parser(pyfile, logger) + with open(actual, "w") as actual_file: + AstDumper(actual_file).visit(ast) + try: + diff = subprocess.check_output(["git", "diff", "--patience", "--no-index", expected, actual]) + except subprocess.CalledProcessError as e: + diff = e.output + if diff: + pytest.fail(diff.decode("utf-8")) + self.assertEqual(self.capsys.readouterr().err, "") + os.remove(actual) + + +def setup_tests(): + test_folder = os.path.join(os.path.dirname(__file__), "parser") + with StdoutLogger() as logger: + for file in os.listdir(test_folder): + if file.endswith(".py"): + stem = file[:-3] + test_name = "test_" + stem + if stem.endswith("_new"): + test_func = lambda self, file=file: self.compare_expected(file, logger, new=True) + elif stem.endswith("_old"): + test_func = lambda self, file=file: self.compare_expected(file, logger, new=False) + else: + test_func = lambda self, file=file: self.compare_parses(file, logger) + setattr(ParserTest, test_name, test_func) + +setup_tests() +del setup_tests diff --git a/python/extractor/tests/test_patterns.py b/python/extractor/tests/test_patterns.py new file mode 100644 index 00000000000..f218e7a4907 --- /dev/null +++ b/python/extractor/tests/test_patterns.py @@ -0,0 +1,27 @@ +import os +import json +import subprocess + +import semmle.path_filters +from tests import test_utils + +class ExtractorPatternsTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(ExtractorPatternsTest, self).__init__(name) + + def test(self): + repo_dir = subprocess.Popen(["git", "rev-parse", "--show-toplevel"], stdout=subprocess.PIPE).communicate()[0].rstrip().decode("utf-8") + test_file_path = os.path.abspath(os.path.join(repo_dir, "unit-tests", "files", "pattern-matching", "patterns.json")) + with open(test_file_path) as test_file: + test_patterns = json.load(test_file) + for test_pattern in test_patterns: + pattern = test_pattern["pattern"] + regex = semmle.path_filters.glob_to_regex(pattern) + for matching_path in test_pattern["should_match"]: + self.assertTrue(regex.match(matching_path), "Pattern \"%s\" did not match path \"%s\"." % (pattern, matching_path)) + for matching_path in test_pattern["shouldnt_match"]: + self.assertFalse(regex.match(matching_path), "Pattern \"%s\" matched path \"%s\"." % (pattern, matching_path)) + + def test_escape_prefix(self): + semmle.path_filters.glob_to_regex("x", prefix="foo\\") diff --git a/python/extractor/tests/test_projectlayout.py b/python/extractor/tests/test_projectlayout.py new file mode 100644 index 00000000000..37aecdbd03a --- /dev/null +++ b/python/extractor/tests/test_projectlayout.py @@ -0,0 +1,133 @@ +# +# This is a port of com.semmle.extractor.projectstructure.ProjectLayoutTests +# and must be kept in sync +# + +from semmle.projectlayout import ProjectLayout +import unittest + +PROJECT_LAYOUT = ProjectLayout(u""" +@Example + +/this/path/will/remain +-this/path/will/not +/and/look//this/path/is/ok + +#Source +/src// +-/src/tests + +#Tests +/src/tests// + +#Generated +/gen +/gen2//gen + +#Misc +misc// +othermisc +//thirdmisc + +#ExecutionOrder +ex/order +-ex/order/tests/a +ex/order/tests +/src/tests//testA.c +#Patterns +**/*.included +**/inc +-**/exc +my +-my/excluded/**/files +my/**//files/**/a +//**/weird""".split('\n')) + +MINIMAL_LAYOUT = ProjectLayout(u""" +/included/path +- excluded/path""".split('\n')) + +CS_LAYOUT = ProjectLayout(u""" +#Production code +/ +-**/src.test + +#Testing code +**/src.test""".split('\n')) + +def map(path): + return PROJECT_LAYOUT.artificial_path(path) + +class ProjectLayoutTests(unittest.TestCase): + def test_advanced_patterns(self): + self.assertEqual(u"/Patterns/firstPattern.included", map(u"/firstPattern.included")) + self.assertEqual(u"/Patterns/P1/P2/a.included", map(u"/P1/P2/a.included")) + self.assertEqual(u"/Patterns/P3/P4/inc", map(u"/P3/P4/inc")) + self.assertEqual(u"/Patterns/P4/P5/inc/a.c", map(u"/P4/P5/inc/a.c")) + assert map(u"/P3/P4/inc/exc") is None + assert map(u"/P3/P4/inc/exc/a/b.c") is None + self.assertEqual(u"/Patterns/my/code", map(u"/my/code")) + assert map("u/my/excluded/but/very/interesting/files/a.c") is None + self.assertEqual(u"/Patterns/files/a/b.c", map(u"/my/excluded/but/very/interesting/files/a/b.c")) + self.assertEqual(u"/Patterns/P5/P6/weird", map(u"/P5/P6/weird")) + + def test_non_virtual_path(self): + self.assertEqual(u"/this/path/will/remain/the-same.c", map(u"/this/path/will/remain/the-same.c")) + assert map(u"/this/path/will/not/be/included.c") is None + self.assertEqual(u"/this/path/is/ok/to-use.c", map(u"/and/look/this/path/is/ok/to-use.c")) + + def test_ignore_unmentioned_paths(self): + assert map(u"/lib/foo.c") is None + + def test_do_not_match_partial_names(self): + assert map(u"/gen2/foo.c") is None + assert map(u"/src2/foo.c") is None + + def test_simple_mapping(self): + self.assertEqual(u"/Source/foo.c", map(u"/src/foo.c")) + + def test_match_in_sequence(self): + self.assertEqual(u"/ExecutionOrder/ex/order/tests/a", map("/ex/order/tests/a")) + self.assertEqual(u"/Tests/testA.c", map(u"/src/tests/testA.c")) + + def test_excluded_and_included(self): + self.assertEqual(u"/Tests/test.c", map("/src/tests/test.c")) + + def test_without_double_slashes(self): + self.assertEqual(u"/Generated/gen/gen.c", map("/gen/gen.c")) + + def test_middle_double_slash(self): + self.assertEqual(u"/Generated/gen/gen.c", map("/gen2/gen/gen.c")) + + def test_initial_double_slash(self): + self.assertEqual(u"/Misc/thirdmisc/misc.c", map("/thirdmisc/misc.c")) + + def test_map_directories(self): + self.assertEqual(u"/Generated/gen", map("/gen")) + self.assertEqual(u"/Generated/gen/", map("/gen/")) + self.assertEqual(u"/Source", map("/src")) + self.assertEqual(u"/Misc/thirdmisc", map("/thirdmisc")) + + def test_missing_initial_slash(self): + self.assertEqual(u"/Misc", map("/misc")) + self.assertEqual(u"/Misc/othermisc", map("/othermisc")) + + def test_minimal_layout(self): + self.assertEqual(u"/included/path/foo.c", MINIMAL_LAYOUT.artificial_path("/included/path/foo.c")) + assert MINIMAL_LAYOUT.artificial_path(u"/excluded/path/name") is None + + def test_project_names(self): + self.assertEqual(u"Example", PROJECT_LAYOUT.project_name()) + self.assertEqual(u"Example", PROJECT_LAYOUT.project_name("Something else")) + self.assertRaises(Exception, lambda: MINIMAL_LAYOUT.project_name()) + self.assertEqual(u"My project", MINIMAL_LAYOUT.project_name("My project")) + + def test_cs(self): + self.assertEqual(u"/Production code", CS_LAYOUT.artificial_path(u"")) + self.assertEqual(u"/Production code/", CS_LAYOUT.artificial_path(u"/")); + self.assertEqual(u"/Production code/AppAuth/ear/App/src", CS_LAYOUT.artificial_path(u"/AppAuth/ear/App/src")); + self.assertEqual(u"/Testing code/BUILD/bun/BUILD/src.test", CS_LAYOUT.artificial_path(u"/BUILD/bun/BUILD/src.test")); + + +if __name__ == "__main__": + unittest.main() diff --git a/python/extractor/tests/test_python_sanity.py b/python/extractor/tests/test_python_sanity.py new file mode 100644 index 00000000000..778b257d2d3 --- /dev/null +++ b/python/extractor/tests/test_python_sanity.py @@ -0,0 +1,23 @@ +import sys +import unittest + + +class PythonSanityTest(unittest.TestCase): + """Tests various implicit assumptions we have about Python behavior. + + This is intended to catch changes that may break extraction in future + versions of Python. + """ + + def __init__(self, name): + super(PythonSanityTest, self).__init__(name) + + def test_latin_1_encoding(self): + """Tests whether 'latin-1' acts as a "do nothing" encoding.""" + + s = bytes(range(256)) + u = str(s, 'latin-1') + s_as_tuple = tuple(s) + + u_as_tuple = tuple(map(ord, u)) + assert u_as_tuple == s_as_tuple diff --git a/python/extractor/tests/test_single.py b/python/extractor/tests/test_single.py new file mode 100644 index 00000000000..c4dacbc2464 --- /dev/null +++ b/python/extractor/tests/test_single.py @@ -0,0 +1,21 @@ + +import sys +import os.path +import shutil +import unittest + +import semmle.populator +from tests import test_utils + +class SingleThreadedTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(SingleThreadedTest, self).__init__(name) + + def test_simple(self): + self.run_extractor("-z1", "package.sub.a") + self.check_only_traps_exists_and_clear("a", "package/", "sub/") + + def test_simple_exclude(self): + self.run_extractor("-z1", "-y", "package.sub", "mod1", "package.x", "package.sub.a") + self.check_only_traps_exists_and_clear("mod1", "package/", "x") diff --git a/python/extractor/tests/test_source_archive_unchanged.py b/python/extractor/tests/test_source_archive_unchanged.py new file mode 100644 index 00000000000..524b5199f24 --- /dev/null +++ b/python/extractor/tests/test_source_archive_unchanged.py @@ -0,0 +1,27 @@ +import os +import subprocess +import filecmp + +from tests.test_utils import ExtractorTest, environment + +class SourceArchiveUnchangedTest(ExtractorTest): + """Checks that the files stored in the source archive are exact copies of the originals.""" + + def __init__(self, name): + super(SourceArchiveUnchangedTest, self).__init__(name) + testfiledir = os.path.abspath(os.path.join(self.here, "source_archive_unchanged")) + self.src_path = os.path.join(testfiledir, "src") + self.src_archive = os.path.join(testfiledir, "src_archive") + + def test_source_archive_unchanged(self): + self.run_extractor( + "-F", "tests/source_archive_unchanged/src/weird_bytes.py", + "-F", "tests/source_archive_unchanged/src/no_newline.py" + ) + source_archive_location = os.path.join(self.src_archive, os.path.relpath(self.src_path, "/")) + for filename in ("weird_bytes.py", "no_newline.py"): + orig = os.path.join(self.src_path, filename) + copy = os.path.join(source_archive_location, filename) + if not filecmp.cmp(orig, copy): + self.fail("The source archive version of the following file has changed: " + copy) + self.check_source_exists_and_clear(os.path.join(source_archive_location, filename)) diff --git a/python/extractor/tests/test_tokenizer.py b/python/extractor/tests/test_tokenizer.py new file mode 100644 index 00000000000..cd843f5dad3 --- /dev/null +++ b/python/extractor/tests/test_tokenizer.py @@ -0,0 +1,66 @@ + +import sys +import os.path +import shutil +import unittest + +import semmle.populator +from tests import test_utils +from semmle.python.parser import tokenizer +from blib2to3.pgen2.token import tok_name + +def unescape(s): + return u"'" + s.replace(u"\\", u"\\\\").replace(u"\n", u"\\n").replace(u"\t", u"\\t").replace(u"\'", u"\\'") + u"'" + + +def format_token(token): + type, text, start, end = token + # Use Python 3 tokenize style output, regardless of version + token_range = u"%d,%d-%d,%d:" % (start + end) + return u"%-20s%-15s%s" % (token_range, tok_name[type], unescape(text)) + +class TokenizerTest(unittest.TestCase): + + def __init__(self, name): + super(TokenizerTest, self).__init__(name) + self.test_folder = os.path.join(os.path.dirname(__file__), "tokenizer") + + def setUp(self): + pass + + def tearDown(self): + pass + + def compare_tokens(self, filename): + pyfile = os.path.join(self.test_folder, filename) + tokenfile = os.path.join(self.test_folder, filename[:-3]+".tokens") + with open(tokenfile, "rb") as tkns: + expected = [ line.strip().decode("utf8") for line in tkns if line.strip() ] + try: + with open(pyfile, "rb") as srcfile: + srcbytes = srcfile.read() + encoding, srcbytes = tokenizer.encoding_from_source(srcbytes) + text = srcbytes.decode(encoding) + actual = [format_token(tkn) for tkn in tokenizer.Tokenizer(text).tokens()] + except Exception as ex: + print(ex) + self.fail("Failed to tokenize " + filename) + if expected == actual: + return + actualfile = os.path.join(self.test_folder, filename[:-3]+".actual") + with open(actualfile, "wb") as out: + for line in actual: + out.write(line.encode("utf8")) + out.write(b"\n") + lineno = 1 + for expected_tkn, actual_tkn in zip(expected, actual): + assert type(expected_tkn) is str + assert type(actual_tkn) is str + self.assertEqual(expected_tkn, actual_tkn, " at %s:%d" % (filename[:-3]+".tokens", lineno)) + lineno += 1 + self.assertTrue(len(expected) == len(actual), "Too few or too many tokens for %s" % filename) + + def test_tokens(self): + for file in os.listdir(self.test_folder): + if file.endswith(".py"): + self.compare_tokens(file) diff --git a/python/extractor/tests/test_trap_cache.py b/python/extractor/tests/test_trap_cache.py new file mode 100644 index 00000000000..8bb2e3eda2b --- /dev/null +++ b/python/extractor/tests/test_trap_cache.py @@ -0,0 +1,39 @@ + +import sys +import os.path +import shutil +import unittest + +import semmle.populator +from tests import test_utils + +class TrapCacheTest(test_utils.ExtractorTest): + + def __init__(self, name): + super(TrapCacheTest, self).__init__(name) + self.trap_cache = os.path.abspath(os.path.join(self.here, "cache")) + + + def tearDown(self): + super(TrapCacheTest, self).tearDown() + shutil.rmtree(self.trap_cache, ignore_errors=True) + + def run_extractor(self, *args): + super(TrapCacheTest, self).run_extractor(*(["-c", self.trap_cache] + list(args))) + + def create_trap_cache(self): + try: + os.makedirs(self.trap_cache) + except: + if os.path.exists(self.trap_cache): + return + raise + + def test_pre_created(self): + self.create_trap_cache() + self.run_extractor("mod1", "package.x", "package.sub.a") + self.check_only_traps_exists_and_clear("mod1", "package/", "x", "sub/", "a") + + def test_not_pre_created(self): + self.run_extractor("mod1", "package.x", "package.sub.a") + self.check_only_traps_exists_and_clear("mod1", "package/", "x", "sub/", "a") diff --git a/python/extractor/tests/test_use_projectlayout.py b/python/extractor/tests/test_use_projectlayout.py new file mode 100644 index 00000000000..fde36016f97 --- /dev/null +++ b/python/extractor/tests/test_use_projectlayout.py @@ -0,0 +1,27 @@ +import os +import subprocess + +from tests.test_utils import ExtractorTest, environment + +class ProjectLayoutUseTest(ExtractorTest): + + def __init__(self, name): + super(ProjectLayoutUseTest, self).__init__(name) + self.module_path = os.path.abspath(os.path.join(self.here, "project_layout")) + self.src_path = os.path.join(self.module_path, "src") + self.src_archive = os.path.join(self.module_path, "src_archive") + + def test_layout(self): + with environment("SEMMLE_PATH_TRANSFORMER", "tests/project_layout/project-layout"): + self.run_extractor("-R", self.src_path) + self.check_only_traps_exists_and_clear("mod1") + self.check_source_exists_and_clear(os.path.join(self.src_archive, "target", "src", "mod1.py")) + + def test_invalid_layout(self): + try: + with environment("SEMMLE_PATH_TRANSFORMER", "nonsuch/project-layout"): + self.run_extractor("-R", self.src_path) + except subprocess.CalledProcessError as ex: + self.assertEqual(ex.returncode, 2) + else: + self.fail("Not cleanly halting on invalid path transformer") diff --git a/python/extractor/tests/test_utils.py b/python/extractor/tests/test_utils.py new file mode 100644 index 00000000000..74ebbacf119 --- /dev/null +++ b/python/extractor/tests/test_utils.py @@ -0,0 +1,83 @@ +import os +import sys +import semmle +import unittest +import shutil +import re +from contextlib import contextmanager + +import semmle.populator +import subprocess + +BUILTIN_TRAP = "builtins.trap.gz" + +PY_PATTERN = re.compile(r"(\w+)\.py.[A-Za-z0-9=_\-]+\.trap\.gz") +FOLDER_PATTERN = re.compile(r"(\w+).[A-Za-z0-9=_\-]+\.trap\.gz") + + +@contextmanager +def environment(key, value): + os.environ[key] = value + try: + yield + finally: + del os.environ[key] + + +class ExtractorTest(unittest.TestCase): + + def __init__(self, name): + unittest.TestCase.__init__(self, name) + self.here = os.path.dirname(__file__) + self.module_path = os.path.abspath(os.path.join(self.here, "data")) + self.trap_path = os.path.abspath(os.path.join(self.here, "traps")) + self.src_archive = None + + def setUp(self): + try: + os.makedirs(self.trap_path) + except: + if os.path.exists(self.trap_path): + return + raise + + def tearDown(self): + shutil.rmtree(self.trap_path, ignore_errors=True) + + def check_only_traps_exists_and_clear(self, *module_names): + modules = list(module_names) + for filename in os.listdir(self.trap_path): + match = PY_PATTERN.match(filename) + if match: + name = match.group(1) + else: + match = FOLDER_PATTERN.match(filename) + if match: + name = match.group(1) + "/" + else: + continue + if name in modules: + modules.remove(name) + path = os.path.join(self.trap_path, filename) + os.remove(path) + if modules: + self.fail("No trap file for " + modules.pop()) + for _, _, filenames in os.walk(self.trap_path): + #Ignore the builtin trap file, any `__init__.py` files, and $file, $interpreter trap files. + filenames = [ name for name in filenames if not name.startswith("$") and not name.startswith("__init__.py") and name != BUILTIN_TRAP] + self.assertFalse(filenames, "Some trap files remain: " + ", ".join(filenames)) + + def check_source_exists_and_clear(self, path): + try: + os.remove(path) + except OSError: + self.fail("File '%s' does not exist" % path) + + def run_extractor(self, *args): + cmd = [sys.executable, os.path.join(os.path.dirname(self.here), "python_tracer.py"), "--quiet" ] + ["-p", self.module_path, "-o", self.trap_path] + list(args) + with environment("CODEQL_EXTRACTOR_PYTHON_ENABLE_PYTHON2_EXTRACTION", "True"): + if self.src_archive: + with environment("CODEQL_EXTRACTOR_PYTHON_SOURCE_ARCHIVE_DIR", self.src_archive): + subprocess.check_call(cmd) + else: + subprocess.check_call(cmd) diff --git a/python/extractor/tests/tokenizer/basic.py b/python/extractor/tests/tokenizer/basic.py new file mode 100644 index 00000000000..473a4046be6 --- /dev/null +++ b/python/extractor/tests/tokenizer/basic.py @@ -0,0 +1,134 @@ + +#AST nodes: Classes, Functions, Modules, expr, stmts + +class C: + + def stmts(p0, p1): + global x + assert x == 2 + y = 3 + y += 4 + while True: + break + while x > 0: + x -= 1 + continue + + f() + for x in y: + pass + if x: + print(y) + import a + import a.b as c + import a as b + from a.b import c + + + with open("file") as f: + pass + try: + 1/0 + except Exception as ex: + del y + finally: + del x + if x: + raise Exception() + else: + return + + def exprs(p2, p3): + p2.x = 2 + a = p3.y + x = 1 + 2 + y = b'h4tpvhsa' + call(arg0, arg1, name0="Hi", name1=y, *(), **{}) + x < y + {1:1, 2: 2} + + x[a, 7] + (x for x in y) + 17 if x < y else 16 + lambda x : x * y + [ 1, 2, a, x.b, p1.c ] + [ a + "Hi" for a in str(y) ] + + + + #a, *b = y + u"Hi" + x[0] + x[y[0]] + (p2, p3, 7) + +#Some multiline strings +''' +Single quotes string''' + +""" +Double-quotes +string""" + +r''' +Bytes +''' + +U""" +Raw +Unicode +""" + +#Decorated function +@deco +def f(): + pass + +#Inner function (see ODASA-1774) +def outer(): + def inner(): + pass + +#Oddly laid out comprehension +[[ + x for x in y + ] + + for a in b +] + +#Nested binary operations +"Hello" + " " + "world" +1+2+f() +1+(2+3) + +# operations +a|b&c+d-e +x*f%g^h@j**k + +#Augmented assigns +a @= b +a |= b +a *= b + +~a + +#Comparisons +< +> +<= +>= +!= +== +is +is not + +(""" +""") +del x + +`backticks` + +x := y + +1 <> 2 diff --git a/python/extractor/tests/tokenizer/basic.tokens b/python/extractor/tests/tokenizer/basic.tokens new file mode 100644 index 00000000000..91445621022 --- /dev/null +++ b/python/extractor/tests/tokenizer/basic.tokens @@ -0,0 +1,472 @@ +2,0-2,52: COMMENT '#AST nodes: Classes, Functions, Modules, expr, stmts' +4,0-4,5: NAME 'class' +4,6-4,7: NAME 'C' +4,7-4,8: COLON ':' +4,8-4,9: NEWLINE '\n' +6,0-6,4: INDENT ' ' +6,4-6,7: NAME 'def' +6,8-6,13: NAME 'stmts' +6,13-6,14: LPAR '(' +6,14-6,16: NAME 'p0' +6,16-6,17: COMMA ',' +6,18-6,20: NAME 'p1' +6,20-6,21: RPAR ')' +6,21-6,22: COLON ':' +6,22-6,23: NEWLINE '\n' +7,0-7,8: INDENT ' ' +7,8-7,14: NAME 'global' +7,15-7,16: NAME 'x' +7,16-7,17: NEWLINE '\n' +8,8-8,14: NAME 'assert' +8,15-8,16: NAME 'x' +8,17-8,19: OP '==' +8,20-8,21: NUMBER '2' +8,21-8,22: NEWLINE '\n' +9,8-9,9: NAME 'y' +9,10-9,11: OP '=' +9,12-9,13: NUMBER '3' +9,13-9,14: NEWLINE '\n' +10,8-10,9: NAME 'y' +10,10-10,12: OP '+=' +10,13-10,14: NUMBER '4' +10,14-10,15: NEWLINE '\n' +11,8-11,13: NAME 'while' +11,14-11,18: NAME 'True' +11,18-11,19: COLON ':' +11,19-11,20: NEWLINE '\n' +12,0-12,12: INDENT ' ' +12,12-12,17: NAME 'break' +12,17-12,18: NEWLINE '\n' +13,8-13,8: DEDENT '' +13,8-13,13: NAME 'while' +13,14-13,15: NAME 'x' +13,16-13,17: OP '>' +13,18-13,19: NUMBER '0' +13,19-13,20: COLON ':' +13,20-13,21: NEWLINE '\n' +14,0-14,12: INDENT ' ' +14,12-14,13: NAME 'x' +14,14-14,16: OP '-=' +14,17-14,18: NUMBER '1' +14,18-14,19: NEWLINE '\n' +15,12-15,20: NAME 'continue' +15,20-15,21: NEWLINE '\n' +17,8-17,8: DEDENT '' +17,8-17,9: NAME 'f' +17,9-17,10: LPAR '(' +17,10-17,11: RPAR ')' +17,11-17,12: NEWLINE '\n' +18,8-18,11: NAME 'for' +18,12-18,13: NAME 'x' +18,14-18,16: NAME 'in' +18,17-18,18: NAME 'y' +18,18-18,19: COLON ':' +18,19-18,20: NEWLINE '\n' +19,0-19,12: INDENT ' ' +19,12-19,16: NAME 'pass' +19,16-19,17: NEWLINE '\n' +20,8-20,8: DEDENT '' +20,8-20,10: NAME 'if' +20,11-20,12: NAME 'x' +20,12-20,13: COLON ':' +20,13-20,14: NEWLINE '\n' +21,0-21,12: INDENT ' ' +21,12-21,17: NAME 'print' +21,17-21,18: LPAR '(' +21,18-21,19: NAME 'y' +21,19-21,20: RPAR ')' +21,20-21,21: NEWLINE '\n' +22,8-22,8: DEDENT '' +22,8-22,14: NAME 'import' +22,15-22,16: NAME 'a' +22,16-22,17: NEWLINE '\n' +23,8-23,14: NAME 'import' +23,15-23,16: NAME 'a' +23,16-23,17: DOT '.' +23,17-23,18: NAME 'b' +23,19-23,21: NAME 'as' +23,22-23,23: NAME 'c' +23,23-23,24: NEWLINE '\n' +24,8-24,14: NAME 'import' +24,15-24,16: NAME 'a' +24,17-24,19: NAME 'as' +24,20-24,21: NAME 'b' +24,21-24,22: NEWLINE '\n' +25,8-25,12: NAME 'from' +25,13-25,14: NAME 'a' +25,14-25,15: DOT '.' +25,15-25,16: NAME 'b' +25,17-25,23: NAME 'import' +25,24-25,25: NAME 'c' +25,25-25,26: NEWLINE '\n' +28,8-28,12: NAME 'with' +28,13-28,17: NAME 'open' +28,17-28,18: LPAR '(' +28,18-28,24: STRING '"file"' +28,24-28,25: RPAR ')' +28,26-28,28: NAME 'as' +28,29-28,30: NAME 'f' +28,30-28,31: COLON ':' +28,31-28,32: NEWLINE '\n' +29,0-29,12: INDENT ' ' +29,12-29,16: NAME 'pass' +29,16-29,17: NEWLINE '\n' +30,8-30,8: DEDENT '' +30,8-30,11: NAME 'try' +30,11-30,12: COLON ':' +30,12-30,13: NEWLINE '\n' +31,0-31,12: INDENT ' ' +31,12-31,13: NUMBER '1' +31,13-31,14: OP '/' +31,14-31,15: NUMBER '0' +31,15-31,16: NEWLINE '\n' +32,8-32,8: DEDENT '' +32,8-32,14: NAME 'except' +32,15-32,24: NAME 'Exception' +32,25-32,27: NAME 'as' +32,28-32,30: NAME 'ex' +32,30-32,31: COLON ':' +32,31-32,32: NEWLINE '\n' +33,0-33,12: INDENT ' ' +33,12-33,15: NAME 'del' +33,16-33,17: NAME 'y' +33,17-33,18: NEWLINE '\n' +34,8-34,8: DEDENT '' +34,8-34,15: NAME 'finally' +34,15-34,16: COLON ':' +34,16-34,17: NEWLINE '\n' +35,0-35,12: INDENT ' ' +35,12-35,15: NAME 'del' +35,16-35,17: NAME 'x' +35,17-35,18: NEWLINE '\n' +36,8-36,8: DEDENT '' +36,8-36,10: NAME 'if' +36,11-36,12: NAME 'x' +36,12-36,13: COLON ':' +36,13-36,14: NEWLINE '\n' +37,0-37,12: INDENT ' ' +37,12-37,17: NAME 'raise' +37,18-37,27: NAME 'Exception' +37,27-37,28: LPAR '(' +37,28-37,29: RPAR ')' +37,29-37,30: NEWLINE '\n' +38,8-38,8: DEDENT '' +38,8-38,12: NAME 'else' +38,12-38,13: COLON ':' +38,13-38,14: NEWLINE '\n' +39,0-39,12: INDENT ' ' +39,12-39,18: NAME 'return' +39,18-39,19: NEWLINE '\n' +41,4-41,4: DEDENT '' +41,4-41,4: DEDENT '' +41,4-41,7: NAME 'def' +41,8-41,13: NAME 'exprs' +41,13-41,14: LPAR '(' +41,14-41,16: NAME 'p2' +41,16-41,17: COMMA ',' +41,18-41,20: NAME 'p3' +41,20-41,21: RPAR ')' +41,21-41,22: COLON ':' +41,22-41,23: NEWLINE '\n' +42,0-42,8: INDENT ' ' +42,8-42,10: NAME 'p2' +42,10-42,11: DOT '.' +42,11-42,12: NAME 'x' +42,13-42,14: OP '=' +42,15-42,16: NUMBER '2' +42,16-42,17: NEWLINE '\n' +43,8-43,9: NAME 'a' +43,10-43,11: OP '=' +43,12-43,14: NAME 'p3' +43,14-43,15: DOT '.' +43,15-43,16: NAME 'y' +43,16-43,17: NEWLINE '\n' +44,8-44,9: NAME 'x' +44,10-44,11: OP '=' +44,12-44,13: NUMBER '1' +44,14-44,15: OP '+' +44,16-44,17: NUMBER '2' +44,17-44,18: NEWLINE '\n' +45,8-45,9: NAME 'y' +45,10-45,11: OP '=' +45,12-45,23: STRING 'b\'h4tpvhsa\'' +45,23-45,24: NEWLINE '\n' +46,8-46,12: NAME 'call' +46,12-46,13: LPAR '(' +46,13-46,17: NAME 'arg0' +46,17-46,18: COMMA ',' +46,19-46,23: NAME 'arg1' +46,23-46,24: COMMA ',' +46,25-46,30: NAME 'name0' +46,30-46,31: OP '=' +46,31-46,35: STRING '"Hi"' +46,35-46,36: COMMA ',' +46,37-46,42: NAME 'name1' +46,42-46,43: OP '=' +46,43-46,44: NAME 'y' +46,44-46,45: COMMA ',' +46,46-46,47: OP '*' +46,47-46,48: LPAR '(' +46,48-46,49: RPAR ')' +46,49-46,50: COMMA ',' +46,51-46,53: OP '**' +46,53-46,54: LBRACE '{' +46,54-46,55: RBRACE '}' +46,55-46,56: RPAR ')' +46,56-46,57: NEWLINE '\n' +47,8-47,9: NAME 'x' +47,10-47,11: OP '<' +47,12-47,13: NAME 'y' +47,13-47,14: NEWLINE '\n' +48,8-48,9: LBRACE '{' +48,9-48,10: NUMBER '1' +48,10-48,11: COLON ':' +48,11-48,12: NUMBER '1' +48,12-48,13: COMMA ',' +48,14-48,15: NUMBER '2' +48,15-48,16: COLON ':' +48,17-48,18: NUMBER '2' +48,18-48,19: RBRACE '}' +48,19-48,20: NEWLINE '\n' +50,8-50,9: NAME 'x' +50,9-50,10: LSQB '[' +50,10-50,11: NAME 'a' +50,11-50,12: COMMA ',' +50,13-50,14: NUMBER '7' +50,14-50,15: RSQB ']' +50,15-50,16: NEWLINE '\n' +51,8-51,9: LPAR '(' +51,9-51,10: NAME 'x' +51,11-51,14: NAME 'for' +51,15-51,16: NAME 'x' +51,17-51,19: NAME 'in' +51,20-51,21: NAME 'y' +51,21-51,22: RPAR ')' +51,22-51,23: NEWLINE '\n' +52,8-52,10: NUMBER '17' +52,11-52,13: NAME 'if' +52,14-52,15: NAME 'x' +52,16-52,17: OP '<' +52,18-52,19: NAME 'y' +52,20-52,24: NAME 'else' +52,25-52,27: NUMBER '16' +52,27-52,28: NEWLINE '\n' +53,8-53,14: NAME 'lambda' +53,15-53,16: NAME 'x' +53,17-53,18: COLON ':' +53,19-53,20: NAME 'x' +53,21-53,22: OP '*' +53,23-53,24: NAME 'y' +53,24-53,25: NEWLINE '\n' +54,8-54,9: LSQB '[' +54,10-54,11: NUMBER '1' +54,11-54,12: COMMA ',' +54,13-54,14: NUMBER '2' +54,14-54,15: COMMA ',' +54,16-54,17: NAME 'a' +54,17-54,18: COMMA ',' +54,19-54,20: NAME 'x' +54,20-54,21: DOT '.' +54,21-54,22: NAME 'b' +54,22-54,23: COMMA ',' +54,24-54,26: NAME 'p1' +54,26-54,27: DOT '.' +54,27-54,28: NAME 'c' +54,29-54,30: RSQB ']' +54,30-54,31: NEWLINE '\n' +55,8-55,9: LSQB '[' +55,10-55,11: NAME 'a' +55,12-55,13: OP '+' +55,14-55,18: STRING '"Hi"' +55,19-55,22: NAME 'for' +55,23-55,24: NAME 'a' +55,25-55,27: NAME 'in' +55,28-55,31: NAME 'str' +55,31-55,32: LPAR '(' +55,32-55,33: NAME 'y' +55,33-55,34: RPAR ')' +55,35-55,36: RSQB ']' +55,36-55,37: NEWLINE '\n' +59,8-59,18: COMMENT '#a, *b = y' +60,8-60,13: STRING 'u"Hi"' +60,13-60,14: NEWLINE '\n' +61,8-61,9: NAME 'x' +61,9-61,10: LSQB '[' +61,10-61,11: NUMBER '0' +61,11-61,12: RSQB ']' +61,12-61,13: NEWLINE '\n' +62,8-62,9: NAME 'x' +62,9-62,10: LSQB '[' +62,10-62,11: NAME 'y' +62,11-62,12: LSQB '[' +62,12-62,13: NUMBER '0' +62,13-62,14: RSQB ']' +62,14-62,15: RSQB ']' +62,15-62,16: NEWLINE '\n' +63,8-63,9: LPAR '(' +63,9-63,11: NAME 'p2' +63,11-63,12: COMMA ',' +63,13-63,15: NAME 'p3' +63,15-63,16: COMMA ',' +63,17-63,18: NUMBER '7' +63,18-63,19: RPAR ')' +63,19-63,20: NEWLINE '\n' +65,0-65,23: COMMENT '#Some multiline strings' +66,0-66,0: DEDENT '' +66,0-66,0: DEDENT '' +66,0-67,23: STRING '\'\'\'\nSingle quotes string\'\'\'' +67,23-67,24: NEWLINE '\n' +69,0-71,9: STRING '"""\nDouble-quotes\nstring"""' +71,9-71,10: NEWLINE '\n' +73,0-75,3: STRING 'r\'\'\'\nBytes\n\'\'\'' +75,3-75,4: NEWLINE '\n' +77,0-80,3: STRING 'U"""\nRaw\nUnicode\n"""' +80,3-80,4: NEWLINE '\n' +82,0-82,19: COMMENT '#Decorated function' +83,0-83,1: AT '@' +83,1-83,5: NAME 'deco' +83,5-83,6: NEWLINE '\n' +84,0-84,3: NAME 'def' +84,4-84,5: NAME 'f' +84,5-84,6: LPAR '(' +84,6-84,7: RPAR ')' +84,7-84,8: COLON ':' +84,8-84,9: NEWLINE '\n' +85,0-85,4: INDENT ' ' +85,4-85,8: NAME 'pass' +85,8-85,9: NEWLINE '\n' +87,0-87,32: COMMENT '#Inner function (see ODASA-1774)' +88,0-88,0: DEDENT '' +88,0-88,3: NAME 'def' +88,4-88,9: NAME 'outer' +88,9-88,10: LPAR '(' +88,10-88,11: RPAR ')' +88,11-88,12: COLON ':' +88,12-88,13: NEWLINE '\n' +89,0-89,4: INDENT ' ' +89,4-89,7: NAME 'def' +89,8-89,13: NAME 'inner' +89,13-89,14: LPAR '(' +89,14-89,15: RPAR ')' +89,15-89,16: COLON ':' +89,16-89,17: NEWLINE '\n' +90,0-90,8: INDENT ' ' +90,8-90,12: NAME 'pass' +90,12-90,13: NEWLINE '\n' +92,0-92,29: COMMENT '#Oddly laid out comprehension' +93,0-93,0: DEDENT '' +93,0-93,0: DEDENT '' +93,0-93,1: LSQB '[' +93,1-93,2: LSQB '[' +94,2-94,3: NAME 'x' +94,4-94,7: NAME 'for' +94,8-94,9: NAME 'x' +94,10-94,12: NAME 'in' +94,13-94,14: NAME 'y' +95,2-95,3: RSQB ']' +97,2-97,5: NAME 'for' +97,6-97,7: NAME 'a' +97,8-97,10: NAME 'in' +97,11-97,12: NAME 'b' +98,0-98,1: RSQB ']' +98,1-98,2: NEWLINE '\n' +100,0-100,25: COMMENT '#Nested binary operations' +101,0-101,7: STRING '"Hello"' +101,8-101,9: OP '+' +101,10-101,13: STRING '" "' +101,14-101,15: OP '+' +101,16-101,23: STRING '"world"' +101,23-101,24: NEWLINE '\n' +102,0-102,1: NUMBER '1' +102,1-102,2: OP '+' +102,2-102,3: NUMBER '2' +102,3-102,4: OP '+' +102,4-102,5: NAME 'f' +102,5-102,6: LPAR '(' +102,6-102,7: RPAR ')' +102,7-102,8: NEWLINE '\n' +103,0-103,1: NUMBER '1' +103,1-103,2: OP '+' +103,2-103,3: LPAR '(' +103,3-103,4: NUMBER '2' +103,4-103,5: OP '+' +103,5-103,6: NUMBER '3' +103,6-103,7: RPAR ')' +103,7-103,8: NEWLINE '\n' +105,0-105,12: COMMENT '# operations' +106,0-106,1: NAME 'a' +106,1-106,2: OP '|' +106,2-106,3: NAME 'b' +106,3-106,4: OP '&' +106,4-106,5: NAME 'c' +106,5-106,6: OP '+' +106,6-106,7: NAME 'd' +106,7-106,8: OP '-' +106,8-106,9: NAME 'e' +106,9-106,10: NEWLINE '\n' +107,0-107,1: NAME 'x' +107,1-107,2: OP '*' +107,2-107,3: NAME 'f' +107,3-107,4: OP '%' +107,4-107,5: NAME 'g' +107,5-107,6: OP '^' +107,6-107,7: NAME 'h' +107,7-107,8: AT '@' +107,8-107,9: NAME 'j' +107,9-107,11: OP '**' +107,11-107,12: NAME 'k' +107,12-107,13: NEWLINE '\n' +109,0-109,18: COMMENT '#Augmented assigns' +110,0-110,1: NAME 'a' +110,2-110,4: OP '@=' +110,5-110,6: NAME 'b' +110,6-110,7: NEWLINE '\n' +111,0-111,1: NAME 'a' +111,2-111,4: OP '|=' +111,5-111,6: NAME 'b' +111,6-111,7: NEWLINE '\n' +112,0-112,1: NAME 'a' +112,2-112,4: OP '*=' +112,5-112,6: NAME 'b' +112,6-112,7: NEWLINE '\n' +114,0-114,1: OP '~' +114,1-114,2: NAME 'a' +114,2-114,3: NEWLINE '\n' +116,0-116,12: COMMENT '#Comparisons' +117,0-117,1: OP '<' +117,1-117,2: NEWLINE '\n' +118,0-118,1: OP '>' +118,1-118,2: NEWLINE '\n' +119,0-119,2: OP '<=' +119,2-119,3: NEWLINE '\n' +120,0-120,2: OP '>=' +120,2-120,3: NEWLINE '\n' +121,0-121,2: OP '!=' +121,2-121,3: NEWLINE '\n' +122,0-122,2: OP '==' +122,2-122,3: NEWLINE '\n' +123,0-123,2: NAME 'is' +123,2-123,3: NEWLINE '\n' +124,0-124,2: NAME 'is' +124,3-124,6: NAME 'not' +124,6-124,7: NEWLINE '\n' +126,0-126,1: LPAR '(' +126,1-127,3: STRING '"""\n"""' +127,3-127,4: RPAR ')' +127,4-127,5: NEWLINE '\n' +128,0-128,3: NAME 'del' +128,4-128,5: NAME 'x' +128,5-128,6: NEWLINE '\n' +130,0-130,1: BACKQUOTE '`' +130,1-130,10: NAME 'backticks' +130,10-130,11: BACKQUOTE '`' +130,11-130,12: NEWLINE '\n' +132,0-132,1: NAME 'x' +132,3-132,4: COLONEQUAL ':=' +132,5-132,6: NAME 'y' +132,6-132,7: NEWLINE '\n' +134,0-134,1: NUMBER '1' +134,2-134,4: OP '<>' +134,5-134,6: NUMBER '2' +134,6-134,7: NEWLINE '\n' +135,0-135,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/close_brace.py b/python/extractor/tests/tokenizer/close_brace.py new file mode 100644 index 00000000000..f64214bb17c --- /dev/null +++ b/python/extractor/tests/tokenizer/close_brace.py @@ -0,0 +1,3 @@ +} +) +] diff --git a/python/extractor/tests/tokenizer/close_brace.tokens b/python/extractor/tests/tokenizer/close_brace.tokens new file mode 100644 index 00000000000..75d0c8feff6 --- /dev/null +++ b/python/extractor/tests/tokenizer/close_brace.tokens @@ -0,0 +1,7 @@ +1,0-1,1: RBRACE '}' +1,1-1,2: NEWLINE '\n' +2,0-2,1: RPAR ')' +2,1-2,2: NEWLINE '\n' +3,0-3,1: RSQB ']' +3,1-3,2: NEWLINE '\n' +4,0-4,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/comments.py b/python/extractor/tests/tokenizer/comments.py new file mode 100644 index 00000000000..1f89e4debc5 --- /dev/null +++ b/python/extractor/tests/tokenizer/comments.py @@ -0,0 +1,13 @@ + +import sys + +def f(): + code-here # Line end comment + #Indented comment +#Unindented comment + return 1 + +def g(arg): + return arg + +x = g(f()) diff --git a/python/extractor/tests/tokenizer/comments.tokens b/python/extractor/tests/tokenizer/comments.tokens new file mode 100644 index 00000000000..c76d40757e0 --- /dev/null +++ b/python/extractor/tests/tokenizer/comments.tokens @@ -0,0 +1,43 @@ +2,0-2,6: NAME 'import' +2,7-2,10: NAME 'sys' +2,10-2,11: NEWLINE '\n' +4,0-4,3: NAME 'def' +4,4-4,5: NAME 'f' +4,5-4,6: LPAR '(' +4,6-4,7: RPAR ')' +4,7-4,8: COLON ':' +4,8-4,9: NEWLINE '\n' +5,0-5,4: INDENT ' ' +5,4-5,8: NAME 'code' +5,8-5,9: OP '-' +5,9-5,13: NAME 'here' +5,14-5,32: COMMENT '# Line end comment' +5,32-5,33: NEWLINE '\n' +6,4-6,21: COMMENT '#Indented comment' +7,0-7,19: COMMENT '#Unindented comment' +8,4-8,10: NAME 'return' +8,11-8,12: NUMBER '1' +8,12-8,13: NEWLINE '\n' +10,0-10,0: DEDENT '' +10,0-10,3: NAME 'def' +10,4-10,5: NAME 'g' +10,5-10,6: LPAR '(' +10,6-10,9: NAME 'arg' +10,9-10,10: RPAR ')' +10,10-10,11: COLON ':' +10,11-10,12: NEWLINE '\n' +11,0-11,4: INDENT ' ' +11,4-11,10: NAME 'return' +11,11-11,14: NAME 'arg' +11,14-11,15: NEWLINE '\n' +13,0-13,0: DEDENT '' +13,0-13,1: NAME 'x' +13,2-13,3: OP '=' +13,4-13,5: NAME 'g' +13,5-13,6: LPAR '(' +13,6-13,7: NAME 'f' +13,7-13,8: LPAR '(' +13,8-13,9: RPAR ')' +13,9-13,10: RPAR ')' +13,10-13,11: NEWLINE '\n' +14,0-14,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/continuation.py b/python/extractor/tests/tokenizer/continuation.py new file mode 100644 index 00000000000..c9516a29a24 --- /dev/null +++ b/python/extractor/tests/tokenizer/continuation.py @@ -0,0 +1,5 @@ +def foo(): + pass \ +\ +\ + diff --git a/python/extractor/tests/tokenizer/continuation.tokens b/python/extractor/tests/tokenizer/continuation.tokens new file mode 100644 index 00000000000..a0d221967a2 --- /dev/null +++ b/python/extractor/tests/tokenizer/continuation.tokens @@ -0,0 +1,11 @@ +1,0-1,3: NAME 'def' +1,4-1,7: NAME 'foo' +1,7-1,8: LPAR '(' +1,8-1,9: RPAR ')' +1,9-1,10: COLON ':' +1,10-1,11: NEWLINE '\n' +2,0-2,4: INDENT ' ' +2,4-2,8: NAME 'pass' +5,0-5,1: NEWLINE '\n' +6,0-6,0: DEDENT '' +6,0-6,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/dollar.py b/python/extractor/tests/tokenizer/dollar.py new file mode 100644 index 00000000000..d355cb52a39 --- /dev/null +++ b/python/extractor/tests/tokenizer/dollar.py @@ -0,0 +1,2 @@ +$name +$ßðđ0 diff --git a/python/extractor/tests/tokenizer/dollar.tokens b/python/extractor/tests/tokenizer/dollar.tokens new file mode 100644 index 00000000000..7b0d3646c75 --- /dev/null +++ b/python/extractor/tests/tokenizer/dollar.tokens @@ -0,0 +1,5 @@ +1,0-1,5: DOLLARNAME '$name' +1,5-1,6: NEWLINE '\n' +2,0-2,5: DOLLARNAME '$ßðđ0' +2,5-2,6: NEWLINE '\n' +3,0-3,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/dots.py b/python/extractor/tests/tokenizer/dots.py new file mode 100644 index 00000000000..3bb53d080e8 --- /dev/null +++ b/python/extractor/tests/tokenizer/dots.py @@ -0,0 +1,4 @@ +. +.. +... +.... diff --git a/python/extractor/tests/tokenizer/dots.tokens b/python/extractor/tests/tokenizer/dots.tokens new file mode 100644 index 00000000000..d8b11498818 --- /dev/null +++ b/python/extractor/tests/tokenizer/dots.tokens @@ -0,0 +1,15 @@ +1,0-1,1: DOT '.' +1,1-1,2: NEWLINE '\n' +2,0-2,1: DOT '.' +2,1-2,2: DOT '.' +2,2-2,3: NEWLINE '\n' +3,0-3,1: DOT '.' +3,1-3,2: DOT '.' +3,2-3,3: DOT '.' +3,3-3,4: NEWLINE '\n' +4,0-4,1: DOT '.' +4,1-4,2: DOT '.' +4,2-4,3: DOT '.' +4,3-4,4: DOT '.' +4,4-4,5: NEWLINE '\n' +5,0-5,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/emoji.py b/python/extractor/tests/tokenizer/emoji.py new file mode 100644 index 00000000000..9c329e84e7d --- /dev/null +++ b/python/extractor/tests/tokenizer/emoji.py @@ -0,0 +1,2 @@ +"👦👦🏻👦🏼👦🏽👦🏾👦🏿👧👧🏻👧🏼👧🏽👧🏾👧🏿" +"😀😁😂😃😄😅😆😇😈😉😊😋😌😍😎😏" diff --git a/python/extractor/tests/tokenizer/emoji.tokens b/python/extractor/tests/tokenizer/emoji.tokens new file mode 100644 index 00000000000..84f4a3deb9f --- /dev/null +++ b/python/extractor/tests/tokenizer/emoji.tokens @@ -0,0 +1,5 @@ +1,0-1,24: STRING '"👦👦🏻👦🏼👦🏽👦🏾👦🏿👧👧🏻👧🏼👧🏽👧🏾👧🏿"' +1,24-1,25: NEWLINE '\n' +2,0-2,18: STRING '"😀😁😂😃😄😅😆😇😈😉😊😋😌😍😎😏"' +2,18-2,19: NEWLINE '\n' +3,0-3,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/feeds.py b/python/extractor/tests/tokenizer/feeds.py new file mode 100644 index 00000000000..007b983b8ab --- /dev/null +++ b/python/extractor/tests/tokenizer/feeds.py @@ -0,0 +1,4 @@ + + + +name diff --git a/python/extractor/tests/tokenizer/feeds.tokens b/python/extractor/tests/tokenizer/feeds.tokens new file mode 100644 index 00000000000..4fdc4512d72 --- /dev/null +++ b/python/extractor/tests/tokenizer/feeds.tokens @@ -0,0 +1,3 @@ +4,0-4,4: NAME 'name' +4,4-4,5: NEWLINE '\n' +5,0-5,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/gen_tokens.py b/python/extractor/tests/tokenizer/gen_tokens.py new file mode 100644 index 00000000000..52a04f79fe3 --- /dev/null +++ b/python/extractor/tests/tokenizer/gen_tokens.py @@ -0,0 +1,38 @@ +import sys +import tokenize +import token + +def printtoken(type, token, start, end, _): + # Use Python 3 tokenize style output, regardless of version + if tokenize.tok_name[type] not in ("ENCODING", "NL"): + token_range = "%d,%d-%d,%d:" % (start + end) + print("%-20s%-15s%r" % + (token_range, tokenize.tok_name[type], token) + ) + +OP_TYPES = { + "(" : token.LPAR, + ")" : token.RPAR, + "[" : token.LSQB, + "]" : token.RSQB, + "{" : token.LBRACE, + "}" : token.RBRACE, + ":" : token.COLON, + "," : token.COMMA, + "." : token.DOT, + "@" : token.AT, + } + +def main(): + readline = open(sys.argv[1], "rb").readline + if sys.version < "3": + tokenize.tokenize(readline, printtoken) + else: + for type, token, start, end, _ in tokenize.tokenize(readline): + if tokenize.tok_name[type] == "OP": + type = OP_TYPES.get(token, type) + if tokenize.tok_name[type] not in ("ENCODING", "NL"): + printtoken(type, token, start, end, _) + +if __name__ == "__main__": + main() diff --git a/python/extractor/tests/tokenizer/gen_tokens.tokens b/python/extractor/tests/tokenizer/gen_tokens.tokens new file mode 100644 index 00000000000..ab72f956525 --- /dev/null +++ b/python/extractor/tests/tokenizer/gen_tokens.tokens @@ -0,0 +1,275 @@ +1,0-1,6: NAME 'import' +1,7-1,10: NAME 'sys' +1,10-1,11: NEWLINE '\n' +2,0-2,6: NAME 'import' +2,7-2,15: NAME 'tokenize' +2,15-2,16: NEWLINE '\n' +3,0-3,6: NAME 'import' +3,7-3,12: NAME 'token' +3,12-3,13: NEWLINE '\n' +5,0-5,3: NAME 'def' +5,4-5,14: NAME 'printtoken' +5,14-5,15: LPAR '(' +5,15-5,19: NAME 'type' +5,19-5,20: COMMA ',' +5,21-5,26: NAME 'token' +5,26-5,27: COMMA ',' +5,28-5,33: NAME 'start' +5,33-5,34: COMMA ',' +5,35-5,38: NAME 'end' +5,38-5,39: COMMA ',' +5,40-5,41: NAME '_' +5,41-5,42: RPAR ')' +5,42-5,43: COLON ':' +5,44-5,45: NEWLINE '\n' +6,4-6,63: COMMENT '# Use Python 3 tokenize style output, regardless of version' +7,0-7,4: INDENT ' ' +7,4-7,6: NAME 'if' +7,7-7,15: NAME 'tokenize' +7,15-7,16: DOT '.' +7,16-7,24: NAME 'tok_name' +7,24-7,25: LSQB '[' +7,25-7,29: NAME 'type' +7,29-7,30: RSQB ']' +7,31-7,34: NAME 'not' +7,35-7,37: NAME 'in' +7,38-7,39: LPAR '(' +7,39-7,49: STRING '"ENCODING"' +7,49-7,50: COMMA ',' +7,51-7,55: STRING '"NL"' +7,55-7,56: RPAR ')' +7,56-7,57: COLON ':' +7,57-7,58: NEWLINE '\n' +8,0-8,8: INDENT ' ' +8,8-8,19: NAME 'token_range' +8,20-8,21: OP '=' +8,22-8,36: STRING '"%d,%d-%d,%d:"' +8,37-8,38: OP '%' +8,39-8,40: LPAR '(' +8,40-8,45: NAME 'start' +8,46-8,47: OP '+' +8,48-8,51: NAME 'end' +8,51-8,52: RPAR ')' +8,52-8,53: NEWLINE '\n' +9,8-9,13: NAME 'print' +9,13-9,14: LPAR '(' +9,14-9,28: STRING '"%-20s%-15s%r"' +9,29-9,30: OP '%' +10,12-10,13: LPAR '(' +10,13-10,24: NAME 'token_range' +10,24-10,25: COMMA ',' +10,26-10,34: NAME 'tokenize' +10,34-10,35: DOT '.' +10,35-10,43: NAME 'tok_name' +10,43-10,44: LSQB '[' +10,44-10,48: NAME 'type' +10,48-10,49: RSQB ']' +10,49-10,50: COMMA ',' +10,51-10,56: NAME 'token' +10,56-10,57: RPAR ')' +11,8-11,9: RPAR ')' +11,9-11,10: NEWLINE '\n' +13,0-13,0: DEDENT '' +13,0-13,0: DEDENT '' +13,0-13,8: NAME 'OP_TYPES' +13,9-13,10: OP '=' +13,11-13,12: LBRACE '{' +14,4-14,7: STRING '"("' +14,8-14,9: COLON ':' +14,10-14,15: NAME 'token' +14,15-14,16: DOT '.' +14,16-14,20: NAME 'LPAR' +14,20-14,21: COMMA ',' +15,4-15,7: STRING '")"' +15,8-15,9: COLON ':' +15,10-15,15: NAME 'token' +15,15-15,16: DOT '.' +15,16-15,20: NAME 'RPAR' +15,20-15,21: COMMA ',' +16,4-16,7: STRING '"["' +16,8-16,9: COLON ':' +16,10-16,15: NAME 'token' +16,15-16,16: DOT '.' +16,16-16,20: NAME 'LSQB' +16,20-16,21: COMMA ',' +17,4-17,7: STRING '"]"' +17,8-17,9: COLON ':' +17,10-17,15: NAME 'token' +17,15-17,16: DOT '.' +17,16-17,20: NAME 'RSQB' +17,20-17,21: COMMA ',' +18,4-18,7: STRING '"{"' +18,8-18,9: COLON ':' +18,10-18,15: NAME 'token' +18,15-18,16: DOT '.' +18,16-18,22: NAME 'LBRACE' +18,22-18,23: COMMA ',' +19,4-19,7: STRING '"}"' +19,8-19,9: COLON ':' +19,10-19,15: NAME 'token' +19,15-19,16: DOT '.' +19,16-19,22: NAME 'RBRACE' +19,22-19,23: COMMA ',' +20,4-20,7: STRING '":"' +20,8-20,9: COLON ':' +20,10-20,15: NAME 'token' +20,15-20,16: DOT '.' +20,16-20,21: NAME 'COLON' +20,21-20,22: COMMA ',' +21,4-21,7: STRING '","' +21,8-21,9: COLON ':' +21,10-21,15: NAME 'token' +21,15-21,16: DOT '.' +21,16-21,21: NAME 'COMMA' +21,21-21,22: COMMA ',' +22,4-22,7: STRING '"."' +22,8-22,9: COLON ':' +22,10-22,15: NAME 'token' +22,15-22,16: DOT '.' +22,16-22,19: NAME 'DOT' +22,19-22,20: COMMA ',' +23,4-23,7: STRING '"@"' +23,8-23,9: COLON ':' +23,10-23,15: NAME 'token' +23,15-23,16: DOT '.' +23,16-23,18: NAME 'AT' +23,18-23,19: COMMA ',' +24,4-24,5: RBRACE '}' +24,5-24,6: NEWLINE '\n' +26,0-26,3: NAME 'def' +26,4-26,8: NAME 'main' +26,8-26,9: LPAR '(' +26,9-26,10: RPAR ')' +26,10-26,11: COLON ':' +26,11-26,12: NEWLINE '\n' +27,0-27,4: INDENT ' ' +27,4-27,12: NAME 'readline' +27,13-27,14: OP '=' +27,15-27,19: NAME 'open' +27,19-27,20: LPAR '(' +27,20-27,23: NAME 'sys' +27,23-27,24: DOT '.' +27,24-27,28: NAME 'argv' +27,28-27,29: LSQB '[' +27,29-27,30: NUMBER '1' +27,30-27,31: RSQB ']' +27,31-27,32: COMMA ',' +27,33-27,37: STRING '"rb"' +27,37-27,38: RPAR ')' +27,38-27,39: DOT '.' +27,39-27,47: NAME 'readline' +27,47-27,48: NEWLINE '\n' +28,4-28,6: NAME 'if' +28,7-28,10: NAME 'sys' +28,10-28,11: DOT '.' +28,11-28,18: NAME 'version' +28,19-28,20: OP '<' +28,21-28,24: STRING '"3"' +28,24-28,25: COLON ':' +28,25-28,26: NEWLINE '\n' +29,0-29,8: INDENT ' ' +29,8-29,16: NAME 'tokenize' +29,16-29,17: DOT '.' +29,17-29,25: NAME 'tokenize' +29,25-29,26: LPAR '(' +29,26-29,34: NAME 'readline' +29,34-29,35: COMMA ',' +29,36-29,46: NAME 'printtoken' +29,46-29,47: RPAR ')' +29,47-29,48: NEWLINE '\n' +30,4-30,4: DEDENT '' +30,4-30,8: NAME 'else' +30,8-30,9: COLON ':' +30,9-30,10: NEWLINE '\n' +31,0-31,8: INDENT ' ' +31,8-31,11: NAME 'for' +31,12-31,16: NAME 'type' +31,16-31,17: COMMA ',' +31,18-31,23: NAME 'token' +31,23-31,24: COMMA ',' +31,25-31,30: NAME 'start' +31,30-31,31: COMMA ',' +31,32-31,35: NAME 'end' +31,35-31,36: COMMA ',' +31,37-31,38: NAME '_' +31,39-31,41: NAME 'in' +31,42-31,50: NAME 'tokenize' +31,50-31,51: DOT '.' +31,51-31,59: NAME 'tokenize' +31,59-31,60: LPAR '(' +31,60-31,68: NAME 'readline' +31,68-31,69: RPAR ')' +31,69-31,70: COLON ':' +31,70-31,71: NEWLINE '\n' +32,0-32,12: INDENT ' ' +32,12-32,14: NAME 'if' +32,15-32,23: NAME 'tokenize' +32,23-32,24: DOT '.' +32,24-32,32: NAME 'tok_name' +32,32-32,33: LSQB '[' +32,33-32,37: NAME 'type' +32,37-32,38: RSQB ']' +32,39-32,41: OP '==' +32,42-32,46: STRING '"OP"' +32,46-32,47: COLON ':' +32,47-32,48: NEWLINE '\n' +33,0-33,16: INDENT ' ' +33,16-33,20: NAME 'type' +33,21-33,22: OP '=' +33,23-33,31: NAME 'OP_TYPES' +33,31-33,32: DOT '.' +33,32-33,35: NAME 'get' +33,35-33,36: LPAR '(' +33,36-33,41: NAME 'token' +33,41-33,42: COMMA ',' +33,43-33,47: NAME 'type' +33,47-33,48: RPAR ')' +33,48-33,49: NEWLINE '\n' +34,12-34,12: DEDENT '' +34,12-34,14: NAME 'if' +34,15-34,23: NAME 'tokenize' +34,23-34,24: DOT '.' +34,24-34,32: NAME 'tok_name' +34,32-34,33: LSQB '[' +34,33-34,37: NAME 'type' +34,37-34,38: RSQB ']' +34,39-34,42: NAME 'not' +34,43-34,45: NAME 'in' +34,46-34,47: LPAR '(' +34,47-34,57: STRING '"ENCODING"' +34,57-34,58: COMMA ',' +34,59-34,63: STRING '"NL"' +34,63-34,64: RPAR ')' +34,64-34,65: COLON ':' +34,65-34,66: NEWLINE '\n' +35,0-35,16: INDENT ' ' +35,16-35,26: NAME 'printtoken' +35,26-35,27: LPAR '(' +35,27-35,31: NAME 'type' +35,31-35,32: COMMA ',' +35,33-35,38: NAME 'token' +35,38-35,39: COMMA ',' +35,40-35,45: NAME 'start' +35,45-35,46: COMMA ',' +35,47-35,50: NAME 'end' +35,50-35,51: COMMA ',' +35,52-35,53: NAME '_' +35,53-35,54: RPAR ')' +35,54-35,55: NEWLINE '\n' +37,0-37,0: DEDENT '' +37,0-37,0: DEDENT '' +37,0-37,0: DEDENT '' +37,0-37,0: DEDENT '' +37,0-37,2: NAME 'if' +37,3-37,11: NAME '__name__' +37,12-37,14: OP '==' +37,15-37,25: STRING '"__main__"' +37,25-37,26: COLON ':' +37,26-37,27: NEWLINE '\n' +38,0-38,4: INDENT ' ' +38,4-38,8: NAME 'main' +38,8-38,9: LPAR '(' +38,9-38,10: RPAR ')' +38,10-38,11: NEWLINE '\n' +39,0-39,0: DEDENT '' +39,0-39,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/illegal_indentation.py b/python/extractor/tests/tokenizer/illegal_indentation.py new file mode 100644 index 00000000000..ed793d1c0da --- /dev/null +++ b/python/extractor/tests/tokenizer/illegal_indentation.py @@ -0,0 +1,4 @@ +def foo(seq): + for var in seq: + body + illegal-dedent diff --git a/python/extractor/tests/tokenizer/illegal_indentation.tokens b/python/extractor/tests/tokenizer/illegal_indentation.tokens new file mode 100644 index 00000000000..bcc8d8f355e --- /dev/null +++ b/python/extractor/tests/tokenizer/illegal_indentation.tokens @@ -0,0 +1,24 @@ +1,0-1,3: NAME 'def' +1,4-1,7: NAME 'foo' +1,7-1,8: LPAR '(' +1,8-1,11: NAME 'seq' +1,11-1,12: RPAR ')' +1,12-1,13: COLON ':' +1,13-1,14: NEWLINE '\n' +2,0-2,4: INDENT ' ' +2,4-2,7: NAME 'for' +2,8-2,11: NAME 'var' +2,12-2,14: NAME 'in' +2,15-2,18: NAME 'seq' +2,18-2,19: COLON ':' +2,19-2,20: NEWLINE '\n' +3,0-3,8: INDENT ' ' +3,8-3,12: NAME 'body' +3,12-3,13: NEWLINE '\n' +4,6-4,6: ILLEGALINDENT '' +4,6-4,13: NAME 'illegal' +4,13-4,14: OP '-' +4,14-4,20: NAME 'dedent' +4,20-4,21: NEWLINE '\n' +5,0-5,0: DEDENT '' +5,0-5,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/illegal_indentation2.py b/python/extractor/tests/tokenizer/illegal_indentation2.py new file mode 100644 index 00000000000..3aa2c634df4 --- /dev/null +++ b/python/extractor/tests/tokenizer/illegal_indentation2.py @@ -0,0 +1,7 @@ +class C: + def foo(seq): + for var in seq: + body + illegal + dedent + sequence diff --git a/python/extractor/tests/tokenizer/illegal_indentation2.tokens b/python/extractor/tests/tokenizer/illegal_indentation2.tokens new file mode 100644 index 00000000000..69bf427ce70 --- /dev/null +++ b/python/extractor/tests/tokenizer/illegal_indentation2.tokens @@ -0,0 +1,34 @@ +1,0-1,5: NAME 'class' +1,6-1,7: NAME 'C' +1,7-1,8: COLON ':' +1,8-1,9: NEWLINE '\n' +2,0-2,4: INDENT ' ' +2,4-2,7: NAME 'def' +2,8-2,11: NAME 'foo' +2,11-2,12: LPAR '(' +2,12-2,15: NAME 'seq' +2,15-2,16: RPAR ')' +2,16-2,17: COLON ':' +2,17-2,18: NEWLINE '\n' +3,0-3,8: INDENT ' ' +3,8-3,11: NAME 'for' +3,12-3,15: NAME 'var' +3,16-3,18: NAME 'in' +3,19-3,22: NAME 'seq' +3,22-3,23: COLON ':' +3,23-3,24: NEWLINE '\n' +4,0-4,12: INDENT ' ' +4,12-4,16: NAME 'body' +4,16-4,17: NEWLINE '\n' +5,6-5,6: DEDENT '' +5,6-5,6: ILLEGALINDENT '' +5,6-5,13: NAME 'illegal' +5,13-5,14: NEWLINE '\n' +6,0-6,5: INDENT ' ' +6,5-6,11: NAME 'dedent' +6,11-6,12: NEWLINE '\n' +7,4-7,4: DEDENT '' +7,4-7,12: NAME 'sequence' +7,12-7,13: NEWLINE '\n' +8,0-8,0: DEDENT '' +8,0-8,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/import.py b/python/extractor/tests/tokenizer/import.py new file mode 100644 index 00000000000..58ce32f636d --- /dev/null +++ b/python/extractor/tests/tokenizer/import.py @@ -0,0 +1,2 @@ +import a +import why diff --git a/python/extractor/tests/tokenizer/import.tokens b/python/extractor/tests/tokenizer/import.tokens new file mode 100644 index 00000000000..b88471b23f2 --- /dev/null +++ b/python/extractor/tests/tokenizer/import.tokens @@ -0,0 +1,7 @@ +1,0-1,6: NAME 'import' +1,7-1,8: NAME 'a' +1,8-1,9: NEWLINE '\n' +2,0-2,6: NAME 'import' +2,7-2,10: NAME 'why' +2,10-2,11: NEWLINE '\n' +3,0-3,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/kannada.py b/python/extractor/tests/tokenizer/kannada.py new file mode 100644 index 00000000000..674af2d6e31 --- /dev/null +++ b/python/extractor/tests/tokenizer/kannada.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- + +def ಏನಾದರೂ_ಮಾಡು(): + print('ಏನೋ ಮಾಡಿದೆ') + + +ಏನಾದರೂ_ಮಾಡು() diff --git a/python/extractor/tests/tokenizer/kannada.tokens b/python/extractor/tests/tokenizer/kannada.tokens new file mode 100644 index 00000000000..b96a64ad3d1 --- /dev/null +++ b/python/extractor/tests/tokenizer/kannada.tokens @@ -0,0 +1,19 @@ +1,0-1,23: COMMENT '# -*- coding: utf-8 -*-' +3,0-3,3: NAME 'def' +3,4-3,15: NAME 'ಏನಾದರೂ_ಮಾಡು' +3,15-3,16: LPAR '(' +3,16-3,17: RPAR ')' +3,17-3,18: COLON ':' +3,18-3,19: NEWLINE '\n' +4,0-4,4: INDENT ' ' +4,4-4,9: NAME 'print' +4,9-4,10: LPAR '(' +4,10-4,22: STRING '\'ಏನೋ ಮಾಡಿದೆ\'' +4,22-4,23: RPAR ')' +4,23-4,24: NEWLINE '\n' +7,0-7,0: DEDENT '' +7,0-7,11: NAME 'ಏನಾದರೂ_ಮಾಡು' +7,11-7,12: LPAR '(' +7,12-7,13: RPAR ')' +7,13-7,14: NEWLINE '\n' +8,0-8,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/latin.py b/python/extractor/tests/tokenizer/latin.py new file mode 100644 index 00000000000..538a7b90e93 --- /dev/null +++ b/python/extractor/tests/tokenizer/latin.py @@ -0,0 +1,4 @@ +"Any old stuff can go here" +# -*- coding: latin1 -*- +# Gnter + diff --git a/python/extractor/tests/tokenizer/latin.tokens b/python/extractor/tests/tokenizer/latin.tokens new file mode 100644 index 00000000000..c7158916808 --- /dev/null +++ b/python/extractor/tests/tokenizer/latin.tokens @@ -0,0 +1,5 @@ +1,0-1,27: STRING '"Any old stuff can go here"' +1,27-1,28: NEWLINE '\n' +2,0-2,24: COMMENT '# -*- coding: latin1 -*-' +3,0-3,8: COMMENT '# Günter' +5,0-5,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/numbers.py b/python/extractor/tests/tokenizer/numbers.py new file mode 100644 index 00000000000..d57fa12ef05 --- /dev/null +++ b/python/extractor/tests/tokenizer/numbers.py @@ -0,0 +1,83 @@ + +#Some negative numbers + +-1 +-10000000000000000 +-1.0 +-3.0e17 + +-(1) +-(10000000000000000) +-(1.0) +-(3.0e17) + +(-1) +(-10000000000000000) +(-1.0) +(-3.0e17) + +-1j + +-3.7e12j + +#Some other numbers +0.058823529630899429 + +1e-06 +.9999999 +0xffffff +1e10 +1. +2.79252680 +0x0001000 +4987312561856745907287624786230562734672583763984576267 + +#Octal both styles +0777 +0o777 + +#Python2 longs +0 +0L +5L +-2L +498731256185674590728762478623056L + +0xfffffffL +0xeeeeeeeeeeeeeeeeL + +0b00010101011111111111L +0o77777777777L +0777777777777L +0j +0_0234j + +0e0 + +#Valid uses of underscore: + +1_1 +1_2_3.4_5_6e7_8_9 +0b1_1 +0o1_1 +0x1_1 + +0b_010 +0o_010 +0x_010 + +#Invalid uses of underscore: + +1__3 +2e_5 +2e+_5 +123_ + +#Valid prefixed zero: + +0_0 +009. +009e005 +00123 + +1 if 1else 0 diff --git a/python/extractor/tests/tokenizer/numbers.tokens b/python/extractor/tests/tokenizer/numbers.tokens new file mode 100644 index 00000000000..81d210f6baa --- /dev/null +++ b/python/extractor/tests/tokenizer/numbers.tokens @@ -0,0 +1,156 @@ +2,0-2,22: COMMENT '#Some negative numbers' +4,0-4,1: OP '-' +4,1-4,2: NUMBER '1' +4,2-4,3: NEWLINE '\n' +5,0-5,1: OP '-' +5,1-5,18: NUMBER '10000000000000000' +5,18-5,19: NEWLINE '\n' +6,0-6,1: OP '-' +6,1-6,4: NUMBER '1.0' +6,4-6,5: NEWLINE '\n' +7,0-7,1: OP '-' +7,1-7,7: NUMBER '3.0e17' +7,7-7,8: NEWLINE '\n' +9,0-9,1: OP '-' +9,1-9,2: LPAR '(' +9,2-9,3: NUMBER '1' +9,3-9,4: RPAR ')' +9,4-9,5: NEWLINE '\n' +10,0-10,1: OP '-' +10,1-10,2: LPAR '(' +10,2-10,19: NUMBER '10000000000000000' +10,19-10,20: RPAR ')' +10,20-10,21: NEWLINE '\n' +11,0-11,1: OP '-' +11,1-11,2: LPAR '(' +11,2-11,5: NUMBER '1.0' +11,5-11,6: RPAR ')' +11,6-11,7: NEWLINE '\n' +12,0-12,1: OP '-' +12,1-12,2: LPAR '(' +12,2-12,8: NUMBER '3.0e17' +12,8-12,9: RPAR ')' +12,9-12,10: NEWLINE '\n' +14,0-14,1: LPAR '(' +14,1-14,2: OP '-' +14,2-14,3: NUMBER '1' +14,3-14,4: RPAR ')' +14,4-14,5: NEWLINE '\n' +15,0-15,1: LPAR '(' +15,1-15,2: OP '-' +15,2-15,19: NUMBER '10000000000000000' +15,19-15,20: RPAR ')' +15,20-15,21: NEWLINE '\n' +16,0-16,1: LPAR '(' +16,1-16,2: OP '-' +16,2-16,5: NUMBER '1.0' +16,5-16,6: RPAR ')' +16,6-16,7: NEWLINE '\n' +17,0-17,1: LPAR '(' +17,1-17,2: OP '-' +17,2-17,8: NUMBER '3.0e17' +17,8-17,9: RPAR ')' +17,9-17,10: NEWLINE '\n' +19,0-19,1: OP '-' +19,1-19,3: NUMBER '1j' +19,3-19,4: NEWLINE '\n' +21,0-21,1: OP '-' +21,1-21,8: NUMBER '3.7e12j' +21,8-21,9: NEWLINE '\n' +23,0-23,19: COMMENT '#Some other numbers' +24,0-24,20: NUMBER '0.058823529630899429' +24,20-24,21: NEWLINE '\n' +26,0-26,5: NUMBER '1e-06' +26,5-26,6: NEWLINE '\n' +27,0-27,8: NUMBER '.9999999' +27,8-27,9: NEWLINE '\n' +28,0-28,8: NUMBER '0xffffff' +28,8-28,9: NEWLINE '\n' +29,0-29,4: NUMBER '1e10' +29,4-29,5: NEWLINE '\n' +30,0-30,2: NUMBER '1.' +30,2-30,3: NEWLINE '\n' +31,0-31,10: NUMBER '2.79252680' +31,10-31,11: NEWLINE '\n' +32,0-32,9: NUMBER '0x0001000' +32,9-32,10: NEWLINE '\n' +33,0-33,55: NUMBER '4987312561856745907287624786230562734672583763984576267' +33,55-33,56: NEWLINE '\n' +35,0-35,18: COMMENT '#Octal both styles' +36,0-36,4: NUMBER '0777' +36,4-36,5: NEWLINE '\n' +37,0-37,5: NUMBER '0o777' +37,5-37,6: NEWLINE '\n' +39,0-39,14: COMMENT '#Python2 longs' +40,0-40,1: NUMBER '0' +40,1-40,2: NEWLINE '\n' +41,0-41,2: NUMBER '0L' +41,2-41,3: NEWLINE '\n' +42,0-42,2: NUMBER '5L' +42,2-42,3: NEWLINE '\n' +43,0-43,1: OP '-' +43,1-43,3: NUMBER '2L' +43,3-43,4: NEWLINE '\n' +44,0-44,34: NUMBER '498731256185674590728762478623056L' +44,34-44,35: NEWLINE '\n' +46,0-46,10: NUMBER '0xfffffffL' +46,10-46,11: NEWLINE '\n' +47,0-47,19: NUMBER '0xeeeeeeeeeeeeeeeeL' +47,19-47,20: NEWLINE '\n' +49,0-49,23: NUMBER '0b00010101011111111111L' +49,23-49,24: NEWLINE '\n' +50,0-50,14: NUMBER '0o77777777777L' +50,14-50,15: NEWLINE '\n' +51,0-51,14: NUMBER '0777777777777L' +51,14-51,15: NEWLINE '\n' +52,0-52,2: NUMBER '0j' +52,2-52,3: NEWLINE '\n' +53,0-53,7: NUMBER '0_0234j' +53,7-53,8: NEWLINE '\n' +55,0-55,3: NUMBER '0e0' +55,3-55,4: NEWLINE '\n' +57,0-57,26: COMMENT '#Valid uses of underscore:' +59,0-59,3: NUMBER '1_1' +59,3-59,4: NEWLINE '\n' +60,0-60,17: NUMBER '1_2_3.4_5_6e7_8_9' +60,17-60,18: NEWLINE '\n' +61,0-61,5: NUMBER '0b1_1' +61,5-61,6: NEWLINE '\n' +62,0-62,5: NUMBER '0o1_1' +62,5-62,6: NEWLINE '\n' +63,0-63,5: NUMBER '0x1_1' +63,5-63,6: NEWLINE '\n' +65,0-65,6: NUMBER '0b_010' +65,6-65,7: NEWLINE '\n' +66,0-66,6: NUMBER '0o_010' +66,6-66,7: NEWLINE '\n' +67,0-67,6: NUMBER '0x_010' +67,6-67,7: NEWLINE '\n' +69,0-69,28: COMMENT '#Invalid uses of underscore:' +71,0-71,3: ERRORTOKEN '1__' +71,3-71,4: NUMBER '3' +71,4-71,5: NEWLINE '\n' +72,0-72,3: ERRORTOKEN '2e_' +72,3-72,4: NUMBER '5' +72,4-72,5: NEWLINE '\n' +73,0-73,4: ERRORTOKEN '2e+_' +73,4-73,5: NUMBER '5' +73,5-73,6: NEWLINE '\n' +74,0-74,5: ERRORTOKEN '123_\n' +74,5-74,6: NEWLINE '\n' +75,0-75,21: COMMENT '#Valid prefixed zero:' +77,0-77,3: NUMBER '0_0' +77,3-77,4: NEWLINE '\n' +78,0-78,4: NUMBER '009.' +78,4-78,5: NEWLINE '\n' +79,0-79,7: NUMBER '009e005' +79,7-79,8: NEWLINE '\n' +80,0-80,5: NUMBER '00123' +80,5-80,6: NEWLINE '\n' +82,0-82,1: NUMBER '1' +82,2-82,4: NAME 'if' +82,5-82,6: NUMBER '1' +82,6-82,10: NAME 'else' +82,11-82,12: NUMBER '0' +82,12-82,13: NEWLINE '\n' +83,0-83,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/pep484.py b/python/extractor/tests/tokenizer/pep484.py new file mode 100644 index 00000000000..d44a11b63c9 --- /dev/null +++ b/python/extractor/tests/tokenizer/pep484.py @@ -0,0 +1,19 @@ +#PEP 484 style annotations. + +def func(callee_type: CallableType, + formal_to_actual: List[List[int]], + strict: bool = True) -> List[Type]: + pass + + +def func(self, + name: str, + args: List[str], + *, + cwd: str = None, + env: Dict[str, str] = None) -> None: + pass + +def specials(self, *varargs: vanno, **kwargs: kwanno): + pass + diff --git a/python/extractor/tests/tokenizer/pep484.tokens b/python/extractor/tests/tokenizer/pep484.tokens new file mode 100644 index 00000000000..4faaad6ca74 --- /dev/null +++ b/python/extractor/tests/tokenizer/pep484.tokens @@ -0,0 +1,100 @@ +1,0-1,27: COMMENT '#PEP 484 style annotations.' +3,0-3,3: NAME 'def' +3,4-3,8: NAME 'func' +3,8-3,9: LPAR '(' +3,9-3,20: NAME 'callee_type' +3,20-3,21: COLON ':' +3,22-3,34: NAME 'CallableType' +3,34-3,35: COMMA ',' +4,9-4,25: NAME 'formal_to_actual' +4,25-4,26: COLON ':' +4,27-4,31: NAME 'List' +4,31-4,32: LSQB '[' +4,32-4,36: NAME 'List' +4,36-4,37: LSQB '[' +4,37-4,40: NAME 'int' +4,40-4,41: RSQB ']' +4,41-4,42: RSQB ']' +4,42-4,43: COMMA ',' +5,9-5,15: NAME 'strict' +5,15-5,16: COLON ':' +5,17-5,21: NAME 'bool' +5,22-5,23: OP '=' +5,24-5,28: NAME 'True' +5,28-5,29: RPAR ')' +5,30-5,32: RARROW '->' +5,33-5,37: NAME 'List' +5,37-5,38: LSQB '[' +5,38-5,42: NAME 'Type' +5,42-5,43: RSQB ']' +5,43-5,44: COLON ':' +5,44-5,45: NEWLINE '\n' +6,0-6,4: INDENT ' ' +6,4-6,8: NAME 'pass' +6,8-6,9: NEWLINE '\n' +9,0-9,0: DEDENT '' +9,0-9,3: NAME 'def' +9,4-9,8: NAME 'func' +9,8-9,9: LPAR '(' +9,9-9,13: NAME 'self' +9,13-9,14: COMMA ',' +10,9-10,13: NAME 'name' +10,13-10,14: COLON ':' +10,15-10,18: NAME 'str' +10,18-10,19: COMMA ',' +11,9-11,13: NAME 'args' +11,13-11,14: COLON ':' +11,15-11,19: NAME 'List' +11,19-11,20: LSQB '[' +11,20-11,23: NAME 'str' +11,23-11,24: RSQB ']' +11,24-11,25: COMMA ',' +12,9-12,10: OP '*' +12,10-12,11: COMMA ',' +13,9-13,12: NAME 'cwd' +13,12-13,13: COLON ':' +13,14-13,17: NAME 'str' +13,18-13,19: OP '=' +13,20-13,24: NAME 'None' +13,24-13,25: COMMA ',' +14,9-14,12: NAME 'env' +14,12-14,13: COLON ':' +14,14-14,18: NAME 'Dict' +14,18-14,19: LSQB '[' +14,19-14,22: NAME 'str' +14,22-14,23: COMMA ',' +14,24-14,27: NAME 'str' +14,27-14,28: RSQB ']' +14,29-14,30: OP '=' +14,31-14,35: NAME 'None' +14,35-14,36: RPAR ')' +14,37-14,39: RARROW '->' +14,40-14,44: NAME 'None' +14,44-14,45: COLON ':' +14,45-14,46: NEWLINE '\n' +15,0-15,4: INDENT ' ' +15,4-15,8: NAME 'pass' +15,8-15,9: NEWLINE '\n' +17,0-17,0: DEDENT '' +17,0-17,3: NAME 'def' +17,4-17,12: NAME 'specials' +17,12-17,13: LPAR '(' +17,13-17,17: NAME 'self' +17,17-17,18: COMMA ',' +17,19-17,20: OP '*' +17,20-17,27: NAME 'varargs' +17,27-17,28: COLON ':' +17,29-17,34: NAME 'vanno' +17,34-17,35: COMMA ',' +17,36-17,38: OP '**' +17,38-17,44: NAME 'kwargs' +17,44-17,45: COLON ':' +17,46-17,52: NAME 'kwanno' +17,52-17,53: RPAR ')' +17,53-17,54: COLON ':' +17,54-17,55: NEWLINE '\n' +18,0-18,4: INDENT ' ' +18,4-18,8: NAME 'pass' +18,8-18,9: NEWLINE '\n' +20,0-20,0: DEDENT '' +20,0-20,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/shift_jis.py b/python/extractor/tests/tokenizer/shift_jis.py new file mode 100644 index 00000000000..89b7b91fd8c --- /dev/null +++ b/python/extractor/tests/tokenizer/shift_jis.py @@ -0,0 +1,11 @@ +# encoding:shift-jis + +#This is copied from the Python test library copyright PSF. + +""" +Python ̊J́A1990 N납JnĂ܂B +J҂ Guido van Rossum ͋p̃vO~OuABCv̊JɎQĂ܂AABC ͎p̖ړIɂ͂܂KĂ܂łB +̂悤Ȕwi琶܂ꂽ Python ̌݌v́AuVvvŁuKeՁvƂڕWɏd_uĂ܂B +̃XNvgnł̓[U̖ڐ̗֐D悵ĐFXȋ@\vfƂĎꍇ̂łAPython ł͂׍Hlj邱Ƃ͂܂肠܂B +ꎩ̂̋@\͍ŏɉAKvȋ@\͊gW[ƂĒljAƂ̂ Python ̃|V[łB +""" diff --git a/python/extractor/tests/tokenizer/shift_jis.tokens b/python/extractor/tests/tokenizer/shift_jis.tokens new file mode 100644 index 00000000000..cdfdc6ba1b2 --- /dev/null +++ b/python/extractor/tests/tokenizer/shift_jis.tokens @@ -0,0 +1,5 @@ +1,0-1,20: COMMENT '# encoding:shift-jis' +3,0-3,59: COMMENT '#This is copied from the Python test library copyright PSF.' +5,0-11,3: STRING '"""\nPython の開発は、1990 年ごろから開始されています。\n開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。\nこのような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。\n多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。\n言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。\n"""' +11,3-11,4: NEWLINE '\n' +12,0-12,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/strings.py b/python/extractor/tests/tokenizer/strings.py new file mode 100644 index 00000000000..3d4a8ab2014 --- /dev/null +++ b/python/extractor/tests/tokenizer/strings.py @@ -0,0 +1,112 @@ + + +#Raw + +r'012345678' +r'(\033|~{)' +r'\A[+-]?\d+' +r'(?P[\w]+)|' +r'\|\[\][123]|\{\}' +r'^.$' +r'[^A-Z]' + +# With escapes + +'\n' +"\'" +'\'' +"\"" +"\t\l\b" + + +#F-strings + +f'' +rf'hello' +fr'hello' +f'a{1+1}b' +f'{x}{y}a{z}' +#This is not legal in CPython, but we tokenize it anyway. +f'a{'x'+"y"}b' + +#Multiline f-string +f''' + In f-string expressions act as if parenthesised +{ + x + + y & + z +} +end +''' + +#Multi-line + + +r""" Single quotation character with multi-line + +"a", 'b', "", '' +.... +""" + +r''' Single quotation character with multi-line + +"a", 'b', "", '' +.... +''' + +#f-string conversions +!a +!s +!r + +f"{k}={v!r}" + +#Implicit concatenation +(f'{expr} text ' + 'continuation' + f'and{v}' +) + +#prefixes + +u'{}\r{}{:<{width}}' +u'{}\r{}{:<{}}' + +#f-strings with format specifier +f'result: {value:0.2f}' +f'result: {value:{width}.{precision}}' + + +f"Too {'many' if alen > elen else 'few'} parameters for {cls};" + +# f-strings have special escaping rules for curly-brackets +f'This should work \{foo}' +rf'This should work \{foo}' + +f'\}' # syntax error (we currently don't report this) +f'\}}' # ok + + +# f-strings with unicode literals of the form `\N{...}` +f'{degrees:0.0f}\N{DEGREE SIGN}' +f"{degrees:0.0f}\N{DEGREE SIGN}" +f'''{degrees:0.0f}\N{DEGREE SIGN}''' +f"""{degrees:0.0f}\N{DEGREE SIGN}""" + +# double curlies in f-strings with various kinds of quoting +f'{{ {foo} }}' +f"{{ {foo} }}" +f'''{{ {foo} }}''' +f"""{{ {foo} }}""" + +# Empty f-strings +f'' +f"" +f'''''' +f"""""" + + +r'\NUL' # _Not_ a named unicode escape (`\N{...}`) + +f'res: {val:{width:0}.{prec:1}}' diff --git a/python/extractor/tests/tokenizer/strings.tokens b/python/extractor/tests/tokenizer/strings.tokens new file mode 100644 index 00000000000..76e63bc790b --- /dev/null +++ b/python/extractor/tests/tokenizer/strings.tokens @@ -0,0 +1,211 @@ +3,0-3,4: COMMENT '#Raw' +5,0-5,12: STRING 'r\'012345678\'' +5,12-5,13: NEWLINE '\n' +6,0-6,12: STRING 'r\'(\\033|~{)\'' +6,12-6,13: NEWLINE '\n' +7,0-7,13: STRING 'r\'\\A[+-]?\\d+\'' +7,13-7,14: NEWLINE '\n' +8,0-8,19: STRING 'r\'(?P[\\w]+)|\'' +8,19-8,20: NEWLINE '\n' +9,0-9,19: STRING 'r\'\\|\\[\\][123]|\\{\\}\'' +9,19-9,20: NEWLINE '\n' +10,0-10,6: STRING 'r\'^.$\'' +10,6-10,7: NEWLINE '\n' +11,0-11,9: STRING 'r\'[^A-Z]\'' +11,9-11,10: NEWLINE '\n' +13,0-13,14: COMMENT '# With escapes' +15,0-15,4: STRING '\'\\n\'' +15,4-15,5: NEWLINE '\n' +16,0-16,4: STRING '"\\\'"' +16,4-16,5: NEWLINE '\n' +17,0-17,4: STRING '\'\\\'\'' +17,4-17,5: NEWLINE '\n' +18,0-18,4: STRING '"\\""' +18,4-18,5: NEWLINE '\n' +19,0-19,8: STRING '"\\t\\l\\b"' +19,8-19,9: NEWLINE '\n' +22,0-22,10: COMMENT '#F-strings' +24,0-24,3: STRING 'f\'\'' +24,3-24,4: NEWLINE '\n' +25,0-25,9: STRING 'rf\'hello\'' +25,9-25,10: NEWLINE '\n' +26,0-26,9: STRING 'fr\'hello\'' +26,9-26,10: NEWLINE '\n' +27,0-27,4: FSTRING_START 'f\'a{' +27,4-27,5: NUMBER '1' +27,5-27,6: OP '+' +27,6-27,7: NUMBER '1' +27,7-27,10: FSTRING_END '}b\'' +27,10-27,11: NEWLINE '\n' +28,0-28,3: FSTRING_START 'f\'{' +28,3-28,4: NAME 'x' +28,4-28,6: FSTRING_MID '}{' +28,6-28,7: NAME 'y' +28,7-28,10: FSTRING_MID '}a{' +28,10-28,11: NAME 'z' +28,11-28,13: FSTRING_END '}\'' +28,13-28,14: NEWLINE '\n' +29,0-29,57: COMMENT '#This is not legal in CPython, but we tokenize it anyway.' +30,0-30,4: FSTRING_START 'f\'a{' +30,4-30,7: STRING '\'x\'' +30,7-30,8: OP '+' +30,8-30,11: STRING '"y"' +30,11-30,14: FSTRING_END '}b\'' +30,14-30,15: NEWLINE '\n' +32,0-32,19: COMMENT '#Multiline f-string' +33,0-35,1: FSTRING_START 'f\'\'\'\n In f-string expressions act as if parenthesised\n{' +36,4-36,5: NAME 'x' +36,6-36,7: OP '+' +37,4-37,5: NAME 'y' +37,6-37,7: OP '&' +38,6-38,7: NAME 'z' +39,0-41,3: FSTRING_END '}\nend\n\'\'\'' +41,3-41,4: NEWLINE '\n' +43,0-43,11: COMMENT '#Multi-line' +46,0-50,3: STRING 'r""" Single quotation character with multi-line\n\n"a", \'b\', "", \'\'\n....\n"""' +50,3-50,4: NEWLINE '\n' +52,0-56,3: STRING 'r\'\'\' Single quotation character with multi-line\n\n"a", \'b\', "", \'\'\n....\n\'\'\'' +56,3-56,4: NEWLINE '\n' +58,0-58,21: COMMENT '#f-string conversions' +59,0-59,2: CONVERSION '!a' +59,2-59,3: NEWLINE '\n' +60,0-60,2: CONVERSION '!s' +60,2-60,3: NEWLINE '\n' +61,0-61,2: CONVERSION '!r' +61,2-61,3: NEWLINE '\n' +63,0-63,3: FSTRING_START 'f"{' +63,3-63,4: NAME 'k' +63,4-63,7: FSTRING_MID '}={' +63,7-63,8: NAME 'v' +63,8-63,10: CONVERSION '!r' +63,10-63,12: FSTRING_END '}"' +63,12-63,13: NEWLINE '\n' +65,0-65,23: COMMENT '#Implicit concatenation' +66,0-66,1: LPAR '(' +66,1-66,4: FSTRING_START 'f\'{' +66,4-66,8: NAME 'expr' +66,8-66,16: FSTRING_END '} text \'' +67,4-67,18: STRING '\'continuation\'' +68,4-68,10: FSTRING_START 'f\'and{' +68,10-68,11: NAME 'v' +68,11-68,13: FSTRING_END '}\'' +69,0-69,1: RPAR ')' +69,1-69,2: NEWLINE '\n' +71,0-71,9: COMMENT '#prefixes' +73,0-73,20: STRING 'u\'{}\\r{}{:<{width}}\'' +73,20-73,21: NEWLINE '\n' +74,0-74,15: STRING 'u\'{}\\r{}{:<{}}\'' +74,15-74,16: NEWLINE '\n' +76,0-76,32: COMMENT '#f-strings with format specifier' +77,0-77,11: FSTRING_START 'f\'result: {' +77,11-77,16: NAME 'value' +77,16-77,17: COLON ':' +77,17-77,21: FSTRING_SPEC '0.2f' +77,21-77,23: FSTRING_END '}\'' +77,23-77,24: NEWLINE '\n' +78,0-78,11: FSTRING_START 'f\'result: {' +78,11-78,16: NAME 'value' +78,16-78,17: COLON ':' +78,17-78,18: FSTRING_SPEC '{' +78,18-78,23: NAME 'width' +78,23-78,26: FSTRING_SPEC '}.{' +78,26-78,35: NAME 'precision' +78,35-78,36: FSTRING_SPEC '}' +78,36-78,38: FSTRING_END '}\'' +78,38-78,39: NEWLINE '\n' +81,0-81,7: FSTRING_START 'f"Too {' +81,7-81,13: STRING '\'many\'' +81,14-81,16: NAME 'if' +81,17-81,21: NAME 'alen' +81,22-81,23: OP '>' +81,24-81,28: NAME 'elen' +81,29-81,33: NAME 'else' +81,34-81,39: STRING '\'few\'' +81,39-81,57: FSTRING_MID '} parameters for {' +81,57-81,60: NAME 'cls' +81,60-81,63: FSTRING_END '};"' +81,63-81,64: NEWLINE '\n' +83,0-83,58: COMMENT '# f-strings have special escaping rules for curly-brackets' +84,0-84,21: FSTRING_START 'f\'This should work \\{' +84,21-84,24: NAME 'foo' +84,24-84,26: FSTRING_END '}\'' +84,26-84,27: NEWLINE '\n' +85,0-85,22: FSTRING_START 'rf\'This should work \\{' +85,22-85,25: NAME 'foo' +85,25-85,27: FSTRING_END '}\'' +85,27-85,28: NEWLINE '\n' +87,0-87,5: STRING 'f\'\\}\'' +87,6-87,53: COMMENT '# syntax error (we currently don\'t report this)' +87,53-87,54: NEWLINE '\n' +88,0-88,6: STRING 'f\'\\}}\'' +88,7-88,11: COMMENT '# ok' +88,11-88,12: NEWLINE '\n' +91,0-91,55: COMMENT '# f-strings with unicode literals of the form `\\N{...}`' +92,0-92,3: FSTRING_START 'f\'{' +92,3-92,10: NAME 'degrees' +92,10-92,11: COLON ':' +92,11-92,15: FSTRING_SPEC '0.0f' +92,15-92,32: FSTRING_END '}\\N{DEGREE SIGN}\'' +92,32-92,33: NEWLINE '\n' +93,0-93,3: FSTRING_START 'f"{' +93,3-93,10: NAME 'degrees' +93,10-93,11: COLON ':' +93,11-93,15: FSTRING_SPEC '0.0f' +93,15-93,32: FSTRING_END '}\\N{DEGREE SIGN}"' +93,32-93,33: NEWLINE '\n' +94,0-94,5: FSTRING_START 'f\'\'\'{' +94,5-94,12: NAME 'degrees' +94,12-94,13: COLON ':' +94,13-94,17: FSTRING_SPEC '0.0f' +94,17-94,36: FSTRING_END '}\\N{DEGREE SIGN}\'\'\'' +94,36-94,37: NEWLINE '\n' +95,0-95,5: FSTRING_START 'f"""{' +95,5-95,12: NAME 'degrees' +95,12-95,13: COLON ':' +95,13-95,17: FSTRING_SPEC '0.0f' +95,17-95,36: FSTRING_END '}\\N{DEGREE SIGN}"""' +95,36-95,37: NEWLINE '\n' +97,0-97,59: COMMENT '# double curlies in f-strings with various kinds of quoting' +98,0-98,6: FSTRING_START 'f\'{{ {' +98,6-98,9: NAME 'foo' +98,9-98,14: FSTRING_END '} }}\'' +98,14-98,15: NEWLINE '\n' +99,0-99,6: FSTRING_START 'f"{{ {' +99,6-99,9: NAME 'foo' +99,9-99,14: FSTRING_END '} }}"' +99,14-99,15: NEWLINE '\n' +100,0-100,8: FSTRING_START 'f\'\'\'{{ {' +100,8-100,11: NAME 'foo' +100,11-100,18: FSTRING_END '} }}\'\'\'' +100,18-100,19: NEWLINE '\n' +101,0-101,8: FSTRING_START 'f"""{{ {' +101,8-101,11: NAME 'foo' +101,11-101,18: FSTRING_END '} }}"""' +101,18-101,19: NEWLINE '\n' +103,0-103,17: COMMENT '# Empty f-strings' +104,0-104,3: STRING 'f\'\'' +104,3-104,4: NEWLINE '\n' +105,0-105,3: STRING 'f""' +105,3-105,4: NEWLINE '\n' +106,0-106,7: STRING 'f\'\'\'\'\'\'' +106,7-106,8: NEWLINE '\n' +107,0-107,7: STRING 'f""""""' +107,7-107,8: NEWLINE '\n' +110,0-110,7: STRING 'r\'\\NUL\'' +110,8-110,50: COMMENT '# _Not_ a named unicode escape (`\\N{...}`)' +110,50-110,51: NEWLINE '\n' +112,0-112,8: FSTRING_START 'f\'res: {' +112,8-112,11: NAME 'val' +112,11-112,12: COLON ':' +112,12-112,13: FSTRING_SPEC '{' +112,13-112,18: NAME 'width' +112,18-112,19: COLON ':' +112,19-112,20: NUMBER '0' +112,20-112,23: FSTRING_SPEC '}.{' +112,23-112,27: NAME 'prec' +112,27-112,28: COLON ':' +112,28-112,29: NUMBER '1' +112,29-112,30: FSTRING_SPEC '}' +112,30-112,32: FSTRING_END '}\'' +112,32-112,33: NEWLINE '\n' +113,0-113,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/tab.py b/python/extractor/tests/tokenizer/tab.py new file mode 100644 index 00000000000..a36eda5b341 --- /dev/null +++ b/python/extractor/tests/tokenizer/tab.py @@ -0,0 +1,3 @@ + +class C(object): + pass diff --git a/python/extractor/tests/tokenizer/tab.tokens b/python/extractor/tests/tokenizer/tab.tokens new file mode 100644 index 00000000000..8ef7901a204 --- /dev/null +++ b/python/extractor/tests/tokenizer/tab.tokens @@ -0,0 +1,12 @@ +2,0-2,5: NAME 'class' +2,6-2,7: NAME 'C' +2,7-2,8: LPAR '(' +2,8-2,14: NAME 'object' +2,14-2,15: RPAR ')' +2,15-2,16: COLON ':' +2,16-2,17: NEWLINE '\n' +3,0-3,1: INDENT '\t' +3,1-3,5: NAME 'pass' +3,5-3,6: NEWLINE '\n' +4,0-4,0: DEDENT '' +4,0-4,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/temp.tokens b/python/extractor/tests/tokenizer/temp.tokens new file mode 100644 index 00000000000..63beaf05bc1 --- /dev/null +++ b/python/extractor/tests/tokenizer/temp.tokens @@ -0,0 +1,84 @@ +2,0-2,22: COMMENT '#Some negative numbers' +4,0-4,1: OP '-' +4,1-4,2: NUMBER '1' +4,2-4,3: NEWLINE '\n' +5,0-5,1: OP '-' +5,1-5,18: NUMBER '10000000000000000' +5,18-5,19: NEWLINE '\n' +6,0-6,1: OP '-' +6,1-6,4: NUMBER '1.0' +6,4-6,5: NEWLINE '\n' +7,0-7,1: OP '-' +7,1-7,7: NUMBER '3.0e17' +7,7-7,8: NEWLINE '\n' +9,0-9,1: OP '-' +9,1-9,2: LPAR '(' +9,2-9,3: NUMBER '1' +9,3-9,4: RPAR ')' +9,4-9,5: NEWLINE '\n' +10,0-10,1: OP '-' +10,1-10,2: LPAR '(' +10,2-10,19: NUMBER '10000000000000000' +10,19-10,20: RPAR ')' +10,20-10,21: NEWLINE '\n' +11,0-11,1: OP '-' +11,1-11,2: LPAR '(' +11,2-11,5: NUMBER '1.0' +11,5-11,6: RPAR ')' +11,6-11,7: NEWLINE '\n' +12,0-12,1: OP '-' +12,1-12,2: LPAR '(' +12,2-12,8: NUMBER '3.0e17' +12,8-12,9: RPAR ')' +12,9-12,10: NEWLINE '\n' +14,0-14,1: LPAR '(' +14,1-14,2: OP '-' +14,2-14,3: NUMBER '1' +14,3-14,4: RPAR ')' +14,4-14,5: NEWLINE '\n' +15,0-15,1: LPAR '(' +15,1-15,2: OP '-' +15,2-15,19: NUMBER '10000000000000000' +15,19-15,20: RPAR ')' +15,20-15,21: NEWLINE '\n' +16,0-16,1: LPAR '(' +16,1-16,2: OP '-' +16,2-16,5: NUMBER '1.0' +16,5-16,6: RPAR ')' +16,6-16,7: NEWLINE '\n' +17,0-17,1: LPAR '(' +17,1-17,2: OP '-' +17,2-17,8: NUMBER '3.0e17' +17,8-17,9: RPAR ')' +17,9-17,10: NEWLINE '\n' +19,0-19,1: OP '-' +19,1-19,3: NUMBER '1j' +19,3-19,4: NEWLINE '\n' +21,0-21,1: OP '-' +21,1-21,8: NUMBER '3.7e12j' +21,8-21,9: NEWLINE '\n' +23,0-23,19: COMMENT '#Some other numbers' +24,0-24,20: NUMBER '0.058823529630899429' +24,20-24,21: NEWLINE '\n' +26,0-26,5: NUMBER '1e-06' +26,5-26,6: NEWLINE '\n' +27,0-27,8: NUMBER '.9999999' +27,8-27,9: NEWLINE '\n' +28,0-28,8: NUMBER '0xffffff' +28,8-28,9: NEWLINE '\n' +29,0-29,4: NUMBER '1e10' +29,4-29,5: NEWLINE '\n' +30,0-30,2: NUMBER '1.' +30,2-30,3: NEWLINE '\n' +31,0-31,10: NUMBER '2.79252680' +31,10-31,11: NEWLINE '\n' +32,0-32,9: NUMBER '0x0001000' +32,9-32,10: NEWLINE '\n' +33,0-33,55: NUMBER '4987312561856745907287624786230562734672583763984576267' +33,55-33,56: NEWLINE '\n' +35,0-35,18: COMMENT '#Octal both styles' +36,0-36,4: NUMBER '0777' +36,4-36,5: NEWLINE '\n' +37,0-37,5: NUMBER '0o777' +37,5-37,6: NEWLINE '\n' +39,0-39,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/utf8.py b/python/extractor/tests/tokenizer/utf8.py new file mode 100644 index 00000000000..f440c6944d9 --- /dev/null +++ b/python/extractor/tests/tokenizer/utf8.py @@ -0,0 +1,2 @@ +# Some abitrary prefix with no space beforecoding: utf-8 -*- +# €€€€ diff --git a/python/extractor/tests/tokenizer/utf8.tokens b/python/extractor/tests/tokenizer/utf8.tokens new file mode 100644 index 00000000000..bff89345d59 --- /dev/null +++ b/python/extractor/tests/tokenizer/utf8.tokens @@ -0,0 +1,3 @@ +1,0-1,60: COMMENT '# Some abitrary prefix with no space beforecoding: utf-8 -*-' +2,0-2,6: COMMENT '# €€€€' +3,0-3,0: ENDMARKER '' diff --git a/python/extractor/tests/tokenizer/utf8_bom.py b/python/extractor/tests/tokenizer/utf8_bom.py new file mode 100644 index 00000000000..509f44c690e --- /dev/null +++ b/python/extractor/tests/tokenizer/utf8_bom.py @@ -0,0 +1 @@ +#Starts with a BOM diff --git a/python/extractor/tests/tokenizer/utf8_bom.tokens b/python/extractor/tests/tokenizer/utf8_bom.tokens new file mode 100644 index 00000000000..49ee0f628e0 --- /dev/null +++ b/python/extractor/tests/tokenizer/utf8_bom.tokens @@ -0,0 +1,2 @@ +1,0-1,18: COMMENT '#Starts with a BOM' +2,0-2,0: ENDMARKER '' \ No newline at end of file diff --git a/python/extractor/thrift_extractor.py b/python/extractor/thrift_extractor.py new file mode 100755 index 00000000000..64b814b712c --- /dev/null +++ b/python/extractor/thrift_extractor.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +"""Run the thrift extractor locally for debugging. +""" +import sys +import python_tracer + +if __name__ == "__main__": + python_tracer.load_library() + import semmle.thrift + import semmle.files + if len(sys.argv) != 3: + print("Usage %s INPUT_FOLDER TRAP_FOLDER" % sys.argv[0]) + sys.exit(1) + trap_folder = semmle.files.TrapFolder(sys.argv[2]) + extractor = semmle.thrift.Extractor(trap_folder) + extractor.extract_folder(sys.argv[1]) diff --git a/python/extractor/tokenizer_generator/README.md b/python/extractor/tokenizer_generator/README.md new file mode 100644 index 00000000000..104de535a1f --- /dev/null +++ b/python/extractor/tokenizer_generator/README.md @@ -0,0 +1,172 @@ +# The Python tokenizer + +This file describes the syntax and operational semantics of the state machine +that underlies our tokenizer. + +## The state machine syntax + +The state machine is described in a declarative fashion in the +`state_transition.txt` file. This file contains a sequence of declarations, as +described in the following subsections. + +Additionally, lines may contain comments indicated using the `#` character, as +in Python itself. + +In the remainder of the document, "identifier" means any sequence of characters +starting with a letter (`a-z` or `A-Z`) and followed by a sequence of letters, +digits, and/or underscores. + +### Start declarations +This has the form `start: ` followed by the name of a table. It is used to +indicate what table is used as the starting point for the tokenization. + +There should be exactly one of these declarations in the file. + +### Alias declarations +These have the form +``` +identifier = id_or_char or id_or_char or ... +``` +where `id_or_char` is either a single character surrounded by single quotes +(e.g. `'a'`) or an identifier defined in another alias declaration. + +Thus, aliases define _sets_ of characters: single-quoted characters representing +singleton sets, and `or` being set union. +>Note: A few character classes are predefined: +> - `ERROR` representing the error state of the state machine, +> - `IDENTIFIER` representing characters that can appear at the start of +> a Unicode identifier, and +> - `IDENTIFIER_CONTINUE` representing characters that can appear +> within a Unicode identifier. + +### Table declarations +These have the form + +``` +table header { + state_transition + state_transition + ... +} +``` +where `header` is either an identifier or an identifier followed by another +identifier surrounded by parentheses. The latter implements a form of +"inheritance" between tables, and is explained in a later section. + +The format of `state_transition`s is described in the next subsection. + +### State transitions +Each state transition has the following form: +``` +set_of_before_states -> after_state for set_of_characters optional_actions +``` +Here, `set_of_before_states` is either a single identifier or a list of identifiers +with `or`s interspersed (mimicking the way sets of characters are specified) and +`after_state` is an identifier. These identifiers do not have to be declared +separately — they are implicitly declared when used. +>Note: A special state `0` (in the table indicated with the `start: ` +>declaration represents the starting state for the entire tokenization. + +The `set_of_characters` can either be +- the identifier corresponding to an alias, +- a single character (e.g. `'a'`), +- a list of sets of characters with `or`s interspersed, or +- an asterisk `*` representing _all_ characters that do not already have a + transition defined for the set of "before" states. + +After the state transition is an optional list of actions, described next. + +### Actions +Actions are specified using the keyword `do`. After this keyword, one or more +actions may be specified, each terminated with `;`, e.g. +``` +foo -> bar for 'a' do action1; action2; +``` +As the actions are very operational in nature, they will be described when we go +into the operational semantics of the state machine. + +## Informal operational semantics +>Note: What follows is not based on a reading of the source code, but just +>experience with working with modifying the state machine. There may be +>significant inaccuracies. + +At a high level, the purpose of the tokenizer is to partition the given input +into a sequence of strings representing tokens. The decision of where to put the +boundaries between these strings is done on a character-by-character basis. To +mark the start of a token, the action `mark` is used. Note that the mark is +placed _before_ the character that caused the action to be executed. That is, in +the following transition rule +``` +foo -> bar for 'a' do mark; +``` +the mark is placed _before_ the `a`. + +Once the end of a token has been reached, the `emit` action is used. This +creates a token from the part of the input spanning from the most recent `mark` +up to (and including) the character that caused the transition to which the +`emit` action is attached. + +As an example, consider the following state machine that splits a sequence of +zeroes and ones into tokens consisting of (maximal) runs of each character: + +``` +start: default +table default { + + # This is essentially just an unconditional state transition. + 0 -> zero_or_one for * do pushback; + + zero_or_one -> zeros for '0' do mark; + zero_or_one -> ones for '1' do mark; + + zeros -> zeros for '0' + zeros -> zero_or_one for * do pushback; emit(ZEROS); + + ones -> zero_or_one for * do pushback; emit(ONES); + ones -> ones for '1' +} +``` +The `pushback` action has the effect of "pushing back" the current character. +(In reality, all this does is move the pointer to the current character one step +back. It is thus not a problem to have several pushbacks in a row.) + +> Note: The order in which the transition rules for a state is specified does +> not matter. Even if the `*` state is listed first, as with `ones` above, it +> does not take precedence over other more specific character sets. + +After tokenizing a string with the above grammar, the result will be a sequence +of `ZEROS` and `ONES` tokens. Each of these will have three pieces of data +associated with it: the starting point (line and column), the end point (also +line and column), and the characters that make up the token. Note that `emit` +accepts a second argument (which must be a string) as well. For example, the +transition for code when reaching a newline is: +``` +feed = '\r' or '\n' +... + code -> whitespace_line for feed do emit(NEWLINE, "\n"); newline; +``` +This has the effect of normalizing end of line characters to be `\n`. + +>Note: The replacement text may have a different length than the distance to the +>most recent `span`. This may not be desirable. + +The above snippet introduces another action: `newline`. This has the effect of +resetting the column counter to zero and incrementing the line counter. + +>Note: There are some peculiarities about newlines, and the tokenizer will get +>confused if they are not handled through the `newline` action. + +The last two actions have to do with maintaining a stack of parsing tables. At +all points, the behavior of the tokenizer is governed by the table that is on +top of the stack. The `push` action pushes the specified table (given as an +argument) on top of this stack. Naturally, the `pop` action does the opposite, +discarding the top element. + +This leaves the final point of interest: what decides which transitions are +"active" at a given point? + +The way this functions is essentially like method dispatch in Python (though +thankfully there is no multiple inheritance). Thus, given the current state and +the current character, we first look in the table on top of the stack. If this +table does not have a transition for the given state and character, we next look +at the table it inherits from, and so forth. diff --git a/python/extractor/tokenizer_generator/compiled.py b/python/extractor/tokenizer_generator/compiled.py new file mode 100644 index 00000000000..3981a6d81df --- /dev/null +++ b/python/extractor/tokenizer_generator/compiled.py @@ -0,0 +1,155 @@ + +import unicodedata +from . import machine + +class SuperState: + + def __init__(self, name, mapping): + self.name = name + self.mapping = mapping + + def as_list_of_bytes(self): + lst = dict_to_list(self.mapping) + return [ table.as_bytes() for table in lst ] + + def as_list_of_transitions(self): + return dict_to_list(self.mapping) + +action_id = 0 +all_actions = {} + +class ActionList: + + def __init__(self, actions, id): + self.actions = actions + self.id = id + + @staticmethod + def get(actions): + global action_id + assert isinstance(actions, tuple) + if actions not in all_actions: + all_actions[actions] = ActionList(actions, action_id) + action_id += 1 + return all_actions[actions] + + @staticmethod + def listall(): + return sorted(all_actions.values(), key = lambda al: al.id) + +next_pair_id = 0 +pairs = {} + +class StateActionListPair: + + def __init__(self, state, actionlist, id): + self.state = state + self.actionlist = actionlist + self.id = id + + @staticmethod + def get(state, actionlist): + global next_pair_id + if actionlist is not None and not isinstance(actionlist, ActionList): + actionlist = ActionList.get(actionlist) + if (state, actionlist) not in pairs: + pairs[(state, actionlist)] = StateActionListPair(state, actionlist, next_pair_id) + next_pair_id += 1 + return pairs[(state, actionlist)] + + @staticmethod + def listall(): + return sorted(pairs.values(), key = lambda pair: pair.id) + +next_table_id = 0 +table_ids = {} + +class StateTransitionTable: + + def __init__(self, mapping): + self.mapping = mapping + + def as_bytes(self): + lst = dict_to_list(self.mapping) + return bytes(pair.id for pair in lst) + + def __getitem__(self, key): + return self.mapping[key] + + @property + def id(self): + global next_table_id + b = self.as_bytes() + if not b in table_ids: + table_ids[b] = next_table_id + next_table_id += 1 + return table_ids[b] + +def dict_to_list(mapping): + assert isinstance(mapping, dict) + result = [] + for key, value in mapping.items(): + while key.id >= len(result): + result.append(None) + result[key.id] = value + return result + + +#Each character is one of id-start, id-continuation or other. Represent "other" as ERROR for all non-ascii characters. +#See https://www.python.org/dev/peps/pep-3131 for an explanation of what is an identifier. +OTHER_START = {0x1885, 0x1886, 0x2118, 0x212E, 0x309B, 0x309C} +OTHER_CONTINUE = {0x00B7, 0x0387, 0x19DA} +OTHER_CONTINUE.update(range(0x1369, 0x1372)) +ID_CATEGORIES = {"Lu", "Ll", "Lt", "Lm", "Lo", "Nl"} +CONT_CATEGORIES = {"Mn", "Mc", "Nd", "Pc"} + +CHUNK_SIZE = 64 + +class IdentifierTable: + + def __init__(self): + classes = [] + for i in range(0x110000): + try: + c = chr(i) + except: + continue + cat = unicodedata.category(c) + if cat in ID_CATEGORIES or i in OTHER_START: + cls = machine.IDENTIFIER_CLASS.id + elif cat in CONT_CATEGORIES or i in OTHER_CONTINUE: + cls = machine.IDENTIFIER_CONTINUE_CLASS.id + else: + cls = machine.ERROR_CLASS.id + assert cls in (0,1,2,3) + classes.append(cls) + result = [] + for i, cls in enumerate(classes): + byte, bits = i>>2, cls<<((i&3)*2) + while byte >= len(result): + result.append(0) + result[byte] |= bits + while result[-1] == 0: + result.pop() + while len(result) % CHUNK_SIZE: + result.append(0) + self.table = result + + def as_bytes(self): + return bytes(self.table) + + def as_two_level_table(self): + index = [] + chunks = {} + next_id = 0 + the_bytes = self.as_bytes() + for n in range(0, len(the_bytes), CHUNK_SIZE): + chunk = the_bytes[n:n+CHUNK_SIZE] + if chunk in chunks: + index.append(chunks[chunk]) + else: + index.append(next_id) + chunks[chunk] = next_id + next_id += 1 + chunks = [ chunk for (i, chunk) in sorted((i, chunk) for chunk, i in chunks.items())] + return chunks, index diff --git a/python/extractor/tokenizer_generator/gen_state_machine.py b/python/extractor/tokenizer_generator/gen_state_machine.py new file mode 100644 index 00000000000..7ee3a37fdfa --- /dev/null +++ b/python/extractor/tokenizer_generator/gen_state_machine.py @@ -0,0 +1,225 @@ +''' +Generate a state-machine based tokenizer from a state transition description and a template. + +Parses the state transition description to compute a set of transition tables. +Each table maps (state, character-class) pairs to (state, action) pairs. +During tokenization each input character is converted to a class, then a new state and action is +looked up using the current state and character-class. + +The generated tables are: + CLASS_TABLE: + Maps ASCII code points to character class. + ID_TABLE: + Maps all unicode points to one of Identifier, Identifier-continuation, or other. + The transition tables: + Each table maps each state to a per-class transition table. + Each per-class transition table maps each character-class to an index in the action table. + ACTION_TABLE: + Embedded in code as `action_table`; maps each index to a (state, action) pair. + +Since the number of character-classes, states and (state, action) pairs is small. Everything is represented as +a byte and tables as `bytes` object for Python 3, or `array.array` objects for Python 2. +''' + + +from .parser import parse +from . import machine +from .compiled import StateActionListPair, IdentifierTable + +def emit_id_bytes(id_table): + chunks, index = id_table.as_two_level_table() + print("# %d entries in ID index" % len(index)) + index_bytes = bytes(index) + print("ID_INDEX = toarray(") + for n in range(0, len(index_bytes), 32): + print(" %r" % index_bytes[n:n+32]) + print(")") + print("ID_CHUNKS = (") + for chunk in chunks: + print(" toarray(%r)," % chunk) + print(")") + +def emit_transition_table(table, verbose=False): + print("%s = (" % table.name.upper(), end="") + for trans in table.as_list_of_transitions(): + print("B%02d," % trans.id, end=" ") + print(")") + +emitted_rows = set() + +def emit_rows(table): + for trans in table.as_list_of_transitions(): + id = trans.id + if id in emitted_rows: + continue + emitted_rows.add(id) + print("B%02d = toarray(%r)" % (id, trans.as_bytes())) + +action_names = {} +next_action_id = 0 + +def get_action_id(action): + global next_action_id + assert action is not None + if action in action_names: + return action_names[action] + result = next_action_id + next_action_id += 1 + action_names[action] = result + return result + +def emit_actions(table, indent=""): + for pair in table: + if pair.actionlist is None: + continue + action = pair.actionlist + get_action_function(action, indent) + +def generate_action_table(table, indent): + result = [] + result.append(indent + "action_table = [\n " + indent) + for i, pair in enumerate(table): + if pair.actionlist is None: + result.append("(%d, None), " % pair.state.id) + else: + result.append("(%d, self.action_%s), " % (pair.state.id, pair.actionlist.id)) + if (i & 3) == 3: + result.append("\n " + indent) + result.append("\n" + indent + "]") + return "".join(result) + +action_functions = set() + +def get_action_function(actionlist, indent=""): + if actionlist in action_functions: + return + action_functions.add(actionlist) + last = actionlist.actions[-1] + print(indent + "def action_%d(self):" % actionlist.id) + emit = False + for action in actionlist.actions: + if action is machine.PUSHBACK: + print(indent + " self.index -= 1") + continue + elif action is machine.POP: + print(indent + " self.super_state = self.state_stack.pop()") + elif isinstance(action, machine.Push): + print(indent + " self.state_stack.append(self.super_state)") + print(indent + " self.super_state = %s" % action.state.name.upper()) + elif action is machine.MARK: + print(indent + " self.token_start_index = self.index") + print(indent + " self.token_start = self.line, self.index-self.line_start_index") + elif isinstance(action, machine.Emit): + emit = True + print(indent + " end = self.line, self.index-self.line_start_index+1") + if action.text is None: + print(indent + " result = [%s, self.text[self.token_start_index:self.index+1], self.token_start, end]" % action.kind) + else: + print(indent + " result = [%s, u%s, (self.line, self.index-self.line_start_index), end]" % (action.kind, action.text)) + print(indent + " self.token_start = end") + print(indent + " self.token_start_index = self.index+1") + elif action is machine.NEWLINE: + print(indent + " self.line_start_index = self.index+1") + print(indent + " self.line += 1") + elif action is machine.EMIT_INDENT: + assert action is last + print(indent + " return self.emit_indent()") + print() + return + else: + assert False, "Unexpected action: %s" % action + print(indent + " self.index += 1") + if emit: + print(indent + " return result") + else: + print(indent + " return None") + print() + return + +def emit_char_classes(char_classes, verbose=False): + for cls in sorted(set(char_classes.values()), key=lambda x : x.id): + print("#%d = %r" % (cls.id, cls)) + table = [None] * 128 + by_id = { + machine.IDENTIFIER_CLASS.id : machine.IDENTIFIER_CLASS, + machine.IDENTIFIER_CONTINUE_CLASS.id : machine.IDENTIFIER_CONTINUE_CLASS, + machine.ERROR_CLASS.id : machine.ERROR_CLASS + } + for c, cls in char_classes.items(): + by_id[cls.id] = cls + if c is machine.IDENTIFIER or c is machine.IDENTIFIER_CONTINUE: + continue + table[ord(c)] = cls.id + by_id[cls.id] = cls + for i in range(128): + assert table[i] is not None + bytes_table = bytes(table) + if verbose: + print("# Class Table") + for i in range(len(bytes_table)): + b = bytes_table[i] + print("# %r -> %s" % (chr(i), by_id[b])) + print("CLASS_TABLE = toarray(%r)" % bytes_table) + + + +PREFACE = """ +import codecs +import re +import sys + +from blib2to3.pgen2.token import * + +if sys.version < '3': + from array import array + def toarray(b): + return array('B', b) +else: + def toarray(b): + return b +""" + +def main(): + verbose = False + import sys + if len(sys.argv) != 3: + print("Usage %s DESCRIPTION TEMPLATE" % sys.argv[0]) + sys.exit(1) + descriptionfile = sys.argv[1] + with open(descriptionfile) as fd: + m = machine.Machine.load(fd.read()) + templatefile = sys.argv[2] + with open(templatefile) as fd: + template = fd.read() + print("# This file is AUTO-GENERATED. DO NOT MODIFY") + print('# To regenerate: run "python3 -m tokenizer_generator.gen_state_machine %s %s"' % (descriptionfile, templatefile)) + print(PREFACE) + print("IDENTIFIER_CLASS = %d" % machine.IDENTIFIER_CLASS.id) + print("IDENTIFIER_CONTINUE_CLASS = %d" % machine.IDENTIFIER_CONTINUE_CLASS.id) + print("ERROR_CLASS = %d" % machine.ERROR_CLASS.id) + emit_id_bytes(IdentifierTable()) + char_classes = m.get_classes() + emit_char_classes(char_classes, verbose) + print() + tables = [state.compile(char_classes) for state in m.states.values() ] + for table in tables: + emit_rows(table) + print() + for table in tables: + #pprint(table) + emit_transition_table(table, verbose) + print() + print("TRANSITION_STATE_NAMES = {") + for state in m.states.values(): + print(" id(%s): '%s'," % (state.name.upper(), state.name)) + print("}") + print("START_SUPER_STATE = %s" % m.start.name.upper()) + prefix, suffix = template.split("#ACTIONS-HERE") + print(prefix) + actions = StateActionListPair.listall() + emit_actions(actions, " ") + action_table = generate_action_table(actions, " ") + print(suffix.replace("#ACTION_TABLE_HERE", action_table)) + +if __name__ == "__main__": + main() diff --git a/python/extractor/tokenizer_generator/machine.py b/python/extractor/tokenizer_generator/machine.py new file mode 100644 index 00000000000..ff58ec2a457 --- /dev/null +++ b/python/extractor/tokenizer_generator/machine.py @@ -0,0 +1,485 @@ + +import ast + +from .parser import parse +from collections import defaultdict +from .compiled import SuperState, StateTransitionTable, StateActionListPair + + +class Transition: + + def __init__(self, from_state, to_state, what, do): + assert isinstance(from_state, State) + assert isinstance(to_state, State) + self.from_state = from_state + self.what = what + if not do: + do = None + else: + assert isinstance(do, list) + for item in do: + assert isinstance(item, Action) + do = tuple(do) + self.action = StateActionListPair.get(to_state, do) + + def dump(self): + if self.action.actionlist: + return "%s -> %s for %s do %s" % ( + self.from_state, + self.action.state, + self.what, + "; ".join(str(do) for do in self.action.actionlist.actions) + ) + else: + return "%s -> %s for %s" % ( + self.from_state, + self.action.state, + self.what + ) + +next_state_id = 1 +states = {} + +class State: + + def __init__(self, name): + global next_state_id + if name.isdigit(): + assert name == "0" + self.id = 0 + self.name = "START" + else: + self.name = name + self.id = next_state_id + next_state_id += 1 + + @staticmethod + def get(name): + if name not in states: + states[name] = State(name) + return states[name] + + @staticmethod + def count(): + return len(states) + + def __repr__(self): + return "state_%s(%s)" % (self.id, self.name) + + @staticmethod + def from_id(id): + for state in states.values(): + if state.id == id: + return state + raise ValueError(id) + +State.get("0") +ERROR_ACTION = StateActionListPair.get(State.get("error"), None) + +next_super_state_id = 0 +super_states = {} + +class TransitionTable: + + def __init__(self, name): + global next_super_state_id + self.name = name + self.id = next_super_state_id + next_super_state_id += 1 + self.parent = None + self.transitions = [] + self._table = None + + def add_transition(self, trans): + self.transitions.append(trans) + + def dump(self): + if self.parent: + lines = [ "TransitionTable %s(%s extends %s)" % (self.id, self.name, self.parent.name) ] + else: + lines = [ "TransitionTable %s(%s):" % (self.id, self.name) ] + lines.extend(" " + t.dump() for t in self.transitions) + return "\n".join(lines) + + @staticmethod + def get(name, parent=None): + if name not in super_states: + super_states[name] = TransitionTable(name) + return super_states[name] + + @staticmethod + def count(): + return len(super_states) + + def get_table(self, character_classes): + '''Returns the transition table for all states in this super-state''' + if self._table is None: + from_transtions = defaultdict(list) + for t in self.transitions: + from_transtions[t.from_state].append(t) + self._table = { state: self.get_transition_table(state, from_transtions.get(state, ()), character_classes) for state in states.values() } + return self._table + + def get_transition_table(self, state, transition_list, character_classes): + table = {} + if self.parent: + parent_table = self.parent.get_table(character_classes) + else: + parent_table = None + default = None + for t in transition_list: + assert state == t.from_state + if isinstance(t.what, Any): + default = t.action + continue + action = t.action + classes = set(character_classes[c] for c in t.what) + for cls in classes: + if cls in table: + raise ValueError("Duplicate transition from %s on %s" % (state, cls)) + else: + table[cls] = action + on_identifier = table.get(IDENTIFIER_CLASS, None) + for cls in character_classes.values(): + if cls in table: + continue + if on_identifier and cls.is_identifier: + table[cls] = on_identifier + elif default: + table[cls] = default + elif parent_table and state in parent_table: + table[cls] = parent_table[state][cls] + else: + table[cls] = ERROR_ACTION + return StateTransitionTable(table) + + def compile(self, character_classes): + return SuperState(self.name, self.get_table(character_classes)) + +class Any: + + def __repr__(self): + return "*" + +class Action: + + def __repr__(self): + return self.__class__.__name__.lower() + +class Emit(Action): + + def __init__(self, kind, text): + assert isinstance(kind, str) + assert kind.upper() == kind + self.kind = kind + self.text = text + + def __repr__(self): + if self.text is None: + return "emit(" + self.kind + ")" + else: + return "emit(%s, %r)" % (self.kind, self.text) + + def __eq__(self, other): + return type(other) is Emit and other.kind == self.kind and other.text == self.text + + def __hash__(self): + return 353 ^ hash(self.kind) ^ hash(self.text) + +class Push(Action): + + def __init__(self, state): + assert isinstance(state, TransitionTable) + self.state = state + + def __repr__(self): + return "push(%s)" % self.state.name + + def __eq__(self, other): + return type(other) is Push and other.state == self.state + + def __hash__(self): + return 59 ^ hash(self.state) + +class EmitIndent(Action): + pass +EMIT_INDENT = EmitIndent() + +class Pop(Action): + pass +POP = Pop() + +class Pushback(Action): + pass +PUSHBACK = Pushback() + +class Mark(Action): + pass +MARK = Mark() + +class Newline(Action): + pass +NEWLINE = Newline() + +class Identifier: + + def __repr__(self): + return "UnicodeIdentifiers()" + +IDENTIFIER = Identifier() + +class IdentifierContinue: + + def __repr__(self): + return "IdentifierContinue()" + +IDENTIFIER_CONTINUE = IdentifierContinue() + +next_char_class_id = 0 + +class CharacterClass: + + def __init__(self, chars, is_identifier = None): + global next_char_class_id + self.chars = chars + self.id = next_char_class_id + next_char_class_id += 1 + if is_identifier is None: + self.is_identifier = chars.copy().pop().isidentifier() + else: + self.is_identifier = is_identifier + + def __repr__(self): + if self == IDENTIFIER_CLASS: + return "IDENTIFIER_CLASS(%d)" % self.id + elif self == ERROR_CLASS: + return "ERROR_CLASS(%d)" % self.id + else: + return "CharacterClass %s %r" % (self.id, sorted(self.chars)) + +ERROR_CLASS = CharacterClass(set(), False) +assert ERROR_CLASS.id == 0 +IDENTIFIER_CLASS = CharacterClass(set(), True) +IDENTIFIER_CONTINUE_CLASS = CharacterClass(set(), False) + +class Machine: + + def __init__(self): + self.aliases = {} + self.states = {} + self.aliases["IDENTIFIER"] = IDENTIFIER + self.aliases["IDENTIFIER_CONTINUE"] = IDENTIFIER_CONTINUE + self.aliases['SPACE'] = {' '} + self.start = None + + def add_state(self, name): + assert name not in self.states + result = TransitionTable.get(name) + self.states[name] = result + return result + + def add_alias(self, name, choices): + assert name not in self.aliases + assert isinstance(choices, set), choices + self.aliases[name] = choices + + def dump(self): + r = [] + a = r.append + a("Starting super-state: %s" % self.start.name) + a("") + a("Aliases:") + for name_alias in self.aliases.items(): + a(" %s = %r" % name_alias) + a("") + for name, state in self.states.items(): + a(state.dump()) + return "\n".join(r) + + @staticmethod + def load(src): + tree = parse(src) + m = Machine() + w = Walker(m) + w.visit(tree) + return m + + def get_classes(self): + '''Get the character classes for this machine''' + #There are two predefined classes: Unicode identifiers, and ERROR. + #A character class is a set of characters, such that the transitions + #and actions of the machine are identical for all characters in that class. + char_to_transitions = defaultdict(set) + for s in self.states.values(): + for t in s.transitions: + w = t.what + if isinstance(w, Any): + continue + for c in w: + if c is IDENTIFIER or c is IDENTIFIER_CONTINUE: + continue + char_to_transitions[c].add((s, t.from_state, t.action)) + equivalence_sets = defaultdict(set) + for c, transition_set in sorted(char_to_transitions.items()): + equivalence_sets[frozenset(transition_set)].add(c) + classes = {} + for char_set in sorted(equivalence_sets.values()): + charcls = CharacterClass(char_set) + for c in char_set: + classes[c] = charcls + classes[IDENTIFIER] = IDENTIFIER_CLASS + classes[IDENTIFIER_CONTINUE] = IDENTIFIER_CONTINUE_CLASS + for i in range(128): + c = chr(i) + if c not in classes: + if c.isidentifier(): + classes[c] = IDENTIFIER_CLASS + elif c in "0123456789": + classes[c] = IDENTIFIER_CONTINUE_CLASS + else: + classes[c] = ERROR_CLASS + for cls in classes.values(): + if cls is IDENTIFIER_CLASS or cls is IDENTIFIER_CONTINUE_CLASS or cls is ERROR_CLASS: + continue + assert { c for c in cls.chars if c.isidentifier() } == cls.chars or not { c for c in cls.chars if c.isidentifier() } + return classes + +class Walker: + + def __init__(self, machine): + self.machine = machine + + def visit(self, node): + if hasattr(node, "type"): + tag = node.type + else: + tag = node.data + meth = getattr(self, "visit_" + tag, None) + if meth is None: + self.fail(node, tag) + else: + return meth(node) + + def fail(self, node, tag): + print(node) + raise NotImplementedError(tag) + + def visit_first_child(self, node): + assert len(node.children) == 1 + return self.visit(node.children[0]) + + def visit_children(self, node): + return [ self.visit(child) for child in node.children ] + + visit_start = visit_first_child + visit_machine = visit_children + visit_declaration = visit_first_child + + def visit_alias_decl(self, node): + assert len(node.children) == 2 + choice = self.visit(node.children[1]) + self.machine.add_alias(node.children[0].value, choice) + + def visit_alias(self, node): + return self.machine.aliases[node.children[0].value] + + def visit_char(self, node): + c = ast.literal_eval(node.children[0].value) + assert isinstance(c, str), c + assert len(c) == 1, c + return c + + def visit_choice(self, node): + #Convert choices into a set of characters + result = set() + for child in node.children: + item = self.visit(child) + if isinstance(item, set): + result.update(item) + else: + result.add(item) + return result + + visit_item = visit_first_child + + def visit_table_decl(self, node): + self.current_state = self.visit(node.children[0]) + for transition in node.children[1:]: + self.visit(transition) + + def visit_table_header(self, node): + name = node.children[0].value + state = self.machine.add_state(name) + if len(node.children) > 1: + base = TransitionTable.get(node.children[1].value) + state.parent = base + return state + + def visit_transition(self, node): + # state_choice "->" state "for" (choice | "*") action_list? + from_states = self.visit(node.children[0]) + to_state = self.visit(node.children[1]) + what = self.visit(node.children[2]) + if len(node.children) > 3: + do = self.visit(node.children[3]) + else: + do = [] + for state in from_states: + trans = Transition(state, to_state, what, do) + self.current_state.add_transition(trans) + + visit_state_choice = visit_children + + def visit_state(self, node): + return State.get(node.children[0].value) + + def visit_any(self, node): + return Any() + + visit_action_list = visit_children + visit_action = visit_first_child + + def visit_emit(self, node): + if len(node.children) == 2: + return Emit(node.children[0].value, self.visit(node.children[1])) + else: + return Emit(node.children[0].value, None) + + def visit_optional_text(self, node): + return node.children[0].value + + def visit_push(self, node): + state = TransitionTable.get(node.children[0].value) + return Push(state) + + def visit_emit_indent(self, node): + return EMIT_INDENT + + def visit_pushback(self, node): + return PUSHBACK + + def visit_pop(self, node): + return POP + + def visit_mark(self, node): + return MARK + + def visit_newline(self, node): + return NEWLINE + + def visit_start_decl(self, node): + self.machine.start = TransitionTable.get(node.children[0].value) + + +def main(): + import sys + file = sys.argv[1] + with open(file) as fd: + tree = parse(fd.read()) + m = Machine() + w = Walker(m) + w.visit(tree) + print(m.dump()) + +if __name__ == "__main__": + main() diff --git a/python/extractor/tokenizer_generator/parser.py b/python/extractor/tokenizer_generator/parser.py new file mode 100644 index 00000000000..2d4111b361e --- /dev/null +++ b/python/extractor/tokenizer_generator/parser.py @@ -0,0 +1,92 @@ + +''' + Explanation of the syntax + + start_decl: The starting transition table + alias_decl: Declare short hand, e.g. digits = '0' or '1' or ... + table_decl: Declare transition table: name and list of transitions. + transition: Transitions from one state to another. From is: state (or choice of states) -> new-state for possible-characters [ do action or actions; ] + action: Actions are: + "emit(kind [, text]): emits a token of kind using the givn text or text from the stream. The token starts at the last mark and ends at the current location. + "push(table)": pushes a transition table to the stack. + "pop" : pops a transition table from the stack. + "pushback": pushes the last character back to the stream. + "mark": marks the current location as the start of the next token. + "emit_indent": Emits zero or more INDENT or DEDENT tokens depending on current indentation. + "newline": Increments the line number and sets the column offset back to zero. + + States: + All states are given names. + The state "0" is the start state and always exists. + All other states are implicitly defined when used (this is for Python after all :) + '*' means all states for which a transition is not explicitly defined. + So the transitions: + 0 -> end for '\n' + 0 -> other for * + 0 -> a_b for 'a' or 'b' + mean that '0' will transition to 'other' for all characters other than 'a', 'b' and `\n`. + The order of transitions in the state machine description is irrelevant. +''' + + +grammar = r""" +start : machine +machine : declaration+ +declaration : alias_decl | table_decl | start_decl +start_decl : "start" ":" IDENTIFIER +table_decl : table_header "{" transition+ "}" +table_header : "table" IDENTIFIER ( "(" IDENTIFIER ")" )? +alias_decl : IDENTIFIER "=" choice +choice : item ( "or" item)* +item : alias | char +alias : IDENTIFIER +char : LITERAL +transition : state_choice "->" state "for" (choice | any) action_list? +any : "*" +state_choice : state ( "or" state)* +state : IDENTIFIER | DIGIT +action_list : "do" action ";" (action ";")* +action : emit | pop | push | pushback | mark | emit_indent | newline +emit : "emit" "(" IDENTIFIER optional_text? ")" +optional_text : "," LITERAL +pop : "pop" +push : "push" "(" IDENTIFIER ")" +pushback : "pushback" +mark : "mark" +emit_indent : "emit_indent" +newline : "newline" + +LITERAL : ("\"" /[^"]/* "\"") | ("'" /[^']/* "'") +IDENTIFIER : LETTER ( LETTER | DIGIT | "_" )* +LETTER : "A".."Z" | "a".."z" +DIGIT : "0".."9" +WHITESPACE : (" " | "\t" | "\r" | "\n")+ + +%import common.NEWLINE +COMMENT : "#" /(.)*/ NEWLINE +%ignore WHITESPACE +%ignore COMMENT +""" + + + +from lark import Lark + +class Parser(Lark): + + def __init__(self): + Lark.__init__(self, grammar, parser="earley", lexer="standard") + +def parse(src): + parser = Parser() + return parser.parse(src) + +def main(): + import sys + file = sys.argv[1] + with open(file) as fd: + tree = parse(fd.read()) + print(tree.pretty()) + +if __name__ == "__main__": + main() diff --git a/python/extractor/tokenizer_generator/state_transition.txt b/python/extractor/tokenizer_generator/state_transition.txt new file mode 100644 index 00000000000..9ce9b3cfe71 --- /dev/null +++ b/python/extractor/tokenizer_generator/state_transition.txt @@ -0,0 +1,385 @@ +# State machine specification for unified Python tokenizer +# Handles all tokens for all versions of Python, including partial string tokens for handling f-strings. +# Stating transition table is "default" and starting state is "0" +# +# + + +#declarations +prefix_chars = 'u' or 'U' or 'b' or 'B' or 'r' or 'R' +one_to_nine = '1' or '2' or '3' or '4' or '5' or '6' or '7' or '8' or '9' +digits = '0' or one_to_nine +oct_digits = '0' or '1' or '2' or '3' or '4' or '5' or '6' or '7' +hex_digits = digits or 'a' or 'A' or 'b' or 'B' or 'c' or 'C' or 'd' or 'D' or 'e' or 'E' or 'f' or 'F' +feed = '\n' or '\r' + +#tables +table default { + # 0 is starting state + 0 -> whitespace_line for * do pushback; + + #String prefix states + + # When we encounter a prefix character, we are faced with the possibility + # that it is either the beginning of a string or of an identifier. With a + # single character of lookahead available, we therefore have to be in an + # intermediate state until we are able to determine which case we're in. + + code -> maybe_string1 for prefix_chars do mark; + maybe_string1 -> maybe_string2 for prefix_chars + maybe_string1 or maybe_string2 -> quote_s for "'" + maybe_string1 or maybe_string2 -> quote_d for '"' + code -> quote_s for "'" do mark; + code -> quote_d for '"' do mark; + maybe_string1 or maybe_string2 -> in_identifier for * do pushback; + + # In the following, `_s` means one single quote, `_ss` means two in a row, + # etc. Likewise `_d` indicates double quotes. + + quote_s -> quote_ss for "'" + quote_d -> quote_dd for '"' + quote_s -> instring for * do pushback ; push(string_s); + quote_ss -> instring for "'" do push(string_sss); + quote_ss -> code for * do pushback ; emit(STRING); + quote_d -> instring for * do pushback ; push(string_d); + quote_dd -> instring for '"' do push(string_ddd); + quote_dd -> code for * do pushback ; emit(STRING); + + #F-string prefix states + + # The prefixes `u` and `b` are specific to Python 2, and f-strings are only + # valid for Python 3. Thus, the only potential prefixes are permutations of + # `f` and `fr` (upper/lowercase notwithstanding). + + code -> maybe_fstring1 for 'f' or 'F' do mark; + maybe_string1 -> maybe_fstring2 for 'f' or 'F' + maybe_fstring1 -> maybe_fstring2 for 'r' or 'R' + maybe_fstring1 or maybe_fstring2 -> fquote_s for "'" + maybe_fstring1 or maybe_fstring2 -> fquote_d for '"' + maybe_fstring1 or maybe_fstring2 -> in_identifier for * do pushback; + fquote_s -> fquote_ss for "'" + fquote_d -> fquote_dd for '"' + fquote_s -> instring for * do pushback ; push(fstring_start_s); + fquote_ss -> instring for "'" do push(fstring_start_sss); + fquote_ss -> code for * do pushback ; emit(STRING); + fquote_d -> instring for * do pushback ; push(fstring_start_d); + fquote_dd -> instring for '"' do push(fstring_start_ddd); + fquote_dd -> code for * do pushback ; emit(STRING); + + #String states + instring -> instring for * + instring -> unicode_or_escape for '\\' + unicode_or_escape -> unicode_or_raw for 'N' + unicode_or_raw -> unicode for '{' + unicode_or_raw -> instring for * + unicode -> instring for '}' + unicode -> unicode for * + unicode_or_escape -> escape for * do pushback; + + escape -> instring for feed do newline; + escape -> instring for * + + # When inside a parenthesized expression, newlines indicate the continuation + # of the expression, and not a return to a context where statements may + # appear. This is captured using the `paren` table. + + code -> code for '(' do emit(LPAR, "("); push(paren); + code -> code for '[' do emit(LSQB, "["); push(paren); + code -> code for '{' do emit(LBRACE, "{"); push(paren); + code -> code for ')' do emit(RPAR, ")"); + code -> code for ']' do emit(RSQB, "]"); + code -> code for '}' do emit(RBRACE, "}"); + code -> code for '`' do emit(BACKQUOTE, '`'); + + # Operators + code -> assign for '=' do mark; + code -> le for '<' do mark; + code -> ge for '>' do mark; + code -> bang for '!' do mark; + le -> binop for '<' + le -> code for '>' do emit(OP); + ge -> binop for '>' + bang or le or ge or assign -> code for '=' do emit(OP); + le or ge or assign -> code for * do pushback; emit(OP); + bang -> code for 'r' or 'a' or 's' or 'd' do emit(CONVERSION); + code -> colon for ':' + colon -> code for '=' do emit(COLONEQUAL, ":="); + colon -> code for * do pushback; emit(COLON, ":"); + code -> code for ',' do emit(COMMA, ","); + code -> code for ';' do emit(SEMI, ";"); + code -> at for '@' do mark; + at -> code for '=' do emit(OP); + at -> code for * do pushback; emit(AT, "@"); + code -> dot for '.' do mark; + dot -> float for digits + dot -> code for * do pushback; emit(DOT, "."); + binop or slash or star or dash -> code for '=' do emit(OP); + binop or slash or star or dash -> code for * do pushback; emit(OP); + code -> star for '*' do mark; + star -> binop for '*' + code -> slash for '/' do mark; + slash -> binop for '/' + code -> dash for '-' do mark; + dash -> code for '>' do emit(RARROW); + code -> binop for '+' or '%' or '&' or '|' or '^' do mark; + code -> code for '~' do emit(OP, '~'); + + # Numeric literals + + # Python admits a large variety of numeric literals, and the handling of + # various constructs is a bit inconsistent. For instance, prefixed zeroes are + # not allowed in front of integer numerals (unless all digits are between 0 + # and 7, in which case it is treated as an octal number), but _are_ allowed if + # there is some other context that makes it a float or complex number. Thus, + # `09` is invalid, but `09.` and `09j` are valid. This means we have to be + # very careful in what we commit to in our tokenization, hence the rather + # complicated construction below. + + code -> int for one_to_nine do mark; + int -> int for digits + zero or zero_int or binary or octal or int or hex -> code for 'l' or 'L' do emit(NUMBER); + int -> int_sep for '_' + int_sep -> int for digits + int_sep -> error for * do emit(ERRORTOKEN); + code -> zero for '0' do mark; + zero -> zero_int for digits + zero -> zero_int_sep for '_' + zero_int -> zero_int for digits + zero_int -> zero_int_sep for '_' + zero_int_sep -> zero_int for digits + zero_int_sep -> error for * do emit(ERRORTOKEN); + zero -> octal for 'o' or 'O' + octal -> octal for oct_digits + octal -> octal_sep for '_' + octal_sep -> octal for oct_digits + octal_sep -> error for * do emit(ERRORTOKEN); + zero or octal or hex or binary -> code for * do pushback; emit(NUMBER); + zero -> binary for 'b' or 'B' + binary -> binary for '0' or '1' + binary -> binary_sep for '_' + binary_sep -> binary for '0' or '1' + binary_sep -> error for * do emit(ERRORTOKEN); + zero -> hex for 'x' or 'X' + hex -> hex for hex_digits + hex -> hex_sep for '_' + hex_sep -> hex for hex_digits + hex_sep -> error for * do emit(ERRORTOKEN); + zero or zero_int or int -> int_dot for '.' + zero_int or int -> code for * do pushback; emit(NUMBER); + int_dot or float -> float for digits + float -> float_sep for '_' + float_sep -> float for digits + float_sep -> error for * do emit(ERRORTOKEN); + int_dot -> code for * do pushback; emit(NUMBER); + float or zero or zero_int or int or int_dot -> float_e for 'e' + float or zero or zero_int or int or int_dot -> float_E for 'E' + # `1 if 1else 0` is valid syntax, so we cannot assume 'e' always indicates a float. + float_e -> code for 'l' do pushback; pushback; emit(NUMBER); + float_e or float_E -> float_E for '+' or '-' + float_e or float_E or float_x -> float_x for digits + float_x -> float_x_sep for '_' + float_x_sep -> float_x for digits + float_x_sep -> error for * do emit(ERRORTOKEN); + float or float_x -> code for * do pushback; emit(NUMBER); + + # Identifiers (e.g. names and keywords) + code -> in_identifier for IDENTIFIER do mark; + in_identifier -> in_identifier for IDENTIFIER or digits or IDENTIFIER_CONTINUE + code -> dollar_name for '$' do mark; + dollar_name -> dollar_name for IDENTIFIER or digits or IDENTIFIER_CONTINUE + code -> in_identifier for '_' do mark; + in_identifier -> in_identifier for '_' + in_identifier -> code for * do pushback; emit(NAME); + dollar_name -> code for * do pushback; emit(DOLLARNAME); + + # Comments + code -> line_end_comment for '#' do mark; + line_end_comment -> code for feed do pushback; emit(COMMENT); + line_end_comment -> line_end_comment for * + comment -> whitespace_line for feed do pushback; emit(COMMENT); + comment -> comment for * + code -> whitespace_line for feed do emit(NEWLINE, "\n"); newline; + whitespace_line -> whitespace_line for SPACE or '\t' or '\f' + whitespace_line -> whitespace_line for feed do newline; + whitespace_line -> code for * do emit_indent; + whitespace_line -> comment for '#' do mark; + code -> code for SPACE or '\t' + + # Line continuations and error states. + code or float_e or float_E -> error for * do emit(ERRORTOKEN); + code -> pending_continuation for '\\' + pending_continuation -> line_continuation for feed do newline; + line_continuation -> code for * do pushback; mark; + pending_continuation -> error for * do emit(ERRORTOKEN); + error -> code for * do pushback; + code -> code for * do mark; emit(ERRORTOKEN); + zero or int_dot or zero_int or int or float or float_x -> code for 'j' or 'J' do emit(NUMBER); +} + +table paren(default) { + code -> code for feed do mark; newline; + code -> code for ')' do emit(RPAR, ")"); pop; + code -> code for ']' do emit(RSQB, "]"); pop; + code -> code for '}' do emit(RBRACE, "}"); pop; +} + +#String starting with ' +table string_s(default) { + instring -> code for "'" do pop; emit(STRING); + instring -> error for feed do pop; emit(ERRORTOKEN); newline; +} + +#String starting with " +table string_d(default) { + instring -> code for '"' do pop; emit(STRING); + instring -> error for feed do pop; emit(ERRORTOKEN); newline; +} + +#String starting with ''' +table string_sss(default) { + instring -> string_x for "'" + instring -> instring for feed do newline; + string_x -> string_xx for "'" + string_x -> instring for feed do newline; + string_x -> instring for * do pushback; + string_xx -> code for "'" do pop; emit(STRING); + string_xx -> instring for feed do newline; + string_xx -> instring for * do pushback; +} + +#String starting with """ +table string_ddd(default) { + instring -> string_x for '"' + instring -> instring for feed do newline; + string_x -> string_xx for '"' + string_x -> instring for feed do newline; + string_x -> instring for * do pushback; + string_xx -> code for '"' do pop; emit(STRING); + string_xx -> instring for feed do newline; + string_xx -> instring for * do pushback; +} + +#F-string part common to all fstrings +table fstring_sdsssddd(default) { + instring -> brace for '{' + + escape -> brace for '{' + + brace -> instring for '{' + brace -> code for * do pushback ; emit(FSTRING_MID); push(fstring_expr); +} + +#F-string part common to ' and " +table fstring_sd(fstring_sdsssddd) { + instring -> error for feed do pop; emit(ERRORTOKEN); newline; +} + +#F-string start for string starting with ' +table fstring_start_s(fstring_sd) { + instring -> code for "'" do pop; emit(STRING); + + # If this rule is removed or moved to a higher table, the QL tests start failing for unclear reasons. + # It's identical to a rule in default. + brace -> instring for '{' + brace -> code for * do pushback ; emit(FSTRING_START); pop; push(fstring_s); push(fstring_expr); +} + +#F-string part for string starting with ' +table fstring_s(fstring_sd) { + instring -> code for "'" do pop; emit(FSTRING_END); +} + +#F-string start for string starting with " +table fstring_start_d(fstring_sd) { + instring -> code for '"' do pop; emit(STRING); + + # If this rule is removed or moved to a higher table, the QL tests start failing for unclear reasons. + # It's identical to a rule in fstring_sdsssddd. + brace -> instring for '{' + brace -> code for * do pushback ; emit(FSTRING_START); pop; push(fstring_d); push(fstring_expr); +} + +#F-string part for string starting with " +table fstring_d(fstring_sd) { + instring -> code for '"' do pop; emit(FSTRING_END); +} + +#F-string part common to ''' and """ +table fstring_sssddd(fstring_sdsssddd) { + instring -> instring for feed do newline; + + string_x -> instring for feed do newline; + string_x -> instring for * do pushback; + + string_xx -> instring for feed do newline; + string_xx -> instring for * do pushback; +} + +#F-string start for string starting with ''' +table fstring_start_sss(fstring_sssddd) { + instring -> string_x for "'" + + string_x -> string_xx for "'" + + string_xx -> code for "'" do pop; emit(STRING); + + brace -> instring for '{' + brace -> code for * do pushback ; emit(FSTRING_START); pop; push(fstring_sss); push(fstring_expr); +} + +#F-string part for string starting with ''' +table fstring_sss(fstring_sssddd) { + instring -> string_x for "'" + + string_x -> string_xx for "'" + + string_xx -> code for "'" do pop; emit(FSTRING_END); +} + +#F-string start for string starting with """ +table fstring_start_ddd(fstring_sssddd) { + instring -> string_x for '"' + + string_x -> string_xx for '"' + + string_xx -> code for '"' do pop; emit(STRING); + + brace -> instring for '{' + brace -> code for * do pushback ; emit(FSTRING_START); pop; push(fstring_ddd); push(fstring_expr); +} + +#F-string part for string starting with """ +table fstring_ddd(fstring_sssddd) { + instring -> string_x for '"' + + string_x -> string_xx for '"' + + string_xx -> code for '"' do pop; emit(FSTRING_END); +} + +#Expression within an f-string +table fstring_expr(paren) { + code -> instring for '}' do pop; mark; + code -> instring for ':' do emit(COLON); push(format_specifier); + instring -> instring for '}' do pop; mark; +} + +fspec_type = 'b' or 'c' or 'd' or 'e' or 'E' or 'f' or 'F' or 'g' or 'G' or 'n' or 'o' or 's' or 'x' or 'X' or '%' +fspec_align = '<' or '>' or '=' or '^' +fspec_sign = '+' or '-' or ' ' + +table format_specifier(default) { + instring -> code for '{' do emit(FSTRING_SPEC); + instring -> instring for '}' do pushback; emit(FSTRING_SPEC); pop; + + code -> instring for '}' do mark; +} + + + +#Special state for when dedents are pending. +table pending_dedent(default) { + code -> code for * do pop; emit_indent; +} + +start: default diff --git a/python/extractor/tokenizer_generator/test.py b/python/extractor/tokenizer_generator/test.py new file mode 100644 index 00000000000..97ff19dccc4 --- /dev/null +++ b/python/extractor/tokenizer_generator/test.py @@ -0,0 +1,25 @@ + +from . import test_tokenizer +import sys +from blib2to3.pgen2.token import tok_name + +def printtoken(type, token, start, end): # for testing + token_range = "%d,%d-%d,%d:" % (start + end) + print("%-20s%-15s%r" % + (token_range, tok_name[type], token) + ) + + +def main(): + verbose = sys.argv[1] == "-v" + if verbose: + inputfile = sys.argv[2] + else: + inputfile = sys.argv[1] + with open(inputfile, "r") as input: + t = test_tokenizer.Tokenizer(input.read()+"\n") + for tkn in t.tokens(verbose): + printtoken(*tkn) + +if __name__ == "__main__": + main() diff --git a/python/extractor/tokenizer_generator/tokenizer_template.py b/python/extractor/tokenizer_generator/tokenizer_template.py new file mode 100644 index 00000000000..b4d300667ff --- /dev/null +++ b/python/extractor/tokenizer_generator/tokenizer_template.py @@ -0,0 +1,172 @@ +''' +Lookup table based tokenizer with state popping and pushing capabilities. +The ability to push and pop state is required for handling parenthesised expressions, +indentation, and f-strings. We also use it for handling the different quotation mark types, +but it is not essential for that, merely convenient. + +''' + + + +class Tokenizer(object): + + def __init__(self, text): + self.text = text + self.index = 0 + self.line_start_index = 0 + self.token_start_index = 0 + self.token_start = 1, 0 + self.line = 1 + self.super_state = START_SUPER_STATE + self.state_stack = [] + self.indents = [0] +#ACTIONS-HERE + def tokens(self, debug=False): + text = self.text + cls_table = CLASS_TABLE + id_index = ID_INDEX + id_chunks = ID_CHUNKS + max_id = len(id_index)*256 +#ACTION_TABLE_HERE + state = 0 + try: + if debug: + while True: + c = ord(text[self.index]) + if c < 128: + cls = cls_table[c] + elif c >= max_id: + cls = ERROR_CLASS + else: + b = id_chunks[id_index[c>>8]][(c>>2)&63] + cls = (b>>((c&3)*2))&3 + prev_state = state + print("char = '%s', state=%d, cls=%d" % (text[self.index], state, cls)) + state, transition = action_table[self.super_state[state][cls]] + print ("%s -> %s on %r in %s" % (prev_state, state, text[self.index], TRANSITION_STATE_NAMES[id(self.super_state)])) + if transition: + tkn = transition() + if tkn: + yield tkn + else: + self.index += 1 + else: + while True: + c = ord(text[self.index]) + if c < 128: + cls = cls_table[c] + elif c >= max_id: + cls = ERROR_CLASS + else: + b = id_chunks[id_index[c>>8]][(c>>2)&63] + cls = (b>>((c&3)*2))&3 + state, transition = action_table[self.super_state[state][cls]] + if transition: + tkn = transition() + if tkn: + yield tkn + else: + self.index += 1 + except IndexError as ex: + if self.index != len(text): + #Reraise index error + cls = cls_table[c] + trans = self.super_state[state] + action_index = trans[cls] + action_table[action_index] + # Not raised? Must have been raised in transition function. + raise ex + tkn = self.emit_indent() + while tkn is not None: + yield tkn + tkn = self.emit_indent() + end = self.line, self.index-self.line_start_index + yield ENDMARKER, u"", self.token_start, end + return + + def emit_indent(self): + indent = 0 + index = self.line_start_index + current = self.index + here = self.line, current-self.line_start_index + while index < current: + if self.text[index] == ' ': + indent += 1 + elif self.text[index] == '\t': + indent = (indent+8) & -8 + elif self.text[index] == '\f': + indent = 0 + else: + #Unexpected state. Emit error token + while len(self.indents) > 1: + self.indents.pop() + result = ERRORTOKEN, self.text[self.token_start_index:self.index+1], self.token_start, here + self.token_start = here + self.line_start_index = self.index + return result + index += 1 + if indent == self.indents[-1]: + self.token_start = here + self.token_start_index = self.index + return None + elif indent > self.indents[-1]: + self.indents.append(indent) + start = self.line, 0 + result = INDENT, self.text[self.line_start_index:current], start, here + self.token_start = here + self.token_start_index = current + return result + else: + self.indents.pop() + if indent > self.indents[-1]: + #Illegal indent + result = ILLEGALINDENT, u"", here, here + else: + result = DEDENT, u"", here, here + if indent < self.indents[-1]: + #More dedents to do + self.state_stack.append(self.super_state) + self.super_state = PENDING_DEDENT + self.token_start = here + self.token_start_index = self.index + return result + + +ENCODING_RE = re.compile(br'.*coding[:=]\s*([-\w.]+).*') +NEWLINE_BYTES = b'\n' + +def encoding_from_source(source): + 'Returns encoding of source (bytes), plus source strip of any BOM markers.' + #Check for BOM + if source.startswith(codecs.BOM_UTF8): + return 'utf8', source[len(codecs.BOM_UTF8):] + if source.startswith(codecs.BOM_UTF16_BE): + return 'utf-16be', source[len(codecs.BOM_UTF16_BE):] + if source.startswith(codecs.BOM_UTF16_LE): + return 'utf-16le', source[len(codecs.BOM_UTF16_LE):] + try: + first_new_line = source.find(NEWLINE_BYTES) + first_line = source[:first_new_line] + second_new_line = source.find(NEWLINE_BYTES, first_new_line+1) + second_line = source[first_new_line+1:second_new_line] + match = ENCODING_RE.match(first_line) or ENCODING_RE.match(second_line) + if match: + ascii_encoding = match.groups()[0] + encoding = ascii_encoding.decode("ascii") + # Handle non-standard encodings that are recognised by the interpreter. + if encoding.startswith("utf-8-"): + encoding = "utf-8" + elif encoding == "iso-latin-1": + encoding = "iso-8859-1" + elif encoding.startswith("latin-1-"): + encoding = "iso-8859-1" + elif encoding.startswith("iso-8859-1-"): + encoding = "iso-8859-1" + elif encoding.startswith("iso-latin-1-"): + encoding = "iso-8859-1" + return encoding, source + except Exception as ex: + print(ex) + #Failed to determine encoding -- Just treat as default. + pass + return 'utf-8', source diff --git a/python/extractor/tox.ini b/python/extractor/tox.ini new file mode 100644 index 00000000000..2a8979e1651 --- /dev/null +++ b/python/extractor/tox.ini @@ -0,0 +1,15 @@ +[tox] +envlist = py37, py38, py39, py310, py311, py312 +minversion = 4.11.3 +isolated_build = true + +[testenv] +skip_install = true +allowlist_externals = poetry +commands_pre = + poetry env use -- {env_python} + poetry install +commands = + poetry run pytest tests/ +setenv = + VIRTUALENV_DISCOVERY = pyenv diff --git a/python/extractor/tsg-python/.gitignore b/python/extractor/tsg-python/.gitignore new file mode 100644 index 00000000000..2f7896d1d13 --- /dev/null +++ b/python/extractor/tsg-python/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/python/extractor/tsg-python/BUILD.bazel b/python/extractor/tsg-python/BUILD.bazel new file mode 100644 index 00000000000..8e1425e3f3e --- /dev/null +++ b/python/extractor/tsg-python/BUILD.bazel @@ -0,0 +1,16 @@ +load("@tsg_python_crate_index//:defs.bzl", "aliases", "all_crate_deps") +load("//:common.bzl", "codeql_rust_binary") + +codeql_rust_binary( + name = "tsg-python", + srcs = ["src/main.rs"], + aliases = aliases(), + data = ["python.tsg"], + proc_macro_deps = all_crate_deps( + proc_macro = True, + ), + visibility = ["//visibility:public"], + deps = all_crate_deps( + normal = True, + ) + ["//extractor-python/tsg-python/tree-sitter-python"], +) diff --git a/python/extractor/tsg-python/Cargo.Bazel.lock b/python/extractor/tsg-python/Cargo.Bazel.lock new file mode 100644 index 00000000000..fbbd661c9e4 --- /dev/null +++ b/python/extractor/tsg-python/Cargo.Bazel.lock @@ -0,0 +1,2346 @@ +{ + "checksum": "54f1095f5a2e74da736682bc8d355b3dbce47558983feba04faba84cf3abfaca", + "crates": { + "ahash 0.4.7": { + "name": "ahash", + "version": "0.4.7", + "package_url": "https://github.com/tkaitchuck/ahash", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ahash/0.4.7/download", + "sha256": "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ahash", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "ahash", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.4.7" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "aho-corasick 0.7.18": { + "name": "aho-corasick", + "version": "0.7.18", + "package_url": "https://github.com/BurntSushi/aho-corasick", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/aho-corasick/0.7.18/download", + "sha256": "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "aho_corasick", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "aho_corasick", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "memchr 2.4.1", + "target": "memchr" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.7.18" + }, + "license": "Unlicense/MIT", + "license_ids": [ + "MIT", + "Unlicense" + ], + "license_file": null + }, + "ansi_term 0.11.0": { + "name": "ansi_term", + "version": "0.11.0", + "package_url": "https://github.com/ogham/rust-ansi-term", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ansi_term/0.11.0/download", + "sha256": "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ansi_term", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "ansi_term", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(target_os = \"windows\")": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2015", + "version": "0.11.0" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "anyhow 1.0.44": { + "name": "anyhow", + "version": "1.0.44", + "package_url": "https://github.com/dtolnay/anyhow", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/anyhow/1.0.44/download", + "sha256": "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "anyhow", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "anyhow", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "anyhow 1.0.44", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.44" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "atty 0.2.14": { + "name": "atty", + "version": "0.2.14", + "package_url": "https://github.com/softprops/atty", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/atty/0.2.14/download", + "sha256": "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "atty", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "atty", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(target_os = \"hermit\")": [ + { + "id": "hermit-abi 0.1.19", + "target": "hermit_abi" + } + ], + "cfg(unix)": [ + { + "id": "libc 0.2.101", + "target": "libc" + } + ], + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2015", + "version": "0.2.14" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "bitflags 1.3.2": { + "name": "bitflags", + "version": "1.3.2", + "package_url": "https://github.com/bitflags/bitflags", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/bitflags/1.3.2/download", + "sha256": "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "bitflags", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "bitflags", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "edition": "2018", + "version": "1.3.2" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "cc 1.0.70": { + "name": "cc", + "version": "1.0.70", + "package_url": "https://github.com/alexcrichton/cc-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cc/1.0.70/download", + "sha256": "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "cc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.70" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "cfg-if 1.0.0": { + "name": "cfg-if", + "version": "1.0.0", + "package_url": "https://github.com/alexcrichton/cfg-if", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cfg-if/1.0.0/download", + "sha256": "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cfg_if", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "cfg_if", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.0" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "clap 2.33.3": { + "name": "clap", + "version": "2.33.3", + "package_url": "https://github.com/clap-rs/clap", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/clap/2.33.3/download", + "sha256": "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" + } + }, + "targets": [ + { + "Library": { + "crate_name": "clap", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "clap", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "ansi_term", + "atty", + "color", + "default", + "strsim", + "suggestions", + "vec_map" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "atty 0.2.14", + "target": "atty" + }, + { + "id": "bitflags 1.3.2", + "target": "bitflags" + }, + { + "id": "strsim 0.8.0", + "target": "strsim" + }, + { + "id": "textwrap 0.11.0", + "target": "textwrap" + }, + { + "id": "unicode-width 0.1.8", + "target": "unicode_width" + }, + { + "id": "vec_map 0.8.2", + "target": "vec_map" + } + ], + "selects": { + "cfg(not(windows))": [ + { + "id": "ansi_term 0.11.0", + "target": "ansi_term" + } + ] + } + }, + "edition": "2015", + "version": "2.33.3" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "hashbrown 0.9.1": { + "name": "hashbrown", + "version": "0.9.1", + "package_url": "https://github.com/rust-lang/hashbrown", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hashbrown/0.9.1/download", + "sha256": "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hashbrown", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "hashbrown", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "ahash", + "inline-more" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "ahash 0.4.7", + "target": "ahash" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.9.1" + }, + "license": "Apache-2.0/MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "hermit-abi 0.1.19": { + "name": "hermit-abi", + "version": "0.1.19", + "package_url": "https://github.com/hermitcore/libhermit-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hermit-abi/0.1.19/download", + "sha256": "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hermit_abi", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "hermit_abi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.101", + "target": "libc" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.19" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "itoa 1.0.1": { + "name": "itoa", + "version": "1.0.1", + "package_url": "https://github.com/dtolnay/itoa", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/itoa/1.0.1/download", + "sha256": "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" + } + }, + "targets": [ + { + "Library": { + "crate_name": "itoa", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "itoa", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "libc 0.2.101": { + "name": "libc", + "version": "0.2.101", + "package_url": "https://github.com/rust-lang/libc", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/libc/0.2.101/download", + "sha256": "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" + } + }, + "targets": [ + { + "Library": { + "crate_name": "libc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "libc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.101", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.2.101" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "log 0.4.14": { + "name": "log", + "version": "0.4.14", + "package_url": "https://github.com/rust-lang/log", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/log/0.4.14/download", + "sha256": "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" + } + }, + "targets": [ + { + "Library": { + "crate_name": "log", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "log", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "log 0.4.14", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.14" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "memchr 2.4.1": { + "name": "memchr", + "version": "2.4.1", + "package_url": "https://github.com/BurntSushi/memchr", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/memchr/2.4.1/download", + "sha256": "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "memchr", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "memchr", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "memchr 2.4.1", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "2.4.1" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "Unlicense/MIT", + "license_ids": [ + "MIT", + "Unlicense" + ], + "license_file": null + }, + "proc-macro2 1.0.29": { + "name": "proc-macro2", + "version": "1.0.29", + "package_url": "https://github.com/alexcrichton/proc-macro2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/proc-macro2/1.0.29/download", + "sha256": "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "proc_macro2", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "proc_macro2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "proc-macro" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.29", + "target": "build_script_build" + }, + { + "id": "unicode-xid 0.2.2", + "target": "unicode_xid" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.29" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "quote 1.0.9": { + "name": "quote", + "version": "1.0.9", + "package_url": "https://github.com/dtolnay/quote", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/quote/1.0.9/download", + "sha256": "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" + } + }, + "targets": [ + { + "Library": { + "crate_name": "quote", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "quote", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "proc-macro" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.29", + "target": "proc_macro2" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.9" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "regex 1.5.5": { + "name": "regex", + "version": "1.5.5", + "package_url": "https://github.com/rust-lang/regex", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/regex/1.5.5/download", + "sha256": "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" + } + }, + "targets": [ + { + "Library": { + "crate_name": "regex", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "regex", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "aho-corasick", + "default", + "memchr", + "perf", + "perf-cache", + "perf-dfa", + "perf-inline", + "perf-literal", + "std", + "unicode", + "unicode-age", + "unicode-bool", + "unicode-case", + "unicode-gencat", + "unicode-perl", + "unicode-script", + "unicode-segment" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "aho-corasick 0.7.18", + "target": "aho_corasick" + }, + { + "id": "memchr 2.4.1", + "target": "memchr" + }, + { + "id": "regex-syntax 0.6.25", + "target": "regex_syntax" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.5.5" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "regex-syntax 0.6.25": { + "name": "regex-syntax", + "version": "0.6.25", + "package_url": "https://github.com/rust-lang/regex", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/regex-syntax/0.6.25/download", + "sha256": "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "regex_syntax", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "regex_syntax", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "unicode", + "unicode-age", + "unicode-bool", + "unicode-case", + "unicode-gencat", + "unicode-perl", + "unicode-script", + "unicode-segment" + ], + "selects": {} + }, + "edition": "2018", + "version": "0.6.25" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "ryu 1.0.9": { + "name": "ryu", + "version": "1.0.9", + "package_url": "https://github.com/dtolnay/ryu", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ryu/1.0.9/download", + "sha256": "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ryu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "ryu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.9" + }, + "license": "Apache-2.0 OR BSL-1.0", + "license_ids": [ + "Apache-2.0", + "BSL-1.0" + ], + "license_file": null + }, + "serde 1.0.136": { + "name": "serde", + "version": "1.0.136", + "package_url": "https://github.com/serde-rs/serde", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde/1.0.136/download", + "sha256": "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" + } + }, + "targets": [ + { + "Library": { + "crate_name": "serde", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "serde", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "serde 1.0.136", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.0.136" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "serde_json 1.0.79": { + "name": "serde_json", + "version": "1.0.79", + "package_url": "https://github.com/serde-rs/json", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde_json/1.0.79/download", + "sha256": "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" + } + }, + "targets": [ + { + "Library": { + "crate_name": "serde_json", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "serde_json", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "itoa 1.0.1", + "target": "itoa" + }, + { + "id": "ryu 1.0.9", + "target": "ryu" + }, + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "serde_json 1.0.79", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.79" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "smallvec 1.6.1": { + "name": "smallvec", + "version": "1.6.1", + "package_url": "https://github.com/servo/rust-smallvec", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/smallvec/1.6.1/download", + "sha256": "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "smallvec", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "smallvec", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "union" + ], + "selects": {} + }, + "edition": "2018", + "version": "1.6.1" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "string-interner 0.12.2": { + "name": "string-interner", + "version": "0.12.2", + "package_url": "https://github.com/robbepop/string-interner", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/string-interner/0.12.2/download", + "sha256": "383196d1876517ee6f9f0864d1fc1070331b803335d3c6daaa04bbcccd823c08" + } + }, + "targets": [ + { + "Library": { + "crate_name": "string_interner", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "string_interner", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "backends", + "inline-more", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "hashbrown 0.9.1", + "target": "hashbrown" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.12.2" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "strsim 0.8.0": { + "name": "strsim", + "version": "0.8.0", + "package_url": "https://github.com/dguo/strsim-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/strsim/0.8.0/download", + "sha256": "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "strsim", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "strsim", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.8.0" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "syn 1.0.76": { + "name": "syn", + "version": "1.0.76", + "package_url": "https://github.com/dtolnay/syn", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/syn/1.0.76/download", + "sha256": "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" + } + }, + "targets": [ + { + "Library": { + "crate_name": "syn", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "syn", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "clone-impls", + "default", + "derive", + "parsing", + "printing", + "proc-macro", + "quote" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.29", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.9", + "target": "quote" + }, + { + "id": "syn 1.0.76", + "target": "build_script_build" + }, + { + "id": "unicode-xid 0.2.2", + "target": "unicode_xid" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.76" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "textwrap 0.11.0": { + "name": "textwrap", + "version": "0.11.0", + "package_url": "https://github.com/mgeisler/textwrap", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/textwrap/0.11.0/download", + "sha256": "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" + } + }, + "targets": [ + { + "Library": { + "crate_name": "textwrap", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "textwrap", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "unicode-width 0.1.8", + "target": "unicode_width" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.11.0" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "thiserror 1.0.29": { + "name": "thiserror", + "version": "1.0.29", + "package_url": "https://github.com/dtolnay/thiserror", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/thiserror/1.0.29/download", + "sha256": "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" + } + }, + "targets": [ + { + "Library": { + "crate_name": "thiserror", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "thiserror", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "thiserror-impl 1.0.29", + "target": "thiserror_impl" + } + ], + "selects": {} + }, + "version": "1.0.29" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "thiserror-impl 1.0.29": { + "name": "thiserror-impl", + "version": "1.0.29", + "package_url": "https://github.com/dtolnay/thiserror", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/thiserror-impl/1.0.29/download", + "sha256": "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "thiserror_impl", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "thiserror_impl", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.29", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.9", + "target": "quote" + }, + { + "id": "syn 1.0.76", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.29" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "tree-sitter 0.20.4": { + "name": "tree-sitter", + "version": "0.20.4", + "package_url": "https://github.com/tree-sitter/tree-sitter", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tree-sitter/0.20.4/download", + "sha256": "4e34327f8eac545e3f037382471b2b19367725a242bba7bc45edb9efb49fe39a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tree_sitter", + "crate_root": "binding_rust/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "binding_rust/build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tree_sitter", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "regex 1.5.5", + "target": "regex" + }, + { + "id": "tree-sitter 0.20.4", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.20.4" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.70", + "target": "cc" + } + ], + "selects": {} + } + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "tree-sitter-graph 0.7.0": { + "name": "tree-sitter-graph", + "version": "0.7.0", + "package_url": "https://github.com/tree-sitter/tree-sitter-graph/", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tree-sitter-graph/0.7.0/download", + "sha256": "639d21e886f581d293de5f5081f09af003c54607ff3fa85efa159b243ba1f97a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tree_sitter_graph", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tree_sitter_graph", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "log 0.4.14", + "target": "log" + }, + { + "id": "regex 1.5.5", + "target": "regex" + }, + { + "id": "serde 1.0.136", + "target": "serde" + }, + { + "id": "serde_json 1.0.79", + "target": "serde_json" + }, + { + "id": "smallvec 1.6.1", + "target": "smallvec" + }, + { + "id": "string-interner 0.12.2", + "target": "string_interner" + }, + { + "id": "thiserror 1.0.29", + "target": "thiserror" + }, + { + "id": "tree-sitter 0.20.4", + "target": "tree_sitter" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.7.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "tree-sitter-python 0.19.0": { + "name": "tree-sitter-python", + "version": "0.19.0", + "package_url": "https://github.com/tree-sitter/tree-sitter-python", + "repository": null, + "targets": [ + { + "Library": { + "crate_name": "tree_sitter_python", + "crate_root": "bindings/rust/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "bindings/rust/build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tree_sitter_python", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "tree-sitter 0.20.4", + "target": "tree_sitter" + }, + { + "id": "tree-sitter-python 0.19.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.19.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.70", + "target": "cc" + } + ], + "selects": {} + } + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "tsg-python 0.1.0": { + "name": "tsg-python", + "version": "0.1.0", + "package_url": null, + "repository": null, + "targets": [], + "library_target_name": null, + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "anyhow 1.0.44", + "target": "anyhow" + }, + { + "id": "clap 2.33.3", + "target": "clap" + }, + { + "id": "regex 1.5.5", + "target": "regex" + }, + { + "id": "smallvec 1.6.1", + "target": "smallvec" + }, + { + "id": "string-interner 0.12.2", + "target": "string_interner" + }, + { + "id": "thiserror 1.0.29", + "target": "thiserror" + }, + { + "id": "tree-sitter 0.20.4", + "target": "tree_sitter" + }, + { + "id": "tree-sitter-graph 0.7.0", + "target": "tree_sitter_graph" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.0" + }, + "license": null, + "license_ids": [], + "license_file": null + }, + "unicode-width 0.1.8": { + "name": "unicode-width", + "version": "0.1.8", + "package_url": "https://github.com/unicode-rs/unicode-width", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-width/0.1.8/download", + "sha256": "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_width", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "unicode_width", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.8" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "unicode-xid 0.2.2": { + "name": "unicode-xid", + "version": "0.2.2", + "package_url": "https://github.com/unicode-rs/unicode-xid", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-xid/0.2.2/download", + "sha256": "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_xid", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "unicode_xid", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "edition": "2015", + "version": "0.2.2" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "vec_map 0.8.2": { + "name": "vec_map", + "version": "0.8.2", + "package_url": "https://github.com/contain-rs/vec-map", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/vec_map/0.8.2/download", + "sha256": "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + } + }, + "targets": [ + { + "Library": { + "crate_name": "vec_map", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "vec_map", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.8.2" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "winapi 0.3.9": { + "name": "winapi", + "version": "0.3.9", + "package_url": "https://github.com/retep998/winapi-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi/0.3.9/download", + "sha256": "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "winapi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "consoleapi", + "errhandlingapi", + "minwinbase", + "minwindef", + "processenv", + "winbase" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "winapi 0.3.9", + "target": "build_script_build" + } + ], + "selects": { + "i686-pc-windows-gnu": [ + { + "id": "winapi-i686-pc-windows-gnu 0.4.0", + "target": "winapi_i686_pc_windows_gnu" + } + ], + "x86_64-pc-windows-gnu": [ + { + "id": "winapi-x86_64-pc-windows-gnu 0.4.0", + "target": "winapi_x86_64_pc_windows_gnu" + } + ] + } + }, + "edition": "2015", + "version": "0.3.9" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "winapi-i686-pc-windows-gnu 0.4.0": { + "name": "winapi-i686-pc-windows-gnu", + "version": "0.4.0", + "package_url": "https://github.com/retep998/winapi-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi-i686-pc-windows-gnu/0.4.0/download", + "sha256": "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi_i686_pc_windows_gnu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "winapi_i686_pc_windows_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "winapi-i686-pc-windows-gnu 0.4.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "winapi-x86_64-pc-windows-gnu 0.4.0": { + "name": "winapi-x86_64-pc-windows-gnu", + "version": "0.4.0", + "package_url": "https://github.com/retep998/winapi-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi-x86_64-pc-windows-gnu/0.4.0/download", + "sha256": "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi_x86_64_pc_windows_gnu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "winapi_x86_64_pc_windows_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "winapi-x86_64-pc-windows-gnu 0.4.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + } + }, + "binary_crates": [], + "workspace_members": { + "tree-sitter-python 0.19.0": "extractor-python/tsg-python/tree-sitter-python", + "tsg-python 0.1.0": "extractor-python/tsg-python" + }, + "conditions": { + "aarch64-apple-darwin": [ + "aarch64-apple-darwin" + ], + "aarch64-apple-ios": [ + "aarch64-apple-ios" + ], + "aarch64-apple-ios-sim": [ + "aarch64-apple-ios-sim" + ], + "aarch64-fuchsia": [ + "aarch64-fuchsia" + ], + "aarch64-linux-android": [ + "aarch64-linux-android" + ], + "aarch64-pc-windows-msvc": [ + "aarch64-pc-windows-msvc" + ], + "aarch64-unknown-linux-gnu": [ + "aarch64-unknown-linux-gnu" + ], + "aarch64-unknown-nixos-gnu": [ + "aarch64-unknown-nixos-gnu" + ], + "aarch64-unknown-nto-qnx710": [ + "aarch64-unknown-nto-qnx710" + ], + "arm-unknown-linux-gnueabi": [ + "arm-unknown-linux-gnueabi" + ], + "armv7-linux-androideabi": [ + "armv7-linux-androideabi" + ], + "armv7-unknown-linux-gnueabi": [ + "armv7-unknown-linux-gnueabi" + ], + "cfg(not(windows))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "aarch64-fuchsia", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-nixos-gnu", + "aarch64-unknown-nto-qnx710", + "arm-unknown-linux-gnueabi", + "armv7-linux-androideabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "riscv32imc-unknown-none-elf", + "riscv64gc-unknown-none-elf", + "s390x-unknown-linux-gnu", + "thumbv7em-none-eabi", + "thumbv8m.main-none-eabi", + "wasm32-unknown-unknown", + "wasm32-wasi", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-nixos-gnu", + "x86_64-unknown-none" + ], + "cfg(target_os = \"hermit\")": [], + "cfg(target_os = \"windows\")": [ + "aarch64-pc-windows-msvc", + "i686-pc-windows-msvc", + "x86_64-pc-windows-msvc" + ], + "cfg(unix)": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "aarch64-fuchsia", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-nixos-gnu", + "aarch64-unknown-nto-qnx710", + "arm-unknown-linux-gnueabi", + "armv7-linux-androideabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "s390x-unknown-linux-gnu", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-nixos-gnu" + ], + "cfg(windows)": [ + "aarch64-pc-windows-msvc", + "i686-pc-windows-msvc", + "x86_64-pc-windows-msvc" + ], + "i686-apple-darwin": [ + "i686-apple-darwin" + ], + "i686-linux-android": [ + "i686-linux-android" + ], + "i686-pc-windows-gnu": [], + "i686-pc-windows-msvc": [ + "i686-pc-windows-msvc" + ], + "i686-unknown-freebsd": [ + "i686-unknown-freebsd" + ], + "i686-unknown-linux-gnu": [ + "i686-unknown-linux-gnu" + ], + "powerpc-unknown-linux-gnu": [ + "powerpc-unknown-linux-gnu" + ], + "riscv32imc-unknown-none-elf": [ + "riscv32imc-unknown-none-elf" + ], + "riscv64gc-unknown-none-elf": [ + "riscv64gc-unknown-none-elf" + ], + "s390x-unknown-linux-gnu": [ + "s390x-unknown-linux-gnu" + ], + "thumbv7em-none-eabi": [ + "thumbv7em-none-eabi" + ], + "thumbv8m.main-none-eabi": [ + "thumbv8m.main-none-eabi" + ], + "wasm32-unknown-unknown": [ + "wasm32-unknown-unknown" + ], + "wasm32-wasi": [ + "wasm32-wasi" + ], + "x86_64-apple-darwin": [ + "x86_64-apple-darwin" + ], + "x86_64-apple-ios": [ + "x86_64-apple-ios" + ], + "x86_64-fuchsia": [ + "x86_64-fuchsia" + ], + "x86_64-linux-android": [ + "x86_64-linux-android" + ], + "x86_64-pc-windows-gnu": [], + "x86_64-pc-windows-msvc": [ + "x86_64-pc-windows-msvc" + ], + "x86_64-unknown-freebsd": [ + "x86_64-unknown-freebsd" + ], + "x86_64-unknown-linux-gnu": [ + "x86_64-unknown-linux-gnu" + ], + "x86_64-unknown-nixos-gnu": [ + "x86_64-unknown-nixos-gnu" + ], + "x86_64-unknown-none": [ + "x86_64-unknown-none" + ] + }, + "direct_deps": [ + "anyhow 1.0.44", + "cc 1.0.70", + "clap 2.33.3", + "regex 1.5.5", + "smallvec 1.6.1", + "string-interner 0.12.2", + "thiserror 1.0.29", + "tree-sitter 0.20.4", + "tree-sitter-graph 0.7.0" + ], + "direct_dev_deps": [] +} diff --git a/python/extractor/tsg-python/Cargo.lock b/python/extractor/tsg-python/Cargo.lock new file mode 100644 index 00000000000..9ee8840bde1 --- /dev/null +++ b/python/extractor/tsg-python/Cargo.lock @@ -0,0 +1,331 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "cc" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "2.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", +] + +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "itoa" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" + +[[package]] +name = "libc" +version = "0.2.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + +[[package]] +name = "proc-macro2" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "ryu" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" + +[[package]] +name = "serde" +version = "1.0.136" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" + +[[package]] +name = "serde_json" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "string-interner" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "383196d1876517ee6f9f0864d1fc1070331b803335d3c6daaa04bbcccd823c08" +dependencies = [ + "cfg-if", + "hashbrown", +] + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "syn" +version = "1.0.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tree-sitter" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e34327f8eac545e3f037382471b2b19367725a242bba7bc45edb9efb49fe39a" +dependencies = [ + "cc", + "regex", +] + +[[package]] +name = "tree-sitter-graph" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "639d21e886f581d293de5f5081f09af003c54607ff3fa85efa159b243ba1f97a" +dependencies = [ + "log", + "regex", + "serde", + "serde_json", + "smallvec", + "string-interner", + "thiserror", + "tree-sitter", +] + +[[package]] +name = "tree-sitter-python" +version = "0.19.0" +dependencies = [ + "cc", + "tree-sitter", +] + +[[package]] +name = "tsg-python" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap", + "regex", + "smallvec", + "string-interner", + "thiserror", + "tree-sitter", + "tree-sitter-graph", + "tree-sitter-python", +] + +[[package]] +name = "unicode-width" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/python/extractor/tsg-python/Cargo.toml b/python/extractor/tsg-python/Cargo.toml new file mode 100644 index 00000000000..b88adbc42d9 --- /dev/null +++ b/python/extractor/tsg-python/Cargo.toml @@ -0,0 +1,26 @@ +[workspace] + +[package] +name = "tsg-python" +version = "0.1.0" +authors = ["Taus Brock-Nannestad "] +edition = "2018" + +# When changing/updating these, the `Cargo.Bazel.lock` file has to be regenerated. +# Check out the documentation at https://bazelbuild.github.io/rules_rust/crate_universe.html#repinning--updating-dependencies +# for how to do so. The bazel repository for the tsg-python project is called `tsg_python_crate_index`, +# and instead of calling `bazel sync`, `./build --bazel sync` should be used instead, to always use the correct bazel version. +[dependencies] +anyhow = "1.0" +regex = "1" +smallvec = { version="1.6", features=["union"] } +thiserror = "1.0" +tree-sitter = "0.20.4" +tree-sitter-graph = "0.7.0" +tree-sitter-python = {path = "tree-sitter-python"} +clap = "2.32" + +[dependencies.string-interner] +version = "0.12" +default-features = false +features = ["std", "inline-more", "backends"] diff --git a/python/extractor/tsg-python/LICENSE-APACHE b/python/extractor/tsg-python/LICENSE-APACHE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/python/extractor/tsg-python/LICENSE-APACHE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/python/extractor/tsg-python/LICENSE-MIT b/python/extractor/tsg-python/LICENSE-MIT new file mode 100644 index 00000000000..1a8706acb11 --- /dev/null +++ b/python/extractor/tsg-python/LICENSE-MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 stack-graphs authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/python/extractor/tsg-python/README.md b/python/extractor/tsg-python/README.md new file mode 100644 index 00000000000..ee3c25d8643 --- /dev/null +++ b/python/extractor/tsg-python/README.md @@ -0,0 +1,624 @@ +# `tsg-python` + +Run `tree-sitter-graph` queries against Python source files. + +## How to build + +Run `cargo build --release`. The resulting binary can be found in the `target/release` directory. + +## How to invoke + +`tsg-python tsg-file.tsg python-file.py` + +Output is emitted on `stdout`. + +If you're impatient, you can also build and run using `cargo run` followed by the arguments given +above. + +## How to use + +To use `tsg-python`, you must have an appropriate `.tsg` file containing the directions for how to +construct a Python AST from the output of `tree-sitter-python`. + +### A quick primer on `tree-sitter-graph` syntax + +A file consists of a sequence of stanzas. Each stanza consists of a query (using the [tree-sitter +query syntax](https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries)) and a sequence of nodes and edges to define for each query match in the source file. +Queries will (almost always) include captures like `@foo`, which means any occurrence of `@foo` in +the corresponding stanza will refer to a particular syntax node in the bit that the query matches. + +Stanzas are executed in order, and a stanza is only run when all possible matches have been +exhausted for all preceding stanzas. (Since the syntax tree that is matched against never changes, +execution never jumps back to an earlier stanza.) + +Inside stanzas, scoped variables have the form `@foo.bar` where `@foo` is a capture in the +associated query, and `bar` is an identifier. This should be thought of as a variable that is +"attached" to the `tree-sitter` node that `@foo` refers to. If `@baz` is another reference to the same node as +`@foo` (perhaps even in a different stanza), then `@baz.bar` will be a reference to the _same_ +scoped variable. This permits information to be linked across different stanzas. + +Assigning a value to a scoped variable is done using the syntax `let @foo.bar = some-expr` (`let` +for immutable variables, `var` for mutable variables, which may be mutated using `set`). Note that +scoped variables only exist during the execution of the stack graph, and are not immediately part of +the output graph. + +To actually produce output, we must specify some `node`s or `edge`s and possibly `attr`ibutes +thereof. + +To produce a node, we declare `node @foo.bar` (which is equivalent to `let @foo.bar = (node)`, the +right hand side being a function that creates a new node). In the output, nodes are simply integers. + +To assign an attribute to a node, we write `attr (@foo.bar) identifier = expr`, for some suitable +choice of `identifier` and `expr`. In the output, attributes are given alongside nodes in a `key: +value` notation. + +For edges and their attributes, the syntax is similar: + +`edge @foo.bar -> @baz.quux` + +and + +`attr (@foo.bar -> @baz.quux) identifier = expr`. + +Note that it is an error to declare the same node, edge, (or attribute of either of these) twice. + +### The general scheme: + + +For fields that point to some literal value +```tsg + +{ + attr (@nd.node) field_name = some_value +} +``` + +For fields that point directly to an AST node: + +```tsg + +{ + attr (@parent.node) field_name = @child.node +} +``` + +For fields that point to lists of AST nodes: + +```tsg + +{ + edge @parent.node -> @child.node + attr (@parent.node -> @child.node) field_name = +} +``` + +Scoped variables of the form `@foo.node` are used to tie the AST together, and so it's important +that this is set for nodes that map directly onto `tree-sitter-python` nodes. Thus, for instance +for binary operators, the stanza could look as follows: + +```tsg +(binary_operator + left: (_) @left + right: (_) @right +) @bin +{ + attr (@bin.node) left = @left.node + attr (@bin.node) right = @right.node +} +``` + +Note in particular the `@left.node` and `@right.node` references. In order for the above stanza to +work, these scoped variables _must_ exist and point to suitable graph `node`s. + +In practice, the setting up of all of these scoped variables (and creation of output graph nodes) +will happen at the very top of the `.tsg` file, to ensure that these scoped variables are defined +for the remainder of the file. + +To ease the creation of these variables, we have the `ast-node` convenience function. For binary +operators, it would take the following form: + +```tsg +(binary_operator) @bin +{ + let @bin.node = (ast-node @bin "BinOp") +} +``` +Here, the two arguments are respectively +- a `tree-sitter` node (which is used to set the location of `@bin.node`), and +- a string (which is used to set the "kind" of `@bin.node`) + +In effect, the call + +```tsg + let @bin.node = (ast-node @bin "BinOp") +``` + +is exactly equivalent to the more verbose + +```tsg + node @bin.node ; or equivalently `let @bin.node = (node)` + attr (@bin.node) _location = (location @bin) + attr (@bin.node) _kind = "BinOp" +``` + +As the above suggests, attributes that start with an underscore are interpreted in a special way +when reconstructing the AST. + +### Special attributes + +#### The `_kind` attribute (mandatory) +Should be set to a string consisting of the name of the corresponding Python AST class. This +information will be used to build the AST, and so it is an error if this is left out. + +Generally, this (and `_location`) will be set using the `ast-node` function. + +#### The `_skip_to` attribute (optional) +This is used to indicate that the present graph node should _not_ be turned into an AST node, but that the +graph node contained in this attribute should be used instead. That graph node may _also_ contain a +`_skip_to` field, in which case the entire chain is followed until a node is encountered that does +not have a `_skip_to` field. (Please ensure that there are no cycles of `_skip_to` pointers.) + +Example: + +In `tree-sitter-python`, assignment statements are a form of `expression_statement`, and this node +type also encompasses things like expressions (e.g. `2+2`) appearing at the level of statements. In +the internal Python AST, we need to separate the assignment from such expressions. The assignment should be present as an `Assign` node, but `2+2` should be +wrapped in an `Expr` node. To solve this, we create an `Expr` for each `expression_statement`, and +then explicitly skip this node in the AST if it contains an `assignment`. This is implemented as +follows: +```tsg +(expression_statement (assignment) @inner) @outer +{ + attr (@outer.node) _skip_to = @inner.node +} +``` + +#### The `_location` attribute (optional) +This attribute is used to indicate the location of the corresponding AST node. As with `_kind` it +should be set using the `ast-node` function. + +#### The `_location_start` and `_location_end` attributes (optional) +These attributes are used to indicate the start or end of the location of the AST node. They can be +used for nodes where `_location` has already been set, in which case they override the relevant part +of that location. For an example of this see the worked example on `if` statements below. +#### The `_start_line`, `_start_column`, `_end_line`, and `_end_column` attributes (optional) +These can be used to set the start or end position of an AST node with even greater detail than the +preceding attributes. As with the `_location_start` and `_location_end` attributes, these will +override the values of the corresponding part of the location. + +In general, these attributes should be used sparingly, as they are quite verbose. + +### Built-in functions +#### `(source-text` _`tree-sitter-node`_`)` (built-in) +This function returns the source text of the `tree-sitter` node it receives as an argument. + +Example: + +Extracting the operator from a binary expression: +```tsg +(binary_operator + operator: _ @op +) @bin +{ + attr (@bin.node) op = (source-text @op) +} +``` + +#### `(ast-node` _`tree-sitter-node`_ _`string`_`)` (`tsg-python` only) +Creates a new graph node with the given `_kind` and sets the `_location` attribute to the location +of the given `tree-sitter` node. +#### `(child-index` _`tree-sitter-node`_`)` (built-in) +Returns the index of the given `tree-sitter` node in its parent. +#### `(location` _`tree-sitter-node`_`)` (`tsg-python` only) +Returns the location of the given `tree-sitter` node as a list containing four integers +corresponding to the start row and column, followed by the end row and column. +#### `(location-start` _`tree-sitter-node`_`)` and `(location-end` _`tree-sitter-node`_`)` (`tsg-python` only) +Returns the start or end position (row followed by column) of the given `tree-sitter` node (as a list containing two integers). +#### `start-row`, `start-column`, `end-row`, and `end-column` (built-in) +(All of these take a `tree-sitter-node` as an argument.) + +Returns an integer corresponding to the appropriate part of the location of the given `tree-sitter` node. + +### A worked example: `if` statements + +The way the current parser handles `if` statements means we cannot do a straight mapping from the tree-sitter grammar to the AST. In particular, a block of code such as + +```python +if x: do_x +elif y: do_y +elif z: do_z +else: do_else +``` + +is unrolled into the following form by the current parser: + +```python +if x: do_x +else: + if y: do_y + else: + if z: do_z + else: do_else +``` + +This means we have to synthesise nodes for the inner `if` statements. + +However, this should be straightforward -- we simply have to make sure that `elif_clause`s also +produce the appropriate kind of node, and that everything is linked up correctly. + +For references, here are the productions for `if_statement`, `else_clause` and `elif_clause` in +`tree-sitter-python` + +```javascript + if_statement: $ => seq( + 'if', + field('condition', $.expression), + ':', + field('consequence', $._suite), + repeat(field('alternative', $.elif_clause)), + optional(field('alternative', $.else_clause)) + ), + + elif_clause: $ => seq( + 'elif', + field('condition', $.expression), + ':', + field('consequence', $._suite) + ), + + else_clause: $ => seq( + 'else', + ':', + field('body', $._suite) + ), +``` + +First, we'll set up all of the relevant nodes with corresponding nodes in the AST: + +```tsg + +(if_statement) +@tree_sitter_node +{ + let @tree_sitter_node.node = (ast-node @tree_sitter_node "If") +} +``` + +This ensures that we can reference the `.node` scoped variable on the above nodes. + +(We named the capture `@tree_sitter_node` above to make it more clear, but in general something like +`@if` would be more appropriate.) + +In particular, since we want `elif`s to be turned into nested `if`s, it makes sense to apply the +`If` kind to `elif_clauses` as well: + +```tsg +(elif_clause) @elif +{ + let @elif.node = (ast-node @elif "If") +} +``` +Whenever we refer to a node, we must ensure that it has first been defined, however there is no +need to do this separately for each node. + +Next, for both `if`s and `elif`s, we want to record the `test` and the `body`. The `test` we do as follows: + +```tsg +[ + (if_statement + condition: (_) @test) @if + (elif_clause + condition: (_) @test) @if +] +{ + attr (@if.node) test = @test.node +} +``` +For `body`, in the Python AST this is simply a list of nodes, whereas for the `tree-sitter` parse tree, it +will contain a `block` node. Because there is no Python AST equivalent for `block`, we skip over +this node when linking the `if`-statement to its body: +```tsg +[ + (if_statement + consequence: (block (_) @stmt)) @parent + (elif_clause + consequence: (block (_) @stmt)) @parent +] +{ + edge @parent.node -> @stmt.node + attr (@parent.node -> @stmt.node) body = (child-index @stmt) +} +``` +The above shows how we handle fields containing lists of items: we add an edge from the parent node +to each child node, and put an attribute on that edge. The name of the attribute will be the name of +the field, and the value will be the index of this node among the children of its `tree-sitter` parent. + +Now we can begin unwinding the nesting. First of all, the first `elif` should be the `orelse` of the +initial `if_statement`: + +```tsg +(if_statement + consequence: (_) + . + (elif_clause) @elif +) @if +{ + edge @if.node -> @elif.node + attr (@if.node -> @elif.node) orelse = 0 +} +``` +(The `.` acts as an anchor, forcing its two neighbours to be adjancent in the tree. So in this case, +we get the first `elif` after the body of the `if`) + +Next, whenever we have two adjacent `elif`s, we want the `orelse` of the first one to be the second one: + +```tsg +( + (elif_clause) @elif1 + . + (elif_clause) @elif2 +) +{ + edge @elif1.node -> @elif2.node + attr (@elif1.node -> @elif2.node) orelse = 0 +} +``` + +Finally, the `else` branch of the outermost `if` should be the `orelse` of the _last_ `elif`: + +```tsg +(if_statement + (elif_clause) @elif + . + alternative: (else_clause body: (block (_) @orelse)) +) +{ + edge @elif.node -> @orelse.node + attr (@elif.node -> @orelse.node) orelse = (child-index @orelse) +} +``` + +The above gives us the correct tree structure, but we're still missing a few bits (such as +locations). To capture location information we use the following stanza: +```tsg +[ + (if_statement + condition: (_) + ":" @colon) @if + (elif_clause + condition: (_) + ":" @colon) @if +] +{ + attr (@if.node) _location_end = (location-end @colon) +} +``` +Because `tree-sitter-python` disagrees with the Python AST about the location of the `If` node, we +have to adjust it. We do this by setting the `_location_end` attribute to the end of the `:` token. +(Note that the _start_ of this location was set when we called `ast-node` above. As we don't have to +change this part of the location, we simply leave it as is.) + + + +### Synthesizing nodes +In many cases it will be sufficient to hook up AST nodes to the corresponding `tree-sitter` nodes, +but occasionally we want the tree structure to be different. One example of this would be the +`class` statement. For instance, a class declaration such as + +```python +class Foo(int, object, metaclass=type): + x = 5 +``` + +has a `tree-sitter-python` parse tree that looks like this: + +``` +module [0, 0] - [2, 0] + class_definition [0, 0] - [1, 9] + name: identifier [0, 6] - [0, 9] + superclasses: argument_list [0, 9] - [0, 38] + identifier [0, 10] - [0, 13] + identifier [0, 15] - [0, 21] + keyword_argument [0, 23] - [0, 37] + name: identifier [0, 23] - [0, 32] + value: identifier [0, 33] - [0, 37] + body: block [1, 4] - [1, 9] + expression_statement [1, 4] - [1, 9] + assignment [1, 4] - [1, 9] + left: identifier [1, 4] - [1, 5] + right: integer [1, 8] - [1, 9] +``` + +but the Python AST looks like _this_: + +``` +Module: [1, 0] - [3, 0] + body: [ + Assign: [1, 0] - [1, 39] + targets: [ + Name: [1, 6] - [1, 9] + variable: Variable('Foo', None) + ctx: Store + ] + value: + ClassExpr: [1, 0] - [1, 39] + name: 'Foo' + bases: [ + Name: [1, 10] - [1, 13] + variable: Variable('int', None) + ctx: Load + Name: [1, 15] - [1, 21] + variable: Variable('object', None) + ctx: Load + ] + keywords: [ + keyword: [1, 23] - [1, 37] + arg: 'metaclass' + value: + Name: [1, 33] - [1, 37] + variable: Variable('type', None) + ctx: Load + ] + inner_scope: + Class: [1, 0] - [1, 39] + name: 'Foo' + body: [ + Assign: [2, 4] - [2, 9] + targets: [ + Name: [2, 4] - [2, 5] + variable: Variable('x', None) + ctx: Store + ] + value: + Num: [2, 8] - [2, 9] + n: 5 + text: '5' + ] + ] +``` + +In particular, we unroll the `class` statement into an explicit assignment (which is the top node +for this statement in the AST) of a synthetic `ClassExpr`, which in turn contains a `Class` node +(which holds things like the body of the class). This requires too many nodes to simply reuse what's given to +us by `tree-sitter-python`, and so we must _synthesize_ additional nodes. + +First of all, let us set up the outer node to be an `Assign` node: +```tsg +(class_definition) @class +{ + let @class.node = (ast-node @class "Assign") +} +``` + +Next, we can do most of the work in a single stanza: + +```tsg +(class_definition + name: (identifier) @name + ":" @colon +) @class +{ + + ; To make it clearer that the outer node is an assignment, we create an alias for it. + let @class.assign = @class.node + + ; Synthesized nodes: the left-hand side of the assignment, the class_expr node, and the class + ; node. + + let @class.assign_lhs = (ast-node @name "Name") + let @class.class_expr = (ast-node @class "ClassExpr") + let @class.inner_scope = (ast-node @class "Class") + + edge @class.assign -> @class.assign_lhs + attr (@class.assign -> @class.assign_lhs) targets = 0 + attr (@class.assign) value = @class.class_expr + attr (@class.assign) _location_end = (location-end @colon) + + let class_name = (source-text @name) + + ; The left-hand side of the assignment, a `Name`. + attr (@class.assign_lhs) variable = class_name + attr (@class.assign_lhs) ctx = "store" + + ; The right hand side of the assignment, a `ClassExpr`. + attr (@class.class_expr) name = class_name + attr (@class.class_expr) inner_scope = @class.inner_scope + ; `bases` will be set elsewhere + ; `keywords` will be set elsewhere + attr (@class.class_expr) _location_end = (location-end @colon) + + ; The inner scope of the class_expr, a `Class`. + attr (@class.inner_scope) name = class_name + ; body will be set in a separate stanza. + attr (@class.inner_scope) _location_end = (location-end @colon) + +} +``` + +Let's go over these lines bit by bit. First, we create an alias for the outermost node (which will +become an assignment node) in order to make it clearer that it's an assignment. Next, we create +_new_ nodes for the inner synthesized nodes. Note that we can't assign these to `@class.node` as +that already points to the node that will become the assignment node. Instead, we create new scoped +variables (with suitable names), and assign them nodes (with appropriate kinds and locations using +`ast-node`). +```tsg + ; To make it clearer that the outer node is an assignment, we create an alias for it. + let @class.assign = @class.node + + ; Synthesized nodes: the left-hand side of the assignment, the class_expr node, and the class + ; node. + + let @class.assign_lhs = (ast-node @name "Name") + let @class.class_expr = (ast-node @class "ClassExpr") + let @class.inner_scope = (ast-node @class "Class") +``` + +Next, we set up the outer assignment: +```tsg + edge @class.assign -> @class.assign_lhs + attr (@class.assign -> @class.assign_lhs) targets = 0 + attr (@class.assign) value = @class.class_expr + attr (@class.assign) _location_end = (location-end @colon) +``` + +The remaining nodes all contain a field that refers to the name of the class, so put this in a local +variable for convenience: +```tsg + let class_name = (source-text @name) +``` +We set up the left hand side of the assignment: +```tsg + ; The left-hand side of the assignment, a `Name`. + attr (@class.assign_lhs) variable = class_name + attr (@class.assign_lhs) ctx = "store" +``` +The `ClassExpr`: +```tsg + ; The right hand side of the assignment, a `ClassExpr`. + attr (@class.class_expr) name = class_name + attr (@class.class_expr) inner_scope = @class.inner_scope + ; `bases` will be set elsewhere + ; `keywords` will be set elsewhere + attr (@class.class_expr) _location_end = (location-end @colon) +``` + +The `Class`: +```tsg + ; The inner scope of the class_expr, a `Class`. + attr (@class.inner_scope) name = class_name + ; body will be set elsewhere + attr (@class.inner_scope) _location_end = (location-end @colon) + +``` + +The remaining stanzas take care of setting up the fields that contain lists of nodes, and these +follow the same scheme as before. +```tsg +; Class.body +(class_definition + body: (block (_) @stmt) +) @class +{ + edge @class.inner_scope -> @stmt.node + attr (@class.inner_scope -> @stmt.node) body = (child-index @stmt) +} + +; Class.bases +(class_definition + superclasses: (argument_list (identifier) @arg) +) @class +{ + edge @class.class_expr -> @arg.node + attr (@class.class_expr -> @arg.node) bases = (child-index @arg) + attr (@arg.node) ctx = "load" +} + +; Class.keywords +(class_definition + superclasses: (argument_list (keyword_argument) @arg) +) @class +{ + edge @class.class_expr -> @arg.node + attr (@class.class_expr -> @arg.node) keywords = (child-index @arg) +} +``` diff --git a/python/extractor/tsg-python/python.tsg b/python/extractor/tsg-python/python.tsg new file mode 100644 index 00000000000..e185bbbae79 --- /dev/null +++ b/python/extractor/tsg-python/python.tsg @@ -0,0 +1,3472 @@ +;;;;;; Part 1: Definining ~all~ most of the nodes +; This section contains all of the "simple" definitions. All of the places where a single +; tree-sitter node corresponds to an AST node. + +; Create the module node first, so it always appears first in the output. +(module) @mod +{ let @mod.node = (ast-node @mod "Module") } + +(_) @anynode +{ + scan (node-type @anynode) { + "^(ERROR|MISSING)$" { + let @anynode.node = (ast-node @anynode "SyntaxErrorNode") + attr (@anynode.node) source = (source-text @anynode) + } + } +} + +(parenthesized_expression) @nd +{ let @nd.node = (ast-node @nd "Expr") } + +(assignment !type) @assign +{ let @assign.node = (ast-node @assign "Assign") } + +[ (expression_list) (tuple) (tuple_pattern) (pattern_list) ] @tuple +{ let @tuple.node = (ast-node @tuple "Tuple") } + +(call) @call { let @call.node = (ast-node @call "Call") } + +(for_statement) @for +{ let @for.node = (ast-node @for "For") } + +[ (if_statement) (elif_clause) ] @if +{ let @if.node = (ast-node @if "If") } + +(continue_statement) @continue +{ let @continue.node = (ast-node @continue "Continue") } + +(break_statement) @break +{ let @break.node = (ast-node @break "Break") } + +(pass_statement) @pass +{ let @pass.node = (ast-node @pass "Pass") } + +(assert_statement) @assert +{ let @assert.node = (ast-node @assert "Assert") } + +(assignment type: (_)) @assign +{ let @assign.node = (ast-node @assign "AnnAssign") } + +(augmented_assignment) @assign +{ let @assign.node = (ast-node @assign "AugAssign") } + +(delete_statement) @del +{ let @del.node = (ast-node @del "Delete") } + +(global_statement) @global +{ let @global.node = (ast-node @global "Global") } + +(nonlocal_statement) @nonlocal +{ let @nonlocal.node = (ast-node @nonlocal "Nonlocal") } + +[(import_statement) (import_from_statement name: (_))] @import +{ let @import.node = (ast-node @import "Import") } + +(import_from_statement (wildcard_import)) @importstar +{ let @importstar.node = (ast-node @importstar "ImportFrom") } + +(raise_statement) @raise +{ let @raise.node = (ast-node @raise "Raise") } + +(binary_operator) @binop +{ let @binop.node = (ast-node @binop "BinOp") } + +(keyword_argument) @kwarg +{ let @kwarg.node = (ast-node @kwarg "keyword") } + +[(function_definition) (class_definition) (decorated_definition)] @def +{ let @def.node = (ast-node @def "Assign") } + +(decorator) @decorator +{ let @decorator.node = (ast-node @decorator "Call") } + +(expression_statement) @stmt +{ let @stmt.node = (ast-node @stmt "Expr") } + +[ (integer) (float) ] @num +{ let @num.node = (ast-node @num "Num") } + +(identifier) @name +{ let @name.node = (ast-node @name "Name") } + +(list) @list +{ let @list.node = (ast-node @list "List") } + +[(list_splat) (list_splat_pattern)] @starred +{ let @starred.node = (ast-node @starred "Starred") } + +(comment) @comment +{ let @comment.node = (ast-node @comment "Comment") } + +[ + (future_import_statement name: (_) @alias) + (import_from_statement name: (_) @alias) + (import_statement name: (_) @alias) +] +{ let @alias.node = (ast-node @alias "alias") } + +; A string _without_ interpolations is just a `Str`, _except_ if it's inside a string +; concatenation, in which case it's a `StringPart`. +(string !interpolation) @str +{ + var str_class = "Str" + if (instance-of (get-parent @str) "concatenated_string") { + set str_class = "StringPart" + } + let @str.node = (ast-node @str str_class) +} + +(string interpolation: (_)) @fstring +{ let @fstring.node = (ast-node @fstring "JoinedStr") } + + +(string string_content: (_) @part) +{ let @part.node = (ast-node @part "StringPart") } + +; A string concatenation that contains no interpolated expressions is just a `Str` (and its children +; will be `StringPart`s). A string concatenation that contains interpolated expressions is a +; `JoinedStr`, however. +(concatenated_string + (string interpolation: (_))* @interpolations +) @string +{ + var string_class = "Str" + ; Check if there are any interpolations in the string. + ; We cannot use an optional match in the above query, since it could match several times, + ; and subsequent definitions of `@string.node` would then fail. + for _ in @interpolations { + set string_class = "JoinedStr" + } + let @string.node = (ast-node @string string_class) +} + + +(string interpolation: (_)) @fstring +{ + if (not (instance-of (get-parent @fstring) "concatenated_string")) { + attr (@fstring.node) _fixup = #true + } +} + +(pair) @kvpair +{ let @kvpair.node = (ast-node @kvpair "KeyValuePair") } + +(dictionary) @dict +{ let @dict.node = (ast-node @dict "Dict") } + +(dictionary_splat) @dictunpacking +{ let @dictunpacking.node = (ast-node @dictunpacking "DictUnpacking") } + +(set) @set +{ let @set.node = (ast-node @set "Set") } + +(boolean_operator) @boolop +{ let @boolop.node = (ast-node @boolop "BoolOp") } + +(comparison_operator) @compop +{ let @compop.node = (ast-node @compop "Compare") } + +[ (unary_operator) (not_operator) ] @unaryop +{ let @unaryop.node = (ast-node @unaryop "UnaryOp") } + +(exec_statement) @exec +{ let @exec.node = (ast-node @exec "Exec") } + +(print_statement) @print +{ let @print.node = (ast-node @print "Print") } + +(return_statement) @return +{ let @return.node = (ast-node @return "Return") } + +(yield . "from"? @from) @yield +{ + var yield_node = "Yield" + if some @from { + set yield_node = "YieldFrom" + } + let @yield.node = (ast-node @yield yield_node) +} + +(ellipsis) @ellipsis +{ let @ellipsis.node = (ast-node @ellipsis "Ellipsis") } + +(await) @await +{ let @await.node = (ast-node @await "Await") } + +(try_statement) @try +{ let @try.node = (ast-node @try "Try") } + +(except_clause) @except +{ let @except.node = (ast-node @except "ExceptStmt") } + +(except_group_clause) @except +{ let @except.node = (ast-node @except "ExceptGroupStmt") } + +(named_expression) @assignexpr +{ let @assignexpr.node = (ast-node @assignexpr "AssignExpr") } + +(conditional_expression) @ifexp +{ let @ifexp.node = (ast-node @ifexp "IfExp") } + +(subscript) @subscript +{ let @subscript.node = (ast-node @subscript "Subscript") } + +(slice) @slice +{ let @slice.node = (ast-node @slice "Slice") } + +(attribute) @attribute +{ let @attribute.node = (ast-node @attribute "Attribute") } + +(while_statement) @while +{ let @while.node = (ast-node @while "While") } + +(generator_expression) @generatorexp +{ let @generatorexp.node = (ast-node @generatorexp "GeneratorExp") } + +(for_in_clause) @for +{ let @for.node = (ast-node @for "For") } + +(if_clause) @if +{ let @if.node = (ast-node @if "If") } + +(list_comprehension) @listcomp +{ let @listcomp.node = (ast-node @listcomp "ListComp") } + +(set_comprehension) @setcomp +{ let @setcomp.node = (ast-node @setcomp "SetComp") } + +(dictionary_comprehension) @dictcomp +{ let @dictcomp.node = (ast-node @dictcomp "DictComp") } + +[ (with_statement) (with_item)] @with +{ let @with.node = (ast-node @with "With") } + +(match_statement) @match +{ let @match.node = (ast-node @match "Match") } + +; Do not create an AST node for 'cases', we just wire up the children instead. + +(case_block) @case +{ let @case.node = (ast-node @case "Case") } + +(match_as_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchAsPattern") } + +(match_or_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchOrPattern") } + +(match_literal_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchLiteralPattern") } + +(match_capture_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchCapturePattern") } + +(match_wildcard_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchWildcardPattern") } + +(match_value_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchValuePattern") } + +(match_group_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchGroupPattern") } + +(match_sequence_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchSequencePattern") } + +(match_star_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchStarPattern") } + +(match_mapping_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchMappingPattern") } + +(match_double_star_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchDoubleStarPattern") } + +(match_key_value_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchKeyValuePattern") } + +(match_class_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchClassPattern") } + +; Do not create AST nodes for 'only_positionals', 'only_keywords', +; 'partly_positionals', and 'partly_keywords'. We just wire up the children instead. + +(match_keyword_pattern) @pattern +{ let @pattern.node = (ast-node @pattern "MatchKeywordPattern") } + +(guard) @guard +{ let @guard.node = (ast-node @guard "Guard") } + +[(parameters) (lambda_parameters)] @params +{ let @params.node = (ast-node @params "arguments") } + +[(false) (true) (none)] @const +{ let @const.node = (ast-node @const "Name") } + +(lambda) @lambda +{ let @lambda.node = (ast-node @lambda "Lambda") } + +(future_import_statement) @import +{ let @import.node = (ast-node @import "Import") } + +(typevar_parameter) @typevar +{ let @typevar.node = (ast-node @typevar "TypeVar") } + +(typevartuple_parameter) @typevartuple +{ let @typevartuple.node = (ast-node @typevartuple "TypeVarTuple") } + +(paramspec_parameter) @paramspec +{ let @paramspec.node = (ast-node @paramspec "ParamSpec") } + +(type_alias_statement) @typealias +{ let @typealias.node = (ast-node @typealias "TypeAlias") } + +;;;;;; End of part 1. + +;;;;;; Part 2: The awkward bunch. + +;;;;;; Workarounds for node locations +; These are (hopefully temporary) workarounds for the nodes for which the default start and end does +; not agree with what our internal AST provides. +; Once the new parser is in place, we can consider getting rid of these workarounds. + + +;;; If +; End position is set to the end of the `:` after the condition. +[ + (if_statement + condition: (_) + . + ":" @colon) @if + (elif_clause + condition: (_) + . + ":" @colon) @if +] +{ + attr (@if.node) _location_end = (location-end @colon) +} + +;;; For +; Same as with `if`, we must include the `:` in the position. +(for_statement + right: (_) + . + ":" @colon +) @for +{ + attr (@for.node) _location_end = (location-end @colon) +} + +;;; While +; Same as with `if`, we must include the `:` in the position. +(while_statement + condition: (_) + . + ":" @colon +) @while +{ + attr (@while.node) _location_end = (location-end @colon) +} + +;;; Tuples +; In the Python AST tuple start and end positions are set to the start and end of the first and last +; elements. In `tree-sitter-python`, the parentheses are included. +[ + (tuple . (comment)* . element: (_) @first) + (tuple_pattern . (comment)* . element: (_) @first) +] @tuple +{ + attr (@tuple.node) _location_start = (location-start @first) +} + +[ + (tuple !trailing_comma element: (_) @last . (comment)* . ")" .) + (tuple trailing_comma: _ @last) + (tuple_pattern element: (_) @last .) +] @tuple +{ + + attr (@tuple.node) _location_end = (location-end @last) +} + +;;; Try + +(try_statement ":" @colon) @try +{ attr (@try.node) _location_end = (location-end @colon) } + +(except_clause ":" @colon) @except +{ attr (@except.node) _location_end = (location-end @colon) } + +;;; GeneratorExp + +(generator_expression . "(" . (comment)* . (_) @start (_) @end . (comment)* . ")" .) @generatorexp +{ + attr (@generatorexp.node) _location_start = (location-start @start) + attr (@generatorexp.node) _location_end = (location-end @end) +} + +(if_clause (expression) @expr) @if +{ + attr (@if.node) _location_start = (location-start @expr) + attr (@if.node) _location_end = (location-end @expr) +} + +(generator_expression . "(" . (comment)* . (_) @start (for_in_clause) @child (_) @end . (comment)* . ")" .) @genexpr +{ + attr (@child.node) _location_start = (location-start @start) + attr (@child.node) _location_end = (location-end @end) +} + +(generator_expression . "(" . (comment)* . (_) @start (for_in_clause) @end . (comment)* . ")" .) @genexpr +{ + attr (@end.node) _location_start = (location-start @start) + attr (@end.node) _location_end = (location-end @end) +} + +(list_comprehension (for_in_clause) @child) @genexpr +{ + attr (@child.node) _location_start = (location-start @genexpr) + attr (@child.node) _location_end = (location-end @genexpr) +} + +(set_comprehension (for_in_clause) @child) @genexpr +{ + attr (@child.node) _location_start = (location-start @genexpr) + attr (@child.node) _location_end = (location-end @genexpr) +} + +(dictionary_comprehension (for_in_clause) @child) @genexpr +{ + attr (@child.node) _location_start = (location-start @genexpr) + attr (@child.node) _location_end = (location-end @genexpr) +} + +;;; With + +(with_statement + "with" @start + (with_clause . (with_item) @first) + ":" @end +) +{ + attr (@first.node) _location_start = (location-start @start) + attr (@first.node) _location_end = (location-end @end) +} + +;;;;;; End of workarounds + +;;;;;; End of part 2 + +;;;;;; Part 3: All of the simple nodes. + +;;;;;; Module + +; Nodes with a `body` field containing statements. +(module (_) @stmt) @parent +{ + edge @parent.node -> @stmt.node + attr (@parent.node -> @stmt.node) body = (named-child-index @stmt) +} + +;;;;;; Comments + +(comment) @comment +{ + attr (@comment.node) text = (source-text @comment) +} + +;;;;;; Expressions + +(parenthesized_expression + inner: (_) @inner +) @outer +{ + attr (@outer.node) _skip_to = @inner.node + attr (@inner.node) parenthesised = #true +} + +(keyword_argument + name: (_) @name + value: (_) @value +) @kwarg +{ + attr (@kwarg.node) arg = (source-text @name) + attr (@kwarg.node) value = @value.node +} + +;;;;;; Num + +[ (integer) (float) ] @num +{ + ; As we must support a large variety of number literals, we simply forward the source string + ; representation to the Python AST reconstruction. + let source = (source-text @num) + attr (@num.node) n = source + attr (@num.node) text = source +} + +;;;;;; End of Num + +;;;;;; Delete + +(delete_statement + target: (expression_list + element: (_) @target + ) +) @del +{ + edge @del.node -> @target.node + attr (@del.node -> @target.node) targets = (named-child-index @target) +} + +(delete_statement target: (_) @target) @del +{ + attr (@target.node) ctx = "del" +} + +(delete_statement [(identifier) (subscript) (attribute)] @id) @del +{ + edge @del.node -> @id.node + attr (@del.node -> @id.node) targets = 0 +} + +;;;;;; Name + +[(identifier) (false) (true) (none)] @id +{ + attr (@id.node) variable = (source-text @id) +} + +;;;;;; End of Name + +;;;;;; Arguments +[ + (keyword_argument value: (_) @id) + (argument_list element: (_) @id) +] +{ + attr (@id.node) ctx = "load" +} + +[ + (keyword_argument name: (_) @id) +] +{ + attr (@id.node) ctx = "store" +} + +;;;;;; End of Arguments + +;;;;;; BinOp + +(binary_operator + left: (_) @left + operator: _ @op + right: (_) @right +) @bin +{ + attr (@bin.node) left = @left.node + attr (@bin.node) right = @right.node + attr (@bin.node) op = (source-text @op) + attr (@left.node) ctx = "load" + attr (@right.node) ctx = "load" +} + +;;;;;; End of BinOp + +;;;;;; If + +; If.test +[ + (if_statement + condition: (_) @test) @if + (elif_clause + condition: (_) @test) @if +] +{ + attr (@if.node) test = @test.node + attr (@test.node) ctx = "load" +} + +; If.orelse - first `elif` clause +(if_statement + consequence: (_) + . (comment)* . + (elif_clause) @elif +) @if +{ + edge @if.node -> @elif.node + attr (@if.node -> @elif.node) orelse = 0 +} + +; If.orelse - link up adjacent `elif` clauses +( + (elif_clause) @elif1 + . (comment)* . + (elif_clause) @elif2 +) +{ + edge @elif1.node -> @elif2.node + attr (@elif1.node -> @elif2.node) orelse = 0 +} + +; If.orelse - match outer `else` up with last `elif` clause (i.e. innermost `if`) +(if_statement + (elif_clause) @elif . (comment)* . + alternative: (else_clause body: (block (_) @orelse)) +) +{ + edge @elif.node -> @orelse.node + attr (@elif.node -> @orelse.node) orelse = (named-child-index @orelse) +} + +; If.orelse - when there are no `elif` clauses. +(if_statement + consequence: (_) + . (comment)* . + alternative: (else_clause body: (block (_) @orelse)) +) @if +{ + edge @if.node -> @orelse.node + attr (@if.node -> @orelse.node) orelse = (named-child-index @orelse) +} + +; If.body + +[ + (if_statement + consequence: (block (_) @stmt)) @parent + (elif_clause + consequence: (block (_) @stmt)) @parent +] +{ + edge @parent.node -> @stmt.node + attr (@parent.node -> @stmt.node) body = (named-child-index @stmt) +} + +;;;;;; end of If + +;;;;;; For statements + +(for_statement + left: (_) @left + right: (_) @right +) @for +{ + attr (@for.node) target = @left.node + attr (@left.node) ctx = "store" + attr (@for.node) iter = @right.node + attr (@right.node) ctx = "load" +} + +(for_statement + body: (block (_) @body) +) @for +{ + edge @for.node -> @body.node + attr (@for.node -> @body.node) body = (named-child-index @body) +} + +(for_statement + alternative: (else_clause body: (block (_) @orelse)) +) @for +{ + edge @for.node -> @orelse.node + attr (@for.node -> @orelse.node) orelse = (named-child-index @orelse) +} + +(for_statement "async" "for" @for_keyword) @for +{ + attr (@for.node) is_async = #true + attr (@for.node) _location_start = (location-start @for_keyword) +} + +;;;;;; end of For + +;;;;;; Call expressions (`a(b, c, *d, **e)`) + +(call function: (_) @func) @call +{ + attr (@call.node) func = @func.node + attr (@func.node) ctx = "load" +} + +; Handle non-keyword arguments +(call arguments: (argument_list element: (_) @arg)) @call +{ + if (not (or + (instance-of @arg "keyword_argument") + (instance-of @arg "dictionary_splat"))) { + edge @call.node -> @arg.node + attr (@call.node -> @arg.node) positional_args = (named-child-index @arg) + } +} + +(call arguments: (argument_list element: (keyword_argument) @arg)) @call +{ + edge @call.node -> @arg.node + attr (@call.node -> @arg.node) named_args = (named-child-index @arg) +} + +(call arguments: (argument_list element: (dictionary_splat) @arg)) @call +{ + edge @call.node -> @arg.node + attr (@call.node -> @arg.node) named_args = (named-child-index @arg) +} + +(call arguments: (generator_expression) @gen) @call +{ + edge @call.node -> @gen.node + attr (@call.node -> @gen.node) positional_args = 0 +} + + +;;;;;; end of Call (`a(b, c, *d, **e)`) + + +;;;;;; End of part 3 + +;;;;;; Part 4: All of the complicated bits (e.g. nodes that need additional synthesis) + + +;;;;;; ListComp (`[a for b in c if d]`) +; See GeneratorExp for details. + +(list_comprehension) @genexpr +{ + ; Synthesize the `genexpr` function + let @genexpr.fun = (ast-node @genexpr "Function") + attr (@genexpr.node) function = @genexpr.fun + attr (@genexpr.fun) name = "listcomp" + + ; Synthesize the `.0` parameter + let @genexpr.arg = (ast-node @genexpr "Name") + attr (@genexpr.arg) variable = ".0" + attr (@genexpr.arg) ctx = "param" + + edge @genexpr.fun -> @genexpr.arg + attr (@genexpr.fun -> @genexpr.arg) args = 0 + attr (@genexpr.fun) kwonlyargs = #null + attr (@genexpr.fun) kwarg = #null + + ; Synthesize the use of `.0` in the outermost `for`. This has a different context than the parameter + ; ("param" vs. "load") hence we must create another node. + let @genexpr.arg_use = (ast-node @genexpr "Name") + attr (@genexpr.arg_use) variable = ".0" + attr (@genexpr.arg_use) ctx = "load" +} + +;;;;;; End of ListComp (`[a for b in c if d]`) + +;;;;;; SetComp (`{a for b in c if d}`) +; See GeneratorExp for details. + +(set_comprehension) @genexpr +{ + ; Synthesize the `genexpr` function + let @genexpr.fun = (ast-node @genexpr "Function") + attr (@genexpr.node) function = @genexpr.fun + attr (@genexpr.fun) name = "setcomp" + + ; Synthesize the `.0` parameter + let @genexpr.arg = (ast-node @genexpr "Name") + attr (@genexpr.arg) variable = ".0" + attr (@genexpr.arg) ctx = "param" + + edge @genexpr.fun -> @genexpr.arg + attr (@genexpr.fun -> @genexpr.arg) args = 0 + attr (@genexpr.fun) kwonlyargs = #null + attr (@genexpr.fun) kwarg = #null + + ; Synthesize the use of `.0` in the outermost `for`. This has a different context than the parameter + ; ("param" vs. "load") hence we must create another node. + let @genexpr.arg_use = (ast-node @genexpr "Name") + attr (@genexpr.arg_use) variable = ".0" + attr (@genexpr.arg_use) ctx = "load" +} + + +;;;;;; End of SetComp (`{a for b in c if d}`) + +;;;;;; DictComp (`{a: b for c in d if e}`) +; See GeneratorExp for details. + +(dictionary_comprehension + body: (pair + key: (_) @key + value: (_) @value + ) +) @genexpr +{ + ; Synthesize the `genexpr` function + let @genexpr.fun = (ast-node @genexpr "Function") + attr (@genexpr.node) function = @genexpr.fun + attr (@genexpr.fun) name = "dictcomp" + + ; Synthesize the `.0` parameter + let @genexpr.arg = (ast-node @genexpr "Name") + attr (@genexpr.arg) variable = ".0" + attr (@genexpr.arg) ctx = "param" + + edge @genexpr.fun -> @genexpr.arg + attr (@genexpr.fun -> @genexpr.arg) args = 0 + attr (@genexpr.fun) kwonlyargs = #null + attr (@genexpr.fun) kwarg = #null + + ; Synthesize the use of `.0` in the innermost `yield`. This has a different context than the parameter + ; ("param" vs. "load") hence we must create another node. + let @genexpr.arg_use = (ast-node @genexpr "Name") + attr (@genexpr.arg_use) variable = ".0" + attr (@genexpr.arg_use) ctx = "load" +} + +;;;;;; End of DictComp (`{a: b for c in d if e}`) + +;;;;;; GeneratorExp (`(a for b in c if d)`) +; The big one. This one will require quite a bit of setup. +; +; First of all, we need to explain what the old parser does to generator expressions. +; +; The following generator expression +; +; (a +; for b in c +; if d +; if e +; for f in g +; if h +; if i +; ) +; +; becomes +; +; def genexpr(.0): +; for b in .0: +; if e: +; if d: +; for f in g: +; if i: +; if h: +; yield a +; +; where `.0` is a (very oddly named) variable. +; +; Note in particular the reversing of the `if`s, the way `c` is replaced with `.0`, and the way +; `a` is used in the innermost `yield`. + +; First of all, we need to set up the generated function and its parameter. These both copy the location +; information for the entire generator expression (yes, it is a wide parameter!) and so we must recreate the logic for +; setting this location information correctly. + +(generator_expression . "(" . (comment)* . (_) @start (_) @end . (comment)* . ")" .) @genexpr +{ + ; Synthesize the `genexpr` function + let @genexpr.fun = (ast-node @genexpr "Function") + attr (@genexpr.fun) _location_start = (location-start @start) + attr (@genexpr.fun) _location_end = (location-end @end) + attr (@genexpr.node) function = @genexpr.fun + attr (@genexpr.fun) name = "genexpr" + + ; Synthesize the `.0` parameter + let @genexpr.arg = (ast-node @genexpr "Name") + attr (@genexpr.arg) _location_start = (location-start @start) + attr (@genexpr.arg) _location_end = (location-end @end) + attr (@genexpr.arg) variable = ".0" + attr (@genexpr.arg) ctx = "param" + + edge @genexpr.fun -> @genexpr.arg + attr (@genexpr.fun -> @genexpr.arg) args = 0 + attr (@genexpr.fun) kwonlyargs = #null + attr (@genexpr.fun) kwarg = #null + + ; Default to true, but we'll set it to false if we're inside a call + var genexpr_parenthesised = #true + + if (instance-of (get-parent @genexpr) "call") { + set genexpr_parenthesised = #null + } + attr (@genexpr.node) parenthesised = genexpr_parenthesised + + ; Synthesize the use of `.0` in the outermost `for`. This has a different context than the parameter + ; ("param" vs. "load") hence we must create another node. + let @genexpr.arg_use = (ast-node @genexpr "Name") + attr (@genexpr.arg_use) _location_start = (location-start @start) + attr (@genexpr.arg_use) _location_end = (location-end @end) + attr (@genexpr.arg_use) variable = ".0" + attr (@genexpr.arg_use) ctx = "load" +} + +; Link up the outermost `for` +[ + (generator_expression + body: (_) . (comment)* . + (for_in_clause + left: (_) @target + right: (_) @iterable + ) @forin + ) @genexpr + (list_comprehension + body: (_) . (comment)* . + (for_in_clause + left: (_) @target + right: (_) @iterable + ) @forin + ) @genexpr + (set_comprehension + body: (_) . (comment)* . + (for_in_clause + left: (_) @target + right: (_) @iterable + ) @forin + ) @genexpr + (dictionary_comprehension + body: (_) . (comment)* . + (for_in_clause + left: (_) @target + right: (_) @iterable + ) @forin + ) @genexpr +] +{ + attr (@genexpr.node) iterable = @iterable.node + attr (@iterable.node) ctx = "load" + edge @genexpr.fun -> @forin.node + attr (@genexpr.fun -> @forin.node) body = 0 + + attr (@forin.node) target = @target.node + attr (@target.node) ctx = "store" + attr (@forin.node) iter = @genexpr.arg_use +} + +; Set up all subsequent `for ... in ...` +[ + (generator_expression + body: (_) + [(for_in_clause) (if_clause)] + (for_in_clause left: (_) @target right: (_) @iter) @forin + ) + (list_comprehension + body: (_) + [(for_in_clause) (if_clause)] + (for_in_clause left: (_) @target right: (_) @iter) @forin + ) + (set_comprehension + body: (_) + [(for_in_clause) (if_clause)] + (for_in_clause left: (_) @target right: (_) @iter) @forin + ) + (dictionary_comprehension + body: (_) + [(for_in_clause) (if_clause)] + (for_in_clause left: (_) @target right: (_) @iter) @forin + ) +] +{ + attr (@forin.node) target = @target.node + attr (@target.node) ctx = "store" + attr (@forin.node) iter = @iter.node + attr (@iter.node) ctx = "load" +} + +; Set up each `if ...` +(if_clause (expression) @test) @if +{ + attr (@if.node) test = @test.node + attr (@test.node) ctx = "load" +} + +; Link adjacent `for` clauses together +(_ + (for_in_clause) @forin1 + . (comment)* . + (for_in_clause) @forin2 +) +{ + edge @forin1.node -> @forin2.node + attr (@forin1.node -> @forin2.node) body = 0 +} + +; For the first `if` clause after a `for` clause, record both the `for` and `if` clauses in variables that we +; will propagate along. That way, when we get to the last `if` clause, we can link it up with the `for` +; clause, and we can link up the _first_ `if` clause with whatever follows the last `if` clause. +(_ + (for_in_clause) @forin + . (comment)* . + (if_clause) @if +) +{ + let @if.for = @forin.node + let @if.first_if = @if.node +} + +; Link up adjacent `if` clauses (note the reversed order!) and propagate the `for` and `first_if` values. +(_ + (if_clause) @if1 + . (comment)* . + (if_clause) @if2 +) +{ + edge @if2.node -> @if1.node + attr (@if2.node -> @if1.node) body = 0 + let @if2.for = @if1.for + let @if2.first_if = @if1.first_if +} + +; After the last `if` in a chain, we hook it up as the body of its associated `for`, and hook up the _first_ +; `if` as the one that has the following `for` as its body. +; The case where there is no `for` following the last `if` is handled later. +(_ + (if_clause) @if + . (comment)* . + (for_in_clause) @forin +) +{ + edge @if.for -> @if.node + attr (@if.for -> @if.node) body = 0 + edge @if.first_if -> @forin.node + attr (@if.first_if -> @forin.node) body = 0 +} + +; For everything except dictionary comprehensions, the innermost expression is just the `body` of the +; comprehension. +[ + (generator_expression body: (_) @body) @genexpr + (list_comprehension body: (_) @body) @genexpr + (set_comprehension body: (_) @body) @genexpr +] +{ + let @genexpr.result = @body.node +} + +; For dict comprehensions, we build an explicit tuple using the key and value pair. +(dictionary_comprehension + body: (pair + key: (_) @key + value: (_) @value + ) @body +) @genexpr +{ + let tuple = (ast-node @body "Tuple") + edge tuple -> @key.node + attr (tuple -> @key.node) elts = 1 + edge tuple -> @value.node + attr (tuple -> @value.node) elts = 0 + ; TODO verify that it is correct to use a `(value, key)` tuple, and not a `(key, value)` tuple above. + ; That is what the current parser does... + attr (tuple) ctx = "load" + let @genexpr.result = tuple +} + +; For the final `if` clause, we need to hook it up with the `yield` expression and with its associated `for` clause. +[ + (generator_expression + body: (_) @body + (if_clause) @last + . + ) @genexpr + (list_comprehension + body: (_) @body + (if_clause) @last + . + ) @genexpr + (set_comprehension + body: (_) @body + (if_clause) @last + . + ) @genexpr + (dictionary_comprehension + body: (_) @body + (if_clause) @last + . + ) @genexpr +] +{ + let expr = (ast-node @body "Expr") + let yield = (ast-node @body "Yield") + + let @genexpr.expr = expr + let @genexpr.yield = yield + + attr (expr) value = yield + + attr (yield) value = @genexpr.result + attr (@body.node) ctx = "load" + edge @last.first_if -> expr + attr (@last.first_if -> expr) body = 0 + + ; Hook up this `if` clause with its `for` clause + edge @last.for -> @last.node + attr (@last.for -> @last.node) body = 0 +} + +; If the last clause is a `for`, we only have to create and hook up the `yield` expression. +[ + (generator_expression + body: (_) @body + (for_in_clause) @last + . + ) @genexpr + (list_comprehension + body: (_) @body + (for_in_clause) @last + . + ) @genexpr + (set_comprehension + body: (_) @body + (for_in_clause) @last + . + ) @genexpr + (dictionary_comprehension + body: (_) @body + (for_in_clause) @last + . + ) @genexpr +] +{ + let expr = (ast-node @body "Expr") + let yield = (ast-node @body "Yield") + + let @genexpr.expr = expr + let @genexpr.yield = yield + + attr (expr) value = yield + + attr (yield) value = @genexpr.result + attr (@body.node) ctx = "load" + edge @last.node -> expr + attr (@last.node -> expr) body = 0 +} + +; For whatever reason, we do not consider parentheses around the yielded expression if they are present, so +; we must adapt the location accordingly. +[ + (generator_expression + body: (_ . "(" . _ @first) + ) + (list_comprehension + body: (_ . "(" . _ @first) + ) + (set_comprehension + body: (_ . "(" . _ @first) + ) + (dictionary_comprehension + body: (_ . "(" . _ @first) + ) +] @genexpr +{ + attr (@genexpr.expr) _location_start = (location-start @first) + attr (@genexpr.yield) _location_start = (location-start @first) +} + +; Annoyingly, setting the end location of the synthesized `Expr` and `Yield` is a big mess, +; so we have to use mutable variables. +[ + (generator_expression body: (_) @body) + (list_comprehension body: (_) @body) + (set_comprehension body: (_) @body) + (dictionary_comprehension body: (_) @body) +] @genexpr +{ + var @genexpr.body_end = (location-end @body) +} + + +; The reason we need to do this mutably is because the query `(_ _ @last . ")" .)`, despite the liberal use +; of anchors, is broken (due to a bug in `tree-sitter`). Specifically, it will match both `b` and the +; following `,` in the tuple expression `(a, b,)`. This means we cannot set the attribute in this stanza +; (since overwriting attributes is not allowed) and so we instead write it to a mutable variable and set it +; later. Because the order in which the captures are returned results in `b` being matched before `,` this +; gives the correct behaviour. +[ + (generator_expression + body: (_ _ @last . ")" .) + ) + (list_comprehension + body: (_ _ @last . ")" .) + ) + (set_comprehension + body: (_ _ @last . ")" .) + ) + (dictionary_comprehension + body: (_ _ @last . ")" .) + ) +] @genexpr +{ + set @genexpr.body_end = (location-end @last) +} + +[ + (generator_expression) + (list_comprehension) + (set_comprehension) + (dictionary_comprehension) +] @genexpr +{ + attr (@genexpr.expr) _location_end = @genexpr.body_end + attr (@genexpr.yield) _location_end = @genexpr.body_end +} + + +;;;;;; End of GeneratorExp (`(a for b in c if d)`) + + + + +;;;;;; Class statements +; A class definition +; +; class Foo(*bases, **keywords): body +; +; is turned into an actual assignment statement, with the class name as the left-hand side. +; +; Foo = $classexpr(name='Foo', bases, keywords, inner_scope=$class(name='Foo', body)) +; +; (with a suitably magical definition of the `$` prefix). +; +; So we have to synthesize both the outer assignment, and also the two representatives of the class. + +(class_definition + name: (identifier) @name + ":" @colon +) @class +{ + + ; To make it clearer that the outer node is an assignment, we create an alias for it. + let @class.assign = @class.node + + ; We reuse the identifier as the left hand side of the assignment. + let @class.assign_lhs = @name.node + + ; Synthesized nodes: the class_expr node, and the class node. + + let @class.class_expr = (ast-node @class "ClassExpr") + let @class.inner_scope = (ast-node @class "Class") + + ; Setting up the outer assignment + edge @class.assign -> @class.assign_lhs + attr (@class.assign -> @class.assign_lhs) targets = 0 + attr (@class.assign) value = @class.class_expr + attr (@class.assign) _location_end = (location-end @colon) + + attr (@class.assign_lhs) ctx = "store" + + let class_name = (source-text @name) + + ; The right hand side of the assignment, a `ClassExpr`. + attr (@class.class_expr) name = class_name + attr (@class.class_expr) inner_scope = @class.inner_scope + ; `bases` will be set elsewhere + ; `keywords` will be set elsewhere + attr (@class.class_expr) _location_end = (location-end @colon) + + ; The inner scope of the class_expr, a `Class`. + attr (@class.inner_scope) name = class_name + ; body will be set in a separate stanza. + attr (@class.inner_scope) _location_end = (location-end @colon) + +} + +; Class.body +(class_definition + body: (block (_) @stmt) +) @class +{ + edge @class.inner_scope -> @stmt.node + attr (@class.inner_scope -> @stmt.node) body = (named-child-index @stmt) +} + +; Class.bases - using `(_ !name)` as a proxy for all non-keyword arguments. +(class_definition + superclasses: (argument_list element: (_ !name) @arg) +) @class +{ + edge @class.class_expr -> @arg.node + attr (@class.class_expr -> @arg.node) bases = (named-child-index @arg) +} + +; Class.keywords +(class_definition + superclasses: (argument_list element: (keyword_argument) @arg) +) @class +{ + edge @class.class_expr -> @arg.node + attr (@class.class_expr -> @arg.node) keywords = (named-child-index @arg) +} + +;;;;;; End of Class + +;;;;;; Assign statements +; Assignment statements require a bit of interesting handling, since we represent a chained +; assignment such as `a = b = 5` as a single `Assign` node with multiple targets and a single +; right-hand side. This makes it somewhat complicated (but still doable) to determine the index of +; any single target in the resulting list. +; +; The way we handle this is by explicitly propagating two variables inwards. The first variable +; keeps track of the outermost node in a chain of assignments, and the second variable keeps track of +; the index of the left-hand side of the current assignment. + +; Base case, for the outermost assignment we set the outermost node to this node, and the index to zero. +(expression_statement (assignment !type) @assign) @expr +{ + let @assign.outermost_assignment = @assign.node + let @assign.target_index = 0 +} + +; Propagating the two variables inwards, increasing the index by one. Note that this depends on +; having the query match from the outside in -- if this evaluation order ever changes, this will break. +(assignment !type right: (assignment) @inner) @outer +{ + let @inner.outermost_assignment = @outer.outermost_assignment + let @inner.target_index = (plus @outer.target_index 1) +} + +; Finally, with the above variables set, we can -- for each assignment -- create an edge from the +; outermost assignment to it, and set its index to the index that we've calculated for this node. +(assignment !type left: (_) @target) @assign +{ + edge @assign.outermost_assignment -> @target.node + attr (@assign.outermost_assignment -> @target.node) targets = @assign.target_index + attr (@target.node) ctx = "store" +} + +; In addition to the above, we must ensure that the `value` attribute of the outermost assignment +; points to the _innermost_ right-hand side. We do this by first setting the `value` attribute for +; _all_ assignments... +(assignment !type right: (_) @value) @assign +{ + attr (@assign.node) value = @value.node + attr (@value.node) ctx = "load" +} + +; ... and then for assignments that are _inside_ other assigments, we use the `_skip_to` attribute +; to jump across the outer assignment. +; +; Thus, the outermost assignment's `value` will point to its right-hand side, but this one will (if +; it's an assignment itself) skip to _its_ right-hand side, and so on until we reach a right-hand side +; that is not an assignment. +(assignment !type right: (assignment right: (_) @inner) @outer) +{ + attr (@outer.node) _skip_to = @inner.node +} + +;;;;;; End of Assign + +;;;;;; AnnAssign + +(assignment + left: (_) @target + type: (type (expression) @type) +) @assign +{ + attr (@assign.node) target = @target.node + attr (@target.node) ctx = "store" + attr (@assign.node) annotation = @type.node + attr (@type.node) ctx = "load" +} + +(assignment + left: (_) @target + type: (_) + right: (_) @value +) @assign +{ + attr (@assign.node) value = @value.node + attr (@value.node) ctx = "load" +} + +;;;;;; End of AnnAssign + +;;;;;; AugAssign + +(augmented_assignment + left: (_) @left + operator: _ @op + right: (_) @right +) @augassign +{ + let binop = (ast-node @augassign "BinOp") + attr (@augassign.node) operation = binop + attr (binop) left = @left.node + attr (@left.node) ctx = "load" ; yes, it really is "load". + attr (binop) op = (source-text @op) + attr (binop) right = @right.node + attr (@right.node) ctx = "load" +} + +;;;;;; End of AugAssign + +;;;;;; Global + +(global_statement (identifier) @name) @global +{ + edge @global.node -> @name.node + attr (@global.node -> @name.node) names = (named-child-index @name) + attr (@name.node) _is_literal = (source-text @name) +} + +;;;;;; End of Global + +;;;;;; Nonlocal + +(nonlocal_statement (identifier) @name) @nonlocal +{ + edge @nonlocal.node -> @name.node + attr (@nonlocal.node -> @name.node) names = (named-child-index @name) + attr (@name.node) _is_literal = (source-text @name) +} + +;;;;;; End of Nonlocal + +;;;;;; Import (`import ...`) + +; `import j1.j2 as j3, j4, ...` becomes +; +; Import: +; names: [ +; alias: +; value: +; ImportExpr: +; level: 0 # always 0 for absolute imports +; name: 'j1.j2' +; top: False +; asname: +; Name: +; variable: Variable('j3', None) +; ctx: Store +; alias: +; value: +; ImportExpr: +; level: 0 # always 0 for absolute imports +; name: 'j4' +; top: True +; asname: +; Name: +; variable: Variable('j4', None) +; ctx: Store +; ... +; ] +; +; from +; +; module +; import_statement +; name: aliased_import +; name: dotted_name +; identifier # j1 +; identifier # j2 +; alias: identifier j3 +; name: dotted_name +; identifier # j4 +; +; This means we have to hang our `alias` nodes off of the `dotted_name` and +; `aliased_import` nodes. + +; Import.names +(import_statement name: (_) @name) @import +{ + edge @import.node -> @name.node + attr (@import.node -> @name.node) names = (named-child-index @name) +} + +; Imports without an explicit alias -- extract the root module name +(import_statement name: (dotted_name . (identifier) @first) @alias) +{ + let import_expr = (ast-node @alias "ImportExpr") + attr (import_expr) level = 0 + attr (import_expr) name = (source-text @alias) + attr (import_expr) top = #true + + attr (@alias.node) value = import_expr + + attr (@alias.node) asname = @first.node + attr (@first.node) ctx = "store" +} + +; Not strictly needed (but the AST reconstruction will complain otherwise) we +; assign a context to each identifier in a dotted name (except the first part, +; which already gets one elsewhere). +(dotted_name (identifier) (identifier) @name) +{ + attr (@name.node) ctx = "load" +} + +; For dotted imports `a.b.c` the location for the `Name` corresponding to the +; `a` part covers the entire expression, so we explicitly match the final +; element and set the location appropriately. If there is only one element, +; this stanza doesn't fire, but in that case the location is actually correct +; already. +(import_statement + name: (dotted_name + . + (identifier) @first + (identifier) @last + . + ) +) +{ + attr (@first.node) _location_end = (location-end @last) +} + +; Imports with an explicit alias +(import_statement + (aliased_import + name: (dotted_name . (identifier) @first) @name + alias: (identifier) @asname + ) @alias +) +{ + let import_expr = (ast-node @name "ImportExpr") + attr (import_expr) level = 0 + attr (import_expr) name = (source-text @name) + attr (import_expr) top = #false + + attr (@alias.node) value = import_expr + + attr (@alias.node) asname = @asname.node + attr (@asname.node) ctx = "store" + + attr (@first.node) ctx = "load" +} + +;;;;;; End of Import (`import ...`) + +;;;;;; Import (`from ... import ...`) + +; Oh what a twisty mess these are. First, the prototypical layout of a +; `from some_module import x1 as y1, x2, ...` statement is as follows: +; +; Import: +; names: [ +; alias: +; value: +; ImportMember: +; module: +; ImportExpr; +; level: +; name: +; top: #false +; name: +; asname: +; Name: +; variable: Variable(, None) +; ctx: "store" +; alias: +; value: +; ImportMember: +; module: +; ImportExpr: +; level: +; name: +; top: #false +; name: +; asname: +; Name: +; variable: Variable(, None) # Note the reuse! +; ctx: "store" +; ... +; ] +; +; In particular, `alias` nodes are used even if no aliasing takes place. + +; Now, on the flip side we have the `tree-sitter-python` output. Here +; the corresponding structure for `from ..some_module import x1 as y1, x2` +; is as follows: +; +; module +; import_from_statement +; module_name: relative_import +; import_prefix # `..` +; dotted_name +; identifier # some_module +; name: aliased_import +; name: dotted_name +; identifier # x1 +; alias: identifier # y1 +; name: dotted_name +; identifier # x2 +; +; Now, we need to pin our `alias` nodes on something, and the only thing we can +; really rely on is whatever is in the `name` field of the +; `import_from_statement` + + +; Import.names +[ + (import_from_statement + name: (_) @alias + ) + (future_import_statement + name: (_) @alias + ) +] @import +{ + edge @import.node -> @alias.node + attr (@import.node -> @alias.node) names = (named-child-index @alias) +} + +; Setting up the synthesized nodes for `ImportMember` and `ImportExpr` +; when the module name is _not_ a relative import. +[ + (import_from_statement + module_name: (dotted_name) @name + name: (_) @alias + ) + (future_import_statement + "__future__" @name + name: (_) @alias + ) +] +{ + let @alias.import_member = (ast-node @alias "ImportMember") + let @alias.import_expr = (ast-node @name "ImportExpr") + + attr (@alias.node) value = @alias.import_member + attr (@alias.import_member) module = @alias.import_expr + attr (@alias.import_expr) level = 0 + attr (@alias.import_expr) name = (source-text @name) + attr (@alias.import_expr) top = #false +} + +; Setting up the synthesized nodes for `ImportMember` and `ImportExpr` +; when the module name _is_ a relative import. +(import_from_statement + module_name: (relative_import name: (dotted_name) @name) @rel + name: (_) @alias +) +{ + let @alias.import_member = (ast-node @alias "ImportMember") + let @alias.import_expr = (ast-node @rel "ImportExpr") + + attr (@alias.node) value = @alias.import_member + attr (@alias.import_member) module = @alias.import_expr + ; ImportExpr.level is computed elsewhere + attr (@alias.import_expr) name = (source-text @name) + attr (@alias.import_expr) top = #false +} + +; Setting up the synthesized nodes for `ImportMember` and `ImportExpr` +; when the module is a relative import with no module name (e.g. `from . import ...`). +(import_from_statement + module_name: (relative_import !name) @rel + name: (_) @alias +) +{ + let @alias.import_member = (ast-node @alias "ImportMember") + let @alias.import_expr = (ast-node @rel "ImportExpr") + + attr (@alias.node) value = @alias.import_member + attr (@alias.import_member) module = @alias.import_expr + ; ImportExpr.level is computed elsewhere + attr (@alias.import_expr) name = #null + attr (@alias.import_expr) top = #false +} + +; Set the level for relative imports +(import_from_statement + module_name: (relative_import (import_prefix) @prefix) + name: (_) @alias +) +{ + var level = 0 + + ; Figure out the number of `.`s in the prefix. + scan (source-text @prefix) { + "\." { + set level = (plus level 1) + } + } + + attr (@alias.import_expr) level = level +} + +; Set aliases for non-aliased imports +[ + (import_from_statement + name: + (dotted_name (identifier) @name) @alias + ) + (future_import_statement + name: + (dotted_name (identifier) @name) @alias + ) +] +{ + attr (@alias.node) asname = @name.node + attr (@alias.import_member) name = (source-text @name) + attr (@name.node) ctx = "store" +} + +; Set aliases for aliased imports +(import_from_statement + name: + (aliased_import + name: (dotted_name) @first + alias: (identifier) @asname + ) @alias +) +{ + attr (@alias.node) asname = @asname.node + attr (@alias.import_member) name = (source-text @first) + attr (@asname.node) ctx = "store" +} + +; Fix up remaining identifiers without contexts. +(import_from_statement + module_name: (dotted_name . (identifier) @first) +) +{ + attr (@first.node) ctx = "load" +} + +(import_from_statement + module_name: (relative_import (dotted_name . (identifier) @first)) +) +{ + attr (@first.node) ctx = "load" +} + +(import_from_statement + name: (aliased_import (dotted_name (identifier) @first)) +) +{ + attr (@first.node) ctx = "load" +} + +(import_from_statement + module_name: (_) @name + (wildcard_import) +) @importfrom +{ + let importexpr = (ast-node @name "ImportExpr") + let @importfrom.importexpr = importexpr + attr (@importfrom.node) module = importexpr + attr (importexpr) top = #false +} + +; Absolute star import: `from a import *` +(import_from_statement + module_name: (dotted_name) @name + (wildcard_import) +) @importfrom +{ + attr (@importfrom.importexpr) name = (source-text @name) + attr (@importfrom.importexpr) level = 0 +} + +; Relative star import, with module name: `from ..a import *` +(import_from_statement + module_name: + (relative_import + (dotted_name) @name + ) + (wildcard_import) +) @importfrom +{ + attr (@importfrom.importexpr) name = (source-text @name) +} + +; Relative star import, without module name: `from ... import *` +(import_from_statement + module_name: + (relative_import + (import_prefix) @prefix + ) + (wildcard_import) +) @importfrom +{ + var level = 0 + + ; Figure out the number of `.`s in the prefix. + scan (source-text @prefix) { + "\." { + set level = (plus level 1) + } + } + + attr (@importfrom.importexpr) level = level +} +;;;;;; End of Import (`from ... import ...`) + +;;;;;; Raise (`raise ...`) +; This one is interesting, since the `tree-sitter-python` grammar doesn't let +; us distinguish between `raise foo` and `raise foo, bar`. At the level of the +; `tree-sitter-python` output, both are `raise_statement` nodes with a single +; child. In the latter case, the child is an `expression_list` but there's +; currently no way to match _against_ a particular node type in a query. + +; To get around this, we instead do the matching inside the stanza itself. + +(raise_statement . (_) @exc) @raise +{ + if (not (instance-of @exc "expression_list") ) { + attr (@raise.node) exc = @exc.node + } + attr (@exc.node) ctx = "load" +} + +; `raise ... from cause` +(raise_statement + cause: (_) @cause +) @raise +{ + attr (@raise.node) cause = @cause.node + attr (@cause.node) ctx = "load" +} + +; `raise type, inst` +(raise_statement (expression_list + . (_) @type + . (_) @inst +)) @raise +{ + attr (@raise.node) type = @type.node + attr (@raise.node) inst = @inst.node +} + +; `raise type, inst, tback` +(raise_statement (expression_list + . (_) + . (_) + . (_) @tback + . +)) @raise +{ + attr (@raise.node) tback = @tback.node +} + +;;;;;; End of Raise (`raise ...`) + +;;;;;; Assert (`assert ...`) + +(assert_statement + . (_) @test +) @assert +{ + attr (@assert.node) test = @test.node + attr (@test.node) ctx = "load" +} + +(assert_statement + . (_) + . (_) @msg +) @assert +{ + attr (@assert.node) msg = @msg.node + attr (@msg.node) ctx = "load" +} + +;;;;;; End of Assert (`assert ...`) + +;;;;;; String (`"foo"`) + +; For regular strings, see the handling of `(string !interpolation)` below. + +; For concatenated strings, the necessary manipulations are quite complicated to express, +; so we instead move this problem into the Python side of things. Thus, a concatenated +; string only has to keep track of what its children are. +(concatenated_string) @string +{ + attr (@string.node) _prefix = (string-prefix @string) + attr (@string.node) _fixup = #true +} + +(concatenated_string (string) @part) @string +{ + edge @string.node -> @part.node + attr (@string.node -> @part.node) _children = (named-child-index @part) +} + +;;;;;; End of String (`"foo"`) + +;;;;;; JoinedStr (`f"foo"`) + +; f-strings are quite complicated for a variety of reasons. First of all, +; we need to synthesize empty strings to appear in-between interpolations +; that are immediately adjacent. Thus, the string `f"{1}{2}"`, which has +; a `tree-sitter-python` representation of the form +; +; (string (interpolation (integer)) (interpolation (integer))) +; +; needs to have three empty additional strings synthesized: +; - `f"{`, before the `1`, +; - `}{`, between the `1` and `2`, and +; - `}"`, after the `2`. +; +; Because of this, children of an f-string are indexed using triples of integers. +; The first component is either 0, 1, or 2, indicating whether this string appears at the +; beginning, in between, or at the end of the f-string. (At the beginning and end, the other +; two components are irrelevant.) The second component is the index of child, as seen by +; `tree-sitter`. The third component allows us to insert empty strings between adjacent children +; of the f-string. Thus, the string `f"{1}{2}"` has the following children at the given indices: +; `f"{"` at `[0,0,0]` +; `1` at `[1,1,0]` +; `}{` at `[1,1,1]` +; `2` at `[1,2,0]` +; `}"` at `[2,0,0]` + + +; First, we add any strings parts that appear either before or after an interpolation: +[ + (string + interpolation: (_) + string_content: (_) @part + ) + (string + string_content: (_) @part + interpolation: (_) + ) +] @fstring +{ + edge @fstring.node -> @part.node + attr (@fstring.node -> @part.node) values = [1, (named-child-index @part), 0] + let safe_string = (concatenate-strings (string-safe-prefix @fstring) (source-text @part) (string-quotes @fstring)) + attr (@part.node) s = safe_string + attr (@part.node) text = safe_string +} + +; In a similar fashion, any expressions that are interpolated: +(string interpolation: (interpolation expression: (_) @part) @interp) @fstring +{ + edge @fstring.node -> @part.node + attr (@fstring.node -> @part.node) values = [1, (named-child-index @interp), 0] + attr (@part.node) ctx = "load" +} + +; Any expressions inside the format specifier are appended at the end +(string + interpolation: (interpolation + (format_specifier + (format_expression + expression: (_) @part + ) @format_expression + ) + ) @interp +) @fstring +{ + edge @fstring.node -> @part.node + attr (@fstring.node -> @part.node) values = [1, (named-child-index @interp), (plus 1 (named-child-index @format_expression))] + attr (@part.node) ctx = "load" +} + +; Next, the empty string before the first interpolation: +(string + . + (interpolation "{" @end) +) @fstring +{ + let empty_string = (ast-node @fstring "StringPart") + edge @fstring.node -> empty_string + attr (@fstring.node -> empty_string) values = [0, 0, 0] + attr (empty_string) prefix = (string-prefix @fstring) + attr (empty_string) s = "\"\"" + let quotes = (string-quotes @fstring) + attr (empty_string) text = (concatenate-strings quotes quotes) + + attr (empty_string) _location_end = (location-end @end) +} + +; Then, the empty string between two immediately adjacent interpolations: +(string + (interpolation "}" @start) @before + . + (interpolation "{" @end) +) @fstring +{ + let empty_string = (ast-node @fstring "StringPart") + edge @fstring.node -> empty_string + attr (@fstring.node -> empty_string) values = [1, (named-child-index @before), 1] + attr (empty_string) prefix = (string-prefix @fstring) + attr (empty_string) s = "\"\"" + let quotes = (string-quotes @fstring) + attr (empty_string) text = (concatenate-strings quotes quotes) + attr (empty_string) _location_start = (location-start @start) + attr (empty_string) _location_end = (location-end @end) +} + +; And finally, the empty string after the last interpolation: +(string + (interpolation "}" @start) + . +) @fstring +{ + let empty_string = (ast-node @fstring "StringPart") + edge @fstring.node -> empty_string + attr (@fstring.node -> empty_string) values = [2, 0, 0] + attr (empty_string) prefix = (string-prefix @fstring) + attr (empty_string) s = "\"\"" + let quotes = (string-quotes @fstring) + attr (empty_string) text = (concatenate-strings quotes quotes) + attr (empty_string) _location_start = (location-start @start) +} + +; If the f-string begins with a non-empty string, we must adjust the start and +; end location of this part: +(string + . + string_content: (_) @part + . + interpolation: (interpolation "{" @int_start) +) @fstring +{ + attr (@part.node) prefix = (string-prefix @fstring) + attr (@part.node) _location_start = (location-start @fstring) + attr (@part.node) _location_end = (location-end @int_start) +} + +; And similarly for any string that follows an interpolation: +(string + interpolation: (interpolation "}" @int_end) + . + string_content: (_) @part) @fstring +{ + attr (@part.node) prefix = (string-prefix @fstring) + attr (@part.node) _location_start = (location-start @int_end) +} + +; Finally, we must adjust the end of the last part: +(string + interpolation: (_) + string_content: (_) @part + . +) @fstring +{ + attr (@part.node) _location_end = (location-end @fstring) +} + +; For f-strings without interpolations, we simply treat them as regular strings (or `StringPart`s if +; they are part of a concatenation): +(string !interpolation string_content: (_) @part) @fstring +{ + let safe_text = (concatenate-strings (string-safe-prefix @fstring) (source-text @part) (string-quotes @fstring)) + if (instance-of (get-parent @fstring) "concatenated_string"){ + ; StringPart + attr (@fstring.node) text = safe_text + } + else { + ; regular string + attr (@fstring.node) implicitly_concatenated_parts = #null + } + attr (@fstring.node) s = safe_text + attr (@fstring.node) prefix = (string-prefix @fstring) +} + +; For f-strings without interpolations _or_ string-content, we simply treat them as regular empty strings: +(string !interpolation !string_content) @fstring +{ + let empty_text = "\"\"" + if (instance-of (get-parent @fstring) "concatenated_string"){ + ; StringPart + attr (@fstring.node) text = empty_text + } + else { + ; regular string + attr (@fstring.node) implicitly_concatenated_parts = #null + } + attr (@fstring.node) s = empty_text + attr (@fstring.node) prefix = (string-prefix @fstring) +} + + +;;;;;; End of JoinedStr (`f"foo"`) + + + +;;;;;; List (`[...]`) + +(list element: (_) @elt) @list +{ + edge @list.node -> @elt.node + attr (@list.node -> @elt.node) elts = (named-child-index @elt) +} + +;;;;;; End of List (`[...]`) + +;;;;;; Starred (`*some_sequence`) + +[ + (list_splat (expression) @value) + (list_splat_pattern vararg: (_) @value) +] @starred +{ + attr (@starred.node) value = @value.node + attr (@value.node) _inherited_ctx = @starred.node +} + +;;;;;; End of Starred (`*some_sequence`) + +;;;;;; Dict (`{... : ..., ...}`) + +(dictionary element: (_) @item) @dict +{ + edge @dict.node -> @item.node + attr (@dict.node -> @item.node) items = (named-child-index @item) + attr (@item.node) ctx = "load" +} + +(pair key: (_) @key value: (_) @value) @item +{ + attr (@item.node) key = @key.node + attr (@item.node) value = @value.node + attr (@key.node) ctx = "load" + attr (@value.node) ctx = "load" +} + +;;;;;; End of Dict (`{... : ..., ...}`) + +;;;;;; DictUnpacking (`**some_dict`) + +(dictionary_splat (expression) @value) @dictunpacking +{ + attr (@dictunpacking.node) value = @value.node + attr (@value.node) ctx = "load" +} + +;;;;;; End of DictUnpacking (`**some_dict`) + +;;;;;; Set (`{..., ...}`) + +(set element: (_) @elt) @set +{ + edge @set.node -> @elt.node + attr (@set.node -> @elt.node) elts = (named-child-index @elt) +} + +;;;;;; End of Set (`{..., ...}`) + + +;;;;;; BoolOp (`... and ...`, `... or ...`) + +; This is probably the single most complex thing in this file. Read it slowly. + +; First of all, the problem is that `tree-sitter-python` represents boolean operators as if they are binary, +; whereas in Python they are really n-ary. This means we have to collapse nested `and`s and `or`s in order to +; correctly create the intended AST structure. +; +; We have a structure like this: +; +; or +; / \ +; v_0 or +; / \ +; v_1 ... +; \ +; or +; / \ +; v_n-1 v_n +; +; where each `v_i` may be a value or a subtree, but not an `or`. +; From this we will produce a graph of the form: +; +; or -0-> v_0 +; -1-> v_1 +; ... +; -(n-1)-> v_n-1 +; -n-> [or -skip_to->]* v_n +; +; where we see that the last node may be found by a series of `skip_to` edges along the nested `or` nodes, +; if such are present. +; +; As an intermediate step, we will decorate the `or` nodes of the tree with a field `index`, and for the outermost +; `or` node we will also set `last_index`, initially to 1 but we increment it each time we see a nested `or`, so it ends +; up being `n`: +; +; or index:0, last_index: n +; / \ +; v_0 or index: 1 +; / \ +; v_1 ... +; \ +; or index: n-1 +; / \ +; v_n-1 v_n +; +; This collapsing goes to the outermost operator (`and` or `or`) +; and so the first step is to correctly identify these. + +; For the outermost nodes, we can now assign +; some special variables that we will propagate inwards. Firstly, we record what the outermost node is (in +; this case just the node itself), next the index of the value in its left argument (initially `0`), and +; finally the index at which the _innermost_ right-hand-side value should appear in the resulting list of +; values. This final variable is mutable, and will be updated as we go through the nested sequence of similar +; operators. +(boolean_operator operator: _ @op right: (_)) @boolop +{ + ; this binary operator is outermost if it does not have a parent performing the same operation (`and` or `or`) + if (not (is-boolean-operator (get-parent @boolop) (source-text @op))) { + let @boolop.outermost = @boolop + let @boolop.index = 0 + var @boolop.innermost_index = 1 + } +} + +; Now, we propagate/modify the variables mentioned in the previous stanza. The `outermost` field is simply +; propagated, and the `index` and `innermost_index` fields are propagated and updated respectively. +; +; We also set the `_skip_to` field on the inner operator, making it point to its right child. That way, the +; `right` child of the _outermost_ operator will (once resolved) point to the _innermost_ `right` child (i.e. ; the last child in this nested sequence of operators). +[ + (boolean_operator + operator: "or" + right: (boolean_operator + operator: "or" + right: (_) @inner_right + ) @inner + ) + (boolean_operator + operator: "and" + right: (boolean_operator + operator: "and" + right: (_) @inner_right + ) @inner + ) +] @outer +{ + let @inner.outermost = @outer.outermost + let @inner.index = (plus @outer.index 1) + attr (@inner.node) _skip_to = @inner_right.node + let outermost = @outer.outermost + set outermost.innermost_index = (plus outermost.innermost_index 1) +} + +; For each boolean operator, we hook its left child up as a child of the outermost operator, at the index we +; calculated previously. +(boolean_operator left: (_) @value) @boolop +{ + edge @boolop.outermost.node -> @value.node + attr (@boolop.outermost.node -> @value.node) values = @boolop.index + attr (@value.node) ctx = "load" +} + +; For the outermost boolean operator, we hook up its right child (which ultimately points to the innermost +; right child) as a child at the index we calculated previously. +(boolean_operator + operator: _ @op + right: (_) @value +) @boolop +{ + ; this binary operator is outermost if it does not have a parent performing the same operation (`and` or `or`) + if (not (is-boolean-operator (get-parent @boolop) (source-text @op))) { + edge @boolop.node -> @value.node + attr (@boolop.node -> @value.node) values = @boolop.innermost_index + } +} + +(boolean_operator right: (_) @value) +{ attr (@value.node) ctx = "load" } + +(boolean_operator ["and" "or"] @op) @boolop +{ + attr (@boolop.node) op = (source-text @op) +} + +;;;;;; End of BoolOp (`... and ...`, `... or ...`) + +;;;;;; Compare (`... < ...`, `... <= ...`, etc.) + +(comparison_operator . (primary_expression) @left) @compare +{ + attr (@compare.node) left = @left.node + attr (@left.node) ctx = "load" +} + +; Hook up all of the compared values. These are simply the named children (except the first one, +; which was handled above), as the operators are all unnamed. +(comparison_operator (primary_expression) (primary_expression) @right) @compare +{ + edge @compare.node -> @right.node + attr (@compare.node -> @right.node) comparators = (named-child-index @right) + attr (@right.node) ctx = "load" +} + + +; Record the operators in the `ops` fields. +; +; A complication here is that we want to construct a field pointing to a list of +; literals (and not AST nodes as we do almost everywhere else). To get around this, +; we create a placeholder node for the operation, and then set the `_is_literal` field +; to override it with a literal value. +(comparison_operator ["<" "<=" ">" ">=" "==" "!=" "<>" "in" "is"] @op) @compare +{ + let @op.node = (ast-node @op "cmpop") + attr (@op.node) _is_literal = (node-type @op) + edge @compare.node -> @op.node + attr (@compare.node -> @op.node) ops = (unnamed-child-index @op) +} + +; The `not in` and `is not` operators are complicated by the fact that the query +; `(comparison_operator "not in" @op)` +; matches _twice_ for each `not in` operator (in effect for both the `not` and `in` parts, even +; though these should have been aliased to a single token). To avoid producing duplicate operators, +; we only create an operator for _one_ of these matches, by checking whether the index is even. +(comparison_operator "not in"+ @op) @compare +{ + for op in @op { + let index = (unnamed-child-index op) + if (eq (mod index 2) 0) { + let op.node = (ast-node op "cmpop") + attr (op.node) _is_literal = "not in" + edge @compare.node -> op.node + attr (@compare.node -> op.node) ops = index + } + } +} + +(comparison_operator "is not"+ @op) @compare +{ + for op in @op { + let index = (unnamed-child-index op) + if (eq (mod index 2) 0) { + let op.node = (ast-node op "cmpop") + attr (op.node) _is_literal = "is not" + edge @compare.node -> op.node + attr (@compare.node -> op.node) ops = index + } + } +} + +;;;;;; End of Compare (`... < ...`, `... <= ...`, etc.) + +;;;;;; UnaryOp (`-x`, `~x`, etc.., `not x`) + +[ + (unary_operator argument: (_) @operand) + (not_operator argument: (_) @operand) +] @unaryop +{ + attr (@unaryop.node) operand = @operand.node + attr (@operand.node) ctx = "load" +} + +(unary_operator "~" @op) @unaryop +{ + attr (@unaryop.node) op = "~" +} + +(unary_operator "+") @unaryop +{ + attr (@unaryop.node) op = "uadd" +} + +(unary_operator "-") @unaryop +{ + attr (@unaryop.node) op = "usub" +} + + +(not_operator) @unaryop +{ + attr (@unaryop.node) op = "not" +} + +;;;;;; End of UnaryOp (`-x`, `not x`) + +;;;;;; Exec (`exec ...`) + +(exec_statement (_) @body) @exec +{ + attr (@exec.node) body = @body.node +} + +;;;;;; End of Exec (`exec ...`) + +;;;;;; Print (`print ...`) + +(print_statement argument: (_) @value) @print +{ + edge @print.node -> @value.node + attr (@print.node -> @value.node) values = (named-child-index @value) + attr (@value.node) ctx = "load" +} + +(print_statement (chevron (_) @dest)) @print +{ + attr (@print.node) dest = @dest.node + attr (@dest.node) ctx = "load" +} + +(print_statement ","? @comma .) @print +{ + var nl = #true + if some @comma + { + set nl = #false + } + attr (@print.node) nl = nl +} + +;;;;;; End of Print (`print ...`) + +;;;;;; Return (`return ...`) + +(return_statement (_) @value) @return +{ + attr (@return.node) value = @value.node + attr (@value.node) ctx = "load" +} + +;;;;;; End of Return (`return ...`) + +;;;;;; Yield and YieldFrom (`yield ...` and `yield from ...`) + +(yield (_) @value) @yield +{ + attr (@yield.node) value = @value.node + attr (@value.node) ctx = "load" +} + +;;;;;; End of Yield and YieldFrom (`yield ...` and `yield from ...`) + +;;;;;; Await (`await ...`) + +(await (_) @value) @await +{ + attr (@await.node) value = @value.node + attr (@value.node) ctx = "load" +} + +;;;;;; End of Await (`await ...`) + +;;;;;; Try (`try: ... except: ... else: ... finally: ...`) + +(try_statement body: (block (_) @stmt)) @try +{ + edge @try.node -> @stmt.node + attr (@try.node -> @stmt.node) body = (named-child-index @stmt) +} + +(try_statement (except_clause) @except) @try +{ + edge @try.node -> @except.node + attr (@try.node -> @except.node) handlers = (named-child-index @except) +} + +(try_statement (except_group_clause) @except) @try +{ + edge @try.node -> @except.node + attr (@try.node -> @except.node) handlers = (named-child-index @except) +} + +(try_statement (else_clause body: (block (_) @stmt))) @try +{ + edge @try.node -> @stmt.node + attr (@try.node -> @stmt.node) orelse = (named-child-index @stmt) +} + +(try_statement (finally_clause body: (block (_) @stmt))) @try +{ + edge @try.node -> @stmt.node + attr (@try.node -> @stmt.node) finalbody = (named-child-index @stmt) +} + +(except_clause body: (block (_) @stmt)) @except +{ + edge @except.node -> @stmt.node + attr (@except.node -> @stmt.node) body = (named-child-index @stmt) +} + +(except_clause type: (_) @type) @except +{ + attr (@except.node) type = @type.node + attr (@type.node) ctx = "load" +} + +(except_clause alias: (_) @name) @except +{ + attr (@except.node) name = @name.node + attr (@name.node) ctx = "store" +} + +(except_group_clause body: (block (_) @stmt)) @except +{ + edge @except.node -> @stmt.node + attr (@except.node -> @stmt.node) body = (named-child-index @stmt) +} + +(except_group_clause type: (_) @type) @except +{ + attr (@except.node) type = @type.node + attr (@type.node) ctx = "load" +} + +(except_group_clause alias: (_) @name) @except +{ + attr (@except.node) name = @name.node + attr (@name.node) ctx = "store" +} + +;;;;;; End of Try (`try: ... except: ... else: ... finally: ...`) + + +;;;;;; AssignExpr (`a := b`) + +(named_expression + name: (_) @name + value: (_) @value +) @assignexpr +{ + attr (@assignexpr.node) target = @name.node + attr (@name.node) ctx = "store" + attr (@assignexpr.node) value = @value.node + attr (@value.node) ctx = "load" +} + +;;;;;; End of AssignExpr (`a := b`) + +;;;;;; IfExpr (`a if b else c`) + +(conditional_expression + (expression) @body + (expression) @test + (expression) @orelse +) @ifexp +{ + attr (@ifexp.node) body = @body.node + attr (@body.node) ctx = "load" + attr (@ifexp.node) test = @test.node + attr (@test.node) ctx = "load" + attr (@ifexp.node) orelse = @orelse.node + attr (@orelse.node) ctx = "load" +} + +;;;;;; End of IfExpr (`a if b else c`) + +;;;;;; Attribute (`a.b`) + +(attribute + object: (_) @value + attribute: (_) @attr +) @attribute +{ + attr (@attribute.node) value = @value.node + attr (@value.node) ctx = "load" + attr (@attribute.node) attr = (source-text @attr) + ; Not actually used, but we need to set it to something. + attr (@attr.node) ctx = "load" +} + +;;;;;; End of Attribute (`a.b`) + +;;;;;; Subscript (`a[b]`) + +(subscript + value: (_) @value +) @subscript +{ + attr (@subscript.node) value = @value.node + attr (@value.node) ctx = "load" +} + +; Single subscript +(subscript + value: (_) + . + subscript: (_) @index + . +) @subscript +{ + attr (@subscript.node) index = @index.node + attr (@index.node) ctx = "load" +} + +; For expressions of the form `a[b, c]` we must explicitly synthesize an internal tuple node +; We do this and also hook it up: +(subscript + value: (_) + . + subscript: (_) @first + . + subscript: (_) +) @subscript +{ + let @subscript.tuple = (ast-node @first "Tuple") + attr (@subscript.tuple) ctx = "load" + attr (@subscript.node) index = @subscript.tuple + edge @subscript.tuple -> @first.node + attr (@subscript.tuple -> @first.node) elts = (named-child-index @first) + attr (@first.node) ctx = "load" +} + +(subscript + value: (_) + . + subscript: (_) + subscript: (_) @elt +) @subscript +{ + edge @subscript.tuple -> @elt.node + attr (@subscript.tuple -> @elt.node) elts = (named-child-index @elt) + attr (@elt.node) ctx = "load" +} + + +; Set the end position correctly +(subscript + value: (_) + . + subscript: (_) + subscript: (_) @last + . +) @subscript +{ + attr (@subscript.tuple) _location_end = (location-end @last) +} + + + +;;;;;; End of Subscript (`a[b]`) + +;;;;;; Slice (`a:b:c`) + +(slice start: (_) @start) @slice +{ + attr (@slice.node) start = @start.node + attr (@start.node) ctx = "load" +} + +(slice stop: (_) @stop) @slice +{ + attr (@slice.node) stop = @stop.node + attr (@stop.node) ctx = "load" +} + + +(slice step: (_) @step) @slice +{ + attr (@slice.node) step = @step.node + attr (@step.node) ctx = "load" +} + +;;;;;; End of Slice (`a:b:c`) + +;;;;;; While (`while a: ... else: ...`) + +(while_statement condition: (_) @test) @while +{ + attr (@while.node) test = @test.node + attr (@test.node) ctx = "load" +} + +(while_statement body: (block (_) @stmt)) @while +{ + edge @while.node -> @stmt.node + attr (@while.node -> @stmt.node) body = (named-child-index @stmt) +} + +(while_statement alternative: (else_clause (block (_) @stmt))) @while +{ + edge @while.node -> @stmt.node + attr (@while.node -> @stmt.node) orelse = (named-child-index @stmt) +} + +;;;;;; End of While (`while a: ... else: ...`) + +;;;;;; With (`with a as b, c as d: ...`) + +(with_statement (with_clause . (with_item) @first)) @with +{ + attr (@with.node) _skip_to = @first.node + let @with.first = @first.node +} + +(with_item + value: (_) @value +) @with +{ + attr (@with.node) context_expr = @value.node + attr (@value.node) ctx = "load" +} + +(with_item + alias: (_) @alias +) @with +{ + attr (@with.node) optional_vars = @alias.node + attr (@alias.node) ctx = "store" +} + + +(with_clause + (with_item) @with1 + . (comment)* . + (with_item) @with2 +) +{ + edge @with1.node -> @with2.node + attr (@with1.node -> @with2.node) body = 0 +} + + +(with_statement + (with_clause + (with_item) @last + . + ) + body: (block (_) @stmt) +) +{ + edge @last.node -> @stmt.node + attr (@last.node -> @stmt.node) body = (named-child-index @stmt) +} + + + +;;;;;; End of With (`with a as b, c as d: ...`) + +;;;;;; Match (`match a: ...`) + +(match_statement + subject: (_) @subject +) @match +{ + attr (@match.node) subject = @subject.node + attr (@subject.node) ctx = "load" +} + +(match_statement + cases: (cases (case_block) @case) +) @match +{ + edge @match.node -> @case.node + attr (@match.node -> @case.node) cases = (named-child-index @case) +} + +(case_block + pattern: (_) @pattern +) @case +{ + attr (@case.node) pattern = @pattern.node +} + +(case_block + guard: (_) @guard +) @case +{ + attr (@case.node) guard = @guard.node +} + +(guard + test: (_) @test +) @guard +{ + attr (@guard.node) test = @test.node + attr (@test.node) ctx = "load" +} + +(case_block + body: (block (_) @stmt) +) @case +{ + edge @case.node -> @stmt.node + attr (@case.node -> @stmt.node) body = (named-child-index @stmt) +} + +;;; The various pattern shapes need to have their children set up correctly + + +(match_as_pattern + pattern: (_) @pattern +) @match +{ + attr (@match.node) pattern = @pattern.node +} + +(match_as_pattern + alias: (_) @alias +) @match +{ + attr (@match.node) alias = @alias.node + attr (@alias.node) ctx = "store" +} + +(match_or_pattern + (_) @pattern +) @match_or_pattern +{ + edge @match_or_pattern.node -> @pattern.node + attr (@match_or_pattern.node -> @pattern.node) patterns = (named-child-index @pattern) +} + +(match_literal_pattern !real (_) @literal) @match_literal_pattern +{ + attr (@match_literal_pattern.node) literal = @literal.node + attr (@literal.node) ctx = "load" +} + +(match_literal_pattern + prefix_operator: _? @prefix_op + real: (_) @left + operator: _? @op + imaginary: (_)? @right +) @match_literal_pattern +{ + ; Set `left_node` to point to the left hand side (or only part) of the literal, + ; synthesizing it if needed. + var left_node = #null + if some @prefix_op { + set left_node = (ast-node @left "UnaryOp") + attr (left_node) _start_location = (location-start @prefix_op) + attr (left_node) operand = @left.node + attr (left_node) op = "usub" + } else { + set left_node = @left.node + } + attr (left_node) ctx = "load" + ; Synthesize the binary operator node, if needed. + var literal_node = #null + if some @right { + ; Synthesize the node for the binary operation + set literal_node = (ast-node @match_literal_pattern "BinOp") + attr (literal_node) left = left_node + attr (literal_node) right = @right.node + attr (literal_node) op = (source-text @op) + attr (@right.node) ctx = "load" + attr (literal_node) ctx = "load" + } else { + set literal_node = left_node + } + attr (@match_literal_pattern.node) literal = literal_node +} + +(match_capture_pattern (identifier) @pattern) @match_capture_pattern +{ + attr (@match_capture_pattern.node) variable = @pattern.node + attr (@pattern.node) ctx = "store" +} + +; We have a structure where the match_value_pattern has a child for each +; step in the attribute access. +; We will turn each child into an actual attribute access of its predecessor. +; +; We start with (@match_value_pattern) -> id_1 .. id_n +; result is +; id_1 is a Name +; for i > 1: +; @id_i -skip-> Attribute -value-> @id_{i-1} +; -attr-> #text +; @match_value_pattern -value-> @id_n + +(match_value_pattern + (identifier) @obj + . + (identifier) @attr +) @match_value_pattern +{ + let attribute = (ast-node @attr "Attribute") + attr (@attr.node) _skip_to = attribute + attr (attribute) value = @obj.node + attr (attribute) attr = (source-text @attr) + attr (attribute) ctx = "load" +} + +; First id +; this needs a ctx +(match_value_pattern + . + (identifier) @id +) @match_value_pattern +{ + attr (@id.node) ctx = "load" +} + +; Last id +; this should be linked from the pattern. +(match_value_pattern + (identifier) @attr + . +) @match_value_pattern +{ + attr (@match_value_pattern.node) value = @attr.node +} + +; Group patterns only exist in the parser. +; They are elided from the AST, where the information is +; instead recorded in the field `parenthesised`. +(match_group_pattern + content: (_) @pattern +) @match_group_pattern +{ + attr (@match_group_pattern.node) _skip_to = @pattern.node + attr (@match_group_pattern.node) parenthesised = #true +} + +(match_sequence_pattern + (_) @pattern +) @match_sequence_pattern +{ + edge @match_sequence_pattern.node -> @pattern.node + attr (@match_sequence_pattern.node -> @pattern.node) patterns = (named-child-index @pattern) +} + +(match_star_pattern + target: (_) @target +) @match_star_pattern +{ + attr (@match_star_pattern.node) target = @target.node +} + +(match_mapping_pattern + [ + (match_key_value_pattern) @mapping + (match_double_star_pattern) @mapping + ] +) @pattern +{ + edge @pattern.node -> @mapping.node + attr (@pattern.node -> @mapping.node) mappings = (named-child-index @mapping) +} + +(match_double_star_pattern + target: (_) @target +) @match_double_star_pattern +{ + attr (@match_double_star_pattern.node) target = @target.node +} + +(match_key_value_pattern + key: (_) @key + value: (_) @value +) @key_value +{ + attr (@key_value.node) key = @key.node + attr (@key_value.node) value = @value.node +} + +; Similar situation to the match_value_pattern. +; We have a structure where the match_class_pattern has a child for each +; step in the attribute access. +; We will turn each child into an actual attribute access of its predecessor. + +(pattern_class_name + (identifier) @obj + . + (identifier) @attr +) +{ + let attribute = (ast-node @attr "Attribute") + attr (@attr.node) _skip_to = attribute + attr (attribute) value = @obj.node + attr (attribute) attr = (source-text @attr) + attr (attribute) ctx = "load" +} + +; First id +(pattern_class_name + . + (identifier) @id +) +{ + attr (@id.node) ctx = "load" +} + +; Last id +; this should be linked from the pattern. +(match_class_pattern + class: (pattern_class_name + (identifier) @attr + . + ) +) @match_class_pattern +{ + attr (@match_class_pattern.node) class_name = @attr.node +} + +(match_class_pattern + (match_positional_pattern (_) @positional) @positional_pattern +) @match_class_pattern +{ + edge @match_class_pattern.node -> @positional.node + attr (@match_class_pattern.node -> @positional.node) positional = (named-child-index @positional_pattern) +} + +(match_class_pattern + (match_keyword_pattern) @keyword +) @match_class_pattern +{ + edge @match_class_pattern.node -> @keyword.node + attr (@match_class_pattern.node -> @keyword.node) keyword = (named-child-index @keyword) +} + +(match_keyword_pattern + attribute: (_) @attribute +) @match_keyword_pattern +{ + attr (@match_keyword_pattern.node) attribute = @attribute.node + attr (@attribute.node) ctx = "load" +} + +(match_keyword_pattern + value: (_) @pattern +) @match_keyword_pattern +{ attr (@match_keyword_pattern.node) value = @pattern.node} + +;;;;;; End of Match (`match a: ...`) + +;;;;;; Lambda (`lambda a: ...`) + +; Lambdas are tricky, much like function definitions. +; +; One complication is that we need to distinguish the cases where the parameter has a default value and +; where it does not. This leads to an unfortunate explosion in mostly similar cases... + + +(lambda body: (_) @body) @lambda +{ + + ; Lambdas contain a `Function` much like regular functions. + let @lambda.function = (ast-node @lambda "Function") + attr (@lambda.function) name = "lambda" + attr (@lambda.node) inner_scope = @lambda.function + + ; The single child of this function is a synthesised return statement. + let return = (ast-node @body "Return") + edge @lambda.function -> return + attr (@lambda.function -> return) body = 0 + + attr (return) value = @body.node + attr (@body.node) ctx = "load" +} + +; Lambdas without parameters just get a dummy `arguments` child. +(lambda !parameters) @lambda +{ + attr (@lambda.node) args = (ast-node @lambda "arguments") +} + +(lambda parameters: (_) @params) @lambda +{ + attr (@lambda.node) args = @params.node +} + +(lambda + parameters: (lambda_parameters + (list_splat_pattern vararg: (_) @vararg) @starred + ) +) @lambda +{ + attr (@lambda.function) vararg = @vararg.node + attr (@starred.node) ctx = "param" ; Not actually used + attr (@vararg.node) ctx = "param" +} + +(lambda + parameters: (lambda_parameters + (dictionary_splat_pattern kwarg: (_) @kwarg) + ) +) @lambda +{ + attr (@lambda.function) kwarg = @kwarg.node + attr (@kwarg.node) ctx = "param" +} + +(lambda + parameters: (lambda_parameters + [(list_splat_pattern) (keyword_separator)]? @is_kwarg + [ + (identifier) @name + (default_parameter + name: (_) @name + value: (_) @value + ) + ] @param + ) @params +) @lambda +{ + let none = (ast-node @params "None") + attr (none) _is_literal = #null + attr (none) ctx = "load" + edge @params.node -> none + + ; Even though lambda parameters cannot have annotations, we must still record this fact. + if some @is_kwarg { + attr (@params.node -> none) kw_annotations = (named-child-index @param) + } else { + attr (@params.node -> none) annotations = (named-child-index @param) + } + + edge @lambda.function -> @name.node + attr (@name.node) ctx = "param" + + if some @is_kwarg { + attr (@lambda.function -> @name.node) kwonlyargs = (named-child-index @param) + } + else {  + attr (@lambda.function -> @name.node) args = (named-child-index @param) + } + + var default_node = none + if some @value { + set default_node = @value.node + edge @params.node -> default_node + attr (default_node) ctx = "load" + } + if some @is_kwarg { + attr (@params.node -> default_node) kw_defaults = (named-child-index @param) + } else { + attr (@params.node -> default_node) defaults = (named-child-index @param) + } +} + +;;;;;; End of Lambda (`lambda a: ...`) + +;;;;;; Function (`def a(b, c): ...`) + +; Much like lambdas, the main difficulty here is that we need to account for the absence of the positional +; argument separator. We do this using the exact same machinery. +; +; Also, all arguments can now also have a type/annotation, so get ready for _twice_ the number of cases. + +(function_definition + name: (_) @name + ":" @end +) @funcdef +{ + let end = (location-end @end) + + attr (@funcdef.node) _location_end = end + + edge @funcdef.node -> @name.node + attr (@funcdef.node -> @name.node) targets = 0 + attr (@name.node) ctx = "store" + + let @funcdef.funcexpr = (ast-node @funcdef "FunctionExpr") + attr (@funcdef.funcexpr) _location_end = end + attr (@funcdef.node) value = @funcdef.funcexpr + attr (@funcdef.funcexpr) name = (source-text @name) + + let @funcdef.function = (ast-node @funcdef "Function") + attr (@funcdef.function) _location_end = end + attr (@funcdef.function) name = (source-text @name) + attr (@funcdef.funcexpr) inner_scope = @funcdef.function +} + +(function_definition + body: (block (_) @stmt) +) @funcdef +{ + edge @funcdef.function -> @stmt.node + attr (@funcdef.function -> @stmt.node) body = (named-child-index @stmt) +} + +(function_definition + parameters: (_) @params +) @funcdef +{ + attr (@funcdef.funcexpr) args = @params.node +} + + +(function_definition + parameters: (parameters + [(list_splat_pattern) (keyword_separator)]? @is_kwarg + [ + (identifier) @name + (default_parameter + name: (_) @name + value: (_) @value + ) + (typed_parameter + (identifier) @name + . + type: (type (expression) @type) + ) + (typed_default_parameter + name: (_) @name + type: (type (expression) @type) + value: (_) @value + ) + ] @param + ) @params +) @funcdef +{ + let none = (ast-node @params "None") + attr (none) _is_literal = #null + attr (none) ctx = "load" + edge @params.node -> none + + var type_node = none + if some @type { + set type_node = @type.node + edge @params.node -> type_node + attr (type_node) ctx = "load" + } + + if some @is_kwarg { + attr (@params.node -> type_node) kw_annotations = (named-child-index @param) + } else { + attr (@params.node -> type_node) annotations = (named-child-index @param) + } + + edge @funcdef.function -> @name.node + attr (@name.node) ctx = "param" + + if some @is_kwarg { + attr (@funcdef.function -> @name.node) kwonlyargs = (named-child-index @param) + } + else {  + attr (@funcdef.function -> @name.node) args = (named-child-index @param) + } + + var default_node = none + if some @value { + set default_node = @value.node + edge @params.node -> default_node + attr (default_node) ctx = "load" + } + if some @is_kwarg { + attr (@params.node -> default_node) kw_defaults = (named-child-index @param) + } else { + attr (@params.node -> default_node) defaults = (named-child-index @param) + } +} + +; `*args` argument +(function_definition + parameters: (parameters + [ + (list_splat_pattern vararg: (_) @name) @starred + (typed_parameter + (list_splat_pattern vararg: (_) @name) @starred + type: (type (expression) @type) + ) + ] + ) @params +) @funcdef +{ + attr (@funcdef.function) vararg = @name.node + attr (@starred.node) ctx = "param" ; Not actually used + attr (@name.node) ctx = "param" + if some @type { + attr (@params.node) varargannotation = @type.node + attr (@type.node) ctx = "load" + } +} + +; Return type +(function_definition + return_type: (type (expression) @type) +) @funcdef +{ + attr (@funcdef.funcexpr) returns = @type.node + attr (@type.node) ctx = "load" +} + +; `**kwargs` argument +(function_definition + (parameters + [ + (dictionary_splat_pattern kwarg: (identifier) @name) + (typed_parameter + (dictionary_splat_pattern kwarg: (identifier) @name) + type: (type (expression) @type) + ) + ] + ) @params +) @funcdef +{ + attr (@funcdef.function) kwarg = @name.node + attr (@name.node) ctx = "param" + if some @type { + attr (@params.node) kwargannotation = @type.node + attr (@type.node) ctx = "load" + } +} + +;;; Decorators + +(decorated_definition + . (decorator) @first + definition: (function_definition name: (_) @name ":" @end) @funcdef +) @decorator +{ + attr (@decorator.node) value = @first.node + attr (@decorator.node) _location_start = (location-start @funcdef) + attr (@decorator.node) _location_end = (location-end @end) + edge @decorator.node -> @name.node + attr (@decorator.node -> @name.node) targets = 0 +} + +(decorated_definition + . (decorator) @first + definition: (class_definition name: (_) @name ":" @end) @funcdef +) @decorator +{ + attr (@decorator.node) value = @first.node + attr (@decorator.node) _location_start = (location-start @funcdef) + attr (@decorator.node) _location_end = (location-end @end) + edge @decorator.node -> @name.node + attr (@decorator.node -> @name.node) targets = 0 +} + +(decorator (expression) @exp) @decorator +{ + attr (@decorator.node) _location_start = (location-start @exp) + attr (@exp.node) ctx = "load" +} + +(decorated_definition + (decorator (expression) @exp1) @dec1 + . (comment)* . + (decorator (expression) @exp2) @dec2 +) @decorator +{ + attr (@dec1.node) func = @exp1.node + edge @dec1.node -> @dec2.node + attr (@dec1.node -> @dec2.node) positional_args = 0 +} + +(decorated_definition + (decorator (expression) @exp) @last + . (comment)* . + definition: (function_definition) @funcdef +) @decorator +{ + attr (@last.node) func = @exp.node + edge @last.node -> @funcdef.funcexpr + attr (@last.node -> @funcdef.funcexpr) positional_args = 0 + attr (@last.node) _location_end = (location-end @exp) +} + +(decorated_definition + (decorator (expression) @exp) @last + . (comment)* . + definition: (class_definition) @class +) @decorator +{ + attr (@last.node) func = @exp.node + edge @last.node -> @class.class_expr + attr (@last.node -> @class.class_expr) positional_args = 0 + attr (@last.node) _location_end = (location-end @exp) +} + +;;; Type parameters + +(function_definition + type_parameters: (type_parameters type_parameter: (_) @param) +) @funcdef +{ + edge @funcdef.function -> @param.node + attr (@funcdef.function -> @param.node) type_parameters = (named-child-index @param) +} + +(class_definition + type_parameters: (type_parameters type_parameter: (_) @param) +) @class +{ + edge @class.class_expr -> @param.node + attr (@class.class_expr -> @param.node) type_parameters = (named-child-index @param) +} + +;;;;;; End of Function (`def a(b, c): ...`) + +;;;;;; TypeAlias (`type a[...] = ...`) + +(type_alias_statement + name: (_) @name + value: (_) @value +) @type_alias +{ + attr (@name.node) ctx = "store" + attr (@value.node) ctx = "load" + attr (@type_alias.node) name = @name.node + attr (@type_alias.node) value = @value.node +} + +(type_alias_statement + type_parameters: (type_parameters type_parameter: (_) @param) +) @type_alias +{ + edge @type_alias.node -> @param.node + attr (@type_alias.node -> @param.node) type_parameters = (named-child-index @param) +} + +;;;;;; End of TypeAlias (`type a[...] = ...`) + +;;;;;; Type parameters (`T: ..., *T, **T`) + +(typevar_parameter + name: (_) @name + bound: (_)? @bound +) @typevar +{ + attr (@name.node) ctx = "store" + attr (@typevar.node) name = @name.node + if some @bound { + attr (@bound.node) ctx = "load" + attr (@typevar.node) bound = @bound.node + } +} + +(typevartuple_parameter + name: (_) @name +) @typevartuple +{ + attr (@name.node) ctx = "store" + attr (@typevartuple.node) name = @name.node +} + +(paramspec_parameter + name: (_) @name +) @paramspec +{ + attr (@name.node) ctx = "store" + attr (@paramspec.node) name = @name.node +} + +;;;;;; End of Type parameters (`T: ..., *T, **T`) + +; Nodes with an `elts` field +[ + ; Left hand side of an assignment such as `foo, bar = ...` + (pattern_list element: (_) @elt) @parent + + ; An unadorned tuple (such as in `x = y, z`) + (expression_list element: (_) @elt) @parent + + ; A regular tuple such as `(x, y, z)` + (tuple element: (_) @elt) @parent + + (tuple_pattern element: (_) @elt) @parent +] +{ + edge @parent.node -> @elt.node + attr (@parent.node -> @elt.node) elts = (named-child-index @elt) +} + + + +; Expressions that do not produce an `Expr` node in the AST. +(expression_statement [(assignment) (augmented_assignment)] @inner) @outer +{ + attr (@outer.node) _skip_to = @inner.node +} + +; Expressions that may result in an `Expr` node in the AST +; ("may" because of the `_skip_to` field). +(expression_statement . (_) @expr . ) @stmt +{ + attr (@stmt.node) value = @expr.node + attr (@expr.node) ctx = "load" +} + + +; Sequence expressions where the elements inherit the load/store context +[ + (list element: (_) @elt) + (tuple element: (_) @elt) + (tuple_pattern element: (_) @elt) + (pattern_list element: (_) @elt) + (expression_list element: (_) @elt) + (parenthesized_expression inner: (_) @elt) + (set element: (_) @elt) + (match_sequence_pattern (_) @elt) +] @seq +{ + attr (@elt.node) _inherited_ctx = @seq.node +} + +[(tuple element: (_)) (tuple_pattern)] @tup +{ + attr (@tup.node) parenthesised = #true +} diff --git a/python/extractor/tsg-python/rust-toolchain.toml b/python/extractor/tsg-python/rust-toolchain.toml new file mode 100644 index 00000000000..fe5c5df29ff --- /dev/null +++ b/python/extractor/tsg-python/rust-toolchain.toml @@ -0,0 +1,7 @@ +# This file specifies the Rust version used to develop and test the Python +# extractor. It is set to the lowest version of Rust we want to support. + +[toolchain] +channel = "1.68" +profile = "minimal" +components = [ "rustfmt" ] diff --git a/python/extractor/tsg-python/src/main.rs b/python/extractor/tsg-python/src/main.rs new file mode 100644 index 00000000000..fa528d8138d --- /dev/null +++ b/python/extractor/tsg-python/src/main.rs @@ -0,0 +1,572 @@ +// -*- coding: utf-8 -*- +// ------------------------------------------------------------------------------------------------ +// Copyright © 2021, GitHub. +// Licensed under either of Apache License, Version 2.0, or MIT license, at your option. +// Please see the LICENSE-APACHE or LICENSE-MIT files in this distribution for license details. +// ------------------------------------------------------------------------------------------------ + +use std::path::Path; + +use anyhow::anyhow; +use anyhow::Context as _; +use anyhow::Result; +use clap::App; +use clap::Arg; +use tree_sitter::Parser; +use tree_sitter_graph::ast::File; +use tree_sitter_graph::functions::Functions; +use tree_sitter_graph::ExecutionConfig; +use tree_sitter_graph::Identifier; +use tree_sitter_graph::NoCancellation; +use tree_sitter_graph::Variables; + +const BUILD_VERSION: &'static str = env!("CARGO_PKG_VERSION"); + +pub mod extra_functions { + use tree_sitter_graph::functions::{Function, Parameters}; + use tree_sitter_graph::graph::{Graph, Value}; + use tree_sitter_graph::{ExecutionError, Identifier}; + + pub struct Location; + + fn get_location(node: Value, graph: &Graph) -> Result { + let node = graph[node.into_syntax_node_ref()?]; + let start = node.start_position(); + let end = node.end_position(); + Ok(Value::List( + vec![start.row, start.column, end.row, end.column] + .into_iter() + .map(|v| Value::from(v as u32)) + .collect(), + )) + } + + impl Function for Location { + fn call( + &self, + graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = parameters.param()?; + parameters.finish()?; + get_location(node, graph) + } + } + + pub struct LocationStart; + + impl Function for LocationStart { + fn call( + &self, + graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + parameters.finish()?; + let start = node.start_position(); + Ok(Value::List( + vec![start.row, start.column] + .into_iter() + .map(|v| Value::from(v as u32)) + .collect(), + )) + } + } + + pub struct LocationEnd; + + impl Function for LocationEnd { + fn call( + &self, + graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + parameters.finish()?; + let end = node.end_position(); + Ok(Value::List( + vec![end.row, end.column] + .into_iter() + .map(|v| Value::from(v as u32)) + .collect(), + )) + } + } + + pub struct AstNode; + + impl Function for AstNode { + fn call( + &self, + graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let tree_sitter_node = parameters.param()?; + let kind = parameters.param()?; + parameters.finish()?; + let node = graph.add_graph_node(); + let loc = get_location(tree_sitter_node, graph)?; + graph[node] + .attributes + .add(Identifier::from("_location"), loc) + .map_err(|_| { + ExecutionError::DuplicateAttribute(format!( + " _location on graph node ({:?})", + node + )) + })?; + graph[node] + .attributes + .add(Identifier::from("_kind"), kind) + .map_err(|_| { + ExecutionError::DuplicateAttribute(format!(" _kind on graph node ({:?})", node)) + })?; + Ok(Value::GraphNode(node)) + } + } + + /// A struct representing the prefix on a Python string. + struct Prefix { + flags: String, + quotes: String, + } + + impl Prefix { + fn full(&self) -> String { + format!("{}{}", self.flags, self.quotes) + } + + fn safe(&self) -> Prefix { + Prefix { + flags: self.flags.clone().replace("f", "").replace("F", ""), + quotes: self.quotes.clone(), + } + } + } + + fn get_prefix(s: &str) -> Prefix { + let flags_matcher = regex::Regex::new("^[bfurBFUR]{0,2}").unwrap(); + let mut end = 0; + let flags = match flags_matcher.find(s) { + Some(m) => { + end = m.end(); + &s[m.start()..m.end()] + } + None => "", + }; + let mut quotes = ""; + if s[end..].starts_with("\"\"\"") { + quotes = "\"\"\""; + } else if s[end..].starts_with("'''") { + quotes = "'''"; + } else if s[end..].starts_with('"') { + quotes = "\""; + } else if s[end..].starts_with('\'') { + quotes = "'"; + } else if s[end..].starts_with('}') { + quotes = "}"; + } + Prefix { + flags: flags.to_lowercase().to_owned(), + quotes: quotes.to_owned(), + } + } + + #[test] + fn test_get_prefix() { + let p = get_prefix("rb'''hello'''"); + assert_eq!(p.flags, "rb"); + assert_eq!(p.quotes, "'''"); + let p = get_prefix("Br\"\"\"hello\"\"\""); + assert_eq!(p.flags, "Br"); + assert_eq!(p.quotes, "\"\"\""); + let p = get_prefix("FR\"hello\""); + assert_eq!(p.flags, "FR"); + assert_eq!(p.quotes, "\""); + let p = get_prefix("uR'hello'"); + assert_eq!(p.flags, "uR"); + assert_eq!(p.quotes, "'"); + let p = get_prefix("''"); + assert_eq!(p.flags, ""); + assert_eq!(p.quotes, "'"); + let p = get_prefix("\"\""); + assert_eq!(p.flags, ""); + assert_eq!(p.quotes, "\""); + let p = get_prefix("\"\"\"\"\"\""); + assert_eq!(p.flags, ""); + assert_eq!(p.quotes, "\"\"\""); + } + + fn get_string_contents(s: String) -> String { + let prefix = get_prefix(&s); + let contents = s.clone(); + let contents = contents.strip_prefix(prefix.full().as_str()).unwrap(); + let contents = contents.strip_suffix(prefix.quotes.as_str()).unwrap(); + + contents.to_owned() + } + + #[test] + fn test_get_string_contents() { + let s = "rb'''hello'''"; + assert_eq!(get_string_contents(s.to_owned()), "hello"); + let s = "Br\"\"\"hello\"\"\""; + assert_eq!(get_string_contents(s.to_owned()), "hello"); + let s = "FR\"hello\""; + assert_eq!(get_string_contents(s.to_owned()), "hello"); + let s = "uR'hello'"; + assert_eq!(get_string_contents(s.to_owned()), "hello"); + let s = "''"; + assert_eq!(get_string_contents(s.to_owned()), ""); + let s = "\"\""; + assert_eq!(get_string_contents(s.to_owned()), ""); + let s = "\"\"\"\"\"\""; + assert_eq!(get_string_contents(s.to_owned()), ""); + let s = "''''''"; + assert_eq!(get_string_contents(s.to_owned()), ""); + } + + pub struct StringPrefix; + + impl Function for StringPrefix { + fn call( + &self, + graph: &mut Graph, + source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + parameters.finish()?; + let prefix = get_prefix(&source[node.byte_range()]).full(); + Ok(Value::String(prefix)) + } + } + + pub struct StringContents; + + impl Function for StringContents { + fn call( + &self, + graph: &mut Graph, + source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + parameters.finish()?; + let contents = get_string_contents(source[node.byte_range()].to_owned()); + Ok(Value::String(contents)) + } + } + + pub struct StringQuotes; + + impl Function for StringQuotes { + fn call( + &self, + graph: &mut Graph, + source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + parameters.finish()?; + let prefix = get_prefix(&source[node.byte_range()]); + Ok(Value::String(prefix.quotes)) + } + } + + // Gets a version of the prefix that can be used in a call to `literal_eval`. To do so, we must remove + // any `f` or `F` characters, if present. + pub struct StringSafePrefix; + + impl Function for StringSafePrefix { + fn call( + &self, + graph: &mut Graph, + source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + parameters.finish()?; + let prefix = get_prefix(&source[node.byte_range()]).full(); + let prefix = prefix.replace("f", "").replace("F", ""); + Ok(Value::String(prefix)) + } + } + + // Gets a version of the string where `f` and `F` have been stripped from the prefix. + pub struct SafeString; + + impl Function for SafeString { + fn call( + &self, + graph: &mut Graph, + source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + parameters.finish()?; + let prefix = get_prefix(&source[node.byte_range()]); + let contents = get_string_contents(source[node.byte_range()].to_owned()); + let s = format!("{}{}{}", prefix.safe().full(), contents, prefix.quotes); + Ok(Value::String(s)) + } + } + + pub struct UnnamedChildIndex; + + impl Function for UnnamedChildIndex { + fn call( + &self, + graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + parameters.finish()?; + let parent = match node.parent() { + Some(parent) => parent, + None => { + return Err(ExecutionError::FunctionFailed( + "unnamed-child-index".into(), + format!("Cannot call child-index on the root node"), + )) + } + }; + let mut tree_cursor = parent.walk(); + let index = parent + .children(&mut tree_cursor) + .position(|child| child == node) + .ok_or_else(|| { + ExecutionError::FunctionFailed( + "unnamed-child-index".into(), + format!("Called child-index on a non-named child"), + ) + })?; + Ok(Value::Integer(index as u32)) + } + } + + pub struct ConcatenateStrings; + + impl Function for ConcatenateStrings { + fn call( + &self, + _graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let mut result = String::new(); + while let Ok(param) = parameters.param() { + let string = param.into_string()?; + result.push_str(string.as_str()); + } + Ok(Value::String(result)) + } + } + + pub struct InstanceOf; + + impl Function for InstanceOf { + fn call( + &self, + graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + let class_name = parameters.param()?.into_string()?; + parameters.finish()?; + let node_type = node.kind(); + let class_name = class_name.as_str(); + let is_instance = node_type == class_name; + Ok(Value::Boolean(is_instance)) + } + } + + pub struct GetParent; + + impl Function for GetParent { + fn call( + &self, + graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + parameters.finish()?; + let parent = node.parent().ok_or_else(|| { + ExecutionError::FunctionFailed( + "get-parent".into(), + format!("Cannot call get-parent on the root node"), + ) + })?; + Ok(Value::SyntaxNode(graph.add_syntax_node(parent))) + } + } + + pub struct HasNamedChild; + + impl Function for HasNamedChild { + fn call( + &self, + graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + let field_name = parameters.param()?.into_string()?; + parameters.finish()?; + let field_name = field_name.as_str(); + let has_named_child = node.child_by_field_name(field_name).is_some(); + Ok(Value::Boolean(has_named_child)) + } + } + + pub struct IsBooleanOperator; + + impl Function for IsBooleanOperator { + fn call( + &self, + graph: &mut Graph, + source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let node = graph[parameters.param()?.into_syntax_node_ref()?]; + let expected_op_type = parameters.param()?.into_string()?; + parameters.finish()?; + if let Some(op) = node.child_by_field_name("operator") { + let op_type = source[op.byte_range()].to_string(); + let is_boolean_op = expected_op_type == op_type; + Ok(Value::Boolean(is_boolean_op)) + } else { + Ok(Value::Boolean(false)) + } + } + } + + pub struct Modulo; + + impl Function for Modulo { + fn call( + &self, + _graph: &mut Graph, + _source: &str, + parameters: &mut dyn Parameters, + ) -> Result { + let left = parameters.param()?.into_integer()?; + let right = parameters.param()?.into_integer()?; + parameters.finish()?; + Ok(Value::Integer(left % right)) + } + } +} + +fn main() -> Result<()> { + let matches = App::new("tsg-python") + .version(BUILD_VERSION) + .author("Taus Brock-Nannestad ") + .about("Extracts a Python AST from the parse tree given by tree-sitter-python") + .arg( + Arg::with_name("tsg") + .short("t") + .long("tsg") + .takes_value(true) + .required(false), + ) + .arg(Arg::with_name("source").index(1).required(true)) + .get_matches(); + + let tsg_path = if matches.is_present("tsg") { + Path::new(matches.value_of("tsg").unwrap()) + .display() + .to_string() + } else { + "bundled `python.tsg`".to_owned() + }; + let source_path = Path::new(matches.value_of("source").unwrap()); + let language = tree_sitter_python::language(); + let mut parser = Parser::new(); + parser.set_language(language)?; + // Statically include `python.tsg`: + let tsg = if matches.is_present("tsg") { + std::fs::read(&tsg_path).with_context(|| format!("Error reading TSG file {}", tsg_path))? + } else { + include_bytes!("../python.tsg").to_vec() + }; + let tsg = String::from_utf8(tsg)?; + let source = std::fs::read(source_path) + .with_context(|| format!("Error reading source file {}", source_path.display()))?; + let source = String::from_utf8(source)?; + let tree = parser + .parse(&source, None) + .ok_or_else(|| anyhow!("Could not parse {}", source_path.display()))?; + let file = File::from_str(language, &tsg) + .with_context(|| anyhow!("Error parsing TSG file {}", tsg_path))?; + let mut functions = Functions::stdlib(); + functions.add(Identifier::from("location"), extra_functions::Location); + functions.add( + Identifier::from("location-start"), + extra_functions::LocationStart, + ); + functions.add( + Identifier::from("location-end"), + extra_functions::LocationEnd, + ); + functions.add( + Identifier::from("string-prefix"), + extra_functions::StringPrefix, + ); + functions.add( + Identifier::from("string-contents"), + extra_functions::StringContents, + ); + + functions.add( + Identifier::from("string-quotes"), + extra_functions::StringQuotes, + ); + + functions.add( + Identifier::from("string-safe-prefix"), + extra_functions::StringSafePrefix, + ); + + functions.add(Identifier::from("safe-string"), extra_functions::SafeString); + + functions.add( + Identifier::from("unnamed-child-index"), + extra_functions::UnnamedChildIndex, + ); + functions.add(Identifier::from("ast-node"), extra_functions::AstNode); + + functions.add( + Identifier::from("concatenate-strings"), + extra_functions::ConcatenateStrings, + ); + + functions.add(Identifier::from("instance-of"), extra_functions::InstanceOf); + + functions.add(Identifier::from("get-parent"), extra_functions::GetParent); + + functions.add( + Identifier::from("has-named-child"), + extra_functions::HasNamedChild, + ); + functions.add( + Identifier::from("is-boolean-operator"), + extra_functions::IsBooleanOperator, + ); + + functions.add(Identifier::from("mod"), extra_functions::Modulo); + let globals = Variables::new(); + let mut config = ExecutionConfig::new(&mut functions, &globals).lazy(false); + let graph = file + .execute(&tree, &source, &mut config, &NoCancellation) + .with_context(|| format!("Could not execute TSG file {}", tsg_path))?; + print!("{}", graph.pretty_print()); + Ok(()) +} diff --git a/python/extractor/tsg-python/tree-sitter-python/.gitignore b/python/extractor/tsg-python/tree-sitter-python/.gitignore new file mode 100644 index 00000000000..c99713834f2 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/.gitignore @@ -0,0 +1,7 @@ +Cargo.lock +package-lock.json +node_modules +build +*.log +/examples/*/ +/target/ diff --git a/python/extractor/tsg-python/tree-sitter-python/.npmignore b/python/extractor/tsg-python/tree-sitter-python/.npmignore new file mode 100644 index 00000000000..8e142f748b2 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/.npmignore @@ -0,0 +1,6 @@ +corpus +examples +build +script +target +bindings/rust diff --git a/python/extractor/tsg-python/tree-sitter-python/BUILD.bazel b/python/extractor/tsg-python/tree-sitter-python/BUILD.bazel new file mode 100644 index 00000000000..98b636c0d79 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/BUILD.bazel @@ -0,0 +1,38 @@ +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") +load("@tsg_python_crate_index//:defs.bzl", "aliases", "all_crate_deps") + +package(default_visibility = ["//visibility:public"]) + +# This will run the build script from the root of the workspace, and +# collect the outputs. +cargo_build_script( + name = "tsg-build-script", + srcs = ["bindings/rust/build.rs"], + data = glob([ + "src/**", + ]), + deps = all_crate_deps( + build = True, + ), +) + +rust_library( + name = "tree-sitter-python", + srcs = [ + "bindings/rust/lib.rs", + ], + aliases = aliases(), + compile_data = glob([ + "src/**", + "queries/**", + ]) + [ + "grammar.js", + ], + proc_macro_deps = all_crate_deps( + proc_macro = True, + ), + deps = [":tsg-build-script"] + all_crate_deps( + normal = True, + ), +) diff --git a/python/extractor/tsg-python/tree-sitter-python/Cargo.toml b/python/extractor/tsg-python/tree-sitter-python/Cargo.toml new file mode 100644 index 00000000000..4c863753b93 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "tree-sitter-python" +description = "Python grammar for the tree-sitter parsing library" +version = "0.19.0" +authors = [ + "Max Brunsfeld ", + "Douglas Creager ", +] +license = "MIT" +readme = "bindings/rust/README.md" +keywords = ["incremental", "parsing", "python"] +categories = ["parsing", "text-editors"] +repository = "https://github.com/tree-sitter/tree-sitter-python" +edition = "2018" + +build = "bindings/rust/build.rs" +include = [ + "bindings/rust/*", + "grammar.js", + "queries/*", + "src/*", +] + +[lib] +path = "bindings/rust/lib.rs" + +[dependencies] +tree-sitter = ">= 0.20, < 0.21" + +[build-dependencies] +cc = "1.0" diff --git a/python/extractor/tsg-python/tree-sitter-python/LICENSE b/python/extractor/tsg-python/tree-sitter-python/LICENSE new file mode 100644 index 00000000000..ff8ed93cb0d --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Max Brunsfeld + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/python/extractor/tsg-python/tree-sitter-python/README.md b/python/extractor/tsg-python/tree-sitter-python/README.md new file mode 100644 index 00000000000..a7cb44c77ef --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/README.md @@ -0,0 +1,13 @@ +tree-sitter-python +================== + +[![build](https://github.com/tree-sitter/tree-sitter-python/actions/workflows/ci.yml/badge.svg)](https://github.com/tree-sitter/tree-sitter-python/actions/workflows/ci.yml) + +Python grammar for [tree-sitter][]. + +[tree-sitter]: https://github.com/tree-sitter/tree-sitter + +#### References + +* [Python 2 Grammar](https://docs.python.org/2/reference/grammar.html) +* [Python 3 Grammar](https://docs.python.org/3/reference/grammar.html) diff --git a/python/extractor/tsg-python/tree-sitter-python/binding.gyp b/python/extractor/tsg-python/tree-sitter-python/binding.gyp new file mode 100644 index 00000000000..74256d45759 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/binding.gyp @@ -0,0 +1,19 @@ +{ + "targets": [ + { + "target_name": "tree_sitter_python_binding", + "include_dirs": [ + " +#include "nan.h" + +using namespace v8; + +extern "C" TSLanguage * tree_sitter_python(); + +namespace { + +NAN_METHOD(New) {} + +void Init(Local exports, Local module) { + Local tpl = Nan::New(New); + tpl->SetClassName(Nan::New("Language").ToLocalChecked()); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); + Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_python()); + + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("python").ToLocalChecked()); + Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +} + +NODE_MODULE(tree_sitter_python_binding, Init) + +} // namespace diff --git a/python/extractor/tsg-python/tree-sitter-python/bindings/node/index.js b/python/extractor/tsg-python/tree-sitter-python/bindings/node/index.js new file mode 100644 index 00000000000..e0f77d8003a --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/bindings/node/index.js @@ -0,0 +1,19 @@ +try { + module.exports = require("../../build/Release/tree_sitter_python_binding"); +} catch (error1) { + if (error1.code !== 'MODULE_NOT_FOUND') { + throw error1; + } + try { + module.exports = require("../../build/Debug/tree_sitter_python_binding"); + } catch (error2) { + if (error2.code !== 'MODULE_NOT_FOUND') { + throw error2; + } + throw error1 + } +} + +try { + module.exports.nodeTypeInfo = require("../../src/node-types.json"); +} catch (_) {} diff --git a/python/extractor/tsg-python/tree-sitter-python/bindings/rust/README.md b/python/extractor/tsg-python/tree-sitter-python/bindings/rust/README.md new file mode 100644 index 00000000000..66976d4671f --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/bindings/rust/README.md @@ -0,0 +1,36 @@ +# tree-sitter-python + +This crate provides a Python grammar for the [tree-sitter][] parsing library. +To use this crate, add it to the `[dependencies]` section of your `Cargo.toml` +file. (Note that you will probably also need to depend on the +[`tree-sitter`][tree-sitter crate] crate to use the parsed result in any useful +way.) + +``` toml +[dependencies] +tree-sitter = "0.17" +tree-sitter-python = "0.17" +``` + +Typically, you will use the [language][language func] function to add this +grammar to a tree-sitter [Parser][], and then use the parser to parse some code: + +``` rust +let code = r#" + def double(x): + return x * 2 +"#; +let mut parser = Parser::new(); +parser.set_language(tree_sitter_python::language()).expect("Error loading Python grammar"); +let parsed = parser.parse(code, None); +``` + +If you have any questions, please reach out to us in the [tree-sitter +discussions] page. + +[Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +[language func]: https://docs.rs/tree-sitter-python/*/tree_sitter_python/fn.language.html +[Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +[tree-sitter]: https://tree-sitter.github.io/ +[tree-sitter crate]: https://crates.io/crates/tree-sitter +[tree-sitter discussions]: https://github.com/tree-sitter/tree-sitter/discussions diff --git a/python/extractor/tsg-python/tree-sitter-python/bindings/rust/build.rs b/python/extractor/tsg-python/tree-sitter-python/bindings/rust/build.rs new file mode 100644 index 00000000000..4450166885e --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/bindings/rust/build.rs @@ -0,0 +1,28 @@ +use std::path::Path; +extern crate cc; + +fn main() { + let src_dir = Path::new("src"); + + let mut c_config = cc::Build::new(); + c_config.include(&src_dir); + c_config + .flag_if_supported("-Wno-unused-parameter") + .flag_if_supported("-Wno-unused-but-set-variable") + .flag_if_supported("-Wno-trigraphs"); + let parser_path = src_dir.join("parser.c"); + c_config.file(&parser_path); + println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); + c_config.compile("parser"); + + let mut cpp_config = cc::Build::new(); + cpp_config.cpp(true); + cpp_config.include(&src_dir); + cpp_config + .flag_if_supported("-Wno-unused-parameter") + .flag_if_supported("-Wno-unused-but-set-variable"); + let scanner_path = src_dir.join("scanner.cc"); + cpp_config.file(&scanner_path); + println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); + cpp_config.compile("scanner"); +} diff --git a/python/extractor/tsg-python/tree-sitter-python/bindings/rust/lib.rs b/python/extractor/tsg-python/tree-sitter-python/bindings/rust/lib.rs new file mode 100644 index 00000000000..7a58509e89c --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/bindings/rust/lib.rs @@ -0,0 +1,68 @@ +// -*- coding: utf-8 -*- +// ------------------------------------------------------------------------------------------------ +// Copyright © 2020, tree-sitter-python authors. +// See the LICENSE file in this repo for license details. +// ------------------------------------------------------------------------------------------------ + +//! This crate provides a Python grammar for the [tree-sitter][] parsing library. +//! +//! Typically, you will use the [language][language func] function to add this grammar to a +//! tree-sitter [Parser][], and then use the parser to parse some code: +//! +//! ``` +//! use tree_sitter::Parser; +//! +//! let code = r#" +//! def double(x): +//! return x * 2 +//! "#; +//! let mut parser = Parser::new(); +//! parser.set_language(tree_sitter_python::language()).expect("Error loading Python grammar"); +//! let parsed = parser.parse(code, None); +//! # let parsed = parsed.unwrap(); +//! # let root = parsed.root_node(); +//! # assert!(!root.has_error()); +//! ``` +//! +//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +//! [language func]: fn.language.html +//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +//! [tree-sitter]: https://tree-sitter.github.io/ + +use tree_sitter::Language; + +extern "C" { + fn tree_sitter_python() -> Language; +} + +/// Returns the tree-sitter [Language][] for this grammar. +/// +/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +pub fn language() -> Language { + unsafe { tree_sitter_python() } +} + +/// The source of the Python tree-sitter grammar description. +pub const GRAMMAR: &'static str = include_str!("../../grammar.js"); + +/// The syntax highlighting query for this language. +pub const HIGHLIGHT_QUERY: &'static str = include_str!("../../queries/highlights.scm"); + +/// The content of the [`node-types.json`][] file for this grammar. +/// +/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types +pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json"); + +/// The symbol tagging query for this language. +pub const TAGGING_QUERY: &'static str = include_str!("../../queries/tags.scm"); + +#[cfg(test)] +mod tests { + #[test] + fn can_load_grammar() { + let mut parser = tree_sitter::Parser::new(); + parser + .set_language(super::language()) + .expect("Error loading Python grammar"); + } +} diff --git a/python/extractor/tsg-python/tree-sitter-python/grammar.js b/python/extractor/tsg-python/tree-sitter-python/grammar.js new file mode 100644 index 00000000000..3fc832cb4e5 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/grammar.js @@ -0,0 +1,1230 @@ +const PREC = { + // this resolves a conflict between the usage of ':' in a lambda vs in a + // typed parameter. In the case of a lambda, we don't allow typed parameters. + lambda: -2, + typed_parameter: -1, + conditional: -1, + + parenthesized_expression: 1, + parenthesized_list_splat: 1, + not: 12, + compare: 2, + or: 10, + and: 11, + bitwise_or: 13, + bitwise_and: 14, + xor: 15, + shift: 16, + plus: 17, + times: 18, + unary: 19, + power: 20, + call: 21, +} + +module.exports = grammar({ + name: 'python', + + extras: $ => [ + $.comment, + /[\s\f\uFEFF\u2060\u200B]|\\\r?\n/ + ], + + conflicts: $ => [ + [$.primary_expression, $.pattern], + [$.primary_expression, $.list_splat_pattern], + [$.tuple, $.tuple_pattern], + [$.list, $.list_pattern], + [$.with_item, $._collection_elements], + ], + + supertypes: $ => [ + $._simple_statement, + $._compound_statement, + $.expression, + $.primary_expression, + $.pattern, + $.parameter, + ], + + externals: $ => [ + $._newline, + $._indent, + $._dedent, + $._string_start, + $._string_content, + $._string_end, + ], + + inline: $ => [ + $._simple_statement, + $._compound_statement, + $._suite, + $._expressions, + $._left_hand_side, + $.keyword_identifier, + ], + + word: $ => $.identifier, + + rules: { + module: $ => repeat($._statement), + + _statement: $ => choice( + $._simple_statements, + $._compound_statement + ), + + // Simple statements + + _simple_statements: $ => seq( + $._simple_statement, + optional(repeat(seq( + $._semicolon, + $._simple_statement + ))), + optional($._semicolon), + $._newline + ), + + _simple_statement: $ => choice( + $.future_import_statement, + $.import_statement, + $.import_from_statement, + $.print_statement, + $.assert_statement, + $.expression_statement, + $.return_statement, + $.delete_statement, + $.raise_statement, + $.pass_statement, + $.break_statement, + $.continue_statement, + $.global_statement, + $.nonlocal_statement, + $.exec_statement, + $.type_alias_statement, + ), + + import_statement: $ => seq( + 'import', + $._import_list + ), + + import_prefix: $ => repeat1('.'), + + relative_import: $ => seq( + $.import_prefix, + optional(field('name', $.dotted_name)) + ), + + future_import_statement: $ => seq( + 'from', + '__future__', + 'import', + choice( + $._import_list, + seq('(', $._import_list, ')'), + ) + ), + + import_from_statement: $ => seq( + 'from', + field('module_name', choice( + $.relative_import, + $.dotted_name + )), + 'import', + choice( + $.wildcard_import, + $._import_list, + seq('(', $._import_list, ')') + ) + ), + + _import_list: $ => seq( + commaSep1(field('name', choice( + $.dotted_name, + $.aliased_import + ))), + optional(',') + ), + + aliased_import: $ => seq( + field('name', $.dotted_name), + 'as', + field('alias', $.identifier) + ), + + wildcard_import: $ => '*', + + print_statement: $ => choice( + prec(1, seq( + 'print', + $.chevron, + repeat(seq(',', field('argument', $.expression))), + optional(',')) + ), + prec(-10, seq( + 'print', + commaSep1(field('argument', $.expression)), + optional(',') + )) + ), + + chevron: $ => seq( + '>>', + $.expression + ), + + assert_statement: $ => seq( + 'assert', + commaSep1($.expression) + ), + + expression_statement: $ => choice( + $.expression, + $.expression_list, + $.assignment, + $.augmented_assignment, + $.yield + ), + + named_expression: $ => seq( + field('name', choice($.identifier, $.keyword_identifier)), + ':=', + field('value', $.expression) + ), + + return_statement: $ => seq( + 'return', + optional($._expressions) + ), + + delete_statement: $ => seq( + 'del', + field('target', $._expressions) + ), + + _expressions: $ => choice( + $.expression, + $.expression_list + ), + + raise_statement: $ => seq( + 'raise', + optional($._expressions), + optional(seq('from', field('cause', $.expression))) + ), + + pass_statement: $ => prec.left('pass'), + break_statement: $ => prec.left('break'), + continue_statement: $ => prec.left('continue'), + + // Compound statements + + _compound_statement: $ => choice( + $.if_statement, + $.for_statement, + $.while_statement, + $.try_statement, + $.with_statement, + $.match_statement, + $.function_definition, + $.class_definition, + $.decorated_definition + ), + + if_statement: $ => seq( + 'if', + field('condition', $.expression), + ':', + field('consequence', $._suite), + repeat(field('alternative', $.elif_clause)), + optional(field('alternative', $.else_clause)) + ), + + elif_clause: $ => seq( + 'elif', + field('condition', $.expression), + ':', + field('consequence', $._suite) + ), + + else_clause: $ => seq( + 'else', + ':', + field('body', $._suite) + ), + + for_statement: $ => seq( + optional('async'), + 'for', + field('left', $._left_hand_side), + 'in', + field('right', $._expressions), + ':', + field('body', $._suite), + field('alternative', optional($.else_clause)) + ), + + while_statement: $ => seq( + 'while', + field('condition', $.expression), + ':', + field('body', $._suite), + optional(field('alternative', $.else_clause)) + ), + + try_statement: $ => seq( + 'try', + ':', + field('body', $._suite), + choice( + seq( + repeat1($.except_clause), + optional($.else_clause), + optional($.finally_clause) + ), + seq( + repeat1($.except_group_clause), + optional($.else_clause), + optional($.finally_clause) + ), + $.finally_clause + ) + ), + + except_clause: $ => seq( + 'except', + optional(seq( + field('type', $.expression), + optional(seq( + choice('as', ','), + field('alias', $.expression) + )) + )), + ':', + field('body', $._suite), + ), + + except_group_clause: $ => seq( + 'except*', + seq( + field('type', $.expression), + optional(seq( + 'as', + field('alias', $.expression) + )) + ), + ':', + field('body', $._suite), + ), + + finally_clause: $ => seq( + 'finally', + ':', + field('body', $._suite), + ), + + with_statement: $ => seq( + optional('async'), + 'with', + $.with_clause, + ':', + field('body', $._suite) + ), + + with_clause: $ => choice( + commaSep1($.with_item), + seq('(', commaSep1($.with_item), optional(","), ')') + ), + + with_item: $ => prec.dynamic(-1, seq( + field('value', $.expression), + optional(seq( + 'as', + field('alias', $.pattern) + )) + )), + + match_statement: $ => seq( + 'match', + field('subject', + choice( + $.expression, + alias($.expression_list, $.tuple), + ) + ), + ':', + field('cases', $.cases) + ), + + cases: $ => repeat1($.case_block), + + case_block: $ => seq( + 'case', + field('pattern', $._match_patterns), + optional(field('guard', $.guard)), + ':', + field('body', $._suite) + ), + + _match_patterns: $ => choice( + $._match_pattern, + alias($.open_sequence_match_pattern, $.match_sequence_pattern) + ), + + open_sequence_match_pattern: $ => open_sequence($._match_maybe_star_pattern), + + _match_pattern: $ => choice( + $.match_as_pattern, + $._match_or_pattern + ), + + match_as_pattern: $ => seq( + field('pattern', $._match_or_pattern), + 'as', + field('alias', $.identifier) + ), + + _match_or_pattern: $ => choice( + $.match_or_pattern, + $._closed_pattern + ), + + match_or_pattern: $ => seq( + $._closed_pattern, + '|', + sep1($._closed_pattern, '|') + ), + + _closed_pattern: $ => choice( + $.match_literal_pattern, + $.match_capture_pattern, + $.match_wildcard_pattern, + $.match_value_pattern, + $.match_group_pattern, + $.match_sequence_pattern, + $.match_mapping_pattern, + $.match_class_pattern + ), + + match_literal_pattern: $ => choice( + seq( + optional(field('prefix_operator', '-')), + field('real', choice($.integer, $.float)), + optional(seq( + field('operator', choice('+', '-')), + field('imaginary', choice($.integer, $.float)) + )) + ), + $.string, + $.concatenated_string, + $.none, + $.true, + $.false + ), + + + + match_capture_pattern: $ => $.identifier, + + match_wildcard_pattern: $ => '_', + + match_value_pattern: $ => seq( + $.identifier, + repeat1(seq('.', $.identifier)) + ), + + match_group_pattern: $ => seq( + '(', + field('content', $._match_pattern), + ')' + ), + + match_sequence_pattern: $ => choice( + seq('[', optional(seq(commaSep1($._match_maybe_star_pattern), optional(','))), ']'), + seq('(', optional(open_sequence($._match_maybe_star_pattern)), ')') + ), + + _match_maybe_star_pattern: $ => choice( + $._match_pattern, + $.match_star_pattern + ), + + match_star_pattern: $ => seq( + '*', + field('target', choice($.match_wildcard_pattern, $.match_capture_pattern)) + ), + + match_mapping_pattern: $ => choice( + seq('{', optional(seq($.match_double_star_pattern, optional(','))), '}'), + seq( + '{', + commaSep1($.match_key_value_pattern), + optional(seq(',', $.match_double_star_pattern)), + optional(','), + '}' + ) + ), + + match_double_star_pattern: $ => seq( + '**', + field('target', $.match_capture_pattern) + ), + + match_key_value_pattern: $ => seq( + field('key', choice($.match_literal_pattern, $.match_value_pattern)), + ':', + field('value', $._match_pattern) + ), + + match_class_pattern: $ => seq( + field('class', $.pattern_class_name), + choice( + seq('(', ')'), + seq('(', seq(commaSep1($.match_positional_pattern), optional(',')), ')'), + seq('(', seq(commaSep1($.match_keyword_pattern), optional(',')), ')'), + seq('(', commaSep1($.match_positional_pattern), ',', commaSep1($.match_keyword_pattern), optional(','), ')') + )), + + pattern_class_name: $ => sep1($.identifier, '.'), + + match_positional_pattern: $ => $._match_pattern, + + match_keyword_pattern: $ => seq( + field('attribute', $.identifier), + '=', + field('value', $._match_pattern) + ), + + guard: $ => seq( + 'if', + field('test', $.expression) + ), + + function_definition: $ => seq( + optional('async'), + 'def', + field('name', $.identifier), + optional(field('type_parameters', $.type_parameters)), + field('parameters', $.parameters), + optional( + seq( + '->', + field('return_type', $.type) + ) + ), + ':', + field('body', $._suite) + ), + + parameters: $ => seq( + '(', + optional($._parameters), + ')' + ), + + lambda_parameters: $ => $._parameters, + + list_splat: $ => seq( + '*', + $.expression, + ), + + dictionary_splat: $ => seq( + '**', + field('value', $.expression), + ), + + global_statement: $ => seq( + 'global', + commaSep1($.identifier) + ), + + nonlocal_statement: $ => seq( + 'nonlocal', + commaSep1($.identifier) + ), + + exec_statement: $ => seq( + 'exec', + field('code', $.string), + optional( + seq( + 'in', + commaSep1($.expression) + ) + ) + ), + + type_alias_statement: $ => seq( + 'type', + field('name', $.identifier), + optional(field('type_parameters', $.type_parameters)), + '=', + field('value', $.expression) + ), + + class_definition: $ => seq( + 'class', + field('name', $.identifier), + optional(field('type_parameters', $.type_parameters)), + field('superclasses', optional($.argument_list)), + ':', + field('body', $._suite) + ), + + type_parameters: $ => seq( + '[', + commaSep1(field('type_parameter', $._type_parameter)), + ']' + ), + + _type_bound: $ => seq( + ':', + field('bound', $.expression) + ), + + typevar_parameter: $ => seq( + field('name', $.identifier), + optional($._type_bound) + ), + + typevartuple_parameter: $ => seq( + '*', + field('name', $.identifier), + ), + + paramspec_parameter: $ => seq( + '**', + field('name', $.identifier), + ), + + _type_parameter: $ => choice( + $.typevar_parameter, + $.typevartuple_parameter, + $.paramspec_parameter, + ), + + parenthesized_list_splat: $ => prec(PREC.parenthesized_list_splat, seq( + '(', + choice( + alias($.parenthesized_list_splat, $.parenthesized_expression), + $.list_splat, + ), + ')', + )), + + argument_list: $ => seq( + '(', + optional(commaSep1( + field('element', choice( + $.expression, + $.list_splat, + $.dictionary_splat, + alias($.parenthesized_list_splat, $.parenthesized_expression), + $.keyword_argument + )) + )), + optional(','), + ')' + ), + + decorated_definition: $ => seq( + repeat1($.decorator), + field('definition', choice( + $.class_definition, + $.function_definition + )) + ), + + decorator: $ => seq( + '@', + $.expression, + $._newline + ), + + _suite: $ => choice( + alias($._simple_statements, $.block), + seq($._indent, $.block), + alias($._newline, $.block) + ), + + block: $ => seq( + repeat($._statement), + $._dedent + ), + + expression_list: $ => open_sequence(field('element', choice($.expression, $.list_splat, $.dictionary_splat))), + + dotted_name: $ => sep1($.identifier, '.'), + + // Patterns + + _parameters: $ => seq( + commaSep1($.parameter), + optional(',') + ), + + _patterns: $ => seq( + commaSep1(field('element', $.pattern)), + optional(field('trailing_comma', ',')) + ), + + parameter: $ => choice( + $.identifier, + $.typed_parameter, + $.default_parameter, + $.typed_default_parameter, + $.list_splat_pattern, + $.tuple_pattern, + $.keyword_separator, + $.positional_separator, + $.dictionary_splat_pattern + ), + + pattern: $ => choice( + $.identifier, + $.keyword_identifier, + $.subscript, + $.attribute, + $.list_splat_pattern, + $.tuple_pattern, + $.list_pattern + ), + + tuple_pattern: $ => seq( + '(', + optional($._patterns), + ')' + ), + + list_pattern: $ => seq( + '[', + optional($._patterns), + ']' + ), + + default_parameter: $ => seq( + field('name', $.identifier), + '=', + field('value', $.expression) + ), + + typed_default_parameter: $ => prec(PREC.typed_parameter, seq( + field('name', $.identifier), + ':', + field('type', $.type), + '=', + field('value', $.expression) + )), + + list_splat_pattern: $ => seq( + '*', + field('vararg', choice($.identifier, $.keyword_identifier, $.subscript, $.attribute)) + ), + + dictionary_splat_pattern: $ => seq( + '**', + field('kwarg', choice($.identifier, $.keyword_identifier, $.subscript, $.attribute)) + ), + + // Expressions + + _expression_within_for_in_clause: $ => choice( + $.expression, + alias($.lambda_within_for_in_clause, $.lambda) + ), + + expression: $ => choice( + $.comparison_operator, + $.not_operator, + $.boolean_operator, + $.await, + $.lambda, + $.primary_expression, + $.conditional_expression, + $.named_expression + ), + + primary_expression: $ => choice( + $.binary_operator, + $.identifier, + $.keyword_identifier, + $.string, + $.concatenated_string, + $.integer, + $.float, + $.true, + $.false, + $.none, + $.unary_operator, + $.attribute, + $.subscript, + $.call, + $.list, + $.list_comprehension, + $.dictionary, + $.dictionary_comprehension, + $.set, + $.set_comprehension, + $.tuple, + $.parenthesized_expression, + $.generator_expression, + $.ellipsis + ), + + not_operator: $ => prec(PREC.not, seq( + 'not', + field('argument', $.expression) + )), + + boolean_operator: $ => choice( + prec.right(PREC.and, seq( + field('left', $.expression), + field('operator', 'and'), + field('right', $.expression) + )), + prec.right(PREC.or, seq( + field('left', $.expression), + field('operator', 'or'), + field('right', $.expression) + )) + ), + + binary_operator: $ => { + const table = [ + [prec.left, '+', PREC.plus], + [prec.left, '-', PREC.plus], + [prec.left, '*', PREC.times], + [prec.left, '@', PREC.times], + [prec.left, '/', PREC.times], + [prec.left, '%', PREC.times], + [prec.left, '//', PREC.times], + [prec.right, '**', PREC.power], + [prec.left, '|', PREC.bitwise_or], + [prec.left, '&', PREC.bitwise_and], + [prec.left, '^', PREC.xor], + [prec.left, '<<', PREC.shift], + [prec.left, '>>', PREC.shift], + ]; + + return choice(...table.map(([fn, operator, precedence]) => fn(precedence, seq( + field('left', $.primary_expression), + field('operator', operator), + field('right', $.primary_expression) + )))); + }, + + unary_operator: $ => prec(PREC.unary, seq( + field('operator', choice('+', '-', '~')), + field('argument', $.primary_expression) + )), + + comparison_operator: $ => prec.left(PREC.compare, seq( + $.primary_expression, + repeat1(seq( + field('operators', + choice( + '<', + '<=', + '==', + '!=', + '>=', + '>', + '<>', + 'in', + alias(seq('not', 'in'), 'not in'), + 'is', + alias(seq('is', 'not'), 'is not') + )), + $.primary_expression + )) + )), + + lambda: $ => prec(PREC.lambda, seq( + 'lambda', + field('parameters', optional($.lambda_parameters)), + ':', + field('body', $.expression) + )), + + lambda_within_for_in_clause: $ => seq( + 'lambda', + field('parameters', optional($.lambda_parameters)), + ':', + field('body', $._expression_within_for_in_clause) + ), + + assignment: $ => seq( + field('left', $._left_hand_side), + choice( + seq('=', field('right', $._right_hand_side)), + seq(':', field('type', $.type)), + seq(':', field('type', $.type), '=', field('right', $._right_hand_side)) + ) + ), + + augmented_assignment: $ => seq( + field('left', $._left_hand_side), + field('operator', choice( + '+=', '-=', '*=', '/=', '@=', '//=', '%=', '**=', + '>>=', '<<=', '&=', '^=', '|=' + )), + field('right', $._right_hand_side) + ), + + _left_hand_side: $ => choice( + $.pattern, + $.pattern_list + ), + + pattern_list: $ => seq( + field('element', $.pattern), + choice( + ',', + seq( + repeat1(seq( + ',', + field('element', $.pattern) + )), + optional(',') + ) + ) + ), + + _right_hand_side: $ => choice( + $.expression, + $.expression_list, + $.assignment, + $.augmented_assignment, + $.yield + ), + + yield: $ => prec.right(seq( + 'yield', + choice( + seq( + 'from', + $.expression + ), + optional($._expressions) + ) + )), + + attribute: $ => prec(PREC.call, seq( + field('object', $.primary_expression), + '.', + field('attribute', $.identifier) + )), + + subscript: $ => prec(PREC.call, seq( + field('value', $.primary_expression), + '[', + commaSep1(field('subscript', choice($.expression, $.slice))), + optional(','), + ']' + )), + + slice: $ => seq( + optional(field('start', $.expression)), + ':', + optional(field('stop', $.expression)), + optional(seq(':', optional(field('step', $.expression)))) + ), + + ellipsis: $ => '...', + + call: $ => prec(PREC.call, seq( + field('function', $.primary_expression), + field('arguments', choice( + $.generator_expression, + $.argument_list + )) + )), + + typed_parameter: $ => prec(PREC.typed_parameter, seq( + choice( + $.identifier, + $.list_splat_pattern, + $.dictionary_splat_pattern + ), + ':', + field('type', $.type) + )), + + type: $ => $.expression, + + keyword_argument: $ => seq( + field('name', choice($.identifier, $.keyword_identifier)), + '=', + field('value', $.expression) + ), + + // Literals + + list: $ => seq( + '[', + optional($._collection_elements), + ']' + ), + + set: $ => seq( + '{', + $._collection_elements, + '}' + ), + + tuple: $ => seq( + '(', + optional($._collection_elements), + ')' + ), + + dictionary: $ => seq( + '{', + optional(commaSep1(field('element', choice($.pair, $.dictionary_splat)))), + optional(','), + '}' + ), + + pair: $ => seq( + field('key', $.expression), + ':', + field('value', $.expression) + ), + + list_comprehension: $ => seq( + '[', + field('body', $.expression), + $._comprehension_clauses, + ']' + ), + + dictionary_comprehension: $ => seq( + '{', + field('body', $.pair), + $._comprehension_clauses, + '}' + ), + + set_comprehension: $ => seq( + '{', + field('body', $.expression), + $._comprehension_clauses, + '}' + ), + + generator_expression: $ => seq( + '(', + field('body', $.expression), + $._comprehension_clauses, + ')' + ), + + _comprehension_clauses: $ => seq( + $.for_in_clause, + repeat(choice( + $.for_in_clause, + $.if_clause + )) + ), + + parenthesized_expression: $ => prec(PREC.parenthesized_expression, seq( + '(', + field('inner', choice($.expression, $.yield)), + ')' + )), + + _collection_elements: $ => seq( + commaSep1(field('element', choice( + $.expression, $.yield, $.list_splat, $.parenthesized_list_splat + ))), + optional(field('trailing_comma', ',')) + ), + + for_in_clause: $ => prec.left(seq( + optional('async'), + 'for', + field('left', $._left_hand_side), + 'in', + field('right', commaSep1($._expression_within_for_in_clause)), + optional(',') + )), + + if_clause: $ => seq( + 'if', + $.expression + ), + + conditional_expression: $ => prec.right(PREC.conditional, seq( + $.expression, + 'if', + $.expression, + 'else', + $.expression + )), + + concatenated_string: $ => seq( + $.string, + repeat1($.string) + ), + + + string: $ => seq( + field('prefix', alias($._string_start, '"')), + repeat(choice( + field('interpolation', $.interpolation), + field('string_content', $.string_content) + )), + field('suffix', alias($._string_end, '"')) + ), + + string_content: $ => prec.right(0, repeat1( + choice( + $._escape_interpolation, + $.escape_sequence, + $._not_escape_sequence, + $._string_content + ))), + + interpolation: $ => seq( + token.immediate('{'), + field('expression', $._f_expression), + optional('='), + optional($.type_conversion), + optional($.format_specifier), + '}' + ), + + _f_expression: $ => choice( + $.expression, + $.expression_list, + $.yield, + ), + + _escape_interpolation: $ => token.immediate(choice('{{', '}}')), + + escape_sequence: $ => token.immediate(prec(1, seq( + '\\', + choice( + /u[a-fA-F\d]{4}/, + /U[a-fA-F\d]{8}/, + /x[a-fA-F\d]{2}/, + /\d{3}/, + /\r?\n/, + /['"abfrntv\\]/, + /N\{[^}]+\}/, + ) + ))), + + _not_escape_sequence: $ => token.immediate('\\'), + + format_specifier: $ => seq( + ':', + repeat(choice( + token(prec(1, /[^{}\n]+/)), + alias($.interpolation, $.format_expression) + )) + ), + + format_expression: $ => seq('{', $.expression, '}'), + + type_conversion: $ => /![a-z]/, + + integer: $ => token(choice( + seq( + choice('0x', '0X'), + repeat1(/_?[A-Fa-f0-9]+/), + optional(/[Ll]/) + ), + seq( + choice('0o', '0O'), + repeat1(/_?[0-7]+/), + optional(/[Ll]/) + ), + seq( + choice('0b', '0B'), + repeat1(/_?[0-1]+/), + optional(/[Ll]/) + ), + seq( + repeat1(/[0-9]+_?/), + choice( + optional(/[Ll]/), // long numbers + optional(/[jJ]/) // complex numbers + ) + ) + )), + + float: $ => { + const digits = repeat1(/[0-9]+_?/); + const exponent = seq(/[eE][\+-]?/, digits) + + return token(seq( + choice( + seq(digits, '.', optional(digits), optional(exponent)), + seq(optional(digits), '.', digits, optional(exponent)), + seq(digits, exponent) + ), + optional(choice(/[Ll]/, /[jJ]/)) + )) + }, + + identifier: $ => /[_\p{XID_Start}][_\p{XID_Continue}]*/, + + keyword_identifier: $ => prec(-3, alias( + choice( + 'print', + 'exec', + 'async', + 'await', + 'match', + 'type', + ), + $.identifier + )), + + true: $ => 'True', + false: $ => 'False', + none: $ => 'None', + + await: $ => prec(PREC.unary, seq( + 'await', + $.expression + )), + + comment: $ => token(seq('#', /.*/)), + + positional_separator: $ => '/', + keyword_separator: $ => '*', + + _semicolon: $ => ';' + } +}) + +function commaSep1(rule) { + return sep1(rule, ',') +} + +function sep1(rule, separator) { + return seq(rule, repeat(seq(separator, rule))) +} + +function open_sequence(rule, repeat_rule = rule) { + return prec.right(seq( + rule, + choice( + ',', + seq( + repeat1(seq( + ',', + repeat_rule + )), + optional(',') + ), + ) + )) +} diff --git a/python/extractor/tsg-python/tree-sitter-python/log.html b/python/extractor/tsg-python/tree-sitter-python/log.html new file mode 100644 index 00000000000..bfe46c45e3e --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/log.html @@ -0,0 +1,1687 @@ + + + + + + + + + + + +%3 + +new_parse + + + + + + + + +%5 + +process version:0, version_count:1, state:1, row:0, col:0 + + + + + + + + +%7 + +lex_external state:2, row:0, column:0 + + + + + + + + +%9 + +lex_internal state:62, row:0, column:0 + + + + + + + + +%11 + +lexed_lookahead sym:match, size:5 + + + + + + + + +%13 + +shift state:71 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x5654d845fac0 + + +71 + + + + + +node_head_0->node_0x5654d845fac0 + + +0 + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d845fac0->node_0x5654d845e6b0 + + +'match' + + + + + + + + + + + +%19 + +process version:0, version_count:1, state:71, row:0, col:5 + + + + + + + + +%21 + +lex_external state:4, row:0, column:5 + + + + + + + + +%23 + +lex_internal state:62, row:0, column:5 + + + + + + + + +%25 + +lexed_lookahead sym:(, size:1 + + + + + + + + +%27 + +shift state:188 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x5654d845fbb0 + + +188 + + + + + +node_head_0->node_0x5654d845fbb0 + + +0 + + + + + +node_0x5654d845fac0 + + +71 + + + + + +node_0x5654d845fbb0->node_0x5654d845fac0 + + +'(' + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d845fac0->node_0x5654d845e6b0 + + +'match' + + + + + + + + + + + +%35 + +process version:0, version_count:1, state:188, row:0, col:6 + + + + + + + + +%37 + +lex_external state:2, row:0, column:6 + + + + + + + + +%39 + +lex_internal state:62, row:0, column:6 + + + + + + + + +%41 + +lexed_lookahead sym:), size:1 + + + + + + + + +%43 + +shift state:671 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x5654d845fca0 + + +671 + + + + + +node_head_0->node_0x5654d845fca0 + + +0 + + + + + +node_0x5654d845fbb0 + + +188 + + + + + +node_0x5654d845fca0->node_0x5654d845fbb0 + + +')' + + + + + +node_0x5654d845fac0 + + +71 + + + + + +node_0x5654d845fbb0->node_0x5654d845fac0 + + +'(' + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d845fac0->node_0x5654d845e6b0 + + +'match' + + + + + + + + + + + +%53 + +process version:0, version_count:1, state:671, row:0, col:7 + + + + + + + + +%55 + +lex_internal state:15, row:0, column:7 + + + + + + + + +%57 + +lex_external state:1, row:0, column:7 + + + + + + + + +%59 + +lexed_lookahead sym:_newline, size:0 + + + + + + + + +%61 + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x5654d845fca0 + + +671 + + + + + +node_head_0->node_0x5654d845fca0 + + +0 + + + + + +node_0x5654d845fbb0 + + +188 + + + + + +node_0x5654d845fca0->node_0x5654d845fbb0 + + +')' + + + + + +node_0x5654d845fac0 + + +71 + + + + + +node_0x5654d845fbb0->node_0x5654d845fac0 + + +'(' + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d845fac0->node_0x5654d845e6b0 + + +'match' + + + + + + + + + + + +%71 + +resume version:0 + + + + + + + + +%73 + +recover_to_previous state:71, depth:2 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x5654d845fca0 + + +? + + + + + +node_head_0->node_0x5654d845fca0 + + +0 + + + + + +node_0x5654d845fbb0 + + +630 + + + + + +node_0x5654d845fca0->node_0x5654d845fbb0 + + + + +node_0x5654d8474d40 + + +1080 + + + + + +node_0x5654d845fca0->node_0x5654d8474d40 + + + + +node_head_1 + + + +node_0x5654d8474e30 + + + + + + + +node_head_1->node_0x5654d8474e30 + + +1 + + + + + +node_0x5654d845fac0 + + +71 + + + + + +node_0x5654d8474e30->node_0x5654d845fac0 + + +ERROR + + + + + +node_0x5654d845fbb0->node_0x5654d845fac0 + + +primary_expression + + + + + +node_0x5654d8474d40->node_0x5654d845fac0 + + +expression + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d845fac0->node_0x5654d845e6b0 + + +'match' + + + + + + + + + + + +stack + + + +node_head_1 + + + +node_0x5654d8474e30 + + + + + + + +node_head_1->node_0x5654d8474e30 + + +1 + + + + + +node_0x5654d845fac0 + + +71 + + + + + +node_0x5654d8474e30->node_0x5654d845fac0 + + +ERROR + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d845fac0->node_0x5654d845e6b0 + + +'match' + + + + + + + + + + + +%97 + +process version:1, version_count:2, state:71, row:0, col:7 + + + + + + + + +%99 + +lex_external state:4, row:0, column:7 + + + + + + + + +%101 + +lexed_lookahead sym:_newline, size:0 + + + + + + + + +%103 + +reduce sym:primary_expression, child_count:1 + + + + + + + + +stack + + + +node_head_1 + + + +node_0x5654d84750d0 + + + + + + + +node_head_1->node_0x5654d84750d0 + + +1 + + + + + +node_0x5654d8474fe0 + + +684 + + + + + +node_0x5654d84750d0->node_0x5654d8474fe0 + + +ERROR + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d8474fe0->node_0x5654d845e6b0 + + +primary_expression + + + + + + + + + + + +%111 + +reduce sym:expression, child_count:1 + + + + + + + + +stack + + + +node_head_1 + + + +node_0x5654d8475220 + + + + + + + +node_head_1->node_0x5654d8475220 + + +1 + + + + + +node_0x5654d8474e30 + + +1019 + + + + + +node_0x5654d8475220->node_0x5654d8474e30 + + +ERROR + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d8474e30->node_0x5654d845e6b0 + + +expression + + + + + + + + + + + +%119 + +reduce sym:expression_statement, child_count:1 + + + + + + + + +stack + + + +node_head_1 + + + +node_0x5654d84750d0 + + + + + + + +node_head_1->node_0x5654d84750d0 + + +1 + + + + + +node_0x5654d8474fe0 + + +1209 + + + + + +node_0x5654d84750d0->node_0x5654d8474fe0 + + +ERROR + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d8474fe0->node_0x5654d845e6b0 + + +expression_statement + + + + + + + + + + + +%127 + +shift state:313 + + + + + + + + +stack + + + +node_head_1 + + + +node_0x5654d8474e30 + + +313 + + + + + +node_head_1->node_0x5654d8474e30 + + +1 + + + + + +node_0x5654d84750d0 + + + + + + + +node_0x5654d8474e30->node_0x5654d84750d0 + + +_newline + + + + + +node_0x5654d8474fe0 + + +1209 + + + + + +node_0x5654d84750d0->node_0x5654d8474fe0 + + +ERROR + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d8474fe0->node_0x5654d845e6b0 + + +expression_statement + + + + + + + + + + + +%137 + +process version:0, version_count:1, state:313, row:0, col:7 + + + + + + + + +%139 + +lex_external state:2, row:0, column:7 + + + + + + + + +%141 + +lex_internal state:62, row:0, column:7 + + + + + + + + +%143 + +lexed_lookahead sym:end, size:1 + + + + + + + + +%145 + +reduce sym:_simple_statements, child_count:2 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x5654d845fac0 + + +64 + + + + + +node_head_0->node_0x5654d845fac0 + + +0 + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d845fac0->node_0x5654d845e6b0 + + +_simple_statements + + + + + + + + + + + +%151 + +reduce sym:module, child_count:1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x5654d8474fe0 + + +1502 + + + + + +node_head_0->node_0x5654d8474fe0 + + +0 + + + + + +node_0x5654d845e6b0 + + +1 + + + + + +node_0x5654d8474fe0->node_0x5654d845e6b0 + + +module + + + + + + + + + + + +%157 + +accept + + + + + + + + +stack + + + + + + + + + +%159 + +done + + + + + + + + +tree + + + +tree_0x7ffd5edb0858 + + +module + + + + + +tree_0x5654d8475370 + + +_simple_statements + + + + + +tree_0x7ffd5edb0858->tree_0x5654d8475370 + + + + + + + +tree_0x5654d8475378 + +end + + + + + +tree_0x7ffd5edb0858->tree_0x5654d8475378 + + + + + + + +tree_0x5654d845c980 + + +expression_statement + + + + + +tree_0x5654d8475370->tree_0x5654d845c980 + + + + + + + +tree_0x5654d845c988 + + +ERROR + + + + + +tree_0x5654d8475370->tree_0x5654d845c988 + + + + + + + +tree_0x5654d845c990 + +_newline + + + + + +tree_0x5654d8475370->tree_0x5654d845c990 + + + + + + + +tree_0x5654d8475310 + + +expression + + + + + +tree_0x5654d845c980->tree_0x5654d8475310 + + + + + + + +tree_0x5654d84751c0 + + +primary_expression + + + + + +tree_0x5654d8475310->tree_0x5654d84751c0 + + + + + + + +tree_0x5654d8474f80 + +identifier + + + + + +tree_0x5654d84751c0->tree_0x5654d8474f80 + + + + + + + +tree_0x5654d845d9d0 + + +primary_expression + + + + + +tree_0x5654d845c988->tree_0x5654d845d9d0 + + + + + + + +tree_0x5654d845df00 + + +tuple + + + + + +tree_0x5654d845d9d0->tree_0x5654d845df00 + + + + + + + +tree_0x5654d8457fb0 + +( + + + + + +tree_0x5654d845df00->tree_0x5654d8457fb0 + + + + + + + +tree_0x5654d8457fb8 + +) + + + + + +tree_0x5654d845df00->tree_0x5654d8457fb8 + + + + + + + diff --git a/python/extractor/tsg-python/tree-sitter-python/package.json b/python/extractor/tsg-python/tree-sitter-python/package.json new file mode 100644 index 00000000000..a9bb55ac506 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/package.json @@ -0,0 +1,33 @@ +{ + "name": "tree-sitter-python", + "version": "0.19.0", + "description": "Python grammar for tree-sitter", + "main": "bindings/node", + "keywords": [ + "parser", + "lexer" + ], + "author": "Max Brunsfeld", + "license": "MIT", + "dependencies": { + "nan": "^2.14.0" + }, + "devDependencies": { + "tree-sitter-cli": "^0.19.3" + }, + "scripts": { + "build": "tree-sitter generate && node-gyp build", + "test": "tree-sitter test && script/parse-examples", + "parse": "tree-sitter parse", + "test-windows": "tree-sitter test" + }, + "repository": "https://github.com/tree-sitter/tree-sitter-python", + "tree-sitter": [ + { + "scope": "source.python", + "file-types": [ + "py" + ] + } + ] +} diff --git a/python/extractor/tsg-python/tree-sitter-python/queries/highlights.scm b/python/extractor/tsg-python/tree-sitter-python/queries/highlights.scm new file mode 100644 index 00000000000..f64fecb2c75 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/queries/highlights.scm @@ -0,0 +1,124 @@ +; Identifier naming conventions + +((identifier) @constructor + (#match? @constructor "^[A-Z]")) + +((identifier) @constant + (#match? @constant "^[A-Z][A-Z_]*$")) + +; Builtin functions + +((call + function: (identifier) @function.builtin) + (#match? + @function.builtin + "^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$")) + +; Function calls + +(decorator) @function + +(call + function: (attribute attribute: (identifier) @function.method)) +(call + function: (identifier) @function) + +; Function definitions + +(function_definition + name: (identifier) @function) + +(identifier) @variable +(attribute attribute: (identifier) @property) +(type (identifier) @type) + +; Literals + +[ + (none) + (true) + (false) +] @constant.builtin + +[ + (integer) + (float) +] @number + +(comment) @comment +(string) @string +(escape_sequence) @escape + +(interpolation + "{" @punctuation.special + "}" @punctuation.special) @embedded + +[ + "-" + "-=" + "!=" + "*" + "**" + "**=" + "*=" + "/" + "//" + "//=" + "/=" + "&" + "%" + "%=" + "^" + "+" + "->" + "+=" + "<" + "<<" + "<=" + "<>" + "=" + ":=" + "==" + ">" + ">=" + ">>" + "|" + "~" + "and" + "in" + "is" + "not" + "or" +] @operator + +[ + "as" + "assert" + "async" + "await" + "break" + "class" + "continue" + "def" + "del" + "elif" + "else" + "except" + "exec" + "finally" + "for" + "from" + "global" + "if" + "import" + "lambda" + "nonlocal" + "pass" + "print" + "raise" + "return" + "try" + "while" + "with" + "yield" +] @keyword diff --git a/python/extractor/tsg-python/tree-sitter-python/queries/tags.scm b/python/extractor/tsg-python/tree-sitter-python/queries/tags.scm new file mode 100644 index 00000000000..c5ca8272b85 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/queries/tags.scm @@ -0,0 +1,12 @@ +(class_definition + name: (identifier) @name) @definition.class + +(function_definition + name: (identifier) @name) @definition.function + +(call + function: [ + (identifier) @name + (attribute + attribute: (identifier) @name) + ]) @reference.call diff --git a/python/extractor/tsg-python/tree-sitter-python/src/grammar.json b/python/extractor/tsg-python/tree-sitter-python/src/grammar.json new file mode 100644 index 00000000000..957471765c3 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/src/grammar.json @@ -0,0 +1,6615 @@ +{ + "name": "python", + "word": "identifier", + "rules": { + "module": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + }, + "_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_statements" + }, + { + "type": "SYMBOL", + "name": "_compound_statement" + } + ] + }, + "_simple_statements": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_statement" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_semicolon" + }, + { + "type": "SYMBOL", + "name": "_simple_statement" + } + ] + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_semicolon" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_newline" + } + ] + }, + "_simple_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "future_import_statement" + }, + { + "type": "SYMBOL", + "name": "import_statement" + }, + { + "type": "SYMBOL", + "name": "import_from_statement" + }, + { + "type": "SYMBOL", + "name": "print_statement" + }, + { + "type": "SYMBOL", + "name": "assert_statement" + }, + { + "type": "SYMBOL", + "name": "expression_statement" + }, + { + "type": "SYMBOL", + "name": "return_statement" + }, + { + "type": "SYMBOL", + "name": "delete_statement" + }, + { + "type": "SYMBOL", + "name": "raise_statement" + }, + { + "type": "SYMBOL", + "name": "pass_statement" + }, + { + "type": "SYMBOL", + "name": "break_statement" + }, + { + "type": "SYMBOL", + "name": "continue_statement" + }, + { + "type": "SYMBOL", + "name": "global_statement" + }, + { + "type": "SYMBOL", + "name": "nonlocal_statement" + }, + { + "type": "SYMBOL", + "name": "exec_statement" + }, + { + "type": "SYMBOL", + "name": "type_alias_statement" + } + ] + }, + "import_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "import" + }, + { + "type": "SYMBOL", + "name": "_import_list" + } + ] + }, + "import_prefix": { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": "." + } + }, + "relative_import": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "import_prefix" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "dotted_name" + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "future_import_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "from" + }, + { + "type": "STRING", + "value": "__future__" + }, + { + "type": "STRING", + "value": "import" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_import_list" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_import_list" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + } + ] + }, + "import_from_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "from" + }, + { + "type": "FIELD", + "name": "module_name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "relative_import" + }, + { + "type": "SYMBOL", + "name": "dotted_name" + } + ] + } + }, + { + "type": "STRING", + "value": "import" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "wildcard_import" + }, + { + "type": "SYMBOL", + "name": "_import_list" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_import_list" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + } + ] + }, + "_import_list": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "dotted_name" + }, + { + "type": "SYMBOL", + "name": "aliased_import" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "dotted_name" + }, + { + "type": "SYMBOL", + "name": "aliased_import" + } + ] + } + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "aliased_import": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "dotted_name" + } + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "wildcard_import": { + "type": "STRING", + "value": "*" + }, + "print_statement": { + "type": "CHOICE", + "members": [ + { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "print" + }, + { + "type": "SYMBOL", + "name": "chevron" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + { + "type": "PREC", + "value": -10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "print" + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + } + } + ] + }, + "chevron": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ">>" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "assert_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "assert" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + } + ] + } + ] + }, + "expression_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "expression_list" + }, + { + "type": "SYMBOL", + "name": "assignment" + }, + { + "type": "SYMBOL", + "name": "augmented_assignment" + }, + { + "type": "SYMBOL", + "name": "yield" + } + ] + }, + "named_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "keyword_identifier" + } + ] + } + }, + { + "type": "STRING", + "value": ":=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "return_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "return" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expressions" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "delete_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "del" + }, + { + "type": "FIELD", + "name": "target", + "content": { + "type": "SYMBOL", + "name": "_expressions" + } + } + ] + }, + "_expressions": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "expression_list" + } + ] + }, + "raise_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "raise" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expressions" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "from" + }, + { + "type": "FIELD", + "name": "cause", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "pass_statement": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "STRING", + "value": "pass" + } + }, + "break_statement": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "STRING", + "value": "break" + } + }, + "continue_statement": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "STRING", + "value": "continue" + } + }, + "_compound_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "if_statement" + }, + { + "type": "SYMBOL", + "name": "for_statement" + }, + { + "type": "SYMBOL", + "name": "while_statement" + }, + { + "type": "SYMBOL", + "name": "try_statement" + }, + { + "type": "SYMBOL", + "name": "with_statement" + }, + { + "type": "SYMBOL", + "name": "match_statement" + }, + { + "type": "SYMBOL", + "name": "function_definition" + }, + { + "type": "SYMBOL", + "name": "class_definition" + }, + { + "type": "SYMBOL", + "name": "decorated_definition" + } + ] + }, + "if_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + }, + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "elif_clause" + } + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "else_clause" + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "elif_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "elif" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + } + ] + }, + "else_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + } + ] + }, + "for_statement": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "for" + }, + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_left_hand_side" + } + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expressions" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "else_clause" + }, + { + "type": "BLANK" + } + ] + } + } + ] + }, + "while_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "else_clause" + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "try_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "try" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "except_clause" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "else_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "finally_clause" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "except_group_clause" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "else_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "finally_clause" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "finally_clause" + } + ] + } + ] + }, + "except_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "except" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "as" + }, + { + "type": "STRING", + "value": "," + } + ] + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + } + ] + }, + "except_group_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "except*" + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + } + ] + }, + "finally_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "finally" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + } + ] + }, + "with_statement": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "with" + }, + { + "type": "SYMBOL", + "name": "with_clause" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + } + ] + }, + "with_clause": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "with_item" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "with_item" + } + ] + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "with_item" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "with_item" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "with_item": { + "type": "PREC_DYNAMIC", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "pattern" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "match_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "match" + }, + { + "type": "FIELD", + "name": "subject", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "expression_list" + }, + "named": true, + "value": "tuple" + } + ] + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "cases", + "content": { + "type": "SYMBOL", + "name": "cases" + } + } + ] + }, + "cases": { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "case_block" + } + }, + "case_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "case" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_match_patterns" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "guard", + "content": { + "type": "SYMBOL", + "name": "guard" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + } + ] + }, + "_match_patterns": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_match_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "open_sequence_match_pattern" + }, + "named": true, + "value": "match_sequence_pattern" + } + ] + }, + "open_sequence_match_pattern": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_match_maybe_star_pattern" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_match_maybe_star_pattern" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + } + ] + } + }, + "_match_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "match_as_pattern" + }, + { + "type": "SYMBOL", + "name": "_match_or_pattern" + } + ] + }, + "match_as_pattern": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_match_or_pattern" + } + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "_match_or_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "match_or_pattern" + }, + { + "type": "SYMBOL", + "name": "_closed_pattern" + } + ] + }, + "match_or_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_closed_pattern" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_closed_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_closed_pattern" + } + ] + } + } + ] + } + ] + }, + "_closed_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "match_literal_pattern" + }, + { + "type": "SYMBOL", + "name": "match_capture_pattern" + }, + { + "type": "SYMBOL", + "name": "match_wildcard_pattern" + }, + { + "type": "SYMBOL", + "name": "match_value_pattern" + }, + { + "type": "SYMBOL", + "name": "match_group_pattern" + }, + { + "type": "SYMBOL", + "name": "match_sequence_pattern" + }, + { + "type": "SYMBOL", + "name": "match_mapping_pattern" + }, + { + "type": "SYMBOL", + "name": "match_class_pattern" + } + ] + }, + "match_literal_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "prefix_operator", + "content": { + "type": "STRING", + "value": "-" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "real", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "integer" + }, + { + "type": "SYMBOL", + "name": "float" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "-" + } + ] + } + }, + { + "type": "FIELD", + "name": "imaginary", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "integer" + }, + { + "type": "SYMBOL", + "name": "float" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "concatenated_string" + }, + { + "type": "SYMBOL", + "name": "none" + }, + { + "type": "SYMBOL", + "name": "true" + }, + { + "type": "SYMBOL", + "name": "false" + } + ] + }, + "match_capture_pattern": { + "type": "SYMBOL", + "name": "identifier" + }, + "match_wildcard_pattern": { + "type": "STRING", + "value": "_" + }, + "match_value_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + } + ] + }, + "match_group_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "content", + "content": { + "type": "SYMBOL", + "name": "_match_pattern" + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "match_sequence_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_match_maybe_star_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_match_maybe_star_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_match_maybe_star_pattern" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_match_maybe_star_pattern" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + } + ] + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "_match_maybe_star_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_match_pattern" + }, + { + "type": "SYMBOL", + "name": "match_star_pattern" + } + ] + }, + "match_star_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "FIELD", + "name": "target", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "match_wildcard_pattern" + }, + { + "type": "SYMBOL", + "name": "match_capture_pattern" + } + ] + } + } + ] + }, + "match_mapping_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "match_double_star_pattern" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "match_key_value_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "match_key_value_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "match_double_star_pattern" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + ] + }, + "match_double_star_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "**" + }, + { + "type": "FIELD", + "name": "target", + "content": { + "type": "SYMBOL", + "name": "match_capture_pattern" + } + } + ] + }, + "match_key_value_pattern": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "key", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "match_literal_pattern" + }, + { + "type": "SYMBOL", + "name": "match_value_pattern" + } + ] + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_match_pattern" + } + } + ] + }, + "match_class_pattern": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "class", + "content": { + "type": "SYMBOL", + "name": "pattern_class_name" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "match_positional_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "match_positional_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "match_keyword_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "match_keyword_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "match_positional_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "match_positional_pattern" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "match_keyword_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "match_keyword_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + } + ] + }, + "pattern_class_name": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + } + ] + }, + "match_positional_pattern": { + "type": "SYMBOL", + "name": "_match_pattern" + }, + "match_keyword_pattern": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "attribute", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_match_pattern" + } + } + ] + }, + "guard": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "FIELD", + "name": "test", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "function_definition": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "def" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "SYMBOL", + "name": "type_parameters" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameters" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "return_type", + "content": { + "type": "SYMBOL", + "name": "type" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + } + ] + }, + "parameters": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_parameters" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "lambda_parameters": { + "type": "SYMBOL", + "name": "_parameters" + }, + "list_splat": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "dictionary_splat": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "**" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "global_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "global" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + } + ] + } + ] + }, + "nonlocal_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "nonlocal" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + } + ] + } + ] + }, + "exec_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "exec" + }, + { + "type": "FIELD", + "name": "code", + "content": { + "type": "SYMBOL", + "name": "string" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "in" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "type_alias_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "SYMBOL", + "name": "type_parameters" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "class_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "class" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "SYMBOL", + "name": "type_parameters" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "superclasses", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "argument_list" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_suite" + } + } + ] + }, + "type_parameters": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type_parameter", + "content": { + "type": "SYMBOL", + "name": "_type_parameter" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "type_parameter", + "content": { + "type": "SYMBOL", + "name": "_type_parameter" + } + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "_type_bound": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "bound", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "typevar_parameter": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_bound" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "typevartuple_parameter": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "paramspec_parameter": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "**" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "_type_parameter": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "typevar_parameter" + }, + { + "type": "SYMBOL", + "name": "typevartuple_parameter" + }, + { + "type": "SYMBOL", + "name": "paramspec_parameter" + } + ] + }, + "parenthesized_list_splat": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "parenthesized_list_splat" + }, + "named": true, + "value": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "list_splat" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "argument_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "element", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "list_splat" + }, + { + "type": "SYMBOL", + "name": "dictionary_splat" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "parenthesized_list_splat" + }, + "named": true, + "value": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "keyword_argument" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "element", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "list_splat" + }, + { + "type": "SYMBOL", + "name": "dictionary_splat" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "parenthesized_list_splat" + }, + "named": true, + "value": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "keyword_argument" + } + ] + } + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "decorated_definition": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "decorator" + } + }, + { + "type": "FIELD", + "name": "definition", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "class_definition" + }, + { + "type": "SYMBOL", + "name": "function_definition" + } + ] + } + } + ] + }, + "decorator": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "_newline" + } + ] + }, + "_suite": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_simple_statements" + }, + "named": true, + "value": "block" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_indent" + }, + { + "type": "SYMBOL", + "name": "block" + } + ] + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_newline" + }, + "named": true, + "value": "block" + } + ] + }, + "block": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + }, + { + "type": "SYMBOL", + "name": "_dedent" + } + ] + }, + "expression_list": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "element", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "list_splat" + }, + { + "type": "SYMBOL", + "name": "dictionary_splat" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "element", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "list_splat" + }, + { + "type": "SYMBOL", + "name": "dictionary_splat" + } + ] + } + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + } + ] + } + }, + "dotted_name": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + } + ] + }, + "_parameters": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "parameter" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "parameter" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_patterns": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "element", + "content": { + "type": "SYMBOL", + "name": "pattern" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "element", + "content": { + "type": "SYMBOL", + "name": "pattern" + } + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "trailing_comma", + "content": { + "type": "STRING", + "value": "," + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "parameter": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "typed_parameter" + }, + { + "type": "SYMBOL", + "name": "default_parameter" + }, + { + "type": "SYMBOL", + "name": "typed_default_parameter" + }, + { + "type": "SYMBOL", + "name": "list_splat_pattern" + }, + { + "type": "SYMBOL", + "name": "tuple_pattern" + }, + { + "type": "SYMBOL", + "name": "keyword_separator" + }, + { + "type": "SYMBOL", + "name": "positional_separator" + }, + { + "type": "SYMBOL", + "name": "dictionary_splat_pattern" + } + ] + }, + "pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "keyword_identifier" + }, + { + "type": "SYMBOL", + "name": "subscript" + }, + { + "type": "SYMBOL", + "name": "attribute" + }, + { + "type": "SYMBOL", + "name": "list_splat_pattern" + }, + { + "type": "SYMBOL", + "name": "tuple_pattern" + }, + { + "type": "SYMBOL", + "name": "list_pattern" + } + ] + }, + "tuple_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_patterns" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "list_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_patterns" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "default_parameter": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "typed_default_parameter": { + "type": "PREC", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "type" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + "list_splat_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "FIELD", + "name": "vararg", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "keyword_identifier" + }, + { + "type": "SYMBOL", + "name": "subscript" + }, + { + "type": "SYMBOL", + "name": "attribute" + } + ] + } + } + ] + }, + "dictionary_splat_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "**" + }, + { + "type": "FIELD", + "name": "kwarg", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "keyword_identifier" + }, + { + "type": "SYMBOL", + "name": "subscript" + }, + { + "type": "SYMBOL", + "name": "attribute" + } + ] + } + } + ] + }, + "_expression_within_for_in_clause": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "lambda_within_for_in_clause" + }, + "named": true, + "value": "lambda" + } + ] + }, + "expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "comparison_operator" + }, + { + "type": "SYMBOL", + "name": "not_operator" + }, + { + "type": "SYMBOL", + "name": "boolean_operator" + }, + { + "type": "SYMBOL", + "name": "await" + }, + { + "type": "SYMBOL", + "name": "lambda" + }, + { + "type": "SYMBOL", + "name": "primary_expression" + }, + { + "type": "SYMBOL", + "name": "conditional_expression" + }, + { + "type": "SYMBOL", + "name": "named_expression" + } + ] + }, + "primary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "binary_operator" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "keyword_identifier" + }, + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "concatenated_string" + }, + { + "type": "SYMBOL", + "name": "integer" + }, + { + "type": "SYMBOL", + "name": "float" + }, + { + "type": "SYMBOL", + "name": "true" + }, + { + "type": "SYMBOL", + "name": "false" + }, + { + "type": "SYMBOL", + "name": "none" + }, + { + "type": "SYMBOL", + "name": "unary_operator" + }, + { + "type": "SYMBOL", + "name": "attribute" + }, + { + "type": "SYMBOL", + "name": "subscript" + }, + { + "type": "SYMBOL", + "name": "call" + }, + { + "type": "SYMBOL", + "name": "list" + }, + { + "type": "SYMBOL", + "name": "list_comprehension" + }, + { + "type": "SYMBOL", + "name": "dictionary" + }, + { + "type": "SYMBOL", + "name": "dictionary_comprehension" + }, + { + "type": "SYMBOL", + "name": "set" + }, + { + "type": "SYMBOL", + "name": "set_comprehension" + }, + { + "type": "SYMBOL", + "name": "tuple" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "generator_expression" + }, + { + "type": "SYMBOL", + "name": "ellipsis" + } + ] + }, + "not_operator": { + "type": "PREC", + "value": 12, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "not" + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + "boolean_operator": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_RIGHT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "and" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "or" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + } + ] + }, + "binary_operator": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "+" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "-" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "*" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "@" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "/" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "%" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "//" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 20, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "**" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 13, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "|" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 14, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 15, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "^" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<<" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">>" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + } + ] + }, + "unary_operator": { + "type": "PREC", + "value": 19, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "~" + } + ] + } + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + } + ] + } + }, + "comparison_operator": { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "primary_expression" + }, + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operators", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "STRING", + "value": "<=" + }, + { + "type": "STRING", + "value": "==" + }, + { + "type": "STRING", + "value": "!=" + }, + { + "type": "STRING", + "value": ">=" + }, + { + "type": "STRING", + "value": ">" + }, + { + "type": "STRING", + "value": "<>" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "ALIAS", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "not" + }, + { + "type": "STRING", + "value": "in" + } + ] + }, + "named": false, + "value": "not in" + }, + { + "type": "STRING", + "value": "is" + }, + { + "type": "ALIAS", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "is" + }, + { + "type": "STRING", + "value": "not" + } + ] + }, + "named": false, + "value": "is not" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "primary_expression" + } + ] + } + } + ] + } + }, + "lambda": { + "type": "PREC", + "value": -2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "lambda" + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "lambda_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + "lambda_within_for_in_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "lambda" + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "lambda_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_expression_within_for_in_clause" + } + } + ] + }, + "assignment": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_left_hand_side" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_right_hand_side" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "type" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "type" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_right_hand_side" + } + } + ] + } + ] + } + ] + }, + "augmented_assignment": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_left_hand_side" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+=" + }, + { + "type": "STRING", + "value": "-=" + }, + { + "type": "STRING", + "value": "*=" + }, + { + "type": "STRING", + "value": "/=" + }, + { + "type": "STRING", + "value": "@=" + }, + { + "type": "STRING", + "value": "//=" + }, + { + "type": "STRING", + "value": "%=" + }, + { + "type": "STRING", + "value": "**=" + }, + { + "type": "STRING", + "value": ">>=" + }, + { + "type": "STRING", + "value": "<<=" + }, + { + "type": "STRING", + "value": "&=" + }, + { + "type": "STRING", + "value": "^=" + }, + { + "type": "STRING", + "value": "|=" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_right_hand_side" + } + } + ] + }, + "_left_hand_side": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pattern" + }, + { + "type": "SYMBOL", + "name": "pattern_list" + } + ] + }, + "pattern_list": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "element", + "content": { + "type": "SYMBOL", + "name": "pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "element", + "content": { + "type": "SYMBOL", + "name": "pattern" + } + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + } + ] + }, + "_right_hand_side": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "expression_list" + }, + { + "type": "SYMBOL", + "name": "assignment" + }, + { + "type": "SYMBOL", + "name": "augmented_assignment" + }, + { + "type": "SYMBOL", + "name": "yield" + } + ] + }, + "yield": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "yield" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "from" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expressions" + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + } + }, + "attribute": { + "type": "PREC", + "value": 21, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "object", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "attribute", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + } + }, + "subscript": { + "type": "PREC", + "value": 21, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "subscript", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "slice" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "subscript", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "slice" + } + ] + } + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "slice": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "start", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "stop", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "step", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "ellipsis": { + "type": "STRING", + "value": "..." + }, + "call": { + "type": "PREC", + "value": 21, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "generator_expression" + }, + { + "type": "SYMBOL", + "name": "argument_list" + } + ] + } + } + ] + } + }, + "typed_parameter": { + "type": "PREC", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "list_splat_pattern" + }, + { + "type": "SYMBOL", + "name": "dictionary_splat_pattern" + } + ] + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "type" + } + } + ] + } + }, + "type": { + "type": "SYMBOL", + "name": "expression" + }, + "keyword_argument": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "keyword_identifier" + } + ] + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_collection_elements" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "set": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SYMBOL", + "name": "_collection_elements" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "tuple": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_collection_elements" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "dictionary": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "element", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pair" + }, + { + "type": "SYMBOL", + "name": "dictionary_splat" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "element", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pair" + }, + { + "type": "SYMBOL", + "name": "dictionary_splat" + } + ] + } + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "pair": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "key", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "list_comprehension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "SYMBOL", + "name": "_comprehension_clauses" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "dictionary_comprehension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "pair" + } + }, + { + "type": "SYMBOL", + "name": "_comprehension_clauses" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "set_comprehension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "SYMBOL", + "name": "_comprehension_clauses" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "generator_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "SYMBOL", + "name": "_comprehension_clauses" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_comprehension_clauses": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "for_in_clause" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "for_in_clause" + }, + { + "type": "SYMBOL", + "name": "if_clause" + } + ] + } + } + ] + }, + "parenthesized_expression": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "inner", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "yield" + } + ] + } + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "_collection_elements": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "element", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "yield" + }, + { + "type": "SYMBOL", + "name": "list_splat" + }, + { + "type": "SYMBOL", + "name": "parenthesized_list_splat" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "element", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "yield" + }, + { + "type": "SYMBOL", + "name": "list_splat" + }, + { + "type": "SYMBOL", + "name": "parenthesized_list_splat" + } + ] + } + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "trailing_comma", + "content": { + "type": "STRING", + "value": "," + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "for_in_clause": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "for" + }, + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_left_hand_side" + } + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression_within_for_in_clause" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression_within_for_in_clause" + } + ] + } + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "if_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "conditional_expression": { + "type": "PREC_RIGHT", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": "if" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": "else" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + }, + "concatenated_string": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "string" + } + } + ] + }, + "string": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "prefix", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_string_start" + }, + "named": false, + "value": "\"" + } + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "interpolation", + "content": { + "type": "SYMBOL", + "name": "interpolation" + } + }, + { + "type": "FIELD", + "name": "string_content", + "content": { + "type": "SYMBOL", + "name": "string_content" + } + } + ] + } + }, + { + "type": "FIELD", + "name": "suffix", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_string_end" + }, + "named": false, + "value": "\"" + } + } + ] + }, + "string_content": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_escape_interpolation" + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "SYMBOL", + "name": "_not_escape_sequence" + }, + { + "type": "SYMBOL", + "name": "_string_content" + } + ] + } + } + }, + "interpolation": { + "type": "SEQ", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "{" + } + }, + { + "type": "FIELD", + "name": "expression", + "content": { + "type": "SYMBOL", + "name": "_f_expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_conversion" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "format_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_f_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "expression_list" + }, + { + "type": "SYMBOL", + "name": "yield" + } + ] + }, + "_escape_interpolation": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "{{" + }, + { + "type": "STRING", + "value": "}}" + } + ] + } + }, + "escape_sequence": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\\" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "u[a-fA-F\\d]{4}" + }, + { + "type": "PATTERN", + "value": "U[a-fA-F\\d]{8}" + }, + { + "type": "PATTERN", + "value": "x[a-fA-F\\d]{2}" + }, + { + "type": "PATTERN", + "value": "\\d{3}" + }, + { + "type": "PATTERN", + "value": "\\r?\\n" + }, + { + "type": "PATTERN", + "value": "['\"abfrntv\\\\]" + }, + { + "type": "PATTERN", + "value": "N\\{[^}]+\\}" + } + ] + } + ] + } + } + }, + "_not_escape_sequence": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "\\" + } + }, + "format_specifier": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "PATTERN", + "value": "[^{}\\n]+" + } + } + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "interpolation" + }, + "named": true, + "value": "format_expression" + } + ] + } + } + ] + }, + "format_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "type_conversion": { + "type": "PATTERN", + "value": "![a-z]" + }, + "integer": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0x" + }, + { + "type": "STRING", + "value": "0X" + } + ] + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "_?[A-Fa-f0-9]+" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[Ll]" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0o" + }, + { + "type": "STRING", + "value": "0O" + } + ] + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "_?[0-7]+" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[Ll]" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0b" + }, + { + "type": "STRING", + "value": "0B" + } + ] + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "_?[0-1]+" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[Ll]" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]+_?" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[Ll]" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[jJ]" + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + } + ] + } + }, + "float": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]+_?" + } + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]+_?" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[eE][\\+-]?" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]+_?" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]+_?" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]+_?" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[eE][\\+-]?" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]+_?" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]+_?" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[eE][\\+-]?" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[0-9]+_?" + } + } + ] + } + ] + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[Ll]" + }, + { + "type": "PATTERN", + "value": "[jJ]" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "identifier": { + "type": "PATTERN", + "value": "[_\\p{XID_Start}][_\\p{XID_Continue}]*" + }, + "keyword_identifier": { + "type": "PREC", + "value": -3, + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "print" + }, + { + "type": "STRING", + "value": "exec" + }, + { + "type": "STRING", + "value": "async" + }, + { + "type": "STRING", + "value": "await" + }, + { + "type": "STRING", + "value": "match" + }, + { + "type": "STRING", + "value": "type" + } + ] + }, + "named": true, + "value": "identifier" + } + }, + "true": { + "type": "STRING", + "value": "True" + }, + "false": { + "type": "STRING", + "value": "False" + }, + "none": { + "type": "STRING", + "value": "None" + }, + "await": { + "type": "PREC", + "value": 19, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "await" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + }, + "comment": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "PATTERN", + "value": ".*" + } + ] + } + }, + "positional_separator": { + "type": "STRING", + "value": "/" + }, + "keyword_separator": { + "type": "STRING", + "value": "*" + }, + "_semicolon": { + "type": "STRING", + "value": ";" + } + }, + "extras": [ + { + "type": "SYMBOL", + "name": "comment" + }, + { + "type": "PATTERN", + "value": "[\\s\\f\\uFEFF\\u2060\\u200B]|\\\\\\r?\\n" + } + ], + "conflicts": [ + [ + "primary_expression", + "pattern" + ], + [ + "primary_expression", + "list_splat_pattern" + ], + [ + "tuple", + "tuple_pattern" + ], + [ + "list", + "list_pattern" + ], + [ + "with_item", + "_collection_elements" + ] + ], + "precedences": [], + "externals": [ + { + "type": "SYMBOL", + "name": "_newline" + }, + { + "type": "SYMBOL", + "name": "_indent" + }, + { + "type": "SYMBOL", + "name": "_dedent" + }, + { + "type": "SYMBOL", + "name": "_string_start" + }, + { + "type": "SYMBOL", + "name": "_string_content" + }, + { + "type": "SYMBOL", + "name": "_string_end" + } + ], + "inline": [ + "_simple_statement", + "_compound_statement", + "_suite", + "_expressions", + "_left_hand_side", + "keyword_identifier" + ], + "supertypes": [ + "_simple_statement", + "_compound_statement", + "expression", + "primary_expression", + "pattern", + "parameter" + ] +} + diff --git a/python/extractor/tsg-python/tree-sitter-python/src/node-types.json b/python/extractor/tsg-python/tree-sitter-python/src/node-types.json new file mode 100644 index 00000000000..515d815d833 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/src/node-types.json @@ -0,0 +1,4064 @@ +[ + { + "type": "_compound_statement", + "named": true, + "subtypes": [ + { + "type": "class_definition", + "named": true + }, + { + "type": "decorated_definition", + "named": true + }, + { + "type": "for_statement", + "named": true + }, + { + "type": "function_definition", + "named": true + }, + { + "type": "if_statement", + "named": true + }, + { + "type": "match_statement", + "named": true + }, + { + "type": "try_statement", + "named": true + }, + { + "type": "while_statement", + "named": true + }, + { + "type": "with_statement", + "named": true + } + ] + }, + { + "type": "_simple_statement", + "named": true, + "subtypes": [ + { + "type": "assert_statement", + "named": true + }, + { + "type": "break_statement", + "named": true + }, + { + "type": "continue_statement", + "named": true + }, + { + "type": "delete_statement", + "named": true + }, + { + "type": "exec_statement", + "named": true + }, + { + "type": "expression_statement", + "named": true + }, + { + "type": "future_import_statement", + "named": true + }, + { + "type": "global_statement", + "named": true + }, + { + "type": "import_from_statement", + "named": true + }, + { + "type": "import_statement", + "named": true + }, + { + "type": "nonlocal_statement", + "named": true + }, + { + "type": "pass_statement", + "named": true + }, + { + "type": "print_statement", + "named": true + }, + { + "type": "raise_statement", + "named": true + }, + { + "type": "return_statement", + "named": true + }, + { + "type": "type_alias_statement", + "named": true + } + ] + }, + { + "type": "expression", + "named": true, + "subtypes": [ + { + "type": "await", + "named": true + }, + { + "type": "boolean_operator", + "named": true + }, + { + "type": "comparison_operator", + "named": true + }, + { + "type": "conditional_expression", + "named": true + }, + { + "type": "lambda", + "named": true + }, + { + "type": "named_expression", + "named": true + }, + { + "type": "not_operator", + "named": true + }, + { + "type": "primary_expression", + "named": true + } + ] + }, + { + "type": "parameter", + "named": true, + "subtypes": [ + { + "type": "default_parameter", + "named": true + }, + { + "type": "dictionary_splat_pattern", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "keyword_separator", + "named": true + }, + { + "type": "list_splat_pattern", + "named": true + }, + { + "type": "positional_separator", + "named": true + }, + { + "type": "tuple_pattern", + "named": true + }, + { + "type": "typed_default_parameter", + "named": true + }, + { + "type": "typed_parameter", + "named": true + } + ] + }, + { + "type": "pattern", + "named": true, + "subtypes": [ + { + "type": "attribute", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "list_pattern", + "named": true + }, + { + "type": "list_splat_pattern", + "named": true + }, + { + "type": "subscript", + "named": true + }, + { + "type": "tuple_pattern", + "named": true + } + ] + }, + { + "type": "primary_expression", + "named": true, + "subtypes": [ + { + "type": "attribute", + "named": true + }, + { + "type": "binary_operator", + "named": true + }, + { + "type": "call", + "named": true + }, + { + "type": "concatenated_string", + "named": true + }, + { + "type": "dictionary", + "named": true + }, + { + "type": "dictionary_comprehension", + "named": true + }, + { + "type": "ellipsis", + "named": true + }, + { + "type": "false", + "named": true + }, + { + "type": "float", + "named": true + }, + { + "type": "generator_expression", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "integer", + "named": true + }, + { + "type": "list", + "named": true + }, + { + "type": "list_comprehension", + "named": true + }, + { + "type": "none", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "set", + "named": true + }, + { + "type": "set_comprehension", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "subscript", + "named": true + }, + { + "type": "true", + "named": true + }, + { + "type": "tuple", + "named": true + }, + { + "type": "unary_operator", + "named": true + } + ] + }, + { + "type": "aliased_import", + "named": true, + "fields": { + "alias": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "dotted_name", + "named": true + } + ] + } + } + }, + { + "type": "argument_list", + "named": true, + "fields": { + "element": { + "multiple": true, + "required": false, + "types": [ + { + "type": "dictionary_splat", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "keyword_argument", + "named": true + }, + { + "type": "list_splat", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + } + ] + } + } + }, + { + "type": "assert_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "assignment", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "pattern", + "named": true + }, + { + "type": "pattern_list", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": false, + "types": [ + { + "type": "assignment", + "named": true + }, + { + "type": "augmented_assignment", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + }, + { + "type": "yield", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type", + "named": true + } + ] + } + } + }, + { + "type": "attribute", + "named": true, + "fields": { + "attribute": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "object": { + "multiple": false, + "required": true, + "types": [ + { + "type": "primary_expression", + "named": true + } + ] + } + } + }, + { + "type": "augmented_assignment", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "pattern", + "named": true + }, + { + "type": "pattern_list", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "%=", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "**=", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "//=", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "@=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "|=", + "named": false + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "assignment", + "named": true + }, + { + "type": "augmented_assignment", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + }, + { + "type": "yield", + "named": true + } + ] + } + } + }, + { + "type": "await", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "binary_operator", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "primary_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "%", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "**", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "//", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": "@", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "|", + "named": false + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "primary_expression", + "named": true + } + ] + } + } + }, + { + "type": "block", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_compound_statement", + "named": true + }, + { + "type": "_simple_statement", + "named": true + } + ] + } + }, + { + "type": "boolean_operator", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "and", + "named": false + }, + { + "type": "or", + "named": false + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "break_statement", + "named": true, + "fields": {} + }, + { + "type": "call", + "named": true, + "fields": { + "arguments": { + "multiple": false, + "required": true, + "types": [ + { + "type": "argument_list", + "named": true + }, + { + "type": "generator_expression", + "named": true + } + ] + }, + "function": { + "multiple": false, + "required": true, + "types": [ + { + "type": "primary_expression", + "named": true + } + ] + } + } + }, + { + "type": "case_block", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "guard": { + "multiple": false, + "required": false, + "types": [ + { + "type": "guard", + "named": true + } + ] + }, + "pattern": { + "multiple": false, + "required": true, + "types": [ + { + "type": "match_as_pattern", + "named": true + }, + { + "type": "match_capture_pattern", + "named": true + }, + { + "type": "match_class_pattern", + "named": true + }, + { + "type": "match_group_pattern", + "named": true + }, + { + "type": "match_literal_pattern", + "named": true + }, + { + "type": "match_mapping_pattern", + "named": true + }, + { + "type": "match_or_pattern", + "named": true + }, + { + "type": "match_sequence_pattern", + "named": true + }, + { + "type": "match_value_pattern", + "named": true + }, + { + "type": "match_wildcard_pattern", + "named": true + } + ] + } + } + }, + { + "type": "cases", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "case_block", + "named": true + } + ] + } + }, + { + "type": "chevron", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "class_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "superclasses": { + "multiple": false, + "required": false, + "types": [ + { + "type": "argument_list", + "named": true + } + ] + }, + "type_parameters": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type_parameters", + "named": true + } + ] + } + } + }, + { + "type": "comparison_operator", + "named": true, + "fields": { + "operators": { + "multiple": true, + "required": true, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<>", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": "in", + "named": false + }, + { + "type": "is", + "named": false + }, + { + "type": "is not", + "named": false + }, + { + "type": "not in", + "named": false + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "primary_expression", + "named": true + } + ] + } + }, + { + "type": "concatenated_string", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "string", + "named": true + } + ] + } + }, + { + "type": "conditional_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "continue_statement", + "named": true, + "fields": {} + }, + { + "type": "decorated_definition", + "named": true, + "fields": { + "definition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "class_definition", + "named": true + }, + { + "type": "function_definition", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "decorator", + "named": true + } + ] + } + }, + { + "type": "decorator", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "default_parameter", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "delete_statement", + "named": true, + "fields": { + "target": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + } + ] + } + } + }, + { + "type": "dictionary", + "named": true, + "fields": { + "element": { + "multiple": true, + "required": false, + "types": [ + { + "type": "dictionary_splat", + "named": true + }, + { + "type": "pair", + "named": true + } + ] + } + } + }, + { + "type": "dictionary_comprehension", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "pair", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "for_in_clause", + "named": true + }, + { + "type": "if_clause", + "named": true + } + ] + } + }, + { + "type": "dictionary_splat", + "named": true, + "fields": { + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "dictionary_splat_pattern", + "named": true, + "fields": { + "kwarg": { + "multiple": false, + "required": true, + "types": [ + { + "type": "attribute", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "subscript", + "named": true + } + ] + } + } + }, + { + "type": "dotted_name", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "elif_clause", + "named": true, + "fields": { + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "consequence": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + } + }, + { + "type": "else_clause", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + } + }, + { + "type": "except_clause", + "named": true, + "fields": { + "alias": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "except_group_clause", + "named": true, + "fields": { + "alias": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "exec_statement", + "named": true, + "fields": { + "code": { + "multiple": false, + "required": true, + "types": [ + { + "type": "string", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "expression_list", + "named": true, + "fields": { + "element": { + "multiple": true, + "required": true, + "types": [ + { + "type": "dictionary_splat", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "list_splat", + "named": true + } + ] + } + } + }, + { + "type": "expression_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "assignment", + "named": true + }, + { + "type": "augmented_assignment", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + }, + { + "type": "yield", + "named": true + } + ] + } + }, + { + "type": "finally_clause", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + } + }, + { + "type": "for_in_clause", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "pattern", + "named": true + }, + { + "type": "pattern_list", + "named": true + } + ] + }, + "right": { + "multiple": true, + "required": true, + "types": [ + { + "type": ",", + "named": false + }, + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "for_statement", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": false, + "types": [ + { + "type": "else_clause", + "named": true + } + ] + }, + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "pattern", + "named": true + }, + { + "type": "pattern_list", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + } + ] + } + } + }, + { + "type": "format_expression", + "named": true, + "fields": { + "expression": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + }, + { + "type": "yield", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "format_specifier", + "named": true + }, + { + "type": "type_conversion", + "named": true + } + ] + } + }, + { + "type": "format_specifier", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "format_expression", + "named": true + } + ] + } + }, + { + "type": "function_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parameters", + "named": true + } + ] + }, + "return_type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type", + "named": true + } + ] + }, + "type_parameters": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type_parameters", + "named": true + } + ] + } + } + }, + { + "type": "future_import_statement", + "named": true, + "fields": { + "name": { + "multiple": true, + "required": true, + "types": [ + { + "type": "aliased_import", + "named": true + }, + { + "type": "dotted_name", + "named": true + } + ] + } + } + }, + { + "type": "generator_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "for_in_clause", + "named": true + }, + { + "type": "if_clause", + "named": true + } + ] + } + }, + { + "type": "global_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "guard", + "named": true, + "fields": { + "test": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "if_clause", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "if_statement", + "named": true, + "fields": { + "alternative": { + "multiple": true, + "required": false, + "types": [ + { + "type": "elif_clause", + "named": true + }, + { + "type": "else_clause", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "consequence": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + } + }, + { + "type": "import_from_statement", + "named": true, + "fields": { + "module_name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "dotted_name", + "named": true + }, + { + "type": "relative_import", + "named": true + } + ] + }, + "name": { + "multiple": true, + "required": false, + "types": [ + { + "type": "aliased_import", + "named": true + }, + { + "type": "dotted_name", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "wildcard_import", + "named": true + } + ] + } + }, + { + "type": "import_prefix", + "named": true, + "fields": {} + }, + { + "type": "import_statement", + "named": true, + "fields": { + "name": { + "multiple": true, + "required": true, + "types": [ + { + "type": "aliased_import", + "named": true + }, + { + "type": "dotted_name", + "named": true + } + ] + } + } + }, + { + "type": "interpolation", + "named": true, + "fields": { + "expression": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + }, + { + "type": "yield", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "format_specifier", + "named": true + }, + { + "type": "type_conversion", + "named": true + } + ] + } + }, + { + "type": "keyword_argument", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "keyword_separator", + "named": true, + "fields": {} + }, + { + "type": "lambda", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": false, + "types": [ + { + "type": "lambda_parameters", + "named": true + } + ] + } + } + }, + { + "type": "lambda_parameters", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "parameter", + "named": true + } + ] + } + }, + { + "type": "list", + "named": true, + "fields": { + "element": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "list_splat", + "named": true + }, + { + "type": "parenthesized_list_splat", + "named": true + }, + { + "type": "yield", + "named": true + } + ] + }, + "trailing_comma": { + "multiple": false, + "required": false, + "types": [ + { + "type": ",", + "named": false + } + ] + } + } + }, + { + "type": "list_comprehension", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "for_in_clause", + "named": true + }, + { + "type": "if_clause", + "named": true + } + ] + } + }, + { + "type": "list_pattern", + "named": true, + "fields": { + "element": { + "multiple": true, + "required": false, + "types": [ + { + "type": "pattern", + "named": true + } + ] + }, + "trailing_comma": { + "multiple": false, + "required": false, + "types": [ + { + "type": ",", + "named": false + } + ] + } + } + }, + { + "type": "list_splat", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "list_splat_pattern", + "named": true, + "fields": { + "vararg": { + "multiple": false, + "required": true, + "types": [ + { + "type": "attribute", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "subscript", + "named": true + } + ] + } + } + }, + { + "type": "match_as_pattern", + "named": true, + "fields": { + "alias": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "pattern": { + "multiple": false, + "required": true, + "types": [ + { + "type": "match_capture_pattern", + "named": true + }, + { + "type": "match_class_pattern", + "named": true + }, + { + "type": "match_group_pattern", + "named": true + }, + { + "type": "match_literal_pattern", + "named": true + }, + { + "type": "match_mapping_pattern", + "named": true + }, + { + "type": "match_or_pattern", + "named": true + }, + { + "type": "match_sequence_pattern", + "named": true + }, + { + "type": "match_value_pattern", + "named": true + }, + { + "type": "match_wildcard_pattern", + "named": true + } + ] + } + } + }, + { + "type": "match_capture_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "match_class_pattern", + "named": true, + "fields": { + "class": { + "multiple": false, + "required": true, + "types": [ + { + "type": "pattern_class_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "match_keyword_pattern", + "named": true + }, + { + "type": "match_positional_pattern", + "named": true + } + ] + } + }, + { + "type": "match_double_star_pattern", + "named": true, + "fields": { + "target": { + "multiple": false, + "required": true, + "types": [ + { + "type": "match_capture_pattern", + "named": true + } + ] + } + } + }, + { + "type": "match_group_pattern", + "named": true, + "fields": { + "content": { + "multiple": false, + "required": true, + "types": [ + { + "type": "match_as_pattern", + "named": true + }, + { + "type": "match_capture_pattern", + "named": true + }, + { + "type": "match_class_pattern", + "named": true + }, + { + "type": "match_group_pattern", + "named": true + }, + { + "type": "match_literal_pattern", + "named": true + }, + { + "type": "match_mapping_pattern", + "named": true + }, + { + "type": "match_or_pattern", + "named": true + }, + { + "type": "match_sequence_pattern", + "named": true + }, + { + "type": "match_value_pattern", + "named": true + }, + { + "type": "match_wildcard_pattern", + "named": true + } + ] + } + } + }, + { + "type": "match_key_value_pattern", + "named": true, + "fields": { + "key": { + "multiple": false, + "required": true, + "types": [ + { + "type": "match_literal_pattern", + "named": true + }, + { + "type": "match_value_pattern", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "match_as_pattern", + "named": true + }, + { + "type": "match_capture_pattern", + "named": true + }, + { + "type": "match_class_pattern", + "named": true + }, + { + "type": "match_group_pattern", + "named": true + }, + { + "type": "match_literal_pattern", + "named": true + }, + { + "type": "match_mapping_pattern", + "named": true + }, + { + "type": "match_or_pattern", + "named": true + }, + { + "type": "match_sequence_pattern", + "named": true + }, + { + "type": "match_value_pattern", + "named": true + }, + { + "type": "match_wildcard_pattern", + "named": true + } + ] + } + } + }, + { + "type": "match_keyword_pattern", + "named": true, + "fields": { + "attribute": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "match_as_pattern", + "named": true + }, + { + "type": "match_capture_pattern", + "named": true + }, + { + "type": "match_class_pattern", + "named": true + }, + { + "type": "match_group_pattern", + "named": true + }, + { + "type": "match_literal_pattern", + "named": true + }, + { + "type": "match_mapping_pattern", + "named": true + }, + { + "type": "match_or_pattern", + "named": true + }, + { + "type": "match_sequence_pattern", + "named": true + }, + { + "type": "match_value_pattern", + "named": true + }, + { + "type": "match_wildcard_pattern", + "named": true + } + ] + } + } + }, + { + "type": "match_literal_pattern", + "named": true, + "fields": { + "imaginary": { + "multiple": false, + "required": false, + "types": [ + { + "type": "float", + "named": true + }, + { + "type": "integer", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": false, + "types": [ + { + "type": "+", + "named": false + }, + { + "type": "-", + "named": false + } + ] + }, + "prefix_operator": { + "multiple": false, + "required": false, + "types": [ + { + "type": "-", + "named": false + } + ] + }, + "real": { + "multiple": false, + "required": false, + "types": [ + { + "type": "float", + "named": true + }, + { + "type": "integer", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "concatenated_string", + "named": true + }, + { + "type": "false", + "named": true + }, + { + "type": "none", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "true", + "named": true + } + ] + } + }, + { + "type": "match_mapping_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "match_double_star_pattern", + "named": true + }, + { + "type": "match_key_value_pattern", + "named": true + } + ] + } + }, + { + "type": "match_or_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "match_capture_pattern", + "named": true + }, + { + "type": "match_class_pattern", + "named": true + }, + { + "type": "match_group_pattern", + "named": true + }, + { + "type": "match_literal_pattern", + "named": true + }, + { + "type": "match_mapping_pattern", + "named": true + }, + { + "type": "match_sequence_pattern", + "named": true + }, + { + "type": "match_value_pattern", + "named": true + }, + { + "type": "match_wildcard_pattern", + "named": true + } + ] + } + }, + { + "type": "match_positional_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "match_as_pattern", + "named": true + }, + { + "type": "match_capture_pattern", + "named": true + }, + { + "type": "match_class_pattern", + "named": true + }, + { + "type": "match_group_pattern", + "named": true + }, + { + "type": "match_literal_pattern", + "named": true + }, + { + "type": "match_mapping_pattern", + "named": true + }, + { + "type": "match_or_pattern", + "named": true + }, + { + "type": "match_sequence_pattern", + "named": true + }, + { + "type": "match_value_pattern", + "named": true + }, + { + "type": "match_wildcard_pattern", + "named": true + } + ] + } + }, + { + "type": "match_sequence_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "match_as_pattern", + "named": true + }, + { + "type": "match_capture_pattern", + "named": true + }, + { + "type": "match_class_pattern", + "named": true + }, + { + "type": "match_group_pattern", + "named": true + }, + { + "type": "match_literal_pattern", + "named": true + }, + { + "type": "match_mapping_pattern", + "named": true + }, + { + "type": "match_or_pattern", + "named": true + }, + { + "type": "match_sequence_pattern", + "named": true + }, + { + "type": "match_star_pattern", + "named": true + }, + { + "type": "match_value_pattern", + "named": true + }, + { + "type": "match_wildcard_pattern", + "named": true + } + ] + } + }, + { + "type": "match_star_pattern", + "named": true, + "fields": { + "target": { + "multiple": false, + "required": true, + "types": [ + { + "type": "match_capture_pattern", + "named": true + }, + { + "type": "match_wildcard_pattern", + "named": true + } + ] + } + } + }, + { + "type": "match_statement", + "named": true, + "fields": { + "cases": { + "multiple": false, + "required": true, + "types": [ + { + "type": "cases", + "named": true + } + ] + }, + "subject": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "tuple", + "named": true + } + ] + } + } + }, + { + "type": "match_value_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "module", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_compound_statement", + "named": true + }, + { + "type": "_simple_statement", + "named": true + } + ] + } + }, + { + "type": "named_expression", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "nonlocal_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "not_operator", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "pair", + "named": true, + "fields": { + "key": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "parameters", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "parameter", + "named": true + } + ] + } + }, + { + "type": "paramspec_parameter", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": { + "inner": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "yield", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "list_splat", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + } + ] + } + }, + { + "type": "parenthesized_list_splat", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "list_splat", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + } + ] + } + }, + { + "type": "pass_statement", + "named": true, + "fields": {} + }, + { + "type": "pattern_class_name", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "pattern_list", + "named": true, + "fields": { + "element": { + "multiple": true, + "required": true, + "types": [ + { + "type": "pattern", + "named": true + } + ] + } + } + }, + { + "type": "positional_separator", + "named": true, + "fields": {} + }, + { + "type": "print_statement", + "named": true, + "fields": { + "argument": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "chevron", + "named": true + } + ] + } + }, + { + "type": "raise_statement", + "named": true, + "fields": { + "cause": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + } + ] + } + }, + { + "type": "relative_import", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "dotted_name", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "import_prefix", + "named": true + } + ] + } + }, + { + "type": "return_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + } + ] + } + }, + { + "type": "set", + "named": true, + "fields": { + "element": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "list_splat", + "named": true + }, + { + "type": "parenthesized_list_splat", + "named": true + }, + { + "type": "yield", + "named": true + } + ] + }, + "trailing_comma": { + "multiple": false, + "required": false, + "types": [ + { + "type": ",", + "named": false + } + ] + } + } + }, + { + "type": "set_comprehension", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "for_in_clause", + "named": true + }, + { + "type": "if_clause", + "named": true + } + ] + } + }, + { + "type": "slice", + "named": true, + "fields": { + "start": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "step": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "stop": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "string", + "named": true, + "fields": { + "interpolation": { + "multiple": true, + "required": false, + "types": [ + { + "type": "interpolation", + "named": true + } + ] + }, + "prefix": { + "multiple": false, + "required": true, + "types": [ + { + "type": "\"", + "named": false + } + ] + }, + "string_content": { + "multiple": true, + "required": false, + "types": [ + { + "type": "string_content", + "named": true + } + ] + }, + "suffix": { + "multiple": false, + "required": true, + "types": [ + { + "type": "\"", + "named": false + } + ] + } + } + }, + { + "type": "string_content", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + } + ] + } + }, + { + "type": "subscript", + "named": true, + "fields": { + "subscript": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "slice", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "primary_expression", + "named": true + } + ] + } + } + }, + { + "type": "try_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "else_clause", + "named": true + }, + { + "type": "except_clause", + "named": true + }, + { + "type": "except_group_clause", + "named": true + }, + { + "type": "finally_clause", + "named": true + } + ] + } + }, + { + "type": "tuple", + "named": true, + "fields": { + "element": { + "multiple": true, + "required": false, + "types": [ + { + "type": "dictionary_splat", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "list_splat", + "named": true + }, + { + "type": "parenthesized_list_splat", + "named": true + }, + { + "type": "yield", + "named": true + } + ] + }, + "trailing_comma": { + "multiple": false, + "required": false, + "types": [ + { + "type": ",", + "named": false + } + ] + } + } + }, + { + "type": "tuple_pattern", + "named": true, + "fields": { + "element": { + "multiple": true, + "required": false, + "types": [ + { + "type": "pattern", + "named": true + } + ] + }, + "trailing_comma": { + "multiple": false, + "required": false, + "types": [ + { + "type": ",", + "named": false + } + ] + } + } + }, + { + "type": "type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "type_alias_statement", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type_parameters": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type_parameters", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "type_parameters", + "named": true, + "fields": { + "type_parameter": { + "multiple": true, + "required": true, + "types": [ + { + "type": "paramspec_parameter", + "named": true + }, + { + "type": "typevar_parameter", + "named": true + }, + { + "type": "typevartuple_parameter", + "named": true + } + ] + } + } + }, + { + "type": "typed_default_parameter", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "typed_parameter", + "named": true, + "fields": { + "type": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "dictionary_splat_pattern", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "list_splat_pattern", + "named": true + } + ] + } + }, + { + "type": "typevar_parameter", + "named": true, + "fields": { + "bound": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + } + }, + { + "type": "typevartuple_parameter", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + } + }, + { + "type": "unary_operator", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": true, + "types": [ + { + "type": "primary_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "+", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "~", + "named": false + } + ] + } + } + }, + { + "type": "while_statement", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": false, + "types": [ + { + "type": "else_clause", + "named": true + } + ] + }, + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "wildcard_import", + "named": true, + "fields": {} + }, + { + "type": "with_clause", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "with_item", + "named": true + } + ] + } + }, + { + "type": "with_item", + "named": true, + "fields": { + "alias": { + "multiple": false, + "required": false, + "types": [ + { + "type": "pattern", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "with_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "with_clause", + "named": true + } + ] + } + }, + { + "type": "yield", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + } + ] + } + }, + { + "type": "!=", + "named": false + }, + { + "type": "\"", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "**", + "named": false + }, + { + "type": "**=", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": ",", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "->", + "named": false + }, + { + "type": ".", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "//", + "named": false + }, + { + "type": "//=", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": ":=", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "@", + "named": false + }, + { + "type": "@=", + "named": false + }, + { + "type": "[", + "named": false + }, + { + "type": "]", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "__future__", + "named": false + }, + { + "type": "and", + "named": false + }, + { + "type": "as", + "named": false + }, + { + "type": "assert", + "named": false + }, + { + "type": "async", + "named": false + }, + { + "type": "await", + "named": false + }, + { + "type": "break", + "named": false + }, + { + "type": "case", + "named": false + }, + { + "type": "class", + "named": false + }, + { + "type": "comment", + "named": true + }, + { + "type": "continue", + "named": false + }, + { + "type": "def", + "named": false + }, + { + "type": "del", + "named": false + }, + { + "type": "elif", + "named": false + }, + { + "type": "ellipsis", + "named": true + }, + { + "type": "else", + "named": false + }, + { + "type": "escape_sequence", + "named": true + }, + { + "type": "except", + "named": false + }, + { + "type": "except*", + "named": false + }, + { + "type": "exec", + "named": false + }, + { + "type": "false", + "named": true + }, + { + "type": "finally", + "named": false + }, + { + "type": "float", + "named": true + }, + { + "type": "for", + "named": false + }, + { + "type": "from", + "named": false + }, + { + "type": "global", + "named": false + }, + { + "type": "identifier", + "named": true + }, + { + "type": "if", + "named": false + }, + { + "type": "import", + "named": false + }, + { + "type": "in", + "named": false + }, + { + "type": "integer", + "named": true + }, + { + "type": "is", + "named": false + }, + { + "type": "is not", + "named": false + }, + { + "type": "lambda", + "named": false + }, + { + "type": "match", + "named": false + }, + { + "type": "match_wildcard_pattern", + "named": true + }, + { + "type": "none", + "named": true + }, + { + "type": "nonlocal", + "named": false + }, + { + "type": "not", + "named": false + }, + { + "type": "not in", + "named": false + }, + { + "type": "or", + "named": false + }, + { + "type": "pass", + "named": false + }, + { + "type": "print", + "named": false + }, + { + "type": "raise", + "named": false + }, + { + "type": "return", + "named": false + }, + { + "type": "true", + "named": true + }, + { + "type": "try", + "named": false + }, + { + "type": "type", + "named": false + }, + { + "type": "type_conversion", + "named": true + }, + { + "type": "while", + "named": false + }, + { + "type": "with", + "named": false + }, + { + "type": "yield", + "named": false + }, + { + "type": "{", + "named": false + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "}", + "named": false + }, + { + "type": "~", + "named": false + } +] \ No newline at end of file diff --git a/python/extractor/tsg-python/tree-sitter-python/src/parser.c b/python/extractor/tsg-python/tree-sitter-python/src/parser.c new file mode 100644 index 00000000000..05a076d96a2 --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/src/parser.c @@ -0,0 +1,76504 @@ +#include + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 14 +#define STATE_COUNT 1525 +#define LARGE_STATE_COUNT 155 +#define SYMBOL_COUNT 280 +#define ALIAS_COUNT 3 +#define TOKEN_COUNT 108 +#define EXTERNAL_TOKEN_COUNT 6 +#define FIELD_COUNT 53 +#define MAX_ALIAS_SEQUENCE_LENGTH 10 +#define PRODUCTION_ID_COUNT 161 + +enum { + sym_identifier = 1, + anon_sym_import = 2, + anon_sym_DOT = 3, + anon_sym_from = 4, + anon_sym___future__ = 5, + anon_sym_LPAREN = 6, + anon_sym_RPAREN = 7, + anon_sym_COMMA = 8, + anon_sym_as = 9, + anon_sym_STAR = 10, + anon_sym_print = 11, + anon_sym_GT_GT = 12, + anon_sym_assert = 13, + anon_sym_COLON_EQ = 14, + anon_sym_return = 15, + anon_sym_del = 16, + anon_sym_raise = 17, + anon_sym_pass = 18, + anon_sym_break = 19, + anon_sym_continue = 20, + anon_sym_if = 21, + anon_sym_COLON = 22, + anon_sym_elif = 23, + anon_sym_else = 24, + anon_sym_async = 25, + anon_sym_for = 26, + anon_sym_in = 27, + anon_sym_while = 28, + anon_sym_try = 29, + anon_sym_except = 30, + anon_sym_except_STAR = 31, + anon_sym_finally = 32, + anon_sym_with = 33, + anon_sym_match = 34, + anon_sym_case = 35, + anon_sym_PIPE = 36, + anon_sym_DASH = 37, + anon_sym_PLUS = 38, + sym_match_wildcard_pattern = 39, + anon_sym_LBRACK = 40, + anon_sym_RBRACK = 41, + anon_sym_LBRACE = 42, + anon_sym_RBRACE = 43, + anon_sym_STAR_STAR = 44, + anon_sym_EQ = 45, + anon_sym_def = 46, + anon_sym_DASH_GT = 47, + anon_sym_global = 48, + anon_sym_nonlocal = 49, + anon_sym_exec = 50, + anon_sym_type = 51, + anon_sym_class = 52, + anon_sym_AT = 53, + anon_sym_not = 54, + anon_sym_and = 55, + anon_sym_or = 56, + anon_sym_SLASH = 57, + anon_sym_PERCENT = 58, + anon_sym_SLASH_SLASH = 59, + anon_sym_AMP = 60, + anon_sym_CARET = 61, + anon_sym_LT_LT = 62, + anon_sym_TILDE = 63, + anon_sym_LT = 64, + anon_sym_LT_EQ = 65, + anon_sym_EQ_EQ = 66, + anon_sym_BANG_EQ = 67, + anon_sym_GT_EQ = 68, + anon_sym_GT = 69, + anon_sym_LT_GT = 70, + anon_sym_is = 71, + anon_sym_lambda = 72, + anon_sym_PLUS_EQ = 73, + anon_sym_DASH_EQ = 74, + anon_sym_STAR_EQ = 75, + anon_sym_SLASH_EQ = 76, + anon_sym_AT_EQ = 77, + anon_sym_SLASH_SLASH_EQ = 78, + anon_sym_PERCENT_EQ = 79, + anon_sym_STAR_STAR_EQ = 80, + anon_sym_GT_GT_EQ = 81, + anon_sym_LT_LT_EQ = 82, + anon_sym_AMP_EQ = 83, + anon_sym_CARET_EQ = 84, + anon_sym_PIPE_EQ = 85, + anon_sym_yield = 86, + sym_ellipsis = 87, + anon_sym_LBRACE2 = 88, + sym__escape_interpolation = 89, + sym_escape_sequence = 90, + sym__not_escape_sequence = 91, + aux_sym_format_specifier_token1 = 92, + sym_type_conversion = 93, + sym_integer = 94, + sym_float = 95, + anon_sym_await = 96, + sym_true = 97, + sym_false = 98, + sym_none = 99, + sym_comment = 100, + sym__semicolon = 101, + sym__newline = 102, + sym__indent = 103, + sym__dedent = 104, + sym__string_start = 105, + sym__string_content = 106, + sym__string_end = 107, + sym_module = 108, + sym__statement = 109, + sym__simple_statements = 110, + sym_import_statement = 111, + sym_import_prefix = 112, + sym_relative_import = 113, + sym_future_import_statement = 114, + sym_import_from_statement = 115, + sym__import_list = 116, + sym_aliased_import = 117, + sym_wildcard_import = 118, + sym_print_statement = 119, + sym_chevron = 120, + sym_assert_statement = 121, + sym_expression_statement = 122, + sym_named_expression = 123, + sym_return_statement = 124, + sym_delete_statement = 125, + sym_raise_statement = 126, + sym_pass_statement = 127, + sym_break_statement = 128, + sym_continue_statement = 129, + sym_if_statement = 130, + sym_elif_clause = 131, + sym_else_clause = 132, + sym_for_statement = 133, + sym_while_statement = 134, + sym_try_statement = 135, + sym_except_clause = 136, + sym_except_group_clause = 137, + sym_finally_clause = 138, + sym_with_statement = 139, + sym_with_clause = 140, + sym_with_item = 141, + sym_match_statement = 142, + sym_cases = 143, + sym_case_block = 144, + sym__match_patterns = 145, + sym_open_sequence_match_pattern = 146, + sym__match_pattern = 147, + sym_match_as_pattern = 148, + sym__match_or_pattern = 149, + sym_match_or_pattern = 150, + sym__closed_pattern = 151, + sym_match_literal_pattern = 152, + sym_match_capture_pattern = 153, + sym_match_value_pattern = 154, + sym_match_group_pattern = 155, + sym_match_sequence_pattern = 156, + sym__match_maybe_star_pattern = 157, + sym_match_star_pattern = 158, + sym_match_mapping_pattern = 159, + sym_match_double_star_pattern = 160, + sym_match_key_value_pattern = 161, + sym_match_class_pattern = 162, + sym_pattern_class_name = 163, + sym_match_positional_pattern = 164, + sym_match_keyword_pattern = 165, + sym_guard = 166, + sym_function_definition = 167, + sym_parameters = 168, + sym_lambda_parameters = 169, + sym_list_splat = 170, + sym_dictionary_splat = 171, + sym_global_statement = 172, + sym_nonlocal_statement = 173, + sym_exec_statement = 174, + sym_type_alias_statement = 175, + sym_class_definition = 176, + sym_type_parameters = 177, + sym__type_bound = 178, + sym_typevar_parameter = 179, + sym_typevartuple_parameter = 180, + sym_paramspec_parameter = 181, + sym__type_parameter = 182, + sym_parenthesized_list_splat = 183, + sym_argument_list = 184, + sym_decorated_definition = 185, + sym_decorator = 186, + sym_block = 187, + sym_expression_list = 188, + sym_dotted_name = 189, + sym__parameters = 190, + sym__patterns = 191, + sym_parameter = 192, + sym_pattern = 193, + sym_tuple_pattern = 194, + sym_list_pattern = 195, + sym_default_parameter = 196, + sym_typed_default_parameter = 197, + sym_list_splat_pattern = 198, + sym_dictionary_splat_pattern = 199, + sym__expression_within_for_in_clause = 200, + sym_expression = 201, + sym_primary_expression = 202, + sym_not_operator = 203, + sym_boolean_operator = 204, + sym_binary_operator = 205, + sym_unary_operator = 206, + sym_comparison_operator = 207, + sym_lambda = 208, + sym_lambda_within_for_in_clause = 209, + sym_assignment = 210, + sym_augmented_assignment = 211, + sym_pattern_list = 212, + sym__right_hand_side = 213, + sym_yield = 214, + sym_attribute = 215, + sym_subscript = 216, + sym_slice = 217, + sym_call = 218, + sym_typed_parameter = 219, + sym_type = 220, + sym_keyword_argument = 221, + sym_list = 222, + sym_set = 223, + sym_tuple = 224, + sym_dictionary = 225, + sym_pair = 226, + sym_list_comprehension = 227, + sym_dictionary_comprehension = 228, + sym_set_comprehension = 229, + sym_generator_expression = 230, + sym__comprehension_clauses = 231, + sym_parenthesized_expression = 232, + sym__collection_elements = 233, + sym_for_in_clause = 234, + sym_if_clause = 235, + sym_conditional_expression = 236, + sym_concatenated_string = 237, + sym_string = 238, + sym_string_content = 239, + sym_interpolation = 240, + sym__f_expression = 241, + sym_format_specifier = 242, + sym_await = 243, + sym_positional_separator = 244, + sym_keyword_separator = 245, + aux_sym_module_repeat1 = 246, + aux_sym__simple_statements_repeat1 = 247, + aux_sym_import_prefix_repeat1 = 248, + aux_sym__import_list_repeat1 = 249, + aux_sym_print_statement_repeat1 = 250, + aux_sym_assert_statement_repeat1 = 251, + aux_sym_if_statement_repeat1 = 252, + aux_sym_try_statement_repeat1 = 253, + aux_sym_try_statement_repeat2 = 254, + aux_sym_with_clause_repeat1 = 255, + aux_sym_cases_repeat1 = 256, + aux_sym_open_sequence_match_pattern_repeat1 = 257, + aux_sym_match_or_pattern_repeat1 = 258, + aux_sym_match_value_pattern_repeat1 = 259, + aux_sym_match_mapping_pattern_repeat1 = 260, + aux_sym_match_class_pattern_repeat1 = 261, + aux_sym_match_class_pattern_repeat2 = 262, + aux_sym_global_statement_repeat1 = 263, + aux_sym_type_parameters_repeat1 = 264, + aux_sym_argument_list_repeat1 = 265, + aux_sym_decorated_definition_repeat1 = 266, + aux_sym_expression_list_repeat1 = 267, + aux_sym__parameters_repeat1 = 268, + aux_sym__patterns_repeat1 = 269, + aux_sym_comparison_operator_repeat1 = 270, + aux_sym_subscript_repeat1 = 271, + aux_sym_dictionary_repeat1 = 272, + aux_sym__comprehension_clauses_repeat1 = 273, + aux_sym__collection_elements_repeat1 = 274, + aux_sym_for_in_clause_repeat1 = 275, + aux_sym_concatenated_string_repeat1 = 276, + aux_sym_string_repeat1 = 277, + aux_sym_string_content_repeat1 = 278, + aux_sym_format_specifier_repeat1 = 279, + alias_sym_format_expression = 280, + anon_alias_sym_isnot = 281, + anon_alias_sym_notin = 282, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [sym_identifier] = "identifier", + [anon_sym_import] = "import", + [anon_sym_DOT] = ".", + [anon_sym_from] = "from", + [anon_sym___future__] = "__future__", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_COMMA] = ",", + [anon_sym_as] = "as", + [anon_sym_STAR] = "*", + [anon_sym_print] = "print", + [anon_sym_GT_GT] = ">>", + [anon_sym_assert] = "assert", + [anon_sym_COLON_EQ] = ":=", + [anon_sym_return] = "return", + [anon_sym_del] = "del", + [anon_sym_raise] = "raise", + [anon_sym_pass] = "pass", + [anon_sym_break] = "break", + [anon_sym_continue] = "continue", + [anon_sym_if] = "if", + [anon_sym_COLON] = ":", + [anon_sym_elif] = "elif", + [anon_sym_else] = "else", + [anon_sym_async] = "async", + [anon_sym_for] = "for", + [anon_sym_in] = "in", + [anon_sym_while] = "while", + [anon_sym_try] = "try", + [anon_sym_except] = "except", + [anon_sym_except_STAR] = "except*", + [anon_sym_finally] = "finally", + [anon_sym_with] = "with", + [anon_sym_match] = "match", + [anon_sym_case] = "case", + [anon_sym_PIPE] = "|", + [anon_sym_DASH] = "-", + [anon_sym_PLUS] = "+", + [sym_match_wildcard_pattern] = "match_wildcard_pattern", + [anon_sym_LBRACK] = "[", + [anon_sym_RBRACK] = "]", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", + [anon_sym_STAR_STAR] = "**", + [anon_sym_EQ] = "=", + [anon_sym_def] = "def", + [anon_sym_DASH_GT] = "->", + [anon_sym_global] = "global", + [anon_sym_nonlocal] = "nonlocal", + [anon_sym_exec] = "exec", + [anon_sym_type] = "type", + [anon_sym_class] = "class", + [anon_sym_AT] = "@", + [anon_sym_not] = "not", + [anon_sym_and] = "and", + [anon_sym_or] = "or", + [anon_sym_SLASH] = "/", + [anon_sym_PERCENT] = "%", + [anon_sym_SLASH_SLASH] = "//", + [anon_sym_AMP] = "&", + [anon_sym_CARET] = "^", + [anon_sym_LT_LT] = "<<", + [anon_sym_TILDE] = "~", + [anon_sym_LT] = "<", + [anon_sym_LT_EQ] = "<=", + [anon_sym_EQ_EQ] = "==", + [anon_sym_BANG_EQ] = "!=", + [anon_sym_GT_EQ] = ">=", + [anon_sym_GT] = ">", + [anon_sym_LT_GT] = "<>", + [anon_sym_is] = "is", + [anon_sym_lambda] = "lambda", + [anon_sym_PLUS_EQ] = "+=", + [anon_sym_DASH_EQ] = "-=", + [anon_sym_STAR_EQ] = "*=", + [anon_sym_SLASH_EQ] = "/=", + [anon_sym_AT_EQ] = "@=", + [anon_sym_SLASH_SLASH_EQ] = "//=", + [anon_sym_PERCENT_EQ] = "%=", + [anon_sym_STAR_STAR_EQ] = "**=", + [anon_sym_GT_GT_EQ] = ">>=", + [anon_sym_LT_LT_EQ] = "<<=", + [anon_sym_AMP_EQ] = "&=", + [anon_sym_CARET_EQ] = "^=", + [anon_sym_PIPE_EQ] = "|=", + [anon_sym_yield] = "yield", + [sym_ellipsis] = "ellipsis", + [anon_sym_LBRACE2] = "{", + [sym__escape_interpolation] = "_escape_interpolation", + [sym_escape_sequence] = "escape_sequence", + [sym__not_escape_sequence] = "_not_escape_sequence", + [aux_sym_format_specifier_token1] = "format_specifier_token1", + [sym_type_conversion] = "type_conversion", + [sym_integer] = "integer", + [sym_float] = "float", + [anon_sym_await] = "await", + [sym_true] = "true", + [sym_false] = "false", + [sym_none] = "none", + [sym_comment] = "comment", + [sym__semicolon] = "_semicolon", + [sym__newline] = "_newline", + [sym__indent] = "_indent", + [sym__dedent] = "_dedent", + [sym__string_start] = "\"", + [sym__string_content] = "_string_content", + [sym__string_end] = "\"", + [sym_module] = "module", + [sym__statement] = "_statement", + [sym__simple_statements] = "_simple_statements", + [sym_import_statement] = "import_statement", + [sym_import_prefix] = "import_prefix", + [sym_relative_import] = "relative_import", + [sym_future_import_statement] = "future_import_statement", + [sym_import_from_statement] = "import_from_statement", + [sym__import_list] = "_import_list", + [sym_aliased_import] = "aliased_import", + [sym_wildcard_import] = "wildcard_import", + [sym_print_statement] = "print_statement", + [sym_chevron] = "chevron", + [sym_assert_statement] = "assert_statement", + [sym_expression_statement] = "expression_statement", + [sym_named_expression] = "named_expression", + [sym_return_statement] = "return_statement", + [sym_delete_statement] = "delete_statement", + [sym_raise_statement] = "raise_statement", + [sym_pass_statement] = "pass_statement", + [sym_break_statement] = "break_statement", + [sym_continue_statement] = "continue_statement", + [sym_if_statement] = "if_statement", + [sym_elif_clause] = "elif_clause", + [sym_else_clause] = "else_clause", + [sym_for_statement] = "for_statement", + [sym_while_statement] = "while_statement", + [sym_try_statement] = "try_statement", + [sym_except_clause] = "except_clause", + [sym_except_group_clause] = "except_group_clause", + [sym_finally_clause] = "finally_clause", + [sym_with_statement] = "with_statement", + [sym_with_clause] = "with_clause", + [sym_with_item] = "with_item", + [sym_match_statement] = "match_statement", + [sym_cases] = "cases", + [sym_case_block] = "case_block", + [sym__match_patterns] = "_match_patterns", + [sym_open_sequence_match_pattern] = "match_sequence_pattern", + [sym__match_pattern] = "_match_pattern", + [sym_match_as_pattern] = "match_as_pattern", + [sym__match_or_pattern] = "_match_or_pattern", + [sym_match_or_pattern] = "match_or_pattern", + [sym__closed_pattern] = "_closed_pattern", + [sym_match_literal_pattern] = "match_literal_pattern", + [sym_match_capture_pattern] = "match_capture_pattern", + [sym_match_value_pattern] = "match_value_pattern", + [sym_match_group_pattern] = "match_group_pattern", + [sym_match_sequence_pattern] = "match_sequence_pattern", + [sym__match_maybe_star_pattern] = "_match_maybe_star_pattern", + [sym_match_star_pattern] = "match_star_pattern", + [sym_match_mapping_pattern] = "match_mapping_pattern", + [sym_match_double_star_pattern] = "match_double_star_pattern", + [sym_match_key_value_pattern] = "match_key_value_pattern", + [sym_match_class_pattern] = "match_class_pattern", + [sym_pattern_class_name] = "pattern_class_name", + [sym_match_positional_pattern] = "match_positional_pattern", + [sym_match_keyword_pattern] = "match_keyword_pattern", + [sym_guard] = "guard", + [sym_function_definition] = "function_definition", + [sym_parameters] = "parameters", + [sym_lambda_parameters] = "lambda_parameters", + [sym_list_splat] = "list_splat", + [sym_dictionary_splat] = "dictionary_splat", + [sym_global_statement] = "global_statement", + [sym_nonlocal_statement] = "nonlocal_statement", + [sym_exec_statement] = "exec_statement", + [sym_type_alias_statement] = "type_alias_statement", + [sym_class_definition] = "class_definition", + [sym_type_parameters] = "type_parameters", + [sym__type_bound] = "_type_bound", + [sym_typevar_parameter] = "typevar_parameter", + [sym_typevartuple_parameter] = "typevartuple_parameter", + [sym_paramspec_parameter] = "paramspec_parameter", + [sym__type_parameter] = "_type_parameter", + [sym_parenthesized_list_splat] = "parenthesized_list_splat", + [sym_argument_list] = "argument_list", + [sym_decorated_definition] = "decorated_definition", + [sym_decorator] = "decorator", + [sym_block] = "block", + [sym_expression_list] = "expression_list", + [sym_dotted_name] = "dotted_name", + [sym__parameters] = "_parameters", + [sym__patterns] = "_patterns", + [sym_parameter] = "parameter", + [sym_pattern] = "pattern", + [sym_tuple_pattern] = "tuple_pattern", + [sym_list_pattern] = "list_pattern", + [sym_default_parameter] = "default_parameter", + [sym_typed_default_parameter] = "typed_default_parameter", + [sym_list_splat_pattern] = "list_splat_pattern", + [sym_dictionary_splat_pattern] = "dictionary_splat_pattern", + [sym__expression_within_for_in_clause] = "_expression_within_for_in_clause", + [sym_expression] = "expression", + [sym_primary_expression] = "primary_expression", + [sym_not_operator] = "not_operator", + [sym_boolean_operator] = "boolean_operator", + [sym_binary_operator] = "binary_operator", + [sym_unary_operator] = "unary_operator", + [sym_comparison_operator] = "comparison_operator", + [sym_lambda] = "lambda", + [sym_lambda_within_for_in_clause] = "lambda", + [sym_assignment] = "assignment", + [sym_augmented_assignment] = "augmented_assignment", + [sym_pattern_list] = "pattern_list", + [sym__right_hand_side] = "_right_hand_side", + [sym_yield] = "yield", + [sym_attribute] = "attribute", + [sym_subscript] = "subscript", + [sym_slice] = "slice", + [sym_call] = "call", + [sym_typed_parameter] = "typed_parameter", + [sym_type] = "type", + [sym_keyword_argument] = "keyword_argument", + [sym_list] = "list", + [sym_set] = "set", + [sym_tuple] = "tuple", + [sym_dictionary] = "dictionary", + [sym_pair] = "pair", + [sym_list_comprehension] = "list_comprehension", + [sym_dictionary_comprehension] = "dictionary_comprehension", + [sym_set_comprehension] = "set_comprehension", + [sym_generator_expression] = "generator_expression", + [sym__comprehension_clauses] = "_comprehension_clauses", + [sym_parenthesized_expression] = "parenthesized_expression", + [sym__collection_elements] = "_collection_elements", + [sym_for_in_clause] = "for_in_clause", + [sym_if_clause] = "if_clause", + [sym_conditional_expression] = "conditional_expression", + [sym_concatenated_string] = "concatenated_string", + [sym_string] = "string", + [sym_string_content] = "string_content", + [sym_interpolation] = "interpolation", + [sym__f_expression] = "_f_expression", + [sym_format_specifier] = "format_specifier", + [sym_await] = "await", + [sym_positional_separator] = "positional_separator", + [sym_keyword_separator] = "keyword_separator", + [aux_sym_module_repeat1] = "module_repeat1", + [aux_sym__simple_statements_repeat1] = "_simple_statements_repeat1", + [aux_sym_import_prefix_repeat1] = "import_prefix_repeat1", + [aux_sym__import_list_repeat1] = "_import_list_repeat1", + [aux_sym_print_statement_repeat1] = "print_statement_repeat1", + [aux_sym_assert_statement_repeat1] = "assert_statement_repeat1", + [aux_sym_if_statement_repeat1] = "if_statement_repeat1", + [aux_sym_try_statement_repeat1] = "try_statement_repeat1", + [aux_sym_try_statement_repeat2] = "try_statement_repeat2", + [aux_sym_with_clause_repeat1] = "with_clause_repeat1", + [aux_sym_cases_repeat1] = "cases_repeat1", + [aux_sym_open_sequence_match_pattern_repeat1] = "open_sequence_match_pattern_repeat1", + [aux_sym_match_or_pattern_repeat1] = "match_or_pattern_repeat1", + [aux_sym_match_value_pattern_repeat1] = "match_value_pattern_repeat1", + [aux_sym_match_mapping_pattern_repeat1] = "match_mapping_pattern_repeat1", + [aux_sym_match_class_pattern_repeat1] = "match_class_pattern_repeat1", + [aux_sym_match_class_pattern_repeat2] = "match_class_pattern_repeat2", + [aux_sym_global_statement_repeat1] = "global_statement_repeat1", + [aux_sym_type_parameters_repeat1] = "type_parameters_repeat1", + [aux_sym_argument_list_repeat1] = "argument_list_repeat1", + [aux_sym_decorated_definition_repeat1] = "decorated_definition_repeat1", + [aux_sym_expression_list_repeat1] = "expression_list_repeat1", + [aux_sym__parameters_repeat1] = "_parameters_repeat1", + [aux_sym__patterns_repeat1] = "_patterns_repeat1", + [aux_sym_comparison_operator_repeat1] = "comparison_operator_repeat1", + [aux_sym_subscript_repeat1] = "subscript_repeat1", + [aux_sym_dictionary_repeat1] = "dictionary_repeat1", + [aux_sym__comprehension_clauses_repeat1] = "_comprehension_clauses_repeat1", + [aux_sym__collection_elements_repeat1] = "_collection_elements_repeat1", + [aux_sym_for_in_clause_repeat1] = "for_in_clause_repeat1", + [aux_sym_concatenated_string_repeat1] = "concatenated_string_repeat1", + [aux_sym_string_repeat1] = "string_repeat1", + [aux_sym_string_content_repeat1] = "string_content_repeat1", + [aux_sym_format_specifier_repeat1] = "format_specifier_repeat1", + [alias_sym_format_expression] = "format_expression", + [anon_alias_sym_isnot] = "is not", + [anon_alias_sym_notin] = "not in", +}; + +static const TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [sym_identifier] = sym_identifier, + [anon_sym_import] = anon_sym_import, + [anon_sym_DOT] = anon_sym_DOT, + [anon_sym_from] = anon_sym_from, + [anon_sym___future__] = anon_sym___future__, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_as] = anon_sym_as, + [anon_sym_STAR] = anon_sym_STAR, + [anon_sym_print] = anon_sym_print, + [anon_sym_GT_GT] = anon_sym_GT_GT, + [anon_sym_assert] = anon_sym_assert, + [anon_sym_COLON_EQ] = anon_sym_COLON_EQ, + [anon_sym_return] = anon_sym_return, + [anon_sym_del] = anon_sym_del, + [anon_sym_raise] = anon_sym_raise, + [anon_sym_pass] = anon_sym_pass, + [anon_sym_break] = anon_sym_break, + [anon_sym_continue] = anon_sym_continue, + [anon_sym_if] = anon_sym_if, + [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_elif] = anon_sym_elif, + [anon_sym_else] = anon_sym_else, + [anon_sym_async] = anon_sym_async, + [anon_sym_for] = anon_sym_for, + [anon_sym_in] = anon_sym_in, + [anon_sym_while] = anon_sym_while, + [anon_sym_try] = anon_sym_try, + [anon_sym_except] = anon_sym_except, + [anon_sym_except_STAR] = anon_sym_except_STAR, + [anon_sym_finally] = anon_sym_finally, + [anon_sym_with] = anon_sym_with, + [anon_sym_match] = anon_sym_match, + [anon_sym_case] = anon_sym_case, + [anon_sym_PIPE] = anon_sym_PIPE, + [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_PLUS] = anon_sym_PLUS, + [sym_match_wildcard_pattern] = sym_match_wildcard_pattern, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, + [anon_sym_STAR_STAR] = anon_sym_STAR_STAR, + [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_def] = anon_sym_def, + [anon_sym_DASH_GT] = anon_sym_DASH_GT, + [anon_sym_global] = anon_sym_global, + [anon_sym_nonlocal] = anon_sym_nonlocal, + [anon_sym_exec] = anon_sym_exec, + [anon_sym_type] = anon_sym_type, + [anon_sym_class] = anon_sym_class, + [anon_sym_AT] = anon_sym_AT, + [anon_sym_not] = anon_sym_not, + [anon_sym_and] = anon_sym_and, + [anon_sym_or] = anon_sym_or, + [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_PERCENT] = anon_sym_PERCENT, + [anon_sym_SLASH_SLASH] = anon_sym_SLASH_SLASH, + [anon_sym_AMP] = anon_sym_AMP, + [anon_sym_CARET] = anon_sym_CARET, + [anon_sym_LT_LT] = anon_sym_LT_LT, + [anon_sym_TILDE] = anon_sym_TILDE, + [anon_sym_LT] = anon_sym_LT, + [anon_sym_LT_EQ] = anon_sym_LT_EQ, + [anon_sym_EQ_EQ] = anon_sym_EQ_EQ, + [anon_sym_BANG_EQ] = anon_sym_BANG_EQ, + [anon_sym_GT_EQ] = anon_sym_GT_EQ, + [anon_sym_GT] = anon_sym_GT, + [anon_sym_LT_GT] = anon_sym_LT_GT, + [anon_sym_is] = anon_sym_is, + [anon_sym_lambda] = anon_sym_lambda, + [anon_sym_PLUS_EQ] = anon_sym_PLUS_EQ, + [anon_sym_DASH_EQ] = anon_sym_DASH_EQ, + [anon_sym_STAR_EQ] = anon_sym_STAR_EQ, + [anon_sym_SLASH_EQ] = anon_sym_SLASH_EQ, + [anon_sym_AT_EQ] = anon_sym_AT_EQ, + [anon_sym_SLASH_SLASH_EQ] = anon_sym_SLASH_SLASH_EQ, + [anon_sym_PERCENT_EQ] = anon_sym_PERCENT_EQ, + [anon_sym_STAR_STAR_EQ] = anon_sym_STAR_STAR_EQ, + [anon_sym_GT_GT_EQ] = anon_sym_GT_GT_EQ, + [anon_sym_LT_LT_EQ] = anon_sym_LT_LT_EQ, + [anon_sym_AMP_EQ] = anon_sym_AMP_EQ, + [anon_sym_CARET_EQ] = anon_sym_CARET_EQ, + [anon_sym_PIPE_EQ] = anon_sym_PIPE_EQ, + [anon_sym_yield] = anon_sym_yield, + [sym_ellipsis] = sym_ellipsis, + [anon_sym_LBRACE2] = anon_sym_LBRACE, + [sym__escape_interpolation] = sym__escape_interpolation, + [sym_escape_sequence] = sym_escape_sequence, + [sym__not_escape_sequence] = sym__not_escape_sequence, + [aux_sym_format_specifier_token1] = aux_sym_format_specifier_token1, + [sym_type_conversion] = sym_type_conversion, + [sym_integer] = sym_integer, + [sym_float] = sym_float, + [anon_sym_await] = anon_sym_await, + [sym_true] = sym_true, + [sym_false] = sym_false, + [sym_none] = sym_none, + [sym_comment] = sym_comment, + [sym__semicolon] = sym__semicolon, + [sym__newline] = sym__newline, + [sym__indent] = sym__indent, + [sym__dedent] = sym__dedent, + [sym__string_start] = sym__string_start, + [sym__string_content] = sym__string_content, + [sym__string_end] = sym__string_start, + [sym_module] = sym_module, + [sym__statement] = sym__statement, + [sym__simple_statements] = sym__simple_statements, + [sym_import_statement] = sym_import_statement, + [sym_import_prefix] = sym_import_prefix, + [sym_relative_import] = sym_relative_import, + [sym_future_import_statement] = sym_future_import_statement, + [sym_import_from_statement] = sym_import_from_statement, + [sym__import_list] = sym__import_list, + [sym_aliased_import] = sym_aliased_import, + [sym_wildcard_import] = sym_wildcard_import, + [sym_print_statement] = sym_print_statement, + [sym_chevron] = sym_chevron, + [sym_assert_statement] = sym_assert_statement, + [sym_expression_statement] = sym_expression_statement, + [sym_named_expression] = sym_named_expression, + [sym_return_statement] = sym_return_statement, + [sym_delete_statement] = sym_delete_statement, + [sym_raise_statement] = sym_raise_statement, + [sym_pass_statement] = sym_pass_statement, + [sym_break_statement] = sym_break_statement, + [sym_continue_statement] = sym_continue_statement, + [sym_if_statement] = sym_if_statement, + [sym_elif_clause] = sym_elif_clause, + [sym_else_clause] = sym_else_clause, + [sym_for_statement] = sym_for_statement, + [sym_while_statement] = sym_while_statement, + [sym_try_statement] = sym_try_statement, + [sym_except_clause] = sym_except_clause, + [sym_except_group_clause] = sym_except_group_clause, + [sym_finally_clause] = sym_finally_clause, + [sym_with_statement] = sym_with_statement, + [sym_with_clause] = sym_with_clause, + [sym_with_item] = sym_with_item, + [sym_match_statement] = sym_match_statement, + [sym_cases] = sym_cases, + [sym_case_block] = sym_case_block, + [sym__match_patterns] = sym__match_patterns, + [sym_open_sequence_match_pattern] = sym_match_sequence_pattern, + [sym__match_pattern] = sym__match_pattern, + [sym_match_as_pattern] = sym_match_as_pattern, + [sym__match_or_pattern] = sym__match_or_pattern, + [sym_match_or_pattern] = sym_match_or_pattern, + [sym__closed_pattern] = sym__closed_pattern, + [sym_match_literal_pattern] = sym_match_literal_pattern, + [sym_match_capture_pattern] = sym_match_capture_pattern, + [sym_match_value_pattern] = sym_match_value_pattern, + [sym_match_group_pattern] = sym_match_group_pattern, + [sym_match_sequence_pattern] = sym_match_sequence_pattern, + [sym__match_maybe_star_pattern] = sym__match_maybe_star_pattern, + [sym_match_star_pattern] = sym_match_star_pattern, + [sym_match_mapping_pattern] = sym_match_mapping_pattern, + [sym_match_double_star_pattern] = sym_match_double_star_pattern, + [sym_match_key_value_pattern] = sym_match_key_value_pattern, + [sym_match_class_pattern] = sym_match_class_pattern, + [sym_pattern_class_name] = sym_pattern_class_name, + [sym_match_positional_pattern] = sym_match_positional_pattern, + [sym_match_keyword_pattern] = sym_match_keyword_pattern, + [sym_guard] = sym_guard, + [sym_function_definition] = sym_function_definition, + [sym_parameters] = sym_parameters, + [sym_lambda_parameters] = sym_lambda_parameters, + [sym_list_splat] = sym_list_splat, + [sym_dictionary_splat] = sym_dictionary_splat, + [sym_global_statement] = sym_global_statement, + [sym_nonlocal_statement] = sym_nonlocal_statement, + [sym_exec_statement] = sym_exec_statement, + [sym_type_alias_statement] = sym_type_alias_statement, + [sym_class_definition] = sym_class_definition, + [sym_type_parameters] = sym_type_parameters, + [sym__type_bound] = sym__type_bound, + [sym_typevar_parameter] = sym_typevar_parameter, + [sym_typevartuple_parameter] = sym_typevartuple_parameter, + [sym_paramspec_parameter] = sym_paramspec_parameter, + [sym__type_parameter] = sym__type_parameter, + [sym_parenthesized_list_splat] = sym_parenthesized_list_splat, + [sym_argument_list] = sym_argument_list, + [sym_decorated_definition] = sym_decorated_definition, + [sym_decorator] = sym_decorator, + [sym_block] = sym_block, + [sym_expression_list] = sym_expression_list, + [sym_dotted_name] = sym_dotted_name, + [sym__parameters] = sym__parameters, + [sym__patterns] = sym__patterns, + [sym_parameter] = sym_parameter, + [sym_pattern] = sym_pattern, + [sym_tuple_pattern] = sym_tuple_pattern, + [sym_list_pattern] = sym_list_pattern, + [sym_default_parameter] = sym_default_parameter, + [sym_typed_default_parameter] = sym_typed_default_parameter, + [sym_list_splat_pattern] = sym_list_splat_pattern, + [sym_dictionary_splat_pattern] = sym_dictionary_splat_pattern, + [sym__expression_within_for_in_clause] = sym__expression_within_for_in_clause, + [sym_expression] = sym_expression, + [sym_primary_expression] = sym_primary_expression, + [sym_not_operator] = sym_not_operator, + [sym_boolean_operator] = sym_boolean_operator, + [sym_binary_operator] = sym_binary_operator, + [sym_unary_operator] = sym_unary_operator, + [sym_comparison_operator] = sym_comparison_operator, + [sym_lambda] = sym_lambda, + [sym_lambda_within_for_in_clause] = sym_lambda, + [sym_assignment] = sym_assignment, + [sym_augmented_assignment] = sym_augmented_assignment, + [sym_pattern_list] = sym_pattern_list, + [sym__right_hand_side] = sym__right_hand_side, + [sym_yield] = sym_yield, + [sym_attribute] = sym_attribute, + [sym_subscript] = sym_subscript, + [sym_slice] = sym_slice, + [sym_call] = sym_call, + [sym_typed_parameter] = sym_typed_parameter, + [sym_type] = sym_type, + [sym_keyword_argument] = sym_keyword_argument, + [sym_list] = sym_list, + [sym_set] = sym_set, + [sym_tuple] = sym_tuple, + [sym_dictionary] = sym_dictionary, + [sym_pair] = sym_pair, + [sym_list_comprehension] = sym_list_comprehension, + [sym_dictionary_comprehension] = sym_dictionary_comprehension, + [sym_set_comprehension] = sym_set_comprehension, + [sym_generator_expression] = sym_generator_expression, + [sym__comprehension_clauses] = sym__comprehension_clauses, + [sym_parenthesized_expression] = sym_parenthesized_expression, + [sym__collection_elements] = sym__collection_elements, + [sym_for_in_clause] = sym_for_in_clause, + [sym_if_clause] = sym_if_clause, + [sym_conditional_expression] = sym_conditional_expression, + [sym_concatenated_string] = sym_concatenated_string, + [sym_string] = sym_string, + [sym_string_content] = sym_string_content, + [sym_interpolation] = sym_interpolation, + [sym__f_expression] = sym__f_expression, + [sym_format_specifier] = sym_format_specifier, + [sym_await] = sym_await, + [sym_positional_separator] = sym_positional_separator, + [sym_keyword_separator] = sym_keyword_separator, + [aux_sym_module_repeat1] = aux_sym_module_repeat1, + [aux_sym__simple_statements_repeat1] = aux_sym__simple_statements_repeat1, + [aux_sym_import_prefix_repeat1] = aux_sym_import_prefix_repeat1, + [aux_sym__import_list_repeat1] = aux_sym__import_list_repeat1, + [aux_sym_print_statement_repeat1] = aux_sym_print_statement_repeat1, + [aux_sym_assert_statement_repeat1] = aux_sym_assert_statement_repeat1, + [aux_sym_if_statement_repeat1] = aux_sym_if_statement_repeat1, + [aux_sym_try_statement_repeat1] = aux_sym_try_statement_repeat1, + [aux_sym_try_statement_repeat2] = aux_sym_try_statement_repeat2, + [aux_sym_with_clause_repeat1] = aux_sym_with_clause_repeat1, + [aux_sym_cases_repeat1] = aux_sym_cases_repeat1, + [aux_sym_open_sequence_match_pattern_repeat1] = aux_sym_open_sequence_match_pattern_repeat1, + [aux_sym_match_or_pattern_repeat1] = aux_sym_match_or_pattern_repeat1, + [aux_sym_match_value_pattern_repeat1] = aux_sym_match_value_pattern_repeat1, + [aux_sym_match_mapping_pattern_repeat1] = aux_sym_match_mapping_pattern_repeat1, + [aux_sym_match_class_pattern_repeat1] = aux_sym_match_class_pattern_repeat1, + [aux_sym_match_class_pattern_repeat2] = aux_sym_match_class_pattern_repeat2, + [aux_sym_global_statement_repeat1] = aux_sym_global_statement_repeat1, + [aux_sym_type_parameters_repeat1] = aux_sym_type_parameters_repeat1, + [aux_sym_argument_list_repeat1] = aux_sym_argument_list_repeat1, + [aux_sym_decorated_definition_repeat1] = aux_sym_decorated_definition_repeat1, + [aux_sym_expression_list_repeat1] = aux_sym_expression_list_repeat1, + [aux_sym__parameters_repeat1] = aux_sym__parameters_repeat1, + [aux_sym__patterns_repeat1] = aux_sym__patterns_repeat1, + [aux_sym_comparison_operator_repeat1] = aux_sym_comparison_operator_repeat1, + [aux_sym_subscript_repeat1] = aux_sym_subscript_repeat1, + [aux_sym_dictionary_repeat1] = aux_sym_dictionary_repeat1, + [aux_sym__comprehension_clauses_repeat1] = aux_sym__comprehension_clauses_repeat1, + [aux_sym__collection_elements_repeat1] = aux_sym__collection_elements_repeat1, + [aux_sym_for_in_clause_repeat1] = aux_sym_for_in_clause_repeat1, + [aux_sym_concatenated_string_repeat1] = aux_sym_concatenated_string_repeat1, + [aux_sym_string_repeat1] = aux_sym_string_repeat1, + [aux_sym_string_content_repeat1] = aux_sym_string_content_repeat1, + [aux_sym_format_specifier_repeat1] = aux_sym_format_specifier_repeat1, + [alias_sym_format_expression] = alias_sym_format_expression, + [anon_alias_sym_isnot] = anon_alias_sym_isnot, + [anon_alias_sym_notin] = anon_alias_sym_notin, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [sym_identifier] = { + .visible = true, + .named = true, + }, + [anon_sym_import] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_from] = { + .visible = true, + .named = false, + }, + [anon_sym___future__] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_as] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_print] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_assert] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_return] = { + .visible = true, + .named = false, + }, + [anon_sym_del] = { + .visible = true, + .named = false, + }, + [anon_sym_raise] = { + .visible = true, + .named = false, + }, + [anon_sym_pass] = { + .visible = true, + .named = false, + }, + [anon_sym_break] = { + .visible = true, + .named = false, + }, + [anon_sym_continue] = { + .visible = true, + .named = false, + }, + [anon_sym_if] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_elif] = { + .visible = true, + .named = false, + }, + [anon_sym_else] = { + .visible = true, + .named = false, + }, + [anon_sym_async] = { + .visible = true, + .named = false, + }, + [anon_sym_for] = { + .visible = true, + .named = false, + }, + [anon_sym_in] = { + .visible = true, + .named = false, + }, + [anon_sym_while] = { + .visible = true, + .named = false, + }, + [anon_sym_try] = { + .visible = true, + .named = false, + }, + [anon_sym_except] = { + .visible = true, + .named = false, + }, + [anon_sym_except_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_finally] = { + .visible = true, + .named = false, + }, + [anon_sym_with] = { + .visible = true, + .named = false, + }, + [anon_sym_match] = { + .visible = true, + .named = false, + }, + [anon_sym_case] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS] = { + .visible = true, + .named = false, + }, + [sym_match_wildcard_pattern] = { + .visible = true, + .named = true, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_def] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_global] = { + .visible = true, + .named = false, + }, + [anon_sym_nonlocal] = { + .visible = true, + .named = false, + }, + [anon_sym_exec] = { + .visible = true, + .named = false, + }, + [anon_sym_type] = { + .visible = true, + .named = false, + }, + [anon_sym_class] = { + .visible = true, + .named = false, + }, + [anon_sym_AT] = { + .visible = true, + .named = false, + }, + [anon_sym_not] = { + .visible = true, + .named = false, + }, + [anon_sym_and] = { + .visible = true, + .named = false, + }, + [anon_sym_or] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_PERCENT] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE] = { + .visible = true, + .named = false, + }, + [anon_sym_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_is] = { + .visible = true, + .named = false, + }, + [anon_sym_lambda] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_AT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH_SLASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PERCENT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR_STAR_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_yield] = { + .visible = true, + .named = false, + }, + [sym_ellipsis] = { + .visible = true, + .named = true, + }, + [anon_sym_LBRACE2] = { + .visible = true, + .named = false, + }, + [sym__escape_interpolation] = { + .visible = false, + .named = true, + }, + [sym_escape_sequence] = { + .visible = true, + .named = true, + }, + [sym__not_escape_sequence] = { + .visible = false, + .named = true, + }, + [aux_sym_format_specifier_token1] = { + .visible = false, + .named = false, + }, + [sym_type_conversion] = { + .visible = true, + .named = true, + }, + [sym_integer] = { + .visible = true, + .named = true, + }, + [sym_float] = { + .visible = true, + .named = true, + }, + [anon_sym_await] = { + .visible = true, + .named = false, + }, + [sym_true] = { + .visible = true, + .named = true, + }, + [sym_false] = { + .visible = true, + .named = true, + }, + [sym_none] = { + .visible = true, + .named = true, + }, + [sym_comment] = { + .visible = true, + .named = true, + }, + [sym__semicolon] = { + .visible = false, + .named = true, + }, + [sym__newline] = { + .visible = false, + .named = true, + }, + [sym__indent] = { + .visible = false, + .named = true, + }, + [sym__dedent] = { + .visible = false, + .named = true, + }, + [sym__string_start] = { + .visible = true, + .named = false, + }, + [sym__string_content] = { + .visible = false, + .named = true, + }, + [sym__string_end] = { + .visible = true, + .named = false, + }, + [sym_module] = { + .visible = true, + .named = true, + }, + [sym__statement] = { + .visible = false, + .named = true, + }, + [sym__simple_statements] = { + .visible = false, + .named = true, + }, + [sym_import_statement] = { + .visible = true, + .named = true, + }, + [sym_import_prefix] = { + .visible = true, + .named = true, + }, + [sym_relative_import] = { + .visible = true, + .named = true, + }, + [sym_future_import_statement] = { + .visible = true, + .named = true, + }, + [sym_import_from_statement] = { + .visible = true, + .named = true, + }, + [sym__import_list] = { + .visible = false, + .named = true, + }, + [sym_aliased_import] = { + .visible = true, + .named = true, + }, + [sym_wildcard_import] = { + .visible = true, + .named = true, + }, + [sym_print_statement] = { + .visible = true, + .named = true, + }, + [sym_chevron] = { + .visible = true, + .named = true, + }, + [sym_assert_statement] = { + .visible = true, + .named = true, + }, + [sym_expression_statement] = { + .visible = true, + .named = true, + }, + [sym_named_expression] = { + .visible = true, + .named = true, + }, + [sym_return_statement] = { + .visible = true, + .named = true, + }, + [sym_delete_statement] = { + .visible = true, + .named = true, + }, + [sym_raise_statement] = { + .visible = true, + .named = true, + }, + [sym_pass_statement] = { + .visible = true, + .named = true, + }, + [sym_break_statement] = { + .visible = true, + .named = true, + }, + [sym_continue_statement] = { + .visible = true, + .named = true, + }, + [sym_if_statement] = { + .visible = true, + .named = true, + }, + [sym_elif_clause] = { + .visible = true, + .named = true, + }, + [sym_else_clause] = { + .visible = true, + .named = true, + }, + [sym_for_statement] = { + .visible = true, + .named = true, + }, + [sym_while_statement] = { + .visible = true, + .named = true, + }, + [sym_try_statement] = { + .visible = true, + .named = true, + }, + [sym_except_clause] = { + .visible = true, + .named = true, + }, + [sym_except_group_clause] = { + .visible = true, + .named = true, + }, + [sym_finally_clause] = { + .visible = true, + .named = true, + }, + [sym_with_statement] = { + .visible = true, + .named = true, + }, + [sym_with_clause] = { + .visible = true, + .named = true, + }, + [sym_with_item] = { + .visible = true, + .named = true, + }, + [sym_match_statement] = { + .visible = true, + .named = true, + }, + [sym_cases] = { + .visible = true, + .named = true, + }, + [sym_case_block] = { + .visible = true, + .named = true, + }, + [sym__match_patterns] = { + .visible = false, + .named = true, + }, + [sym_open_sequence_match_pattern] = { + .visible = true, + .named = true, + }, + [sym__match_pattern] = { + .visible = false, + .named = true, + }, + [sym_match_as_pattern] = { + .visible = true, + .named = true, + }, + [sym__match_or_pattern] = { + .visible = false, + .named = true, + }, + [sym_match_or_pattern] = { + .visible = true, + .named = true, + }, + [sym__closed_pattern] = { + .visible = false, + .named = true, + }, + [sym_match_literal_pattern] = { + .visible = true, + .named = true, + }, + [sym_match_capture_pattern] = { + .visible = true, + .named = true, + }, + [sym_match_value_pattern] = { + .visible = true, + .named = true, + }, + [sym_match_group_pattern] = { + .visible = true, + .named = true, + }, + [sym_match_sequence_pattern] = { + .visible = true, + .named = true, + }, + [sym__match_maybe_star_pattern] = { + .visible = false, + .named = true, + }, + [sym_match_star_pattern] = { + .visible = true, + .named = true, + }, + [sym_match_mapping_pattern] = { + .visible = true, + .named = true, + }, + [sym_match_double_star_pattern] = { + .visible = true, + .named = true, + }, + [sym_match_key_value_pattern] = { + .visible = true, + .named = true, + }, + [sym_match_class_pattern] = { + .visible = true, + .named = true, + }, + [sym_pattern_class_name] = { + .visible = true, + .named = true, + }, + [sym_match_positional_pattern] = { + .visible = true, + .named = true, + }, + [sym_match_keyword_pattern] = { + .visible = true, + .named = true, + }, + [sym_guard] = { + .visible = true, + .named = true, + }, + [sym_function_definition] = { + .visible = true, + .named = true, + }, + [sym_parameters] = { + .visible = true, + .named = true, + }, + [sym_lambda_parameters] = { + .visible = true, + .named = true, + }, + [sym_list_splat] = { + .visible = true, + .named = true, + }, + [sym_dictionary_splat] = { + .visible = true, + .named = true, + }, + [sym_global_statement] = { + .visible = true, + .named = true, + }, + [sym_nonlocal_statement] = { + .visible = true, + .named = true, + }, + [sym_exec_statement] = { + .visible = true, + .named = true, + }, + [sym_type_alias_statement] = { + .visible = true, + .named = true, + }, + [sym_class_definition] = { + .visible = true, + .named = true, + }, + [sym_type_parameters] = { + .visible = true, + .named = true, + }, + [sym__type_bound] = { + .visible = false, + .named = true, + }, + [sym_typevar_parameter] = { + .visible = true, + .named = true, + }, + [sym_typevartuple_parameter] = { + .visible = true, + .named = true, + }, + [sym_paramspec_parameter] = { + .visible = true, + .named = true, + }, + [sym__type_parameter] = { + .visible = false, + .named = true, + }, + [sym_parenthesized_list_splat] = { + .visible = true, + .named = true, + }, + [sym_argument_list] = { + .visible = true, + .named = true, + }, + [sym_decorated_definition] = { + .visible = true, + .named = true, + }, + [sym_decorator] = { + .visible = true, + .named = true, + }, + [sym_block] = { + .visible = true, + .named = true, + }, + [sym_expression_list] = { + .visible = true, + .named = true, + }, + [sym_dotted_name] = { + .visible = true, + .named = true, + }, + [sym__parameters] = { + .visible = false, + .named = true, + }, + [sym__patterns] = { + .visible = false, + .named = true, + }, + [sym_parameter] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_pattern] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_tuple_pattern] = { + .visible = true, + .named = true, + }, + [sym_list_pattern] = { + .visible = true, + .named = true, + }, + [sym_default_parameter] = { + .visible = true, + .named = true, + }, + [sym_typed_default_parameter] = { + .visible = true, + .named = true, + }, + [sym_list_splat_pattern] = { + .visible = true, + .named = true, + }, + [sym_dictionary_splat_pattern] = { + .visible = true, + .named = true, + }, + [sym__expression_within_for_in_clause] = { + .visible = false, + .named = true, + }, + [sym_expression] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_primary_expression] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_not_operator] = { + .visible = true, + .named = true, + }, + [sym_boolean_operator] = { + .visible = true, + .named = true, + }, + [sym_binary_operator] = { + .visible = true, + .named = true, + }, + [sym_unary_operator] = { + .visible = true, + .named = true, + }, + [sym_comparison_operator] = { + .visible = true, + .named = true, + }, + [sym_lambda] = { + .visible = true, + .named = true, + }, + [sym_lambda_within_for_in_clause] = { + .visible = true, + .named = true, + }, + [sym_assignment] = { + .visible = true, + .named = true, + }, + [sym_augmented_assignment] = { + .visible = true, + .named = true, + }, + [sym_pattern_list] = { + .visible = true, + .named = true, + }, + [sym__right_hand_side] = { + .visible = false, + .named = true, + }, + [sym_yield] = { + .visible = true, + .named = true, + }, + [sym_attribute] = { + .visible = true, + .named = true, + }, + [sym_subscript] = { + .visible = true, + .named = true, + }, + [sym_slice] = { + .visible = true, + .named = true, + }, + [sym_call] = { + .visible = true, + .named = true, + }, + [sym_typed_parameter] = { + .visible = true, + .named = true, + }, + [sym_type] = { + .visible = true, + .named = true, + }, + [sym_keyword_argument] = { + .visible = true, + .named = true, + }, + [sym_list] = { + .visible = true, + .named = true, + }, + [sym_set] = { + .visible = true, + .named = true, + }, + [sym_tuple] = { + .visible = true, + .named = true, + }, + [sym_dictionary] = { + .visible = true, + .named = true, + }, + [sym_pair] = { + .visible = true, + .named = true, + }, + [sym_list_comprehension] = { + .visible = true, + .named = true, + }, + [sym_dictionary_comprehension] = { + .visible = true, + .named = true, + }, + [sym_set_comprehension] = { + .visible = true, + .named = true, + }, + [sym_generator_expression] = { + .visible = true, + .named = true, + }, + [sym__comprehension_clauses] = { + .visible = false, + .named = true, + }, + [sym_parenthesized_expression] = { + .visible = true, + .named = true, + }, + [sym__collection_elements] = { + .visible = false, + .named = true, + }, + [sym_for_in_clause] = { + .visible = true, + .named = true, + }, + [sym_if_clause] = { + .visible = true, + .named = true, + }, + [sym_conditional_expression] = { + .visible = true, + .named = true, + }, + [sym_concatenated_string] = { + .visible = true, + .named = true, + }, + [sym_string] = { + .visible = true, + .named = true, + }, + [sym_string_content] = { + .visible = true, + .named = true, + }, + [sym_interpolation] = { + .visible = true, + .named = true, + }, + [sym__f_expression] = { + .visible = false, + .named = true, + }, + [sym_format_specifier] = { + .visible = true, + .named = true, + }, + [sym_await] = { + .visible = true, + .named = true, + }, + [sym_positional_separator] = { + .visible = true, + .named = true, + }, + [sym_keyword_separator] = { + .visible = true, + .named = true, + }, + [aux_sym_module_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__simple_statements_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_import_prefix_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__import_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_print_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_assert_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_if_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_try_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_try_statement_repeat2] = { + .visible = false, + .named = false, + }, + [aux_sym_with_clause_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_cases_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_open_sequence_match_pattern_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_match_or_pattern_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_match_value_pattern_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_match_mapping_pattern_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_match_class_pattern_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_match_class_pattern_repeat2] = { + .visible = false, + .named = false, + }, + [aux_sym_global_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_type_parameters_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_argument_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_decorated_definition_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_expression_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__parameters_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__patterns_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_comparison_operator_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_subscript_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_dictionary_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__comprehension_clauses_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__collection_elements_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_for_in_clause_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_concatenated_string_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_string_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_string_content_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_format_specifier_repeat1] = { + .visible = false, + .named = false, + }, + [alias_sym_format_expression] = { + .visible = true, + .named = true, + }, + [anon_alias_sym_isnot] = { + .visible = true, + .named = false, + }, + [anon_alias_sym_notin] = { + .visible = true, + .named = false, + }, +}; + +enum { + field_alias = 1, + field_alternative = 2, + field_argument = 3, + field_arguments = 4, + field_attribute = 5, + field_body = 6, + field_bound = 7, + field_cases = 8, + field_cause = 9, + field_class = 10, + field_code = 11, + field_condition = 12, + field_consequence = 13, + field_content = 14, + field_definition = 15, + field_element = 16, + field_expression = 17, + field_function = 18, + field_guard = 19, + field_imaginary = 20, + field_inner = 21, + field_interpolation = 22, + field_key = 23, + field_kwarg = 24, + field_left = 25, + field_module_name = 26, + field_name = 27, + field_object = 28, + field_operator = 29, + field_operators = 30, + field_parameters = 31, + field_pattern = 32, + field_prefix = 33, + field_prefix_operator = 34, + field_real = 35, + field_return_type = 36, + field_right = 37, + field_start = 38, + field_step = 39, + field_stop = 40, + field_string_content = 41, + field_subject = 42, + field_subscript = 43, + field_suffix = 44, + field_superclasses = 45, + field_target = 46, + field_test = 47, + field_trailing_comma = 48, + field_type = 49, + field_type_parameter = 50, + field_type_parameters = 51, + field_value = 52, + field_vararg = 53, +}; + +static const char * const ts_field_names[] = { + [0] = NULL, + [field_alias] = "alias", + [field_alternative] = "alternative", + [field_argument] = "argument", + [field_arguments] = "arguments", + [field_attribute] = "attribute", + [field_body] = "body", + [field_bound] = "bound", + [field_cases] = "cases", + [field_cause] = "cause", + [field_class] = "class", + [field_code] = "code", + [field_condition] = "condition", + [field_consequence] = "consequence", + [field_content] = "content", + [field_definition] = "definition", + [field_element] = "element", + [field_expression] = "expression", + [field_function] = "function", + [field_guard] = "guard", + [field_imaginary] = "imaginary", + [field_inner] = "inner", + [field_interpolation] = "interpolation", + [field_key] = "key", + [field_kwarg] = "kwarg", + [field_left] = "left", + [field_module_name] = "module_name", + [field_name] = "name", + [field_object] = "object", + [field_operator] = "operator", + [field_operators] = "operators", + [field_parameters] = "parameters", + [field_pattern] = "pattern", + [field_prefix] = "prefix", + [field_prefix_operator] = "prefix_operator", + [field_real] = "real", + [field_return_type] = "return_type", + [field_right] = "right", + [field_start] = "start", + [field_step] = "step", + [field_stop] = "stop", + [field_string_content] = "string_content", + [field_subject] = "subject", + [field_subscript] = "subscript", + [field_suffix] = "suffix", + [field_superclasses] = "superclasses", + [field_target] = "target", + [field_test] = "test", + [field_trailing_comma] = "trailing_comma", + [field_type] = "type", + [field_type_parameter] = "type_parameter", + [field_type_parameters] = "type_parameters", + [field_value] = "value", + [field_vararg] = "vararg", +}; + +static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { + [2] = {.index = 0, .length = 2}, + [3] = {.index = 2, .length = 1}, + [4] = {.index = 3, .length = 1}, + [5] = {.index = 4, .length = 1}, + [6] = {.index = 5, .length = 1}, + [7] = {.index = 6, .length = 1}, + [8] = {.index = 7, .length = 1}, + [9] = {.index = 7, .length = 1}, + [10] = {.index = 8, .length = 1}, + [11] = {.index = 9, .length = 1}, + [12] = {.index = 10, .length = 1}, + [13] = {.index = 11, .length = 2}, + [14] = {.index = 13, .length = 1}, + [15] = {.index = 14, .length = 1}, + [16] = {.index = 15, .length = 2}, + [17] = {.index = 17, .length = 2}, + [18] = {.index = 19, .length = 1}, + [19] = {.index = 20, .length = 1}, + [20] = {.index = 21, .length = 4}, + [21] = {.index = 25, .length = 4}, + [22] = {.index = 29, .length = 2}, + [23] = {.index = 31, .length = 1}, + [24] = {.index = 32, .length = 2}, + [25] = {.index = 34, .length = 2}, + [26] = {.index = 36, .length = 1}, + [27] = {.index = 37, .length = 2}, + [28] = {.index = 39, .length = 1}, + [29] = {.index = 40, .length = 2}, + [30] = {.index = 42, .length = 1}, + [31] = {.index = 43, .length = 1}, + [32] = {.index = 44, .length = 1}, + [33] = {.index = 45, .length = 1}, + [34] = {.index = 45, .length = 1}, + [35] = {.index = 37, .length = 2}, + [36] = {.index = 46, .length = 2}, + [37] = {.index = 48, .length = 2}, + [38] = {.index = 50, .length = 2}, + [39] = {.index = 52, .length = 3}, + [40] = {.index = 55, .length = 2}, + [41] = {.index = 57, .length = 1}, + [42] = {.index = 58, .length = 2}, + [43] = {.index = 60, .length = 1}, + [44] = {.index = 61, .length = 2}, + [45] = {.index = 63, .length = 2}, + [46] = {.index = 65, .length = 1}, + [47] = {.index = 66, .length = 2}, + [48] = {.index = 68, .length = 1}, + [50] = {.index = 69, .length = 3}, + [51] = {.index = 72, .length = 1}, + [52] = {.index = 73, .length = 2}, + [53] = {.index = 75, .length = 1}, + [54] = {.index = 76, .length = 2}, + [55] = {.index = 78, .length = 2}, + [56] = {.index = 44, .length = 1}, + [57] = {.index = 80, .length = 1}, + [58] = {.index = 81, .length = 2}, + [59] = {.index = 83, .length = 2}, + [60] = {.index = 83, .length = 2}, + [61] = {.index = 85, .length = 2}, + [62] = {.index = 87, .length = 2}, + [63] = {.index = 89, .length = 2}, + [64] = {.index = 91, .length = 2}, + [65] = {.index = 93, .length = 1}, + [66] = {.index = 94, .length = 2}, + [67] = {.index = 43, .length = 1}, + [68] = {.index = 96, .length = 1}, + [69] = {.index = 97, .length = 1}, + [70] = {.index = 98, .length = 2}, + [71] = {.index = 100, .length = 2}, + [72] = {.index = 100, .length = 2}, + [74] = {.index = 102, .length = 1}, + [75] = {.index = 103, .length = 3}, + [76] = {.index = 106, .length = 3}, + [77] = {.index = 109, .length = 3}, + [78] = {.index = 112, .length = 1}, + [79] = {.index = 113, .length = 3}, + [80] = {.index = 116, .length = 3}, + [81] = {.index = 119, .length = 2}, + [82] = {.index = 121, .length = 2}, + [83] = {.index = 123, .length = 1}, + [84] = {.index = 124, .length = 2}, + [85] = {.index = 126, .length = 1}, + [86] = {.index = 127, .length = 3}, + [87] = {.index = 130, .length = 3}, + [88] = {.index = 133, .length = 3}, + [89] = {.index = 136, .length = 3}, + [90] = {.index = 139, .length = 3}, + [91] = {.index = 142, .length = 3}, + [92] = {.index = 85, .length = 2}, + [93] = {.index = 145, .length = 1}, + [94] = {.index = 146, .length = 1}, + [95] = {.index = 147, .length = 2}, + [96] = {.index = 149, .length = 3}, + [97] = {.index = 152, .length = 2}, + [98] = {.index = 154, .length = 1}, + [99] = {.index = 155, .length = 2}, + [100] = {.index = 157, .length = 2}, + [101] = {.index = 159, .length = 4}, + [102] = {.index = 163, .length = 2}, + [103] = {.index = 165, .length = 4}, + [104] = {.index = 169, .length = 4}, + [105] = {.index = 173, .length = 2}, + [106] = {.index = 175, .length = 3}, + [107] = {.index = 178, .length = 3}, + [108] = {.index = 181, .length = 4}, + [109] = {.index = 185, .length = 2}, + [110] = {.index = 187, .length = 1}, + [111] = {.index = 188, .length = 2}, + [112] = {.index = 190, .length = 2}, + [113] = {.index = 192, .length = 4}, + [114] = {.index = 196, .length = 4}, + [115] = {.index = 200, .length = 4}, + [116] = {.index = 204, .length = 4}, + [117] = {.index = 208, .length = 4}, + [118] = {.index = 212, .length = 3}, + [119] = {.index = 215, .length = 2}, + [120] = {.index = 217, .length = 2}, + [121] = {.index = 219, .length = 2}, + [122] = {.index = 221, .length = 3}, + [123] = {.index = 224, .length = 5}, + [124] = {.index = 229, .length = 3}, + [125] = {.index = 232, .length = 4}, + [126] = {.index = 236, .length = 4}, + [127] = {.index = 240, .length = 4}, + [128] = {.index = 244, .length = 4}, + [129] = {.index = 248, .length = 2}, + [130] = {.index = 250, .length = 1}, + [131] = {.index = 251, .length = 3}, + [132] = {.index = 254, .length = 1}, + [133] = {.index = 255, .length = 2}, + [134] = {.index = 257, .length = 2}, + [135] = {.index = 259, .length = 1}, + [136] = {.index = 260, .length = 4}, + [137] = {.index = 264, .length = 5}, + [138] = {.index = 269, .length = 5}, + [139] = {.index = 274, .length = 3}, + [140] = {.index = 277, .length = 3}, + [141] = {.index = 280, .length = 4}, + [142] = {.index = 284, .length = 4}, + [143] = {.index = 288, .length = 4}, + [144] = {.index = 292, .length = 5}, + [145] = {.index = 297, .length = 5}, + [146] = {.index = 302, .length = 3}, + [147] = {.index = 305, .length = 4}, + [148] = {.index = 309, .length = 3}, + [149] = {.index = 312, .length = 3}, + [150] = {.index = 315, .length = 5}, + [151] = {.index = 320, .length = 5}, + [152] = {.index = 325, .length = 5}, + [153] = {.index = 330, .length = 5}, + [154] = {.index = 335, .length = 5}, + [155] = {.index = 340, .length = 3}, + [156] = {.index = 343, .length = 4}, + [157] = {.index = 347, .length = 2}, + [158] = {.index = 349, .length = 6}, + [159] = {.index = 355, .length = 6}, + [160] = {.index = 361, .length = 4}, +}; + +static const TSFieldMapEntry ts_field_map_entries[] = { + [0] = + {field_prefix, 0}, + {field_suffix, 1}, + [2] = + {field_string_content, 0}, + [3] = + {field_interpolation, 0}, + [4] = + {field_name, 1, .inherited = true}, + [5] = + {field_name, 0}, + [6] = + {field_element, 0}, + [7] = + {field_vararg, 1}, + [8] = + {field_argument, 1}, + [9] = + {field_target, 1}, + [10] = + {field_value, 0}, + [11] = + {field_argument, 1}, + {field_operator, 0}, + [13] = + {field_value, 1}, + [14] = + {field_code, 1}, + [15] = + {field_element, 0}, + {field_element, 1, .inherited = true}, + [17] = + {field_arguments, 1}, + {field_function, 0}, + [19] = + {field_operators, 1, .inherited = true}, + [20] = + {field_definition, 1}, + [21] = + {field_interpolation, 1, .inherited = true}, + {field_prefix, 0}, + {field_string_content, 1, .inherited = true}, + {field_suffix, 2}, + [25] = + {field_interpolation, 0, .inherited = true}, + {field_interpolation, 1, .inherited = true}, + {field_string_content, 0, .inherited = true}, + {field_string_content, 1, .inherited = true}, + [29] = + {field_name, 0}, + {field_name, 1, .inherited = true}, + [31] = + {field_name, 1}, + [32] = + {field_element, 0}, + {field_trailing_comma, 1}, + [34] = + {field_element, 1, .inherited = true}, + {field_trailing_comma, 1, .inherited = true}, + [36] = + {field_inner, 1}, + [37] = + {field_name, 0}, + {field_value, 2}, + [39] = + {field_argument, 2, .inherited = true}, + [40] = + {field_argument, 1}, + {field_argument, 2, .inherited = true}, + [42] = + {field_cause, 2}, + [43] = + {field_element, 1}, + [44] = + {field_body, 2}, + [45] = + {field_kwarg, 1}, + [46] = + {field_element, 0, .inherited = true}, + {field_element, 1, .inherited = true}, + [48] = + {field_left, 0}, + {field_type, 2}, + [50] = + {field_left, 0}, + {field_right, 2}, + [52] = + {field_left, 0}, + {field_operator, 1}, + {field_right, 2}, + [55] = + {field_attribute, 2}, + {field_object, 0}, + [57] = + {field_operators, 0}, + [58] = + {field_operators, 0, .inherited = true}, + {field_operators, 1, .inherited = true}, + [60] = + {field_expression, 1}, + [61] = + {field_name, 0, .inherited = true}, + {field_name, 1, .inherited = true}, + [63] = + {field_alias, 2}, + {field_name, 0}, + [65] = + {field_name, 3, .inherited = true}, + [66] = + {field_module_name, 1}, + {field_name, 3, .inherited = true}, + [68] = + {field_module_name, 1}, + [69] = + {field_element, 0}, + {field_element, 1, .inherited = true}, + {field_trailing_comma, 2}, + [72] = + {field_body, 1}, + [73] = + {field_argument, 0, .inherited = true}, + {field_argument, 1, .inherited = true}, + [75] = + {field_cause, 3}, + [76] = + {field_condition, 1}, + {field_consequence, 3}, + [78] = + {field_body, 3}, + {field_condition, 1}, + [80] = + {field_body, 3}, + [81] = + {field_alias, 2}, + {field_value, 0}, + [83] = + {field_cases, 3}, + {field_subject, 1}, + [85] = + {field_element, 1}, + {field_element, 2, .inherited = true}, + [87] = + {field_key, 0}, + {field_value, 2}, + [89] = + {field_name, 1}, + {field_value, 3}, + [91] = + {field_body, 3}, + {field_name, 1}, + [93] = + {field_type, 2}, + [94] = + {field_body, 3}, + {field_parameters, 1}, + [96] = + {field_stop, 1}, + [97] = + {field_start, 0}, + [98] = + {field_subscript, 2}, + {field_value, 0}, + [100] = + {field_operators, 0}, + {field_operators, 1}, + [102] = + {field_alternative, 0}, + [103] = + {field_alternative, 4}, + {field_condition, 1}, + {field_consequence, 3}, + [106] = + {field_alternative, 4, .inherited = true}, + {field_condition, 1}, + {field_consequence, 3}, + [109] = + {field_condition, 1}, + {field_consequence, 3}, + {field_consequence, 4}, + [112] = + {field_body, 4}, + [113] = + {field_alternative, 4}, + {field_body, 3}, + {field_condition, 1}, + [116] = + {field_body, 3}, + {field_body, 4}, + {field_condition, 1}, + [119] = + {field_body, 2}, + {field_body, 3}, + [121] = + {field_body, 3}, + {field_body, 4}, + [123] = + {field_real, 0}, + [124] = + {field_bound, 1, .inherited = true}, + {field_name, 0}, + [126] = + {field_type_parameter, 1}, + [127] = + {field_body, 4}, + {field_name, 1}, + {field_parameters, 2}, + [130] = + {field_name, 1}, + {field_type_parameters, 2}, + {field_value, 4}, + [133] = + {field_body, 3}, + {field_body, 4}, + {field_name, 1}, + [136] = + {field_body, 4}, + {field_name, 1}, + {field_type_parameters, 2}, + [139] = + {field_body, 4}, + {field_name, 1}, + {field_superclasses, 2}, + [142] = + {field_left, 0}, + {field_right, 4}, + {field_type, 2}, + [145] = + {field_step, 2}, + [146] = + {field_subscript, 1}, + [147] = + {field_start, 0}, + {field_stop, 2}, + [149] = + {field_subscript, 2}, + {field_subscript, 3, .inherited = true}, + {field_value, 0}, + [152] = + {field_subscript, 0, .inherited = true}, + {field_subscript, 1, .inherited = true}, + [154] = + {field_name, 4, .inherited = true}, + [155] = + {field_module_name, 1}, + {field_name, 4, .inherited = true}, + [157] = + {field_left, 1}, + {field_right, 3}, + [159] = + {field_alternative, 4, .inherited = true}, + {field_alternative, 5}, + {field_condition, 1}, + {field_consequence, 3}, + [163] = + {field_alternative, 0, .inherited = true}, + {field_alternative, 1, .inherited = true}, + [165] = + {field_alternative, 5}, + {field_condition, 1}, + {field_consequence, 3}, + {field_consequence, 4}, + [169] = + {field_alternative, 5, .inherited = true}, + {field_condition, 1}, + {field_consequence, 3}, + {field_consequence, 4}, + [173] = + {field_body, 4}, + {field_body, 5}, + [175] = + {field_body, 5}, + {field_name, 2}, + {field_parameters, 3}, + [178] = + {field_body, 5}, + {field_left, 1}, + {field_right, 3}, + [181] = + {field_alternative, 5}, + {field_body, 3}, + {field_body, 4}, + {field_condition, 1}, + [185] = + {field_prefix_operator, 0}, + {field_real, 1}, + [187] = + {field_bound, 1}, + [188] = + {field_type_parameter, 1}, + {field_type_parameter, 2, .inherited = true}, + [190] = + {field_type_parameter, 0, .inherited = true}, + {field_type_parameter, 1, .inherited = true}, + [192] = + {field_body, 4}, + {field_body, 5}, + {field_name, 1}, + {field_parameters, 2}, + [196] = + {field_body, 5}, + {field_name, 1}, + {field_parameters, 3}, + {field_type_parameters, 2}, + [200] = + {field_body, 4}, + {field_body, 5}, + {field_name, 1}, + {field_type_parameters, 2}, + [204] = + {field_body, 5}, + {field_name, 1}, + {field_superclasses, 3}, + {field_type_parameters, 2}, + [208] = + {field_body, 4}, + {field_body, 5}, + {field_name, 1}, + {field_superclasses, 2}, + [212] = + {field_name, 0}, + {field_type, 2}, + {field_value, 4}, + [215] = + {field_step, 3}, + {field_stop, 1}, + [217] = + {field_start, 0}, + {field_step, 3}, + [219] = + {field_left, 2}, + {field_right, 4}, + [221] = + {field_left, 1}, + {field_right, 3}, + {field_right, 4}, + [224] = + {field_alternative, 5, .inherited = true}, + {field_alternative, 6}, + {field_condition, 1}, + {field_consequence, 3}, + {field_consequence, 4}, + [229] = + {field_body, 6}, + {field_left, 2}, + {field_right, 4}, + [232] = + {field_body, 5}, + {field_body, 6}, + {field_name, 2}, + {field_parameters, 3}, + [236] = + {field_body, 6}, + {field_name, 2}, + {field_parameters, 4}, + {field_type_parameters, 3}, + [240] = + {field_alternative, 6}, + {field_body, 5}, + {field_left, 1}, + {field_right, 3}, + [244] = + {field_body, 5}, + {field_body, 6}, + {field_left, 1}, + {field_right, 3}, + [248] = + {field_body, 3}, + {field_type, 1}, + [250] = + {field_content, 1}, + [251] = + {field_imaginary, 2}, + {field_operator, 1}, + {field_real, 0}, + [254] = + {field_test, 1}, + [255] = + {field_body, 3}, + {field_pattern, 1}, + [257] = + {field_alias, 2}, + {field_pattern, 0}, + [259] = + {field_class, 0}, + [260] = + {field_body, 6}, + {field_name, 1}, + {field_parameters, 2}, + {field_return_type, 4}, + [264] = + {field_body, 5}, + {field_body, 6}, + {field_name, 1}, + {field_parameters, 3}, + {field_type_parameters, 2}, + [269] = + {field_body, 5}, + {field_body, 6}, + {field_name, 1}, + {field_superclasses, 3}, + {field_type_parameters, 2}, + [274] = + {field_start, 0}, + {field_step, 4}, + {field_stop, 2}, + [277] = + {field_left, 2}, + {field_right, 4}, + {field_right, 5}, + [280] = + {field_alternative, 7}, + {field_body, 6}, + {field_left, 2}, + {field_right, 4}, + [284] = + {field_body, 6}, + {field_body, 7}, + {field_left, 2}, + {field_right, 4}, + [288] = + {field_body, 7}, + {field_name, 2}, + {field_parameters, 3}, + {field_return_type, 5}, + [292] = + {field_body, 6}, + {field_body, 7}, + {field_name, 2}, + {field_parameters, 4}, + {field_type_parameters, 3}, + [297] = + {field_alternative, 7}, + {field_body, 5}, + {field_body, 6}, + {field_left, 1}, + {field_right, 3}, + [302] = + {field_body, 3}, + {field_body, 4}, + {field_type, 1}, + [305] = + {field_imaginary, 3}, + {field_operator, 2}, + {field_prefix_operator, 0}, + {field_real, 1}, + [309] = + {field_body, 3}, + {field_body, 4}, + {field_pattern, 1}, + [312] = + {field_body, 4}, + {field_guard, 2}, + {field_pattern, 1}, + [315] = + {field_body, 6}, + {field_body, 7}, + {field_name, 1}, + {field_parameters, 2}, + {field_return_type, 4}, + [320] = + {field_body, 7}, + {field_name, 1}, + {field_parameters, 3}, + {field_return_type, 5}, + {field_type_parameters, 2}, + [325] = + {field_alternative, 8}, + {field_body, 6}, + {field_body, 7}, + {field_left, 2}, + {field_right, 4}, + [330] = + {field_body, 7}, + {field_body, 8}, + {field_name, 2}, + {field_parameters, 3}, + {field_return_type, 5}, + [335] = + {field_body, 8}, + {field_name, 2}, + {field_parameters, 4}, + {field_return_type, 6}, + {field_type_parameters, 3}, + [340] = + {field_alias, 3}, + {field_body, 5}, + {field_type, 1}, + [343] = + {field_body, 4}, + {field_body, 5}, + {field_guard, 2}, + {field_pattern, 1}, + [347] = + {field_attribute, 0}, + {field_value, 2}, + [349] = + {field_body, 7}, + {field_body, 8}, + {field_name, 1}, + {field_parameters, 3}, + {field_return_type, 5}, + {field_type_parameters, 2}, + [355] = + {field_body, 8}, + {field_body, 9}, + {field_name, 2}, + {field_parameters, 4}, + {field_return_type, 6}, + {field_type_parameters, 3}, + [361] = + {field_alias, 3}, + {field_body, 5}, + {field_body, 6}, + {field_type, 1}, +}; + +static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, + [1] = { + [0] = sym_identifier, + }, + [8] = { + [1] = sym_identifier, + }, + [27] = { + [0] = sym_identifier, + }, + [33] = { + [1] = sym_identifier, + }, + [49] = { + [1] = sym_parenthesized_expression, + }, + [54] = { + [3] = sym_block, + }, + [55] = { + [3] = sym_block, + }, + [56] = { + [2] = sym_block, + }, + [57] = { + [3] = sym_block, + }, + [59] = { + [1] = sym_tuple, + }, + [64] = { + [3] = sym_block, + }, + [67] = { + [1] = sym_parenthesized_expression, + }, + [71] = { + [0] = anon_alias_sym_notin, + [1] = anon_alias_sym_notin, + }, + [72] = { + [0] = anon_alias_sym_isnot, + [1] = anon_alias_sym_isnot, + }, + [73] = { + [0] = alias_sym_format_expression, + }, + [75] = { + [3] = sym_block, + }, + [76] = { + [3] = sym_block, + }, + [78] = { + [4] = sym_block, + }, + [79] = { + [3] = sym_block, + }, + [86] = { + [4] = sym_block, + }, + [89] = { + [4] = sym_block, + }, + [90] = { + [4] = sym_block, + }, + [92] = { + [1] = sym_parenthesized_expression, + }, + [101] = { + [3] = sym_block, + }, + [106] = { + [5] = sym_block, + }, + [107] = { + [5] = sym_block, + }, + [114] = { + [5] = sym_block, + }, + [116] = { + [5] = sym_block, + }, + [124] = { + [6] = sym_block, + }, + [126] = { + [6] = sym_block, + }, + [127] = { + [5] = sym_block, + }, + [129] = { + [3] = sym_block, + }, + [133] = { + [3] = sym_block, + }, + [136] = { + [6] = sym_block, + }, + [141] = { + [6] = sym_block, + }, + [143] = { + [7] = sym_block, + }, + [149] = { + [4] = sym_block, + }, + [151] = { + [7] = sym_block, + }, + [154] = { + [8] = sym_block, + }, + [155] = { + [5] = sym_block, + }, +}; + +static const uint16_t ts_non_terminal_alias_map[] = { + sym__simple_statements, 2, + sym__simple_statements, + sym_block, + sym_parenthesized_list_splat, 2, + sym_parenthesized_list_splat, + sym_parenthesized_expression, + sym_expression_list, 2, + sym_expression_list, + sym_tuple, + sym_interpolation, 2, + sym_interpolation, + alias_sym_format_expression, + 0, +}; + +static const TSStateId ts_primary_state_ids[STATE_COUNT] = { + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 3, + [4] = 4, + [5] = 5, + [6] = 6, + [7] = 7, + [8] = 8, + [9] = 9, + [10] = 8, + [11] = 11, + [12] = 12, + [13] = 13, + [14] = 14, + [15] = 15, + [16] = 16, + [17] = 5, + [18] = 13, + [19] = 14, + [20] = 20, + [21] = 16, + [22] = 22, + [23] = 23, + [24] = 24, + [25] = 6, + [26] = 3, + [27] = 12, + [28] = 15, + [29] = 29, + [30] = 30, + [31] = 22, + [32] = 23, + [33] = 33, + [34] = 34, + [35] = 35, + [36] = 36, + [37] = 20, + [38] = 38, + [39] = 39, + [40] = 36, + [41] = 41, + [42] = 9, + [43] = 24, + [44] = 4, + [45] = 41, + [46] = 39, + [47] = 34, + [48] = 35, + [49] = 49, + [50] = 2, + [51] = 7, + [52] = 33, + [53] = 30, + [54] = 54, + [55] = 54, + [56] = 11, + [57] = 38, + [58] = 49, + [59] = 29, + [60] = 60, + [61] = 60, + [62] = 60, + [63] = 63, + [64] = 64, + [65] = 60, + [66] = 60, + [67] = 63, + [68] = 60, + [69] = 60, + [70] = 70, + [71] = 70, + [72] = 72, + [73] = 73, + [74] = 74, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 78, + [79] = 79, + [80] = 80, + [81] = 81, + [82] = 82, + [83] = 80, + [84] = 84, + [85] = 74, + [86] = 86, + [87] = 82, + [88] = 88, + [89] = 89, + [90] = 84, + [91] = 72, + [92] = 92, + [93] = 93, + [94] = 77, + [95] = 95, + [96] = 96, + [97] = 97, + [98] = 76, + [99] = 89, + [100] = 100, + [101] = 78, + [102] = 102, + [103] = 103, + [104] = 104, + [105] = 105, + [106] = 102, + [107] = 81, + [108] = 108, + [109] = 96, + [110] = 88, + [111] = 93, + [112] = 112, + [113] = 105, + [114] = 114, + [115] = 115, + [116] = 116, + [117] = 79, + [118] = 73, + [119] = 108, + [120] = 92, + [121] = 116, + [122] = 115, + [123] = 104, + [124] = 97, + [125] = 103, + [126] = 100, + [127] = 95, + [128] = 112, + [129] = 86, + [130] = 114, + [131] = 131, + [132] = 132, + [133] = 133, + [134] = 133, + [135] = 135, + [136] = 135, + [137] = 133, + [138] = 133, + [139] = 133, + [140] = 133, + [141] = 135, + [142] = 135, + [143] = 135, + [144] = 135, + [145] = 133, + [146] = 135, + [147] = 147, + [148] = 148, + [149] = 148, + [150] = 148, + [151] = 151, + [152] = 131, + [153] = 148, + [154] = 151, + [155] = 155, + [156] = 156, + [157] = 157, + [158] = 158, + [159] = 159, + [160] = 159, + [161] = 159, + [162] = 162, + [163] = 163, + [164] = 162, + [165] = 165, + [166] = 166, + [167] = 167, + [168] = 168, + [169] = 166, + [170] = 166, + [171] = 171, + [172] = 172, + [173] = 173, + [174] = 174, + [175] = 175, + [176] = 176, + [177] = 177, + [178] = 178, + [179] = 177, + [180] = 158, + [181] = 181, + [182] = 182, + [183] = 178, + [184] = 177, + [185] = 185, + [186] = 186, + [187] = 187, + [188] = 188, + [189] = 189, + [190] = 187, + [191] = 187, + [192] = 192, + [193] = 188, + [194] = 194, + [195] = 168, + [196] = 196, + [197] = 194, + [198] = 189, + [199] = 199, + [200] = 200, + [201] = 201, + [202] = 202, + [203] = 196, + [204] = 188, + [205] = 171, + [206] = 194, + [207] = 189, + [208] = 186, + [209] = 199, + [210] = 167, + [211] = 200, + [212] = 188, + [213] = 213, + [214] = 186, + [215] = 199, + [216] = 196, + [217] = 187, + [218] = 218, + [219] = 219, + [220] = 220, + [221] = 221, + [222] = 222, + [223] = 223, + [224] = 224, + [225] = 225, + [226] = 226, + [227] = 227, + [228] = 228, + [229] = 229, + [230] = 230, + [231] = 231, + [232] = 232, + [233] = 233, + [234] = 234, + [235] = 233, + [236] = 236, + [237] = 234, + [238] = 232, + [239] = 236, + [240] = 229, + [241] = 228, + [242] = 242, + [243] = 243, + [244] = 244, + [245] = 244, + [246] = 246, + [247] = 247, + [248] = 243, + [249] = 243, + [250] = 242, + [251] = 246, + [252] = 246, + [253] = 242, + [254] = 247, + [255] = 255, + [256] = 256, + [257] = 255, + [258] = 258, + [259] = 259, + [260] = 256, + [261] = 261, + [262] = 261, + [263] = 263, + [264] = 264, + [265] = 265, + [266] = 266, + [267] = 267, + [268] = 268, + [269] = 261, + [270] = 267, + [271] = 266, + [272] = 268, + [273] = 256, + [274] = 255, + [275] = 275, + [276] = 263, + [277] = 258, + [278] = 278, + [279] = 265, + [280] = 280, + [281] = 281, + [282] = 282, + [283] = 283, + [284] = 284, + [285] = 285, + [286] = 286, + [287] = 287, + [288] = 288, + [289] = 289, + [290] = 290, + [291] = 281, + [292] = 283, + [293] = 293, + [294] = 294, + [295] = 295, + [296] = 296, + [297] = 297, + [298] = 296, + [299] = 299, + [300] = 300, + [301] = 299, + [302] = 302, + [303] = 303, + [304] = 304, + [305] = 288, + [306] = 306, + [307] = 285, + [308] = 308, + [309] = 309, + [310] = 299, + [311] = 287, + [312] = 312, + [313] = 308, + [314] = 314, + [315] = 282, + [316] = 316, + [317] = 317, + [318] = 318, + [319] = 288, + [320] = 320, + [321] = 321, + [322] = 322, + [323] = 323, + [324] = 324, + [325] = 325, + [326] = 281, + [327] = 316, + [328] = 328, + [329] = 329, + [330] = 330, + [331] = 331, + [332] = 317, + [333] = 333, + [334] = 334, + [335] = 335, + [336] = 226, + [337] = 218, + [338] = 338, + [339] = 339, + [340] = 340, + [341] = 321, + [342] = 220, + [343] = 221, + [344] = 223, + [345] = 345, + [346] = 322, + [347] = 347, + [348] = 348, + [349] = 347, + [350] = 323, + [351] = 351, + [352] = 219, + [353] = 340, + [354] = 288, + [355] = 282, + [356] = 281, + [357] = 333, + [358] = 308, + [359] = 288, + [360] = 308, + [361] = 361, + [362] = 308, + [363] = 329, + [364] = 364, + [365] = 227, + [366] = 328, + [367] = 287, + [368] = 324, + [369] = 308, + [370] = 281, + [371] = 282, + [372] = 318, + [373] = 320, + [374] = 287, + [375] = 287, + [376] = 281, + [377] = 325, + [378] = 287, + [379] = 282, + [380] = 345, + [381] = 288, + [382] = 282, + [383] = 335, + [384] = 331, + [385] = 385, + [386] = 386, + [387] = 387, + [388] = 388, + [389] = 389, + [390] = 390, + [391] = 391, + [392] = 392, + [393] = 393, + [394] = 394, + [395] = 395, + [396] = 396, + [397] = 397, + [398] = 398, + [399] = 399, + [400] = 400, + [401] = 401, + [402] = 402, + [403] = 403, + [404] = 404, + [405] = 389, + [406] = 406, + [407] = 403, + [408] = 408, + [409] = 396, + [410] = 396, + [411] = 395, + [412] = 412, + [413] = 413, + [414] = 408, + [415] = 386, + [416] = 402, + [417] = 417, + [418] = 387, + [419] = 391, + [420] = 420, + [421] = 388, + [422] = 392, + [423] = 404, + [424] = 400, + [425] = 425, + [426] = 386, + [427] = 427, + [428] = 427, + [429] = 386, + [430] = 430, + [431] = 431, + [432] = 430, + [433] = 420, + [434] = 434, + [435] = 435, + [436] = 397, + [437] = 397, + [438] = 438, + [439] = 385, + [440] = 413, + [441] = 441, + [442] = 442, + [443] = 385, + [444] = 444, + [445] = 391, + [446] = 395, + [447] = 425, + [448] = 389, + [449] = 449, + [450] = 450, + [451] = 451, + [452] = 392, + [453] = 453, + [454] = 454, + [455] = 395, + [456] = 385, + [457] = 396, + [458] = 444, + [459] = 459, + [460] = 442, + [461] = 461, + [462] = 462, + [463] = 444, + [464] = 464, + [465] = 397, + [466] = 466, + [467] = 454, + [468] = 398, + [469] = 406, + [470] = 391, + [471] = 399, + [472] = 464, + [473] = 473, + [474] = 473, + [475] = 475, + [476] = 392, + [477] = 477, + [478] = 401, + [479] = 479, + [480] = 480, + [481] = 444, + [482] = 389, + [483] = 483, + [484] = 412, + [485] = 485, + [486] = 485, + [487] = 487, + [488] = 488, + [489] = 489, + [490] = 487, + [491] = 491, + [492] = 492, + [493] = 492, + [494] = 491, + [495] = 488, + [496] = 489, + [497] = 497, + [498] = 498, + [499] = 499, + [500] = 500, + [501] = 501, + [502] = 502, + [503] = 503, + [504] = 504, + [505] = 505, + [506] = 506, + [507] = 507, + [508] = 508, + [509] = 509, + [510] = 510, + [511] = 511, + [512] = 512, + [513] = 512, + [514] = 514, + [515] = 498, + [516] = 507, + [517] = 517, + [518] = 518, + [519] = 519, + [520] = 504, + [521] = 521, + [522] = 522, + [523] = 523, + [524] = 524, + [525] = 500, + [526] = 524, + [527] = 527, + [528] = 528, + [529] = 529, + [530] = 530, + [531] = 531, + [532] = 532, + [533] = 533, + [534] = 534, + [535] = 535, + [536] = 534, + [537] = 529, + [538] = 530, + [539] = 511, + [540] = 533, + [541] = 541, + [542] = 502, + [543] = 543, + [544] = 544, + [545] = 510, + [546] = 509, + [547] = 508, + [548] = 501, + [549] = 549, + [550] = 527, + [551] = 503, + [552] = 552, + [553] = 531, + [554] = 549, + [555] = 528, + [556] = 506, + [557] = 505, + [558] = 532, + [559] = 559, + [560] = 543, + [561] = 561, + [562] = 541, + [563] = 535, + [564] = 559, + [565] = 561, + [566] = 517, + [567] = 567, + [568] = 514, + [569] = 567, + [570] = 570, + [571] = 571, + [572] = 571, + [573] = 573, + [574] = 573, + [575] = 575, + [576] = 522, + [577] = 575, + [578] = 544, + [579] = 579, + [580] = 497, + [581] = 581, + [582] = 582, + [583] = 579, + [584] = 499, + [585] = 570, + [586] = 581, + [587] = 587, + [588] = 523, + [589] = 582, + [590] = 587, + [591] = 518, + [592] = 521, + [593] = 519, + [594] = 552, + [595] = 595, + [596] = 596, + [597] = 597, + [598] = 598, + [599] = 599, + [600] = 600, + [601] = 601, + [602] = 602, + [603] = 603, + [604] = 602, + [605] = 603, + [606] = 606, + [607] = 607, + [608] = 608, + [609] = 609, + [610] = 610, + [611] = 611, + [612] = 612, + [613] = 613, + [614] = 614, + [615] = 615, + [616] = 616, + [617] = 617, + [618] = 618, + [619] = 619, + [620] = 620, + [621] = 621, + [622] = 622, + [623] = 623, + [624] = 624, + [625] = 625, + [626] = 626, + [627] = 627, + [628] = 628, + [629] = 629, + [630] = 630, + [631] = 631, + [632] = 632, + [633] = 633, + [634] = 634, + [635] = 635, + [636] = 636, + [637] = 637, + [638] = 638, + [639] = 639, + [640] = 640, + [641] = 641, + [642] = 642, + [643] = 630, + [644] = 644, + [645] = 645, + [646] = 646, + [647] = 647, + [648] = 647, + [649] = 649, + [650] = 650, + [651] = 651, + [652] = 652, + [653] = 653, + [654] = 651, + [655] = 645, + [656] = 656, + [657] = 656, + [658] = 653, + [659] = 659, + [660] = 646, + [661] = 650, + [662] = 662, + [663] = 662, + [664] = 659, + [665] = 652, + [666] = 649, + [667] = 667, + [668] = 668, + [669] = 669, + [670] = 669, + [671] = 671, + [672] = 672, + [673] = 669, + [674] = 667, + [675] = 668, + [676] = 669, + [677] = 599, + [678] = 598, + [679] = 679, + [680] = 680, + [681] = 681, + [682] = 682, + [683] = 683, + [684] = 630, + [685] = 685, + [686] = 682, + [687] = 687, + [688] = 688, + [689] = 599, + [690] = 690, + [691] = 679, + [692] = 681, + [693] = 693, + [694] = 679, + [695] = 695, + [696] = 680, + [697] = 695, + [698] = 698, + [699] = 690, + [700] = 682, + [701] = 688, + [702] = 680, + [703] = 695, + [704] = 681, + [705] = 690, + [706] = 687, + [707] = 698, + [708] = 687, + [709] = 683, + [710] = 687, + [711] = 682, + [712] = 679, + [713] = 600, + [714] = 690, + [715] = 715, + [716] = 693, + [717] = 681, + [718] = 688, + [719] = 683, + [720] = 598, + [721] = 695, + [722] = 680, + [723] = 698, + [724] = 688, + [725] = 672, + [726] = 683, + [727] = 671, + [728] = 698, + [729] = 693, + [730] = 693, + [731] = 662, + [732] = 649, + [733] = 652, + [734] = 659, + [735] = 647, + [736] = 609, + [737] = 653, + [738] = 651, + [739] = 645, + [740] = 630, + [741] = 646, + [742] = 600, + [743] = 656, + [744] = 610, + [745] = 650, + [746] = 662, + [747] = 651, + [748] = 748, + [749] = 330, + [750] = 653, + [751] = 652, + [752] = 649, + [753] = 647, + [754] = 667, + [755] = 668, + [756] = 645, + [757] = 659, + [758] = 609, + [759] = 759, + [760] = 760, + [761] = 646, + [762] = 449, + [763] = 656, + [764] = 334, + [765] = 475, + [766] = 650, + [767] = 767, + [768] = 441, + [769] = 610, + [770] = 431, + [771] = 626, + [772] = 639, + [773] = 625, + [774] = 624, + [775] = 637, + [776] = 620, + [777] = 623, + [778] = 617, + [779] = 475, + [780] = 622, + [781] = 629, + [782] = 632, + [783] = 615, + [784] = 627, + [785] = 628, + [786] = 671, + [787] = 672, + [788] = 631, + [789] = 441, + [790] = 634, + [791] = 635, + [792] = 633, + [793] = 613, + [794] = 618, + [795] = 612, + [796] = 640, + [797] = 642, + [798] = 667, + [799] = 621, + [800] = 641, + [801] = 668, + [802] = 644, + [803] = 619, + [804] = 611, + [805] = 638, + [806] = 431, + [807] = 616, + [808] = 614, + [809] = 634, + [810] = 220, + [811] = 642, + [812] = 759, + [813] = 626, + [814] = 625, + [815] = 624, + [816] = 623, + [817] = 611, + [818] = 622, + [819] = 637, + [820] = 621, + [821] = 620, + [822] = 219, + [823] = 616, + [824] = 614, + [825] = 629, + [826] = 641, + [827] = 632, + [828] = 638, + [829] = 227, + [830] = 644, + [831] = 613, + [832] = 618, + [833] = 631, + [834] = 223, + [835] = 640, + [836] = 221, + [837] = 760, + [838] = 639, + [839] = 612, + [840] = 627, + [841] = 617, + [842] = 628, + [843] = 615, + [844] = 218, + [845] = 226, + [846] = 619, + [847] = 633, + [848] = 635, + [849] = 849, + [850] = 850, + [851] = 851, + [852] = 849, + [853] = 853, + [854] = 854, + [855] = 855, + [856] = 856, + [857] = 857, + [858] = 858, + [859] = 859, + [860] = 860, + [861] = 861, + [862] = 862, + [863] = 863, + [864] = 864, + [865] = 865, + [866] = 866, + [867] = 867, + [868] = 868, + [869] = 868, + [870] = 870, + [871] = 870, + [872] = 872, + [873] = 873, + [874] = 874, + [875] = 875, + [876] = 876, + [877] = 868, + [878] = 870, + [879] = 879, + [880] = 880, + [881] = 870, + [882] = 882, + [883] = 868, + [884] = 884, + [885] = 885, + [886] = 885, + [887] = 887, + [888] = 885, + [889] = 889, + [890] = 885, + [891] = 891, + [892] = 892, + [893] = 893, + [894] = 894, + [895] = 895, + [896] = 896, + [897] = 897, + [898] = 895, + [899] = 896, + [900] = 900, + [901] = 901, + [902] = 902, + [903] = 902, + [904] = 904, + [905] = 905, + [906] = 906, + [907] = 907, + [908] = 908, + [909] = 909, + [910] = 910, + [911] = 907, + [912] = 912, + [913] = 913, + [914] = 914, + [915] = 915, + [916] = 916, + [917] = 917, + [918] = 907, + [919] = 909, + [920] = 920, + [921] = 914, + [922] = 916, + [923] = 908, + [924] = 912, + [925] = 925, + [926] = 926, + [927] = 920, + [928] = 926, + [929] = 929, + [930] = 930, + [931] = 930, + [932] = 932, + [933] = 933, + [934] = 934, + [935] = 932, + [936] = 936, + [937] = 937, + [938] = 936, + [939] = 939, + [940] = 940, + [941] = 932, + [942] = 936, + [943] = 943, + [944] = 934, + [945] = 930, + [946] = 940, + [947] = 947, + [948] = 948, + [949] = 936, + [950] = 934, + [951] = 951, + [952] = 934, + [953] = 940, + [954] = 954, + [955] = 955, + [956] = 956, + [957] = 957, + [958] = 958, + [959] = 959, + [960] = 960, + [961] = 961, + [962] = 962, + [963] = 963, + [964] = 964, + [965] = 965, + [966] = 966, + [967] = 904, + [968] = 968, + [969] = 969, + [970] = 970, + [971] = 971, + [972] = 972, + [973] = 973, + [974] = 914, + [975] = 975, + [976] = 901, + [977] = 977, + [978] = 978, + [979] = 979, + [980] = 926, + [981] = 981, + [982] = 982, + [983] = 983, + [984] = 984, + [985] = 985, + [986] = 986, + [987] = 987, + [988] = 988, + [989] = 989, + [990] = 990, + [991] = 965, + [992] = 909, + [993] = 993, + [994] = 994, + [995] = 995, + [996] = 996, + [997] = 912, + [998] = 998, + [999] = 999, + [1000] = 916, + [1001] = 920, + [1002] = 996, + [1003] = 983, + [1004] = 1004, + [1005] = 1005, + [1006] = 1006, + [1007] = 908, + [1008] = 1008, + [1009] = 900, + [1010] = 1010, + [1011] = 1011, + [1012] = 1012, + [1013] = 1013, + [1014] = 929, + [1015] = 900, + [1016] = 1016, + [1017] = 1017, + [1018] = 1018, + [1019] = 1019, + [1020] = 1020, + [1021] = 1021, + [1022] = 1022, + [1023] = 1023, + [1024] = 1024, + [1025] = 926, + [1026] = 1026, + [1027] = 912, + [1028] = 914, + [1029] = 920, + [1030] = 916, + [1031] = 1031, + [1032] = 908, + [1033] = 1033, + [1034] = 1034, + [1035] = 909, + [1036] = 933, + [1037] = 1037, + [1038] = 1038, + [1039] = 1039, + [1040] = 1021, + [1041] = 1041, + [1042] = 901, + [1043] = 1043, + [1044] = 1044, + [1045] = 1045, + [1046] = 1046, + [1047] = 1021, + [1048] = 947, + [1049] = 1038, + [1050] = 1050, + [1051] = 904, + [1052] = 1038, + [1053] = 1053, + [1054] = 948, + [1055] = 1055, + [1056] = 1056, + [1057] = 906, + [1058] = 1058, + [1059] = 1059, + [1060] = 1060, + [1061] = 1061, + [1062] = 1062, + [1063] = 1063, + [1064] = 1064, + [1065] = 1065, + [1066] = 1066, + [1067] = 1067, + [1068] = 1058, + [1069] = 1069, + [1070] = 1070, + [1071] = 1071, + [1072] = 1072, + [1073] = 1073, + [1074] = 1074, + [1075] = 1059, + [1076] = 1076, + [1077] = 1077, + [1078] = 1078, + [1079] = 1079, + [1080] = 1079, + [1081] = 1063, + [1082] = 1022, + [1083] = 1083, + [1084] = 1084, + [1085] = 1070, + [1086] = 1086, + [1087] = 1087, + [1088] = 1061, + [1089] = 1089, + [1090] = 1090, + [1091] = 1091, + [1092] = 964, + [1093] = 1093, + [1094] = 939, + [1095] = 1095, + [1096] = 1005, + [1097] = 1097, + [1098] = 1098, + [1099] = 1099, + [1100] = 1100, + [1101] = 917, + [1102] = 1039, + [1103] = 1103, + [1104] = 1104, + [1105] = 1105, + [1106] = 1106, + [1107] = 1107, + [1108] = 1107, + [1109] = 1109, + [1110] = 1110, + [1111] = 1111, + [1112] = 985, + [1113] = 1113, + [1114] = 1114, + [1115] = 1115, + [1116] = 1116, + [1117] = 1117, + [1118] = 1118, + [1119] = 1119, + [1120] = 1097, + [1121] = 1121, + [1122] = 1122, + [1123] = 1104, + [1124] = 1124, + [1125] = 1125, + [1126] = 1126, + [1127] = 1127, + [1128] = 1128, + [1129] = 1129, + [1130] = 1130, + [1131] = 1131, + [1132] = 1128, + [1133] = 1133, + [1134] = 1134, + [1135] = 1135, + [1136] = 1136, + [1137] = 1137, + [1138] = 1138, + [1139] = 1139, + [1140] = 1140, + [1141] = 1141, + [1142] = 1095, + [1143] = 1143, + [1144] = 1144, + [1145] = 1145, + [1146] = 1146, + [1147] = 1093, + [1148] = 1148, + [1149] = 1149, + [1150] = 1150, + [1151] = 1141, + [1152] = 1149, + [1153] = 1140, + [1154] = 1154, + [1155] = 1155, + [1156] = 1156, + [1157] = 1134, + [1158] = 1135, + [1159] = 1136, + [1160] = 1160, + [1161] = 1109, + [1162] = 1162, + [1163] = 1163, + [1164] = 1164, + [1165] = 1165, + [1166] = 1166, + [1167] = 1167, + [1168] = 913, + [1169] = 1149, + [1170] = 1170, + [1171] = 1171, + [1172] = 1172, + [1173] = 1173, + [1174] = 1174, + [1175] = 1175, + [1176] = 1131, + [1177] = 1177, + [1178] = 1178, + [1179] = 1129, + [1180] = 1180, + [1181] = 1173, + [1182] = 1118, + [1183] = 1183, + [1184] = 1180, + [1185] = 1185, + [1186] = 1149, + [1187] = 1023, + [1188] = 1188, + [1189] = 1189, + [1190] = 1190, + [1191] = 1191, + [1192] = 1192, + [1193] = 1193, + [1194] = 1194, + [1195] = 1195, + [1196] = 1196, + [1197] = 1197, + [1198] = 1198, + [1199] = 1199, + [1200] = 1200, + [1201] = 1201, + [1202] = 1202, + [1203] = 1203, + [1204] = 1204, + [1205] = 1164, + [1206] = 1163, + [1207] = 1207, + [1208] = 1208, + [1209] = 1209, + [1210] = 1210, + [1211] = 1211, + [1212] = 1212, + [1213] = 1213, + [1214] = 1209, + [1215] = 1215, + [1216] = 1216, + [1217] = 282, + [1218] = 1218, + [1219] = 1219, + [1220] = 1220, + [1221] = 1221, + [1222] = 1074, + [1223] = 1223, + [1224] = 1210, + [1225] = 1225, + [1226] = 1226, + [1227] = 1227, + [1228] = 1228, + [1229] = 1229, + [1230] = 1230, + [1231] = 1194, + [1232] = 1232, + [1233] = 308, + [1234] = 1234, + [1235] = 1235, + [1236] = 1236, + [1237] = 1194, + [1238] = 1209, + [1239] = 1239, + [1240] = 1189, + [1241] = 1194, + [1242] = 1242, + [1243] = 1242, + [1244] = 1209, + [1245] = 1183, + [1246] = 1194, + [1247] = 1234, + [1248] = 1209, + [1249] = 1204, + [1250] = 1250, + [1251] = 1219, + [1252] = 1252, + [1253] = 1060, + [1254] = 1194, + [1255] = 1239, + [1256] = 1256, + [1257] = 1257, + [1258] = 1220, + [1259] = 1259, + [1260] = 1260, + [1261] = 1209, + [1262] = 1262, + [1263] = 1263, + [1264] = 1264, + [1265] = 281, + [1266] = 1266, + [1267] = 1267, + [1268] = 1268, + [1269] = 1269, + [1270] = 1270, + [1271] = 1196, + [1272] = 1203, + [1273] = 1228, + [1274] = 1230, + [1275] = 1275, + [1276] = 1197, + [1277] = 1264, + [1278] = 1260, + [1279] = 1230, + [1280] = 1228, + [1281] = 1281, + [1282] = 1203, + [1283] = 1196, + [1284] = 1284, + [1285] = 1264, + [1286] = 1221, + [1287] = 1287, + [1288] = 1288, + [1289] = 1289, + [1290] = 1290, + [1291] = 609, + [1292] = 1292, + [1293] = 1293, + [1294] = 1220, + [1295] = 1275, + [1296] = 1296, + [1297] = 1256, + [1298] = 1239, + [1299] = 1299, + [1300] = 1234, + [1301] = 1301, + [1302] = 1242, + [1303] = 1303, + [1304] = 287, + [1305] = 1305, + [1306] = 1199, + [1307] = 1069, + [1308] = 1308, + [1309] = 1194, + [1310] = 1310, + [1311] = 1225, + [1312] = 1312, + [1313] = 1219, + [1314] = 1314, + [1315] = 1284, + [1316] = 1316, + [1317] = 1312, + [1318] = 610, + [1319] = 1209, + [1320] = 1320, + [1321] = 1143, + [1322] = 1322, + [1323] = 1323, + [1324] = 288, + [1325] = 1325, + [1326] = 1326, + [1327] = 1225, + [1328] = 1256, + [1329] = 1329, + [1330] = 1330, + [1331] = 1331, + [1332] = 1067, + [1333] = 1333, + [1334] = 1229, + [1335] = 1335, + [1336] = 1336, + [1337] = 1337, + [1338] = 1338, + [1339] = 1177, + [1340] = 1340, + [1341] = 1341, + [1342] = 1342, + [1343] = 1343, + [1344] = 1344, + [1345] = 1345, + [1346] = 1346, + [1347] = 1267, + [1348] = 1041, + [1349] = 1349, + [1350] = 1350, + [1351] = 1351, + [1352] = 1352, + [1353] = 1353, + [1354] = 1354, + [1355] = 1355, + [1356] = 1356, + [1357] = 1357, + [1358] = 1354, + [1359] = 1359, + [1360] = 1360, + [1361] = 1361, + [1362] = 1362, + [1363] = 1363, + [1364] = 1364, + [1365] = 1365, + [1366] = 1360, + [1367] = 1367, + [1368] = 1368, + [1369] = 1369, + [1370] = 1356, + [1371] = 1371, + [1372] = 1344, + [1373] = 1373, + [1374] = 1374, + [1375] = 1375, + [1376] = 1375, + [1377] = 1363, + [1378] = 1371, + [1379] = 1379, + [1380] = 1380, + [1381] = 1381, + [1382] = 1226, + [1383] = 1383, + [1384] = 1384, + [1385] = 1385, + [1386] = 1386, + [1387] = 1387, + [1388] = 1388, + [1389] = 1389, + [1390] = 1390, + [1391] = 1391, + [1392] = 1392, + [1393] = 1393, + [1394] = 1394, + [1395] = 1395, + [1396] = 1396, + [1397] = 1198, + [1398] = 1398, + [1399] = 1399, + [1400] = 1400, + [1401] = 1401, + [1402] = 1402, + [1403] = 1403, + [1404] = 1404, + [1405] = 1405, + [1406] = 1406, + [1407] = 1407, + [1408] = 1408, + [1409] = 1409, + [1410] = 1405, + [1411] = 1411, + [1412] = 1412, + [1413] = 1413, + [1414] = 1414, + [1415] = 1415, + [1416] = 1416, + [1417] = 1417, + [1418] = 1418, + [1419] = 1419, + [1420] = 1420, + [1421] = 1421, + [1422] = 1422, + [1423] = 1423, + [1424] = 1424, + [1425] = 1425, + [1426] = 1426, + [1427] = 1427, + [1428] = 1428, + [1429] = 1407, + [1430] = 1430, + [1431] = 1431, + [1432] = 1414, + [1433] = 1411, + [1434] = 1434, + [1435] = 1435, + [1436] = 1430, + [1437] = 1407, + [1438] = 1405, + [1439] = 1411, + [1440] = 1440, + [1441] = 1441, + [1442] = 1417, + [1443] = 1443, + [1444] = 1444, + [1445] = 1445, + [1446] = 1430, + [1447] = 1414, + [1448] = 1448, + [1449] = 1448, + [1450] = 1443, + [1451] = 1451, + [1452] = 1452, + [1453] = 1427, + [1454] = 1454, + [1455] = 1455, + [1456] = 1456, + [1457] = 1457, + [1458] = 1427, + [1459] = 1422, + [1460] = 1460, + [1461] = 1460, + [1462] = 1462, + [1463] = 1463, + [1464] = 1417, + [1465] = 1465, + [1466] = 1466, + [1467] = 1467, + [1468] = 1435, + [1469] = 1462, + [1470] = 1470, + [1471] = 1471, + [1472] = 1472, + [1473] = 1467, + [1474] = 1451, + [1475] = 1431, + [1476] = 1470, + [1477] = 1445, + [1478] = 1478, + [1479] = 1420, + [1480] = 1480, + [1481] = 1481, + [1482] = 1428, + [1483] = 1483, + [1484] = 1431, + [1485] = 1483, + [1486] = 1486, + [1487] = 1487, + [1488] = 1488, + [1489] = 1489, + [1490] = 1490, + [1491] = 1478, + [1492] = 1492, + [1493] = 1452, + [1494] = 1430, + [1495] = 1495, + [1496] = 1496, + [1497] = 1497, + [1498] = 1498, + [1499] = 1463, + [1500] = 1448, + [1501] = 1481, + [1502] = 1502, + [1503] = 1467, + [1504] = 1462, + [1505] = 1480, + [1506] = 1471, + [1507] = 1465, + [1508] = 1498, + [1509] = 1509, + [1510] = 1510, + [1511] = 1511, + [1512] = 1495, + [1513] = 1460, + [1514] = 1514, + [1515] = 1409, + [1516] = 1511, + [1517] = 1514, + [1518] = 1472, + [1519] = 1454, + [1520] = 1488, + [1521] = 1521, + [1522] = 1421, + [1523] = 1425, + [1524] = 1427, +}; + +static inline bool sym_identifier_character_set_1(int32_t c) { + return (c < 43514 + ? (c < 4193 + ? (c < 2707 + ? (c < 1994 + ? (c < 931 + ? (c < 748 + ? (c < 192 + ? (c < 170 + ? (c < 'a' + ? (c >= 'A' && c <= '_') + : c <= 'z') + : (c <= 170 || (c < 186 + ? c == 181 + : c <= 186))) + : (c <= 214 || (c < 710 + ? (c < 248 + ? (c >= 216 && c <= 246) + : c <= 705) + : (c <= 721 || (c >= 736 && c <= 740))))) + : (c <= 748 || (c < 895 + ? (c < 886 + ? (c < 880 + ? c == 750 + : c <= 884) + : (c <= 887 || (c >= 891 && c <= 893))) + : (c <= 895 || (c < 908 + ? (c < 904 + ? c == 902 + : c <= 906) + : (c <= 908 || (c >= 910 && c <= 929))))))) + : (c <= 1013 || (c < 1649 + ? (c < 1376 + ? (c < 1329 + ? (c < 1162 + ? (c >= 1015 && c <= 1153) + : c <= 1327) + : (c <= 1366 || c == 1369)) + : (c <= 1416 || (c < 1568 + ? (c < 1519 + ? (c >= 1488 && c <= 1514) + : c <= 1522) + : (c <= 1610 || (c >= 1646 && c <= 1647))))) + : (c <= 1747 || (c < 1791 + ? (c < 1774 + ? (c < 1765 + ? c == 1749 + : c <= 1766) + : (c <= 1775 || (c >= 1786 && c <= 1788))) + : (c <= 1791 || (c < 1869 + ? (c < 1810 + ? c == 1808 + : c <= 1839) + : (c <= 1957 || c == 1969)))))))) + : (c <= 2026 || (c < 2482 + ? (c < 2208 + ? (c < 2088 + ? (c < 2048 + ? (c < 2042 + ? (c >= 2036 && c <= 2037) + : c <= 2042) + : (c <= 2069 || (c < 2084 + ? c == 2074 + : c <= 2084))) + : (c <= 2088 || (c < 2160 + ? (c < 2144 + ? (c >= 2112 && c <= 2136) + : c <= 2154) + : (c <= 2183 || (c >= 2185 && c <= 2190))))) + : (c <= 2249 || (c < 2417 + ? (c < 2384 + ? (c < 2365 + ? (c >= 2308 && c <= 2361) + : c <= 2365) + : (c <= 2384 || (c >= 2392 && c <= 2401))) + : (c <= 2432 || (c < 2451 + ? (c < 2447 + ? (c >= 2437 && c <= 2444) + : c <= 2448) + : (c <= 2472 || (c >= 2474 && c <= 2480))))))) + : (c <= 2482 || (c < 2579 + ? (c < 2527 + ? (c < 2510 + ? (c < 2493 + ? (c >= 2486 && c <= 2489) + : c <= 2493) + : (c <= 2510 || (c >= 2524 && c <= 2525))) + : (c <= 2529 || (c < 2565 + ? (c < 2556 + ? (c >= 2544 && c <= 2545) + : c <= 2556) + : (c <= 2570 || (c >= 2575 && c <= 2576))))) + : (c <= 2600 || (c < 2649 + ? (c < 2613 + ? (c < 2610 + ? (c >= 2602 && c <= 2608) + : c <= 2611) + : (c <= 2614 || (c >= 2616 && c <= 2617))) + : (c <= 2652 || (c < 2693 + ? (c < 2674 + ? c == 2654 + : c <= 2676) + : (c <= 2701 || (c >= 2703 && c <= 2705))))))))))) + : (c <= 2728 || (c < 3242 + ? (c < 2962 + ? (c < 2858 + ? (c < 2784 + ? (c < 2741 + ? (c < 2738 + ? (c >= 2730 && c <= 2736) + : c <= 2739) + : (c <= 2745 || (c < 2768 + ? c == 2749 + : c <= 2768))) + : (c <= 2785 || (c < 2831 + ? (c < 2821 + ? c == 2809 + : c <= 2828) + : (c <= 2832 || (c >= 2835 && c <= 2856))))) + : (c <= 2864 || (c < 2911 + ? (c < 2877 + ? (c < 2869 + ? (c >= 2866 && c <= 2867) + : c <= 2873) + : (c <= 2877 || (c >= 2908 && c <= 2909))) + : (c <= 2913 || (c < 2949 + ? (c < 2947 + ? c == 2929 + : c <= 2947) + : (c <= 2954 || (c >= 2958 && c <= 2960))))))) + : (c <= 2965 || (c < 3090 + ? (c < 2984 + ? (c < 2974 + ? (c < 2972 + ? (c >= 2969 && c <= 2970) + : c <= 2972) + : (c <= 2975 || (c >= 2979 && c <= 2980))) + : (c <= 2986 || (c < 3077 + ? (c < 3024 + ? (c >= 2990 && c <= 3001) + : c <= 3024) + : (c <= 3084 || (c >= 3086 && c <= 3088))))) + : (c <= 3112 || (c < 3168 + ? (c < 3160 + ? (c < 3133 + ? (c >= 3114 && c <= 3129) + : c <= 3133) + : (c <= 3162 || c == 3165)) + : (c <= 3169 || (c < 3214 + ? (c < 3205 + ? c == 3200 + : c <= 3212) + : (c <= 3216 || (c >= 3218 && c <= 3240))))))))) + : (c <= 3251 || (c < 3648 + ? (c < 3412 + ? (c < 3332 + ? (c < 3293 + ? (c < 3261 + ? (c >= 3253 && c <= 3257) + : c <= 3261) + : (c <= 3294 || (c < 3313 + ? (c >= 3296 && c <= 3297) + : c <= 3314))) + : (c <= 3340 || (c < 3389 + ? (c < 3346 + ? (c >= 3342 && c <= 3344) + : c <= 3386) + : (c <= 3389 || c == 3406)))) + : (c <= 3414 || (c < 3507 + ? (c < 3461 + ? (c < 3450 + ? (c >= 3423 && c <= 3425) + : c <= 3455) + : (c <= 3478 || (c >= 3482 && c <= 3505))) + : (c <= 3515 || (c < 3585 + ? (c < 3520 + ? c == 3517 + : c <= 3526) + : (c <= 3632 || c == 3634)))))) + : (c <= 3654 || (c < 3782 + ? (c < 3749 + ? (c < 3718 + ? (c < 3716 + ? (c >= 3713 && c <= 3714) + : c <= 3716) + : (c <= 3722 || (c >= 3724 && c <= 3747))) + : (c <= 3749 || (c < 3773 + ? (c < 3762 + ? (c >= 3751 && c <= 3760) + : c <= 3762) + : (c <= 3773 || (c >= 3776 && c <= 3780))))) + : (c <= 3782 || (c < 3976 + ? (c < 3904 + ? (c < 3840 + ? (c >= 3804 && c <= 3807) + : c <= 3840) + : (c <= 3911 || (c >= 3913 && c <= 3948))) + : (c <= 3980 || (c < 4176 + ? (c < 4159 + ? (c >= 4096 && c <= 4138) + : c <= 4159) + : (c <= 4181 || (c >= 4186 && c <= 4189))))))))))))) + : (c <= 4193 || (c < 8134 + ? (c < 6176 + ? (c < 4808 + ? (c < 4688 + ? (c < 4295 + ? (c < 4213 + ? (c < 4206 + ? (c >= 4197 && c <= 4198) + : c <= 4208) + : (c <= 4225 || (c < 4256 + ? c == 4238 + : c <= 4293))) + : (c <= 4295 || (c < 4348 + ? (c < 4304 + ? c == 4301 + : c <= 4346) + : (c <= 4680 || (c >= 4682 && c <= 4685))))) + : (c <= 4694 || (c < 4752 + ? (c < 4704 + ? (c < 4698 + ? c == 4696 + : c <= 4701) + : (c <= 4744 || (c >= 4746 && c <= 4749))) + : (c <= 4784 || (c < 4800 + ? (c < 4792 + ? (c >= 4786 && c <= 4789) + : c <= 4798) + : (c <= 4800 || (c >= 4802 && c <= 4805))))))) + : (c <= 4822 || (c < 5792 + ? (c < 5024 + ? (c < 4888 + ? (c < 4882 + ? (c >= 4824 && c <= 4880) + : c <= 4885) + : (c <= 4954 || (c >= 4992 && c <= 5007))) + : (c <= 5109 || (c < 5743 + ? (c < 5121 + ? (c >= 5112 && c <= 5117) + : c <= 5740) + : (c <= 5759 || (c >= 5761 && c <= 5786))))) + : (c <= 5866 || (c < 5984 + ? (c < 5919 + ? (c < 5888 + ? (c >= 5870 && c <= 5880) + : c <= 5905) + : (c <= 5937 || (c >= 5952 && c <= 5969))) + : (c <= 5996 || (c < 6103 + ? (c < 6016 + ? (c >= 5998 && c <= 6000) + : c <= 6067) + : (c <= 6103 || c == 6108)))))))) + : (c <= 6264 || (c < 7312 + ? (c < 6823 + ? (c < 6512 + ? (c < 6320 + ? (c < 6314 + ? (c >= 6272 && c <= 6312) + : c <= 6314) + : (c <= 6389 || (c < 6480 + ? (c >= 6400 && c <= 6430) + : c <= 6509))) + : (c <= 6516 || (c < 6656 + ? (c < 6576 + ? (c >= 6528 && c <= 6571) + : c <= 6601) + : (c <= 6678 || (c >= 6688 && c <= 6740))))) + : (c <= 6823 || (c < 7098 + ? (c < 7043 + ? (c < 6981 + ? (c >= 6917 && c <= 6963) + : c <= 6988) + : (c <= 7072 || (c >= 7086 && c <= 7087))) + : (c <= 7141 || (c < 7258 + ? (c < 7245 + ? (c >= 7168 && c <= 7203) + : c <= 7247) + : (c <= 7293 || (c >= 7296 && c <= 7304))))))) + : (c <= 7354 || (c < 8008 + ? (c < 7418 + ? (c < 7406 + ? (c < 7401 + ? (c >= 7357 && c <= 7359) + : c <= 7404) + : (c <= 7411 || (c >= 7413 && c <= 7414))) + : (c <= 7418 || (c < 7960 + ? (c < 7680 + ? (c >= 7424 && c <= 7615) + : c <= 7957) + : (c <= 7965 || (c >= 7968 && c <= 8005))))) + : (c <= 8013 || (c < 8031 + ? (c < 8027 + ? (c < 8025 + ? (c >= 8016 && c <= 8023) + : c <= 8025) + : (c <= 8027 || c == 8029)) + : (c <= 8061 || (c < 8126 + ? (c < 8118 + ? (c >= 8064 && c <= 8116) + : c <= 8124) + : (c <= 8126 || (c >= 8130 && c <= 8132))))))))))) + : (c <= 8140 || (c < 12337 + ? (c < 8544 + ? (c < 8458 + ? (c < 8305 + ? (c < 8160 + ? (c < 8150 + ? (c >= 8144 && c <= 8147) + : c <= 8155) + : (c <= 8172 || (c < 8182 + ? (c >= 8178 && c <= 8180) + : c <= 8188))) + : (c <= 8305 || (c < 8450 + ? (c < 8336 + ? c == 8319 + : c <= 8348) + : (c <= 8450 || c == 8455)))) + : (c <= 8467 || (c < 8488 + ? (c < 8484 + ? (c < 8472 + ? c == 8469 + : c <= 8477) + : (c <= 8484 || c == 8486)) + : (c <= 8488 || (c < 8517 + ? (c < 8508 + ? (c >= 8490 && c <= 8505) + : c <= 8511) + : (c <= 8521 || c == 8526)))))) + : (c <= 8584 || (c < 11680 + ? (c < 11559 + ? (c < 11506 + ? (c < 11499 + ? (c >= 11264 && c <= 11492) + : c <= 11502) + : (c <= 11507 || (c >= 11520 && c <= 11557))) + : (c <= 11559 || (c < 11631 + ? (c < 11568 + ? c == 11565 + : c <= 11623) + : (c <= 11631 || (c >= 11648 && c <= 11670))))) + : (c <= 11686 || (c < 11720 + ? (c < 11704 + ? (c < 11696 + ? (c >= 11688 && c <= 11694) + : c <= 11702) + : (c <= 11710 || (c >= 11712 && c <= 11718))) + : (c <= 11726 || (c < 12293 + ? (c < 11736 + ? (c >= 11728 && c <= 11734) + : c <= 11742) + : (c <= 12295 || (c >= 12321 && c <= 12329))))))))) + : (c <= 12341 || (c < 42891 + ? (c < 19968 + ? (c < 12549 + ? (c < 12445 + ? (c < 12353 + ? (c >= 12344 && c <= 12348) + : c <= 12438) + : (c <= 12447 || (c < 12540 + ? (c >= 12449 && c <= 12538) + : c <= 12543))) + : (c <= 12591 || (c < 12784 + ? (c < 12704 + ? (c >= 12593 && c <= 12686) + : c <= 12735) + : (c <= 12799 || (c >= 13312 && c <= 19903))))) + : (c <= 42124 || (c < 42560 + ? (c < 42512 + ? (c < 42240 + ? (c >= 42192 && c <= 42237) + : c <= 42508) + : (c <= 42527 || (c >= 42538 && c <= 42539))) + : (c <= 42606 || (c < 42775 + ? (c < 42656 + ? (c >= 42623 && c <= 42653) + : c <= 42735) + : (c <= 42783 || (c >= 42786 && c <= 42888))))))) + : (c <= 42954 || (c < 43250 + ? (c < 43011 + ? (c < 42965 + ? (c < 42963 + ? (c >= 42960 && c <= 42961) + : c <= 42963) + : (c <= 42969 || (c >= 42994 && c <= 43009))) + : (c <= 43013 || (c < 43072 + ? (c < 43020 + ? (c >= 43015 && c <= 43018) + : c <= 43042) + : (c <= 43123 || (c >= 43138 && c <= 43187))))) + : (c <= 43255 || (c < 43360 + ? (c < 43274 + ? (c < 43261 + ? c == 43259 + : c <= 43262) + : (c <= 43301 || (c >= 43312 && c <= 43334))) + : (c <= 43388 || (c < 43488 + ? (c < 43471 + ? (c >= 43396 && c <= 43442) + : c <= 43471) + : (c <= 43492 || (c >= 43494 && c <= 43503))))))))))))))) + : (c <= 43518 || (c < 70727 + ? (c < 66956 + ? (c < 64914 + ? (c < 43868 + ? (c < 43714 + ? (c < 43646 + ? (c < 43588 + ? (c < 43584 + ? (c >= 43520 && c <= 43560) + : c <= 43586) + : (c <= 43595 || (c < 43642 + ? (c >= 43616 && c <= 43638) + : c <= 43642))) + : (c <= 43695 || (c < 43705 + ? (c < 43701 + ? c == 43697 + : c <= 43702) + : (c <= 43709 || c == 43712)))) + : (c <= 43714 || (c < 43785 + ? (c < 43762 + ? (c < 43744 + ? (c >= 43739 && c <= 43741) + : c <= 43754) + : (c <= 43764 || (c >= 43777 && c <= 43782))) + : (c <= 43790 || (c < 43816 + ? (c < 43808 + ? (c >= 43793 && c <= 43798) + : c <= 43814) + : (c <= 43822 || (c >= 43824 && c <= 43866))))))) + : (c <= 43881 || (c < 64287 + ? (c < 63744 + ? (c < 55216 + ? (c < 44032 + ? (c >= 43888 && c <= 44002) + : c <= 55203) + : (c <= 55238 || (c >= 55243 && c <= 55291))) + : (c <= 64109 || (c < 64275 + ? (c < 64256 + ? (c >= 64112 && c <= 64217) + : c <= 64262) + : (c <= 64279 || c == 64285)))) + : (c <= 64296 || (c < 64323 + ? (c < 64318 + ? (c < 64312 + ? (c >= 64298 && c <= 64310) + : c <= 64316) + : (c <= 64318 || (c >= 64320 && c <= 64321))) + : (c <= 64324 || (c < 64612 + ? (c < 64467 + ? (c >= 64326 && c <= 64433) + : c <= 64605) + : (c <= 64829 || (c >= 64848 && c <= 64911))))))))) + : (c <= 64967 || (c < 65599 + ? (c < 65382 + ? (c < 65147 + ? (c < 65139 + ? (c < 65137 + ? (c >= 65008 && c <= 65017) + : c <= 65137) + : (c <= 65139 || (c < 65145 + ? c == 65143 + : c <= 65145))) + : (c <= 65147 || (c < 65313 + ? (c < 65151 + ? c == 65149 + : c <= 65276) + : (c <= 65338 || (c >= 65345 && c <= 65370))))) + : (c <= 65437 || (c < 65498 + ? (c < 65482 + ? (c < 65474 + ? (c >= 65440 && c <= 65470) + : c <= 65479) + : (c <= 65487 || (c >= 65490 && c <= 65495))) + : (c <= 65500 || (c < 65576 + ? (c < 65549 + ? (c >= 65536 && c <= 65547) + : c <= 65574) + : (c <= 65594 || (c >= 65596 && c <= 65597))))))) + : (c <= 65613 || (c < 66464 + ? (c < 66208 + ? (c < 65856 + ? (c < 65664 + ? (c >= 65616 && c <= 65629) + : c <= 65786) + : (c <= 65908 || (c >= 66176 && c <= 66204))) + : (c <= 66256 || (c < 66384 + ? (c < 66349 + ? (c >= 66304 && c <= 66335) + : c <= 66378) + : (c <= 66421 || (c >= 66432 && c <= 66461))))) + : (c <= 66499 || (c < 66776 + ? (c < 66560 + ? (c < 66513 + ? (c >= 66504 && c <= 66511) + : c <= 66517) + : (c <= 66717 || (c >= 66736 && c <= 66771))) + : (c <= 66811 || (c < 66928 + ? (c < 66864 + ? (c >= 66816 && c <= 66855) + : c <= 66915) + : (c <= 66938 || (c >= 66940 && c <= 66954))))))))))) + : (c <= 66962 || (c < 68864 + ? (c < 67828 + ? (c < 67506 + ? (c < 67072 + ? (c < 66979 + ? (c < 66967 + ? (c >= 66964 && c <= 66965) + : c <= 66977) + : (c <= 66993 || (c < 67003 + ? (c >= 66995 && c <= 67001) + : c <= 67004))) + : (c <= 67382 || (c < 67456 + ? (c < 67424 + ? (c >= 67392 && c <= 67413) + : c <= 67431) + : (c <= 67461 || (c >= 67463 && c <= 67504))))) + : (c <= 67514 || (c < 67644 + ? (c < 67594 + ? (c < 67592 + ? (c >= 67584 && c <= 67589) + : c <= 67592) + : (c <= 67637 || (c >= 67639 && c <= 67640))) + : (c <= 67644 || (c < 67712 + ? (c < 67680 + ? (c >= 67647 && c <= 67669) + : c <= 67702) + : (c <= 67742 || (c >= 67808 && c <= 67826))))))) + : (c <= 67829 || (c < 68224 + ? (c < 68096 + ? (c < 67968 + ? (c < 67872 + ? (c >= 67840 && c <= 67861) + : c <= 67897) + : (c <= 68023 || (c >= 68030 && c <= 68031))) + : (c <= 68096 || (c < 68121 + ? (c < 68117 + ? (c >= 68112 && c <= 68115) + : c <= 68119) + : (c <= 68149 || (c >= 68192 && c <= 68220))))) + : (c <= 68252 || (c < 68448 + ? (c < 68352 + ? (c < 68297 + ? (c >= 68288 && c <= 68295) + : c <= 68324) + : (c <= 68405 || (c >= 68416 && c <= 68437))) + : (c <= 68466 || (c < 68736 + ? (c < 68608 + ? (c >= 68480 && c <= 68497) + : c <= 68680) + : (c <= 68786 || (c >= 68800 && c <= 68850))))))))) + : (c <= 68899 || (c < 70106 + ? (c < 69749 + ? (c < 69488 + ? (c < 69376 + ? (c < 69296 + ? (c >= 69248 && c <= 69289) + : c <= 69297) + : (c <= 69404 || (c < 69424 + ? c == 69415 + : c <= 69445))) + : (c <= 69505 || (c < 69635 + ? (c < 69600 + ? (c >= 69552 && c <= 69572) + : c <= 69622) + : (c <= 69687 || (c >= 69745 && c <= 69746))))) + : (c <= 69749 || (c < 69959 + ? (c < 69891 + ? (c < 69840 + ? (c >= 69763 && c <= 69807) + : c <= 69864) + : (c <= 69926 || c == 69956)) + : (c <= 69959 || (c < 70019 + ? (c < 70006 + ? (c >= 69968 && c <= 70002) + : c <= 70006) + : (c <= 70066 || (c >= 70081 && c <= 70084))))))) + : (c <= 70106 || (c < 70405 + ? (c < 70280 + ? (c < 70163 + ? (c < 70144 + ? c == 70108 + : c <= 70161) + : (c <= 70187 || (c >= 70272 && c <= 70278))) + : (c <= 70280 || (c < 70303 + ? (c < 70287 + ? (c >= 70282 && c <= 70285) + : c <= 70301) + : (c <= 70312 || (c >= 70320 && c <= 70366))))) + : (c <= 70412 || (c < 70453 + ? (c < 70442 + ? (c < 70419 + ? (c >= 70415 && c <= 70416) + : c <= 70440) + : (c <= 70448 || (c >= 70450 && c <= 70451))) + : (c <= 70457 || (c < 70493 + ? (c < 70480 + ? c == 70461 + : c <= 70480) + : (c <= 70497 || (c >= 70656 && c <= 70708))))))))))))) + : (c <= 70730 || (c < 119894 + ? (c < 73056 + ? (c < 72001 + ? (c < 71424 + ? (c < 71128 + ? (c < 70852 + ? (c < 70784 + ? (c >= 70751 && c <= 70753) + : c <= 70831) + : (c <= 70853 || (c < 71040 + ? c == 70855 + : c <= 71086))) + : (c <= 71131 || (c < 71296 + ? (c < 71236 + ? (c >= 71168 && c <= 71215) + : c <= 71236) + : (c <= 71338 || c == 71352)))) + : (c <= 71450 || (c < 71945 + ? (c < 71840 + ? (c < 71680 + ? (c >= 71488 && c <= 71494) + : c <= 71723) + : (c <= 71903 || (c >= 71935 && c <= 71942))) + : (c <= 71945 || (c < 71960 + ? (c < 71957 + ? (c >= 71948 && c <= 71955) + : c <= 71958) + : (c <= 71983 || c == 71999)))))) + : (c <= 72001 || (c < 72349 + ? (c < 72192 + ? (c < 72161 + ? (c < 72106 + ? (c >= 72096 && c <= 72103) + : c <= 72144) + : (c <= 72161 || c == 72163)) + : (c <= 72192 || (c < 72272 + ? (c < 72250 + ? (c >= 72203 && c <= 72242) + : c <= 72250) + : (c <= 72272 || (c >= 72284 && c <= 72329))))) + : (c <= 72349 || (c < 72818 + ? (c < 72714 + ? (c < 72704 + ? (c >= 72368 && c <= 72440) + : c <= 72712) + : (c <= 72750 || c == 72768)) + : (c <= 72847 || (c < 72971 + ? (c < 72968 + ? (c >= 72960 && c <= 72966) + : c <= 72969) + : (c <= 73008 || c == 73030)))))))) + : (c <= 73061 || (c < 93952 + ? (c < 82944 + ? (c < 73728 + ? (c < 73112 + ? (c < 73066 + ? (c >= 73063 && c <= 73064) + : c <= 73097) + : (c <= 73112 || (c < 73648 + ? (c >= 73440 && c <= 73458) + : c <= 73648))) + : (c <= 74649 || (c < 77712 + ? (c < 74880 + ? (c >= 74752 && c <= 74862) + : c <= 75075) + : (c <= 77808 || (c >= 77824 && c <= 78894))))) + : (c <= 83526 || (c < 92928 + ? (c < 92784 + ? (c < 92736 + ? (c >= 92160 && c <= 92728) + : c <= 92766) + : (c <= 92862 || (c >= 92880 && c <= 92909))) + : (c <= 92975 || (c < 93053 + ? (c < 93027 + ? (c >= 92992 && c <= 92995) + : c <= 93047) + : (c <= 93071 || (c >= 93760 && c <= 93823))))))) + : (c <= 94026 || (c < 110589 + ? (c < 94208 + ? (c < 94176 + ? (c < 94099 + ? c == 94032 + : c <= 94111) + : (c <= 94177 || c == 94179)) + : (c <= 100343 || (c < 110576 + ? (c < 101632 + ? (c >= 100352 && c <= 101589) + : c <= 101640) + : (c <= 110579 || (c >= 110581 && c <= 110587))))) + : (c <= 110590 || (c < 113664 + ? (c < 110948 + ? (c < 110928 + ? (c >= 110592 && c <= 110882) + : c <= 110930) + : (c <= 110951 || (c >= 110960 && c <= 111355))) + : (c <= 113770 || (c < 113808 + ? (c < 113792 + ? (c >= 113776 && c <= 113788) + : c <= 113800) + : (c <= 113817 || (c >= 119808 && c <= 119892))))))))))) + : (c <= 119964 || (c < 125259 + ? (c < 120572 + ? (c < 120086 + ? (c < 119995 + ? (c < 119973 + ? (c < 119970 + ? (c >= 119966 && c <= 119967) + : c <= 119970) + : (c <= 119974 || (c < 119982 + ? (c >= 119977 && c <= 119980) + : c <= 119993))) + : (c <= 119995 || (c < 120071 + ? (c < 120005 + ? (c >= 119997 && c <= 120003) + : c <= 120069) + : (c <= 120074 || (c >= 120077 && c <= 120084))))) + : (c <= 120092 || (c < 120138 + ? (c < 120128 + ? (c < 120123 + ? (c >= 120094 && c <= 120121) + : c <= 120126) + : (c <= 120132 || c == 120134)) + : (c <= 120144 || (c < 120514 + ? (c < 120488 + ? (c >= 120146 && c <= 120485) + : c <= 120512) + : (c <= 120538 || (c >= 120540 && c <= 120570))))))) + : (c <= 120596 || (c < 123191 + ? (c < 120714 + ? (c < 120656 + ? (c < 120630 + ? (c >= 120598 && c <= 120628) + : c <= 120654) + : (c <= 120686 || (c >= 120688 && c <= 120712))) + : (c <= 120744 || (c < 122624 + ? (c < 120772 + ? (c >= 120746 && c <= 120770) + : c <= 120779) + : (c <= 122654 || (c >= 123136 && c <= 123180))))) + : (c <= 123197 || (c < 124904 + ? (c < 123584 + ? (c < 123536 + ? c == 123214 + : c <= 123565) + : (c <= 123627 || (c >= 124896 && c <= 124902))) + : (c <= 124907 || (c < 124928 + ? (c < 124912 + ? (c >= 124909 && c <= 124910) + : c <= 124926) + : (c <= 125124 || (c >= 125184 && c <= 125251))))))))) + : (c <= 125259 || (c < 126559 + ? (c < 126535 + ? (c < 126505 + ? (c < 126497 + ? (c < 126469 + ? (c >= 126464 && c <= 126467) + : c <= 126495) + : (c <= 126498 || (c < 126503 + ? c == 126500 + : c <= 126503))) + : (c <= 126514 || (c < 126523 + ? (c < 126521 + ? (c >= 126516 && c <= 126519) + : c <= 126521) + : (c <= 126523 || c == 126530)))) + : (c <= 126535 || (c < 126548 + ? (c < 126541 + ? (c < 126539 + ? c == 126537 + : c <= 126539) + : (c <= 126543 || (c >= 126545 && c <= 126546))) + : (c <= 126548 || (c < 126555 + ? (c < 126553 + ? c == 126551 + : c <= 126553) + : (c <= 126555 || c == 126557)))))) + : (c <= 126559 || (c < 126625 + ? (c < 126580 + ? (c < 126567 + ? (c < 126564 + ? (c >= 126561 && c <= 126562) + : c <= 126564) + : (c <= 126570 || (c >= 126572 && c <= 126578))) + : (c <= 126583 || (c < 126592 + ? (c < 126590 + ? (c >= 126585 && c <= 126588) + : c <= 126590) + : (c <= 126601 || (c >= 126603 && c <= 126619))))) + : (c <= 126627 || (c < 177984 + ? (c < 131072 + ? (c < 126635 + ? (c >= 126629 && c <= 126633) + : c <= 126651) + : (c <= 173791 || (c >= 173824 && c <= 177976))) + : (c <= 178205 || (c < 194560 + ? (c < 183984 + ? (c >= 178208 && c <= 183969) + : c <= 191456) + : (c <= 195101 || (c >= 196608 && c <= 201546))))))))))))))))); +} + +static inline bool sym_identifier_character_set_2(int32_t c) { + return (c < 43514 + ? (c < 4193 + ? (c < 2707 + ? (c < 1994 + ? (c < 910 + ? (c < 736 + ? (c < 186 + ? (c < 'a' + ? (c < '_' + ? (c >= 'A' && c <= 'Z') + : c <= '_') + : (c <= 'z' || (c < 181 + ? c == 170 + : c <= 181))) + : (c <= 186 || (c < 248 + ? (c < 216 + ? (c >= 192 && c <= 214) + : c <= 246) + : (c <= 705 || (c >= 710 && c <= 721))))) + : (c <= 740 || (c < 891 + ? (c < 880 + ? (c < 750 + ? c == 748 + : c <= 750) + : (c <= 884 || (c >= 886 && c <= 887))) + : (c <= 893 || (c < 904 + ? (c < 902 + ? c == 895 + : c <= 902) + : (c <= 906 || c == 908)))))) + : (c <= 929 || (c < 1649 + ? (c < 1376 + ? (c < 1162 + ? (c < 1015 + ? (c >= 931 && c <= 1013) + : c <= 1153) + : (c <= 1327 || (c < 1369 + ? (c >= 1329 && c <= 1366) + : c <= 1369))) + : (c <= 1416 || (c < 1568 + ? (c < 1519 + ? (c >= 1488 && c <= 1514) + : c <= 1522) + : (c <= 1610 || (c >= 1646 && c <= 1647))))) + : (c <= 1747 || (c < 1791 + ? (c < 1774 + ? (c < 1765 + ? c == 1749 + : c <= 1766) + : (c <= 1775 || (c >= 1786 && c <= 1788))) + : (c <= 1791 || (c < 1869 + ? (c < 1810 + ? c == 1808 + : c <= 1839) + : (c <= 1957 || c == 1969)))))))) + : (c <= 2026 || (c < 2482 + ? (c < 2208 + ? (c < 2088 + ? (c < 2048 + ? (c < 2042 + ? (c >= 2036 && c <= 2037) + : c <= 2042) + : (c <= 2069 || (c < 2084 + ? c == 2074 + : c <= 2084))) + : (c <= 2088 || (c < 2160 + ? (c < 2144 + ? (c >= 2112 && c <= 2136) + : c <= 2154) + : (c <= 2183 || (c >= 2185 && c <= 2190))))) + : (c <= 2249 || (c < 2417 + ? (c < 2384 + ? (c < 2365 + ? (c >= 2308 && c <= 2361) + : c <= 2365) + : (c <= 2384 || (c >= 2392 && c <= 2401))) + : (c <= 2432 || (c < 2451 + ? (c < 2447 + ? (c >= 2437 && c <= 2444) + : c <= 2448) + : (c <= 2472 || (c >= 2474 && c <= 2480))))))) + : (c <= 2482 || (c < 2579 + ? (c < 2527 + ? (c < 2510 + ? (c < 2493 + ? (c >= 2486 && c <= 2489) + : c <= 2493) + : (c <= 2510 || (c >= 2524 && c <= 2525))) + : (c <= 2529 || (c < 2565 + ? (c < 2556 + ? (c >= 2544 && c <= 2545) + : c <= 2556) + : (c <= 2570 || (c >= 2575 && c <= 2576))))) + : (c <= 2600 || (c < 2649 + ? (c < 2613 + ? (c < 2610 + ? (c >= 2602 && c <= 2608) + : c <= 2611) + : (c <= 2614 || (c >= 2616 && c <= 2617))) + : (c <= 2652 || (c < 2693 + ? (c < 2674 + ? c == 2654 + : c <= 2676) + : (c <= 2701 || (c >= 2703 && c <= 2705))))))))))) + : (c <= 2728 || (c < 3242 + ? (c < 2962 + ? (c < 2858 + ? (c < 2784 + ? (c < 2741 + ? (c < 2738 + ? (c >= 2730 && c <= 2736) + : c <= 2739) + : (c <= 2745 || (c < 2768 + ? c == 2749 + : c <= 2768))) + : (c <= 2785 || (c < 2831 + ? (c < 2821 + ? c == 2809 + : c <= 2828) + : (c <= 2832 || (c >= 2835 && c <= 2856))))) + : (c <= 2864 || (c < 2911 + ? (c < 2877 + ? (c < 2869 + ? (c >= 2866 && c <= 2867) + : c <= 2873) + : (c <= 2877 || (c >= 2908 && c <= 2909))) + : (c <= 2913 || (c < 2949 + ? (c < 2947 + ? c == 2929 + : c <= 2947) + : (c <= 2954 || (c >= 2958 && c <= 2960))))))) + : (c <= 2965 || (c < 3090 + ? (c < 2984 + ? (c < 2974 + ? (c < 2972 + ? (c >= 2969 && c <= 2970) + : c <= 2972) + : (c <= 2975 || (c >= 2979 && c <= 2980))) + : (c <= 2986 || (c < 3077 + ? (c < 3024 + ? (c >= 2990 && c <= 3001) + : c <= 3024) + : (c <= 3084 || (c >= 3086 && c <= 3088))))) + : (c <= 3112 || (c < 3168 + ? (c < 3160 + ? (c < 3133 + ? (c >= 3114 && c <= 3129) + : c <= 3133) + : (c <= 3162 || c == 3165)) + : (c <= 3169 || (c < 3214 + ? (c < 3205 + ? c == 3200 + : c <= 3212) + : (c <= 3216 || (c >= 3218 && c <= 3240))))))))) + : (c <= 3251 || (c < 3648 + ? (c < 3412 + ? (c < 3332 + ? (c < 3293 + ? (c < 3261 + ? (c >= 3253 && c <= 3257) + : c <= 3261) + : (c <= 3294 || (c < 3313 + ? (c >= 3296 && c <= 3297) + : c <= 3314))) + : (c <= 3340 || (c < 3389 + ? (c < 3346 + ? (c >= 3342 && c <= 3344) + : c <= 3386) + : (c <= 3389 || c == 3406)))) + : (c <= 3414 || (c < 3507 + ? (c < 3461 + ? (c < 3450 + ? (c >= 3423 && c <= 3425) + : c <= 3455) + : (c <= 3478 || (c >= 3482 && c <= 3505))) + : (c <= 3515 || (c < 3585 + ? (c < 3520 + ? c == 3517 + : c <= 3526) + : (c <= 3632 || c == 3634)))))) + : (c <= 3654 || (c < 3782 + ? (c < 3749 + ? (c < 3718 + ? (c < 3716 + ? (c >= 3713 && c <= 3714) + : c <= 3716) + : (c <= 3722 || (c >= 3724 && c <= 3747))) + : (c <= 3749 || (c < 3773 + ? (c < 3762 + ? (c >= 3751 && c <= 3760) + : c <= 3762) + : (c <= 3773 || (c >= 3776 && c <= 3780))))) + : (c <= 3782 || (c < 3976 + ? (c < 3904 + ? (c < 3840 + ? (c >= 3804 && c <= 3807) + : c <= 3840) + : (c <= 3911 || (c >= 3913 && c <= 3948))) + : (c <= 3980 || (c < 4176 + ? (c < 4159 + ? (c >= 4096 && c <= 4138) + : c <= 4159) + : (c <= 4181 || (c >= 4186 && c <= 4189))))))))))))) + : (c <= 4193 || (c < 8134 + ? (c < 6176 + ? (c < 4808 + ? (c < 4688 + ? (c < 4295 + ? (c < 4213 + ? (c < 4206 + ? (c >= 4197 && c <= 4198) + : c <= 4208) + : (c <= 4225 || (c < 4256 + ? c == 4238 + : c <= 4293))) + : (c <= 4295 || (c < 4348 + ? (c < 4304 + ? c == 4301 + : c <= 4346) + : (c <= 4680 || (c >= 4682 && c <= 4685))))) + : (c <= 4694 || (c < 4752 + ? (c < 4704 + ? (c < 4698 + ? c == 4696 + : c <= 4701) + : (c <= 4744 || (c >= 4746 && c <= 4749))) + : (c <= 4784 || (c < 4800 + ? (c < 4792 + ? (c >= 4786 && c <= 4789) + : c <= 4798) + : (c <= 4800 || (c >= 4802 && c <= 4805))))))) + : (c <= 4822 || (c < 5792 + ? (c < 5024 + ? (c < 4888 + ? (c < 4882 + ? (c >= 4824 && c <= 4880) + : c <= 4885) + : (c <= 4954 || (c >= 4992 && c <= 5007))) + : (c <= 5109 || (c < 5743 + ? (c < 5121 + ? (c >= 5112 && c <= 5117) + : c <= 5740) + : (c <= 5759 || (c >= 5761 && c <= 5786))))) + : (c <= 5866 || (c < 5984 + ? (c < 5919 + ? (c < 5888 + ? (c >= 5870 && c <= 5880) + : c <= 5905) + : (c <= 5937 || (c >= 5952 && c <= 5969))) + : (c <= 5996 || (c < 6103 + ? (c < 6016 + ? (c >= 5998 && c <= 6000) + : c <= 6067) + : (c <= 6103 || c == 6108)))))))) + : (c <= 6264 || (c < 7312 + ? (c < 6823 + ? (c < 6512 + ? (c < 6320 + ? (c < 6314 + ? (c >= 6272 && c <= 6312) + : c <= 6314) + : (c <= 6389 || (c < 6480 + ? (c >= 6400 && c <= 6430) + : c <= 6509))) + : (c <= 6516 || (c < 6656 + ? (c < 6576 + ? (c >= 6528 && c <= 6571) + : c <= 6601) + : (c <= 6678 || (c >= 6688 && c <= 6740))))) + : (c <= 6823 || (c < 7098 + ? (c < 7043 + ? (c < 6981 + ? (c >= 6917 && c <= 6963) + : c <= 6988) + : (c <= 7072 || (c >= 7086 && c <= 7087))) + : (c <= 7141 || (c < 7258 + ? (c < 7245 + ? (c >= 7168 && c <= 7203) + : c <= 7247) + : (c <= 7293 || (c >= 7296 && c <= 7304))))))) + : (c <= 7354 || (c < 8008 + ? (c < 7418 + ? (c < 7406 + ? (c < 7401 + ? (c >= 7357 && c <= 7359) + : c <= 7404) + : (c <= 7411 || (c >= 7413 && c <= 7414))) + : (c <= 7418 || (c < 7960 + ? (c < 7680 + ? (c >= 7424 && c <= 7615) + : c <= 7957) + : (c <= 7965 || (c >= 7968 && c <= 8005))))) + : (c <= 8013 || (c < 8031 + ? (c < 8027 + ? (c < 8025 + ? (c >= 8016 && c <= 8023) + : c <= 8025) + : (c <= 8027 || c == 8029)) + : (c <= 8061 || (c < 8126 + ? (c < 8118 + ? (c >= 8064 && c <= 8116) + : c <= 8124) + : (c <= 8126 || (c >= 8130 && c <= 8132))))))))))) + : (c <= 8140 || (c < 12337 + ? (c < 8544 + ? (c < 8458 + ? (c < 8305 + ? (c < 8160 + ? (c < 8150 + ? (c >= 8144 && c <= 8147) + : c <= 8155) + : (c <= 8172 || (c < 8182 + ? (c >= 8178 && c <= 8180) + : c <= 8188))) + : (c <= 8305 || (c < 8450 + ? (c < 8336 + ? c == 8319 + : c <= 8348) + : (c <= 8450 || c == 8455)))) + : (c <= 8467 || (c < 8488 + ? (c < 8484 + ? (c < 8472 + ? c == 8469 + : c <= 8477) + : (c <= 8484 || c == 8486)) + : (c <= 8488 || (c < 8517 + ? (c < 8508 + ? (c >= 8490 && c <= 8505) + : c <= 8511) + : (c <= 8521 || c == 8526)))))) + : (c <= 8584 || (c < 11680 + ? (c < 11559 + ? (c < 11506 + ? (c < 11499 + ? (c >= 11264 && c <= 11492) + : c <= 11502) + : (c <= 11507 || (c >= 11520 && c <= 11557))) + : (c <= 11559 || (c < 11631 + ? (c < 11568 + ? c == 11565 + : c <= 11623) + : (c <= 11631 || (c >= 11648 && c <= 11670))))) + : (c <= 11686 || (c < 11720 + ? (c < 11704 + ? (c < 11696 + ? (c >= 11688 && c <= 11694) + : c <= 11702) + : (c <= 11710 || (c >= 11712 && c <= 11718))) + : (c <= 11726 || (c < 12293 + ? (c < 11736 + ? (c >= 11728 && c <= 11734) + : c <= 11742) + : (c <= 12295 || (c >= 12321 && c <= 12329))))))))) + : (c <= 12341 || (c < 42891 + ? (c < 19968 + ? (c < 12549 + ? (c < 12445 + ? (c < 12353 + ? (c >= 12344 && c <= 12348) + : c <= 12438) + : (c <= 12447 || (c < 12540 + ? (c >= 12449 && c <= 12538) + : c <= 12543))) + : (c <= 12591 || (c < 12784 + ? (c < 12704 + ? (c >= 12593 && c <= 12686) + : c <= 12735) + : (c <= 12799 || (c >= 13312 && c <= 19903))))) + : (c <= 42124 || (c < 42560 + ? (c < 42512 + ? (c < 42240 + ? (c >= 42192 && c <= 42237) + : c <= 42508) + : (c <= 42527 || (c >= 42538 && c <= 42539))) + : (c <= 42606 || (c < 42775 + ? (c < 42656 + ? (c >= 42623 && c <= 42653) + : c <= 42735) + : (c <= 42783 || (c >= 42786 && c <= 42888))))))) + : (c <= 42954 || (c < 43250 + ? (c < 43011 + ? (c < 42965 + ? (c < 42963 + ? (c >= 42960 && c <= 42961) + : c <= 42963) + : (c <= 42969 || (c >= 42994 && c <= 43009))) + : (c <= 43013 || (c < 43072 + ? (c < 43020 + ? (c >= 43015 && c <= 43018) + : c <= 43042) + : (c <= 43123 || (c >= 43138 && c <= 43187))))) + : (c <= 43255 || (c < 43360 + ? (c < 43274 + ? (c < 43261 + ? c == 43259 + : c <= 43262) + : (c <= 43301 || (c >= 43312 && c <= 43334))) + : (c <= 43388 || (c < 43488 + ? (c < 43471 + ? (c >= 43396 && c <= 43442) + : c <= 43471) + : (c <= 43492 || (c >= 43494 && c <= 43503))))))))))))))) + : (c <= 43518 || (c < 70727 + ? (c < 66956 + ? (c < 64914 + ? (c < 43868 + ? (c < 43714 + ? (c < 43646 + ? (c < 43588 + ? (c < 43584 + ? (c >= 43520 && c <= 43560) + : c <= 43586) + : (c <= 43595 || (c < 43642 + ? (c >= 43616 && c <= 43638) + : c <= 43642))) + : (c <= 43695 || (c < 43705 + ? (c < 43701 + ? c == 43697 + : c <= 43702) + : (c <= 43709 || c == 43712)))) + : (c <= 43714 || (c < 43785 + ? (c < 43762 + ? (c < 43744 + ? (c >= 43739 && c <= 43741) + : c <= 43754) + : (c <= 43764 || (c >= 43777 && c <= 43782))) + : (c <= 43790 || (c < 43816 + ? (c < 43808 + ? (c >= 43793 && c <= 43798) + : c <= 43814) + : (c <= 43822 || (c >= 43824 && c <= 43866))))))) + : (c <= 43881 || (c < 64287 + ? (c < 63744 + ? (c < 55216 + ? (c < 44032 + ? (c >= 43888 && c <= 44002) + : c <= 55203) + : (c <= 55238 || (c >= 55243 && c <= 55291))) + : (c <= 64109 || (c < 64275 + ? (c < 64256 + ? (c >= 64112 && c <= 64217) + : c <= 64262) + : (c <= 64279 || c == 64285)))) + : (c <= 64296 || (c < 64323 + ? (c < 64318 + ? (c < 64312 + ? (c >= 64298 && c <= 64310) + : c <= 64316) + : (c <= 64318 || (c >= 64320 && c <= 64321))) + : (c <= 64324 || (c < 64612 + ? (c < 64467 + ? (c >= 64326 && c <= 64433) + : c <= 64605) + : (c <= 64829 || (c >= 64848 && c <= 64911))))))))) + : (c <= 64967 || (c < 65599 + ? (c < 65382 + ? (c < 65147 + ? (c < 65139 + ? (c < 65137 + ? (c >= 65008 && c <= 65017) + : c <= 65137) + : (c <= 65139 || (c < 65145 + ? c == 65143 + : c <= 65145))) + : (c <= 65147 || (c < 65313 + ? (c < 65151 + ? c == 65149 + : c <= 65276) + : (c <= 65338 || (c >= 65345 && c <= 65370))))) + : (c <= 65437 || (c < 65498 + ? (c < 65482 + ? (c < 65474 + ? (c >= 65440 && c <= 65470) + : c <= 65479) + : (c <= 65487 || (c >= 65490 && c <= 65495))) + : (c <= 65500 || (c < 65576 + ? (c < 65549 + ? (c >= 65536 && c <= 65547) + : c <= 65574) + : (c <= 65594 || (c >= 65596 && c <= 65597))))))) + : (c <= 65613 || (c < 66464 + ? (c < 66208 + ? (c < 65856 + ? (c < 65664 + ? (c >= 65616 && c <= 65629) + : c <= 65786) + : (c <= 65908 || (c >= 66176 && c <= 66204))) + : (c <= 66256 || (c < 66384 + ? (c < 66349 + ? (c >= 66304 && c <= 66335) + : c <= 66378) + : (c <= 66421 || (c >= 66432 && c <= 66461))))) + : (c <= 66499 || (c < 66776 + ? (c < 66560 + ? (c < 66513 + ? (c >= 66504 && c <= 66511) + : c <= 66517) + : (c <= 66717 || (c >= 66736 && c <= 66771))) + : (c <= 66811 || (c < 66928 + ? (c < 66864 + ? (c >= 66816 && c <= 66855) + : c <= 66915) + : (c <= 66938 || (c >= 66940 && c <= 66954))))))))))) + : (c <= 66962 || (c < 68864 + ? (c < 67828 + ? (c < 67506 + ? (c < 67072 + ? (c < 66979 + ? (c < 66967 + ? (c >= 66964 && c <= 66965) + : c <= 66977) + : (c <= 66993 || (c < 67003 + ? (c >= 66995 && c <= 67001) + : c <= 67004))) + : (c <= 67382 || (c < 67456 + ? (c < 67424 + ? (c >= 67392 && c <= 67413) + : c <= 67431) + : (c <= 67461 || (c >= 67463 && c <= 67504))))) + : (c <= 67514 || (c < 67644 + ? (c < 67594 + ? (c < 67592 + ? (c >= 67584 && c <= 67589) + : c <= 67592) + : (c <= 67637 || (c >= 67639 && c <= 67640))) + : (c <= 67644 || (c < 67712 + ? (c < 67680 + ? (c >= 67647 && c <= 67669) + : c <= 67702) + : (c <= 67742 || (c >= 67808 && c <= 67826))))))) + : (c <= 67829 || (c < 68224 + ? (c < 68096 + ? (c < 67968 + ? (c < 67872 + ? (c >= 67840 && c <= 67861) + : c <= 67897) + : (c <= 68023 || (c >= 68030 && c <= 68031))) + : (c <= 68096 || (c < 68121 + ? (c < 68117 + ? (c >= 68112 && c <= 68115) + : c <= 68119) + : (c <= 68149 || (c >= 68192 && c <= 68220))))) + : (c <= 68252 || (c < 68448 + ? (c < 68352 + ? (c < 68297 + ? (c >= 68288 && c <= 68295) + : c <= 68324) + : (c <= 68405 || (c >= 68416 && c <= 68437))) + : (c <= 68466 || (c < 68736 + ? (c < 68608 + ? (c >= 68480 && c <= 68497) + : c <= 68680) + : (c <= 68786 || (c >= 68800 && c <= 68850))))))))) + : (c <= 68899 || (c < 70106 + ? (c < 69749 + ? (c < 69488 + ? (c < 69376 + ? (c < 69296 + ? (c >= 69248 && c <= 69289) + : c <= 69297) + : (c <= 69404 || (c < 69424 + ? c == 69415 + : c <= 69445))) + : (c <= 69505 || (c < 69635 + ? (c < 69600 + ? (c >= 69552 && c <= 69572) + : c <= 69622) + : (c <= 69687 || (c >= 69745 && c <= 69746))))) + : (c <= 69749 || (c < 69959 + ? (c < 69891 + ? (c < 69840 + ? (c >= 69763 && c <= 69807) + : c <= 69864) + : (c <= 69926 || c == 69956)) + : (c <= 69959 || (c < 70019 + ? (c < 70006 + ? (c >= 69968 && c <= 70002) + : c <= 70006) + : (c <= 70066 || (c >= 70081 && c <= 70084))))))) + : (c <= 70106 || (c < 70405 + ? (c < 70280 + ? (c < 70163 + ? (c < 70144 + ? c == 70108 + : c <= 70161) + : (c <= 70187 || (c >= 70272 && c <= 70278))) + : (c <= 70280 || (c < 70303 + ? (c < 70287 + ? (c >= 70282 && c <= 70285) + : c <= 70301) + : (c <= 70312 || (c >= 70320 && c <= 70366))))) + : (c <= 70412 || (c < 70453 + ? (c < 70442 + ? (c < 70419 + ? (c >= 70415 && c <= 70416) + : c <= 70440) + : (c <= 70448 || (c >= 70450 && c <= 70451))) + : (c <= 70457 || (c < 70493 + ? (c < 70480 + ? c == 70461 + : c <= 70480) + : (c <= 70497 || (c >= 70656 && c <= 70708))))))))))))) + : (c <= 70730 || (c < 119894 + ? (c < 73056 + ? (c < 72001 + ? (c < 71424 + ? (c < 71128 + ? (c < 70852 + ? (c < 70784 + ? (c >= 70751 && c <= 70753) + : c <= 70831) + : (c <= 70853 || (c < 71040 + ? c == 70855 + : c <= 71086))) + : (c <= 71131 || (c < 71296 + ? (c < 71236 + ? (c >= 71168 && c <= 71215) + : c <= 71236) + : (c <= 71338 || c == 71352)))) + : (c <= 71450 || (c < 71945 + ? (c < 71840 + ? (c < 71680 + ? (c >= 71488 && c <= 71494) + : c <= 71723) + : (c <= 71903 || (c >= 71935 && c <= 71942))) + : (c <= 71945 || (c < 71960 + ? (c < 71957 + ? (c >= 71948 && c <= 71955) + : c <= 71958) + : (c <= 71983 || c == 71999)))))) + : (c <= 72001 || (c < 72349 + ? (c < 72192 + ? (c < 72161 + ? (c < 72106 + ? (c >= 72096 && c <= 72103) + : c <= 72144) + : (c <= 72161 || c == 72163)) + : (c <= 72192 || (c < 72272 + ? (c < 72250 + ? (c >= 72203 && c <= 72242) + : c <= 72250) + : (c <= 72272 || (c >= 72284 && c <= 72329))))) + : (c <= 72349 || (c < 72818 + ? (c < 72714 + ? (c < 72704 + ? (c >= 72368 && c <= 72440) + : c <= 72712) + : (c <= 72750 || c == 72768)) + : (c <= 72847 || (c < 72971 + ? (c < 72968 + ? (c >= 72960 && c <= 72966) + : c <= 72969) + : (c <= 73008 || c == 73030)))))))) + : (c <= 73061 || (c < 93952 + ? (c < 82944 + ? (c < 73728 + ? (c < 73112 + ? (c < 73066 + ? (c >= 73063 && c <= 73064) + : c <= 73097) + : (c <= 73112 || (c < 73648 + ? (c >= 73440 && c <= 73458) + : c <= 73648))) + : (c <= 74649 || (c < 77712 + ? (c < 74880 + ? (c >= 74752 && c <= 74862) + : c <= 75075) + : (c <= 77808 || (c >= 77824 && c <= 78894))))) + : (c <= 83526 || (c < 92928 + ? (c < 92784 + ? (c < 92736 + ? (c >= 92160 && c <= 92728) + : c <= 92766) + : (c <= 92862 || (c >= 92880 && c <= 92909))) + : (c <= 92975 || (c < 93053 + ? (c < 93027 + ? (c >= 92992 && c <= 92995) + : c <= 93047) + : (c <= 93071 || (c >= 93760 && c <= 93823))))))) + : (c <= 94026 || (c < 110589 + ? (c < 94208 + ? (c < 94176 + ? (c < 94099 + ? c == 94032 + : c <= 94111) + : (c <= 94177 || c == 94179)) + : (c <= 100343 || (c < 110576 + ? (c < 101632 + ? (c >= 100352 && c <= 101589) + : c <= 101640) + : (c <= 110579 || (c >= 110581 && c <= 110587))))) + : (c <= 110590 || (c < 113664 + ? (c < 110948 + ? (c < 110928 + ? (c >= 110592 && c <= 110882) + : c <= 110930) + : (c <= 110951 || (c >= 110960 && c <= 111355))) + : (c <= 113770 || (c < 113808 + ? (c < 113792 + ? (c >= 113776 && c <= 113788) + : c <= 113800) + : (c <= 113817 || (c >= 119808 && c <= 119892))))))))))) + : (c <= 119964 || (c < 125259 + ? (c < 120572 + ? (c < 120086 + ? (c < 119995 + ? (c < 119973 + ? (c < 119970 + ? (c >= 119966 && c <= 119967) + : c <= 119970) + : (c <= 119974 || (c < 119982 + ? (c >= 119977 && c <= 119980) + : c <= 119993))) + : (c <= 119995 || (c < 120071 + ? (c < 120005 + ? (c >= 119997 && c <= 120003) + : c <= 120069) + : (c <= 120074 || (c >= 120077 && c <= 120084))))) + : (c <= 120092 || (c < 120138 + ? (c < 120128 + ? (c < 120123 + ? (c >= 120094 && c <= 120121) + : c <= 120126) + : (c <= 120132 || c == 120134)) + : (c <= 120144 || (c < 120514 + ? (c < 120488 + ? (c >= 120146 && c <= 120485) + : c <= 120512) + : (c <= 120538 || (c >= 120540 && c <= 120570))))))) + : (c <= 120596 || (c < 123191 + ? (c < 120714 + ? (c < 120656 + ? (c < 120630 + ? (c >= 120598 && c <= 120628) + : c <= 120654) + : (c <= 120686 || (c >= 120688 && c <= 120712))) + : (c <= 120744 || (c < 122624 + ? (c < 120772 + ? (c >= 120746 && c <= 120770) + : c <= 120779) + : (c <= 122654 || (c >= 123136 && c <= 123180))))) + : (c <= 123197 || (c < 124904 + ? (c < 123584 + ? (c < 123536 + ? c == 123214 + : c <= 123565) + : (c <= 123627 || (c >= 124896 && c <= 124902))) + : (c <= 124907 || (c < 124928 + ? (c < 124912 + ? (c >= 124909 && c <= 124910) + : c <= 124926) + : (c <= 125124 || (c >= 125184 && c <= 125251))))))))) + : (c <= 125259 || (c < 126559 + ? (c < 126535 + ? (c < 126505 + ? (c < 126497 + ? (c < 126469 + ? (c >= 126464 && c <= 126467) + : c <= 126495) + : (c <= 126498 || (c < 126503 + ? c == 126500 + : c <= 126503))) + : (c <= 126514 || (c < 126523 + ? (c < 126521 + ? (c >= 126516 && c <= 126519) + : c <= 126521) + : (c <= 126523 || c == 126530)))) + : (c <= 126535 || (c < 126548 + ? (c < 126541 + ? (c < 126539 + ? c == 126537 + : c <= 126539) + : (c <= 126543 || (c >= 126545 && c <= 126546))) + : (c <= 126548 || (c < 126555 + ? (c < 126553 + ? c == 126551 + : c <= 126553) + : (c <= 126555 || c == 126557)))))) + : (c <= 126559 || (c < 126625 + ? (c < 126580 + ? (c < 126567 + ? (c < 126564 + ? (c >= 126561 && c <= 126562) + : c <= 126564) + : (c <= 126570 || (c >= 126572 && c <= 126578))) + : (c <= 126583 || (c < 126592 + ? (c < 126590 + ? (c >= 126585 && c <= 126588) + : c <= 126590) + : (c <= 126601 || (c >= 126603 && c <= 126619))))) + : (c <= 126627 || (c < 177984 + ? (c < 131072 + ? (c < 126635 + ? (c >= 126629 && c <= 126633) + : c <= 126651) + : (c <= 173791 || (c >= 173824 && c <= 177976))) + : (c <= 178205 || (c < 194560 + ? (c < 183984 + ? (c >= 178208 && c <= 183969) + : c <= 191456) + : (c <= 195101 || (c >= 196608 && c <= 201546))))))))))))))))); +} + +static inline bool sym_identifier_character_set_3(int32_t c) { + return (c < 43616 + ? (c < 3782 + ? (c < 2748 + ? (c < 2045 + ? (c < 1015 + ? (c < 710 + ? (c < 181 + ? (c < '_' + ? (c < 'A' + ? (c >= '0' && c <= '9') + : c <= 'Z') + : (c <= '_' || (c < 170 + ? (c >= 'a' && c <= 'z') + : c <= 170))) + : (c <= 181 || (c < 192 + ? (c < 186 + ? c == 183 + : c <= 186) + : (c <= 214 || (c < 248 + ? (c >= 216 && c <= 246) + : c <= 705))))) + : (c <= 721 || (c < 891 + ? (c < 750 + ? (c < 748 + ? (c >= 736 && c <= 740) + : c <= 748) + : (c <= 750 || (c < 886 + ? (c >= 768 && c <= 884) + : c <= 887))) + : (c <= 893 || (c < 908 + ? (c < 902 + ? c == 895 + : c <= 906) + : (c <= 908 || (c < 931 + ? (c >= 910 && c <= 929) + : c <= 1013))))))) + : (c <= 1153 || (c < 1519 + ? (c < 1425 + ? (c < 1329 + ? (c < 1162 + ? (c >= 1155 && c <= 1159) + : c <= 1327) + : (c <= 1366 || (c < 1376 + ? c == 1369 + : c <= 1416))) + : (c <= 1469 || (c < 1476 + ? (c < 1473 + ? c == 1471 + : c <= 1474) + : (c <= 1477 || (c < 1488 + ? c == 1479 + : c <= 1514))))) + : (c <= 1522 || (c < 1770 + ? (c < 1646 + ? (c < 1568 + ? (c >= 1552 && c <= 1562) + : c <= 1641) + : (c <= 1747 || (c < 1759 + ? (c >= 1749 && c <= 1756) + : c <= 1768))) + : (c <= 1788 || (c < 1869 + ? (c < 1808 + ? c == 1791 + : c <= 1866) + : (c <= 1969 || (c < 2042 + ? (c >= 1984 && c <= 2037) + : c <= 2042))))))))) + : (c <= 2045 || (c < 2558 + ? (c < 2451 + ? (c < 2200 + ? (c < 2144 + ? (c < 2112 + ? (c >= 2048 && c <= 2093) + : c <= 2139) + : (c <= 2154 || (c < 2185 + ? (c >= 2160 && c <= 2183) + : c <= 2190))) + : (c <= 2273 || (c < 2417 + ? (c < 2406 + ? (c >= 2275 && c <= 2403) + : c <= 2415) + : (c <= 2435 || (c < 2447 + ? (c >= 2437 && c <= 2444) + : c <= 2448))))) + : (c <= 2472 || (c < 2507 + ? (c < 2486 + ? (c < 2482 + ? (c >= 2474 && c <= 2480) + : c <= 2482) + : (c <= 2489 || (c < 2503 + ? (c >= 2492 && c <= 2500) + : c <= 2504))) + : (c <= 2510 || (c < 2527 + ? (c < 2524 + ? c == 2519 + : c <= 2525) + : (c <= 2531 || (c < 2556 + ? (c >= 2534 && c <= 2545) + : c <= 2556))))))) + : (c <= 2558 || (c < 2635 + ? (c < 2610 + ? (c < 2575 + ? (c < 2565 + ? (c >= 2561 && c <= 2563) + : c <= 2570) + : (c <= 2576 || (c < 2602 + ? (c >= 2579 && c <= 2600) + : c <= 2608))) + : (c <= 2611 || (c < 2620 + ? (c < 2616 + ? (c >= 2613 && c <= 2614) + : c <= 2617) + : (c <= 2620 || (c < 2631 + ? (c >= 2622 && c <= 2626) + : c <= 2632))))) + : (c <= 2637 || (c < 2693 + ? (c < 2654 + ? (c < 2649 + ? c == 2641 + : c <= 2652) + : (c <= 2654 || (c < 2689 + ? (c >= 2662 && c <= 2677) + : c <= 2691))) + : (c <= 2701 || (c < 2730 + ? (c < 2707 + ? (c >= 2703 && c <= 2705) + : c <= 2728) + : (c <= 2736 || (c < 2741 + ? (c >= 2738 && c <= 2739) + : c <= 2745))))))))))) + : (c <= 2757 || (c < 3168 + ? (c < 2958 + ? (c < 2866 + ? (c < 2809 + ? (c < 2768 + ? (c < 2763 + ? (c >= 2759 && c <= 2761) + : c <= 2765) + : (c <= 2768 || (c < 2790 + ? (c >= 2784 && c <= 2787) + : c <= 2799))) + : (c <= 2815 || (c < 2831 + ? (c < 2821 + ? (c >= 2817 && c <= 2819) + : c <= 2828) + : (c <= 2832 || (c < 2858 + ? (c >= 2835 && c <= 2856) + : c <= 2864))))) + : (c <= 2867 || (c < 2908 + ? (c < 2887 + ? (c < 2876 + ? (c >= 2869 && c <= 2873) + : c <= 2884) + : (c <= 2888 || (c < 2901 + ? (c >= 2891 && c <= 2893) + : c <= 2903))) + : (c <= 2909 || (c < 2929 + ? (c < 2918 + ? (c >= 2911 && c <= 2915) + : c <= 2927) + : (c <= 2929 || (c < 2949 + ? (c >= 2946 && c <= 2947) + : c <= 2954))))))) + : (c <= 2960 || (c < 3031 + ? (c < 2984 + ? (c < 2972 + ? (c < 2969 + ? (c >= 2962 && c <= 2965) + : c <= 2970) + : (c <= 2972 || (c < 2979 + ? (c >= 2974 && c <= 2975) + : c <= 2980))) + : (c <= 2986 || (c < 3014 + ? (c < 3006 + ? (c >= 2990 && c <= 3001) + : c <= 3010) + : (c <= 3016 || (c < 3024 + ? (c >= 3018 && c <= 3021) + : c <= 3024))))) + : (c <= 3031 || (c < 3132 + ? (c < 3086 + ? (c < 3072 + ? (c >= 3046 && c <= 3055) + : c <= 3084) + : (c <= 3088 || (c < 3114 + ? (c >= 3090 && c <= 3112) + : c <= 3129))) + : (c <= 3140 || (c < 3157 + ? (c < 3146 + ? (c >= 3142 && c <= 3144) + : c <= 3149) + : (c <= 3158 || (c < 3165 + ? (c >= 3160 && c <= 3162) + : c <= 3165))))))))) + : (c <= 3171 || (c < 3450 + ? (c < 3293 + ? (c < 3242 + ? (c < 3205 + ? (c < 3200 + ? (c >= 3174 && c <= 3183) + : c <= 3203) + : (c <= 3212 || (c < 3218 + ? (c >= 3214 && c <= 3216) + : c <= 3240))) + : (c <= 3251 || (c < 3270 + ? (c < 3260 + ? (c >= 3253 && c <= 3257) + : c <= 3268) + : (c <= 3272 || (c < 3285 + ? (c >= 3274 && c <= 3277) + : c <= 3286))))) + : (c <= 3294 || (c < 3346 + ? (c < 3313 + ? (c < 3302 + ? (c >= 3296 && c <= 3299) + : c <= 3311) + : (c <= 3314 || (c < 3342 + ? (c >= 3328 && c <= 3340) + : c <= 3344))) + : (c <= 3396 || (c < 3412 + ? (c < 3402 + ? (c >= 3398 && c <= 3400) + : c <= 3406) + : (c <= 3415 || (c < 3430 + ? (c >= 3423 && c <= 3427) + : c <= 3439))))))) + : (c <= 3455 || (c < 3570 + ? (c < 3520 + ? (c < 3482 + ? (c < 3461 + ? (c >= 3457 && c <= 3459) + : c <= 3478) + : (c <= 3505 || (c < 3517 + ? (c >= 3507 && c <= 3515) + : c <= 3517))) + : (c <= 3526 || (c < 3542 + ? (c < 3535 + ? c == 3530 + : c <= 3540) + : (c <= 3542 || (c < 3558 + ? (c >= 3544 && c <= 3551) + : c <= 3567))))) + : (c <= 3571 || (c < 3718 + ? (c < 3664 + ? (c < 3648 + ? (c >= 3585 && c <= 3642) + : c <= 3662) + : (c <= 3673 || (c < 3716 + ? (c >= 3713 && c <= 3714) + : c <= 3716))) + : (c <= 3722 || (c < 3751 + ? (c < 3749 + ? (c >= 3724 && c <= 3747) + : c <= 3749) + : (c <= 3773 || (c >= 3776 && c <= 3780))))))))))))) + : (c <= 3782 || (c < 8025 + ? (c < 5888 + ? (c < 4688 + ? (c < 3953 + ? (c < 3872 + ? (c < 3804 + ? (c < 3792 + ? (c >= 3784 && c <= 3789) + : c <= 3801) + : (c <= 3807 || (c < 3864 + ? c == 3840 + : c <= 3865))) + : (c <= 3881 || (c < 3897 + ? (c < 3895 + ? c == 3893 + : c <= 3895) + : (c <= 3897 || (c < 3913 + ? (c >= 3902 && c <= 3911) + : c <= 3948))))) + : (c <= 3972 || (c < 4256 + ? (c < 4038 + ? (c < 3993 + ? (c >= 3974 && c <= 3991) + : c <= 4028) + : (c <= 4038 || (c < 4176 + ? (c >= 4096 && c <= 4169) + : c <= 4253))) + : (c <= 4293 || (c < 4304 + ? (c < 4301 + ? c == 4295 + : c <= 4301) + : (c <= 4346 || (c < 4682 + ? (c >= 4348 && c <= 4680) + : c <= 4685))))))) + : (c <= 4694 || (c < 4882 + ? (c < 4786 + ? (c < 4704 + ? (c < 4698 + ? c == 4696 + : c <= 4701) + : (c <= 4744 || (c < 4752 + ? (c >= 4746 && c <= 4749) + : c <= 4784))) + : (c <= 4789 || (c < 4802 + ? (c < 4800 + ? (c >= 4792 && c <= 4798) + : c <= 4800) + : (c <= 4805 || (c < 4824 + ? (c >= 4808 && c <= 4822) + : c <= 4880))))) + : (c <= 4885 || (c < 5112 + ? (c < 4969 + ? (c < 4957 + ? (c >= 4888 && c <= 4954) + : c <= 4959) + : (c <= 4977 || (c < 5024 + ? (c >= 4992 && c <= 5007) + : c <= 5109))) + : (c <= 5117 || (c < 5761 + ? (c < 5743 + ? (c >= 5121 && c <= 5740) + : c <= 5759) + : (c <= 5786 || (c < 5870 + ? (c >= 5792 && c <= 5866) + : c <= 5880))))))))) + : (c <= 5909 || (c < 6688 + ? (c < 6176 + ? (c < 6016 + ? (c < 5984 + ? (c < 5952 + ? (c >= 5919 && c <= 5940) + : c <= 5971) + : (c <= 5996 || (c < 6002 + ? (c >= 5998 && c <= 6000) + : c <= 6003))) + : (c <= 6099 || (c < 6112 + ? (c < 6108 + ? c == 6103 + : c <= 6109) + : (c <= 6121 || (c < 6159 + ? (c >= 6155 && c <= 6157) + : c <= 6169))))) + : (c <= 6264 || (c < 6470 + ? (c < 6400 + ? (c < 6320 + ? (c >= 6272 && c <= 6314) + : c <= 6389) + : (c <= 6430 || (c < 6448 + ? (c >= 6432 && c <= 6443) + : c <= 6459))) + : (c <= 6509 || (c < 6576 + ? (c < 6528 + ? (c >= 6512 && c <= 6516) + : c <= 6571) + : (c <= 6601 || (c < 6656 + ? (c >= 6608 && c <= 6618) + : c <= 6683))))))) + : (c <= 6750 || (c < 7232 + ? (c < 6847 + ? (c < 6800 + ? (c < 6783 + ? (c >= 6752 && c <= 6780) + : c <= 6793) + : (c <= 6809 || (c < 6832 + ? c == 6823 + : c <= 6845))) + : (c <= 6862 || (c < 7019 + ? (c < 6992 + ? (c >= 6912 && c <= 6988) + : c <= 7001) + : (c <= 7027 || (c < 7168 + ? (c >= 7040 && c <= 7155) + : c <= 7223))))) + : (c <= 7241 || (c < 7380 + ? (c < 7312 + ? (c < 7296 + ? (c >= 7245 && c <= 7293) + : c <= 7304) + : (c <= 7354 || (c < 7376 + ? (c >= 7357 && c <= 7359) + : c <= 7378))) + : (c <= 7418 || (c < 7968 + ? (c < 7960 + ? (c >= 7424 && c <= 7957) + : c <= 7965) + : (c <= 8005 || (c < 8016 + ? (c >= 8008 && c <= 8013) + : c <= 8023))))))))))) + : (c <= 8025 || (c < 11720 + ? (c < 8458 + ? (c < 8178 + ? (c < 8126 + ? (c < 8031 + ? (c < 8029 + ? c == 8027 + : c <= 8029) + : (c <= 8061 || (c < 8118 + ? (c >= 8064 && c <= 8116) + : c <= 8124))) + : (c <= 8126 || (c < 8144 + ? (c < 8134 + ? (c >= 8130 && c <= 8132) + : c <= 8140) + : (c <= 8147 || (c < 8160 + ? (c >= 8150 && c <= 8155) + : c <= 8172))))) + : (c <= 8180 || (c < 8336 + ? (c < 8276 + ? (c < 8255 + ? (c >= 8182 && c <= 8188) + : c <= 8256) + : (c <= 8276 || (c < 8319 + ? c == 8305 + : c <= 8319))) + : (c <= 8348 || (c < 8421 + ? (c < 8417 + ? (c >= 8400 && c <= 8412) + : c <= 8417) + : (c <= 8432 || (c < 8455 + ? c == 8450 + : c <= 8455))))))) + : (c <= 8467 || (c < 11499 + ? (c < 8490 + ? (c < 8484 + ? (c < 8472 + ? c == 8469 + : c <= 8477) + : (c <= 8484 || (c < 8488 + ? c == 8486 + : c <= 8488))) + : (c <= 8505 || (c < 8526 + ? (c < 8517 + ? (c >= 8508 && c <= 8511) + : c <= 8521) + : (c <= 8526 || (c < 11264 + ? (c >= 8544 && c <= 8584) + : c <= 11492))))) + : (c <= 11507 || (c < 11647 + ? (c < 11565 + ? (c < 11559 + ? (c >= 11520 && c <= 11557) + : c <= 11559) + : (c <= 11565 || (c < 11631 + ? (c >= 11568 && c <= 11623) + : c <= 11631))) + : (c <= 11670 || (c < 11696 + ? (c < 11688 + ? (c >= 11680 && c <= 11686) + : c <= 11694) + : (c <= 11702 || (c < 11712 + ? (c >= 11704 && c <= 11710) + : c <= 11718))))))))) + : (c <= 11726 || (c < 42623 + ? (c < 12540 + ? (c < 12337 + ? (c < 11744 + ? (c < 11736 + ? (c >= 11728 && c <= 11734) + : c <= 11742) + : (c <= 11775 || (c < 12321 + ? (c >= 12293 && c <= 12295) + : c <= 12335))) + : (c <= 12341 || (c < 12441 + ? (c < 12353 + ? (c >= 12344 && c <= 12348) + : c <= 12438) + : (c <= 12442 || (c < 12449 + ? (c >= 12445 && c <= 12447) + : c <= 12538))))) + : (c <= 12543 || (c < 19968 + ? (c < 12704 + ? (c < 12593 + ? (c >= 12549 && c <= 12591) + : c <= 12686) + : (c <= 12735 || (c < 13312 + ? (c >= 12784 && c <= 12799) + : c <= 19903))) + : (c <= 42124 || (c < 42512 + ? (c < 42240 + ? (c >= 42192 && c <= 42237) + : c <= 42508) + : (c <= 42539 || (c < 42612 + ? (c >= 42560 && c <= 42607) + : c <= 42621))))))) + : (c <= 42737 || (c < 43232 + ? (c < 42965 + ? (c < 42891 + ? (c < 42786 + ? (c >= 42775 && c <= 42783) + : c <= 42888) + : (c <= 42954 || (c < 42963 + ? (c >= 42960 && c <= 42961) + : c <= 42963))) + : (c <= 42969 || (c < 43072 + ? (c < 43052 + ? (c >= 42994 && c <= 43047) + : c <= 43052) + : (c <= 43123 || (c < 43216 + ? (c >= 43136 && c <= 43205) + : c <= 43225))))) + : (c <= 43255 || (c < 43471 + ? (c < 43312 + ? (c < 43261 + ? c == 43259 + : c <= 43309) + : (c <= 43347 || (c < 43392 + ? (c >= 43360 && c <= 43388) + : c <= 43456))) + : (c <= 43481 || (c < 43584 + ? (c < 43520 + ? (c >= 43488 && c <= 43518) + : c <= 43574) + : (c <= 43597 || (c >= 43600 && c <= 43609))))))))))))))) + : (c <= 43638 || (c < 71453 + ? (c < 67639 + ? (c < 65345 + ? (c < 64312 + ? (c < 43888 + ? (c < 43785 + ? (c < 43744 + ? (c < 43739 + ? (c >= 43642 && c <= 43714) + : c <= 43741) + : (c <= 43759 || (c < 43777 + ? (c >= 43762 && c <= 43766) + : c <= 43782))) + : (c <= 43790 || (c < 43816 + ? (c < 43808 + ? (c >= 43793 && c <= 43798) + : c <= 43814) + : (c <= 43822 || (c < 43868 + ? (c >= 43824 && c <= 43866) + : c <= 43881))))) + : (c <= 44010 || (c < 63744 + ? (c < 44032 + ? (c < 44016 + ? (c >= 44012 && c <= 44013) + : c <= 44025) + : (c <= 55203 || (c < 55243 + ? (c >= 55216 && c <= 55238) + : c <= 55291))) + : (c <= 64109 || (c < 64275 + ? (c < 64256 + ? (c >= 64112 && c <= 64217) + : c <= 64262) + : (c <= 64279 || (c < 64298 + ? (c >= 64285 && c <= 64296) + : c <= 64310))))))) + : (c <= 64316 || (c < 65075 + ? (c < 64612 + ? (c < 64323 + ? (c < 64320 + ? c == 64318 + : c <= 64321) + : (c <= 64324 || (c < 64467 + ? (c >= 64326 && c <= 64433) + : c <= 64605))) + : (c <= 64829 || (c < 65008 + ? (c < 64914 + ? (c >= 64848 && c <= 64911) + : c <= 64967) + : (c <= 65017 || (c < 65056 + ? (c >= 65024 && c <= 65039) + : c <= 65071))))) + : (c <= 65076 || (c < 65147 + ? (c < 65139 + ? (c < 65137 + ? (c >= 65101 && c <= 65103) + : c <= 65137) + : (c <= 65139 || (c < 65145 + ? c == 65143 + : c <= 65145))) + : (c <= 65147 || (c < 65296 + ? (c < 65151 + ? c == 65149 + : c <= 65276) + : (c <= 65305 || (c < 65343 + ? (c >= 65313 && c <= 65338) + : c <= 65343))))))))) + : (c <= 65370 || (c < 66513 + ? (c < 65664 + ? (c < 65536 + ? (c < 65482 + ? (c < 65474 + ? (c >= 65382 && c <= 65470) + : c <= 65479) + : (c <= 65487 || (c < 65498 + ? (c >= 65490 && c <= 65495) + : c <= 65500))) + : (c <= 65547 || (c < 65596 + ? (c < 65576 + ? (c >= 65549 && c <= 65574) + : c <= 65594) + : (c <= 65597 || (c < 65616 + ? (c >= 65599 && c <= 65613) + : c <= 65629))))) + : (c <= 65786 || (c < 66304 + ? (c < 66176 + ? (c < 66045 + ? (c >= 65856 && c <= 65908) + : c <= 66045) + : (c <= 66204 || (c < 66272 + ? (c >= 66208 && c <= 66256) + : c <= 66272))) + : (c <= 66335 || (c < 66432 + ? (c < 66384 + ? (c >= 66349 && c <= 66378) + : c <= 66426) + : (c <= 66461 || (c < 66504 + ? (c >= 66464 && c <= 66499) + : c <= 66511))))))) + : (c <= 66517 || (c < 66979 + ? (c < 66864 + ? (c < 66736 + ? (c < 66720 + ? (c >= 66560 && c <= 66717) + : c <= 66729) + : (c <= 66771 || (c < 66816 + ? (c >= 66776 && c <= 66811) + : c <= 66855))) + : (c <= 66915 || (c < 66956 + ? (c < 66940 + ? (c >= 66928 && c <= 66938) + : c <= 66954) + : (c <= 66962 || (c < 66967 + ? (c >= 66964 && c <= 66965) + : c <= 66977))))) + : (c <= 66993 || (c < 67456 + ? (c < 67072 + ? (c < 67003 + ? (c >= 66995 && c <= 67001) + : c <= 67004) + : (c <= 67382 || (c < 67424 + ? (c >= 67392 && c <= 67413) + : c <= 67431))) + : (c <= 67461 || (c < 67584 + ? (c < 67506 + ? (c >= 67463 && c <= 67504) + : c <= 67514) + : (c <= 67589 || (c < 67594 + ? c == 67592 + : c <= 67637))))))))))) + : (c <= 67640 || (c < 69956 + ? (c < 68448 + ? (c < 68101 + ? (c < 67828 + ? (c < 67680 + ? (c < 67647 + ? c == 67644 + : c <= 67669) + : (c <= 67702 || (c < 67808 + ? (c >= 67712 && c <= 67742) + : c <= 67826))) + : (c <= 67829 || (c < 67968 + ? (c < 67872 + ? (c >= 67840 && c <= 67861) + : c <= 67897) + : (c <= 68023 || (c < 68096 + ? (c >= 68030 && c <= 68031) + : c <= 68099))))) + : (c <= 68102 || (c < 68192 + ? (c < 68121 + ? (c < 68117 + ? (c >= 68108 && c <= 68115) + : c <= 68119) + : (c <= 68149 || (c < 68159 + ? (c >= 68152 && c <= 68154) + : c <= 68159))) + : (c <= 68220 || (c < 68297 + ? (c < 68288 + ? (c >= 68224 && c <= 68252) + : c <= 68295) + : (c <= 68326 || (c < 68416 + ? (c >= 68352 && c <= 68405) + : c <= 68437))))))) + : (c <= 68466 || (c < 69424 + ? (c < 68912 + ? (c < 68736 + ? (c < 68608 + ? (c >= 68480 && c <= 68497) + : c <= 68680) + : (c <= 68786 || (c < 68864 + ? (c >= 68800 && c <= 68850) + : c <= 68903))) + : (c <= 68921 || (c < 69296 + ? (c < 69291 + ? (c >= 69248 && c <= 69289) + : c <= 69292) + : (c <= 69297 || (c < 69415 + ? (c >= 69376 && c <= 69404) + : c <= 69415))))) + : (c <= 69456 || (c < 69759 + ? (c < 69600 + ? (c < 69552 + ? (c >= 69488 && c <= 69509) + : c <= 69572) + : (c <= 69622 || (c < 69734 + ? (c >= 69632 && c <= 69702) + : c <= 69749))) + : (c <= 69818 || (c < 69872 + ? (c < 69840 + ? c == 69826 + : c <= 69864) + : (c <= 69881 || (c < 69942 + ? (c >= 69888 && c <= 69940) + : c <= 69951))))))))) + : (c <= 69959 || (c < 70459 + ? (c < 70282 + ? (c < 70108 + ? (c < 70016 + ? (c < 70006 + ? (c >= 69968 && c <= 70003) + : c <= 70006) + : (c <= 70084 || (c < 70094 + ? (c >= 70089 && c <= 70092) + : c <= 70106))) + : (c <= 70108 || (c < 70206 + ? (c < 70163 + ? (c >= 70144 && c <= 70161) + : c <= 70199) + : (c <= 70206 || (c < 70280 + ? (c >= 70272 && c <= 70278) + : c <= 70280))))) + : (c <= 70285 || (c < 70405 + ? (c < 70320 + ? (c < 70303 + ? (c >= 70287 && c <= 70301) + : c <= 70312) + : (c <= 70378 || (c < 70400 + ? (c >= 70384 && c <= 70393) + : c <= 70403))) + : (c <= 70412 || (c < 70442 + ? (c < 70419 + ? (c >= 70415 && c <= 70416) + : c <= 70440) + : (c <= 70448 || (c < 70453 + ? (c >= 70450 && c <= 70451) + : c <= 70457))))))) + : (c <= 70468 || (c < 70855 + ? (c < 70502 + ? (c < 70480 + ? (c < 70475 + ? (c >= 70471 && c <= 70472) + : c <= 70477) + : (c <= 70480 || (c < 70493 + ? c == 70487 + : c <= 70499))) + : (c <= 70508 || (c < 70736 + ? (c < 70656 + ? (c >= 70512 && c <= 70516) + : c <= 70730) + : (c <= 70745 || (c < 70784 + ? (c >= 70750 && c <= 70753) + : c <= 70853))))) + : (c <= 70855 || (c < 71236 + ? (c < 71096 + ? (c < 71040 + ? (c >= 70864 && c <= 70873) + : c <= 71093) + : (c <= 71104 || (c < 71168 + ? (c >= 71128 && c <= 71133) + : c <= 71232))) + : (c <= 71236 || (c < 71360 + ? (c < 71296 + ? (c >= 71248 && c <= 71257) + : c <= 71352) + : (c <= 71369 || (c >= 71424 && c <= 71450))))))))))))) + : (c <= 71467 || (c < 119973 + ? (c < 77824 + ? (c < 72760 + ? (c < 72016 + ? (c < 71945 + ? (c < 71680 + ? (c < 71488 + ? (c >= 71472 && c <= 71481) + : c <= 71494) + : (c <= 71738 || (c < 71935 + ? (c >= 71840 && c <= 71913) + : c <= 71942))) + : (c <= 71945 || (c < 71960 + ? (c < 71957 + ? (c >= 71948 && c <= 71955) + : c <= 71958) + : (c <= 71989 || (c < 71995 + ? (c >= 71991 && c <= 71992) + : c <= 72003))))) + : (c <= 72025 || (c < 72263 + ? (c < 72154 + ? (c < 72106 + ? (c >= 72096 && c <= 72103) + : c <= 72151) + : (c <= 72161 || (c < 72192 + ? (c >= 72163 && c <= 72164) + : c <= 72254))) + : (c <= 72263 || (c < 72368 + ? (c < 72349 + ? (c >= 72272 && c <= 72345) + : c <= 72349) + : (c <= 72440 || (c < 72714 + ? (c >= 72704 && c <= 72712) + : c <= 72758))))))) + : (c <= 72768 || (c < 73056 + ? (c < 72968 + ? (c < 72850 + ? (c < 72818 + ? (c >= 72784 && c <= 72793) + : c <= 72847) + : (c <= 72871 || (c < 72960 + ? (c >= 72873 && c <= 72886) + : c <= 72966))) + : (c <= 72969 || (c < 73020 + ? (c < 73018 + ? (c >= 72971 && c <= 73014) + : c <= 73018) + : (c <= 73021 || (c < 73040 + ? (c >= 73023 && c <= 73031) + : c <= 73049))))) + : (c <= 73061 || (c < 73440 + ? (c < 73104 + ? (c < 73066 + ? (c >= 73063 && c <= 73064) + : c <= 73102) + : (c <= 73105 || (c < 73120 + ? (c >= 73107 && c <= 73112) + : c <= 73129))) + : (c <= 73462 || (c < 74752 + ? (c < 73728 + ? c == 73648 + : c <= 74649) + : (c <= 74862 || (c < 77712 + ? (c >= 74880 && c <= 75075) + : c <= 77808))))))))) + : (c <= 78894 || (c < 110576 + ? (c < 93027 + ? (c < 92864 + ? (c < 92736 + ? (c < 92160 + ? (c >= 82944 && c <= 83526) + : c <= 92728) + : (c <= 92766 || (c < 92784 + ? (c >= 92768 && c <= 92777) + : c <= 92862))) + : (c <= 92873 || (c < 92928 + ? (c < 92912 + ? (c >= 92880 && c <= 92909) + : c <= 92916) + : (c <= 92982 || (c < 93008 + ? (c >= 92992 && c <= 92995) + : c <= 93017))))) + : (c <= 93047 || (c < 94176 + ? (c < 93952 + ? (c < 93760 + ? (c >= 93053 && c <= 93071) + : c <= 93823) + : (c <= 94026 || (c < 94095 + ? (c >= 94031 && c <= 94087) + : c <= 94111))) + : (c <= 94177 || (c < 94208 + ? (c < 94192 + ? (c >= 94179 && c <= 94180) + : c <= 94193) + : (c <= 100343 || (c < 101632 + ? (c >= 100352 && c <= 101589) + : c <= 101640))))))) + : (c <= 110579 || (c < 118528 + ? (c < 110960 + ? (c < 110592 + ? (c < 110589 + ? (c >= 110581 && c <= 110587) + : c <= 110590) + : (c <= 110882 || (c < 110948 + ? (c >= 110928 && c <= 110930) + : c <= 110951))) + : (c <= 111355 || (c < 113792 + ? (c < 113776 + ? (c >= 113664 && c <= 113770) + : c <= 113788) + : (c <= 113800 || (c < 113821 + ? (c >= 113808 && c <= 113817) + : c <= 113822))))) + : (c <= 118573 || (c < 119210 + ? (c < 119149 + ? (c < 119141 + ? (c >= 118576 && c <= 118598) + : c <= 119145) + : (c <= 119154 || (c < 119173 + ? (c >= 119163 && c <= 119170) + : c <= 119179))) + : (c <= 119213 || (c < 119894 + ? (c < 119808 + ? (c >= 119362 && c <= 119364) + : c <= 119892) + : (c <= 119964 || (c < 119970 + ? (c >= 119966 && c <= 119967) + : c <= 119970))))))))))) + : (c <= 119974 || (c < 124912 + ? (c < 120746 + ? (c < 120134 + ? (c < 120071 + ? (c < 119995 + ? (c < 119982 + ? (c >= 119977 && c <= 119980) + : c <= 119993) + : (c <= 119995 || (c < 120005 + ? (c >= 119997 && c <= 120003) + : c <= 120069))) + : (c <= 120074 || (c < 120094 + ? (c < 120086 + ? (c >= 120077 && c <= 120084) + : c <= 120092) + : (c <= 120121 || (c < 120128 + ? (c >= 120123 && c <= 120126) + : c <= 120132))))) + : (c <= 120134 || (c < 120572 + ? (c < 120488 + ? (c < 120146 + ? (c >= 120138 && c <= 120144) + : c <= 120485) + : (c <= 120512 || (c < 120540 + ? (c >= 120514 && c <= 120538) + : c <= 120570))) + : (c <= 120596 || (c < 120656 + ? (c < 120630 + ? (c >= 120598 && c <= 120628) + : c <= 120654) + : (c <= 120686 || (c < 120714 + ? (c >= 120688 && c <= 120712) + : c <= 120744))))))) + : (c <= 120770 || (c < 122907 + ? (c < 121476 + ? (c < 121344 + ? (c < 120782 + ? (c >= 120772 && c <= 120779) + : c <= 120831) + : (c <= 121398 || (c < 121461 + ? (c >= 121403 && c <= 121452) + : c <= 121461))) + : (c <= 121476 || (c < 122624 + ? (c < 121505 + ? (c >= 121499 && c <= 121503) + : c <= 121519) + : (c <= 122654 || (c < 122888 + ? (c >= 122880 && c <= 122886) + : c <= 122904))))) + : (c <= 122913 || (c < 123214 + ? (c < 123136 + ? (c < 122918 + ? (c >= 122915 && c <= 122916) + : c <= 122922) + : (c <= 123180 || (c < 123200 + ? (c >= 123184 && c <= 123197) + : c <= 123209))) + : (c <= 123214 || (c < 124896 + ? (c < 123584 + ? (c >= 123536 && c <= 123566) + : c <= 123641) + : (c <= 124902 || (c < 124909 + ? (c >= 124904 && c <= 124907) + : c <= 124910))))))))) + : (c <= 124926 || (c < 126557 + ? (c < 126521 + ? (c < 126469 + ? (c < 125184 + ? (c < 125136 + ? (c >= 124928 && c <= 125124) + : c <= 125142) + : (c <= 125259 || (c < 126464 + ? (c >= 125264 && c <= 125273) + : c <= 126467))) + : (c <= 126495 || (c < 126503 + ? (c < 126500 + ? (c >= 126497 && c <= 126498) + : c <= 126500) + : (c <= 126503 || (c < 126516 + ? (c >= 126505 && c <= 126514) + : c <= 126519))))) + : (c <= 126521 || (c < 126541 + ? (c < 126535 + ? (c < 126530 + ? c == 126523 + : c <= 126530) + : (c <= 126535 || (c < 126539 + ? c == 126537 + : c <= 126539))) + : (c <= 126543 || (c < 126551 + ? (c < 126548 + ? (c >= 126545 && c <= 126546) + : c <= 126548) + : (c <= 126551 || (c < 126555 + ? c == 126553 + : c <= 126555))))))) + : (c <= 126557 || (c < 126629 + ? (c < 126580 + ? (c < 126564 + ? (c < 126561 + ? c == 126559 + : c <= 126562) + : (c <= 126564 || (c < 126572 + ? (c >= 126567 && c <= 126570) + : c <= 126578))) + : (c <= 126583 || (c < 126592 + ? (c < 126590 + ? (c >= 126585 && c <= 126588) + : c <= 126590) + : (c <= 126601 || (c < 126625 + ? (c >= 126603 && c <= 126619) + : c <= 126627))))) + : (c <= 126633 || (c < 178208 + ? (c < 131072 + ? (c < 130032 + ? (c >= 126635 && c <= 126651) + : c <= 130041) + : (c <= 173791 || (c < 177984 + ? (c >= 173824 && c <= 177976) + : c <= 178205))) + : (c <= 183969 || (c < 196608 + ? (c < 194560 + ? (c >= 183984 && c <= 191456) + : c <= 195101) + : (c <= 201546 || (c >= 917760 && c <= 917999))))))))))))))))); +} + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(65); + if (lookahead == '!') ADVANCE(22); + if (lookahead == '#') ADVANCE(165); + if (lookahead == '%') ADVANCE(98); + if (lookahead == '&') ADVANCE(100); + if (lookahead == '(') ADVANCE(68); + if (lookahead == ')') ADVANCE(69); + if (lookahead == '*') ADVANCE(71); + if (lookahead == '+') ADVANCE(85); + if (lookahead == ',') ADVANCE(70); + if (lookahead == '-') ADVANCE(83); + if (lookahead == '.') ADVANCE(67); + if (lookahead == '/') ADVANCE(96); + if (lookahead == '0') ADVANCE(138); + if (lookahead == ':') ADVANCE(76); + if (lookahead == ';') ADVANCE(166); + if (lookahead == '<') ADVANCE(104); + if (lookahead == '=') ADVANCE(92); + if (lookahead == '>') ADVANCE(110); + if (lookahead == '@') ADVANCE(95); + if (lookahead == '[') ADVANCE(86); + if (lookahead == '\\') SKIP(54) + if (lookahead == ']') ADVANCE(87); + if (lookahead == '^') ADVANCE(101); + if (lookahead == 'e') ADVANCE(161); + if (lookahead == '{') ADVANCE(127); + if (lookahead == '|') ADVANCE(80); + if (lookahead == '}') ADVANCE(89); + if (lookahead == '~') ADVANCE(103); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(61) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(137); + if (sym_identifier_character_set_1(lookahead)) ADVANCE(164); + END_STATE(); + case 1: + if (lookahead == '\n') SKIP(16) + END_STATE(); + case 2: + if (lookahead == '\n') SKIP(16) + if (lookahead == '\r') SKIP(1) + END_STATE(); + case 3: + if (lookahead == '\n') SKIP(15) + END_STATE(); + case 4: + if (lookahead == '\n') SKIP(15) + if (lookahead == '\r') SKIP(3) + END_STATE(); + case 5: + if (lookahead == '\n') SKIP(19) + END_STATE(); + case 6: + if (lookahead == '\n') SKIP(19) + if (lookahead == '\r') SKIP(5) + END_STATE(); + case 7: + if (lookahead == '\n') ADVANCE(130); + END_STATE(); + case 8: + if (lookahead == '\n') SKIP(9) + if (lookahead == '#') ADVANCE(134); + if (lookahead == '\\') ADVANCE(132); + if (lookahead == '{') ADVANCE(127); + if (lookahead == '}') ADVANCE(89); + if (lookahead == '\t' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) ADVANCE(133); + if (lookahead != 0) ADVANCE(134); + END_STATE(); + case 9: + if (lookahead == '\n') SKIP(9) + if (lookahead == '#') ADVANCE(134); + if (lookahead == '\\') ADVANCE(132); + if (lookahead == '}') ADVANCE(89); + if (lookahead == '\t' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) ADVANCE(133); + if (lookahead != 0 && + lookahead != '{') ADVANCE(134); + END_STATE(); + case 10: + if (lookahead == '\n') SKIP(17) + END_STATE(); + case 11: + if (lookahead == '\n') SKIP(17) + if (lookahead == '\r') SKIP(10) + END_STATE(); + case 12: + if (lookahead == '\n') SKIP(14) + END_STATE(); + case 13: + if (lookahead == '\n') SKIP(14) + if (lookahead == '\r') SKIP(12) + END_STATE(); + case 14: + if (lookahead == '!') ADVANCE(22); + if (lookahead == '#') ADVANCE(165); + if (lookahead == '%') ADVANCE(98); + if (lookahead == '&') ADVANCE(100); + if (lookahead == '(') ADVANCE(68); + if (lookahead == ')') ADVANCE(69); + if (lookahead == '*') ADVANCE(71); + if (lookahead == '+') ADVANCE(85); + if (lookahead == ',') ADVANCE(70); + if (lookahead == '-') ADVANCE(82); + if (lookahead == '.') ADVANCE(66); + if (lookahead == '/') ADVANCE(96); + if (lookahead == ':') ADVANCE(76); + if (lookahead == ';') ADVANCE(166); + if (lookahead == '<') ADVANCE(104); + if (lookahead == '=') ADVANCE(92); + if (lookahead == '>') ADVANCE(110); + if (lookahead == '@') ADVANCE(95); + if (lookahead == '[') ADVANCE(86); + if (lookahead == '\\') SKIP(13) + if (lookahead == ']') ADVANCE(87); + if (lookahead == '^') ADVANCE(101); + if (lookahead == '|') ADVANCE(80); + if (lookahead == '}') ADVANCE(89); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(14) + if (sym_identifier_character_set_1(lookahead)) ADVANCE(164); + END_STATE(); + case 15: + if (lookahead == '!') ADVANCE(22); + if (lookahead == '#') ADVANCE(165); + if (lookahead == '%') ADVANCE(98); + if (lookahead == '&') ADVANCE(100); + if (lookahead == '(') ADVANCE(68); + if (lookahead == ')') ADVANCE(69); + if (lookahead == '*') ADVANCE(71); + if (lookahead == '+') ADVANCE(85); + if (lookahead == ',') ADVANCE(70); + if (lookahead == '-') ADVANCE(82); + if (lookahead == '.') ADVANCE(66); + if (lookahead == '/') ADVANCE(96); + if (lookahead == ':') ADVANCE(75); + if (lookahead == ';') ADVANCE(166); + if (lookahead == '<') ADVANCE(104); + if (lookahead == '=') ADVANCE(92); + if (lookahead == '>') ADVANCE(110); + if (lookahead == '@') ADVANCE(95); + if (lookahead == '[') ADVANCE(86); + if (lookahead == '\\') SKIP(4) + if (lookahead == ']') ADVANCE(87); + if (lookahead == '^') ADVANCE(101); + if (lookahead == '|') ADVANCE(80); + if (lookahead == '}') ADVANCE(89); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(15) + if (sym_identifier_character_set_1(lookahead)) ADVANCE(164); + END_STATE(); + case 16: + if (lookahead == '!') ADVANCE(22); + if (lookahead == '#') ADVANCE(165); + if (lookahead == '%') ADVANCE(23); + if (lookahead == '&') ADVANCE(24); + if (lookahead == '(') ADVANCE(68); + if (lookahead == ')') ADVANCE(69); + if (lookahead == '*') ADVANCE(71); + if (lookahead == '+') ADVANCE(85); + if (lookahead == ',') ADVANCE(70); + if (lookahead == '-') ADVANCE(82); + if (lookahead == '.') ADVANCE(20); + if (lookahead == '/') ADVANCE(97); + if (lookahead == '0') ADVANCE(138); + if (lookahead == ':') ADVANCE(75); + if (lookahead == '<') ADVANCE(105); + if (lookahead == '=') ADVANCE(92); + if (lookahead == '>') ADVANCE(111); + if (lookahead == '@') ADVANCE(25); + if (lookahead == '[') ADVANCE(86); + if (lookahead == '\\') SKIP(2) + if (lookahead == ']') ADVANCE(87); + if (lookahead == '^') ADVANCE(26); + if (lookahead == '{') ADVANCE(88); + if (lookahead == '|') ADVANCE(80); + if (lookahead == '}') ADVANCE(89); + if (lookahead == '~') ADVANCE(103); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(16) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(137); + if (sym_identifier_character_set_1(lookahead)) ADVANCE(164); + END_STATE(); + case 17: + if (lookahead == '#') ADVANCE(165); + if (lookahead == '-') ADVANCE(30); + if (lookahead == ':') ADVANCE(75); + if (lookahead == '\\') SKIP(11) + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(17) + END_STATE(); + case 18: + if (lookahead == '#') ADVANCE(165); + if (lookahead == '\\') ADVANCE(131); + if (lookahead == '{') ADVANCE(128); + if (lookahead == '}') ADVANCE(36); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(19) + END_STATE(); + case 19: + if (lookahead == '#') ADVANCE(165); + if (lookahead == '\\') SKIP(6) + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(19) + END_STATE(); + case 20: + if (lookahead == '.') ADVANCE(21); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(144); + END_STATE(); + case 21: + if (lookahead == '.') ADVANCE(126); + END_STATE(); + case 22: + if (lookahead == '=') ADVANCE(108); + if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); + END_STATE(); + case 23: + if (lookahead == '=') ADVANCE(119); + END_STATE(); + case 24: + if (lookahead == '=') ADVANCE(123); + END_STATE(); + case 25: + if (lookahead == '=') ADVANCE(117); + END_STATE(); + case 26: + if (lookahead == '=') ADVANCE(124); + END_STATE(); + case 27: + if (lookahead == '=') ADVANCE(118); + END_STATE(); + case 28: + if (lookahead == '=') ADVANCE(122); + END_STATE(); + case 29: + if (lookahead == '=') ADVANCE(121); + END_STATE(); + case 30: + if (lookahead == '>') ADVANCE(93); + END_STATE(); + case 31: + if (lookahead == '_') ADVANCE(38); + if (lookahead == '0' || + lookahead == '1') ADVANCE(140); + END_STATE(); + case 32: + if (lookahead == '_') ADVANCE(39); + if (('0' <= lookahead && lookahead <= '7')) ADVANCE(141); + END_STATE(); + case 33: + if (lookahead == '_') ADVANCE(43); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(142); + END_STATE(); + case 34: + if (lookahead == '{') ADVANCE(52); + END_STATE(); + case 35: + if (lookahead == '}') ADVANCE(130); + if (lookahead != 0) ADVANCE(35); + END_STATE(); + case 36: + if (lookahead == '}') ADVANCE(129); + END_STATE(); + case 37: + if (lookahead == '+' || + lookahead == '-') ADVANCE(40); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(145); + END_STATE(); + case 38: + if (lookahead == '0' || + lookahead == '1') ADVANCE(140); + END_STATE(); + case 39: + if (('0' <= lookahead && lookahead <= '7')) ADVANCE(141); + END_STATE(); + case 40: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(145); + END_STATE(); + case 41: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(130); + END_STATE(); + case 42: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(41); + END_STATE(); + case 43: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(142); + END_STATE(); + case 44: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(130); + END_STATE(); + case 45: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(44); + END_STATE(); + case 46: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(45); + END_STATE(); + case 47: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(46); + END_STATE(); + case 48: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(47); + END_STATE(); + case 49: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(48); + END_STATE(); + case 50: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(49); + END_STATE(); + case 51: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(50); + END_STATE(); + case 52: + if (lookahead != 0 && + lookahead != '}') ADVANCE(35); + END_STATE(); + case 53: + if (eof) ADVANCE(65); + if (lookahead == '\n') SKIP(61) + END_STATE(); + case 54: + if (eof) ADVANCE(65); + if (lookahead == '\n') SKIP(61) + if (lookahead == '\r') SKIP(53) + END_STATE(); + case 55: + if (eof) ADVANCE(65); + if (lookahead == '\n') SKIP(62) + END_STATE(); + case 56: + if (eof) ADVANCE(65); + if (lookahead == '\n') SKIP(62) + if (lookahead == '\r') SKIP(55) + END_STATE(); + case 57: + if (eof) ADVANCE(65); + if (lookahead == '\n') SKIP(63) + END_STATE(); + case 58: + if (eof) ADVANCE(65); + if (lookahead == '\n') SKIP(63) + if (lookahead == '\r') SKIP(57) + END_STATE(); + case 59: + if (eof) ADVANCE(65); + if (lookahead == '\n') SKIP(64) + END_STATE(); + case 60: + if (eof) ADVANCE(65); + if (lookahead == '\n') SKIP(64) + if (lookahead == '\r') SKIP(59) + END_STATE(); + case 61: + if (eof) ADVANCE(65); + if (lookahead == '!') ADVANCE(22); + if (lookahead == '#') ADVANCE(165); + if (lookahead == '%') ADVANCE(98); + if (lookahead == '&') ADVANCE(100); + if (lookahead == '(') ADVANCE(68); + if (lookahead == ')') ADVANCE(69); + if (lookahead == '*') ADVANCE(71); + if (lookahead == '+') ADVANCE(85); + if (lookahead == ',') ADVANCE(70); + if (lookahead == '-') ADVANCE(83); + if (lookahead == '.') ADVANCE(67); + if (lookahead == '/') ADVANCE(96); + if (lookahead == '0') ADVANCE(138); + if (lookahead == ':') ADVANCE(76); + if (lookahead == ';') ADVANCE(166); + if (lookahead == '<') ADVANCE(104); + if (lookahead == '=') ADVANCE(92); + if (lookahead == '>') ADVANCE(110); + if (lookahead == '@') ADVANCE(95); + if (lookahead == '[') ADVANCE(86); + if (lookahead == '\\') SKIP(54) + if (lookahead == ']') ADVANCE(87); + if (lookahead == '^') ADVANCE(101); + if (lookahead == 'e') ADVANCE(161); + if (lookahead == '{') ADVANCE(88); + if (lookahead == '|') ADVANCE(80); + if (lookahead == '}') ADVANCE(89); + if (lookahead == '~') ADVANCE(103); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(61) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(137); + if (sym_identifier_character_set_1(lookahead)) ADVANCE(164); + END_STATE(); + case 62: + if (eof) ADVANCE(65); + if (lookahead == '!') ADVANCE(22); + if (lookahead == '#') ADVANCE(165); + if (lookahead == '%') ADVANCE(98); + if (lookahead == '&') ADVANCE(100); + if (lookahead == '(') ADVANCE(68); + if (lookahead == ')') ADVANCE(69); + if (lookahead == '*') ADVANCE(71); + if (lookahead == '+') ADVANCE(85); + if (lookahead == ',') ADVANCE(70); + if (lookahead == '-') ADVANCE(82); + if (lookahead == '.') ADVANCE(67); + if (lookahead == '/') ADVANCE(96); + if (lookahead == '0') ADVANCE(138); + if (lookahead == ':') ADVANCE(76); + if (lookahead == ';') ADVANCE(166); + if (lookahead == '<') ADVANCE(104); + if (lookahead == '=') ADVANCE(92); + if (lookahead == '>') ADVANCE(110); + if (lookahead == '@') ADVANCE(95); + if (lookahead == '[') ADVANCE(86); + if (lookahead == '\\') SKIP(56) + if (lookahead == ']') ADVANCE(87); + if (lookahead == '^') ADVANCE(101); + if (lookahead == '{') ADVANCE(88); + if (lookahead == '|') ADVANCE(80); + if (lookahead == '}') ADVANCE(89); + if (lookahead == '~') ADVANCE(103); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(62) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(137); + if (sym_identifier_character_set_1(lookahead)) ADVANCE(164); + END_STATE(); + case 63: + if (eof) ADVANCE(65); + if (lookahead == '#') ADVANCE(165); + if (lookahead == '(') ADVANCE(68); + if (lookahead == '*') ADVANCE(72); + if (lookahead == '+') ADVANCE(84); + if (lookahead == '-') ADVANCE(81); + if (lookahead == '.') ADVANCE(20); + if (lookahead == '0') ADVANCE(138); + if (lookahead == '@') ADVANCE(94); + if (lookahead == '[') ADVANCE(86); + if (lookahead == '\\') SKIP(58) + if (lookahead == 'e') ADVANCE(162); + if (lookahead == '{') ADVANCE(88); + if (lookahead == '~') ADVANCE(103); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(63) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(137); + if (sym_identifier_character_set_2(lookahead)) ADVANCE(164); + END_STATE(); + case 64: + if (eof) ADVANCE(65); + if (lookahead == '#') ADVANCE(165); + if (lookahead == '(') ADVANCE(68); + if (lookahead == '*') ADVANCE(72); + if (lookahead == '+') ADVANCE(84); + if (lookahead == '-') ADVANCE(81); + if (lookahead == '.') ADVANCE(20); + if (lookahead == '0') ADVANCE(138); + if (lookahead == '@') ADVANCE(94); + if (lookahead == '[') ADVANCE(86); + if (lookahead == '\\') SKIP(60) + if (lookahead == 'e') ADVANCE(163); + if (lookahead == '{') ADVANCE(88); + if (lookahead == '~') ADVANCE(103); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(64) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(137); + if (sym_identifier_character_set_2(lookahead)) ADVANCE(164); + END_STATE(); + case 65: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 66: + ACCEPT_TOKEN(anon_sym_DOT); + END_STATE(); + case 67: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(21); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(144); + END_STATE(); + case 68: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 69: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 70: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 71: + ACCEPT_TOKEN(anon_sym_STAR); + if (lookahead == '*') ADVANCE(91); + if (lookahead == '=') ADVANCE(115); + END_STATE(); + case 72: + ACCEPT_TOKEN(anon_sym_STAR); + if (lookahead == '*') ADVANCE(90); + END_STATE(); + case 73: + ACCEPT_TOKEN(anon_sym_GT_GT); + if (lookahead == '=') ADVANCE(121); + END_STATE(); + case 74: + ACCEPT_TOKEN(anon_sym_COLON_EQ); + END_STATE(); + case 75: + ACCEPT_TOKEN(anon_sym_COLON); + END_STATE(); + case 76: + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == '=') ADVANCE(74); + END_STATE(); + case 77: + ACCEPT_TOKEN(anon_sym_except); + if (lookahead == '*') ADVANCE(79); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 78: + ACCEPT_TOKEN(anon_sym_except); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 79: + ACCEPT_TOKEN(anon_sym_except_STAR); + END_STATE(); + case 80: + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '=') ADVANCE(125); + END_STATE(); + case 81: + ACCEPT_TOKEN(anon_sym_DASH); + END_STATE(); + case 82: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '=') ADVANCE(114); + END_STATE(); + case 83: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '=') ADVANCE(114); + if (lookahead == '>') ADVANCE(93); + END_STATE(); + case 84: + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 85: + ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == '=') ADVANCE(113); + END_STATE(); + case 86: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 87: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 88: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 89: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 90: + ACCEPT_TOKEN(anon_sym_STAR_STAR); + END_STATE(); + case 91: + ACCEPT_TOKEN(anon_sym_STAR_STAR); + if (lookahead == '=') ADVANCE(120); + END_STATE(); + case 92: + ACCEPT_TOKEN(anon_sym_EQ); + if (lookahead == '=') ADVANCE(107); + END_STATE(); + case 93: + ACCEPT_TOKEN(anon_sym_DASH_GT); + END_STATE(); + case 94: + ACCEPT_TOKEN(anon_sym_AT); + END_STATE(); + case 95: + ACCEPT_TOKEN(anon_sym_AT); + if (lookahead == '=') ADVANCE(117); + END_STATE(); + case 96: + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '/') ADVANCE(99); + if (lookahead == '=') ADVANCE(116); + END_STATE(); + case 97: + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '/') ADVANCE(27); + if (lookahead == '=') ADVANCE(116); + END_STATE(); + case 98: + ACCEPT_TOKEN(anon_sym_PERCENT); + if (lookahead == '=') ADVANCE(119); + END_STATE(); + case 99: + ACCEPT_TOKEN(anon_sym_SLASH_SLASH); + if (lookahead == '=') ADVANCE(118); + END_STATE(); + case 100: + ACCEPT_TOKEN(anon_sym_AMP); + if (lookahead == '=') ADVANCE(123); + END_STATE(); + case 101: + ACCEPT_TOKEN(anon_sym_CARET); + if (lookahead == '=') ADVANCE(124); + END_STATE(); + case 102: + ACCEPT_TOKEN(anon_sym_LT_LT); + if (lookahead == '=') ADVANCE(122); + END_STATE(); + case 103: + ACCEPT_TOKEN(anon_sym_TILDE); + END_STATE(); + case 104: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '<') ADVANCE(102); + if (lookahead == '=') ADVANCE(106); + if (lookahead == '>') ADVANCE(112); + END_STATE(); + case 105: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '<') ADVANCE(28); + if (lookahead == '=') ADVANCE(106); + if (lookahead == '>') ADVANCE(112); + END_STATE(); + case 106: + ACCEPT_TOKEN(anon_sym_LT_EQ); + END_STATE(); + case 107: + ACCEPT_TOKEN(anon_sym_EQ_EQ); + END_STATE(); + case 108: + ACCEPT_TOKEN(anon_sym_BANG_EQ); + END_STATE(); + case 109: + ACCEPT_TOKEN(anon_sym_GT_EQ); + END_STATE(); + case 110: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(109); + if (lookahead == '>') ADVANCE(73); + END_STATE(); + case 111: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(109); + if (lookahead == '>') ADVANCE(29); + END_STATE(); + case 112: + ACCEPT_TOKEN(anon_sym_LT_GT); + END_STATE(); + case 113: + ACCEPT_TOKEN(anon_sym_PLUS_EQ); + END_STATE(); + case 114: + ACCEPT_TOKEN(anon_sym_DASH_EQ); + END_STATE(); + case 115: + ACCEPT_TOKEN(anon_sym_STAR_EQ); + END_STATE(); + case 116: + ACCEPT_TOKEN(anon_sym_SLASH_EQ); + END_STATE(); + case 117: + ACCEPT_TOKEN(anon_sym_AT_EQ); + END_STATE(); + case 118: + ACCEPT_TOKEN(anon_sym_SLASH_SLASH_EQ); + END_STATE(); + case 119: + ACCEPT_TOKEN(anon_sym_PERCENT_EQ); + END_STATE(); + case 120: + ACCEPT_TOKEN(anon_sym_STAR_STAR_EQ); + END_STATE(); + case 121: + ACCEPT_TOKEN(anon_sym_GT_GT_EQ); + END_STATE(); + case 122: + ACCEPT_TOKEN(anon_sym_LT_LT_EQ); + END_STATE(); + case 123: + ACCEPT_TOKEN(anon_sym_AMP_EQ); + END_STATE(); + case 124: + ACCEPT_TOKEN(anon_sym_CARET_EQ); + END_STATE(); + case 125: + ACCEPT_TOKEN(anon_sym_PIPE_EQ); + END_STATE(); + case 126: + ACCEPT_TOKEN(sym_ellipsis); + END_STATE(); + case 127: + ACCEPT_TOKEN(anon_sym_LBRACE2); + END_STATE(); + case 128: + ACCEPT_TOKEN(anon_sym_LBRACE2); + if (lookahead == '{') ADVANCE(129); + END_STATE(); + case 129: + ACCEPT_TOKEN(sym__escape_interpolation); + END_STATE(); + case 130: + ACCEPT_TOKEN(sym_escape_sequence); + END_STATE(); + case 131: + ACCEPT_TOKEN(sym__not_escape_sequence); + if (lookahead == '\n') ADVANCE(130); + if (lookahead == '\r') ADVANCE(7); + if (lookahead == 'N') ADVANCE(34); + if (lookahead == 'U') ADVANCE(51); + if (lookahead == 'u') ADVANCE(47); + if (lookahead == 'x') ADVANCE(45); + if (lookahead == '"' || + lookahead == '\'' || + lookahead == '\\' || + lookahead == 'a' || + lookahead == 'b' || + lookahead == 'f' || + lookahead == 'n' || + lookahead == 'r' || + ('t' <= lookahead && lookahead <= 'v')) ADVANCE(130); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(42); + END_STATE(); + case 132: + ACCEPT_TOKEN(aux_sym_format_specifier_token1); + if (lookahead == '\r') ADVANCE(134); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '{' && + lookahead != '}') ADVANCE(134); + END_STATE(); + case 133: + ACCEPT_TOKEN(aux_sym_format_specifier_token1); + if (lookahead == '#') ADVANCE(134); + if (lookahead == '\\') ADVANCE(132); + if (lookahead == '\t' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) ADVANCE(133); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '{' && + lookahead != '}') ADVANCE(134); + END_STATE(); + case 134: + ACCEPT_TOKEN(aux_sym_format_specifier_token1); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '{' && + lookahead != '}') ADVANCE(134); + END_STATE(); + case 135: + ACCEPT_TOKEN(sym_type_conversion); + END_STATE(); + case 136: + ACCEPT_TOKEN(sym_integer); + END_STATE(); + case 137: + ACCEPT_TOKEN(sym_integer); + if (lookahead == '.') ADVANCE(146); + if (lookahead == '_') ADVANCE(139); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(37); + if (lookahead == 'J' || + lookahead == 'L' || + lookahead == 'j' || + lookahead == 'l') ADVANCE(136); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(137); + END_STATE(); + case 138: + ACCEPT_TOKEN(sym_integer); + if (lookahead == '.') ADVANCE(146); + if (lookahead == 'B' || + lookahead == 'b') ADVANCE(31); + if (lookahead == 'O' || + lookahead == 'o') ADVANCE(32); + if (lookahead == 'X' || + lookahead == 'x') ADVANCE(33); + if (lookahead == '_') ADVANCE(139); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(37); + if (lookahead == 'J' || + lookahead == 'L' || + lookahead == 'j' || + lookahead == 'l') ADVANCE(136); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(137); + END_STATE(); + case 139: + ACCEPT_TOKEN(sym_integer); + if (lookahead == '.') ADVANCE(146); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(37); + if (lookahead == 'J' || + lookahead == 'L' || + lookahead == 'j' || + lookahead == 'l') ADVANCE(136); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(137); + END_STATE(); + case 140: + ACCEPT_TOKEN(sym_integer); + if (lookahead == '_') ADVANCE(38); + if (lookahead == 'L' || + lookahead == 'l') ADVANCE(136); + if (lookahead == '0' || + lookahead == '1') ADVANCE(140); + END_STATE(); + case 141: + ACCEPT_TOKEN(sym_integer); + if (lookahead == '_') ADVANCE(39); + if (lookahead == 'L' || + lookahead == 'l') ADVANCE(136); + if (('0' <= lookahead && lookahead <= '7')) ADVANCE(141); + END_STATE(); + case 142: + ACCEPT_TOKEN(sym_integer); + if (lookahead == '_') ADVANCE(43); + if (lookahead == 'L' || + lookahead == 'l') ADVANCE(136); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(142); + END_STATE(); + case 143: + ACCEPT_TOKEN(sym_float); + END_STATE(); + case 144: + ACCEPT_TOKEN(sym_float); + if (lookahead == '_') ADVANCE(146); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(37); + if (lookahead == 'J' || + lookahead == 'L' || + lookahead == 'j' || + lookahead == 'l') ADVANCE(143); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(144); + END_STATE(); + case 145: + ACCEPT_TOKEN(sym_float); + if (lookahead == '_') ADVANCE(147); + if (lookahead == 'J' || + lookahead == 'L' || + lookahead == 'j' || + lookahead == 'l') ADVANCE(143); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(145); + END_STATE(); + case 146: + ACCEPT_TOKEN(sym_float); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(37); + if (lookahead == 'J' || + lookahead == 'L' || + lookahead == 'j' || + lookahead == 'l') ADVANCE(143); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(144); + END_STATE(); + case 147: + ACCEPT_TOKEN(sym_float); + if (lookahead == 'J' || + lookahead == 'L' || + lookahead == 'j' || + lookahead == 'l') ADVANCE(143); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(145); + END_STATE(); + case 148: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '*') ADVANCE(79); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 149: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'c') ADVANCE(152); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 150: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'c') ADVANCE(153); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 151: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'c') ADVANCE(154); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 152: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(155); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 153: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(156); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 154: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(157); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 155: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'p') ADVANCE(158); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 156: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'p') ADVANCE(159); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 157: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'p') ADVANCE(160); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 158: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(77); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 159: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(78); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 160: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(148); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 161: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'x') ADVANCE(149); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 162: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'x') ADVANCE(150); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 163: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'x') ADVANCE(151); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 164: + ACCEPT_TOKEN(sym_identifier); + if (sym_identifier_character_set_3(lookahead)) ADVANCE(164); + END_STATE(); + case 165: + ACCEPT_TOKEN(sym_comment); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(165); + END_STATE(); + case 166: + ACCEPT_TOKEN(sym__semicolon); + END_STATE(); + default: + return false; + } +} + +static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (lookahead == 'F') ADVANCE(1); + if (lookahead == 'N') ADVANCE(2); + if (lookahead == 'T') ADVANCE(3); + if (lookahead == '\\') SKIP(4) + if (lookahead == '_') ADVANCE(5); + if (lookahead == 'a') ADVANCE(6); + if (lookahead == 'b') ADVANCE(7); + if (lookahead == 'c') ADVANCE(8); + if (lookahead == 'd') ADVANCE(9); + if (lookahead == 'e') ADVANCE(10); + if (lookahead == 'f') ADVANCE(11); + if (lookahead == 'g') ADVANCE(12); + if (lookahead == 'i') ADVANCE(13); + if (lookahead == 'l') ADVANCE(14); + if (lookahead == 'm') ADVANCE(15); + if (lookahead == 'n') ADVANCE(16); + if (lookahead == 'o') ADVANCE(17); + if (lookahead == 'p') ADVANCE(18); + if (lookahead == 'r') ADVANCE(19); + if (lookahead == 't') ADVANCE(20); + if (lookahead == 'w') ADVANCE(21); + if (lookahead == 'y') ADVANCE(22); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\f' || + lookahead == '\r' || + lookahead == ' ' || + lookahead == 8203 || + lookahead == 8288 || + lookahead == 65279) SKIP(0) + END_STATE(); + case 1: + if (lookahead == 'a') ADVANCE(23); + END_STATE(); + case 2: + if (lookahead == 'o') ADVANCE(24); + END_STATE(); + case 3: + if (lookahead == 'r') ADVANCE(25); + END_STATE(); + case 4: + if (lookahead == '\n') SKIP(0) + if (lookahead == '\r') SKIP(26) + END_STATE(); + case 5: + ACCEPT_TOKEN(sym_match_wildcard_pattern); + if (lookahead == '_') ADVANCE(27); + END_STATE(); + case 6: + if (lookahead == 'n') ADVANCE(28); + if (lookahead == 's') ADVANCE(29); + if (lookahead == 'w') ADVANCE(30); + END_STATE(); + case 7: + if (lookahead == 'r') ADVANCE(31); + END_STATE(); + case 8: + if (lookahead == 'a') ADVANCE(32); + if (lookahead == 'l') ADVANCE(33); + if (lookahead == 'o') ADVANCE(34); + END_STATE(); + case 9: + if (lookahead == 'e') ADVANCE(35); + END_STATE(); + case 10: + if (lookahead == 'l') ADVANCE(36); + if (lookahead == 'x') ADVANCE(37); + END_STATE(); + case 11: + if (lookahead == 'i') ADVANCE(38); + if (lookahead == 'o') ADVANCE(39); + if (lookahead == 'r') ADVANCE(40); + END_STATE(); + case 12: + if (lookahead == 'l') ADVANCE(41); + END_STATE(); + case 13: + if (lookahead == 'f') ADVANCE(42); + if (lookahead == 'm') ADVANCE(43); + if (lookahead == 'n') ADVANCE(44); + if (lookahead == 's') ADVANCE(45); + END_STATE(); + case 14: + if (lookahead == 'a') ADVANCE(46); + END_STATE(); + case 15: + if (lookahead == 'a') ADVANCE(47); + END_STATE(); + case 16: + if (lookahead == 'o') ADVANCE(48); + END_STATE(); + case 17: + if (lookahead == 'r') ADVANCE(49); + END_STATE(); + case 18: + if (lookahead == 'a') ADVANCE(50); + if (lookahead == 'r') ADVANCE(51); + END_STATE(); + case 19: + if (lookahead == 'a') ADVANCE(52); + if (lookahead == 'e') ADVANCE(53); + END_STATE(); + case 20: + if (lookahead == 'r') ADVANCE(54); + if (lookahead == 'y') ADVANCE(55); + END_STATE(); + case 21: + if (lookahead == 'h') ADVANCE(56); + if (lookahead == 'i') ADVANCE(57); + END_STATE(); + case 22: + if (lookahead == 'i') ADVANCE(58); + END_STATE(); + case 23: + if (lookahead == 'l') ADVANCE(59); + END_STATE(); + case 24: + if (lookahead == 'n') ADVANCE(60); + END_STATE(); + case 25: + if (lookahead == 'u') ADVANCE(61); + END_STATE(); + case 26: + if (lookahead == '\n') SKIP(0) + END_STATE(); + case 27: + if (lookahead == 'f') ADVANCE(62); + END_STATE(); + case 28: + if (lookahead == 'd') ADVANCE(63); + END_STATE(); + case 29: + ACCEPT_TOKEN(anon_sym_as); + if (lookahead == 's') ADVANCE(64); + if (lookahead == 'y') ADVANCE(65); + END_STATE(); + case 30: + if (lookahead == 'a') ADVANCE(66); + END_STATE(); + case 31: + if (lookahead == 'e') ADVANCE(67); + END_STATE(); + case 32: + if (lookahead == 's') ADVANCE(68); + END_STATE(); + case 33: + if (lookahead == 'a') ADVANCE(69); + END_STATE(); + case 34: + if (lookahead == 'n') ADVANCE(70); + END_STATE(); + case 35: + if (lookahead == 'f') ADVANCE(71); + if (lookahead == 'l') ADVANCE(72); + END_STATE(); + case 36: + if (lookahead == 'i') ADVANCE(73); + if (lookahead == 's') ADVANCE(74); + END_STATE(); + case 37: + if (lookahead == 'e') ADVANCE(75); + END_STATE(); + case 38: + if (lookahead == 'n') ADVANCE(76); + END_STATE(); + case 39: + if (lookahead == 'r') ADVANCE(77); + END_STATE(); + case 40: + if (lookahead == 'o') ADVANCE(78); + END_STATE(); + case 41: + if (lookahead == 'o') ADVANCE(79); + END_STATE(); + case 42: + ACCEPT_TOKEN(anon_sym_if); + END_STATE(); + case 43: + if (lookahead == 'p') ADVANCE(80); + END_STATE(); + case 44: + ACCEPT_TOKEN(anon_sym_in); + END_STATE(); + case 45: + ACCEPT_TOKEN(anon_sym_is); + END_STATE(); + case 46: + if (lookahead == 'm') ADVANCE(81); + END_STATE(); + case 47: + if (lookahead == 't') ADVANCE(82); + END_STATE(); + case 48: + if (lookahead == 'n') ADVANCE(83); + if (lookahead == 't') ADVANCE(84); + END_STATE(); + case 49: + ACCEPT_TOKEN(anon_sym_or); + END_STATE(); + case 50: + if (lookahead == 's') ADVANCE(85); + END_STATE(); + case 51: + if (lookahead == 'i') ADVANCE(86); + END_STATE(); + case 52: + if (lookahead == 'i') ADVANCE(87); + END_STATE(); + case 53: + if (lookahead == 't') ADVANCE(88); + END_STATE(); + case 54: + if (lookahead == 'y') ADVANCE(89); + END_STATE(); + case 55: + if (lookahead == 'p') ADVANCE(90); + END_STATE(); + case 56: + if (lookahead == 'i') ADVANCE(91); + END_STATE(); + case 57: + if (lookahead == 't') ADVANCE(92); + END_STATE(); + case 58: + if (lookahead == 'e') ADVANCE(93); + END_STATE(); + case 59: + if (lookahead == 's') ADVANCE(94); + END_STATE(); + case 60: + if (lookahead == 'e') ADVANCE(95); + END_STATE(); + case 61: + if (lookahead == 'e') ADVANCE(96); + END_STATE(); + case 62: + if (lookahead == 'u') ADVANCE(97); + END_STATE(); + case 63: + ACCEPT_TOKEN(anon_sym_and); + END_STATE(); + case 64: + if (lookahead == 'e') ADVANCE(98); + END_STATE(); + case 65: + if (lookahead == 'n') ADVANCE(99); + END_STATE(); + case 66: + if (lookahead == 'i') ADVANCE(100); + END_STATE(); + case 67: + if (lookahead == 'a') ADVANCE(101); + END_STATE(); + case 68: + if (lookahead == 'e') ADVANCE(102); + END_STATE(); + case 69: + if (lookahead == 's') ADVANCE(103); + END_STATE(); + case 70: + if (lookahead == 't') ADVANCE(104); + END_STATE(); + case 71: + ACCEPT_TOKEN(anon_sym_def); + END_STATE(); + case 72: + ACCEPT_TOKEN(anon_sym_del); + END_STATE(); + case 73: + if (lookahead == 'f') ADVANCE(105); + END_STATE(); + case 74: + if (lookahead == 'e') ADVANCE(106); + END_STATE(); + case 75: + if (lookahead == 'c') ADVANCE(107); + END_STATE(); + case 76: + if (lookahead == 'a') ADVANCE(108); + END_STATE(); + case 77: + ACCEPT_TOKEN(anon_sym_for); + END_STATE(); + case 78: + if (lookahead == 'm') ADVANCE(109); + END_STATE(); + case 79: + if (lookahead == 'b') ADVANCE(110); + END_STATE(); + case 80: + if (lookahead == 'o') ADVANCE(111); + END_STATE(); + case 81: + if (lookahead == 'b') ADVANCE(112); + END_STATE(); + case 82: + if (lookahead == 'c') ADVANCE(113); + END_STATE(); + case 83: + if (lookahead == 'l') ADVANCE(114); + END_STATE(); + case 84: + ACCEPT_TOKEN(anon_sym_not); + END_STATE(); + case 85: + if (lookahead == 's') ADVANCE(115); + END_STATE(); + case 86: + if (lookahead == 'n') ADVANCE(116); + END_STATE(); + case 87: + if (lookahead == 's') ADVANCE(117); + END_STATE(); + case 88: + if (lookahead == 'u') ADVANCE(118); + END_STATE(); + case 89: + ACCEPT_TOKEN(anon_sym_try); + END_STATE(); + case 90: + if (lookahead == 'e') ADVANCE(119); + END_STATE(); + case 91: + if (lookahead == 'l') ADVANCE(120); + END_STATE(); + case 92: + if (lookahead == 'h') ADVANCE(121); + END_STATE(); + case 93: + if (lookahead == 'l') ADVANCE(122); + END_STATE(); + case 94: + if (lookahead == 'e') ADVANCE(123); + END_STATE(); + case 95: + ACCEPT_TOKEN(sym_none); + END_STATE(); + case 96: + ACCEPT_TOKEN(sym_true); + END_STATE(); + case 97: + if (lookahead == 't') ADVANCE(124); + END_STATE(); + case 98: + if (lookahead == 'r') ADVANCE(125); + END_STATE(); + case 99: + if (lookahead == 'c') ADVANCE(126); + END_STATE(); + case 100: + if (lookahead == 't') ADVANCE(127); + END_STATE(); + case 101: + if (lookahead == 'k') ADVANCE(128); + END_STATE(); + case 102: + ACCEPT_TOKEN(anon_sym_case); + END_STATE(); + case 103: + if (lookahead == 's') ADVANCE(129); + END_STATE(); + case 104: + if (lookahead == 'i') ADVANCE(130); + END_STATE(); + case 105: + ACCEPT_TOKEN(anon_sym_elif); + END_STATE(); + case 106: + ACCEPT_TOKEN(anon_sym_else); + END_STATE(); + case 107: + ACCEPT_TOKEN(anon_sym_exec); + END_STATE(); + case 108: + if (lookahead == 'l') ADVANCE(131); + END_STATE(); + case 109: + ACCEPT_TOKEN(anon_sym_from); + END_STATE(); + case 110: + if (lookahead == 'a') ADVANCE(132); + END_STATE(); + case 111: + if (lookahead == 'r') ADVANCE(133); + END_STATE(); + case 112: + if (lookahead == 'd') ADVANCE(134); + END_STATE(); + case 113: + if (lookahead == 'h') ADVANCE(135); + END_STATE(); + case 114: + if (lookahead == 'o') ADVANCE(136); + END_STATE(); + case 115: + ACCEPT_TOKEN(anon_sym_pass); + END_STATE(); + case 116: + if (lookahead == 't') ADVANCE(137); + END_STATE(); + case 117: + if (lookahead == 'e') ADVANCE(138); + END_STATE(); + case 118: + if (lookahead == 'r') ADVANCE(139); + END_STATE(); + case 119: + ACCEPT_TOKEN(anon_sym_type); + END_STATE(); + case 120: + if (lookahead == 'e') ADVANCE(140); + END_STATE(); + case 121: + ACCEPT_TOKEN(anon_sym_with); + END_STATE(); + case 122: + if (lookahead == 'd') ADVANCE(141); + END_STATE(); + case 123: + ACCEPT_TOKEN(sym_false); + END_STATE(); + case 124: + if (lookahead == 'u') ADVANCE(142); + END_STATE(); + case 125: + if (lookahead == 't') ADVANCE(143); + END_STATE(); + case 126: + ACCEPT_TOKEN(anon_sym_async); + END_STATE(); + case 127: + ACCEPT_TOKEN(anon_sym_await); + END_STATE(); + case 128: + ACCEPT_TOKEN(anon_sym_break); + END_STATE(); + case 129: + ACCEPT_TOKEN(anon_sym_class); + END_STATE(); + case 130: + if (lookahead == 'n') ADVANCE(144); + END_STATE(); + case 131: + if (lookahead == 'l') ADVANCE(145); + END_STATE(); + case 132: + if (lookahead == 'l') ADVANCE(146); + END_STATE(); + case 133: + if (lookahead == 't') ADVANCE(147); + END_STATE(); + case 134: + if (lookahead == 'a') ADVANCE(148); + END_STATE(); + case 135: + ACCEPT_TOKEN(anon_sym_match); + END_STATE(); + case 136: + if (lookahead == 'c') ADVANCE(149); + END_STATE(); + case 137: + ACCEPT_TOKEN(anon_sym_print); + END_STATE(); + case 138: + ACCEPT_TOKEN(anon_sym_raise); + END_STATE(); + case 139: + if (lookahead == 'n') ADVANCE(150); + END_STATE(); + case 140: + ACCEPT_TOKEN(anon_sym_while); + END_STATE(); + case 141: + ACCEPT_TOKEN(anon_sym_yield); + END_STATE(); + case 142: + if (lookahead == 'r') ADVANCE(151); + END_STATE(); + case 143: + ACCEPT_TOKEN(anon_sym_assert); + END_STATE(); + case 144: + if (lookahead == 'u') ADVANCE(152); + END_STATE(); + case 145: + if (lookahead == 'y') ADVANCE(153); + END_STATE(); + case 146: + ACCEPT_TOKEN(anon_sym_global); + END_STATE(); + case 147: + ACCEPT_TOKEN(anon_sym_import); + END_STATE(); + case 148: + ACCEPT_TOKEN(anon_sym_lambda); + END_STATE(); + case 149: + if (lookahead == 'a') ADVANCE(154); + END_STATE(); + case 150: + ACCEPT_TOKEN(anon_sym_return); + END_STATE(); + case 151: + if (lookahead == 'e') ADVANCE(155); + END_STATE(); + case 152: + if (lookahead == 'e') ADVANCE(156); + END_STATE(); + case 153: + ACCEPT_TOKEN(anon_sym_finally); + END_STATE(); + case 154: + if (lookahead == 'l') ADVANCE(157); + END_STATE(); + case 155: + if (lookahead == '_') ADVANCE(158); + END_STATE(); + case 156: + ACCEPT_TOKEN(anon_sym_continue); + END_STATE(); + case 157: + ACCEPT_TOKEN(anon_sym_nonlocal); + END_STATE(); + case 158: + if (lookahead == '_') ADVANCE(159); + END_STATE(); + case 159: + ACCEPT_TOKEN(anon_sym___future__); + END_STATE(); + default: + return false; + } +} + +static const TSLexMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0, .external_lex_state = 1}, + [1] = {.lex_state = 62, .external_lex_state = 2}, + [2] = {.lex_state = 62, .external_lex_state = 3}, + [3] = {.lex_state = 62, .external_lex_state = 3}, + [4] = {.lex_state = 62, .external_lex_state = 3}, + [5] = {.lex_state = 62, .external_lex_state = 3}, + [6] = {.lex_state = 62, .external_lex_state = 3}, + [7] = {.lex_state = 62, .external_lex_state = 3}, + [8] = {.lex_state = 62, .external_lex_state = 3}, + [9] = {.lex_state = 62, .external_lex_state = 3}, + [10] = {.lex_state = 62, .external_lex_state = 3}, + [11] = {.lex_state = 62, .external_lex_state = 3}, + [12] = {.lex_state = 62, .external_lex_state = 3}, + [13] = {.lex_state = 62, .external_lex_state = 3}, + [14] = {.lex_state = 62, .external_lex_state = 3}, + [15] = {.lex_state = 62, .external_lex_state = 3}, + [16] = {.lex_state = 62, .external_lex_state = 3}, + [17] = {.lex_state = 62, .external_lex_state = 3}, + [18] = {.lex_state = 62, .external_lex_state = 3}, + [19] = {.lex_state = 62, .external_lex_state = 3}, + [20] = {.lex_state = 62, .external_lex_state = 3}, + [21] = {.lex_state = 62, .external_lex_state = 3}, + [22] = {.lex_state = 62, .external_lex_state = 3}, + [23] = {.lex_state = 62, .external_lex_state = 3}, + [24] = {.lex_state = 62, .external_lex_state = 3}, + [25] = {.lex_state = 62, .external_lex_state = 3}, + [26] = {.lex_state = 62, .external_lex_state = 3}, + [27] = {.lex_state = 62, .external_lex_state = 3}, + [28] = {.lex_state = 62, .external_lex_state = 3}, + [29] = {.lex_state = 62, .external_lex_state = 3}, + [30] = {.lex_state = 62, .external_lex_state = 3}, + [31] = {.lex_state = 62, .external_lex_state = 3}, + [32] = {.lex_state = 62, .external_lex_state = 3}, + [33] = {.lex_state = 62, .external_lex_state = 3}, + [34] = {.lex_state = 62, .external_lex_state = 3}, + [35] = {.lex_state = 62, .external_lex_state = 3}, + [36] = {.lex_state = 62, .external_lex_state = 3}, + [37] = {.lex_state = 62, .external_lex_state = 3}, + [38] = {.lex_state = 62, .external_lex_state = 3}, + [39] = {.lex_state = 62, .external_lex_state = 3}, + [40] = {.lex_state = 62, .external_lex_state = 3}, + [41] = {.lex_state = 62, .external_lex_state = 3}, + [42] = {.lex_state = 62, .external_lex_state = 3}, + [43] = {.lex_state = 62, .external_lex_state = 3}, + [44] = {.lex_state = 62, .external_lex_state = 3}, + [45] = {.lex_state = 62, .external_lex_state = 3}, + [46] = {.lex_state = 62, .external_lex_state = 3}, + [47] = {.lex_state = 62, .external_lex_state = 3}, + [48] = {.lex_state = 62, .external_lex_state = 3}, + [49] = {.lex_state = 62, .external_lex_state = 3}, + [50] = {.lex_state = 62, .external_lex_state = 3}, + [51] = {.lex_state = 62, .external_lex_state = 3}, + [52] = {.lex_state = 62, .external_lex_state = 3}, + [53] = {.lex_state = 62, .external_lex_state = 3}, + [54] = {.lex_state = 62, .external_lex_state = 3}, + [55] = {.lex_state = 62, .external_lex_state = 3}, + [56] = {.lex_state = 62, .external_lex_state = 3}, + [57] = {.lex_state = 62, .external_lex_state = 3}, + [58] = {.lex_state = 62, .external_lex_state = 3}, + [59] = {.lex_state = 62, .external_lex_state = 3}, + [60] = {.lex_state = 62, .external_lex_state = 3}, + [61] = {.lex_state = 62, .external_lex_state = 3}, + [62] = {.lex_state = 62, .external_lex_state = 3}, + [63] = {.lex_state = 62, .external_lex_state = 3}, + [64] = {.lex_state = 62, .external_lex_state = 2}, + [65] = {.lex_state = 62, .external_lex_state = 3}, + [66] = {.lex_state = 62, .external_lex_state = 3}, + [67] = {.lex_state = 62, .external_lex_state = 2}, + [68] = {.lex_state = 62, .external_lex_state = 3}, + [69] = {.lex_state = 62, .external_lex_state = 3}, + [70] = {.lex_state = 62, .external_lex_state = 4}, + [71] = {.lex_state = 62, .external_lex_state = 4}, + [72] = {.lex_state = 62, .external_lex_state = 5}, + [73] = {.lex_state = 62, .external_lex_state = 5}, + [74] = {.lex_state = 62, .external_lex_state = 5}, + [75] = {.lex_state = 62, .external_lex_state = 4}, + [76] = {.lex_state = 62, .external_lex_state = 5}, + [77] = {.lex_state = 62, .external_lex_state = 5}, + [78] = {.lex_state = 62, .external_lex_state = 5}, + [79] = {.lex_state = 62, .external_lex_state = 5}, + [80] = {.lex_state = 62, .external_lex_state = 5}, + [81] = {.lex_state = 62, .external_lex_state = 5}, + [82] = {.lex_state = 62, .external_lex_state = 5}, + [83] = {.lex_state = 62, .external_lex_state = 5}, + [84] = {.lex_state = 62, .external_lex_state = 5}, + [85] = {.lex_state = 62, .external_lex_state = 5}, + [86] = {.lex_state = 62, .external_lex_state = 5}, + [87] = {.lex_state = 62, .external_lex_state = 5}, + [88] = {.lex_state = 62, .external_lex_state = 5}, + [89] = {.lex_state = 62, .external_lex_state = 5}, + [90] = {.lex_state = 62, .external_lex_state = 5}, + [91] = {.lex_state = 62, .external_lex_state = 5}, + [92] = {.lex_state = 62, .external_lex_state = 5}, + [93] = {.lex_state = 62, .external_lex_state = 5}, + [94] = {.lex_state = 62, .external_lex_state = 5}, + [95] = {.lex_state = 62, .external_lex_state = 5}, + [96] = {.lex_state = 62, .external_lex_state = 5}, + [97] = {.lex_state = 62, .external_lex_state = 5}, + [98] = {.lex_state = 62, .external_lex_state = 5}, + [99] = {.lex_state = 62, .external_lex_state = 5}, + [100] = {.lex_state = 62, .external_lex_state = 5}, + [101] = {.lex_state = 62, .external_lex_state = 5}, + [102] = {.lex_state = 62, .external_lex_state = 5}, + [103] = {.lex_state = 62, .external_lex_state = 5}, + [104] = {.lex_state = 62, .external_lex_state = 5}, + [105] = {.lex_state = 62, .external_lex_state = 5}, + [106] = {.lex_state = 62, .external_lex_state = 5}, + [107] = {.lex_state = 62, .external_lex_state = 5}, + [108] = {.lex_state = 62, .external_lex_state = 5}, + [109] = {.lex_state = 62, .external_lex_state = 5}, + [110] = {.lex_state = 62, .external_lex_state = 5}, + [111] = {.lex_state = 62, .external_lex_state = 5}, + [112] = {.lex_state = 62, .external_lex_state = 5}, + [113] = {.lex_state = 62, .external_lex_state = 5}, + [114] = {.lex_state = 62, .external_lex_state = 5}, + [115] = {.lex_state = 62, .external_lex_state = 5}, + [116] = {.lex_state = 62, .external_lex_state = 5}, + [117] = {.lex_state = 62, .external_lex_state = 5}, + [118] = {.lex_state = 62, .external_lex_state = 5}, + [119] = {.lex_state = 62, .external_lex_state = 5}, + [120] = {.lex_state = 62, .external_lex_state = 5}, + [121] = {.lex_state = 62, .external_lex_state = 5}, + [122] = {.lex_state = 62, .external_lex_state = 5}, + [123] = {.lex_state = 62, .external_lex_state = 5}, + [124] = {.lex_state = 62, .external_lex_state = 5}, + [125] = {.lex_state = 62, .external_lex_state = 5}, + [126] = {.lex_state = 62, .external_lex_state = 5}, + [127] = {.lex_state = 62, .external_lex_state = 5}, + [128] = {.lex_state = 62, .external_lex_state = 5}, + [129] = {.lex_state = 62, .external_lex_state = 5}, + [130] = {.lex_state = 62, .external_lex_state = 5}, + [131] = {.lex_state = 62, .external_lex_state = 4}, + [132] = {.lex_state = 62, .external_lex_state = 2}, + [133] = {.lex_state = 62, .external_lex_state = 4}, + [134] = {.lex_state = 62, .external_lex_state = 4}, + [135] = {.lex_state = 62, .external_lex_state = 4}, + [136] = {.lex_state = 62, .external_lex_state = 4}, + [137] = {.lex_state = 62, .external_lex_state = 4}, + [138] = {.lex_state = 62, .external_lex_state = 4}, + [139] = {.lex_state = 62, .external_lex_state = 4}, + [140] = {.lex_state = 62, .external_lex_state = 4}, + [141] = {.lex_state = 62, .external_lex_state = 4}, + [142] = {.lex_state = 62, .external_lex_state = 4}, + [143] = {.lex_state = 62, .external_lex_state = 4}, + [144] = {.lex_state = 62, .external_lex_state = 4}, + [145] = {.lex_state = 62, .external_lex_state = 4}, + [146] = {.lex_state = 62, .external_lex_state = 4}, + [147] = {.lex_state = 62, .external_lex_state = 2}, + [148] = {.lex_state = 62, .external_lex_state = 2}, + [149] = {.lex_state = 62, .external_lex_state = 2}, + [150] = {.lex_state = 62, .external_lex_state = 4}, + [151] = {.lex_state = 62, .external_lex_state = 2}, + [152] = {.lex_state = 62, .external_lex_state = 2}, + [153] = {.lex_state = 62, .external_lex_state = 2}, + [154] = {.lex_state = 62, .external_lex_state = 2}, + [155] = {.lex_state = 62, .external_lex_state = 2}, + [156] = {.lex_state = 62, .external_lex_state = 2}, + [157] = {.lex_state = 62, .external_lex_state = 2}, + [158] = {.lex_state = 16, .external_lex_state = 2}, + [159] = {.lex_state = 62, .external_lex_state = 2}, + [160] = {.lex_state = 62, .external_lex_state = 2}, + [161] = {.lex_state = 62, .external_lex_state = 2}, + [162] = {.lex_state = 62, .external_lex_state = 2}, + [163] = {.lex_state = 62, .external_lex_state = 2}, + [164] = {.lex_state = 62, .external_lex_state = 2}, + [165] = {.lex_state = 16, .external_lex_state = 2}, + [166] = {.lex_state = 62, .external_lex_state = 2}, + [167] = {.lex_state = 16, .external_lex_state = 2}, + [168] = {.lex_state = 16, .external_lex_state = 2}, + [169] = {.lex_state = 62, .external_lex_state = 2}, + [170] = {.lex_state = 62, .external_lex_state = 2}, + [171] = {.lex_state = 16, .external_lex_state = 2}, + [172] = {.lex_state = 16, .external_lex_state = 2}, + [173] = {.lex_state = 62, .external_lex_state = 2}, + [174] = {.lex_state = 62, .external_lex_state = 2}, + [175] = {.lex_state = 62, .external_lex_state = 2}, + [176] = {.lex_state = 62, .external_lex_state = 2}, + [177] = {.lex_state = 62, .external_lex_state = 2}, + [178] = {.lex_state = 62, .external_lex_state = 2}, + [179] = {.lex_state = 62, .external_lex_state = 2}, + [180] = {.lex_state = 62, .external_lex_state = 4}, + [181] = {.lex_state = 62, .external_lex_state = 4}, + [182] = {.lex_state = 62, .external_lex_state = 2}, + [183] = {.lex_state = 62, .external_lex_state = 2}, + [184] = {.lex_state = 62, .external_lex_state = 2}, + [185] = {.lex_state = 62, .external_lex_state = 2}, + [186] = {.lex_state = 62, .external_lex_state = 2}, + [187] = {.lex_state = 62, .external_lex_state = 2}, + [188] = {.lex_state = 62, .external_lex_state = 2}, + [189] = {.lex_state = 62, .external_lex_state = 2}, + [190] = {.lex_state = 62, .external_lex_state = 2}, + [191] = {.lex_state = 62, .external_lex_state = 2}, + [192] = {.lex_state = 62, .external_lex_state = 2}, + [193] = {.lex_state = 62, .external_lex_state = 2}, + [194] = {.lex_state = 62, .external_lex_state = 2}, + [195] = {.lex_state = 62, .external_lex_state = 4}, + [196] = {.lex_state = 62, .external_lex_state = 2}, + [197] = {.lex_state = 62, .external_lex_state = 2}, + [198] = {.lex_state = 62, .external_lex_state = 2}, + [199] = {.lex_state = 62, .external_lex_state = 2}, + [200] = {.lex_state = 62, .external_lex_state = 2}, + [201] = {.lex_state = 62, .external_lex_state = 4}, + [202] = {.lex_state = 62, .external_lex_state = 2}, + [203] = {.lex_state = 62, .external_lex_state = 2}, + [204] = {.lex_state = 62, .external_lex_state = 2}, + [205] = {.lex_state = 62, .external_lex_state = 4}, + [206] = {.lex_state = 62, .external_lex_state = 2}, + [207] = {.lex_state = 62, .external_lex_state = 2}, + [208] = {.lex_state = 62, .external_lex_state = 2}, + [209] = {.lex_state = 62, .external_lex_state = 2}, + [210] = {.lex_state = 62, .external_lex_state = 4}, + [211] = {.lex_state = 62, .external_lex_state = 2}, + [212] = {.lex_state = 62, .external_lex_state = 2}, + [213] = {.lex_state = 62, .external_lex_state = 2}, + [214] = {.lex_state = 62, .external_lex_state = 2}, + [215] = {.lex_state = 62, .external_lex_state = 2}, + [216] = {.lex_state = 62, .external_lex_state = 2}, + [217] = {.lex_state = 62, .external_lex_state = 2}, + [218] = {.lex_state = 15}, + [219] = {.lex_state = 15}, + [220] = {.lex_state = 15}, + [221] = {.lex_state = 15}, + [222] = {.lex_state = 62, .external_lex_state = 2}, + [223] = {.lex_state = 15}, + [224] = {.lex_state = 62, .external_lex_state = 2}, + [225] = {.lex_state = 62, .external_lex_state = 2}, + [226] = {.lex_state = 15}, + [227] = {.lex_state = 15}, + [228] = {.lex_state = 63, .external_lex_state = 2}, + [229] = {.lex_state = 64, .external_lex_state = 3}, + [230] = {.lex_state = 62, .external_lex_state = 2}, + [231] = {.lex_state = 62, .external_lex_state = 2}, + [232] = {.lex_state = 63, .external_lex_state = 3}, + [233] = {.lex_state = 62, .external_lex_state = 2}, + [234] = {.lex_state = 64, .external_lex_state = 3}, + [235] = {.lex_state = 62, .external_lex_state = 2}, + [236] = {.lex_state = 62, .external_lex_state = 2}, + [237] = {.lex_state = 64, .external_lex_state = 2}, + [238] = {.lex_state = 63, .external_lex_state = 2}, + [239] = {.lex_state = 62, .external_lex_state = 2}, + [240] = {.lex_state = 64, .external_lex_state = 2}, + [241] = {.lex_state = 63, .external_lex_state = 3}, + [242] = {.lex_state = 62, .external_lex_state = 2}, + [243] = {.lex_state = 62, .external_lex_state = 2}, + [244] = {.lex_state = 62, .external_lex_state = 2}, + [245] = {.lex_state = 62, .external_lex_state = 2}, + [246] = {.lex_state = 62, .external_lex_state = 2}, + [247] = {.lex_state = 14, .external_lex_state = 6}, + [248] = {.lex_state = 62, .external_lex_state = 2}, + [249] = {.lex_state = 62, .external_lex_state = 2}, + [250] = {.lex_state = 62, .external_lex_state = 2}, + [251] = {.lex_state = 62, .external_lex_state = 2}, + [252] = {.lex_state = 62, .external_lex_state = 2}, + [253] = {.lex_state = 62, .external_lex_state = 2}, + [254] = {.lex_state = 14, .external_lex_state = 6}, + [255] = {.lex_state = 16, .external_lex_state = 2}, + [256] = {.lex_state = 16, .external_lex_state = 2}, + [257] = {.lex_state = 16, .external_lex_state = 2}, + [258] = {.lex_state = 62, .external_lex_state = 3}, + [259] = {.lex_state = 16, .external_lex_state = 2}, + [260] = {.lex_state = 16, .external_lex_state = 2}, + [261] = {.lex_state = 16, .external_lex_state = 2}, + [262] = {.lex_state = 16, .external_lex_state = 2}, + [263] = {.lex_state = 62, .external_lex_state = 3}, + [264] = {.lex_state = 16, .external_lex_state = 2}, + [265] = {.lex_state = 62, .external_lex_state = 3}, + [266] = {.lex_state = 63, .external_lex_state = 3}, + [267] = {.lex_state = 64, .external_lex_state = 3}, + [268] = {.lex_state = 62, .external_lex_state = 2}, + [269] = {.lex_state = 16, .external_lex_state = 2}, + [270] = {.lex_state = 64, .external_lex_state = 2}, + [271] = {.lex_state = 63, .external_lex_state = 2}, + [272] = {.lex_state = 62, .external_lex_state = 3}, + [273] = {.lex_state = 16, .external_lex_state = 2}, + [274] = {.lex_state = 16, .external_lex_state = 2}, + [275] = {.lex_state = 62, .external_lex_state = 2}, + [276] = {.lex_state = 62, .external_lex_state = 2}, + [277] = {.lex_state = 62, .external_lex_state = 2}, + [278] = {.lex_state = 14, .external_lex_state = 4}, + [279] = {.lex_state = 62, .external_lex_state = 2}, + [280] = {.lex_state = 62, .external_lex_state = 2}, + [281] = {.lex_state = 62, .external_lex_state = 2}, + [282] = {.lex_state = 62, .external_lex_state = 2}, + [283] = {.lex_state = 62, .external_lex_state = 2}, + [284] = {.lex_state = 14, .external_lex_state = 6}, + [285] = {.lex_state = 62, .external_lex_state = 2}, + [286] = {.lex_state = 62, .external_lex_state = 2}, + [287] = {.lex_state = 62, .external_lex_state = 2}, + [288] = {.lex_state = 62, .external_lex_state = 3}, + [289] = {.lex_state = 62, .external_lex_state = 2}, + [290] = {.lex_state = 62, .external_lex_state = 2}, + [291] = {.lex_state = 62, .external_lex_state = 3}, + [292] = {.lex_state = 62, .external_lex_state = 2}, + [293] = {.lex_state = 62, .external_lex_state = 2}, + [294] = {.lex_state = 62, .external_lex_state = 2}, + [295] = {.lex_state = 62, .external_lex_state = 4}, + [296] = {.lex_state = 62, .external_lex_state = 2}, + [297] = {.lex_state = 62, .external_lex_state = 2}, + [298] = {.lex_state = 62, .external_lex_state = 2}, + [299] = {.lex_state = 16, .external_lex_state = 2}, + [300] = {.lex_state = 62, .external_lex_state = 4}, + [301] = {.lex_state = 16, .external_lex_state = 2}, + [302] = {.lex_state = 62, .external_lex_state = 2}, + [303] = {.lex_state = 62, .external_lex_state = 4}, + [304] = {.lex_state = 62, .external_lex_state = 4}, + [305] = {.lex_state = 62, .external_lex_state = 2}, + [306] = {.lex_state = 62, .external_lex_state = 2}, + [307] = {.lex_state = 62, .external_lex_state = 3}, + [308] = {.lex_state = 62, .external_lex_state = 3}, + [309] = {.lex_state = 62, .external_lex_state = 2}, + [310] = {.lex_state = 16, .external_lex_state = 2}, + [311] = {.lex_state = 62, .external_lex_state = 3}, + [312] = {.lex_state = 62, .external_lex_state = 2}, + [313] = {.lex_state = 62, .external_lex_state = 2}, + [314] = {.lex_state = 16, .external_lex_state = 2}, + [315] = {.lex_state = 62, .external_lex_state = 3}, + [316] = {.lex_state = 64, .external_lex_state = 3}, + [317] = {.lex_state = 63, .external_lex_state = 3}, + [318] = {.lex_state = 64, .external_lex_state = 2}, + [319] = {.lex_state = 63, .external_lex_state = 2}, + [320] = {.lex_state = 63, .external_lex_state = 2}, + [321] = {.lex_state = 62, .external_lex_state = 2}, + [322] = {.lex_state = 62, .external_lex_state = 2}, + [323] = {.lex_state = 62, .external_lex_state = 2}, + [324] = {.lex_state = 62, .external_lex_state = 2}, + [325] = {.lex_state = 63, .external_lex_state = 2}, + [326] = {.lex_state = 63, .external_lex_state = 2}, + [327] = {.lex_state = 64, .external_lex_state = 2}, + [328] = {.lex_state = 63, .external_lex_state = 2}, + [329] = {.lex_state = 64, .external_lex_state = 2}, + [330] = {.lex_state = 14, .external_lex_state = 6}, + [331] = {.lex_state = 64, .external_lex_state = 2}, + [332] = {.lex_state = 63, .external_lex_state = 2}, + [333] = {.lex_state = 63, .external_lex_state = 2}, + [334] = {.lex_state = 14, .external_lex_state = 6}, + [335] = {.lex_state = 16, .external_lex_state = 2}, + [336] = {.lex_state = 15, .external_lex_state = 6}, + [337] = {.lex_state = 15, .external_lex_state = 6}, + [338] = {.lex_state = 14}, + [339] = {.lex_state = 14}, + [340] = {.lex_state = 63, .external_lex_state = 2}, + [341] = {.lex_state = 62, .external_lex_state = 2}, + [342] = {.lex_state = 15, .external_lex_state = 6}, + [343] = {.lex_state = 15, .external_lex_state = 6}, + [344] = {.lex_state = 15, .external_lex_state = 6}, + [345] = {.lex_state = 62, .external_lex_state = 3}, + [346] = {.lex_state = 62, .external_lex_state = 2}, + [347] = {.lex_state = 62, .external_lex_state = 2}, + [348] = {.lex_state = 62, .external_lex_state = 2}, + [349] = {.lex_state = 62, .external_lex_state = 3}, + [350] = {.lex_state = 62, .external_lex_state = 2}, + [351] = {.lex_state = 62, .external_lex_state = 2}, + [352] = {.lex_state = 15, .external_lex_state = 6}, + [353] = {.lex_state = 63, .external_lex_state = 3}, + [354] = {.lex_state = 64, .external_lex_state = 3}, + [355] = {.lex_state = 64, .external_lex_state = 3}, + [356] = {.lex_state = 64, .external_lex_state = 3}, + [357] = {.lex_state = 63, .external_lex_state = 3}, + [358] = {.lex_state = 64, .external_lex_state = 3}, + [359] = {.lex_state = 64, .external_lex_state = 2}, + [360] = {.lex_state = 63, .external_lex_state = 3}, + [361] = {.lex_state = 62, .external_lex_state = 2}, + [362] = {.lex_state = 64, .external_lex_state = 2}, + [363] = {.lex_state = 64, .external_lex_state = 3}, + [364] = {.lex_state = 62, .external_lex_state = 2}, + [365] = {.lex_state = 15, .external_lex_state = 6}, + [366] = {.lex_state = 63, .external_lex_state = 3}, + [367] = {.lex_state = 64, .external_lex_state = 2}, + [368] = {.lex_state = 62, .external_lex_state = 2}, + [369] = {.lex_state = 63, .external_lex_state = 2}, + [370] = {.lex_state = 63, .external_lex_state = 3}, + [371] = {.lex_state = 64, .external_lex_state = 2}, + [372] = {.lex_state = 64, .external_lex_state = 3}, + [373] = {.lex_state = 63, .external_lex_state = 3}, + [374] = {.lex_state = 64, .external_lex_state = 3}, + [375] = {.lex_state = 63, .external_lex_state = 2}, + [376] = {.lex_state = 64, .external_lex_state = 2}, + [377] = {.lex_state = 63, .external_lex_state = 3}, + [378] = {.lex_state = 63, .external_lex_state = 3}, + [379] = {.lex_state = 63, .external_lex_state = 3}, + [380] = {.lex_state = 62, .external_lex_state = 2}, + [381] = {.lex_state = 63, .external_lex_state = 3}, + [382] = {.lex_state = 63, .external_lex_state = 2}, + [383] = {.lex_state = 16, .external_lex_state = 2}, + [384] = {.lex_state = 64, .external_lex_state = 3}, + [385] = {.lex_state = 62, .external_lex_state = 2}, + [386] = {.lex_state = 62, .external_lex_state = 2}, + [387] = {.lex_state = 62, .external_lex_state = 2}, + [388] = {.lex_state = 62, .external_lex_state = 2}, + [389] = {.lex_state = 62, .external_lex_state = 2}, + [390] = {.lex_state = 62, .external_lex_state = 2}, + [391] = {.lex_state = 62, .external_lex_state = 2}, + [392] = {.lex_state = 62, .external_lex_state = 2}, + [393] = {.lex_state = 62, .external_lex_state = 2}, + [394] = {.lex_state = 62, .external_lex_state = 2}, + [395] = {.lex_state = 62, .external_lex_state = 2}, + [396] = {.lex_state = 62, .external_lex_state = 2}, + [397] = {.lex_state = 62, .external_lex_state = 2}, + [398] = {.lex_state = 62, .external_lex_state = 2}, + [399] = {.lex_state = 62, .external_lex_state = 2}, + [400] = {.lex_state = 62, .external_lex_state = 2}, + [401] = {.lex_state = 62, .external_lex_state = 2}, + [402] = {.lex_state = 62, .external_lex_state = 2}, + [403] = {.lex_state = 62, .external_lex_state = 3}, + [404] = {.lex_state = 62, .external_lex_state = 2}, + [405] = {.lex_state = 62, .external_lex_state = 2}, + [406] = {.lex_state = 62, .external_lex_state = 2}, + [407] = {.lex_state = 62, .external_lex_state = 2}, + [408] = {.lex_state = 62, .external_lex_state = 2}, + [409] = {.lex_state = 62, .external_lex_state = 2}, + [410] = {.lex_state = 62, .external_lex_state = 2}, + [411] = {.lex_state = 62, .external_lex_state = 2}, + [412] = {.lex_state = 62, .external_lex_state = 2}, + [413] = {.lex_state = 62, .external_lex_state = 3}, + [414] = {.lex_state = 62, .external_lex_state = 3}, + [415] = {.lex_state = 62, .external_lex_state = 2}, + [416] = {.lex_state = 62, .external_lex_state = 2}, + [417] = {.lex_state = 62, .external_lex_state = 2}, + [418] = {.lex_state = 62, .external_lex_state = 3}, + [419] = {.lex_state = 62, .external_lex_state = 2}, + [420] = {.lex_state = 62, .external_lex_state = 3}, + [421] = {.lex_state = 62, .external_lex_state = 3}, + [422] = {.lex_state = 62, .external_lex_state = 2}, + [423] = {.lex_state = 62, .external_lex_state = 2}, + [424] = {.lex_state = 62, .external_lex_state = 2}, + [425] = {.lex_state = 62, .external_lex_state = 2}, + [426] = {.lex_state = 62, .external_lex_state = 2}, + [427] = {.lex_state = 62, .external_lex_state = 2}, + [428] = {.lex_state = 62, .external_lex_state = 3}, + [429] = {.lex_state = 62, .external_lex_state = 2}, + [430] = {.lex_state = 62, .external_lex_state = 2}, + [431] = {.lex_state = 15, .external_lex_state = 6}, + [432] = {.lex_state = 62, .external_lex_state = 3}, + [433] = {.lex_state = 62, .external_lex_state = 2}, + [434] = {.lex_state = 62, .external_lex_state = 2}, + [435] = {.lex_state = 62, .external_lex_state = 2}, + [436] = {.lex_state = 62, .external_lex_state = 2}, + [437] = {.lex_state = 62, .external_lex_state = 2}, + [438] = {.lex_state = 62, .external_lex_state = 2}, + [439] = {.lex_state = 62, .external_lex_state = 2}, + [440] = {.lex_state = 62, .external_lex_state = 2}, + [441] = {.lex_state = 15, .external_lex_state = 6}, + [442] = {.lex_state = 62, .external_lex_state = 2}, + [443] = {.lex_state = 62, .external_lex_state = 2}, + [444] = {.lex_state = 62, .external_lex_state = 2}, + [445] = {.lex_state = 62, .external_lex_state = 2}, + [446] = {.lex_state = 62, .external_lex_state = 2}, + [447] = {.lex_state = 62, .external_lex_state = 2}, + [448] = {.lex_state = 62, .external_lex_state = 2}, + [449] = {.lex_state = 15}, + [450] = {.lex_state = 62, .external_lex_state = 2}, + [451] = {.lex_state = 62, .external_lex_state = 2}, + [452] = {.lex_state = 62, .external_lex_state = 2}, + [453] = {.lex_state = 62, .external_lex_state = 2}, + [454] = {.lex_state = 62, .external_lex_state = 3}, + [455] = {.lex_state = 62, .external_lex_state = 2}, + [456] = {.lex_state = 62, .external_lex_state = 2}, + [457] = {.lex_state = 62, .external_lex_state = 2}, + [458] = {.lex_state = 62, .external_lex_state = 2}, + [459] = {.lex_state = 62, .external_lex_state = 2}, + [460] = {.lex_state = 62, .external_lex_state = 2}, + [461] = {.lex_state = 62, .external_lex_state = 2}, + [462] = {.lex_state = 62, .external_lex_state = 2}, + [463] = {.lex_state = 62, .external_lex_state = 2}, + [464] = {.lex_state = 62, .external_lex_state = 3}, + [465] = {.lex_state = 62, .external_lex_state = 2}, + [466] = {.lex_state = 62, .external_lex_state = 2}, + [467] = {.lex_state = 62, .external_lex_state = 2}, + [468] = {.lex_state = 62, .external_lex_state = 2}, + [469] = {.lex_state = 62, .external_lex_state = 2}, + [470] = {.lex_state = 62, .external_lex_state = 2}, + [471] = {.lex_state = 62, .external_lex_state = 2}, + [472] = {.lex_state = 62, .external_lex_state = 2}, + [473] = {.lex_state = 62, .external_lex_state = 2}, + [474] = {.lex_state = 62, .external_lex_state = 2}, + [475] = {.lex_state = 15, .external_lex_state = 6}, + [476] = {.lex_state = 62, .external_lex_state = 2}, + [477] = {.lex_state = 62, .external_lex_state = 2}, + [478] = {.lex_state = 62, .external_lex_state = 3}, + [479] = {.lex_state = 62, .external_lex_state = 2}, + [480] = {.lex_state = 62, .external_lex_state = 2}, + [481] = {.lex_state = 62, .external_lex_state = 2}, + [482] = {.lex_state = 62, .external_lex_state = 2}, + [483] = {.lex_state = 62, .external_lex_state = 2}, + [484] = {.lex_state = 62, .external_lex_state = 2}, + [485] = {.lex_state = 62, .external_lex_state = 3}, + [486] = {.lex_state = 62, .external_lex_state = 2}, + [487] = {.lex_state = 62, .external_lex_state = 3}, + [488] = {.lex_state = 62, .external_lex_state = 2}, + [489] = {.lex_state = 62, .external_lex_state = 3}, + [490] = {.lex_state = 62, .external_lex_state = 2}, + [491] = {.lex_state = 62, .external_lex_state = 3}, + [492] = {.lex_state = 62, .external_lex_state = 3}, + [493] = {.lex_state = 62, .external_lex_state = 2}, + [494] = {.lex_state = 62, .external_lex_state = 2}, + [495] = {.lex_state = 62, .external_lex_state = 3}, + [496] = {.lex_state = 62, .external_lex_state = 2}, + [497] = {.lex_state = 62, .external_lex_state = 2}, + [498] = {.lex_state = 62, .external_lex_state = 3}, + [499] = {.lex_state = 62, .external_lex_state = 2}, + [500] = {.lex_state = 62, .external_lex_state = 2}, + [501] = {.lex_state = 62, .external_lex_state = 2}, + [502] = {.lex_state = 62, .external_lex_state = 3}, + [503] = {.lex_state = 62, .external_lex_state = 2}, + [504] = {.lex_state = 62, .external_lex_state = 2}, + [505] = {.lex_state = 62, .external_lex_state = 3}, + [506] = {.lex_state = 62, .external_lex_state = 3}, + [507] = {.lex_state = 62, .external_lex_state = 2}, + [508] = {.lex_state = 62, .external_lex_state = 3}, + [509] = {.lex_state = 62, .external_lex_state = 3}, + [510] = {.lex_state = 62, .external_lex_state = 3}, + [511] = {.lex_state = 62, .external_lex_state = 2}, + [512] = {.lex_state = 62, .external_lex_state = 2}, + [513] = {.lex_state = 62, .external_lex_state = 3}, + [514] = {.lex_state = 62, .external_lex_state = 2}, + [515] = {.lex_state = 62, .external_lex_state = 2}, + [516] = {.lex_state = 62, .external_lex_state = 3}, + [517] = {.lex_state = 62, .external_lex_state = 3}, + [518] = {.lex_state = 62, .external_lex_state = 2}, + [519] = {.lex_state = 62, .external_lex_state = 2}, + [520] = {.lex_state = 62, .external_lex_state = 3}, + [521] = {.lex_state = 62, .external_lex_state = 2}, + [522] = {.lex_state = 62, .external_lex_state = 3}, + [523] = {.lex_state = 62, .external_lex_state = 2}, + [524] = {.lex_state = 62, .external_lex_state = 2}, + [525] = {.lex_state = 62, .external_lex_state = 3}, + [526] = {.lex_state = 62, .external_lex_state = 3}, + [527] = {.lex_state = 62, .external_lex_state = 3}, + [528] = {.lex_state = 62, .external_lex_state = 2}, + [529] = {.lex_state = 62, .external_lex_state = 3}, + [530] = {.lex_state = 62, .external_lex_state = 3}, + [531] = {.lex_state = 62, .external_lex_state = 3}, + [532] = {.lex_state = 62, .external_lex_state = 2}, + [533] = {.lex_state = 62, .external_lex_state = 2}, + [534] = {.lex_state = 62, .external_lex_state = 3}, + [535] = {.lex_state = 62, .external_lex_state = 2}, + [536] = {.lex_state = 62, .external_lex_state = 2}, + [537] = {.lex_state = 62, .external_lex_state = 2}, + [538] = {.lex_state = 62, .external_lex_state = 2}, + [539] = {.lex_state = 62, .external_lex_state = 3}, + [540] = {.lex_state = 62, .external_lex_state = 3}, + [541] = {.lex_state = 62, .external_lex_state = 2}, + [542] = {.lex_state = 62, .external_lex_state = 2}, + [543] = {.lex_state = 62, .external_lex_state = 2}, + [544] = {.lex_state = 62, .external_lex_state = 3}, + [545] = {.lex_state = 62, .external_lex_state = 2}, + [546] = {.lex_state = 62, .external_lex_state = 2}, + [547] = {.lex_state = 62, .external_lex_state = 2}, + [548] = {.lex_state = 62, .external_lex_state = 3}, + [549] = {.lex_state = 62, .external_lex_state = 2}, + [550] = {.lex_state = 62, .external_lex_state = 2}, + [551] = {.lex_state = 62, .external_lex_state = 3}, + [552] = {.lex_state = 62, .external_lex_state = 2}, + [553] = {.lex_state = 62, .external_lex_state = 2}, + [554] = {.lex_state = 62, .external_lex_state = 3}, + [555] = {.lex_state = 62, .external_lex_state = 3}, + [556] = {.lex_state = 62, .external_lex_state = 2}, + [557] = {.lex_state = 62, .external_lex_state = 2}, + [558] = {.lex_state = 62, .external_lex_state = 3}, + [559] = {.lex_state = 62, .external_lex_state = 2}, + [560] = {.lex_state = 62, .external_lex_state = 3}, + [561] = {.lex_state = 62, .external_lex_state = 2}, + [562] = {.lex_state = 62, .external_lex_state = 3}, + [563] = {.lex_state = 62, .external_lex_state = 3}, + [564] = {.lex_state = 62, .external_lex_state = 3}, + [565] = {.lex_state = 62, .external_lex_state = 3}, + [566] = {.lex_state = 62, .external_lex_state = 2}, + [567] = {.lex_state = 62, .external_lex_state = 3}, + [568] = {.lex_state = 62, .external_lex_state = 3}, + [569] = {.lex_state = 62, .external_lex_state = 2}, + [570] = {.lex_state = 62, .external_lex_state = 3}, + [571] = {.lex_state = 62, .external_lex_state = 3}, + [572] = {.lex_state = 62, .external_lex_state = 2}, + [573] = {.lex_state = 62, .external_lex_state = 2}, + [574] = {.lex_state = 62, .external_lex_state = 3}, + [575] = {.lex_state = 62, .external_lex_state = 2}, + [576] = {.lex_state = 62, .external_lex_state = 2}, + [577] = {.lex_state = 62, .external_lex_state = 3}, + [578] = {.lex_state = 62, .external_lex_state = 2}, + [579] = {.lex_state = 62, .external_lex_state = 3}, + [580] = {.lex_state = 62, .external_lex_state = 3}, + [581] = {.lex_state = 62, .external_lex_state = 3}, + [582] = {.lex_state = 62, .external_lex_state = 3}, + [583] = {.lex_state = 62, .external_lex_state = 2}, + [584] = {.lex_state = 62, .external_lex_state = 3}, + [585] = {.lex_state = 62, .external_lex_state = 2}, + [586] = {.lex_state = 62, .external_lex_state = 2}, + [587] = {.lex_state = 62, .external_lex_state = 3}, + [588] = {.lex_state = 62, .external_lex_state = 3}, + [589] = {.lex_state = 62, .external_lex_state = 2}, + [590] = {.lex_state = 62, .external_lex_state = 2}, + [591] = {.lex_state = 62, .external_lex_state = 3}, + [592] = {.lex_state = 62, .external_lex_state = 3}, + [593] = {.lex_state = 62, .external_lex_state = 3}, + [594] = {.lex_state = 62, .external_lex_state = 3}, + [595] = {.lex_state = 62, .external_lex_state = 2}, + [596] = {.lex_state = 62, .external_lex_state = 2}, + [597] = {.lex_state = 62, .external_lex_state = 2}, + [598] = {.lex_state = 15, .external_lex_state = 2}, + [599] = {.lex_state = 15, .external_lex_state = 2}, + [600] = {.lex_state = 15, .external_lex_state = 2}, + [601] = {.lex_state = 62, .external_lex_state = 2}, + [602] = {.lex_state = 62, .external_lex_state = 2}, + [603] = {.lex_state = 62, .external_lex_state = 2}, + [604] = {.lex_state = 62, .external_lex_state = 2}, + [605] = {.lex_state = 62, .external_lex_state = 2}, + [606] = {.lex_state = 62, .external_lex_state = 2}, + [607] = {.lex_state = 62, .external_lex_state = 2}, + [608] = {.lex_state = 62, .external_lex_state = 2}, + [609] = {.lex_state = 15, .external_lex_state = 2}, + [610] = {.lex_state = 15, .external_lex_state = 2}, + [611] = {.lex_state = 15}, + [612] = {.lex_state = 15}, + [613] = {.lex_state = 15}, + [614] = {.lex_state = 15}, + [615] = {.lex_state = 15}, + [616] = {.lex_state = 15}, + [617] = {.lex_state = 15}, + [618] = {.lex_state = 15}, + [619] = {.lex_state = 15}, + [620] = {.lex_state = 15}, + [621] = {.lex_state = 15}, + [622] = {.lex_state = 15}, + [623] = {.lex_state = 15}, + [624] = {.lex_state = 15}, + [625] = {.lex_state = 15}, + [626] = {.lex_state = 15}, + [627] = {.lex_state = 15}, + [628] = {.lex_state = 15}, + [629] = {.lex_state = 15}, + [630] = {.lex_state = 15}, + [631] = {.lex_state = 15}, + [632] = {.lex_state = 15}, + [633] = {.lex_state = 15}, + [634] = {.lex_state = 15}, + [635] = {.lex_state = 15}, + [636] = {.lex_state = 16, .external_lex_state = 2}, + [637] = {.lex_state = 15}, + [638] = {.lex_state = 15}, + [639] = {.lex_state = 15}, + [640] = {.lex_state = 15}, + [641] = {.lex_state = 15}, + [642] = {.lex_state = 15}, + [643] = {.lex_state = 15}, + [644] = {.lex_state = 15}, + [645] = {.lex_state = 15}, + [646] = {.lex_state = 15}, + [647] = {.lex_state = 15}, + [648] = {.lex_state = 15}, + [649] = {.lex_state = 15}, + [650] = {.lex_state = 15}, + [651] = {.lex_state = 15}, + [652] = {.lex_state = 15}, + [653] = {.lex_state = 15}, + [654] = {.lex_state = 15}, + [655] = {.lex_state = 15}, + [656] = {.lex_state = 15}, + [657] = {.lex_state = 15}, + [658] = {.lex_state = 15}, + [659] = {.lex_state = 15}, + [660] = {.lex_state = 15}, + [661] = {.lex_state = 15}, + [662] = {.lex_state = 15}, + [663] = {.lex_state = 15}, + [664] = {.lex_state = 15}, + [665] = {.lex_state = 15}, + [666] = {.lex_state = 15}, + [667] = {.lex_state = 14}, + [668] = {.lex_state = 14}, + [669] = {.lex_state = 62, .external_lex_state = 2}, + [670] = {.lex_state = 62, .external_lex_state = 2}, + [671] = {.lex_state = 15}, + [672] = {.lex_state = 15}, + [673] = {.lex_state = 62, .external_lex_state = 2}, + [674] = {.lex_state = 14}, + [675] = {.lex_state = 14}, + [676] = {.lex_state = 62, .external_lex_state = 2}, + [677] = {.lex_state = 15, .external_lex_state = 2}, + [678] = {.lex_state = 15, .external_lex_state = 2}, + [679] = {.lex_state = 62, .external_lex_state = 2}, + [680] = {.lex_state = 62, .external_lex_state = 2}, + [681] = {.lex_state = 62, .external_lex_state = 2}, + [682] = {.lex_state = 62, .external_lex_state = 2}, + [683] = {.lex_state = 62, .external_lex_state = 2}, + [684] = {.lex_state = 15, .external_lex_state = 6}, + [685] = {.lex_state = 62, .external_lex_state = 2}, + [686] = {.lex_state = 62, .external_lex_state = 2}, + [687] = {.lex_state = 62, .external_lex_state = 2}, + [688] = {.lex_state = 62, .external_lex_state = 2}, + [689] = {.lex_state = 15, .external_lex_state = 4}, + [690] = {.lex_state = 62, .external_lex_state = 2}, + [691] = {.lex_state = 62, .external_lex_state = 2}, + [692] = {.lex_state = 62, .external_lex_state = 2}, + [693] = {.lex_state = 62, .external_lex_state = 2}, + [694] = {.lex_state = 62, .external_lex_state = 2}, + [695] = {.lex_state = 62, .external_lex_state = 2}, + [696] = {.lex_state = 62, .external_lex_state = 2}, + [697] = {.lex_state = 62, .external_lex_state = 2}, + [698] = {.lex_state = 62, .external_lex_state = 2}, + [699] = {.lex_state = 62, .external_lex_state = 2}, + [700] = {.lex_state = 62, .external_lex_state = 2}, + [701] = {.lex_state = 62, .external_lex_state = 2}, + [702] = {.lex_state = 62, .external_lex_state = 2}, + [703] = {.lex_state = 62, .external_lex_state = 2}, + [704] = {.lex_state = 62, .external_lex_state = 2}, + [705] = {.lex_state = 62, .external_lex_state = 2}, + [706] = {.lex_state = 62, .external_lex_state = 2}, + [707] = {.lex_state = 62, .external_lex_state = 2}, + [708] = {.lex_state = 62, .external_lex_state = 2}, + [709] = {.lex_state = 62, .external_lex_state = 2}, + [710] = {.lex_state = 62, .external_lex_state = 2}, + [711] = {.lex_state = 62, .external_lex_state = 2}, + [712] = {.lex_state = 62, .external_lex_state = 2}, + [713] = {.lex_state = 15, .external_lex_state = 4}, + [714] = {.lex_state = 62, .external_lex_state = 2}, + [715] = {.lex_state = 62, .external_lex_state = 2}, + [716] = {.lex_state = 62, .external_lex_state = 2}, + [717] = {.lex_state = 62, .external_lex_state = 2}, + [718] = {.lex_state = 62, .external_lex_state = 2}, + [719] = {.lex_state = 62, .external_lex_state = 2}, + [720] = {.lex_state = 15, .external_lex_state = 4}, + [721] = {.lex_state = 62, .external_lex_state = 2}, + [722] = {.lex_state = 62, .external_lex_state = 2}, + [723] = {.lex_state = 62, .external_lex_state = 2}, + [724] = {.lex_state = 62, .external_lex_state = 2}, + [725] = {.lex_state = 15}, + [726] = {.lex_state = 62, .external_lex_state = 2}, + [727] = {.lex_state = 15}, + [728] = {.lex_state = 62, .external_lex_state = 2}, + [729] = {.lex_state = 62, .external_lex_state = 2}, + [730] = {.lex_state = 62, .external_lex_state = 2}, + [731] = {.lex_state = 15, .external_lex_state = 6}, + [732] = {.lex_state = 15, .external_lex_state = 6}, + [733] = {.lex_state = 15, .external_lex_state = 6}, + [734] = {.lex_state = 15, .external_lex_state = 6}, + [735] = {.lex_state = 15, .external_lex_state = 6}, + [736] = {.lex_state = 15, .external_lex_state = 2}, + [737] = {.lex_state = 15, .external_lex_state = 6}, + [738] = {.lex_state = 15, .external_lex_state = 6}, + [739] = {.lex_state = 15, .external_lex_state = 6}, + [740] = {.lex_state = 15}, + [741] = {.lex_state = 15, .external_lex_state = 6}, + [742] = {.lex_state = 15, .external_lex_state = 2}, + [743] = {.lex_state = 15, .external_lex_state = 6}, + [744] = {.lex_state = 15, .external_lex_state = 2}, + [745] = {.lex_state = 15, .external_lex_state = 6}, + [746] = {.lex_state = 15}, + [747] = {.lex_state = 15}, + [748] = {.lex_state = 15}, + [749] = {.lex_state = 14}, + [750] = {.lex_state = 15}, + [751] = {.lex_state = 15}, + [752] = {.lex_state = 15}, + [753] = {.lex_state = 15}, + [754] = {.lex_state = 14, .external_lex_state = 6}, + [755] = {.lex_state = 14, .external_lex_state = 6}, + [756] = {.lex_state = 15}, + [757] = {.lex_state = 15}, + [758] = {.lex_state = 15, .external_lex_state = 4}, + [759] = {.lex_state = 14}, + [760] = {.lex_state = 14}, + [761] = {.lex_state = 15}, + [762] = {.lex_state = 15}, + [763] = {.lex_state = 15}, + [764] = {.lex_state = 14}, + [765] = {.lex_state = 15}, + [766] = {.lex_state = 15}, + [767] = {.lex_state = 15}, + [768] = {.lex_state = 15}, + [769] = {.lex_state = 15, .external_lex_state = 4}, + [770] = {.lex_state = 15}, + [771] = {.lex_state = 15, .external_lex_state = 6}, + [772] = {.lex_state = 15, .external_lex_state = 6}, + [773] = {.lex_state = 15, .external_lex_state = 6}, + [774] = {.lex_state = 15, .external_lex_state = 6}, + [775] = {.lex_state = 15, .external_lex_state = 6}, + [776] = {.lex_state = 15, .external_lex_state = 6}, + [777] = {.lex_state = 15, .external_lex_state = 6}, + [778] = {.lex_state = 15, .external_lex_state = 6}, + [779] = {.lex_state = 15}, + [780] = {.lex_state = 15, .external_lex_state = 6}, + [781] = {.lex_state = 15, .external_lex_state = 6}, + [782] = {.lex_state = 15, .external_lex_state = 6}, + [783] = {.lex_state = 15, .external_lex_state = 6}, + [784] = {.lex_state = 15, .external_lex_state = 6}, + [785] = {.lex_state = 15, .external_lex_state = 6}, + [786] = {.lex_state = 15, .external_lex_state = 6}, + [787] = {.lex_state = 15, .external_lex_state = 6}, + [788] = {.lex_state = 15, .external_lex_state = 6}, + [789] = {.lex_state = 15}, + [790] = {.lex_state = 15, .external_lex_state = 6}, + [791] = {.lex_state = 15, .external_lex_state = 6}, + [792] = {.lex_state = 15, .external_lex_state = 6}, + [793] = {.lex_state = 15, .external_lex_state = 6}, + [794] = {.lex_state = 15, .external_lex_state = 6}, + [795] = {.lex_state = 15, .external_lex_state = 6}, + [796] = {.lex_state = 15, .external_lex_state = 6}, + [797] = {.lex_state = 15, .external_lex_state = 6}, + [798] = {.lex_state = 14}, + [799] = {.lex_state = 15, .external_lex_state = 6}, + [800] = {.lex_state = 15, .external_lex_state = 6}, + [801] = {.lex_state = 14}, + [802] = {.lex_state = 15, .external_lex_state = 6}, + [803] = {.lex_state = 15, .external_lex_state = 6}, + [804] = {.lex_state = 15, .external_lex_state = 6}, + [805] = {.lex_state = 15, .external_lex_state = 6}, + [806] = {.lex_state = 15}, + [807] = {.lex_state = 15, .external_lex_state = 6}, + [808] = {.lex_state = 15, .external_lex_state = 6}, + [809] = {.lex_state = 15}, + [810] = {.lex_state = 15}, + [811] = {.lex_state = 15}, + [812] = {.lex_state = 14}, + [813] = {.lex_state = 15}, + [814] = {.lex_state = 15}, + [815] = {.lex_state = 15}, + [816] = {.lex_state = 15}, + [817] = {.lex_state = 15}, + [818] = {.lex_state = 15}, + [819] = {.lex_state = 15}, + [820] = {.lex_state = 15}, + [821] = {.lex_state = 15}, + [822] = {.lex_state = 15}, + [823] = {.lex_state = 15}, + [824] = {.lex_state = 15}, + [825] = {.lex_state = 15}, + [826] = {.lex_state = 15}, + [827] = {.lex_state = 15}, + [828] = {.lex_state = 15}, + [829] = {.lex_state = 15}, + [830] = {.lex_state = 15}, + [831] = {.lex_state = 15}, + [832] = {.lex_state = 15}, + [833] = {.lex_state = 15}, + [834] = {.lex_state = 15}, + [835] = {.lex_state = 15}, + [836] = {.lex_state = 15}, + [837] = {.lex_state = 14}, + [838] = {.lex_state = 15}, + [839] = {.lex_state = 15}, + [840] = {.lex_state = 15}, + [841] = {.lex_state = 15}, + [842] = {.lex_state = 15}, + [843] = {.lex_state = 15}, + [844] = {.lex_state = 15}, + [845] = {.lex_state = 15}, + [846] = {.lex_state = 15}, + [847] = {.lex_state = 15}, + [848] = {.lex_state = 15}, + [849] = {.lex_state = 62, .external_lex_state = 2}, + [850] = {.lex_state = 16, .external_lex_state = 2}, + [851] = {.lex_state = 16, .external_lex_state = 2}, + [852] = {.lex_state = 62, .external_lex_state = 2}, + [853] = {.lex_state = 62, .external_lex_state = 2}, + [854] = {.lex_state = 62, .external_lex_state = 2}, + [855] = {.lex_state = 62, .external_lex_state = 2}, + [856] = {.lex_state = 62, .external_lex_state = 2}, + [857] = {.lex_state = 62, .external_lex_state = 2}, + [858] = {.lex_state = 62, .external_lex_state = 2}, + [859] = {.lex_state = 62, .external_lex_state = 2}, + [860] = {.lex_state = 62, .external_lex_state = 2}, + [861] = {.lex_state = 62, .external_lex_state = 2}, + [862] = {.lex_state = 62, .external_lex_state = 2}, + [863] = {.lex_state = 62, .external_lex_state = 2}, + [864] = {.lex_state = 62, .external_lex_state = 2}, + [865] = {.lex_state = 62, .external_lex_state = 2}, + [866] = {.lex_state = 62, .external_lex_state = 2}, + [867] = {.lex_state = 62, .external_lex_state = 2}, + [868] = {.lex_state = 16}, + [869] = {.lex_state = 16}, + [870] = {.lex_state = 16}, + [871] = {.lex_state = 16}, + [872] = {.lex_state = 16}, + [873] = {.lex_state = 16}, + [874] = {.lex_state = 16}, + [875] = {.lex_state = 16}, + [876] = {.lex_state = 16}, + [877] = {.lex_state = 62, .external_lex_state = 6}, + [878] = {.lex_state = 62, .external_lex_state = 6}, + [879] = {.lex_state = 15}, + [880] = {.lex_state = 15}, + [881] = {.lex_state = 16}, + [882] = {.lex_state = 15}, + [883] = {.lex_state = 16}, + [884] = {.lex_state = 16}, + [885] = {.lex_state = 16}, + [886] = {.lex_state = 16}, + [887] = {.lex_state = 16}, + [888] = {.lex_state = 16}, + [889] = {.lex_state = 16}, + [890] = {.lex_state = 16}, + [891] = {.lex_state = 62, .external_lex_state = 2}, + [892] = {.lex_state = 62, .external_lex_state = 2}, + [893] = {.lex_state = 62}, + [894] = {.lex_state = 62, .external_lex_state = 2}, + [895] = {.lex_state = 62}, + [896] = {.lex_state = 16}, + [897] = {.lex_state = 16}, + [898] = {.lex_state = 16}, + [899] = {.lex_state = 62}, + [900] = {.lex_state = 16}, + [901] = {.lex_state = 16}, + [902] = {.lex_state = 62}, + [903] = {.lex_state = 62}, + [904] = {.lex_state = 16}, + [905] = {.lex_state = 62, .external_lex_state = 2}, + [906] = {.lex_state = 15}, + [907] = {.lex_state = 16}, + [908] = {.lex_state = 16}, + [909] = {.lex_state = 16}, + [910] = {.lex_state = 15}, + [911] = {.lex_state = 16}, + [912] = {.lex_state = 16}, + [913] = {.lex_state = 16, .external_lex_state = 2}, + [914] = {.lex_state = 16}, + [915] = {.lex_state = 62}, + [916] = {.lex_state = 16}, + [917] = {.lex_state = 15}, + [918] = {.lex_state = 16}, + [919] = {.lex_state = 16}, + [920] = {.lex_state = 16}, + [921] = {.lex_state = 16}, + [922] = {.lex_state = 16}, + [923] = {.lex_state = 16}, + [924] = {.lex_state = 16}, + [925] = {.lex_state = 15}, + [926] = {.lex_state = 16}, + [927] = {.lex_state = 16}, + [928] = {.lex_state = 16}, + [929] = {.lex_state = 16}, + [930] = {.lex_state = 62}, + [931] = {.lex_state = 62}, + [932] = {.lex_state = 62}, + [933] = {.lex_state = 16}, + [934] = {.lex_state = 18, .external_lex_state = 7}, + [935] = {.lex_state = 62}, + [936] = {.lex_state = 18, .external_lex_state = 7}, + [937] = {.lex_state = 18, .external_lex_state = 7}, + [938] = {.lex_state = 18, .external_lex_state = 7}, + [939] = {.lex_state = 16}, + [940] = {.lex_state = 62}, + [941] = {.lex_state = 62}, + [942] = {.lex_state = 18, .external_lex_state = 7}, + [943] = {.lex_state = 16}, + [944] = {.lex_state = 18, .external_lex_state = 7}, + [945] = {.lex_state = 62}, + [946] = {.lex_state = 62}, + [947] = {.lex_state = 16}, + [948] = {.lex_state = 16}, + [949] = {.lex_state = 18, .external_lex_state = 7}, + [950] = {.lex_state = 18, .external_lex_state = 7}, + [951] = {.lex_state = 16}, + [952] = {.lex_state = 18, .external_lex_state = 7}, + [953] = {.lex_state = 62}, + [954] = {.lex_state = 16}, + [955] = {.lex_state = 62}, + [956] = {.lex_state = 62}, + [957] = {.lex_state = 16}, + [958] = {.lex_state = 62}, + [959] = {.lex_state = 62}, + [960] = {.lex_state = 16}, + [961] = {.lex_state = 16}, + [962] = {.lex_state = 62}, + [963] = {.lex_state = 62}, + [964] = {.lex_state = 16}, + [965] = {.lex_state = 0}, + [966] = {.lex_state = 16}, + [967] = {.lex_state = 62, .external_lex_state = 6}, + [968] = {.lex_state = 16}, + [969] = {.lex_state = 16}, + [970] = {.lex_state = 16}, + [971] = {.lex_state = 16}, + [972] = {.lex_state = 16}, + [973] = {.lex_state = 16}, + [974] = {.lex_state = 62, .external_lex_state = 6}, + [975] = {.lex_state = 16}, + [976] = {.lex_state = 62, .external_lex_state = 6}, + [977] = {.lex_state = 16}, + [978] = {.lex_state = 62}, + [979] = {.lex_state = 62}, + [980] = {.lex_state = 62, .external_lex_state = 6}, + [981] = {.lex_state = 16}, + [982] = {.lex_state = 62, .external_lex_state = 6}, + [983] = {.lex_state = 0}, + [984] = {.lex_state = 16}, + [985] = {.lex_state = 16}, + [986] = {.lex_state = 16}, + [987] = {.lex_state = 16}, + [988] = {.lex_state = 16}, + [989] = {.lex_state = 16}, + [990] = {.lex_state = 16}, + [991] = {.lex_state = 0}, + [992] = {.lex_state = 62, .external_lex_state = 6}, + [993] = {.lex_state = 16}, + [994] = {.lex_state = 62}, + [995] = {.lex_state = 62}, + [996] = {.lex_state = 62}, + [997] = {.lex_state = 62, .external_lex_state = 6}, + [998] = {.lex_state = 16}, + [999] = {.lex_state = 15}, + [1000] = {.lex_state = 62, .external_lex_state = 6}, + [1001] = {.lex_state = 62, .external_lex_state = 6}, + [1002] = {.lex_state = 62}, + [1003] = {.lex_state = 0}, + [1004] = {.lex_state = 16}, + [1005] = {.lex_state = 16}, + [1006] = {.lex_state = 16}, + [1007] = {.lex_state = 62, .external_lex_state = 6}, + [1008] = {.lex_state = 16}, + [1009] = {.lex_state = 62, .external_lex_state = 6}, + [1010] = {.lex_state = 16}, + [1011] = {.lex_state = 16}, + [1012] = {.lex_state = 62}, + [1013] = {.lex_state = 62}, + [1014] = {.lex_state = 62, .external_lex_state = 6}, + [1015] = {.lex_state = 16}, + [1016] = {.lex_state = 15}, + [1017] = {.lex_state = 62}, + [1018] = {.lex_state = 62}, + [1019] = {.lex_state = 62, .external_lex_state = 6}, + [1020] = {.lex_state = 62}, + [1021] = {.lex_state = 16}, + [1022] = {.lex_state = 16}, + [1023] = {.lex_state = 16}, + [1024] = {.lex_state = 16}, + [1025] = {.lex_state = 16}, + [1026] = {.lex_state = 62, .external_lex_state = 6}, + [1027] = {.lex_state = 16}, + [1028] = {.lex_state = 16}, + [1029] = {.lex_state = 16}, + [1030] = {.lex_state = 16}, + [1031] = {.lex_state = 18, .external_lex_state = 7}, + [1032] = {.lex_state = 16}, + [1033] = {.lex_state = 62}, + [1034] = {.lex_state = 62, .external_lex_state = 6}, + [1035] = {.lex_state = 16}, + [1036] = {.lex_state = 62, .external_lex_state = 6}, + [1037] = {.lex_state = 62}, + [1038] = {.lex_state = 62}, + [1039] = {.lex_state = 62}, + [1040] = {.lex_state = 16}, + [1041] = {.lex_state = 16}, + [1042] = {.lex_state = 16}, + [1043] = {.lex_state = 62, .external_lex_state = 6}, + [1044] = {.lex_state = 62, .external_lex_state = 6}, + [1045] = {.lex_state = 62, .external_lex_state = 6}, + [1046] = {.lex_state = 62, .external_lex_state = 6}, + [1047] = {.lex_state = 16}, + [1048] = {.lex_state = 62, .external_lex_state = 6}, + [1049] = {.lex_state = 62}, + [1050] = {.lex_state = 16}, + [1051] = {.lex_state = 16}, + [1052] = {.lex_state = 62}, + [1053] = {.lex_state = 62}, + [1054] = {.lex_state = 62, .external_lex_state = 6}, + [1055] = {.lex_state = 18, .external_lex_state = 7}, + [1056] = {.lex_state = 62}, + [1057] = {.lex_state = 15, .external_lex_state = 6}, + [1058] = {.lex_state = 15}, + [1059] = {.lex_state = 16}, + [1060] = {.lex_state = 18, .external_lex_state = 7}, + [1061] = {.lex_state = 15}, + [1062] = {.lex_state = 62}, + [1063] = {.lex_state = 16}, + [1064] = {.lex_state = 16}, + [1065] = {.lex_state = 62, .external_lex_state = 6}, + [1066] = {.lex_state = 62, .external_lex_state = 6}, + [1067] = {.lex_state = 18, .external_lex_state = 7}, + [1068] = {.lex_state = 15, .external_lex_state = 6}, + [1069] = {.lex_state = 18, .external_lex_state = 7}, + [1070] = {.lex_state = 16}, + [1071] = {.lex_state = 62}, + [1072] = {.lex_state = 18, .external_lex_state = 7}, + [1073] = {.lex_state = 16}, + [1074] = {.lex_state = 18, .external_lex_state = 7}, + [1075] = {.lex_state = 16}, + [1076] = {.lex_state = 18, .external_lex_state = 7}, + [1077] = {.lex_state = 16}, + [1078] = {.lex_state = 62, .external_lex_state = 6}, + [1079] = {.lex_state = 16}, + [1080] = {.lex_state = 16}, + [1081] = {.lex_state = 16}, + [1082] = {.lex_state = 62, .external_lex_state = 6}, + [1083] = {.lex_state = 16}, + [1084] = {.lex_state = 16}, + [1085] = {.lex_state = 16}, + [1086] = {.lex_state = 16}, + [1087] = {.lex_state = 16}, + [1088] = {.lex_state = 15, .external_lex_state = 6}, + [1089] = {.lex_state = 16}, + [1090] = {.lex_state = 62}, + [1091] = {.lex_state = 62}, + [1092] = {.lex_state = 62, .external_lex_state = 6}, + [1093] = {.lex_state = 62, .external_lex_state = 6}, + [1094] = {.lex_state = 62, .external_lex_state = 6}, + [1095] = {.lex_state = 62, .external_lex_state = 6}, + [1096] = {.lex_state = 62, .external_lex_state = 6}, + [1097] = {.lex_state = 16}, + [1098] = {.lex_state = 62}, + [1099] = {.lex_state = 8}, + [1100] = {.lex_state = 0}, + [1101] = {.lex_state = 15, .external_lex_state = 6}, + [1102] = {.lex_state = 62}, + [1103] = {.lex_state = 62}, + [1104] = {.lex_state = 16}, + [1105] = {.lex_state = 62, .external_lex_state = 6}, + [1106] = {.lex_state = 16}, + [1107] = {.lex_state = 16}, + [1108] = {.lex_state = 16}, + [1109] = {.lex_state = 62, .external_lex_state = 6}, + [1110] = {.lex_state = 16}, + [1111] = {.lex_state = 0}, + [1112] = {.lex_state = 62, .external_lex_state = 6}, + [1113] = {.lex_state = 62, .external_lex_state = 6}, + [1114] = {.lex_state = 0}, + [1115] = {.lex_state = 0}, + [1116] = {.lex_state = 62}, + [1117] = {.lex_state = 8}, + [1118] = {.lex_state = 62, .external_lex_state = 6}, + [1119] = {.lex_state = 62}, + [1120] = {.lex_state = 16}, + [1121] = {.lex_state = 62, .external_lex_state = 6}, + [1122] = {.lex_state = 62, .external_lex_state = 6}, + [1123] = {.lex_state = 16}, + [1124] = {.lex_state = 62}, + [1125] = {.lex_state = 8}, + [1126] = {.lex_state = 62}, + [1127] = {.lex_state = 62}, + [1128] = {.lex_state = 0}, + [1129] = {.lex_state = 62}, + [1130] = {.lex_state = 62}, + [1131] = {.lex_state = 0}, + [1132] = {.lex_state = 0}, + [1133] = {.lex_state = 16}, + [1134] = {.lex_state = 16}, + [1135] = {.lex_state = 16}, + [1136] = {.lex_state = 16}, + [1137] = {.lex_state = 0, .external_lex_state = 6}, + [1138] = {.lex_state = 0, .external_lex_state = 6}, + [1139] = {.lex_state = 16}, + [1140] = {.lex_state = 16}, + [1141] = {.lex_state = 16}, + [1142] = {.lex_state = 62}, + [1143] = {.lex_state = 0, .external_lex_state = 6}, + [1144] = {.lex_state = 15}, + [1145] = {.lex_state = 16}, + [1146] = {.lex_state = 0}, + [1147] = {.lex_state = 62}, + [1148] = {.lex_state = 16}, + [1149] = {.lex_state = 62}, + [1150] = {.lex_state = 0, .external_lex_state = 6}, + [1151] = {.lex_state = 16}, + [1152] = {.lex_state = 62}, + [1153] = {.lex_state = 16}, + [1154] = {.lex_state = 0, .external_lex_state = 6}, + [1155] = {.lex_state = 0, .external_lex_state = 6}, + [1156] = {.lex_state = 62, .external_lex_state = 6}, + [1157] = {.lex_state = 16}, + [1158] = {.lex_state = 16}, + [1159] = {.lex_state = 16}, + [1160] = {.lex_state = 0, .external_lex_state = 6}, + [1161] = {.lex_state = 62}, + [1162] = {.lex_state = 0, .external_lex_state = 6}, + [1163] = {.lex_state = 0, .external_lex_state = 6}, + [1164] = {.lex_state = 0, .external_lex_state = 6}, + [1165] = {.lex_state = 15}, + [1166] = {.lex_state = 0}, + [1167] = {.lex_state = 0}, + [1168] = {.lex_state = 16, .external_lex_state = 2}, + [1169] = {.lex_state = 62}, + [1170] = {.lex_state = 0}, + [1171] = {.lex_state = 0, .external_lex_state = 6}, + [1172] = {.lex_state = 0, .external_lex_state = 6}, + [1173] = {.lex_state = 16}, + [1174] = {.lex_state = 0, .external_lex_state = 6}, + [1175] = {.lex_state = 0}, + [1176] = {.lex_state = 0}, + [1177] = {.lex_state = 16}, + [1178] = {.lex_state = 16}, + [1179] = {.lex_state = 62}, + [1180] = {.lex_state = 62}, + [1181] = {.lex_state = 16}, + [1182] = {.lex_state = 62}, + [1183] = {.lex_state = 62, .external_lex_state = 6}, + [1184] = {.lex_state = 62}, + [1185] = {.lex_state = 62}, + [1186] = {.lex_state = 62}, + [1187] = {.lex_state = 62, .external_lex_state = 6}, + [1188] = {.lex_state = 62}, + [1189] = {.lex_state = 0, .external_lex_state = 6}, + [1190] = {.lex_state = 16}, + [1191] = {.lex_state = 0, .external_lex_state = 6}, + [1192] = {.lex_state = 0, .external_lex_state = 6}, + [1193] = {.lex_state = 62}, + [1194] = {.lex_state = 0, .external_lex_state = 6}, + [1195] = {.lex_state = 62}, + [1196] = {.lex_state = 0}, + [1197] = {.lex_state = 62}, + [1198] = {.lex_state = 0, .external_lex_state = 6}, + [1199] = {.lex_state = 62}, + [1200] = {.lex_state = 0, .external_lex_state = 6}, + [1201] = {.lex_state = 16}, + [1202] = {.lex_state = 0}, + [1203] = {.lex_state = 0}, + [1204] = {.lex_state = 16}, + [1205] = {.lex_state = 0}, + [1206] = {.lex_state = 0}, + [1207] = {.lex_state = 16}, + [1208] = {.lex_state = 0}, + [1209] = {.lex_state = 0, .external_lex_state = 6}, + [1210] = {.lex_state = 16}, + [1211] = {.lex_state = 0}, + [1212] = {.lex_state = 0}, + [1213] = {.lex_state = 0}, + [1214] = {.lex_state = 0, .external_lex_state = 6}, + [1215] = {.lex_state = 62}, + [1216] = {.lex_state = 0}, + [1217] = {.lex_state = 0}, + [1218] = {.lex_state = 0}, + [1219] = {.lex_state = 0}, + [1220] = {.lex_state = 0}, + [1221] = {.lex_state = 16}, + [1222] = {.lex_state = 8}, + [1223] = {.lex_state = 0, .external_lex_state = 6}, + [1224] = {.lex_state = 16}, + [1225] = {.lex_state = 0}, + [1226] = {.lex_state = 0, .external_lex_state = 6}, + [1227] = {.lex_state = 0}, + [1228] = {.lex_state = 0}, + [1229] = {.lex_state = 0}, + [1230] = {.lex_state = 0}, + [1231] = {.lex_state = 0, .external_lex_state = 6}, + [1232] = {.lex_state = 0}, + [1233] = {.lex_state = 0}, + [1234] = {.lex_state = 0}, + [1235] = {.lex_state = 0}, + [1236] = {.lex_state = 62}, + [1237] = {.lex_state = 0, .external_lex_state = 6}, + [1238] = {.lex_state = 0, .external_lex_state = 6}, + [1239] = {.lex_state = 0}, + [1240] = {.lex_state = 0}, + [1241] = {.lex_state = 0, .external_lex_state = 6}, + [1242] = {.lex_state = 0}, + [1243] = {.lex_state = 0}, + [1244] = {.lex_state = 0, .external_lex_state = 6}, + [1245] = {.lex_state = 62}, + [1246] = {.lex_state = 0, .external_lex_state = 6}, + [1247] = {.lex_state = 0}, + [1248] = {.lex_state = 0, .external_lex_state = 6}, + [1249] = {.lex_state = 0}, + [1250] = {.lex_state = 16}, + [1251] = {.lex_state = 0}, + [1252] = {.lex_state = 0}, + [1253] = {.lex_state = 8}, + [1254] = {.lex_state = 0, .external_lex_state = 6}, + [1255] = {.lex_state = 0}, + [1256] = {.lex_state = 0}, + [1257] = {.lex_state = 0}, + [1258] = {.lex_state = 0}, + [1259] = {.lex_state = 62}, + [1260] = {.lex_state = 16}, + [1261] = {.lex_state = 0, .external_lex_state = 6}, + [1262] = {.lex_state = 15}, + [1263] = {.lex_state = 0, .external_lex_state = 6}, + [1264] = {.lex_state = 0}, + [1265] = {.lex_state = 0}, + [1266] = {.lex_state = 16}, + [1267] = {.lex_state = 16}, + [1268] = {.lex_state = 0}, + [1269] = {.lex_state = 8}, + [1270] = {.lex_state = 16}, + [1271] = {.lex_state = 0}, + [1272] = {.lex_state = 0}, + [1273] = {.lex_state = 0}, + [1274] = {.lex_state = 0}, + [1275] = {.lex_state = 0}, + [1276] = {.lex_state = 62}, + [1277] = {.lex_state = 0}, + [1278] = {.lex_state = 16}, + [1279] = {.lex_state = 0}, + [1280] = {.lex_state = 0}, + [1281] = {.lex_state = 16}, + [1282] = {.lex_state = 0}, + [1283] = {.lex_state = 0}, + [1284] = {.lex_state = 16}, + [1285] = {.lex_state = 0}, + [1286] = {.lex_state = 16}, + [1287] = {.lex_state = 16}, + [1288] = {.lex_state = 62, .external_lex_state = 6}, + [1289] = {.lex_state = 0}, + [1290] = {.lex_state = 0}, + [1291] = {.lex_state = 62, .external_lex_state = 6}, + [1292] = {.lex_state = 0}, + [1293] = {.lex_state = 62}, + [1294] = {.lex_state = 0}, + [1295] = {.lex_state = 16}, + [1296] = {.lex_state = 0}, + [1297] = {.lex_state = 0}, + [1298] = {.lex_state = 0}, + [1299] = {.lex_state = 0}, + [1300] = {.lex_state = 0}, + [1301] = {.lex_state = 0}, + [1302] = {.lex_state = 0}, + [1303] = {.lex_state = 0}, + [1304] = {.lex_state = 0}, + [1305] = {.lex_state = 62}, + [1306] = {.lex_state = 62}, + [1307] = {.lex_state = 8}, + [1308] = {.lex_state = 16}, + [1309] = {.lex_state = 0, .external_lex_state = 6}, + [1310] = {.lex_state = 0}, + [1311] = {.lex_state = 0}, + [1312] = {.lex_state = 62}, + [1313] = {.lex_state = 0}, + [1314] = {.lex_state = 62}, + [1315] = {.lex_state = 16}, + [1316] = {.lex_state = 0}, + [1317] = {.lex_state = 62}, + [1318] = {.lex_state = 62, .external_lex_state = 6}, + [1319] = {.lex_state = 0, .external_lex_state = 6}, + [1320] = {.lex_state = 16}, + [1321] = {.lex_state = 0}, + [1322] = {.lex_state = 16}, + [1323] = {.lex_state = 0}, + [1324] = {.lex_state = 0}, + [1325] = {.lex_state = 0}, + [1326] = {.lex_state = 0}, + [1327] = {.lex_state = 0}, + [1328] = {.lex_state = 0}, + [1329] = {.lex_state = 62}, + [1330] = {.lex_state = 0}, + [1331] = {.lex_state = 0}, + [1332] = {.lex_state = 8}, + [1333] = {.lex_state = 16}, + [1334] = {.lex_state = 16}, + [1335] = {.lex_state = 62, .external_lex_state = 6}, + [1336] = {.lex_state = 0}, + [1337] = {.lex_state = 0}, + [1338] = {.lex_state = 62}, + [1339] = {.lex_state = 16}, + [1340] = {.lex_state = 16}, + [1341] = {.lex_state = 0}, + [1342] = {.lex_state = 0, .external_lex_state = 6}, + [1343] = {.lex_state = 0}, + [1344] = {.lex_state = 17}, + [1345] = {.lex_state = 0, .external_lex_state = 6}, + [1346] = {.lex_state = 0, .external_lex_state = 6}, + [1347] = {.lex_state = 16}, + [1348] = {.lex_state = 0, .external_lex_state = 6}, + [1349] = {.lex_state = 0, .external_lex_state = 6}, + [1350] = {.lex_state = 0, .external_lex_state = 6}, + [1351] = {.lex_state = 0, .external_lex_state = 6}, + [1352] = {.lex_state = 0}, + [1353] = {.lex_state = 62}, + [1354] = {.lex_state = 0}, + [1355] = {.lex_state = 0}, + [1356] = {.lex_state = 0}, + [1357] = {.lex_state = 62}, + [1358] = {.lex_state = 0}, + [1359] = {.lex_state = 0}, + [1360] = {.lex_state = 0}, + [1361] = {.lex_state = 0, .external_lex_state = 6}, + [1362] = {.lex_state = 0}, + [1363] = {.lex_state = 17}, + [1364] = {.lex_state = 0}, + [1365] = {.lex_state = 15}, + [1366] = {.lex_state = 0}, + [1367] = {.lex_state = 0}, + [1368] = {.lex_state = 0}, + [1369] = {.lex_state = 0, .external_lex_state = 6}, + [1370] = {.lex_state = 0}, + [1371] = {.lex_state = 17}, + [1372] = {.lex_state = 17}, + [1373] = {.lex_state = 0}, + [1374] = {.lex_state = 17}, + [1375] = {.lex_state = 17}, + [1376] = {.lex_state = 17}, + [1377] = {.lex_state = 17}, + [1378] = {.lex_state = 17}, + [1379] = {.lex_state = 0}, + [1380] = {.lex_state = 17}, + [1381] = {.lex_state = 0}, + [1382] = {.lex_state = 0}, + [1383] = {.lex_state = 0, .external_lex_state = 6}, + [1384] = {.lex_state = 0}, + [1385] = {.lex_state = 0, .external_lex_state = 6}, + [1386] = {.lex_state = 0, .external_lex_state = 6}, + [1387] = {.lex_state = 0}, + [1388] = {.lex_state = 0}, + [1389] = {.lex_state = 0, .external_lex_state = 6}, + [1390] = {.lex_state = 0}, + [1391] = {.lex_state = 0, .external_lex_state = 6}, + [1392] = {.lex_state = 0}, + [1393] = {.lex_state = 0, .external_lex_state = 6}, + [1394] = {.lex_state = 0, .external_lex_state = 6}, + [1395] = {.lex_state = 0, .external_lex_state = 6}, + [1396] = {.lex_state = 0}, + [1397] = {.lex_state = 0}, + [1398] = {.lex_state = 0}, + [1399] = {.lex_state = 0}, + [1400] = {.lex_state = 0, .external_lex_state = 6}, + [1401] = {.lex_state = 0}, + [1402] = {.lex_state = 0}, + [1403] = {.lex_state = 0}, + [1404] = {.lex_state = 0}, + [1405] = {.lex_state = 0}, + [1406] = {.lex_state = 0}, + [1407] = {.lex_state = 0}, + [1408] = {.lex_state = 62}, + [1409] = {.lex_state = 0}, + [1410] = {.lex_state = 0}, + [1411] = {.lex_state = 0}, + [1412] = {.lex_state = 0}, + [1413] = {.lex_state = 16}, + [1414] = {.lex_state = 0}, + [1415] = {.lex_state = 0}, + [1416] = {.lex_state = 62}, + [1417] = {.lex_state = 0}, + [1418] = {.lex_state = 0}, + [1419] = {.lex_state = 62}, + [1420] = {.lex_state = 0}, + [1421] = {.lex_state = 62}, + [1422] = {.lex_state = 16}, + [1423] = {.lex_state = 16}, + [1424] = {.lex_state = 0}, + [1425] = {.lex_state = 0}, + [1426] = {.lex_state = 0}, + [1427] = {.lex_state = 16}, + [1428] = {.lex_state = 16}, + [1429] = {.lex_state = 0}, + [1430] = {.lex_state = 62}, + [1431] = {.lex_state = 0}, + [1432] = {.lex_state = 0}, + [1433] = {.lex_state = 0}, + [1434] = {.lex_state = 0}, + [1435] = {.lex_state = 16}, + [1436] = {.lex_state = 62}, + [1437] = {.lex_state = 0}, + [1438] = {.lex_state = 0}, + [1439] = {.lex_state = 0}, + [1440] = {.lex_state = 62}, + [1441] = {.lex_state = 62}, + [1442] = {.lex_state = 0}, + [1443] = {.lex_state = 62}, + [1444] = {.lex_state = 62}, + [1445] = {.lex_state = 62}, + [1446] = {.lex_state = 62}, + [1447] = {.lex_state = 0}, + [1448] = {.lex_state = 62}, + [1449] = {.lex_state = 62}, + [1450] = {.lex_state = 62}, + [1451] = {.lex_state = 16}, + [1452] = {.lex_state = 16}, + [1453] = {.lex_state = 16}, + [1454] = {.lex_state = 62}, + [1455] = {.lex_state = 0}, + [1456] = {.lex_state = 62}, + [1457] = {.lex_state = 62}, + [1458] = {.lex_state = 16}, + [1459] = {.lex_state = 16}, + [1460] = {.lex_state = 0}, + [1461] = {.lex_state = 0}, + [1462] = {.lex_state = 0}, + [1463] = {.lex_state = 16}, + [1464] = {.lex_state = 0}, + [1465] = {.lex_state = 16}, + [1466] = {.lex_state = 62}, + [1467] = {.lex_state = 0}, + [1468] = {.lex_state = 16}, + [1469] = {.lex_state = 0}, + [1470] = {.lex_state = 16}, + [1471] = {.lex_state = 16}, + [1472] = {.lex_state = 16}, + [1473] = {.lex_state = 0}, + [1474] = {.lex_state = 16}, + [1475] = {.lex_state = 0}, + [1476] = {.lex_state = 16}, + [1477] = {.lex_state = 62}, + [1478] = {.lex_state = 16}, + [1479] = {.lex_state = 0}, + [1480] = {.lex_state = 16}, + [1481] = {.lex_state = 16}, + [1482] = {.lex_state = 16}, + [1483] = {.lex_state = 16}, + [1484] = {.lex_state = 0}, + [1485] = {.lex_state = 16}, + [1486] = {.lex_state = 16}, + [1487] = {.lex_state = 16}, + [1488] = {.lex_state = 62}, + [1489] = {.lex_state = 16}, + [1490] = {.lex_state = 62}, + [1491] = {.lex_state = 16}, + [1492] = {.lex_state = 0}, + [1493] = {.lex_state = 16}, + [1494] = {.lex_state = 62}, + [1495] = {.lex_state = 16}, + [1496] = {.lex_state = 0}, + [1497] = {.lex_state = 0}, + [1498] = {.lex_state = 62}, + [1499] = {.lex_state = 16}, + [1500] = {.lex_state = 62}, + [1501] = {.lex_state = 16}, + [1502] = {.lex_state = 0}, + [1503] = {.lex_state = 0}, + [1504] = {.lex_state = 0}, + [1505] = {.lex_state = 16}, + [1506] = {.lex_state = 16}, + [1507] = {.lex_state = 16}, + [1508] = {.lex_state = 62}, + [1509] = {.lex_state = 62}, + [1510] = {.lex_state = 62}, + [1511] = {.lex_state = 62}, + [1512] = {.lex_state = 16}, + [1513] = {.lex_state = 0}, + [1514] = {.lex_state = 62}, + [1515] = {.lex_state = 0}, + [1516] = {.lex_state = 62}, + [1517] = {.lex_state = 62}, + [1518] = {.lex_state = 16}, + [1519] = {.lex_state = 62}, + [1520] = {.lex_state = 62}, + [1521] = {.lex_state = 16}, + [1522] = {.lex_state = 62}, + [1523] = {.lex_state = 0}, + [1524] = {.lex_state = 16}, +}; + +enum { + ts_external_token__newline = 0, + ts_external_token__indent = 1, + ts_external_token__dedent = 2, + ts_external_token__string_start = 3, + ts_external_token__string_content = 4, + ts_external_token__string_end = 5, +}; + +static const TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = { + [ts_external_token__newline] = sym__newline, + [ts_external_token__indent] = sym__indent, + [ts_external_token__dedent] = sym__dedent, + [ts_external_token__string_start] = sym__string_start, + [ts_external_token__string_content] = sym__string_content, + [ts_external_token__string_end] = sym__string_end, +}; + +static const bool ts_external_scanner_states[8][EXTERNAL_TOKEN_COUNT] = { + [1] = { + [ts_external_token__newline] = true, + [ts_external_token__indent] = true, + [ts_external_token__dedent] = true, + [ts_external_token__string_start] = true, + [ts_external_token__string_content] = true, + [ts_external_token__string_end] = true, + }, + [2] = { + [ts_external_token__string_start] = true, + }, + [3] = { + [ts_external_token__dedent] = true, + [ts_external_token__string_start] = true, + }, + [4] = { + [ts_external_token__newline] = true, + [ts_external_token__string_start] = true, + }, + [5] = { + [ts_external_token__newline] = true, + [ts_external_token__indent] = true, + [ts_external_token__string_start] = true, + }, + [6] = { + [ts_external_token__newline] = true, + }, + [7] = { + [ts_external_token__string_content] = true, + [ts_external_token__string_end] = true, + }, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [0] = { + [ts_builtin_sym_end] = ACTIONS(1), + [sym_identifier] = ACTIONS(1), + [anon_sym_import] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [anon_sym_from] = ACTIONS(1), + [anon_sym___future__] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_as] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_print] = ACTIONS(1), + [anon_sym_GT_GT] = ACTIONS(1), + [anon_sym_assert] = ACTIONS(1), + [anon_sym_COLON_EQ] = ACTIONS(1), + [anon_sym_return] = ACTIONS(1), + [anon_sym_del] = ACTIONS(1), + [anon_sym_raise] = ACTIONS(1), + [anon_sym_pass] = ACTIONS(1), + [anon_sym_break] = ACTIONS(1), + [anon_sym_continue] = ACTIONS(1), + [anon_sym_if] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_elif] = ACTIONS(1), + [anon_sym_else] = ACTIONS(1), + [anon_sym_async] = ACTIONS(1), + [anon_sym_for] = ACTIONS(1), + [anon_sym_in] = ACTIONS(1), + [anon_sym_while] = ACTIONS(1), + [anon_sym_try] = ACTIONS(1), + [anon_sym_except] = ACTIONS(1), + [anon_sym_except_STAR] = ACTIONS(1), + [anon_sym_finally] = ACTIONS(1), + [anon_sym_with] = ACTIONS(1), + [anon_sym_match] = ACTIONS(1), + [anon_sym_case] = ACTIONS(1), + [anon_sym_PIPE] = ACTIONS(1), + [anon_sym_DASH] = ACTIONS(1), + [anon_sym_PLUS] = ACTIONS(1), + [sym_match_wildcard_pattern] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [anon_sym_STAR_STAR] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_def] = ACTIONS(1), + [anon_sym_DASH_GT] = ACTIONS(1), + [anon_sym_global] = ACTIONS(1), + [anon_sym_nonlocal] = ACTIONS(1), + [anon_sym_exec] = ACTIONS(1), + [anon_sym_type] = ACTIONS(1), + [anon_sym_class] = ACTIONS(1), + [anon_sym_AT] = ACTIONS(1), + [anon_sym_not] = ACTIONS(1), + [anon_sym_and] = ACTIONS(1), + [anon_sym_or] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_PERCENT] = ACTIONS(1), + [anon_sym_SLASH_SLASH] = ACTIONS(1), + [anon_sym_AMP] = ACTIONS(1), + [anon_sym_CARET] = ACTIONS(1), + [anon_sym_LT_LT] = ACTIONS(1), + [anon_sym_TILDE] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_LT_EQ] = ACTIONS(1), + [anon_sym_EQ_EQ] = ACTIONS(1), + [anon_sym_BANG_EQ] = ACTIONS(1), + [anon_sym_GT_EQ] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [anon_sym_LT_GT] = ACTIONS(1), + [anon_sym_is] = ACTIONS(1), + [anon_sym_lambda] = ACTIONS(1), + [anon_sym_PLUS_EQ] = ACTIONS(1), + [anon_sym_DASH_EQ] = ACTIONS(1), + [anon_sym_STAR_EQ] = ACTIONS(1), + [anon_sym_SLASH_EQ] = ACTIONS(1), + [anon_sym_AT_EQ] = ACTIONS(1), + [anon_sym_SLASH_SLASH_EQ] = ACTIONS(1), + [anon_sym_PERCENT_EQ] = ACTIONS(1), + [anon_sym_STAR_STAR_EQ] = ACTIONS(1), + [anon_sym_GT_GT_EQ] = ACTIONS(1), + [anon_sym_LT_LT_EQ] = ACTIONS(1), + [anon_sym_AMP_EQ] = ACTIONS(1), + [anon_sym_CARET_EQ] = ACTIONS(1), + [anon_sym_PIPE_EQ] = ACTIONS(1), + [anon_sym_yield] = ACTIONS(1), + [sym_ellipsis] = ACTIONS(1), + [anon_sym_LBRACE2] = ACTIONS(1), + [sym_type_conversion] = ACTIONS(1), + [sym_integer] = ACTIONS(1), + [sym_float] = ACTIONS(1), + [anon_sym_await] = ACTIONS(1), + [sym_true] = ACTIONS(1), + [sym_false] = ACTIONS(1), + [sym_none] = ACTIONS(1), + [sym_comment] = ACTIONS(3), + [sym__semicolon] = ACTIONS(1), + [sym__newline] = ACTIONS(1), + [sym__indent] = ACTIONS(1), + [sym__dedent] = ACTIONS(1), + [sym__string_start] = ACTIONS(1), + [sym__string_content] = ACTIONS(1), + [sym__string_end] = ACTIONS(1), + }, + [1] = { + [sym_module] = STATE(1502), + [sym__statement] = STATE(64), + [sym__simple_statements] = STATE(64), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_if_statement] = STATE(64), + [sym_for_statement] = STATE(64), + [sym_while_statement] = STATE(64), + [sym_try_statement] = STATE(64), + [sym_with_statement] = STATE(64), + [sym_match_statement] = STATE(64), + [sym_function_definition] = STATE(64), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_class_definition] = STATE(64), + [sym_decorated_definition] = STATE(64), + [sym_decorator] = STATE(1002), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(64), + [aux_sym_decorated_definition_repeat1] = STATE(1002), + [ts_builtin_sym_end] = ACTIONS(5), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(33), + [anon_sym_async] = ACTIONS(35), + [anon_sym_for] = ACTIONS(37), + [anon_sym_while] = ACTIONS(39), + [anon_sym_try] = ACTIONS(41), + [anon_sym_with] = ACTIONS(43), + [anon_sym_match] = ACTIONS(45), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(55), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(65), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(81), + }, + [2] = { + [sym__statement] = STATE(65), + [sym__simple_statements] = STATE(65), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(65), + [sym_for_statement] = STATE(65), + [sym_while_statement] = STATE(65), + [sym_try_statement] = STATE(65), + [sym_with_statement] = STATE(65), + [sym_match_statement] = STATE(65), + [sym_function_definition] = STATE(65), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(65), + [sym_decorated_definition] = STATE(65), + [sym_decorator] = STATE(996), + [sym_block] = STATE(357), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(65), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(101), + [sym__string_start] = ACTIONS(81), + }, + [3] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(587), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [4] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(540), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [5] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(534), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [6] = { + [sym__statement] = STATE(65), + [sym__simple_statements] = STATE(65), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(65), + [sym_for_statement] = STATE(65), + [sym_while_statement] = STATE(65), + [sym_try_statement] = STATE(65), + [sym_with_statement] = STATE(65), + [sym_match_statement] = STATE(65), + [sym_function_definition] = STATE(65), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(65), + [sym_decorated_definition] = STATE(65), + [sym_decorator] = STATE(996), + [sym_block] = STATE(373), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(65), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(101), + [sym__string_start] = ACTIONS(81), + }, + [7] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(403), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [8] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(509), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [9] = { + [sym__statement] = STATE(62), + [sym__simple_statements] = STATE(62), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(62), + [sym_for_statement] = STATE(62), + [sym_while_statement] = STATE(62), + [sym_try_statement] = STATE(62), + [sym_with_statement] = STATE(62), + [sym_match_statement] = STATE(62), + [sym_function_definition] = STATE(62), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(62), + [sym_decorated_definition] = STATE(62), + [sym_decorator] = STATE(996), + [sym_block] = STATE(372), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(62), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(105), + [sym__string_start] = ACTIONS(81), + }, + [10] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(546), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [11] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(279), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [12] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(491), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [13] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(495), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [14] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(506), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [15] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(505), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [16] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(408), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [17] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(536), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [18] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(488), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [19] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(556), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [20] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(528), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [21] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(414), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [22] = { + [sym__statement] = STATE(65), + [sym__simple_statements] = STATE(65), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(65), + [sym_for_statement] = STATE(65), + [sym_while_statement] = STATE(65), + [sym_try_statement] = STATE(65), + [sym_with_statement] = STATE(65), + [sym_match_statement] = STATE(65), + [sym_function_definition] = STATE(65), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(65), + [sym_decorated_definition] = STATE(65), + [sym_decorator] = STATE(996), + [sym_block] = STATE(366), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(65), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(101), + [sym__string_start] = ACTIONS(81), + }, + [23] = { + [sym__statement] = STATE(62), + [sym__simple_statements] = STATE(62), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(62), + [sym_for_statement] = STATE(62), + [sym_while_statement] = STATE(62), + [sym_try_statement] = STATE(62), + [sym_with_statement] = STATE(62), + [sym_match_statement] = STATE(62), + [sym_function_definition] = STATE(62), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(62), + [sym_decorated_definition] = STATE(62), + [sym_decorator] = STATE(996), + [sym_block] = STATE(363), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(62), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(105), + [sym__string_start] = ACTIONS(81), + }, + [24] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(512), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [25] = { + [sym__statement] = STATE(60), + [sym__simple_statements] = STATE(60), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(60), + [sym_for_statement] = STATE(60), + [sym_while_statement] = STATE(60), + [sym_try_statement] = STATE(60), + [sym_with_statement] = STATE(60), + [sym_match_statement] = STATE(60), + [sym_function_definition] = STATE(60), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(60), + [sym_decorated_definition] = STATE(60), + [sym_decorator] = STATE(996), + [sym_block] = STATE(320), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(60), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(109), + [sym__string_start] = ACTIONS(81), + }, + [26] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(590), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [27] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(494), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [28] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(557), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [29] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(549), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [30] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(586), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [31] = { + [sym__statement] = STATE(60), + [sym__simple_statements] = STATE(60), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(60), + [sym_for_statement] = STATE(60), + [sym_while_statement] = STATE(60), + [sym_try_statement] = STATE(60), + [sym_with_statement] = STATE(60), + [sym_match_statement] = STATE(60), + [sym_function_definition] = STATE(60), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(60), + [sym_decorated_definition] = STATE(60), + [sym_decorator] = STATE(996), + [sym_block] = STATE(328), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(60), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(109), + [sym__string_start] = ACTIONS(81), + }, + [32] = { + [sym__statement] = STATE(66), + [sym__simple_statements] = STATE(66), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(66), + [sym_for_statement] = STATE(66), + [sym_while_statement] = STATE(66), + [sym_try_statement] = STATE(66), + [sym_with_statement] = STATE(66), + [sym_match_statement] = STATE(66), + [sym_function_definition] = STATE(66), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(66), + [sym_decorated_definition] = STATE(66), + [sym_decorator] = STATE(996), + [sym_block] = STATE(329), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(66), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(111), + [sym__string_start] = ACTIONS(81), + }, + [33] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(583), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [34] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(418), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [35] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(489), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [36] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(498), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [37] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(555), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [38] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(565), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [39] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(428), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [40] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(515), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [41] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(574), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [42] = { + [sym__statement] = STATE(66), + [sym__simple_statements] = STATE(66), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(66), + [sym_for_statement] = STATE(66), + [sym_while_statement] = STATE(66), + [sym_try_statement] = STATE(66), + [sym_with_statement] = STATE(66), + [sym_match_statement] = STATE(66), + [sym_function_definition] = STATE(66), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(66), + [sym_decorated_definition] = STATE(66), + [sym_decorator] = STATE(996), + [sym_block] = STATE(318), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(66), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(111), + [sym__string_start] = ACTIONS(81), + }, + [43] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(513), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [44] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(533), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [45] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(573), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [46] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(427), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [47] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(387), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [48] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(496), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [49] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(566), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [50] = { + [sym__statement] = STATE(60), + [sym__simple_statements] = STATE(60), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(60), + [sym_for_statement] = STATE(60), + [sym_while_statement] = STATE(60), + [sym_try_statement] = STATE(60), + [sym_with_statement] = STATE(60), + [sym_match_statement] = STATE(60), + [sym_function_definition] = STATE(60), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(60), + [sym_decorated_definition] = STATE(60), + [sym_decorator] = STATE(996), + [sym_block] = STATE(333), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(60), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(109), + [sym__string_start] = ACTIONS(81), + }, + [51] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(407), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [52] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(579), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [53] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(581), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [54] = { + [sym__statement] = STATE(69), + [sym__simple_statements] = STATE(69), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(69), + [sym_for_statement] = STATE(69), + [sym_while_statement] = STATE(69), + [sym_try_statement] = STATE(69), + [sym_with_statement] = STATE(69), + [sym_match_statement] = STATE(69), + [sym_function_definition] = STATE(69), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(69), + [sym_decorated_definition] = STATE(69), + [sym_decorator] = STATE(996), + [sym_block] = STATE(1003), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(69), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(113), + [sym__string_start] = ACTIONS(81), + }, + [55] = { + [sym__statement] = STATE(69), + [sym__simple_statements] = STATE(69), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(69), + [sym_for_statement] = STATE(69), + [sym_while_statement] = STATE(69), + [sym_try_statement] = STATE(69), + [sym_with_statement] = STATE(69), + [sym_match_statement] = STATE(69), + [sym_function_definition] = STATE(69), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(69), + [sym_decorated_definition] = STATE(69), + [sym_decorator] = STATE(996), + [sym_block] = STATE(983), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(69), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(113), + [sym__string_start] = ACTIONS(81), + }, + [56] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(265), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [57] = { + [sym__statement] = STATE(61), + [sym__simple_statements] = STATE(61), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(61), + [sym_for_statement] = STATE(61), + [sym_while_statement] = STATE(61), + [sym_try_statement] = STATE(61), + [sym_with_statement] = STATE(61), + [sym_match_statement] = STATE(61), + [sym_function_definition] = STATE(61), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(61), + [sym_decorated_definition] = STATE(61), + [sym_decorator] = STATE(996), + [sym_block] = STATE(561), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(61), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(107), + [sym__string_start] = ACTIONS(81), + }, + [58] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(517), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [59] = { + [sym__statement] = STATE(68), + [sym__simple_statements] = STATE(68), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(68), + [sym_for_statement] = STATE(68), + [sym_while_statement] = STATE(68), + [sym_try_statement] = STATE(68), + [sym_with_statement] = STATE(68), + [sym_match_statement] = STATE(68), + [sym_function_definition] = STATE(68), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(68), + [sym_decorated_definition] = STATE(68), + [sym_decorator] = STATE(996), + [sym_block] = STATE(554), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(68), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(103), + [sym__string_start] = ACTIONS(81), + }, + [60] = { + [sym__statement] = STATE(63), + [sym__simple_statements] = STATE(63), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(63), + [sym_for_statement] = STATE(63), + [sym_while_statement] = STATE(63), + [sym_try_statement] = STATE(63), + [sym_with_statement] = STATE(63), + [sym_match_statement] = STATE(63), + [sym_function_definition] = STATE(63), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(63), + [sym_decorated_definition] = STATE(63), + [sym_decorator] = STATE(996), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(63), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(115), + [sym__string_start] = ACTIONS(81), + }, + [61] = { + [sym__statement] = STATE(63), + [sym__simple_statements] = STATE(63), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(63), + [sym_for_statement] = STATE(63), + [sym_while_statement] = STATE(63), + [sym_try_statement] = STATE(63), + [sym_with_statement] = STATE(63), + [sym_match_statement] = STATE(63), + [sym_function_definition] = STATE(63), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(63), + [sym_decorated_definition] = STATE(63), + [sym_decorator] = STATE(996), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(63), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(117), + [sym__string_start] = ACTIONS(81), + }, + [62] = { + [sym__statement] = STATE(63), + [sym__simple_statements] = STATE(63), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(63), + [sym_for_statement] = STATE(63), + [sym_while_statement] = STATE(63), + [sym_try_statement] = STATE(63), + [sym_with_statement] = STATE(63), + [sym_match_statement] = STATE(63), + [sym_function_definition] = STATE(63), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(63), + [sym_decorated_definition] = STATE(63), + [sym_decorator] = STATE(996), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(63), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(119), + [sym__string_start] = ACTIONS(81), + }, + [63] = { + [sym__statement] = STATE(63), + [sym__simple_statements] = STATE(63), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(63), + [sym_for_statement] = STATE(63), + [sym_while_statement] = STATE(63), + [sym_try_statement] = STATE(63), + [sym_with_statement] = STATE(63), + [sym_match_statement] = STATE(63), + [sym_function_definition] = STATE(63), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(63), + [sym_decorated_definition] = STATE(63), + [sym_decorator] = STATE(996), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(63), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(121), + [anon_sym_import] = ACTIONS(124), + [anon_sym_from] = ACTIONS(127), + [anon_sym_LPAREN] = ACTIONS(130), + [anon_sym_STAR] = ACTIONS(133), + [anon_sym_print] = ACTIONS(136), + [anon_sym_assert] = ACTIONS(139), + [anon_sym_return] = ACTIONS(142), + [anon_sym_del] = ACTIONS(145), + [anon_sym_raise] = ACTIONS(148), + [anon_sym_pass] = ACTIONS(151), + [anon_sym_break] = ACTIONS(154), + [anon_sym_continue] = ACTIONS(157), + [anon_sym_if] = ACTIONS(160), + [anon_sym_async] = ACTIONS(163), + [anon_sym_for] = ACTIONS(166), + [anon_sym_while] = ACTIONS(169), + [anon_sym_try] = ACTIONS(172), + [anon_sym_with] = ACTIONS(175), + [anon_sym_match] = ACTIONS(178), + [anon_sym_DASH] = ACTIONS(181), + [anon_sym_PLUS] = ACTIONS(181), + [anon_sym_LBRACK] = ACTIONS(184), + [anon_sym_LBRACE] = ACTIONS(187), + [anon_sym_STAR_STAR] = ACTIONS(190), + [anon_sym_def] = ACTIONS(193), + [anon_sym_global] = ACTIONS(196), + [anon_sym_nonlocal] = ACTIONS(199), + [anon_sym_exec] = ACTIONS(202), + [anon_sym_type] = ACTIONS(205), + [anon_sym_class] = ACTIONS(208), + [anon_sym_AT] = ACTIONS(211), + [anon_sym_not] = ACTIONS(214), + [anon_sym_TILDE] = ACTIONS(181), + [anon_sym_lambda] = ACTIONS(217), + [anon_sym_yield] = ACTIONS(220), + [sym_ellipsis] = ACTIONS(223), + [sym_integer] = ACTIONS(226), + [sym_float] = ACTIONS(223), + [anon_sym_await] = ACTIONS(229), + [sym_true] = ACTIONS(226), + [sym_false] = ACTIONS(226), + [sym_none] = ACTIONS(226), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(232), + [sym__string_start] = ACTIONS(234), + }, + [64] = { + [sym__statement] = STATE(67), + [sym__simple_statements] = STATE(67), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_if_statement] = STATE(67), + [sym_for_statement] = STATE(67), + [sym_while_statement] = STATE(67), + [sym_try_statement] = STATE(67), + [sym_with_statement] = STATE(67), + [sym_match_statement] = STATE(67), + [sym_function_definition] = STATE(67), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_class_definition] = STATE(67), + [sym_decorated_definition] = STATE(67), + [sym_decorator] = STATE(1002), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(67), + [aux_sym_decorated_definition_repeat1] = STATE(1002), + [ts_builtin_sym_end] = ACTIONS(237), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(33), + [anon_sym_async] = ACTIONS(35), + [anon_sym_for] = ACTIONS(37), + [anon_sym_while] = ACTIONS(39), + [anon_sym_try] = ACTIONS(41), + [anon_sym_with] = ACTIONS(43), + [anon_sym_match] = ACTIONS(45), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(55), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(65), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(81), + }, + [65] = { + [sym__statement] = STATE(63), + [sym__simple_statements] = STATE(63), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(63), + [sym_for_statement] = STATE(63), + [sym_while_statement] = STATE(63), + [sym_try_statement] = STATE(63), + [sym_with_statement] = STATE(63), + [sym_match_statement] = STATE(63), + [sym_function_definition] = STATE(63), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(63), + [sym_decorated_definition] = STATE(63), + [sym_decorator] = STATE(996), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(63), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(239), + [sym__string_start] = ACTIONS(81), + }, + [66] = { + [sym__statement] = STATE(63), + [sym__simple_statements] = STATE(63), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(63), + [sym_for_statement] = STATE(63), + [sym_while_statement] = STATE(63), + [sym_try_statement] = STATE(63), + [sym_with_statement] = STATE(63), + [sym_match_statement] = STATE(63), + [sym_function_definition] = STATE(63), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(63), + [sym_decorated_definition] = STATE(63), + [sym_decorator] = STATE(996), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(63), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(241), + [sym__string_start] = ACTIONS(81), + }, + [67] = { + [sym__statement] = STATE(67), + [sym__simple_statements] = STATE(67), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_if_statement] = STATE(67), + [sym_for_statement] = STATE(67), + [sym_while_statement] = STATE(67), + [sym_try_statement] = STATE(67), + [sym_with_statement] = STATE(67), + [sym_match_statement] = STATE(67), + [sym_function_definition] = STATE(67), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_class_definition] = STATE(67), + [sym_decorated_definition] = STATE(67), + [sym_decorator] = STATE(1002), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(67), + [aux_sym_decorated_definition_repeat1] = STATE(1002), + [ts_builtin_sym_end] = ACTIONS(232), + [sym_identifier] = ACTIONS(121), + [anon_sym_import] = ACTIONS(124), + [anon_sym_from] = ACTIONS(127), + [anon_sym_LPAREN] = ACTIONS(130), + [anon_sym_STAR] = ACTIONS(133), + [anon_sym_print] = ACTIONS(136), + [anon_sym_assert] = ACTIONS(139), + [anon_sym_return] = ACTIONS(142), + [anon_sym_del] = ACTIONS(145), + [anon_sym_raise] = ACTIONS(148), + [anon_sym_pass] = ACTIONS(151), + [anon_sym_break] = ACTIONS(154), + [anon_sym_continue] = ACTIONS(157), + [anon_sym_if] = ACTIONS(243), + [anon_sym_async] = ACTIONS(246), + [anon_sym_for] = ACTIONS(249), + [anon_sym_while] = ACTIONS(252), + [anon_sym_try] = ACTIONS(255), + [anon_sym_with] = ACTIONS(258), + [anon_sym_match] = ACTIONS(261), + [anon_sym_DASH] = ACTIONS(181), + [anon_sym_PLUS] = ACTIONS(181), + [anon_sym_LBRACK] = ACTIONS(184), + [anon_sym_LBRACE] = ACTIONS(187), + [anon_sym_STAR_STAR] = ACTIONS(190), + [anon_sym_def] = ACTIONS(264), + [anon_sym_global] = ACTIONS(196), + [anon_sym_nonlocal] = ACTIONS(199), + [anon_sym_exec] = ACTIONS(202), + [anon_sym_type] = ACTIONS(205), + [anon_sym_class] = ACTIONS(267), + [anon_sym_AT] = ACTIONS(211), + [anon_sym_not] = ACTIONS(214), + [anon_sym_TILDE] = ACTIONS(181), + [anon_sym_lambda] = ACTIONS(217), + [anon_sym_yield] = ACTIONS(220), + [sym_ellipsis] = ACTIONS(223), + [sym_integer] = ACTIONS(226), + [sym_float] = ACTIONS(223), + [anon_sym_await] = ACTIONS(229), + [sym_true] = ACTIONS(226), + [sym_false] = ACTIONS(226), + [sym_none] = ACTIONS(226), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(234), + }, + [68] = { + [sym__statement] = STATE(63), + [sym__simple_statements] = STATE(63), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(63), + [sym_for_statement] = STATE(63), + [sym_while_statement] = STATE(63), + [sym_try_statement] = STATE(63), + [sym_with_statement] = STATE(63), + [sym_match_statement] = STATE(63), + [sym_function_definition] = STATE(63), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(63), + [sym_decorated_definition] = STATE(63), + [sym_decorator] = STATE(996), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(63), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(270), + [sym__string_start] = ACTIONS(81), + }, + [69] = { + [sym__statement] = STATE(63), + [sym__simple_statements] = STATE(63), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_if_statement] = STATE(63), + [sym_for_statement] = STATE(63), + [sym_while_statement] = STATE(63), + [sym_try_statement] = STATE(63), + [sym_with_statement] = STATE(63), + [sym_match_statement] = STATE(63), + [sym_function_definition] = STATE(63), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_class_definition] = STATE(63), + [sym_decorated_definition] = STATE(63), + [sym_decorator] = STATE(996), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [aux_sym_module_repeat1] = STATE(63), + [aux_sym_decorated_definition_repeat1] = STATE(996), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_if] = ACTIONS(83), + [anon_sym_async] = ACTIONS(85), + [anon_sym_for] = ACTIONS(87), + [anon_sym_while] = ACTIONS(89), + [anon_sym_try] = ACTIONS(91), + [anon_sym_with] = ACTIONS(93), + [anon_sym_match] = ACTIONS(95), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_def] = ACTIONS(97), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_class] = ACTIONS(99), + [anon_sym_AT] = ACTIONS(67), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__dedent] = ACTIONS(272), + [sym__string_start] = ACTIONS(81), + }, + [70] = { + [sym_named_expression] = STATE(900), + [sym_list_splat] = STATE(1366), + [sym_dictionary_splat] = STATE(1366), + [sym_expression_list] = STATE(1452), + [sym_expression] = STATE(1079), + [sym_primary_expression] = STATE(630), + [sym_not_operator] = STATE(900), + [sym_boolean_operator] = STATE(900), + [sym_binary_operator] = STATE(642), + [sym_unary_operator] = STATE(642), + [sym_comparison_operator] = STATE(900), + [sym_lambda] = STATE(900), + [sym_attribute] = STATE(642), + [sym_subscript] = STATE(642), + [sym_call] = STATE(642), + [sym_list] = STATE(642), + [sym_set] = STATE(642), + [sym_tuple] = STATE(642), + [sym_dictionary] = STATE(642), + [sym_list_comprehension] = STATE(642), + [sym_dictionary_comprehension] = STATE(642), + [sym_set_comprehension] = STATE(642), + [sym_generator_expression] = STATE(642), + [sym_parenthesized_expression] = STATE(642), + [sym_conditional_expression] = STATE(900), + [sym_concatenated_string] = STATE(642), + [sym_string] = STATE(600), + [sym_await] = STATE(900), + [sym_identifier] = ACTIONS(274), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(278), + [anon_sym_COMMA] = ACTIONS(280), + [anon_sym_STAR] = ACTIONS(283), + [anon_sym_print] = ACTIONS(285), + [anon_sym_GT_GT] = ACTIONS(276), + [anon_sym_COLON_EQ] = ACTIONS(287), + [anon_sym_if] = ACTIONS(276), + [anon_sym_COLON] = ACTIONS(289), + [anon_sym_async] = ACTIONS(285), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(285), + [anon_sym_PIPE] = ACTIONS(276), + [anon_sym_DASH] = ACTIONS(291), + [anon_sym_PLUS] = ACTIONS(291), + [anon_sym_LBRACK] = ACTIONS(293), + [anon_sym_LBRACE] = ACTIONS(295), + [anon_sym_STAR_STAR] = ACTIONS(297), + [anon_sym_EQ] = ACTIONS(289), + [anon_sym_exec] = ACTIONS(285), + [anon_sym_type] = ACTIONS(285), + [anon_sym_AT] = ACTIONS(276), + [anon_sym_not] = ACTIONS(299), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(276), + [anon_sym_SLASH_SLASH] = ACTIONS(276), + [anon_sym_AMP] = ACTIONS(276), + [anon_sym_CARET] = ACTIONS(276), + [anon_sym_LT_LT] = ACTIONS(276), + [anon_sym_TILDE] = ACTIONS(301), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(305), + [anon_sym_PLUS_EQ] = ACTIONS(307), + [anon_sym_DASH_EQ] = ACTIONS(307), + [anon_sym_STAR_EQ] = ACTIONS(307), + [anon_sym_SLASH_EQ] = ACTIONS(307), + [anon_sym_AT_EQ] = ACTIONS(307), + [anon_sym_SLASH_SLASH_EQ] = ACTIONS(307), + [anon_sym_PERCENT_EQ] = ACTIONS(307), + [anon_sym_STAR_STAR_EQ] = ACTIONS(307), + [anon_sym_GT_GT_EQ] = ACTIONS(307), + [anon_sym_LT_LT_EQ] = ACTIONS(307), + [anon_sym_AMP_EQ] = ACTIONS(307), + [anon_sym_CARET_EQ] = ACTIONS(307), + [anon_sym_PIPE_EQ] = ACTIONS(307), + [sym_ellipsis] = ACTIONS(309), + [sym_integer] = ACTIONS(311), + [sym_float] = ACTIONS(309), + [anon_sym_await] = ACTIONS(313), + [sym_true] = ACTIONS(311), + [sym_false] = ACTIONS(311), + [sym_none] = ACTIONS(311), + [sym_comment] = ACTIONS(3), + [sym__semicolon] = ACTIONS(303), + [sym__newline] = ACTIONS(303), + [sym__string_start] = ACTIONS(315), + }, + [71] = { + [sym_named_expression] = STATE(900), + [sym_list_splat] = STATE(1366), + [sym_dictionary_splat] = STATE(1366), + [sym_expression_list] = STATE(1493), + [sym_expression] = STATE(1080), + [sym_primary_expression] = STATE(630), + [sym_not_operator] = STATE(900), + [sym_boolean_operator] = STATE(900), + [sym_binary_operator] = STATE(642), + [sym_unary_operator] = STATE(642), + [sym_comparison_operator] = STATE(900), + [sym_lambda] = STATE(900), + [sym_attribute] = STATE(642), + [sym_subscript] = STATE(642), + [sym_call] = STATE(642), + [sym_list] = STATE(642), + [sym_set] = STATE(642), + [sym_tuple] = STATE(642), + [sym_dictionary] = STATE(642), + [sym_list_comprehension] = STATE(642), + [sym_dictionary_comprehension] = STATE(642), + [sym_set_comprehension] = STATE(642), + [sym_generator_expression] = STATE(642), + [sym_parenthesized_expression] = STATE(642), + [sym_conditional_expression] = STATE(900), + [sym_concatenated_string] = STATE(642), + [sym_string] = STATE(600), + [sym_await] = STATE(900), + [sym_identifier] = ACTIONS(274), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(278), + [anon_sym_COMMA] = ACTIONS(280), + [anon_sym_STAR] = ACTIONS(283), + [anon_sym_print] = ACTIONS(285), + [anon_sym_GT_GT] = ACTIONS(276), + [anon_sym_COLON_EQ] = ACTIONS(287), + [anon_sym_if] = ACTIONS(276), + [anon_sym_COLON] = ACTIONS(289), + [anon_sym_async] = ACTIONS(285), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(285), + [anon_sym_PIPE] = ACTIONS(276), + [anon_sym_DASH] = ACTIONS(291), + [anon_sym_PLUS] = ACTIONS(291), + [anon_sym_LBRACK] = ACTIONS(293), + [anon_sym_LBRACE] = ACTIONS(295), + [anon_sym_STAR_STAR] = ACTIONS(297), + [anon_sym_EQ] = ACTIONS(289), + [anon_sym_exec] = ACTIONS(285), + [anon_sym_type] = ACTIONS(285), + [anon_sym_AT] = ACTIONS(276), + [anon_sym_not] = ACTIONS(299), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(276), + [anon_sym_SLASH_SLASH] = ACTIONS(276), + [anon_sym_AMP] = ACTIONS(276), + [anon_sym_CARET] = ACTIONS(276), + [anon_sym_LT_LT] = ACTIONS(276), + [anon_sym_TILDE] = ACTIONS(301), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(305), + [anon_sym_PLUS_EQ] = ACTIONS(307), + [anon_sym_DASH_EQ] = ACTIONS(307), + [anon_sym_STAR_EQ] = ACTIONS(307), + [anon_sym_SLASH_EQ] = ACTIONS(307), + [anon_sym_AT_EQ] = ACTIONS(307), + [anon_sym_SLASH_SLASH_EQ] = ACTIONS(307), + [anon_sym_PERCENT_EQ] = ACTIONS(307), + [anon_sym_STAR_STAR_EQ] = ACTIONS(307), + [anon_sym_GT_GT_EQ] = ACTIONS(307), + [anon_sym_LT_LT_EQ] = ACTIONS(307), + [anon_sym_AMP_EQ] = ACTIONS(307), + [anon_sym_CARET_EQ] = ACTIONS(307), + [anon_sym_PIPE_EQ] = ACTIONS(307), + [sym_ellipsis] = ACTIONS(309), + [sym_integer] = ACTIONS(311), + [sym_float] = ACTIONS(309), + [anon_sym_await] = ACTIONS(313), + [sym_true] = ACTIONS(311), + [sym_false] = ACTIONS(311), + [sym_none] = ACTIONS(311), + [sym_comment] = ACTIONS(3), + [sym__semicolon] = ACTIONS(303), + [sym__newline] = ACTIONS(303), + [sym__string_start] = ACTIONS(315), + }, + [72] = { + [sym__simple_statements] = STATE(550), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(319), + [sym__indent] = ACTIONS(321), + [sym__string_start] = ACTIONS(81), + }, + [73] = { + [sym__simple_statements] = STATE(432), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(323), + [sym__indent] = ACTIONS(325), + [sym__string_start] = ACTIONS(81), + }, + [74] = { + [sym__simple_statements] = STATE(327), + [sym_import_statement] = STATE(1248), + [sym_future_import_statement] = STATE(1248), + [sym_import_from_statement] = STATE(1248), + [sym_print_statement] = STATE(1248), + [sym_assert_statement] = STATE(1248), + [sym_expression_statement] = STATE(1248), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1248), + [sym_delete_statement] = STATE(1248), + [sym_raise_statement] = STATE(1248), + [sym_pass_statement] = STATE(1248), + [sym_break_statement] = STATE(1248), + [sym_continue_statement] = STATE(1248), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1248), + [sym_nonlocal_statement] = STATE(1248), + [sym_exec_statement] = STATE(1248), + [sym_type_alias_statement] = STATE(1248), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(327), + [sym__indent] = ACTIONS(329), + [sym__string_start] = ACTIONS(81), + }, + [75] = { + [sym_chevron] = STATE(1150), + [sym_named_expression] = STATE(1009), + [sym_expression] = STATE(1043), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_attribute] = STATE(797), + [sym_subscript] = STATE(797), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(331), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(303), + [anon_sym_COMMA] = ACTIONS(280), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(333), + [anon_sym_GT_GT] = ACTIONS(335), + [anon_sym_COLON_EQ] = ACTIONS(287), + [anon_sym_if] = ACTIONS(276), + [anon_sym_COLON] = ACTIONS(289), + [anon_sym_async] = ACTIONS(333), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(333), + [anon_sym_PIPE] = ACTIONS(276), + [anon_sym_DASH] = ACTIONS(276), + [anon_sym_PLUS] = ACTIONS(276), + [anon_sym_LBRACK] = ACTIONS(303), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(276), + [anon_sym_EQ] = ACTIONS(289), + [anon_sym_exec] = ACTIONS(333), + [anon_sym_type] = ACTIONS(333), + [anon_sym_AT] = ACTIONS(276), + [anon_sym_not] = ACTIONS(276), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(276), + [anon_sym_SLASH_SLASH] = ACTIONS(276), + [anon_sym_AMP] = ACTIONS(276), + [anon_sym_CARET] = ACTIONS(276), + [anon_sym_LT_LT] = ACTIONS(276), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_PLUS_EQ] = ACTIONS(307), + [anon_sym_DASH_EQ] = ACTIONS(307), + [anon_sym_STAR_EQ] = ACTIONS(307), + [anon_sym_SLASH_EQ] = ACTIONS(307), + [anon_sym_AT_EQ] = ACTIONS(307), + [anon_sym_SLASH_SLASH_EQ] = ACTIONS(307), + [anon_sym_PERCENT_EQ] = ACTIONS(307), + [anon_sym_STAR_STAR_EQ] = ACTIONS(307), + [anon_sym_GT_GT_EQ] = ACTIONS(307), + [anon_sym_LT_LT_EQ] = ACTIONS(307), + [anon_sym_AMP_EQ] = ACTIONS(307), + [anon_sym_CARET_EQ] = ACTIONS(307), + [anon_sym_PIPE_EQ] = ACTIONS(307), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(337), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__semicolon] = ACTIONS(303), + [sym__newline] = ACTIONS(303), + [sym__string_start] = ACTIONS(81), + }, + [76] = { + [sym__simple_statements] = STATE(340), + [sym_import_statement] = STATE(1261), + [sym_future_import_statement] = STATE(1261), + [sym_import_from_statement] = STATE(1261), + [sym_print_statement] = STATE(1261), + [sym_assert_statement] = STATE(1261), + [sym_expression_statement] = STATE(1261), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1261), + [sym_delete_statement] = STATE(1261), + [sym_raise_statement] = STATE(1261), + [sym_pass_statement] = STATE(1261), + [sym_break_statement] = STATE(1261), + [sym_continue_statement] = STATE(1261), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1261), + [sym_nonlocal_statement] = STATE(1261), + [sym_exec_statement] = STATE(1261), + [sym_type_alias_statement] = STATE(1261), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(339), + [sym__indent] = ACTIONS(341), + [sym__string_start] = ACTIONS(81), + }, + [77] = { + [sym__simple_statements] = STATE(530), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(343), + [sym__indent] = ACTIONS(345), + [sym__string_start] = ACTIONS(81), + }, + [78] = { + [sym__simple_statements] = STATE(521), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(347), + [sym__indent] = ACTIONS(349), + [sym__string_start] = ACTIONS(81), + }, + [79] = { + [sym__simple_statements] = STATE(548), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(351), + [sym__indent] = ACTIONS(353), + [sym__string_start] = ACTIONS(81), + }, + [80] = { + [sym__simple_statements] = STATE(325), + [sym_import_statement] = STATE(1261), + [sym_future_import_statement] = STATE(1261), + [sym_import_from_statement] = STATE(1261), + [sym_print_statement] = STATE(1261), + [sym_assert_statement] = STATE(1261), + [sym_expression_statement] = STATE(1261), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1261), + [sym_delete_statement] = STATE(1261), + [sym_raise_statement] = STATE(1261), + [sym_pass_statement] = STATE(1261), + [sym_break_statement] = STATE(1261), + [sym_continue_statement] = STATE(1261), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1261), + [sym_nonlocal_statement] = STATE(1261), + [sym_exec_statement] = STATE(1261), + [sym_type_alias_statement] = STATE(1261), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(355), + [sym__indent] = ACTIONS(357), + [sym__string_start] = ACTIONS(81), + }, + [81] = { + [sym__simple_statements] = STATE(535), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(359), + [sym__indent] = ACTIONS(361), + [sym__string_start] = ACTIONS(81), + }, + [82] = { + [sym__simple_statements] = STATE(508), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(363), + [sym__indent] = ACTIONS(365), + [sym__string_start] = ACTIONS(81), + }, + [83] = { + [sym__simple_statements] = STATE(377), + [sym_import_statement] = STATE(1244), + [sym_future_import_statement] = STATE(1244), + [sym_import_from_statement] = STATE(1244), + [sym_print_statement] = STATE(1244), + [sym_assert_statement] = STATE(1244), + [sym_expression_statement] = STATE(1244), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1244), + [sym_delete_statement] = STATE(1244), + [sym_raise_statement] = STATE(1244), + [sym_pass_statement] = STATE(1244), + [sym_break_statement] = STATE(1244), + [sym_continue_statement] = STATE(1244), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1244), + [sym_nonlocal_statement] = STATE(1244), + [sym_exec_statement] = STATE(1244), + [sym_type_alias_statement] = STATE(1244), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(367), + [sym__indent] = ACTIONS(369), + [sym__string_start] = ACTIONS(81), + }, + [84] = { + [sym__simple_statements] = STATE(524), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(371), + [sym__indent] = ACTIONS(373), + [sym__string_start] = ACTIONS(81), + }, + [85] = { + [sym__simple_statements] = STATE(316), + [sym_import_statement] = STATE(1238), + [sym_future_import_statement] = STATE(1238), + [sym_import_from_statement] = STATE(1238), + [sym_print_statement] = STATE(1238), + [sym_assert_statement] = STATE(1238), + [sym_expression_statement] = STATE(1238), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1238), + [sym_delete_statement] = STATE(1238), + [sym_raise_statement] = STATE(1238), + [sym_pass_statement] = STATE(1238), + [sym_break_statement] = STATE(1238), + [sym_continue_statement] = STATE(1238), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1238), + [sym_nonlocal_statement] = STATE(1238), + [sym_exec_statement] = STATE(1238), + [sym_type_alias_statement] = STATE(1238), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(375), + [sym__indent] = ACTIONS(377), + [sym__string_start] = ACTIONS(81), + }, + [86] = { + [sym__simple_statements] = STATE(532), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(379), + [sym__indent] = ACTIONS(381), + [sym__string_start] = ACTIONS(81), + }, + [87] = { + [sym__simple_statements] = STATE(547), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(383), + [sym__indent] = ACTIONS(385), + [sym__string_start] = ACTIONS(81), + }, + [88] = { + [sym__simple_statements] = STATE(401), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(387), + [sym__indent] = ACTIONS(389), + [sym__string_start] = ACTIONS(81), + }, + [89] = { + [sym__simple_statements] = STATE(502), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(391), + [sym__indent] = ACTIONS(393), + [sym__string_start] = ACTIONS(81), + }, + [90] = { + [sym__simple_statements] = STATE(526), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(395), + [sym__indent] = ACTIONS(397), + [sym__string_start] = ACTIONS(81), + }, + [91] = { + [sym__simple_statements] = STATE(527), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(399), + [sym__indent] = ACTIONS(401), + [sym__string_start] = ACTIONS(81), + }, + [92] = { + [sym__simple_statements] = STATE(531), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(403), + [sym__indent] = ACTIONS(405), + [sym__string_start] = ACTIONS(81), + }, + [93] = { + [sym__simple_statements] = STATE(268), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(407), + [sym__indent] = ACTIONS(409), + [sym__string_start] = ACTIONS(81), + }, + [94] = { + [sym__simple_statements] = STATE(538), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(411), + [sym__indent] = ACTIONS(413), + [sym__string_start] = ACTIONS(81), + }, + [95] = { + [sym__simple_statements] = STATE(594), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(415), + [sym__indent] = ACTIONS(417), + [sym__string_start] = ACTIONS(81), + }, + [96] = { + [sym__simple_statements] = STATE(965), + [sym_import_statement] = STATE(1214), + [sym_future_import_statement] = STATE(1214), + [sym_import_from_statement] = STATE(1214), + [sym_print_statement] = STATE(1214), + [sym_assert_statement] = STATE(1214), + [sym_expression_statement] = STATE(1214), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1214), + [sym_delete_statement] = STATE(1214), + [sym_raise_statement] = STATE(1214), + [sym_pass_statement] = STATE(1214), + [sym_break_statement] = STATE(1214), + [sym_continue_statement] = STATE(1214), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1214), + [sym_nonlocal_statement] = STATE(1214), + [sym_exec_statement] = STATE(1214), + [sym_type_alias_statement] = STATE(1214), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(419), + [sym__indent] = ACTIONS(421), + [sym__string_start] = ACTIONS(81), + }, + [97] = { + [sym__simple_statements] = STATE(464), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(423), + [sym__indent] = ACTIONS(425), + [sym__string_start] = ACTIONS(81), + }, + [98] = { + [sym__simple_statements] = STATE(353), + [sym_import_statement] = STATE(1244), + [sym_future_import_statement] = STATE(1244), + [sym_import_from_statement] = STATE(1244), + [sym_print_statement] = STATE(1244), + [sym_assert_statement] = STATE(1244), + [sym_expression_statement] = STATE(1244), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1244), + [sym_delete_statement] = STATE(1244), + [sym_raise_statement] = STATE(1244), + [sym_pass_statement] = STATE(1244), + [sym_break_statement] = STATE(1244), + [sym_continue_statement] = STATE(1244), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1244), + [sym_nonlocal_statement] = STATE(1244), + [sym_exec_statement] = STATE(1244), + [sym_type_alias_statement] = STATE(1244), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(427), + [sym__indent] = ACTIONS(429), + [sym__string_start] = ACTIONS(81), + }, + [99] = { + [sym__simple_statements] = STATE(542), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(431), + [sym__indent] = ACTIONS(433), + [sym__string_start] = ACTIONS(81), + }, + [100] = { + [sym__simple_statements] = STATE(331), + [sym_import_statement] = STATE(1248), + [sym_future_import_statement] = STATE(1248), + [sym_import_from_statement] = STATE(1248), + [sym_print_statement] = STATE(1248), + [sym_assert_statement] = STATE(1248), + [sym_expression_statement] = STATE(1248), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1248), + [sym_delete_statement] = STATE(1248), + [sym_raise_statement] = STATE(1248), + [sym_pass_statement] = STATE(1248), + [sym_break_statement] = STATE(1248), + [sym_continue_statement] = STATE(1248), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1248), + [sym_nonlocal_statement] = STATE(1248), + [sym_exec_statement] = STATE(1248), + [sym_type_alias_statement] = STATE(1248), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(435), + [sym__indent] = ACTIONS(437), + [sym__string_start] = ACTIONS(81), + }, + [101] = { + [sym__simple_statements] = STATE(592), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(439), + [sym__indent] = ACTIONS(441), + [sym__string_start] = ACTIONS(81), + }, + [102] = { + [sym__simple_statements] = STATE(492), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(443), + [sym__indent] = ACTIONS(445), + [sym__string_start] = ACTIONS(81), + }, + [103] = { + [sym__simple_statements] = STATE(332), + [sym_import_statement] = STATE(1261), + [sym_future_import_statement] = STATE(1261), + [sym_import_from_statement] = STATE(1261), + [sym_print_statement] = STATE(1261), + [sym_assert_statement] = STATE(1261), + [sym_expression_statement] = STATE(1261), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1261), + [sym_delete_statement] = STATE(1261), + [sym_raise_statement] = STATE(1261), + [sym_pass_statement] = STATE(1261), + [sym_break_statement] = STATE(1261), + [sym_continue_statement] = STATE(1261), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1261), + [sym_nonlocal_statement] = STATE(1261), + [sym_exec_statement] = STATE(1261), + [sym_type_alias_statement] = STATE(1261), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(447), + [sym__indent] = ACTIONS(449), + [sym__string_start] = ACTIONS(81), + }, + [104] = { + [sym__simple_statements] = STATE(544), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(451), + [sym__indent] = ACTIONS(453), + [sym__string_start] = ACTIONS(81), + }, + [105] = { + [sym__simple_statements] = STATE(582), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(455), + [sym__indent] = ACTIONS(457), + [sym__string_start] = ACTIONS(81), + }, + [106] = { + [sym__simple_statements] = STATE(493), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(459), + [sym__indent] = ACTIONS(461), + [sym__string_start] = ACTIONS(81), + }, + [107] = { + [sym__simple_statements] = STATE(563), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(463), + [sym__indent] = ACTIONS(465), + [sym__string_start] = ACTIONS(81), + }, + [108] = { + [sym__simple_statements] = STATE(580), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(467), + [sym__indent] = ACTIONS(469), + [sym__string_start] = ACTIONS(81), + }, + [109] = { + [sym__simple_statements] = STATE(991), + [sym_import_statement] = STATE(1214), + [sym_future_import_statement] = STATE(1214), + [sym_import_from_statement] = STATE(1214), + [sym_print_statement] = STATE(1214), + [sym_assert_statement] = STATE(1214), + [sym_expression_statement] = STATE(1214), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1214), + [sym_delete_statement] = STATE(1214), + [sym_raise_statement] = STATE(1214), + [sym_pass_statement] = STATE(1214), + [sym_break_statement] = STATE(1214), + [sym_continue_statement] = STATE(1214), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1214), + [sym_nonlocal_statement] = STATE(1214), + [sym_exec_statement] = STATE(1214), + [sym_type_alias_statement] = STATE(1214), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(471), + [sym__indent] = ACTIONS(473), + [sym__string_start] = ACTIONS(81), + }, + [110] = { + [sym__simple_statements] = STATE(478), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(475), + [sym__indent] = ACTIONS(477), + [sym__string_start] = ACTIONS(81), + }, + [111] = { + [sym__simple_statements] = STATE(272), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(479), + [sym__indent] = ACTIONS(481), + [sym__string_start] = ACTIONS(81), + }, + [112] = { + [sym__simple_statements] = STATE(490), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(483), + [sym__indent] = ACTIONS(485), + [sym__string_start] = ACTIONS(81), + }, + [113] = { + [sym__simple_statements] = STATE(589), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(487), + [sym__indent] = ACTIONS(489), + [sym__string_start] = ACTIONS(81), + }, + [114] = { + [sym__simple_statements] = STATE(388), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(491), + [sym__indent] = ACTIONS(493), + [sym__string_start] = ACTIONS(81), + }, + [115] = { + [sym__simple_statements] = STATE(572), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(495), + [sym__indent] = ACTIONS(497), + [sym__string_start] = ACTIONS(81), + }, + [116] = { + [sym__simple_statements] = STATE(485), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(499), + [sym__indent] = ACTIONS(501), + [sym__string_start] = ACTIONS(81), + }, + [117] = { + [sym__simple_statements] = STATE(501), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(503), + [sym__indent] = ACTIONS(505), + [sym__string_start] = ACTIONS(81), + }, + [118] = { + [sym__simple_statements] = STATE(430), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(507), + [sym__indent] = ACTIONS(509), + [sym__string_start] = ACTIONS(81), + }, + [119] = { + [sym__simple_statements] = STATE(497), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(511), + [sym__indent] = ACTIONS(513), + [sym__string_start] = ACTIONS(81), + }, + [120] = { + [sym__simple_statements] = STATE(553), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(515), + [sym__indent] = ACTIONS(517), + [sym__string_start] = ACTIONS(81), + }, + [121] = { + [sym__simple_statements] = STATE(486), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(519), + [sym__indent] = ACTIONS(521), + [sym__string_start] = ACTIONS(81), + }, + [122] = { + [sym__simple_statements] = STATE(571), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(523), + [sym__indent] = ACTIONS(525), + [sym__string_start] = ACTIONS(81), + }, + [123] = { + [sym__simple_statements] = STATE(578), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(527), + [sym__indent] = ACTIONS(529), + [sym__string_start] = ACTIONS(81), + }, + [124] = { + [sym__simple_statements] = STATE(472), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(531), + [sym__indent] = ACTIONS(533), + [sym__string_start] = ACTIONS(81), + }, + [125] = { + [sym__simple_statements] = STATE(317), + [sym_import_statement] = STATE(1244), + [sym_future_import_statement] = STATE(1244), + [sym_import_from_statement] = STATE(1244), + [sym_print_statement] = STATE(1244), + [sym_assert_statement] = STATE(1244), + [sym_expression_statement] = STATE(1244), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1244), + [sym_delete_statement] = STATE(1244), + [sym_raise_statement] = STATE(1244), + [sym_pass_statement] = STATE(1244), + [sym_break_statement] = STATE(1244), + [sym_continue_statement] = STATE(1244), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1244), + [sym_nonlocal_statement] = STATE(1244), + [sym_exec_statement] = STATE(1244), + [sym_type_alias_statement] = STATE(1244), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(535), + [sym__indent] = ACTIONS(537), + [sym__string_start] = ACTIONS(81), + }, + [126] = { + [sym__simple_statements] = STATE(384), + [sym_import_statement] = STATE(1238), + [sym_future_import_statement] = STATE(1238), + [sym_import_from_statement] = STATE(1238), + [sym_print_statement] = STATE(1238), + [sym_assert_statement] = STATE(1238), + [sym_expression_statement] = STATE(1238), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1238), + [sym_delete_statement] = STATE(1238), + [sym_raise_statement] = STATE(1238), + [sym_pass_statement] = STATE(1238), + [sym_break_statement] = STATE(1238), + [sym_continue_statement] = STATE(1238), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1238), + [sym_nonlocal_statement] = STATE(1238), + [sym_exec_statement] = STATE(1238), + [sym_type_alias_statement] = STATE(1238), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(539), + [sym__indent] = ACTIONS(541), + [sym__string_start] = ACTIONS(81), + }, + [127] = { + [sym__simple_statements] = STATE(552), + [sym_import_statement] = STATE(1209), + [sym_future_import_statement] = STATE(1209), + [sym_import_from_statement] = STATE(1209), + [sym_print_statement] = STATE(1209), + [sym_assert_statement] = STATE(1209), + [sym_expression_statement] = STATE(1209), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1209), + [sym_delete_statement] = STATE(1209), + [sym_raise_statement] = STATE(1209), + [sym_pass_statement] = STATE(1209), + [sym_break_statement] = STATE(1209), + [sym_continue_statement] = STATE(1209), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1209), + [sym_nonlocal_statement] = STATE(1209), + [sym_exec_statement] = STATE(1209), + [sym_type_alias_statement] = STATE(1209), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(543), + [sym__indent] = ACTIONS(545), + [sym__string_start] = ACTIONS(81), + }, + [128] = { + [sym__simple_statements] = STATE(487), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(547), + [sym__indent] = ACTIONS(549), + [sym__string_start] = ACTIONS(81), + }, + [129] = { + [sym__simple_statements] = STATE(558), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(551), + [sym__indent] = ACTIONS(553), + [sym__string_start] = ACTIONS(81), + }, + [130] = { + [sym__simple_statements] = STATE(421), + [sym_import_statement] = STATE(1319), + [sym_future_import_statement] = STATE(1319), + [sym_import_from_statement] = STATE(1319), + [sym_print_statement] = STATE(1319), + [sym_assert_statement] = STATE(1319), + [sym_expression_statement] = STATE(1319), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1319), + [sym_delete_statement] = STATE(1319), + [sym_raise_statement] = STATE(1319), + [sym_pass_statement] = STATE(1319), + [sym_break_statement] = STATE(1319), + [sym_continue_statement] = STATE(1319), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1319), + [sym_nonlocal_statement] = STATE(1319), + [sym_exec_statement] = STATE(1319), + [sym_type_alias_statement] = STATE(1319), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(555), + [sym__indent] = ACTIONS(557), + [sym__string_start] = ACTIONS(81), + }, + [131] = { + [sym_named_expression] = STATE(1009), + [sym_expression] = STATE(976), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_attribute] = STATE(797), + [sym_subscript] = STATE(797), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(331), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(559), + [anon_sym_COMMA] = ACTIONS(280), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(333), + [anon_sym_GT_GT] = ACTIONS(276), + [anon_sym_COLON_EQ] = ACTIONS(287), + [anon_sym_if] = ACTIONS(276), + [anon_sym_COLON] = ACTIONS(289), + [anon_sym_async] = ACTIONS(333), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(333), + [anon_sym_PIPE] = ACTIONS(276), + [anon_sym_DASH] = ACTIONS(561), + [anon_sym_PLUS] = ACTIONS(561), + [anon_sym_LBRACK] = ACTIONS(563), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(276), + [anon_sym_EQ] = ACTIONS(289), + [anon_sym_exec] = ACTIONS(333), + [anon_sym_type] = ACTIONS(333), + [anon_sym_AT] = ACTIONS(276), + [anon_sym_not] = ACTIONS(69), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(276), + [anon_sym_SLASH_SLASH] = ACTIONS(276), + [anon_sym_AMP] = ACTIONS(276), + [anon_sym_CARET] = ACTIONS(276), + [anon_sym_LT_LT] = ACTIONS(276), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_PLUS_EQ] = ACTIONS(307), + [anon_sym_DASH_EQ] = ACTIONS(307), + [anon_sym_STAR_EQ] = ACTIONS(307), + [anon_sym_SLASH_EQ] = ACTIONS(307), + [anon_sym_AT_EQ] = ACTIONS(307), + [anon_sym_SLASH_SLASH_EQ] = ACTIONS(307), + [anon_sym_PERCENT_EQ] = ACTIONS(307), + [anon_sym_STAR_STAR_EQ] = ACTIONS(307), + [anon_sym_GT_GT_EQ] = ACTIONS(307), + [anon_sym_LT_LT_EQ] = ACTIONS(307), + [anon_sym_AMP_EQ] = ACTIONS(307), + [anon_sym_CARET_EQ] = ACTIONS(307), + [anon_sym_PIPE_EQ] = ACTIONS(307), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(337), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__semicolon] = ACTIONS(303), + [sym__newline] = ACTIONS(303), + [sym__string_start] = ACTIONS(81), + }, + [132] = { + [sym_named_expression] = STATE(900), + [sym_expression] = STATE(901), + [sym_primary_expression] = STATE(630), + [sym_not_operator] = STATE(900), + [sym_boolean_operator] = STATE(900), + [sym_binary_operator] = STATE(642), + [sym_unary_operator] = STATE(642), + [sym_comparison_operator] = STATE(900), + [sym_lambda] = STATE(900), + [sym_attribute] = STATE(642), + [sym_subscript] = STATE(642), + [sym_call] = STATE(642), + [sym_list] = STATE(642), + [sym_set] = STATE(642), + [sym_tuple] = STATE(642), + [sym_dictionary] = STATE(642), + [sym_list_comprehension] = STATE(642), + [sym_dictionary_comprehension] = STATE(642), + [sym_set_comprehension] = STATE(642), + [sym_generator_expression] = STATE(642), + [sym_parenthesized_expression] = STATE(642), + [sym_conditional_expression] = STATE(900), + [sym_concatenated_string] = STATE(642), + [sym_string] = STATE(600), + [sym_await] = STATE(900), + [sym_identifier] = ACTIONS(274), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(278), + [anon_sym_RPAREN] = ACTIONS(565), + [anon_sym_COMMA] = ACTIONS(565), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(285), + [anon_sym_GT_GT] = ACTIONS(276), + [anon_sym_COLON_EQ] = ACTIONS(568), + [anon_sym_if] = ACTIONS(276), + [anon_sym_COLON] = ACTIONS(570), + [anon_sym_async] = ACTIONS(285), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(285), + [anon_sym_PIPE] = ACTIONS(276), + [anon_sym_DASH] = ACTIONS(291), + [anon_sym_PLUS] = ACTIONS(291), + [anon_sym_LBRACK] = ACTIONS(293), + [anon_sym_RBRACK] = ACTIONS(565), + [anon_sym_LBRACE] = ACTIONS(295), + [anon_sym_STAR_STAR] = ACTIONS(276), + [anon_sym_EQ] = ACTIONS(570), + [anon_sym_exec] = ACTIONS(285), + [anon_sym_type] = ACTIONS(285), + [anon_sym_AT] = ACTIONS(276), + [anon_sym_not] = ACTIONS(299), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(276), + [anon_sym_SLASH_SLASH] = ACTIONS(276), + [anon_sym_AMP] = ACTIONS(276), + [anon_sym_CARET] = ACTIONS(276), + [anon_sym_LT_LT] = ACTIONS(276), + [anon_sym_TILDE] = ACTIONS(301), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(305), + [anon_sym_PLUS_EQ] = ACTIONS(572), + [anon_sym_DASH_EQ] = ACTIONS(572), + [anon_sym_STAR_EQ] = ACTIONS(572), + [anon_sym_SLASH_EQ] = ACTIONS(572), + [anon_sym_AT_EQ] = ACTIONS(572), + [anon_sym_SLASH_SLASH_EQ] = ACTIONS(572), + [anon_sym_PERCENT_EQ] = ACTIONS(572), + [anon_sym_STAR_STAR_EQ] = ACTIONS(572), + [anon_sym_GT_GT_EQ] = ACTIONS(572), + [anon_sym_LT_LT_EQ] = ACTIONS(572), + [anon_sym_AMP_EQ] = ACTIONS(572), + [anon_sym_CARET_EQ] = ACTIONS(572), + [anon_sym_PIPE_EQ] = ACTIONS(572), + [sym_ellipsis] = ACTIONS(309), + [sym_integer] = ACTIONS(311), + [sym_float] = ACTIONS(309), + [anon_sym_await] = ACTIONS(313), + [sym_true] = ACTIONS(311), + [sym_false] = ACTIONS(311), + [sym_none] = ACTIONS(311), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(315), + }, + [133] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(574), + [sym__string_start] = ACTIONS(81), + }, + [134] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(576), + [sym__string_start] = ACTIONS(81), + }, + [135] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(578), + [sym__string_start] = ACTIONS(81), + }, + [136] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(580), + [sym__string_start] = ACTIONS(81), + }, + [137] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(582), + [sym__string_start] = ACTIONS(81), + }, + [138] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(584), + [sym__string_start] = ACTIONS(81), + }, + [139] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(586), + [sym__string_start] = ACTIONS(81), + }, + [140] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(588), + [sym__string_start] = ACTIONS(81), + }, + [141] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(590), + [sym__string_start] = ACTIONS(81), + }, + [142] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(592), + [sym__string_start] = ACTIONS(81), + }, + [143] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(594), + [sym__string_start] = ACTIONS(81), + }, + [144] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(596), + [sym__string_start] = ACTIONS(81), + }, + [145] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(598), + [sym__string_start] = ACTIONS(81), + }, + [146] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__newline] = ACTIONS(600), + [sym__string_start] = ACTIONS(81), + }, + [147] = { + [sym_import_statement] = STATE(1351), + [sym_future_import_statement] = STATE(1351), + [sym_import_from_statement] = STATE(1351), + [sym_print_statement] = STATE(1351), + [sym_assert_statement] = STATE(1351), + [sym_expression_statement] = STATE(1351), + [sym_named_expression] = STATE(1009), + [sym_return_statement] = STATE(1351), + [sym_delete_statement] = STATE(1351), + [sym_raise_statement] = STATE(1351), + [sym_pass_statement] = STATE(1351), + [sym_break_statement] = STATE(1351), + [sym_continue_statement] = STATE(1351), + [sym_list_splat] = STATE(1360), + [sym_dictionary_splat] = STATE(1360), + [sym_global_statement] = STATE(1351), + [sym_nonlocal_statement] = STATE(1351), + [sym_exec_statement] = STATE(1351), + [sym_type_alias_statement] = STATE(1351), + [sym_expression_list] = STATE(1361), + [sym_pattern] = STATE(889), + [sym_tuple_pattern] = STATE(875), + [sym_list_pattern] = STATE(875), + [sym_list_splat_pattern] = STATE(875), + [sym_expression] = STATE(1019), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_assignment] = STATE(1361), + [sym_augmented_assignment] = STATE(1361), + [sym_pattern_list] = STATE(897), + [sym_yield] = STATE(1361), + [sym_attribute] = STATE(431), + [sym_subscript] = STATE(431), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_from] = ACTIONS(11), + [anon_sym_LPAREN] = ACTIONS(13), + [anon_sym_STAR] = ACTIONS(15), + [anon_sym_print] = ACTIONS(17), + [anon_sym_assert] = ACTIONS(19), + [anon_sym_return] = ACTIONS(21), + [anon_sym_del] = ACTIONS(23), + [anon_sym_raise] = ACTIONS(25), + [anon_sym_pass] = ACTIONS(27), + [anon_sym_break] = ACTIONS(29), + [anon_sym_continue] = ACTIONS(31), + [anon_sym_async] = ACTIONS(317), + [anon_sym_match] = ACTIONS(317), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(49), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(53), + [anon_sym_global] = ACTIONS(57), + [anon_sym_nonlocal] = ACTIONS(59), + [anon_sym_exec] = ACTIONS(61), + [anon_sym_type] = ACTIONS(63), + [anon_sym_not] = ACTIONS(69), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_lambda] = ACTIONS(71), + [anon_sym_yield] = ACTIONS(73), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(79), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(81), + }, + [148] = { + [sym_named_expression] = STATE(900), + [sym_expression] = STATE(901), + [sym_primary_expression] = STATE(630), + [sym_not_operator] = STATE(900), + [sym_boolean_operator] = STATE(900), + [sym_binary_operator] = STATE(642), + [sym_unary_operator] = STATE(642), + [sym_comparison_operator] = STATE(900), + [sym_lambda] = STATE(900), + [sym_attribute] = STATE(642), + [sym_subscript] = STATE(642), + [sym_call] = STATE(642), + [sym_list] = STATE(642), + [sym_set] = STATE(642), + [sym_tuple] = STATE(642), + [sym_dictionary] = STATE(642), + [sym_list_comprehension] = STATE(642), + [sym_dictionary_comprehension] = STATE(642), + [sym_set_comprehension] = STATE(642), + [sym_generator_expression] = STATE(642), + [sym_parenthesized_expression] = STATE(642), + [sym_conditional_expression] = STATE(900), + [sym_concatenated_string] = STATE(642), + [sym_string] = STATE(600), + [sym_await] = STATE(900), + [sym_identifier] = ACTIONS(274), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(278), + [anon_sym_RPAREN] = ACTIONS(303), + [anon_sym_COMMA] = ACTIONS(303), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(285), + [anon_sym_GT_GT] = ACTIONS(303), + [anon_sym_COLON_EQ] = ACTIONS(568), + [anon_sym_if] = ACTIONS(276), + [anon_sym_COLON] = ACTIONS(276), + [anon_sym_else] = ACTIONS(276), + [anon_sym_async] = ACTIONS(285), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(285), + [anon_sym_PIPE] = ACTIONS(303), + [anon_sym_DASH] = ACTIONS(301), + [anon_sym_PLUS] = ACTIONS(301), + [anon_sym_LBRACK] = ACTIONS(293), + [anon_sym_RBRACK] = ACTIONS(303), + [anon_sym_LBRACE] = ACTIONS(295), + [anon_sym_RBRACE] = ACTIONS(303), + [anon_sym_STAR_STAR] = ACTIONS(303), + [anon_sym_EQ] = ACTIONS(276), + [anon_sym_exec] = ACTIONS(285), + [anon_sym_type] = ACTIONS(285), + [anon_sym_AT] = ACTIONS(303), + [anon_sym_not] = ACTIONS(299), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(303), + [anon_sym_SLASH_SLASH] = ACTIONS(303), + [anon_sym_AMP] = ACTIONS(303), + [anon_sym_CARET] = ACTIONS(303), + [anon_sym_LT_LT] = ACTIONS(303), + [anon_sym_TILDE] = ACTIONS(301), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(305), + [sym_ellipsis] = ACTIONS(309), + [sym_type_conversion] = ACTIONS(303), + [sym_integer] = ACTIONS(311), + [sym_float] = ACTIONS(309), + [anon_sym_await] = ACTIONS(313), + [sym_true] = ACTIONS(311), + [sym_false] = ACTIONS(311), + [sym_none] = ACTIONS(311), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(315), + }, + [149] = { + [sym_named_expression] = STATE(900), + [sym_expression] = STATE(901), + [sym_primary_expression] = STATE(643), + [sym_not_operator] = STATE(900), + [sym_boolean_operator] = STATE(900), + [sym_binary_operator] = STATE(642), + [sym_unary_operator] = STATE(642), + [sym_comparison_operator] = STATE(900), + [sym_lambda] = STATE(900), + [sym_attribute] = STATE(642), + [sym_subscript] = STATE(642), + [sym_call] = STATE(642), + [sym_list] = STATE(642), + [sym_set] = STATE(642), + [sym_tuple] = STATE(642), + [sym_dictionary] = STATE(642), + [sym_list_comprehension] = STATE(642), + [sym_dictionary_comprehension] = STATE(642), + [sym_set_comprehension] = STATE(642), + [sym_generator_expression] = STATE(642), + [sym_parenthesized_expression] = STATE(642), + [sym_conditional_expression] = STATE(900), + [sym_concatenated_string] = STATE(642), + [sym_string] = STATE(600), + [sym_await] = STATE(900), + [sym_identifier] = ACTIONS(602), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(604), + [anon_sym_RPAREN] = ACTIONS(303), + [anon_sym_COMMA] = ACTIONS(303), + [anon_sym_as] = ACTIONS(276), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(606), + [anon_sym_GT_GT] = ACTIONS(303), + [anon_sym_COLON_EQ] = ACTIONS(608), + [anon_sym_if] = ACTIONS(276), + [anon_sym_COLON] = ACTIONS(276), + [anon_sym_async] = ACTIONS(606), + [anon_sym_for] = ACTIONS(276), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(606), + [anon_sym_PIPE] = ACTIONS(303), + [anon_sym_DASH] = ACTIONS(610), + [anon_sym_PLUS] = ACTIONS(610), + [anon_sym_LBRACK] = ACTIONS(612), + [anon_sym_RBRACK] = ACTIONS(303), + [anon_sym_LBRACE] = ACTIONS(295), + [anon_sym_RBRACE] = ACTIONS(303), + [anon_sym_STAR_STAR] = ACTIONS(303), + [anon_sym_exec] = ACTIONS(606), + [anon_sym_type] = ACTIONS(606), + [anon_sym_AT] = ACTIONS(303), + [anon_sym_not] = ACTIONS(614), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(303), + [anon_sym_SLASH_SLASH] = ACTIONS(303), + [anon_sym_AMP] = ACTIONS(303), + [anon_sym_CARET] = ACTIONS(303), + [anon_sym_LT_LT] = ACTIONS(303), + [anon_sym_TILDE] = ACTIONS(610), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(616), + [sym_ellipsis] = ACTIONS(309), + [sym_integer] = ACTIONS(311), + [sym_float] = ACTIONS(309), + [anon_sym_await] = ACTIONS(618), + [sym_true] = ACTIONS(311), + [sym_false] = ACTIONS(311), + [sym_none] = ACTIONS(311), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(315), + }, + [150] = { + [sym_named_expression] = STATE(1009), + [sym_expression] = STATE(976), + [sym_primary_expression] = STATE(684), + [sym_not_operator] = STATE(1009), + [sym_boolean_operator] = STATE(1009), + [sym_binary_operator] = STATE(797), + [sym_unary_operator] = STATE(797), + [sym_comparison_operator] = STATE(1009), + [sym_lambda] = STATE(1009), + [sym_attribute] = STATE(797), + [sym_subscript] = STATE(797), + [sym_call] = STATE(797), + [sym_list] = STATE(797), + [sym_set] = STATE(797), + [sym_tuple] = STATE(797), + [sym_dictionary] = STATE(797), + [sym_list_comprehension] = STATE(797), + [sym_dictionary_comprehension] = STATE(797), + [sym_set_comprehension] = STATE(797), + [sym_generator_expression] = STATE(797), + [sym_parenthesized_expression] = STATE(797), + [sym_conditional_expression] = STATE(1009), + [sym_concatenated_string] = STATE(797), + [sym_string] = STATE(713), + [sym_await] = STATE(1009), + [sym_identifier] = ACTIONS(331), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_from] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(559), + [anon_sym_COMMA] = ACTIONS(303), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(333), + [anon_sym_GT_GT] = ACTIONS(303), + [anon_sym_COLON_EQ] = ACTIONS(287), + [anon_sym_if] = ACTIONS(276), + [anon_sym_async] = ACTIONS(333), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(333), + [anon_sym_PIPE] = ACTIONS(303), + [anon_sym_DASH] = ACTIONS(47), + [anon_sym_PLUS] = ACTIONS(47), + [anon_sym_LBRACK] = ACTIONS(563), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_STAR_STAR] = ACTIONS(303), + [anon_sym_EQ] = ACTIONS(276), + [anon_sym_exec] = ACTIONS(333), + [anon_sym_type] = ACTIONS(333), + [anon_sym_AT] = ACTIONS(303), + [anon_sym_not] = ACTIONS(69), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(303), + [anon_sym_SLASH_SLASH] = ACTIONS(303), + [anon_sym_AMP] = ACTIONS(303), + [anon_sym_CARET] = ACTIONS(303), + [anon_sym_LT_LT] = ACTIONS(303), + [anon_sym_TILDE] = ACTIONS(47), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(71), + [sym_ellipsis] = ACTIONS(75), + [sym_integer] = ACTIONS(77), + [sym_float] = ACTIONS(75), + [anon_sym_await] = ACTIONS(337), + [sym_true] = ACTIONS(77), + [sym_false] = ACTIONS(77), + [sym_none] = ACTIONS(77), + [sym_comment] = ACTIONS(3), + [sym__semicolon] = ACTIONS(303), + [sym__newline] = ACTIONS(303), + [sym__string_start] = ACTIONS(81), + }, + [151] = { + [sym_named_expression] = STATE(900), + [sym_expression] = STATE(901), + [sym_primary_expression] = STATE(643), + [sym_not_operator] = STATE(900), + [sym_boolean_operator] = STATE(900), + [sym_binary_operator] = STATE(642), + [sym_unary_operator] = STATE(642), + [sym_comparison_operator] = STATE(900), + [sym_lambda] = STATE(900), + [sym_attribute] = STATE(642), + [sym_subscript] = STATE(642), + [sym_call] = STATE(642), + [sym_list] = STATE(642), + [sym_set] = STATE(642), + [sym_tuple] = STATE(642), + [sym_dictionary] = STATE(642), + [sym_list_comprehension] = STATE(642), + [sym_dictionary_comprehension] = STATE(642), + [sym_set_comprehension] = STATE(642), + [sym_generator_expression] = STATE(642), + [sym_parenthesized_expression] = STATE(642), + [sym_conditional_expression] = STATE(900), + [sym_concatenated_string] = STATE(642), + [sym_string] = STATE(600), + [sym_await] = STATE(900), + [sym_identifier] = ACTIONS(602), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(604), + [anon_sym_RPAREN] = ACTIONS(303), + [anon_sym_COMMA] = ACTIONS(303), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(606), + [anon_sym_GT_GT] = ACTIONS(303), + [anon_sym_COLON_EQ] = ACTIONS(608), + [anon_sym_if] = ACTIONS(276), + [anon_sym_async] = ACTIONS(606), + [anon_sym_for] = ACTIONS(276), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(606), + [anon_sym_PIPE] = ACTIONS(303), + [anon_sym_DASH] = ACTIONS(610), + [anon_sym_PLUS] = ACTIONS(610), + [anon_sym_LBRACK] = ACTIONS(612), + [anon_sym_LBRACE] = ACTIONS(295), + [anon_sym_STAR_STAR] = ACTIONS(303), + [anon_sym_EQ] = ACTIONS(620), + [anon_sym_exec] = ACTIONS(606), + [anon_sym_type] = ACTIONS(606), + [anon_sym_AT] = ACTIONS(303), + [anon_sym_not] = ACTIONS(614), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(303), + [anon_sym_SLASH_SLASH] = ACTIONS(303), + [anon_sym_AMP] = ACTIONS(303), + [anon_sym_CARET] = ACTIONS(303), + [anon_sym_LT_LT] = ACTIONS(303), + [anon_sym_TILDE] = ACTIONS(610), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(616), + [sym_ellipsis] = ACTIONS(309), + [sym_integer] = ACTIONS(311), + [sym_float] = ACTIONS(309), + [anon_sym_await] = ACTIONS(618), + [sym_true] = ACTIONS(311), + [sym_false] = ACTIONS(311), + [sym_none] = ACTIONS(311), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(315), + }, + [152] = { + [sym_named_expression] = STATE(900), + [sym_expression] = STATE(901), + [sym_primary_expression] = STATE(643), + [sym_not_operator] = STATE(900), + [sym_boolean_operator] = STATE(900), + [sym_binary_operator] = STATE(642), + [sym_unary_operator] = STATE(642), + [sym_comparison_operator] = STATE(900), + [sym_lambda] = STATE(900), + [sym_attribute] = STATE(642), + [sym_subscript] = STATE(642), + [sym_call] = STATE(642), + [sym_list] = STATE(642), + [sym_set] = STATE(642), + [sym_tuple] = STATE(642), + [sym_dictionary] = STATE(642), + [sym_list_comprehension] = STATE(642), + [sym_dictionary_comprehension] = STATE(642), + [sym_set_comprehension] = STATE(642), + [sym_generator_expression] = STATE(642), + [sym_parenthesized_expression] = STATE(642), + [sym_conditional_expression] = STATE(900), + [sym_concatenated_string] = STATE(642), + [sym_string] = STATE(600), + [sym_await] = STATE(900), + [sym_identifier] = ACTIONS(602), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(604), + [anon_sym_RPAREN] = ACTIONS(280), + [anon_sym_COMMA] = ACTIONS(280), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(606), + [anon_sym_GT_GT] = ACTIONS(303), + [anon_sym_COLON_EQ] = ACTIONS(608), + [anon_sym_if] = ACTIONS(276), + [anon_sym_async] = ACTIONS(606), + [anon_sym_for] = ACTIONS(276), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(606), + [anon_sym_PIPE] = ACTIONS(303), + [anon_sym_DASH] = ACTIONS(610), + [anon_sym_PLUS] = ACTIONS(610), + [anon_sym_LBRACK] = ACTIONS(612), + [anon_sym_RBRACK] = ACTIONS(280), + [anon_sym_LBRACE] = ACTIONS(295), + [anon_sym_STAR_STAR] = ACTIONS(303), + [anon_sym_exec] = ACTIONS(606), + [anon_sym_type] = ACTIONS(606), + [anon_sym_AT] = ACTIONS(303), + [anon_sym_not] = ACTIONS(614), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(303), + [anon_sym_SLASH_SLASH] = ACTIONS(303), + [anon_sym_AMP] = ACTIONS(303), + [anon_sym_CARET] = ACTIONS(303), + [anon_sym_LT_LT] = ACTIONS(303), + [anon_sym_TILDE] = ACTIONS(610), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(616), + [sym_ellipsis] = ACTIONS(309), + [sym_integer] = ACTIONS(311), + [sym_float] = ACTIONS(309), + [anon_sym_await] = ACTIONS(618), + [sym_true] = ACTIONS(311), + [sym_false] = ACTIONS(311), + [sym_none] = ACTIONS(311), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(315), + }, + [153] = { + [sym_named_expression] = STATE(1015), + [sym_expression] = STATE(1042), + [sym_primary_expression] = STATE(740), + [sym_not_operator] = STATE(1015), + [sym_boolean_operator] = STATE(1015), + [sym_binary_operator] = STATE(811), + [sym_unary_operator] = STATE(811), + [sym_comparison_operator] = STATE(1015), + [sym_lambda] = STATE(1015), + [sym_attribute] = STATE(811), + [sym_subscript] = STATE(811), + [sym_call] = STATE(811), + [sym_list] = STATE(811), + [sym_set] = STATE(811), + [sym_tuple] = STATE(811), + [sym_dictionary] = STATE(811), + [sym_list_comprehension] = STATE(811), + [sym_dictionary_comprehension] = STATE(811), + [sym_set_comprehension] = STATE(811), + [sym_generator_expression] = STATE(811), + [sym_parenthesized_expression] = STATE(811), + [sym_conditional_expression] = STATE(1015), + [sym_concatenated_string] = STATE(811), + [sym_string] = STATE(742), + [sym_await] = STATE(1015), + [sym_identifier] = ACTIONS(622), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(624), + [anon_sym_RPAREN] = ACTIONS(303), + [anon_sym_COMMA] = ACTIONS(303), + [anon_sym_as] = ACTIONS(276), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(626), + [anon_sym_GT_GT] = ACTIONS(303), + [anon_sym_COLON_EQ] = ACTIONS(628), + [anon_sym_if] = ACTIONS(276), + [anon_sym_COLON] = ACTIONS(276), + [anon_sym_async] = ACTIONS(626), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(626), + [anon_sym_PIPE] = ACTIONS(303), + [anon_sym_DASH] = ACTIONS(630), + [anon_sym_PLUS] = ACTIONS(630), + [anon_sym_LBRACK] = ACTIONS(632), + [anon_sym_LBRACE] = ACTIONS(634), + [anon_sym_STAR_STAR] = ACTIONS(303), + [anon_sym_exec] = ACTIONS(626), + [anon_sym_type] = ACTIONS(626), + [anon_sym_AT] = ACTIONS(303), + [anon_sym_not] = ACTIONS(636), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(303), + [anon_sym_SLASH_SLASH] = ACTIONS(303), + [anon_sym_AMP] = ACTIONS(303), + [anon_sym_CARET] = ACTIONS(303), + [anon_sym_LT_LT] = ACTIONS(303), + [anon_sym_TILDE] = ACTIONS(630), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(638), + [sym_ellipsis] = ACTIONS(640), + [sym_integer] = ACTIONS(642), + [sym_float] = ACTIONS(640), + [anon_sym_await] = ACTIONS(644), + [sym_true] = ACTIONS(642), + [sym_false] = ACTIONS(642), + [sym_none] = ACTIONS(642), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(646), + }, + [154] = { + [sym_named_expression] = STATE(900), + [sym_expression] = STATE(901), + [sym_primary_expression] = STATE(630), + [sym_not_operator] = STATE(900), + [sym_boolean_operator] = STATE(900), + [sym_binary_operator] = STATE(642), + [sym_unary_operator] = STATE(642), + [sym_comparison_operator] = STATE(900), + [sym_lambda] = STATE(900), + [sym_attribute] = STATE(642), + [sym_subscript] = STATE(642), + [sym_call] = STATE(642), + [sym_list] = STATE(642), + [sym_set] = STATE(642), + [sym_tuple] = STATE(642), + [sym_dictionary] = STATE(642), + [sym_list_comprehension] = STATE(642), + [sym_dictionary_comprehension] = STATE(642), + [sym_set_comprehension] = STATE(642), + [sym_generator_expression] = STATE(642), + [sym_parenthesized_expression] = STATE(642), + [sym_conditional_expression] = STATE(900), + [sym_concatenated_string] = STATE(642), + [sym_string] = STATE(600), + [sym_await] = STATE(900), + [sym_identifier] = ACTIONS(274), + [anon_sym_DOT] = ACTIONS(276), + [anon_sym_LPAREN] = ACTIONS(278), + [anon_sym_RPAREN] = ACTIONS(303), + [anon_sym_COMMA] = ACTIONS(303), + [anon_sym_STAR] = ACTIONS(276), + [anon_sym_print] = ACTIONS(285), + [anon_sym_GT_GT] = ACTIONS(303), + [anon_sym_COLON_EQ] = ACTIONS(568), + [anon_sym_if] = ACTIONS(276), + [anon_sym_async] = ACTIONS(285), + [anon_sym_in] = ACTIONS(276), + [anon_sym_match] = ACTIONS(285), + [anon_sym_PIPE] = ACTIONS(303), + [anon_sym_DASH] = ACTIONS(301), + [anon_sym_PLUS] = ACTIONS(301), + [anon_sym_LBRACK] = ACTIONS(293), + [anon_sym_LBRACE] = ACTIONS(295), + [anon_sym_STAR_STAR] = ACTIONS(303), + [anon_sym_EQ] = ACTIONS(620), + [anon_sym_exec] = ACTIONS(285), + [anon_sym_type] = ACTIONS(285), + [anon_sym_AT] = ACTIONS(303), + [anon_sym_not] = ACTIONS(299), + [anon_sym_and] = ACTIONS(276), + [anon_sym_or] = ACTIONS(276), + [anon_sym_SLASH] = ACTIONS(276), + [anon_sym_PERCENT] = ACTIONS(303), + [anon_sym_SLASH_SLASH] = ACTIONS(303), + [anon_sym_AMP] = ACTIONS(303), + [anon_sym_CARET] = ACTIONS(303), + [anon_sym_LT_LT] = ACTIONS(303), + [anon_sym_TILDE] = ACTIONS(301), + [anon_sym_LT] = ACTIONS(276), + [anon_sym_LT_EQ] = ACTIONS(303), + [anon_sym_EQ_EQ] = ACTIONS(303), + [anon_sym_BANG_EQ] = ACTIONS(303), + [anon_sym_GT_EQ] = ACTIONS(303), + [anon_sym_GT] = ACTIONS(276), + [anon_sym_LT_GT] = ACTIONS(303), + [anon_sym_is] = ACTIONS(276), + [anon_sym_lambda] = ACTIONS(305), + [sym_ellipsis] = ACTIONS(309), + [sym_integer] = ACTIONS(311), + [sym_float] = ACTIONS(309), + [anon_sym_await] = ACTIONS(313), + [sym_true] = ACTIONS(311), + [sym_false] = ACTIONS(311), + [sym_none] = ACTIONS(311), + [sym_comment] = ACTIONS(3), + [sym__string_start] = ACTIONS(315), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_LPAREN, + ACTIONS(15), 1, + anon_sym_STAR, + ACTIONS(49), 1, + anon_sym_LBRACK, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(73), 1, + anon_sym_yield, + ACTIONS(79), 1, + anon_sym_await, + ACTIONS(81), 1, + sym__string_start, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(889), 1, + sym_pattern, + STATE(897), 1, + sym_pattern_list, + STATE(1034), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + STATE(431), 2, + sym_attribute, + sym_subscript, + STATE(1360), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(317), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1369), 5, + sym_expression_list, + sym_assignment, + sym_augmented_assignment, + sym__right_hand_side, + sym_yield, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [118] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_LPAREN, + ACTIONS(15), 1, + anon_sym_STAR, + ACTIONS(49), 1, + anon_sym_LBRACK, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(73), 1, + anon_sym_yield, + ACTIONS(79), 1, + anon_sym_await, + ACTIONS(81), 1, + sym__string_start, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(889), 1, + sym_pattern, + STATE(897), 1, + sym_pattern_list, + STATE(1034), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + STATE(431), 2, + sym_attribute, + sym_subscript, + STATE(1360), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(317), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1391), 5, + sym_expression_list, + sym_assignment, + sym_augmented_assignment, + sym__right_hand_side, + sym_yield, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [236] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(13), 1, + anon_sym_LPAREN, + ACTIONS(15), 1, + anon_sym_STAR, + ACTIONS(49), 1, + anon_sym_LBRACK, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(73), 1, + anon_sym_yield, + ACTIONS(79), 1, + anon_sym_await, + ACTIONS(81), 1, + sym__string_start, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(889), 1, + sym_pattern, + STATE(897), 1, + sym_pattern_list, + STATE(1034), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + STATE(431), 2, + sym_attribute, + sym_subscript, + STATE(1360), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(317), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1386), 5, + sym_expression_list, + sym_assignment, + sym_augmented_assignment, + sym__right_hand_side, + sym_yield, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [354] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(648), 1, + anon_sym_from, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(929), 1, + sym_expression, + STATE(1041), 1, + sym_expression_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1366), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + ACTIONS(650), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [464] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(652), 1, + sym_identifier, + ACTIONS(654), 1, + anon_sym_LPAREN, + ACTIONS(656), 1, + anon_sym_STAR, + ACTIONS(660), 1, + anon_sym_LBRACK, + ACTIONS(662), 1, + anon_sym_RBRACK, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(666), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(932), 1, + sym_expression, + STATE(1146), 1, + sym_pattern, + STATE(1497), 1, + sym__patterns, + STATE(1503), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(806), 2, + sym_attribute, + sym_subscript, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(658), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [579] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(652), 1, + sym_identifier, + ACTIONS(654), 1, + anon_sym_LPAREN, + ACTIONS(656), 1, + anon_sym_STAR, + ACTIONS(660), 1, + anon_sym_LBRACK, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(666), 1, + anon_sym_await, + ACTIONS(668), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(941), 1, + sym_expression, + STATE(1146), 1, + sym_pattern, + STATE(1467), 1, + sym__collection_elements, + STATE(1497), 1, + sym__patterns, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(806), 2, + sym_attribute, + sym_subscript, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(658), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [694] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(652), 1, + sym_identifier, + ACTIONS(654), 1, + anon_sym_LPAREN, + ACTIONS(656), 1, + anon_sym_STAR, + ACTIONS(660), 1, + anon_sym_LBRACK, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(666), 1, + anon_sym_await, + ACTIONS(670), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(941), 1, + sym_expression, + STATE(1146), 1, + sym_pattern, + STATE(1467), 1, + sym__collection_elements, + STATE(1497), 1, + sym__patterns, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(806), 2, + sym_attribute, + sym_subscript, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(658), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [809] = 28, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(652), 1, + sym_identifier, + ACTIONS(654), 1, + anon_sym_LPAREN, + ACTIONS(656), 1, + anon_sym_STAR, + ACTIONS(660), 1, + anon_sym_LBRACK, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(666), 1, + anon_sym_await, + ACTIONS(672), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(930), 1, + sym_expression, + STATE(1146), 1, + sym_pattern, + STATE(1219), 1, + sym_yield, + STATE(1434), 1, + sym__patterns, + STATE(1484), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(806), 2, + sym_attribute, + sym_subscript, + STATE(1100), 2, + sym_list_splat, + sym_parenthesized_list_splat, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(658), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [926] = 29, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(652), 1, + sym_identifier, + ACTIONS(654), 1, + anon_sym_LPAREN, + ACTIONS(656), 1, + anon_sym_STAR, + ACTIONS(660), 1, + anon_sym_LBRACK, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(666), 1, + anon_sym_await, + ACTIONS(674), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(930), 1, + sym_expression, + STATE(1146), 1, + sym_pattern, + STATE(1219), 1, + sym_yield, + STATE(1301), 1, + sym_parenthesized_list_splat, + STATE(1303), 1, + sym_list_splat, + STATE(1434), 1, + sym__patterns, + STATE(1484), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(806), 2, + sym_attribute, + sym_subscript, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(658), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [1045] = 28, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(652), 1, + sym_identifier, + ACTIONS(654), 1, + anon_sym_LPAREN, + ACTIONS(656), 1, + anon_sym_STAR, + ACTIONS(660), 1, + anon_sym_LBRACK, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(666), 1, + anon_sym_await, + ACTIONS(676), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(931), 1, + sym_expression, + STATE(1146), 1, + sym_pattern, + STATE(1251), 1, + sym_yield, + STATE(1431), 1, + sym__collection_elements, + STATE(1434), 1, + sym__patterns, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(806), 2, + sym_attribute, + sym_subscript, + STATE(1100), 2, + sym_list_splat, + sym_parenthesized_list_splat, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(658), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [1162] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(301), 1, + anon_sym_TILDE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(682), 1, + anon_sym_STAR, + ACTIONS(688), 1, + anon_sym_in, + ACTIONS(690), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(876), 1, + sym_pattern, + STATE(882), 1, + sym_primary_expression, + ACTIONS(291), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + ACTIONS(686), 15, + anon_sym_COLON, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [1262] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(694), 1, + anon_sym_COMMA, + ACTIONS(696), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(907), 1, + sym_expression, + STATE(1052), 1, + sym_pair, + STATE(1327), 1, + sym_dictionary_splat, + STATE(1513), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [1376] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(933), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1023), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + ACTIONS(698), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [1480] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(933), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1023), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + ACTIONS(700), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [1584] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(702), 1, + anon_sym_COMMA, + ACTIONS(704), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(911), 1, + sym_expression, + STATE(1038), 1, + sym_pair, + STATE(1225), 1, + sym_dictionary_splat, + STATE(1460), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [1698] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(706), 1, + anon_sym_COMMA, + ACTIONS(708), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(918), 1, + sym_expression, + STATE(1049), 1, + sym_pair, + STATE(1311), 1, + sym_dictionary_splat, + STATE(1461), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [1812] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(933), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1023), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + ACTIONS(700), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [1916] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(301), 1, + anon_sym_TILDE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(682), 1, + anon_sym_STAR, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(712), 1, + anon_sym_in, + STATE(600), 1, + sym_string, + STATE(876), 1, + sym_pattern, + STATE(882), 1, + sym_primary_expression, + ACTIONS(291), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + ACTIONS(710), 15, + anon_sym_COLON, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [2016] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(714), 1, + anon_sym_RPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(915), 1, + sym_expression, + STATE(1268), 1, + sym_with_item, + STATE(1313), 1, + sym_yield, + STATE(1475), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1100), 2, + sym_list_splat, + sym_parenthesized_list_splat, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [2123] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(718), 1, + anon_sym_LPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1053), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(720), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + STATE(1166), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [2224] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(718), 1, + anon_sym_LPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1053), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(720), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + STATE(1166), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [2325] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(724), 1, + anon_sym_RPAREN, + ACTIONS(726), 1, + anon_sym_COMMA, + ACTIONS(730), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1071), 1, + sym_expression, + STATE(1256), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1255), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [2430] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(724), 1, + anon_sym_RPAREN, + ACTIONS(726), 1, + anon_sym_COMMA, + ACTIONS(732), 1, + sym_identifier, + ACTIONS(736), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(953), 1, + sym_expression, + STATE(1256), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1255), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(734), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [2535] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(664), 1, + anon_sym_yield, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(960), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1366), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1120), 3, + sym_expression_list, + sym_yield, + sym__f_expression, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [2638] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(732), 1, + sym_identifier, + ACTIONS(736), 1, + anon_sym_await, + ACTIONS(738), 1, + anon_sym_RPAREN, + ACTIONS(740), 1, + anon_sym_COMMA, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(940), 1, + sym_expression, + STATE(1328), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1239), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(734), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [2743] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + ACTIONS(742), 1, + anon_sym_from, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1014), 1, + sym_expression, + STATE(1348), 1, + sym_expression_list, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(650), 2, + sym__newline, + sym__semicolon, + STATE(1360), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [2848] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + ACTIONS(744), 1, + anon_sym_from, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(982), 1, + sym_expression, + STATE(1288), 1, + sym_expression_list, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(746), 2, + sym__newline, + sym__semicolon, + STATE(1360), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [2953] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(718), 1, + anon_sym_LPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1053), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(748), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + STATE(1166), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3054] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(664), 1, + anon_sym_yield, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(960), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1366), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1097), 3, + sym_expression_list, + sym_yield, + sym__f_expression, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3157] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(732), 1, + sym_identifier, + ACTIONS(736), 1, + anon_sym_await, + ACTIONS(750), 1, + anon_sym_RPAREN, + ACTIONS(752), 1, + anon_sym_COMMA, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(946), 1, + sym_expression, + STATE(1297), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1298), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(734), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3262] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(758), 1, + anon_sym_lambda, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(962), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1018), 2, + sym__expression_within_for_in_clause, + sym_lambda_within_for_in_clause, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(754), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + ACTIONS(756), 3, + anon_sym_if, + anon_sym_async, + anon_sym_for, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 4, + anon_sym_print, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3360] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(760), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3462] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(762), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(941), 1, + sym_expression, + STATE(1467), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3564] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(714), 1, + anon_sym_RPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(930), 1, + sym_expression, + STATE(1219), 1, + sym_yield, + STATE(1484), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1100), 2, + sym_list_splat, + sym_parenthesized_list_splat, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3668] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(764), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3770] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(766), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(941), 1, + sym_expression, + STATE(1467), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3872] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(768), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(932), 1, + sym_expression, + STATE(1503), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [3974] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(758), 1, + anon_sym_lambda, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(962), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1018), 2, + sym__expression_within_for_in_clause, + sym_lambda_within_for_in_clause, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(770), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + ACTIONS(772), 3, + anon_sym_if, + anon_sym_async, + anon_sym_for, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 4, + anon_sym_print, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4072] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(774), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(931), 1, + sym_expression, + STATE(1251), 1, + sym_yield, + STATE(1431), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1100), 2, + sym_list_splat, + sym_parenthesized_list_splat, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4176] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(776), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4278] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + ACTIONS(778), 1, + anon_sym_from, + ACTIONS(780), 1, + anon_sym_STAR, + ACTIONS(782), 1, + anon_sym_STAR_STAR, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1036), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(700), 2, + sym__newline, + sym__semicolon, + STATE(1187), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4380] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(784), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4482] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(786), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4584] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(788), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4686] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(790), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4788] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(792), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(930), 1, + sym_expression, + STATE(1219), 1, + sym_yield, + STATE(1301), 1, + sym_parenthesized_list_splat, + STATE(1303), 1, + sym_list_splat, + STATE(1484), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4894] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1045), 1, + sym_expression, + STATE(1394), 1, + sym_expression_list, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(794), 2, + sym__newline, + sym__semicolon, + STATE(1360), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [4996] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(758), 1, + anon_sym_lambda, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(962), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1018), 2, + sym__expression_within_for_in_clause, + sym_lambda_within_for_in_clause, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(796), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + ACTIONS(798), 3, + anon_sym_if, + anon_sym_async, + anon_sym_for, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 4, + anon_sym_print, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [5094] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(800), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [5196] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(792), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(930), 1, + sym_expression, + STATE(1219), 1, + sym_yield, + STATE(1484), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1100), 2, + sym_list_splat, + sym_parenthesized_list_splat, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [5300] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + ACTIONS(778), 1, + anon_sym_from, + ACTIONS(780), 1, + anon_sym_STAR, + ACTIONS(782), 1, + anon_sym_STAR_STAR, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1036), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(700), 2, + sym__newline, + sym__semicolon, + STATE(1187), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [5402] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(802), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [5504] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(804), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [5606] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(806), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [5708] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(808), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [5810] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + ACTIONS(780), 1, + anon_sym_STAR, + ACTIONS(782), 1, + anon_sym_STAR_STAR, + ACTIONS(810), 1, + anon_sym_from, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1036), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(698), 2, + sym__newline, + sym__semicolon, + STATE(1187), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [5912] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(714), 1, + anon_sym_RPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(930), 1, + sym_expression, + STATE(1219), 1, + sym_yield, + STATE(1301), 1, + sym_parenthesized_list_splat, + STATE(1303), 1, + sym_list_splat, + STATE(1484), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [6018] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(714), 1, + anon_sym_RPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(945), 1, + sym_expression, + STATE(1313), 1, + sym_yield, + STATE(1475), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1100), 2, + sym_list_splat, + sym_parenthesized_list_splat, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [6122] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(758), 1, + anon_sym_lambda, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(962), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1018), 2, + sym__expression_within_for_in_clause, + sym_lambda_within_for_in_clause, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(812), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + ACTIONS(814), 3, + anon_sym_if, + anon_sym_async, + anon_sym_for, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 4, + anon_sym_print, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [6220] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(816), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [6322] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(818), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [6424] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + ACTIONS(820), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [6526] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(692), 1, + anon_sym_LPAREN, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(766), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(935), 1, + sym_expression, + STATE(1473), 1, + sym__collection_elements, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1100), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [6628] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(824), 17, + anon_sym_as, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(822), 36, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym_type_conversion, + [6689] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(828), 17, + anon_sym_as, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(826), 36, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym_type_conversion, + [6750] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(832), 17, + anon_sym_as, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(830), 36, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym_type_conversion, + [6811] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(832), 17, + anon_sym_as, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(830), 36, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym_type_conversion, + [6872] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(722), 1, + sym_identifier, + ACTIONS(730), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1124), 1, + sym_expression, + STATE(1379), 1, + sym_parenthesized_list_splat, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1373), 3, + sym_list_splat, + sym_dictionary_splat, + sym_keyword_argument, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(728), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [6971] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(836), 17, + anon_sym_as, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(834), 36, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym_type_conversion, + [7032] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(720), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1053), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1166), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [7131] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(718), 1, + anon_sym_LPAREN, + ACTIONS(720), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1053), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1166), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [7230] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(824), 17, + anon_sym_as, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(822), 36, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym_type_conversion, + [7291] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(840), 17, + anon_sym_as, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(838), 36, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym_type_conversion, + [7352] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + ACTIONS(848), 1, + anon_sym_except, + ACTIONS(850), 1, + anon_sym_finally, + STATE(440), 1, + sym_else_clause, + STATE(504), 1, + sym_finally_clause, + STATE(271), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + ACTIONS(842), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(844), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [7424] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + ACTIONS(854), 1, + anon_sym_except_STAR, + ACTIONS(856), 1, + anon_sym_finally, + STATE(413), 1, + sym_else_clause, + STATE(520), 1, + sym_finally_clause, + STATE(267), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + ACTIONS(842), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(844), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [7496] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(664), 1, + anon_sym_yield, + ACTIONS(716), 1, + anon_sym_STAR, + ACTIONS(718), 1, + anon_sym_LPAREN, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1053), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(1166), 3, + sym_list_splat, + sym_parenthesized_list_splat, + sym_yield, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [7592] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1046), 1, + sym_expression, + STATE(1389), 1, + sym_expression_list, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + STATE(1360), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [7690] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + ACTIONS(856), 1, + anon_sym_finally, + ACTIONS(862), 1, + anon_sym_except, + STATE(454), 1, + sym_else_clause, + STATE(588), 1, + sym_finally_clause, + STATE(266), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + ACTIONS(860), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(858), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [7762] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1070), 1, + sym_expression, + STATE(1472), 1, + sym_expression_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1366), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [7860] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + ACTIONS(854), 1, + anon_sym_except_STAR, + ACTIONS(856), 1, + anon_sym_finally, + STATE(454), 1, + sym_else_clause, + STATE(588), 1, + sym_finally_clause, + STATE(267), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + ACTIONS(860), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(858), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [7932] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1085), 1, + sym_expression, + STATE(1518), 1, + sym_expression_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1366), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [8030] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1059), 1, + sym_expression, + STATE(1507), 1, + sym_expression_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1366), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [8128] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + ACTIONS(850), 1, + anon_sym_finally, + ACTIONS(864), 1, + anon_sym_except_STAR, + STATE(467), 1, + sym_else_clause, + STATE(523), 1, + sym_finally_clause, + STATE(270), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + ACTIONS(860), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(858), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [8200] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + ACTIONS(848), 1, + anon_sym_except, + ACTIONS(850), 1, + anon_sym_finally, + STATE(467), 1, + sym_else_clause, + STATE(523), 1, + sym_finally_clause, + STATE(271), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + ACTIONS(860), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(858), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [8272] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1075), 1, + sym_expression, + STATE(1465), 1, + sym_expression_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1366), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [8370] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + ACTIONS(850), 1, + anon_sym_finally, + ACTIONS(864), 1, + anon_sym_except_STAR, + STATE(440), 1, + sym_else_clause, + STATE(504), 1, + sym_finally_clause, + STATE(270), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + ACTIONS(842), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(844), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [8442] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + ACTIONS(856), 1, + anon_sym_finally, + ACTIONS(862), 1, + anon_sym_except, + STATE(413), 1, + sym_else_clause, + STATE(520), 1, + sym_finally_clause, + STATE(266), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + ACTIONS(842), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(844), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [8514] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(866), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [8609] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(868), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [8704] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + ACTIONS(780), 1, + anon_sym_STAR, + ACTIONS(782), 1, + anon_sym_STAR_STAR, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1036), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + STATE(1187), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [8799] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(283), 1, + anon_sym_STAR, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(933), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1023), 2, + sym_list_splat, + sym_dictionary_splat, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [8894] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(870), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [8989] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(280), 1, + anon_sym_COMMA, + ACTIONS(287), 1, + anon_sym_COLON_EQ, + ACTIONS(872), 1, + anon_sym_for, + ACTIONS(874), 1, + anon_sym_with, + ACTIONS(876), 1, + anon_sym_def, + ACTIONS(289), 2, + anon_sym_COLON, + anon_sym_EQ, + ACTIONS(307), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(276), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 16, + sym__newline, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [9062] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(878), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [9157] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(880), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [9252] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(882), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [9347] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(884), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [9442] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(886), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [9537] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(888), 1, + anon_sym_RBRACE, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [9632] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(280), 1, + anon_sym_COMMA, + ACTIONS(287), 1, + anon_sym_COLON_EQ, + ACTIONS(890), 1, + anon_sym_for, + ACTIONS(892), 1, + anon_sym_with, + ACTIONS(894), 1, + anon_sym_def, + ACTIONS(289), 2, + anon_sym_COLON, + anon_sym_EQ, + ACTIONS(307), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(276), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 16, + sym__newline, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [9705] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + ACTIONS(898), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [9799] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + ACTIONS(900), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [9893] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + ACTIONS(902), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [9987] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + ACTIONS(908), 1, + anon_sym_elif, + STATE(307), 1, + aux_sym_if_statement_repeat1, + STATE(420), 1, + sym_elif_clause, + STATE(577), 1, + sym_else_clause, + ACTIONS(906), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(904), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [10055] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(912), 1, + anon_sym_COLON, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1064), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(910), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [10147] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + ACTIONS(914), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [10241] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + ACTIONS(916), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [10335] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + ACTIONS(918), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [10429] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + ACTIONS(908), 1, + anon_sym_elif, + STATE(307), 1, + aux_sym_if_statement_repeat1, + STATE(420), 1, + sym_elif_clause, + STATE(570), 1, + sym_else_clause, + ACTIONS(922), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(920), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [10497] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(926), 1, + anon_sym_COLON, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1083), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(924), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [10589] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + ACTIONS(908), 1, + anon_sym_elif, + STATE(258), 1, + aux_sym_if_statement_repeat1, + STATE(420), 1, + sym_elif_clause, + STATE(522), 1, + sym_else_clause, + ACTIONS(930), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(928), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [10657] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(936), 1, + anon_sym_except, + STATE(266), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + ACTIONS(934), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(932), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [10719] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(943), 1, + anon_sym_except_STAR, + STATE(267), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + ACTIONS(941), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(939), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [10781] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + ACTIONS(950), 1, + anon_sym_elif, + STATE(276), 1, + aux_sym_if_statement_repeat1, + STATE(433), 1, + sym_elif_clause, + STATE(537), 1, + sym_else_clause, + ACTIONS(946), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(948), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [10849] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + ACTIONS(952), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [10943] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(954), 1, + anon_sym_except_STAR, + STATE(270), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + ACTIONS(941), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(939), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [11005] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(957), 1, + anon_sym_except, + STATE(271), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + ACTIONS(934), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(932), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [11067] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + ACTIONS(908), 1, + anon_sym_elif, + STATE(263), 1, + aux_sym_if_statement_repeat1, + STATE(420), 1, + sym_elif_clause, + STATE(529), 1, + sym_else_clause, + ACTIONS(946), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(948), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [11135] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + ACTIONS(960), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [11229] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + ACTIONS(962), 1, + anon_sym_RBRACK, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [11323] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(53), 1, + anon_sym_STAR_STAR, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1145), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1384), 2, + sym_dictionary_splat, + sym_pair, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [11415] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + ACTIONS(950), 1, + anon_sym_elif, + STATE(285), 1, + aux_sym_if_statement_repeat1, + STATE(433), 1, + sym_elif_clause, + STATE(585), 1, + sym_else_clause, + ACTIONS(922), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(920), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [11483] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + ACTIONS(950), 1, + anon_sym_elif, + STATE(285), 1, + aux_sym_if_statement_repeat1, + STATE(433), 1, + sym_elif_clause, + STATE(575), 1, + sym_else_clause, + ACTIONS(906), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(904), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [11551] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(280), 1, + anon_sym_COMMA, + ACTIONS(287), 1, + anon_sym_COLON_EQ, + ACTIONS(964), 1, + sym__string_start, + STATE(1335), 1, + sym_string, + ACTIONS(289), 2, + anon_sym_COLON, + anon_sym_EQ, + ACTIONS(307), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(276), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 16, + sym__newline, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [11621] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + ACTIONS(950), 1, + anon_sym_elif, + STATE(277), 1, + aux_sym_if_statement_repeat1, + STATE(433), 1, + sym_elif_clause, + STATE(576), 1, + sym_else_clause, + ACTIONS(930), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(928), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [11689] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(758), 1, + anon_sym_lambda, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(962), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1018), 2, + sym__expression_within_for_in_clause, + sym_lambda_within_for_in_clause, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [11778] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(966), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(968), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [11835] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(970), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(972), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [11892] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(974), 1, + anon_sym_LPAREN, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1050), 1, + sym_expression, + STATE(1320), 1, + sym_with_item, + STATE(1422), 1, + sym_with_clause, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [11983] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(280), 1, + anon_sym_COMMA, + ACTIONS(287), 1, + anon_sym_COLON_EQ, + ACTIONS(976), 1, + sym_identifier, + ACTIONS(289), 2, + anon_sym_COLON, + anon_sym_EQ, + ACTIONS(303), 10, + sym__newline, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + sym__semicolon, + ACTIONS(307), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(276), 21, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + anon_sym_is, + [12050] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(982), 1, + anon_sym_elif, + STATE(285), 1, + aux_sym_if_statement_repeat1, + STATE(433), 1, + sym_elif_clause, + ACTIONS(978), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(980), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [12113] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(758), 1, + anon_sym_lambda, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(962), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(979), 2, + sym__expression_within_for_in_clause, + sym_lambda_within_for_in_clause, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [12202] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(985), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(987), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [12259] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(991), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(989), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [12316] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1103), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(993), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [12405] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(995), 1, + anon_sym_RPAREN, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1050), 1, + sym_expression, + STATE(1308), 1, + sym_with_item, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [12496] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(966), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(968), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [12553] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(974), 1, + anon_sym_LPAREN, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1050), 1, + sym_expression, + STATE(1320), 1, + sym_with_item, + STATE(1459), 1, + sym_with_clause, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [12644] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1090), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(997), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [12733] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1091), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(999), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [12822] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1066), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(1001), 2, + sym__newline, + sym__semicolon, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [12911] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(974), 1, + anon_sym_LPAREN, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1050), 1, + sym_expression, + STATE(1320), 1, + sym_with_item, + STATE(1474), 1, + sym_with_clause, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13002] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(758), 1, + anon_sym_lambda, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(962), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1013), 2, + sym__expression_within_for_in_clause, + sym_lambda_within_for_in_clause, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13091] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(974), 1, + anon_sym_LPAREN, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1050), 1, + sym_expression, + STATE(1320), 1, + sym_with_item, + STATE(1451), 1, + sym_with_clause, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13182] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1047), 1, + sym_expression, + STATE(1294), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13273] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1066), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(1003), 2, + sym__newline, + sym__semicolon, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13362] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1021), 1, + sym_expression, + STATE(1220), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13453] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1005), 1, + anon_sym_RPAREN, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1050), 1, + sym_expression, + STATE(1308), 1, + sym_with_item, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13544] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1066), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(1007), 2, + sym__newline, + sym__semicolon, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13633] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1066), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(1009), 2, + sym__newline, + sym__semicolon, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13722] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(991), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(989), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [13779] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1119), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(1011), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [13868] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1013), 1, + anon_sym_elif, + STATE(307), 1, + aux_sym_if_statement_repeat1, + STATE(420), 1, + sym_elif_clause, + ACTIONS(978), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(980), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [13931] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1018), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1016), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [13988] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(758), 1, + anon_sym_lambda, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(963), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1017), 2, + sym__expression_within_for_in_clause, + sym_lambda_within_for_in_clause, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [14077] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1040), 1, + sym_expression, + STATE(1258), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [14168] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(985), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(987), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [14225] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(618), 1, + anon_sym_await, + ACTIONS(758), 1, + anon_sym_lambda, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(958), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(1033), 2, + sym__expression_within_for_in_clause, + sym_lambda_within_for_in_clause, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [14314] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1018), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1016), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [14371] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(896), 1, + anon_sym_COLON, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1086), 1, + sym_expression, + STATE(1398), 1, + sym_slice, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [14462] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(970), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(972), 37, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [14519] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1022), 13, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1020), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [14575] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1026), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1024), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [14631] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1028), 13, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1030), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [14687] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(991), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(989), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [14743] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1032), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1034), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [14799] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1483), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [14887] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1482), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [14975] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1480), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [15063] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1478), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [15151] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1036), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1038), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [15207] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(966), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(968), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [15263] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1022), 13, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1020), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [15319] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1040), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1042), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [15375] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1044), 13, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1046), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [15431] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1050), 1, + anon_sym_COMMA, + ACTIONS(1055), 1, + anon_sym_COLON_EQ, + ACTIONS(1057), 2, + anon_sym_COLON, + anon_sym_EQ, + ACTIONS(1059), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1053), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 16, + sym__newline, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [15495] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1061), 13, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1063), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [15551] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1026), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1024), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [15607] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1065), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1067), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [15663] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(280), 1, + anon_sym_COMMA, + ACTIONS(287), 1, + anon_sym_COLON_EQ, + ACTIONS(289), 2, + anon_sym_COLON, + anon_sym_EQ, + ACTIONS(307), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(276), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 16, + sym__newline, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [15727] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1069), 1, + anon_sym_COLON, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1063), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [15815] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(824), 16, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(822), 32, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym__semicolon, + [15871] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(824), 16, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(822), 32, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym__semicolon, + [15927] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(568), 1, + anon_sym_COLON_EQ, + ACTIONS(570), 2, + anon_sym_COLON, + anon_sym_EQ, + ACTIONS(565), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(572), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(303), 14, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + ACTIONS(276), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + [15991] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1074), 1, + anon_sym_COLON_EQ, + ACTIONS(1076), 2, + anon_sym_COLON, + anon_sym_EQ, + ACTIONS(1071), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(1078), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1048), 14, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + ACTIONS(1053), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + [16055] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1080), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1082), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [16111] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1485), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [16199] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(832), 16, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(830), 32, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym__semicolon, + [16255] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(832), 16, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(830), 32, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym__semicolon, + [16311] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(836), 16, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(834), 32, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym__semicolon, + [16367] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1088), 1, + anon_sym_case, + STATE(349), 2, + sym_case_block, + aux_sym_cases_repeat1, + ACTIONS(1086), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1084), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [16427] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1428), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [16515] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1094), 1, + anon_sym_case, + STATE(347), 2, + sym_case_block, + aux_sym_cases_repeat1, + ACTIONS(1090), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1092), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [16575] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1082), 1, + sym_expression, + STATE(1263), 1, + sym_type, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [16663] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1097), 1, + anon_sym_case, + STATE(349), 2, + sym_case_block, + aux_sym_cases_repeat1, + ACTIONS(1090), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1092), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [16723] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1505), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [16811] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1050), 1, + sym_expression, + STATE(1308), 1, + sym_with_item, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [16899] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(828), 16, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(826), 32, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym__semicolon, + [16955] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1080), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1082), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17011] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(991), 13, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(989), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17067] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(970), 13, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(972), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17123] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(966), 13, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(968), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17179] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1065), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1067), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17235] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1018), 13, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1016), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17291] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(991), 13, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(989), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17347] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1018), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1016), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17403] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1133), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [17491] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1018), 13, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1016), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17547] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1044), 13, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1046), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17603] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1270), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [17691] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(840), 16, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_EQ, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(838), 32, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + sym__semicolon, + [17747] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1040), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1042), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17803] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(985), 13, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(987), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [17859] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1022), 1, + sym_expression, + STATE(1491), 1, + sym_type, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [17947] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1018), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1016), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18003] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(966), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(968), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18059] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(970), 13, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(972), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18115] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1028), 13, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1030), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18171] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1032), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1034), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18227] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(985), 13, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(987), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18283] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(985), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(987), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18339] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(966), 13, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(968), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18395] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1036), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1038), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18451] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(985), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(987), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18507] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(970), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(972), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18563] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1100), 1, + anon_sym_case, + STATE(347), 2, + sym_case_block, + aux_sym_cases_repeat1, + ACTIONS(1086), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1084), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18623] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(991), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(989), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18679] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(970), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(972), 36, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_except, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18735] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1102), 1, + anon_sym_COLON, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1081), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [18823] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1061), 13, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_except_STAR, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1063), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [18879] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(980), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [18964] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1186), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19049] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + STATE(545), 1, + sym_else_clause, + ACTIONS(1104), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1106), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [19108] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1108), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1110), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [19163] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(919), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19248] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(994), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19333] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(904), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19418] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1028), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19503] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1112), 1, + sym_identifier, + ACTIONS(1116), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(948), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(449), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(1114), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19590] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1044), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19675] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1029), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19760] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1030), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19845] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1032), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [19930] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1134), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [20015] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1135), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [20100] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1151), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [20185] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + STATE(500), 1, + sym_else_clause, + ACTIONS(1118), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1120), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [20244] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1104), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [20329] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1124), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1122), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [20384] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1153), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [20469] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1035), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [20554] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(947), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [20639] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1124), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1122), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [20694] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + STATE(519), 1, + sym_else_clause, + ACTIONS(1126), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1128), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [20753] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(916), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [20838] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1000), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [20923] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1001), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [21008] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1136), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [21093] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(856), 1, + anon_sym_finally, + STATE(591), 1, + sym_finally_clause, + ACTIONS(1132), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1130), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [21152] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + STATE(593), 1, + sym_else_clause, + ACTIONS(1126), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1128), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [21211] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1169), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [21296] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1123), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [21381] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1156), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [21466] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + STATE(510), 1, + sym_else_clause, + ACTIONS(1104), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1106), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [21525] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(967), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [21610] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1136), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1134), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [21665] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1108), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1110), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [21720] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(974), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [21805] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1140), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [21890] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1141), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [21975] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1094), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [22060] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1149), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [22145] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + STATE(511), 1, + sym_else_clause, + ACTIONS(1138), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1140), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [22204] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + STATE(539), 1, + sym_else_clause, + ACTIONS(1138), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1140), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [22263] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1152), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [22348] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + STATE(503), 1, + sym_else_clause, + ACTIONS(1142), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1144), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [22407] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1050), 1, + anon_sym_COMMA, + ACTIONS(1057), 1, + anon_sym_EQ, + ACTIONS(1059), 14, + anon_sym_COLON, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1053), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 16, + sym__newline, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [22468] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + STATE(551), 1, + sym_else_clause, + ACTIONS(1142), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1144), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [22527] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1136), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1134), 35, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_elif, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [22582] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1098), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [22667] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1121), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [22752] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(908), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [22837] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1007), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [22922] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1073), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23007] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(928), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23092] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(850), 1, + anon_sym_finally, + STATE(518), 1, + sym_finally_clause, + ACTIONS(1132), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1130), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [23151] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1148), 1, + anon_sym_COMMA, + ACTIONS(1155), 1, + anon_sym_EQ, + ACTIONS(1153), 14, + anon_sym_COLON, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1151), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1146), 16, + sym__newline, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [23212] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1054), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23297] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1025), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23382] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(912), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23467] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1051), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23552] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(920), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23637] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(939), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23722] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(992), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23807] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1076), 1, + anon_sym_EQ, + ACTIONS(1071), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(1048), 14, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + ACTIONS(1078), 14, + anon_sym_COLON, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1053), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + [23868] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1126), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [23953] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1127), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24038] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(914), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24123] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1078), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24208] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(856), 1, + anon_sym_finally, + STATE(564), 1, + sym_finally_clause, + ACTIONS(1159), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1157), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [24267] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(927), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24352] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(926), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24437] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(922), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24522] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_identifier, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(636), 1, + anon_sym_not, + ACTIONS(638), 1, + anon_sym_lambda, + ACTIONS(644), 1, + anon_sym_await, + ACTIONS(646), 1, + sym__string_start, + STATE(740), 1, + sym_primary_expression, + STATE(742), 1, + sym_string, + STATE(1027), 1, + sym_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(626), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1015), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24607] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1148), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24692] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(948), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24777] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1113), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24862] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1026), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [24947] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(924), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [25032] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + STATE(567), 1, + sym_else_clause, + ACTIONS(1163), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1161), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [25091] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(923), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [25176] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1105), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [25261] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(850), 1, + anon_sym_finally, + STATE(559), 1, + sym_finally_clause, + ACTIONS(1159), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1157), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [25320] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1157), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [25405] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1048), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [25490] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(904), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [25575] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1158), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [25660] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 1, + anon_sym_else, + STATE(569), 1, + sym_else_clause, + ACTIONS(1163), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1161), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [25719] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(1039), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [25804] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1102), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [25889] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1167), 1, + anon_sym_COMMA, + ACTIONS(1174), 1, + anon_sym_EQ, + ACTIONS(1172), 14, + anon_sym_COLON, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + ACTIONS(1170), 15, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1165), 16, + sym__newline, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_if, + anon_sym_in, + anon_sym_LBRACK, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [25950] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(921), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [26035] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1122), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [26120] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(852), 1, + anon_sym_else, + STATE(525), 1, + sym_else_clause, + ACTIONS(1118), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1120), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [26179] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1084), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [26264] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1065), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [26349] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(997), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [26434] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(602), 1, + sym_identifier, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(614), 1, + anon_sym_not, + ACTIONS(616), 1, + anon_sym_lambda, + ACTIONS(618), 1, + anon_sym_await, + STATE(600), 1, + sym_string, + STATE(643), 1, + sym_primary_expression, + STATE(909), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(606), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [26519] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(69), 1, + anon_sym_not, + ACTIONS(71), 1, + anon_sym_lambda, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(337), 1, + anon_sym_await, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(684), 1, + sym_primary_expression, + STATE(713), 1, + sym_string, + STATE(1066), 1, + sym_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(333), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(1009), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [26604] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + sym_identifier, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(299), 1, + anon_sym_not, + ACTIONS(305), 1, + anon_sym_lambda, + ACTIONS(313), 1, + anon_sym_await, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(630), 1, + sym_primary_expression, + STATE(1159), 1, + sym_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(285), 5, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + STATE(900), 7, + sym_named_expression, + sym_not_operator, + sym_boolean_operator, + sym_comparison_operator, + sym_lambda, + sym_conditional_expression, + sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [26689] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1178), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1176), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [26743] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1178), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1176), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [26797] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1182), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1180), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [26851] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1184), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1186), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [26905] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1190), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1188), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [26959] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1182), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1180), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27013] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1194), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1192), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27067] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1198), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1196), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27121] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1198), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1196), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27175] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1194), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1192), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27229] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1184), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1186), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_case, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27283] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1190), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1188), 34, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_finally, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27337] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1200), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1202), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27390] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1206), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1204), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27443] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1208), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1210), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27496] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1212), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1214), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27549] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1216), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1218), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27602] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1222), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1220), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27655] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1224), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1226), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27708] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1132), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1130), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27761] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1230), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1228), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27814] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1234), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1232), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27867] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(860), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(858), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27920] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1238), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1236), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [27973] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1242), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1240), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28026] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1246), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1244), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28079] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1248), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1250), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28132] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1252), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1254), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28185] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1252), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1254), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28238] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(842), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(844), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28291] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1206), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1204), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28344] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(860), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(858), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28397] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1258), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1256), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28450] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1260), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1262), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28503] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1264), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1266), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28556] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1132), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1130), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28609] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1268), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1270), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28662] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1274), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1272), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28715] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1159), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1157), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28768] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1276), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1278), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28821] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1212), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1214), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28874] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1276), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1278), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28927] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1282), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1280), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [28980] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1284), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1286), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29033] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1290), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1288), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29086] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1294), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1292), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29139] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1298), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1296), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29192] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1300), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1302), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29245] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1304), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1306), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29298] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1310), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1308), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29351] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1312), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1314), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29404] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1310), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1308), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29457] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1290), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1288), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29510] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1294), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1292), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29563] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1248), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1250), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29616] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1304), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1306), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29669] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1316), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1318), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29722] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1222), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1220), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29775] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1320), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1322), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29828] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1326), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1324), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29881] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1246), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1244), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29934] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1242), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1240), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [29987] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1238), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1236), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30040] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1216), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1218), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30093] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1328), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1330), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30146] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1282), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1280), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30199] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1224), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1226), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30252] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1332), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1334), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30305] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1298), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1296), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30358] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1328), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1330), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30411] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1284), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1286), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30464] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1234), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1232), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30517] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1230), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1228), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30570] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1300), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1302), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30623] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1336), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1338), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30676] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1320), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1322), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30729] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1340), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1342), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30782] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1316), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1318), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30835] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1312), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1314), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30888] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1336), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1338), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30941] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1340), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1342), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [30994] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1258), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1256), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31047] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1346), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1344), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31100] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(842), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(844), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31153] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1346), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1344), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31206] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1350), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1348), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31259] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1354), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1352), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31312] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1354), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1352), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31365] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1356), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1358), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31418] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1356), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1358), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31471] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1360), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1362), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31524] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1274), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1272), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31577] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1360), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1362), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31630] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1326), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1324), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31683] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1366), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1364), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31736] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1200), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1202), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31789] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1370), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1368), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31842] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1374), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1372), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31895] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1366), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1364), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [31948] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1208), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1210), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32001] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1350), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1348), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32054] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1370), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1368), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32107] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1378), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1376), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32160] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1159), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1157), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32213] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1374), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1372), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32266] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1378), 12, + sym__string_start, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1376), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32319] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1260), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1262), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32372] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1268), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1270), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32425] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1264), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1266), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32478] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1332), 12, + sym__dedent, + sym__string_start, + anon_sym_LPAREN, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_TILDE, + sym_ellipsis, + sym_float, + ACTIONS(1334), 33, + anon_sym_import, + anon_sym_from, + anon_sym_STAR, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_del, + anon_sym_raise, + anon_sym_pass, + anon_sym_break, + anon_sym_continue, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_while, + anon_sym_try, + anon_sym_with, + anon_sym_match, + anon_sym_def, + anon_sym_global, + anon_sym_nonlocal, + anon_sym_exec, + anon_sym_type, + anon_sym_class, + anon_sym_not, + anon_sym_lambda, + anon_sym_yield, + sym_integer, + sym_identifier, + anon_sym_await, + sym_true, + sym_false, + sym_none, + [32531] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(876), 1, + sym_pattern, + STATE(882), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(1380), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [32613] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + ACTIONS(1384), 1, + anon_sym_RPAREN, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + STATE(1146), 1, + sym_pattern, + STATE(1434), 1, + sym__patterns, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [32697] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(876), 1, + sym_pattern, + STATE(882), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(1386), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [32779] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + sym__string_start, + STATE(599), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1390), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1388), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [32834] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1396), 1, + sym__string_start, + STATE(599), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1394), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1392), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [32889] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + sym__string_start, + STATE(598), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1053), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [32944] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + STATE(1305), 1, + sym_pattern, + STATE(1466), 1, + sym_pattern_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [33025] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + STATE(1306), 1, + sym_pattern, + STATE(1454), 1, + sym_pattern_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [33106] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + STATE(1197), 1, + sym_pattern, + STATE(1522), 1, + sym_pattern_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [33187] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + STATE(1199), 1, + sym_pattern, + STATE(1519), 1, + sym_pattern_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [33268] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + STATE(1276), 1, + sym_pattern, + STATE(1421), 1, + sym_pattern_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [33349] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + STATE(1293), 1, + sym_pattern, + STATE(1419), 1, + sym_pattern_list, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [33430] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(876), 1, + sym_pattern, + STATE(882), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [33508] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(678), 1, + sym_identifier, + ACTIONS(680), 1, + anon_sym_LPAREN, + ACTIONS(690), 1, + anon_sym_LBRACK, + ACTIONS(1382), 1, + anon_sym_STAR, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + STATE(1281), 1, + sym_pattern, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(770), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + STATE(875), 3, + sym_tuple_pattern, + sym_list_pattern, + sym_list_splat_pattern, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(684), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [33586] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1401), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1399), 35, + sym__string_start, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [33635] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1405), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1403), 35, + sym__string_start, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [33684] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1409), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1407), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [33732] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1413), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1411), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [33780] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1417), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1415), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [33828] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1421), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1419), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [33876] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1425), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1423), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [33924] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1421), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1419), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [33972] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1429), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1427), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34020] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(276), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34068] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1433), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1431), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34116] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1437), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1435), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34164] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1439), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34212] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1445), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1443), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34260] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1449), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1447), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34308] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1453), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1451), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34356] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1457), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1455), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34404] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1461), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1459), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34452] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1465), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1463), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34500] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1469), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1467), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34548] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1473), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1471), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34596] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1487), 1, + anon_sym_PIPE, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1495), 1, + anon_sym_EQ, + ACTIONS(1499), 1, + anon_sym_not, + ACTIONS(1501), 1, + anon_sym_AMP, + ACTIONS(1503), 1, + anon_sym_CARET, + ACTIONS(1507), 1, + anon_sym_is, + STATE(870), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1483), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1489), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1505), 2, + anon_sym_LT, + anon_sym_GT, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1485), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1479), 10, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_and, + anon_sym_or, + sym_type_conversion, + [34678] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1511), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1509), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34726] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1417), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1415), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34774] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1515), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1513), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34822] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1519), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1517), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34870] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1523), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1521), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [34918] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1525), 1, + sym_identifier, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(762), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(1527), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(1529), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [34990] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1533), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1531), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35038] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1537), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1535), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35086] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1425), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1423), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35134] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1519), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1517), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35182] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1541), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1539), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35230] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1053), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35278] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1495), 1, + anon_sym_as, + ACTIONS(1549), 1, + anon_sym_PIPE, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + ACTIONS(1557), 1, + anon_sym_not, + ACTIONS(1559), 1, + anon_sym_AMP, + ACTIONS(1561), 1, + anon_sym_CARET, + ACTIONS(1565), 1, + anon_sym_is, + STATE(871), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1543), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1545), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1551), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1563), 2, + anon_sym_LT, + anon_sym_GT, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1555), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1547), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1479), 10, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_and, + anon_sym_or, + [35360] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1569), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1567), 34, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35408] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 28, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35465] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1503), 1, + anon_sym_CARET, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1483), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1489), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 20, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35532] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 5, + anon_sym_as, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 28, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [35589] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 28, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35646] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + ACTIONS(1543), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1551), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1555), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_as, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 23, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [35709] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1577), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1575), 28, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35766] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 25, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [35827] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1549), 1, + anon_sym_PIPE, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + ACTIONS(1559), 1, + anon_sym_AMP, + ACTIONS(1561), 1, + anon_sym_CARET, + ACTIONS(1543), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1545), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1551), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1555), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1581), 3, + anon_sym_as, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1579), 18, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [35898] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + ACTIONS(1559), 1, + anon_sym_AMP, + ACTIONS(1561), 1, + anon_sym_CARET, + ACTIONS(1543), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1545), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1551), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1555), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_as, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [35967] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + ACTIONS(1543), 2, + anon_sym_STAR, + anon_sym_SLASH, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1555), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_as, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 25, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [36028] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 5, + anon_sym_as, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 28, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [36085] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1483), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1489), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 21, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [36150] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + ACTIONS(1543), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1545), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1551), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1555), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_as, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 21, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [36215] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1501), 1, + anon_sym_AMP, + ACTIONS(1503), 1, + anon_sym_CARET, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1483), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1489), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [36284] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1549), 1, + anon_sym_PIPE, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + ACTIONS(1559), 1, + anon_sym_AMP, + ACTIONS(1561), 1, + anon_sym_CARET, + ACTIONS(1543), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1545), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1551), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1555), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1585), 3, + anon_sym_as, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1583), 18, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [36355] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + ACTIONS(1561), 1, + anon_sym_CARET, + ACTIONS(1543), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1545), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1551), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1555), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_as, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 20, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [36422] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1577), 5, + anon_sym_as, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1575), 28, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [36479] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1549), 1, + anon_sym_PIPE, + ACTIONS(1553), 1, + anon_sym_STAR_STAR, + ACTIONS(1559), 1, + anon_sym_AMP, + ACTIONS(1561), 1, + anon_sym_CARET, + ACTIONS(1543), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1545), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1551), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1555), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1589), 3, + anon_sym_as, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1587), 18, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [36550] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1487), 1, + anon_sym_PIPE, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1501), 1, + anon_sym_AMP, + ACTIONS(1503), 1, + anon_sym_CARET, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1483), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1489), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1589), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1587), 18, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [36621] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1487), 1, + anon_sym_PIPE, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1501), 1, + anon_sym_AMP, + ACTIONS(1503), 1, + anon_sym_CARET, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1483), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1489), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1585), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1583), 18, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [36692] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1487), 1, + anon_sym_PIPE, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1501), 1, + anon_sym_AMP, + ACTIONS(1503), 1, + anon_sym_CARET, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1483), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1489), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1581), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1579), 18, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [36763] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1489), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 23, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [36826] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1591), 1, + anon_sym_COLON_EQ, + ACTIONS(1053), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_COLON, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 31, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [36874] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(608), 1, + anon_sym_COLON_EQ, + ACTIONS(276), 6, + anon_sym_as, + anon_sym_STAR, + anon_sym_COLON, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 31, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [36922] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + ACTIONS(1595), 1, + anon_sym_not, + STATE(713), 1, + sym_string, + STATE(733), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [36988] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1599), 1, + anon_sym_not, + STATE(742), 1, + sym_string, + STATE(751), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37054] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1151), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1146), 33, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [37100] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1170), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1165), 33, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [37146] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1603), 1, + anon_sym_not, + STATE(600), 1, + sym_string, + STATE(665), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37212] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1074), 1, + anon_sym_COLON_EQ, + ACTIONS(1053), 6, + anon_sym_STAR, + anon_sym_COLON, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 31, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [37260] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(568), 1, + anon_sym_COLON_EQ, + ACTIONS(276), 6, + anon_sym_STAR, + anon_sym_COLON, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 31, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_else, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym_type_conversion, + [37308] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + ACTIONS(1605), 1, + anon_sym_not, + STATE(600), 1, + sym_string, + STATE(652), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37374] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1607), 1, + sym__string_start, + STATE(677), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1394), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1392), 31, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [37424] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + STATE(677), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1390), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1388), 31, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [37474] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(663), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37537] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(751), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37600] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(747), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37663] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(763), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37726] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(766), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37789] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1495), 1, + anon_sym_EQ, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1620), 1, + anon_sym_PIPE, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + ACTIONS(1630), 1, + anon_sym_not, + ACTIONS(1632), 1, + anon_sym_AMP, + ACTIONS(1634), 1, + anon_sym_CARET, + ACTIONS(1638), 1, + anon_sym_is, + STATE(878), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1614), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1616), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1622), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1636), 2, + anon_sym_LT, + anon_sym_GT, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1628), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1618), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1479), 7, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_and, + anon_sym_or, + sym__semicolon, + [37868] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1525), 1, + sym_identifier, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(762), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(1529), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37935] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(656), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [37998] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(646), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38061] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(659), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38124] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1640), 1, + sym__string_start, + STATE(689), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1394), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1392), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [38173] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(645), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38236] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(746), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38299] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(651), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38362] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(647), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38425] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(731), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38488] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(658), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38551] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(665), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38614] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(750), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38677] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(649), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38740] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(756), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38803] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(743), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38866] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(734), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38929] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(652), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [38992] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(653), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39055] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(654), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39118] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(655), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39181] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(741), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39244] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(666), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39307] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(761), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39370] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(661), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39433] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(660), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39496] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(657), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39559] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(604), 1, + anon_sym_LPAREN, + ACTIONS(612), 1, + anon_sym_LBRACK, + STATE(600), 1, + sym_string, + STATE(662), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(610), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39622] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(81), 1, + sym__string_start, + STATE(720), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1053), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [39671] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(739), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39734] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1643), 1, + sym_identifier, + STATE(600), 1, + sym_string, + STATE(882), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + STATE(879), 2, + sym_attribute, + sym_subscript, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 4, + sym_integer, + sym_true, + sym_false, + sym_none, + ACTIONS(1645), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 13, + sym_binary_operator, + sym_unary_operator, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39801] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(648), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39864] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(738), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39927] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(664), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [39990] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(745), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [40053] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(81), 1, + sym__string_start, + STATE(689), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1390), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1388), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [40102] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(737), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [40165] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(733), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [40228] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(732), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [40291] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(757), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [40354] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1170), 5, + anon_sym_as, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1165), 32, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [40399] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_LPAREN, + ACTIONS(293), 1, + anon_sym_LBRACK, + ACTIONS(295), 1, + anon_sym_LBRACE, + ACTIONS(315), 1, + sym__string_start, + STATE(600), 1, + sym_string, + STATE(650), 1, + sym_primary_expression, + ACTIONS(309), 2, + sym_ellipsis, + sym_float, + ACTIONS(301), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(311), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1601), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(642), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [40462] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1151), 5, + anon_sym_as, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1146), 32, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [40507] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(752), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [40570] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + anon_sym_LPAREN, + ACTIONS(632), 1, + anon_sym_LBRACK, + ACTIONS(634), 1, + anon_sym_LBRACE, + ACTIONS(646), 1, + sym__string_start, + STATE(742), 1, + sym_string, + STATE(753), 1, + sym_primary_expression, + ACTIONS(640), 2, + sym_ellipsis, + sym_float, + ACTIONS(630), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(642), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1597), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(811), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [40633] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(51), 1, + anon_sym_LBRACE, + ACTIONS(81), 1, + sym__string_start, + ACTIONS(559), 1, + anon_sym_LPAREN, + ACTIONS(563), 1, + anon_sym_LBRACK, + STATE(713), 1, + sym_string, + STATE(735), 1, + sym_primary_expression, + ACTIONS(75), 2, + sym_ellipsis, + sym_float, + ACTIONS(47), 3, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_TILDE, + ACTIONS(77), 5, + sym_integer, + sym_identifier, + sym_true, + sym_false, + sym_none, + ACTIONS(1593), 6, + anon_sym_print, + anon_sym_async, + anon_sym_match, + anon_sym_exec, + anon_sym_type, + anon_sym_await, + STATE(797), 15, + sym_binary_operator, + sym_unary_operator, + sym_attribute, + sym_subscript, + sym_call, + sym_list, + sym_set, + sym_tuple, + sym_dictionary, + sym_list_comprehension, + sym_dictionary_comprehension, + sym_set_comprehension, + sym_generator_expression, + sym_parenthesized_expression, + sym_concatenated_string, + [40696] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1620), 1, + anon_sym_PIPE, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + ACTIONS(1632), 1, + anon_sym_AMP, + ACTIONS(1634), 1, + anon_sym_CARET, + ACTIONS(1614), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1616), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1622), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1589), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1628), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1587), 15, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_in, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [40764] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + ACTIONS(1614), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1622), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1628), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 20, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [40824] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1620), 1, + anon_sym_PIPE, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + ACTIONS(1632), 1, + anon_sym_AMP, + ACTIONS(1634), 1, + anon_sym_CARET, + ACTIONS(1614), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1616), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1622), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1581), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1628), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1579), 15, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_in, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [40892] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1620), 1, + anon_sym_PIPE, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + ACTIONS(1632), 1, + anon_sym_AMP, + ACTIONS(1634), 1, + anon_sym_CARET, + ACTIONS(1614), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1616), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1622), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1585), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1628), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1583), 15, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_in, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [40960] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 25, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [41014] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1401), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1399), 32, + sym__string_start, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [41058] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + ACTIONS(1632), 1, + anon_sym_AMP, + ACTIONS(1634), 1, + anon_sym_CARET, + ACTIONS(1614), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1616), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1622), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1628), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 16, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [41124] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + ACTIONS(1614), 2, + anon_sym_STAR, + anon_sym_SLASH, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1628), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 22, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [41182] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 25, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [41236] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1657), 1, + anon_sym_PIPE, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + ACTIONS(1667), 1, + anon_sym_not, + ACTIONS(1669), 1, + anon_sym_AMP, + ACTIONS(1671), 1, + anon_sym_CARET, + ACTIONS(1675), 1, + anon_sym_is, + STATE(881), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1651), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1653), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1659), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1673), 2, + anon_sym_LT, + anon_sym_GT, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1665), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1655), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1479), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_and, + anon_sym_or, + [41312] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + ACTIONS(1634), 1, + anon_sym_CARET, + ACTIONS(1614), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1616), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1622), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1628), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 17, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [41376] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + STATE(678), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1053), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [41424] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + ACTIONS(1614), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1616), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1622), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 3, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1628), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 18, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [41486] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1405), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1403), 32, + sym__string_start, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [41530] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1610), 1, + anon_sym_DOT, + ACTIONS(1612), 1, + anon_sym_LPAREN, + ACTIONS(1624), 1, + anon_sym_LBRACK, + ACTIONS(1626), 1, + anon_sym_STAR_STAR, + STATE(792), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1577), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1575), 25, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [41584] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1657), 1, + anon_sym_PIPE, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + ACTIONS(1669), 1, + anon_sym_AMP, + ACTIONS(1671), 1, + anon_sym_CARET, + ACTIONS(1589), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1651), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1653), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1659), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1665), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1587), 15, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [41651] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + ACTIONS(1573), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1651), 2, + anon_sym_STAR, + anon_sym_SLASH, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1665), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 22, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [41708] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(303), 3, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(276), 13, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + ACTIONS(307), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [41753] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1591), 1, + anon_sym_COLON_EQ, + ACTIONS(1050), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(1053), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 27, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [41800] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + ACTIONS(1669), 1, + anon_sym_AMP, + ACTIONS(1671), 1, + anon_sym_CARET, + ACTIONS(1573), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1651), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1653), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1659), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1665), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 16, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [41865] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1657), 1, + anon_sym_PIPE, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + ACTIONS(1669), 1, + anon_sym_AMP, + ACTIONS(1671), 1, + anon_sym_CARET, + ACTIONS(1581), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1651), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1653), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1659), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1665), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1579), 15, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [41932] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + ACTIONS(1573), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1651), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1659), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1665), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 20, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [41991] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 25, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [42044] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1055), 1, + anon_sym_COLON_EQ, + ACTIONS(1053), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [42089] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 1, + anon_sym_COLON_EQ, + ACTIONS(276), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [42134] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1573), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1571), 25, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [42187] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1657), 1, + anon_sym_PIPE, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + ACTIONS(1669), 1, + anon_sym_AMP, + ACTIONS(1671), 1, + anon_sym_CARET, + ACTIONS(1585), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1651), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1653), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1659), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1665), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1583), 15, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [42254] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1401), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1399), 30, + sym__newline, + sym__string_start, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [42297] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1591), 1, + anon_sym_COLON_EQ, + ACTIONS(1677), 1, + anon_sym_EQ, + ACTIONS(1053), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [42344] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(608), 1, + anon_sym_COLON_EQ, + ACTIONS(620), 1, + anon_sym_EQ, + ACTIONS(276), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [42391] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + ACTIONS(1671), 1, + anon_sym_CARET, + ACTIONS(1573), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1651), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1653), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1659), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1665), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 17, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [42454] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1048), 3, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(1053), 13, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + ACTIONS(1078), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [42499] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + ACTIONS(1573), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1651), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1653), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1659), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1665), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + ACTIONS(1571), 18, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [42560] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(608), 1, + anon_sym_COLON_EQ, + ACTIONS(280), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(276), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 27, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [42607] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1165), 3, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(1170), 13, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + ACTIONS(1172), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [42652] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1647), 1, + anon_sym_DOT, + ACTIONS(1649), 1, + anon_sym_LPAREN, + ACTIONS(1661), 1, + anon_sym_LBRACK, + ACTIONS(1663), 1, + anon_sym_STAR_STAR, + STATE(847), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1577), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1575), 25, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [42705] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(303), 3, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(276), 13, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + ACTIONS(572), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [42750] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1146), 3, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(1151), 13, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + ACTIONS(1153), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [42795] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1405), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1403), 30, + sym__newline, + sym__string_start, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [42838] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1048), 3, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(1053), 13, + anon_sym_STAR, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + ACTIONS(1059), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [42883] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1461), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1459), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [42925] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1425), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1423), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [42967] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1457), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1455), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43009] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1453), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1451), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43051] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1533), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1531), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43093] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1437), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1435), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43135] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1449), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1447), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43177] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1429), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1427), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43219] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1167), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(1170), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1165), 27, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [43263] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1445), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1443), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43305] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1473), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1471), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43347] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1417), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1415), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43389] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1425), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1423), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43431] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1465), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1463), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43473] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1469), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1467), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43515] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1151), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1146), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43557] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1170), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1165), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43599] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1511), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1509), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43641] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1148), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(1151), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1146), 27, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [43685] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1519), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1517), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43727] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1523), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1521), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43769] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1515), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1513), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43811] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1417), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1415), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43853] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(276), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43895] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1413), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1411), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43937] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1519), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1517), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [43979] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1053), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [44021] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1679), 1, + anon_sym_COLON_EQ, + ACTIONS(1053), 5, + anon_sym_STAR, + anon_sym_COLON, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 28, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44065] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1439), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [44107] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1541), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1539), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [44149] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(628), 1, + anon_sym_COLON_EQ, + ACTIONS(276), 5, + anon_sym_STAR, + anon_sym_COLON, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 28, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44193] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1569), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1567), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [44235] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1433), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1431), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [44277] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1409), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1407), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [44319] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1537), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1535), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [44361] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1050), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(1053), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 27, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44405] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1421), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1419), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [44447] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1421), 5, + anon_sym_STAR, + anon_sym_EQ, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1419), 29, + sym__newline, + anon_sym_DOT, + anon_sym_from, + anon_sym_LPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + sym__semicolon, + [44489] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1519), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1517), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44530] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(832), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(830), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44571] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1053), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44612] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1074), 1, + anon_sym_COLON_EQ, + ACTIONS(1677), 1, + anon_sym_EQ, + ACTIONS(1053), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1048), 27, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44657] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1461), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1459), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44698] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1457), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1455), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44739] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1453), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1451), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44780] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1449), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1447), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44821] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1409), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1407), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44862] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1445), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1443), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44903] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1533), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1531), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44944] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1441), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1439), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [44985] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1437), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1435), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45026] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(828), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(826), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45067] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1421), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1419), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45108] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1421), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1419), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45149] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1473), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1471), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45190] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1541), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1539), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45231] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1417), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1415), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45272] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1537), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1535), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45313] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(840), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(838), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45354] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1569), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1567), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45395] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1417), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1415), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45436] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(276), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45477] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1511), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1509), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45518] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(836), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(834), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45559] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1519), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1517), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45600] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(832), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(830), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45641] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(568), 1, + anon_sym_COLON_EQ, + ACTIONS(620), 1, + anon_sym_EQ, + ACTIONS(276), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(303), 27, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45686] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1425), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1423), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45727] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1413), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1411), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45768] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1465), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1463), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45809] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1429), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1427), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45850] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1469), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1467), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45891] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1425), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1423), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45932] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(824), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(822), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [45973] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(824), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(822), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [46014] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1433), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1431), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [46055] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1515), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1513), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [46096] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1523), 4, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1521), 29, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_GT_GT, + anon_sym_if, + anon_sym_COLON, + anon_sym_in, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_not, + anon_sym_and, + anon_sym_or, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + anon_sym_is, + [46137] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + STATE(1286), 2, + sym__match_patterns, + sym_open_sequence_match_pattern, + STATE(1287), 2, + sym__match_pattern, + sym_match_as_pattern, + STATE(1404), 2, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46211] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1701), 1, + anon_sym_if, + ACTIONS(1703), 1, + anon_sym_COLON, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(1106), 4, + sym__match_pattern, + sym_match_as_pattern, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46285] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1705), 1, + anon_sym_if, + ACTIONS(1707), 1, + anon_sym_COLON, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(1106), 4, + sym__match_pattern, + sym_match_as_pattern, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46359] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + STATE(1221), 2, + sym__match_patterns, + sym_open_sequence_match_pattern, + STATE(1287), 2, + sym__match_pattern, + sym_match_as_pattern, + STATE(1404), 2, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46433] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1709), 1, + anon_sym_RPAREN, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + STATE(1392), 2, + sym__match_pattern, + sym_match_as_pattern, + STATE(1396), 2, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46506] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1711), 1, + anon_sym_RPAREN, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(1106), 4, + sym__match_pattern, + sym_match_as_pattern, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46577] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1711), 1, + anon_sym_RBRACK, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(1106), 4, + sym__match_pattern, + sym_match_as_pattern, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46648] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1709), 1, + anon_sym_RBRACK, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(1202), 4, + sym__match_pattern, + sym_match_as_pattern, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46719] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1713), 1, + anon_sym_RBRACK, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(1106), 4, + sym__match_pattern, + sym_match_as_pattern, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46790] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1713), 1, + anon_sym_RPAREN, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(1106), 4, + sym__match_pattern, + sym_match_as_pattern, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46861] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1685), 1, + anon_sym_STAR, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(1106), 4, + sym__match_pattern, + sym_match_as_pattern, + sym__match_maybe_star_pattern, + sym_match_star_pattern, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [46929] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1715), 1, + sym_identifier, + ACTIONS(1717), 1, + anon_sym_RPAREN, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1212), 1, + sym_match_positional_pattern, + STATE(1330), 1, + sym_match_keyword_pattern, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + STATE(1364), 2, + sym__match_pattern, + sym_match_as_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [47001] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1715), 1, + sym_identifier, + ACTIONS(1719), 1, + anon_sym_RPAREN, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1290), 1, + sym_match_keyword_pattern, + STATE(1403), 1, + sym_match_positional_pattern, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + STATE(1364), 2, + sym__match_pattern, + sym_match_as_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [47073] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1715), 1, + sym_identifier, + ACTIONS(1721), 1, + anon_sym_RPAREN, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1326), 1, + sym_match_keyword_pattern, + STATE(1403), 1, + sym_match_positional_pattern, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + STATE(1364), 2, + sym__match_pattern, + sym_match_as_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [47145] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1403), 1, + sym_match_positional_pattern, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + STATE(1364), 2, + sym__match_pattern, + sym_match_as_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [47211] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + STATE(1355), 2, + sym__match_pattern, + sym_match_as_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [47274] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1689), 1, + sym_match_wildcard_pattern, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + STATE(1024), 2, + sym__match_or_pattern, + sym_match_or_pattern, + STATE(1399), 2, + sym__match_pattern, + sym_match_as_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(971), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [47337] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1723), 1, + sym_match_wildcard_pattern, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(984), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [47392] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + ACTIONS(1681), 1, + sym_identifier, + ACTIONS(1683), 1, + anon_sym_LPAREN, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1691), 1, + anon_sym_LBRACK, + ACTIONS(1693), 1, + anon_sym_LBRACE, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1725), 1, + sym_match_wildcard_pattern, + STATE(913), 1, + sym_string, + STATE(975), 1, + sym_concatenated_string, + STATE(1406), 1, + sym_pattern_class_name, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + STATE(957), 8, + sym__closed_pattern, + sym_match_literal_pattern, + sym_match_capture_pattern, + sym_match_value_pattern, + sym_match_group_pattern, + sym_match_sequence_pattern, + sym_match_mapping_pattern, + sym_match_class_pattern, + [47447] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1729), 1, + anon_sym_as, + ACTIONS(1734), 1, + anon_sym_not, + ACTIONS(1740), 1, + anon_sym_is, + STATE(868), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1737), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1731), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1727), 10, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_and, + anon_sym_or, + [47487] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1729), 1, + anon_sym_EQ, + ACTIONS(1746), 1, + anon_sym_not, + ACTIONS(1752), 1, + anon_sym_is, + STATE(869), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1749), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1743), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1727), 10, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_and, + anon_sym_or, + sym_type_conversion, + [47527] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1499), 1, + anon_sym_not, + ACTIONS(1507), 1, + anon_sym_is, + ACTIONS(1757), 1, + anon_sym_EQ, + STATE(869), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1505), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1485), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1755), 10, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_and, + anon_sym_or, + sym_type_conversion, + [47567] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1557), 1, + anon_sym_not, + ACTIONS(1565), 1, + anon_sym_is, + ACTIONS(1757), 1, + anon_sym_as, + STATE(868), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1563), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1547), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1755), 10, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_and, + anon_sym_or, + [47607] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1761), 1, + anon_sym_COMMA, + STATE(872), 1, + aux_sym__patterns_repeat1, + ACTIONS(1759), 18, + anon_sym_RPAREN, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [47637] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1764), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [47662] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1766), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [47687] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1059), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [47712] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1768), 19, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_in, + anon_sym_RBRACK, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [47737] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1729), 1, + anon_sym_EQ, + ACTIONS(1773), 1, + anon_sym_not, + ACTIONS(1779), 1, + anon_sym_is, + STATE(877), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1776), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1770), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1727), 7, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_and, + anon_sym_or, + sym__semicolon, + [47774] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1630), 1, + anon_sym_not, + ACTIONS(1638), 1, + anon_sym_is, + ACTIONS(1757), 1, + anon_sym_EQ, + STATE(877), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1636), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1618), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1755), 7, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_and, + anon_sym_or, + sym__semicolon, + [47811] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1053), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1782), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + ACTIONS(1048), 14, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + [47840] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(276), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1784), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + ACTIONS(303), 14, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_GT_GT, + anon_sym_PIPE, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_LBRACK, + anon_sym_STAR_STAR, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + anon_sym_AMP, + anon_sym_CARET, + anon_sym_LT_LT, + [47869] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1667), 1, + anon_sym_not, + ACTIONS(1675), 1, + anon_sym_is, + STATE(883), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1673), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1655), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1755), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_and, + anon_sym_or, + [47903] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1475), 1, + anon_sym_DOT, + ACTIONS(1477), 1, + anon_sym_LPAREN, + ACTIONS(1487), 1, + anon_sym_PIPE, + ACTIONS(1491), 1, + anon_sym_LBRACK, + ACTIONS(1493), 1, + anon_sym_STAR_STAR, + ACTIONS(1501), 1, + anon_sym_AMP, + ACTIONS(1503), 1, + anon_sym_CARET, + ACTIONS(1481), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(1483), 2, + anon_sym_GT_GT, + anon_sym_LT_LT, + ACTIONS(1489), 2, + anon_sym_DASH, + anon_sym_PLUS, + STATE(633), 2, + sym_argument_list, + sym_generator_expression, + ACTIONS(1497), 3, + anon_sym_AT, + anon_sym_PERCENT, + anon_sym_SLASH_SLASH, + [47949] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1789), 1, + anon_sym_not, + ACTIONS(1795), 1, + anon_sym_is, + STATE(883), 1, + aux_sym_comparison_operator_repeat1, + ACTIONS(1792), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1786), 6, + anon_sym_in, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_GT_EQ, + anon_sym_LT_GT, + ACTIONS(1727), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_and, + anon_sym_or, + [47983] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1798), 1, + anon_sym_COMMA, + STATE(872), 1, + aux_sym__patterns_repeat1, + ACTIONS(1800), 16, + anon_sym_COLON, + anon_sym_in, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [48011] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1802), 1, + sym_identifier, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1808), 1, + anon_sym_COLON, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + STATE(1334), 1, + sym_parameter, + STATE(1453), 1, + sym_lambda_parameters, + STATE(1521), 1, + sym__parameters, + STATE(1347), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48054] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1802), 1, + sym_identifier, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1814), 1, + anon_sym_COLON, + STATE(1334), 1, + sym_parameter, + STATE(1458), 1, + sym_lambda_parameters, + STATE(1521), 1, + sym__parameters, + STATE(1347), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48097] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1802), 1, + sym_identifier, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1816), 1, + anon_sym_COLON, + STATE(1334), 1, + sym_parameter, + STATE(1413), 1, + sym_lambda_parameters, + STATE(1521), 1, + sym__parameters, + STATE(1347), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48140] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1802), 1, + sym_identifier, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1818), 1, + anon_sym_COLON, + STATE(1334), 1, + sym_parameter, + STATE(1427), 1, + sym_lambda_parameters, + STATE(1521), 1, + sym__parameters, + STATE(1347), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48183] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1820), 1, + anon_sym_COMMA, + ACTIONS(1822), 1, + anon_sym_COLON, + ACTIONS(1824), 1, + anon_sym_EQ, + STATE(884), 1, + aux_sym__patterns_repeat1, + ACTIONS(1826), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [48214] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1802), 1, + sym_identifier, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1828), 1, + anon_sym_COLON, + STATE(1334), 1, + sym_parameter, + STATE(1521), 1, + sym__parameters, + STATE(1524), 1, + sym_lambda_parameters, + STATE(1347), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48257] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1830), 1, + sym_identifier, + ACTIONS(1832), 1, + anon_sym_RBRACE, + ACTIONS(1834), 1, + anon_sym_STAR_STAR, + STATE(975), 1, + sym_concatenated_string, + STATE(1168), 1, + sym_string, + STATE(1359), 1, + sym_match_double_star_pattern, + STATE(1362), 1, + sym_match_key_value_pattern, + STATE(1486), 2, + sym_match_literal_pattern, + sym_match_value_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + [48303] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1830), 1, + sym_identifier, + ACTIONS(1834), 1, + anon_sym_STAR_STAR, + ACTIONS(1836), 1, + anon_sym_RBRACE, + STATE(975), 1, + sym_concatenated_string, + STATE(1168), 1, + sym_string, + STATE(1218), 1, + sym_match_key_value_pattern, + STATE(1368), 1, + sym_match_double_star_pattern, + STATE(1486), 2, + sym_match_literal_pattern, + sym_match_value_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + [48349] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1838), 1, + sym_identifier, + ACTIONS(1840), 1, + anon_sym_RPAREN, + STATE(1229), 1, + sym_parameter, + STATE(1455), 1, + sym__parameters, + STATE(1267), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48389] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1830), 1, + sym_identifier, + ACTIONS(1834), 1, + anon_sym_STAR_STAR, + ACTIONS(1842), 1, + anon_sym_RBRACE, + STATE(975), 1, + sym_concatenated_string, + STATE(1168), 1, + sym_string, + STATE(1362), 1, + sym_match_key_value_pattern, + STATE(1401), 1, + sym_match_double_star_pattern, + STATE(1486), 2, + sym_match_literal_pattern, + sym_match_value_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + [48435] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1838), 1, + sym_identifier, + ACTIONS(1844), 1, + anon_sym_RPAREN, + STATE(1201), 1, + sym_parameter, + STATE(1267), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48472] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1802), 1, + sym_identifier, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1846), 1, + anon_sym_COLON, + STATE(1201), 1, + sym_parameter, + STATE(1347), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48509] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1822), 1, + anon_sym_COLON, + ACTIONS(1824), 1, + anon_sym_EQ, + ACTIONS(1826), 13, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_AT_EQ, + anon_sym_SLASH_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_STAR_STAR_EQ, + anon_sym_GT_GT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_AMP_EQ, + anon_sym_CARET_EQ, + anon_sym_PIPE_EQ, + [48534] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1802), 1, + sym_identifier, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1844), 1, + anon_sym_COLON, + STATE(1201), 1, + sym_parameter, + STATE(1347), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48571] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1838), 1, + sym_identifier, + ACTIONS(1846), 1, + anon_sym_RPAREN, + STATE(1201), 1, + sym_parameter, + STATE(1267), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48608] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1495), 1, + anon_sym_as, + ACTIONS(1479), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + anon_sym_and, + anon_sym_or, + sym_type_conversion, + [48630] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1850), 1, + anon_sym_as, + ACTIONS(1848), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + anon_sym_and, + anon_sym_or, + sym_type_conversion, + [48652] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1802), 1, + sym_identifier, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + STATE(1201), 1, + sym_parameter, + STATE(1347), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48686] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1804), 1, + anon_sym_LPAREN, + ACTIONS(1806), 1, + anon_sym_STAR, + ACTIONS(1810), 1, + anon_sym_STAR_STAR, + ACTIONS(1812), 1, + anon_sym_SLASH, + ACTIONS(1838), 1, + sym_identifier, + STATE(1201), 1, + sym_parameter, + STATE(1267), 2, + sym_list_splat_pattern, + sym_dictionary_splat_pattern, + STATE(1333), 6, + sym_tuple_pattern, + sym_default_parameter, + sym_typed_default_parameter, + sym_typed_parameter, + sym_positional_separator, + sym_keyword_separator, + [48720] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1854), 1, + anon_sym_as, + ACTIONS(1852), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + anon_sym_and, + anon_sym_or, + sym_type_conversion, + [48742] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1687), 1, + anon_sym_DASH, + ACTIONS(1695), 1, + sym_integer, + ACTIONS(1697), 1, + sym_float, + ACTIONS(1830), 1, + sym_identifier, + STATE(975), 1, + sym_concatenated_string, + STATE(1168), 1, + sym_string, + STATE(1362), 1, + sym_match_key_value_pattern, + STATE(1486), 2, + sym_match_literal_pattern, + sym_match_value_pattern, + ACTIONS(1699), 3, + sym_true, + sym_false, + sym_none, + [48779] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1858), 1, + anon_sym_DOT, + STATE(906), 1, + aux_sym_match_value_pattern_repeat1, + ACTIONS(1856), 10, + anon_sym_import, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [48801] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1865), 1, + anon_sym_COLON, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1871), 1, + anon_sym_RBRACE, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1438), 1, + sym__comprehension_clauses, + [48838] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1877), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [48861] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1887), 1, + anon_sym_as, + ACTIONS(1885), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [48886] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1889), 1, + anon_sym_DOT, + ACTIONS(1891), 1, + anon_sym_LPAREN, + STATE(906), 1, + aux_sym_match_value_pattern_repeat1, + ACTIONS(1893), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [48909] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1865), 1, + anon_sym_COLON, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1871), 1, + anon_sym_RBRACE, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1405), 1, + sym__comprehension_clauses, + [48946] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1897), 1, + anon_sym_as, + ACTIONS(1895), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [48971] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + sym__string_start, + STATE(678), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + ACTIONS(1899), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [48992] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1903), 1, + anon_sym_as, + ACTIONS(1901), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [49015] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1905), 1, + anon_sym_RPAREN, + ACTIONS(1907), 1, + anon_sym_COMMA, + ACTIONS(1910), 1, + anon_sym_as, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1464), 1, + sym__comprehension_clauses, + [49052] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1912), 9, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49073] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1856), 11, + anon_sym_import, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [49090] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1865), 1, + anon_sym_COLON, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1871), 1, + anon_sym_RBRACE, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1410), 1, + sym__comprehension_clauses, + [49127] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1885), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49150] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1912), 10, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + anon_sym_or, + sym_type_conversion, + [49169] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1901), 9, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49190] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1914), 1, + anon_sym_as, + ACTIONS(1912), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [49213] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1916), 1, + anon_sym_as, + ACTIONS(1877), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [49238] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1895), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49261] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1889), 1, + anon_sym_DOT, + ACTIONS(1918), 1, + anon_sym_LPAREN, + STATE(910), 1, + aux_sym_match_value_pattern_repeat1, + ACTIONS(1920), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [49284] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1922), 9, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_else, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49305] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1914), 1, + anon_sym_as, + ACTIONS(1912), 9, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_or, + [49326] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1924), 1, + anon_sym_as, + ACTIONS(1922), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [49349] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1928), 1, + anon_sym_COMMA, + STATE(964), 1, + aux_sym_expression_list_repeat1, + ACTIONS(1926), 6, + anon_sym_RPAREN, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49376] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1930), 1, + anon_sym_RPAREN, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1442), 1, + sym__comprehension_clauses, + [49410] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1932), 1, + anon_sym_RPAREN, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1417), 1, + sym__comprehension_clauses, + [49444] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1871), 1, + anon_sym_RBRACK, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1429), 1, + sym__comprehension_clauses, + [49478] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1934), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49500] = 9, + ACTIONS(1936), 1, + anon_sym_LBRACE2, + ACTIONS(1940), 1, + sym__not_escape_sequence, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(1944), 1, + sym__string_end, + STATE(936), 1, + aux_sym_string_repeat1, + STATE(1031), 1, + aux_sym_string_content_repeat1, + STATE(1072), 1, + sym_string_content, + STATE(1076), 1, + sym_interpolation, + ACTIONS(1938), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [49530] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1871), 1, + anon_sym_RBRACK, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1407), 1, + sym__comprehension_clauses, + [49564] = 9, + ACTIONS(1936), 1, + anon_sym_LBRACE2, + ACTIONS(1940), 1, + sym__not_escape_sequence, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(1946), 1, + sym__string_end, + STATE(937), 1, + aux_sym_string_repeat1, + STATE(1031), 1, + aux_sym_string_content_repeat1, + STATE(1072), 1, + sym_string_content, + STATE(1076), 1, + sym_interpolation, + ACTIONS(1938), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [49594] = 9, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(1948), 1, + anon_sym_LBRACE2, + ACTIONS(1954), 1, + sym__not_escape_sequence, + ACTIONS(1957), 1, + sym__string_end, + STATE(937), 1, + aux_sym_string_repeat1, + STATE(1031), 1, + aux_sym_string_content_repeat1, + STATE(1072), 1, + sym_string_content, + STATE(1076), 1, + sym_interpolation, + ACTIONS(1951), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [49624] = 9, + ACTIONS(1936), 1, + anon_sym_LBRACE2, + ACTIONS(1940), 1, + sym__not_escape_sequence, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(1959), 1, + sym__string_end, + STATE(937), 1, + aux_sym_string_repeat1, + STATE(1031), 1, + aux_sym_string_content_repeat1, + STATE(1072), 1, + sym_string_content, + STATE(1076), 1, + sym_interpolation, + ACTIONS(1938), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [49654] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1961), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49676] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1963), 1, + anon_sym_RPAREN, + ACTIONS(1965), 1, + anon_sym_COMMA, + STATE(956), 1, + sym_for_in_clause, + STATE(1228), 1, + aux_sym_argument_list_repeat1, + STATE(1417), 1, + sym__comprehension_clauses, + [49710] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1871), 1, + anon_sym_RBRACK, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1437), 1, + sym__comprehension_clauses, + [49744] = 9, + ACTIONS(1936), 1, + anon_sym_LBRACE2, + ACTIONS(1940), 1, + sym__not_escape_sequence, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(1967), 1, + sym__string_end, + STATE(937), 1, + aux_sym_string_repeat1, + STATE(1031), 1, + aux_sym_string_content_repeat1, + STATE(1072), 1, + sym_string_content, + STATE(1076), 1, + sym_interpolation, + ACTIONS(1938), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [49774] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1971), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1969), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [49792] = 9, + ACTIONS(1936), 1, + anon_sym_LBRACE2, + ACTIONS(1940), 1, + sym__not_escape_sequence, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(1973), 1, + sym__string_end, + STATE(942), 1, + aux_sym_string_repeat1, + STATE(1031), 1, + aux_sym_string_content_repeat1, + STATE(1072), 1, + sym_string_content, + STATE(1076), 1, + sym_interpolation, + ACTIONS(1938), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [49822] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1905), 1, + anon_sym_RPAREN, + STATE(956), 1, + sym_for_in_clause, + STATE(1111), 1, + aux_sym__collection_elements_repeat1, + STATE(1464), 1, + sym__comprehension_clauses, + [49856] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1975), 1, + anon_sym_RPAREN, + ACTIONS(1977), 1, + anon_sym_COMMA, + STATE(956), 1, + sym_for_in_clause, + STATE(1273), 1, + aux_sym_argument_list_repeat1, + STATE(1464), 1, + sym__comprehension_clauses, + [49890] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1979), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49912] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1981), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [49934] = 9, + ACTIONS(1936), 1, + anon_sym_LBRACE2, + ACTIONS(1940), 1, + sym__not_escape_sequence, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(1983), 1, + sym__string_end, + STATE(937), 1, + aux_sym_string_repeat1, + STATE(1031), 1, + aux_sym_string_content_repeat1, + STATE(1072), 1, + sym_string_content, + STATE(1076), 1, + sym_interpolation, + ACTIONS(1938), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [49964] = 9, + ACTIONS(1936), 1, + anon_sym_LBRACE2, + ACTIONS(1940), 1, + sym__not_escape_sequence, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(1985), 1, + sym__string_end, + STATE(949), 1, + aux_sym_string_repeat1, + STATE(1031), 1, + aux_sym_string_content_repeat1, + STATE(1072), 1, + sym_string_content, + STATE(1076), 1, + sym_interpolation, + ACTIONS(1938), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [49994] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1989), 2, + anon_sym_DASH, + anon_sym_PLUS, + ACTIONS(1987), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50012] = 9, + ACTIONS(1936), 1, + anon_sym_LBRACE2, + ACTIONS(1940), 1, + sym__not_escape_sequence, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(1991), 1, + sym__string_end, + STATE(938), 1, + aux_sym_string_repeat1, + STATE(1031), 1, + aux_sym_string_content_repeat1, + STATE(1072), 1, + sym_string_content, + STATE(1076), 1, + sym_interpolation, + ACTIONS(1938), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [50042] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(1993), 1, + anon_sym_RPAREN, + ACTIONS(1995), 1, + anon_sym_COMMA, + STATE(956), 1, + sym_for_in_clause, + STATE(1280), 1, + aux_sym_argument_list_repeat1, + STATE(1442), 1, + sym__comprehension_clauses, + [50076] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1999), 1, + anon_sym_PIPE, + STATE(954), 1, + aux_sym_match_or_pattern_repeat1, + ACTIONS(1997), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50095] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2004), 1, + anon_sym_if, + ACTIONS(2007), 1, + anon_sym_async, + ACTIONS(2010), 1, + anon_sym_for, + ACTIONS(2002), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + STATE(955), 3, + sym_for_in_clause, + sym_if_clause, + aux_sym__comprehension_clauses_repeat1, + [50118] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(2015), 1, + anon_sym_if, + ACTIONS(2013), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + STATE(959), 3, + sym_for_in_clause, + sym_if_clause, + aux_sym__comprehension_clauses_repeat1, + [50141] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2019), 1, + anon_sym_PIPE, + STATE(961), 1, + aux_sym_match_or_pattern_repeat1, + ACTIONS(2017), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50160] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(2021), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50179] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(2015), 1, + anon_sym_if, + ACTIONS(2023), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + STATE(955), 3, + sym_for_in_clause, + sym_if_clause, + aux_sym__comprehension_clauses_repeat1, + [50202] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1928), 1, + anon_sym_COMMA, + STATE(964), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2025), 4, + anon_sym_COLON, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [50227] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2019), 1, + anon_sym_PIPE, + STATE(954), 1, + aux_sym_match_or_pattern_repeat1, + ACTIONS(2027), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50246] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(2021), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50265] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(2021), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50284] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2031), 1, + anon_sym_COMMA, + STATE(1005), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2029), 6, + anon_sym_RPAREN, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [50302] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(854), 1, + anon_sym_except_STAR, + ACTIONS(862), 1, + anon_sym_except, + ACTIONS(2033), 1, + anon_sym_finally, + STATE(568), 1, + sym_finally_clause, + STATE(229), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + STATE(241), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + [50326] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2035), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50340] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1852), 8, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_EQ, + anon_sym_and, + anon_sym_or, + sym__semicolon, + [50354] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2037), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50368] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2039), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50382] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2041), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50396] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2045), 1, + anon_sym_PIPE, + ACTIONS(2043), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50412] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2047), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50426] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2049), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50440] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(1901), 6, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_EQ, + sym__semicolon, + [50458] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1899), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50472] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1848), 8, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_EQ, + anon_sym_and, + anon_sym_or, + sym__semicolon, + [50486] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2055), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50500] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2059), 1, + anon_sym_COMMA, + STATE(1012), 1, + aux_sym_for_in_clause_repeat1, + ACTIONS(2057), 6, + anon_sym_RPAREN, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50518] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2063), 1, + anon_sym_COMMA, + STATE(995), 1, + aux_sym_for_in_clause_repeat1, + ACTIONS(2061), 6, + anon_sym_RPAREN, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50536] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(1922), 6, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_EQ, + sym__semicolon, + [50554] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2065), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50568] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2067), 1, + anon_sym_from, + ACTIONS(2069), 1, + anon_sym_COMMA, + ACTIONS(2071), 1, + anon_sym_if, + STATE(1092), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2073), 2, + sym__newline, + sym__semicolon, + [50594] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(854), 1, + anon_sym_except_STAR, + ACTIONS(862), 1, + anon_sym_except, + ACTIONS(2033), 1, + anon_sym_finally, + STATE(516), 1, + sym_finally_clause, + STATE(232), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + STATE(234), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + [50618] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1997), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50632] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2075), 1, + anon_sym_COMMA, + STATE(1005), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2029), 6, + anon_sym_RPAREN, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [50650] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2077), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50664] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2079), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50678] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2081), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50692] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2083), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50706] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2085), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50720] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(848), 1, + anon_sym_except, + ACTIONS(864), 1, + anon_sym_except_STAR, + ACTIONS(2087), 1, + anon_sym_finally, + STATE(514), 1, + sym_finally_clause, + STATE(228), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + STATE(240), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + [50744] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(1885), 5, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_EQ, + sym__semicolon, + [50764] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2089), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50778] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(2091), 6, + anon_sym_RPAREN, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50796] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2095), 1, + anon_sym_COMMA, + STATE(1012), 1, + aux_sym_for_in_clause_repeat1, + ACTIONS(2093), 6, + anon_sym_RPAREN, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50814] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_AT, + ACTIONS(2097), 1, + anon_sym_async, + ACTIONS(2099), 1, + anon_sym_def, + ACTIONS(2101), 1, + anon_sym_class, + STATE(584), 2, + sym_function_definition, + sym_class_definition, + STATE(1062), 2, + sym_decorator, + aux_sym_decorated_definition_repeat1, + [50838] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(1895), 5, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_EQ, + sym__semicolon, + [50858] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2103), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50872] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1889), 1, + anon_sym_DOT, + ACTIONS(1918), 1, + anon_sym_LPAREN, + ACTIONS(2105), 1, + anon_sym_EQ, + STATE(910), 1, + aux_sym_match_value_pattern_repeat1, + ACTIONS(1920), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_PIPE, + [50894] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(1912), 6, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_EQ, + sym__semicolon, + [50912] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(1912), 7, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_EQ, + anon_sym_or, + sym__semicolon, + [50928] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(67), 1, + anon_sym_AT, + ACTIONS(2107), 1, + anon_sym_async, + ACTIONS(2109), 1, + anon_sym_def, + ACTIONS(2111), 1, + anon_sym_class, + STATE(499), 2, + sym_function_definition, + sym_class_definition, + STATE(1062), 2, + sym_decorator, + aux_sym_decorated_definition_repeat1, + [50952] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(848), 1, + anon_sym_except, + ACTIONS(864), 1, + anon_sym_except_STAR, + ACTIONS(2087), 1, + anon_sym_finally, + STATE(507), 1, + sym_finally_clause, + STATE(237), 2, + sym_except_group_clause, + aux_sym_try_statement_repeat2, + STATE(238), 2, + sym_except_clause, + aux_sym_try_statement_repeat1, + [50976] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2113), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [50990] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2117), 1, + anon_sym_COMMA, + STATE(1005), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2115), 6, + anon_sym_RPAREN, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [51008] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2120), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51022] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(1877), 5, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_EQ, + sym__semicolon, + [51042] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2122), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51056] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1479), 8, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + anon_sym_if, + anon_sym_EQ, + anon_sym_and, + anon_sym_or, + sym__semicolon, + [51070] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2124), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51084] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2126), 8, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_PIPE, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51098] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2130), 1, + anon_sym_COMMA, + STATE(1012), 1, + aux_sym_for_in_clause_repeat1, + ACTIONS(2128), 6, + anon_sym_RPAREN, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51116] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2135), 1, + anon_sym_COMMA, + STATE(978), 1, + aux_sym_for_in_clause_repeat1, + ACTIONS(2133), 6, + anon_sym_RPAREN, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51134] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2069), 1, + anon_sym_COMMA, + ACTIONS(2071), 1, + anon_sym_if, + STATE(1092), 1, + aux_sym_expression_list_repeat1, + ACTIONS(1926), 2, + sym__newline, + sym__semicolon, + [51157] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1479), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_and, + anon_sym_or, + [51170] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2137), 1, + sym_identifier, + ACTIONS(2139), 1, + anon_sym_DOT, + ACTIONS(2141), 1, + anon_sym___future__, + STATE(1144), 1, + aux_sym_import_prefix_repeat1, + STATE(1236), 1, + sym_import_prefix, + STATE(1441), 2, + sym_relative_import, + sym_dotted_name, + [51193] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2143), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51206] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2128), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51219] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2069), 1, + anon_sym_COMMA, + ACTIONS(2071), 1, + anon_sym_if, + STATE(1092), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2145), 2, + sym__newline, + sym__semicolon, + [51242] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2147), 1, + sym_identifier, + ACTIONS(2149), 1, + anon_sym_STAR, + ACTIONS(2151), 1, + anon_sym_STAR_STAR, + STATE(1388), 4, + sym_typevar_parameter, + sym_typevartuple_parameter, + sym_paramspec_parameter, + sym__type_parameter, + [51261] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2153), 1, + anon_sym_COMMA, + ACTIONS(2155), 1, + anon_sym_COLON, + ACTIONS(2157), 1, + anon_sym_RBRACK, + STATE(1203), 1, + aux_sym_subscript_repeat1, + [51286] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2159), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_EQ, + [51305] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1934), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [51318] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2163), 1, + anon_sym_as, + ACTIONS(2161), 6, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51333] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(1922), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + [51350] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2169), 1, + anon_sym_COMMA, + STATE(1137), 1, + aux_sym_assert_statement_repeat1, + ACTIONS(2171), 2, + sym__newline, + sym__semicolon, + [51373] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(2173), 1, + anon_sym_if, + ACTIONS(1895), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_COLON, + [51392] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(1901), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + [51409] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(1912), 6, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_or, + [51424] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(1912), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + [51441] = 6, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2175), 1, + anon_sym_LBRACE2, + ACTIONS(2179), 1, + sym__not_escape_sequence, + ACTIONS(2181), 1, + sym__string_end, + STATE(1055), 1, + aux_sym_string_content_repeat1, + ACTIONS(2177), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [51462] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(2173), 1, + anon_sym_if, + ACTIONS(1877), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_COLON, + [51481] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2183), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51494] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2069), 1, + anon_sym_COMMA, + ACTIONS(2071), 1, + anon_sym_if, + STATE(1092), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2185), 2, + sym__newline, + sym__semicolon, + [51517] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(2173), 1, + anon_sym_if, + ACTIONS(1885), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_COLON, + [51536] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(1934), 4, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + sym__semicolon, + [51555] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2147), 1, + sym_identifier, + ACTIONS(2149), 1, + anon_sym_STAR, + ACTIONS(2151), 1, + anon_sym_STAR_STAR, + STATE(1227), 4, + sym_typevar_parameter, + sym_typevartuple_parameter, + sym_paramspec_parameter, + sym__type_parameter, + [51574] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(2187), 1, + anon_sym_COMMA, + ACTIONS(2189), 1, + anon_sym_RBRACE, + STATE(956), 1, + sym_for_in_clause, + STATE(1247), 1, + aux_sym_dictionary_repeat1, + STATE(1433), 1, + sym__comprehension_clauses, + [51599] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1863), 1, + anon_sym_if, + ACTIONS(1873), 1, + anon_sym_and, + ACTIONS(1875), 1, + anon_sym_or, + ACTIONS(2191), 4, + anon_sym_COMMA, + anon_sym_async, + anon_sym_for, + anon_sym_RBRACE, + [51618] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2155), 1, + anon_sym_COLON, + ACTIONS(2193), 1, + anon_sym_COMMA, + ACTIONS(2195), 1, + anon_sym_RBRACK, + STATE(1282), 1, + aux_sym_subscript_repeat1, + [51643] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1926), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_EQ, + sym_type_conversion, + [51656] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1848), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_and, + anon_sym_or, + [51669] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2197), 1, + anon_sym_COMMA, + STATE(1172), 1, + aux_sym_print_statement_repeat1, + ACTIONS(2199), 2, + sym__newline, + sym__semicolon, + [51692] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2169), 1, + anon_sym_COMMA, + STATE(1174), 1, + aux_sym_assert_statement_repeat1, + ACTIONS(2201), 2, + sym__newline, + sym__semicolon, + [51715] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2069), 1, + anon_sym_COMMA, + ACTIONS(2071), 1, + anon_sym_if, + STATE(1092), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2203), 2, + sym__newline, + sym__semicolon, + [51738] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2069), 1, + anon_sym_COMMA, + ACTIONS(2071), 1, + anon_sym_if, + STATE(1092), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2205), 2, + sym__newline, + sym__semicolon, + [51761] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2155), 1, + anon_sym_COLON, + ACTIONS(2207), 1, + anon_sym_COMMA, + ACTIONS(2209), 1, + anon_sym_RBRACK, + STATE(1272), 1, + aux_sym_subscript_repeat1, + [51786] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(1979), 4, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + sym__semicolon, + [51805] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(2211), 1, + anon_sym_COMMA, + ACTIONS(2213), 1, + anon_sym_RBRACE, + STATE(956), 1, + sym_for_in_clause, + STATE(1300), 1, + aux_sym_dictionary_repeat1, + STATE(1411), 1, + sym__comprehension_clauses, + [51830] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(2173), 1, + anon_sym_if, + ACTIONS(2217), 1, + anon_sym_as, + ACTIONS(2215), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [51851] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1852), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + anon_sym_if, + anon_sym_COLON, + anon_sym_and, + anon_sym_or, + [51864] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1867), 1, + anon_sym_async, + ACTIONS(1869), 1, + anon_sym_for, + ACTIONS(2219), 1, + anon_sym_COMMA, + ACTIONS(2221), 1, + anon_sym_RBRACE, + STATE(956), 1, + sym_for_in_clause, + STATE(1234), 1, + aux_sym_dictionary_repeat1, + STATE(1439), 1, + sym__comprehension_clauses, + [51889] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2223), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + [51908] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(1981), 4, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + sym__semicolon, + [51927] = 6, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2225), 1, + anon_sym_LBRACE2, + ACTIONS(2230), 1, + sym__not_escape_sequence, + ACTIONS(2233), 1, + sym__string_end, + STATE(1055), 1, + aux_sym_string_content_repeat1, + ACTIONS(2227), 3, + sym__string_content, + sym__escape_interpolation, + sym_escape_sequence, + [51948] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2235), 1, + sym_identifier, + ACTIONS(2237), 1, + anon_sym_LPAREN, + ACTIONS(2239), 1, + anon_sym_STAR, + STATE(1109), 1, + sym_dotted_name, + STATE(1143), 1, + sym_aliased_import, + STATE(1393), 1, + sym_wildcard_import, + STATE(1395), 1, + sym__import_list, + [51973] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2241), 1, + anon_sym_DOT, + STATE(1057), 1, + aux_sym_match_value_pattern_repeat1, + ACTIONS(1856), 4, + sym__newline, + anon_sym_COMMA, + anon_sym_as, + sym__semicolon, + [51989] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1889), 1, + anon_sym_DOT, + STATE(906), 1, + aux_sym_match_value_pattern_repeat1, + ACTIONS(2244), 4, + anon_sym_import, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + [52005] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1928), 1, + anon_sym_COMMA, + ACTIONS(2246), 1, + anon_sym_COLON, + STATE(964), 1, + aux_sym_expression_list_repeat1, + [52027] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2248), 2, + anon_sym_LBRACE2, + sym__not_escape_sequence, + ACTIONS(2250), 4, + sym__string_content, + sym__string_end, + sym__escape_interpolation, + sym_escape_sequence, + [52041] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1889), 1, + anon_sym_DOT, + STATE(1058), 1, + aux_sym_match_value_pattern_repeat1, + ACTIONS(2252), 4, + anon_sym_import, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_as, + [52057] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2256), 1, + anon_sym_AT, + STATE(1062), 2, + sym_decorator, + aux_sym_decorated_definition_repeat1, + ACTIONS(2254), 3, + anon_sym_async, + anon_sym_def, + anon_sym_class, + [52073] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(2173), 1, + anon_sym_if, + ACTIONS(2261), 1, + anon_sym_COLON, + ACTIONS(2259), 2, + anon_sym_COMMA, + anon_sym_as, + [52093] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2265), 1, + anon_sym_COLON, + ACTIONS(2263), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [52113] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2267), 3, + sym__newline, + anon_sym_COMMA, + sym__semicolon, + [52131] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2269), 3, + sym__newline, + anon_sym_COMMA, + sym__semicolon, + [52149] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2271), 2, + anon_sym_LBRACE2, + sym__not_escape_sequence, + ACTIONS(2273), 4, + sym__string_content, + sym__string_end, + sym__escape_interpolation, + sym_escape_sequence, + [52163] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2275), 1, + anon_sym_DOT, + STATE(1057), 1, + aux_sym_match_value_pattern_repeat1, + ACTIONS(2244), 4, + sym__newline, + anon_sym_COMMA, + anon_sym_as, + sym__semicolon, + [52179] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2277), 2, + anon_sym_LBRACE2, + sym__not_escape_sequence, + ACTIONS(2279), 4, + sym__string_content, + sym__string_end, + sym__escape_interpolation, + sym_escape_sequence, + [52193] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1928), 1, + anon_sym_COMMA, + ACTIONS(2281), 1, + anon_sym_COLON, + STATE(964), 1, + aux_sym_expression_list_repeat1, + [52215] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1993), 1, + anon_sym_RPAREN, + ACTIONS(1995), 1, + anon_sym_COMMA, + STATE(1280), 1, + aux_sym_argument_list_repeat1, + [52237] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2283), 2, + anon_sym_LBRACE2, + sym__not_escape_sequence, + ACTIONS(2285), 4, + sym__string_content, + sym__string_end, + sym__escape_interpolation, + sym_escape_sequence, + [52251] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2287), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [52269] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2289), 2, + anon_sym_LBRACE2, + sym__not_escape_sequence, + ACTIONS(2291), 4, + sym__string_content, + sym__string_end, + sym__escape_interpolation, + sym_escape_sequence, + [52283] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1928), 1, + anon_sym_COMMA, + ACTIONS(2293), 1, + anon_sym_COLON, + STATE(964), 1, + aux_sym_expression_list_repeat1, + [52305] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2295), 2, + anon_sym_LBRACE2, + sym__not_escape_sequence, + ACTIONS(2297), 4, + sym__string_content, + sym__string_end, + sym__escape_interpolation, + sym_escape_sequence, + [52319] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2301), 1, + anon_sym_COMMA, + STATE(1077), 1, + aux_sym_open_sequence_match_pattern_repeat1, + ACTIONS(2299), 4, + anon_sym_RPAREN, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + [52335] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2304), 3, + sym__newline, + anon_sym_COMMA, + sym__semicolon, + [52353] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1928), 1, + anon_sym_COMMA, + ACTIONS(2306), 1, + anon_sym_COLON, + STATE(964), 1, + aux_sym_expression_list_repeat1, + [52375] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1928), 1, + anon_sym_COMMA, + ACTIONS(2308), 1, + anon_sym_COLON, + STATE(964), 1, + aux_sym_expression_list_repeat1, + [52397] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(2173), 1, + anon_sym_if, + ACTIONS(2312), 1, + anon_sym_COLON, + ACTIONS(2310), 2, + anon_sym_COMMA, + anon_sym_as, + [52417] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2159), 3, + sym__newline, + anon_sym_EQ, + sym__semicolon, + [52435] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2316), 1, + anon_sym_COLON, + ACTIONS(2314), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [52455] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2318), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [52473] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(1928), 1, + anon_sym_COMMA, + ACTIONS(2320), 1, + anon_sym_COLON, + STATE(964), 1, + aux_sym_expression_list_repeat1, + [52495] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2155), 1, + anon_sym_COLON, + ACTIONS(2322), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [52515] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1920), 6, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + [52527] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2275), 1, + anon_sym_DOT, + STATE(1068), 1, + aux_sym_match_value_pattern_repeat1, + ACTIONS(2252), 4, + sym__newline, + anon_sym_COMMA, + anon_sym_as, + sym__semicolon, + [52543] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2324), 6, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + anon_sym_RBRACE, + [52555] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2326), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [52572] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2328), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [52589] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2330), 1, + anon_sym_COMMA, + STATE(1096), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2029), 3, + sym__newline, + anon_sym_from, + sym__semicolon, + [52604] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2235), 1, + sym_identifier, + STATE(1183), 1, + sym_dotted_name, + STATE(1198), 1, + sym_aliased_import, + ACTIONS(2332), 2, + sym__newline, + sym__semicolon, + [52621] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(1961), 2, + sym__newline, + sym__semicolon, + [52638] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2235), 1, + sym_identifier, + STATE(1183), 1, + sym_dotted_name, + STATE(1198), 1, + sym_aliased_import, + ACTIONS(2332), 2, + sym__newline, + sym__semicolon, + [52655] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2334), 1, + anon_sym_COMMA, + STATE(1096), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2115), 3, + sym__newline, + anon_sym_from, + sym__semicolon, + [52670] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2337), 1, + anon_sym_COLON, + ACTIONS(2339), 1, + anon_sym_RBRACE, + ACTIONS(2341), 1, + anon_sym_EQ, + ACTIONS(2343), 1, + sym_type_conversion, + STATE(1425), 1, + sym_format_specifier, + [52689] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2345), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [52706] = 6, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2347), 1, + anon_sym_RBRACE, + ACTIONS(2349), 1, + anon_sym_LBRACE2, + ACTIONS(2351), 1, + aux_sym_format_specifier_token1, + STATE(1117), 1, + aux_sym_format_specifier_repeat1, + STATE(1269), 1, + sym_interpolation, + [52725] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + STATE(1115), 1, + aux_sym__collection_elements_repeat1, + ACTIONS(1871), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + [52740] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1856), 5, + sym__newline, + anon_sym_DOT, + anon_sym_COMMA, + anon_sym_as, + sym__semicolon, + [52751] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2191), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [52768] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2353), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [52785] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(2173), 1, + anon_sym_if, + ACTIONS(2355), 1, + anon_sym_as, + ACTIONS(2357), 1, + anon_sym_COLON, + [52804] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2359), 2, + sym__newline, + sym__semicolon, + [52821] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2299), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + [52832] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2361), 1, + anon_sym_LPAREN, + ACTIONS(2363), 1, + anon_sym_COLON, + ACTIONS(2365), 1, + anon_sym_LBRACK, + STATE(1224), 1, + sym_type_parameters, + STATE(1463), 1, + sym_argument_list, + [52851] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2361), 1, + anon_sym_LPAREN, + ACTIONS(2365), 1, + anon_sym_LBRACK, + ACTIONS(2367), 1, + anon_sym_COLON, + STATE(1210), 1, + sym_type_parameters, + STATE(1499), 1, + sym_argument_list, + [52870] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2369), 1, + anon_sym_COMMA, + ACTIONS(2371), 1, + anon_sym_as, + STATE(1164), 1, + aux_sym__import_list_repeat1, + ACTIONS(2373), 2, + sym__newline, + sym__semicolon, + [52887] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2375), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_if, + anon_sym_COLON, + anon_sym_RBRACK, + [52898] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2379), 1, + anon_sym_COMMA, + STATE(1114), 1, + aux_sym__collection_elements_repeat1, + ACTIONS(2377), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + [52913] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2381), 1, + anon_sym_COMMA, + STATE(1096), 1, + aux_sym_expression_list_repeat1, + ACTIONS(2029), 3, + sym__newline, + anon_sym_from, + sym__semicolon, + [52928] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2383), 2, + sym__newline, + sym__semicolon, + [52945] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2387), 1, + anon_sym_COMMA, + STATE(1114), 1, + aux_sym__collection_elements_repeat1, + ACTIONS(2385), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + [52960] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2390), 1, + anon_sym_COMMA, + STATE(1114), 1, + aux_sym__collection_elements_repeat1, + ACTIONS(2377), 3, + anon_sym_RPAREN, + anon_sym_RBRACK, + anon_sym_RBRACE, + [52975] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2235), 1, + sym_identifier, + ACTIONS(2392), 1, + anon_sym_LPAREN, + STATE(1109), 1, + sym_dotted_name, + STATE(1143), 1, + sym_aliased_import, + STATE(1385), 1, + sym__import_list, + [52994] = 6, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2394), 1, + anon_sym_RBRACE, + ACTIONS(2396), 1, + anon_sym_LBRACE2, + ACTIONS(2399), 1, + aux_sym_format_specifier_token1, + STATE(1117), 1, + aux_sym_format_specifier_repeat1, + STATE(1269), 1, + sym_interpolation, + [53013] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2235), 1, + sym_identifier, + STATE(1183), 1, + sym_dotted_name, + STATE(1198), 1, + sym_aliased_import, + ACTIONS(2402), 2, + sym__newline, + sym__semicolon, + [53030] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2404), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [53047] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2337), 1, + anon_sym_COLON, + ACTIONS(2406), 1, + anon_sym_RBRACE, + ACTIONS(2408), 1, + anon_sym_EQ, + ACTIONS(2410), 1, + sym_type_conversion, + STATE(1523), 1, + sym_format_specifier, + [53066] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2412), 2, + sym__newline, + sym__semicolon, + [53083] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2414), 2, + sym__newline, + sym__semicolon, + [53100] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2165), 1, + anon_sym_and, + ACTIONS(2167), 1, + anon_sym_or, + ACTIONS(2173), 1, + anon_sym_if, + ACTIONS(2416), 1, + anon_sym_as, + ACTIONS(2418), 1, + anon_sym_COLON, + [53119] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2420), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [53136] = 6, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2349), 1, + anon_sym_LBRACE2, + ACTIONS(2422), 1, + anon_sym_RBRACE, + ACTIONS(2424), 1, + aux_sym_format_specifier_token1, + STATE(1099), 1, + aux_sym_format_specifier_repeat1, + STATE(1269), 1, + sym_interpolation, + [53155] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2426), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [53172] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2428), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [53189] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2365), 1, + anon_sym_LBRACK, + ACTIONS(2430), 1, + anon_sym_LPAREN, + STATE(1370), 1, + sym_type_parameters, + STATE(1371), 1, + sym_parameters, + [53205] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2432), 1, + anon_sym_case, + STATE(562), 1, + sym_cases, + STATE(345), 2, + sym_case_block, + aux_sym_cases_repeat1, + [53219] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2235), 1, + sym_identifier, + STATE(1109), 1, + sym_dotted_name, + STATE(1143), 1, + sym_aliased_import, + STATE(1383), 1, + sym__import_list, + [53235] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2365), 1, + anon_sym_LBRACK, + ACTIONS(2430), 1, + anon_sym_LPAREN, + STATE(1354), 1, + sym_type_parameters, + STATE(1377), 1, + sym_parameters, + [53251] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2365), 1, + anon_sym_LBRACK, + ACTIONS(2430), 1, + anon_sym_LPAREN, + STATE(1356), 1, + sym_type_parameters, + STATE(1378), 1, + sym_parameters, + [53267] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2436), 1, + anon_sym_EQ, + ACTIONS(2434), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [53279] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2438), 1, + anon_sym_COLON, + [53295] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2440), 1, + anon_sym_COLON, + [53311] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2442), 1, + anon_sym_COLON, + [53327] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2169), 1, + anon_sym_COMMA, + STATE(1160), 1, + aux_sym_assert_statement_repeat1, + ACTIONS(2444), 2, + sym__newline, + sym__semicolon, + [53341] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2446), 1, + anon_sym_COMMA, + STATE(1138), 1, + aux_sym_global_statement_repeat1, + ACTIONS(2449), 2, + sym__newline, + sym__semicolon, + [53355] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2453), 1, + anon_sym_COLON, + STATE(1343), 1, + sym__type_bound, + ACTIONS(2451), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [53369] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2455), 1, + anon_sym_COLON, + [53385] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2457), 1, + anon_sym_COLON, + [53401] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2332), 1, + anon_sym_RPAREN, + ACTIONS(2459), 1, + sym_identifier, + STATE(1245), 1, + sym_dotted_name, + STATE(1397), 1, + sym_aliased_import, + [53417] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2369), 1, + anon_sym_COMMA, + STATE(1163), 1, + aux_sym__import_list_repeat1, + ACTIONS(2373), 2, + sym__newline, + sym__semicolon, + [53431] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2463), 1, + anon_sym_DOT, + STATE(1165), 1, + aux_sym_import_prefix_repeat1, + ACTIONS(2461), 2, + anon_sym_import, + sym_identifier, + [53445] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2465), 1, + anon_sym_COLON, + [53461] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2469), 1, + anon_sym_COMMA, + STATE(1167), 1, + aux_sym__patterns_repeat1, + ACTIONS(2467), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + [53475] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2332), 1, + anon_sym_RPAREN, + ACTIONS(2459), 1, + sym_identifier, + STATE(1245), 1, + sym_dotted_name, + STATE(1397), 1, + sym_aliased_import, + [53491] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2471), 1, + anon_sym_COLON, + [53507] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2473), 1, + anon_sym_else, + [53523] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2475), 1, + anon_sym_COMMA, + STATE(1171), 1, + aux_sym_print_statement_repeat1, + ACTIONS(2477), 2, + sym__newline, + sym__semicolon, + [53537] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2479), 1, + anon_sym_COLON, + [53553] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2481), 1, + anon_sym_else, + [53569] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2483), 1, + anon_sym_COLON, + [53585] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2485), 1, + anon_sym_COMMA, + STATE(1192), 1, + aux_sym_global_statement_repeat1, + ACTIONS(2487), 2, + sym__newline, + sym__semicolon, + [53599] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2485), 1, + anon_sym_COMMA, + STATE(1191), 1, + aux_sym_global_statement_repeat1, + ACTIONS(2489), 2, + sym__newline, + sym__semicolon, + [53613] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2051), 1, + anon_sym_and, + ACTIONS(2053), 1, + anon_sym_or, + ACTIONS(2071), 1, + anon_sym_if, + ACTIONS(2491), 1, + sym__newline, + [53629] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2493), 1, + anon_sym_COLON, + [53645] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2495), 1, + anon_sym_COLON, + [53661] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2497), 1, + anon_sym_COLON, + [53677] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2499), 1, + anon_sym_COMMA, + STATE(1160), 1, + aux_sym_assert_statement_repeat1, + ACTIONS(2267), 2, + sym__newline, + sym__semicolon, + [53691] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2373), 1, + anon_sym_RPAREN, + ACTIONS(2502), 1, + anon_sym_COMMA, + ACTIONS(2504), 1, + anon_sym_as, + STATE(1205), 1, + aux_sym__import_list_repeat1, + [53707] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2506), 1, + anon_sym_COMMA, + STATE(1162), 1, + aux_sym_print_statement_repeat1, + ACTIONS(2509), 2, + sym__newline, + sym__semicolon, + [53721] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2511), 1, + anon_sym_COMMA, + STATE(1189), 1, + aux_sym__import_list_repeat1, + ACTIONS(2513), 2, + sym__newline, + sym__semicolon, + [53735] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2515), 1, + anon_sym_COMMA, + STATE(1189), 1, + aux_sym__import_list_repeat1, + ACTIONS(2513), 2, + sym__newline, + sym__semicolon, + [53749] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2519), 1, + anon_sym_DOT, + STATE(1165), 1, + aux_sym_import_prefix_repeat1, + ACTIONS(2517), 2, + anon_sym_import, + sym_identifier, + [53763] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2223), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + [53773] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2524), 1, + anon_sym_COMMA, + STATE(872), 1, + aux_sym__patterns_repeat1, + ACTIONS(2522), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + [53787] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + sym__string_start, + ACTIONS(1899), 1, + anon_sym_COLON, + STATE(598), 2, + sym_string, + aux_sym_concatenated_string_repeat1, + [53801] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2526), 1, + anon_sym_else, + [53817] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2528), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + [53827] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2530), 1, + anon_sym_COMMA, + STATE(1162), 1, + aux_sym_print_statement_repeat1, + ACTIONS(2532), 2, + sym__newline, + sym__semicolon, + [53841] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2534), 1, + anon_sym_COMMA, + STATE(1162), 1, + aux_sym_print_statement_repeat1, + ACTIONS(2536), 2, + sym__newline, + sym__semicolon, + [53855] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2337), 1, + anon_sym_COLON, + ACTIONS(2538), 1, + anon_sym_RBRACE, + ACTIONS(2540), 1, + sym_type_conversion, + STATE(1479), 1, + sym_format_specifier, + [53871] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2169), 1, + anon_sym_COMMA, + STATE(1160), 1, + aux_sym_assert_statement_repeat1, + ACTIONS(2542), 2, + sym__newline, + sym__semicolon, + [53885] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2544), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + [53895] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2365), 1, + anon_sym_LBRACK, + ACTIONS(2430), 1, + anon_sym_LPAREN, + STATE(1358), 1, + sym_type_parameters, + STATE(1363), 1, + sym_parameters, + [53911] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2548), 1, + anon_sym_COLON, + ACTIONS(2550), 1, + anon_sym_EQ, + ACTIONS(2546), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [53925] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2554), 1, + anon_sym_COMMA, + STATE(1178), 1, + aux_sym_with_clause_repeat1, + ACTIONS(2552), 2, + anon_sym_RPAREN, + anon_sym_COLON, + [53939] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2557), 1, + anon_sym_case, + STATE(541), 1, + sym_cases, + STATE(380), 2, + sym_case_block, + aux_sym_cases_repeat1, + [53953] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2557), 1, + anon_sym_case, + STATE(543), 1, + sym_cases, + STATE(380), 2, + sym_case_block, + aux_sym_cases_repeat1, + [53967] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2337), 1, + anon_sym_COLON, + ACTIONS(2559), 1, + anon_sym_RBRACE, + ACTIONS(2561), 1, + sym_type_conversion, + STATE(1420), 1, + sym_format_specifier, + [53983] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2402), 1, + anon_sym_RPAREN, + ACTIONS(2459), 1, + sym_identifier, + STATE(1245), 1, + sym_dotted_name, + STATE(1397), 1, + sym_aliased_import, + [53999] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2371), 1, + anon_sym_as, + ACTIONS(2563), 3, + sym__newline, + anon_sym_COMMA, + sym__semicolon, + [54011] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2432), 1, + anon_sym_case, + STATE(560), 1, + sym_cases, + STATE(345), 2, + sym_case_block, + aux_sym_cases_repeat1, + [54025] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2565), 4, + anon_sym_async, + anon_sym_def, + anon_sym_class, + anon_sym_AT, + [54035] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1879), 1, + anon_sym_if, + ACTIONS(1881), 1, + anon_sym_and, + ACTIONS(1883), 1, + anon_sym_or, + ACTIONS(2567), 1, + anon_sym_else, + [54051] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1934), 4, + sym__newline, + anon_sym_from, + anon_sym_COMMA, + sym__semicolon, + [54061] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2459), 1, + sym_identifier, + STATE(1161), 1, + sym_dotted_name, + STATE(1321), 1, + sym_aliased_import, + STATE(1415), 1, + sym__import_list, + [54077] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2569), 1, + anon_sym_COMMA, + STATE(1189), 1, + aux_sym__import_list_repeat1, + ACTIONS(2572), 2, + sym__newline, + sym__semicolon, + [54091] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2574), 1, + anon_sym_COMMA, + STATE(1077), 1, + aux_sym_open_sequence_match_pattern_repeat1, + ACTIONS(1703), 2, + anon_sym_if, + anon_sym_COLON, + [54105] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2485), 1, + anon_sym_COMMA, + STATE(1138), 1, + aux_sym_global_statement_repeat1, + ACTIONS(2576), 2, + sym__newline, + sym__semicolon, + [54119] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2485), 1, + anon_sym_COMMA, + STATE(1138), 1, + aux_sym_global_statement_repeat1, + ACTIONS(2578), 2, + sym__newline, + sym__semicolon, + [54133] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2459), 1, + sym_identifier, + STATE(1161), 1, + sym_dotted_name, + STATE(1321), 1, + sym_aliased_import, + STATE(1418), 1, + sym__import_list, + [54149] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(584), 1, + sym__newline, + ACTIONS(2580), 1, + sym__semicolon, + STATE(1200), 1, + aux_sym__simple_statements_repeat1, + [54162] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2582), 1, + sym_identifier, + ACTIONS(2584), 1, + anon_sym_RPAREN, + STATE(1341), 1, + sym_match_keyword_pattern, + [54175] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2586), 1, + anon_sym_COMMA, + ACTIONS(2588), 1, + anon_sym_RBRACK, + STATE(1299), 1, + aux_sym_subscript_repeat1, + [54188] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1820), 1, + anon_sym_COMMA, + ACTIONS(2590), 1, + anon_sym_in, + STATE(884), 1, + aux_sym__patterns_repeat1, + [54201] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2563), 3, + sym__newline, + anon_sym_COMMA, + sym__semicolon, + [54210] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1820), 1, + anon_sym_COMMA, + ACTIONS(2592), 1, + anon_sym_in, + STATE(884), 1, + aux_sym__patterns_repeat1, + [54223] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2594), 1, + sym__semicolon, + ACTIONS(2597), 1, + sym__newline, + STATE(1200), 1, + aux_sym__simple_statements_repeat1, + [54236] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2599), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [54245] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2601), 1, + anon_sym_COMMA, + ACTIONS(2603), 1, + anon_sym_RBRACK, + STATE(1323), 1, + aux_sym_open_sequence_match_pattern_repeat1, + [54258] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2605), 1, + anon_sym_COMMA, + ACTIONS(2607), 1, + anon_sym_RBRACK, + STATE(1299), 1, + aux_sym_subscript_repeat1, + [54271] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1844), 1, + anon_sym_COLON, + ACTIONS(2609), 1, + anon_sym_COMMA, + STATE(1295), 1, + aux_sym__parameters_repeat1, + [54284] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2513), 1, + anon_sym_RPAREN, + ACTIONS(2611), 1, + anon_sym_COMMA, + STATE(1240), 1, + aux_sym__import_list_repeat1, + [54297] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2513), 1, + anon_sym_RPAREN, + ACTIONS(2613), 1, + anon_sym_COMMA, + STATE(1240), 1, + aux_sym__import_list_repeat1, + [54310] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1153), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [54319] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2615), 1, + anon_sym_COMMA, + ACTIONS(2617), 1, + anon_sym_RBRACK, + STATE(1252), 1, + aux_sym_type_parameters_repeat1, + [54332] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2619), 1, + sym__semicolon, + ACTIONS(2621), 1, + sym__newline, + STATE(1194), 1, + aux_sym__simple_statements_repeat1, + [54345] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2361), 1, + anon_sym_LPAREN, + ACTIONS(2623), 1, + anon_sym_COLON, + STATE(1476), 1, + sym_argument_list, + [54358] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2625), 1, + anon_sym_COMMA, + ACTIONS(2628), 1, + anon_sym_RBRACE, + STATE(1211), 1, + aux_sym_match_mapping_pattern_repeat1, + [54371] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2630), 1, + anon_sym_RPAREN, + ACTIONS(2632), 1, + anon_sym_COMMA, + STATE(1213), 1, + aux_sym_match_class_pattern_repeat1, + [54384] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1719), 1, + anon_sym_RPAREN, + ACTIONS(2634), 1, + anon_sym_COMMA, + STATE(1296), 1, + aux_sym_match_class_pattern_repeat1, + [54397] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2636), 1, + sym__semicolon, + ACTIONS(2638), 1, + sym__newline, + STATE(1231), 1, + aux_sym__simple_statements_repeat1, + [54410] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1719), 1, + anon_sym_RPAREN, + ACTIONS(2582), 1, + sym_identifier, + STATE(1341), 1, + sym_match_keyword_pattern, + [54423] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1719), 1, + anon_sym_RPAREN, + ACTIONS(2640), 1, + anon_sym_COMMA, + STATE(1316), 1, + aux_sym_match_class_pattern_repeat2, + [54436] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(972), 1, + anon_sym_except, + ACTIONS(970), 2, + anon_sym_except_STAR, + anon_sym_finally, + [54447] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2642), 1, + anon_sym_COMMA, + ACTIONS(2644), 1, + anon_sym_RBRACE, + STATE(1257), 1, + aux_sym_match_mapping_pattern_repeat1, + [54460] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1930), 1, + anon_sym_RPAREN, + STATE(1292), 1, + aux_sym__collection_elements_repeat1, + [54473] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2153), 1, + anon_sym_COMMA, + ACTIONS(2157), 1, + anon_sym_RBRACK, + STATE(1196), 1, + aux_sym_subscript_repeat1, + [54486] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2646), 1, + anon_sym_if, + ACTIONS(2648), 1, + anon_sym_COLON, + STATE(1481), 1, + sym_guard, + [54499] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2289), 1, + anon_sym_RBRACE, + ACTIONS(2291), 2, + anon_sym_LBRACE2, + aux_sym_format_specifier_token1, + [54510] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2449), 3, + sym__newline, + anon_sym_COMMA, + sym__semicolon, + [54519] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2361), 1, + anon_sym_LPAREN, + ACTIONS(2650), 1, + anon_sym_COLON, + STATE(1470), 1, + sym_argument_list, + [54532] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2187), 1, + anon_sym_COMMA, + ACTIONS(2189), 1, + anon_sym_RBRACE, + STATE(1243), 1, + aux_sym_dictionary_repeat1, + [54545] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2652), 3, + sym__newline, + anon_sym_COMMA, + sym__semicolon, + [54554] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2615), 1, + anon_sym_COMMA, + ACTIONS(2654), 1, + anon_sym_RBRACK, + STATE(1208), 1, + aux_sym_type_parameters_repeat1, + [54567] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2656), 1, + anon_sym_RPAREN, + ACTIONS(2658), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [54580] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2660), 1, + anon_sym_RPAREN, + ACTIONS(2662), 1, + anon_sym_COMMA, + STATE(1249), 1, + aux_sym__parameters_repeat1, + [54593] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2664), 1, + anon_sym_RPAREN, + ACTIONS(2666), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [54606] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(586), 1, + sym__newline, + ACTIONS(2668), 1, + sym__semicolon, + STATE(1200), 1, + aux_sym__simple_statements_repeat1, + [54619] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2670), 1, + anon_sym_RPAREN, + ACTIONS(2672), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [54632] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1016), 1, + anon_sym_except, + ACTIONS(1018), 2, + anon_sym_except_STAR, + anon_sym_finally, + [54643] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2675), 1, + anon_sym_COMMA, + ACTIONS(2677), 1, + anon_sym_RBRACE, + STATE(1235), 1, + aux_sym_dictionary_repeat1, + [54656] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2679), 1, + anon_sym_COMMA, + ACTIONS(2682), 1, + anon_sym_RBRACE, + STATE(1235), 1, + aux_sym_dictionary_repeat1, + [54669] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2137), 1, + sym_identifier, + ACTIONS(2684), 1, + anon_sym_import, + STATE(1408), 1, + sym_dotted_name, + [54682] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(598), 1, + sym__newline, + ACTIONS(2686), 1, + sym__semicolon, + STATE(1200), 1, + aux_sym__simple_statements_repeat1, + [54695] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2688), 1, + sym__semicolon, + ACTIONS(2690), 1, + sym__newline, + STATE(1237), 1, + aux_sym__simple_statements_repeat1, + [54708] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1963), 1, + anon_sym_RPAREN, + ACTIONS(1965), 1, + anon_sym_COMMA, + STATE(1264), 1, + aux_sym_argument_list_repeat1, + [54721] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2572), 1, + anon_sym_RPAREN, + ACTIONS(2692), 1, + anon_sym_COMMA, + STATE(1240), 1, + aux_sym__import_list_repeat1, + [54734] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(576), 1, + sym__newline, + ACTIONS(2695), 1, + sym__semicolon, + STATE(1200), 1, + aux_sym__simple_statements_repeat1, + [54747] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2697), 1, + anon_sym_COMMA, + ACTIONS(2699), 1, + anon_sym_RBRACE, + STATE(1235), 1, + aux_sym_dictionary_repeat1, + [54760] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2701), 1, + anon_sym_COMMA, + ACTIONS(2703), 1, + anon_sym_RBRACE, + STATE(1235), 1, + aux_sym_dictionary_repeat1, + [54773] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2705), 1, + sym__semicolon, + ACTIONS(2707), 1, + sym__newline, + STATE(1241), 1, + aux_sym__simple_statements_repeat1, + [54786] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2504), 1, + anon_sym_as, + ACTIONS(2563), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [54797] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(582), 1, + sym__newline, + ACTIONS(2709), 1, + sym__semicolon, + STATE(1200), 1, + aux_sym__simple_statements_repeat1, + [54810] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2711), 1, + anon_sym_COMMA, + ACTIONS(2713), 1, + anon_sym_RBRACE, + STATE(1235), 1, + aux_sym_dictionary_repeat1, + [54823] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2715), 1, + sym__semicolon, + ACTIONS(2717), 1, + sym__newline, + STATE(1246), 1, + aux_sym__simple_statements_repeat1, + [54836] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1844), 1, + anon_sym_RPAREN, + ACTIONS(2719), 1, + anon_sym_COMMA, + STATE(1275), 1, + aux_sym__parameters_repeat1, + [54849] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2721), 3, + anon_sym_LPAREN, + anon_sym_COLON, + anon_sym_EQ, + [54858] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1932), 1, + anon_sym_RPAREN, + STATE(1292), 1, + aux_sym__collection_elements_repeat1, + [54871] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2723), 1, + anon_sym_COMMA, + ACTIONS(2726), 1, + anon_sym_RBRACK, + STATE(1252), 1, + aux_sym_type_parameters_repeat1, + [54884] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2248), 1, + anon_sym_RBRACE, + ACTIONS(2250), 2, + anon_sym_LBRACE2, + aux_sym_format_specifier_token1, + [54895] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(574), 1, + sym__newline, + ACTIONS(2728), 1, + sym__semicolon, + STATE(1200), 1, + aux_sym__simple_statements_repeat1, + [54908] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1993), 1, + anon_sym_RPAREN, + ACTIONS(1995), 1, + anon_sym_COMMA, + STATE(1277), 1, + aux_sym_argument_list_repeat1, + [54921] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2730), 1, + anon_sym_RPAREN, + ACTIONS(2732), 1, + anon_sym_COMMA, + STATE(1279), 1, + aux_sym_argument_list_repeat1, + [54934] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1832), 1, + anon_sym_RBRACE, + ACTIONS(2734), 1, + anon_sym_COMMA, + STATE(1211), 1, + aux_sym_match_mapping_pattern_repeat1, + [54947] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2193), 1, + anon_sym_COMMA, + ACTIONS(2195), 1, + anon_sym_RBRACK, + STATE(1283), 1, + aux_sym_subscript_repeat1, + [54960] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2736), 1, + sym_identifier, + ACTIONS(2738), 1, + sym_match_wildcard_pattern, + STATE(1110), 1, + sym_match_capture_pattern, + [54973] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2337), 1, + anon_sym_COLON, + ACTIONS(2559), 1, + anon_sym_RBRACE, + STATE(1420), 1, + sym_format_specifier, + [54986] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2740), 1, + sym__semicolon, + ACTIONS(2742), 1, + sym__newline, + STATE(1254), 1, + aux_sym__simple_statements_repeat1, + [54999] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1889), 1, + anon_sym_DOT, + ACTIONS(1893), 1, + anon_sym_COLON, + STATE(906), 1, + aux_sym_match_value_pattern_repeat1, + [55012] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2744), 1, + anon_sym_EQ, + ACTIONS(2746), 2, + sym__newline, + sym__semicolon, + [55023] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2748), 1, + anon_sym_RPAREN, + ACTIONS(2750), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [55036] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(968), 1, + anon_sym_except, + ACTIONS(966), 2, + anon_sym_except_STAR, + anon_sym_finally, + [55047] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2752), 1, + anon_sym_COMMA, + ACTIONS(2754), 1, + anon_sym_COLON, + STATE(1178), 1, + aux_sym_with_clause_repeat1, + [55060] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2756), 1, + anon_sym_COLON, + ACTIONS(2546), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [55071] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2758), 1, + anon_sym_RPAREN, + ACTIONS(2760), 1, + anon_sym_COMMA, + STATE(1310), 1, + aux_sym_with_clause_repeat1, + [55084] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2762), 1, + anon_sym_RBRACE, + ACTIONS(2764), 2, + anon_sym_LBRACE2, + aux_sym_format_specifier_token1, + [55095] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2434), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [55104] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2766), 1, + anon_sym_COMMA, + ACTIONS(2768), 1, + anon_sym_RBRACK, + STATE(1299), 1, + aux_sym_subscript_repeat1, + [55117] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2770), 1, + anon_sym_COMMA, + ACTIONS(2772), 1, + anon_sym_RBRACK, + STATE(1299), 1, + aux_sym_subscript_repeat1, + [55130] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2774), 1, + anon_sym_RPAREN, + ACTIONS(2776), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [55143] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2778), 1, + anon_sym_RPAREN, + ACTIONS(2780), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [55156] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2599), 1, + anon_sym_RPAREN, + ACTIONS(2782), 1, + anon_sym_COMMA, + STATE(1275), 1, + aux_sym__parameters_repeat1, + [55169] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1820), 1, + anon_sym_COMMA, + ACTIONS(2785), 1, + anon_sym_in, + STATE(884), 1, + aux_sym__patterns_repeat1, + [55182] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2787), 1, + anon_sym_RPAREN, + ACTIONS(2789), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [55195] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2337), 1, + anon_sym_COLON, + ACTIONS(2538), 1, + anon_sym_RBRACE, + STATE(1479), 1, + sym_format_specifier, + [55208] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2791), 1, + anon_sym_RPAREN, + ACTIONS(2793), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [55221] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2795), 1, + anon_sym_RPAREN, + ACTIONS(2797), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [55234] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2799), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [55243] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2801), 1, + anon_sym_COMMA, + ACTIONS(2803), 1, + anon_sym_RBRACK, + STATE(1299), 1, + aux_sym_subscript_repeat1, + [55256] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2805), 1, + anon_sym_COMMA, + ACTIONS(2807), 1, + anon_sym_RBRACK, + STATE(1299), 1, + aux_sym_subscript_repeat1, + [55269] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2337), 1, + anon_sym_COLON, + ACTIONS(2809), 1, + anon_sym_RBRACE, + STATE(1409), 1, + sym_format_specifier, + [55282] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2811), 1, + anon_sym_RPAREN, + ACTIONS(2813), 1, + anon_sym_COMMA, + STATE(1232), 1, + aux_sym_argument_list_repeat1, + [55295] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2646), 1, + anon_sym_if, + ACTIONS(2815), 1, + anon_sym_COLON, + STATE(1501), 1, + sym_guard, + [55308] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2817), 1, + anon_sym_COMMA, + ACTIONS(2819), 2, + anon_sym_if, + anon_sym_COLON, + [55319] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2067), 1, + anon_sym_from, + ACTIONS(2073), 2, + sym__newline, + sym__semicolon, + [55330] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2377), 1, + anon_sym_RPAREN, + ACTIONS(2821), 1, + anon_sym_COMMA, + STATE(1114), 1, + aux_sym__collection_elements_repeat1, + [55343] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1721), 1, + anon_sym_RPAREN, + ACTIONS(2823), 1, + anon_sym_COMMA, + STATE(1325), 1, + aux_sym_match_class_pattern_repeat2, + [55356] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1399), 3, + sym__newline, + anon_sym_in, + sym__semicolon, + [55365] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2377), 1, + anon_sym_RPAREN, + ACTIONS(2825), 1, + anon_sym_COMMA, + STATE(1114), 1, + aux_sym__collection_elements_repeat1, + [55378] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1820), 1, + anon_sym_COMMA, + ACTIONS(2827), 1, + anon_sym_in, + STATE(884), 1, + aux_sym__patterns_repeat1, + [55391] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2207), 1, + anon_sym_COMMA, + ACTIONS(2209), 1, + anon_sym_RBRACK, + STATE(1271), 1, + aux_sym_subscript_repeat1, + [55404] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2599), 1, + anon_sym_COLON, + ACTIONS(2829), 1, + anon_sym_COMMA, + STATE(1295), 1, + aux_sym__parameters_repeat1, + [55417] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2832), 1, + anon_sym_RPAREN, + ACTIONS(2834), 1, + anon_sym_COMMA, + STATE(1296), 1, + aux_sym_match_class_pattern_repeat1, + [55430] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2837), 1, + anon_sym_RPAREN, + ACTIONS(2839), 1, + anon_sym_COMMA, + STATE(1274), 1, + aux_sym_argument_list_repeat1, + [55443] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1975), 1, + anon_sym_RPAREN, + ACTIONS(1977), 1, + anon_sym_COMMA, + STATE(1285), 1, + aux_sym_argument_list_repeat1, + [55456] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2841), 1, + anon_sym_COMMA, + ACTIONS(2844), 1, + anon_sym_RBRACK, + STATE(1299), 1, + aux_sym_subscript_repeat1, + [55469] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2846), 1, + anon_sym_COMMA, + ACTIONS(2848), 1, + anon_sym_RBRACE, + STATE(1235), 1, + aux_sym_dictionary_repeat1, + [55482] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(2850), 1, + anon_sym_RPAREN, + STATE(1289), 1, + aux_sym__collection_elements_repeat1, + [55495] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2852), 1, + anon_sym_COMMA, + ACTIONS(2854), 1, + anon_sym_RBRACE, + STATE(1235), 1, + aux_sym_dictionary_repeat1, + [55508] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(2856), 1, + anon_sym_RPAREN, + STATE(1115), 1, + aux_sym__collection_elements_repeat1, + [55521] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(987), 1, + anon_sym_except, + ACTIONS(985), 2, + anon_sym_except_STAR, + anon_sym_finally, + [55532] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1820), 1, + anon_sym_COMMA, + ACTIONS(2858), 1, + anon_sym_in, + STATE(884), 1, + aux_sym__patterns_repeat1, + [55545] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1820), 1, + anon_sym_COMMA, + ACTIONS(2860), 1, + anon_sym_in, + STATE(884), 1, + aux_sym__patterns_repeat1, + [55558] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2277), 1, + anon_sym_RBRACE, + ACTIONS(2279), 2, + anon_sym_LBRACE2, + aux_sym_format_specifier_token1, + [55569] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2552), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [55578] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(588), 1, + sym__newline, + ACTIONS(2862), 1, + sym__semicolon, + STATE(1200), 1, + aux_sym__simple_statements_repeat1, + [55591] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(995), 1, + anon_sym_RPAREN, + ACTIONS(2864), 1, + anon_sym_COMMA, + STATE(1178), 1, + aux_sym_with_clause_repeat1, + [55604] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2211), 1, + anon_sym_COMMA, + ACTIONS(2213), 1, + anon_sym_RBRACE, + STATE(1302), 1, + aux_sym_dictionary_repeat1, + [55617] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2235), 1, + sym_identifier, + STATE(1183), 1, + sym_dotted_name, + STATE(1198), 1, + sym_aliased_import, + [55630] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1861), 1, + anon_sym_COMMA, + ACTIONS(1905), 1, + anon_sym_RPAREN, + STATE(1292), 1, + aux_sym__collection_elements_repeat1, + [55643] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1721), 1, + anon_sym_RPAREN, + ACTIONS(2582), 1, + sym_identifier, + STATE(1341), 1, + sym_match_keyword_pattern, + [55656] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2337), 1, + anon_sym_COLON, + ACTIONS(2866), 1, + anon_sym_RBRACE, + STATE(1515), 1, + sym_format_specifier, + [55669] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2868), 1, + anon_sym_RPAREN, + ACTIONS(2870), 1, + anon_sym_COMMA, + STATE(1316), 1, + aux_sym_match_class_pattern_repeat2, + [55682] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2459), 1, + sym_identifier, + STATE(1245), 1, + sym_dotted_name, + STATE(1397), 1, + sym_aliased_import, + [55695] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1403), 3, + sym__newline, + anon_sym_in, + sym__semicolon, + [55704] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2873), 1, + sym__semicolon, + ACTIONS(2875), 1, + sym__newline, + STATE(1309), 1, + aux_sym__simple_statements_repeat1, + [55717] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2752), 1, + anon_sym_COMMA, + ACTIONS(2877), 1, + anon_sym_COLON, + STATE(1266), 1, + aux_sym_with_clause_repeat1, + [55730] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2373), 1, + anon_sym_RPAREN, + ACTIONS(2502), 1, + anon_sym_COMMA, + STATE(1206), 1, + aux_sym__import_list_repeat1, + [55743] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2879), 3, + anon_sym_LPAREN, + anon_sym_COLON, + anon_sym_EQ, + [55752] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1711), 1, + anon_sym_RBRACK, + ACTIONS(2881), 1, + anon_sym_COMMA, + STATE(1077), 1, + aux_sym_open_sequence_match_pattern_repeat1, + [55765] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(989), 1, + anon_sym_except, + ACTIONS(991), 2, + anon_sym_except_STAR, + anon_sym_finally, + [55776] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2584), 1, + anon_sym_RPAREN, + ACTIONS(2883), 1, + anon_sym_COMMA, + STATE(1316), 1, + aux_sym_match_class_pattern_repeat2, + [55789] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2584), 1, + anon_sym_RPAREN, + ACTIONS(2883), 1, + anon_sym_COMMA, + STATE(1331), 1, + aux_sym_match_class_pattern_repeat2, + [55802] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2219), 1, + anon_sym_COMMA, + ACTIONS(2221), 1, + anon_sym_RBRACE, + STATE(1242), 1, + aux_sym_dictionary_repeat1, + [55815] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2885), 1, + anon_sym_RPAREN, + ACTIONS(2887), 1, + anon_sym_COMMA, + STATE(1230), 1, + aux_sym_argument_list_repeat1, + [55828] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2582), 1, + sym_identifier, + ACTIONS(2889), 1, + anon_sym_RPAREN, + STATE(1341), 1, + sym_match_keyword_pattern, + [55841] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2630), 1, + anon_sym_RPAREN, + ACTIONS(2891), 1, + anon_sym_COMMA, + STATE(1216), 1, + aux_sym_match_class_pattern_repeat2, + [55854] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2889), 1, + anon_sym_RPAREN, + ACTIONS(2893), 1, + anon_sym_COMMA, + STATE(1316), 1, + aux_sym_match_class_pattern_repeat2, + [55867] = 3, + ACTIONS(1942), 1, + sym_comment, + ACTIONS(2271), 1, + anon_sym_RBRACE, + ACTIONS(2273), 2, + anon_sym_LBRACE2, + aux_sym_format_specifier_token1, + [55878] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2546), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [55887] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2660), 1, + anon_sym_COLON, + ACTIONS(2895), 1, + anon_sym_COMMA, + STATE(1204), 1, + aux_sym__parameters_repeat1, + [55900] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2897), 1, + anon_sym_in, + ACTIONS(2899), 2, + sym__newline, + sym__semicolon, + [55911] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2365), 1, + anon_sym_LBRACK, + ACTIONS(2901), 1, + anon_sym_EQ, + STATE(1492), 1, + sym_type_parameters, + [55924] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1711), 1, + anon_sym_RPAREN, + ACTIONS(2903), 1, + anon_sym_COMMA, + STATE(1077), 1, + aux_sym_open_sequence_match_pattern_repeat1, + [55937] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2582), 1, + sym_identifier, + ACTIONS(2905), 1, + anon_sym_RPAREN, + STATE(1341), 1, + sym_match_keyword_pattern, + [55950] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2550), 1, + anon_sym_EQ, + ACTIONS(2546), 2, + anon_sym_COMMA, + anon_sym_COLON, + [55961] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2907), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_COLON, + [55970] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2868), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [55978] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2909), 2, + sym__newline, + sym__semicolon, + [55986] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2911), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [55994] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2913), 1, + anon_sym_COLON, + ACTIONS(2915), 1, + anon_sym_DASH_GT, + [56004] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2917), 2, + sym__newline, + sym__semicolon, + [56012] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2919), 2, + sym__newline, + sym__semicolon, + [56020] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2546), 2, + anon_sym_COMMA, + anon_sym_COLON, + [56028] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1926), 2, + sym__newline, + sym__semicolon, + [56036] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2921), 2, + sym__newline, + sym__semicolon, + [56044] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2923), 2, + sym__newline, + sym__semicolon, + [56052] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2597), 2, + sym__newline, + sym__semicolon, + [56060] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2925), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [56068] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2582), 1, + sym_identifier, + STATE(1341), 1, + sym_match_keyword_pattern, + [56078] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2430), 1, + anon_sym_LPAREN, + STATE(1372), 1, + sym_parameters, + [56088] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2927), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [56096] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2430), 1, + anon_sym_LPAREN, + STATE(1375), 1, + sym_parameters, + [56106] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2929), 1, + sym_identifier, + STATE(1367), 1, + sym_match_capture_pattern, + [56116] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2430), 1, + anon_sym_LPAREN, + STATE(1344), 1, + sym_parameters, + [56126] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1842), 1, + anon_sym_RBRACE, + ACTIONS(2931), 1, + anon_sym_COMMA, + [56136] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2069), 1, + anon_sym_COMMA, + STATE(1112), 1, + aux_sym_expression_list_repeat1, + [56146] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2145), 2, + sym__newline, + sym__semicolon, + [56154] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2628), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [56162] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2933), 1, + anon_sym_COLON, + ACTIONS(2935), 1, + anon_sym_DASH_GT, + [56172] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2937), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [56180] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1889), 1, + anon_sym_DOT, + STATE(1262), 1, + aux_sym_match_value_pattern_repeat1, + [56190] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1928), 1, + anon_sym_COMMA, + STATE(985), 1, + aux_sym_expression_list_repeat1, + [56200] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2939), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [56208] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2644), 1, + anon_sym_RBRACE, + ACTIONS(2941), 1, + anon_sym_COMMA, + [56218] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2943), 2, + sym__newline, + sym__semicolon, + [56226] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2430), 1, + anon_sym_LPAREN, + STATE(1376), 1, + sym_parameters, + [56236] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2945), 1, + anon_sym_COLON, + ACTIONS(2947), 1, + anon_sym_DASH_GT, + [56246] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2949), 1, + anon_sym_COLON, + ACTIONS(2951), 1, + anon_sym_DASH_GT, + [56256] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2420), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [56264] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2953), 2, + anon_sym_COLON, + anon_sym_DASH_GT, + [56272] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2955), 1, + anon_sym_COLON, + ACTIONS(2957), 1, + anon_sym_DASH_GT, + [56282] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2959), 1, + anon_sym_COLON, + ACTIONS(2961), 1, + anon_sym_DASH_GT, + [56292] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2963), 1, + anon_sym_COLON, + ACTIONS(2965), 1, + anon_sym_DASH_GT, + [56302] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2967), 1, + anon_sym_COLON, + ACTIONS(2969), 1, + anon_sym_DASH_GT, + [56312] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2971), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [56320] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2973), 2, + anon_sym_COLON, + anon_sym_DASH_GT, + [56328] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2975), 1, + sym_integer, + ACTIONS(2977), 1, + sym_float, + [56338] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2652), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [56346] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2979), 2, + sym__newline, + sym__semicolon, + [56354] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2981), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [56362] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2983), 2, + sym__newline, + sym__semicolon, + [56370] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2985), 2, + sym__newline, + sym__semicolon, + [56378] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2987), 1, + sym_integer, + ACTIONS(2989), 1, + sym_float, + [56388] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2991), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [56396] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2205), 2, + sym__newline, + sym__semicolon, + [56404] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2993), 1, + sym_integer, + ACTIONS(2995), 1, + sym_float, + [56414] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2997), 2, + sym__newline, + sym__semicolon, + [56422] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2817), 1, + anon_sym_COMMA, + ACTIONS(2999), 1, + anon_sym_RPAREN, + [56432] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3001), 2, + sym__newline, + sym__semicolon, + [56440] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2203), 2, + sym__newline, + sym__semicolon, + [56448] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3003), 2, + sym__newline, + sym__semicolon, + [56456] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3005), 1, + anon_sym_COMMA, + STATE(1337), 1, + aux_sym_open_sequence_match_pattern_repeat1, + [56466] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2563), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [56474] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2322), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [56482] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3007), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [56490] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3009), 2, + sym__newline, + sym__semicolon, + [56498] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3011), 1, + anon_sym_COMMA, + ACTIONS(3013), 1, + anon_sym_RBRACE, + [56508] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3015), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [56516] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2832), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [56524] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3017), 1, + anon_sym_COMMA, + STATE(1190), 1, + aux_sym_open_sequence_match_pattern_repeat1, + [56534] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3019), 1, + anon_sym_RBRACE, + [56541] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3021), 1, + anon_sym_LPAREN, + [56548] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3023), 1, + anon_sym_RBRACK, + [56555] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3025), 1, + anon_sym_import, + [56562] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3027), 1, + anon_sym_RBRACE, + [56569] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3029), 1, + anon_sym_RBRACE, + [56576] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3031), 1, + anon_sym_RBRACE, + [56583] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2105), 1, + anon_sym_EQ, + [56590] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3033), 1, + anon_sym_COLON, + [56597] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3035), 1, + anon_sym_RPAREN, + [56604] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3037), 1, + anon_sym_RPAREN, + [56611] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3039), 1, + anon_sym_for, + [56618] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3041), 1, + anon_sym_RPAREN, + [56625] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3043), 1, + anon_sym_RPAREN, + [56632] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2827), 1, + anon_sym_in, + [56639] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2809), 1, + anon_sym_RBRACE, + [56646] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2785), 1, + anon_sym_in, + [56653] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3045), 1, + anon_sym_COLON, + [56660] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3047), 1, + anon_sym_COLON, + [56667] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3013), 1, + anon_sym_RBRACE, + [56674] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2559), 1, + anon_sym_RBRACE, + [56681] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1832), 1, + anon_sym_RBRACE, + [56688] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3049), 1, + anon_sym_COLON, + [56695] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3051), 1, + anon_sym_COLON, + [56702] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3053), 1, + anon_sym_RBRACK, + [56709] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3055), 1, + anon_sym_in, + [56716] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3057), 1, + anon_sym_RPAREN, + [56723] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3059), 1, + anon_sym_RPAREN, + [56730] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3061), 1, + anon_sym_RBRACE, + [56737] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3063), 1, + anon_sym_RPAREN, + [56744] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3065), 1, + anon_sym_COLON, + [56751] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3067), 1, + anon_sym_in, + [56758] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3069), 1, + anon_sym_RBRACK, + [56765] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3071), 1, + anon_sym_RBRACE, + [56772] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3073), 1, + anon_sym_RBRACE, + [56779] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3075), 1, + sym_identifier, + [56786] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3077), 1, + anon_sym_import, + [56793] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3079), 1, + anon_sym_RPAREN, + [56800] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3081), 1, + sym_identifier, + [56807] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3083), 1, + anon_sym_import, + [56814] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3085), 1, + sym_identifier, + [56821] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3087), 1, + anon_sym_in, + [56828] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3089), 1, + anon_sym_RPAREN, + [56835] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3091), 1, + sym_identifier, + [56842] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3093), 1, + sym_identifier, + [56849] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3095), 1, + sym_identifier, + [56856] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3097), 1, + anon_sym_COLON, + [56863] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3099), 1, + anon_sym_COLON, + [56870] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3101), 1, + anon_sym_COLON, + [56877] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2860), 1, + anon_sym_in, + [56884] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3103), 1, + anon_sym_RPAREN, + [56891] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3105), 1, + sym_identifier, + [56898] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3107), 1, + sym_identifier, + [56905] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3109), 1, + anon_sym_COLON, + [56912] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3111), 1, + anon_sym_COLON, + [56919] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3113), 1, + anon_sym_RBRACE, + [56926] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3115), 1, + anon_sym_RBRACE, + [56933] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3117), 1, + anon_sym_RBRACE, + [56940] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3119), 1, + anon_sym_COLON, + [56947] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3121), 1, + anon_sym_RPAREN, + [56954] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2293), 1, + anon_sym_COLON, + [56961] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2858), 1, + anon_sym_in, + [56968] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3123), 1, + anon_sym_RBRACK, + [56975] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3125), 1, + anon_sym_COLON, + [56982] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3127), 1, + anon_sym_RBRACE, + [56989] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3129), 1, + anon_sym_COLON, + [56996] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3131), 1, + anon_sym_COLON, + [57003] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2281), 1, + anon_sym_COLON, + [57010] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3133), 1, + anon_sym_RBRACK, + [57017] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3135), 1, + anon_sym_COLON, + [57024] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3137), 1, + anon_sym_RPAREN, + [57031] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3139), 1, + anon_sym_COLON, + [57038] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3141), 1, + sym_identifier, + [57045] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3143), 1, + anon_sym_COLON, + [57052] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2866), 1, + anon_sym_RBRACE, + [57059] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3145), 1, + anon_sym_COLON, + [57066] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3147), 1, + anon_sym_COLON, + [57073] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3149), 1, + anon_sym_COLON, + [57080] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3151), 1, + anon_sym_COLON, + [57087] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3153), 1, + anon_sym_RPAREN, + [57094] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3155), 1, + anon_sym_COLON, + [57101] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3157), 1, + anon_sym_COLON, + [57108] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3159), 1, + anon_sym_COLON, + [57115] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(876), 1, + anon_sym_def, + [57122] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3161), 1, + anon_sym_COLON, + [57129] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3163), 1, + sym_identifier, + [57136] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3165), 1, + anon_sym_COLON, + [57143] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3167), 1, + anon_sym_EQ, + [57150] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3169), 1, + anon_sym_COLON, + [57157] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3171), 1, + anon_sym_in, + [57164] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3173), 1, + anon_sym_COLON, + [57171] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3175), 1, + anon_sym_RBRACE, + [57178] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3177), 1, + anon_sym_RBRACK, + [57185] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3179), 1, + sym_identifier, + [57192] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3181), 1, + anon_sym_COLON, + [57199] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3183), 1, + sym_identifier, + [57206] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3185), 1, + anon_sym_COLON, + [57213] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3187), 1, + ts_builtin_sym_end, + [57220] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3189), 1, + anon_sym_RBRACK, + [57227] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3191), 1, + anon_sym_RBRACE, + [57234] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3193), 1, + anon_sym_COLON, + [57241] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3195), 1, + anon_sym_COLON, + [57248] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2246), 1, + anon_sym_COLON, + [57255] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3197), 1, + sym_identifier, + [57262] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3199), 1, + sym_identifier, + [57269] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3201), 1, + sym_identifier, + [57276] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3203), 1, + sym_identifier, + [57283] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3205), 1, + anon_sym_COLON, + [57290] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3207), 1, + anon_sym_RBRACE, + [57297] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3209), 1, + sym_identifier, + [57304] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3211), 1, + anon_sym_RBRACE, + [57311] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3213), 1, + sym_identifier, + [57318] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3215), 1, + sym_identifier, + [57325] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2320), 1, + anon_sym_COLON, + [57332] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2592), 1, + anon_sym_in, + [57339] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(894), 1, + anon_sym_def, + [57346] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3217), 1, + anon_sym_COLON, + [57353] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2590), 1, + anon_sym_in, + [57360] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(2538), 1, + anon_sym_RBRACE, + [57367] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(3219), 1, + anon_sym_COLON, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(155)] = 0, + [SMALL_STATE(156)] = 118, + [SMALL_STATE(157)] = 236, + [SMALL_STATE(158)] = 354, + [SMALL_STATE(159)] = 464, + [SMALL_STATE(160)] = 579, + [SMALL_STATE(161)] = 694, + [SMALL_STATE(162)] = 809, + [SMALL_STATE(163)] = 926, + [SMALL_STATE(164)] = 1045, + [SMALL_STATE(165)] = 1162, + [SMALL_STATE(166)] = 1262, + [SMALL_STATE(167)] = 1376, + [SMALL_STATE(168)] = 1480, + [SMALL_STATE(169)] = 1584, + [SMALL_STATE(170)] = 1698, + [SMALL_STATE(171)] = 1812, + [SMALL_STATE(172)] = 1916, + [SMALL_STATE(173)] = 2016, + [SMALL_STATE(174)] = 2123, + [SMALL_STATE(175)] = 2224, + [SMALL_STATE(176)] = 2325, + [SMALL_STATE(177)] = 2430, + [SMALL_STATE(178)] = 2535, + [SMALL_STATE(179)] = 2638, + [SMALL_STATE(180)] = 2743, + [SMALL_STATE(181)] = 2848, + [SMALL_STATE(182)] = 2953, + [SMALL_STATE(183)] = 3054, + [SMALL_STATE(184)] = 3157, + [SMALL_STATE(185)] = 3262, + [SMALL_STATE(186)] = 3360, + [SMALL_STATE(187)] = 3462, + [SMALL_STATE(188)] = 3564, + [SMALL_STATE(189)] = 3668, + [SMALL_STATE(190)] = 3770, + [SMALL_STATE(191)] = 3872, + [SMALL_STATE(192)] = 3974, + [SMALL_STATE(193)] = 4072, + [SMALL_STATE(194)] = 4176, + [SMALL_STATE(195)] = 4278, + [SMALL_STATE(196)] = 4380, + [SMALL_STATE(197)] = 4482, + [SMALL_STATE(198)] = 4584, + [SMALL_STATE(199)] = 4686, + [SMALL_STATE(200)] = 4788, + [SMALL_STATE(201)] = 4894, + [SMALL_STATE(202)] = 4996, + [SMALL_STATE(203)] = 5094, + [SMALL_STATE(204)] = 5196, + [SMALL_STATE(205)] = 5300, + [SMALL_STATE(206)] = 5402, + [SMALL_STATE(207)] = 5504, + [SMALL_STATE(208)] = 5606, + [SMALL_STATE(209)] = 5708, + [SMALL_STATE(210)] = 5810, + [SMALL_STATE(211)] = 5912, + [SMALL_STATE(212)] = 6018, + [SMALL_STATE(213)] = 6122, + [SMALL_STATE(214)] = 6220, + [SMALL_STATE(215)] = 6322, + [SMALL_STATE(216)] = 6424, + [SMALL_STATE(217)] = 6526, + [SMALL_STATE(218)] = 6628, + [SMALL_STATE(219)] = 6689, + [SMALL_STATE(220)] = 6750, + [SMALL_STATE(221)] = 6811, + [SMALL_STATE(222)] = 6872, + [SMALL_STATE(223)] = 6971, + [SMALL_STATE(224)] = 7032, + [SMALL_STATE(225)] = 7131, + [SMALL_STATE(226)] = 7230, + [SMALL_STATE(227)] = 7291, + [SMALL_STATE(228)] = 7352, + [SMALL_STATE(229)] = 7424, + [SMALL_STATE(230)] = 7496, + [SMALL_STATE(231)] = 7592, + [SMALL_STATE(232)] = 7690, + [SMALL_STATE(233)] = 7762, + [SMALL_STATE(234)] = 7860, + [SMALL_STATE(235)] = 7932, + [SMALL_STATE(236)] = 8030, + [SMALL_STATE(237)] = 8128, + [SMALL_STATE(238)] = 8200, + [SMALL_STATE(239)] = 8272, + [SMALL_STATE(240)] = 8370, + [SMALL_STATE(241)] = 8442, + [SMALL_STATE(242)] = 8514, + [SMALL_STATE(243)] = 8609, + [SMALL_STATE(244)] = 8704, + [SMALL_STATE(245)] = 8799, + [SMALL_STATE(246)] = 8894, + [SMALL_STATE(247)] = 8989, + [SMALL_STATE(248)] = 9062, + [SMALL_STATE(249)] = 9157, + [SMALL_STATE(250)] = 9252, + [SMALL_STATE(251)] = 9347, + [SMALL_STATE(252)] = 9442, + [SMALL_STATE(253)] = 9537, + [SMALL_STATE(254)] = 9632, + [SMALL_STATE(255)] = 9705, + [SMALL_STATE(256)] = 9799, + [SMALL_STATE(257)] = 9893, + [SMALL_STATE(258)] = 9987, + [SMALL_STATE(259)] = 10055, + [SMALL_STATE(260)] = 10147, + [SMALL_STATE(261)] = 10241, + [SMALL_STATE(262)] = 10335, + [SMALL_STATE(263)] = 10429, + [SMALL_STATE(264)] = 10497, + [SMALL_STATE(265)] = 10589, + [SMALL_STATE(266)] = 10657, + [SMALL_STATE(267)] = 10719, + [SMALL_STATE(268)] = 10781, + [SMALL_STATE(269)] = 10849, + [SMALL_STATE(270)] = 10943, + [SMALL_STATE(271)] = 11005, + [SMALL_STATE(272)] = 11067, + [SMALL_STATE(273)] = 11135, + [SMALL_STATE(274)] = 11229, + [SMALL_STATE(275)] = 11323, + [SMALL_STATE(276)] = 11415, + [SMALL_STATE(277)] = 11483, + [SMALL_STATE(278)] = 11551, + [SMALL_STATE(279)] = 11621, + [SMALL_STATE(280)] = 11689, + [SMALL_STATE(281)] = 11778, + [SMALL_STATE(282)] = 11835, + [SMALL_STATE(283)] = 11892, + [SMALL_STATE(284)] = 11983, + [SMALL_STATE(285)] = 12050, + [SMALL_STATE(286)] = 12113, + [SMALL_STATE(287)] = 12202, + [SMALL_STATE(288)] = 12259, + [SMALL_STATE(289)] = 12316, + [SMALL_STATE(290)] = 12405, + [SMALL_STATE(291)] = 12496, + [SMALL_STATE(292)] = 12553, + [SMALL_STATE(293)] = 12644, + [SMALL_STATE(294)] = 12733, + [SMALL_STATE(295)] = 12822, + [SMALL_STATE(296)] = 12911, + [SMALL_STATE(297)] = 13002, + [SMALL_STATE(298)] = 13091, + [SMALL_STATE(299)] = 13182, + [SMALL_STATE(300)] = 13273, + [SMALL_STATE(301)] = 13362, + [SMALL_STATE(302)] = 13453, + [SMALL_STATE(303)] = 13544, + [SMALL_STATE(304)] = 13633, + [SMALL_STATE(305)] = 13722, + [SMALL_STATE(306)] = 13779, + [SMALL_STATE(307)] = 13868, + [SMALL_STATE(308)] = 13931, + [SMALL_STATE(309)] = 13988, + [SMALL_STATE(310)] = 14077, + [SMALL_STATE(311)] = 14168, + [SMALL_STATE(312)] = 14225, + [SMALL_STATE(313)] = 14314, + [SMALL_STATE(314)] = 14371, + [SMALL_STATE(315)] = 14462, + [SMALL_STATE(316)] = 14519, + [SMALL_STATE(317)] = 14575, + [SMALL_STATE(318)] = 14631, + [SMALL_STATE(319)] = 14687, + [SMALL_STATE(320)] = 14743, + [SMALL_STATE(321)] = 14799, + [SMALL_STATE(322)] = 14887, + [SMALL_STATE(323)] = 14975, + [SMALL_STATE(324)] = 15063, + [SMALL_STATE(325)] = 15151, + [SMALL_STATE(326)] = 15207, + [SMALL_STATE(327)] = 15263, + [SMALL_STATE(328)] = 15319, + [SMALL_STATE(329)] = 15375, + [SMALL_STATE(330)] = 15431, + [SMALL_STATE(331)] = 15495, + [SMALL_STATE(332)] = 15551, + [SMALL_STATE(333)] = 15607, + [SMALL_STATE(334)] = 15663, + [SMALL_STATE(335)] = 15727, + [SMALL_STATE(336)] = 15815, + [SMALL_STATE(337)] = 15871, + [SMALL_STATE(338)] = 15927, + [SMALL_STATE(339)] = 15991, + [SMALL_STATE(340)] = 16055, + [SMALL_STATE(341)] = 16111, + [SMALL_STATE(342)] = 16199, + [SMALL_STATE(343)] = 16255, + [SMALL_STATE(344)] = 16311, + [SMALL_STATE(345)] = 16367, + [SMALL_STATE(346)] = 16427, + [SMALL_STATE(347)] = 16515, + [SMALL_STATE(348)] = 16575, + [SMALL_STATE(349)] = 16663, + [SMALL_STATE(350)] = 16723, + [SMALL_STATE(351)] = 16811, + [SMALL_STATE(352)] = 16899, + [SMALL_STATE(353)] = 16955, + [SMALL_STATE(354)] = 17011, + [SMALL_STATE(355)] = 17067, + [SMALL_STATE(356)] = 17123, + [SMALL_STATE(357)] = 17179, + [SMALL_STATE(358)] = 17235, + [SMALL_STATE(359)] = 17291, + [SMALL_STATE(360)] = 17347, + [SMALL_STATE(361)] = 17403, + [SMALL_STATE(362)] = 17491, + [SMALL_STATE(363)] = 17547, + [SMALL_STATE(364)] = 17603, + [SMALL_STATE(365)] = 17691, + [SMALL_STATE(366)] = 17747, + [SMALL_STATE(367)] = 17803, + [SMALL_STATE(368)] = 17859, + [SMALL_STATE(369)] = 17947, + [SMALL_STATE(370)] = 18003, + [SMALL_STATE(371)] = 18059, + [SMALL_STATE(372)] = 18115, + [SMALL_STATE(373)] = 18171, + [SMALL_STATE(374)] = 18227, + [SMALL_STATE(375)] = 18283, + [SMALL_STATE(376)] = 18339, + [SMALL_STATE(377)] = 18395, + [SMALL_STATE(378)] = 18451, + [SMALL_STATE(379)] = 18507, + [SMALL_STATE(380)] = 18563, + [SMALL_STATE(381)] = 18623, + [SMALL_STATE(382)] = 18679, + [SMALL_STATE(383)] = 18735, + [SMALL_STATE(384)] = 18823, + [SMALL_STATE(385)] = 18879, + [SMALL_STATE(386)] = 18964, + [SMALL_STATE(387)] = 19049, + [SMALL_STATE(388)] = 19108, + [SMALL_STATE(389)] = 19163, + [SMALL_STATE(390)] = 19248, + [SMALL_STATE(391)] = 19333, + [SMALL_STATE(392)] = 19418, + [SMALL_STATE(393)] = 19503, + [SMALL_STATE(394)] = 19590, + [SMALL_STATE(395)] = 19675, + [SMALL_STATE(396)] = 19760, + [SMALL_STATE(397)] = 19845, + [SMALL_STATE(398)] = 19930, + [SMALL_STATE(399)] = 20015, + [SMALL_STATE(400)] = 20100, + [SMALL_STATE(401)] = 20185, + [SMALL_STATE(402)] = 20244, + [SMALL_STATE(403)] = 20329, + [SMALL_STATE(404)] = 20384, + [SMALL_STATE(405)] = 20469, + [SMALL_STATE(406)] = 20554, + [SMALL_STATE(407)] = 20639, + [SMALL_STATE(408)] = 20694, + [SMALL_STATE(409)] = 20753, + [SMALL_STATE(410)] = 20838, + [SMALL_STATE(411)] = 20923, + [SMALL_STATE(412)] = 21008, + [SMALL_STATE(413)] = 21093, + [SMALL_STATE(414)] = 21152, + [SMALL_STATE(415)] = 21211, + [SMALL_STATE(416)] = 21296, + [SMALL_STATE(417)] = 21381, + [SMALL_STATE(418)] = 21466, + [SMALL_STATE(419)] = 21525, + [SMALL_STATE(420)] = 21610, + [SMALL_STATE(421)] = 21665, + [SMALL_STATE(422)] = 21720, + [SMALL_STATE(423)] = 21805, + [SMALL_STATE(424)] = 21890, + [SMALL_STATE(425)] = 21975, + [SMALL_STATE(426)] = 22060, + [SMALL_STATE(427)] = 22145, + [SMALL_STATE(428)] = 22204, + [SMALL_STATE(429)] = 22263, + [SMALL_STATE(430)] = 22348, + [SMALL_STATE(431)] = 22407, + [SMALL_STATE(432)] = 22468, + [SMALL_STATE(433)] = 22527, + [SMALL_STATE(434)] = 22582, + [SMALL_STATE(435)] = 22667, + [SMALL_STATE(436)] = 22752, + [SMALL_STATE(437)] = 22837, + [SMALL_STATE(438)] = 22922, + [SMALL_STATE(439)] = 23007, + [SMALL_STATE(440)] = 23092, + [SMALL_STATE(441)] = 23151, + [SMALL_STATE(442)] = 23212, + [SMALL_STATE(443)] = 23297, + [SMALL_STATE(444)] = 23382, + [SMALL_STATE(445)] = 23467, + [SMALL_STATE(446)] = 23552, + [SMALL_STATE(447)] = 23637, + [SMALL_STATE(448)] = 23722, + [SMALL_STATE(449)] = 23807, + [SMALL_STATE(450)] = 23868, + [SMALL_STATE(451)] = 23953, + [SMALL_STATE(452)] = 24038, + [SMALL_STATE(453)] = 24123, + [SMALL_STATE(454)] = 24208, + [SMALL_STATE(455)] = 24267, + [SMALL_STATE(456)] = 24352, + [SMALL_STATE(457)] = 24437, + [SMALL_STATE(458)] = 24522, + [SMALL_STATE(459)] = 24607, + [SMALL_STATE(460)] = 24692, + [SMALL_STATE(461)] = 24777, + [SMALL_STATE(462)] = 24862, + [SMALL_STATE(463)] = 24947, + [SMALL_STATE(464)] = 25032, + [SMALL_STATE(465)] = 25091, + [SMALL_STATE(466)] = 25176, + [SMALL_STATE(467)] = 25261, + [SMALL_STATE(468)] = 25320, + [SMALL_STATE(469)] = 25405, + [SMALL_STATE(470)] = 25490, + [SMALL_STATE(471)] = 25575, + [SMALL_STATE(472)] = 25660, + [SMALL_STATE(473)] = 25719, + [SMALL_STATE(474)] = 25804, + [SMALL_STATE(475)] = 25889, + [SMALL_STATE(476)] = 25950, + [SMALL_STATE(477)] = 26035, + [SMALL_STATE(478)] = 26120, + [SMALL_STATE(479)] = 26179, + [SMALL_STATE(480)] = 26264, + [SMALL_STATE(481)] = 26349, + [SMALL_STATE(482)] = 26434, + [SMALL_STATE(483)] = 26519, + [SMALL_STATE(484)] = 26604, + [SMALL_STATE(485)] = 26689, + [SMALL_STATE(486)] = 26743, + [SMALL_STATE(487)] = 26797, + [SMALL_STATE(488)] = 26851, + [SMALL_STATE(489)] = 26905, + [SMALL_STATE(490)] = 26959, + [SMALL_STATE(491)] = 27013, + [SMALL_STATE(492)] = 27067, + [SMALL_STATE(493)] = 27121, + [SMALL_STATE(494)] = 27175, + [SMALL_STATE(495)] = 27229, + [SMALL_STATE(496)] = 27283, + [SMALL_STATE(497)] = 27337, + [SMALL_STATE(498)] = 27390, + [SMALL_STATE(499)] = 27443, + [SMALL_STATE(500)] = 27496, + [SMALL_STATE(501)] = 27549, + [SMALL_STATE(502)] = 27602, + [SMALL_STATE(503)] = 27655, + [SMALL_STATE(504)] = 27708, + [SMALL_STATE(505)] = 27761, + [SMALL_STATE(506)] = 27814, + [SMALL_STATE(507)] = 27867, + [SMALL_STATE(508)] = 27920, + [SMALL_STATE(509)] = 27973, + [SMALL_STATE(510)] = 28026, + [SMALL_STATE(511)] = 28079, + [SMALL_STATE(512)] = 28132, + [SMALL_STATE(513)] = 28185, + [SMALL_STATE(514)] = 28238, + [SMALL_STATE(515)] = 28291, + [SMALL_STATE(516)] = 28344, + [SMALL_STATE(517)] = 28397, + [SMALL_STATE(518)] = 28450, + [SMALL_STATE(519)] = 28503, + [SMALL_STATE(520)] = 28556, + [SMALL_STATE(521)] = 28609, + [SMALL_STATE(522)] = 28662, + [SMALL_STATE(523)] = 28715, + [SMALL_STATE(524)] = 28768, + [SMALL_STATE(525)] = 28821, + [SMALL_STATE(526)] = 28874, + [SMALL_STATE(527)] = 28927, + [SMALL_STATE(528)] = 28980, + [SMALL_STATE(529)] = 29033, + [SMALL_STATE(530)] = 29086, + [SMALL_STATE(531)] = 29139, + [SMALL_STATE(532)] = 29192, + [SMALL_STATE(533)] = 29245, + [SMALL_STATE(534)] = 29298, + [SMALL_STATE(535)] = 29351, + [SMALL_STATE(536)] = 29404, + [SMALL_STATE(537)] = 29457, + [SMALL_STATE(538)] = 29510, + [SMALL_STATE(539)] = 29563, + [SMALL_STATE(540)] = 29616, + [SMALL_STATE(541)] = 29669, + [SMALL_STATE(542)] = 29722, + [SMALL_STATE(543)] = 29775, + [SMALL_STATE(544)] = 29828, + [SMALL_STATE(545)] = 29881, + [SMALL_STATE(546)] = 29934, + [SMALL_STATE(547)] = 29987, + [SMALL_STATE(548)] = 30040, + [SMALL_STATE(549)] = 30093, + [SMALL_STATE(550)] = 30146, + [SMALL_STATE(551)] = 30199, + [SMALL_STATE(552)] = 30252, + [SMALL_STATE(553)] = 30305, + [SMALL_STATE(554)] = 30358, + [SMALL_STATE(555)] = 30411, + [SMALL_STATE(556)] = 30464, + [SMALL_STATE(557)] = 30517, + [SMALL_STATE(558)] = 30570, + [SMALL_STATE(559)] = 30623, + [SMALL_STATE(560)] = 30676, + [SMALL_STATE(561)] = 30729, + [SMALL_STATE(562)] = 30782, + [SMALL_STATE(563)] = 30835, + [SMALL_STATE(564)] = 30888, + [SMALL_STATE(565)] = 30941, + [SMALL_STATE(566)] = 30994, + [SMALL_STATE(567)] = 31047, + [SMALL_STATE(568)] = 31100, + [SMALL_STATE(569)] = 31153, + [SMALL_STATE(570)] = 31206, + [SMALL_STATE(571)] = 31259, + [SMALL_STATE(572)] = 31312, + [SMALL_STATE(573)] = 31365, + [SMALL_STATE(574)] = 31418, + [SMALL_STATE(575)] = 31471, + [SMALL_STATE(576)] = 31524, + [SMALL_STATE(577)] = 31577, + [SMALL_STATE(578)] = 31630, + [SMALL_STATE(579)] = 31683, + [SMALL_STATE(580)] = 31736, + [SMALL_STATE(581)] = 31789, + [SMALL_STATE(582)] = 31842, + [SMALL_STATE(583)] = 31895, + [SMALL_STATE(584)] = 31948, + [SMALL_STATE(585)] = 32001, + [SMALL_STATE(586)] = 32054, + [SMALL_STATE(587)] = 32107, + [SMALL_STATE(588)] = 32160, + [SMALL_STATE(589)] = 32213, + [SMALL_STATE(590)] = 32266, + [SMALL_STATE(591)] = 32319, + [SMALL_STATE(592)] = 32372, + [SMALL_STATE(593)] = 32425, + [SMALL_STATE(594)] = 32478, + [SMALL_STATE(595)] = 32531, + [SMALL_STATE(596)] = 32613, + [SMALL_STATE(597)] = 32697, + [SMALL_STATE(598)] = 32779, + [SMALL_STATE(599)] = 32834, + [SMALL_STATE(600)] = 32889, + [SMALL_STATE(601)] = 32944, + [SMALL_STATE(602)] = 33025, + [SMALL_STATE(603)] = 33106, + [SMALL_STATE(604)] = 33187, + [SMALL_STATE(605)] = 33268, + [SMALL_STATE(606)] = 33349, + [SMALL_STATE(607)] = 33430, + [SMALL_STATE(608)] = 33508, + [SMALL_STATE(609)] = 33586, + [SMALL_STATE(610)] = 33635, + [SMALL_STATE(611)] = 33684, + [SMALL_STATE(612)] = 33732, + [SMALL_STATE(613)] = 33780, + [SMALL_STATE(614)] = 33828, + [SMALL_STATE(615)] = 33876, + [SMALL_STATE(616)] = 33924, + [SMALL_STATE(617)] = 33972, + [SMALL_STATE(618)] = 34020, + [SMALL_STATE(619)] = 34068, + [SMALL_STATE(620)] = 34116, + [SMALL_STATE(621)] = 34164, + [SMALL_STATE(622)] = 34212, + [SMALL_STATE(623)] = 34260, + [SMALL_STATE(624)] = 34308, + [SMALL_STATE(625)] = 34356, + [SMALL_STATE(626)] = 34404, + [SMALL_STATE(627)] = 34452, + [SMALL_STATE(628)] = 34500, + [SMALL_STATE(629)] = 34548, + [SMALL_STATE(630)] = 34596, + [SMALL_STATE(631)] = 34678, + [SMALL_STATE(632)] = 34726, + [SMALL_STATE(633)] = 34774, + [SMALL_STATE(634)] = 34822, + [SMALL_STATE(635)] = 34870, + [SMALL_STATE(636)] = 34918, + [SMALL_STATE(637)] = 34990, + [SMALL_STATE(638)] = 35038, + [SMALL_STATE(639)] = 35086, + [SMALL_STATE(640)] = 35134, + [SMALL_STATE(641)] = 35182, + [SMALL_STATE(642)] = 35230, + [SMALL_STATE(643)] = 35278, + [SMALL_STATE(644)] = 35360, + [SMALL_STATE(645)] = 35408, + [SMALL_STATE(646)] = 35465, + [SMALL_STATE(647)] = 35532, + [SMALL_STATE(648)] = 35589, + [SMALL_STATE(649)] = 35646, + [SMALL_STATE(650)] = 35709, + [SMALL_STATE(651)] = 35766, + [SMALL_STATE(652)] = 35827, + [SMALL_STATE(653)] = 35898, + [SMALL_STATE(654)] = 35967, + [SMALL_STATE(655)] = 36028, + [SMALL_STATE(656)] = 36085, + [SMALL_STATE(657)] = 36150, + [SMALL_STATE(658)] = 36215, + [SMALL_STATE(659)] = 36284, + [SMALL_STATE(660)] = 36355, + [SMALL_STATE(661)] = 36422, + [SMALL_STATE(662)] = 36479, + [SMALL_STATE(663)] = 36550, + [SMALL_STATE(664)] = 36621, + [SMALL_STATE(665)] = 36692, + [SMALL_STATE(666)] = 36763, + [SMALL_STATE(667)] = 36826, + [SMALL_STATE(668)] = 36874, + [SMALL_STATE(669)] = 36922, + [SMALL_STATE(670)] = 36988, + [SMALL_STATE(671)] = 37054, + [SMALL_STATE(672)] = 37100, + [SMALL_STATE(673)] = 37146, + [SMALL_STATE(674)] = 37212, + [SMALL_STATE(675)] = 37260, + [SMALL_STATE(676)] = 37308, + [SMALL_STATE(677)] = 37374, + [SMALL_STATE(678)] = 37424, + [SMALL_STATE(679)] = 37474, + [SMALL_STATE(680)] = 37537, + [SMALL_STATE(681)] = 37600, + [SMALL_STATE(682)] = 37663, + [SMALL_STATE(683)] = 37726, + [SMALL_STATE(684)] = 37789, + [SMALL_STATE(685)] = 37868, + [SMALL_STATE(686)] = 37935, + [SMALL_STATE(687)] = 37998, + [SMALL_STATE(688)] = 38061, + [SMALL_STATE(689)] = 38124, + [SMALL_STATE(690)] = 38173, + [SMALL_STATE(691)] = 38236, + [SMALL_STATE(692)] = 38299, + [SMALL_STATE(693)] = 38362, + [SMALL_STATE(694)] = 38425, + [SMALL_STATE(695)] = 38488, + [SMALL_STATE(696)] = 38551, + [SMALL_STATE(697)] = 38614, + [SMALL_STATE(698)] = 38677, + [SMALL_STATE(699)] = 38740, + [SMALL_STATE(700)] = 38803, + [SMALL_STATE(701)] = 38866, + [SMALL_STATE(702)] = 38929, + [SMALL_STATE(703)] = 38992, + [SMALL_STATE(704)] = 39055, + [SMALL_STATE(705)] = 39118, + [SMALL_STATE(706)] = 39181, + [SMALL_STATE(707)] = 39244, + [SMALL_STATE(708)] = 39307, + [SMALL_STATE(709)] = 39370, + [SMALL_STATE(710)] = 39433, + [SMALL_STATE(711)] = 39496, + [SMALL_STATE(712)] = 39559, + [SMALL_STATE(713)] = 39622, + [SMALL_STATE(714)] = 39671, + [SMALL_STATE(715)] = 39734, + [SMALL_STATE(716)] = 39801, + [SMALL_STATE(717)] = 39864, + [SMALL_STATE(718)] = 39927, + [SMALL_STATE(719)] = 39990, + [SMALL_STATE(720)] = 40053, + [SMALL_STATE(721)] = 40102, + [SMALL_STATE(722)] = 40165, + [SMALL_STATE(723)] = 40228, + [SMALL_STATE(724)] = 40291, + [SMALL_STATE(725)] = 40354, + [SMALL_STATE(726)] = 40399, + [SMALL_STATE(727)] = 40462, + [SMALL_STATE(728)] = 40507, + [SMALL_STATE(729)] = 40570, + [SMALL_STATE(730)] = 40633, + [SMALL_STATE(731)] = 40696, + [SMALL_STATE(732)] = 40764, + [SMALL_STATE(733)] = 40824, + [SMALL_STATE(734)] = 40892, + [SMALL_STATE(735)] = 40960, + [SMALL_STATE(736)] = 41014, + [SMALL_STATE(737)] = 41058, + [SMALL_STATE(738)] = 41124, + [SMALL_STATE(739)] = 41182, + [SMALL_STATE(740)] = 41236, + [SMALL_STATE(741)] = 41312, + [SMALL_STATE(742)] = 41376, + [SMALL_STATE(743)] = 41424, + [SMALL_STATE(744)] = 41486, + [SMALL_STATE(745)] = 41530, + [SMALL_STATE(746)] = 41584, + [SMALL_STATE(747)] = 41651, + [SMALL_STATE(748)] = 41708, + [SMALL_STATE(749)] = 41753, + [SMALL_STATE(750)] = 41800, + [SMALL_STATE(751)] = 41865, + [SMALL_STATE(752)] = 41932, + [SMALL_STATE(753)] = 41991, + [SMALL_STATE(754)] = 42044, + [SMALL_STATE(755)] = 42089, + [SMALL_STATE(756)] = 42134, + [SMALL_STATE(757)] = 42187, + [SMALL_STATE(758)] = 42254, + [SMALL_STATE(759)] = 42297, + [SMALL_STATE(760)] = 42344, + [SMALL_STATE(761)] = 42391, + [SMALL_STATE(762)] = 42454, + [SMALL_STATE(763)] = 42499, + [SMALL_STATE(764)] = 42560, + [SMALL_STATE(765)] = 42607, + [SMALL_STATE(766)] = 42652, + [SMALL_STATE(767)] = 42705, + [SMALL_STATE(768)] = 42750, + [SMALL_STATE(769)] = 42795, + [SMALL_STATE(770)] = 42838, + [SMALL_STATE(771)] = 42883, + [SMALL_STATE(772)] = 42925, + [SMALL_STATE(773)] = 42967, + [SMALL_STATE(774)] = 43009, + [SMALL_STATE(775)] = 43051, + [SMALL_STATE(776)] = 43093, + [SMALL_STATE(777)] = 43135, + [SMALL_STATE(778)] = 43177, + [SMALL_STATE(779)] = 43219, + [SMALL_STATE(780)] = 43263, + [SMALL_STATE(781)] = 43305, + [SMALL_STATE(782)] = 43347, + [SMALL_STATE(783)] = 43389, + [SMALL_STATE(784)] = 43431, + [SMALL_STATE(785)] = 43473, + [SMALL_STATE(786)] = 43515, + [SMALL_STATE(787)] = 43557, + [SMALL_STATE(788)] = 43599, + [SMALL_STATE(789)] = 43641, + [SMALL_STATE(790)] = 43685, + [SMALL_STATE(791)] = 43727, + [SMALL_STATE(792)] = 43769, + [SMALL_STATE(793)] = 43811, + [SMALL_STATE(794)] = 43853, + [SMALL_STATE(795)] = 43895, + [SMALL_STATE(796)] = 43937, + [SMALL_STATE(797)] = 43979, + [SMALL_STATE(798)] = 44021, + [SMALL_STATE(799)] = 44065, + [SMALL_STATE(800)] = 44107, + [SMALL_STATE(801)] = 44149, + [SMALL_STATE(802)] = 44193, + [SMALL_STATE(803)] = 44235, + [SMALL_STATE(804)] = 44277, + [SMALL_STATE(805)] = 44319, + [SMALL_STATE(806)] = 44361, + [SMALL_STATE(807)] = 44405, + [SMALL_STATE(808)] = 44447, + [SMALL_STATE(809)] = 44489, + [SMALL_STATE(810)] = 44530, + [SMALL_STATE(811)] = 44571, + [SMALL_STATE(812)] = 44612, + [SMALL_STATE(813)] = 44657, + [SMALL_STATE(814)] = 44698, + [SMALL_STATE(815)] = 44739, + [SMALL_STATE(816)] = 44780, + [SMALL_STATE(817)] = 44821, + [SMALL_STATE(818)] = 44862, + [SMALL_STATE(819)] = 44903, + [SMALL_STATE(820)] = 44944, + [SMALL_STATE(821)] = 44985, + [SMALL_STATE(822)] = 45026, + [SMALL_STATE(823)] = 45067, + [SMALL_STATE(824)] = 45108, + [SMALL_STATE(825)] = 45149, + [SMALL_STATE(826)] = 45190, + [SMALL_STATE(827)] = 45231, + [SMALL_STATE(828)] = 45272, + [SMALL_STATE(829)] = 45313, + [SMALL_STATE(830)] = 45354, + [SMALL_STATE(831)] = 45395, + [SMALL_STATE(832)] = 45436, + [SMALL_STATE(833)] = 45477, + [SMALL_STATE(834)] = 45518, + [SMALL_STATE(835)] = 45559, + [SMALL_STATE(836)] = 45600, + [SMALL_STATE(837)] = 45641, + [SMALL_STATE(838)] = 45686, + [SMALL_STATE(839)] = 45727, + [SMALL_STATE(840)] = 45768, + [SMALL_STATE(841)] = 45809, + [SMALL_STATE(842)] = 45850, + [SMALL_STATE(843)] = 45891, + [SMALL_STATE(844)] = 45932, + [SMALL_STATE(845)] = 45973, + [SMALL_STATE(846)] = 46014, + [SMALL_STATE(847)] = 46055, + [SMALL_STATE(848)] = 46096, + [SMALL_STATE(849)] = 46137, + [SMALL_STATE(850)] = 46211, + [SMALL_STATE(851)] = 46285, + [SMALL_STATE(852)] = 46359, + [SMALL_STATE(853)] = 46433, + [SMALL_STATE(854)] = 46506, + [SMALL_STATE(855)] = 46577, + [SMALL_STATE(856)] = 46648, + [SMALL_STATE(857)] = 46719, + [SMALL_STATE(858)] = 46790, + [SMALL_STATE(859)] = 46861, + [SMALL_STATE(860)] = 46929, + [SMALL_STATE(861)] = 47001, + [SMALL_STATE(862)] = 47073, + [SMALL_STATE(863)] = 47145, + [SMALL_STATE(864)] = 47211, + [SMALL_STATE(865)] = 47274, + [SMALL_STATE(866)] = 47337, + [SMALL_STATE(867)] = 47392, + [SMALL_STATE(868)] = 47447, + [SMALL_STATE(869)] = 47487, + [SMALL_STATE(870)] = 47527, + [SMALL_STATE(871)] = 47567, + [SMALL_STATE(872)] = 47607, + [SMALL_STATE(873)] = 47637, + [SMALL_STATE(874)] = 47662, + [SMALL_STATE(875)] = 47687, + [SMALL_STATE(876)] = 47712, + [SMALL_STATE(877)] = 47737, + [SMALL_STATE(878)] = 47774, + [SMALL_STATE(879)] = 47811, + [SMALL_STATE(880)] = 47840, + [SMALL_STATE(881)] = 47869, + [SMALL_STATE(882)] = 47903, + [SMALL_STATE(883)] = 47949, + [SMALL_STATE(884)] = 47983, + [SMALL_STATE(885)] = 48011, + [SMALL_STATE(886)] = 48054, + [SMALL_STATE(887)] = 48097, + [SMALL_STATE(888)] = 48140, + [SMALL_STATE(889)] = 48183, + [SMALL_STATE(890)] = 48214, + [SMALL_STATE(891)] = 48257, + [SMALL_STATE(892)] = 48303, + [SMALL_STATE(893)] = 48349, + [SMALL_STATE(894)] = 48389, + [SMALL_STATE(895)] = 48435, + [SMALL_STATE(896)] = 48472, + [SMALL_STATE(897)] = 48509, + [SMALL_STATE(898)] = 48534, + [SMALL_STATE(899)] = 48571, + [SMALL_STATE(900)] = 48608, + [SMALL_STATE(901)] = 48630, + [SMALL_STATE(902)] = 48652, + [SMALL_STATE(903)] = 48686, + [SMALL_STATE(904)] = 48720, + [SMALL_STATE(905)] = 48742, + [SMALL_STATE(906)] = 48779, + [SMALL_STATE(907)] = 48801, + [SMALL_STATE(908)] = 48838, + [SMALL_STATE(909)] = 48861, + [SMALL_STATE(910)] = 48886, + [SMALL_STATE(911)] = 48909, + [SMALL_STATE(912)] = 48946, + [SMALL_STATE(913)] = 48971, + [SMALL_STATE(914)] = 48992, + [SMALL_STATE(915)] = 49015, + [SMALL_STATE(916)] = 49052, + [SMALL_STATE(917)] = 49073, + [SMALL_STATE(918)] = 49090, + [SMALL_STATE(919)] = 49127, + [SMALL_STATE(920)] = 49150, + [SMALL_STATE(921)] = 49169, + [SMALL_STATE(922)] = 49190, + [SMALL_STATE(923)] = 49213, + [SMALL_STATE(924)] = 49238, + [SMALL_STATE(925)] = 49261, + [SMALL_STATE(926)] = 49284, + [SMALL_STATE(927)] = 49305, + [SMALL_STATE(928)] = 49326, + [SMALL_STATE(929)] = 49349, + [SMALL_STATE(930)] = 49376, + [SMALL_STATE(931)] = 49410, + [SMALL_STATE(932)] = 49444, + [SMALL_STATE(933)] = 49478, + [SMALL_STATE(934)] = 49500, + [SMALL_STATE(935)] = 49530, + [SMALL_STATE(936)] = 49564, + [SMALL_STATE(937)] = 49594, + [SMALL_STATE(938)] = 49624, + [SMALL_STATE(939)] = 49654, + [SMALL_STATE(940)] = 49676, + [SMALL_STATE(941)] = 49710, + [SMALL_STATE(942)] = 49744, + [SMALL_STATE(943)] = 49774, + [SMALL_STATE(944)] = 49792, + [SMALL_STATE(945)] = 49822, + [SMALL_STATE(946)] = 49856, + [SMALL_STATE(947)] = 49890, + [SMALL_STATE(948)] = 49912, + [SMALL_STATE(949)] = 49934, + [SMALL_STATE(950)] = 49964, + [SMALL_STATE(951)] = 49994, + [SMALL_STATE(952)] = 50012, + [SMALL_STATE(953)] = 50042, + [SMALL_STATE(954)] = 50076, + [SMALL_STATE(955)] = 50095, + [SMALL_STATE(956)] = 50118, + [SMALL_STATE(957)] = 50141, + [SMALL_STATE(958)] = 50160, + [SMALL_STATE(959)] = 50179, + [SMALL_STATE(960)] = 50202, + [SMALL_STATE(961)] = 50227, + [SMALL_STATE(962)] = 50246, + [SMALL_STATE(963)] = 50265, + [SMALL_STATE(964)] = 50284, + [SMALL_STATE(965)] = 50302, + [SMALL_STATE(966)] = 50326, + [SMALL_STATE(967)] = 50340, + [SMALL_STATE(968)] = 50354, + [SMALL_STATE(969)] = 50368, + [SMALL_STATE(970)] = 50382, + [SMALL_STATE(971)] = 50396, + [SMALL_STATE(972)] = 50412, + [SMALL_STATE(973)] = 50426, + [SMALL_STATE(974)] = 50440, + [SMALL_STATE(975)] = 50458, + [SMALL_STATE(976)] = 50472, + [SMALL_STATE(977)] = 50486, + [SMALL_STATE(978)] = 50500, + [SMALL_STATE(979)] = 50518, + [SMALL_STATE(980)] = 50536, + [SMALL_STATE(981)] = 50554, + [SMALL_STATE(982)] = 50568, + [SMALL_STATE(983)] = 50594, + [SMALL_STATE(984)] = 50618, + [SMALL_STATE(985)] = 50632, + [SMALL_STATE(986)] = 50650, + [SMALL_STATE(987)] = 50664, + [SMALL_STATE(988)] = 50678, + [SMALL_STATE(989)] = 50692, + [SMALL_STATE(990)] = 50706, + [SMALL_STATE(991)] = 50720, + [SMALL_STATE(992)] = 50744, + [SMALL_STATE(993)] = 50764, + [SMALL_STATE(994)] = 50778, + [SMALL_STATE(995)] = 50796, + [SMALL_STATE(996)] = 50814, + [SMALL_STATE(997)] = 50838, + [SMALL_STATE(998)] = 50858, + [SMALL_STATE(999)] = 50872, + [SMALL_STATE(1000)] = 50894, + [SMALL_STATE(1001)] = 50912, + [SMALL_STATE(1002)] = 50928, + [SMALL_STATE(1003)] = 50952, + [SMALL_STATE(1004)] = 50976, + [SMALL_STATE(1005)] = 50990, + [SMALL_STATE(1006)] = 51008, + [SMALL_STATE(1007)] = 51022, + [SMALL_STATE(1008)] = 51042, + [SMALL_STATE(1009)] = 51056, + [SMALL_STATE(1010)] = 51070, + [SMALL_STATE(1011)] = 51084, + [SMALL_STATE(1012)] = 51098, + [SMALL_STATE(1013)] = 51116, + [SMALL_STATE(1014)] = 51134, + [SMALL_STATE(1015)] = 51157, + [SMALL_STATE(1016)] = 51170, + [SMALL_STATE(1017)] = 51193, + [SMALL_STATE(1018)] = 51206, + [SMALL_STATE(1019)] = 51219, + [SMALL_STATE(1020)] = 51242, + [SMALL_STATE(1021)] = 51261, + [SMALL_STATE(1022)] = 51286, + [SMALL_STATE(1023)] = 51305, + [SMALL_STATE(1024)] = 51318, + [SMALL_STATE(1025)] = 51333, + [SMALL_STATE(1026)] = 51350, + [SMALL_STATE(1027)] = 51373, + [SMALL_STATE(1028)] = 51392, + [SMALL_STATE(1029)] = 51409, + [SMALL_STATE(1030)] = 51424, + [SMALL_STATE(1031)] = 51441, + [SMALL_STATE(1032)] = 51462, + [SMALL_STATE(1033)] = 51481, + [SMALL_STATE(1034)] = 51494, + [SMALL_STATE(1035)] = 51517, + [SMALL_STATE(1036)] = 51536, + [SMALL_STATE(1037)] = 51555, + [SMALL_STATE(1038)] = 51574, + [SMALL_STATE(1039)] = 51599, + [SMALL_STATE(1040)] = 51618, + [SMALL_STATE(1041)] = 51643, + [SMALL_STATE(1042)] = 51656, + [SMALL_STATE(1043)] = 51669, + [SMALL_STATE(1044)] = 51692, + [SMALL_STATE(1045)] = 51715, + [SMALL_STATE(1046)] = 51738, + [SMALL_STATE(1047)] = 51761, + [SMALL_STATE(1048)] = 51786, + [SMALL_STATE(1049)] = 51805, + [SMALL_STATE(1050)] = 51830, + [SMALL_STATE(1051)] = 51851, + [SMALL_STATE(1052)] = 51864, + [SMALL_STATE(1053)] = 51889, + [SMALL_STATE(1054)] = 51908, + [SMALL_STATE(1055)] = 51927, + [SMALL_STATE(1056)] = 51948, + [SMALL_STATE(1057)] = 51973, + [SMALL_STATE(1058)] = 51989, + [SMALL_STATE(1059)] = 52005, + [SMALL_STATE(1060)] = 52027, + [SMALL_STATE(1061)] = 52041, + [SMALL_STATE(1062)] = 52057, + [SMALL_STATE(1063)] = 52073, + [SMALL_STATE(1064)] = 52093, + [SMALL_STATE(1065)] = 52113, + [SMALL_STATE(1066)] = 52131, + [SMALL_STATE(1067)] = 52149, + [SMALL_STATE(1068)] = 52163, + [SMALL_STATE(1069)] = 52179, + [SMALL_STATE(1070)] = 52193, + [SMALL_STATE(1071)] = 52215, + [SMALL_STATE(1072)] = 52237, + [SMALL_STATE(1073)] = 52251, + [SMALL_STATE(1074)] = 52269, + [SMALL_STATE(1075)] = 52283, + [SMALL_STATE(1076)] = 52305, + [SMALL_STATE(1077)] = 52319, + [SMALL_STATE(1078)] = 52335, + [SMALL_STATE(1079)] = 52353, + [SMALL_STATE(1080)] = 52375, + [SMALL_STATE(1081)] = 52397, + [SMALL_STATE(1082)] = 52417, + [SMALL_STATE(1083)] = 52435, + [SMALL_STATE(1084)] = 52455, + [SMALL_STATE(1085)] = 52473, + [SMALL_STATE(1086)] = 52495, + [SMALL_STATE(1087)] = 52515, + [SMALL_STATE(1088)] = 52527, + [SMALL_STATE(1089)] = 52543, + [SMALL_STATE(1090)] = 52555, + [SMALL_STATE(1091)] = 52572, + [SMALL_STATE(1092)] = 52589, + [SMALL_STATE(1093)] = 52604, + [SMALL_STATE(1094)] = 52621, + [SMALL_STATE(1095)] = 52638, + [SMALL_STATE(1096)] = 52655, + [SMALL_STATE(1097)] = 52670, + [SMALL_STATE(1098)] = 52689, + [SMALL_STATE(1099)] = 52706, + [SMALL_STATE(1100)] = 52725, + [SMALL_STATE(1101)] = 52740, + [SMALL_STATE(1102)] = 52751, + [SMALL_STATE(1103)] = 52768, + [SMALL_STATE(1104)] = 52785, + [SMALL_STATE(1105)] = 52804, + [SMALL_STATE(1106)] = 52821, + [SMALL_STATE(1107)] = 52832, + [SMALL_STATE(1108)] = 52851, + [SMALL_STATE(1109)] = 52870, + [SMALL_STATE(1110)] = 52887, + [SMALL_STATE(1111)] = 52898, + [SMALL_STATE(1112)] = 52913, + [SMALL_STATE(1113)] = 52928, + [SMALL_STATE(1114)] = 52945, + [SMALL_STATE(1115)] = 52960, + [SMALL_STATE(1116)] = 52975, + [SMALL_STATE(1117)] = 52994, + [SMALL_STATE(1118)] = 53013, + [SMALL_STATE(1119)] = 53030, + [SMALL_STATE(1120)] = 53047, + [SMALL_STATE(1121)] = 53066, + [SMALL_STATE(1122)] = 53083, + [SMALL_STATE(1123)] = 53100, + [SMALL_STATE(1124)] = 53119, + [SMALL_STATE(1125)] = 53136, + [SMALL_STATE(1126)] = 53155, + [SMALL_STATE(1127)] = 53172, + [SMALL_STATE(1128)] = 53189, + [SMALL_STATE(1129)] = 53205, + [SMALL_STATE(1130)] = 53219, + [SMALL_STATE(1131)] = 53235, + [SMALL_STATE(1132)] = 53251, + [SMALL_STATE(1133)] = 53267, + [SMALL_STATE(1134)] = 53279, + [SMALL_STATE(1135)] = 53295, + [SMALL_STATE(1136)] = 53311, + [SMALL_STATE(1137)] = 53327, + [SMALL_STATE(1138)] = 53341, + [SMALL_STATE(1139)] = 53355, + [SMALL_STATE(1140)] = 53369, + [SMALL_STATE(1141)] = 53385, + [SMALL_STATE(1142)] = 53401, + [SMALL_STATE(1143)] = 53417, + [SMALL_STATE(1144)] = 53431, + [SMALL_STATE(1145)] = 53445, + [SMALL_STATE(1146)] = 53461, + [SMALL_STATE(1147)] = 53475, + [SMALL_STATE(1148)] = 53491, + [SMALL_STATE(1149)] = 53507, + [SMALL_STATE(1150)] = 53523, + [SMALL_STATE(1151)] = 53537, + [SMALL_STATE(1152)] = 53553, + [SMALL_STATE(1153)] = 53569, + [SMALL_STATE(1154)] = 53585, + [SMALL_STATE(1155)] = 53599, + [SMALL_STATE(1156)] = 53613, + [SMALL_STATE(1157)] = 53629, + [SMALL_STATE(1158)] = 53645, + [SMALL_STATE(1159)] = 53661, + [SMALL_STATE(1160)] = 53677, + [SMALL_STATE(1161)] = 53691, + [SMALL_STATE(1162)] = 53707, + [SMALL_STATE(1163)] = 53721, + [SMALL_STATE(1164)] = 53735, + [SMALL_STATE(1165)] = 53749, + [SMALL_STATE(1166)] = 53763, + [SMALL_STATE(1167)] = 53773, + [SMALL_STATE(1168)] = 53787, + [SMALL_STATE(1169)] = 53801, + [SMALL_STATE(1170)] = 53817, + [SMALL_STATE(1171)] = 53827, + [SMALL_STATE(1172)] = 53841, + [SMALL_STATE(1173)] = 53855, + [SMALL_STATE(1174)] = 53871, + [SMALL_STATE(1175)] = 53885, + [SMALL_STATE(1176)] = 53895, + [SMALL_STATE(1177)] = 53911, + [SMALL_STATE(1178)] = 53925, + [SMALL_STATE(1179)] = 53939, + [SMALL_STATE(1180)] = 53953, + [SMALL_STATE(1181)] = 53967, + [SMALL_STATE(1182)] = 53983, + [SMALL_STATE(1183)] = 53999, + [SMALL_STATE(1184)] = 54011, + [SMALL_STATE(1185)] = 54025, + [SMALL_STATE(1186)] = 54035, + [SMALL_STATE(1187)] = 54051, + [SMALL_STATE(1188)] = 54061, + [SMALL_STATE(1189)] = 54077, + [SMALL_STATE(1190)] = 54091, + [SMALL_STATE(1191)] = 54105, + [SMALL_STATE(1192)] = 54119, + [SMALL_STATE(1193)] = 54133, + [SMALL_STATE(1194)] = 54149, + [SMALL_STATE(1195)] = 54162, + [SMALL_STATE(1196)] = 54175, + [SMALL_STATE(1197)] = 54188, + [SMALL_STATE(1198)] = 54201, + [SMALL_STATE(1199)] = 54210, + [SMALL_STATE(1200)] = 54223, + [SMALL_STATE(1201)] = 54236, + [SMALL_STATE(1202)] = 54245, + [SMALL_STATE(1203)] = 54258, + [SMALL_STATE(1204)] = 54271, + [SMALL_STATE(1205)] = 54284, + [SMALL_STATE(1206)] = 54297, + [SMALL_STATE(1207)] = 54310, + [SMALL_STATE(1208)] = 54319, + [SMALL_STATE(1209)] = 54332, + [SMALL_STATE(1210)] = 54345, + [SMALL_STATE(1211)] = 54358, + [SMALL_STATE(1212)] = 54371, + [SMALL_STATE(1213)] = 54384, + [SMALL_STATE(1214)] = 54397, + [SMALL_STATE(1215)] = 54410, + [SMALL_STATE(1216)] = 54423, + [SMALL_STATE(1217)] = 54436, + [SMALL_STATE(1218)] = 54447, + [SMALL_STATE(1219)] = 54460, + [SMALL_STATE(1220)] = 54473, + [SMALL_STATE(1221)] = 54486, + [SMALL_STATE(1222)] = 54499, + [SMALL_STATE(1223)] = 54510, + [SMALL_STATE(1224)] = 54519, + [SMALL_STATE(1225)] = 54532, + [SMALL_STATE(1226)] = 54545, + [SMALL_STATE(1227)] = 54554, + [SMALL_STATE(1228)] = 54567, + [SMALL_STATE(1229)] = 54580, + [SMALL_STATE(1230)] = 54593, + [SMALL_STATE(1231)] = 54606, + [SMALL_STATE(1232)] = 54619, + [SMALL_STATE(1233)] = 54632, + [SMALL_STATE(1234)] = 54643, + [SMALL_STATE(1235)] = 54656, + [SMALL_STATE(1236)] = 54669, + [SMALL_STATE(1237)] = 54682, + [SMALL_STATE(1238)] = 54695, + [SMALL_STATE(1239)] = 54708, + [SMALL_STATE(1240)] = 54721, + [SMALL_STATE(1241)] = 54734, + [SMALL_STATE(1242)] = 54747, + [SMALL_STATE(1243)] = 54760, + [SMALL_STATE(1244)] = 54773, + [SMALL_STATE(1245)] = 54786, + [SMALL_STATE(1246)] = 54797, + [SMALL_STATE(1247)] = 54810, + [SMALL_STATE(1248)] = 54823, + [SMALL_STATE(1249)] = 54836, + [SMALL_STATE(1250)] = 54849, + [SMALL_STATE(1251)] = 54858, + [SMALL_STATE(1252)] = 54871, + [SMALL_STATE(1253)] = 54884, + [SMALL_STATE(1254)] = 54895, + [SMALL_STATE(1255)] = 54908, + [SMALL_STATE(1256)] = 54921, + [SMALL_STATE(1257)] = 54934, + [SMALL_STATE(1258)] = 54947, + [SMALL_STATE(1259)] = 54960, + [SMALL_STATE(1260)] = 54973, + [SMALL_STATE(1261)] = 54986, + [SMALL_STATE(1262)] = 54999, + [SMALL_STATE(1263)] = 55012, + [SMALL_STATE(1264)] = 55023, + [SMALL_STATE(1265)] = 55036, + [SMALL_STATE(1266)] = 55047, + [SMALL_STATE(1267)] = 55060, + [SMALL_STATE(1268)] = 55071, + [SMALL_STATE(1269)] = 55084, + [SMALL_STATE(1270)] = 55095, + [SMALL_STATE(1271)] = 55104, + [SMALL_STATE(1272)] = 55117, + [SMALL_STATE(1273)] = 55130, + [SMALL_STATE(1274)] = 55143, + [SMALL_STATE(1275)] = 55156, + [SMALL_STATE(1276)] = 55169, + [SMALL_STATE(1277)] = 55182, + [SMALL_STATE(1278)] = 55195, + [SMALL_STATE(1279)] = 55208, + [SMALL_STATE(1280)] = 55221, + [SMALL_STATE(1281)] = 55234, + [SMALL_STATE(1282)] = 55243, + [SMALL_STATE(1283)] = 55256, + [SMALL_STATE(1284)] = 55269, + [SMALL_STATE(1285)] = 55282, + [SMALL_STATE(1286)] = 55295, + [SMALL_STATE(1287)] = 55308, + [SMALL_STATE(1288)] = 55319, + [SMALL_STATE(1289)] = 55330, + [SMALL_STATE(1290)] = 55343, + [SMALL_STATE(1291)] = 55356, + [SMALL_STATE(1292)] = 55365, + [SMALL_STATE(1293)] = 55378, + [SMALL_STATE(1294)] = 55391, + [SMALL_STATE(1295)] = 55404, + [SMALL_STATE(1296)] = 55417, + [SMALL_STATE(1297)] = 55430, + [SMALL_STATE(1298)] = 55443, + [SMALL_STATE(1299)] = 55456, + [SMALL_STATE(1300)] = 55469, + [SMALL_STATE(1301)] = 55482, + [SMALL_STATE(1302)] = 55495, + [SMALL_STATE(1303)] = 55508, + [SMALL_STATE(1304)] = 55521, + [SMALL_STATE(1305)] = 55532, + [SMALL_STATE(1306)] = 55545, + [SMALL_STATE(1307)] = 55558, + [SMALL_STATE(1308)] = 55569, + [SMALL_STATE(1309)] = 55578, + [SMALL_STATE(1310)] = 55591, + [SMALL_STATE(1311)] = 55604, + [SMALL_STATE(1312)] = 55617, + [SMALL_STATE(1313)] = 55630, + [SMALL_STATE(1314)] = 55643, + [SMALL_STATE(1315)] = 55656, + [SMALL_STATE(1316)] = 55669, + [SMALL_STATE(1317)] = 55682, + [SMALL_STATE(1318)] = 55695, + [SMALL_STATE(1319)] = 55704, + [SMALL_STATE(1320)] = 55717, + [SMALL_STATE(1321)] = 55730, + [SMALL_STATE(1322)] = 55743, + [SMALL_STATE(1323)] = 55752, + [SMALL_STATE(1324)] = 55765, + [SMALL_STATE(1325)] = 55776, + [SMALL_STATE(1326)] = 55789, + [SMALL_STATE(1327)] = 55802, + [SMALL_STATE(1328)] = 55815, + [SMALL_STATE(1329)] = 55828, + [SMALL_STATE(1330)] = 55841, + [SMALL_STATE(1331)] = 55854, + [SMALL_STATE(1332)] = 55867, + [SMALL_STATE(1333)] = 55878, + [SMALL_STATE(1334)] = 55887, + [SMALL_STATE(1335)] = 55900, + [SMALL_STATE(1336)] = 55911, + [SMALL_STATE(1337)] = 55924, + [SMALL_STATE(1338)] = 55937, + [SMALL_STATE(1339)] = 55950, + [SMALL_STATE(1340)] = 55961, + [SMALL_STATE(1341)] = 55970, + [SMALL_STATE(1342)] = 55978, + [SMALL_STATE(1343)] = 55986, + [SMALL_STATE(1344)] = 55994, + [SMALL_STATE(1345)] = 56004, + [SMALL_STATE(1346)] = 56012, + [SMALL_STATE(1347)] = 56020, + [SMALL_STATE(1348)] = 56028, + [SMALL_STATE(1349)] = 56036, + [SMALL_STATE(1350)] = 56044, + [SMALL_STATE(1351)] = 56052, + [SMALL_STATE(1352)] = 56060, + [SMALL_STATE(1353)] = 56068, + [SMALL_STATE(1354)] = 56078, + [SMALL_STATE(1355)] = 56088, + [SMALL_STATE(1356)] = 56096, + [SMALL_STATE(1357)] = 56106, + [SMALL_STATE(1358)] = 56116, + [SMALL_STATE(1359)] = 56126, + [SMALL_STATE(1360)] = 56136, + [SMALL_STATE(1361)] = 56146, + [SMALL_STATE(1362)] = 56154, + [SMALL_STATE(1363)] = 56162, + [SMALL_STATE(1364)] = 56172, + [SMALL_STATE(1365)] = 56180, + [SMALL_STATE(1366)] = 56190, + [SMALL_STATE(1367)] = 56200, + [SMALL_STATE(1368)] = 56208, + [SMALL_STATE(1369)] = 56218, + [SMALL_STATE(1370)] = 56226, + [SMALL_STATE(1371)] = 56236, + [SMALL_STATE(1372)] = 56246, + [SMALL_STATE(1373)] = 56256, + [SMALL_STATE(1374)] = 56264, + [SMALL_STATE(1375)] = 56272, + [SMALL_STATE(1376)] = 56282, + [SMALL_STATE(1377)] = 56292, + [SMALL_STATE(1378)] = 56302, + [SMALL_STATE(1379)] = 56312, + [SMALL_STATE(1380)] = 56320, + [SMALL_STATE(1381)] = 56328, + [SMALL_STATE(1382)] = 56338, + [SMALL_STATE(1383)] = 56346, + [SMALL_STATE(1384)] = 56354, + [SMALL_STATE(1385)] = 56362, + [SMALL_STATE(1386)] = 56370, + [SMALL_STATE(1387)] = 56378, + [SMALL_STATE(1388)] = 56388, + [SMALL_STATE(1389)] = 56396, + [SMALL_STATE(1390)] = 56404, + [SMALL_STATE(1391)] = 56414, + [SMALL_STATE(1392)] = 56422, + [SMALL_STATE(1393)] = 56432, + [SMALL_STATE(1394)] = 56440, + [SMALL_STATE(1395)] = 56448, + [SMALL_STATE(1396)] = 56456, + [SMALL_STATE(1397)] = 56466, + [SMALL_STATE(1398)] = 56474, + [SMALL_STATE(1399)] = 56482, + [SMALL_STATE(1400)] = 56490, + [SMALL_STATE(1401)] = 56498, + [SMALL_STATE(1402)] = 56508, + [SMALL_STATE(1403)] = 56516, + [SMALL_STATE(1404)] = 56524, + [SMALL_STATE(1405)] = 56534, + [SMALL_STATE(1406)] = 56541, + [SMALL_STATE(1407)] = 56548, + [SMALL_STATE(1408)] = 56555, + [SMALL_STATE(1409)] = 56562, + [SMALL_STATE(1410)] = 56569, + [SMALL_STATE(1411)] = 56576, + [SMALL_STATE(1412)] = 56583, + [SMALL_STATE(1413)] = 56590, + [SMALL_STATE(1414)] = 56597, + [SMALL_STATE(1415)] = 56604, + [SMALL_STATE(1416)] = 56611, + [SMALL_STATE(1417)] = 56618, + [SMALL_STATE(1418)] = 56625, + [SMALL_STATE(1419)] = 56632, + [SMALL_STATE(1420)] = 56639, + [SMALL_STATE(1421)] = 56646, + [SMALL_STATE(1422)] = 56653, + [SMALL_STATE(1423)] = 56660, + [SMALL_STATE(1424)] = 56667, + [SMALL_STATE(1425)] = 56674, + [SMALL_STATE(1426)] = 56681, + [SMALL_STATE(1427)] = 56688, + [SMALL_STATE(1428)] = 56695, + [SMALL_STATE(1429)] = 56702, + [SMALL_STATE(1430)] = 56709, + [SMALL_STATE(1431)] = 56716, + [SMALL_STATE(1432)] = 56723, + [SMALL_STATE(1433)] = 56730, + [SMALL_STATE(1434)] = 56737, + [SMALL_STATE(1435)] = 56744, + [SMALL_STATE(1436)] = 56751, + [SMALL_STATE(1437)] = 56758, + [SMALL_STATE(1438)] = 56765, + [SMALL_STATE(1439)] = 56772, + [SMALL_STATE(1440)] = 56779, + [SMALL_STATE(1441)] = 56786, + [SMALL_STATE(1442)] = 56793, + [SMALL_STATE(1443)] = 56800, + [SMALL_STATE(1444)] = 56807, + [SMALL_STATE(1445)] = 56814, + [SMALL_STATE(1446)] = 56821, + [SMALL_STATE(1447)] = 56828, + [SMALL_STATE(1448)] = 56835, + [SMALL_STATE(1449)] = 56842, + [SMALL_STATE(1450)] = 56849, + [SMALL_STATE(1451)] = 56856, + [SMALL_STATE(1452)] = 56863, + [SMALL_STATE(1453)] = 56870, + [SMALL_STATE(1454)] = 56877, + [SMALL_STATE(1455)] = 56884, + [SMALL_STATE(1456)] = 56891, + [SMALL_STATE(1457)] = 56898, + [SMALL_STATE(1458)] = 56905, + [SMALL_STATE(1459)] = 56912, + [SMALL_STATE(1460)] = 56919, + [SMALL_STATE(1461)] = 56926, + [SMALL_STATE(1462)] = 56933, + [SMALL_STATE(1463)] = 56940, + [SMALL_STATE(1464)] = 56947, + [SMALL_STATE(1465)] = 56954, + [SMALL_STATE(1466)] = 56961, + [SMALL_STATE(1467)] = 56968, + [SMALL_STATE(1468)] = 56975, + [SMALL_STATE(1469)] = 56982, + [SMALL_STATE(1470)] = 56989, + [SMALL_STATE(1471)] = 56996, + [SMALL_STATE(1472)] = 57003, + [SMALL_STATE(1473)] = 57010, + [SMALL_STATE(1474)] = 57017, + [SMALL_STATE(1475)] = 57024, + [SMALL_STATE(1476)] = 57031, + [SMALL_STATE(1477)] = 57038, + [SMALL_STATE(1478)] = 57045, + [SMALL_STATE(1479)] = 57052, + [SMALL_STATE(1480)] = 57059, + [SMALL_STATE(1481)] = 57066, + [SMALL_STATE(1482)] = 57073, + [SMALL_STATE(1483)] = 57080, + [SMALL_STATE(1484)] = 57087, + [SMALL_STATE(1485)] = 57094, + [SMALL_STATE(1486)] = 57101, + [SMALL_STATE(1487)] = 57108, + [SMALL_STATE(1488)] = 57115, + [SMALL_STATE(1489)] = 57122, + [SMALL_STATE(1490)] = 57129, + [SMALL_STATE(1491)] = 57136, + [SMALL_STATE(1492)] = 57143, + [SMALL_STATE(1493)] = 57150, + [SMALL_STATE(1494)] = 57157, + [SMALL_STATE(1495)] = 57164, + [SMALL_STATE(1496)] = 57171, + [SMALL_STATE(1497)] = 57178, + [SMALL_STATE(1498)] = 57185, + [SMALL_STATE(1499)] = 57192, + [SMALL_STATE(1500)] = 57199, + [SMALL_STATE(1501)] = 57206, + [SMALL_STATE(1502)] = 57213, + [SMALL_STATE(1503)] = 57220, + [SMALL_STATE(1504)] = 57227, + [SMALL_STATE(1505)] = 57234, + [SMALL_STATE(1506)] = 57241, + [SMALL_STATE(1507)] = 57248, + [SMALL_STATE(1508)] = 57255, + [SMALL_STATE(1509)] = 57262, + [SMALL_STATE(1510)] = 57269, + [SMALL_STATE(1511)] = 57276, + [SMALL_STATE(1512)] = 57283, + [SMALL_STATE(1513)] = 57290, + [SMALL_STATE(1514)] = 57297, + [SMALL_STATE(1515)] = 57304, + [SMALL_STATE(1516)] = 57311, + [SMALL_STATE(1517)] = 57318, + [SMALL_STATE(1518)] = 57325, + [SMALL_STATE(1519)] = 57332, + [SMALL_STATE(1520)] = 57339, + [SMALL_STATE(1521)] = 57346, + [SMALL_STATE(1522)] = 57353, + [SMALL_STATE(1523)] = 57360, + [SMALL_STATE(1524)] = 57367, +}; + +static const TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_module, 0), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(330), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1130), + [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1016), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(393), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(394), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(201), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(231), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(181), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1345), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1346), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1349), + [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(400), + [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(247), + [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(602), + [39] = {.entry = {.count = 1, .reusable = false}}, SHIFT(404), + [41] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1512), + [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(296), + [45] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), + [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(719), + [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(159), + [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(166), + [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(406), + [55] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1511), + [57] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1510), + [59] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1509), + [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(278), + [63] = {.entry = {.count = 1, .reusable = false}}, SHIFT(284), + [65] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1508), + [67] = {.entry = {.count = 1, .reusable = true}}, SHIFT(417), + [69] = {.entry = {.count = 1, .reusable = false}}, SHIFT(419), + [71] = {.entry = {.count = 1, .reusable = false}}, SHIFT(890), + [73] = {.entry = {.count = 1, .reusable = false}}, SHIFT(180), + [75] = {.entry = {.count = 1, .reusable = true}}, SHIFT(797), + [77] = {.entry = {.count = 1, .reusable = false}}, SHIFT(797), + [79] = {.entry = {.count = 1, .reusable = false}}, SHIFT(131), + [81] = {.entry = {.count = 1, .reusable = true}}, SHIFT(952), + [83] = {.entry = {.count = 1, .reusable = false}}, SHIFT(424), + [85] = {.entry = {.count = 1, .reusable = false}}, SHIFT(254), + [87] = {.entry = {.count = 1, .reusable = false}}, SHIFT(604), + [89] = {.entry = {.count = 1, .reusable = false}}, SHIFT(423), + [91] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1495), + [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(298), + [95] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), + [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1516), + [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1498), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(370), + [103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), + [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(356), + [107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), + [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(326), + [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(376), + [113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1265), + [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), + [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), + [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(354), + [121] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(330), + [124] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1130), + [127] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1016), + [130] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(164), + [133] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(393), + [136] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(75), + [139] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(394), + [142] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(201), + [145] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(231), + [148] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(181), + [151] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1345), + [154] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1346), + [157] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1349), + [160] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(424), + [163] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(254), + [166] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(604), + [169] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(423), + [172] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1495), + [175] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(298), + [178] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(70), + [181] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(719), + [184] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(159), + [187] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(166), + [190] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(406), + [193] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1516), + [196] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1510), + [199] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1509), + [202] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(278), + [205] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(284), + [208] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1498), + [211] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(417), + [214] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(419), + [217] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(890), + [220] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(180), + [223] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(797), + [226] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(797), + [229] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(131), + [232] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), + [234] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(952), + [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_module, 1), + [239] = {.entry = {.count = 1, .reusable = true}}, SHIFT(381), + [241] = {.entry = {.count = 1, .reusable = true}}, SHIFT(359), + [243] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(400), + [246] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(247), + [249] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(602), + [252] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(404), + [255] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1512), + [258] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(296), + [261] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(71), + [264] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1511), + [267] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1508), + [270] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), + [272] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1324), + [274] = {.entry = {.count = 1, .reusable = false}}, SHIFT(674), + [276] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_primary_expression, 1, .production_id = 1), + [278] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188), + [280] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_pattern, 1, .production_id = 1), REDUCE(sym_primary_expression, 1, .production_id = 1), + [283] = {.entry = {.count = 1, .reusable = false}}, SHIFT(460), + [285] = {.entry = {.count = 1, .reusable = false}}, SHIFT(675), + [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(385), + [289] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_pattern, 1, .production_id = 1), + [291] = {.entry = {.count = 1, .reusable = false}}, SHIFT(726), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), + [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(169), + [297] = {.entry = {.count = 1, .reusable = false}}, SHIFT(406), + [299] = {.entry = {.count = 1, .reusable = false}}, SHIFT(470), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(726), + [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primary_expression, 1, .production_id = 1), + [305] = {.entry = {.count = 1, .reusable = false}}, SHIFT(886), + [307] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 1, .production_id = 1), + [309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(642), + [311] = {.entry = {.count = 1, .reusable = false}}, SHIFT(642), + [313] = {.entry = {.count = 1, .reusable = false}}, SHIFT(148), + [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(944), + [317] = {.entry = {.count = 1, .reusable = false}}, SHIFT(334), + [319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(550), + [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [323] = {.entry = {.count = 1, .reusable = true}}, SHIFT(432), + [325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(327), + [329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [331] = {.entry = {.count = 1, .reusable = false}}, SHIFT(754), + [333] = {.entry = {.count = 1, .reusable = false}}, SHIFT(755), + [335] = {.entry = {.count = 1, .reusable = false}}, SHIFT(453), + [337] = {.entry = {.count = 1, .reusable = false}}, SHIFT(150), + [339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(340), + [341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [343] = {.entry = {.count = 1, .reusable = true}}, SHIFT(530), + [345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(521), + [349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [351] = {.entry = {.count = 1, .reusable = true}}, SHIFT(548), + [353] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(325), + [357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [359] = {.entry = {.count = 1, .reusable = true}}, SHIFT(535), + [361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(508), + [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(377), + [369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(524), + [373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(316), + [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(532), + [381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(547), + [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(401), + [389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(502), + [393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(526), + [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(527), + [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(531), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(268), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(538), + [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(594), + [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(965), + [421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(464), + [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(353), + [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(542), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(331), + [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(592), + [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(492), + [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(332), + [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(544), + [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(582), + [457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(493), + [461] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(563), + [465] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(580), + [469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [471] = {.entry = {.count = 1, .reusable = true}}, SHIFT(991), + [473] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [475] = {.entry = {.count = 1, .reusable = true}}, SHIFT(478), + [477] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [479] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), + [481] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(490), + [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(589), + [489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(388), + [493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(572), + [497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [499] = {.entry = {.count = 1, .reusable = true}}, SHIFT(485), + [501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(501), + [505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(430), + [509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(497), + [513] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [515] = {.entry = {.count = 1, .reusable = true}}, SHIFT(553), + [517] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [519] = {.entry = {.count = 1, .reusable = true}}, SHIFT(486), + [521] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [523] = {.entry = {.count = 1, .reusable = true}}, SHIFT(571), + [525] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(578), + [529] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [531] = {.entry = {.count = 1, .reusable = true}}, SHIFT(472), + [533] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [535] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), + [537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(384), + [541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [543] = {.entry = {.count = 1, .reusable = true}}, SHIFT(552), + [545] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(487), + [549] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [551] = {.entry = {.count = 1, .reusable = true}}, SHIFT(558), + [553] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [555] = {.entry = {.count = 1, .reusable = true}}, SHIFT(421), + [557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [559] = {.entry = {.count = 1, .reusable = true}}, SHIFT(193), + [561] = {.entry = {.count = 1, .reusable = false}}, SHIFT(719), + [563] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), + [565] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_primary_expression, 1, .production_id = 1), REDUCE(sym_list_splat_pattern, 2, .production_id = 8), + [568] = {.entry = {.count = 1, .reusable = true}}, SHIFT(456), + [570] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_splat_pattern, 2, .production_id = 8), + [572] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_splat_pattern, 2, .production_id = 8), + [574] = {.entry = {.count = 1, .reusable = true}}, SHIFT(375), + [576] = {.entry = {.count = 1, .reusable = true}}, SHIFT(378), + [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(371), + [580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(379), + [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(367), + [584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), + [586] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1304), + [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(311), + [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), + [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1217), + [594] = {.entry = {.count = 1, .reusable = true}}, SHIFT(382), + [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), + [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(374), + [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(355), + [602] = {.entry = {.count = 1, .reusable = false}}, SHIFT(667), + [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), + [606] = {.entry = {.count = 1, .reusable = false}}, SHIFT(668), + [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(439), + [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(709), + [612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(187), + [614] = {.entry = {.count = 1, .reusable = false}}, SHIFT(391), + [616] = {.entry = {.count = 1, .reusable = false}}, SHIFT(885), + [618] = {.entry = {.count = 1, .reusable = false}}, SHIFT(149), + [620] = {.entry = {.count = 1, .reusable = false}}, SHIFT(450), + [622] = {.entry = {.count = 1, .reusable = false}}, SHIFT(798), + [624] = {.entry = {.count = 1, .reusable = true}}, SHIFT(212), + [626] = {.entry = {.count = 1, .reusable = false}}, SHIFT(801), + [628] = {.entry = {.count = 1, .reusable = true}}, SHIFT(443), + [630] = {.entry = {.count = 1, .reusable = true}}, SHIFT(683), + [632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(217), + [634] = {.entry = {.count = 1, .reusable = true}}, SHIFT(170), + [636] = {.entry = {.count = 1, .reusable = false}}, SHIFT(445), + [638] = {.entry = {.count = 1, .reusable = false}}, SHIFT(888), + [640] = {.entry = {.count = 1, .reusable = true}}, SHIFT(811), + [642] = {.entry = {.count = 1, .reusable = false}}, SHIFT(811), + [644] = {.entry = {.count = 1, .reusable = false}}, SHIFT(153), + [646] = {.entry = {.count = 1, .reusable = true}}, SHIFT(934), + [648] = {.entry = {.count = 1, .reusable = false}}, SHIFT(447), + [650] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_yield, 1), + [652] = {.entry = {.count = 1, .reusable = false}}, SHIFT(749), + [654] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), + [656] = {.entry = {.count = 1, .reusable = true}}, SHIFT(393), + [658] = {.entry = {.count = 1, .reusable = false}}, SHIFT(764), + [660] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), + [662] = {.entry = {.count = 1, .reusable = true}}, SHIFT(475), + [664] = {.entry = {.count = 1, .reusable = false}}, SHIFT(158), + [666] = {.entry = {.count = 1, .reusable = false}}, SHIFT(152), + [668] = {.entry = {.count = 1, .reusable = true}}, SHIFT(765), + [670] = {.entry = {.count = 1, .reusable = true}}, SHIFT(779), + [672] = {.entry = {.count = 1, .reusable = true}}, SHIFT(768), + [674] = {.entry = {.count = 1, .reusable = true}}, SHIFT(789), + [676] = {.entry = {.count = 1, .reusable = true}}, SHIFT(441), + [678] = {.entry = {.count = 1, .reusable = false}}, SHIFT(770), + [680] = {.entry = {.count = 1, .reusable = true}}, SHIFT(162), + [682] = {.entry = {.count = 1, .reusable = false}}, SHIFT(685), + [684] = {.entry = {.count = 1, .reusable = false}}, SHIFT(748), + [686] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_list, 2, .production_id = 7), + [688] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_pattern_list, 2, .production_id = 7), + [690] = {.entry = {.count = 1, .reusable = true}}, SHIFT(160), + [692] = {.entry = {.count = 1, .reusable = true}}, SHIFT(200), + [694] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1504), + [696] = {.entry = {.count = 1, .reusable = true}}, SHIFT(803), + [698] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_list, 2, .production_id = 7), + [700] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_list, 3, .production_id = 16), + [702] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1462), + [704] = {.entry = {.count = 1, .reusable = true}}, SHIFT(619), + [706] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1469), + [708] = {.entry = {.count = 1, .reusable = true}}, SHIFT(846), + [710] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_list, 3, .production_id = 16), + [712] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_pattern_list, 3, .production_id = 16), + [714] = {.entry = {.count = 1, .reusable = true}}, SHIFT(671), + [716] = {.entry = {.count = 1, .reusable = true}}, SHIFT(460), + [718] = {.entry = {.count = 1, .reusable = true}}, SHIFT(211), + [720] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__collection_elements, 3, .production_id = 50), + [722] = {.entry = {.count = 1, .reusable = false}}, SHIFT(812), + [724] = {.entry = {.count = 1, .reusable = true}}, SHIFT(631), + [726] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1432), + [728] = {.entry = {.count = 1, .reusable = false}}, SHIFT(837), + [730] = {.entry = {.count = 1, .reusable = false}}, SHIFT(154), + [732] = {.entry = {.count = 1, .reusable = false}}, SHIFT(759), + [734] = {.entry = {.count = 1, .reusable = false}}, SHIFT(760), + [736] = {.entry = {.count = 1, .reusable = false}}, SHIFT(151), + [738] = {.entry = {.count = 1, .reusable = true}}, SHIFT(788), + [740] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1447), + [742] = {.entry = {.count = 1, .reusable = false}}, SHIFT(425), + [744] = {.entry = {.count = 1, .reusable = false}}, SHIFT(466), + [746] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_raise_statement, 1), + [748] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__collection_elements, 2, .production_id = 24), + [750] = {.entry = {.count = 1, .reusable = true}}, SHIFT(833), + [752] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1414), + [754] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_clause, 7, .production_id = 140), + [756] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_in_clause, 7, .production_id = 140), + [758] = {.entry = {.count = 1, .reusable = false}}, SHIFT(887), + [760] = {.entry = {.count = 1, .reusable = true}}, SHIFT(828), + [762] = {.entry = {.count = 1, .reusable = true}}, SHIFT(725), + [764] = {.entry = {.count = 1, .reusable = true}}, SHIFT(778), + [766] = {.entry = {.count = 1, .reusable = true}}, SHIFT(672), + [768] = {.entry = {.count = 1, .reusable = true}}, SHIFT(787), + [770] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_clause, 6, .production_id = 122), + [772] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_in_clause, 6, .production_id = 122), + [774] = {.entry = {.count = 1, .reusable = true}}, SHIFT(786), + [776] = {.entry = {.count = 1, .reusable = true}}, SHIFT(783), + [778] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression_list, 3, .production_id = 16), + [780] = {.entry = {.count = 1, .reusable = false}}, SHIFT(442), + [782] = {.entry = {.count = 1, .reusable = true}}, SHIFT(469), + [784] = {.entry = {.count = 1, .reusable = true}}, SHIFT(825), + [786] = {.entry = {.count = 1, .reusable = true}}, SHIFT(843), + [788] = {.entry = {.count = 1, .reusable = true}}, SHIFT(841), + [790] = {.entry = {.count = 1, .reusable = true}}, SHIFT(838), + [792] = {.entry = {.count = 1, .reusable = true}}, SHIFT(727), + [794] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 1), + [796] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_clause, 6, .production_id = 121), + [798] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_in_clause, 6, .production_id = 121), + [800] = {.entry = {.count = 1, .reusable = true}}, SHIFT(629), + [802] = {.entry = {.count = 1, .reusable = true}}, SHIFT(615), + [804] = {.entry = {.count = 1, .reusable = true}}, SHIFT(617), + [806] = {.entry = {.count = 1, .reusable = true}}, SHIFT(638), + [808] = {.entry = {.count = 1, .reusable = true}}, SHIFT(639), + [810] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression_list, 2, .production_id = 7), + [812] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_clause, 5, .production_id = 100), + [814] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_in_clause, 5, .production_id = 100), + [816] = {.entry = {.count = 1, .reusable = true}}, SHIFT(805), + [818] = {.entry = {.count = 1, .reusable = true}}, SHIFT(772), + [820] = {.entry = {.count = 1, .reusable = true}}, SHIFT(781), + [822] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscript, 6, .production_id = 96), + [824] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_subscript, 6, .production_id = 96), + [826] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscript, 4, .production_id = 70), + [828] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_subscript, 4, .production_id = 70), + [830] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscript, 5, .production_id = 96), + [832] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_subscript, 5, .production_id = 96), + [834] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_subscript, 5, .production_id = 70), + [836] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_subscript, 5, .production_id = 70), + [838] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 3, .production_id = 40), + [840] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attribute, 3, .production_id = 40), + [842] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_try_statement, 4, .production_id = 56), + [844] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_try_statement, 4, .production_id = 56), + [846] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1506), + [848] = {.entry = {.count = 1, .reusable = false}}, SHIFT(383), + [850] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1435), + [852] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1471), + [854] = {.entry = {.count = 1, .reusable = true}}, SHIFT(416), + [856] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1468), + [858] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_try_statement, 5, .production_id = 81), + [860] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_try_statement, 5, .production_id = 81), + [862] = {.entry = {.count = 1, .reusable = false}}, SHIFT(335), + [864] = {.entry = {.count = 1, .reusable = true}}, SHIFT(402), + [866] = {.entry = {.count = 1, .reusable = true}}, SHIFT(614), + [868] = {.entry = {.count = 1, .reusable = true}}, SHIFT(823), + [870] = {.entry = {.count = 1, .reusable = true}}, SHIFT(826), + [872] = {.entry = {.count = 1, .reusable = true}}, SHIFT(605), + [874] = {.entry = {.count = 1, .reusable = true}}, SHIFT(283), + [876] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1514), + [878] = {.entry = {.count = 1, .reusable = true}}, SHIFT(807), + [880] = {.entry = {.count = 1, .reusable = true}}, SHIFT(616), + [882] = {.entry = {.count = 1, .reusable = true}}, SHIFT(824), + [884] = {.entry = {.count = 1, .reusable = true}}, SHIFT(800), + [886] = {.entry = {.count = 1, .reusable = true}}, SHIFT(641), + [888] = {.entry = {.count = 1, .reusable = true}}, SHIFT(808), + [890] = {.entry = {.count = 1, .reusable = true}}, SHIFT(603), + [892] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), + [894] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1517), + [896] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), + [898] = {.entry = {.count = 1, .reusable = true}}, SHIFT(226), + [900] = {.entry = {.count = 1, .reusable = true}}, SHIFT(218), + [902] = {.entry = {.count = 1, .reusable = true}}, SHIFT(845), + [904] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 104), + [906] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 104), + [908] = {.entry = {.count = 1, .reusable = false}}, SHIFT(412), + [910] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 2, .production_id = 69), + [912] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), + [914] = {.entry = {.count = 1, .reusable = true}}, SHIFT(844), + [916] = {.entry = {.count = 1, .reusable = true}}, SHIFT(834), + [918] = {.entry = {.count = 1, .reusable = true}}, SHIFT(344), + [920] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 76), + [922] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 76), + [924] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 1), + [926] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), + [928] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 77), + [930] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 77), + [932] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_try_statement_repeat1, 2), + [934] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_try_statement_repeat1, 2), + [936] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_try_statement_repeat1, 2), SHIFT_REPEAT(335), + [939] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_try_statement_repeat2, 2), + [941] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_try_statement_repeat2, 2), + [943] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_try_statement_repeat2, 2), SHIFT_REPEAT(416), + [946] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 4, .production_id = 54), + [948] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 4, .production_id = 54), + [950] = {.entry = {.count = 1, .reusable = false}}, SHIFT(484), + [952] = {.entry = {.count = 1, .reusable = true}}, SHIFT(223), + [954] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_try_statement_repeat2, 2), SHIFT_REPEAT(402), + [957] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_try_statement_repeat1, 2), SHIFT_REPEAT(383), + [960] = {.entry = {.count = 1, .reusable = true}}, SHIFT(337), + [962] = {.entry = {.count = 1, .reusable = true}}, SHIFT(336), + [964] = {.entry = {.count = 1, .reusable = true}}, SHIFT(950), + [966] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 1), + [968] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 1), + [970] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__simple_statements, 4), + [972] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__simple_statements, 4), + [974] = {.entry = {.count = 1, .reusable = true}}, SHIFT(173), + [976] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1336), + [978] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 102), + [980] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 102), + [982] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 102), SHIFT_REPEAT(484), + [985] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__simple_statements, 3), + [987] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__simple_statements, 3), + [989] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 2), + [991] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 2), + [993] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 4, .production_id = 95), + [995] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1423), + [997] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 3, .production_id = 69), + [999] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 3, .production_id = 68), + [1001] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print_statement, 3), + [1003] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print_statement, 3, .production_id = 10), + [1005] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1487), + [1007] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print_statement, 4, .production_id = 29), + [1009] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print_statement, 4, .production_id = 28), + [1011] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 2), + [1013] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 2, .production_id = 102), SHIFT_REPEAT(412), + [1016] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__simple_statements, 2), + [1018] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__simple_statements, 2), + [1020] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_group_clause, 6, .production_id = 155), + [1022] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_group_clause, 6, .production_id = 155), + [1024] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_clause, 4, .production_id = 129), + [1026] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_clause, 4, .production_id = 129), + [1028] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_group_clause, 5, .production_id = 146), + [1030] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_group_clause, 5, .production_id = 146), + [1032] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_clause, 5, .production_id = 146), + [1034] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_clause, 5, .production_id = 146), + [1036] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_clause, 6, .production_id = 155), + [1038] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_clause, 6, .production_id = 155), + [1040] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_clause, 7, .production_id = 160), + [1042] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_clause, 7, .production_id = 160), + [1044] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_group_clause, 7, .production_id = 160), + [1046] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_group_clause, 7, .production_id = 160), + [1048] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primary_expression, 1), + [1050] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_pattern, 1), REDUCE(sym_primary_expression, 1), + [1053] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_primary_expression, 1), + [1055] = {.entry = {.count = 1, .reusable = true}}, SHIFT(422), + [1057] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_pattern, 1), + [1059] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern, 1), + [1061] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_group_clause, 4, .production_id = 129), + [1063] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_group_clause, 4, .production_id = 129), + [1065] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_clause, 4, .production_id = 81), + [1067] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_clause, 4, .production_id = 81), + [1069] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [1071] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_primary_expression, 1), REDUCE(sym_list_splat_pattern, 2, .production_id = 9), + [1074] = {.entry = {.count = 1, .reusable = true}}, SHIFT(476), + [1076] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_splat_pattern, 2, .production_id = 9), + [1078] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_splat_pattern, 2, .production_id = 9), + [1080] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_except_clause, 3, .production_id = 56), + [1082] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_except_clause, 3, .production_id = 56), + [1084] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_cases, 1), + [1086] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_cases, 1), + [1088] = {.entry = {.count = 1, .reusable = false}}, SHIFT(852), + [1090] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_cases_repeat1, 2), + [1092] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_cases_repeat1, 2), + [1094] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_cases_repeat1, 2), SHIFT_REPEAT(849), + [1097] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_cases_repeat1, 2), SHIFT_REPEAT(852), + [1100] = {.entry = {.count = 1, .reusable = false}}, SHIFT(849), + [1102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [1104] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 142), + [1106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 142), + [1108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_elif_clause, 4, .production_id = 54), + [1110] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_elif_clause, 4, .production_id = 54), + [1112] = {.entry = {.count = 1, .reusable = false}}, SHIFT(339), + [1114] = {.entry = {.count = 1, .reusable = false}}, SHIFT(338), + [1116] = {.entry = {.count = 1, .reusable = false}}, SHIFT(132), + [1118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 4, .production_id = 55), + [1120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 4, .production_id = 55), + [1122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_elif_clause, 5, .production_id = 77), + [1124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_elif_clause, 5, .production_id = 77), + [1126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 5, .production_id = 80), + [1128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 5, .production_id = 80), + [1130] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_try_statement, 5, .production_id = 56), + [1132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_try_statement, 5, .production_id = 56), + [1134] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 1, .production_id = 74), + [1136] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 1, .production_id = 74), + [1138] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 128), + [1140] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 128), + [1142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 124), + [1144] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 124), + [1146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple, 2), + [1148] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_tuple_pattern, 2), REDUCE(sym_tuple, 2), + [1151] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple, 2), + [1153] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_pattern, 2), + [1155] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_pattern, 2), + [1157] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_try_statement, 6, .production_id = 81), + [1159] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_try_statement, 6, .production_id = 81), + [1161] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 6, .production_id = 107), + [1163] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 6, .production_id = 107), + [1165] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 2), + [1167] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_list_pattern, 2), REDUCE(sym_list, 2), + [1170] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 2), + [1172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_pattern, 2), + [1174] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_pattern, 2), + [1176] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_else_clause, 3, .production_id = 56), + [1178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_else_clause, 3, .production_id = 56), + [1180] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_block, 4, .production_id = 133), + [1182] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_block, 4, .production_id = 133), + [1184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_block, 6, .production_id = 156), + [1186] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_block, 6, .production_id = 156), + [1188] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_else_clause, 4, .production_id = 81), + [1190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_else_clause, 4, .production_id = 81), + [1192] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_block, 5, .production_id = 148), + [1194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_block, 5, .production_id = 148), + [1196] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_case_block, 5, .production_id = 149), + [1198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_case_block, 5, .production_id = 149), + [1200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_definition, 6, .production_id = 116), + [1202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_definition, 6, .production_id = 116), + [1204] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_definition, 7, .production_id = 138), + [1206] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_definition, 7, .production_id = 138), + [1208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_decorated_definition, 2, .production_id = 19), + [1210] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_decorated_definition, 2, .production_id = 19), + [1212] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 5, .production_id = 79), + [1214] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 5, .production_id = 79), + [1216] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 8, .production_id = 143), + [1218] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 8, .production_id = 143), + [1220] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 5, .production_id = 86), + [1222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 5, .production_id = 86), + [1224] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 141), + [1226] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 141), + [1228] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 10, .production_id = 159), + [1230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 10, .production_id = 159), + [1232] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 9, .production_id = 158), + [1234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 9, .production_id = 158), + [1236] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 9, .production_id = 154), + [1238] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 9, .production_id = 154), + [1240] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 9, .production_id = 153), + [1242] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 9, .production_id = 153), + [1244] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 9, .production_id = 152), + [1246] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 9, .production_id = 152), + [1248] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 8, .production_id = 145), + [1250] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 8, .production_id = 145), + [1252] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_statement, 5, .production_id = 82), + [1254] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_with_statement, 5, .production_id = 82), + [1256] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_with_statement, 6, .production_id = 105), + [1258] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_statement, 6, .production_id = 105), + [1260] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_try_statement, 6, .production_id = 56), + [1262] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_try_statement, 6, .production_id = 56), + [1264] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 6, .production_id = 108), + [1266] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 6, .production_id = 108), + [1268] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_finally_clause, 3, .production_id = 56), + [1270] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_finally_clause, 3, .production_id = 56), + [1272] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 103), + [1274] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 103), + [1276] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_statement, 5, .production_id = 78), + [1278] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_with_statement, 5, .production_id = 78), + [1280] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_definition, 5, .production_id = 89), + [1282] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_definition, 5, .production_id = 89), + [1284] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 7, .production_id = 137), + [1286] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 7, .production_id = 137), + [1288] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 75), + [1290] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 75), + [1292] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 8, .production_id = 151), + [1294] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 8, .production_id = 151), + [1296] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_definition, 5, .production_id = 90), + [1298] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_definition, 5, .production_id = 90), + [1300] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 7, .production_id = 136), + [1302] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 7, .production_id = 136), + [1304] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 8, .production_id = 144), + [1306] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 8, .production_id = 144), + [1308] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 8, .production_id = 150), + [1310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 8, .production_id = 150), + [1312] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_statement, 4, .production_id = 57), + [1314] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_with_statement, 4, .production_id = 57), + [1316] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_statement, 4, .production_id = 59), + [1318] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_match_statement, 4, .production_id = 59), + [1320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_statement, 4, .production_id = 60), + [1322] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_match_statement, 4, .production_id = 60), + [1324] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_definition, 4, .production_id = 64), + [1326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_definition, 4, .production_id = 64), + [1328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_definition, 5, .production_id = 88), + [1330] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_definition, 5, .production_id = 88), + [1332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 6, .production_id = 106), + [1334] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 6, .production_id = 106), + [1336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_try_statement, 7, .production_id = 81), + [1338] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_try_statement, 7, .production_id = 81), + [1340] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_finally_clause, 4, .production_id = 81), + [1342] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_finally_clause, 4, .production_id = 81), + [1344] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 7, .production_id = 127), + [1346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 7, .production_id = 127), + [1348] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 101), + [1350] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 101), + [1352] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 7, .production_id = 126), + [1354] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 7, .production_id = 126), + [1356] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 7, .production_id = 125), + [1358] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 7, .production_id = 125), + [1360] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 7, .production_id = 123), + [1362] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 7, .production_id = 123), + [1364] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_definition, 6, .production_id = 117), + [1366] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_definition, 6, .production_id = 117), + [1368] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_definition, 6, .production_id = 115), + [1370] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_definition, 6, .production_id = 115), + [1372] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 6, .production_id = 114), + [1374] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 6, .production_id = 114), + [1376] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 6, .production_id = 113), + [1378] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 6, .production_id = 113), + [1380] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__patterns, 3, .production_id = 50), + [1382] = {.entry = {.count = 1, .reusable = true}}, SHIFT(685), + [1384] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1207), + [1386] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__patterns, 2, .production_id = 24), + [1388] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_concatenated_string, 2), + [1390] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_concatenated_string, 2), + [1392] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), + [1394] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), + [1396] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), SHIFT_REPEAT(944), + [1399] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3, .production_id = 20), + [1401] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3, .production_id = 20), + [1403] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 2, .production_id = 2), + [1405] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 2, .production_id = 2), + [1407] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_comprehension, 4, .production_id = 51), + [1409] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_comprehension, 4, .production_id = 51), + [1411] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_set_comprehension, 4, .production_id = 51), + [1413] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_set_comprehension, 4, .production_id = 51), + [1415] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 4, .production_id = 61), + [1417] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 4, .production_id = 61), + [1419] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary, 5, .production_id = 61), + [1421] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary, 5, .production_id = 61), + [1423] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 5, .production_id = 61), + [1425] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 5, .production_id = 61), + [1427] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 5, .production_id = 92), + [1429] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 5, .production_id = 92), + [1431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary, 2), + [1433] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary, 2), + [1435] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 3, .production_id = 67), + [1437] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 3, .production_id = 67), + [1439] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 3, .production_id = 31), + [1441] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 3, .production_id = 31), + [1443] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 3), + [1445] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 3), + [1447] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_set, 3, .production_id = 25), + [1449] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_set, 3, .production_id = 25), + [1451] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary, 3, .production_id = 31), + [1453] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary, 3, .production_id = 31), + [1455] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary, 3), + [1457] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary, 3), + [1459] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3, .production_id = 25), + [1461] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 3, .production_id = 25), + [1463] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple, 3, .production_id = 25), + [1465] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple, 3, .production_id = 25), + [1467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3, .production_id = 26), + [1469] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3, .production_id = 26), + [1471] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 4, .production_id = 31), + [1473] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 4, .production_id = 31), + [1475] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1449), + [1477] = {.entry = {.count = 1, .reusable = true}}, SHIFT(177), + [1479] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), + [1481] = {.entry = {.count = 1, .reusable = false}}, SHIFT(716), + [1483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(707), + [1485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(696), + [1487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(695), + [1489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(692), + [1491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), + [1493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(690), + [1495] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), + [1497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(716), + [1499] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1436), + [1501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(687), + [1503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(686), + [1505] = {.entry = {.count = 1, .reusable = false}}, SHIFT(696), + [1507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(673), + [1509] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 2), + [1511] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 2), + [1513] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call, 2, .production_id = 17), + [1515] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call, 2, .production_id = 17), + [1517] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary, 4, .production_id = 61), + [1519] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary, 4, .production_id = 61), + [1521] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_comprehension, 4, .production_id = 51), + [1523] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary_comprehension, 4, .production_id = 51), + [1525] = {.entry = {.count = 1, .reusable = false}}, SHIFT(762), + [1527] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_keyword_separator, 1), + [1529] = {.entry = {.count = 1, .reusable = false}}, SHIFT(767), + [1531] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_generator_expression, 4, .production_id = 51), + [1533] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_generator_expression, 4, .production_id = 51), + [1535] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 4, .production_id = 67), + [1537] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 4, .production_id = 67), + [1539] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary, 4, .production_id = 31), + [1541] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_dictionary, 4, .production_id = 31), + [1543] = {.entry = {.count = 1, .reusable = false}}, SHIFT(693), + [1545] = {.entry = {.count = 1, .reusable = true}}, SHIFT(698), + [1547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(702), + [1549] = {.entry = {.count = 1, .reusable = true}}, SHIFT(703), + [1551] = {.entry = {.count = 1, .reusable = true}}, SHIFT(704), + [1553] = {.entry = {.count = 1, .reusable = true}}, SHIFT(705), + [1555] = {.entry = {.count = 1, .reusable = true}}, SHIFT(693), + [1557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1446), + [1559] = {.entry = {.count = 1, .reusable = true}}, SHIFT(710), + [1561] = {.entry = {.count = 1, .reusable = true}}, SHIFT(711), + [1563] = {.entry = {.count = 1, .reusable = false}}, SHIFT(702), + [1565] = {.entry = {.count = 1, .reusable = true}}, SHIFT(676), + [1567] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 4, .production_id = 92), + [1569] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_argument_list, 4, .production_id = 92), + [1571] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_operator, 3, .production_id = 39), + [1573] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_operator, 3, .production_id = 39), + [1575] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_operator, 2, .production_id = 13), + [1577] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_operator, 2, .production_id = 13), + [1579] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 41), + [1581] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 41), + [1583] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 3, .production_id = 71), + [1585] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_comparison_operator_repeat1, 3, .production_id = 71), + [1587] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 3, .production_id = 72), + [1589] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_comparison_operator_repeat1, 3, .production_id = 72), + [1591] = {.entry = {.count = 1, .reusable = true}}, SHIFT(452), + [1593] = {.entry = {.count = 1, .reusable = false}}, SHIFT(794), + [1595] = {.entry = {.count = 1, .reusable = false}}, SHIFT(694), + [1597] = {.entry = {.count = 1, .reusable = false}}, SHIFT(832), + [1599] = {.entry = {.count = 1, .reusable = false}}, SHIFT(691), + [1601] = {.entry = {.count = 1, .reusable = false}}, SHIFT(618), + [1603] = {.entry = {.count = 1, .reusable = false}}, SHIFT(679), + [1605] = {.entry = {.count = 1, .reusable = false}}, SHIFT(712), + [1607] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), SHIFT_REPEAT(934), + [1610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1500), + [1612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(179), + [1614] = {.entry = {.count = 1, .reusable = false}}, SHIFT(730), + [1616] = {.entry = {.count = 1, .reusable = true}}, SHIFT(723), + [1618] = {.entry = {.count = 1, .reusable = true}}, SHIFT(722), + [1620] = {.entry = {.count = 1, .reusable = true}}, SHIFT(721), + [1622] = {.entry = {.count = 1, .reusable = true}}, SHIFT(717), + [1624] = {.entry = {.count = 1, .reusable = true}}, SHIFT(301), + [1626] = {.entry = {.count = 1, .reusable = true}}, SHIFT(714), + [1628] = {.entry = {.count = 1, .reusable = true}}, SHIFT(730), + [1630] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1494), + [1632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(706), + [1634] = {.entry = {.count = 1, .reusable = true}}, SHIFT(700), + [1636] = {.entry = {.count = 1, .reusable = false}}, SHIFT(722), + [1638] = {.entry = {.count = 1, .reusable = true}}, SHIFT(669), + [1640] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_concatenated_string_repeat1, 2), SHIFT_REPEAT(952), + [1643] = {.entry = {.count = 1, .reusable = false}}, SHIFT(879), + [1645] = {.entry = {.count = 1, .reusable = false}}, SHIFT(880), + [1647] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1448), + [1649] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), + [1651] = {.entry = {.count = 1, .reusable = false}}, SHIFT(729), + [1653] = {.entry = {.count = 1, .reusable = true}}, SHIFT(728), + [1655] = {.entry = {.count = 1, .reusable = true}}, SHIFT(680), + [1657] = {.entry = {.count = 1, .reusable = true}}, SHIFT(697), + [1659] = {.entry = {.count = 1, .reusable = true}}, SHIFT(681), + [1661] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), + [1663] = {.entry = {.count = 1, .reusable = true}}, SHIFT(699), + [1665] = {.entry = {.count = 1, .reusable = true}}, SHIFT(729), + [1667] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1430), + [1669] = {.entry = {.count = 1, .reusable = true}}, SHIFT(708), + [1671] = {.entry = {.count = 1, .reusable = true}}, SHIFT(682), + [1673] = {.entry = {.count = 1, .reusable = false}}, SHIFT(680), + [1675] = {.entry = {.count = 1, .reusable = true}}, SHIFT(670), + [1677] = {.entry = {.count = 1, .reusable = false}}, SHIFT(451), + [1679] = {.entry = {.count = 1, .reusable = true}}, SHIFT(392), + [1681] = {.entry = {.count = 1, .reusable = false}}, SHIFT(925), + [1683] = {.entry = {.count = 1, .reusable = true}}, SHIFT(853), + [1685] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1259), + [1687] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1390), + [1689] = {.entry = {.count = 1, .reusable = false}}, SHIFT(971), + [1691] = {.entry = {.count = 1, .reusable = true}}, SHIFT(856), + [1693] = {.entry = {.count = 1, .reusable = true}}, SHIFT(892), + [1695] = {.entry = {.count = 1, .reusable = false}}, SHIFT(943), + [1697] = {.entry = {.count = 1, .reusable = true}}, SHIFT(943), + [1699] = {.entry = {.count = 1, .reusable = false}}, SHIFT(975), + [1701] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_open_sequence_match_pattern, 2), + [1703] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_open_sequence_match_pattern, 2), + [1705] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_open_sequence_match_pattern, 3), + [1707] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_open_sequence_match_pattern, 3), + [1709] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1006), + [1711] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1011), + [1713] = {.entry = {.count = 1, .reusable = true}}, SHIFT(987), + [1715] = {.entry = {.count = 1, .reusable = false}}, SHIFT(999), + [1717] = {.entry = {.count = 1, .reusable = true}}, SHIFT(998), + [1719] = {.entry = {.count = 1, .reusable = true}}, SHIFT(981), + [1721] = {.entry = {.count = 1, .reusable = true}}, SHIFT(970), + [1723] = {.entry = {.count = 1, .reusable = false}}, SHIFT(984), + [1725] = {.entry = {.count = 1, .reusable = false}}, SHIFT(957), + [1727] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), + [1729] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), + [1731] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(702), + [1734] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(1446), + [1737] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(702), + [1740] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(676), + [1743] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(696), + [1746] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(1436), + [1749] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(696), + [1752] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(673), + [1755] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comparison_operator, 2, .production_id = 18), + [1757] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_comparison_operator, 2, .production_id = 18), + [1759] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__patterns_repeat1, 2, .production_id = 36), + [1761] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__patterns_repeat1, 2, .production_id = 36), SHIFT_REPEAT(607), + [1764] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_pattern, 3, .production_id = 25), + [1766] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_pattern, 3, .production_id = 25), + [1768] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__patterns_repeat1, 2, .production_id = 31), + [1770] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(722), + [1773] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(1494), + [1776] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(722), + [1779] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(669), + [1782] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_splat_pattern, 2, .production_id = 34), + [1784] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_splat_pattern, 2, .production_id = 33), + [1786] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(680), + [1789] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(1430), + [1792] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(680), + [1795] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_comparison_operator_repeat1, 2, .production_id = 42), SHIFT_REPEAT(670), + [1798] = {.entry = {.count = 1, .reusable = true}}, SHIFT(172), + [1800] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_list, 2, .production_id = 16), + [1802] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1339), + [1804] = {.entry = {.count = 1, .reusable = true}}, SHIFT(596), + [1806] = {.entry = {.count = 1, .reusable = false}}, SHIFT(636), + [1808] = {.entry = {.count = 1, .reusable = true}}, SHIFT(444), + [1810] = {.entry = {.count = 1, .reusable = true}}, SHIFT(715), + [1812] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1340), + [1814] = {.entry = {.count = 1, .reusable = true}}, SHIFT(463), + [1816] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), + [1818] = {.entry = {.count = 1, .reusable = true}}, SHIFT(458), + [1820] = {.entry = {.count = 1, .reusable = true}}, SHIFT(165), + [1822] = {.entry = {.count = 1, .reusable = true}}, SHIFT(348), + [1824] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), + [1826] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [1828] = {.entry = {.count = 1, .reusable = true}}, SHIFT(481), + [1830] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1365), + [1832] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1008), + [1834] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1357), + [1836] = {.entry = {.count = 1, .reusable = true}}, SHIFT(993), + [1838] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1177), + [1840] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1380), + [1842] = {.entry = {.count = 1, .reusable = true}}, SHIFT(986), + [1844] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameters, 2), + [1846] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameters, 3), + [1848] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await, 2), + [1850] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await, 2), + [1852] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_not_operator, 2, .production_id = 10), + [1854] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_not_operator, 2, .production_id = 10), + [1856] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_match_value_pattern_repeat1, 2), + [1858] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_match_value_pattern_repeat1, 2), SHIFT_REPEAT(1445), + [1861] = {.entry = {.count = 1, .reusable = true}}, SHIFT(182), + [1863] = {.entry = {.count = 1, .reusable = true}}, SHIFT(386), + [1865] = {.entry = {.count = 1, .reusable = true}}, SHIFT(473), + [1867] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1416), + [1869] = {.entry = {.count = 1, .reusable = true}}, SHIFT(601), + [1871] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__collection_elements, 1, .production_id = 7), + [1873] = {.entry = {.count = 1, .reusable = true}}, SHIFT(455), + [1875] = {.entry = {.count = 1, .reusable = true}}, SHIFT(457), + [1877] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_lambda, 4, .production_id = 66), + [1879] = {.entry = {.count = 1, .reusable = true}}, SHIFT(429), + [1881] = {.entry = {.count = 1, .reusable = true}}, SHIFT(446), + [1883] = {.entry = {.count = 1, .reusable = true}}, SHIFT(409), + [1885] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_conditional_expression, 5), + [1887] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_conditional_expression, 5), + [1889] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1445), + [1891] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_class_name, 2), + [1893] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_value_pattern, 2), + [1895] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_lambda, 3, .production_id = 32), + [1897] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_lambda, 3, .production_id = 32), + [1899] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_literal_pattern, 1), + [1901] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_expression, 3, .production_id = 35), + [1903] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_expression, 3, .production_id = 35), + [1905] = {.entry = {.count = 1, .reusable = true}}, SHIFT(842), + [1907] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_with_item, 1, .dynamic_precedence = -1, .production_id = 12), SHIFT(182), + [1910] = {.entry = {.count = 1, .reusable = false}}, SHIFT(608), + [1912] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean_operator, 3, .production_id = 39), + [1914] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean_operator, 3, .production_id = 39), + [1916] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_lambda, 4, .production_id = 66), + [1918] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_class_name, 1), + [1920] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_capture_pattern, 1), + [1922] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_named_expression, 3, .production_id = 27), + [1924] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_named_expression, 3, .production_id = 27), + [1926] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_yield, 2), + [1928] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), + [1930] = {.entry = {.count = 1, .reusable = true}}, SHIFT(628), + [1932] = {.entry = {.count = 1, .reusable = true}}, SHIFT(785), + [1934] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_expression_list_repeat1, 2, .production_id = 31), + [1936] = {.entry = {.count = 1, .reusable = false}}, SHIFT(178), + [1938] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1031), + [1940] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1031), + [1942] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), + [1944] = {.entry = {.count = 1, .reusable = true}}, SHIFT(744), + [1946] = {.entry = {.count = 1, .reusable = true}}, SHIFT(736), + [1948] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_string_repeat1, 2, .production_id = 21), SHIFT_REPEAT(178), + [1951] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_repeat1, 2, .production_id = 21), SHIFT_REPEAT(1031), + [1954] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_string_repeat1, 2, .production_id = 21), SHIFT_REPEAT(1031), + [1957] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_string_repeat1, 2, .production_id = 21), + [1959] = {.entry = {.count = 1, .reusable = true}}, SHIFT(758), + [1961] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_yield, 3), + [1963] = {.entry = {.count = 1, .reusable = true}}, SHIFT(799), + [1965] = {.entry = {.count = 1, .reusable = true}}, SHIFT(216), + [1967] = {.entry = {.count = 1, .reusable = true}}, SHIFT(609), + [1969] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_literal_pattern, 1, .production_id = 83), + [1971] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1381), + [1973] = {.entry = {.count = 1, .reusable = true}}, SHIFT(610), + [1975] = {.entry = {.count = 1, .reusable = true}}, SHIFT(820), + [1977] = {.entry = {.count = 1, .reusable = true}}, SHIFT(196), + [1979] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dictionary_splat, 2, .production_id = 14), + [1981] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_splat, 2), + [1983] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1291), + [1985] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1318), + [1987] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_literal_pattern, 2, .production_id = 109), + [1989] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1387), + [1991] = {.entry = {.count = 1, .reusable = true}}, SHIFT(769), + [1993] = {.entry = {.count = 1, .reusable = true}}, SHIFT(621), + [1995] = {.entry = {.count = 1, .reusable = true}}, SHIFT(203), + [1997] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_match_or_pattern_repeat1, 2), + [1999] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_match_or_pattern_repeat1, 2), SHIFT_REPEAT(866), + [2002] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__comprehension_clauses_repeat1, 2), + [2004] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__comprehension_clauses_repeat1, 2), SHIFT_REPEAT(390), + [2007] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__comprehension_clauses_repeat1, 2), SHIFT_REPEAT(1416), + [2010] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__comprehension_clauses_repeat1, 2), SHIFT_REPEAT(601), + [2013] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__comprehension_clauses, 1), + [2015] = {.entry = {.count = 1, .reusable = true}}, SHIFT(390), + [2017] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_or_pattern, 3), + [2019] = {.entry = {.count = 1, .reusable = true}}, SHIFT(866), + [2021] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression_within_for_in_clause, 1), + [2023] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__comprehension_clauses, 2), + [2025] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__f_expression, 1), + [2027] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_or_pattern, 4), + [2029] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_list, 2, .production_id = 16), + [2031] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), + [2033] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1468), + [2035] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_class_pattern, 8, .production_id = 135), + [2037] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_class_pattern, 7, .production_id = 135), + [2039] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_mapping_pattern, 7), + [2041] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_class_pattern, 6, .production_id = 135), + [2043] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__match_or_pattern, 1), + [2045] = {.entry = {.count = 1, .reusable = true}}, SHIFT(867), + [2047] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_mapping_pattern, 6), + [2049] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_sequence_pattern, 3), + [2051] = {.entry = {.count = 1, .reusable = true}}, SHIFT(411), + [2053] = {.entry = {.count = 1, .reusable = true}}, SHIFT(410), + [2055] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_group_pattern, 3, .production_id = 130), + [2057] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_clause, 5, .production_id = 122), + [2059] = {.entry = {.count = 1, .reusable = true}}, SHIFT(192), + [2061] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_clause, 5, .production_id = 121), + [2063] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), + [2065] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_class_pattern, 5, .production_id = 135), + [2067] = {.entry = {.count = 1, .reusable = true}}, SHIFT(477), + [2069] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [2071] = {.entry = {.count = 1, .reusable = true}}, SHIFT(415), + [2073] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_raise_statement, 2), + [2075] = {.entry = {.count = 1, .reusable = true}}, SHIFT(168), + [2077] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_mapping_pattern, 5), + [2079] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_sequence_pattern, 5), + [2081] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_mapping_pattern, 3), + [2083] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_class_pattern, 9, .production_id = 135), + [2085] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_literal_pattern, 3, .production_id = 131), + [2087] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1435), + [2089] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_mapping_pattern, 2), + [2091] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_clause, 2), + [2093] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_clause, 6, .production_id = 140), + [2095] = {.entry = {.count = 1, .reusable = true}}, SHIFT(185), + [2097] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1520), + [2099] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1516), + [2101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1498), + [2103] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_class_pattern, 3, .production_id = 135), + [2105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(865), + [2107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1488), + [2109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1511), + [2111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1508), + [2113] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_class_pattern, 4, .production_id = 135), + [2115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_expression_list_repeat1, 2, .production_id = 36), + [2117] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_expression_list_repeat1, 2, .production_id = 36), SHIFT_REPEAT(245), + [2120] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_sequence_pattern, 2), + [2122] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_mapping_pattern, 4), + [2124] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_literal_pattern, 4, .production_id = 147), + [2126] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_sequence_pattern, 4), + [2128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_for_in_clause_repeat1, 2), + [2130] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_for_in_clause_repeat1, 2), SHIFT_REPEAT(280), + [2133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_clause, 4, .production_id = 100), + [2135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), + [2137] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1061), + [2139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1144), + [2141] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1444), + [2143] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_lambda_within_for_in_clause, 3, .production_id = 32), + [2145] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_statement, 1), + [2147] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1139), + [2149] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1456), + [2151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1457), + [2153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), + [2155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), + [2157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(352), + [2159] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type, 1), + [2161] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__match_pattern, 1), + [2163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1440), + [2165] = {.entry = {.count = 1, .reusable = true}}, SHIFT(395), + [2167] = {.entry = {.count = 1, .reusable = true}}, SHIFT(396), + [2169] = {.entry = {.count = 1, .reusable = true}}, SHIFT(480), + [2171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_exec_statement, 4, .production_id = 15), + [2173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(426), + [2175] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_content, 1), + [2177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1055), + [2179] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1055), + [2181] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_content, 1), + [2183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_lambda_within_for_in_clause, 4, .production_id = 66), + [2185] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__right_hand_side, 1), + [2187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(252), + [2189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(624), + [2191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pair, 3, .production_id = 62), + [2193] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), + [2195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(219), + [2197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), + [2199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print_statement, 2, .production_id = 10), + [2201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assert_statement, 2), + [2203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 2), + [2205] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_delete_statement, 2, .production_id = 11), + [2207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(261), + [2209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(822), + [2211] = {.entry = {.count = 1, .reusable = true}}, SHIFT(246), + [2213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(815), + [2215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_item, 1, .dynamic_precedence = -1, .production_id = 12), + [2217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(608), + [2219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), + [2221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(774), + [2223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__collection_elements_repeat1, 2, .production_id = 31), + [2225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_content_repeat1, 2), + [2227] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_content_repeat1, 2), SHIFT_REPEAT(1055), + [2230] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_string_content_repeat1, 2), SHIFT_REPEAT(1055), + [2233] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_string_content_repeat1, 2), + [2235] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1088), + [2237] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1193), + [2239] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1400), + [2241] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_match_value_pattern_repeat1, 2), SHIFT_REPEAT(1477), + [2244] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dotted_name, 2), + [2246] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [2248] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_interpolation, 3, .production_id = 43), + [2250] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpolation, 3, .production_id = 43), + [2252] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_dotted_name, 1), + [2254] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_decorated_definition_repeat1, 2), + [2256] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_decorated_definition_repeat1, 2), SHIFT_REPEAT(417), + [2259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(399), + [2261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), + [2263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 3, .production_id = 95), + [2265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), + [2267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_assert_statement_repeat1, 2), + [2269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_print_statement_repeat1, 2, .production_id = 10), + [2271] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_interpolation, 4, .production_id = 43), + [2273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpolation, 4, .production_id = 43), + [2275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1477), + [2277] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_interpolation, 5, .production_id = 43), + [2279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpolation, 5, .production_id = 43), + [2281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [2283] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_repeat1, 1, .production_id = 3), + [2285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_string_repeat1, 1, .production_id = 3), + [2287] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_default_parameter, 3, .production_id = 35), + [2289] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_interpolation, 6, .production_id = 43), + [2291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpolation, 6, .production_id = 43), + [2293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [2295] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_repeat1, 1, .production_id = 4), + [2297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_string_repeat1, 1, .production_id = 4), + [2299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_open_sequence_match_pattern_repeat1, 2), + [2301] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_open_sequence_match_pattern_repeat1, 2), SHIFT_REPEAT(859), + [2304] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_chevron, 2), + [2306] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1184), + [2308] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1180), + [2310] = {.entry = {.count = 1, .reusable = true}}, SHIFT(471), + [2312] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [2314] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 2, .production_id = 68), + [2316] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [2318] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_typed_default_parameter, 5, .production_id = 118), + [2320] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [2322] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_subscript_repeat1, 2, .production_id = 94), + [2324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_as_pattern, 3, .production_id = 134), + [2326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 4, .production_id = 120), + [2328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 4, .production_id = 119), + [2330] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), + [2332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__import_list, 3, .production_id = 22), + [2334] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_expression_list_repeat1, 2, .production_id = 36), SHIFT_REPEAT(244), + [2337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1125), + [2339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1253), + [2341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1181), + [2343] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1260), + [2345] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_bound, 2, .production_id = 110), + [2347] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_specifier, 2), + [2349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(183), + [2351] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1117), + [2353] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 5, .production_id = 139), + [2355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(468), + [2357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [2359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_raise_statement, 3, .production_id = 30), + [2361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(176), + [2363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(104), + [2365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1037), + [2367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [2369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1118), + [2371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1450), + [2373] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__import_list, 1, .production_id = 6), + [2375] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_star_pattern, 2, .production_id = 11), + [2377] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__collection_elements, 2, .production_id = 16), + [2379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(175), + [2381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), + [2383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_alias_statement, 4, .production_id = 63), + [2385] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__collection_elements_repeat1, 2, .production_id = 36), + [2387] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__collection_elements_repeat1, 2, .production_id = 36), SHIFT_REPEAT(230), + [2390] = {.entry = {.count = 1, .reusable = true}}, SHIFT(174), + [2392] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1188), + [2394] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_specifier_repeat1, 2), + [2396] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_specifier_repeat1, 2), SHIFT_REPEAT(183), + [2399] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_specifier_repeat1, 2), SHIFT_REPEAT(1117), + [2402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__import_list, 2, .production_id = 6), + [2404] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_slice, 3, .production_id = 93), + [2406] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1060), + [2408] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1173), + [2410] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1278), + [2412] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_alias_statement, 5, .production_id = 87), + [2414] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_raise_statement, 4, .production_id = 53), + [2416] = {.entry = {.count = 1, .reusable = true}}, SHIFT(398), + [2418] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), + [2420] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_argument_list_repeat1, 2, .production_id = 31), + [2422] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_specifier, 1), + [2424] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1099), + [2426] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_keyword_argument, 3, .production_id = 27), + [2428] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_keyword_argument, 3, .production_id = 35), + [2430] = {.entry = {.count = 1, .reusable = true}}, SHIFT(893), + [2432] = {.entry = {.count = 1, .reusable = true}}, SHIFT(852), + [2434] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_typed_parameter, 3, .production_id = 65), + [2436] = {.entry = {.count = 1, .reusable = true}}, SHIFT(479), + [2438] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [2440] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [2442] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [2444] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_exec_statement, 5, .production_id = 15), + [2446] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_global_statement_repeat1, 2), SHIFT_REPEAT(1490), + [2449] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_global_statement_repeat1, 2), + [2451] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_typevar_parameter, 1, .production_id = 6), + [2453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(434), + [2455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [2457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [2459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1061), + [2461] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import_prefix, 1), + [2463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1165), + [2465] = {.entry = {.count = 1, .reusable = true}}, SHIFT(474), + [2467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__patterns, 1, .production_id = 7), + [2469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(597), + [2471] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_guard, 2, .production_id = 132), + [2473] = {.entry = {.count = 1, .reusable = true}}, SHIFT(405), + [2475] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), + [2477] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print_statement, 2), + [2479] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [2481] = {.entry = {.count = 1, .reusable = true}}, SHIFT(389), + [2483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [2485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1490), + [2487] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_global_statement, 2), + [2489] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_nonlocal_statement, 2), + [2491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1185), + [2493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [2495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [2497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [2499] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_assert_statement_repeat1, 2), SHIFT_REPEAT(480), + [2502] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1182), + [2504] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1443), + [2506] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_print_statement_repeat1, 2, .production_id = 52), SHIFT_REPEAT(483), + [2509] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_print_statement_repeat1, 2, .production_id = 52), + [2511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1093), + [2513] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__import_list, 2, .production_id = 22), + [2515] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1095), + [2517] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_import_prefix_repeat1, 2), + [2519] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_import_prefix_repeat1, 2), SHIFT_REPEAT(1165), + [2522] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__patterns, 2, .production_id = 16), + [2524] = {.entry = {.count = 1, .reusable = true}}, SHIFT(595), + [2526] = {.entry = {.count = 1, .reusable = true}}, SHIFT(448), + [2528] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_list_splat, 3, .production_id = 49), + [2530] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), + [2532] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print_statement, 3, .production_id = 28), + [2534] = {.entry = {.count = 1, .reusable = true}}, SHIFT(303), + [2536] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print_statement, 3, .production_id = 29), + [2538] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1067), + [2540] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1315), + [2542] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assert_statement, 3), + [2544] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_list_splat, 3), + [2546] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter, 1), + [2548] = {.entry = {.count = 1, .reusable = true}}, SHIFT(361), + [2550] = {.entry = {.count = 1, .reusable = true}}, SHIFT(438), + [2552] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_with_clause_repeat1, 2), + [2554] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_with_clause_repeat1, 2), SHIFT_REPEAT(351), + [2557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(849), + [2559] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1332), + [2561] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1284), + [2563] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__import_list_repeat1, 2, .production_id = 23), + [2565] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_decorator, 3), + [2567] = {.entry = {.count = 1, .reusable = true}}, SHIFT(482), + [2569] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__import_list_repeat1, 2, .production_id = 44), SHIFT_REPEAT(1312), + [2572] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__import_list_repeat1, 2, .production_id = 44), + [2574] = {.entry = {.count = 1, .reusable = true}}, SHIFT(851), + [2576] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_nonlocal_statement, 3), + [2578] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_global_statement, 3), + [2580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [2582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1412), + [2584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(968), + [2586] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), + [2588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(342), + [2590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(233), + [2592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), + [2594] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__simple_statements_repeat1, 2), SHIFT_REPEAT(147), + [2597] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__simple_statements_repeat1, 2), + [2599] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__parameters_repeat1, 2), + [2601] = {.entry = {.count = 1, .reusable = true}}, SHIFT(855), + [2603] = {.entry = {.count = 1, .reusable = true}}, SHIFT(973), + [2605] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), + [2607] = {.entry = {.count = 1, .reusable = true}}, SHIFT(343), + [2609] = {.entry = {.count = 1, .reusable = true}}, SHIFT(896), + [2611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1142), + [2613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1147), + [2615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1020), + [2617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1250), + [2619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [2621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(313), + [2623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [2625] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_match_mapping_pattern_repeat1, 2), SHIFT_REPEAT(905), + [2628] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_match_mapping_pattern_repeat1, 2), + [2630] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1004), + [2632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(861), + [2634] = {.entry = {.count = 1, .reusable = true}}, SHIFT(862), + [2636] = {.entry = {.count = 1, .reusable = true}}, SHIFT(139), + [2638] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1233), + [2640] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1314), + [2642] = {.entry = {.count = 1, .reusable = true}}, SHIFT(891), + [2644] = {.entry = {.count = 1, .reusable = true}}, SHIFT(988), + [2646] = {.entry = {.count = 1, .reusable = true}}, SHIFT(459), + [2648] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), + [2650] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [2652] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_aliased_import, 3, .production_id = 45), + [2654] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1322), + [2656] = {.entry = {.count = 1, .reusable = true}}, SHIFT(793), + [2658] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), + [2660] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameters, 1), + [2662] = {.entry = {.count = 1, .reusable = true}}, SHIFT(895), + [2664] = {.entry = {.count = 1, .reusable = true}}, SHIFT(802), + [2666] = {.entry = {.count = 1, .reusable = true}}, SHIFT(189), + [2668] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), + [2670] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_argument_list_repeat1, 2, .production_id = 36), + [2672] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_argument_list_repeat1, 2, .production_id = 36), SHIFT_REPEAT(222), + [2675] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), + [2677] = {.entry = {.count = 1, .reusable = true}}, SHIFT(790), + [2679] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_dictionary_repeat1, 2, .production_id = 36), SHIFT_REPEAT(275), + [2682] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_dictionary_repeat1, 2, .production_id = 36), + [2684] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_relative_import, 1), + [2686] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), + [2688] = {.entry = {.count = 1, .reusable = true}}, SHIFT(145), + [2690] = {.entry = {.count = 1, .reusable = true}}, SHIFT(358), + [2692] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__import_list_repeat1, 2, .production_id = 44), SHIFT_REPEAT(1317), + [2695] = {.entry = {.count = 1, .reusable = true}}, SHIFT(136), + [2697] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), + [2699] = {.entry = {.count = 1, .reusable = true}}, SHIFT(796), + [2701] = {.entry = {.count = 1, .reusable = true}}, SHIFT(249), + [2703] = {.entry = {.count = 1, .reusable = true}}, SHIFT(640), + [2705] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), + [2707] = {.entry = {.count = 1, .reusable = true}}, SHIFT(360), + [2709] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), + [2711] = {.entry = {.count = 1, .reusable = true}}, SHIFT(242), + [2713] = {.entry = {.count = 1, .reusable = true}}, SHIFT(634), + [2715] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [2717] = {.entry = {.count = 1, .reusable = true}}, SHIFT(362), + [2719] = {.entry = {.count = 1, .reusable = true}}, SHIFT(899), + [2721] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_parameters, 4, .production_id = 111), + [2723] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_type_parameters_repeat1, 2, .production_id = 112), SHIFT_REPEAT(1020), + [2726] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_parameters_repeat1, 2, .production_id = 112), + [2728] = {.entry = {.count = 1, .reusable = true}}, SHIFT(143), + [2730] = {.entry = {.count = 1, .reusable = true}}, SHIFT(620), + [2732] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), + [2734] = {.entry = {.count = 1, .reusable = true}}, SHIFT(894), + [2736] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1087), + [2738] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1110), + [2740] = {.entry = {.count = 1, .reusable = true}}, SHIFT(133), + [2742] = {.entry = {.count = 1, .reusable = true}}, SHIFT(369), + [2744] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), + [2746] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 3, .production_id = 37), + [2748] = {.entry = {.count = 1, .reusable = true}}, SHIFT(782), + [2750] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), + [2752] = {.entry = {.count = 1, .reusable = true}}, SHIFT(351), + [2754] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_clause, 2), + [2756] = {.entry = {.count = 1, .reusable = true}}, SHIFT(364), + [2758] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1489), + [2760] = {.entry = {.count = 1, .reusable = true}}, SHIFT(290), + [2762] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_specifier_repeat1, 1, .production_id = 73), + [2764] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_format_specifier_repeat1, 1, .production_id = 73), + [2766] = {.entry = {.count = 1, .reusable = true}}, SHIFT(257), + [2768] = {.entry = {.count = 1, .reusable = true}}, SHIFT(810), + [2770] = {.entry = {.count = 1, .reusable = true}}, SHIFT(260), + [2772] = {.entry = {.count = 1, .reusable = true}}, SHIFT(836), + [2774] = {.entry = {.count = 1, .reusable = true}}, SHIFT(831), + [2776] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), + [2778] = {.entry = {.count = 1, .reusable = true}}, SHIFT(830), + [2780] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), + [2782] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__parameters_repeat1, 2), SHIFT_REPEAT(903), + [2785] = {.entry = {.count = 1, .reusable = true}}, SHIFT(235), + [2787] = {.entry = {.count = 1, .reusable = true}}, SHIFT(632), + [2789] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), + [2791] = {.entry = {.count = 1, .reusable = true}}, SHIFT(644), + [2793] = {.entry = {.count = 1, .reusable = true}}, SHIFT(207), + [2795] = {.entry = {.count = 1, .reusable = true}}, SHIFT(613), + [2797] = {.entry = {.count = 1, .reusable = true}}, SHIFT(206), + [2799] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_item, 3, .dynamic_precedence = -1, .production_id = 58), + [2801] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), + [2803] = {.entry = {.count = 1, .reusable = true}}, SHIFT(221), + [2805] = {.entry = {.count = 1, .reusable = true}}, SHIFT(255), + [2807] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), + [2809] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1307), + [2811] = {.entry = {.count = 1, .reusable = true}}, SHIFT(827), + [2813] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [2815] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [2817] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__match_maybe_star_pattern, 1), + [2819] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__match_patterns, 1), + [2821] = {.entry = {.count = 1, .reusable = true}}, SHIFT(225), + [2823] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1195), + [2825] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), + [2827] = {.entry = {.count = 1, .reusable = true}}, SHIFT(286), + [2829] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__parameters_repeat1, 2), SHIFT_REPEAT(902), + [2832] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_match_class_pattern_repeat1, 2), + [2834] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_match_class_pattern_repeat1, 2), SHIFT_REPEAT(863), + [2837] = {.entry = {.count = 1, .reusable = true}}, SHIFT(821), + [2839] = {.entry = {.count = 1, .reusable = true}}, SHIFT(186), + [2841] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_subscript_repeat1, 2, .production_id = 97), SHIFT_REPEAT(314), + [2844] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_subscript_repeat1, 2, .production_id = 97), + [2846] = {.entry = {.count = 1, .reusable = true}}, SHIFT(250), + [2848] = {.entry = {.count = 1, .reusable = true}}, SHIFT(809), + [2850] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1170), + [2852] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), + [2854] = {.entry = {.count = 1, .reusable = true}}, SHIFT(835), + [2856] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1175), + [2858] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), + [2860] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), + [2862] = {.entry = {.count = 1, .reusable = true}}, SHIFT(141), + [2864] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [2866] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1069), + [2868] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_match_class_pattern_repeat2, 2), + [2870] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_match_class_pattern_repeat2, 2), SHIFT_REPEAT(1353), + [2873] = {.entry = {.count = 1, .reusable = true}}, SHIFT(140), + [2875] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), + [2877] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_clause, 1), + [2879] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_parameters, 3, .production_id = 85), + [2881] = {.entry = {.count = 1, .reusable = true}}, SHIFT(857), + [2883] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1329), + [2885] = {.entry = {.count = 1, .reusable = true}}, SHIFT(776), + [2887] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), + [2889] = {.entry = {.count = 1, .reusable = true}}, SHIFT(966), + [2891] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1215), + [2893] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1338), + [2895] = {.entry = {.count = 1, .reusable = true}}, SHIFT(898), + [2897] = {.entry = {.count = 1, .reusable = true}}, SHIFT(462), + [2899] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_exec_statement, 2, .production_id = 15), + [2901] = {.entry = {.count = 1, .reusable = true}}, SHIFT(461), + [2903] = {.entry = {.count = 1, .reusable = true}}, SHIFT(858), + [2905] = {.entry = {.count = 1, .reusable = true}}, SHIFT(989), + [2907] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_positional_separator, 1), + [2909] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_future_import_statement, 6, .production_id = 98), + [2911] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_typevar_parameter, 2, .production_id = 84), + [2913] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [2915] = {.entry = {.count = 1, .reusable = true}}, SHIFT(341), + [2917] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pass_statement, 1), + [2919] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_break_statement, 1), + [2921] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_continue_statement, 1), + [2923] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_from_statement, 6, .production_id = 99), + [2925] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_typevartuple_parameter, 2, .production_id = 23), + [2927] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_key_value_pattern, 3, .production_id = 62), + [2929] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1087), + [2931] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1424), + [2933] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), + [2935] = {.entry = {.count = 1, .reusable = true}}, SHIFT(350), + [2937] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_positional_pattern, 1), + [2939] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_double_star_pattern, 2, .production_id = 11), + [2941] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1426), + [2943] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 5, .production_id = 91), + [2945] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [2947] = {.entry = {.count = 1, .reusable = true}}, SHIFT(368), + [2949] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), + [2951] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), + [2953] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 3), + [2955] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [2957] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), + [2959] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [2961] = {.entry = {.count = 1, .reusable = true}}, SHIFT(346), + [2963] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [2965] = {.entry = {.count = 1, .reusable = true}}, SHIFT(323), + [2967] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [2969] = {.entry = {.count = 1, .reusable = true}}, SHIFT(324), + [2971] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_argument_list_repeat1, 2, .production_id = 67), + [2973] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 2), + [2975] = {.entry = {.count = 1, .reusable = false}}, SHIFT(990), + [2977] = {.entry = {.count = 1, .reusable = true}}, SHIFT(990), + [2979] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_statement, 2, .production_id = 5), + [2981] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_dictionary_repeat1, 2, .production_id = 31), + [2983] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_future_import_statement, 4, .production_id = 46), + [2985] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_augmented_assignment, 3, .production_id = 39), + [2987] = {.entry = {.count = 1, .reusable = false}}, SHIFT(1010), + [2989] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1010), + [2991] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_parameters_repeat1, 2, .production_id = 85), + [2993] = {.entry = {.count = 1, .reusable = false}}, SHIFT(951), + [2995] = {.entry = {.count = 1, .reusable = true}}, SHIFT(951), + [2997] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 3, .production_id = 38), + [2999] = {.entry = {.count = 1, .reusable = true}}, SHIFT(977), + [3001] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_from_statement, 4, .production_id = 48), + [3003] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_from_statement, 4, .production_id = 47), + [3005] = {.entry = {.count = 1, .reusable = true}}, SHIFT(854), + [3007] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_match_keyword_pattern, 3, .production_id = 157), + [3009] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_wildcard_import, 1), + [3011] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1496), + [3013] = {.entry = {.count = 1, .reusable = true}}, SHIFT(972), + [3015] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_paramspec_parameter, 2, .production_id = 23), + [3017] = {.entry = {.count = 1, .reusable = true}}, SHIFT(850), + [3019] = {.entry = {.count = 1, .reusable = true}}, SHIFT(612), + [3021] = {.entry = {.count = 1, .reusable = true}}, SHIFT(860), + [3023] = {.entry = {.count = 1, .reusable = true}}, SHIFT(817), + [3025] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_relative_import, 2, .production_id = 23), + [3027] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1222), + [3029] = {.entry = {.count = 1, .reusable = true}}, SHIFT(839), + [3031] = {.entry = {.count = 1, .reusable = true}}, SHIFT(848), + [3033] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), + [3035] = {.entry = {.count = 1, .reusable = true}}, SHIFT(818), + [3037] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1342), + [3039] = {.entry = {.count = 1, .reusable = true}}, SHIFT(606), + [3041] = {.entry = {.count = 1, .reusable = true}}, SHIFT(775), + [3043] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1350), + [3045] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [3047] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_clause, 4), + [3049] = {.entry = {.count = 1, .reusable = true}}, SHIFT(397), + [3051] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [3053] = {.entry = {.count = 1, .reusable = true}}, SHIFT(804), + [3055] = {.entry = {.count = 1, .reusable = true}}, SHIFT(724), + [3057] = {.entry = {.count = 1, .reusable = true}}, SHIFT(784), + [3059] = {.entry = {.count = 1, .reusable = true}}, SHIFT(622), + [3061] = {.entry = {.count = 1, .reusable = true}}, SHIFT(635), + [3063] = {.entry = {.count = 1, .reusable = true}}, SHIFT(873), + [3065] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [3067] = {.entry = {.count = 1, .reusable = true}}, SHIFT(718), + [3069] = {.entry = {.count = 1, .reusable = true}}, SHIFT(611), + [3071] = {.entry = {.count = 1, .reusable = true}}, SHIFT(795), + [3073] = {.entry = {.count = 1, .reusable = true}}, SHIFT(791), + [3075] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1089), + [3077] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1056), + [3079] = {.entry = {.count = 1, .reusable = true}}, SHIFT(637), + [3081] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1382), + [3083] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1116), + [3085] = {.entry = {.count = 1, .reusable = true}}, SHIFT(917), + [3087] = {.entry = {.count = 1, .reusable = true}}, SHIFT(688), + [3089] = {.entry = {.count = 1, .reusable = true}}, SHIFT(780), + [3091] = {.entry = {.count = 1, .reusable = true}}, SHIFT(829), + [3093] = {.entry = {.count = 1, .reusable = true}}, SHIFT(227), + [3095] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1226), + [3097] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [3099] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1129), + [3101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(465), + [3103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1374), + [3105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1352), + [3107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1402), + [3109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(436), + [3111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [3113] = {.entry = {.count = 1, .reusable = true}}, SHIFT(623), + [3115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(816), + [3117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(625), + [3119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [3121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(819), + [3123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(626), + [3125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [3127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(814), + [3129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [3131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [3133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(813), + [3135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [3137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(840), + [3139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), + [3141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1101), + [3143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), + [3145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [3147] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [3149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [3151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [3153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(627), + [3155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [3157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(864), + [3159] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_clause, 5), + [3161] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_clause, 3), + [3163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1223), + [3165] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [3167] = {.entry = {.count = 1, .reusable = true}}, SHIFT(435), + [3169] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1179), + [3171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(701), + [3173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [3175] = {.entry = {.count = 1, .reusable = true}}, SHIFT(969), + [3177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(874), + [3179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1107), + [3181] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [3183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(365), + [3185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [3187] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [3189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(771), + [3191] = {.entry = {.count = 1, .reusable = true}}, SHIFT(773), + [3193] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [3195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [3197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1108), + [3199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1155), + [3201] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1154), + [3203] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1128), + [3205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [3207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(777), + [3209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1176), + [3211] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1074), + [3213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1132), + [3215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(1131), + [3217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_lambda_parameters, 1), + [3219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(437), +}; + +#ifdef __cplusplus +extern "C" { +#endif +void *tree_sitter_python_external_scanner_create(void); +void tree_sitter_python_external_scanner_destroy(void *); +bool tree_sitter_python_external_scanner_scan(void *, TSLexer *, const bool *); +unsigned tree_sitter_python_external_scanner_serialize(void *, char *); +void tree_sitter_python_external_scanner_deserialize(void *, const char *, unsigned); + +#ifdef _WIN32 +#define extern __declspec(dllexport) +#endif + +extern const TSLanguage *tree_sitter_python(void) { + static const TSLanguage language = { + .version = LANGUAGE_VERSION, + .symbol_count = SYMBOL_COUNT, + .alias_count = ALIAS_COUNT, + .token_count = TOKEN_COUNT, + .external_token_count = EXTERNAL_TOKEN_COUNT, + .state_count = STATE_COUNT, + .large_state_count = LARGE_STATE_COUNT, + .production_id_count = PRODUCTION_ID_COUNT, + .field_count = FIELD_COUNT, + .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .parse_table = &ts_parse_table[0][0], + .small_parse_table = ts_small_parse_table, + .small_parse_table_map = ts_small_parse_table_map, + .parse_actions = ts_parse_actions, + .symbol_names = ts_symbol_names, + .field_names = ts_field_names, + .field_map_slices = ts_field_map_slices, + .field_map_entries = ts_field_map_entries, + .symbol_metadata = ts_symbol_metadata, + .public_symbol_map = ts_symbol_map, + .alias_map = ts_non_terminal_alias_map, + .alias_sequences = &ts_alias_sequences[0][0], + .lex_modes = ts_lex_modes, + .lex_fn = ts_lex, + .keyword_lex_fn = ts_lex_keywords, + .keyword_capture_token = sym_identifier, + .external_scanner = { + &ts_external_scanner_states[0][0], + ts_external_scanner_symbol_map, + tree_sitter_python_external_scanner_create, + tree_sitter_python_external_scanner_destroy, + tree_sitter_python_external_scanner_scan, + tree_sitter_python_external_scanner_serialize, + tree_sitter_python_external_scanner_deserialize, + }, + .primary_state_ids = ts_primary_state_ids, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/python/extractor/tsg-python/tree-sitter-python/src/scanner.cc b/python/extractor/tsg-python/tree-sitter-python/src/scanner.cc new file mode 100644 index 00000000000..140bb65b1cf --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/src/scanner.cc @@ -0,0 +1,402 @@ +#include +#include +#include +#include +#include +#include +namespace { + +using std::vector; +using std::iswspace; +using std::memcpy; + +enum TokenType { + NEWLINE, + INDENT, + DEDENT, + STRING_START, + STRING_CONTENT, + STRING_END, +}; + +struct Delimiter { + enum { + SingleQuote = 1 << 0, + DoubleQuote = 1 << 1, + BackQuote = 1 << 2, + Raw = 1 << 3, + Format = 1 << 4, + Triple = 1 << 5, + Bytes = 1 << 6, + }; + + Delimiter() : flags(0) {} + + bool is_format() const { + return flags & Format; + } + + bool is_raw() const { + return flags & Raw; + } + + bool is_triple() const { + return flags & Triple; + } + + bool is_bytes() const { + return flags & Bytes; + } + + int32_t end_character() const { + if (flags & SingleQuote) return '\''; + if (flags & DoubleQuote) return '"'; + if (flags & BackQuote) return '`'; + return 0; + } + + void set_format() { + flags |= Format; + } + + void set_raw() { + flags |= Raw; + } + + void set_triple() { + flags |= Triple; + } + + void set_bytes() { + flags |= Bytes; + } + + void set_end_character(int32_t character) { + switch (character) { + case '\'': + flags |= SingleQuote; + break; + case '"': + flags |= DoubleQuote; + break; + case '`': + flags |= BackQuote; + break; + default: + assert(false); + } + } + + char flags; +}; + +struct Scanner { + Scanner() { + assert(sizeof(Delimiter) == sizeof(char)); + deserialize(NULL, 0); + } + + unsigned serialize(char *buffer) { + size_t i = 0; + + size_t delimiter_count = delimiter_stack.size(); + if (delimiter_count > UINT8_MAX) delimiter_count = UINT8_MAX; + buffer[i++] = delimiter_count; + + if (delimiter_count > 0) { + memcpy(&buffer[i], delimiter_stack.data(), delimiter_count); + } + i += delimiter_count; + + vector::iterator + iter = indent_length_stack.begin() + 1, + end = indent_length_stack.end(); + + for (; iter != end && i < TREE_SITTER_SERIALIZATION_BUFFER_SIZE; ++iter) { + buffer[i++] = *iter; + } + + return i; + } + + void deserialize(const char *buffer, unsigned length) { + delimiter_stack.clear(); + indent_length_stack.clear(); + indent_length_stack.push_back(0); + + if (length > 0) { + size_t i = 0; + + size_t delimiter_count = (uint8_t)buffer[i++]; + delimiter_stack.resize(delimiter_count); + if (delimiter_count > 0) { + memcpy(delimiter_stack.data(), &buffer[i], delimiter_count); + } + i += delimiter_count; + + for (; i < length; i++) { + indent_length_stack.push_back(buffer[i]); + } + } + } + + void advance(TSLexer *lexer) { + lexer->advance(lexer, false); + } + + void skip(TSLexer *lexer) { + lexer->advance(lexer, true); + } + + bool scan(TSLexer *lexer, const bool *valid_symbols) { + if (valid_symbols[STRING_CONTENT] && !valid_symbols[INDENT] && !delimiter_stack.empty()) { + Delimiter delimiter = delimiter_stack.back(); + int32_t end_character = delimiter.end_character(); + bool has_content = false; + while (lexer->lookahead) { + if ((lexer->lookahead == '{' || lexer->lookahead == '}') && delimiter.is_format()) { + lexer->mark_end(lexer); + lexer->result_symbol = STRING_CONTENT; + return has_content; + } else if (lexer->lookahead == '\\') { + if (delimiter.is_raw()) { + lexer->advance(lexer, false); + continue; + } else if (delimiter.is_bytes()) { + lexer->mark_end(lexer); + lexer->advance(lexer, false); + if (lexer->lookahead == 'N' || lexer->lookahead == 'u' || lexer->lookahead == 'U') { + // In bytes string, \N{...}, \uXXXX and \UXXXXXXXX are not escape sequences + // https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals + lexer->advance(lexer, false); + } else { + lexer->result_symbol = STRING_CONTENT; + return has_content; + } + } else { + lexer->mark_end(lexer); + lexer->result_symbol = STRING_CONTENT; + return has_content; + } + } else if (lexer->lookahead == end_character) { + if (delimiter.is_triple()) { + lexer->mark_end(lexer); + lexer->advance(lexer, false); + if (lexer->lookahead == end_character) { + lexer->advance(lexer, false); + if (lexer->lookahead == end_character) { + if (has_content) { + lexer->result_symbol = STRING_CONTENT; + } else { + lexer->advance(lexer, false); + lexer->mark_end(lexer); + delimiter_stack.pop_back(); + lexer->result_symbol = STRING_END; + } + return true; + } else { + lexer->mark_end(lexer); + lexer->result_symbol = STRING_CONTENT; + return true; + } + } else { + lexer->mark_end(lexer); + lexer->result_symbol = STRING_CONTENT; + return true; + } + } else { + if (has_content) { + lexer->result_symbol = STRING_CONTENT; + } else { + lexer->advance(lexer, false); + delimiter_stack.pop_back(); + lexer->result_symbol = STRING_END; + } + lexer->mark_end(lexer); + return true; + } + } else if (lexer->lookahead == '\n' && has_content && !delimiter.is_triple()) { + return false; + } + advance(lexer); + has_content = true; + } + } + + lexer->mark_end(lexer); + + bool found_end_of_line = false; + uint32_t indent_length = 0; + int32_t first_comment_indent_length = -1; + for (;;) { + if (lexer->lookahead == '\n') { + found_end_of_line = true; + indent_length = 0; + skip(lexer); + } else if (lexer->lookahead == ' ') { + indent_length++; + skip(lexer); + } else if (lexer->lookahead == '\r') { + indent_length = 0; + skip(lexer); + } else if (lexer->lookahead == '\t') { + indent_length += 8; + skip(lexer); + } else if (lexer->lookahead == '#') { + if (first_comment_indent_length == -1) { + first_comment_indent_length = (int32_t)indent_length; + } + while (lexer->lookahead && lexer->lookahead != '\n') { + skip(lexer); + } + skip(lexer); + indent_length = 0; + } else if (lexer->lookahead == '\\') { + skip(lexer); + if (lexer->lookahead == '\r') { + skip(lexer); + } + if (lexer->lookahead == '\n') { + skip(lexer); + } else { + return false; + } + } else if (lexer->lookahead == '\f') { + indent_length = 0; + skip(lexer); + } else if (lexer->lookahead == 0) { + indent_length = 0; + found_end_of_line = true; + break; + } else { + break; + } + } + + if (found_end_of_line) { + if (!indent_length_stack.empty()) { + uint16_t current_indent_length = indent_length_stack.back(); + + if ( + valid_symbols[INDENT] && + indent_length > current_indent_length + ) { + indent_length_stack.push_back(indent_length); + lexer->result_symbol = INDENT; + return true; + } + + if ( + valid_symbols[DEDENT] && + indent_length < current_indent_length && + + // Wait to create a dedent token until we've consumed any comments + // whose indentation matches the current block. + first_comment_indent_length < (int32_t)current_indent_length + ) { + indent_length_stack.pop_back(); + lexer->result_symbol = DEDENT; + return true; + } + } + + if (valid_symbols[NEWLINE]) { + lexer->result_symbol = NEWLINE; + return true; + } + } + + if (first_comment_indent_length == -1 && valid_symbols[STRING_START]) { + Delimiter delimiter; + + bool has_flags = false; + while (lexer->lookahead) { + if (lexer->lookahead == 'f' || lexer->lookahead == 'F') { + delimiter.set_format(); + } else if (lexer->lookahead == 'r' || lexer->lookahead == 'R') { + delimiter.set_raw(); + } else if (lexer->lookahead == 'b' || lexer->lookahead == 'B') { + delimiter.set_bytes(); + } else if (lexer->lookahead != 'u' && lexer->lookahead != 'U') { + break; + } + has_flags = true; + advance(lexer); + } + + if (lexer->lookahead == '`') { + delimiter.set_end_character('`'); + advance(lexer); + lexer->mark_end(lexer); + } else if (lexer->lookahead == '\'') { + delimiter.set_end_character('\''); + advance(lexer); + lexer->mark_end(lexer); + if (lexer->lookahead == '\'') { + advance(lexer); + if (lexer->lookahead == '\'') { + advance(lexer); + lexer->mark_end(lexer); + delimiter.set_triple(); + } + } + } else if (lexer->lookahead == '"') { + delimiter.set_end_character('"'); + advance(lexer); + lexer->mark_end(lexer); + if (lexer->lookahead == '"') { + advance(lexer); + if (lexer->lookahead == '"') { + advance(lexer); + lexer->mark_end(lexer); + delimiter.set_triple(); + } + } + } + + if (delimiter.end_character()) { + delimiter_stack.push_back(delimiter); + lexer->result_symbol = STRING_START; + return true; + } else if (has_flags) { + return false; + } + } + + return false; + } + + vector indent_length_stack; + vector delimiter_stack; +}; + +} + +extern "C" { + +void *tree_sitter_python_external_scanner_create() { + return new Scanner(); +} + +bool tree_sitter_python_external_scanner_scan(void *payload, TSLexer *lexer, + const bool *valid_symbols) { + Scanner *scanner = static_cast(payload); + return scanner->scan(lexer, valid_symbols); +} + +unsigned tree_sitter_python_external_scanner_serialize(void *payload, char *buffer) { + Scanner *scanner = static_cast(payload); + return scanner->serialize(buffer); +} + +void tree_sitter_python_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) { + Scanner *scanner = static_cast(payload); + scanner->deserialize(buffer, length); +} + +void tree_sitter_python_external_scanner_destroy(void *payload) { + Scanner *scanner = static_cast(payload); + delete scanner; +} + +} diff --git a/python/extractor/tsg-python/tree-sitter-python/src/tree_sitter/parser.h b/python/extractor/tsg-python/tree-sitter-python/src/tree_sitter/parser.h new file mode 100644 index 00000000000..2b14ac1046b --- /dev/null +++ b/python/extractor/tsg-python/tree-sitter-python/src/tree_sitter/parser.h @@ -0,0 +1,224 @@ +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define ts_builtin_sym_error ((TSSymbol)-1) +#define ts_builtin_sym_end 0 +#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 + +typedef uint16_t TSStateId; + +#ifndef TREE_SITTER_API_H_ +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +typedef struct { + uint16_t index; + uint16_t length; +} TSFieldMapSlice; + +typedef struct { + bool visible; + bool named; + bool supertype; +} TSSymbolMetadata; + +typedef struct TSLexer TSLexer; + +struct TSLexer { + int32_t lookahead; + TSSymbol result_symbol; + void (*advance)(TSLexer *, bool); + void (*mark_end)(TSLexer *); + uint32_t (*get_column)(TSLexer *); + bool (*is_at_included_range_start)(const TSLexer *); + bool (*eof)(const TSLexer *); +}; + +typedef enum { + TSParseActionTypeShift, + TSParseActionTypeReduce, + TSParseActionTypeAccept, + TSParseActionTypeRecover, +} TSParseActionType; + +typedef union { + struct { + uint8_t type; + TSStateId state; + bool extra; + bool repetition; + } shift; + struct { + uint8_t type; + uint8_t child_count; + TSSymbol symbol; + int16_t dynamic_precedence; + uint16_t production_id; + } reduce; + uint8_t type; +} TSParseAction; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; +} TSLexMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable; + } entry; +} TSParseActionEntry; + +struct TSLanguage { + uint32_t version; + uint32_t symbol_count; + uint32_t alias_count; + uint32_t token_count; + uint32_t external_token_count; + uint32_t state_count; + uint32_t large_state_count; + uint32_t production_id_count; + uint32_t field_count; + uint16_t max_alias_sequence_length; + const uint16_t *parse_table; + const uint16_t *small_parse_table; + const uint32_t *small_parse_table_map; + const TSParseActionEntry *parse_actions; + const char * const *symbol_names; + const char * const *field_names; + const TSFieldMapSlice *field_map_slices; + const TSFieldMapEntry *field_map_entries; + const TSSymbolMetadata *symbol_metadata; + const TSSymbol *public_symbol_map; + const uint16_t *alias_map; + const TSSymbol *alias_sequences; + const TSLexMode *lex_modes; + bool (*lex_fn)(TSLexer *, TSStateId); + bool (*keyword_lex_fn)(TSLexer *, TSStateId); + TSSymbol keyword_capture_token; + struct { + const bool *states; + const TSSymbol *symbol_map; + void *(*create)(void); + void (*destroy)(void *); + bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); + unsigned (*serialize)(void *, char *); + void (*deserialize)(void *, const char *, unsigned); + } external_scanner; + const TSStateId *primary_state_ids; +}; + +/* + * Lexer Macros + */ + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define SKIP(state_value) \ + { \ + skip = true; \ + state = state_value; \ + goto next_state; \ + } + +#define ACCEPT_TOKEN(symbol_value) \ + result = true; \ + lexer->result_symbol = symbol_value; \ + lexer->mark_end(lexer); + +#define END_STATE() return result; + +/* + * Parse Table Macros + */ + +#define SMALL_STATE(id) id - LARGE_STATE_COUNT + +#define STATE(id) id + +#define ACTIONS(id) id + +#define SHIFT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = state_value \ + } \ + }} + +#define SHIFT_REPEAT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = state_value, \ + .repetition = true \ + } \ + }} + +#define SHIFT_EXTRA() \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .extra = true \ + } \ + }} + +#define REDUCE(symbol_val, child_count_val, ...) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_val, \ + .child_count = child_count_val, \ + __VA_ARGS__ \ + }, \ + }} + +#define RECOVER() \ + {{ \ + .type = TSParseActionTypeRecover \ + }} + +#define ACCEPT_INPUT() \ + {{ \ + .type = TSParseActionTypeAccept \ + }} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_ diff --git a/python/extractor/tsg-python/tsg_to_dot.py b/python/extractor/tsg-python/tsg_to_dot.py new file mode 100644 index 00000000000..a39111f5077 --- /dev/null +++ b/python/extractor/tsg-python/tsg_to_dot.py @@ -0,0 +1,60 @@ +# Convert output of tree-sitter-graph to dot format. + +import sys +import re + +# regular expression to match a node +node_re = re.compile(r"node (?P\d+)") + +# regular expression to match an edge +edge_re = re.compile(r"edge (?P\d+) -> (?P\d+)") + +# regular expression to match a property +prop_re = re.compile(r"\s+(?P\w+): (?P.*)") + +# regular expression to match a link: "[graph node n]" +link_re = re.compile(r"\[graph node (?P\d+)\]") + +with open(sys.argv[1], 'r') as f, open(sys.argv[2], 'w') as out: + out.write("digraph G {\n") + label = [] + inside = False + node_id = 0 + links = {} + for line in f: + + m = node_re.match(line) + if m: + if inside: + out.write('\\n'.join(label) + "\"];\n") + for k, v in links.items(): + out.write("{} -> {} [label=\"{}\"];\n".format(node_id, v, k)) + out.write("{id} [label=\"".format(**m.groupdict())) + label = ["id={id}".format(**m.groupdict())] + inside = True + node_id = m.group('id') + links = {} + + m = edge_re.match(line) + if m: + if inside: + out.write('\\n'.join(label) + "\"];\n") + for k, v in links.items(): + out.write("{} -> {} [label=\"{}\"];\n".format(node_id, v, k)) + out.write("{from} -> {to} [label=\"".format(**m.groupdict())) + label = [] + inside = True + node_id = 0 + links = {} + + m = prop_re.match(line) + if m: + # escape quotes in value + label.append("{key}={value}".format(**m.groupdict()).replace('"', '\\"').replace('\\\\"', '')) + l = link_re.match(m.group('value')) + if l: + links[m.group('key')] = l.group('id') + out.write('\\n'.join(label) + "\"];\n") + for k, v in links.items(): + out.write("{} -> {} [label=\"{}\"];\n".format(node_id, v, k)) + out.write("}\n") diff --git a/python/extractor/unparse.py b/python/extractor/unparse.py new file mode 100644 index 00000000000..b12f1501592 --- /dev/null +++ b/python/extractor/unparse.py @@ -0,0 +1,709 @@ +#Copied Tools.unparse.py with modifications. Copyright PSF. + +"Usage: unparse.py " +import sys +import ast +import tokenize +import io +import os +import shutil + +# Large float and imaginary literals get turned into infinities in the AST. +# We unparse those infinities to INFSTR. +INFSTR = "1e" + repr(sys.float_info.max_10_exp + 1) + +def interleave(inter, f, seq): + """Call f on each item in seq, calling inter() in between. + """ + seq = iter(seq) + try: + f(next(seq)) + except StopIteration: + pass + else: + for x in seq: + inter() + f(x) + +class Unparser: + """Methods in this class recursively traverse an AST and + output source code for the abstract syntax; original formatting + is disregarded. """ + + def __init__(self, tree, file = sys.stdout): + """Unparser(tree, file=sys.stdout) -> None. + Print the source for tree to file.""" + self.f = file + self._indent = 0 + self.dispatch(tree) + print("", file=self.f) + self.f.flush() + + def fill(self, text = ""): + "Indent a piece of text, according to the current indentation level" + self.f.write("\n"+" "*self._indent + text) + + def write(self, text): + "Append a piece of text to the current line." + self.f.write(text) + + def enter(self): + "Print ':', and increase the indentation." + self.write(":") + self._indent += 1 + + def leave(self): + "Decrease the indentation level." + self._indent -= 1 + + def dispatch(self, tree): + "Dispatcher function, dispatching tree type T to method _T." + if isinstance(tree, list): + for t in tree: + self.dispatch(t) + return + meth = getattr(self, "_"+tree.__class__.__name__) + meth(tree) + + def remove_docstring(self, t): + if hasattr(t, "docstring"): + return + if not t.body: + return + if not isinstance(t.body[0], ast.Expr): + return + if not isinstance(t.body[0].value, ast.Str): + return + t.body = t.body[1:] + + def add_pass(self, t): + if t.body: + #No pass needed + return + t.body = [ast.Pass()] + + ############### Unparsing methods ###################### + # There should be one method per concrete grammar type # + # Constructors should be grouped by sum type. Ideally, # + # this would follow the order in the grammar, but # + # currently doesn't. # + ######################################################## + + def _Module(self, tree): + self.remove_docstring(tree) + self.add_pass(tree) + for stmt in tree.body: + self.dispatch(stmt) + + # stmt + def _Expr(self, tree): + self.fill() + self.dispatch(tree.value) + + def _Import(self, t): + self.fill("import ") + interleave(lambda: self.write(", "), self.dispatch, t.names) + + def _ImportFrom(self, t): + self.fill("from ") + self.write("." * t.level) + if t.module: + self.write(t.module) + self.write(" import ") + interleave(lambda: self.write(", "), self.dispatch, t.names) + + def _Assign(self, t): + self.fill() + for target in t.targets: + self.dispatch(target) + self.write(" = ") + self.dispatch(t.value) + + def _AugAssign(self, t): + self.fill() + self.dispatch(t.target) + self.write(" "+self.binop[t.op.__class__.__name__]+"= ") + self.dispatch(t.value) + + def _AnnAssign(self, t): + self.fill() + if not t.simple and isinstance(t.target, ast.Name): + self.write('(') + self.dispatch(t.target) + if not t.simple and isinstance(t.target, ast.Name): + self.write(')') + self.write(": ") + self.dispatch(t.annotation) + if t.value: + self.write(" = ") + self.dispatch(t.value) + + def _Return(self, t): + self.fill("return") + if t.value: + self.write(" ") + self.dispatch(t.value) + + def _Pass(self, t): + self.fill("pass") + + def _Break(self, t): + self.fill("break") + + def _Continue(self, t): + self.fill("continue") + + def _Delete(self, t): + self.fill("del ") + interleave(lambda: self.write(", "), self.dispatch, t.targets) + + def _Assert(self, t): + self.fill("assert ") + self.dispatch(t.test) + if t.msg: + self.write(", ") + self.dispatch(t.msg) + + def _Global(self, t): + self.fill("global ") + interleave(lambda: self.write(", "), self.write, t.names) + + def _Nonlocal(self, t): + self.fill("nonlocal ") + interleave(lambda: self.write(", "), self.write, t.names) + + def _Await(self, t): + self.write("(") + self.write("await") + if t.value: + self.write(" ") + self.dispatch(t.value) + self.write(")") + + def _Yield(self, t): + self.write("(") + self.write("yield") + if t.value: + self.write(" ") + self.dispatch(t.value) + self.write(")") + + def _YieldFrom(self, t): + self.write("(") + self.write("yield from") + if t.value: + self.write(" ") + self.dispatch(t.value) + self.write(")") + + def _Raise(self, t): + self.fill("raise") + if not t.exc: + assert not t.cause + return + self.write(" ") + self.dispatch(t.exc) + if t.cause: + self.write(" from ") + self.dispatch(t.cause) + + def _Try(self, t): + self.fill("try") + self.enter() + self.dispatch(t.body) + self.leave() + for ex in t.handlers: + self.dispatch(ex) + if t.orelse: + self.fill("else") + self.enter() + self.dispatch(t.orelse) + self.leave() + if t.finalbody: + self.fill("finally") + self.enter() + self.dispatch(t.finalbody) + self.leave() + + def _ExceptHandler(self, t): + self.fill("except") + if t.type: + self.write(" ") + self.dispatch(t.type) + if t.name: + self.write(" as ") + self.write(t.name) + self.enter() + self.dispatch(t.body) + self.leave() + + def _ClassDef(self, t): + self.write("\n") + for deco in t.decorator_list: + self.fill("@") + self.dispatch(deco) + self.fill("class "+t.name) + self.write("(") + comma = False + for e in t.bases: + if comma: self.write(", ") + else: comma = True + self.dispatch(e) + for e in t.keywords: + if comma: self.write(", ") + else: comma = True + self.dispatch(e) + self.write(")") + + self.enter() + self.remove_docstring(t) + self.add_pass(t) + self.dispatch(t.body) + self.leave() + + def _FunctionDef(self, t): + self.__FunctionDef_helper(t, "def") + + def _AsyncFunctionDef(self, t): + self.__FunctionDef_helper(t, "async def") + + def __FunctionDef_helper(self, t, fill_suffix): + self.write("\n") + for deco in t.decorator_list: + self.fill("@") + self.dispatch(deco) + def_str = fill_suffix+" "+t.name + "(" + self.fill(def_str) + self.dispatch(t.args) + self.write(")") + if t.returns: + self.write(" -> ") + self.dispatch(t.returns) + self.enter() + self.remove_docstring(t) + self.add_pass(t) + self.dispatch(t.body) + self.leave() + + def _For(self, t): + self.__For_helper("for ", t) + + def _AsyncFor(self, t): + self.__For_helper("async for ", t) + + def __For_helper(self, fill, t): + self.fill(fill) + self.dispatch(t.target) + self.write(" in ") + self.dispatch(t.iter) + self.enter() + self.dispatch(t.body) + self.leave() + if t.orelse: + self.fill("else") + self.enter() + self.dispatch(t.orelse) + self.leave() + + def _If(self, t): + self.fill("if ") + self.dispatch(t.test) + self.enter() + self.dispatch(t.body) + self.leave() + # collapse nested ifs into equivalent elifs. + while (t.orelse and len(t.orelse) == 1 and + isinstance(t.orelse[0], ast.If)): + t = t.orelse[0] + self.fill("elif ") + self.dispatch(t.test) + self.enter() + self.dispatch(t.body) + self.leave() + # final else + if t.orelse: + self.fill("else") + self.enter() + self.dispatch(t.orelse) + self.leave() + + def _While(self, t): + self.fill("while ") + self.dispatch(t.test) + self.enter() + self.dispatch(t.body) + self.leave() + if t.orelse: + self.fill("else") + self.enter() + self.dispatch(t.orelse) + self.leave() + + def _With(self, t): + self.fill("with ") + interleave(lambda: self.write(", "), self.dispatch, t.items) + self.enter() + self.dispatch(t.body) + self.leave() + + def _AsyncWith(self, t): + self.fill("async with ") + interleave(lambda: self.write(", "), self.dispatch, t.items) + self.enter() + self.dispatch(t.body) + self.leave() + + # expr + def _Bytes(self, t): + self.write(repr(t.s)) + + def _Str(self, tree): + s = repr(tree.s).encode("ascii", errors="backslashreplace").decode("ascii") + self.write(s) + + def _JoinedStr(self, t): + self.write("f") + string = io.StringIO() + self._fstring_JoinedStr(t, string.write) + self.write(repr(string.getvalue())) + + def _FormattedValue(self, t): + self.write("f") + string = io.StringIO() + self._fstring_FormattedValue(t, string.write) + self.write(repr(string.getvalue())) + + def _fstring_JoinedStr(self, t, write): + for value in t.values: + meth = getattr(self, "_fstring_" + type(value).__name__) + meth(value, write) + + def _fstring_Str(self, t, write): + value = t.s.replace("{", "{{").replace("}", "}}") + write(value) + + def _fstring_Constant(self, t, write): + assert isinstance(t.value, str) + value = t.value.replace("{", "{{").replace("}", "}}") + write(value) + + def _fstring_FormattedValue(self, t, write): + write("{") + expr = io.StringIO() + Unparser(t.value, expr) + expr = expr.getvalue().rstrip("\n") + if expr.startswith("{"): + write(" ") # Separate pair of opening brackets as "{ {" + write(expr) + if t.conversion != -1: + conversion = chr(t.conversion) + assert conversion in "sra" + write("!%s" % conversion) + if t.format_spec: + write(":") + meth = getattr(self, "_fstring_" + type(t.format_spec).__name__) + meth(t.format_spec, write) + write("}") + + def _Name(self, t): + self.write(t.id) + + def _write_constant(self, value): + if isinstance(value, (float, complex)): + self.write(repr(value).replace("inf", INFSTR)) + else: + self.write(repr(value)) + + def _Constant(self, t): + value = t.value + if isinstance(value, tuple): + self.write("(") + if len(value) == 1: + self._write_constant(value[0]) + self.write(",") + else: + interleave(lambda: self.write(", "), self._write_constant, value) + self.write(")") + else: + self._write_constant(t.value) + + def _NameConstant(self, t): + self.write(repr(t.value)) + + def _Num(self, t): + # Substitute overflowing decimal literal for AST infinities. + self.write(repr(t.n).replace("inf", INFSTR)) + + def _List(self, t): + self.write("[") + interleave(lambda: self.write(", "), self.dispatch, t.elts) + self.write("]") + + def _ListComp(self, t): + self.write("[") + self.dispatch(t.elt) + for gen in t.generators: + self.dispatch(gen) + self.write("]") + + def _GeneratorExp(self, t): + self.write("(") + self.dispatch(t.elt) + for gen in t.generators: + self.dispatch(gen) + self.write(")") + + def _SetComp(self, t): + self.write("{") + self.dispatch(t.elt) + for gen in t.generators: + self.dispatch(gen) + self.write("}") + + def _DictComp(self, t): + self.write("{") + self.dispatch(t.key) + self.write(": ") + self.dispatch(t.value) + for gen in t.generators: + self.dispatch(gen) + self.write("}") + + def _comprehension(self, t): + if hasattr(t, "is_async") and t.is_async: + self.write(" async for ") + else: + self.write(" for ") + self.dispatch(t.target) + self.write(" in ") + self.dispatch(t.iter) + for if_clause in t.ifs: + self.write(" if ") + self.dispatch(if_clause) + + def _IfExp(self, t): + self.write("(") + self.dispatch(t.body) + self.write(" if ") + self.dispatch(t.test) + self.write(" else ") + self.dispatch(t.orelse) + self.write(")") + + def _Set(self, t): + assert(t.elts) # should be at least one element + self.write("{") + interleave(lambda: self.write(", "), self.dispatch, t.elts) + self.write("}") + + def _Dict(self, t): + self.write("{") + def write_key_value_pair(k, v): + self.dispatch(k) + self.write(": ") + self.dispatch(v) + + def write_item(item): + k, v = item + if k is None: + # for dictionary unpacking operator in dicts {**{'y': 2}} + # see PEP 448 for details + self.write("**") + self.dispatch(v) + else: + write_key_value_pair(k, v) + interleave(lambda: self.write(", "), write_item, zip(t.keys, t.values)) + self.write("}") + + def _Tuple(self, t): + self.write("(") + if len(t.elts) == 1: + elt = t.elts[0] + self.dispatch(elt) + self.write(",") + else: + interleave(lambda: self.write(", "), self.dispatch, t.elts) + self.write(")") + + unop = {"Invert":"~", "Not": "not", "UAdd":"+", "USub":"-"} + def _UnaryOp(self, t): + self.write("(") + self.write(self.unop[t.op.__class__.__name__]) + self.write(" ") + self.dispatch(t.operand) + self.write(")") + + binop = { "Add":"+", "Sub":"-", "Mult":"*", "MatMult":"@", "Div":"/", "Mod":"%", + "LShift":"<<", "RShift":">>", "BitOr":"|", "BitXor":"^", "BitAnd":"&", + "FloorDiv":"//", "Pow": "**"} + def _BinOp(self, t): + self.write("(") + self.dispatch(t.left) + self.write(" " + self.binop[t.op.__class__.__name__] + " ") + self.dispatch(t.right) + self.write(")") + + cmpops = {"Eq":"==", "NotEq":"!=", "Lt":"<", "LtE":"<=", "Gt":">", "GtE":">=", + "Is":"is", "IsNot":"is not", "In":"in", "NotIn":"not in"} + def _Compare(self, t): + self.write("(") + self.dispatch(t.left) + for o, e in zip(t.ops, t.comparators): + self.write(" " + self.cmpops[o.__class__.__name__] + " ") + self.dispatch(e) + self.write(")") + + boolops = {ast.And: 'and', ast.Or: 'or'} + def _BoolOp(self, t): + self.write("(") + s = " %s " % self.boolops[t.op.__class__] + interleave(lambda: self.write(s), self.dispatch, t.values) + self.write(")") + + def _Attribute(self,t): + self.dispatch(t.value) + # Special case: 3.__abs__() is a syntax error, so if t.value + # is an integer literal then we need to either parenthesize + # it or add an extra space to get 3 .__abs__(). + if isinstance(t.value, ast.Num) and isinstance(t.value.n, int): + self.write(" ") + self.write(".") + self.write(t.attr) + + def _Call(self, t): + self.dispatch(t.func) + self.write("(") + comma = False + for e in t.args: + if comma: self.write(", ") + else: comma = True + self.dispatch(e) + for e in t.keywords: + if comma: self.write(", ") + else: comma = True + self.dispatch(e) + self.write(")") + + def _Subscript(self, t): + self.dispatch(t.value) + self.write("[") + self.dispatch(t.slice) + self.write("]") + + def _Starred(self, t): + self.write("*") + self.dispatch(t.value) + + # slice + def _Ellipsis(self, t): + self.write("...") + + def _Index(self, t): + self.dispatch(t.value) + + def _Slice(self, t): + if t.lower: + self.dispatch(t.lower) + self.write(":") + if t.upper: + self.dispatch(t.upper) + if t.step: + self.write(":") + self.dispatch(t.step) + + def _ExtSlice(self, t): + interleave(lambda: self.write(', '), self.dispatch, t.dims) + + # argument + def _arg(self, t): + self.write(t.arg) + if t.annotation: + self.write(": ") + self.dispatch(t.annotation) + + # others + def _arguments(self, t): + first = True + # normal arguments + defaults = [None] * (len(t.args) - len(t.defaults)) + t.defaults + for a, d in zip(t.args, defaults): + if first:first = False + else: self.write(", ") + self.dispatch(a) + if d: + self.write("=") + self.dispatch(d) + + # varargs, or bare '*' if no varargs but keyword-only arguments present + if t.vararg or t.kwonlyargs: + if first:first = False + else: self.write(", ") + self.write("*") + if t.vararg: + self.write(t.vararg.arg) + if t.vararg.annotation: + self.write(": ") + self.dispatch(t.vararg.annotation) + + # keyword-only arguments + if t.kwonlyargs: + for a, d in zip(t.kwonlyargs, t.kw_defaults): + if first:first = False + else: self.write(", ") + self.dispatch(a), + if d: + self.write("=") + self.dispatch(d) + + # kwargs + if t.kwarg: + if first:first = False + else: self.write(", ") + self.write("**"+t.kwarg.arg) + if t.kwarg.annotation: + self.write(": ") + self.dispatch(t.kwarg.annotation) + + def _keyword(self, t): + if t.arg is None: + self.write("**") + else: + self.write(t.arg) + self.write("=") + self.dispatch(t.value) + + def _Lambda(self, t): + self.write("(") + self.write("lambda ") + self.dispatch(t.args) + self.write(": ") + self.dispatch(t.body) + self.write(")") + + def _alias(self, t): + self.write(t.name) + if t.asname: + self.write(" as "+t.asname) + + def _withitem(self, t): + self.dispatch(t.context_expr) + if t.optional_vars: + self.write(" as ") + self.dispatch(t.optional_vars) + +def roundtrip(filename, outpath): + with open(filename, "rb") as pyfile: + encoding = tokenize.detect_encoding(pyfile.readline)[0] + with open(filename, "r", encoding=encoding) as pyfile: + source = pyfile.read() + tree = compile(source, filename, "exec", ast.PyCF_ONLY_AST) + with open(outpath, "w", encoding=encoding) as output: + Unparser(tree, output) + +def strip_comments_and_docstrings(path): + tmp = path + ".tmp" + if path.endswith(".py"): + roundtrip(path, tmp) + else: + shutil.copy(path, tmp) + return tmp diff --git a/python/ql/consistency-queries/PhaseDependentFlowConsistency.ql b/python/ql/consistency-queries/PhaseDependentFlowConsistency.ql new file mode 100644 index 00000000000..066e7d1fa1e --- /dev/null +++ b/python/ql/consistency-queries/PhaseDependentFlowConsistency.ql @@ -0,0 +1,21 @@ +private import python +private import semmle.python.dataflow.new.DataFlow::DataFlow +private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPrivate +private import semmle.python.dataflow.new.internal.VariableCapture as VariableCapture + +from Node node +where + not exists(node.getScope()) and + exists(Node nodeFrom, Node nodeTo | node in [nodeFrom, nodeTo] | + // the list of step relations used with PhaseDependentFlow has been compiled + // manually, and there isn't really a good way to do so automatically :| + DataFlowPrivate::LocalFlow::definitionFlowStep(nodeFrom, nodeTo) + or + DataFlowPrivate::LocalFlow::expressionFlowStep(nodeFrom, nodeTo) + or + DataFlowPrivate::LocalFlow::useUseFlowStep(nodeFrom, nodeTo) + or + VariableCapture::valueStep(nodeFrom, nodeTo) + ) +select node, + "Node being used in PhaseDependentFlow does not have result for .getScope(), so will not work properly (since division into run-time/import-time is based on .getScope result)" diff --git a/python/ql/lib/change-notes/2024-02-28-iterable-unpacking-module-scope.md b/python/ql/lib/change-notes/2024-02-28-iterable-unpacking-module-scope.md new file mode 100644 index 00000000000..3c47c6ba866 --- /dev/null +++ b/python/ql/lib/change-notes/2024-02-28-iterable-unpacking-module-scope.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Fixed flow for iterable unpacking (`a,b = my_tuple`) when it occurs on top-level (module) scope. diff --git a/python/ql/lib/change-notes/2024-03-01-dict-update-content.md b/python/ql/lib/change-notes/2024-03-01-dict-update-content.md new file mode 100644 index 00000000000..dfb8d247fff --- /dev/null +++ b/python/ql/lib/change-notes/2024-03-01-dict-update-content.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Fixed missing flow for dictionary updates (`d[] = ...`) when `` is a string constant not used in dictionary literals or as name of keyword-argument. diff --git a/python/ql/lib/semmle/python/dataflow/new/FlowSummary.qll b/python/ql/lib/semmle/python/dataflow/new/FlowSummary.qll index 800c9592dcc..9c3033e6126 100644 --- a/python/ql/lib/semmle/python/dataflow/new/FlowSummary.qll +++ b/python/ql/lib/semmle/python/dataflow/new/FlowSummary.qll @@ -2,7 +2,6 @@ private import python private import semmle.python.dataflow.new.DataFlow -private import semmle.python.frameworks.data.ModelsAsData private import semmle.python.ApiGraphs private import internal.FlowSummaryImpl as Impl private import internal.DataFlowUtil @@ -11,6 +10,7 @@ private import internal.DataFlowPrivate // import all instances below private module Summaries { private import semmle.python.Frameworks + private import semmle.python.frameworks.data.ModelsAsData } deprecated class SummaryComponent = Impl::Private::SummaryComponent; @@ -36,32 +36,3 @@ abstract class SummarizedCallable extends LibraryCallable, Impl::Public::Summari } deprecated class RequiredSummaryComponentStack = Impl::Private::RequiredSummaryComponentStack; - -private class SummarizedCallableFromModel extends SummarizedCallable { - string type; - string path; - - SummarizedCallableFromModel() { - ModelOutput::relevantSummaryModel(type, path, _, _, _) and - this = type + ";" + path - } - - override CallCfgNode getACall() { ModelOutput::resolvedSummaryBase(type, path, result) } - - override ArgumentNode getACallback() { - exists(API::Node base | - ModelOutput::resolvedSummaryRefBase(type, path, base) and - result = base.getAValueReachableFromSource() - ) - } - - override predicate propagatesFlow(string input, string output, boolean preservesValue) { - exists(string kind | ModelOutput::relevantSummaryModel(type, path, input, output, kind) | - kind = "value" and - preservesValue = true - or - kind = "taint" and - preservesValue = false - ) - } -} diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll index 87a278e0f6b..9bf0ec96084 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll @@ -57,6 +57,9 @@ newtype TParameterPosition = // parameter positions available. FlowSummaryImpl::ParsePositions::isParsedPositionalArgumentPosition(_, index) } or + TPositionalParameterLowerBoundPosition(int pos) { + FlowSummaryImpl::ParsePositions::isParsedArgumentLowerBoundPosition(_, pos) + } or TKeywordParameterPosition(string name) { name = any(Parameter p).getName() or @@ -91,6 +94,9 @@ class ParameterPosition extends TParameterPosition { /** Holds if this position represents a positional parameter at (0-based) `index`. */ predicate isPositional(int index) { this = TPositionalParameterPosition(index) } + /** Holds if this position represents any positional parameter starting from position `pos`. */ + predicate isPositionalLowerBound(int pos) { this = TPositionalParameterLowerBoundPosition(pos) } + /** Holds if this position represents a keyword parameter named `name`. */ predicate isKeyword(string name) { this = TKeywordParameterPosition(name) } @@ -123,6 +129,8 @@ class ParameterPosition extends TParameterPosition { or exists(int index | this.isPositional(index) and result = "position " + index) or + exists(int pos | this.isPositionalLowerBound(pos) and result = "position " + pos + "..") + or exists(string name | this.isKeyword(name) and result = "keyword " + name) or exists(int index | this.isStarArgs(index) and result = "*args at " + index) @@ -211,6 +219,10 @@ predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { or exists(int index | ppos.isPositional(index) and apos.isPositional(index)) or + exists(int index1, int index2 | + ppos.isPositionalLowerBound(index1) and apos.isPositional(index2) and index2 >= index1 + ) + or exists(string name | ppos.isKeyword(name) and apos.isKeyword(name)) or exists(int index | ppos.isStarArgs(index) and apos.isStarArgs(index)) @@ -360,6 +372,10 @@ abstract class DataFlowFunction extends DataFlowCallable, TFunction { result.getParameter() = func.getArg(index + this.positionalOffset()) ) or + exists(int index1, int index2 | ppos.isPositionalLowerBound(index1) and index2 >= index1 | + result.getParameter() = func.getArg(index2 + this.positionalOffset()) + ) + or exists(string name | ppos.isKeyword(name) | result.getParameter() = func.getArgByName(name)) or // `*args` diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll index c11e0cde64d..47f41d0cd05 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll @@ -809,6 +809,8 @@ predicate dictStoreStep(CfgNode nodeFrom, DictionaryElementContent c, Node nodeT * TODO: Once TaintTracking no longer uses `dictStoreStep`, unify the two predicates. */ private predicate moreDictStoreSteps(CfgNode nodeFrom, DictionaryElementContent c, Node nodeTo) { + // NOTE: It's important to add logic to the newtype definition of + // DictionaryElementContent if you add new cases here. exists(SubscriptNode subscript | nodeTo.(PostUpdateNode).getPreUpdateNode().asCfgNode() = subscript.getObject() and nodeFrom.asCfgNode() = subscript.(DefinitionNode).getValue() and diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll index 8f08efb0f93..73c87992c48 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll @@ -467,7 +467,7 @@ class IterableSequenceNode extends Node, TIterableSequenceNode { override string toString() { result = "IterableSequence" } - override DataFlowCallable getEnclosingCallable() { result = consumer.getEnclosingCallable() } + override Scope getScope() { result = consumer.getScope() } override Location getLocation() { result = consumer.getLocation() } } @@ -484,7 +484,7 @@ class IterableElementNode extends Node, TIterableElementNode { override string toString() { result = "IterableElement" } - override DataFlowCallable getEnclosingCallable() { result = consumer.getEnclosingCallable() } + override Scope getScope() { result = consumer.getScope() } override Location getLocation() { result = consumer.getLocation() } } @@ -499,7 +499,7 @@ class StarPatternElementNode extends Node, TStarPatternElementNode { override string toString() { result = "StarPatternElement" } - override DataFlowCallable getEnclosingCallable() { result = consumer.getEnclosingCallable() } + override Scope getScope() { result = consumer.getScope() } override Location getLocation() { result = consumer.getLocation() } } @@ -605,9 +605,19 @@ newtype TContent = } or /** An element of a dictionary under a specific key. */ TDictionaryElementContent(string key) { - key = any(KeyValuePair kvp).getKey().(StrConst).getS() + // {"key": ...} + key = any(KeyValuePair kvp).getKey().(StrConst).getText() or + // func(key=...) key = any(Keyword kw).getArg() + or + // d["key"] = ... + key = any(SubscriptNode sub | sub.isStore() | sub.getIndex().getNode().(StrConst).getText()) + or + // d.setdefault("key", ...) + exists(CallNode call | call.getFunction().(AttrNode).getName() = "setdefault" | + key = call.getArg(0).getNode().(StrConst).getText() + ) } or /** An element of a dictionary under any key. */ TDictionaryElementAnyContent() or diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll b/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll index 4a55d38edb6..6a7463ccb9b 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll @@ -27,6 +27,11 @@ module Input implements InputSig { result = i.toString() ) or + exists(int i | + pos.isPositionalLowerBound(i) and + result = i + ".." + ) + or exists(string name | pos.isKeyword(name) and result = name + ":" @@ -195,6 +200,11 @@ module ParsePositions { i = AccessPath::parseInt(c) } + predicate isParsedArgumentLowerBoundPosition(string c, int i) { + isArgBody(c) and + i = AccessPath::parseLowerBound(c) + } + predicate isParsedKeywordArgumentPosition(string c, string argName) { isArgBody(c) and c = argName + ":" diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll b/python/ql/lib/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll index 1841001c2f8..6eab2f48885 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll @@ -195,6 +195,8 @@ predicate copyStep(DataFlow::CfgNode nodeFrom, DataFlow::CfgNode nodeTo) { call = API::moduleImport("copy").getMember(["copy", "deepcopy"]).getACall() and call.getArg(0) = nodeFrom ) + or + nodeTo.(DataFlow::MethodCallNode).calls(nodeFrom, "copy") } /** diff --git a/python/ql/lib/semmle/python/frameworks/data/ModelsAsData.qll b/python/ql/lib/semmle/python/frameworks/data/ModelsAsData.qll index f8d7ae75ad0..34e48439271 100644 --- a/python/ql/lib/semmle/python/frameworks/data/ModelsAsData.qll +++ b/python/ql/lib/semmle/python/frameworks/data/ModelsAsData.qll @@ -17,7 +17,7 @@ import Shared::ModelOutput as ModelOutput private import semmle.python.dataflow.new.RemoteFlowSources private import semmle.python.dataflow.new.DataFlow private import semmle.python.ApiGraphs -private import semmle.python.dataflow.new.TaintTracking +private import semmle.python.dataflow.new.FlowSummary /** * A remote flow source originating from a CSV source row. @@ -28,20 +28,31 @@ private class RemoteFlowSourceFromCsv extends RemoteFlowSource { override string getSourceType() { result = "Remote flow (from model)" } } -/** - * Like `ModelOutput::summaryStep` but with API nodes mapped to data-flow nodes. - */ -private predicate summaryStepNodes(DataFlow::Node pred, DataFlow::Node succ, string kind) { - exists(API::Node predNode, API::Node succNode | - Specific::summaryStep(predNode, succNode, kind) and - pred = predNode.asSink() and - succ = succNode.asSource() - ) -} +private class SummarizedCallableFromModel extends SummarizedCallable { + string type; + string path; -/** Taint steps induced by summary models of kind `taint`. */ -private class TaintStepFromSummary extends TaintTracking::AdditionalTaintStep { - override predicate step(DataFlow::Node pred, DataFlow::Node succ) { - summaryStepNodes(pred, succ, "taint") + SummarizedCallableFromModel() { + ModelOutput::relevantSummaryModel(type, path, _, _, _) and + this = type + ";" + path + } + + override DataFlow::CallCfgNode getACall() { ModelOutput::resolvedSummaryBase(type, path, result) } + + override DataFlow::ArgumentNode getACallback() { + exists(API::Node base | + ModelOutput::resolvedSummaryRefBase(type, path, base) and + result = base.getAValueReachableFromSource() + ) + } + + override predicate propagatesFlow(string input, string output, boolean preservesValue) { + exists(string kind | ModelOutput::relevantSummaryModel(type, path, input, output, kind) | + kind = "value" and + preservesValue = true + or + kind = "taint" and + preservesValue = false + ) } } diff --git a/python/ql/src/Security/CWE-943/NoSqlInjection.ql b/python/ql/src/Security/CWE-943/NoSqlInjection.ql index b559159055f..cc5d57effe0 100644 --- a/python/ql/src/Security/CWE-943/NoSqlInjection.ql +++ b/python/ql/src/Security/CWE-943/NoSqlInjection.ql @@ -3,6 +3,7 @@ * @description Building a NoSQL query from user-controlled sources is vulnerable to insertion of * malicious NoSQL code by the user. * @kind path-problem + * @precision high * @problem.severity error * @security-severity 8.8 * @id py/nosql-injection diff --git a/python/ql/src/change-notes/2024-03-04-nosql-injection.md b/python/ql/src/change-notes/2024-03-04-nosql-injection.md new file mode 100644 index 00000000000..6e98540c757 --- /dev/null +++ b/python/ql/src/change-notes/2024-03-04-nosql-injection.md @@ -0,0 +1,4 @@ +--- +category: newQuery +--- +* The query `py/nosql-injection` for finding NoSQL injection vulnerabilities is now part of the default security suite. diff --git a/python/ql/test/experimental/dataflow/coverage/module_level.py b/python/ql/test/experimental/dataflow/coverage/module_level.py new file mode 100644 index 00000000000..bd2d38088b1 --- /dev/null +++ b/python/ql/test/experimental/dataflow/coverage/module_level.py @@ -0,0 +1,7 @@ +# this test has code on module level, which works in slightly different ways than when +# inside a function + +t = (SOURCE, NONSOURCE) +a, b = t +SINK(a) #$ flow="SOURCE, l:-2 -> a" +SINK_F(b) diff --git a/python/ql/test/experimental/dataflow/fieldflow/test_dict.py b/python/ql/test/experimental/dataflow/fieldflow/test_dict.py index c2f74b83c3d..f64a5187925 100644 --- a/python/ql/test/experimental/dataflow/fieldflow/test_dict.py +++ b/python/ql/test/experimental/dataflow/fieldflow/test_dict.py @@ -45,6 +45,15 @@ def test_dict_update(): SINK(d["key"]) # $ flow="SOURCE, l:-1 -> d['key']" SINK(d.get("key")) # $ flow="SOURCE, l:-2 -> d.get(..)" + +def test_dict_update_fresh_key(): + # we had a regression where we did not create a dictionary element content + # for keys used in "inline update" like this + d = {} + d["fresh_key"] = SOURCE + SINK(d["fresh_key"]) # $ flow="SOURCE, l:-1 -> d['fresh_key']" + + @expects(3) # $ unresolved_call=expects(..) unresolved_call=expects(..)(..) def test_dict_setdefault(): d = {} diff --git a/python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml b/python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml index 3e14c56d735..e3a7e059401 100644 --- a/python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml +++ b/python/ql/test/experimental/dataflow/model-summaries/InlineTaintTest.ext.yml @@ -15,4 +15,6 @@ extensions: - ["foo", "Member[MS_append_to_list]", "Argument[1]", "ReturnValue.ListElement", "value"] - ["foo", "Member[MS_append_to_list]", "Argument[0]", "ReturnValue", "taint"] - ["foo", "Member[MS_append_to_list]", "Argument[1]", "ReturnValue", "taint"] + - ["foo", "Member[MS_spread]", "Argument[0]", "ReturnValue.TupleElement[0]", "value"] + - ["foo", "Member[MS_spread]", "Argument[1]", "ReturnValue.TupleElement[1]", "value"] - ["json", "Member[MS_loads]", "Argument[0]", "ReturnValue", "taint"] diff --git a/python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml b/python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml index 3e14c56d735..e3a7e059401 100644 --- a/python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml +++ b/python/ql/test/experimental/dataflow/model-summaries/NormalDataflowTest.ext.yml @@ -15,4 +15,6 @@ extensions: - ["foo", "Member[MS_append_to_list]", "Argument[1]", "ReturnValue.ListElement", "value"] - ["foo", "Member[MS_append_to_list]", "Argument[0]", "ReturnValue", "taint"] - ["foo", "Member[MS_append_to_list]", "Argument[1]", "ReturnValue", "taint"] + - ["foo", "Member[MS_spread]", "Argument[0]", "ReturnValue.TupleElement[0]", "value"] + - ["foo", "Member[MS_spread]", "Argument[1]", "ReturnValue.TupleElement[1]", "value"] - ["json", "Member[MS_loads]", "Argument[0]", "ReturnValue", "taint"] diff --git a/python/ql/test/experimental/dataflow/model-summaries/model_summaries.py b/python/ql/test/experimental/dataflow/model-summaries/model_summaries.py index ee02918b079..c8c5ac0a888 100644 --- a/python/ql/test/experimental/dataflow/model-summaries/model_summaries.py +++ b/python/ql/test/experimental/dataflow/model-summaries/model_summaries.py @@ -30,7 +30,7 @@ def SINK_F(x): ensure_tainted = ensure_not_tainted = print TAINTED_STRING = "TAINTED_STRING" -from foo import MS_identity, MS_apply_lambda, MS_reversed, MS_list_map, MS_append_to_list +from foo import MS_identity, MS_apply_lambda, MS_reversed, MS_list_map, MS_append_to_list, MS_spread # Simple summary via_identity = MS_identity(SOURCE) @@ -107,6 +107,13 @@ ensure_tainted( tainted_list[0], # $ tainted ) +a, b = MS_spread(SOURCE, NONSOURCE) +SINK(a) # $ flow="SOURCE, l:-1 -> a" +SINK_F(b) +x, y = MS_spread(NONSOURCE, SOURCE) +SINK_F(x) +SINK(y) # $ flow="SOURCE, l:-2 -> y" + # Modeled flow-summary is not value preserving from json import MS_loads as json_loads diff --git a/python/ql/test/library-tests/essa/ssa-compute/test2.py b/python/ql/test/library-tests/essa/ssa-compute/test2.py new file mode 100644 index 00000000000..d117a6b53e6 --- /dev/null +++ b/python/ql/test/library-tests/essa/ssa-compute/test2.py @@ -0,0 +1,29 @@ +def func(x): # $ def=x + try: + with Thing() as y: # $ def=y + y.foo(x, 0) # $ def-use=x:1 def-use=y:3 + while not x.attribute: # $ use-use=x:4 use-use=x:7 + y.bar() # $ use-use=y:4 use-use=y:6 + print(x) # $ use-use=x:5 + finally: + pass + +def func(x): # $ def=x + try: + with Thing() as y: # $ def=y + y.foo(x, some_var) # $ def-use=x:11 def-use=y:13 + while not x.attribute: # $ use-use=x:14 use-use=x:17 + y.bar() # $ use-use=y:16 MISSING: use-use=y:14 + print(x) # $ use-use=x:15 + finally: + pass + +def func(x): # $ def=x + try: + with Thing() as y: # $ def=y + y.foo(x, some_var.some_attr) # $ def-use=x:21 def-use=y:23 + while not x.attribute: # $ use-use=x:27 MISSING: use-use=x:24 + y.bar() # $ use-use=y:26 MISSING: use-use=y:24 + print(x) # $ use-use=x:25 + finally: + pass diff --git a/python/ql/test/query-tests/Functions/ModificationOfParameterWithDefault/test.py b/python/ql/test/query-tests/Functions/ModificationOfParameterWithDefault/test.py index b67fa985f51..ca7bb71d760 100644 --- a/python/ql/test/query-tests/Functions/ModificationOfParameterWithDefault/test.py +++ b/python/ql/test/query-tests/Functions/ModificationOfParameterWithDefault/test.py @@ -216,3 +216,9 @@ def flow_from_within_deepcopy_fp(): def flow_through_deepcopy_fp(x=[]): y = deepcopy(x) y.append(1) + +# Use of copy method: + +def flow_through_copy_fp(x=[]): + y = x.copy() + y.append(1) diff --git a/ql/Cargo.lock b/ql/Cargo.lock index 6ea3f99faf5..557cf673d59 100644 Binary files a/ql/Cargo.lock and b/ql/Cargo.lock differ diff --git a/ql/buramu/Cargo.toml b/ql/buramu/Cargo.toml index d6cfae88bc9..c072903b82a 100644 --- a/ql/buramu/Cargo.toml +++ b/ql/buramu/Cargo.toml @@ -7,6 +7,6 @@ edition = "2018" [dependencies] lazy_static = "1.4.0" -chrono = "0.4.34" -rayon = "1.8.1" +chrono = "0.4.35" +rayon = "1.9.0" regex = "1.10.3" diff --git a/ql/extractor/Cargo.toml b/ql/extractor/Cargo.toml index 301abf60afb..bc8de165e65 100644 --- a/ql/extractor/Cargo.toml +++ b/ql/extractor/Cargo.toml @@ -15,6 +15,6 @@ tree-sitter-json = {git = "https://github.com/tausbn/tree-sitter-json.git", rev clap = { version = "4.2", features = ["derive"] } tracing = "0.1" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } -rayon = "1.8.1" +rayon = "1.9.0" regex = "1.10.3" codeql-extractor = { path = "../../shared/tree-sitter-extractor" } diff --git a/ruby/BUILD.bazel b/ruby/BUILD.bazel new file mode 100644 index 00000000000..28cb046e3a6 --- /dev/null +++ b/ruby/BUILD.bazel @@ -0,0 +1,60 @@ +load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files") +load("@semmle_code//:dist.bzl", "dist", "pack_zip") +load("//:defs.bzl", "codeql_platform") + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "dbscheme", + actual = "//ruby/ql/lib:dbscheme", +) + +alias( + name = "dbscheme-stats", + actual = "//ruby/ql/lib:dbscheme-stats", +) + +pkg_files( + name = "dbscheme-group", + srcs = [ + ":dbscheme", + ":dbscheme-stats", + ], + strip_prefix = None, +) + +pkg_filegroup( + name = "db-files", + srcs = [ + ":dbscheme-group", + "//ruby/downgrades", + ], +) + +pkg_files( + name = "codeql-extractor-yml", + srcs = ["codeql-extractor.yml"], + strip_prefix = None, +) + +dist( + name = "extractor-generic", + srcs = [ + ":codeql-extractor-yml", + ":dbscheme-group", + "//ruby/downgrades", + "//ruby/tools", + ], + prefix = "ruby", + visibility = ["//visibility:public"], +) + +pack_zip( + name = "extractor-arch", + srcs = [ + "//ruby/extractor", + ], + package_file_name = "extractor-" + codeql_platform + ".zip", + prefix = "ruby/tools/" + codeql_platform, + visibility = ["//visibility:public"], +) diff --git a/ruby/downgrades/BUILD.bazel b/ruby/downgrades/BUILD.bazel new file mode 100644 index 00000000000..39bea56f767 --- /dev/null +++ b/ruby/downgrades/BUILD.bazel @@ -0,0 +1,12 @@ +load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix") + +pkg_files( + name = "downgrades", + srcs = glob( + ["**"], + exclude = ["BUILD.bazel"], + ), + prefix = "downgrades", + strip_prefix = strip_prefix.from_pkg(), + visibility = ["//ruby:__pkg__"], +) diff --git a/ruby/extractor/BUILD.bazel b/ruby/extractor/BUILD.bazel new file mode 100644 index 00000000000..e859884085d --- /dev/null +++ b/ruby/extractor/BUILD.bazel @@ -0,0 +1,15 @@ +load("@ruby_deps//:defs.bzl", "aliases", "all_crate_deps") +load("@semmle_code//:common.bzl", "codeql_rust_binary") + +codeql_rust_binary( + name = "extractor", + srcs = glob(["src/*.rs"]), + aliases = aliases(), + proc_macro_deps = all_crate_deps( + proc_macro = True, + ), + visibility = ["//visibility:public"], + deps = all_crate_deps( + normal = True, + ), +) diff --git a/ruby/extractor/Cargo.lock b/ruby/extractor/Cargo.lock index 328e597dd3b..d5e8f132f24 100644 Binary files a/ruby/extractor/Cargo.lock and b/ruby/extractor/Cargo.lock differ diff --git a/ruby/extractor/Cargo.toml b/ruby/extractor/Cargo.toml index 066505c3ef6..8bb8cd96dce 100644 --- a/ruby/extractor/Cargo.toml +++ b/ruby/extractor/Cargo.toml @@ -5,8 +5,15 @@ version = "0.1.0" authors = ["GitHub"] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - +# When changing/updating these, the `cargo-bazel-lock.json` file has to be regenerated. +# Run `CARGO_BAZEL_REPIN=true CARGO_BAZEL_REPIN_ONLY=ruby_deps ./build --bazel sync --only=ruby_deps` +# in the `semmle-code` repository to do so. +# For more information, check out the documentation at +# https://bazelbuild.github.io/rules_rust/crate_universe.html#repinning--updating-dependencies +# In the future, the hope is to move this handling of the dependencies entirely into the `codeql` repository, +# but that depends on `rules_rust` being fully compatible with bzlmod, which they aren't yet +# (c.f. https://github.com/bazelbuild/rules_rust/issues/2452). +# Warning: The process takes >5min on my M1 mac, so do wait for a while. [dependencies] tree-sitter = "0.20" tree-sitter-embedded-template = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template.git", rev = "203f7bd3c1bbfbd98fc19add4b8fcb213c059205" } @@ -18,4 +25,13 @@ rayon = "1.5.0" regex = "1.7.1" encoding = "0.2" lazy_static = "1.4.0" -codeql-extractor = { path = "../../shared/tree-sitter-extractor" } +# Ideally, we'd like to pull this in via a relative path. +# However, our bazel/rust tooling chokes on this, c.f. https://github.com/bazelbuild/rules_rust/issues/1525 +# Therefore, to break that dependency, we depend on it via a git dependency instead. +# We should change this back to a path dependency once this issue is fixed. +# We can't depend on this without a rev/branch specification, as the rules_rust code assumes the default branch +# is called `master`, and if we pull this in with `branch=main`, then `cargo` works (and pins this at th current git SHA +# of lock-file update time, but `rules_rust` pins generates a bazel rule that unconditionally downloads `main`, which +# breaks build hermeticity. So, rev-pinning it is. +# See also https://github.com/bazelbuild/rules_rust/issues/2502. +codeql-extractor = { git = "https://github.com/github/codeql.git", rev = "514a92d5bd1e24e4b7367d64430762ffd1ffbe7f" } diff --git a/ruby/extractor/Cross.toml b/ruby/extractor/Cross.toml deleted file mode 100644 index f3ed51aee59..00000000000 --- a/ruby/extractor/Cross.toml +++ /dev/null @@ -1,8 +0,0 @@ -[target.x86_64-unknown-linux-gnu] -image = "centos/devtoolset-7-toolchain-centos7" - -[build.env] -# Provide the path to the shared extractor -# Cross mounts this directory as a volume, so builds inside the docker container -# can see it. -volumes = ["__CODEQL-EXTRACTOR=../../shared/tree-sitter-extractor"] diff --git a/ruby/extractor/cargo-bazel-lock.json b/ruby/extractor/cargo-bazel-lock.json new file mode 100644 index 00000000000..76a63d4376d --- /dev/null +++ b/ruby/extractor/cargo-bazel-lock.json @@ -0,0 +1,8381 @@ +{ + "checksum": "1c460a0aa044e422d51b182416888e0a45d131996cc1821a0fedbab3cd2b07bf", + "crates": { + "adler 1.0.2": { + "name": "adler", + "version": "1.0.2", + "package_url": "https://github.com/jonas-schievink/adler.git", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/adler/1.0.2/download", + "sha256": "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + } + }, + "targets": [ + { + "Library": { + "crate_name": "adler", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "adler", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "1.0.2" + }, + "license": "0BSD OR MIT OR Apache-2.0", + "license_ids": [ + "0BSD", + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "aho-corasick 0.7.20": { + "name": "aho-corasick", + "version": "0.7.20", + "package_url": "https://github.com/BurntSushi/aho-corasick", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/aho-corasick/0.7.20/download", + "sha256": "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" + } + }, + "targets": [ + { + "Library": { + "crate_name": "aho_corasick", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "aho_corasick", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "memchr 2.7.1", + "target": "memchr" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.7.20" + }, + "license": "Unlicense OR MIT", + "license_ids": [ + "MIT", + "Unlicense" + ], + "license_file": null + }, + "aho-corasick 1.1.2": { + "name": "aho-corasick", + "version": "1.1.2", + "package_url": "https://github.com/BurntSushi/aho-corasick", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/aho-corasick/1.1.2/download", + "sha256": "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "aho_corasick", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "aho_corasick", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "perf-literal", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "memchr 2.7.1", + "target": "memchr" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "1.1.2" + }, + "license": "Unlicense OR MIT", + "license_ids": [ + "MIT", + "Unlicense" + ], + "license_file": null + }, + "android_system_properties 0.1.5": { + "name": "android_system_properties", + "version": "0.1.5", + "package_url": "https://github.com/nical/android_system_properties", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/android_system_properties/0.1.5/download", + "sha256": "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" + } + }, + "targets": [ + { + "Library": { + "crate_name": "android_system_properties", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "android_system_properties", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.141", + "target": "libc" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.5" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "anstream 0.2.6": { + "name": "anstream", + "version": "0.2.6", + "package_url": "https://github.com/rust-cli/anstyle.git", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/anstream/0.2.6/download", + "sha256": "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "anstream", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "anstream", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "auto", + "default", + "wincon" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "anstyle 0.3.5", + "target": "anstyle" + }, + { + "id": "anstyle-parse 0.1.1", + "target": "anstyle_parse" + }, + { + "id": "concolor-override 1.0.0", + "target": "concolor_override" + }, + { + "id": "concolor-query 0.3.3", + "target": "concolor_query" + }, + { + "id": "is-terminal 0.4.6", + "target": "is_terminal" + }, + { + "id": "utf8parse 0.2.1", + "target": "utf8parse" + } + ], + "selects": { + "cfg(windows)": [ + { + "id": "anstyle-wincon 0.2.0", + "target": "anstyle_wincon" + } + ] + } + }, + "edition": "2021", + "version": "0.2.6" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "anstyle 0.3.5": { + "name": "anstyle", + "version": "0.3.5", + "package_url": "https://github.com/rust-cli/anstyle.git", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/anstyle/0.3.5/download", + "sha256": "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + } + }, + "targets": [ + { + "Library": { + "crate_name": "anstyle", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "anstyle", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "edition": "2021", + "version": "0.3.5" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "anstyle-parse 0.1.1": { + "name": "anstyle-parse", + "version": "0.1.1", + "package_url": "https://github.com/rust-cli/anstyle.git", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/anstyle-parse/0.1.1/download", + "sha256": "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" + } + }, + "targets": [ + { + "Library": { + "crate_name": "anstyle_parse", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "anstyle_parse", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "utf8" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "utf8parse 0.2.1", + "target": "utf8parse" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.1.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "anstyle-wincon 0.2.0": { + "name": "anstyle-wincon", + "version": "0.2.0", + "package_url": "https://github.com/rust-cli/anstyle.git", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/anstyle-wincon/0.2.0/download", + "sha256": "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" + } + }, + "targets": [ + { + "Library": { + "crate_name": "anstyle_wincon", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "anstyle_wincon", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "anstyle 0.3.5", + "target": "anstyle" + } + ], + "selects": { + "cfg(windows)": [ + { + "id": "windows-sys 0.45.0", + "target": "windows_sys" + } + ] + } + }, + "edition": "2021", + "version": "0.2.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "autocfg 1.1.0": { + "name": "autocfg", + "version": "1.1.0", + "package_url": "https://github.com/cuviper/autocfg", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/autocfg/1.1.0/download", + "sha256": "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + } + }, + "targets": [ + { + "Library": { + "crate_name": "autocfg", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "autocfg", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "1.1.0" + }, + "license": "Apache-2.0 OR MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "bitflags 1.3.2": { + "name": "bitflags", + "version": "1.3.2", + "package_url": "https://github.com/bitflags/bitflags", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/bitflags/1.3.2/download", + "sha256": "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "bitflags", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "bitflags", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "edition": "2018", + "version": "1.3.2" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "bstr 1.9.0": { + "name": "bstr", + "version": "1.9.0", + "package_url": "https://github.com/BurntSushi/bstr", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/bstr/1.9.0/download", + "sha256": "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" + } + }, + "targets": [ + { + "Library": { + "crate_name": "bstr", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "bstr", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "memchr 2.7.1", + "target": "memchr" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "1.9.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "bumpalo 3.12.0": { + "name": "bumpalo", + "version": "3.12.0", + "package_url": "https://github.com/fitzgen/bumpalo", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/bumpalo/3.12.0/download", + "sha256": "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" + } + }, + "targets": [ + { + "Library": { + "crate_name": "bumpalo", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "bumpalo", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "edition": "2021", + "version": "3.12.0" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "cc 1.0.79": { + "name": "cc", + "version": "1.0.79", + "package_url": "https://github.com/rust-lang/cc-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cc/1.0.79/download", + "sha256": "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "cc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.79" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "cfg-if 1.0.0": { + "name": "cfg-if", + "version": "1.0.0", + "package_url": "https://github.com/alexcrichton/cfg-if", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cfg-if/1.0.0/download", + "sha256": "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cfg_if", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "cfg_if", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.0" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "chrono 0.4.24": { + "name": "chrono", + "version": "0.4.24", + "package_url": "https://github.com/chronotope/chrono", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/chrono/0.4.24/download", + "sha256": "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "chrono", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "chrono", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "clock", + "default", + "iana-time-zone", + "js-sys", + "oldtime", + "serde", + "std", + "time", + "wasm-bindgen", + "wasmbind", + "winapi" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "num-integer 0.1.45", + "target": "num_integer" + }, + { + "id": "num-traits 0.2.15", + "target": "num_traits" + }, + { + "id": "serde 1.0.159", + "target": "serde" + }, + { + "id": "time 0.1.45", + "target": "time" + } + ], + "selects": { + "cfg(all(target_arch = \"wasm32\", not(any(target_os = \"emscripten\", target_os = \"wasi\"))))": [ + { + "id": "js-sys 0.3.61", + "target": "js_sys" + }, + { + "id": "wasm-bindgen 0.2.84", + "target": "wasm_bindgen" + } + ], + "cfg(unix)": [ + { + "id": "iana-time-zone 0.1.56", + "target": "iana_time_zone" + } + ], + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2018", + "version": "0.4.24" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "clap 4.2.1": { + "name": "clap", + "version": "4.2.1", + "package_url": "https://github.com/clap-rs/clap", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/clap/4.2.1/download", + "sha256": "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" + } + }, + "targets": [ + { + "Library": { + "crate_name": "clap", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "clap", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "color", + "default", + "derive", + "error-context", + "help", + "std", + "suggestions", + "usage" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "clap_builder 4.2.1", + "target": "clap_builder" + }, + { + "id": "once_cell 1.17.1", + "target": "once_cell" + } + ], + "selects": {} + }, + "edition": "2021", + "proc_macro_deps": { + "common": [ + { + "id": "clap_derive 4.2.0", + "target": "clap_derive" + } + ], + "selects": {} + }, + "version": "4.2.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "clap_builder 4.2.1": { + "name": "clap_builder", + "version": "4.2.1", + "package_url": "https://github.com/clap-rs/clap", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/clap_builder/4.2.1/download", + "sha256": "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "clap_builder", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "clap_builder", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "color", + "error-context", + "help", + "std", + "suggestions", + "usage" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "anstream 0.2.6", + "target": "anstream" + }, + { + "id": "anstyle 0.3.5", + "target": "anstyle" + }, + { + "id": "bitflags 1.3.2", + "target": "bitflags" + }, + { + "id": "clap_lex 0.4.1", + "target": "clap_lex" + }, + { + "id": "strsim 0.10.0", + "target": "strsim" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "4.2.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "clap_derive 4.2.0": { + "name": "clap_derive", + "version": "4.2.0", + "package_url": "https://github.com/clap-rs/clap/tree/master/clap_derive", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/clap_derive/4.2.0/download", + "sha256": "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "clap_derive", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "clap_derive", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "heck 0.4.1", + "target": "heck" + }, + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "syn 2.0.13", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "4.2.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "clap_lex 0.4.1": { + "name": "clap_lex", + "version": "0.4.1", + "package_url": "https://github.com/clap-rs/clap/tree/master/clap_lex", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/clap_lex/0.4.1/download", + "sha256": "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "clap_lex", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "clap_lex", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2021", + "version": "0.4.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "codeql-extractor 0.2.0": { + "name": "codeql-extractor", + "version": "0.2.0", + "package_url": null, + "repository": { + "Git": { + "remote": "https://github.com/github/codeql.git", + "commitish": { + "Rev": "514a92d5bd1e24e4b7367d64430762ffd1ffbe7f" + }, + "strip_prefix": "shared/tree-sitter-extractor" + } + }, + "targets": [ + { + "Library": { + "crate_name": "codeql_extractor", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "codeql_extractor", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "chrono 0.4.24", + "target": "chrono" + }, + { + "id": "encoding 0.2.33", + "target": "encoding" + }, + { + "id": "flate2 1.0.25", + "target": "flate2" + }, + { + "id": "globset 0.4.14", + "target": "globset" + }, + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + }, + { + "id": "num_cpus 1.15.0", + "target": "num_cpus" + }, + { + "id": "rayon 1.7.0", + "target": "rayon" + }, + { + "id": "regex 1.7.3", + "target": "regex" + }, + { + "id": "serde 1.0.159", + "target": "serde" + }, + { + "id": "serde_json 1.0.95", + "target": "serde_json" + }, + { + "id": "tracing 0.1.37", + "target": "tracing" + }, + { + "id": "tree-sitter 0.20.10", + "target": "tree_sitter" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.2.0" + }, + "license": null, + "license_ids": [], + "license_file": null + }, + "codeql-extractor-ruby 0.1.0": { + "name": "codeql-extractor-ruby", + "version": "0.1.0", + "package_url": null, + "repository": null, + "targets": [], + "library_target_name": null, + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "clap 4.2.1", + "target": "clap" + }, + { + "id": "codeql-extractor 0.2.0", + "target": "codeql_extractor" + }, + { + "id": "encoding 0.2.33", + "target": "encoding" + }, + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + }, + { + "id": "rayon 1.7.0", + "target": "rayon" + }, + { + "id": "regex 1.7.3", + "target": "regex" + }, + { + "id": "tracing 0.1.37", + "target": "tracing" + }, + { + "id": "tracing-subscriber 0.3.16", + "target": "tracing_subscriber" + }, + { + "id": "tree-sitter 0.20.10", + "target": "tree_sitter" + }, + { + "id": "tree-sitter-embedded-template 0.20.0", + "target": "tree_sitter_embedded_template" + }, + { + "id": "tree-sitter-ruby 0.20.0", + "target": "tree_sitter_ruby" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.0" + }, + "license": null, + "license_ids": [], + "license_file": null + }, + "codespan-reporting 0.11.1": { + "name": "codespan-reporting", + "version": "0.11.1", + "package_url": "https://github.com/brendanzab/codespan", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/codespan-reporting/0.11.1/download", + "sha256": "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "codespan_reporting", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "codespan_reporting", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "termcolor 1.2.0", + "target": "termcolor" + }, + { + "id": "unicode-width 0.1.10", + "target": "unicode_width" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.11.1" + }, + "license": "Apache-2.0", + "license_ids": [ + "Apache-2.0" + ], + "license_file": null + }, + "concolor-override 1.0.0": { + "name": "concolor-override", + "version": "1.0.0", + "package_url": "https://github.com/rust-cli/concolor", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/concolor-override/1.0.0/download", + "sha256": "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "concolor_override", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "concolor_override", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2021", + "version": "1.0.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "concolor-query 0.3.3": { + "name": "concolor-query", + "version": "0.3.3", + "package_url": "https://github.com/rust-cli/concolor", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/concolor-query/0.3.3/download", + "sha256": "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" + } + }, + "targets": [ + { + "Library": { + "crate_name": "concolor_query", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "concolor_query", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(windows)": [ + { + "id": "windows-sys 0.45.0", + "target": "windows_sys" + } + ] + } + }, + "edition": "2021", + "version": "0.3.3" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "core-foundation-sys 0.8.4": { + "name": "core-foundation-sys", + "version": "0.8.4", + "package_url": "https://github.com/servo/core-foundation-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/core-foundation-sys/0.8.4/download", + "sha256": "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + } + }, + "targets": [ + { + "Library": { + "crate_name": "core_foundation_sys", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "core_foundation_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.8.4" + }, + "license": "MIT / Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "crc32fast 1.3.2": { + "name": "crc32fast", + "version": "1.3.2", + "package_url": "https://github.com/srijs/rust-crc32fast", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crc32fast/1.3.2/download", + "sha256": "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crc32fast", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "crc32fast", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "crc32fast 1.3.2", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.3.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "crossbeam-channel 0.5.7": { + "name": "crossbeam-channel", + "version": "0.5.7", + "package_url": "https://github.com/crossbeam-rs/crossbeam", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crossbeam-channel/0.5.7/download", + "sha256": "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crossbeam_channel", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "crossbeam_channel", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "crossbeam-utils", + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "crossbeam-utils 0.8.15", + "target": "crossbeam_utils" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.5.7" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "crossbeam-deque 0.8.3": { + "name": "crossbeam-deque", + "version": "0.8.3", + "package_url": "https://github.com/crossbeam-rs/crossbeam", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crossbeam-deque/0.8.3/download", + "sha256": "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crossbeam_deque", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "crossbeam_deque", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "crossbeam-epoch", + "crossbeam-utils", + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "crossbeam-epoch 0.9.14", + "target": "crossbeam_epoch" + }, + { + "id": "crossbeam-utils 0.8.15", + "target": "crossbeam_utils" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.8.3" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "crossbeam-epoch 0.9.14": { + "name": "crossbeam-epoch", + "version": "0.9.14", + "package_url": "https://github.com/crossbeam-rs/crossbeam", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crossbeam-epoch/0.9.14/download", + "sha256": "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crossbeam_epoch", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "crossbeam_epoch", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "crossbeam-epoch 0.9.14", + "target": "build_script_build" + }, + { + "id": "crossbeam-utils 0.8.15", + "target": "crossbeam_utils" + }, + { + "id": "memoffset 0.8.0", + "target": "memoffset" + }, + { + "id": "scopeguard 1.1.0", + "target": "scopeguard" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.9.14" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "autocfg 1.1.0", + "target": "autocfg" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "crossbeam-utils 0.8.15": { + "name": "crossbeam-utils", + "version": "0.8.15", + "package_url": "https://github.com/crossbeam-rs/crossbeam", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/crossbeam-utils/0.8.15/download", + "sha256": "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "crossbeam_utils", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "crossbeam_utils", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "crossbeam-utils 0.8.15", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.8.15" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "cxx 1.0.94": { + "name": "cxx", + "version": "1.0.94", + "package_url": "https://github.com/dtolnay/cxx", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cxx/1.0.94/download", + "sha256": "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cxx", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "cxx", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cxx 1.0.94", + "target": "build_script_build" + }, + { + "id": "link-cplusplus 1.0.8", + "target": "link_cplusplus" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "cxxbridge-macro 1.0.94", + "target": "cxxbridge_macro" + } + ], + "selects": {} + }, + "version": "1.0.94" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.79", + "target": "cc" + }, + { + "id": "cxxbridge-flags 1.0.94", + "target": "cxxbridge_flags" + } + ], + "selects": {} + }, + "link_deps": { + "common": [ + { + "id": "link-cplusplus 1.0.8", + "target": "link_cplusplus" + } + ], + "selects": {} + }, + "links": "cxxbridge1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "cxx-build 1.0.94": { + "name": "cxx-build", + "version": "1.0.94", + "package_url": "https://github.com/dtolnay/cxx", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cxx-build/1.0.94/download", + "sha256": "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cxx_build", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "cxx_build", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.79", + "target": "cc" + }, + { + "id": "codespan-reporting 0.11.1", + "target": "codespan_reporting" + }, + { + "id": "once_cell 1.17.1", + "target": "once_cell" + }, + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "scratch 1.0.5", + "target": "scratch" + }, + { + "id": "syn 2.0.13", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.94" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "cxxbridge-flags 1.0.94": { + "name": "cxxbridge-flags", + "version": "1.0.94", + "package_url": "https://github.com/dtolnay/cxx", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cxxbridge-flags/1.0.94/download", + "sha256": "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" + } + }, + "targets": [ + { + "Library": { + "crate_name": "cxxbridge_flags", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "cxxbridge_flags", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.94" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "cxxbridge-macro 1.0.94": { + "name": "cxxbridge-macro", + "version": "1.0.94", + "package_url": "https://github.com/dtolnay/cxx", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/cxxbridge-macro/1.0.94/download", + "sha256": "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "cxxbridge_macro", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "cxxbridge_macro", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "syn 2.0.13", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.94" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "either 1.8.1": { + "name": "either", + "version": "1.8.1", + "package_url": "https://github.com/bluss/either", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/either/1.8.1/download", + "sha256": "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + } + }, + "targets": [ + { + "Library": { + "crate_name": "either", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "either", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.8.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "encoding 0.2.33": { + "name": "encoding", + "version": "0.2.33", + "package_url": "https://github.com/lifthrasiir/rust-encoding", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/encoding/0.2.33/download", + "sha256": "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" + } + }, + "targets": [ + { + "Library": { + "crate_name": "encoding", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "encoding", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "encoding-index-japanese 1.20141219.5", + "target": "encoding_index_japanese" + }, + { + "id": "encoding-index-korean 1.20141219.5", + "target": "encoding_index_korean" + }, + { + "id": "encoding-index-simpchinese 1.20141219.5", + "target": "encoding_index_simpchinese" + }, + { + "id": "encoding-index-singlebyte 1.20141219.5", + "target": "encoding_index_singlebyte" + }, + { + "id": "encoding-index-tradchinese 1.20141219.5", + "target": "encoding_index_tradchinese" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.2.33" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "encoding-index-japanese 1.20141219.5": { + "name": "encoding-index-japanese", + "version": "1.20141219.5", + "package_url": "https://github.com/lifthrasiir/rust-encoding", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/encoding-index-japanese/1.20141219.5/download", + "sha256": "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" + } + }, + "targets": [ + { + "Library": { + "crate_name": "encoding_index_japanese", + "crate_root": "lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "encoding_index_japanese", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "encoding_index_tests 0.1.4", + "target": "encoding_index_tests" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.20141219.5" + }, + "license": "CC0-1.0", + "license_ids": [ + "CC0-1.0" + ], + "license_file": null + }, + "encoding-index-korean 1.20141219.5": { + "name": "encoding-index-korean", + "version": "1.20141219.5", + "package_url": "https://github.com/lifthrasiir/rust-encoding", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/encoding-index-korean/1.20141219.5/download", + "sha256": "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" + } + }, + "targets": [ + { + "Library": { + "crate_name": "encoding_index_korean", + "crate_root": "lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "encoding_index_korean", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "encoding_index_tests 0.1.4", + "target": "encoding_index_tests" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.20141219.5" + }, + "license": "CC0-1.0", + "license_ids": [ + "CC0-1.0" + ], + "license_file": null + }, + "encoding-index-simpchinese 1.20141219.5": { + "name": "encoding-index-simpchinese", + "version": "1.20141219.5", + "package_url": "https://github.com/lifthrasiir/rust-encoding", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/encoding-index-simpchinese/1.20141219.5/download", + "sha256": "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" + } + }, + "targets": [ + { + "Library": { + "crate_name": "encoding_index_simpchinese", + "crate_root": "lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "encoding_index_simpchinese", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "encoding_index_tests 0.1.4", + "target": "encoding_index_tests" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.20141219.5" + }, + "license": "CC0-1.0", + "license_ids": [ + "CC0-1.0" + ], + "license_file": null + }, + "encoding-index-singlebyte 1.20141219.5": { + "name": "encoding-index-singlebyte", + "version": "1.20141219.5", + "package_url": "https://github.com/lifthrasiir/rust-encoding", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/encoding-index-singlebyte/1.20141219.5/download", + "sha256": "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "encoding_index_singlebyte", + "crate_root": "lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "encoding_index_singlebyte", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "encoding_index_tests 0.1.4", + "target": "encoding_index_tests" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.20141219.5" + }, + "license": "CC0-1.0", + "license_ids": [ + "CC0-1.0" + ], + "license_file": null + }, + "encoding-index-tradchinese 1.20141219.5": { + "name": "encoding-index-tradchinese", + "version": "1.20141219.5", + "package_url": "https://github.com/lifthrasiir/rust-encoding", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/encoding-index-tradchinese/1.20141219.5/download", + "sha256": "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" + } + }, + "targets": [ + { + "Library": { + "crate_name": "encoding_index_tradchinese", + "crate_root": "lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "encoding_index_tradchinese", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "encoding_index_tests 0.1.4", + "target": "encoding_index_tests" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.20141219.5" + }, + "license": "CC0-1.0", + "license_ids": [ + "CC0-1.0" + ], + "license_file": null + }, + "encoding_index_tests 0.1.4": { + "name": "encoding_index_tests", + "version": "0.1.4", + "package_url": "https://github.com/lifthrasiir/rust-encoding", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/encoding_index_tests/0.1.4/download", + "sha256": "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" + } + }, + "targets": [ + { + "Library": { + "crate_name": "encoding_index_tests", + "crate_root": "index_tests.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "encoding_index_tests", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.1.4" + }, + "license": "CC0-1.0", + "license_ids": [ + "CC0-1.0" + ], + "license_file": null + }, + "errno 0.3.0": { + "name": "errno", + "version": "0.3.0", + "package_url": "https://github.com/lambda-fairy/rust-errno", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/errno/0.3.0/download", + "sha256": "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "errno", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "errno", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(target_os = \"dragonfly\")": [ + { + "id": "errno-dragonfly 0.1.2", + "target": "errno_dragonfly" + } + ], + "cfg(target_os = \"hermit\")": [ + { + "id": "libc 0.2.141", + "target": "libc" + } + ], + "cfg(target_os = \"wasi\")": [ + { + "id": "libc 0.2.141", + "target": "libc" + } + ], + "cfg(unix)": [ + { + "id": "libc 0.2.141", + "target": "libc" + } + ], + "cfg(windows)": [ + { + "id": "windows-sys 0.45.0", + "target": "windows_sys" + } + ] + } + }, + "edition": "2018", + "version": "0.3.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "errno-dragonfly 0.1.2": { + "name": "errno-dragonfly", + "version": "0.1.2", + "package_url": "https://github.com/mneumann/errno-dragonfly-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/errno-dragonfly/0.1.2/download", + "sha256": "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" + } + }, + "targets": [ + { + "Library": { + "crate_name": "errno_dragonfly", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "errno_dragonfly", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "errno-dragonfly 0.1.2", + "target": "build_script_build" + }, + { + "id": "libc 0.2.141", + "target": "libc" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.79", + "target": "cc" + } + ], + "selects": {} + } + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "flate2 1.0.25": { + "name": "flate2", + "version": "1.0.25", + "package_url": "https://github.com/rust-lang/flate2-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/flate2/1.0.25/download", + "sha256": "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" + } + }, + "targets": [ + { + "Library": { + "crate_name": "flate2", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "flate2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "miniz_oxide", + "rust_backend" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "crc32fast 1.3.2", + "target": "crc32fast" + }, + { + "id": "miniz_oxide 0.6.2", + "target": "miniz_oxide" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.25" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "globset 0.4.14": { + "name": "globset", + "version": "0.4.14", + "package_url": "https://github.com/BurntSushi/ripgrep/tree/master/crates/globset", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/globset/0.4.14/download", + "sha256": "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "globset", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "globset", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "log" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "aho-corasick 1.1.2", + "target": "aho_corasick" + }, + { + "id": "bstr 1.9.0", + "target": "bstr" + }, + { + "id": "log 0.4.20", + "target": "log" + }, + { + "id": "regex-automata 0.4.3", + "target": "regex_automata" + }, + { + "id": "regex-syntax 0.8.2", + "target": "regex_syntax" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.4.14" + }, + "license": "Unlicense OR MIT", + "license_ids": [ + "MIT", + "Unlicense" + ], + "license_file": null + }, + "heck 0.4.1": { + "name": "heck", + "version": "0.4.1", + "package_url": "https://github.com/withoutboats/heck", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/heck/0.4.1/download", + "sha256": "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "heck", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "heck", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "edition": "2018", + "version": "0.4.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "hermit-abi 0.2.6": { + "name": "hermit-abi", + "version": "0.2.6", + "package_url": "https://github.com/hermitcore/rusty-hermit", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hermit-abi/0.2.6/download", + "sha256": "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hermit_abi", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "hermit_abi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.141", + "target": "libc" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.2.6" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "hermit-abi 0.3.1": { + "name": "hermit-abi", + "version": "0.3.1", + "package_url": "https://github.com/hermitcore/rusty-hermit", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hermit-abi/0.3.1/download", + "sha256": "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hermit_abi", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "hermit_abi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2021", + "version": "0.3.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "iana-time-zone 0.1.56": { + "name": "iana-time-zone", + "version": "0.1.56", + "package_url": "https://github.com/strawlab/iana-time-zone", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/iana-time-zone/0.1.56/download", + "sha256": "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "iana_time_zone", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "iana_time_zone", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "fallback" + ], + "selects": {} + }, + "deps": { + "common": [], + "selects": { + "cfg(any(target_os = \"macos\", target_os = \"ios\"))": [ + { + "id": "core-foundation-sys 0.8.4", + "target": "core_foundation_sys" + } + ], + "cfg(target_arch = \"wasm32\")": [ + { + "id": "js-sys 0.3.61", + "target": "js_sys" + }, + { + "id": "wasm-bindgen 0.2.84", + "target": "wasm_bindgen" + } + ], + "cfg(target_os = \"android\")": [ + { + "id": "android_system_properties 0.1.5", + "target": "android_system_properties" + } + ], + "cfg(target_os = \"haiku\")": [ + { + "id": "iana-time-zone-haiku 0.1.1", + "target": "iana_time_zone_haiku" + } + ], + "cfg(target_os = \"windows\")": [ + { + "id": "windows 0.48.0", + "target": "windows" + } + ] + } + }, + "edition": "2018", + "version": "0.1.56" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "iana-time-zone-haiku 0.1.1": { + "name": "iana-time-zone-haiku", + "version": "0.1.1", + "package_url": "https://github.com/strawlab/iana-time-zone", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/iana-time-zone-haiku/0.1.1/download", + "sha256": "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" + } + }, + "targets": [ + { + "Library": { + "crate_name": "iana_time_zone_haiku", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "iana_time_zone_haiku", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cxx 1.0.94", + "target": "cxx" + }, + { + "id": "iana-time-zone-haiku 0.1.1", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.1" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cxx-build 1.0.94", + "target": "cxx_build" + } + ], + "selects": {} + }, + "link_deps": { + "common": [ + { + "id": "cxx 1.0.94", + "target": "cxx" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "io-lifetimes 1.0.10": { + "name": "io-lifetimes", + "version": "1.0.10", + "package_url": "https://github.com/sunfishcode/io-lifetimes", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/io-lifetimes/1.0.10/download", + "sha256": "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" + } + }, + "targets": [ + { + "Library": { + "crate_name": "io_lifetimes", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "io_lifetimes", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "close", + "default", + "hermit-abi", + "libc", + "windows-sys" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "io-lifetimes 1.0.10", + "target": "build_script_build" + } + ], + "selects": { + "cfg(not(windows))": [ + { + "id": "libc 0.2.141", + "target": "libc" + } + ], + "cfg(target_os = \"hermit\")": [ + { + "id": "hermit-abi 0.3.1", + "target": "hermit_abi" + } + ], + "cfg(windows)": [ + { + "id": "windows-sys 0.48.0", + "target": "windows_sys" + } + ] + } + }, + "edition": "2018", + "version": "1.0.10" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "is-terminal 0.4.6": { + "name": "is-terminal", + "version": "0.4.6", + "package_url": "https://github.com/sunfishcode/is-terminal", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/is-terminal/0.4.6/download", + "sha256": "256017f749ab3117e93acb91063009e1f1bb56d03965b14c2c8df4eb02c524d8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "is_terminal", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "is_terminal", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "io-lifetimes 1.0.10", + "target": "io_lifetimes" + } + ], + "selects": { + "cfg(not(any(windows, target_os = \"hermit\", target_os = \"unknown\")))": [ + { + "id": "rustix 0.37.7", + "target": "rustix" + } + ], + "cfg(target_os = \"hermit\")": [ + { + "id": "hermit-abi 0.3.1", + "target": "hermit_abi" + } + ], + "cfg(windows)": [ + { + "id": "windows-sys 0.45.0", + "target": "windows_sys" + } + ] + } + }, + "edition": "2018", + "version": "0.4.6" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "itoa 1.0.6": { + "name": "itoa", + "version": "1.0.6", + "package_url": "https://github.com/dtolnay/itoa", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/itoa/1.0.6/download", + "sha256": "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" + } + }, + "targets": [ + { + "Library": { + "crate_name": "itoa", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "itoa", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.6" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "js-sys 0.3.61": { + "name": "js-sys", + "version": "0.3.61", + "package_url": "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/js-sys", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/js-sys/0.3.61/download", + "sha256": "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" + } + }, + "targets": [ + { + "Library": { + "crate_name": "js_sys", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "js_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "wasm-bindgen 0.2.84", + "target": "wasm_bindgen" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.3.61" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "lazy_static 1.4.0": { + "name": "lazy_static", + "version": "1.4.0", + "package_url": "https://github.com/rust-lang-nursery/lazy-static.rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/lazy_static/1.4.0/download", + "sha256": "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + } + }, + "targets": [ + { + "Library": { + "crate_name": "lazy_static", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "lazy_static", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "1.4.0" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "libc 0.2.141": { + "name": "libc", + "version": "0.2.141", + "package_url": "https://github.com/rust-lang/libc", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/libc/0.2.141/download", + "sha256": "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" + } + }, + "targets": [ + { + "Library": { + "crate_name": "libc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "libc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": { + "aarch64-apple-darwin": [ + "extra_traits" + ], + "aarch64-apple-ios": [ + "extra_traits" + ], + "aarch64-apple-ios-sim": [ + "extra_traits" + ], + "aarch64-fuchsia": [ + "extra_traits" + ], + "aarch64-linux-android": [ + "extra_traits" + ], + "aarch64-unknown-linux-gnu": [ + "extra_traits" + ], + "aarch64-unknown-nixos-gnu": [ + "extra_traits" + ], + "aarch64-unknown-nto-qnx710": [ + "extra_traits" + ], + "arm-unknown-linux-gnueabi": [ + "extra_traits" + ], + "armv7-linux-androideabi": [ + "extra_traits" + ], + "armv7-unknown-linux-gnueabi": [ + "extra_traits" + ], + "i686-apple-darwin": [ + "extra_traits" + ], + "i686-linux-android": [ + "extra_traits" + ], + "i686-unknown-freebsd": [ + "extra_traits" + ], + "i686-unknown-linux-gnu": [ + "extra_traits" + ], + "powerpc-unknown-linux-gnu": [ + "extra_traits" + ], + "riscv32imc-unknown-none-elf": [ + "extra_traits" + ], + "riscv64gc-unknown-none-elf": [ + "extra_traits" + ], + "s390x-unknown-linux-gnu": [ + "extra_traits" + ], + "thumbv7em-none-eabi": [ + "extra_traits" + ], + "thumbv8m.main-none-eabi": [ + "extra_traits" + ], + "wasm32-wasi": [ + "extra_traits" + ], + "x86_64-apple-darwin": [ + "extra_traits" + ], + "x86_64-apple-ios": [ + "extra_traits" + ], + "x86_64-fuchsia": [ + "extra_traits" + ], + "x86_64-linux-android": [ + "extra_traits" + ], + "x86_64-unknown-freebsd": [ + "extra_traits" + ], + "x86_64-unknown-linux-gnu": [ + "extra_traits" + ], + "x86_64-unknown-nixos-gnu": [ + "extra_traits" + ], + "x86_64-unknown-none": [ + "extra_traits" + ] + } + }, + "deps": { + "common": [ + { + "id": "libc 0.2.141", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.2.141" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "link-cplusplus 1.0.8": { + "name": "link-cplusplus", + "version": "1.0.8", + "package_url": "https://github.com/dtolnay/link-cplusplus", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/link-cplusplus/1.0.8/download", + "sha256": "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" + } + }, + "targets": [ + { + "Library": { + "crate_name": "link_cplusplus", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "link_cplusplus", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "link-cplusplus 1.0.8", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.8" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.79", + "target": "cc" + } + ], + "selects": {} + }, + "links": "cplusplus" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "linux-raw-sys 0.3.1": { + "name": "linux-raw-sys", + "version": "0.3.1", + "package_url": "https://github.com/sunfishcode/linux-raw-sys", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/linux-raw-sys/0.3.1/download", + "sha256": "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "linux_raw_sys", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "linux_raw_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "general", + "no_std" + ], + "selects": { + "aarch64-unknown-linux-gnu": [ + "errno", + "ioctl" + ], + "aarch64-unknown-nixos-gnu": [ + "errno", + "ioctl" + ], + "arm-unknown-linux-gnueabi": [ + "errno", + "ioctl" + ], + "armv7-unknown-linux-gnueabi": [ + "errno", + "ioctl" + ], + "i686-unknown-linux-gnu": [ + "errno", + "ioctl" + ], + "x86_64-unknown-linux-gnu": [ + "errno", + "ioctl" + ], + "x86_64-unknown-nixos-gnu": [ + "errno", + "ioctl" + ] + } + }, + "edition": "2018", + "version": "0.3.1" + }, + "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "log 0.4.20": { + "name": "log", + "version": "0.4.20", + "package_url": "https://github.com/rust-lang/log", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/log/0.4.20/download", + "sha256": "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "log", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "log", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "std" + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.20" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "matchers 0.1.0": { + "name": "matchers", + "version": "0.1.0", + "package_url": "https://github.com/hawkw/matchers", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/matchers/0.1.0/download", + "sha256": "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" + } + }, + "targets": [ + { + "Library": { + "crate_name": "matchers", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "matchers", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "regex-automata 0.1.10", + "target": "regex_automata" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.0" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "memchr 2.7.1": { + "name": "memchr", + "version": "2.7.1", + "package_url": "https://github.com/BurntSushi/memchr", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/memchr/2.7.1/download", + "sha256": "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + } + }, + "targets": [ + { + "Library": { + "crate_name": "memchr", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "memchr", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "default", + "std" + ], + "selects": {} + }, + "edition": "2021", + "version": "2.7.1" + }, + "license": "Unlicense OR MIT", + "license_ids": [ + "MIT", + "Unlicense" + ], + "license_file": null + }, + "memoffset 0.8.0": { + "name": "memoffset", + "version": "0.8.0", + "package_url": "https://github.com/Gilnaa/memoffset", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/memoffset/0.8.0/download", + "sha256": "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "memoffset", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "memoffset", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "memoffset 0.8.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.8.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "autocfg 1.1.0", + "target": "autocfg" + } + ], + "selects": {} + } + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "miniz_oxide 0.6.2": { + "name": "miniz_oxide", + "version": "0.6.2", + "package_url": "https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/miniz_oxide/0.6.2/download", + "sha256": "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" + } + }, + "targets": [ + { + "Library": { + "crate_name": "miniz_oxide", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "miniz_oxide", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "with-alloc" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "adler 1.0.2", + "target": "adler" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.6.2" + }, + "license": "MIT OR Zlib OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT", + "Zlib" + ], + "license_file": null + }, + "nu-ansi-term 0.46.0": { + "name": "nu-ansi-term", + "version": "0.46.0", + "package_url": "https://github.com/nushell/nu-ansi-term", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/nu-ansi-term/0.46.0/download", + "sha256": "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" + } + }, + "targets": [ + { + "Library": { + "crate_name": "nu_ansi_term", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "nu_ansi_term", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "overload 0.1.1", + "target": "overload" + } + ], + "selects": { + "cfg(target_os = \"windows\")": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2018", + "version": "0.46.0" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "num-integer 0.1.45": { + "name": "num-integer", + "version": "0.1.45", + "package_url": "https://github.com/rust-num/num-integer", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-integer/0.1.45/download", + "sha256": "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_integer", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "num_integer", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "num-integer 0.1.45", + "target": "build_script_build" + }, + { + "id": "num-traits 0.2.15", + "target": "num_traits" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.45" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "autocfg 1.1.0", + "target": "autocfg" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "num-traits 0.2.15": { + "name": "num-traits", + "version": "0.2.15", + "package_url": "https://github.com/rust-num/num-traits", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num-traits/0.2.15/download", + "sha256": "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_traits", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "num_traits", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "num-traits 0.2.15", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.2.15" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "autocfg 1.1.0", + "target": "autocfg" + } + ], + "selects": {} + } + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "num_cpus 1.15.0": { + "name": "num_cpus", + "version": "1.15.0", + "package_url": "https://github.com/seanmonstar/num_cpus", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/num_cpus/1.15.0/download", + "sha256": "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "num_cpus", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "num_cpus", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(all(any(target_arch = \"x86_64\", target_arch = \"aarch64\"), target_os = \"hermit\"))": [ + { + "id": "hermit-abi 0.2.6", + "target": "hermit_abi" + } + ], + "cfg(not(windows))": [ + { + "id": "libc 0.2.141", + "target": "libc" + } + ] + } + }, + "edition": "2015", + "version": "1.15.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "once_cell 1.17.1": { + "name": "once_cell", + "version": "1.17.1", + "package_url": "https://github.com/matklad/once_cell", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/once_cell/1.17.1/download", + "sha256": "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" + } + }, + "targets": [ + { + "Library": { + "crate_name": "once_cell", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "once_cell", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "default", + "race", + "std" + ], + "selects": {} + }, + "edition": "2021", + "version": "1.17.1" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "overload 0.1.1": { + "name": "overload", + "version": "0.1.1", + "package_url": "https://github.com/danaugrs/overload", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/overload/0.1.1/download", + "sha256": "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + } + }, + "targets": [ + { + "Library": { + "crate_name": "overload", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "overload", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.1.1" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "pin-project-lite 0.2.9": { + "name": "pin-project-lite", + "version": "0.2.9", + "package_url": "https://github.com/taiki-e/pin-project-lite", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/pin-project-lite/0.2.9/download", + "sha256": "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + } + }, + "targets": [ + { + "Library": { + "crate_name": "pin_project_lite", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "pin_project_lite", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "0.2.9" + }, + "license": "Apache-2.0 OR MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "proc-macro2 1.0.56": { + "name": "proc-macro2", + "version": "1.0.56", + "package_url": "https://github.com/dtolnay/proc-macro2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/proc-macro2/1.0.56/download", + "sha256": "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" + } + }, + "targets": [ + { + "Library": { + "crate_name": "proc_macro2", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "proc_macro2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "proc-macro" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.56", + "target": "build_script_build" + }, + { + "id": "unicode-ident 1.0.8", + "target": "unicode_ident" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.56" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "quote 1.0.26": { + "name": "quote", + "version": "1.0.26", + "package_url": "https://github.com/dtolnay/quote", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/quote/1.0.26/download", + "sha256": "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" + } + }, + "targets": [ + { + "Library": { + "crate_name": "quote", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "quote", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "proc-macro" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.26" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "rayon 1.7.0": { + "name": "rayon", + "version": "1.7.0", + "package_url": "https://github.com/rayon-rs/rayon", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rayon/1.7.0/download", + "sha256": "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rayon", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "rayon", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "either 1.8.1", + "target": "either" + }, + { + "id": "rayon-core 1.11.0", + "target": "rayon_core" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "1.7.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "rayon-core 1.11.0": { + "name": "rayon-core", + "version": "1.11.0", + "package_url": "https://github.com/rayon-rs/rayon", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rayon-core/1.11.0/download", + "sha256": "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rayon_core", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "rayon_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "crossbeam-channel 0.5.7", + "target": "crossbeam_channel" + }, + { + "id": "crossbeam-deque 0.8.3", + "target": "crossbeam_deque" + }, + { + "id": "crossbeam-utils 0.8.15", + "target": "crossbeam_utils" + }, + { + "id": "num_cpus 1.15.0", + "target": "num_cpus" + }, + { + "id": "rayon-core 1.11.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "1.11.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "links": "rayon-core" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "regex 1.7.3": { + "name": "regex", + "version": "1.7.3", + "package_url": "https://github.com/rust-lang/regex", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/regex/1.7.3/download", + "sha256": "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "regex", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "regex", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "aho-corasick", + "default", + "memchr", + "perf", + "perf-cache", + "perf-dfa", + "perf-inline", + "perf-literal", + "std", + "unicode", + "unicode-age", + "unicode-bool", + "unicode-case", + "unicode-gencat", + "unicode-perl", + "unicode-script", + "unicode-segment" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "aho-corasick 0.7.20", + "target": "aho_corasick" + }, + { + "id": "memchr 2.7.1", + "target": "memchr" + }, + { + "id": "regex-syntax 0.6.29", + "target": "regex_syntax" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.7.3" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "regex-automata 0.1.10": { + "name": "regex-automata", + "version": "0.1.10", + "package_url": "https://github.com/BurntSushi/regex-automata", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/regex-automata/0.1.10/download", + "sha256": "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + } + }, + "targets": [ + { + "Library": { + "crate_name": "regex_automata", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "regex_automata", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "regex-syntax", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "regex-syntax 0.6.29", + "target": "regex_syntax" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.1.10" + }, + "license": "Unlicense/MIT", + "license_ids": [ + "MIT", + "Unlicense" + ], + "license_file": null + }, + "regex-automata 0.4.3": { + "name": "regex-automata", + "version": "0.4.3", + "package_url": "https://github.com/rust-lang/regex/tree/master/regex-automata", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/regex-automata/0.4.3/download", + "sha256": "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "regex_automata", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "regex_automata", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "hybrid", + "meta", + "nfa", + "nfa-backtrack", + "nfa-pikevm", + "nfa-thompson", + "perf", + "perf-inline", + "perf-literal", + "perf-literal-multisubstring", + "perf-literal-substring", + "std", + "syntax" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "aho-corasick 1.1.2", + "target": "aho_corasick" + }, + { + "id": "memchr 2.7.1", + "target": "memchr" + }, + { + "id": "regex-syntax 0.8.2", + "target": "regex_syntax" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.4.3" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "regex-syntax 0.6.29": { + "name": "regex-syntax", + "version": "0.6.29", + "package_url": "https://github.com/rust-lang/regex", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/regex-syntax/0.6.29/download", + "sha256": "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "regex_syntax", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "regex_syntax", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "unicode", + "unicode-age", + "unicode-bool", + "unicode-case", + "unicode-gencat", + "unicode-perl", + "unicode-script", + "unicode-segment" + ], + "selects": {} + }, + "edition": "2018", + "version": "0.6.29" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "regex-syntax 0.8.2": { + "name": "regex-syntax", + "version": "0.8.2", + "package_url": "https://github.com/rust-lang/regex/tree/master/regex-syntax", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/regex-syntax/0.8.2/download", + "sha256": "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "regex_syntax", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "regex_syntax", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "std" + ], + "selects": {} + }, + "edition": "2021", + "version": "0.8.2" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "rustix 0.37.7": { + "name": "rustix", + "version": "0.37.7", + "package_url": "https://github.com/bytecodealliance/rustix", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/rustix/0.37.7/download", + "sha256": "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "rustix", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "rustix", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "io-lifetimes", + "libc", + "std", + "termios", + "use-libc-auxv" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "bitflags 1.3.2", + "target": "bitflags" + }, + { + "id": "io-lifetimes 1.0.10", + "target": "io_lifetimes" + }, + { + "id": "rustix 0.37.7", + "target": "build_script_build" + } + ], + "selects": { + "cfg(all(any(target_os = \"android\", target_os = \"linux\"), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\"))))))))": [ + { + "id": "linux-raw-sys 0.3.1", + "target": "linux_raw_sys" + } + ], + "cfg(all(not(rustix_use_libc), not(miri), target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\")))))": [ + { + "id": "libc 0.2.141", + "target": "libc" + }, + { + "id": "linux-raw-sys 0.3.1", + "target": "linux_raw_sys" + } + ], + "cfg(any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\")))))))": [ + { + "id": "errno 0.3.0", + "target": "errno", + "alias": "libc_errno" + }, + { + "id": "libc 0.2.141", + "target": "libc" + } + ], + "cfg(windows)": [ + { + "id": "windows-sys 0.45.0", + "target": "windows_sys" + } + ] + } + }, + "edition": "2018", + "version": "0.37.7" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "ryu 1.0.13": { + "name": "ryu", + "version": "1.0.13", + "package_url": "https://github.com/dtolnay/ryu", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/ryu/1.0.13/download", + "sha256": "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" + } + }, + "targets": [ + { + "Library": { + "crate_name": "ryu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "ryu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.13" + }, + "license": "Apache-2.0 OR BSL-1.0", + "license_ids": [ + "Apache-2.0", + "BSL-1.0" + ], + "license_file": null + }, + "scopeguard 1.1.0": { + "name": "scopeguard", + "version": "1.1.0", + "package_url": "https://github.com/bluss/scopeguard", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/scopeguard/1.1.0/download", + "sha256": "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + } + }, + "targets": [ + { + "Library": { + "crate_name": "scopeguard", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "scopeguard", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "1.1.0" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "scratch 1.0.5": { + "name": "scratch", + "version": "1.0.5", + "package_url": "https://github.com/dtolnay/scratch", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/scratch/1.0.5/download", + "sha256": "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "scratch", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "scratch", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "scratch 1.0.5", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.0.5" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "serde 1.0.159": { + "name": "serde", + "version": "1.0.159", + "package_url": "https://github.com/serde-rs/serde", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde/1.0.159/download", + "sha256": "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" + } + }, + "targets": [ + { + "Library": { + "crate_name": "serde", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "serde", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "derive", + "serde_derive", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "serde 1.0.159", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "proc_macro_deps": { + "common": [ + { + "id": "serde_derive 1.0.159", + "target": "serde_derive" + } + ], + "selects": {} + }, + "version": "1.0.159" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "serde_derive 1.0.159": { + "name": "serde_derive", + "version": "1.0.159", + "package_url": "https://github.com/serde-rs/serde", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde_derive/1.0.159/download", + "sha256": "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "serde_derive", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "serde_derive", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "serde_derive 1.0.159", + "target": "build_script_build" + }, + { + "id": "syn 2.0.13", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "1.0.159" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "serde_json 1.0.95": { + "name": "serde_json", + "version": "1.0.95", + "package_url": "https://github.com/serde-rs/json", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde_json/1.0.95/download", + "sha256": "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" + } + }, + "targets": [ + { + "Library": { + "crate_name": "serde_json", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "serde_json", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "itoa 1.0.6", + "target": "itoa" + }, + { + "id": "ryu 1.0.13", + "target": "ryu" + }, + { + "id": "serde 1.0.159", + "target": "serde" + }, + { + "id": "serde_json 1.0.95", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.95" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "sharded-slab 0.1.4": { + "name": "sharded-slab", + "version": "0.1.4", + "package_url": "https://github.com/hawkw/sharded-slab", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/sharded-slab/0.1.4/download", + "sha256": "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" + } + }, + "targets": [ + { + "Library": { + "crate_name": "sharded_slab", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "sharded_slab", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.4" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "smallvec 1.10.0": { + "name": "smallvec", + "version": "1.10.0", + "package_url": "https://github.com/servo/rust-smallvec", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/smallvec/1.10.0/download", + "sha256": "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "smallvec", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "smallvec", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.10.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "strsim 0.10.0": { + "name": "strsim", + "version": "0.10.0", + "package_url": "https://github.com/dguo/strsim-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/strsim/0.10.0/download", + "sha256": "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + } + }, + "targets": [ + { + "Library": { + "crate_name": "strsim", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "strsim", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.10.0" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "syn 1.0.109": { + "name": "syn", + "version": "1.0.109", + "package_url": "https://github.com/dtolnay/syn", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/syn/1.0.109/download", + "sha256": "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" + } + }, + "targets": [ + { + "Library": { + "crate_name": "syn", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "syn", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "clone-impls", + "extra-traits", + "full", + "parsing", + "printing", + "proc-macro", + "quote", + "visit", + "visit-mut" + ], + "selects": { + "wasm32-unknown-unknown": [ + "default", + "derive" + ] + } + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "syn 1.0.109", + "target": "build_script_build" + }, + { + "id": "unicode-ident 1.0.8", + "target": "unicode_ident" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.109" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "syn 2.0.13": { + "name": "syn", + "version": "2.0.13", + "package_url": "https://github.com/dtolnay/syn", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/syn/2.0.13/download", + "sha256": "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" + } + }, + "targets": [ + { + "Library": { + "crate_name": "syn", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "syn", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "clone-impls", + "default", + "derive", + "full", + "parsing", + "printing", + "proc-macro", + "quote" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "unicode-ident 1.0.8", + "target": "unicode_ident" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "2.0.13" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "termcolor 1.2.0": { + "name": "termcolor", + "version": "1.2.0", + "package_url": "https://github.com/BurntSushi/termcolor", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/termcolor/1.2.0/download", + "sha256": "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" + } + }, + "targets": [ + { + "Library": { + "crate_name": "termcolor", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "termcolor", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(windows)": [ + { + "id": "winapi-util 0.1.5", + "target": "winapi_util" + } + ] + } + }, + "edition": "2018", + "version": "1.2.0" + }, + "license": "Unlicense OR MIT", + "license_ids": [ + "MIT", + "Unlicense" + ], + "license_file": null + }, + "thread_local 1.1.7": { + "name": "thread_local", + "version": "1.1.7", + "package_url": "https://github.com/Amanieu/thread_local-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/thread_local/1.1.7/download", + "sha256": "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" + } + }, + "targets": [ + { + "Library": { + "crate_name": "thread_local", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "thread_local", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "once_cell 1.17.1", + "target": "once_cell" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "1.1.7" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "time 0.1.45": { + "name": "time", + "version": "0.1.45", + "package_url": "https://github.com/time-rs/time", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/time/0.1.45/download", + "sha256": "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "time", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "time", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "libc 0.2.141", + "target": "libc" + } + ], + "selects": { + "cfg(target_os = \"wasi\")": [ + { + "id": "wasi 0.10.0+wasi-snapshot-preview1", + "target": "wasi" + } + ], + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2015", + "version": "0.1.45" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "tracing 0.1.37": { + "name": "tracing", + "version": "0.1.37", + "package_url": "https://github.com/tokio-rs/tracing", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tracing/0.1.37/download", + "sha256": "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tracing", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tracing", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "attributes", + "default", + "std", + "tracing-attributes" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "pin-project-lite 0.2.9", + "target": "pin_project_lite" + }, + { + "id": "tracing-core 0.1.30", + "target": "tracing_core" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "tracing-attributes 0.1.23", + "target": "tracing_attributes" + } + ], + "selects": {} + }, + "version": "0.1.37" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "tracing-attributes 0.1.23": { + "name": "tracing-attributes", + "version": "0.1.23", + "package_url": "https://github.com/tokio-rs/tracing", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tracing-attributes/0.1.23/download", + "sha256": "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "tracing_attributes", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tracing_attributes", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "syn 1.0.109", + "target": "syn" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.23" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "tracing-core 0.1.30": { + "name": "tracing-core", + "version": "0.1.30", + "package_url": "https://github.com/tokio-rs/tracing", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tracing-core/0.1.30/download", + "sha256": "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tracing_core", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tracing_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "once_cell", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "once_cell 1.17.1", + "target": "once_cell" + } + ], + "selects": { + "cfg(tracing_unstable)": [ + { + "id": "valuable 0.1.0", + "target": "valuable" + } + ] + } + }, + "edition": "2018", + "version": "0.1.30" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "tracing-log 0.1.3": { + "name": "tracing-log", + "version": "0.1.3", + "package_url": "https://github.com/tokio-rs/tracing", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tracing-log/0.1.3/download", + "sha256": "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tracing_log", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tracing_log", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "log-tracer", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "lazy_static 1.4.0", + "target": "lazy_static" + }, + { + "id": "log 0.4.20", + "target": "log" + }, + { + "id": "tracing-core 0.1.30", + "target": "tracing_core" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.3" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "tracing-subscriber 0.3.16": { + "name": "tracing-subscriber", + "version": "0.3.16", + "package_url": "https://github.com/tokio-rs/tracing", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tracing-subscriber/0.3.16/download", + "sha256": "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tracing_subscriber", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tracing_subscriber", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "alloc", + "ansi", + "default", + "env-filter", + "fmt", + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "registry", + "sharded-slab", + "smallvec", + "std", + "thread_local", + "tracing", + "tracing-log" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "matchers 0.1.0", + "target": "matchers" + }, + { + "id": "nu-ansi-term 0.46.0", + "target": "nu_ansi_term" + }, + { + "id": "once_cell 1.17.1", + "target": "once_cell" + }, + { + "id": "regex 1.7.3", + "target": "regex" + }, + { + "id": "sharded-slab 0.1.4", + "target": "sharded_slab" + }, + { + "id": "smallvec 1.10.0", + "target": "smallvec" + }, + { + "id": "thread_local 1.1.7", + "target": "thread_local" + }, + { + "id": "tracing 0.1.37", + "target": "tracing" + }, + { + "id": "tracing-core 0.1.30", + "target": "tracing_core" + }, + { + "id": "tracing-log 0.1.3", + "target": "tracing_log" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.3.16" + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "tree-sitter 0.20.10": { + "name": "tree-sitter", + "version": "0.20.10", + "package_url": "https://github.com/tree-sitter/tree-sitter", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/tree-sitter/0.20.10/download", + "sha256": "e747b1f9b7b931ed39a548c1fae149101497de3c1fc8d9e18c62c1a66c683d3d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "tree_sitter", + "crate_root": "binding_rust/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "binding_rust/build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tree_sitter", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "regex 1.7.3", + "target": "regex" + }, + { + "id": "tree-sitter 0.20.10", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.20.10" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.79", + "target": "cc" + } + ], + "selects": {} + } + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "tree-sitter-embedded-template 0.20.0": { + "name": "tree-sitter-embedded-template", + "version": "0.20.0", + "package_url": "https://github.com/tree-sitter/tree-sitter-embedded-template", + "repository": { + "Git": { + "remote": "https://github.com/tree-sitter/tree-sitter-embedded-template.git", + "commitish": { + "Rev": "203f7bd3c1bbfbd98fc19add4b8fcb213c059205" + } + } + }, + "targets": [ + { + "Library": { + "crate_name": "tree_sitter_embedded_template", + "crate_root": "bindings/rust/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "bindings/rust/build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tree_sitter_embedded_template", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "tree-sitter 0.20.10", + "target": "tree_sitter" + }, + { + "id": "tree-sitter-embedded-template 0.20.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.20.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.79", + "target": "cc" + } + ], + "selects": {} + } + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "tree-sitter-ruby 0.20.0": { + "name": "tree-sitter-ruby", + "version": "0.20.0", + "package_url": "https://github.com/tree-sitter/tree-sitter-ruby", + "repository": { + "Git": { + "remote": "https://github.com/tree-sitter/tree-sitter-ruby.git", + "commitish": { + "Rev": "4d9ad3f010fdc47a8433adcf9ae30c8eb8475ae7" + } + } + }, + "targets": [ + { + "Library": { + "crate_name": "tree_sitter_ruby", + "crate_root": "bindings/rust/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "bindings/rust/build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "tree_sitter_ruby", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "tree-sitter 0.20.10", + "target": "tree_sitter" + }, + { + "id": "tree-sitter-ruby 0.20.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.20.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "cc 1.0.79", + "target": "cc" + } + ], + "selects": {} + } + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "unicode-ident 1.0.8": { + "name": "unicode-ident", + "version": "1.0.8", + "package_url": "https://github.com/dtolnay/unicode-ident", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-ident/1.0.8/download", + "sha256": "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_ident", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "unicode_ident", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2018", + "version": "1.0.8" + }, + "license": "(MIT OR Apache-2.0) AND Unicode-DFS-2016", + "license_ids": [ + "Apache-2.0", + "MIT", + "Unicode-DFS-2016" + ], + "license_file": null + }, + "unicode-width 0.1.10": { + "name": "unicode-width", + "version": "0.1.10", + "package_url": "https://github.com/unicode-rs/unicode-width", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/unicode-width/0.1.10/download", + "sha256": "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "unicode_width", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "unicode_width", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "edition": "2015", + "version": "0.1.10" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "utf8parse 0.2.1": { + "name": "utf8parse", + "version": "0.2.1", + "package_url": "https://github.com/alacritty/vte", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/utf8parse/0.2.1/download", + "sha256": "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "utf8parse", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "utf8parse", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default" + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.1" + }, + "license": "Apache-2.0 OR MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "valuable 0.1.0": { + "name": "valuable", + "version": "0.1.0", + "package_url": "https://github.com/tokio-rs/valuable", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/valuable/0.1.0/download", + "sha256": "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "valuable", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "valuable", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "valuable 0.1.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT", + "license_ids": [ + "MIT" + ], + "license_file": null + }, + "wasi 0.10.0+wasi-snapshot-preview1": { + "name": "wasi", + "version": "0.10.0+wasi-snapshot-preview1", + "package_url": "https://github.com/bytecodealliance/wasi", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/wasi/0.10.0+wasi-snapshot-preview1/download", + "sha256": "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "wasi", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "wasi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "edition": "2018", + "version": "0.10.0+wasi-snapshot-preview1" + }, + "license": "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "wasm-bindgen 0.2.84": { + "name": "wasm-bindgen", + "version": "0.2.84", + "package_url": "https://github.com/rustwasm/wasm-bindgen", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/wasm-bindgen/0.2.84/download", + "sha256": "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" + } + }, + "targets": [ + { + "Library": { + "crate_name": "wasm_bindgen", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "wasm_bindgen", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "spans", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "cfg-if 1.0.0", + "target": "cfg_if" + }, + { + "id": "wasm-bindgen 0.2.84", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "proc_macro_deps": { + "common": [ + { + "id": "wasm-bindgen-macro 0.2.84", + "target": "wasm_bindgen_macro" + } + ], + "selects": {} + }, + "version": "0.2.84" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "wasm-bindgen-backend 0.2.84": { + "name": "wasm-bindgen-backend", + "version": "0.2.84", + "package_url": "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/backend", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/wasm-bindgen-backend/0.2.84/download", + "sha256": "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" + } + }, + "targets": [ + { + "Library": { + "crate_name": "wasm_bindgen_backend", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "wasm_bindgen_backend", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "spans" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "bumpalo 3.12.0", + "target": "bumpalo" + }, + { + "id": "log 0.4.20", + "target": "log" + }, + { + "id": "once_cell 1.17.1", + "target": "once_cell" + }, + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "syn 1.0.109", + "target": "syn" + }, + { + "id": "wasm-bindgen-shared 0.2.84", + "target": "wasm_bindgen_shared" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.84" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "wasm-bindgen-macro 0.2.84": { + "name": "wasm-bindgen-macro", + "version": "0.2.84", + "package_url": "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/wasm-bindgen-macro/0.2.84/download", + "sha256": "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" + } + }, + "targets": [ + { + "ProcMacro": { + "crate_name": "wasm_bindgen_macro", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "wasm_bindgen_macro", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "spans" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "wasm-bindgen-macro-support 0.2.84", + "target": "wasm_bindgen_macro_support" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.84" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "wasm-bindgen-macro-support 0.2.84": { + "name": "wasm-bindgen-macro-support", + "version": "0.2.84", + "package_url": "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro-support", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/wasm-bindgen-macro-support/0.2.84/download", + "sha256": "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" + } + }, + "targets": [ + { + "Library": { + "crate_name": "wasm_bindgen_macro_support", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "wasm_bindgen_macro_support", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "spans" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "proc-macro2 1.0.56", + "target": "proc_macro2" + }, + { + "id": "quote 1.0.26", + "target": "quote" + }, + { + "id": "syn 1.0.109", + "target": "syn" + }, + { + "id": "wasm-bindgen-backend 0.2.84", + "target": "wasm_bindgen_backend" + }, + { + "id": "wasm-bindgen-shared 0.2.84", + "target": "wasm_bindgen_shared" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.84" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "wasm-bindgen-shared 0.2.84": { + "name": "wasm-bindgen-shared", + "version": "0.2.84", + "package_url": "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/shared", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/wasm-bindgen-shared/0.2.84/download", + "sha256": "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" + } + }, + "targets": [ + { + "Library": { + "crate_name": "wasm_bindgen_shared", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "wasm_bindgen_shared", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "wasm-bindgen-shared 0.2.84", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.2.84" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "links": "wasm_bindgen" + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "winapi 0.3.9": { + "name": "winapi", + "version": "0.3.9", + "package_url": "https://github.com/retep998/winapi-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi/0.3.9/download", + "sha256": "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "winapi", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "consoleapi", + "errhandlingapi", + "fileapi", + "handleapi", + "minwinbase", + "minwindef", + "ntdef", + "processenv", + "profileapi", + "std", + "sysinfoapi", + "timezoneapi" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "winapi 0.3.9", + "target": "build_script_build" + } + ], + "selects": { + "i686-pc-windows-gnu": [ + { + "id": "winapi-i686-pc-windows-gnu 0.4.0", + "target": "winapi_i686_pc_windows_gnu" + } + ], + "x86_64-pc-windows-gnu": [ + { + "id": "winapi-x86_64-pc-windows-gnu 0.4.0", + "target": "winapi_x86_64_pc_windows_gnu" + } + ] + } + }, + "edition": "2015", + "version": "0.3.9" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "winapi-i686-pc-windows-gnu 0.4.0": { + "name": "winapi-i686-pc-windows-gnu", + "version": "0.4.0", + "package_url": "https://github.com/retep998/winapi-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi-i686-pc-windows-gnu/0.4.0/download", + "sha256": "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi_i686_pc_windows_gnu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "winapi_i686_pc_windows_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "winapi-i686-pc-windows-gnu 0.4.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "winapi-util 0.1.5": { + "name": "winapi-util", + "version": "0.1.5", + "package_url": "https://github.com/BurntSushi/winapi-util", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi-util/0.1.5/download", + "sha256": "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi_util", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "winapi_util", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(windows)": [ + { + "id": "winapi 0.3.9", + "target": "winapi" + } + ] + } + }, + "edition": "2018", + "version": "0.1.5" + }, + "license": "Unlicense/MIT", + "license_ids": [ + "MIT", + "Unlicense" + ], + "license_file": null + }, + "winapi-x86_64-pc-windows-gnu 0.4.0": { + "name": "winapi-x86_64-pc-windows-gnu", + "version": "0.4.0", + "package_url": "https://github.com/retep998/winapi-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/winapi-x86_64-pc-windows-gnu/0.4.0/download", + "sha256": "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "winapi_x86_64_pc_windows_gnu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "winapi_x86_64_pc_windows_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "winapi-x86_64-pc-windows-gnu 0.4.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2015", + "version": "0.4.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT/Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows 0.48.0": { + "name": "windows", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows/0.48.0/download", + "sha256": "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows-targets 0.48.0", + "target": "windows_targets" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.48.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows-sys 0.45.0": { + "name": "windows-sys", + "version": "0.45.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows-sys/0.45.0/download", + "sha256": "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_sys", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "Win32", + "Win32_Foundation", + "Win32_Storage", + "Win32_Storage_FileSystem", + "Win32_System", + "Win32_System_Console", + "default" + ], + "selects": {} + }, + "deps": { + "common": [], + "selects": { + "cfg(not(windows_raw_dylib))": [ + { + "id": "windows-targets 0.42.2", + "target": "windows_targets" + } + ] + } + }, + "edition": "2018", + "version": "0.45.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows-sys 0.48.0": { + "name": "windows-sys", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows-sys/0.48.0/download", + "sha256": "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_sys", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_sys", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "Win32", + "Win32_Foundation", + "Win32_Networking", + "Win32_Networking_WinSock", + "Win32_Security", + "Win32_Storage", + "Win32_Storage_FileSystem", + "Win32_System", + "Win32_System_IO", + "Win32_System_Threading", + "default" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "windows-targets 0.48.0", + "target": "windows_targets" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.48.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows-targets 0.42.2": { + "name": "windows-targets", + "version": "0.42.2", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows-targets/0.42.2/download", + "sha256": "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_targets", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_targets", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "aarch64-pc-windows-gnullvm": [ + { + "id": "windows_aarch64_gnullvm 0.42.2", + "target": "windows_aarch64_gnullvm" + } + ], + "aarch64-pc-windows-msvc": [ + { + "id": "windows_aarch64_msvc 0.42.2", + "target": "windows_aarch64_msvc" + } + ], + "aarch64-uwp-windows-msvc": [ + { + "id": "windows_aarch64_msvc 0.42.2", + "target": "windows_aarch64_msvc" + } + ], + "i686-pc-windows-gnu": [ + { + "id": "windows_i686_gnu 0.42.2", + "target": "windows_i686_gnu" + } + ], + "i686-pc-windows-msvc": [ + { + "id": "windows_i686_msvc 0.42.2", + "target": "windows_i686_msvc" + } + ], + "i686-uwp-windows-gnu": [ + { + "id": "windows_i686_gnu 0.42.2", + "target": "windows_i686_gnu" + } + ], + "i686-uwp-windows-msvc": [ + { + "id": "windows_i686_msvc 0.42.2", + "target": "windows_i686_msvc" + } + ], + "x86_64-pc-windows-gnu": [ + { + "id": "windows_x86_64_gnu 0.42.2", + "target": "windows_x86_64_gnu" + } + ], + "x86_64-pc-windows-gnullvm": [ + { + "id": "windows_x86_64_gnullvm 0.42.2", + "target": "windows_x86_64_gnullvm" + } + ], + "x86_64-pc-windows-msvc": [ + { + "id": "windows_x86_64_msvc 0.42.2", + "target": "windows_x86_64_msvc" + } + ], + "x86_64-uwp-windows-gnu": [ + { + "id": "windows_x86_64_gnu 0.42.2", + "target": "windows_x86_64_gnu" + } + ], + "x86_64-uwp-windows-msvc": [ + { + "id": "windows_x86_64_msvc 0.42.2", + "target": "windows_x86_64_msvc" + } + ] + } + }, + "edition": "2018", + "version": "0.42.2" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows-targets 0.48.0": { + "name": "windows-targets", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows-targets/0.48.0/download", + "sha256": "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_targets", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_targets", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [], + "selects": { + "cfg(all(target_arch = \"aarch64\", target_env = \"gnu\", target_abi = \"llvm\", not(windows_raw_dylib)))": [ + { + "id": "windows_aarch64_gnullvm 0.48.0", + "target": "windows_aarch64_gnullvm" + } + ], + "cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))": [ + { + "id": "windows_aarch64_msvc 0.48.0", + "target": "windows_aarch64_msvc" + } + ], + "cfg(all(target_arch = \"x86\", target_env = \"gnu\", not(windows_raw_dylib)))": [ + { + "id": "windows_i686_gnu 0.48.0", + "target": "windows_i686_gnu" + } + ], + "cfg(all(target_arch = \"x86\", target_env = \"msvc\", not(windows_raw_dylib)))": [ + { + "id": "windows_i686_msvc 0.48.0", + "target": "windows_i686_msvc" + } + ], + "cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", not(target_abi = \"llvm\"), not(windows_raw_dylib)))": [ + { + "id": "windows_x86_64_gnu 0.48.0", + "target": "windows_x86_64_gnu" + } + ], + "cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", target_abi = \"llvm\", not(windows_raw_dylib)))": [ + { + "id": "windows_x86_64_gnullvm 0.48.0", + "target": "windows_x86_64_gnullvm" + } + ], + "cfg(all(target_arch = \"x86_64\", target_env = \"msvc\", not(windows_raw_dylib)))": [ + { + "id": "windows_x86_64_msvc 0.48.0", + "target": "windows_x86_64_msvc" + } + ] + } + }, + "edition": "2018", + "version": "0.48.0" + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_aarch64_gnullvm 0.42.2": { + "name": "windows_aarch64_gnullvm", + "version": "0.42.2", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_aarch64_gnullvm/0.42.2/download", + "sha256": "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_aarch64_gnullvm", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_aarch64_gnullvm", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_aarch64_gnullvm 0.42.2", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.42.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_aarch64_gnullvm 0.48.0": { + "name": "windows_aarch64_gnullvm", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_aarch64_gnullvm/0.48.0/download", + "sha256": "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_aarch64_gnullvm", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_aarch64_gnullvm", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_aarch64_gnullvm 0.48.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.48.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_aarch64_msvc 0.42.2": { + "name": "windows_aarch64_msvc", + "version": "0.42.2", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_aarch64_msvc/0.42.2/download", + "sha256": "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_aarch64_msvc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_aarch64_msvc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_aarch64_msvc 0.42.2", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.42.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_aarch64_msvc 0.48.0": { + "name": "windows_aarch64_msvc", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_aarch64_msvc/0.48.0/download", + "sha256": "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_aarch64_msvc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_aarch64_msvc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_aarch64_msvc 0.48.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.48.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_i686_gnu 0.42.2": { + "name": "windows_i686_gnu", + "version": "0.42.2", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_i686_gnu/0.42.2/download", + "sha256": "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_i686_gnu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_i686_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_i686_gnu 0.42.2", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.42.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_i686_gnu 0.48.0": { + "name": "windows_i686_gnu", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_i686_gnu/0.48.0/download", + "sha256": "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_i686_gnu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_i686_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_i686_gnu 0.48.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.48.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_i686_msvc 0.42.2": { + "name": "windows_i686_msvc", + "version": "0.42.2", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_i686_msvc/0.42.2/download", + "sha256": "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_i686_msvc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_i686_msvc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_i686_msvc 0.42.2", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.42.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_i686_msvc 0.48.0": { + "name": "windows_i686_msvc", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_i686_msvc/0.48.0/download", + "sha256": "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_i686_msvc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_i686_msvc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_i686_msvc 0.48.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.48.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_x86_64_gnu 0.42.2": { + "name": "windows_x86_64_gnu", + "version": "0.42.2", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_x86_64_gnu/0.42.2/download", + "sha256": "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_x86_64_gnu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_x86_64_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_x86_64_gnu 0.42.2", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.42.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_x86_64_gnu 0.48.0": { + "name": "windows_x86_64_gnu", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_x86_64_gnu/0.48.0/download", + "sha256": "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_x86_64_gnu", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_x86_64_gnu", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_x86_64_gnu 0.48.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.48.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_x86_64_gnullvm 0.42.2": { + "name": "windows_x86_64_gnullvm", + "version": "0.42.2", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_x86_64_gnullvm/0.42.2/download", + "sha256": "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_x86_64_gnullvm", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_x86_64_gnullvm", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_x86_64_gnullvm 0.42.2", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.42.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_x86_64_gnullvm 0.48.0": { + "name": "windows_x86_64_gnullvm", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_x86_64_gnullvm/0.48.0/download", + "sha256": "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_x86_64_gnullvm", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_x86_64_gnullvm", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_x86_64_gnullvm 0.48.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.48.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_x86_64_msvc 0.42.2": { + "name": "windows_x86_64_msvc", + "version": "0.42.2", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_x86_64_msvc/0.42.2/download", + "sha256": "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_x86_64_msvc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_x86_64_msvc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_x86_64_msvc 0.42.2", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.42.2" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + }, + "windows_x86_64_msvc 0.48.0": { + "name": "windows_x86_64_msvc", + "version": "0.48.0", + "package_url": "https://github.com/microsoft/windows-rs", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/windows_x86_64_msvc/0.48.0/download", + "sha256": "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + } + }, + "targets": [ + { + "Library": { + "crate_name": "windows_x86_64_msvc", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "windows_x86_64_msvc", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "windows_x86_64_msvc 0.48.0", + "target": "build_script_build" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.48.0" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ] + }, + "license": "MIT OR Apache-2.0", + "license_ids": [ + "Apache-2.0", + "MIT" + ], + "license_file": null + } + }, + "binary_crates": [], + "workspace_members": { + "codeql-extractor-ruby 0.1.0": "ruby/extractor" + }, + "conditions": { + "aarch64-apple-darwin": [ + "aarch64-apple-darwin" + ], + "aarch64-apple-ios": [ + "aarch64-apple-ios" + ], + "aarch64-apple-ios-sim": [ + "aarch64-apple-ios-sim" + ], + "aarch64-fuchsia": [ + "aarch64-fuchsia" + ], + "aarch64-linux-android": [ + "aarch64-linux-android" + ], + "aarch64-pc-windows-gnullvm": [], + "aarch64-pc-windows-msvc": [ + "aarch64-pc-windows-msvc" + ], + "aarch64-unknown-linux-gnu": [ + "aarch64-unknown-linux-gnu" + ], + "aarch64-unknown-nixos-gnu": [ + "aarch64-unknown-nixos-gnu" + ], + "aarch64-unknown-nto-qnx710": [ + "aarch64-unknown-nto-qnx710" + ], + "aarch64-uwp-windows-msvc": [], + "arm-unknown-linux-gnueabi": [ + "arm-unknown-linux-gnueabi" + ], + "armv7-linux-androideabi": [ + "armv7-linux-androideabi" + ], + "armv7-unknown-linux-gnueabi": [ + "armv7-unknown-linux-gnueabi" + ], + "cfg(all(any(target_arch = \"x86_64\", target_arch = \"aarch64\"), target_os = \"hermit\"))": [], + "cfg(all(any(target_os = \"android\", target_os = \"linux\"), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\"))))))))": [ + "aarch64-linux-android", + "armv7-linux-androideabi", + "i686-linux-android", + "powerpc-unknown-linux-gnu", + "s390x-unknown-linux-gnu", + "x86_64-linux-android" + ], + "cfg(all(not(rustix_use_libc), not(miri), target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\")))))": [ + "aarch64-unknown-linux-gnu", + "aarch64-unknown-nixos-gnu", + "arm-unknown-linux-gnueabi", + "armv7-unknown-linux-gnueabi", + "i686-unknown-linux-gnu", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-nixos-gnu" + ], + "cfg(all(target_arch = \"aarch64\", target_env = \"gnu\", target_abi = \"llvm\", not(windows_raw_dylib)))": [], + "cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))": [ + "aarch64-pc-windows-msvc" + ], + "cfg(all(target_arch = \"wasm32\", not(any(target_os = \"emscripten\", target_os = \"wasi\"))))": [ + "wasm32-unknown-unknown" + ], + "cfg(all(target_arch = \"x86\", target_env = \"gnu\", not(windows_raw_dylib)))": [ + "i686-unknown-linux-gnu" + ], + "cfg(all(target_arch = \"x86\", target_env = \"msvc\", not(windows_raw_dylib)))": [ + "i686-pc-windows-msvc" + ], + "cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", not(target_abi = \"llvm\"), not(windows_raw_dylib)))": [ + "x86_64-unknown-linux-gnu", + "x86_64-unknown-nixos-gnu" + ], + "cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", target_abi = \"llvm\", not(windows_raw_dylib)))": [], + "cfg(all(target_arch = \"x86_64\", target_env = \"msvc\", not(windows_raw_dylib)))": [ + "x86_64-pc-windows-msvc" + ], + "cfg(any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\")))))))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "aarch64-fuchsia", + "aarch64-linux-android", + "aarch64-pc-windows-msvc", + "aarch64-unknown-nto-qnx710", + "armv7-linux-androideabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-pc-windows-msvc", + "i686-unknown-freebsd", + "powerpc-unknown-linux-gnu", + "riscv32imc-unknown-none-elf", + "riscv64gc-unknown-none-elf", + "s390x-unknown-linux-gnu", + "thumbv7em-none-eabi", + "thumbv8m.main-none-eabi", + "wasm32-unknown-unknown", + "wasm32-wasi", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-pc-windows-msvc", + "x86_64-unknown-freebsd", + "x86_64-unknown-none" + ], + "cfg(any(target_os = \"macos\", target_os = \"ios\"))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "i686-apple-darwin", + "x86_64-apple-darwin", + "x86_64-apple-ios" + ], + "cfg(not(any(windows, target_os = \"hermit\", target_os = \"unknown\")))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "aarch64-fuchsia", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-nixos-gnu", + "aarch64-unknown-nto-qnx710", + "arm-unknown-linux-gnueabi", + "armv7-linux-androideabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "riscv32imc-unknown-none-elf", + "riscv64gc-unknown-none-elf", + "s390x-unknown-linux-gnu", + "thumbv7em-none-eabi", + "thumbv8m.main-none-eabi", + "wasm32-wasi", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-nixos-gnu", + "x86_64-unknown-none" + ], + "cfg(not(windows))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "aarch64-fuchsia", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-nixos-gnu", + "aarch64-unknown-nto-qnx710", + "arm-unknown-linux-gnueabi", + "armv7-linux-androideabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "riscv32imc-unknown-none-elf", + "riscv64gc-unknown-none-elf", + "s390x-unknown-linux-gnu", + "thumbv7em-none-eabi", + "thumbv8m.main-none-eabi", + "wasm32-unknown-unknown", + "wasm32-wasi", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-nixos-gnu", + "x86_64-unknown-none" + ], + "cfg(not(windows_raw_dylib))": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "aarch64-fuchsia", + "aarch64-linux-android", + "aarch64-pc-windows-msvc", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-nixos-gnu", + "aarch64-unknown-nto-qnx710", + "arm-unknown-linux-gnueabi", + "armv7-linux-androideabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-pc-windows-msvc", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "riscv32imc-unknown-none-elf", + "riscv64gc-unknown-none-elf", + "s390x-unknown-linux-gnu", + "thumbv7em-none-eabi", + "thumbv8m.main-none-eabi", + "wasm32-unknown-unknown", + "wasm32-wasi", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-pc-windows-msvc", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-nixos-gnu", + "x86_64-unknown-none" + ], + "cfg(target_arch = \"wasm32\")": [ + "wasm32-unknown-unknown", + "wasm32-wasi" + ], + "cfg(target_os = \"android\")": [ + "aarch64-linux-android", + "armv7-linux-androideabi", + "i686-linux-android", + "x86_64-linux-android" + ], + "cfg(target_os = \"dragonfly\")": [], + "cfg(target_os = \"haiku\")": [], + "cfg(target_os = \"hermit\")": [], + "cfg(target_os = \"wasi\")": [ + "wasm32-wasi" + ], + "cfg(target_os = \"windows\")": [ + "aarch64-pc-windows-msvc", + "i686-pc-windows-msvc", + "x86_64-pc-windows-msvc" + ], + "cfg(tracing_unstable)": [], + "cfg(unix)": [ + "aarch64-apple-darwin", + "aarch64-apple-ios", + "aarch64-apple-ios-sim", + "aarch64-fuchsia", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-nixos-gnu", + "aarch64-unknown-nto-qnx710", + "arm-unknown-linux-gnueabi", + "armv7-linux-androideabi", + "armv7-unknown-linux-gnueabi", + "i686-apple-darwin", + "i686-linux-android", + "i686-unknown-freebsd", + "i686-unknown-linux-gnu", + "powerpc-unknown-linux-gnu", + "s390x-unknown-linux-gnu", + "x86_64-apple-darwin", + "x86_64-apple-ios", + "x86_64-fuchsia", + "x86_64-linux-android", + "x86_64-unknown-freebsd", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-nixos-gnu" + ], + "cfg(windows)": [ + "aarch64-pc-windows-msvc", + "i686-pc-windows-msvc", + "x86_64-pc-windows-msvc" + ], + "i686-apple-darwin": [ + "i686-apple-darwin" + ], + "i686-linux-android": [ + "i686-linux-android" + ], + "i686-pc-windows-gnu": [], + "i686-pc-windows-msvc": [ + "i686-pc-windows-msvc" + ], + "i686-unknown-freebsd": [ + "i686-unknown-freebsd" + ], + "i686-unknown-linux-gnu": [ + "i686-unknown-linux-gnu" + ], + "i686-uwp-windows-gnu": [], + "i686-uwp-windows-msvc": [], + "powerpc-unknown-linux-gnu": [ + "powerpc-unknown-linux-gnu" + ], + "riscv32imc-unknown-none-elf": [ + "riscv32imc-unknown-none-elf" + ], + "riscv64gc-unknown-none-elf": [ + "riscv64gc-unknown-none-elf" + ], + "s390x-unknown-linux-gnu": [ + "s390x-unknown-linux-gnu" + ], + "thumbv7em-none-eabi": [ + "thumbv7em-none-eabi" + ], + "thumbv8m.main-none-eabi": [ + "thumbv8m.main-none-eabi" + ], + "wasm32-unknown-unknown": [ + "wasm32-unknown-unknown" + ], + "wasm32-wasi": [ + "wasm32-wasi" + ], + "x86_64-apple-darwin": [ + "x86_64-apple-darwin" + ], + "x86_64-apple-ios": [ + "x86_64-apple-ios" + ], + "x86_64-fuchsia": [ + "x86_64-fuchsia" + ], + "x86_64-linux-android": [ + "x86_64-linux-android" + ], + "x86_64-pc-windows-gnu": [], + "x86_64-pc-windows-gnullvm": [], + "x86_64-pc-windows-msvc": [ + "x86_64-pc-windows-msvc" + ], + "x86_64-unknown-freebsd": [ + "x86_64-unknown-freebsd" + ], + "x86_64-unknown-linux-gnu": [ + "x86_64-unknown-linux-gnu" + ], + "x86_64-unknown-nixos-gnu": [ + "x86_64-unknown-nixos-gnu" + ], + "x86_64-unknown-none": [ + "x86_64-unknown-none" + ], + "x86_64-uwp-windows-gnu": [], + "x86_64-uwp-windows-msvc": [] + }, + "direct_deps": [ + "clap 4.2.1", + "codeql-extractor 0.2.0", + "encoding 0.2.33", + "lazy_static 1.4.0", + "rayon 1.7.0", + "regex 1.7.3", + "tracing 0.1.37", + "tracing-subscriber 0.3.16", + "tree-sitter 0.20.10", + "tree-sitter-embedded-template 0.20.0", + "tree-sitter-ruby 0.20.0" + ], + "direct_dev_deps": [] +} diff --git a/ruby/ql/lib/BUILD.bazel b/ruby/ql/lib/BUILD.bazel new file mode 100644 index 00000000000..54a65933149 --- /dev/null +++ b/ruby/ql/lib/BUILD.bazel @@ -0,0 +1,13 @@ +load("@rules_pkg//:mappings.bzl", "pkg_files") + +package(default_visibility = ["//ruby:__pkg__"]) + +pkg_files( + name = "dbscheme", + srcs = ["ruby.dbscheme"], +) + +pkg_files( + name = "dbscheme-stats", + srcs = ["ruby.dbscheme.stats"], +) diff --git a/ruby/ql/lib/CHANGELOG.md b/ruby/ql/lib/CHANGELOG.md index ddf84b34873..a623a151e89 100644 --- a/ruby/ql/lib/CHANGELOG.md +++ b/ruby/ql/lib/CHANGELOG.md @@ -15,7 +15,7 @@ ### Minor Analysis Improvements -* Deleted many deprecated predicates and classes with uppercase `HTTP`, `CSRF`, ``, `` etc. in their names. Use the PascalCased versions instead. +* Deleted many deprecated predicates and classes with uppercase `HTTP`, `CSRF` etc. in their names. Use the PascalCased versions instead. * Deleted the deprecated `getAUse` and `getARhs` predicates from `API::Node`, use `getASource` and `getASink` instead. * Deleted the deprecated `disablesCertificateValidation` predicate from the `Http` module. * Deleted the deprecated `ParamsCall`, `CookiesCall`, and `ActionControllerControllerClass` classes from `ActionController.qll`, use the simarly named classes from `codeql.ruby.frameworks.Rails::Rails` instead. diff --git a/ruby/ql/lib/change-notes/2024-02-20-activerecord-sql-sink-arguments.md b/ruby/ql/lib/change-notes/2024-02-20-activerecord-sql-sink-arguments.md index fffc9d6f064..1486c7a472d 100644 --- a/ruby/ql/lib/change-notes/2024-02-20-activerecord-sql-sink-arguments.md +++ b/ruby/ql/lib/change-notes/2024-02-20-activerecord-sql-sink-arguments.md @@ -1,4 +1,3 @@ - --- category: minorAnalysis --- diff --git a/ruby/ql/lib/change-notes/2024-02-26-arel-sqlliteral.md b/ruby/ql/lib/change-notes/2024-02-26-arel-sqlliteral.md new file mode 100644 index 00000000000..56d2dcf5c73 --- /dev/null +++ b/ruby/ql/lib/change-notes/2024-02-26-arel-sqlliteral.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +Calls to `Arel::Nodes::SqlLiteral.new` are now modeled as instances of the `SqlConstruction` concept, as well as propagating taint from their argument. \ No newline at end of file diff --git a/ruby/ql/lib/change-notes/2024-02-29-i18n-translate.md b/ruby/ql/lib/change-notes/2024-02-29-i18n-translate.md new file mode 100644 index 00000000000..f08bd54efa2 --- /dev/null +++ b/ruby/ql/lib/change-notes/2024-02-29-i18n-translate.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +Calls to `I18n.translate` as well as Rails helper translate methods now propagate taint from their keyword arguments. The Rails translate methods are also recognized as XSS sanitizers when using keys marked as html safe. \ No newline at end of file diff --git a/ruby/ql/lib/change-notes/2024-03-01-typhoeus-request.md b/ruby/ql/lib/change-notes/2024-03-01-typhoeus-request.md new file mode 100644 index 00000000000..f008869fbcd --- /dev/null +++ b/ruby/ql/lib/change-notes/2024-03-01-typhoeus-request.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Calls to `Typhoeus::Request.new` are now considered as instances of the `Http::Client::Request` concept, with the response body being treated as a remote flow source. \ No newline at end of file diff --git a/ruby/ql/lib/change-notes/2024-03-08-activerecord-from.md b/ruby/ql/lib/change-notes/2024-03-08-activerecord-from.md new file mode 100644 index 00000000000..704a4f27a61 --- /dev/null +++ b/ruby/ql/lib/change-notes/2024-03-08-activerecord-from.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The second argument, `subquery_name`, of the `ActiveRecord::QueryMethods::from` method, is now recognized as an sql injection sink. \ No newline at end of file diff --git a/ruby/ql/lib/change-notes/released/0.8.7.md b/ruby/ql/lib/change-notes/released/0.8.7.md index 454ab2b2c97..a4b443e17ec 100644 --- a/ruby/ql/lib/change-notes/released/0.8.7.md +++ b/ruby/ql/lib/change-notes/released/0.8.7.md @@ -2,7 +2,7 @@ ### Minor Analysis Improvements -* Deleted many deprecated predicates and classes with uppercase `HTTP`, `CSRF`, ``, `` etc. in their names. Use the PascalCased versions instead. +* Deleted many deprecated predicates and classes with uppercase `HTTP`, `CSRF` etc. in their names. Use the PascalCased versions instead. * Deleted the deprecated `getAUse` and `getARhs` predicates from `API::Node`, use `getASource` and `getASink` instead. * Deleted the deprecated `disablesCertificateValidation` predicate from the `Http` module. * Deleted the deprecated `ParamsCall`, `CookiesCall`, and `ActionControllerControllerClass` classes from `ActionController.qll`, use the simarly named classes from `codeql.ruby.frameworks.Rails::Rails` instead. diff --git a/ruby/ql/lib/codeql/ruby/Frameworks.qll b/ruby/ql/lib/codeql/ruby/Frameworks.qll index 225db19dab5..9c66870c305 100644 --- a/ruby/ql/lib/codeql/ruby/Frameworks.qll +++ b/ruby/ql/lib/codeql/ruby/Frameworks.qll @@ -30,6 +30,7 @@ private import codeql.ruby.frameworks.Json private import codeql.ruby.frameworks.Erb private import codeql.ruby.frameworks.Slim private import codeql.ruby.frameworks.Sinatra +private import codeql.ruby.frameworks.Translation private import codeql.ruby.frameworks.Twirp private import codeql.ruby.frameworks.Sqlite3 private import codeql.ruby.frameworks.Mysql2 diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll index d2fe2a78ab3..a7ef050f1c8 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll @@ -800,7 +800,17 @@ predicate nodeIsHidden(Node n) { or n = LocalFlow::getParameterDefNode(_) or - isDesugarNode(n.(ExprNode).getExprNode().getExpr()) + exists(AstNode desug | + isDesugarNode(desug) and + desug.isSynthesized() and + not desug = [any(ArrayLiteral al).getDesugared(), any(HashLiteral hl).getDesugared()] + | + desug = n.asExpr().getExpr() + or + desug = n.(PostUpdateNode).getPreUpdateNode().asExpr().getExpr() + or + desug = n.(ParameterNode).getParameter() + ) or n instanceof FlowSummaryNode or diff --git a/ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll b/ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll index f0917100058..7573e099c19 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll @@ -175,14 +175,14 @@ private predicate sqlFragmentArgumentInner(DataFlow::CallNode call, DataFlow::No call = activeRecordQueryBuilderCall([ "delete_all", "delete_by", "destroy_all", "destroy_by", "exists?", "find_by", "find_by!", - "find_or_create_by", "find_or_create_by!", "find_or_initialize_by", "find_by_sql", "from", - "having", "lock", "not", "where", "rewhere" + "find_or_create_by", "find_or_create_by!", "find_or_initialize_by", "find_by_sql", "having", + "lock", "not", "where", "rewhere" ]) and sink = call.getArgument(0) or call = activeRecordQueryBuilderCall([ - "group", "joins", "order", "reorder", "pluck", "select", "reselect" + "from", "group", "joins", "order", "reorder", "pluck", "select", "reselect" ]) and sink = call.getArgument(_) or diff --git a/ruby/ql/lib/codeql/ruby/frameworks/Arel.qll b/ruby/ql/lib/codeql/ruby/frameworks/Arel.qll index 92fcb9ac5b4..d4336cd35c5 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/Arel.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/Arel.qll @@ -39,4 +39,34 @@ module Arel { override DataFlow::Node getSql() { result = this.getArgument(0) } } + + /** + * Flow summary for `Arel::Nodes::SqlLiteral.new`. This method wraps a SQL string, marking it as + * safe. + */ + private class SqlLiteralNewSummary extends SummarizedCallable { + SqlLiteralNewSummary() { this = "Arel::Nodes::SqlLiteral.new" } + + override MethodCall getACall() { + result = any(ArelSqlLiteralNewConstruction c).asExpr().getExpr() + } + + override predicate propagatesFlow(string input, string output, boolean preservesValue) { + input = "Argument[0]" and output = "ReturnValue" and preservesValue = false + } + } + + /** A call to `Arel::Nodes::SqlLiteral.new`, considered as a SQL construction. */ + private class ArelSqlLiteralNewConstruction extends SqlConstruction::Range, DataFlow::CallNode { + ArelSqlLiteralNewConstruction() { + this.asExpr() = + API::getTopLevelMember("Arel") + .getMember("Nodes") + .getMember("SqlLiteral") + .getAMethodCall("new") + .asExpr() + } + + override DataFlow::Node getSql() { result = this.getArgument(0) } + } } diff --git a/ruby/ql/lib/codeql/ruby/frameworks/Translation.qll b/ruby/ql/lib/codeql/ruby/frameworks/Translation.qll new file mode 100644 index 00000000000..cf3f0aa77c4 --- /dev/null +++ b/ruby/ql/lib/codeql/ruby/frameworks/Translation.qll @@ -0,0 +1,67 @@ +/** Provides modeling for the `I18n` translation method and the rails translation helpers. */ + +private import codeql.ruby.ApiGraphs +private import codeql.ruby.dataflow.FlowSummary +private import codeql.ruby.Concepts +private import codeql.ruby.frameworks.ActionView +private import codeql.ruby.frameworks.ActionController + +/** Gets a call to `I18n.translate`, which can use keyword arguments as inputs for string interpolation. */ +private MethodCall getI18nTranslateCall() { + result = API::getTopLevelMember("I18n").getAMethodCall(["t", "translate"]).asExpr().getExpr() +} + +/** + * Gets a call to the rails view helper translate method, which is a wrapper around `I18n.translate` + * that can also escape html if the key ends in `_html` or `.html`. + */ +private MethodCall getViewHelperTranslateCall() { + result.getMethodName() = ["t", "translate"] and + inActionViewContext(result) +} + +/** + * Gets a call to the rails controller helper translate method, which is a wrapper around `I18n.translate` + * that can also escape html if the key ends in `_html` or `.html`. + */ +private MethodCall getControllerHelperTranslateCall() { + result = + any(ActionControllerClass c) + .getSelf() + .track() + .getAMethodCall(["t", "translate"]) + .asExpr() + .getExpr() +} + +/** Flow summary for translation methods. */ +private class TranslateSummary extends SummarizedCallable { + TranslateSummary() { this = "I18n.translate" } + + override MethodCall getACall() { + result = + [getI18nTranslateCall(), getViewHelperTranslateCall(), getControllerHelperTranslateCall()] + } + + override predicate propagatesFlow(string input, string output, boolean preservesValue) { + input = "Argument[hash-splat].Element[any]" and + output = "ReturnValue" and + preservesValue = false + } +} + +/** A call to a translation helper method that escapes HTML. */ +private class TranslateHtmlEscape extends Escaping::Range, DataFlow::CallNode { + TranslateHtmlEscape() { + exists(MethodCall mc | mc = this.asExpr().getExpr() | + mc = [getViewHelperTranslateCall(), getControllerHelperTranslateCall()] and + mc.getArgument(0).getConstantValue().getStringlikeValue().matches(["%\\_html", "%.html"]) + ) + } + + override string getKind() { result = Escaping::getHtmlKind() } + + override DataFlow::Node getAnInput() { result = this.getKeywordArgument(_) } + + override DataFlow::Node getOutput() { result = this } +} diff --git a/ruby/ql/lib/codeql/ruby/frameworks/core/Kernel.qll b/ruby/ql/lib/codeql/ruby/frameworks/core/Kernel.qll index 96568e74902..2746faebdc8 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/core/Kernel.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/core/Kernel.qll @@ -44,7 +44,8 @@ module Kernel { */ private predicate isPublicKernelMethod(string method) { method in [ - "class", "clone", "frozen?", "tap", "then", "yield_self", "send", "public_send", "__send__" + "class", "clone", "frozen?", "tap", "then", "yield_self", "send", "public_send", "__send__", + "method", "public_method", "singleton_method" ] } @@ -176,6 +177,24 @@ module Kernel { override predicate runsArbitraryCode() { none() } } + /** + * A call to `method`, `public_method` or `singleton_method` which returns a method object. + * To actually execute the method, the `call` method needs to be called on the object. + * ```ruby + * m = method("exit") + * m.call() + * ``` + */ + class MethodCallCodeExecution extends CodeExecution::Range, KernelMethodCall { + MethodCallCodeExecution() { + this.getMethodName() = ["method", "public_method", "singleton_method"] + } + + override DataFlow::Node getCode() { result = this.getArgument(0) } + + override predicate runsArbitraryCode() { none() } + } + private class TapSummary extends SimpleSummarizedCallable { TapSummary() { this = "tap" } diff --git a/ruby/ql/lib/codeql/ruby/frameworks/http_clients/Typhoeus.qll b/ruby/ql/lib/codeql/ruby/frameworks/http_clients/Typhoeus.qll index 1e4efb57947..c1b13323f9a 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/http_clients/Typhoeus.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/http_clients/Typhoeus.qll @@ -16,17 +16,30 @@ private import codeql.ruby.DataFlow */ class TyphoeusHttpRequest extends Http::Client::Request::Range, DataFlow::CallNode { API::Node requestNode; + boolean directResponse; TyphoeusHttpRequest() { this = requestNode.asSource() and - requestNode = - API::getTopLevelMember("Typhoeus") - .getReturn(["get", "head", "delete", "options", "post", "put", "patch"]) + ( + directResponse = true and + requestNode = + API::getTopLevelMember("Typhoeus") + .getReturn(["get", "head", "delete", "options", "post", "put", "patch"]) + or + directResponse = false and + requestNode = API::getTopLevelMember("Typhoeus").getMember("Request").getInstance() + ) } override DataFlow::Node getAUrlPart() { result = this.getArgument(0) } - override DataFlow::Node getResponseBody() { result = requestNode.getAMethodCall("body") } + override DataFlow::Node getResponseBody() { + directResponse = true and + result = getBodyFromResponse(requestNode) + or + directResponse = false and + result = getResponseBodyFromRequest(requestNode) + } /** Gets the value that controls certificate validation, if any. */ DataFlow::Node getCertificateValidationControllingValue() { @@ -55,3 +68,36 @@ private module TyphoeusDisablesCertificateValidationConfig implements DataFlow:: private module TyphoeusDisablesCertificateValidationFlow = DataFlow::Global; + +/** Gets the response body from the given `requestNode` representing a Typhoeus request */ +bindingset[requestNode] +pragma[inline_late] +private DataFlow::Node getResponseBodyFromRequest(API::Node requestNode) { + result = + [ + getBodyFromResponse(getResponseFromRequest(requestNode)), + requestNode.getMethod("on_body").getBlock().getParameter(0).asSource() + ] +} + +/** Gets the response from the given `requestNode` representing a Typhoeus request */ +bindingset[requestNode] +pragma[inline_late] +private API::Node getResponseFromRequest(API::Node requestNode) { + result = + [ + requestNode.getReturn(["run", "response"]), + requestNode + // on_headers does not carry a response body + .getMethod(["on_complete", "on_success", "on_failure", "on_progress"]) + .getBlock() + .getParameter(0) + ] +} + +/** Gets the response body from the given `responseNode` representing a Typhoeus response */ +bindingset[responseNode] +pragma[inline_late] +private DataFlow::Node getBodyFromResponse(API::Node responseNode) { + result = responseNode.getAMethodCall(["body", "response_body"]) +} diff --git a/ruby/ql/lib/codeql/ruby/security/ServerSideRequestForgeryCustomizations.qll b/ruby/ql/lib/codeql/ruby/security/ServerSideRequestForgeryCustomizations.qll index 07fbf27a268..9fd20d9bc9d 100644 --- a/ruby/ql/lib/codeql/ruby/security/ServerSideRequestForgeryCustomizations.qll +++ b/ruby/ql/lib/codeql/ruby/security/ServerSideRequestForgeryCustomizations.qll @@ -10,6 +10,7 @@ private import codeql.ruby.DataFlow private import codeql.ruby.dataflow.RemoteFlowSources private import codeql.ruby.Concepts private import codeql.ruby.dataflow.Sanitizers +private import codeql.ruby.frameworks.data.internal.ApiGraphModels /** * Provides default sources, sinks and sanitizers for reasoning about @@ -41,4 +42,8 @@ module ServerSideRequestForgery { /** A string interpolation with a fixed prefix, considered as a flow sanitizer. */ class StringInterpolationAsSanitizer extends PrefixedStringInterpolation, Sanitizer { } + + private class ExternalRequestForgerySink extends Sink { + ExternalRequestForgerySink() { this = ModelOutput::getASinkNode("request-forgery").asSink() } + } } diff --git a/ruby/ql/lib/codeql/ruby/security/XSS.qll b/ruby/ql/lib/codeql/ruby/security/XSS.qll index 26aa90fe831..a212369d4e6 100644 --- a/ruby/ql/lib/codeql/ruby/security/XSS.qll +++ b/ruby/ql/lib/codeql/ruby/security/XSS.qll @@ -324,7 +324,9 @@ module StoredXss { OrmFieldAsSource() { exists(DataFlow::CallNode subSrc | OrmTracking::flow(subSrc, this.getReceiver()) and - subSrc.(OrmInstantiation).methodCallMayAccessField(this.getMethodName()) + subSrc.(OrmInstantiation).methodCallMayAccessField(this.getMethodName()) and + this.getNumberOfArguments() = 0 and + not exists(this.getBlock()) ) } } diff --git a/ruby/ql/lib/ide-contextual-queries/printCfg.ql b/ruby/ql/lib/ide-contextual-queries/printCfg.ql index c902474a55c..1c4cec61a3e 100644 --- a/ruby/ql/lib/ide-contextual-queries/printCfg.ql +++ b/ruby/ql/lib/ide-contextual-queries/printCfg.ql @@ -7,47 +7,35 @@ * @tags ide-contextual-queries/print-cfg */ -private import codeql.ruby.controlflow.internal.ControlFlowGraphImpl::TestOutput -private import codeql.IDEContextual private import codeql.Locations +private import codeql.ruby.controlflow.internal.ControlFlowGraphImpl private import codeql.ruby.controlflow.ControlFlowGraph -/** - * Gets the source file to generate a CFG from. - */ external string selectedSourceFile(); -external string selectedSourceLine(); +private predicate selectedSourceFileAlias = selectedSourceFile/0; -external string selectedSourceColumn(); +external int selectedSourceLine(); -bindingset[file, line, column] -private CfgScope smallestEnclosingScope(File file, int line, int column) { - result = - min(Location loc, CfgScope scope | - loc = scope.getLocation() and - ( - loc.getStartLine() < line - or - loc.getStartLine() = line and loc.getStartColumn() <= column - ) and - ( - loc.getEndLine() > line - or - loc.getEndLine() = line and loc.getEndColumn() >= column - ) and - loc.getFile() = file - | - scope - order by - loc.getStartLine() desc, loc.getStartColumn() desc, loc.getEndLine(), loc.getEndColumn() - ) -} +private predicate selectedSourceLineAlias = selectedSourceLine/0; -class MyRelevantNode extends RelevantNode { - MyRelevantNode() { - this.getScope() = - smallestEnclosingScope(getFileBySourceArchiveName(selectedSourceFile()), - selectedSourceLine().toInt(), selectedSourceColumn().toInt()) +external int selectedSourceColumn(); + +private predicate selectedSourceColumnAlias = selectedSourceColumn/0; + +module ViewCfgQueryInput implements ViewCfgQueryInputSig { + predicate selectedSourceFile = selectedSourceFileAlias/0; + + predicate selectedSourceLine = selectedSourceLineAlias/0; + + predicate selectedSourceColumn = selectedSourceColumnAlias/0; + + predicate cfgScopeSpan( + CfgScope scope, File file, int startLine, int startColumn, int endLine, int endColumn + ) { + file = scope.getFile() and + scope.getLocation().hasLocationInfo(_, startLine, startColumn, endLine, endColumn) } } + +import ViewCfgQuery diff --git a/ruby/ql/src/change-notes/2024-03-01-method-code-injection-sinks.md b/ruby/ql/src/change-notes/2024-03-01-method-code-injection-sinks.md new file mode 100644 index 00000000000..43e40d3fd53 --- /dev/null +++ b/ruby/ql/src/change-notes/2024-03-01-method-code-injection-sinks.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Calls to `Object#method`, `Object#public_method` and `Object#singleton_method` with untrusted data are now recognised as sinks for code injection. \ No newline at end of file diff --git a/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserialization.qhelp b/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserialization.qhelp new file mode 100644 index 00000000000..209e051f9f4 --- /dev/null +++ b/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserialization.qhelp @@ -0,0 +1,62 @@ + + + + +

    +Deserializing untrusted data using any method that allows the construction of +arbitrary objects is easily exploitable and, in many cases, allows an attacker +to execute arbitrary code. +

    +
    + + + +

    +If deserializing an untrusted YAML document using the psych gem, +prefer the safe_load and safe_load_file methods over +load and load_file, as the former will safely +handle untrusted data. Avoid passing untrusted data to the load_stream +method. In psych version 4.0.0 and above, the load method can +safely be used. +

    + +
    + + +

    +The following example calls the Marshal.load, +JSON.load, YAML.load, and Oj.load methods +on data from an HTTP request. Since these methods are capable of deserializing +to arbitrary objects, this is inherently unsafe. +

    + + +

    +Using JSON.parse and YAML.safe_load instead, as in the +following example, removes the vulnerability. Similarly, calling +Oj.load with any mode other than :object is safe, as +is calling Oj.safe_load. Note that there is no safe way to deserialize +untrusted data using Marshal. +

    + +
    + + + +
  • +OWASP vulnerability description: +deserialization of untrusted data. +
  • +
  • +Ruby documentation: guidance on deserializing objects safely. +
  • +
  • +Ruby documentation: security guidance on the YAML library. +
  • +
  • +You can read that how unsafe yaml load methods can lead to code executions: +Universal Deserialisation Gadget for Ruby 2.x-3.x . +
  • +
    + +
    diff --git a/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserialization.ql b/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserialization.ql new file mode 100644 index 00000000000..8e05c13361a --- /dev/null +++ b/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserialization.ql @@ -0,0 +1,21 @@ +/** + * @name Deserialization of user-controlled yaml data + * @description Deserializing user-controlled yaml data may allow attackers to + * execute arbitrary code. + * @kind path-problem + * @problem.severity warning + * @security-severity 9.8 + * @precision high + * @id rb/unsafe-unsafeyamldeserialization + * @tags security + * external/cwe/cwe-502 + */ + +import ruby +import codeql.ruby.security.UnsafeDeserializationQuery +import UnsafeCodeConstructionFlow::PathGraph + +from UnsafeCodeConstructionFlow::PathNode source, UnsafeCodeConstructionFlow::PathNode sink +where UnsafeCodeConstructionFlow::flowPath(source, sink) +select sink.getNode(), source, sink, "Unsafe deserialization depends on a $@.", source.getNode(), + source.getNode().(UnsafeDeserialization::Source).describe() diff --git a/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserialization.qll b/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserialization.qll new file mode 100644 index 00000000000..6a4c06689ac --- /dev/null +++ b/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserialization.qll @@ -0,0 +1,85 @@ +/** + * Provides a taint-tracking configuration for reasoning about unsafe deserialization. + * + * Note, for performance reasons: only import this file if + * `UnsafeYamlDeserializationFlow` is needed, otherwise + * `UnsafeYamlDeserializationCustomizations` should be imported instead. + */ + +private import codeql.ruby.AST +private import codeql.ruby.DataFlow +private import codeql.ruby.TaintTracking +private import codeql.ruby.ApiGraphs +import UnsafeYamlDeserializationCustomizations::UnsafeYamlDeserialization +import Yaml + +private module UnsafeYamlDeserializationConfig implements DataFlow::StateConfigSig { + class FlowState = FlowState::State; + + predicate isSource(DataFlow::Node source, FlowState state) { + source instanceof Source and + (state instanceof FlowState::Parse or state instanceof FlowState::Load) + } + + predicate isSink(DataFlow::Node sink, FlowState state) { + sink instanceof Sink and + (state instanceof FlowState::Parse or state instanceof FlowState::Load) + } + + predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer } + + /** + * Holds if taint with state `stateFrom` can flow from `pred` to `succ` with state `stateTo`. + * + * This is a taint step related to the result of `YAML.parse` calls, or similar. + * In the following example, this step will propagate taint from + * `source` to `sink`: + * this contains two separate steps: + * ```rb + * x = source + * sink = YAML.parse(x) + * ``` + * By second step + * source is a Successor of `YAML.parse(x)` + * which ends with `to_ruby` or an Element of `to_ruby` + * ```ruby + * sink source.to_ruby # Unsafe call + * ``` + */ + predicate isAdditionalFlowStep( + DataFlow::Node pred, FlowState stateFrom, DataFlow::Node succ, FlowState stateTo + ) { + ( + exists(API::Node parseSuccessors, API::Node parseMethod | + parseMethod = yamlLibrary().getMethod(["parse", "parse_stream", "parse_file"]) and + parseSuccessors = yamlParseNode(parseMethod) + | + succ = parseSuccessors.getMethod("to_ruby").getReturn().asSource() and + pred = parseMethod.getArgument(0).asSink() + ) + or + exists(API::Node parseMethod | + parseMethod = yamlLibrary().getMethod(["parse", "parse_stream", "parse_file"]) + | + succ = parseMethod.getReturn().asSource() and + pred = parseMethod.getArgument(0).asSink() + ) + ) and + stateFrom instanceof FlowState::Parse and + stateTo instanceof FlowState::Parse + } +} + +predicate isAdditionalFlowStepTest(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::Node parseMethod | + parseMethod = yamlLibrary().getMethod(["parse", "parse_stream", "parse_file"]) + | + succ = parseMethod.getReturn().asSource() and + pred = parseMethod.getArgument(0).asSink() + ) +} + +/** + * Taint-tracking for reasoning about unsafe deserialization. + */ +module UnsafeCodeConstructionFlow = TaintTracking::GlobalWithState; diff --git a/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserializationCustomizations.qll b/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserializationCustomizations.qll new file mode 100644 index 00000000000..b244797b286 --- /dev/null +++ b/ruby/ql/src/experimental/cwe-502/UnsafeYamlDeserializationCustomizations.qll @@ -0,0 +1,136 @@ +/** + * Provides default sources, sinks and sanitizers for reasoning about unsafe + * deserialization, as well as extension points for adding your own. + */ + +private import codeql.ruby.AST +private import codeql.ruby.ApiGraphs +private import codeql.ruby.CFG +private import codeql.ruby.DataFlow +private import codeql.ruby.dataflow.RemoteFlowSources +private import codeql.ruby.frameworks.ActiveJob +private import codeql.ruby.frameworks.core.Module +private import codeql.ruby.frameworks.core.Kernel +private import Yaml + +module UnsafeYamlDeserialization { + /** Flow states used to distinguish whether we are using a yaml parse node or a yaml load node. */ + module FlowState { + private newtype TState = + TParse() or + TLoad() + + /** A flow state used to distinguish whether we have a middle node that use `YAML.load*` or `YAML.parse*` */ + class State extends TState { + /** + * Gets a string representation of this state. + */ + string toString() { result = this.getStringRepresentation() } + + /** + * Gets a canonical string representation of this state. + */ + string getStringRepresentation() { + this = TParse() and result = "parse" + or + this = TLoad() and result = "load" + } + } + + /** + * A flow state used for `YAML.parse*` methods. + */ + class Parse extends State, TParse { } + + /** + * A flow state used for `YAML.load*` methods. + */ + class Load extends State, TLoad { } + } + + /** + * A data flow source for unsafe deserialization vulnerabilities. + */ + abstract class Source extends DataFlow::Node { + /** Gets a string that describes the source. */ + string describe() { result = "user-provided value" } + } + + /** + * A data flow sink for unsafe deserialization vulnerabilities. + */ + abstract class Sink extends DataFlow::Node { } + + /** + * A sanitizer for unsafe deserialization vulnerabilities. + */ + abstract class Sanitizer extends DataFlow::Node { } + + /** A source of remote user input, considered as a flow source for unsafe deserialization. */ + class RemoteFlowSourceAsSource extends Source instanceof RemoteFlowSource { } + + /** A read of data from `STDIN`/`ARGV`, considered as a flow source for unsafe deserialization. */ + class StdInSource extends UnsafeYamlDeserialization::Source { + boolean stdin; + + StdInSource() { + this = API::getTopLevelMember(["STDIN", "ARGF"]).getAMethodCall(["gets", "read"]) and + stdin = true + or + // > $stdin == STDIN + // => true + // but $stdin is special in that it is a global variable and not a constant. `API::getTopLevelMember` only gets constants. + exists(DataFlow::Node dollarStdin | + dollarStdin.asExpr().getExpr().(GlobalVariableReadAccess).getVariable().getName() = "$stdin" and + this = dollarStdin.getALocalSource().getAMethodCall(["gets", "read"]) + ) and + stdin = true + or + // ARGV. + this.asExpr().getExpr().(GlobalVariableReadAccess).getVariable().getName() = "ARGV" and + stdin = false + or + this.(Kernel::KernelMethodCall).getMethodName() = ["gets", "readline", "readlines"] and + stdin = true + } + + override string describe() { + if stdin = true then result = "value from stdin" else result = "value from ARGV" + } + } + + /** + * An argument in a call to `YAML.unsafe_*` and `YAML.load_stream` , considered a sink + * for unsafe deserialization. The `YAML` module is an alias of `Psych` in + * recent versions of Ruby. + */ + class YamlLoadArgument extends Sink { + YamlLoadArgument() { + // Note: this is safe in psych/yaml >= 4.0.0. + this = yamlLibrary().getAMethodCall("load").getArgument(0) + or + this = + yamlLibrary() + .getAMethodCall(["unsafe_load_file", "unsafe_load", "load_stream"]) + .getArgument(0) + or + this = yamlLibrary().getAMethodCall(["unsafe_load", "load_stream"]).getKeywordArgument("yaml") + or + this = yamlLibrary().getAMethodCall("unsafe_load_file").getKeywordArgument("filename") + } + } + + /** + * An argument in a call to `YAML.parse*`, considered a sink for unsafe deserialization + * if there is a call to `to_ruby` on the returned value of any Successor. + */ + class YamlParseArgument extends Sink { + YamlParseArgument() { + this = + yamlParseNode(yamlLibrary().getMethod(["parse", "parse_stream", "parse_file"])) + .getMethod(["to_ruby", "transform"]) + .getReturn() + .asSource() + } + } +} diff --git a/ruby/ql/src/experimental/cwe-502/Yaml.qll b/ruby/ql/src/experimental/cwe-502/Yaml.qll new file mode 100644 index 00000000000..3751faba312 --- /dev/null +++ b/ruby/ql/src/experimental/cwe-502/Yaml.qll @@ -0,0 +1,33 @@ +/** + * Provides modeling for the `YAML` and `Psych` libraries. + */ + +private import codeql.ruby.dataflow.FlowSteps +private import codeql.ruby.DataFlow +private import codeql.ruby.ApiGraphs + +/** + * Gets A Node ends with YAML parse, parse_stream, parse_file methods + */ +API::Node yamlParseNode(API::Node yamlParseInstance) { + result = yamlParseInstance + or + result = yamlParseNode(yamlParseInstance).getReturn() + or + result = yamlParseNode(yamlParseInstance).getBlock() + or + result = yamlParseNode(yamlParseInstance).getAnElement() + or + result = yamlParseNode(yamlParseInstance).getParameter(_) + or + result = yamlParseNode(yamlParseInstance).getMethod(_) + or + result = yamlParseNode(yamlParseInstance).getMember(_) + or + result = yamlParseNode(yamlParseInstance).getArgument(_) +} + +/** + * Gets A YAML module instance + */ +API::Node yamlLibrary() { result = API::getTopLevelMember(["YAML", "Psych"]) } diff --git a/ruby/ql/src/experimental/cwe-502/examples/UnsafeDeserializationBad.rb b/ruby/ql/src/experimental/cwe-502/examples/UnsafeDeserializationBad.rb new file mode 100644 index 00000000000..f4455ba3da0 --- /dev/null +++ b/ruby/ql/src/experimental/cwe-502/examples/UnsafeDeserializationBad.rb @@ -0,0 +1,16 @@ +require 'yaml' + +class UserController < ActionController::Base + def yaml_example + object = YAML.unsafe_load params[:yaml] + object = YAML.load_stream params[:yaml] + parsed_yaml = Psych.parse_stream(params[:yaml]) + + # to_ruby is unsafe + parsed_yaml.children.each do |child| + object = child.to_ruby + end + object = Psych.parse(params[:yaml]).to_ruby + # ... + end +end \ No newline at end of file diff --git a/ruby/ql/src/experimental/cwe-502/examples/UnsafeDeserializationGood.rb b/ruby/ql/src/experimental/cwe-502/examples/UnsafeDeserializationGood.rb new file mode 100644 index 00000000000..99a1408cffc --- /dev/null +++ b/ruby/ql/src/experimental/cwe-502/examples/UnsafeDeserializationGood.rb @@ -0,0 +1,10 @@ +require 'yaml' + +class UserController < ActionController::Base + def safe_yaml_example + object = YAML.load params[:yaml] + object = Psych.load_file params[:yaml] + object = YAML.safe_load params[:yaml] + # ... + end +end \ No newline at end of file diff --git a/ruby/ql/test/library-tests/controlflow/graph/Cfg.ql b/ruby/ql/test/library-tests/controlflow/graph/Cfg.ql index b4a5bbe946f..5e7dfe69d87 100644 --- a/ruby/ql/test/library-tests/controlflow/graph/Cfg.ql +++ b/ruby/ql/test/library-tests/controlflow/graph/Cfg.ql @@ -3,8 +3,9 @@ */ import codeql.ruby.CFG -import codeql.ruby.controlflow.internal.ControlFlowGraphImpl::TestOutput -class MyRelevantNode extends RelevantNode { - MyRelevantNode() { exists(this) } +class MyRelevantNode extends CfgNode { + string getOrderDisambiguation() { result = "" } } + +import codeql.ruby.controlflow.internal.ControlFlowGraphImpl::TestOutput diff --git a/ruby/ql/test/library-tests/dataflow/array-flow/array-flow.expected b/ruby/ql/test/library-tests/dataflow/array-flow/array-flow.expected index 046f19b454e..94906c18fb5 100644 --- a/ruby/ql/test/library-tests/dataflow/array-flow/array-flow.expected +++ b/ruby/ql/test/library-tests/dataflow/array-flow/array-flow.expected @@ -8,7 +8,8 @@ edges | array_flow.rb:5:10:5:10 | a [element 0] | array_flow.rb:5:10:5:13 | ...[...] | provenance | | | array_flow.rb:9:5:9:5 | a [element 1] | array_flow.rb:11:10:11:10 | a [element 1] | provenance | | | array_flow.rb:9:5:9:5 | a [element 1] | array_flow.rb:13:10:13:10 | a [element 1] | provenance | | -| array_flow.rb:9:13:9:21 | call to source | array_flow.rb:9:5:9:5 | a [element 1] | provenance | | +| array_flow.rb:9:9:9:25 | call to [] [element 1] | array_flow.rb:9:5:9:5 | a [element 1] | provenance | | +| array_flow.rb:9:13:9:21 | call to source | array_flow.rb:9:9:9:25 | call to [] [element 1] | provenance | | | array_flow.rb:11:10:11:10 | a [element 1] | array_flow.rb:11:10:11:13 | ...[...] | provenance | | | array_flow.rb:13:10:13:10 | a [element 1] | array_flow.rb:13:10:13:13 | ...[...] | provenance | | | array_flow.rb:17:5:17:5 | a [element] | array_flow.rb:18:10:18:10 | a [element] | provenance | | @@ -31,15 +32,18 @@ edges | array_flow.rb:28:10:28:10 | c [element] | array_flow.rb:28:10:28:13 | ...[...] | provenance | | | array_flow.rb:29:10:29:10 | c [element] | array_flow.rb:29:10:29:13 | ...[...] | provenance | | | array_flow.rb:33:5:33:5 | a [element 0] | array_flow.rb:34:27:34:27 | a [element 0] | provenance | | -| array_flow.rb:33:10:33:18 | call to source | array_flow.rb:33:5:33:5 | a [element 0] | provenance | | +| array_flow.rb:33:9:33:22 | call to [] [element 0] | array_flow.rb:33:5:33:5 | a [element 0] | provenance | | +| array_flow.rb:33:10:33:18 | call to source | array_flow.rb:33:9:33:22 | call to [] [element 0] | provenance | | | array_flow.rb:34:5:34:5 | b [element 0] | array_flow.rb:35:10:35:10 | b [element 0] | provenance | | | array_flow.rb:34:9:34:28 | call to try_convert [element 0] | array_flow.rb:34:5:34:5 | b [element 0] | provenance | | | array_flow.rb:34:27:34:27 | a [element 0] | array_flow.rb:34:9:34:28 | call to try_convert [element 0] | provenance | | | array_flow.rb:35:10:35:10 | b [element 0] | array_flow.rb:35:10:35:13 | ...[...] | provenance | | | array_flow.rb:40:5:40:5 | a [element 0] | array_flow.rb:42:9:42:9 | a [element 0] | provenance | | -| array_flow.rb:40:10:40:20 | call to source | array_flow.rb:40:5:40:5 | a [element 0] | provenance | | +| array_flow.rb:40:9:40:24 | call to [] [element 0] | array_flow.rb:40:5:40:5 | a [element 0] | provenance | | +| array_flow.rb:40:10:40:20 | call to source | array_flow.rb:40:9:40:24 | call to [] [element 0] | provenance | | | array_flow.rb:41:5:41:5 | b [element 2] | array_flow.rb:42:13:42:13 | b [element 2] | provenance | | -| array_flow.rb:41:16:41:26 | call to source | array_flow.rb:41:5:41:5 | b [element 2] | provenance | | +| array_flow.rb:41:9:41:27 | call to [] [element 2] | array_flow.rb:41:5:41:5 | b [element 2] | provenance | | +| array_flow.rb:41:16:41:26 | call to source | array_flow.rb:41:9:41:27 | call to [] [element 2] | provenance | | | array_flow.rb:42:5:42:5 | c [element] | array_flow.rb:43:10:43:10 | c [element] | provenance | | | array_flow.rb:42:5:42:5 | c [element] | array_flow.rb:44:10:44:10 | c [element] | provenance | | | array_flow.rb:42:9:42:9 | a [element 0] | array_flow.rb:42:9:42:13 | ... & ... [element] | provenance | | @@ -48,7 +52,8 @@ edges | array_flow.rb:43:10:43:10 | c [element] | array_flow.rb:43:10:43:13 | ...[...] | provenance | | | array_flow.rb:44:10:44:10 | c [element] | array_flow.rb:44:10:44:13 | ...[...] | provenance | | | array_flow.rb:48:5:48:5 | a [element 0] | array_flow.rb:49:9:49:9 | a [element 0] | provenance | | -| array_flow.rb:48:10:48:18 | call to source | array_flow.rb:48:5:48:5 | a [element 0] | provenance | | +| array_flow.rb:48:9:48:22 | call to [] [element 0] | array_flow.rb:48:5:48:5 | a [element 0] | provenance | | +| array_flow.rb:48:10:48:18 | call to source | array_flow.rb:48:9:48:22 | call to [] [element 0] | provenance | | | array_flow.rb:49:5:49:5 | b [element] | array_flow.rb:50:10:50:10 | b [element] | provenance | | | array_flow.rb:49:5:49:5 | b [element] | array_flow.rb:51:10:51:10 | b [element] | provenance | | | array_flow.rb:49:9:49:9 | a [element 0] | array_flow.rb:49:9:49:13 | ... * ... [element] | provenance | | @@ -56,9 +61,11 @@ edges | array_flow.rb:50:10:50:10 | b [element] | array_flow.rb:50:10:50:13 | ...[...] | provenance | | | array_flow.rb:51:10:51:10 | b [element] | array_flow.rb:51:10:51:13 | ...[...] | provenance | | | array_flow.rb:55:5:55:5 | a [element 0] | array_flow.rb:57:9:57:9 | a [element 0] | provenance | | -| array_flow.rb:55:10:55:20 | call to source | array_flow.rb:55:5:55:5 | a [element 0] | provenance | | +| array_flow.rb:55:9:55:24 | call to [] [element 0] | array_flow.rb:55:5:55:5 | a [element 0] | provenance | | +| array_flow.rb:55:10:55:20 | call to source | array_flow.rb:55:9:55:24 | call to [] [element 0] | provenance | | | array_flow.rb:56:5:56:5 | b [element 1] | array_flow.rb:57:13:57:13 | b [element 1] | provenance | | -| array_flow.rb:56:13:56:23 | call to source | array_flow.rb:56:5:56:5 | b [element 1] | provenance | | +| array_flow.rb:56:9:56:24 | call to [] [element 1] | array_flow.rb:56:5:56:5 | b [element 1] | provenance | | +| array_flow.rb:56:13:56:23 | call to source | array_flow.rb:56:9:56:24 | call to [] [element 1] | provenance | | | array_flow.rb:57:5:57:5 | c [element 0] | array_flow.rb:58:10:58:10 | c [element 0] | provenance | | | array_flow.rb:57:5:57:5 | c [element] | array_flow.rb:58:10:58:10 | c [element] | provenance | | | array_flow.rb:57:5:57:5 | c [element] | array_flow.rb:59:10:59:10 | c [element] | provenance | | @@ -70,7 +77,8 @@ edges | array_flow.rb:58:10:58:10 | c [element] | array_flow.rb:58:10:58:13 | ...[...] | provenance | | | array_flow.rb:59:10:59:10 | c [element] | array_flow.rb:59:10:59:13 | ...[...] | provenance | | | array_flow.rb:63:5:63:5 | a [element 0] | array_flow.rb:65:9:65:9 | a [element 0] | provenance | | -| array_flow.rb:63:10:63:20 | call to source | array_flow.rb:63:5:63:5 | a [element 0] | provenance | | +| array_flow.rb:63:9:63:24 | call to [] [element 0] | array_flow.rb:63:5:63:5 | a [element 0] | provenance | | +| array_flow.rb:63:10:63:20 | call to source | array_flow.rb:63:9:63:24 | call to [] [element 0] | provenance | | | array_flow.rb:65:5:65:5 | c [element] | array_flow.rb:66:10:66:10 | c [element] | provenance | | | array_flow.rb:65:5:65:5 | c [element] | array_flow.rb:67:10:67:10 | c [element] | provenance | | | array_flow.rb:65:9:65:9 | a [element 0] | array_flow.rb:65:9:65:13 | ... - ... [element] | provenance | | @@ -79,7 +87,8 @@ edges | array_flow.rb:67:10:67:10 | c [element] | array_flow.rb:67:10:67:13 | ...[...] | provenance | | | array_flow.rb:71:5:71:5 | a [element 0] | array_flow.rb:72:9:72:9 | a [element 0] | provenance | | | array_flow.rb:71:5:71:5 | a [element 0] | array_flow.rb:73:10:73:10 | a [element 0] | provenance | | -| array_flow.rb:71:10:71:20 | call to source | array_flow.rb:71:5:71:5 | a [element 0] | provenance | | +| array_flow.rb:71:9:71:24 | call to [] [element 0] | array_flow.rb:71:5:71:5 | a [element 0] | provenance | | +| array_flow.rb:71:10:71:20 | call to source | array_flow.rb:71:9:71:24 | call to [] [element 0] | provenance | | | array_flow.rb:72:5:72:5 | b [element 0] | array_flow.rb:75:10:75:10 | b [element 0] | provenance | | | array_flow.rb:72:5:72:5 | b [element] | array_flow.rb:75:10:75:10 | b [element] | provenance | | | array_flow.rb:72:5:72:5 | b [element] | array_flow.rb:76:10:76:10 | b [element] | provenance | | @@ -97,11 +106,13 @@ edges | array_flow.rb:75:10:75:10 | b [element] | array_flow.rb:75:10:75:13 | ...[...] | provenance | | | array_flow.rb:76:10:76:10 | b [element] | array_flow.rb:76:10:76:13 | ...[...] | provenance | | | array_flow.rb:80:5:80:5 | a [element 1] | array_flow.rb:81:15:81:15 | a [element 1] | provenance | | -| array_flow.rb:80:13:80:21 | call to source | array_flow.rb:80:5:80:5 | a [element 1] | provenance | | +| array_flow.rb:80:9:80:25 | call to [] [element 1] | array_flow.rb:80:5:80:5 | a [element 1] | provenance | | +| array_flow.rb:80:13:80:21 | call to source | array_flow.rb:80:9:80:25 | call to [] [element 1] | provenance | | | array_flow.rb:81:8:81:8 | c | array_flow.rb:83:10:83:10 | c | provenance | | | array_flow.rb:81:15:81:15 | a [element 1] | array_flow.rb:81:8:81:8 | c | provenance | | | array_flow.rb:88:5:88:5 | a [element 1] | array_flow.rb:89:9:89:9 | a [element 1] | provenance | | -| array_flow.rb:88:13:88:22 | call to source | array_flow.rb:88:5:88:5 | a [element 1] | provenance | | +| array_flow.rb:88:9:88:26 | call to [] [element 1] | array_flow.rb:88:5:88:5 | a [element 1] | provenance | | +| array_flow.rb:88:13:88:22 | call to source | array_flow.rb:88:9:88:26 | call to [] [element 1] | provenance | | | array_flow.rb:89:5:89:5 | b [element 1] | array_flow.rb:91:10:91:10 | b [element 1] | provenance | | | array_flow.rb:89:5:89:5 | b [element 1] | array_flow.rb:92:10:92:10 | b [element 1] | provenance | | | array_flow.rb:89:9:89:9 | a [element 1] | array_flow.rb:89:9:89:15 | ...[...] [element 1] | provenance | | @@ -109,7 +120,8 @@ edges | array_flow.rb:91:10:91:10 | b [element 1] | array_flow.rb:91:10:91:13 | ...[...] | provenance | | | array_flow.rb:92:10:92:10 | b [element 1] | array_flow.rb:92:10:92:13 | ...[...] | provenance | | | array_flow.rb:96:5:96:5 | a [element 1] | array_flow.rb:97:9:97:9 | a [element 1] | provenance | | -| array_flow.rb:96:13:96:22 | call to source | array_flow.rb:96:5:96:5 | a [element 1] | provenance | | +| array_flow.rb:96:9:96:26 | call to [] [element 1] | array_flow.rb:96:5:96:5 | a [element 1] | provenance | | +| array_flow.rb:96:13:96:22 | call to source | array_flow.rb:96:9:96:26 | call to [] [element 1] | provenance | | | array_flow.rb:97:5:97:5 | b [element 1] | array_flow.rb:99:10:99:10 | b [element 1] | provenance | | | array_flow.rb:97:5:97:5 | b [element 1] | array_flow.rb:101:10:101:10 | b [element 1] | provenance | | | array_flow.rb:97:9:97:9 | a [element 1] | array_flow.rb:97:9:97:15 | ...[...] [element 1] | provenance | | @@ -117,7 +129,8 @@ edges | array_flow.rb:99:10:99:10 | b [element 1] | array_flow.rb:99:10:99:13 | ...[...] | provenance | | | array_flow.rb:101:10:101:10 | b [element 1] | array_flow.rb:101:10:101:13 | ...[...] | provenance | | | array_flow.rb:103:5:103:5 | a [element 1] | array_flow.rb:104:9:104:9 | a [element 1] | provenance | | -| array_flow.rb:103:13:103:24 | call to source | array_flow.rb:103:5:103:5 | a [element 1] | provenance | | +| array_flow.rb:103:9:103:39 | call to [] [element 1] | array_flow.rb:103:5:103:5 | a [element 1] | provenance | | +| array_flow.rb:103:13:103:24 | call to source | array_flow.rb:103:9:103:39 | call to [] [element 1] | provenance | | | array_flow.rb:104:5:104:5 | b [element 1] | array_flow.rb:106:10:106:10 | b [element 1] | provenance | | | array_flow.rb:104:9:104:9 | a [element 1] | array_flow.rb:104:9:104:16 | ...[...] [element 1] | provenance | | | array_flow.rb:104:9:104:16 | ...[...] [element 1] | array_flow.rb:104:5:104:5 | b [element 1] | provenance | | @@ -126,8 +139,10 @@ edges | array_flow.rb:109:5:109:5 | a [element 1] | array_flow.rb:114:9:114:9 | a [element 1] | provenance | | | array_flow.rb:109:5:109:5 | a [element 3] | array_flow.rb:110:9:110:9 | a [element 3] | provenance | | | array_flow.rb:109:5:109:5 | a [element 3] | array_flow.rb:114:9:114:9 | a [element 3] | provenance | | -| array_flow.rb:109:13:109:24 | call to source | array_flow.rb:109:5:109:5 | a [element 1] | provenance | | -| array_flow.rb:109:30:109:41 | call to source | array_flow.rb:109:5:109:5 | a [element 3] | provenance | | +| array_flow.rb:109:9:109:42 | call to [] [element 1] | array_flow.rb:109:5:109:5 | a [element 1] | provenance | | +| array_flow.rb:109:9:109:42 | call to [] [element 3] | array_flow.rb:109:5:109:5 | a [element 3] | provenance | | +| array_flow.rb:109:13:109:24 | call to source | array_flow.rb:109:9:109:42 | call to [] [element 1] | provenance | | +| array_flow.rb:109:30:109:41 | call to source | array_flow.rb:109:9:109:42 | call to [] [element 3] | provenance | | | array_flow.rb:110:5:110:5 | b [element] | array_flow.rb:111:10:111:10 | b [element] | provenance | | | array_flow.rb:110:5:110:5 | b [element] | array_flow.rb:112:10:112:10 | b [element] | provenance | | | array_flow.rb:110:9:110:9 | a [element 1] | array_flow.rb:110:9:110:18 | ...[...] [element] | provenance | | @@ -152,7 +167,8 @@ edges | array_flow.rb:129:5:129:5 | [post] a [element] | array_flow.rb:130:10:130:10 | a [element] | provenance | | | array_flow.rb:129:5:129:5 | [post] a [element] | array_flow.rb:131:10:131:10 | a [element] | provenance | | | array_flow.rb:129:5:129:5 | [post] a [element] | array_flow.rb:132:10:132:10 | a [element] | provenance | | -| array_flow.rb:129:19:129:28 | call to source | array_flow.rb:129:5:129:5 | [post] a [element] | provenance | | +| array_flow.rb:129:15:129:32 | call to [] [element 1] | array_flow.rb:129:5:129:5 | [post] a [element] | provenance | | +| array_flow.rb:129:19:129:28 | call to source | array_flow.rb:129:15:129:32 | call to [] [element 1] | provenance | | | array_flow.rb:130:10:130:10 | a [element] | array_flow.rb:130:10:130:13 | ...[...] | provenance | | | array_flow.rb:131:10:131:10 | a [element] | array_flow.rb:131:10:131:13 | ...[...] | provenance | | | array_flow.rb:132:10:132:10 | a [element] | array_flow.rb:132:10:132:13 | ...[...] | provenance | | @@ -166,21 +182,25 @@ edges | array_flow.rb:145:5:145:5 | [post] a [element] | array_flow.rb:146:10:146:10 | a [element] | provenance | | | array_flow.rb:145:5:145:5 | [post] a [element] | array_flow.rb:147:10:147:10 | a [element] | provenance | | | array_flow.rb:145:5:145:5 | [post] a [element] | array_flow.rb:148:10:148:10 | a [element] | provenance | | -| array_flow.rb:145:19:145:28 | call to source | array_flow.rb:145:5:145:5 | [post] a [element] | provenance | | +| array_flow.rb:145:15:145:32 | call to [] [element 1] | array_flow.rb:145:5:145:5 | [post] a [element] | provenance | | +| array_flow.rb:145:19:145:28 | call to source | array_flow.rb:145:15:145:32 | call to [] [element 1] | provenance | | | array_flow.rb:146:10:146:10 | a [element] | array_flow.rb:146:10:146:13 | ...[...] | provenance | | | array_flow.rb:147:10:147:10 | a [element] | array_flow.rb:147:10:147:13 | ...[...] | provenance | | | array_flow.rb:148:10:148:10 | a [element] | array_flow.rb:148:10:148:13 | ...[...] | provenance | | | array_flow.rb:152:5:152:5 | a [element 2] | array_flow.rb:153:5:153:5 | a [element 2] | provenance | | -| array_flow.rb:152:16:152:25 | call to source | array_flow.rb:152:5:152:5 | a [element 2] | provenance | | +| array_flow.rb:152:9:152:26 | call to [] [element 2] | array_flow.rb:152:5:152:5 | a [element 2] | provenance | | +| array_flow.rb:152:16:152:25 | call to source | array_flow.rb:152:9:152:26 | call to [] [element 2] | provenance | | | array_flow.rb:153:5:153:5 | a [element 2] | array_flow.rb:153:16:153:16 | x | provenance | | | array_flow.rb:153:16:153:16 | x | array_flow.rb:154:14:154:14 | x | provenance | | | array_flow.rb:159:5:159:5 | a [element 2] | array_flow.rb:160:5:160:5 | a [element 2] | provenance | | -| array_flow.rb:159:16:159:25 | call to source | array_flow.rb:159:5:159:5 | a [element 2] | provenance | | +| array_flow.rb:159:9:159:26 | call to [] [element 2] | array_flow.rb:159:5:159:5 | a [element 2] | provenance | | +| array_flow.rb:159:16:159:25 | call to source | array_flow.rb:159:9:159:26 | call to [] [element 2] | provenance | | | array_flow.rb:160:5:160:5 | a [element 2] | array_flow.rb:160:16:160:16 | x | provenance | | | array_flow.rb:160:16:160:16 | x | array_flow.rb:161:14:161:14 | x | provenance | | | array_flow.rb:166:5:166:5 | a [element 0] | array_flow.rb:167:9:167:9 | a [element 0] | provenance | | | array_flow.rb:166:5:166:5 | a [element 0] | array_flow.rb:168:10:168:10 | a [element 0] | provenance | | -| array_flow.rb:166:10:166:21 | call to source | array_flow.rb:166:5:166:5 | a [element 0] | provenance | | +| array_flow.rb:166:9:166:25 | call to [] [element 0] | array_flow.rb:166:5:166:5 | a [element 0] | provenance | | +| array_flow.rb:166:10:166:21 | call to source | array_flow.rb:166:9:166:25 | call to [] [element 0] | provenance | | | array_flow.rb:167:5:167:5 | b [element 0] | array_flow.rb:170:10:170:10 | b [element 0] | provenance | | | array_flow.rb:167:5:167:5 | b [element] | array_flow.rb:170:10:170:10 | b [element] | provenance | | | array_flow.rb:167:5:167:5 | b [element] | array_flow.rb:171:10:171:10 | b [element] | provenance | | @@ -200,10 +220,12 @@ edges | array_flow.rb:170:10:170:10 | b [element] | array_flow.rb:170:10:170:13 | ...[...] | provenance | | | array_flow.rb:171:10:171:10 | b [element] | array_flow.rb:171:10:171:13 | ...[...] | provenance | | | array_flow.rb:177:5:177:5 | c [element 1] | array_flow.rb:178:16:178:16 | c [element 1] | provenance | | -| array_flow.rb:177:15:177:24 | call to source | array_flow.rb:177:5:177:5 | c [element 1] | provenance | | +| array_flow.rb:177:9:177:25 | call to [] [element 1] | array_flow.rb:177:5:177:5 | c [element 1] | provenance | | +| array_flow.rb:177:15:177:24 | call to source | array_flow.rb:177:9:177:25 | call to [] [element 1] | provenance | | | array_flow.rb:178:5:178:5 | d [element 2, element 1] | array_flow.rb:179:11:179:11 | d [element 2, element 1] | provenance | | | array_flow.rb:178:5:178:5 | d [element 2, element 1] | array_flow.rb:180:11:180:11 | d [element 2, element 1] | provenance | | -| array_flow.rb:178:16:178:16 | c [element 1] | array_flow.rb:178:5:178:5 | d [element 2, element 1] | provenance | | +| array_flow.rb:178:9:178:17 | call to [] [element 2, element 1] | array_flow.rb:178:5:178:5 | d [element 2, element 1] | provenance | | +| array_flow.rb:178:16:178:16 | c [element 1] | array_flow.rb:178:9:178:17 | call to [] [element 2, element 1] | provenance | | | array_flow.rb:179:11:179:11 | d [element 2, element 1] | array_flow.rb:179:11:179:22 | call to assoc [element 1] | provenance | | | array_flow.rb:179:11:179:22 | call to assoc [element 1] | array_flow.rb:179:11:179:25 | ...[...] | provenance | | | array_flow.rb:179:11:179:25 | ...[...] | array_flow.rb:179:10:179:26 | ( ... ) | provenance | | @@ -212,28 +234,34 @@ edges | array_flow.rb:180:11:180:25 | ...[...] | array_flow.rb:180:10:180:26 | ( ... ) | provenance | | | array_flow.rb:184:5:184:5 | a [element 1] | array_flow.rb:186:10:186:10 | a [element 1] | provenance | | | array_flow.rb:184:5:184:5 | a [element 1] | array_flow.rb:188:10:188:10 | a [element 1] | provenance | | -| array_flow.rb:184:13:184:22 | call to source | array_flow.rb:184:5:184:5 | a [element 1] | provenance | | +| array_flow.rb:184:9:184:26 | call to [] [element 1] | array_flow.rb:184:5:184:5 | a [element 1] | provenance | | +| array_flow.rb:184:13:184:22 | call to source | array_flow.rb:184:9:184:26 | call to [] [element 1] | provenance | | | array_flow.rb:186:10:186:10 | a [element 1] | array_flow.rb:186:10:186:16 | call to at | provenance | | | array_flow.rb:188:10:188:10 | a [element 1] | array_flow.rb:188:10:188:16 | call to at | provenance | | | array_flow.rb:192:5:192:5 | a [element 2] | array_flow.rb:193:9:193:9 | a [element 2] | provenance | | -| array_flow.rb:192:16:192:25 | call to source | array_flow.rb:192:5:192:5 | a [element 2] | provenance | | +| array_flow.rb:192:9:192:26 | call to [] [element 2] | array_flow.rb:192:5:192:5 | a [element 2] | provenance | | +| array_flow.rb:192:16:192:25 | call to source | array_flow.rb:192:9:192:26 | call to [] [element 2] | provenance | | | array_flow.rb:193:5:193:5 | b | array_flow.rb:196:10:196:10 | b | provenance | | | array_flow.rb:193:9:193:9 | a [element 2] | array_flow.rb:193:9:195:7 | call to bsearch | provenance | | | array_flow.rb:193:9:193:9 | a [element 2] | array_flow.rb:193:23:193:23 | x | provenance | | | array_flow.rb:193:9:195:7 | call to bsearch | array_flow.rb:193:5:193:5 | b | provenance | | | array_flow.rb:193:23:193:23 | x | array_flow.rb:194:14:194:14 | x | provenance | | | array_flow.rb:200:5:200:5 | a [element 2] | array_flow.rb:201:9:201:9 | a [element 2] | provenance | | -| array_flow.rb:200:16:200:25 | call to source | array_flow.rb:200:5:200:5 | a [element 2] | provenance | | +| array_flow.rb:200:9:200:26 | call to [] [element 2] | array_flow.rb:200:5:200:5 | a [element 2] | provenance | | +| array_flow.rb:200:16:200:25 | call to source | array_flow.rb:200:9:200:26 | call to [] [element 2] | provenance | | | array_flow.rb:201:9:201:9 | a [element 2] | array_flow.rb:201:29:201:29 | x | provenance | | | array_flow.rb:201:29:201:29 | x | array_flow.rb:202:14:202:14 | x | provenance | | | array_flow.rb:208:5:208:5 | a [element 2] | array_flow.rb:209:5:209:5 | a [element 2] | provenance | | -| array_flow.rb:208:16:208:25 | call to source | array_flow.rb:208:5:208:5 | a [element 2] | provenance | | +| array_flow.rb:208:9:208:26 | call to [] [element 2] | array_flow.rb:208:5:208:5 | a [element 2] | provenance | | +| array_flow.rb:208:16:208:25 | call to source | array_flow.rb:208:9:208:26 | call to [] [element 2] | provenance | | | array_flow.rb:209:5:209:5 | a [element 2] | array_flow.rb:209:17:209:17 | x | provenance | | | array_flow.rb:209:17:209:17 | x | array_flow.rb:210:14:210:14 | x | provenance | | | array_flow.rb:215:5:215:5 | a [element 2] | array_flow.rb:216:9:216:9 | a [element 2] | provenance | | | array_flow.rb:215:5:215:5 | a [element 3] | array_flow.rb:216:9:216:9 | a [element 3] | provenance | | -| array_flow.rb:215:16:215:27 | call to source | array_flow.rb:215:5:215:5 | a [element 2] | provenance | | -| array_flow.rb:215:30:215:41 | call to source | array_flow.rb:215:5:215:5 | a [element 3] | provenance | | +| array_flow.rb:215:9:215:42 | call to [] [element 2] | array_flow.rb:215:5:215:5 | a [element 2] | provenance | | +| array_flow.rb:215:9:215:42 | call to [] [element 3] | array_flow.rb:215:5:215:5 | a [element 3] | provenance | | +| array_flow.rb:215:16:215:27 | call to source | array_flow.rb:215:9:215:42 | call to [] [element 2] | provenance | | +| array_flow.rb:215:30:215:41 | call to source | array_flow.rb:215:9:215:42 | call to [] [element 3] | provenance | | | array_flow.rb:216:9:216:9 | a [element 2] | array_flow.rb:216:27:216:27 | x | provenance | | | array_flow.rb:216:9:216:9 | a [element 2] | array_flow.rb:216:30:216:30 | y | provenance | | | array_flow.rb:216:9:216:9 | a [element 3] | array_flow.rb:216:27:216:27 | x | provenance | | @@ -241,7 +269,8 @@ edges | array_flow.rb:216:27:216:27 | x | array_flow.rb:217:14:217:14 | x | provenance | | | array_flow.rb:216:30:216:30 | y | array_flow.rb:218:14:218:14 | y | provenance | | | array_flow.rb:231:5:231:5 | a [element 2] | array_flow.rb:232:9:232:9 | a [element 2] | provenance | | -| array_flow.rb:231:16:231:27 | call to source | array_flow.rb:231:5:231:5 | a [element 2] | provenance | | +| array_flow.rb:231:9:231:28 | call to [] [element 2] | array_flow.rb:231:5:231:5 | a [element 2] | provenance | | +| array_flow.rb:231:16:231:27 | call to source | array_flow.rb:231:9:231:28 | call to [] [element 2] | provenance | | | array_flow.rb:232:5:232:5 | b [element] | array_flow.rb:236:10:236:10 | b [element] | provenance | | | array_flow.rb:232:9:232:9 | a [element 2] | array_flow.rb:232:23:232:23 | x | provenance | | | array_flow.rb:232:9:235:7 | call to collect [element] | array_flow.rb:232:5:232:5 | b [element] | provenance | | @@ -249,7 +278,8 @@ edges | array_flow.rb:234:9:234:19 | call to source | array_flow.rb:232:9:235:7 | call to collect [element] | provenance | | | array_flow.rb:236:10:236:10 | b [element] | array_flow.rb:236:10:236:13 | ...[...] | provenance | | | array_flow.rb:240:5:240:5 | a [element 2] | array_flow.rb:241:9:241:9 | a [element 2] | provenance | | -| array_flow.rb:240:16:240:27 | call to source | array_flow.rb:240:5:240:5 | a [element 2] | provenance | | +| array_flow.rb:240:9:240:28 | call to [] [element 2] | array_flow.rb:240:5:240:5 | a [element 2] | provenance | | +| array_flow.rb:240:16:240:27 | call to source | array_flow.rb:240:9:240:28 | call to [] [element 2] | provenance | | | array_flow.rb:241:5:241:5 | b [element] | array_flow.rb:246:10:246:10 | b [element] | provenance | | | array_flow.rb:241:9:241:9 | [post] a [element] | array_flow.rb:245:10:245:10 | a [element] | provenance | | | array_flow.rb:241:9:241:9 | a [element 2] | array_flow.rb:241:24:241:24 | x | provenance | | @@ -261,13 +291,15 @@ edges | array_flow.rb:246:10:246:10 | b [element] | array_flow.rb:246:10:246:13 | ...[...] | provenance | | | array_flow.rb:250:5:250:5 | a [element 2] | array_flow.rb:251:9:251:9 | a [element 2] | provenance | | | array_flow.rb:250:5:250:5 | a [element 2] | array_flow.rb:256:9:256:9 | a [element 2] | provenance | | -| array_flow.rb:250:16:250:27 | call to source | array_flow.rb:250:5:250:5 | a [element 2] | provenance | | +| array_flow.rb:250:9:250:28 | call to [] [element 2] | array_flow.rb:250:5:250:5 | a [element 2] | provenance | | +| array_flow.rb:250:16:250:27 | call to source | array_flow.rb:250:9:250:28 | call to [] [element 2] | provenance | | | array_flow.rb:251:5:251:5 | b [element] | array_flow.rb:255:10:255:10 | b [element] | provenance | | | array_flow.rb:251:9:251:9 | a [element 2] | array_flow.rb:251:9:254:7 | call to collect_concat [element] | provenance | | | array_flow.rb:251:9:251:9 | a [element 2] | array_flow.rb:251:30:251:30 | x | provenance | | | array_flow.rb:251:9:254:7 | call to collect_concat [element] | array_flow.rb:251:5:251:5 | b [element] | provenance | | | array_flow.rb:251:30:251:30 | x | array_flow.rb:252:14:252:14 | x | provenance | | -| array_flow.rb:253:13:253:24 | call to source | array_flow.rb:251:9:254:7 | call to collect_concat [element] | provenance | | +| array_flow.rb:253:9:253:25 | call to [] [element 1] | array_flow.rb:251:9:254:7 | call to collect_concat [element] | provenance | | +| array_flow.rb:253:13:253:24 | call to source | array_flow.rb:253:9:253:25 | call to [] [element 1] | provenance | | | array_flow.rb:255:10:255:10 | b [element] | array_flow.rb:255:10:255:13 | ...[...] | provenance | | | array_flow.rb:256:5:256:5 | b [element] | array_flow.rb:260:10:260:10 | b [element] | provenance | | | array_flow.rb:256:9:256:9 | a [element 2] | array_flow.rb:256:30:256:30 | x | provenance | | @@ -276,7 +308,8 @@ edges | array_flow.rb:258:9:258:20 | call to source | array_flow.rb:256:9:259:7 | call to collect_concat [element] | provenance | | | array_flow.rb:260:10:260:10 | b [element] | array_flow.rb:260:10:260:13 | ...[...] | provenance | | | array_flow.rb:264:5:264:5 | a [element 2] | array_flow.rb:265:9:265:9 | a [element 2] | provenance | | -| array_flow.rb:264:16:264:25 | call to source | array_flow.rb:264:5:264:5 | a [element 2] | provenance | | +| array_flow.rb:264:9:264:26 | call to [] [element 2] | array_flow.rb:264:5:264:5 | a [element 2] | provenance | | +| array_flow.rb:264:16:264:25 | call to source | array_flow.rb:264:9:264:26 | call to [] [element 2] | provenance | | | array_flow.rb:265:5:265:5 | b [element 2] | array_flow.rb:269:10:269:10 | b [element 2] | provenance | | | array_flow.rb:265:9:265:9 | a [element 2] | array_flow.rb:265:9:267:7 | call to combination [element 2] | provenance | | | array_flow.rb:265:9:265:9 | a [element 2] | array_flow.rb:265:30:265:30 | x [element] | provenance | | @@ -285,13 +318,15 @@ edges | array_flow.rb:266:14:266:14 | x [element] | array_flow.rb:266:14:266:17 | ...[...] | provenance | | | array_flow.rb:269:10:269:10 | b [element 2] | array_flow.rb:269:10:269:13 | ...[...] | provenance | | | array_flow.rb:273:5:273:5 | a [element 2] | array_flow.rb:274:9:274:9 | a [element 2] | provenance | | -| array_flow.rb:273:16:273:25 | call to source | array_flow.rb:273:5:273:5 | a [element 2] | provenance | | +| array_flow.rb:273:9:273:26 | call to [] [element 2] | array_flow.rb:273:5:273:5 | a [element 2] | provenance | | +| array_flow.rb:273:16:273:25 | call to source | array_flow.rb:273:9:273:26 | call to [] [element 2] | provenance | | | array_flow.rb:274:5:274:5 | b [element] | array_flow.rb:275:10:275:10 | b [element] | provenance | | | array_flow.rb:274:9:274:9 | a [element 2] | array_flow.rb:274:9:274:17 | call to compact [element] | provenance | | | array_flow.rb:274:9:274:17 | call to compact [element] | array_flow.rb:274:5:274:5 | b [element] | provenance | | | array_flow.rb:275:10:275:10 | b [element] | array_flow.rb:275:10:275:13 | ...[...] | provenance | | | array_flow.rb:279:5:279:5 | a [element 2] | array_flow.rb:280:9:280:9 | a [element 2] | provenance | | -| array_flow.rb:279:16:279:25 | call to source | array_flow.rb:279:5:279:5 | a [element 2] | provenance | | +| array_flow.rb:279:9:279:26 | call to [] [element 2] | array_flow.rb:279:5:279:5 | a [element 2] | provenance | | +| array_flow.rb:279:16:279:25 | call to source | array_flow.rb:279:9:279:26 | call to [] [element 2] | provenance | | | array_flow.rb:280:5:280:5 | b [element] | array_flow.rb:282:10:282:10 | b [element] | provenance | | | array_flow.rb:280:9:280:9 | [post] a [element] | array_flow.rb:281:10:281:10 | a [element] | provenance | | | array_flow.rb:280:9:280:9 | a [element 2] | array_flow.rb:280:9:280:9 | [post] a [element] | provenance | | @@ -300,9 +335,11 @@ edges | array_flow.rb:281:10:281:10 | a [element] | array_flow.rb:281:10:281:13 | ...[...] | provenance | | | array_flow.rb:282:10:282:10 | b [element] | array_flow.rb:282:10:282:13 | ...[...] | provenance | | | array_flow.rb:286:5:286:5 | a [element 2] | array_flow.rb:290:10:290:10 | a [element 2] | provenance | | -| array_flow.rb:286:16:286:27 | call to source | array_flow.rb:286:5:286:5 | a [element 2] | provenance | | +| array_flow.rb:286:9:286:28 | call to [] [element 2] | array_flow.rb:286:5:286:5 | a [element 2] | provenance | | +| array_flow.rb:286:16:286:27 | call to source | array_flow.rb:286:9:286:28 | call to [] [element 2] | provenance | | | array_flow.rb:287:5:287:5 | b [element 2] | array_flow.rb:288:14:288:14 | b [element 2] | provenance | | -| array_flow.rb:287:16:287:27 | call to source | array_flow.rb:287:5:287:5 | b [element 2] | provenance | | +| array_flow.rb:287:9:287:28 | call to [] [element 2] | array_flow.rb:287:5:287:5 | b [element 2] | provenance | | +| array_flow.rb:287:16:287:27 | call to source | array_flow.rb:287:9:287:28 | call to [] [element 2] | provenance | | | array_flow.rb:288:5:288:5 | [post] a [element] | array_flow.rb:289:10:289:10 | a [element] | provenance | | | array_flow.rb:288:5:288:5 | [post] a [element] | array_flow.rb:290:10:290:10 | a [element] | provenance | | | array_flow.rb:288:14:288:14 | b [element 2] | array_flow.rb:288:5:288:5 | [post] a [element] | provenance | | @@ -310,29 +347,35 @@ edges | array_flow.rb:290:10:290:10 | a [element 2] | array_flow.rb:290:10:290:13 | ...[...] | provenance | | | array_flow.rb:290:10:290:10 | a [element] | array_flow.rb:290:10:290:13 | ...[...] | provenance | | | array_flow.rb:294:5:294:5 | a [element 2] | array_flow.rb:295:5:295:5 | a [element 2] | provenance | | -| array_flow.rb:294:16:294:25 | call to source | array_flow.rb:294:5:294:5 | a [element 2] | provenance | | +| array_flow.rb:294:9:294:26 | call to [] [element 2] | array_flow.rb:294:5:294:5 | a [element 2] | provenance | | +| array_flow.rb:294:16:294:25 | call to source | array_flow.rb:294:9:294:26 | call to [] [element 2] | provenance | | | array_flow.rb:295:5:295:5 | a [element 2] | array_flow.rb:295:17:295:17 | x | provenance | | | array_flow.rb:295:17:295:17 | x | array_flow.rb:296:14:296:14 | x | provenance | | | array_flow.rb:301:5:301:5 | a [element 2] | array_flow.rb:302:5:302:5 | a [element 2] | provenance | | -| array_flow.rb:301:16:301:25 | call to source | array_flow.rb:301:5:301:5 | a [element 2] | provenance | | +| array_flow.rb:301:9:301:26 | call to [] [element 2] | array_flow.rb:301:5:301:5 | a [element 2] | provenance | | +| array_flow.rb:301:16:301:25 | call to source | array_flow.rb:301:9:301:26 | call to [] [element 2] | provenance | | | array_flow.rb:302:5:302:5 | a [element 2] | array_flow.rb:302:20:302:20 | x | provenance | | | array_flow.rb:302:20:302:20 | x | array_flow.rb:303:14:303:14 | x | provenance | | | array_flow.rb:308:5:308:5 | a [element 2] | array_flow.rb:309:9:309:9 | a [element 2] | provenance | | -| array_flow.rb:308:16:308:25 | call to source | array_flow.rb:308:5:308:5 | a [element 2] | provenance | | +| array_flow.rb:308:9:308:26 | call to [] [element 2] | array_flow.rb:308:5:308:5 | a [element 2] | provenance | | +| array_flow.rb:308:16:308:25 | call to source | array_flow.rb:308:9:308:26 | call to [] [element 2] | provenance | | | array_flow.rb:309:5:309:5 | b [element 2] | array_flow.rb:312:10:312:10 | b [element 2] | provenance | | | array_flow.rb:309:9:309:9 | a [element 2] | array_flow.rb:309:9:309:21 | call to deconstruct [element 2] | provenance | | | array_flow.rb:309:9:309:21 | call to deconstruct [element 2] | array_flow.rb:309:5:309:5 | b [element 2] | provenance | | | array_flow.rb:312:10:312:10 | b [element 2] | array_flow.rb:312:10:312:13 | ...[...] | provenance | | | array_flow.rb:316:5:316:5 | a [element 2] | array_flow.rb:317:9:317:9 | a [element 2] | provenance | | -| array_flow.rb:316:16:316:27 | call to source | array_flow.rb:316:5:316:5 | a [element 2] | provenance | | +| array_flow.rb:316:9:316:28 | call to [] [element 2] | array_flow.rb:316:5:316:5 | a [element 2] | provenance | | +| array_flow.rb:316:16:316:27 | call to source | array_flow.rb:316:9:316:28 | call to [] [element 2] | provenance | | | array_flow.rb:317:5:317:5 | b | array_flow.rb:318:10:318:10 | b | provenance | | | array_flow.rb:317:9:317:9 | a [element 2] | array_flow.rb:317:9:317:36 | call to delete | provenance | | | array_flow.rb:317:9:317:36 | call to delete | array_flow.rb:317:5:317:5 | b | provenance | | | array_flow.rb:317:23:317:34 | call to source | array_flow.rb:317:9:317:36 | call to delete | provenance | | | array_flow.rb:325:5:325:5 | a [element 2] | array_flow.rb:326:9:326:9 | a [element 2] | provenance | | | array_flow.rb:325:5:325:5 | a [element 3] | array_flow.rb:326:9:326:9 | a [element 3] | provenance | | -| array_flow.rb:325:16:325:27 | call to source | array_flow.rb:325:5:325:5 | a [element 2] | provenance | | -| array_flow.rb:325:30:325:41 | call to source | array_flow.rb:325:5:325:5 | a [element 3] | provenance | | +| array_flow.rb:325:9:325:42 | call to [] [element 2] | array_flow.rb:325:5:325:5 | a [element 2] | provenance | | +| array_flow.rb:325:9:325:42 | call to [] [element 3] | array_flow.rb:325:5:325:5 | a [element 3] | provenance | | +| array_flow.rb:325:16:325:27 | call to source | array_flow.rb:325:9:325:42 | call to [] [element 2] | provenance | | +| array_flow.rb:325:30:325:41 | call to source | array_flow.rb:325:9:325:42 | call to [] [element 3] | provenance | | | array_flow.rb:326:5:326:5 | b | array_flow.rb:327:10:327:10 | b | provenance | | | array_flow.rb:326:9:326:9 | [post] a [element 2] | array_flow.rb:328:10:328:10 | a [element 2] | provenance | | | array_flow.rb:326:9:326:9 | a [element 2] | array_flow.rb:326:9:326:22 | call to delete_at | provenance | | @@ -341,8 +384,10 @@ edges | array_flow.rb:328:10:328:10 | a [element 2] | array_flow.rb:328:10:328:13 | ...[...] | provenance | | | array_flow.rb:330:5:330:5 | a [element 2] | array_flow.rb:331:9:331:9 | a [element 2] | provenance | | | array_flow.rb:330:5:330:5 | a [element 3] | array_flow.rb:331:9:331:9 | a [element 3] | provenance | | -| array_flow.rb:330:16:330:27 | call to source | array_flow.rb:330:5:330:5 | a [element 2] | provenance | | -| array_flow.rb:330:30:330:41 | call to source | array_flow.rb:330:5:330:5 | a [element 3] | provenance | | +| array_flow.rb:330:9:330:42 | call to [] [element 2] | array_flow.rb:330:5:330:5 | a [element 2] | provenance | | +| array_flow.rb:330:9:330:42 | call to [] [element 3] | array_flow.rb:330:5:330:5 | a [element 3] | provenance | | +| array_flow.rb:330:16:330:27 | call to source | array_flow.rb:330:9:330:42 | call to [] [element 2] | provenance | | +| array_flow.rb:330:30:330:41 | call to source | array_flow.rb:330:9:330:42 | call to [] [element 3] | provenance | | | array_flow.rb:331:5:331:5 | b | array_flow.rb:332:10:332:10 | b | provenance | | | array_flow.rb:331:9:331:9 | [post] a [element] | array_flow.rb:333:10:333:10 | a [element] | provenance | | | array_flow.rb:331:9:331:9 | [post] a [element] | array_flow.rb:334:10:334:10 | a [element] | provenance | | @@ -354,7 +399,8 @@ edges | array_flow.rb:333:10:333:10 | a [element] | array_flow.rb:333:10:333:13 | ...[...] | provenance | | | array_flow.rb:334:10:334:10 | a [element] | array_flow.rb:334:10:334:13 | ...[...] | provenance | | | array_flow.rb:338:5:338:5 | a [element 2] | array_flow.rb:339:9:339:9 | a [element 2] | provenance | | -| array_flow.rb:338:16:338:25 | call to source | array_flow.rb:338:5:338:5 | a [element 2] | provenance | | +| array_flow.rb:338:9:338:26 | call to [] [element 2] | array_flow.rb:338:5:338:5 | a [element 2] | provenance | | +| array_flow.rb:338:16:338:25 | call to source | array_flow.rb:338:9:338:26 | call to [] [element 2] | provenance | | | array_flow.rb:339:5:339:5 | b [element] | array_flow.rb:342:10:342:10 | b [element] | provenance | | | array_flow.rb:339:9:339:9 | [post] a [element] | array_flow.rb:343:10:343:10 | a [element] | provenance | | | array_flow.rb:339:9:339:9 | [post] a [element] | array_flow.rb:344:10:344:10 | a [element] | provenance | | @@ -369,7 +415,8 @@ edges | array_flow.rb:344:10:344:10 | a [element] | array_flow.rb:344:10:344:13 | ...[...] | provenance | | | array_flow.rb:345:10:345:10 | a [element] | array_flow.rb:345:10:345:13 | ...[...] | provenance | | | array_flow.rb:349:5:349:5 | a [element 2] | array_flow.rb:350:9:350:9 | a [element 2] | provenance | | -| array_flow.rb:349:16:349:25 | call to source | array_flow.rb:349:5:349:5 | a [element 2] | provenance | | +| array_flow.rb:349:9:349:26 | call to [] [element 2] | array_flow.rb:349:5:349:5 | a [element 2] | provenance | | +| array_flow.rb:349:16:349:25 | call to source | array_flow.rb:349:9:349:26 | call to [] [element 2] | provenance | | | array_flow.rb:350:5:350:5 | b [element] | array_flow.rb:351:10:351:10 | b [element] | provenance | | | array_flow.rb:350:9:350:9 | a [element 2] | array_flow.rb:350:9:350:25 | call to difference [element] | provenance | | | array_flow.rb:350:9:350:25 | call to difference [element] | array_flow.rb:350:5:350:5 | b [element] | provenance | | @@ -377,13 +424,17 @@ edges | array_flow.rb:355:5:355:5 | a [element 2] | array_flow.rb:357:10:357:10 | a [element 2] | provenance | | | array_flow.rb:355:5:355:5 | a [element 2] | array_flow.rb:358:10:358:10 | a [element 2] | provenance | | | array_flow.rb:355:5:355:5 | a [element 3, element 1] | array_flow.rb:360:10:360:10 | a [element 3, element 1] | provenance | | -| array_flow.rb:355:16:355:27 | call to source | array_flow.rb:355:5:355:5 | a [element 2] | provenance | | -| array_flow.rb:355:34:355:45 | call to source | array_flow.rb:355:5:355:5 | a [element 3, element 1] | provenance | | +| array_flow.rb:355:9:355:47 | call to [] [element 2] | array_flow.rb:355:5:355:5 | a [element 2] | provenance | | +| array_flow.rb:355:9:355:47 | call to [] [element 3, element 1] | array_flow.rb:355:5:355:5 | a [element 3, element 1] | provenance | | +| array_flow.rb:355:16:355:27 | call to source | array_flow.rb:355:9:355:47 | call to [] [element 2] | provenance | | +| array_flow.rb:355:30:355:46 | call to [] [element 1] | array_flow.rb:355:9:355:47 | call to [] [element 3, element 1] | provenance | | +| array_flow.rb:355:34:355:45 | call to source | array_flow.rb:355:30:355:46 | call to [] [element 1] | provenance | | | array_flow.rb:357:10:357:10 | a [element 2] | array_flow.rb:357:10:357:17 | call to dig | provenance | | | array_flow.rb:358:10:358:10 | a [element 2] | array_flow.rb:358:10:358:17 | call to dig | provenance | | | array_flow.rb:360:10:360:10 | a [element 3, element 1] | array_flow.rb:360:10:360:19 | call to dig | provenance | | | array_flow.rb:364:5:364:5 | a [element 2] | array_flow.rb:365:9:365:9 | a [element 2] | provenance | | -| array_flow.rb:364:16:364:27 | call to source | array_flow.rb:364:5:364:5 | a [element 2] | provenance | | +| array_flow.rb:364:9:364:28 | call to [] [element 2] | array_flow.rb:364:5:364:5 | a [element 2] | provenance | | +| array_flow.rb:364:16:364:27 | call to source | array_flow.rb:364:9:364:28 | call to [] [element 2] | provenance | | | array_flow.rb:365:5:365:5 | b | array_flow.rb:368:10:368:10 | b | provenance | | | array_flow.rb:365:9:365:9 | a [element 2] | array_flow.rb:365:9:367:7 | call to detect | provenance | | | array_flow.rb:365:9:365:9 | a [element 2] | array_flow.rb:365:43:365:43 | x | provenance | | @@ -395,8 +446,10 @@ edges | array_flow.rb:372:5:372:5 | a [element 2] | array_flow.rb:380:9:380:9 | a [element 2] | provenance | | | array_flow.rb:372:5:372:5 | a [element 3] | array_flow.rb:373:9:373:9 | a [element 3] | provenance | | | array_flow.rb:372:5:372:5 | a [element 3] | array_flow.rb:375:9:375:9 | a [element 3] | provenance | | -| array_flow.rb:372:16:372:27 | call to source | array_flow.rb:372:5:372:5 | a [element 2] | provenance | | -| array_flow.rb:372:30:372:41 | call to source | array_flow.rb:372:5:372:5 | a [element 3] | provenance | | +| array_flow.rb:372:9:372:42 | call to [] [element 2] | array_flow.rb:372:5:372:5 | a [element 2] | provenance | | +| array_flow.rb:372:9:372:42 | call to [] [element 3] | array_flow.rb:372:5:372:5 | a [element 3] | provenance | | +| array_flow.rb:372:16:372:27 | call to source | array_flow.rb:372:9:372:42 | call to [] [element 2] | provenance | | +| array_flow.rb:372:30:372:41 | call to source | array_flow.rb:372:9:372:42 | call to [] [element 3] | provenance | | | array_flow.rb:373:5:373:5 | b [element] | array_flow.rb:374:10:374:10 | b [element] | provenance | | | array_flow.rb:373:9:373:9 | a [element 2] | array_flow.rb:373:9:373:17 | call to drop [element] | provenance | | | array_flow.rb:373:9:373:9 | a [element 3] | array_flow.rb:373:9:373:17 | call to drop [element] | provenance | | @@ -429,8 +482,10 @@ edges | array_flow.rb:383:10:383:10 | c [element] | array_flow.rb:383:10:383:13 | ...[...] | provenance | | | array_flow.rb:387:5:387:5 | a [element 2] | array_flow.rb:388:9:388:9 | a [element 2] | provenance | | | array_flow.rb:387:5:387:5 | a [element 3] | array_flow.rb:388:9:388:9 | a [element 3] | provenance | | -| array_flow.rb:387:16:387:27 | call to source | array_flow.rb:387:5:387:5 | a [element 2] | provenance | | -| array_flow.rb:387:30:387:41 | call to source | array_flow.rb:387:5:387:5 | a [element 3] | provenance | | +| array_flow.rb:387:9:387:42 | call to [] [element 2] | array_flow.rb:387:5:387:5 | a [element 2] | provenance | | +| array_flow.rb:387:9:387:42 | call to [] [element 3] | array_flow.rb:387:5:387:5 | a [element 3] | provenance | | +| array_flow.rb:387:16:387:27 | call to source | array_flow.rb:387:9:387:42 | call to [] [element 2] | provenance | | +| array_flow.rb:387:30:387:41 | call to source | array_flow.rb:387:9:387:42 | call to [] [element 3] | provenance | | | array_flow.rb:388:5:388:5 | b [element] | array_flow.rb:391:10:391:10 | b [element] | provenance | | | array_flow.rb:388:9:388:9 | a [element 2] | array_flow.rb:388:9:390:7 | call to drop_while [element] | provenance | | | array_flow.rb:388:9:388:9 | a [element 2] | array_flow.rb:388:26:388:26 | x | provenance | | @@ -440,7 +495,8 @@ edges | array_flow.rb:388:26:388:26 | x | array_flow.rb:389:14:389:14 | x | provenance | | | array_flow.rb:391:10:391:10 | b [element] | array_flow.rb:391:10:391:13 | ...[...] | provenance | | | array_flow.rb:395:5:395:5 | a [element 2] | array_flow.rb:396:9:396:9 | a [element 2] | provenance | | -| array_flow.rb:395:16:395:25 | call to source | array_flow.rb:395:5:395:5 | a [element 2] | provenance | | +| array_flow.rb:395:9:395:26 | call to [] [element 2] | array_flow.rb:395:5:395:5 | a [element 2] | provenance | | +| array_flow.rb:395:16:395:25 | call to source | array_flow.rb:395:9:395:26 | call to [] [element 2] | provenance | | | array_flow.rb:396:5:396:5 | b [element 2] | array_flow.rb:399:10:399:10 | b [element 2] | provenance | | | array_flow.rb:396:9:396:9 | a [element 2] | array_flow.rb:396:9:398:7 | call to each [element 2] | provenance | | | array_flow.rb:396:9:396:9 | a [element 2] | array_flow.rb:396:20:396:20 | x | provenance | | @@ -448,22 +504,23 @@ edges | array_flow.rb:396:20:396:20 | x | array_flow.rb:397:14:397:14 | x | provenance | | | array_flow.rb:399:10:399:10 | b [element 2] | array_flow.rb:399:10:399:13 | ...[...] | provenance | | | array_flow.rb:403:5:403:5 | a [element 2] | array_flow.rb:404:18:404:18 | a [element 2] | provenance | | -| array_flow.rb:403:16:403:25 | call to source | array_flow.rb:403:5:403:5 | a [element 2] | provenance | | +| array_flow.rb:403:9:403:26 | call to [] [element 2] | array_flow.rb:403:5:403:5 | a [element 2] | provenance | | +| array_flow.rb:403:16:403:25 | call to source | array_flow.rb:403:9:403:26 | call to [] [element 2] | provenance | | | array_flow.rb:404:5:404:5 | b [element 2] | array_flow.rb:408:10:408:10 | b [element 2] | provenance | | -| array_flow.rb:404:9:406:7 | [post] { ... } [captured x] | array_flow.rb:407:10:407:10 | x | provenance | | -| array_flow.rb:404:9:406:7 | __synth__0__1 | array_flow.rb:405:14:405:14 | x | provenance | | | array_flow.rb:404:18:404:18 | a [element 2] | array_flow.rb:404:5:404:5 | b [element 2] | provenance | | -| array_flow.rb:404:18:404:18 | a [element 2] | array_flow.rb:404:9:406:7 | [post] { ... } [captured x] | provenance | | -| array_flow.rb:404:18:404:18 | a [element 2] | array_flow.rb:404:9:406:7 | __synth__0__1 | provenance | | +| array_flow.rb:404:18:404:18 | a [element 2] | array_flow.rb:405:14:405:14 | x | provenance | | +| array_flow.rb:404:18:404:18 | a [element 2] | array_flow.rb:407:10:407:10 | x | provenance | | | array_flow.rb:408:10:408:10 | b [element 2] | array_flow.rb:408:10:408:13 | ...[...] | provenance | | | array_flow.rb:412:5:412:5 | a [element 2] | array_flow.rb:413:5:413:5 | a [element 2] | provenance | | -| array_flow.rb:412:16:412:25 | call to source | array_flow.rb:412:5:412:5 | a [element 2] | provenance | | +| array_flow.rb:412:9:412:26 | call to [] [element 2] | array_flow.rb:412:5:412:5 | a [element 2] | provenance | | +| array_flow.rb:412:16:412:25 | call to source | array_flow.rb:412:9:412:26 | call to [] [element 2] | provenance | | | array_flow.rb:413:5:413:5 | a [element 2] | array_flow.rb:413:24:413:24 | x [element] | provenance | | | array_flow.rb:413:24:413:24 | x [element] | array_flow.rb:414:15:414:15 | x [element] | provenance | | | array_flow.rb:414:15:414:15 | x [element] | array_flow.rb:414:15:414:18 | ...[...] | provenance | | | array_flow.rb:414:15:414:18 | ...[...] | array_flow.rb:414:14:414:19 | ( ... ) | provenance | | | array_flow.rb:419:5:419:5 | a [element 2] | array_flow.rb:420:9:420:9 | a [element 2] | provenance | | -| array_flow.rb:419:16:419:25 | call to source | array_flow.rb:419:5:419:5 | a [element 2] | provenance | | +| array_flow.rb:419:9:419:26 | call to [] [element 2] | array_flow.rb:419:5:419:5 | a [element 2] | provenance | | +| array_flow.rb:419:16:419:25 | call to source | array_flow.rb:419:9:419:26 | call to [] [element 2] | provenance | | | array_flow.rb:420:5:420:5 | b [element 2] | array_flow.rb:423:10:423:10 | b [element 2] | provenance | | | array_flow.rb:420:9:420:9 | a [element 2] | array_flow.rb:420:9:422:7 | call to each_entry [element 2] | provenance | | | array_flow.rb:420:9:420:9 | a [element 2] | array_flow.rb:420:26:420:26 | x | provenance | | @@ -471,18 +528,21 @@ edges | array_flow.rb:420:26:420:26 | x | array_flow.rb:421:14:421:14 | x | provenance | | | array_flow.rb:423:10:423:10 | b [element 2] | array_flow.rb:423:10:423:13 | ...[...] | provenance | | | array_flow.rb:427:5:427:5 | a [element 2] | array_flow.rb:428:9:428:9 | a [element 2] | provenance | | -| array_flow.rb:427:16:427:25 | call to source | array_flow.rb:427:5:427:5 | a [element 2] | provenance | | +| array_flow.rb:427:9:427:26 | call to [] [element 2] | array_flow.rb:427:5:427:5 | a [element 2] | provenance | | +| array_flow.rb:427:16:427:25 | call to source | array_flow.rb:427:9:427:26 | call to [] [element 2] | provenance | | | array_flow.rb:428:5:428:5 | b [element 2] | array_flow.rb:431:10:431:10 | b [element 2] | provenance | | | array_flow.rb:428:9:428:9 | a [element 2] | array_flow.rb:428:9:430:7 | call to each_index [element 2] | provenance | | | array_flow.rb:428:9:430:7 | call to each_index [element 2] | array_flow.rb:428:5:428:5 | b [element 2] | provenance | | | array_flow.rb:431:10:431:10 | b [element 2] | array_flow.rb:431:10:431:13 | ...[...] | provenance | | | array_flow.rb:435:5:435:5 | a [element 3] | array_flow.rb:436:5:436:5 | a [element 3] | provenance | | -| array_flow.rb:435:19:435:28 | call to source | array_flow.rb:435:5:435:5 | a [element 3] | provenance | | +| array_flow.rb:435:9:435:29 | call to [] [element 3] | array_flow.rb:435:5:435:5 | a [element 3] | provenance | | +| array_flow.rb:435:19:435:28 | call to source | array_flow.rb:435:9:435:29 | call to [] [element 3] | provenance | | | array_flow.rb:436:5:436:5 | a [element 3] | array_flow.rb:436:25:436:25 | x [element] | provenance | | | array_flow.rb:436:25:436:25 | x [element] | array_flow.rb:437:14:437:14 | x [element] | provenance | | | array_flow.rb:437:14:437:14 | x [element] | array_flow.rb:437:14:437:17 | ...[...] | provenance | | | array_flow.rb:442:5:442:5 | a [element 3] | array_flow.rb:443:9:443:9 | a [element 3] | provenance | | -| array_flow.rb:442:19:442:28 | call to source | array_flow.rb:442:5:442:5 | a [element 3] | provenance | | +| array_flow.rb:442:9:442:29 | call to [] [element 3] | array_flow.rb:442:5:442:5 | a [element 3] | provenance | | +| array_flow.rb:442:19:442:28 | call to source | array_flow.rb:442:9:442:29 | call to [] [element 3] | provenance | | | array_flow.rb:443:5:443:5 | b [element 3] | array_flow.rb:447:10:447:10 | b [element 3] | provenance | | | array_flow.rb:443:9:443:9 | a [element 3] | array_flow.rb:443:9:446:7 | call to each_with_index [element 3] | provenance | | | array_flow.rb:443:9:443:9 | a [element 3] | array_flow.rb:443:31:443:31 | x | provenance | | @@ -490,7 +550,8 @@ edges | array_flow.rb:443:31:443:31 | x | array_flow.rb:444:14:444:14 | x | provenance | | | array_flow.rb:447:10:447:10 | b [element 3] | array_flow.rb:447:10:447:13 | ...[...] | provenance | | | array_flow.rb:451:5:451:5 | a [element 3] | array_flow.rb:452:9:452:9 | a [element 3] | provenance | | -| array_flow.rb:451:19:451:30 | call to source | array_flow.rb:451:5:451:5 | a [element 3] | provenance | | +| array_flow.rb:451:9:451:31 | call to [] [element 3] | array_flow.rb:451:5:451:5 | a [element 3] | provenance | | +| array_flow.rb:451:19:451:30 | call to source | array_flow.rb:451:9:451:31 | call to [] [element 3] | provenance | | | array_flow.rb:452:5:452:5 | b | array_flow.rb:456:10:456:10 | b | provenance | | | array_flow.rb:452:9:452:9 | a [element 3] | array_flow.rb:452:46:452:46 | x | provenance | | | array_flow.rb:452:9:455:7 | call to each_with_object | array_flow.rb:452:5:452:5 | b | provenance | | @@ -499,7 +560,8 @@ edges | array_flow.rb:452:46:452:46 | x | array_flow.rb:453:14:453:14 | x | provenance | | | array_flow.rb:452:48:452:48 | a | array_flow.rb:454:14:454:14 | a | provenance | | | array_flow.rb:460:5:460:5 | a [element 3] | array_flow.rb:461:9:461:9 | a [element 3] | provenance | | -| array_flow.rb:460:19:460:28 | call to source | array_flow.rb:460:5:460:5 | a [element 3] | provenance | | +| array_flow.rb:460:9:460:29 | call to [] [element 3] | array_flow.rb:460:5:460:5 | a [element 3] | provenance | | +| array_flow.rb:460:19:460:28 | call to source | array_flow.rb:460:9:460:29 | call to [] [element 3] | provenance | | | array_flow.rb:461:5:461:5 | b [element 3] | array_flow.rb:462:10:462:10 | b [element 3] | provenance | | | array_flow.rb:461:9:461:9 | a [element 3] | array_flow.rb:461:9:461:17 | call to entries [element 3] | provenance | | | array_flow.rb:461:9:461:17 | call to entries [element 3] | array_flow.rb:461:5:461:5 | b [element 3] | provenance | | @@ -510,8 +572,10 @@ edges | array_flow.rb:466:5:466:5 | a [element 3] | array_flow.rb:477:9:477:9 | a [element 3] | provenance | | | array_flow.rb:466:5:466:5 | a [element 4] | array_flow.rb:467:9:467:9 | a [element 4] | provenance | | | array_flow.rb:466:5:466:5 | a [element 4] | array_flow.rb:477:9:477:9 | a [element 4] | provenance | | -| array_flow.rb:466:19:466:30 | call to source | array_flow.rb:466:5:466:5 | a [element 3] | provenance | | -| array_flow.rb:466:33:466:44 | call to source | array_flow.rb:466:5:466:5 | a [element 4] | provenance | | +| array_flow.rb:466:9:466:45 | call to [] [element 3] | array_flow.rb:466:5:466:5 | a [element 3] | provenance | | +| array_flow.rb:466:9:466:45 | call to [] [element 4] | array_flow.rb:466:5:466:5 | a [element 4] | provenance | | +| array_flow.rb:466:19:466:30 | call to source | array_flow.rb:466:9:466:45 | call to [] [element 3] | provenance | | +| array_flow.rb:466:33:466:44 | call to source | array_flow.rb:466:9:466:45 | call to [] [element 4] | provenance | | | array_flow.rb:467:5:467:5 | b | array_flow.rb:470:10:470:10 | b | provenance | | | array_flow.rb:467:9:467:9 | a [element 3] | array_flow.rb:467:9:469:7 | call to fetch | provenance | | | array_flow.rb:467:9:467:9 | a [element 4] | array_flow.rb:467:9:469:7 | call to fetch | provenance | | @@ -534,7 +598,8 @@ edges | array_flow.rb:477:9:477:32 | call to fetch | array_flow.rb:477:5:477:5 | b | provenance | | | array_flow.rb:477:20:477:31 | call to source | array_flow.rb:477:9:477:32 | call to fetch | provenance | | | array_flow.rb:482:5:482:5 | a [element 3] | array_flow.rb:484:10:484:10 | a [element 3] | provenance | | -| array_flow.rb:482:19:482:30 | call to source | array_flow.rb:482:5:482:5 | a [element 3] | provenance | | +| array_flow.rb:482:9:482:31 | call to [] [element 3] | array_flow.rb:482:5:482:5 | a [element 3] | provenance | | +| array_flow.rb:482:19:482:30 | call to source | array_flow.rb:482:9:482:31 | call to [] [element 3] | provenance | | | array_flow.rb:483:5:483:5 | [post] a [element] | array_flow.rb:484:10:484:10 | a [element] | provenance | | | array_flow.rb:483:12:483:23 | call to source | array_flow.rb:483:5:483:5 | [post] a [element] | provenance | | | array_flow.rb:484:10:484:10 | a [element 3] | array_flow.rb:484:10:484:13 | ...[...] | provenance | | @@ -550,7 +615,8 @@ edges | array_flow.rb:492:9:492:20 | call to source | array_flow.rb:491:5:491:5 | [post] a [element] | provenance | | | array_flow.rb:494:10:494:10 | a [element] | array_flow.rb:494:10:494:13 | ...[...] | provenance | | | array_flow.rb:498:5:498:5 | a [element 3] | array_flow.rb:499:9:499:9 | a [element 3] | provenance | | -| array_flow.rb:498:19:498:28 | call to source | array_flow.rb:498:5:498:5 | a [element 3] | provenance | | +| array_flow.rb:498:9:498:29 | call to [] [element 3] | array_flow.rb:498:5:498:5 | a [element 3] | provenance | | +| array_flow.rb:498:19:498:28 | call to source | array_flow.rb:498:9:498:29 | call to [] [element 3] | provenance | | | array_flow.rb:499:5:499:5 | b [element] | array_flow.rb:502:10:502:10 | b [element] | provenance | | | array_flow.rb:499:9:499:9 | a [element 3] | array_flow.rb:499:9:501:7 | call to filter [element] | provenance | | | array_flow.rb:499:9:499:9 | a [element 3] | array_flow.rb:499:22:499:22 | x | provenance | | @@ -558,7 +624,8 @@ edges | array_flow.rb:499:22:499:22 | x | array_flow.rb:500:14:500:14 | x | provenance | | | array_flow.rb:502:10:502:10 | b [element] | array_flow.rb:502:10:502:13 | ...[...] | provenance | | | array_flow.rb:506:5:506:5 | a [element 3] | array_flow.rb:507:9:507:9 | a [element 3] | provenance | | -| array_flow.rb:506:19:506:28 | call to source | array_flow.rb:506:5:506:5 | a [element 3] | provenance | | +| array_flow.rb:506:9:506:29 | call to [] [element 3] | array_flow.rb:506:5:506:5 | a [element 3] | provenance | | +| array_flow.rb:506:19:506:28 | call to source | array_flow.rb:506:9:506:29 | call to [] [element 3] | provenance | | | array_flow.rb:507:5:507:5 | b [element] | array_flow.rb:511:10:511:10 | b [element] | provenance | | | array_flow.rb:507:9:507:9 | a [element 3] | array_flow.rb:507:9:510:7 | call to filter_map [element] | provenance | | | array_flow.rb:507:9:507:9 | a [element 3] | array_flow.rb:507:26:507:26 | x | provenance | | @@ -570,7 +637,8 @@ edges | array_flow.rb:519:9:519:20 | call to source | array_flow.rb:518:9:520:7 | call to filter_map [element] | provenance | | | array_flow.rb:521:10:521:10 | d [element] | array_flow.rb:521:10:521:13 | ...[...] | provenance | | | array_flow.rb:525:5:525:5 | a [element 3] | array_flow.rb:526:9:526:9 | a [element 3] | provenance | | -| array_flow.rb:525:19:525:28 | call to source | array_flow.rb:525:5:525:5 | a [element 3] | provenance | | +| array_flow.rb:525:9:525:29 | call to [] [element 3] | array_flow.rb:525:5:525:5 | a [element 3] | provenance | | +| array_flow.rb:525:19:525:28 | call to source | array_flow.rb:525:9:525:29 | call to [] [element 3] | provenance | | | array_flow.rb:526:5:526:5 | b [element] | array_flow.rb:531:10:531:10 | b [element] | provenance | | | array_flow.rb:526:9:526:9 | [post] a [element] | array_flow.rb:530:10:530:10 | a [element] | provenance | | | array_flow.rb:526:9:526:9 | a [element 3] | array_flow.rb:526:9:526:9 | [post] a [element] | provenance | | @@ -581,7 +649,8 @@ edges | array_flow.rb:530:10:530:10 | a [element] | array_flow.rb:530:10:530:13 | ...[...] | provenance | | | array_flow.rb:531:10:531:10 | b [element] | array_flow.rb:531:10:531:13 | ...[...] | provenance | | | array_flow.rb:535:5:535:5 | a [element 3] | array_flow.rb:536:9:536:9 | a [element 3] | provenance | | -| array_flow.rb:535:19:535:30 | call to source | array_flow.rb:535:5:535:5 | a [element 3] | provenance | | +| array_flow.rb:535:9:535:31 | call to [] [element 3] | array_flow.rb:535:5:535:5 | a [element 3] | provenance | | +| array_flow.rb:535:19:535:30 | call to source | array_flow.rb:535:9:535:31 | call to [] [element 3] | provenance | | | array_flow.rb:536:5:536:5 | b | array_flow.rb:539:10:539:10 | b | provenance | | | array_flow.rb:536:9:536:9 | a [element 3] | array_flow.rb:536:9:538:7 | call to find | provenance | | | array_flow.rb:536:9:536:9 | a [element 3] | array_flow.rb:536:41:536:41 | x | provenance | | @@ -589,7 +658,8 @@ edges | array_flow.rb:536:21:536:32 | call to source | array_flow.rb:536:9:538:7 | call to find | provenance | | | array_flow.rb:536:41:536:41 | x | array_flow.rb:537:14:537:14 | x | provenance | | | array_flow.rb:543:5:543:5 | a [element 3] | array_flow.rb:544:9:544:9 | a [element 3] | provenance | | -| array_flow.rb:543:19:543:28 | call to source | array_flow.rb:543:5:543:5 | a [element 3] | provenance | | +| array_flow.rb:543:9:543:29 | call to [] [element 3] | array_flow.rb:543:5:543:5 | a [element 3] | provenance | | +| array_flow.rb:543:19:543:28 | call to source | array_flow.rb:543:9:543:29 | call to [] [element 3] | provenance | | | array_flow.rb:544:5:544:5 | b [element] | array_flow.rb:547:10:547:10 | b [element] | provenance | | | array_flow.rb:544:9:544:9 | a [element 3] | array_flow.rb:544:9:546:7 | call to find_all [element] | provenance | | | array_flow.rb:544:9:544:9 | a [element 3] | array_flow.rb:544:24:544:24 | x | provenance | | @@ -597,15 +667,18 @@ edges | array_flow.rb:544:24:544:24 | x | array_flow.rb:545:14:545:14 | x | provenance | | | array_flow.rb:547:10:547:10 | b [element] | array_flow.rb:547:10:547:13 | ...[...] | provenance | | | array_flow.rb:551:5:551:5 | a [element 3] | array_flow.rb:552:5:552:5 | a [element 3] | provenance | | -| array_flow.rb:551:19:551:28 | call to source | array_flow.rb:551:5:551:5 | a [element 3] | provenance | | +| array_flow.rb:551:9:551:29 | call to [] [element 3] | array_flow.rb:551:5:551:5 | a [element 3] | provenance | | +| array_flow.rb:551:19:551:28 | call to source | array_flow.rb:551:9:551:29 | call to [] [element 3] | provenance | | | array_flow.rb:552:5:552:5 | a [element 3] | array_flow.rb:552:22:552:22 | x | provenance | | | array_flow.rb:552:22:552:22 | x | array_flow.rb:553:14:553:14 | x | provenance | | | array_flow.rb:558:5:558:5 | a [element 0] | array_flow.rb:560:10:560:10 | a [element 0] | provenance | | | array_flow.rb:558:5:558:5 | a [element 0] | array_flow.rb:561:9:561:9 | a [element 0] | provenance | | | array_flow.rb:558:5:558:5 | a [element 0] | array_flow.rb:564:9:564:9 | a [element 0] | provenance | | | array_flow.rb:558:5:558:5 | a [element 3] | array_flow.rb:564:9:564:9 | a [element 3] | provenance | | -| array_flow.rb:558:10:558:21 | call to source | array_flow.rb:558:5:558:5 | a [element 0] | provenance | | -| array_flow.rb:558:30:558:41 | call to source | array_flow.rb:558:5:558:5 | a [element 3] | provenance | | +| array_flow.rb:558:9:558:42 | call to [] [element 0] | array_flow.rb:558:5:558:5 | a [element 0] | provenance | | +| array_flow.rb:558:9:558:42 | call to [] [element 3] | array_flow.rb:558:5:558:5 | a [element 3] | provenance | | +| array_flow.rb:558:10:558:21 | call to source | array_flow.rb:558:9:558:42 | call to [] [element 0] | provenance | | +| array_flow.rb:558:30:558:41 | call to source | array_flow.rb:558:9:558:42 | call to [] [element 3] | provenance | | | array_flow.rb:559:5:559:5 | [post] a [element] | array_flow.rb:560:10:560:10 | a [element] | provenance | | | array_flow.rb:559:5:559:5 | [post] a [element] | array_flow.rb:561:9:561:9 | a [element] | provenance | | | array_flow.rb:559:5:559:5 | [post] a [element] | array_flow.rb:564:9:564:9 | a [element] | provenance | | @@ -638,13 +711,15 @@ edges | array_flow.rb:566:10:566:10 | c [element] | array_flow.rb:566:10:566:13 | ...[...] | provenance | | | array_flow.rb:570:5:570:5 | a [element 2] | array_flow.rb:571:9:571:9 | a [element 2] | provenance | | | array_flow.rb:570:5:570:5 | a [element 2] | array_flow.rb:576:9:576:9 | a [element 2] | provenance | | -| array_flow.rb:570:16:570:27 | call to source | array_flow.rb:570:5:570:5 | a [element 2] | provenance | | +| array_flow.rb:570:9:570:28 | call to [] [element 2] | array_flow.rb:570:5:570:5 | a [element 2] | provenance | | +| array_flow.rb:570:16:570:27 | call to source | array_flow.rb:570:9:570:28 | call to [] [element 2] | provenance | | | array_flow.rb:571:5:571:5 | b [element] | array_flow.rb:575:10:575:10 | b [element] | provenance | | | array_flow.rb:571:9:571:9 | a [element 2] | array_flow.rb:571:9:574:7 | call to flat_map [element] | provenance | | | array_flow.rb:571:9:571:9 | a [element 2] | array_flow.rb:571:24:571:24 | x | provenance | | | array_flow.rb:571:9:574:7 | call to flat_map [element] | array_flow.rb:571:5:571:5 | b [element] | provenance | | | array_flow.rb:571:24:571:24 | x | array_flow.rb:572:14:572:14 | x | provenance | | -| array_flow.rb:573:13:573:24 | call to source | array_flow.rb:571:9:574:7 | call to flat_map [element] | provenance | | +| array_flow.rb:573:9:573:25 | call to [] [element 1] | array_flow.rb:571:9:574:7 | call to flat_map [element] | provenance | | +| array_flow.rb:573:13:573:24 | call to source | array_flow.rb:573:9:573:25 | call to [] [element 1] | provenance | | | array_flow.rb:575:10:575:10 | b [element] | array_flow.rb:575:10:575:13 | ...[...] | provenance | | | array_flow.rb:576:5:576:5 | b [element] | array_flow.rb:580:10:580:10 | b [element] | provenance | | | array_flow.rb:576:9:576:9 | a [element 2] | array_flow.rb:576:24:576:24 | x | provenance | | @@ -653,14 +728,18 @@ edges | array_flow.rb:578:9:578:20 | call to source | array_flow.rb:576:9:579:7 | call to flat_map [element] | provenance | | | array_flow.rb:580:10:580:10 | b [element] | array_flow.rb:580:10:580:13 | ...[...] | provenance | | | array_flow.rb:584:5:584:5 | a [element 2, element 1] | array_flow.rb:585:9:585:9 | a [element 2, element 1] | provenance | | -| array_flow.rb:584:20:584:29 | call to source | array_flow.rb:584:5:584:5 | a [element 2, element 1] | provenance | | +| array_flow.rb:584:9:584:31 | call to [] [element 2, element 1] | array_flow.rb:584:5:584:5 | a [element 2, element 1] | provenance | | +| array_flow.rb:584:16:584:30 | call to [] [element 1] | array_flow.rb:584:9:584:31 | call to [] [element 2, element 1] | provenance | | +| array_flow.rb:584:20:584:29 | call to source | array_flow.rb:584:16:584:30 | call to [] [element 1] | provenance | | | array_flow.rb:585:5:585:5 | b [element] | array_flow.rb:586:10:586:10 | b [element] | provenance | | | array_flow.rb:585:9:585:9 | a [element 2, element 1] | array_flow.rb:585:9:585:17 | call to flatten [element] | provenance | | | array_flow.rb:585:9:585:17 | call to flatten [element] | array_flow.rb:585:5:585:5 | b [element] | provenance | | | array_flow.rb:586:10:586:10 | b [element] | array_flow.rb:586:10:586:13 | ...[...] | provenance | | | array_flow.rb:590:5:590:5 | a [element 2, element 1] | array_flow.rb:591:10:591:10 | a [element 2, element 1] | provenance | | | array_flow.rb:590:5:590:5 | a [element 2, element 1] | array_flow.rb:592:9:592:9 | a [element 2, element 1] | provenance | | -| array_flow.rb:590:20:590:29 | call to source | array_flow.rb:590:5:590:5 | a [element 2, element 1] | provenance | | +| array_flow.rb:590:9:590:31 | call to [] [element 2, element 1] | array_flow.rb:590:5:590:5 | a [element 2, element 1] | provenance | | +| array_flow.rb:590:16:590:30 | call to [] [element 1] | array_flow.rb:590:9:590:31 | call to [] [element 2, element 1] | provenance | | +| array_flow.rb:590:20:590:29 | call to source | array_flow.rb:590:16:590:30 | call to [] [element 1] | provenance | | | array_flow.rb:591:10:591:10 | a [element 2, element 1] | array_flow.rb:591:10:591:13 | ...[...] [element 1] | provenance | | | array_flow.rb:591:10:591:13 | ...[...] [element 1] | array_flow.rb:591:10:591:16 | ...[...] | provenance | | | array_flow.rb:592:5:592:5 | b [element, element 1] | array_flow.rb:596:10:596:10 | b [element, element 1] | provenance | | @@ -681,7 +760,8 @@ edges | array_flow.rb:596:10:596:13 | ...[...] [element 1] | array_flow.rb:596:10:596:16 | ...[...] | provenance | | | array_flow.rb:600:5:600:5 | a [element 3] | array_flow.rb:601:9:601:9 | a [element 3] | provenance | | | array_flow.rb:600:5:600:5 | a [element 3] | array_flow.rb:603:9:603:9 | a [element 3] | provenance | | -| array_flow.rb:600:19:600:30 | call to source | array_flow.rb:600:5:600:5 | a [element 3] | provenance | | +| array_flow.rb:600:9:600:31 | call to [] [element 3] | array_flow.rb:600:5:600:5 | a [element 3] | provenance | | +| array_flow.rb:600:19:600:30 | call to source | array_flow.rb:600:9:600:31 | call to [] [element 3] | provenance | | | array_flow.rb:601:5:601:5 | b [element] | array_flow.rb:602:10:602:10 | b [element] | provenance | | | array_flow.rb:601:9:601:9 | a [element 3] | array_flow.rb:601:9:601:20 | call to grep [element] | provenance | | | array_flow.rb:601:9:601:20 | call to grep [element] | array_flow.rb:601:5:601:5 | b [element] | provenance | | @@ -694,7 +774,8 @@ edges | array_flow.rb:607:10:607:10 | b [element] | array_flow.rb:607:10:607:13 | ...[...] | provenance | | | array_flow.rb:611:5:611:5 | a [element 3] | array_flow.rb:612:9:612:9 | a [element 3] | provenance | | | array_flow.rb:611:5:611:5 | a [element 3] | array_flow.rb:614:9:614:9 | a [element 3] | provenance | | -| array_flow.rb:611:19:611:30 | call to source | array_flow.rb:611:5:611:5 | a [element 3] | provenance | | +| array_flow.rb:611:9:611:31 | call to [] [element 3] | array_flow.rb:611:5:611:5 | a [element 3] | provenance | | +| array_flow.rb:611:19:611:30 | call to source | array_flow.rb:611:9:611:31 | call to [] [element 3] | provenance | | | array_flow.rb:612:5:612:5 | b [element] | array_flow.rb:613:10:613:10 | b [element] | provenance | | | array_flow.rb:612:9:612:9 | a [element 3] | array_flow.rb:612:9:612:21 | call to grep_v [element] | provenance | | | array_flow.rb:612:9:612:21 | call to grep_v [element] | array_flow.rb:612:5:612:5 | b [element] | provenance | | @@ -706,19 +787,23 @@ edges | array_flow.rb:616:9:616:20 | call to source | array_flow.rb:614:9:617:7 | call to grep_v [element] | provenance | | | array_flow.rb:618:10:618:10 | b [element] | array_flow.rb:618:10:618:13 | ...[...] | provenance | | | array_flow.rb:622:5:622:5 | a [element 3] | array_flow.rb:623:9:623:9 | a [element 3] | provenance | | -| array_flow.rb:622:19:622:30 | call to source | array_flow.rb:622:5:622:5 | a [element 3] | provenance | | +| array_flow.rb:622:9:622:31 | call to [] [element 3] | array_flow.rb:622:5:622:5 | a [element 3] | provenance | | +| array_flow.rb:622:19:622:30 | call to source | array_flow.rb:622:9:622:31 | call to [] [element 3] | provenance | | | array_flow.rb:623:9:623:9 | a [element 3] | array_flow.rb:623:24:623:24 | x | provenance | | | array_flow.rb:623:24:623:24 | x | array_flow.rb:624:14:624:14 | x | provenance | | | array_flow.rb:631:5:631:5 | a [element 3] | array_flow.rb:632:5:632:5 | a [element 3] | provenance | | -| array_flow.rb:631:19:631:28 | call to source | array_flow.rb:631:5:631:5 | a [element 3] | provenance | | +| array_flow.rb:631:9:631:29 | call to [] [element 3] | array_flow.rb:631:5:631:5 | a [element 3] | provenance | | +| array_flow.rb:631:19:631:28 | call to source | array_flow.rb:631:9:631:29 | call to [] [element 3] | provenance | | | array_flow.rb:632:5:632:5 | a [element 3] | array_flow.rb:632:17:632:17 | x | provenance | | | array_flow.rb:632:17:632:17 | x | array_flow.rb:633:14:633:14 | x | provenance | | | array_flow.rb:638:5:638:5 | a [element 0] | array_flow.rb:639:9:639:9 | a [element 0] | provenance | | | array_flow.rb:638:5:638:5 | a [element 0] | array_flow.rb:645:9:645:9 | a [element 0] | provenance | | | array_flow.rb:638:5:638:5 | a [element 2] | array_flow.rb:639:9:639:9 | a [element 2] | provenance | | | array_flow.rb:638:5:638:5 | a [element 2] | array_flow.rb:645:9:645:9 | a [element 2] | provenance | | -| array_flow.rb:638:10:638:21 | call to source | array_flow.rb:638:5:638:5 | a [element 0] | provenance | | -| array_flow.rb:638:27:638:38 | call to source | array_flow.rb:638:5:638:5 | a [element 2] | provenance | | +| array_flow.rb:638:9:638:39 | call to [] [element 0] | array_flow.rb:638:5:638:5 | a [element 0] | provenance | | +| array_flow.rb:638:9:638:39 | call to [] [element 2] | array_flow.rb:638:5:638:5 | a [element 2] | provenance | | +| array_flow.rb:638:10:638:21 | call to source | array_flow.rb:638:9:638:39 | call to [] [element 0] | provenance | | +| array_flow.rb:638:27:638:38 | call to source | array_flow.rb:638:9:638:39 | call to [] [element 2] | provenance | | | array_flow.rb:639:5:639:5 | b | array_flow.rb:644:10:644:10 | b | provenance | | | array_flow.rb:639:9:639:9 | a [element 0] | array_flow.rb:639:22:639:22 | x | provenance | | | array_flow.rb:639:9:639:9 | a [element 2] | array_flow.rb:639:25:639:25 | y | provenance | | @@ -733,7 +818,8 @@ edges | array_flow.rb:645:28:645:28 | y | array_flow.rb:647:14:647:14 | y | provenance | | | array_flow.rb:648:9:648:19 | call to source | array_flow.rb:645:9:649:7 | call to inject | provenance | | | array_flow.rb:655:5:655:5 | a [element 2] | array_flow.rb:656:9:656:9 | a [element 2] | provenance | | -| array_flow.rb:655:16:655:27 | call to source | array_flow.rb:655:5:655:5 | a [element 2] | provenance | | +| array_flow.rb:655:9:655:28 | call to [] [element 2] | array_flow.rb:655:5:655:5 | a [element 2] | provenance | | +| array_flow.rb:655:16:655:27 | call to source | array_flow.rb:655:9:655:28 | call to [] [element 2] | provenance | | | array_flow.rb:656:5:656:5 | b [element 1] | array_flow.rb:663:10:663:10 | b [element 1] | provenance | | | array_flow.rb:656:5:656:5 | b [element 2] | array_flow.rb:664:10:664:10 | b [element 2] | provenance | | | array_flow.rb:656:5:656:5 | b [element 4] | array_flow.rb:666:10:666:10 | b [element 4] | provenance | | @@ -756,7 +842,8 @@ edges | array_flow.rb:664:10:664:10 | b [element 2] | array_flow.rb:664:10:664:13 | ...[...] | provenance | | | array_flow.rb:666:10:666:10 | b [element 4] | array_flow.rb:666:10:666:13 | ...[...] | provenance | | | array_flow.rb:669:5:669:5 | c [element 2] | array_flow.rb:670:9:670:9 | c [element 2] | provenance | | -| array_flow.rb:669:16:669:27 | call to source | array_flow.rb:669:5:669:5 | c [element 2] | provenance | | +| array_flow.rb:669:9:669:28 | call to [] [element 2] | array_flow.rb:669:5:669:5 | c [element 2] | provenance | | +| array_flow.rb:669:16:669:27 | call to source | array_flow.rb:669:9:669:28 | call to [] [element 2] | provenance | | | array_flow.rb:670:5:670:5 | d [element] | array_flow.rb:672:10:672:10 | d [element] | provenance | | | array_flow.rb:670:9:670:9 | [post] c [element] | array_flow.rb:671:10:671:10 | c [element] | provenance | | | array_flow.rb:670:9:670:9 | c [element 2] | array_flow.rb:670:9:670:9 | [post] c [element] | provenance | | @@ -769,15 +856,19 @@ edges | array_flow.rb:671:10:671:10 | c [element] | array_flow.rb:671:10:671:13 | ...[...] | provenance | | | array_flow.rb:672:10:672:10 | d [element] | array_flow.rb:672:10:672:13 | ...[...] | provenance | | | array_flow.rb:683:5:683:5 | a [element 2] | array_flow.rb:684:9:684:9 | a [element 2] | provenance | | -| array_flow.rb:683:16:683:27 | call to source | array_flow.rb:683:5:683:5 | a [element 2] | provenance | | +| array_flow.rb:683:9:683:28 | call to [] [element 2] | array_flow.rb:683:5:683:5 | a [element 2] | provenance | | +| array_flow.rb:683:16:683:27 | call to source | array_flow.rb:683:9:683:28 | call to [] [element 2] | provenance | | | array_flow.rb:684:5:684:5 | b [element] | array_flow.rb:685:10:685:10 | b [element] | provenance | | | array_flow.rb:684:9:684:9 | a [element 2] | array_flow.rb:684:9:684:60 | call to intersection [element] | provenance | | | array_flow.rb:684:9:684:60 | call to intersection [element] | array_flow.rb:684:5:684:5 | b [element] | provenance | | -| array_flow.rb:684:31:684:42 | call to source | array_flow.rb:684:9:684:60 | call to intersection [element] | provenance | | -| array_flow.rb:684:47:684:58 | call to source | array_flow.rb:684:9:684:60 | call to intersection [element] | provenance | | +| array_flow.rb:684:24:684:43 | call to [] [element 2] | array_flow.rb:684:9:684:60 | call to intersection [element] | provenance | | +| array_flow.rb:684:31:684:42 | call to source | array_flow.rb:684:24:684:43 | call to [] [element 2] | provenance | | +| array_flow.rb:684:46:684:59 | call to [] [element 0] | array_flow.rb:684:9:684:60 | call to intersection [element] | provenance | | +| array_flow.rb:684:47:684:58 | call to source | array_flow.rb:684:46:684:59 | call to [] [element 0] | provenance | | | array_flow.rb:685:10:685:10 | b [element] | array_flow.rb:685:10:685:13 | ...[...] | provenance | | | array_flow.rb:689:5:689:5 | a [element 2] | array_flow.rb:690:9:690:9 | a [element 2] | provenance | | -| array_flow.rb:689:16:689:25 | call to source | array_flow.rb:689:5:689:5 | a [element 2] | provenance | | +| array_flow.rb:689:9:689:26 | call to [] [element 2] | array_flow.rb:689:5:689:5 | a [element 2] | provenance | | +| array_flow.rb:689:16:689:25 | call to source | array_flow.rb:689:9:689:26 | call to [] [element 2] | provenance | | | array_flow.rb:690:5:690:5 | b [element] | array_flow.rb:695:10:695:10 | b [element] | provenance | | | array_flow.rb:690:9:690:9 | [post] a [element] | array_flow.rb:694:10:694:10 | a [element] | provenance | | | array_flow.rb:690:9:690:9 | a [element 2] | array_flow.rb:690:9:690:9 | [post] a [element] | provenance | | @@ -789,7 +880,8 @@ edges | array_flow.rb:695:10:695:10 | b [element] | array_flow.rb:695:10:695:13 | ...[...] | provenance | | | array_flow.rb:699:5:699:5 | a [element 2] | array_flow.rb:701:10:701:10 | a [element 2] | provenance | | | array_flow.rb:699:5:699:5 | a [element 2] | array_flow.rb:702:9:702:9 | a [element 2] | provenance | | -| array_flow.rb:699:16:699:27 | call to source | array_flow.rb:699:5:699:5 | a [element 2] | provenance | | +| array_flow.rb:699:9:699:28 | call to [] [element 2] | array_flow.rb:699:5:699:5 | a [element 2] | provenance | | +| array_flow.rb:699:16:699:27 | call to source | array_flow.rb:699:9:699:28 | call to [] [element 2] | provenance | | | array_flow.rb:700:5:700:5 | [post] a [element] | array_flow.rb:701:10:701:10 | a [element] | provenance | | | array_flow.rb:700:5:700:5 | [post] a [element] | array_flow.rb:702:9:702:9 | a [element] | provenance | | | array_flow.rb:700:12:700:23 | call to source | array_flow.rb:700:5:700:5 | [post] a [element] | provenance | | @@ -803,7 +895,8 @@ edges | array_flow.rb:703:10:703:10 | b [element] | array_flow.rb:703:10:703:13 | ...[...] | provenance | | | array_flow.rb:704:10:704:10 | b [element] | array_flow.rb:704:10:704:13 | ...[...] | provenance | | | array_flow.rb:708:5:708:5 | a [element 2] | array_flow.rb:709:9:709:9 | a [element 2] | provenance | | -| array_flow.rb:708:16:708:27 | call to source | array_flow.rb:708:5:708:5 | a [element 2] | provenance | | +| array_flow.rb:708:9:708:28 | call to [] [element 2] | array_flow.rb:708:5:708:5 | a [element 2] | provenance | | +| array_flow.rb:708:16:708:27 | call to source | array_flow.rb:708:9:708:28 | call to [] [element 2] | provenance | | | array_flow.rb:709:5:709:5 | b [element] | array_flow.rb:713:10:713:10 | b [element] | provenance | | | array_flow.rb:709:9:709:9 | a [element 2] | array_flow.rb:709:19:709:19 | x | provenance | | | array_flow.rb:709:9:712:7 | call to map [element] | array_flow.rb:709:5:709:5 | b [element] | provenance | | @@ -811,7 +904,8 @@ edges | array_flow.rb:711:9:711:19 | call to source | array_flow.rb:709:9:712:7 | call to map [element] | provenance | | | array_flow.rb:713:10:713:10 | b [element] | array_flow.rb:713:10:713:13 | ...[...] | provenance | | | array_flow.rb:717:5:717:5 | a [element 2] | array_flow.rb:718:9:718:9 | a [element 2] | provenance | | -| array_flow.rb:717:16:717:27 | call to source | array_flow.rb:717:5:717:5 | a [element 2] | provenance | | +| array_flow.rb:717:9:717:28 | call to [] [element 2] | array_flow.rb:717:5:717:5 | a [element 2] | provenance | | +| array_flow.rb:717:16:717:27 | call to source | array_flow.rb:717:9:717:28 | call to [] [element 2] | provenance | | | array_flow.rb:718:5:718:5 | b [element] | array_flow.rb:722:10:722:10 | b [element] | provenance | | | array_flow.rb:718:9:718:9 | a [element 2] | array_flow.rb:718:20:718:20 | x | provenance | | | array_flow.rb:718:9:721:7 | call to map! [element] | array_flow.rb:718:5:718:5 | b [element] | provenance | | @@ -822,7 +916,8 @@ edges | array_flow.rb:726:5:726:5 | a [element 2] | array_flow.rb:733:9:733:9 | a [element 2] | provenance | | | array_flow.rb:726:5:726:5 | a [element 2] | array_flow.rb:737:9:737:9 | a [element 2] | provenance | | | array_flow.rb:726:5:726:5 | a [element 2] | array_flow.rb:745:9:745:9 | a [element 2] | provenance | | -| array_flow.rb:726:16:726:25 | call to source | array_flow.rb:726:5:726:5 | a [element 2] | provenance | | +| array_flow.rb:726:9:726:26 | call to [] [element 2] | array_flow.rb:726:5:726:5 | a [element 2] | provenance | | +| array_flow.rb:726:16:726:25 | call to source | array_flow.rb:726:9:726:26 | call to [] [element 2] | provenance | | | array_flow.rb:729:5:729:5 | b | array_flow.rb:730:10:730:10 | b | provenance | | | array_flow.rb:729:9:729:9 | a [element 2] | array_flow.rb:729:9:729:13 | call to max | provenance | | | array_flow.rb:729:9:729:13 | call to max | array_flow.rb:729:5:729:5 | b | provenance | | @@ -847,7 +942,8 @@ edges | array_flow.rb:750:10:750:10 | e [element] | array_flow.rb:750:10:750:13 | ...[...] | provenance | | | array_flow.rb:754:5:754:5 | a [element 2] | array_flow.rb:757:9:757:9 | a [element 2] | provenance | | | array_flow.rb:754:5:754:5 | a [element 2] | array_flow.rb:764:9:764:9 | a [element 2] | provenance | | -| array_flow.rb:754:16:754:25 | call to source | array_flow.rb:754:5:754:5 | a [element 2] | provenance | | +| array_flow.rb:754:9:754:26 | call to [] [element 2] | array_flow.rb:754:5:754:5 | a [element 2] | provenance | | +| array_flow.rb:754:16:754:25 | call to source | array_flow.rb:754:9:754:26 | call to [] [element 2] | provenance | | | array_flow.rb:757:5:757:5 | b | array_flow.rb:761:10:761:10 | b | provenance | | | array_flow.rb:757:9:757:9 | a [element 2] | array_flow.rb:757:9:760:7 | call to max_by | provenance | | | array_flow.rb:757:9:757:9 | a [element 2] | array_flow.rb:757:22:757:22 | x | provenance | | @@ -863,7 +959,8 @@ edges | array_flow.rb:772:5:772:5 | a [element 2] | array_flow.rb:779:9:779:9 | a [element 2] | provenance | | | array_flow.rb:772:5:772:5 | a [element 2] | array_flow.rb:783:9:783:9 | a [element 2] | provenance | | | array_flow.rb:772:5:772:5 | a [element 2] | array_flow.rb:791:9:791:9 | a [element 2] | provenance | | -| array_flow.rb:772:16:772:25 | call to source | array_flow.rb:772:5:772:5 | a [element 2] | provenance | | +| array_flow.rb:772:9:772:26 | call to [] [element 2] | array_flow.rb:772:5:772:5 | a [element 2] | provenance | | +| array_flow.rb:772:16:772:25 | call to source | array_flow.rb:772:9:772:26 | call to [] [element 2] | provenance | | | array_flow.rb:775:5:775:5 | b | array_flow.rb:776:10:776:10 | b | provenance | | | array_flow.rb:775:9:775:9 | a [element 2] | array_flow.rb:775:9:775:13 | call to min | provenance | | | array_flow.rb:775:9:775:13 | call to min | array_flow.rb:775:5:775:5 | b | provenance | | @@ -888,7 +985,8 @@ edges | array_flow.rb:796:10:796:10 | e [element] | array_flow.rb:796:10:796:13 | ...[...] | provenance | | | array_flow.rb:800:5:800:5 | a [element 2] | array_flow.rb:803:9:803:9 | a [element 2] | provenance | | | array_flow.rb:800:5:800:5 | a [element 2] | array_flow.rb:810:9:810:9 | a [element 2] | provenance | | -| array_flow.rb:800:16:800:25 | call to source | array_flow.rb:800:5:800:5 | a [element 2] | provenance | | +| array_flow.rb:800:9:800:26 | call to [] [element 2] | array_flow.rb:800:5:800:5 | a [element 2] | provenance | | +| array_flow.rb:800:16:800:25 | call to source | array_flow.rb:800:9:800:26 | call to [] [element 2] | provenance | | | array_flow.rb:803:5:803:5 | b | array_flow.rb:807:10:807:10 | b | provenance | | | array_flow.rb:803:9:803:9 | a [element 2] | array_flow.rb:803:9:806:7 | call to min_by | provenance | | | array_flow.rb:803:9:803:9 | a [element 2] | array_flow.rb:803:22:803:22 | x | provenance | | @@ -902,7 +1000,8 @@ edges | array_flow.rb:814:10:814:10 | c [element] | array_flow.rb:814:10:814:13 | ...[...] | provenance | | | array_flow.rb:818:5:818:5 | a [element 2] | array_flow.rb:820:9:820:9 | a [element 2] | provenance | | | array_flow.rb:818:5:818:5 | a [element 2] | array_flow.rb:824:9:824:9 | a [element 2] | provenance | | -| array_flow.rb:818:16:818:25 | call to source | array_flow.rb:818:5:818:5 | a [element 2] | provenance | | +| array_flow.rb:818:9:818:26 | call to [] [element 2] | array_flow.rb:818:5:818:5 | a [element 2] | provenance | | +| array_flow.rb:818:16:818:25 | call to source | array_flow.rb:818:9:818:26 | call to [] [element 2] | provenance | | | array_flow.rb:820:5:820:5 | b [element] | array_flow.rb:821:10:821:10 | b [element] | provenance | | | array_flow.rb:820:5:820:5 | b [element] | array_flow.rb:822:10:822:10 | b [element] | provenance | | | array_flow.rb:820:9:820:9 | a [element 2] | array_flow.rb:820:9:820:16 | call to minmax [element] | provenance | | @@ -920,7 +1019,8 @@ edges | array_flow.rb:829:10:829:10 | c [element] | array_flow.rb:829:10:829:13 | ...[...] | provenance | | | array_flow.rb:830:10:830:10 | c [element] | array_flow.rb:830:10:830:13 | ...[...] | provenance | | | array_flow.rb:834:5:834:5 | a [element 2] | array_flow.rb:835:9:835:9 | a [element 2] | provenance | | -| array_flow.rb:834:16:834:25 | call to source | array_flow.rb:834:5:834:5 | a [element 2] | provenance | | +| array_flow.rb:834:9:834:26 | call to [] [element 2] | array_flow.rb:834:5:834:5 | a [element 2] | provenance | | +| array_flow.rb:834:16:834:25 | call to source | array_flow.rb:834:9:834:26 | call to [] [element 2] | provenance | | | array_flow.rb:835:5:835:5 | b [element] | array_flow.rb:839:10:839:10 | b [element] | provenance | | | array_flow.rb:835:5:835:5 | b [element] | array_flow.rb:840:10:840:10 | b [element] | provenance | | | array_flow.rb:835:9:835:9 | a [element 2] | array_flow.rb:835:9:838:7 | call to minmax_by [element] | provenance | | @@ -930,15 +1030,18 @@ edges | array_flow.rb:839:10:839:10 | b [element] | array_flow.rb:839:10:839:13 | ...[...] | provenance | | | array_flow.rb:840:10:840:10 | b [element] | array_flow.rb:840:10:840:13 | ...[...] | provenance | | | array_flow.rb:844:5:844:5 | a [element 2] | array_flow.rb:845:5:845:5 | a [element 2] | provenance | | -| array_flow.rb:844:16:844:25 | call to source | array_flow.rb:844:5:844:5 | a [element 2] | provenance | | +| array_flow.rb:844:9:844:26 | call to [] [element 2] | array_flow.rb:844:5:844:5 | a [element 2] | provenance | | +| array_flow.rb:844:16:844:25 | call to source | array_flow.rb:844:9:844:26 | call to [] [element 2] | provenance | | | array_flow.rb:845:5:845:5 | a [element 2] | array_flow.rb:845:17:845:17 | x | provenance | | | array_flow.rb:845:17:845:17 | x | array_flow.rb:846:14:846:14 | x | provenance | | | array_flow.rb:853:5:853:5 | a [element 2] | array_flow.rb:854:5:854:5 | a [element 2] | provenance | | -| array_flow.rb:853:16:853:25 | call to source | array_flow.rb:853:5:853:5 | a [element 2] | provenance | | +| array_flow.rb:853:9:853:26 | call to [] [element 2] | array_flow.rb:853:5:853:5 | a [element 2] | provenance | | +| array_flow.rb:853:16:853:25 | call to source | array_flow.rb:853:9:853:26 | call to [] [element 2] | provenance | | | array_flow.rb:854:5:854:5 | a [element 2] | array_flow.rb:854:16:854:16 | x | provenance | | | array_flow.rb:854:16:854:16 | x | array_flow.rb:855:14:855:14 | x | provenance | | | array_flow.rb:866:5:866:5 | a [element 2] | array_flow.rb:867:9:867:9 | a [element 2] | provenance | | -| array_flow.rb:866:16:866:25 | call to source | array_flow.rb:866:5:866:5 | a [element 2] | provenance | | +| array_flow.rb:866:9:866:26 | call to [] [element 2] | array_flow.rb:866:5:866:5 | a [element 2] | provenance | | +| array_flow.rb:866:16:866:25 | call to source | array_flow.rb:866:9:866:26 | call to [] [element 2] | provenance | | | array_flow.rb:867:5:867:5 | b [element, element] | array_flow.rb:871:10:871:10 | b [element, element] | provenance | | | array_flow.rb:867:5:867:5 | b [element, element] | array_flow.rb:872:10:872:10 | b [element, element] | provenance | | | array_flow.rb:867:9:867:9 | a [element 2] | array_flow.rb:867:9:870:7 | call to partition [element, element] | provenance | | @@ -952,7 +1055,8 @@ edges | array_flow.rb:876:5:876:5 | a [element 2] | array_flow.rb:878:9:878:9 | a [element 2] | provenance | | | array_flow.rb:876:5:876:5 | a [element 2] | array_flow.rb:886:9:886:9 | a [element 2] | provenance | | | array_flow.rb:876:5:876:5 | a [element 2] | array_flow.rb:893:9:893:9 | a [element 2] | provenance | | -| array_flow.rb:876:16:876:25 | call to source | array_flow.rb:876:5:876:5 | a [element 2] | provenance | | +| array_flow.rb:876:9:876:26 | call to [] [element 2] | array_flow.rb:876:5:876:5 | a [element 2] | provenance | | +| array_flow.rb:876:16:876:25 | call to source | array_flow.rb:876:9:876:26 | call to [] [element 2] | provenance | | | array_flow.rb:878:5:878:5 | b [element 2] | array_flow.rb:884:10:884:10 | b [element 2] | provenance | | | array_flow.rb:878:9:878:9 | a [element 2] | array_flow.rb:878:9:882:7 | call to permutation [element 2] | provenance | | | array_flow.rb:878:9:878:9 | a [element 2] | array_flow.rb:878:27:878:27 | x [element] | provenance | | @@ -984,8 +1088,10 @@ edges | array_flow.rb:905:5:905:5 | a [element 1] | array_flow.rb:909:10:909:10 | a [element 1] | provenance | | | array_flow.rb:905:5:905:5 | a [element 3] | array_flow.rb:906:9:906:9 | a [element 3] | provenance | | | array_flow.rb:905:5:905:5 | a [element 3] | array_flow.rb:911:10:911:10 | a [element 3] | provenance | | -| array_flow.rb:905:13:905:24 | call to source | array_flow.rb:905:5:905:5 | a [element 1] | provenance | | -| array_flow.rb:905:30:905:41 | call to source | array_flow.rb:905:5:905:5 | a [element 3] | provenance | | +| array_flow.rb:905:9:905:42 | call to [] [element 1] | array_flow.rb:905:5:905:5 | a [element 1] | provenance | | +| array_flow.rb:905:9:905:42 | call to [] [element 3] | array_flow.rb:905:5:905:5 | a [element 3] | provenance | | +| array_flow.rb:905:13:905:24 | call to source | array_flow.rb:905:9:905:42 | call to [] [element 1] | provenance | | +| array_flow.rb:905:30:905:41 | call to source | array_flow.rb:905:9:905:42 | call to [] [element 3] | provenance | | | array_flow.rb:906:5:906:5 | b | array_flow.rb:907:10:907:10 | b | provenance | | | array_flow.rb:906:9:906:9 | a [element 1] | array_flow.rb:906:9:906:13 | call to pop | provenance | | | array_flow.rb:906:9:906:9 | a [element 3] | array_flow.rb:906:9:906:13 | call to pop | provenance | | @@ -996,8 +1102,10 @@ edges | array_flow.rb:913:5:913:5 | a [element 1] | array_flow.rb:918:10:918:10 | a [element 1] | provenance | | | array_flow.rb:913:5:913:5 | a [element 3] | array_flow.rb:914:9:914:9 | a [element 3] | provenance | | | array_flow.rb:913:5:913:5 | a [element 3] | array_flow.rb:920:10:920:10 | a [element 3] | provenance | | -| array_flow.rb:913:13:913:24 | call to source | array_flow.rb:913:5:913:5 | a [element 1] | provenance | | -| array_flow.rb:913:30:913:41 | call to source | array_flow.rb:913:5:913:5 | a [element 3] | provenance | | +| array_flow.rb:913:9:913:42 | call to [] [element 1] | array_flow.rb:913:5:913:5 | a [element 1] | provenance | | +| array_flow.rb:913:9:913:42 | call to [] [element 3] | array_flow.rb:913:5:913:5 | a [element 3] | provenance | | +| array_flow.rb:913:13:913:24 | call to source | array_flow.rb:913:9:913:42 | call to [] [element 1] | provenance | | +| array_flow.rb:913:30:913:41 | call to source | array_flow.rb:913:9:913:42 | call to [] [element 3] | provenance | | | array_flow.rb:914:5:914:5 | b [element] | array_flow.rb:915:10:915:10 | b [element] | provenance | | | array_flow.rb:914:5:914:5 | b [element] | array_flow.rb:916:10:916:10 | b [element] | provenance | | | array_flow.rb:914:9:914:9 | a [element 1] | array_flow.rb:914:9:914:16 | call to pop [element] | provenance | | @@ -1008,7 +1116,8 @@ edges | array_flow.rb:918:10:918:10 | a [element 1] | array_flow.rb:918:10:918:13 | ...[...] | provenance | | | array_flow.rb:920:10:920:10 | a [element 3] | array_flow.rb:920:10:920:13 | ...[...] | provenance | | | array_flow.rb:924:5:924:5 | a [element 2] | array_flow.rb:925:5:925:5 | a [element 2] | provenance | | -| array_flow.rb:924:16:924:27 | call to source | array_flow.rb:924:5:924:5 | a [element 2] | provenance | | +| array_flow.rb:924:9:924:28 | call to [] [element 2] | array_flow.rb:924:5:924:5 | a [element 2] | provenance | | +| array_flow.rb:924:16:924:27 | call to source | array_flow.rb:924:9:924:28 | call to [] [element 2] | provenance | | | array_flow.rb:925:5:925:5 | [post] a [element 2] | array_flow.rb:928:10:928:10 | a [element 2] | provenance | | | array_flow.rb:925:5:925:5 | [post] a [element 5] | array_flow.rb:931:10:931:10 | a [element 5] | provenance | | | array_flow.rb:925:5:925:5 | a [element 2] | array_flow.rb:925:5:925:5 | [post] a [element 5] | provenance | | @@ -1016,11 +1125,14 @@ edges | array_flow.rb:928:10:928:10 | a [element 2] | array_flow.rb:928:10:928:13 | ...[...] | provenance | | | array_flow.rb:931:10:931:10 | a [element 5] | array_flow.rb:931:10:931:13 | ...[...] | provenance | | | array_flow.rb:935:5:935:5 | a [element 2] | array_flow.rb:938:9:938:9 | a [element 2] | provenance | | -| array_flow.rb:935:16:935:27 | call to source | array_flow.rb:935:5:935:5 | a [element 2] | provenance | | +| array_flow.rb:935:9:935:28 | call to [] [element 2] | array_flow.rb:935:5:935:5 | a [element 2] | provenance | | +| array_flow.rb:935:16:935:27 | call to source | array_flow.rb:935:9:935:28 | call to [] [element 2] | provenance | | | array_flow.rb:936:5:936:5 | b [element 1] | array_flow.rb:938:19:938:19 | b [element 1] | provenance | | -| array_flow.rb:936:13:936:24 | call to source | array_flow.rb:936:5:936:5 | b [element 1] | provenance | | +| array_flow.rb:936:9:936:28 | call to [] [element 1] | array_flow.rb:936:5:936:5 | b [element 1] | provenance | | +| array_flow.rb:936:13:936:24 | call to source | array_flow.rb:936:9:936:28 | call to [] [element 1] | provenance | | | array_flow.rb:937:5:937:5 | c [element 0] | array_flow.rb:938:22:938:22 | c [element 0] | provenance | | -| array_flow.rb:937:10:937:21 | call to source | array_flow.rb:937:5:937:5 | c [element 0] | provenance | | +| array_flow.rb:937:9:937:28 | call to [] [element 0] | array_flow.rb:937:5:937:5 | c [element 0] | provenance | | +| array_flow.rb:937:10:937:21 | call to source | array_flow.rb:937:9:937:28 | call to [] [element 0] | provenance | | | array_flow.rb:938:5:938:5 | d [element, element] | array_flow.rb:939:10:939:10 | d [element, element] | provenance | | | array_flow.rb:938:5:938:5 | d [element, element] | array_flow.rb:940:10:940:10 | d [element, element] | provenance | | | array_flow.rb:938:9:938:9 | a [element 2] | array_flow.rb:938:9:938:22 | call to product [element, element] | provenance | | @@ -1033,7 +1145,8 @@ edges | array_flow.rb:940:10:940:13 | ...[...] [element] | array_flow.rb:940:10:940:16 | ...[...] | provenance | | | array_flow.rb:944:5:944:5 | a [element 0] | array_flow.rb:945:9:945:9 | a [element 0] | provenance | | | array_flow.rb:944:5:944:5 | a [element 0] | array_flow.rb:946:10:946:10 | a [element 0] | provenance | | -| array_flow.rb:944:10:944:21 | call to source | array_flow.rb:944:5:944:5 | a [element 0] | provenance | | +| array_flow.rb:944:9:944:25 | call to [] [element 0] | array_flow.rb:944:5:944:5 | a [element 0] | provenance | | +| array_flow.rb:944:10:944:21 | call to source | array_flow.rb:944:9:944:25 | call to [] [element 0] | provenance | | | array_flow.rb:945:5:945:5 | b [element 0] | array_flow.rb:948:10:948:10 | b [element 0] | provenance | | | array_flow.rb:945:5:945:5 | b [element] | array_flow.rb:948:10:948:10 | b [element] | provenance | | | array_flow.rb:945:5:945:5 | b [element] | array_flow.rb:949:10:949:10 | b [element] | provenance | | @@ -1053,10 +1166,12 @@ edges | array_flow.rb:948:10:948:10 | b [element] | array_flow.rb:948:10:948:13 | ...[...] | provenance | | | array_flow.rb:949:10:949:10 | b [element] | array_flow.rb:949:10:949:13 | ...[...] | provenance | | | array_flow.rb:955:5:955:5 | c [element 0] | array_flow.rb:956:16:956:16 | c [element 0] | provenance | | -| array_flow.rb:955:10:955:19 | call to source | array_flow.rb:955:5:955:5 | c [element 0] | provenance | | +| array_flow.rb:955:9:955:25 | call to [] [element 0] | array_flow.rb:955:5:955:5 | c [element 0] | provenance | | +| array_flow.rb:955:10:955:19 | call to source | array_flow.rb:955:9:955:25 | call to [] [element 0] | provenance | | | array_flow.rb:956:5:956:5 | d [element 2, element 0] | array_flow.rb:957:10:957:10 | d [element 2, element 0] | provenance | | | array_flow.rb:956:5:956:5 | d [element 2, element 0] | array_flow.rb:958:10:958:10 | d [element 2, element 0] | provenance | | -| array_flow.rb:956:16:956:16 | c [element 0] | array_flow.rb:956:5:956:5 | d [element 2, element 0] | provenance | | +| array_flow.rb:956:9:956:17 | call to [] [element 2, element 0] | array_flow.rb:956:5:956:5 | d [element 2, element 0] | provenance | | +| array_flow.rb:956:16:956:16 | c [element 0] | array_flow.rb:956:9:956:17 | call to [] [element 2, element 0] | provenance | | | array_flow.rb:957:10:957:10 | d [element 2, element 0] | array_flow.rb:957:10:957:22 | call to rassoc [element 0] | provenance | | | array_flow.rb:957:10:957:22 | call to rassoc [element 0] | array_flow.rb:957:10:957:25 | ...[...] | provenance | | | array_flow.rb:958:10:958:10 | d [element 2, element 0] | array_flow.rb:958:10:958:22 | call to rassoc [element 0] | provenance | | @@ -1065,8 +1180,10 @@ edges | array_flow.rb:962:5:962:5 | a [element 0] | array_flow.rb:968:9:968:9 | a [element 0] | provenance | | | array_flow.rb:962:5:962:5 | a [element 2] | array_flow.rb:963:9:963:9 | a [element 2] | provenance | | | array_flow.rb:962:5:962:5 | a [element 2] | array_flow.rb:968:9:968:9 | a [element 2] | provenance | | -| array_flow.rb:962:10:962:21 | call to source | array_flow.rb:962:5:962:5 | a [element 0] | provenance | | -| array_flow.rb:962:27:962:38 | call to source | array_flow.rb:962:5:962:5 | a [element 2] | provenance | | +| array_flow.rb:962:9:962:39 | call to [] [element 0] | array_flow.rb:962:5:962:5 | a [element 0] | provenance | | +| array_flow.rb:962:9:962:39 | call to [] [element 2] | array_flow.rb:962:5:962:5 | a [element 2] | provenance | | +| array_flow.rb:962:10:962:21 | call to source | array_flow.rb:962:9:962:39 | call to [] [element 0] | provenance | | +| array_flow.rb:962:27:962:38 | call to source | array_flow.rb:962:9:962:39 | call to [] [element 2] | provenance | | | array_flow.rb:963:9:963:9 | a [element 0] | array_flow.rb:963:22:963:22 | x | provenance | | | array_flow.rb:963:9:963:9 | a [element 2] | array_flow.rb:963:25:963:25 | y | provenance | | | array_flow.rb:963:22:963:22 | x | array_flow.rb:964:14:964:14 | x | provenance | | @@ -1075,7 +1192,8 @@ edges | array_flow.rb:968:9:968:9 | a [element 2] | array_flow.rb:968:28:968:28 | y | provenance | | | array_flow.rb:968:28:968:28 | y | array_flow.rb:970:14:970:14 | y | provenance | | | array_flow.rb:976:5:976:5 | a [element 2] | array_flow.rb:977:9:977:9 | a [element 2] | provenance | | -| array_flow.rb:976:16:976:25 | call to source | array_flow.rb:976:5:976:5 | a [element 2] | provenance | | +| array_flow.rb:976:9:976:26 | call to [] [element 2] | array_flow.rb:976:5:976:5 | a [element 2] | provenance | | +| array_flow.rb:976:16:976:25 | call to source | array_flow.rb:976:9:976:26 | call to [] [element 2] | provenance | | | array_flow.rb:977:5:977:5 | b [element] | array_flow.rb:981:10:981:10 | b [element] | provenance | | | array_flow.rb:977:9:977:9 | a [element 2] | array_flow.rb:977:9:980:7 | call to reject [element] | provenance | | | array_flow.rb:977:9:977:9 | a [element 2] | array_flow.rb:977:22:977:22 | x | provenance | | @@ -1083,7 +1201,8 @@ edges | array_flow.rb:977:22:977:22 | x | array_flow.rb:978:14:978:14 | x | provenance | | | array_flow.rb:981:10:981:10 | b [element] | array_flow.rb:981:10:981:13 | ...[...] | provenance | | | array_flow.rb:985:5:985:5 | a [element 2] | array_flow.rb:986:9:986:9 | a [element 2] | provenance | | -| array_flow.rb:985:16:985:25 | call to source | array_flow.rb:985:5:985:5 | a [element 2] | provenance | | +| array_flow.rb:985:9:985:26 | call to [] [element 2] | array_flow.rb:985:5:985:5 | a [element 2] | provenance | | +| array_flow.rb:985:16:985:25 | call to source | array_flow.rb:985:9:985:26 | call to [] [element 2] | provenance | | | array_flow.rb:986:5:986:5 | b [element] | array_flow.rb:991:10:991:10 | b [element] | provenance | | | array_flow.rb:986:9:986:9 | [post] a [element] | array_flow.rb:990:10:990:10 | a [element] | provenance | | | array_flow.rb:986:9:986:9 | a [element 2] | array_flow.rb:986:9:986:9 | [post] a [element] | provenance | | @@ -1094,7 +1213,8 @@ edges | array_flow.rb:990:10:990:10 | a [element] | array_flow.rb:990:10:990:13 | ...[...] | provenance | | | array_flow.rb:991:10:991:10 | b [element] | array_flow.rb:991:10:991:13 | ...[...] | provenance | | | array_flow.rb:995:5:995:5 | a [element 2] | array_flow.rb:996:9:996:9 | a [element 2] | provenance | | -| array_flow.rb:995:16:995:25 | call to source | array_flow.rb:995:5:995:5 | a [element 2] | provenance | | +| array_flow.rb:995:9:995:26 | call to [] [element 2] | array_flow.rb:995:5:995:5 | a [element 2] | provenance | | +| array_flow.rb:995:16:995:25 | call to source | array_flow.rb:995:9:995:26 | call to [] [element 2] | provenance | | | array_flow.rb:996:5:996:5 | b [element 2] | array_flow.rb:1001:10:1001:10 | b [element 2] | provenance | | | array_flow.rb:996:9:996:9 | a [element 2] | array_flow.rb:996:9:999:7 | call to repeated_combination [element 2] | provenance | | | array_flow.rb:996:9:996:9 | a [element 2] | array_flow.rb:996:39:996:39 | x [element] | provenance | | @@ -1105,7 +1225,8 @@ edges | array_flow.rb:998:14:998:14 | x [element] | array_flow.rb:998:14:998:17 | ...[...] | provenance | | | array_flow.rb:1001:10:1001:10 | b [element 2] | array_flow.rb:1001:10:1001:13 | ...[...] | provenance | | | array_flow.rb:1005:5:1005:5 | a [element 2] | array_flow.rb:1006:9:1006:9 | a [element 2] | provenance | | -| array_flow.rb:1005:16:1005:25 | call to source | array_flow.rb:1005:5:1005:5 | a [element 2] | provenance | | +| array_flow.rb:1005:9:1005:26 | call to [] [element 2] | array_flow.rb:1005:5:1005:5 | a [element 2] | provenance | | +| array_flow.rb:1005:16:1005:25 | call to source | array_flow.rb:1005:9:1005:26 | call to [] [element 2] | provenance | | | array_flow.rb:1006:5:1006:5 | b [element 2] | array_flow.rb:1011:10:1011:10 | b [element 2] | provenance | | | array_flow.rb:1006:9:1006:9 | a [element 2] | array_flow.rb:1006:9:1009:7 | call to repeated_permutation [element 2] | provenance | | | array_flow.rb:1006:9:1006:9 | a [element 2] | array_flow.rb:1006:39:1006:39 | x [element] | provenance | | @@ -1118,16 +1239,19 @@ edges | array_flow.rb:1017:5:1017:5 | b [element 0] | array_flow.rb:1019:10:1019:10 | b [element 0] | provenance | | | array_flow.rb:1017:9:1017:9 | [post] a [element 0] | array_flow.rb:1018:10:1018:10 | a [element 0] | provenance | | | array_flow.rb:1017:9:1017:33 | call to replace [element 0] | array_flow.rb:1017:5:1017:5 | b [element 0] | provenance | | -| array_flow.rb:1017:20:1017:31 | call to source | array_flow.rb:1017:9:1017:9 | [post] a [element 0] | provenance | | -| array_flow.rb:1017:20:1017:31 | call to source | array_flow.rb:1017:9:1017:33 | call to replace [element 0] | provenance | | +| array_flow.rb:1017:19:1017:32 | call to [] [element 0] | array_flow.rb:1017:9:1017:9 | [post] a [element 0] | provenance | | +| array_flow.rb:1017:19:1017:32 | call to [] [element 0] | array_flow.rb:1017:9:1017:33 | call to replace [element 0] | provenance | | +| array_flow.rb:1017:20:1017:31 | call to source | array_flow.rb:1017:19:1017:32 | call to [] [element 0] | provenance | | | array_flow.rb:1018:10:1018:10 | a [element 0] | array_flow.rb:1018:10:1018:13 | ...[...] | provenance | | | array_flow.rb:1019:10:1019:10 | b [element 0] | array_flow.rb:1019:10:1019:13 | ...[...] | provenance | | | array_flow.rb:1023:5:1023:5 | a [element 2] | array_flow.rb:1024:9:1024:9 | a [element 2] | provenance | | | array_flow.rb:1023:5:1023:5 | a [element 2] | array_flow.rb:1029:10:1029:10 | a [element 2] | provenance | | | array_flow.rb:1023:5:1023:5 | a [element 3] | array_flow.rb:1024:9:1024:9 | a [element 3] | provenance | | | array_flow.rb:1023:5:1023:5 | a [element 3] | array_flow.rb:1030:10:1030:10 | a [element 3] | provenance | | -| array_flow.rb:1023:16:1023:28 | call to source | array_flow.rb:1023:5:1023:5 | a [element 2] | provenance | | -| array_flow.rb:1023:31:1023:43 | call to source | array_flow.rb:1023:5:1023:5 | a [element 3] | provenance | | +| array_flow.rb:1023:9:1023:44 | call to [] [element 2] | array_flow.rb:1023:5:1023:5 | a [element 2] | provenance | | +| array_flow.rb:1023:9:1023:44 | call to [] [element 3] | array_flow.rb:1023:5:1023:5 | a [element 3] | provenance | | +| array_flow.rb:1023:16:1023:28 | call to source | array_flow.rb:1023:9:1023:44 | call to [] [element 2] | provenance | | +| array_flow.rb:1023:31:1023:43 | call to source | array_flow.rb:1023:9:1023:44 | call to [] [element 3] | provenance | | | array_flow.rb:1024:5:1024:5 | b [element] | array_flow.rb:1025:10:1025:10 | b [element] | provenance | | | array_flow.rb:1024:5:1024:5 | b [element] | array_flow.rb:1026:10:1026:10 | b [element] | provenance | | | array_flow.rb:1024:5:1024:5 | b [element] | array_flow.rb:1027:10:1027:10 | b [element] | provenance | | @@ -1143,8 +1267,10 @@ edges | array_flow.rb:1034:5:1034:5 | a [element 2] | array_flow.rb:1040:10:1040:10 | a [element 2] | provenance | | | array_flow.rb:1034:5:1034:5 | a [element 3] | array_flow.rb:1035:9:1035:9 | a [element 3] | provenance | | | array_flow.rb:1034:5:1034:5 | a [element 3] | array_flow.rb:1041:10:1041:10 | a [element 3] | provenance | | -| array_flow.rb:1034:16:1034:28 | call to source | array_flow.rb:1034:5:1034:5 | a [element 2] | provenance | | -| array_flow.rb:1034:31:1034:43 | call to source | array_flow.rb:1034:5:1034:5 | a [element 3] | provenance | | +| array_flow.rb:1034:9:1034:44 | call to [] [element 2] | array_flow.rb:1034:5:1034:5 | a [element 2] | provenance | | +| array_flow.rb:1034:9:1034:44 | call to [] [element 3] | array_flow.rb:1034:5:1034:5 | a [element 3] | provenance | | +| array_flow.rb:1034:16:1034:28 | call to source | array_flow.rb:1034:9:1034:44 | call to [] [element 2] | provenance | | +| array_flow.rb:1034:31:1034:43 | call to source | array_flow.rb:1034:9:1034:44 | call to [] [element 3] | provenance | | | array_flow.rb:1035:5:1035:5 | b [element] | array_flow.rb:1036:10:1036:10 | b [element] | provenance | | | array_flow.rb:1035:5:1035:5 | b [element] | array_flow.rb:1037:10:1037:10 | b [element] | provenance | | | array_flow.rb:1035:5:1035:5 | b [element] | array_flow.rb:1038:10:1038:10 | b [element] | provenance | | @@ -1165,7 +1291,8 @@ edges | array_flow.rb:1041:10:1041:10 | a [element 3] | array_flow.rb:1041:10:1041:13 | ...[...] | provenance | | | array_flow.rb:1041:10:1041:10 | a [element] | array_flow.rb:1041:10:1041:13 | ...[...] | provenance | | | array_flow.rb:1045:5:1045:5 | a [element 2] | array_flow.rb:1046:9:1046:9 | a [element 2] | provenance | | -| array_flow.rb:1045:16:1045:26 | call to source | array_flow.rb:1045:5:1045:5 | a [element 2] | provenance | | +| array_flow.rb:1045:9:1045:27 | call to [] [element 2] | array_flow.rb:1045:5:1045:5 | a [element 2] | provenance | | +| array_flow.rb:1045:16:1045:26 | call to source | array_flow.rb:1045:9:1045:27 | call to [] [element 2] | provenance | | | array_flow.rb:1046:5:1046:5 | b [element 2] | array_flow.rb:1049:10:1049:10 | b [element 2] | provenance | | | array_flow.rb:1046:9:1046:9 | a [element 2] | array_flow.rb:1046:9:1048:7 | call to reverse_each [element 2] | provenance | | | array_flow.rb:1046:9:1046:9 | a [element 2] | array_flow.rb:1046:28:1046:28 | x | provenance | | @@ -1173,7 +1300,8 @@ edges | array_flow.rb:1046:28:1046:28 | x | array_flow.rb:1047:14:1047:14 | x | provenance | | | array_flow.rb:1049:10:1049:10 | b [element 2] | array_flow.rb:1049:10:1049:13 | ...[...] | provenance | | | array_flow.rb:1053:5:1053:5 | a [element 2] | array_flow.rb:1054:5:1054:5 | a [element 2] | provenance | | -| array_flow.rb:1053:16:1053:26 | call to source | array_flow.rb:1053:5:1053:5 | a [element 2] | provenance | | +| array_flow.rb:1053:9:1053:27 | call to [] [element 2] | array_flow.rb:1053:5:1053:5 | a [element 2] | provenance | | +| array_flow.rb:1053:16:1053:26 | call to source | array_flow.rb:1053:9:1053:27 | call to [] [element 2] | provenance | | | array_flow.rb:1054:5:1054:5 | a [element 2] | array_flow.rb:1054:18:1054:18 | x | provenance | | | array_flow.rb:1054:18:1054:18 | x | array_flow.rb:1055:14:1055:14 | x | provenance | | | array_flow.rb:1063:5:1063:5 | a [element 0] | array_flow.rb:1065:9:1065:9 | a [element 0] | provenance | | @@ -1188,9 +1316,12 @@ edges | array_flow.rb:1063:5:1063:5 | a [element 3] | array_flow.rb:1071:9:1071:9 | a [element 3] | provenance | | | array_flow.rb:1063:5:1063:5 | a [element 3] | array_flow.rb:1077:9:1077:9 | a [element 3] | provenance | | | array_flow.rb:1063:5:1063:5 | a [element 3] | array_flow.rb:1083:9:1083:9 | a [element 3] | provenance | | -| array_flow.rb:1063:10:1063:22 | call to source | array_flow.rb:1063:5:1063:5 | a [element 0] | provenance | | -| array_flow.rb:1063:28:1063:40 | call to source | array_flow.rb:1063:5:1063:5 | a [element 2] | provenance | | -| array_flow.rb:1063:43:1063:55 | call to source | array_flow.rb:1063:5:1063:5 | a [element 3] | provenance | | +| array_flow.rb:1063:9:1063:56 | call to [] [element 0] | array_flow.rb:1063:5:1063:5 | a [element 0] | provenance | | +| array_flow.rb:1063:9:1063:56 | call to [] [element 2] | array_flow.rb:1063:5:1063:5 | a [element 2] | provenance | | +| array_flow.rb:1063:9:1063:56 | call to [] [element 3] | array_flow.rb:1063:5:1063:5 | a [element 3] | provenance | | +| array_flow.rb:1063:10:1063:22 | call to source | array_flow.rb:1063:9:1063:56 | call to [] [element 0] | provenance | | +| array_flow.rb:1063:28:1063:40 | call to source | array_flow.rb:1063:9:1063:56 | call to [] [element 2] | provenance | | +| array_flow.rb:1063:43:1063:55 | call to source | array_flow.rb:1063:9:1063:56 | call to [] [element 3] | provenance | | | array_flow.rb:1065:5:1065:5 | b [element 1] | array_flow.rb:1067:10:1067:10 | b [element 1] | provenance | | | array_flow.rb:1065:5:1065:5 | b [element 2] | array_flow.rb:1068:10:1068:10 | b [element 2] | provenance | | | array_flow.rb:1065:5:1065:5 | b [element] | array_flow.rb:1066:10:1066:10 | b [element] | provenance | | @@ -1254,9 +1385,12 @@ edges | array_flow.rb:1095:5:1095:5 | a [element 0] | array_flow.rb:1096:9:1096:9 | a [element 0] | provenance | | | array_flow.rb:1095:5:1095:5 | a [element 2] | array_flow.rb:1096:9:1096:9 | a [element 2] | provenance | | | array_flow.rb:1095:5:1095:5 | a [element 3] | array_flow.rb:1096:9:1096:9 | a [element 3] | provenance | | -| array_flow.rb:1095:10:1095:22 | call to source | array_flow.rb:1095:5:1095:5 | a [element 0] | provenance | | -| array_flow.rb:1095:28:1095:40 | call to source | array_flow.rb:1095:5:1095:5 | a [element 2] | provenance | | -| array_flow.rb:1095:43:1095:55 | call to source | array_flow.rb:1095:5:1095:5 | a [element 3] | provenance | | +| array_flow.rb:1095:9:1095:56 | call to [] [element 0] | array_flow.rb:1095:5:1095:5 | a [element 0] | provenance | | +| array_flow.rb:1095:9:1095:56 | call to [] [element 2] | array_flow.rb:1095:5:1095:5 | a [element 2] | provenance | | +| array_flow.rb:1095:9:1095:56 | call to [] [element 3] | array_flow.rb:1095:5:1095:5 | a [element 3] | provenance | | +| array_flow.rb:1095:10:1095:22 | call to source | array_flow.rb:1095:9:1095:56 | call to [] [element 0] | provenance | | +| array_flow.rb:1095:28:1095:40 | call to source | array_flow.rb:1095:9:1095:56 | call to [] [element 2] | provenance | | +| array_flow.rb:1095:43:1095:55 | call to source | array_flow.rb:1095:9:1095:56 | call to [] [element 3] | provenance | | | array_flow.rb:1096:5:1096:5 | b [element 1] | array_flow.rb:1102:10:1102:10 | b [element 1] | provenance | | | array_flow.rb:1096:5:1096:5 | b [element 2] | array_flow.rb:1103:10:1103:10 | b [element 2] | provenance | | | array_flow.rb:1096:5:1096:5 | b [element] | array_flow.rb:1101:10:1101:10 | b [element] | provenance | | @@ -1293,9 +1427,12 @@ edges | array_flow.rb:1106:5:1106:5 | a [element 0] | array_flow.rb:1107:9:1107:9 | a [element 0] | provenance | | | array_flow.rb:1106:5:1106:5 | a [element 2] | array_flow.rb:1107:9:1107:9 | a [element 2] | provenance | | | array_flow.rb:1106:5:1106:5 | a [element 3] | array_flow.rb:1107:9:1107:9 | a [element 3] | provenance | | -| array_flow.rb:1106:10:1106:22 | call to source | array_flow.rb:1106:5:1106:5 | a [element 0] | provenance | | -| array_flow.rb:1106:28:1106:40 | call to source | array_flow.rb:1106:5:1106:5 | a [element 2] | provenance | | -| array_flow.rb:1106:43:1106:55 | call to source | array_flow.rb:1106:5:1106:5 | a [element 3] | provenance | | +| array_flow.rb:1106:9:1106:56 | call to [] [element 0] | array_flow.rb:1106:5:1106:5 | a [element 0] | provenance | | +| array_flow.rb:1106:9:1106:56 | call to [] [element 2] | array_flow.rb:1106:5:1106:5 | a [element 2] | provenance | | +| array_flow.rb:1106:9:1106:56 | call to [] [element 3] | array_flow.rb:1106:5:1106:5 | a [element 3] | provenance | | +| array_flow.rb:1106:10:1106:22 | call to source | array_flow.rb:1106:9:1106:56 | call to [] [element 0] | provenance | | +| array_flow.rb:1106:28:1106:40 | call to source | array_flow.rb:1106:9:1106:56 | call to [] [element 2] | provenance | | +| array_flow.rb:1106:43:1106:55 | call to source | array_flow.rb:1106:9:1106:56 | call to [] [element 3] | provenance | | | array_flow.rb:1107:5:1107:5 | b [element 0] | array_flow.rb:1112:10:1112:10 | b [element 0] | provenance | | | array_flow.rb:1107:5:1107:5 | b [element 1] | array_flow.rb:1113:10:1113:10 | b [element 1] | provenance | | | array_flow.rb:1107:5:1107:5 | b [element] | array_flow.rb:1112:10:1112:10 | b [element] | provenance | | @@ -1332,9 +1469,12 @@ edges | array_flow.rb:1117:5:1117:5 | a [element 0] | array_flow.rb:1118:9:1118:9 | a [element 0] | provenance | | | array_flow.rb:1117:5:1117:5 | a [element 2] | array_flow.rb:1118:9:1118:9 | a [element 2] | provenance | | | array_flow.rb:1117:5:1117:5 | a [element 3] | array_flow.rb:1118:9:1118:9 | a [element 3] | provenance | | -| array_flow.rb:1117:10:1117:22 | call to source | array_flow.rb:1117:5:1117:5 | a [element 0] | provenance | | -| array_flow.rb:1117:28:1117:40 | call to source | array_flow.rb:1117:5:1117:5 | a [element 2] | provenance | | -| array_flow.rb:1117:43:1117:55 | call to source | array_flow.rb:1117:5:1117:5 | a [element 3] | provenance | | +| array_flow.rb:1117:9:1117:56 | call to [] [element 0] | array_flow.rb:1117:5:1117:5 | a [element 0] | provenance | | +| array_flow.rb:1117:9:1117:56 | call to [] [element 2] | array_flow.rb:1117:5:1117:5 | a [element 2] | provenance | | +| array_flow.rb:1117:9:1117:56 | call to [] [element 3] | array_flow.rb:1117:5:1117:5 | a [element 3] | provenance | | +| array_flow.rb:1117:10:1117:22 | call to source | array_flow.rb:1117:9:1117:56 | call to [] [element 0] | provenance | | +| array_flow.rb:1117:28:1117:40 | call to source | array_flow.rb:1117:9:1117:56 | call to [] [element 2] | provenance | | +| array_flow.rb:1117:43:1117:55 | call to source | array_flow.rb:1117:9:1117:56 | call to [] [element 3] | provenance | | | array_flow.rb:1118:5:1118:5 | b [element 0] | array_flow.rb:1123:10:1123:10 | b [element 0] | provenance | | | array_flow.rb:1118:5:1118:5 | b [element 2] | array_flow.rb:1125:10:1125:10 | b [element 2] | provenance | | | array_flow.rb:1118:5:1118:5 | b [element 3] | array_flow.rb:1126:10:1126:10 | b [element 3] | provenance | | @@ -1359,9 +1499,12 @@ edges | array_flow.rb:1128:5:1128:5 | a [element 0] | array_flow.rb:1129:9:1129:9 | a [element 0] | provenance | | | array_flow.rb:1128:5:1128:5 | a [element 2] | array_flow.rb:1129:9:1129:9 | a [element 2] | provenance | | | array_flow.rb:1128:5:1128:5 | a [element 3] | array_flow.rb:1129:9:1129:9 | a [element 3] | provenance | | -| array_flow.rb:1128:10:1128:22 | call to source | array_flow.rb:1128:5:1128:5 | a [element 0] | provenance | | -| array_flow.rb:1128:28:1128:40 | call to source | array_flow.rb:1128:5:1128:5 | a [element 2] | provenance | | -| array_flow.rb:1128:43:1128:55 | call to source | array_flow.rb:1128:5:1128:5 | a [element 3] | provenance | | +| array_flow.rb:1128:9:1128:56 | call to [] [element 0] | array_flow.rb:1128:5:1128:5 | a [element 0] | provenance | | +| array_flow.rb:1128:9:1128:56 | call to [] [element 2] | array_flow.rb:1128:5:1128:5 | a [element 2] | provenance | | +| array_flow.rb:1128:9:1128:56 | call to [] [element 3] | array_flow.rb:1128:5:1128:5 | a [element 3] | provenance | | +| array_flow.rb:1128:10:1128:22 | call to source | array_flow.rb:1128:9:1128:56 | call to [] [element 0] | provenance | | +| array_flow.rb:1128:28:1128:40 | call to source | array_flow.rb:1128:9:1128:56 | call to [] [element 2] | provenance | | +| array_flow.rb:1128:43:1128:55 | call to source | array_flow.rb:1128:9:1128:56 | call to [] [element 3] | provenance | | | array_flow.rb:1129:5:1129:5 | b [element] | array_flow.rb:1134:10:1134:10 | b [element] | provenance | | | array_flow.rb:1129:5:1129:5 | b [element] | array_flow.rb:1135:10:1135:10 | b [element] | provenance | | | array_flow.rb:1129:5:1129:5 | b [element] | array_flow.rb:1136:10:1136:10 | b [element] | provenance | | @@ -1386,7 +1529,8 @@ edges | array_flow.rb:1136:10:1136:10 | b [element] | array_flow.rb:1136:10:1136:13 | ...[...] | provenance | | | array_flow.rb:1137:10:1137:10 | b [element] | array_flow.rb:1137:10:1137:13 | ...[...] | provenance | | | array_flow.rb:1141:5:1141:5 | a [element 3] | array_flow.rb:1142:9:1142:9 | a [element 3] | provenance | | -| array_flow.rb:1141:19:1141:29 | call to source | array_flow.rb:1141:5:1141:5 | a [element 3] | provenance | | +| array_flow.rb:1141:9:1141:30 | call to [] [element 3] | array_flow.rb:1141:5:1141:5 | a [element 3] | provenance | | +| array_flow.rb:1141:19:1141:29 | call to source | array_flow.rb:1141:9:1141:30 | call to [] [element 3] | provenance | | | array_flow.rb:1142:5:1142:5 | b [element] | array_flow.rb:1145:10:1145:10 | b [element] | provenance | | | array_flow.rb:1142:9:1142:9 | a [element 3] | array_flow.rb:1142:9:1144:7 | call to select [element] | provenance | | | array_flow.rb:1142:9:1142:9 | a [element 3] | array_flow.rb:1142:22:1142:22 | x | provenance | | @@ -1394,7 +1538,8 @@ edges | array_flow.rb:1142:22:1142:22 | x | array_flow.rb:1143:14:1143:14 | x | provenance | | | array_flow.rb:1145:10:1145:10 | b [element] | array_flow.rb:1145:10:1145:13 | ...[...] | provenance | | | array_flow.rb:1149:5:1149:5 | a [element 2] | array_flow.rb:1150:9:1150:9 | a [element 2] | provenance | | -| array_flow.rb:1149:16:1149:26 | call to source | array_flow.rb:1149:5:1149:5 | a [element 2] | provenance | | +| array_flow.rb:1149:9:1149:27 | call to [] [element 2] | array_flow.rb:1149:5:1149:5 | a [element 2] | provenance | | +| array_flow.rb:1149:16:1149:26 | call to source | array_flow.rb:1149:9:1149:27 | call to [] [element 2] | provenance | | | array_flow.rb:1150:5:1150:5 | b [element] | array_flow.rb:1155:10:1155:10 | b [element] | provenance | | | array_flow.rb:1150:9:1150:9 | [post] a [element] | array_flow.rb:1154:10:1154:10 | a [element] | provenance | | | array_flow.rb:1150:9:1150:9 | a [element 2] | array_flow.rb:1150:9:1150:9 | [post] a [element] | provenance | | @@ -1406,8 +1551,10 @@ edges | array_flow.rb:1155:10:1155:10 | b [element] | array_flow.rb:1155:10:1155:13 | ...[...] | provenance | | | array_flow.rb:1159:5:1159:5 | a [element 0] | array_flow.rb:1160:9:1160:9 | a [element 0] | provenance | | | array_flow.rb:1159:5:1159:5 | a [element 2] | array_flow.rb:1160:9:1160:9 | a [element 2] | provenance | | -| array_flow.rb:1159:10:1159:22 | call to source | array_flow.rb:1159:5:1159:5 | a [element 0] | provenance | | -| array_flow.rb:1159:28:1159:40 | call to source | array_flow.rb:1159:5:1159:5 | a [element 2] | provenance | | +| array_flow.rb:1159:9:1159:41 | call to [] [element 0] | array_flow.rb:1159:5:1159:5 | a [element 0] | provenance | | +| array_flow.rb:1159:9:1159:41 | call to [] [element 2] | array_flow.rb:1159:5:1159:5 | a [element 2] | provenance | | +| array_flow.rb:1159:10:1159:22 | call to source | array_flow.rb:1159:9:1159:41 | call to [] [element 0] | provenance | | +| array_flow.rb:1159:28:1159:40 | call to source | array_flow.rb:1159:9:1159:41 | call to [] [element 2] | provenance | | | array_flow.rb:1160:5:1160:5 | b | array_flow.rb:1161:10:1161:10 | b | provenance | | | array_flow.rb:1160:9:1160:9 | [post] a [element 1] | array_flow.rb:1163:10:1163:10 | a [element 1] | provenance | | | array_flow.rb:1160:9:1160:9 | a [element 0] | array_flow.rb:1160:9:1160:15 | call to shift | provenance | | @@ -1416,8 +1563,10 @@ edges | array_flow.rb:1163:10:1163:10 | a [element 1] | array_flow.rb:1163:10:1163:13 | ...[...] | provenance | | | array_flow.rb:1166:5:1166:5 | a [element 0] | array_flow.rb:1167:9:1167:9 | a [element 0] | provenance | | | array_flow.rb:1166:5:1166:5 | a [element 2] | array_flow.rb:1167:9:1167:9 | a [element 2] | provenance | | -| array_flow.rb:1166:10:1166:22 | call to source | array_flow.rb:1166:5:1166:5 | a [element 0] | provenance | | -| array_flow.rb:1166:28:1166:40 | call to source | array_flow.rb:1166:5:1166:5 | a [element 2] | provenance | | +| array_flow.rb:1166:9:1166:41 | call to [] [element 0] | array_flow.rb:1166:5:1166:5 | a [element 0] | provenance | | +| array_flow.rb:1166:9:1166:41 | call to [] [element 2] | array_flow.rb:1166:5:1166:5 | a [element 2] | provenance | | +| array_flow.rb:1166:10:1166:22 | call to source | array_flow.rb:1166:9:1166:41 | call to [] [element 0] | provenance | | +| array_flow.rb:1166:28:1166:40 | call to source | array_flow.rb:1166:9:1166:41 | call to [] [element 2] | provenance | | | array_flow.rb:1167:5:1167:5 | b [element 0] | array_flow.rb:1168:10:1168:10 | b [element 0] | provenance | | | array_flow.rb:1167:9:1167:9 | [post] a [element 0] | array_flow.rb:1170:10:1170:10 | a [element 0] | provenance | | | array_flow.rb:1167:9:1167:9 | a [element 0] | array_flow.rb:1167:9:1167:18 | call to shift [element 0] | provenance | | @@ -1429,8 +1578,10 @@ edges | array_flow.rb:1174:5:1174:5 | a [element 0] | array_flow.rb:1178:10:1178:10 | a [element 0] | provenance | | | array_flow.rb:1174:5:1174:5 | a [element 2] | array_flow.rb:1175:9:1175:9 | a [element 2] | provenance | | | array_flow.rb:1174:5:1174:5 | a [element 2] | array_flow.rb:1180:10:1180:10 | a [element 2] | provenance | | -| array_flow.rb:1174:10:1174:22 | call to source | array_flow.rb:1174:5:1174:5 | a [element 0] | provenance | | -| array_flow.rb:1174:28:1174:40 | call to source | array_flow.rb:1174:5:1174:5 | a [element 2] | provenance | | +| array_flow.rb:1174:9:1174:41 | call to [] [element 0] | array_flow.rb:1174:5:1174:5 | a [element 0] | provenance | | +| array_flow.rb:1174:9:1174:41 | call to [] [element 2] | array_flow.rb:1174:5:1174:5 | a [element 2] | provenance | | +| array_flow.rb:1174:10:1174:22 | call to source | array_flow.rb:1174:9:1174:41 | call to [] [element 0] | provenance | | +| array_flow.rb:1174:28:1174:40 | call to source | array_flow.rb:1174:9:1174:41 | call to [] [element 2] | provenance | | | array_flow.rb:1175:5:1175:5 | b [element] | array_flow.rb:1176:10:1176:10 | b [element] | provenance | | | array_flow.rb:1175:5:1175:5 | b [element] | array_flow.rb:1177:10:1177:10 | b [element] | provenance | | | array_flow.rb:1175:9:1175:9 | [post] a [element] | array_flow.rb:1178:10:1178:10 | a [element] | provenance | | @@ -1450,7 +1601,8 @@ edges | array_flow.rb:1180:10:1180:10 | a [element] | array_flow.rb:1180:10:1180:13 | ...[...] | provenance | | | array_flow.rb:1184:5:1184:5 | a [element 2] | array_flow.rb:1185:9:1185:9 | a [element 2] | provenance | | | array_flow.rb:1184:5:1184:5 | a [element 2] | array_flow.rb:1188:10:1188:10 | a [element 2] | provenance | | -| array_flow.rb:1184:16:1184:26 | call to source | array_flow.rb:1184:5:1184:5 | a [element 2] | provenance | | +| array_flow.rb:1184:9:1184:27 | call to [] [element 2] | array_flow.rb:1184:5:1184:5 | a [element 2] | provenance | | +| array_flow.rb:1184:16:1184:26 | call to source | array_flow.rb:1184:9:1184:27 | call to [] [element 2] | provenance | | | array_flow.rb:1185:5:1185:5 | b [element] | array_flow.rb:1189:10:1189:10 | b [element] | provenance | | | array_flow.rb:1185:5:1185:5 | b [element] | array_flow.rb:1190:10:1190:10 | b [element] | provenance | | | array_flow.rb:1185:5:1185:5 | b [element] | array_flow.rb:1191:10:1191:10 | b [element] | provenance | | @@ -1462,7 +1614,8 @@ edges | array_flow.rb:1191:10:1191:10 | b [element] | array_flow.rb:1191:10:1191:13 | ...[...] | provenance | | | array_flow.rb:1195:5:1195:5 | a [element 2] | array_flow.rb:1196:9:1196:9 | a [element 2] | provenance | | | array_flow.rb:1195:5:1195:5 | a [element 2] | array_flow.rb:1199:10:1199:10 | a [element 2] | provenance | | -| array_flow.rb:1195:16:1195:26 | call to source | array_flow.rb:1195:5:1195:5 | a [element 2] | provenance | | +| array_flow.rb:1195:9:1195:27 | call to [] [element 2] | array_flow.rb:1195:5:1195:5 | a [element 2] | provenance | | +| array_flow.rb:1195:16:1195:26 | call to source | array_flow.rb:1195:9:1195:27 | call to [] [element 2] | provenance | | | array_flow.rb:1196:5:1196:5 | b [element] | array_flow.rb:1200:10:1200:10 | b [element] | provenance | | | array_flow.rb:1196:5:1196:5 | b [element] | array_flow.rb:1201:10:1201:10 | b [element] | provenance | | | array_flow.rb:1196:5:1196:5 | b [element] | array_flow.rb:1202:10:1202:10 | b [element] | provenance | | @@ -1497,8 +1650,10 @@ edges | array_flow.rb:1206:5:1206:5 | a [element 4] | array_flow.rb:1240:9:1240:9 | a [element 4] | provenance | | | array_flow.rb:1206:5:1206:5 | a [element 4] | array_flow.rb:1244:9:1244:9 | a [element 4] | provenance | | | array_flow.rb:1206:5:1206:5 | a [element 4] | array_flow.rb:1253:9:1253:9 | a [element 4] | provenance | | -| array_flow.rb:1206:16:1206:28 | call to source | array_flow.rb:1206:5:1206:5 | a [element 2] | provenance | | -| array_flow.rb:1206:34:1206:46 | call to source | array_flow.rb:1206:5:1206:5 | a [element 4] | provenance | | +| array_flow.rb:1206:9:1206:47 | call to [] [element 2] | array_flow.rb:1206:5:1206:5 | a [element 2] | provenance | | +| array_flow.rb:1206:9:1206:47 | call to [] [element 4] | array_flow.rb:1206:5:1206:5 | a [element 4] | provenance | | +| array_flow.rb:1206:16:1206:28 | call to source | array_flow.rb:1206:9:1206:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1206:34:1206:46 | call to source | array_flow.rb:1206:9:1206:47 | call to [] [element 4] | provenance | | | array_flow.rb:1208:5:1208:5 | b | array_flow.rb:1209:10:1209:10 | b | provenance | | | array_flow.rb:1208:9:1208:9 | a [element 4] | array_flow.rb:1208:9:1208:17 | call to slice | provenance | | | array_flow.rb:1208:9:1208:17 | call to slice | array_flow.rb:1208:5:1208:5 | b | provenance | | @@ -1562,8 +1717,10 @@ edges | array_flow.rb:1256:10:1256:10 | b [element] | array_flow.rb:1256:10:1256:13 | ...[...] | provenance | | | array_flow.rb:1260:5:1260:5 | a [element 2] | array_flow.rb:1261:9:1261:9 | a [element 2] | provenance | | | array_flow.rb:1260:5:1260:5 | a [element 4] | array_flow.rb:1261:9:1261:9 | a [element 4] | provenance | | -| array_flow.rb:1260:16:1260:28 | call to source | array_flow.rb:1260:5:1260:5 | a [element 2] | provenance | | -| array_flow.rb:1260:34:1260:46 | call to source | array_flow.rb:1260:5:1260:5 | a [element 4] | provenance | | +| array_flow.rb:1260:9:1260:47 | call to [] [element 2] | array_flow.rb:1260:5:1260:5 | a [element 2] | provenance | | +| array_flow.rb:1260:9:1260:47 | call to [] [element 4] | array_flow.rb:1260:5:1260:5 | a [element 4] | provenance | | +| array_flow.rb:1260:16:1260:28 | call to source | array_flow.rb:1260:9:1260:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1260:34:1260:46 | call to source | array_flow.rb:1260:9:1260:47 | call to [] [element 4] | provenance | | | array_flow.rb:1261:5:1261:5 | b | array_flow.rb:1262:10:1262:10 | b | provenance | | | array_flow.rb:1261:9:1261:9 | [post] a [element 3] | array_flow.rb:1266:10:1266:10 | a [element 3] | provenance | | | array_flow.rb:1261:9:1261:9 | a [element 2] | array_flow.rb:1261:9:1261:19 | call to slice! | provenance | | @@ -1572,8 +1729,10 @@ edges | array_flow.rb:1266:10:1266:10 | a [element 3] | array_flow.rb:1266:10:1266:13 | ...[...] | provenance | | | array_flow.rb:1268:5:1268:5 | a [element 2] | array_flow.rb:1269:9:1269:9 | a [element 2] | provenance | | | array_flow.rb:1268:5:1268:5 | a [element 4] | array_flow.rb:1269:9:1269:9 | a [element 4] | provenance | | -| array_flow.rb:1268:16:1268:28 | call to source | array_flow.rb:1268:5:1268:5 | a [element 2] | provenance | | -| array_flow.rb:1268:34:1268:46 | call to source | array_flow.rb:1268:5:1268:5 | a [element 4] | provenance | | +| array_flow.rb:1268:9:1268:47 | call to [] [element 2] | array_flow.rb:1268:5:1268:5 | a [element 2] | provenance | | +| array_flow.rb:1268:9:1268:47 | call to [] [element 4] | array_flow.rb:1268:5:1268:5 | a [element 4] | provenance | | +| array_flow.rb:1268:16:1268:28 | call to source | array_flow.rb:1268:9:1268:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1268:34:1268:46 | call to source | array_flow.rb:1268:9:1268:47 | call to [] [element 4] | provenance | | | array_flow.rb:1269:5:1269:5 | b | array_flow.rb:1275:10:1275:10 | b | provenance | | | array_flow.rb:1269:5:1269:5 | b [element] | array_flow.rb:1277:10:1277:10 | b [element] | provenance | | | array_flow.rb:1269:9:1269:9 | [post] a [element] | array_flow.rb:1270:10:1270:10 | a [element] | provenance | | @@ -1595,8 +1754,10 @@ edges | array_flow.rb:1277:10:1277:10 | b [element] | array_flow.rb:1277:10:1277:13 | ...[...] | provenance | | | array_flow.rb:1279:5:1279:5 | a [element 2] | array_flow.rb:1280:9:1280:9 | a [element 2] | provenance | | | array_flow.rb:1279:5:1279:5 | a [element 4] | array_flow.rb:1280:9:1280:9 | a [element 4] | provenance | | -| array_flow.rb:1279:16:1279:28 | call to source | array_flow.rb:1279:5:1279:5 | a [element 2] | provenance | | -| array_flow.rb:1279:34:1279:46 | call to source | array_flow.rb:1279:5:1279:5 | a [element 4] | provenance | | +| array_flow.rb:1279:9:1279:47 | call to [] [element 2] | array_flow.rb:1279:5:1279:5 | a [element 2] | provenance | | +| array_flow.rb:1279:9:1279:47 | call to [] [element 4] | array_flow.rb:1279:5:1279:5 | a [element 4] | provenance | | +| array_flow.rb:1279:16:1279:28 | call to source | array_flow.rb:1279:9:1279:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1279:34:1279:46 | call to source | array_flow.rb:1279:9:1279:47 | call to [] [element 4] | provenance | | | array_flow.rb:1280:5:1280:5 | b [element 0] | array_flow.rb:1281:10:1281:10 | b [element 0] | provenance | | | array_flow.rb:1280:5:1280:5 | b [element 2] | array_flow.rb:1283:10:1283:10 | b [element 2] | provenance | | | array_flow.rb:1280:9:1280:9 | a [element 2] | array_flow.rb:1280:9:1280:22 | call to slice! [element 0] | provenance | | @@ -1607,8 +1768,10 @@ edges | array_flow.rb:1283:10:1283:10 | b [element 2] | array_flow.rb:1283:10:1283:13 | ...[...] | provenance | | | array_flow.rb:1290:5:1290:5 | a [element 2] | array_flow.rb:1291:9:1291:9 | a [element 2] | provenance | | | array_flow.rb:1290:5:1290:5 | a [element 4] | array_flow.rb:1291:9:1291:9 | a [element 4] | provenance | | -| array_flow.rb:1290:16:1290:28 | call to source | array_flow.rb:1290:5:1290:5 | a [element 2] | provenance | | -| array_flow.rb:1290:34:1290:46 | call to source | array_flow.rb:1290:5:1290:5 | a [element 4] | provenance | | +| array_flow.rb:1290:9:1290:47 | call to [] [element 2] | array_flow.rb:1290:5:1290:5 | a [element 2] | provenance | | +| array_flow.rb:1290:9:1290:47 | call to [] [element 4] | array_flow.rb:1290:5:1290:5 | a [element 4] | provenance | | +| array_flow.rb:1290:16:1290:28 | call to source | array_flow.rb:1290:9:1290:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1290:34:1290:46 | call to source | array_flow.rb:1290:9:1290:47 | call to [] [element 4] | provenance | | | array_flow.rb:1291:5:1291:5 | b [element 0] | array_flow.rb:1292:10:1292:10 | b [element 0] | provenance | | | array_flow.rb:1291:9:1291:9 | [post] a [element 2] | array_flow.rb:1297:10:1297:10 | a [element 2] | provenance | | | array_flow.rb:1291:9:1291:9 | a [element 2] | array_flow.rb:1291:9:1291:22 | call to slice! [element 0] | provenance | | @@ -1618,8 +1781,10 @@ edges | array_flow.rb:1297:10:1297:10 | a [element 2] | array_flow.rb:1297:10:1297:13 | ...[...] | provenance | | | array_flow.rb:1301:5:1301:5 | a [element 2] | array_flow.rb:1302:9:1302:9 | a [element 2] | provenance | | | array_flow.rb:1301:5:1301:5 | a [element 4] | array_flow.rb:1302:9:1302:9 | a [element 4] | provenance | | -| array_flow.rb:1301:16:1301:28 | call to source | array_flow.rb:1301:5:1301:5 | a [element 2] | provenance | | -| array_flow.rb:1301:34:1301:46 | call to source | array_flow.rb:1301:5:1301:5 | a [element 4] | provenance | | +| array_flow.rb:1301:9:1301:47 | call to [] [element 2] | array_flow.rb:1301:5:1301:5 | a [element 2] | provenance | | +| array_flow.rb:1301:9:1301:47 | call to [] [element 4] | array_flow.rb:1301:5:1301:5 | a [element 4] | provenance | | +| array_flow.rb:1301:16:1301:28 | call to source | array_flow.rb:1301:9:1301:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1301:34:1301:46 | call to source | array_flow.rb:1301:9:1301:47 | call to [] [element 4] | provenance | | | array_flow.rb:1302:5:1302:5 | b [element 0] | array_flow.rb:1303:10:1303:10 | b [element 0] | provenance | | | array_flow.rb:1302:9:1302:9 | [post] a [element 2] | array_flow.rb:1308:10:1308:10 | a [element 2] | provenance | | | array_flow.rb:1302:9:1302:9 | a [element 2] | array_flow.rb:1302:9:1302:23 | call to slice! [element 0] | provenance | | @@ -1629,8 +1794,10 @@ edges | array_flow.rb:1308:10:1308:10 | a [element 2] | array_flow.rb:1308:10:1308:13 | ...[...] | provenance | | | array_flow.rb:1312:5:1312:5 | a [element 2] | array_flow.rb:1313:9:1313:9 | a [element 2] | provenance | | | array_flow.rb:1312:5:1312:5 | a [element 4] | array_flow.rb:1313:9:1313:9 | a [element 4] | provenance | | -| array_flow.rb:1312:16:1312:28 | call to source | array_flow.rb:1312:5:1312:5 | a [element 2] | provenance | | -| array_flow.rb:1312:34:1312:46 | call to source | array_flow.rb:1312:5:1312:5 | a [element 4] | provenance | | +| array_flow.rb:1312:9:1312:47 | call to [] [element 2] | array_flow.rb:1312:5:1312:5 | a [element 2] | provenance | | +| array_flow.rb:1312:9:1312:47 | call to [] [element 4] | array_flow.rb:1312:5:1312:5 | a [element 4] | provenance | | +| array_flow.rb:1312:16:1312:28 | call to source | array_flow.rb:1312:9:1312:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1312:34:1312:46 | call to source | array_flow.rb:1312:9:1312:47 | call to [] [element 4] | provenance | | | array_flow.rb:1313:5:1313:5 | b [element] | array_flow.rb:1314:10:1314:10 | b [element] | provenance | | | array_flow.rb:1313:5:1313:5 | b [element] | array_flow.rb:1315:10:1315:10 | b [element] | provenance | | | array_flow.rb:1313:5:1313:5 | b [element] | array_flow.rb:1316:10:1316:10 | b [element] | provenance | | @@ -1650,8 +1817,10 @@ edges | array_flow.rb:1319:10:1319:10 | a [element] | array_flow.rb:1319:10:1319:13 | ...[...] | provenance | | | array_flow.rb:1321:5:1321:5 | a [element 2] | array_flow.rb:1322:9:1322:9 | a [element 2] | provenance | | | array_flow.rb:1321:5:1321:5 | a [element 4] | array_flow.rb:1322:9:1322:9 | a [element 4] | provenance | | -| array_flow.rb:1321:16:1321:28 | call to source | array_flow.rb:1321:5:1321:5 | a [element 2] | provenance | | -| array_flow.rb:1321:34:1321:46 | call to source | array_flow.rb:1321:5:1321:5 | a [element 4] | provenance | | +| array_flow.rb:1321:9:1321:47 | call to [] [element 2] | array_flow.rb:1321:5:1321:5 | a [element 2] | provenance | | +| array_flow.rb:1321:9:1321:47 | call to [] [element 4] | array_flow.rb:1321:5:1321:5 | a [element 4] | provenance | | +| array_flow.rb:1321:16:1321:28 | call to source | array_flow.rb:1321:9:1321:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1321:34:1321:46 | call to source | array_flow.rb:1321:9:1321:47 | call to [] [element 4] | provenance | | | array_flow.rb:1322:5:1322:5 | b [element] | array_flow.rb:1323:10:1323:10 | b [element] | provenance | | | array_flow.rb:1322:5:1322:5 | b [element] | array_flow.rb:1324:10:1324:10 | b [element] | provenance | | | array_flow.rb:1322:5:1322:5 | b [element] | array_flow.rb:1325:10:1325:10 | b [element] | provenance | | @@ -1671,8 +1840,10 @@ edges | array_flow.rb:1328:10:1328:10 | a [element] | array_flow.rb:1328:10:1328:13 | ...[...] | provenance | | | array_flow.rb:1330:5:1330:5 | a [element 2] | array_flow.rb:1331:9:1331:9 | a [element 2] | provenance | | | array_flow.rb:1330:5:1330:5 | a [element 4] | array_flow.rb:1331:9:1331:9 | a [element 4] | provenance | | -| array_flow.rb:1330:16:1330:28 | call to source | array_flow.rb:1330:5:1330:5 | a [element 2] | provenance | | -| array_flow.rb:1330:34:1330:46 | call to source | array_flow.rb:1330:5:1330:5 | a [element 4] | provenance | | +| array_flow.rb:1330:9:1330:47 | call to [] [element 2] | array_flow.rb:1330:5:1330:5 | a [element 2] | provenance | | +| array_flow.rb:1330:9:1330:47 | call to [] [element 4] | array_flow.rb:1330:5:1330:5 | a [element 4] | provenance | | +| array_flow.rb:1330:16:1330:28 | call to source | array_flow.rb:1330:9:1330:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1330:34:1330:46 | call to source | array_flow.rb:1330:9:1330:47 | call to [] [element 4] | provenance | | | array_flow.rb:1331:5:1331:5 | b [element] | array_flow.rb:1332:10:1332:10 | b [element] | provenance | | | array_flow.rb:1331:5:1331:5 | b [element] | array_flow.rb:1333:10:1333:10 | b [element] | provenance | | | array_flow.rb:1331:5:1331:5 | b [element] | array_flow.rb:1334:10:1334:10 | b [element] | provenance | | @@ -1692,8 +1863,10 @@ edges | array_flow.rb:1337:10:1337:10 | a [element] | array_flow.rb:1337:10:1337:13 | ...[...] | provenance | | | array_flow.rb:1339:5:1339:5 | a [element 2] | array_flow.rb:1340:9:1340:9 | a [element 2] | provenance | | | array_flow.rb:1339:5:1339:5 | a [element 4] | array_flow.rb:1340:9:1340:9 | a [element 4] | provenance | | -| array_flow.rb:1339:16:1339:28 | call to source | array_flow.rb:1339:5:1339:5 | a [element 2] | provenance | | -| array_flow.rb:1339:34:1339:46 | call to source | array_flow.rb:1339:5:1339:5 | a [element 4] | provenance | | +| array_flow.rb:1339:9:1339:47 | call to [] [element 2] | array_flow.rb:1339:5:1339:5 | a [element 2] | provenance | | +| array_flow.rb:1339:9:1339:47 | call to [] [element 4] | array_flow.rb:1339:5:1339:5 | a [element 4] | provenance | | +| array_flow.rb:1339:16:1339:28 | call to source | array_flow.rb:1339:9:1339:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1339:34:1339:46 | call to source | array_flow.rb:1339:9:1339:47 | call to [] [element 4] | provenance | | | array_flow.rb:1340:5:1340:5 | b [element 2] | array_flow.rb:1343:10:1343:10 | b [element 2] | provenance | | | array_flow.rb:1340:9:1340:9 | [post] a [element 1] | array_flow.rb:1345:10:1345:10 | a [element 1] | provenance | | | array_flow.rb:1340:9:1340:9 | a [element 2] | array_flow.rb:1340:9:1340:21 | call to slice! [element 2] | provenance | | @@ -1703,8 +1876,10 @@ edges | array_flow.rb:1345:10:1345:10 | a [element 1] | array_flow.rb:1345:10:1345:13 | ...[...] | provenance | | | array_flow.rb:1348:5:1348:5 | a [element 2] | array_flow.rb:1349:9:1349:9 | a [element 2] | provenance | | | array_flow.rb:1348:5:1348:5 | a [element 4] | array_flow.rb:1349:9:1349:9 | a [element 4] | provenance | | -| array_flow.rb:1348:16:1348:28 | call to source | array_flow.rb:1348:5:1348:5 | a [element 2] | provenance | | -| array_flow.rb:1348:34:1348:46 | call to source | array_flow.rb:1348:5:1348:5 | a [element 4] | provenance | | +| array_flow.rb:1348:9:1348:47 | call to [] [element 2] | array_flow.rb:1348:5:1348:5 | a [element 2] | provenance | | +| array_flow.rb:1348:9:1348:47 | call to [] [element 4] | array_flow.rb:1348:5:1348:5 | a [element 4] | provenance | | +| array_flow.rb:1348:16:1348:28 | call to source | array_flow.rb:1348:9:1348:47 | call to [] [element 2] | provenance | | +| array_flow.rb:1348:34:1348:46 | call to source | array_flow.rb:1348:9:1348:47 | call to [] [element 4] | provenance | | | array_flow.rb:1349:5:1349:5 | b [element] | array_flow.rb:1350:10:1350:10 | b [element] | provenance | | | array_flow.rb:1349:5:1349:5 | b [element] | array_flow.rb:1351:10:1351:10 | b [element] | provenance | | | array_flow.rb:1349:5:1349:5 | b [element] | array_flow.rb:1352:10:1352:10 | b [element] | provenance | | @@ -1723,22 +1898,26 @@ edges | array_flow.rb:1354:10:1354:10 | a [element] | array_flow.rb:1354:10:1354:13 | ...[...] | provenance | | | array_flow.rb:1355:10:1355:10 | a [element] | array_flow.rb:1355:10:1355:13 | ...[...] | provenance | | | array_flow.rb:1359:5:1359:5 | a [element 2] | array_flow.rb:1360:9:1360:9 | a [element 2] | provenance | | -| array_flow.rb:1359:16:1359:26 | call to source | array_flow.rb:1359:5:1359:5 | a [element 2] | provenance | | +| array_flow.rb:1359:9:1359:27 | call to [] [element 2] | array_flow.rb:1359:5:1359:5 | a [element 2] | provenance | | +| array_flow.rb:1359:16:1359:26 | call to source | array_flow.rb:1359:9:1359:27 | call to [] [element 2] | provenance | | | array_flow.rb:1360:9:1360:9 | a [element 2] | array_flow.rb:1360:27:1360:27 | x | provenance | | | array_flow.rb:1360:27:1360:27 | x | array_flow.rb:1361:14:1361:14 | x | provenance | | | array_flow.rb:1367:5:1367:5 | a [element 2] | array_flow.rb:1368:9:1368:9 | a [element 2] | provenance | | -| array_flow.rb:1367:16:1367:26 | call to source | array_flow.rb:1367:5:1367:5 | a [element 2] | provenance | | +| array_flow.rb:1367:9:1367:27 | call to [] [element 2] | array_flow.rb:1367:5:1367:5 | a [element 2] | provenance | | +| array_flow.rb:1367:16:1367:26 | call to source | array_flow.rb:1367:9:1367:27 | call to [] [element 2] | provenance | | | array_flow.rb:1368:9:1368:9 | a [element 2] | array_flow.rb:1368:28:1368:28 | x | provenance | | | array_flow.rb:1368:28:1368:28 | x | array_flow.rb:1369:14:1369:14 | x | provenance | | | array_flow.rb:1375:5:1375:5 | a [element 2] | array_flow.rb:1376:9:1376:9 | a [element 2] | provenance | | -| array_flow.rb:1375:16:1375:26 | call to source | array_flow.rb:1375:5:1375:5 | a [element 2] | provenance | | +| array_flow.rb:1375:9:1375:27 | call to [] [element 2] | array_flow.rb:1375:5:1375:5 | a [element 2] | provenance | | +| array_flow.rb:1375:16:1375:26 | call to source | array_flow.rb:1375:9:1375:27 | call to [] [element 2] | provenance | | | array_flow.rb:1376:9:1376:9 | a [element 2] | array_flow.rb:1376:26:1376:26 | x | provenance | | | array_flow.rb:1376:9:1376:9 | a [element 2] | array_flow.rb:1376:29:1376:29 | y | provenance | | | array_flow.rb:1376:26:1376:26 | x | array_flow.rb:1377:14:1377:14 | x | provenance | | | array_flow.rb:1376:29:1376:29 | y | array_flow.rb:1378:14:1378:14 | y | provenance | | | array_flow.rb:1383:5:1383:5 | a [element 2] | array_flow.rb:1384:9:1384:9 | a [element 2] | provenance | | | array_flow.rb:1383:5:1383:5 | a [element 2] | array_flow.rb:1387:9:1387:9 | a [element 2] | provenance | | -| array_flow.rb:1383:16:1383:26 | call to source | array_flow.rb:1383:5:1383:5 | a [element 2] | provenance | | +| array_flow.rb:1383:9:1383:27 | call to [] [element 2] | array_flow.rb:1383:5:1383:5 | a [element 2] | provenance | | +| array_flow.rb:1383:16:1383:26 | call to source | array_flow.rb:1383:9:1383:27 | call to [] [element 2] | provenance | | | array_flow.rb:1384:5:1384:5 | b [element] | array_flow.rb:1385:10:1385:10 | b [element] | provenance | | | array_flow.rb:1384:5:1384:5 | b [element] | array_flow.rb:1386:10:1386:10 | b [element] | provenance | | | array_flow.rb:1384:9:1384:9 | a [element 2] | array_flow.rb:1384:9:1384:14 | call to sort [element] | provenance | | @@ -1756,7 +1935,8 @@ edges | array_flow.rb:1392:10:1392:10 | c [element] | array_flow.rb:1392:10:1392:13 | ...[...] | provenance | | | array_flow.rb:1393:10:1393:10 | c [element] | array_flow.rb:1393:10:1393:13 | ...[...] | provenance | | | array_flow.rb:1397:5:1397:5 | a [element 2] | array_flow.rb:1398:9:1398:9 | a [element 2] | provenance | | -| array_flow.rb:1397:16:1397:26 | call to source | array_flow.rb:1397:5:1397:5 | a [element 2] | provenance | | +| array_flow.rb:1397:9:1397:27 | call to [] [element 2] | array_flow.rb:1397:5:1397:5 | a [element 2] | provenance | | +| array_flow.rb:1397:16:1397:26 | call to source | array_flow.rb:1397:9:1397:27 | call to [] [element 2] | provenance | | | array_flow.rb:1398:5:1398:5 | b [element] | array_flow.rb:1399:10:1399:10 | b [element] | provenance | | | array_flow.rb:1398:5:1398:5 | b [element] | array_flow.rb:1400:10:1400:10 | b [element] | provenance | | | array_flow.rb:1398:9:1398:9 | [post] a [element] | array_flow.rb:1401:10:1401:10 | a [element] | provenance | | @@ -1769,7 +1949,8 @@ edges | array_flow.rb:1401:10:1401:10 | a [element] | array_flow.rb:1401:10:1401:13 | ...[...] | provenance | | | array_flow.rb:1402:10:1402:10 | a [element] | array_flow.rb:1402:10:1402:13 | ...[...] | provenance | | | array_flow.rb:1404:5:1404:5 | a [element 2] | array_flow.rb:1405:9:1405:9 | a [element 2] | provenance | | -| array_flow.rb:1404:16:1404:26 | call to source | array_flow.rb:1404:5:1404:5 | a [element 2] | provenance | | +| array_flow.rb:1404:9:1404:27 | call to [] [element 2] | array_flow.rb:1404:5:1404:5 | a [element 2] | provenance | | +| array_flow.rb:1404:16:1404:26 | call to source | array_flow.rb:1404:9:1404:27 | call to [] [element 2] | provenance | | | array_flow.rb:1405:5:1405:5 | b [element] | array_flow.rb:1410:10:1410:10 | b [element] | provenance | | | array_flow.rb:1405:5:1405:5 | b [element] | array_flow.rb:1411:10:1411:10 | b [element] | provenance | | | array_flow.rb:1405:9:1405:9 | [post] a [element] | array_flow.rb:1412:10:1412:10 | a [element] | provenance | | @@ -1786,7 +1967,8 @@ edges | array_flow.rb:1412:10:1412:10 | a [element] | array_flow.rb:1412:10:1412:13 | ...[...] | provenance | | | array_flow.rb:1413:10:1413:10 | a [element] | array_flow.rb:1413:10:1413:13 | ...[...] | provenance | | | array_flow.rb:1417:5:1417:5 | a [element 2] | array_flow.rb:1418:9:1418:9 | a [element 2] | provenance | | -| array_flow.rb:1417:16:1417:26 | call to source | array_flow.rb:1417:5:1417:5 | a [element 2] | provenance | | +| array_flow.rb:1417:9:1417:27 | call to [] [element 2] | array_flow.rb:1417:5:1417:5 | a [element 2] | provenance | | +| array_flow.rb:1417:16:1417:26 | call to source | array_flow.rb:1417:9:1417:27 | call to [] [element 2] | provenance | | | array_flow.rb:1418:5:1418:5 | b [element] | array_flow.rb:1422:10:1422:10 | b [element] | provenance | | | array_flow.rb:1418:5:1418:5 | b [element] | array_flow.rb:1423:10:1423:10 | b [element] | provenance | | | array_flow.rb:1418:9:1418:9 | a [element 2] | array_flow.rb:1418:9:1421:7 | call to sort_by [element] | provenance | | @@ -1796,7 +1978,8 @@ edges | array_flow.rb:1422:10:1422:10 | b [element] | array_flow.rb:1422:10:1422:13 | ...[...] | provenance | | | array_flow.rb:1423:10:1423:10 | b [element] | array_flow.rb:1423:10:1423:13 | ...[...] | provenance | | | array_flow.rb:1427:5:1427:5 | a [element 2] | array_flow.rb:1428:9:1428:9 | a [element 2] | provenance | | -| array_flow.rb:1427:16:1427:26 | call to source | array_flow.rb:1427:5:1427:5 | a [element 2] | provenance | | +| array_flow.rb:1427:9:1427:27 | call to [] [element 2] | array_flow.rb:1427:5:1427:5 | a [element 2] | provenance | | +| array_flow.rb:1427:16:1427:26 | call to source | array_flow.rb:1427:9:1427:27 | call to [] [element 2] | provenance | | | array_flow.rb:1428:5:1428:5 | b [element] | array_flow.rb:1434:10:1434:10 | b [element] | provenance | | | array_flow.rb:1428:5:1428:5 | b [element] | array_flow.rb:1435:10:1435:10 | b [element] | provenance | | | array_flow.rb:1428:9:1428:9 | [post] a [element] | array_flow.rb:1432:10:1432:10 | a [element] | provenance | | @@ -1811,7 +1994,8 @@ edges | array_flow.rb:1434:10:1434:10 | b [element] | array_flow.rb:1434:10:1434:13 | ...[...] | provenance | | | array_flow.rb:1435:10:1435:10 | b [element] | array_flow.rb:1435:10:1435:13 | ...[...] | provenance | | | array_flow.rb:1439:5:1439:5 | a [element 2] | array_flow.rb:1440:9:1440:9 | a [element 2] | provenance | | -| array_flow.rb:1439:16:1439:26 | call to source | array_flow.rb:1439:5:1439:5 | a [element 2] | provenance | | +| array_flow.rb:1439:9:1439:27 | call to [] [element 2] | array_flow.rb:1439:5:1439:5 | a [element 2] | provenance | | +| array_flow.rb:1439:16:1439:26 | call to source | array_flow.rb:1439:9:1439:27 | call to [] [element 2] | provenance | | | array_flow.rb:1440:9:1440:9 | a [element 2] | array_flow.rb:1440:19:1440:19 | x | provenance | | | array_flow.rb:1440:19:1440:19 | x | array_flow.rb:1441:14:1441:14 | x | provenance | | | array_flow.rb:1447:5:1447:5 | a [element 2] | array_flow.rb:1448:9:1448:9 | a [element 2] | provenance | | @@ -1820,8 +2004,10 @@ edges | array_flow.rb:1447:5:1447:5 | a [element 2] | array_flow.rb:1466:9:1466:9 | a [element 2] | provenance | | | array_flow.rb:1447:5:1447:5 | a [element 3] | array_flow.rb:1448:9:1448:9 | a [element 3] | provenance | | | array_flow.rb:1447:5:1447:5 | a [element 3] | array_flow.rb:1459:9:1459:9 | a [element 3] | provenance | | -| array_flow.rb:1447:16:1447:28 | call to source | array_flow.rb:1447:5:1447:5 | a [element 2] | provenance | | -| array_flow.rb:1447:31:1447:43 | call to source | array_flow.rb:1447:5:1447:5 | a [element 3] | provenance | | +| array_flow.rb:1447:9:1447:44 | call to [] [element 2] | array_flow.rb:1447:5:1447:5 | a [element 2] | provenance | | +| array_flow.rb:1447:9:1447:44 | call to [] [element 3] | array_flow.rb:1447:5:1447:5 | a [element 3] | provenance | | +| array_flow.rb:1447:16:1447:28 | call to source | array_flow.rb:1447:9:1447:44 | call to [] [element 2] | provenance | | +| array_flow.rb:1447:31:1447:43 | call to source | array_flow.rb:1447:9:1447:44 | call to [] [element 3] | provenance | | | array_flow.rb:1448:5:1448:5 | b [element 2] | array_flow.rb:1451:10:1451:10 | b [element 2] | provenance | | | array_flow.rb:1448:5:1448:5 | b [element 3] | array_flow.rb:1452:10:1452:10 | b [element 3] | provenance | | | array_flow.rb:1448:9:1448:9 | a [element 2] | array_flow.rb:1448:9:1448:17 | call to take [element 2] | provenance | | @@ -1859,7 +2045,8 @@ edges | array_flow.rb:1467:10:1467:10 | b [element 2] | array_flow.rb:1467:10:1467:13 | ...[...] | provenance | | | array_flow.rb:1467:10:1467:10 | b [element] | array_flow.rb:1467:10:1467:13 | ...[...] | provenance | | | array_flow.rb:1471:5:1471:5 | a [element 2] | array_flow.rb:1472:9:1472:9 | a [element 2] | provenance | | -| array_flow.rb:1471:16:1471:26 | call to source | array_flow.rb:1471:5:1471:5 | a [element 2] | provenance | | +| array_flow.rb:1471:9:1471:27 | call to [] [element 2] | array_flow.rb:1471:5:1471:5 | a [element 2] | provenance | | +| array_flow.rb:1471:16:1471:26 | call to source | array_flow.rb:1471:9:1471:27 | call to [] [element 2] | provenance | | | array_flow.rb:1472:5:1472:5 | b [element 2] | array_flow.rb:1478:10:1478:10 | b [element 2] | provenance | | | array_flow.rb:1472:9:1472:9 | a [element 2] | array_flow.rb:1472:9:1475:7 | call to take_while [element 2] | provenance | | | array_flow.rb:1472:9:1472:9 | a [element 2] | array_flow.rb:1472:26:1472:26 | x | provenance | | @@ -1867,13 +2054,15 @@ edges | array_flow.rb:1472:26:1472:26 | x | array_flow.rb:1473:14:1473:14 | x | provenance | | | array_flow.rb:1478:10:1478:10 | b [element 2] | array_flow.rb:1478:10:1478:13 | ...[...] | provenance | | | array_flow.rb:1484:5:1484:5 | a [element 3] | array_flow.rb:1485:9:1485:9 | a [element 3] | provenance | | -| array_flow.rb:1484:19:1484:29 | call to source | array_flow.rb:1484:5:1484:5 | a [element 3] | provenance | | +| array_flow.rb:1484:9:1484:30 | call to [] [element 3] | array_flow.rb:1484:5:1484:5 | a [element 3] | provenance | | +| array_flow.rb:1484:19:1484:29 | call to source | array_flow.rb:1484:9:1484:30 | call to [] [element 3] | provenance | | | array_flow.rb:1485:5:1485:5 | b [element 3] | array_flow.rb:1486:10:1486:10 | b [element 3] | provenance | | | array_flow.rb:1485:9:1485:9 | a [element 3] | array_flow.rb:1485:9:1485:14 | call to to_a [element 3] | provenance | | | array_flow.rb:1485:9:1485:14 | call to to_a [element 3] | array_flow.rb:1485:5:1485:5 | b [element 3] | provenance | | | array_flow.rb:1486:10:1486:10 | b [element 3] | array_flow.rb:1486:10:1486:13 | ...[...] | provenance | | | array_flow.rb:1490:5:1490:5 | a [element 2] | array_flow.rb:1491:9:1491:9 | a [element 2] | provenance | | -| array_flow.rb:1490:16:1490:26 | call to source | array_flow.rb:1490:5:1490:5 | a [element 2] | provenance | | +| array_flow.rb:1490:9:1490:27 | call to [] [element 2] | array_flow.rb:1490:5:1490:5 | a [element 2] | provenance | | +| array_flow.rb:1490:16:1490:26 | call to source | array_flow.rb:1490:9:1490:27 | call to [] [element 2] | provenance | | | array_flow.rb:1491:5:1491:5 | b [element 2] | array_flow.rb:1494:10:1494:10 | b [element 2] | provenance | | | array_flow.rb:1491:9:1491:9 | a [element 2] | array_flow.rb:1491:9:1491:16 | call to to_ary [element 2] | provenance | | | array_flow.rb:1491:9:1491:16 | call to to_ary [element 2] | array_flow.rb:1491:5:1491:5 | b [element 2] | provenance | | @@ -1881,9 +2070,15 @@ edges | array_flow.rb:1507:5:1507:5 | a [element 0, element 1] | array_flow.rb:1508:9:1508:9 | a [element 0, element 1] | provenance | | | array_flow.rb:1507:5:1507:5 | a [element 1, element 1] | array_flow.rb:1508:9:1508:9 | a [element 1, element 1] | provenance | | | array_flow.rb:1507:5:1507:5 | a [element 2, element 1] | array_flow.rb:1508:9:1508:9 | a [element 2, element 1] | provenance | | -| array_flow.rb:1507:14:1507:26 | call to source | array_flow.rb:1507:5:1507:5 | a [element 0, element 1] | provenance | | -| array_flow.rb:1507:34:1507:46 | call to source | array_flow.rb:1507:5:1507:5 | a [element 1, element 1] | provenance | | -| array_flow.rb:1507:54:1507:66 | call to source | array_flow.rb:1507:5:1507:5 | a [element 2, element 1] | provenance | | +| array_flow.rb:1507:9:1507:68 | call to [] [element 0, element 1] | array_flow.rb:1507:5:1507:5 | a [element 0, element 1] | provenance | | +| array_flow.rb:1507:9:1507:68 | call to [] [element 1, element 1] | array_flow.rb:1507:5:1507:5 | a [element 1, element 1] | provenance | | +| array_flow.rb:1507:9:1507:68 | call to [] [element 2, element 1] | array_flow.rb:1507:5:1507:5 | a [element 2, element 1] | provenance | | +| array_flow.rb:1507:10:1507:27 | call to [] [element 1] | array_flow.rb:1507:9:1507:68 | call to [] [element 0, element 1] | provenance | | +| array_flow.rb:1507:14:1507:26 | call to source | array_flow.rb:1507:10:1507:27 | call to [] [element 1] | provenance | | +| array_flow.rb:1507:30:1507:47 | call to [] [element 1] | array_flow.rb:1507:9:1507:68 | call to [] [element 1, element 1] | provenance | | +| array_flow.rb:1507:34:1507:46 | call to source | array_flow.rb:1507:30:1507:47 | call to [] [element 1] | provenance | | +| array_flow.rb:1507:50:1507:67 | call to [] [element 1] | array_flow.rb:1507:9:1507:68 | call to [] [element 2, element 1] | provenance | | +| array_flow.rb:1507:54:1507:66 | call to source | array_flow.rb:1507:50:1507:67 | call to [] [element 1] | provenance | | | array_flow.rb:1508:5:1508:5 | b [element 1, element 0] | array_flow.rb:1512:10:1512:10 | b [element 1, element 0] | provenance | | | array_flow.rb:1508:5:1508:5 | b [element 1, element 1] | array_flow.rb:1513:10:1513:10 | b [element 1, element 1] | provenance | | | array_flow.rb:1508:5:1508:5 | b [element 1, element 2] | array_flow.rb:1514:10:1514:10 | b [element 1, element 2] | provenance | | @@ -1900,11 +2095,14 @@ edges | array_flow.rb:1514:10:1514:10 | b [element 1, element 2] | array_flow.rb:1514:10:1514:13 | ...[...] [element 2] | provenance | | | array_flow.rb:1514:10:1514:13 | ...[...] [element 2] | array_flow.rb:1514:10:1514:16 | ...[...] | provenance | | | array_flow.rb:1518:5:1518:5 | a [element 2] | array_flow.rb:1521:9:1521:9 | a [element 2] | provenance | | -| array_flow.rb:1518:16:1518:28 | call to source | array_flow.rb:1518:5:1518:5 | a [element 2] | provenance | | +| array_flow.rb:1518:9:1518:29 | call to [] [element 2] | array_flow.rb:1518:5:1518:5 | a [element 2] | provenance | | +| array_flow.rb:1518:16:1518:28 | call to source | array_flow.rb:1518:9:1518:29 | call to [] [element 2] | provenance | | | array_flow.rb:1519:5:1519:5 | b [element 1] | array_flow.rb:1521:17:1521:17 | b [element 1] | provenance | | -| array_flow.rb:1519:13:1519:25 | call to source | array_flow.rb:1519:5:1519:5 | b [element 1] | provenance | | +| array_flow.rb:1519:9:1519:26 | call to [] [element 1] | array_flow.rb:1519:5:1519:5 | b [element 1] | provenance | | +| array_flow.rb:1519:13:1519:25 | call to source | array_flow.rb:1519:9:1519:26 | call to [] [element 1] | provenance | | | array_flow.rb:1520:5:1520:5 | c [element 1] | array_flow.rb:1521:20:1521:20 | c [element 1] | provenance | | -| array_flow.rb:1520:13:1520:25 | call to source | array_flow.rb:1520:5:1520:5 | c [element 1] | provenance | | +| array_flow.rb:1520:9:1520:26 | call to [] [element 1] | array_flow.rb:1520:5:1520:5 | c [element 1] | provenance | | +| array_flow.rb:1520:13:1520:25 | call to source | array_flow.rb:1520:9:1520:26 | call to [] [element 1] | provenance | | | array_flow.rb:1521:5:1521:5 | d [element] | array_flow.rb:1522:10:1522:10 | d [element] | provenance | | | array_flow.rb:1521:5:1521:5 | d [element] | array_flow.rb:1523:10:1523:10 | d [element] | provenance | | | array_flow.rb:1521:5:1521:5 | d [element] | array_flow.rb:1524:10:1524:10 | d [element] | provenance | | @@ -1919,8 +2117,10 @@ edges | array_flow.rb:1528:5:1528:5 | a [element 3] | array_flow.rb:1534:9:1534:9 | a [element 3] | provenance | | | array_flow.rb:1528:5:1528:5 | a [element 4] | array_flow.rb:1530:9:1530:9 | a [element 4] | provenance | | | array_flow.rb:1528:5:1528:5 | a [element 4] | array_flow.rb:1534:9:1534:9 | a [element 4] | provenance | | -| array_flow.rb:1528:19:1528:31 | call to source | array_flow.rb:1528:5:1528:5 | a [element 3] | provenance | | -| array_flow.rb:1528:34:1528:46 | call to source | array_flow.rb:1528:5:1528:5 | a [element 4] | provenance | | +| array_flow.rb:1528:9:1528:47 | call to [] [element 3] | array_flow.rb:1528:5:1528:5 | a [element 3] | provenance | | +| array_flow.rb:1528:9:1528:47 | call to [] [element 4] | array_flow.rb:1528:5:1528:5 | a [element 4] | provenance | | +| array_flow.rb:1528:19:1528:31 | call to source | array_flow.rb:1528:9:1528:47 | call to [] [element 3] | provenance | | +| array_flow.rb:1528:34:1528:46 | call to source | array_flow.rb:1528:9:1528:47 | call to [] [element 4] | provenance | | | array_flow.rb:1530:5:1530:5 | b [element] | array_flow.rb:1531:10:1531:10 | b [element] | provenance | | | array_flow.rb:1530:5:1530:5 | b [element] | array_flow.rb:1532:10:1532:10 | b [element] | provenance | | | array_flow.rb:1530:9:1530:9 | a [element 3] | array_flow.rb:1530:9:1530:14 | call to uniq [element] | provenance | | @@ -1938,8 +2138,10 @@ edges | array_flow.rb:1538:10:1538:10 | c [element] | array_flow.rb:1538:10:1538:13 | ...[...] | provenance | | | array_flow.rb:1542:5:1542:5 | a [element 2] | array_flow.rb:1543:9:1543:9 | a [element 2] | provenance | | | array_flow.rb:1542:5:1542:5 | a [element 3] | array_flow.rb:1543:9:1543:9 | a [element 3] | provenance | | -| array_flow.rb:1542:16:1542:28 | call to source | array_flow.rb:1542:5:1542:5 | a [element 2] | provenance | | -| array_flow.rb:1542:31:1542:43 | call to source | array_flow.rb:1542:5:1542:5 | a [element 3] | provenance | | +| array_flow.rb:1542:9:1542:44 | call to [] [element 2] | array_flow.rb:1542:5:1542:5 | a [element 2] | provenance | | +| array_flow.rb:1542:9:1542:44 | call to [] [element 3] | array_flow.rb:1542:5:1542:5 | a [element 3] | provenance | | +| array_flow.rb:1542:16:1542:28 | call to source | array_flow.rb:1542:9:1542:44 | call to [] [element 2] | provenance | | +| array_flow.rb:1542:31:1542:43 | call to source | array_flow.rb:1542:9:1542:44 | call to [] [element 3] | provenance | | | array_flow.rb:1543:5:1543:5 | b [element] | array_flow.rb:1544:10:1544:10 | b [element] | provenance | | | array_flow.rb:1543:5:1543:5 | b [element] | array_flow.rb:1545:10:1545:10 | b [element] | provenance | | | array_flow.rb:1543:9:1543:9 | [post] a [element] | array_flow.rb:1546:10:1546:10 | a [element] | provenance | | @@ -1955,8 +2157,10 @@ edges | array_flow.rb:1547:10:1547:10 | a [element] | array_flow.rb:1547:10:1547:13 | ...[...] | provenance | | | array_flow.rb:1549:5:1549:5 | a [element 2] | array_flow.rb:1550:9:1550:9 | a [element 2] | provenance | | | array_flow.rb:1549:5:1549:5 | a [element 3] | array_flow.rb:1550:9:1550:9 | a [element 3] | provenance | | -| array_flow.rb:1549:16:1549:28 | call to source | array_flow.rb:1549:5:1549:5 | a [element 2] | provenance | | -| array_flow.rb:1549:31:1549:43 | call to source | array_flow.rb:1549:5:1549:5 | a [element 3] | provenance | | +| array_flow.rb:1549:9:1549:44 | call to [] [element 2] | array_flow.rb:1549:5:1549:5 | a [element 2] | provenance | | +| array_flow.rb:1549:9:1549:44 | call to [] [element 3] | array_flow.rb:1549:5:1549:5 | a [element 3] | provenance | | +| array_flow.rb:1549:16:1549:28 | call to source | array_flow.rb:1549:9:1549:44 | call to [] [element 2] | provenance | | +| array_flow.rb:1549:31:1549:43 | call to source | array_flow.rb:1549:9:1549:44 | call to [] [element 3] | provenance | | | array_flow.rb:1550:5:1550:5 | b [element] | array_flow.rb:1554:10:1554:10 | b [element] | provenance | | | array_flow.rb:1550:5:1550:5 | b [element] | array_flow.rb:1555:10:1555:10 | b [element] | provenance | | | array_flow.rb:1550:9:1550:9 | [post] a [element] | array_flow.rb:1556:10:1556:10 | a [element] | provenance | | @@ -1974,7 +2178,8 @@ edges | array_flow.rb:1556:10:1556:10 | a [element] | array_flow.rb:1556:10:1556:13 | ...[...] | provenance | | | array_flow.rb:1557:10:1557:10 | a [element] | array_flow.rb:1557:10:1557:13 | ...[...] | provenance | | | array_flow.rb:1561:5:1561:5 | a [element 2] | array_flow.rb:1562:5:1562:5 | a [element 2] | provenance | | -| array_flow.rb:1561:16:1561:28 | call to source | array_flow.rb:1561:5:1561:5 | a [element 2] | provenance | | +| array_flow.rb:1561:9:1561:29 | call to [] [element 2] | array_flow.rb:1561:5:1561:5 | a [element 2] | provenance | | +| array_flow.rb:1561:16:1561:28 | call to source | array_flow.rb:1561:9:1561:29 | call to [] [element 2] | provenance | | | array_flow.rb:1562:5:1562:5 | [post] a [element 2] | array_flow.rb:1565:10:1565:10 | a [element 2] | provenance | | | array_flow.rb:1562:5:1562:5 | [post] a [element 5] | array_flow.rb:1568:10:1568:10 | a [element 5] | provenance | | | array_flow.rb:1562:5:1562:5 | a [element 2] | array_flow.rb:1562:5:1562:5 | [post] a [element 5] | provenance | | @@ -1988,8 +2193,10 @@ edges | array_flow.rb:1572:5:1572:5 | a [element 3] | array_flow.rb:1580:9:1580:9 | a [element 3] | provenance | | | array_flow.rb:1572:5:1572:5 | a [element 3] | array_flow.rb:1584:9:1584:9 | a [element 3] | provenance | | | array_flow.rb:1572:5:1572:5 | a [element 3] | array_flow.rb:1588:9:1588:9 | a [element 3] | provenance | | -| array_flow.rb:1572:13:1572:25 | call to source | array_flow.rb:1572:5:1572:5 | a [element 1] | provenance | | -| array_flow.rb:1572:31:1572:43 | call to source | array_flow.rb:1572:5:1572:5 | a [element 3] | provenance | | +| array_flow.rb:1572:9:1572:44 | call to [] [element 1] | array_flow.rb:1572:5:1572:5 | a [element 1] | provenance | | +| array_flow.rb:1572:9:1572:44 | call to [] [element 3] | array_flow.rb:1572:5:1572:5 | a [element 3] | provenance | | +| array_flow.rb:1572:13:1572:25 | call to source | array_flow.rb:1572:9:1572:44 | call to [] [element 1] | provenance | | +| array_flow.rb:1572:31:1572:43 | call to source | array_flow.rb:1572:9:1572:44 | call to [] [element 3] | provenance | | | array_flow.rb:1574:5:1574:5 | b [element 1] | array_flow.rb:1576:10:1576:10 | b [element 1] | provenance | | | array_flow.rb:1574:5:1574:5 | b [element 3] | array_flow.rb:1578:10:1578:10 | b [element 3] | provenance | | | array_flow.rb:1574:9:1574:9 | a [element 1] | array_flow.rb:1574:9:1574:31 | call to values_at [element 1] | provenance | | @@ -2029,13 +2236,16 @@ edges | array_flow.rb:1592:10:1592:10 | b [element] | array_flow.rb:1592:10:1592:13 | ...[...] | provenance | | | array_flow.rb:1596:5:1596:5 | a [element 2] | array_flow.rb:1599:9:1599:9 | a [element 2] | provenance | | | array_flow.rb:1596:5:1596:5 | a [element 2] | array_flow.rb:1604:5:1604:5 | a [element 2] | provenance | | -| array_flow.rb:1596:16:1596:28 | call to source | array_flow.rb:1596:5:1596:5 | a [element 2] | provenance | | +| array_flow.rb:1596:9:1596:29 | call to [] [element 2] | array_flow.rb:1596:5:1596:5 | a [element 2] | provenance | | +| array_flow.rb:1596:16:1596:28 | call to source | array_flow.rb:1596:9:1596:29 | call to [] [element 2] | provenance | | | array_flow.rb:1597:5:1597:5 | b [element 1] | array_flow.rb:1599:15:1599:15 | b [element 1] | provenance | | | array_flow.rb:1597:5:1597:5 | b [element 1] | array_flow.rb:1604:11:1604:11 | b [element 1] | provenance | | -| array_flow.rb:1597:13:1597:25 | call to source | array_flow.rb:1597:5:1597:5 | b [element 1] | provenance | | +| array_flow.rb:1597:9:1597:29 | call to [] [element 1] | array_flow.rb:1597:5:1597:5 | b [element 1] | provenance | | +| array_flow.rb:1597:13:1597:25 | call to source | array_flow.rb:1597:9:1597:29 | call to [] [element 1] | provenance | | | array_flow.rb:1598:5:1598:5 | c [element 0] | array_flow.rb:1599:18:1599:18 | c [element 0] | provenance | | | array_flow.rb:1598:5:1598:5 | c [element 0] | array_flow.rb:1604:14:1604:14 | c [element 0] | provenance | | -| array_flow.rb:1598:10:1598:22 | call to source | array_flow.rb:1598:5:1598:5 | c [element 0] | provenance | | +| array_flow.rb:1598:9:1598:29 | call to [] [element 0] | array_flow.rb:1598:5:1598:5 | c [element 0] | provenance | | +| array_flow.rb:1598:10:1598:22 | call to source | array_flow.rb:1598:9:1598:29 | call to [] [element 0] | provenance | | | array_flow.rb:1599:5:1599:5 | d [element 0, element 2] | array_flow.rb:1601:10:1601:10 | d [element 0, element 2] | provenance | | | array_flow.rb:1599:5:1599:5 | d [element 1, element 1] | array_flow.rb:1602:10:1602:10 | d [element 1, element 1] | provenance | | | array_flow.rb:1599:5:1599:5 | d [element 2, element 0] | array_flow.rb:1603:10:1603:10 | d [element 2, element 0] | provenance | | @@ -2061,9 +2271,11 @@ edges | array_flow.rb:1606:14:1606:14 | x [element 1] | array_flow.rb:1606:14:1606:17 | ...[...] | provenance | | | array_flow.rb:1607:14:1607:14 | x [element 2] | array_flow.rb:1607:14:1607:17 | ...[...] | provenance | | | array_flow.rb:1612:5:1612:5 | a [element 2] | array_flow.rb:1614:9:1614:9 | a [element 2] | provenance | | -| array_flow.rb:1612:16:1612:28 | call to source | array_flow.rb:1612:5:1612:5 | a [element 2] | provenance | | +| array_flow.rb:1612:9:1612:29 | call to [] [element 2] | array_flow.rb:1612:5:1612:5 | a [element 2] | provenance | | +| array_flow.rb:1612:16:1612:28 | call to source | array_flow.rb:1612:9:1612:29 | call to [] [element 2] | provenance | | | array_flow.rb:1613:5:1613:5 | b [element 1] | array_flow.rb:1614:13:1614:13 | b [element 1] | provenance | | -| array_flow.rb:1613:13:1613:25 | call to source | array_flow.rb:1613:5:1613:5 | b [element 1] | provenance | | +| array_flow.rb:1613:9:1613:26 | call to [] [element 1] | array_flow.rb:1613:5:1613:5 | b [element 1] | provenance | | +| array_flow.rb:1613:13:1613:25 | call to source | array_flow.rb:1613:9:1613:26 | call to [] [element 1] | provenance | | | array_flow.rb:1614:5:1614:5 | c [element] | array_flow.rb:1615:10:1615:10 | c [element] | provenance | | | array_flow.rb:1614:5:1614:5 | c [element] | array_flow.rb:1616:10:1616:10 | c [element] | provenance | | | array_flow.rb:1614:5:1614:5 | c [element] | array_flow.rb:1617:10:1617:10 | c [element] | provenance | | @@ -2120,6 +2332,23 @@ edges | array_flow.rb:1668:25:1668:37 | call to source | array_flow.rb:1668:14:1668:41 | ...[...] [element 1] | provenance | | | array_flow.rb:1670:14:1670:15 | a2 [element 1] | array_flow.rb:1670:14:1670:18 | ...[...] | provenance | | | array_flow.rb:1672:14:1672:15 | a2 [element 1] | array_flow.rb:1672:14:1672:18 | ...[...] | provenance | | +| array_flow.rb:1677:5:1677:5 | a [element 2] | array_flow.rb:1678:9:1678:9 | a [element 2] | provenance | | +| array_flow.rb:1677:9:1677:29 | call to [] [element 2] | array_flow.rb:1677:5:1677:5 | a [element 2] | provenance | | +| array_flow.rb:1677:16:1677:28 | call to source | array_flow.rb:1677:9:1677:29 | call to [] [element 2] | provenance | | +| array_flow.rb:1678:5:1678:5 | b [element] | array_flow.rb:1681:10:1681:10 | b [element] | provenance | | +| array_flow.rb:1678:9:1678:9 | a [element 2] | array_flow.rb:1678:9:1680:7 | call to map [element] | provenance | | +| array_flow.rb:1678:9:1680:7 | call to map [element] | array_flow.rb:1678:5:1678:5 | b [element] | provenance | | +| array_flow.rb:1681:10:1681:10 | b [element] | array_flow.rb:1681:10:1681:13 | ...[...] | provenance | | +| array_flow.rb:1685:5:1685:5 | a [element 2] | array_flow.rb:1686:18:1686:18 | a [element 2] | provenance | | +| array_flow.rb:1685:5:1685:5 | a [element 3] | array_flow.rb:1686:18:1686:18 | a [element 3] | provenance | | +| array_flow.rb:1685:9:1685:44 | call to [] [element 2] | array_flow.rb:1685:5:1685:5 | a [element 2] | provenance | | +| array_flow.rb:1685:9:1685:44 | call to [] [element 3] | array_flow.rb:1685:5:1685:5 | a [element 3] | provenance | | +| array_flow.rb:1685:16:1685:28 | call to source | array_flow.rb:1685:9:1685:44 | call to [] [element 2] | provenance | | +| array_flow.rb:1685:31:1685:43 | call to source | array_flow.rb:1685:9:1685:44 | call to [] [element 3] | provenance | | +| array_flow.rb:1686:11:1686:11 | z | array_flow.rb:1689:10:1689:10 | z | provenance | | +| array_flow.rb:1686:14:1686:14 | w | array_flow.rb:1690:10:1690:10 | w | provenance | | +| array_flow.rb:1686:18:1686:18 | a [element 2] | array_flow.rb:1686:11:1686:11 | z | provenance | | +| array_flow.rb:1686:18:1686:18 | a [element 3] | array_flow.rb:1686:14:1686:14 | w | provenance | | nodes | array_flow.rb:2:5:2:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:2:9:2:20 | * ... [element 0] | semmle.label | * ... [element 0] | @@ -2129,6 +2358,7 @@ nodes | array_flow.rb:5:10:5:10 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:5:10:5:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:9:5:9:5 | a [element 1] | semmle.label | a [element 1] | +| array_flow.rb:9:9:9:25 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:9:13:9:21 | call to source | semmle.label | call to source | | array_flow.rb:11:10:11:10 | a [element 1] | semmle.label | a [element 1] | | array_flow.rb:11:10:11:13 | ...[...] | semmle.label | ...[...] | @@ -2156,6 +2386,7 @@ nodes | array_flow.rb:29:10:29:10 | c [element] | semmle.label | c [element] | | array_flow.rb:29:10:29:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:33:5:33:5 | a [element 0] | semmle.label | a [element 0] | +| array_flow.rb:33:9:33:22 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:33:10:33:18 | call to source | semmle.label | call to source | | array_flow.rb:34:5:34:5 | b [element 0] | semmle.label | b [element 0] | | array_flow.rb:34:9:34:28 | call to try_convert [element 0] | semmle.label | call to try_convert [element 0] | @@ -2163,8 +2394,10 @@ nodes | array_flow.rb:35:10:35:10 | b [element 0] | semmle.label | b [element 0] | | array_flow.rb:35:10:35:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:40:5:40:5 | a [element 0] | semmle.label | a [element 0] | +| array_flow.rb:40:9:40:24 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:40:10:40:20 | call to source | semmle.label | call to source | | array_flow.rb:41:5:41:5 | b [element 2] | semmle.label | b [element 2] | +| array_flow.rb:41:9:41:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:41:16:41:26 | call to source | semmle.label | call to source | | array_flow.rb:42:5:42:5 | c [element] | semmle.label | c [element] | | array_flow.rb:42:9:42:9 | a [element 0] | semmle.label | a [element 0] | @@ -2175,6 +2408,7 @@ nodes | array_flow.rb:44:10:44:10 | c [element] | semmle.label | c [element] | | array_flow.rb:44:10:44:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:48:5:48:5 | a [element 0] | semmle.label | a [element 0] | +| array_flow.rb:48:9:48:22 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:48:10:48:18 | call to source | semmle.label | call to source | | array_flow.rb:49:5:49:5 | b [element] | semmle.label | b [element] | | array_flow.rb:49:9:49:9 | a [element 0] | semmle.label | a [element 0] | @@ -2184,8 +2418,10 @@ nodes | array_flow.rb:51:10:51:10 | b [element] | semmle.label | b [element] | | array_flow.rb:51:10:51:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:55:5:55:5 | a [element 0] | semmle.label | a [element 0] | +| array_flow.rb:55:9:55:24 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:55:10:55:20 | call to source | semmle.label | call to source | | array_flow.rb:56:5:56:5 | b [element 1] | semmle.label | b [element 1] | +| array_flow.rb:56:9:56:24 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:56:13:56:23 | call to source | semmle.label | call to source | | array_flow.rb:57:5:57:5 | c [element 0] | semmle.label | c [element 0] | | array_flow.rb:57:5:57:5 | c [element] | semmle.label | c [element] | @@ -2199,6 +2435,7 @@ nodes | array_flow.rb:59:10:59:10 | c [element] | semmle.label | c [element] | | array_flow.rb:59:10:59:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:63:5:63:5 | a [element 0] | semmle.label | a [element 0] | +| array_flow.rb:63:9:63:24 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:63:10:63:20 | call to source | semmle.label | call to source | | array_flow.rb:65:5:65:5 | c [element] | semmle.label | c [element] | | array_flow.rb:65:9:65:9 | a [element 0] | semmle.label | a [element 0] | @@ -2208,6 +2445,7 @@ nodes | array_flow.rb:67:10:67:10 | c [element] | semmle.label | c [element] | | array_flow.rb:67:10:67:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:71:5:71:5 | a [element 0] | semmle.label | a [element 0] | +| array_flow.rb:71:9:71:24 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:71:10:71:20 | call to source | semmle.label | call to source | | array_flow.rb:72:5:72:5 | b [element 0] | semmle.label | b [element 0] | | array_flow.rb:72:5:72:5 | b [element] | semmle.label | b [element] | @@ -2227,11 +2465,13 @@ nodes | array_flow.rb:76:10:76:10 | b [element] | semmle.label | b [element] | | array_flow.rb:76:10:76:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:80:5:80:5 | a [element 1] | semmle.label | a [element 1] | +| array_flow.rb:80:9:80:25 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:80:13:80:21 | call to source | semmle.label | call to source | | array_flow.rb:81:8:81:8 | c | semmle.label | c | | array_flow.rb:81:15:81:15 | a [element 1] | semmle.label | a [element 1] | | array_flow.rb:83:10:83:10 | c | semmle.label | c | | array_flow.rb:88:5:88:5 | a [element 1] | semmle.label | a [element 1] | +| array_flow.rb:88:9:88:26 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:88:13:88:22 | call to source | semmle.label | call to source | | array_flow.rb:89:5:89:5 | b [element 1] | semmle.label | b [element 1] | | array_flow.rb:89:9:89:9 | a [element 1] | semmle.label | a [element 1] | @@ -2241,6 +2481,7 @@ nodes | array_flow.rb:92:10:92:10 | b [element 1] | semmle.label | b [element 1] | | array_flow.rb:92:10:92:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:96:5:96:5 | a [element 1] | semmle.label | a [element 1] | +| array_flow.rb:96:9:96:26 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:96:13:96:22 | call to source | semmle.label | call to source | | array_flow.rb:97:5:97:5 | b [element 1] | semmle.label | b [element 1] | | array_flow.rb:97:9:97:9 | a [element 1] | semmle.label | a [element 1] | @@ -2250,6 +2491,7 @@ nodes | array_flow.rb:101:10:101:10 | b [element 1] | semmle.label | b [element 1] | | array_flow.rb:101:10:101:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:103:5:103:5 | a [element 1] | semmle.label | a [element 1] | +| array_flow.rb:103:9:103:39 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:103:13:103:24 | call to source | semmle.label | call to source | | array_flow.rb:104:5:104:5 | b [element 1] | semmle.label | b [element 1] | | array_flow.rb:104:9:104:9 | a [element 1] | semmle.label | a [element 1] | @@ -2258,6 +2500,8 @@ nodes | array_flow.rb:106:10:106:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:109:5:109:5 | a [element 1] | semmle.label | a [element 1] | | array_flow.rb:109:5:109:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:109:9:109:42 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| array_flow.rb:109:9:109:42 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:109:13:109:24 | call to source | semmle.label | call to source | | array_flow.rb:109:30:109:41 | call to source | semmle.label | call to source | | array_flow.rb:110:5:110:5 | b [element] | semmle.label | b [element] | @@ -2285,6 +2529,7 @@ nodes | array_flow.rb:124:10:124:10 | a [element] | semmle.label | a [element] | | array_flow.rb:124:10:124:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:129:5:129:5 | [post] a [element] | semmle.label | [post] a [element] | +| array_flow.rb:129:15:129:32 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:129:19:129:28 | call to source | semmle.label | call to source | | array_flow.rb:130:10:130:10 | a [element] | semmle.label | a [element] | | array_flow.rb:130:10:130:13 | ...[...] | semmle.label | ...[...] | @@ -2301,6 +2546,7 @@ nodes | array_flow.rb:140:10:140:10 | a [element] | semmle.label | a [element] | | array_flow.rb:140:10:140:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:145:5:145:5 | [post] a [element] | semmle.label | [post] a [element] | +| array_flow.rb:145:15:145:32 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:145:19:145:28 | call to source | semmle.label | call to source | | array_flow.rb:146:10:146:10 | a [element] | semmle.label | a [element] | | array_flow.rb:146:10:146:13 | ...[...] | semmle.label | ...[...] | @@ -2309,16 +2555,19 @@ nodes | array_flow.rb:148:10:148:10 | a [element] | semmle.label | a [element] | | array_flow.rb:148:10:148:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:152:5:152:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:152:9:152:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:152:16:152:25 | call to source | semmle.label | call to source | | array_flow.rb:153:5:153:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:153:16:153:16 | x | semmle.label | x | | array_flow.rb:154:14:154:14 | x | semmle.label | x | | array_flow.rb:159:5:159:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:159:9:159:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:159:16:159:25 | call to source | semmle.label | call to source | | array_flow.rb:160:5:160:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:160:16:160:16 | x | semmle.label | x | | array_flow.rb:161:14:161:14 | x | semmle.label | x | | array_flow.rb:166:5:166:5 | a [element 0] | semmle.label | a [element 0] | +| array_flow.rb:166:9:166:25 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:166:10:166:21 | call to source | semmle.label | call to source | | array_flow.rb:167:5:167:5 | b [element 0] | semmle.label | b [element 0] | | array_flow.rb:167:5:167:5 | b [element] | semmle.label | b [element] | @@ -2339,8 +2588,10 @@ nodes | array_flow.rb:171:10:171:10 | b [element] | semmle.label | b [element] | | array_flow.rb:171:10:171:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:177:5:177:5 | c [element 1] | semmle.label | c [element 1] | +| array_flow.rb:177:9:177:25 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:177:15:177:24 | call to source | semmle.label | call to source | | array_flow.rb:178:5:178:5 | d [element 2, element 1] | semmle.label | d [element 2, element 1] | +| array_flow.rb:178:9:178:17 | call to [] [element 2, element 1] | semmle.label | call to [] [element 2, element 1] | | array_flow.rb:178:16:178:16 | c [element 1] | semmle.label | c [element 1] | | array_flow.rb:179:10:179:26 | ( ... ) | semmle.label | ( ... ) | | array_flow.rb:179:11:179:11 | d [element 2, element 1] | semmle.label | d [element 2, element 1] | @@ -2351,12 +2602,14 @@ nodes | array_flow.rb:180:11:180:22 | call to assoc [element 1] | semmle.label | call to assoc [element 1] | | array_flow.rb:180:11:180:25 | ...[...] | semmle.label | ...[...] | | array_flow.rb:184:5:184:5 | a [element 1] | semmle.label | a [element 1] | +| array_flow.rb:184:9:184:26 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:184:13:184:22 | call to source | semmle.label | call to source | | array_flow.rb:186:10:186:10 | a [element 1] | semmle.label | a [element 1] | | array_flow.rb:186:10:186:16 | call to at | semmle.label | call to at | | array_flow.rb:188:10:188:10 | a [element 1] | semmle.label | a [element 1] | | array_flow.rb:188:10:188:16 | call to at | semmle.label | call to at | | array_flow.rb:192:5:192:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:192:9:192:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:192:16:192:25 | call to source | semmle.label | call to source | | array_flow.rb:193:5:193:5 | b | semmle.label | b | | array_flow.rb:193:9:193:9 | a [element 2] | semmle.label | a [element 2] | @@ -2365,17 +2618,21 @@ nodes | array_flow.rb:194:14:194:14 | x | semmle.label | x | | array_flow.rb:196:10:196:10 | b | semmle.label | b | | array_flow.rb:200:5:200:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:200:9:200:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:200:16:200:25 | call to source | semmle.label | call to source | | array_flow.rb:201:9:201:9 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:201:29:201:29 | x | semmle.label | x | | array_flow.rb:202:14:202:14 | x | semmle.label | x | | array_flow.rb:208:5:208:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:208:9:208:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:208:16:208:25 | call to source | semmle.label | call to source | | array_flow.rb:209:5:209:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:209:17:209:17 | x | semmle.label | x | | array_flow.rb:210:14:210:14 | x | semmle.label | x | | array_flow.rb:215:5:215:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:215:5:215:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:215:9:215:42 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:215:9:215:42 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:215:16:215:27 | call to source | semmle.label | call to source | | array_flow.rb:215:30:215:41 | call to source | semmle.label | call to source | | array_flow.rb:216:9:216:9 | a [element 2] | semmle.label | a [element 2] | @@ -2385,6 +2642,7 @@ nodes | array_flow.rb:217:14:217:14 | x | semmle.label | x | | array_flow.rb:218:14:218:14 | y | semmle.label | y | | array_flow.rb:231:5:231:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:231:9:231:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:231:16:231:27 | call to source | semmle.label | call to source | | array_flow.rb:232:5:232:5 | b [element] | semmle.label | b [element] | | array_flow.rb:232:9:232:9 | a [element 2] | semmle.label | a [element 2] | @@ -2395,6 +2653,7 @@ nodes | array_flow.rb:236:10:236:10 | b [element] | semmle.label | b [element] | | array_flow.rb:236:10:236:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:240:5:240:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:240:9:240:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:240:16:240:27 | call to source | semmle.label | call to source | | array_flow.rb:241:5:241:5 | b [element] | semmle.label | b [element] | | array_flow.rb:241:9:241:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -2408,12 +2667,14 @@ nodes | array_flow.rb:246:10:246:10 | b [element] | semmle.label | b [element] | | array_flow.rb:246:10:246:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:250:5:250:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:250:9:250:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:250:16:250:27 | call to source | semmle.label | call to source | | array_flow.rb:251:5:251:5 | b [element] | semmle.label | b [element] | | array_flow.rb:251:9:251:9 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:251:9:254:7 | call to collect_concat [element] | semmle.label | call to collect_concat [element] | | array_flow.rb:251:30:251:30 | x | semmle.label | x | | array_flow.rb:252:14:252:14 | x | semmle.label | x | +| array_flow.rb:253:9:253:25 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:253:13:253:24 | call to source | semmle.label | call to source | | array_flow.rb:255:10:255:10 | b [element] | semmle.label | b [element] | | array_flow.rb:255:10:255:13 | ...[...] | semmle.label | ...[...] | @@ -2426,6 +2687,7 @@ nodes | array_flow.rb:260:10:260:10 | b [element] | semmle.label | b [element] | | array_flow.rb:260:10:260:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:264:5:264:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:264:9:264:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:264:16:264:25 | call to source | semmle.label | call to source | | array_flow.rb:265:5:265:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:265:9:265:9 | a [element 2] | semmle.label | a [element 2] | @@ -2436,6 +2698,7 @@ nodes | array_flow.rb:269:10:269:10 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:269:10:269:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:273:5:273:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:273:9:273:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:273:16:273:25 | call to source | semmle.label | call to source | | array_flow.rb:274:5:274:5 | b [element] | semmle.label | b [element] | | array_flow.rb:274:9:274:9 | a [element 2] | semmle.label | a [element 2] | @@ -2443,6 +2706,7 @@ nodes | array_flow.rb:275:10:275:10 | b [element] | semmle.label | b [element] | | array_flow.rb:275:10:275:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:279:5:279:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:279:9:279:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:279:16:279:25 | call to source | semmle.label | call to source | | array_flow.rb:280:5:280:5 | b [element] | semmle.label | b [element] | | array_flow.rb:280:9:280:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -2453,8 +2717,10 @@ nodes | array_flow.rb:282:10:282:10 | b [element] | semmle.label | b [element] | | array_flow.rb:282:10:282:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:286:5:286:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:286:9:286:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:286:16:286:27 | call to source | semmle.label | call to source | | array_flow.rb:287:5:287:5 | b [element 2] | semmle.label | b [element 2] | +| array_flow.rb:287:9:287:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:287:16:287:27 | call to source | semmle.label | call to source | | array_flow.rb:288:5:288:5 | [post] a [element] | semmle.label | [post] a [element] | | array_flow.rb:288:14:288:14 | b [element 2] | semmle.label | b [element 2] | @@ -2464,16 +2730,19 @@ nodes | array_flow.rb:290:10:290:10 | a [element] | semmle.label | a [element] | | array_flow.rb:290:10:290:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:294:5:294:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:294:9:294:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:294:16:294:25 | call to source | semmle.label | call to source | | array_flow.rb:295:5:295:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:295:17:295:17 | x | semmle.label | x | | array_flow.rb:296:14:296:14 | x | semmle.label | x | | array_flow.rb:301:5:301:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:301:9:301:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:301:16:301:25 | call to source | semmle.label | call to source | | array_flow.rb:302:5:302:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:302:20:302:20 | x | semmle.label | x | | array_flow.rb:303:14:303:14 | x | semmle.label | x | | array_flow.rb:308:5:308:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:308:9:308:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:308:16:308:25 | call to source | semmle.label | call to source | | array_flow.rb:309:5:309:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:309:9:309:9 | a [element 2] | semmle.label | a [element 2] | @@ -2481,6 +2750,7 @@ nodes | array_flow.rb:312:10:312:10 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:312:10:312:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:316:5:316:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:316:9:316:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:316:16:316:27 | call to source | semmle.label | call to source | | array_flow.rb:317:5:317:5 | b | semmle.label | b | | array_flow.rb:317:9:317:9 | a [element 2] | semmle.label | a [element 2] | @@ -2489,6 +2759,8 @@ nodes | array_flow.rb:318:10:318:10 | b | semmle.label | b | | array_flow.rb:325:5:325:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:325:5:325:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:325:9:325:42 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:325:9:325:42 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:325:16:325:27 | call to source | semmle.label | call to source | | array_flow.rb:325:30:325:41 | call to source | semmle.label | call to source | | array_flow.rb:326:5:326:5 | b | semmle.label | b | @@ -2501,6 +2773,8 @@ nodes | array_flow.rb:328:10:328:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:330:5:330:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:330:5:330:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:330:9:330:42 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:330:9:330:42 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:330:16:330:27 | call to source | semmle.label | call to source | | array_flow.rb:330:30:330:41 | call to source | semmle.label | call to source | | array_flow.rb:331:5:331:5 | b | semmle.label | b | @@ -2514,6 +2788,7 @@ nodes | array_flow.rb:334:10:334:10 | a [element] | semmle.label | a [element] | | array_flow.rb:334:10:334:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:338:5:338:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:338:9:338:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:338:16:338:25 | call to source | semmle.label | call to source | | array_flow.rb:339:5:339:5 | b [element] | semmle.label | b [element] | | array_flow.rb:339:9:339:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -2530,6 +2805,7 @@ nodes | array_flow.rb:345:10:345:10 | a [element] | semmle.label | a [element] | | array_flow.rb:345:10:345:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:349:5:349:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:349:9:349:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:349:16:349:25 | call to source | semmle.label | call to source | | array_flow.rb:350:5:350:5 | b [element] | semmle.label | b [element] | | array_flow.rb:350:9:350:9 | a [element 2] | semmle.label | a [element 2] | @@ -2538,7 +2814,10 @@ nodes | array_flow.rb:351:10:351:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:355:5:355:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:355:5:355:5 | a [element 3, element 1] | semmle.label | a [element 3, element 1] | +| array_flow.rb:355:9:355:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:355:9:355:47 | call to [] [element 3, element 1] | semmle.label | call to [] [element 3, element 1] | | array_flow.rb:355:16:355:27 | call to source | semmle.label | call to source | +| array_flow.rb:355:30:355:46 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:355:34:355:45 | call to source | semmle.label | call to source | | array_flow.rb:357:10:357:10 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:357:10:357:17 | call to dig | semmle.label | call to dig | @@ -2547,6 +2826,7 @@ nodes | array_flow.rb:360:10:360:10 | a [element 3, element 1] | semmle.label | a [element 3, element 1] | | array_flow.rb:360:10:360:19 | call to dig | semmle.label | call to dig | | array_flow.rb:364:5:364:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:364:9:364:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:364:16:364:27 | call to source | semmle.label | call to source | | array_flow.rb:365:5:365:5 | b | semmle.label | b | | array_flow.rb:365:9:365:9 | a [element 2] | semmle.label | a [element 2] | @@ -2557,6 +2837,8 @@ nodes | array_flow.rb:368:10:368:10 | b | semmle.label | b | | array_flow.rb:372:5:372:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:372:5:372:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:372:9:372:42 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:372:9:372:42 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:372:16:372:27 | call to source | semmle.label | call to source | | array_flow.rb:372:30:372:41 | call to source | semmle.label | call to source | | array_flow.rb:373:5:373:5 | b [element] | semmle.label | b [element] | @@ -2594,6 +2876,8 @@ nodes | array_flow.rb:383:10:383:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:387:5:387:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:387:5:387:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:387:9:387:42 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:387:9:387:42 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:387:16:387:27 | call to source | semmle.label | call to source | | array_flow.rb:387:30:387:41 | call to source | semmle.label | call to source | | array_flow.rb:388:5:388:5 | b [element] | semmle.label | b [element] | @@ -2605,6 +2889,7 @@ nodes | array_flow.rb:391:10:391:10 | b [element] | semmle.label | b [element] | | array_flow.rb:391:10:391:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:395:5:395:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:395:9:395:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:395:16:395:25 | call to source | semmle.label | call to source | | array_flow.rb:396:5:396:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:396:9:396:9 | a [element 2] | semmle.label | a [element 2] | @@ -2614,16 +2899,16 @@ nodes | array_flow.rb:399:10:399:10 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:399:10:399:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:403:5:403:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:403:9:403:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:403:16:403:25 | call to source | semmle.label | call to source | | array_flow.rb:404:5:404:5 | b [element 2] | semmle.label | b [element 2] | -| array_flow.rb:404:9:406:7 | [post] { ... } [captured x] | semmle.label | [post] { ... } [captured x] | -| array_flow.rb:404:9:406:7 | __synth__0__1 | semmle.label | __synth__0__1 | | array_flow.rb:404:18:404:18 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:405:14:405:14 | x | semmle.label | x | | array_flow.rb:407:10:407:10 | x | semmle.label | x | | array_flow.rb:408:10:408:10 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:408:10:408:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:412:5:412:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:412:9:412:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:412:16:412:25 | call to source | semmle.label | call to source | | array_flow.rb:413:5:413:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:413:24:413:24 | x [element] | semmle.label | x [element] | @@ -2631,6 +2916,7 @@ nodes | array_flow.rb:414:15:414:15 | x [element] | semmle.label | x [element] | | array_flow.rb:414:15:414:18 | ...[...] | semmle.label | ...[...] | | array_flow.rb:419:5:419:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:419:9:419:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:419:16:419:25 | call to source | semmle.label | call to source | | array_flow.rb:420:5:420:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:420:9:420:9 | a [element 2] | semmle.label | a [element 2] | @@ -2640,6 +2926,7 @@ nodes | array_flow.rb:423:10:423:10 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:423:10:423:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:427:5:427:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:427:9:427:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:427:16:427:25 | call to source | semmle.label | call to source | | array_flow.rb:428:5:428:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:428:9:428:9 | a [element 2] | semmle.label | a [element 2] | @@ -2647,12 +2934,14 @@ nodes | array_flow.rb:431:10:431:10 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:431:10:431:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:435:5:435:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:435:9:435:29 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:435:19:435:28 | call to source | semmle.label | call to source | | array_flow.rb:436:5:436:5 | a [element 3] | semmle.label | a [element 3] | | array_flow.rb:436:25:436:25 | x [element] | semmle.label | x [element] | | array_flow.rb:437:14:437:14 | x [element] | semmle.label | x [element] | | array_flow.rb:437:14:437:17 | ...[...] | semmle.label | ...[...] | | array_flow.rb:442:5:442:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:442:9:442:29 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:442:19:442:28 | call to source | semmle.label | call to source | | array_flow.rb:443:5:443:5 | b [element 3] | semmle.label | b [element 3] | | array_flow.rb:443:9:443:9 | a [element 3] | semmle.label | a [element 3] | @@ -2662,6 +2951,7 @@ nodes | array_flow.rb:447:10:447:10 | b [element 3] | semmle.label | b [element 3] | | array_flow.rb:447:10:447:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:451:5:451:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:451:9:451:31 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:451:19:451:30 | call to source | semmle.label | call to source | | array_flow.rb:452:5:452:5 | b | semmle.label | b | | array_flow.rb:452:9:452:9 | a [element 3] | semmle.label | a [element 3] | @@ -2673,6 +2963,7 @@ nodes | array_flow.rb:454:14:454:14 | a | semmle.label | a | | array_flow.rb:456:10:456:10 | b | semmle.label | b | | array_flow.rb:460:5:460:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:460:9:460:29 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:460:19:460:28 | call to source | semmle.label | call to source | | array_flow.rb:461:5:461:5 | b [element 3] | semmle.label | b [element 3] | | array_flow.rb:461:9:461:9 | a [element 3] | semmle.label | a [element 3] | @@ -2681,6 +2972,8 @@ nodes | array_flow.rb:462:10:462:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:466:5:466:5 | a [element 3] | semmle.label | a [element 3] | | array_flow.rb:466:5:466:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:466:9:466:45 | call to [] [element 3] | semmle.label | call to [] [element 3] | +| array_flow.rb:466:9:466:45 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:466:19:466:30 | call to source | semmle.label | call to source | | array_flow.rb:466:33:466:44 | call to source | semmle.label | call to source | | array_flow.rb:467:5:467:5 | b | semmle.label | b | @@ -2711,6 +3004,7 @@ nodes | array_flow.rb:477:20:477:31 | call to source | semmle.label | call to source | | array_flow.rb:478:10:478:10 | b | semmle.label | b | | array_flow.rb:482:5:482:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:482:9:482:31 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:482:19:482:30 | call to source | semmle.label | call to source | | array_flow.rb:483:5:483:5 | [post] a [element] | semmle.label | [post] a [element] | | array_flow.rb:483:12:483:23 | call to source | semmle.label | call to source | @@ -2730,6 +3024,7 @@ nodes | array_flow.rb:494:10:494:10 | a [element] | semmle.label | a [element] | | array_flow.rb:494:10:494:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:498:5:498:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:498:9:498:29 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:498:19:498:28 | call to source | semmle.label | call to source | | array_flow.rb:499:5:499:5 | b [element] | semmle.label | b [element] | | array_flow.rb:499:9:499:9 | a [element 3] | semmle.label | a [element 3] | @@ -2739,6 +3034,7 @@ nodes | array_flow.rb:502:10:502:10 | b [element] | semmle.label | b [element] | | array_flow.rb:502:10:502:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:506:5:506:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:506:9:506:29 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:506:19:506:28 | call to source | semmle.label | call to source | | array_flow.rb:507:5:507:5 | b [element] | semmle.label | b [element] | | array_flow.rb:507:9:507:9 | a [element 3] | semmle.label | a [element 3] | @@ -2753,6 +3049,7 @@ nodes | array_flow.rb:521:10:521:10 | d [element] | semmle.label | d [element] | | array_flow.rb:521:10:521:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:525:5:525:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:525:9:525:29 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:525:19:525:28 | call to source | semmle.label | call to source | | array_flow.rb:526:5:526:5 | b [element] | semmle.label | b [element] | | array_flow.rb:526:9:526:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -2765,6 +3062,7 @@ nodes | array_flow.rb:531:10:531:10 | b [element] | semmle.label | b [element] | | array_flow.rb:531:10:531:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:535:5:535:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:535:9:535:31 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:535:19:535:30 | call to source | semmle.label | call to source | | array_flow.rb:536:5:536:5 | b | semmle.label | b | | array_flow.rb:536:9:536:9 | a [element 3] | semmle.label | a [element 3] | @@ -2774,6 +3072,7 @@ nodes | array_flow.rb:537:14:537:14 | x | semmle.label | x | | array_flow.rb:539:10:539:10 | b | semmle.label | b | | array_flow.rb:543:5:543:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:543:9:543:29 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:543:19:543:28 | call to source | semmle.label | call to source | | array_flow.rb:544:5:544:5 | b [element] | semmle.label | b [element] | | array_flow.rb:544:9:544:9 | a [element 3] | semmle.label | a [element 3] | @@ -2783,12 +3082,15 @@ nodes | array_flow.rb:547:10:547:10 | b [element] | semmle.label | b [element] | | array_flow.rb:547:10:547:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:551:5:551:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:551:9:551:29 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:551:19:551:28 | call to source | semmle.label | call to source | | array_flow.rb:552:5:552:5 | a [element 3] | semmle.label | a [element 3] | | array_flow.rb:552:22:552:22 | x | semmle.label | x | | array_flow.rb:553:14:553:14 | x | semmle.label | x | | array_flow.rb:558:5:558:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:558:5:558:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:558:9:558:42 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:558:9:558:42 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:558:10:558:21 | call to source | semmle.label | call to source | | array_flow.rb:558:30:558:41 | call to source | semmle.label | call to source | | array_flow.rb:559:5:559:5 | [post] a [element] | semmle.label | [post] a [element] | @@ -2823,12 +3125,14 @@ nodes | array_flow.rb:566:10:566:10 | c [element] | semmle.label | c [element] | | array_flow.rb:566:10:566:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:570:5:570:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:570:9:570:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:570:16:570:27 | call to source | semmle.label | call to source | | array_flow.rb:571:5:571:5 | b [element] | semmle.label | b [element] | | array_flow.rb:571:9:571:9 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:571:9:574:7 | call to flat_map [element] | semmle.label | call to flat_map [element] | | array_flow.rb:571:24:571:24 | x | semmle.label | x | | array_flow.rb:572:14:572:14 | x | semmle.label | x | +| array_flow.rb:573:9:573:25 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:573:13:573:24 | call to source | semmle.label | call to source | | array_flow.rb:575:10:575:10 | b [element] | semmle.label | b [element] | | array_flow.rb:575:10:575:13 | ...[...] | semmle.label | ...[...] | @@ -2841,6 +3145,8 @@ nodes | array_flow.rb:580:10:580:10 | b [element] | semmle.label | b [element] | | array_flow.rb:580:10:580:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:584:5:584:5 | a [element 2, element 1] | semmle.label | a [element 2, element 1] | +| array_flow.rb:584:9:584:31 | call to [] [element 2, element 1] | semmle.label | call to [] [element 2, element 1] | +| array_flow.rb:584:16:584:30 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:584:20:584:29 | call to source | semmle.label | call to source | | array_flow.rb:585:5:585:5 | b [element] | semmle.label | b [element] | | array_flow.rb:585:9:585:9 | a [element 2, element 1] | semmle.label | a [element 2, element 1] | @@ -2848,6 +3154,8 @@ nodes | array_flow.rb:586:10:586:10 | b [element] | semmle.label | b [element] | | array_flow.rb:586:10:586:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:590:5:590:5 | a [element 2, element 1] | semmle.label | a [element 2, element 1] | +| array_flow.rb:590:9:590:31 | call to [] [element 2, element 1] | semmle.label | call to [] [element 2, element 1] | +| array_flow.rb:590:16:590:30 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:590:20:590:29 | call to source | semmle.label | call to source | | array_flow.rb:591:10:591:10 | a [element 2, element 1] | semmle.label | a [element 2, element 1] | | array_flow.rb:591:10:591:13 | ...[...] [element 1] | semmle.label | ...[...] [element 1] | @@ -2870,6 +3178,7 @@ nodes | array_flow.rb:596:10:596:13 | ...[...] [element 1] | semmle.label | ...[...] [element 1] | | array_flow.rb:596:10:596:16 | ...[...] | semmle.label | ...[...] | | array_flow.rb:600:5:600:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:600:9:600:31 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:600:19:600:30 | call to source | semmle.label | call to source | | array_flow.rb:601:5:601:5 | b [element] | semmle.label | b [element] | | array_flow.rb:601:9:601:9 | a [element 3] | semmle.label | a [element 3] | @@ -2885,6 +3194,7 @@ nodes | array_flow.rb:607:10:607:10 | b [element] | semmle.label | b [element] | | array_flow.rb:607:10:607:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:611:5:611:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:611:9:611:31 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:611:19:611:30 | call to source | semmle.label | call to source | | array_flow.rb:612:5:612:5 | b [element] | semmle.label | b [element] | | array_flow.rb:612:9:612:9 | a [element 3] | semmle.label | a [element 3] | @@ -2900,17 +3210,21 @@ nodes | array_flow.rb:618:10:618:10 | b [element] | semmle.label | b [element] | | array_flow.rb:618:10:618:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:622:5:622:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:622:9:622:31 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:622:19:622:30 | call to source | semmle.label | call to source | | array_flow.rb:623:9:623:9 | a [element 3] | semmle.label | a [element 3] | | array_flow.rb:623:24:623:24 | x | semmle.label | x | | array_flow.rb:624:14:624:14 | x | semmle.label | x | | array_flow.rb:631:5:631:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:631:9:631:29 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:631:19:631:28 | call to source | semmle.label | call to source | | array_flow.rb:632:5:632:5 | a [element 3] | semmle.label | a [element 3] | | array_flow.rb:632:17:632:17 | x | semmle.label | x | | array_flow.rb:633:14:633:14 | x | semmle.label | x | | array_flow.rb:638:5:638:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:638:5:638:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:638:9:638:39 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:638:9:638:39 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:638:10:638:21 | call to source | semmle.label | call to source | | array_flow.rb:638:27:638:38 | call to source | semmle.label | call to source | | array_flow.rb:639:5:639:5 | b | semmle.label | b | @@ -2932,6 +3246,7 @@ nodes | array_flow.rb:648:9:648:19 | call to source | semmle.label | call to source | | array_flow.rb:650:10:650:10 | c | semmle.label | c | | array_flow.rb:655:5:655:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:655:9:655:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:655:16:655:27 | call to source | semmle.label | call to source | | array_flow.rb:656:5:656:5 | b [element 1] | semmle.label | b [element 1] | | array_flow.rb:656:5:656:5 | b [element 2] | semmle.label | b [element 2] | @@ -2958,6 +3273,7 @@ nodes | array_flow.rb:666:10:666:10 | b [element 4] | semmle.label | b [element 4] | | array_flow.rb:666:10:666:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:669:5:669:5 | c [element 2] | semmle.label | c [element 2] | +| array_flow.rb:669:9:669:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:669:16:669:27 | call to source | semmle.label | call to source | | array_flow.rb:670:5:670:5 | d [element] | semmle.label | d [element] | | array_flow.rb:670:9:670:9 | [post] c [element] | semmle.label | [post] c [element] | @@ -2970,15 +3286,19 @@ nodes | array_flow.rb:672:10:672:10 | d [element] | semmle.label | d [element] | | array_flow.rb:672:10:672:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:683:5:683:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:683:9:683:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:683:16:683:27 | call to source | semmle.label | call to source | | array_flow.rb:684:5:684:5 | b [element] | semmle.label | b [element] | | array_flow.rb:684:9:684:9 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:684:9:684:60 | call to intersection [element] | semmle.label | call to intersection [element] | +| array_flow.rb:684:24:684:43 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:684:31:684:42 | call to source | semmle.label | call to source | +| array_flow.rb:684:46:684:59 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:684:47:684:58 | call to source | semmle.label | call to source | | array_flow.rb:685:10:685:10 | b [element] | semmle.label | b [element] | | array_flow.rb:685:10:685:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:689:5:689:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:689:9:689:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:689:16:689:25 | call to source | semmle.label | call to source | | array_flow.rb:690:5:690:5 | b [element] | semmle.label | b [element] | | array_flow.rb:690:9:690:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -2991,6 +3311,7 @@ nodes | array_flow.rb:695:10:695:10 | b [element] | semmle.label | b [element] | | array_flow.rb:695:10:695:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:699:5:699:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:699:9:699:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:699:16:699:27 | call to source | semmle.label | call to source | | array_flow.rb:700:5:700:5 | [post] a [element] | semmle.label | [post] a [element] | | array_flow.rb:700:12:700:23 | call to source | semmle.label | call to source | @@ -3006,6 +3327,7 @@ nodes | array_flow.rb:704:10:704:10 | b [element] | semmle.label | b [element] | | array_flow.rb:704:10:704:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:708:5:708:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:708:9:708:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:708:16:708:27 | call to source | semmle.label | call to source | | array_flow.rb:709:5:709:5 | b [element] | semmle.label | b [element] | | array_flow.rb:709:9:709:9 | a [element 2] | semmle.label | a [element 2] | @@ -3016,6 +3338,7 @@ nodes | array_flow.rb:713:10:713:10 | b [element] | semmle.label | b [element] | | array_flow.rb:713:10:713:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:717:5:717:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:717:9:717:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:717:16:717:27 | call to source | semmle.label | call to source | | array_flow.rb:718:5:718:5 | b [element] | semmle.label | b [element] | | array_flow.rb:718:9:718:9 | a [element 2] | semmle.label | a [element 2] | @@ -3026,6 +3349,7 @@ nodes | array_flow.rb:722:10:722:10 | b [element] | semmle.label | b [element] | | array_flow.rb:722:10:722:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:726:5:726:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:726:9:726:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:726:16:726:25 | call to source | semmle.label | call to source | | array_flow.rb:729:5:729:5 | b | semmle.label | b | | array_flow.rb:729:9:729:9 | a [element 2] | semmle.label | a [element 2] | @@ -3054,6 +3378,7 @@ nodes | array_flow.rb:750:10:750:10 | e [element] | semmle.label | e [element] | | array_flow.rb:750:10:750:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:754:5:754:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:754:9:754:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:754:16:754:25 | call to source | semmle.label | call to source | | array_flow.rb:757:5:757:5 | b | semmle.label | b | | array_flow.rb:757:9:757:9 | a [element 2] | semmle.label | a [element 2] | @@ -3069,6 +3394,7 @@ nodes | array_flow.rb:768:10:768:10 | c [element] | semmle.label | c [element] | | array_flow.rb:768:10:768:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:772:5:772:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:772:9:772:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:772:16:772:25 | call to source | semmle.label | call to source | | array_flow.rb:775:5:775:5 | b | semmle.label | b | | array_flow.rb:775:9:775:9 | a [element 2] | semmle.label | a [element 2] | @@ -3097,6 +3423,7 @@ nodes | array_flow.rb:796:10:796:10 | e [element] | semmle.label | e [element] | | array_flow.rb:796:10:796:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:800:5:800:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:800:9:800:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:800:16:800:25 | call to source | semmle.label | call to source | | array_flow.rb:803:5:803:5 | b | semmle.label | b | | array_flow.rb:803:9:803:9 | a [element 2] | semmle.label | a [element 2] | @@ -3112,6 +3439,7 @@ nodes | array_flow.rb:814:10:814:10 | c [element] | semmle.label | c [element] | | array_flow.rb:814:10:814:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:818:5:818:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:818:9:818:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:818:16:818:25 | call to source | semmle.label | call to source | | array_flow.rb:820:5:820:5 | b [element] | semmle.label | b [element] | | array_flow.rb:820:9:820:9 | a [element 2] | semmle.label | a [element 2] | @@ -3132,6 +3460,7 @@ nodes | array_flow.rb:830:10:830:10 | c [element] | semmle.label | c [element] | | array_flow.rb:830:10:830:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:834:5:834:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:834:9:834:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:834:16:834:25 | call to source | semmle.label | call to source | | array_flow.rb:835:5:835:5 | b [element] | semmle.label | b [element] | | array_flow.rb:835:9:835:9 | a [element 2] | semmle.label | a [element 2] | @@ -3143,16 +3472,19 @@ nodes | array_flow.rb:840:10:840:10 | b [element] | semmle.label | b [element] | | array_flow.rb:840:10:840:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:844:5:844:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:844:9:844:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:844:16:844:25 | call to source | semmle.label | call to source | | array_flow.rb:845:5:845:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:845:17:845:17 | x | semmle.label | x | | array_flow.rb:846:14:846:14 | x | semmle.label | x | | array_flow.rb:853:5:853:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:853:9:853:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:853:16:853:25 | call to source | semmle.label | call to source | | array_flow.rb:854:5:854:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:854:16:854:16 | x | semmle.label | x | | array_flow.rb:855:14:855:14 | x | semmle.label | x | | array_flow.rb:866:5:866:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:866:9:866:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:866:16:866:25 | call to source | semmle.label | call to source | | array_flow.rb:867:5:867:5 | b [element, element] | semmle.label | b [element, element] | | array_flow.rb:867:9:867:9 | a [element 2] | semmle.label | a [element 2] | @@ -3166,6 +3498,7 @@ nodes | array_flow.rb:872:10:872:13 | ...[...] [element] | semmle.label | ...[...] [element] | | array_flow.rb:872:10:872:16 | ...[...] | semmle.label | ...[...] | | array_flow.rb:876:5:876:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:876:9:876:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:876:16:876:25 | call to source | semmle.label | call to source | | array_flow.rb:878:5:878:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:878:9:878:9 | a [element 2] | semmle.label | a [element 2] | @@ -3199,6 +3532,8 @@ nodes | array_flow.rb:898:10:898:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:905:5:905:5 | a [element 1] | semmle.label | a [element 1] | | array_flow.rb:905:5:905:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:905:9:905:42 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| array_flow.rb:905:9:905:42 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:905:13:905:24 | call to source | semmle.label | call to source | | array_flow.rb:905:30:905:41 | call to source | semmle.label | call to source | | array_flow.rb:906:5:906:5 | b | semmle.label | b | @@ -3212,6 +3547,8 @@ nodes | array_flow.rb:911:10:911:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:913:5:913:5 | a [element 1] | semmle.label | a [element 1] | | array_flow.rb:913:5:913:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:913:9:913:42 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| array_flow.rb:913:9:913:42 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:913:13:913:24 | call to source | semmle.label | call to source | | array_flow.rb:913:30:913:41 | call to source | semmle.label | call to source | | array_flow.rb:914:5:914:5 | b [element] | semmle.label | b [element] | @@ -3227,6 +3564,7 @@ nodes | array_flow.rb:920:10:920:10 | a [element 3] | semmle.label | a [element 3] | | array_flow.rb:920:10:920:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:924:5:924:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:924:9:924:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:924:16:924:27 | call to source | semmle.label | call to source | | array_flow.rb:925:5:925:5 | [post] a [element 2] | semmle.label | [post] a [element 2] | | array_flow.rb:925:5:925:5 | [post] a [element 5] | semmle.label | [post] a [element 5] | @@ -3237,10 +3575,13 @@ nodes | array_flow.rb:931:10:931:10 | a [element 5] | semmle.label | a [element 5] | | array_flow.rb:931:10:931:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:935:5:935:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:935:9:935:28 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:935:16:935:27 | call to source | semmle.label | call to source | | array_flow.rb:936:5:936:5 | b [element 1] | semmle.label | b [element 1] | +| array_flow.rb:936:9:936:28 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:936:13:936:24 | call to source | semmle.label | call to source | | array_flow.rb:937:5:937:5 | c [element 0] | semmle.label | c [element 0] | +| array_flow.rb:937:9:937:28 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:937:10:937:21 | call to source | semmle.label | call to source | | array_flow.rb:938:5:938:5 | d [element, element] | semmle.label | d [element, element] | | array_flow.rb:938:9:938:9 | a [element 2] | semmle.label | a [element 2] | @@ -3254,6 +3595,7 @@ nodes | array_flow.rb:940:10:940:13 | ...[...] [element] | semmle.label | ...[...] [element] | | array_flow.rb:940:10:940:16 | ...[...] | semmle.label | ...[...] | | array_flow.rb:944:5:944:5 | a [element 0] | semmle.label | a [element 0] | +| array_flow.rb:944:9:944:25 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:944:10:944:21 | call to source | semmle.label | call to source | | array_flow.rb:945:5:945:5 | b [element 0] | semmle.label | b [element 0] | | array_flow.rb:945:5:945:5 | b [element] | semmle.label | b [element] | @@ -3274,8 +3616,10 @@ nodes | array_flow.rb:949:10:949:10 | b [element] | semmle.label | b [element] | | array_flow.rb:949:10:949:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:955:5:955:5 | c [element 0] | semmle.label | c [element 0] | +| array_flow.rb:955:9:955:25 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:955:10:955:19 | call to source | semmle.label | call to source | | array_flow.rb:956:5:956:5 | d [element 2, element 0] | semmle.label | d [element 2, element 0] | +| array_flow.rb:956:9:956:17 | call to [] [element 2, element 0] | semmle.label | call to [] [element 2, element 0] | | array_flow.rb:956:16:956:16 | c [element 0] | semmle.label | c [element 0] | | array_flow.rb:957:10:957:10 | d [element 2, element 0] | semmle.label | d [element 2, element 0] | | array_flow.rb:957:10:957:22 | call to rassoc [element 0] | semmle.label | call to rassoc [element 0] | @@ -3285,6 +3629,8 @@ nodes | array_flow.rb:958:10:958:25 | ...[...] | semmle.label | ...[...] | | array_flow.rb:962:5:962:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:962:5:962:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:962:9:962:39 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:962:9:962:39 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:962:10:962:21 | call to source | semmle.label | call to source | | array_flow.rb:962:27:962:38 | call to source | semmle.label | call to source | | array_flow.rb:963:9:963:9 | a [element 0] | semmle.label | a [element 0] | @@ -3298,6 +3644,7 @@ nodes | array_flow.rb:968:28:968:28 | y | semmle.label | y | | array_flow.rb:970:14:970:14 | y | semmle.label | y | | array_flow.rb:976:5:976:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:976:9:976:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:976:16:976:25 | call to source | semmle.label | call to source | | array_flow.rb:977:5:977:5 | b [element] | semmle.label | b [element] | | array_flow.rb:977:9:977:9 | a [element 2] | semmle.label | a [element 2] | @@ -3307,6 +3654,7 @@ nodes | array_flow.rb:981:10:981:10 | b [element] | semmle.label | b [element] | | array_flow.rb:981:10:981:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:985:5:985:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:985:9:985:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:985:16:985:25 | call to source | semmle.label | call to source | | array_flow.rb:986:5:986:5 | b [element] | semmle.label | b [element] | | array_flow.rb:986:9:986:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -3319,6 +3667,7 @@ nodes | array_flow.rb:991:10:991:10 | b [element] | semmle.label | b [element] | | array_flow.rb:991:10:991:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:995:5:995:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:995:9:995:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:995:16:995:25 | call to source | semmle.label | call to source | | array_flow.rb:996:5:996:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:996:9:996:9 | a [element 2] | semmle.label | a [element 2] | @@ -3331,6 +3680,7 @@ nodes | array_flow.rb:1001:10:1001:10 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:1001:10:1001:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1005:5:1005:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1005:9:1005:26 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1005:16:1005:25 | call to source | semmle.label | call to source | | array_flow.rb:1006:5:1006:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:1006:9:1006:9 | a [element 2] | semmle.label | a [element 2] | @@ -3345,6 +3695,7 @@ nodes | array_flow.rb:1017:5:1017:5 | b [element 0] | semmle.label | b [element 0] | | array_flow.rb:1017:9:1017:9 | [post] a [element 0] | semmle.label | [post] a [element 0] | | array_flow.rb:1017:9:1017:33 | call to replace [element 0] | semmle.label | call to replace [element 0] | +| array_flow.rb:1017:19:1017:32 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:1017:20:1017:31 | call to source | semmle.label | call to source | | array_flow.rb:1018:10:1018:10 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:1018:10:1018:13 | ...[...] | semmle.label | ...[...] | @@ -3352,6 +3703,8 @@ nodes | array_flow.rb:1019:10:1019:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1023:5:1023:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1023:5:1023:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1023:9:1023:44 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1023:9:1023:44 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1023:16:1023:28 | call to source | semmle.label | call to source | | array_flow.rb:1023:31:1023:43 | call to source | semmle.label | call to source | | array_flow.rb:1024:5:1024:5 | b [element] | semmle.label | b [element] | @@ -3370,6 +3723,8 @@ nodes | array_flow.rb:1030:10:1030:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1034:5:1034:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1034:5:1034:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1034:9:1034:44 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1034:9:1034:44 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1034:16:1034:28 | call to source | semmle.label | call to source | | array_flow.rb:1034:31:1034:43 | call to source | semmle.label | call to source | | array_flow.rb:1035:5:1035:5 | b [element] | semmle.label | b [element] | @@ -3392,6 +3747,7 @@ nodes | array_flow.rb:1041:10:1041:10 | a [element] | semmle.label | a [element] | | array_flow.rb:1041:10:1041:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1045:5:1045:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1045:9:1045:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1045:16:1045:26 | call to source | semmle.label | call to source | | array_flow.rb:1046:5:1046:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:1046:9:1046:9 | a [element 2] | semmle.label | a [element 2] | @@ -3401,6 +3757,7 @@ nodes | array_flow.rb:1049:10:1049:10 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:1049:10:1049:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1053:5:1053:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1053:9:1053:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1053:16:1053:26 | call to source | semmle.label | call to source | | array_flow.rb:1054:5:1054:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1054:18:1054:18 | x | semmle.label | x | @@ -3408,6 +3765,9 @@ nodes | array_flow.rb:1063:5:1063:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:1063:5:1063:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1063:5:1063:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1063:9:1063:56 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:1063:9:1063:56 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1063:9:1063:56 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1063:10:1063:22 | call to source | semmle.label | call to source | | array_flow.rb:1063:28:1063:40 | call to source | semmle.label | call to source | | array_flow.rb:1063:43:1063:55 | call to source | semmle.label | call to source | @@ -3480,6 +3840,9 @@ nodes | array_flow.rb:1095:5:1095:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:1095:5:1095:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1095:5:1095:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1095:9:1095:56 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:1095:9:1095:56 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1095:9:1095:56 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1095:10:1095:22 | call to source | semmle.label | call to source | | array_flow.rb:1095:28:1095:40 | call to source | semmle.label | call to source | | array_flow.rb:1095:43:1095:55 | call to source | semmle.label | call to source | @@ -3518,6 +3881,9 @@ nodes | array_flow.rb:1106:5:1106:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:1106:5:1106:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1106:5:1106:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1106:9:1106:56 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:1106:9:1106:56 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1106:9:1106:56 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1106:10:1106:22 | call to source | semmle.label | call to source | | array_flow.rb:1106:28:1106:40 | call to source | semmle.label | call to source | | array_flow.rb:1106:43:1106:55 | call to source | semmle.label | call to source | @@ -3556,6 +3922,9 @@ nodes | array_flow.rb:1117:5:1117:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:1117:5:1117:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1117:5:1117:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1117:9:1117:56 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:1117:9:1117:56 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1117:9:1117:56 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1117:10:1117:22 | call to source | semmle.label | call to source | | array_flow.rb:1117:28:1117:40 | call to source | semmle.label | call to source | | array_flow.rb:1117:43:1117:55 | call to source | semmle.label | call to source | @@ -3586,6 +3955,9 @@ nodes | array_flow.rb:1128:5:1128:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:1128:5:1128:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1128:5:1128:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1128:9:1128:56 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:1128:9:1128:56 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1128:9:1128:56 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1128:10:1128:22 | call to source | semmle.label | call to source | | array_flow.rb:1128:28:1128:40 | call to source | semmle.label | call to source | | array_flow.rb:1128:43:1128:55 | call to source | semmle.label | call to source | @@ -3612,6 +3984,7 @@ nodes | array_flow.rb:1137:10:1137:10 | b [element] | semmle.label | b [element] | | array_flow.rb:1137:10:1137:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1141:5:1141:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1141:9:1141:30 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1141:19:1141:29 | call to source | semmle.label | call to source | | array_flow.rb:1142:5:1142:5 | b [element] | semmle.label | b [element] | | array_flow.rb:1142:9:1142:9 | a [element 3] | semmle.label | a [element 3] | @@ -3621,6 +3994,7 @@ nodes | array_flow.rb:1145:10:1145:10 | b [element] | semmle.label | b [element] | | array_flow.rb:1145:10:1145:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1149:5:1149:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1149:9:1149:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1149:16:1149:26 | call to source | semmle.label | call to source | | array_flow.rb:1150:5:1150:5 | b [element] | semmle.label | b [element] | | array_flow.rb:1150:9:1150:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -3634,6 +4008,8 @@ nodes | array_flow.rb:1155:10:1155:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1159:5:1159:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:1159:5:1159:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1159:9:1159:41 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:1159:9:1159:41 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1159:10:1159:22 | call to source | semmle.label | call to source | | array_flow.rb:1159:28:1159:40 | call to source | semmle.label | call to source | | array_flow.rb:1160:5:1160:5 | b | semmle.label | b | @@ -3646,6 +4022,8 @@ nodes | array_flow.rb:1163:10:1163:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1166:5:1166:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:1166:5:1166:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1166:9:1166:41 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:1166:9:1166:41 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1166:10:1166:22 | call to source | semmle.label | call to source | | array_flow.rb:1166:28:1166:40 | call to source | semmle.label | call to source | | array_flow.rb:1167:5:1167:5 | b [element 0] | semmle.label | b [element 0] | @@ -3659,6 +4037,8 @@ nodes | array_flow.rb:1170:10:1170:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1174:5:1174:5 | a [element 0] | semmle.label | a [element 0] | | array_flow.rb:1174:5:1174:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1174:9:1174:41 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| array_flow.rb:1174:9:1174:41 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1174:10:1174:22 | call to source | semmle.label | call to source | | array_flow.rb:1174:28:1174:40 | call to source | semmle.label | call to source | | array_flow.rb:1175:5:1175:5 | b [element] | semmle.label | b [element] | @@ -3679,6 +4059,7 @@ nodes | array_flow.rb:1180:10:1180:10 | a [element] | semmle.label | a [element] | | array_flow.rb:1180:10:1180:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1184:5:1184:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1184:9:1184:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1184:16:1184:26 | call to source | semmle.label | call to source | | array_flow.rb:1185:5:1185:5 | b [element] | semmle.label | b [element] | | array_flow.rb:1185:9:1185:9 | a [element 2] | semmle.label | a [element 2] | @@ -3692,6 +4073,7 @@ nodes | array_flow.rb:1191:10:1191:10 | b [element] | semmle.label | b [element] | | array_flow.rb:1191:10:1191:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1195:5:1195:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1195:9:1195:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1195:16:1195:26 | call to source | semmle.label | call to source | | array_flow.rb:1196:5:1196:5 | b [element] | semmle.label | b [element] | | array_flow.rb:1196:9:1196:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -3712,6 +4094,8 @@ nodes | array_flow.rb:1202:10:1202:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1206:5:1206:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1206:5:1206:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1206:9:1206:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1206:9:1206:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1206:16:1206:28 | call to source | semmle.label | call to source | | array_flow.rb:1206:34:1206:46 | call to source | semmle.label | call to source | | array_flow.rb:1208:5:1208:5 | b | semmle.label | b | @@ -3789,6 +4173,8 @@ nodes | array_flow.rb:1256:10:1256:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1260:5:1260:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1260:5:1260:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1260:9:1260:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1260:9:1260:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1260:16:1260:28 | call to source | semmle.label | call to source | | array_flow.rb:1260:34:1260:46 | call to source | semmle.label | call to source | | array_flow.rb:1261:5:1261:5 | b | semmle.label | b | @@ -3801,6 +4187,8 @@ nodes | array_flow.rb:1266:10:1266:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1268:5:1268:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1268:5:1268:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1268:9:1268:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1268:9:1268:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1268:16:1268:28 | call to source | semmle.label | call to source | | array_flow.rb:1268:34:1268:46 | call to source | semmle.label | call to source | | array_flow.rb:1269:5:1269:5 | b | semmle.label | b | @@ -3823,6 +4211,8 @@ nodes | array_flow.rb:1277:10:1277:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1279:5:1279:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1279:5:1279:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1279:9:1279:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1279:9:1279:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1279:16:1279:28 | call to source | semmle.label | call to source | | array_flow.rb:1279:34:1279:46 | call to source | semmle.label | call to source | | array_flow.rb:1280:5:1280:5 | b [element 0] | semmle.label | b [element 0] | @@ -3837,6 +4227,8 @@ nodes | array_flow.rb:1283:10:1283:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1290:5:1290:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1290:5:1290:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1290:9:1290:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1290:9:1290:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1290:16:1290:28 | call to source | semmle.label | call to source | | array_flow.rb:1290:34:1290:46 | call to source | semmle.label | call to source | | array_flow.rb:1291:5:1291:5 | b [element 0] | semmle.label | b [element 0] | @@ -3850,6 +4242,8 @@ nodes | array_flow.rb:1297:10:1297:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1301:5:1301:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1301:5:1301:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1301:9:1301:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1301:9:1301:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1301:16:1301:28 | call to source | semmle.label | call to source | | array_flow.rb:1301:34:1301:46 | call to source | semmle.label | call to source | | array_flow.rb:1302:5:1302:5 | b [element 0] | semmle.label | b [element 0] | @@ -3863,6 +4257,8 @@ nodes | array_flow.rb:1308:10:1308:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1312:5:1312:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1312:5:1312:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1312:9:1312:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1312:9:1312:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1312:16:1312:28 | call to source | semmle.label | call to source | | array_flow.rb:1312:34:1312:46 | call to source | semmle.label | call to source | | array_flow.rb:1313:5:1313:5 | b [element] | semmle.label | b [element] | @@ -3884,6 +4280,8 @@ nodes | array_flow.rb:1319:10:1319:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1321:5:1321:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1321:5:1321:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1321:9:1321:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1321:9:1321:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1321:16:1321:28 | call to source | semmle.label | call to source | | array_flow.rb:1321:34:1321:46 | call to source | semmle.label | call to source | | array_flow.rb:1322:5:1322:5 | b [element] | semmle.label | b [element] | @@ -3905,6 +4303,8 @@ nodes | array_flow.rb:1328:10:1328:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1330:5:1330:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1330:5:1330:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1330:9:1330:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1330:9:1330:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1330:16:1330:28 | call to source | semmle.label | call to source | | array_flow.rb:1330:34:1330:46 | call to source | semmle.label | call to source | | array_flow.rb:1331:5:1331:5 | b [element] | semmle.label | b [element] | @@ -3926,6 +4326,8 @@ nodes | array_flow.rb:1337:10:1337:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1339:5:1339:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1339:5:1339:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1339:9:1339:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1339:9:1339:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1339:16:1339:28 | call to source | semmle.label | call to source | | array_flow.rb:1339:34:1339:46 | call to source | semmle.label | call to source | | array_flow.rb:1340:5:1340:5 | b [element 2] | semmle.label | b [element 2] | @@ -3939,6 +4341,8 @@ nodes | array_flow.rb:1345:10:1345:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1348:5:1348:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1348:5:1348:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1348:9:1348:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1348:9:1348:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1348:16:1348:28 | call to source | semmle.label | call to source | | array_flow.rb:1348:34:1348:46 | call to source | semmle.label | call to source | | array_flow.rb:1349:5:1349:5 | b [element] | semmle.label | b [element] | @@ -3959,16 +4363,19 @@ nodes | array_flow.rb:1355:10:1355:10 | a [element] | semmle.label | a [element] | | array_flow.rb:1355:10:1355:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1359:5:1359:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1359:9:1359:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1359:16:1359:26 | call to source | semmle.label | call to source | | array_flow.rb:1360:9:1360:9 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1360:27:1360:27 | x | semmle.label | x | | array_flow.rb:1361:14:1361:14 | x | semmle.label | x | | array_flow.rb:1367:5:1367:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1367:9:1367:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1367:16:1367:26 | call to source | semmle.label | call to source | | array_flow.rb:1368:9:1368:9 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1368:28:1368:28 | x | semmle.label | x | | array_flow.rb:1369:14:1369:14 | x | semmle.label | x | | array_flow.rb:1375:5:1375:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1375:9:1375:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1375:16:1375:26 | call to source | semmle.label | call to source | | array_flow.rb:1376:9:1376:9 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1376:26:1376:26 | x | semmle.label | x | @@ -3976,6 +4383,7 @@ nodes | array_flow.rb:1377:14:1377:14 | x | semmle.label | x | | array_flow.rb:1378:14:1378:14 | y | semmle.label | y | | array_flow.rb:1383:5:1383:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1383:9:1383:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1383:16:1383:26 | call to source | semmle.label | call to source | | array_flow.rb:1384:5:1384:5 | b [element] | semmle.label | b [element] | | array_flow.rb:1384:9:1384:9 | a [element 2] | semmle.label | a [element 2] | @@ -3996,6 +4404,7 @@ nodes | array_flow.rb:1393:10:1393:10 | c [element] | semmle.label | c [element] | | array_flow.rb:1393:10:1393:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1397:5:1397:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1397:9:1397:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1397:16:1397:26 | call to source | semmle.label | call to source | | array_flow.rb:1398:5:1398:5 | b [element] | semmle.label | b [element] | | array_flow.rb:1398:9:1398:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -4010,6 +4419,7 @@ nodes | array_flow.rb:1402:10:1402:10 | a [element] | semmle.label | a [element] | | array_flow.rb:1402:10:1402:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1404:5:1404:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1404:9:1404:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1404:16:1404:26 | call to source | semmle.label | call to source | | array_flow.rb:1405:5:1405:5 | b [element] | semmle.label | b [element] | | array_flow.rb:1405:9:1405:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -4028,6 +4438,7 @@ nodes | array_flow.rb:1413:10:1413:10 | a [element] | semmle.label | a [element] | | array_flow.rb:1413:10:1413:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1417:5:1417:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1417:9:1417:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1417:16:1417:26 | call to source | semmle.label | call to source | | array_flow.rb:1418:5:1418:5 | b [element] | semmle.label | b [element] | | array_flow.rb:1418:9:1418:9 | a [element 2] | semmle.label | a [element 2] | @@ -4039,6 +4450,7 @@ nodes | array_flow.rb:1423:10:1423:10 | b [element] | semmle.label | b [element] | | array_flow.rb:1423:10:1423:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1427:5:1427:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1427:9:1427:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1427:16:1427:26 | call to source | semmle.label | call to source | | array_flow.rb:1428:5:1428:5 | b [element] | semmle.label | b [element] | | array_flow.rb:1428:9:1428:9 | [post] a [element] | semmle.label | [post] a [element] | @@ -4055,12 +4467,15 @@ nodes | array_flow.rb:1435:10:1435:10 | b [element] | semmle.label | b [element] | | array_flow.rb:1435:10:1435:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1439:5:1439:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1439:9:1439:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1439:16:1439:26 | call to source | semmle.label | call to source | | array_flow.rb:1440:9:1440:9 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1440:19:1440:19 | x | semmle.label | x | | array_flow.rb:1441:14:1441:14 | x | semmle.label | x | | array_flow.rb:1447:5:1447:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1447:5:1447:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1447:9:1447:44 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1447:9:1447:44 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1447:16:1447:28 | call to source | semmle.label | call to source | | array_flow.rb:1447:31:1447:43 | call to source | semmle.label | call to source | | array_flow.rb:1448:5:1448:5 | b [element 2] | semmle.label | b [element 2] | @@ -4105,6 +4520,7 @@ nodes | array_flow.rb:1467:10:1467:10 | b [element] | semmle.label | b [element] | | array_flow.rb:1467:10:1467:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1471:5:1471:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1471:9:1471:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1471:16:1471:26 | call to source | semmle.label | call to source | | array_flow.rb:1472:5:1472:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:1472:9:1472:9 | a [element 2] | semmle.label | a [element 2] | @@ -4114,6 +4530,7 @@ nodes | array_flow.rb:1478:10:1478:10 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:1478:10:1478:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1484:5:1484:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1484:9:1484:30 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1484:19:1484:29 | call to source | semmle.label | call to source | | array_flow.rb:1485:5:1485:5 | b [element 3] | semmle.label | b [element 3] | | array_flow.rb:1485:9:1485:9 | a [element 3] | semmle.label | a [element 3] | @@ -4121,6 +4538,7 @@ nodes | array_flow.rb:1486:10:1486:10 | b [element 3] | semmle.label | b [element 3] | | array_flow.rb:1486:10:1486:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1490:5:1490:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1490:9:1490:27 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1490:16:1490:26 | call to source | semmle.label | call to source | | array_flow.rb:1491:5:1491:5 | b [element 2] | semmle.label | b [element 2] | | array_flow.rb:1491:9:1491:9 | a [element 2] | semmle.label | a [element 2] | @@ -4130,8 +4548,14 @@ nodes | array_flow.rb:1507:5:1507:5 | a [element 0, element 1] | semmle.label | a [element 0, element 1] | | array_flow.rb:1507:5:1507:5 | a [element 1, element 1] | semmle.label | a [element 1, element 1] | | array_flow.rb:1507:5:1507:5 | a [element 2, element 1] | semmle.label | a [element 2, element 1] | +| array_flow.rb:1507:9:1507:68 | call to [] [element 0, element 1] | semmle.label | call to [] [element 0, element 1] | +| array_flow.rb:1507:9:1507:68 | call to [] [element 1, element 1] | semmle.label | call to [] [element 1, element 1] | +| array_flow.rb:1507:9:1507:68 | call to [] [element 2, element 1] | semmle.label | call to [] [element 2, element 1] | +| array_flow.rb:1507:10:1507:27 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:1507:14:1507:26 | call to source | semmle.label | call to source | +| array_flow.rb:1507:30:1507:47 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:1507:34:1507:46 | call to source | semmle.label | call to source | +| array_flow.rb:1507:50:1507:67 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:1507:54:1507:66 | call to source | semmle.label | call to source | | array_flow.rb:1508:5:1508:5 | b [element 1, element 0] | semmle.label | b [element 1, element 0] | | array_flow.rb:1508:5:1508:5 | b [element 1, element 1] | semmle.label | b [element 1, element 1] | @@ -4152,10 +4576,13 @@ nodes | array_flow.rb:1514:10:1514:13 | ...[...] [element 2] | semmle.label | ...[...] [element 2] | | array_flow.rb:1514:10:1514:16 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1518:5:1518:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1518:9:1518:29 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1518:16:1518:28 | call to source | semmle.label | call to source | | array_flow.rb:1519:5:1519:5 | b [element 1] | semmle.label | b [element 1] | +| array_flow.rb:1519:9:1519:26 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:1519:13:1519:25 | call to source | semmle.label | call to source | | array_flow.rb:1520:5:1520:5 | c [element 1] | semmle.label | c [element 1] | +| array_flow.rb:1520:9:1520:26 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:1520:13:1520:25 | call to source | semmle.label | call to source | | array_flow.rb:1521:5:1521:5 | d [element] | semmle.label | d [element] | | array_flow.rb:1521:9:1521:9 | a [element 2] | semmle.label | a [element 2] | @@ -4170,6 +4597,8 @@ nodes | array_flow.rb:1524:10:1524:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1528:5:1528:5 | a [element 3] | semmle.label | a [element 3] | | array_flow.rb:1528:5:1528:5 | a [element 4] | semmle.label | a [element 4] | +| array_flow.rb:1528:9:1528:47 | call to [] [element 3] | semmle.label | call to [] [element 3] | +| array_flow.rb:1528:9:1528:47 | call to [] [element 4] | semmle.label | call to [] [element 4] | | array_flow.rb:1528:19:1528:31 | call to source | semmle.label | call to source | | array_flow.rb:1528:34:1528:46 | call to source | semmle.label | call to source | | array_flow.rb:1530:5:1530:5 | b [element] | semmle.label | b [element] | @@ -4190,6 +4619,8 @@ nodes | array_flow.rb:1538:10:1538:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1542:5:1542:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1542:5:1542:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1542:9:1542:44 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1542:9:1542:44 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1542:16:1542:28 | call to source | semmle.label | call to source | | array_flow.rb:1542:31:1542:43 | call to source | semmle.label | call to source | | array_flow.rb:1543:5:1543:5 | b [element] | semmle.label | b [element] | @@ -4207,6 +4638,8 @@ nodes | array_flow.rb:1547:10:1547:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1549:5:1549:5 | a [element 2] | semmle.label | a [element 2] | | array_flow.rb:1549:5:1549:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1549:9:1549:44 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1549:9:1549:44 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1549:16:1549:28 | call to source | semmle.label | call to source | | array_flow.rb:1549:31:1549:43 | call to source | semmle.label | call to source | | array_flow.rb:1550:5:1550:5 | b [element] | semmle.label | b [element] | @@ -4225,6 +4658,7 @@ nodes | array_flow.rb:1557:10:1557:10 | a [element] | semmle.label | a [element] | | array_flow.rb:1557:10:1557:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1561:5:1561:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1561:9:1561:29 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1561:16:1561:28 | call to source | semmle.label | call to source | | array_flow.rb:1562:5:1562:5 | [post] a [element 2] | semmle.label | [post] a [element 2] | | array_flow.rb:1562:5:1562:5 | [post] a [element 5] | semmle.label | [post] a [element 5] | @@ -4236,6 +4670,8 @@ nodes | array_flow.rb:1568:10:1568:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1572:5:1572:5 | a [element 1] | semmle.label | a [element 1] | | array_flow.rb:1572:5:1572:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1572:9:1572:44 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| array_flow.rb:1572:9:1572:44 | call to [] [element 3] | semmle.label | call to [] [element 3] | | array_flow.rb:1572:13:1572:25 | call to source | semmle.label | call to source | | array_flow.rb:1572:31:1572:43 | call to source | semmle.label | call to source | | array_flow.rb:1574:5:1574:5 | b [element 1] | semmle.label | b [element 1] | @@ -4279,10 +4715,13 @@ nodes | array_flow.rb:1592:10:1592:10 | b [element] | semmle.label | b [element] | | array_flow.rb:1592:10:1592:13 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1596:5:1596:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1596:9:1596:29 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1596:16:1596:28 | call to source | semmle.label | call to source | | array_flow.rb:1597:5:1597:5 | b [element 1] | semmle.label | b [element 1] | +| array_flow.rb:1597:9:1597:29 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:1597:13:1597:25 | call to source | semmle.label | call to source | | array_flow.rb:1598:5:1598:5 | c [element 0] | semmle.label | c [element 0] | +| array_flow.rb:1598:9:1598:29 | call to [] [element 0] | semmle.label | call to [] [element 0] | | array_flow.rb:1598:10:1598:22 | call to source | semmle.label | call to source | | array_flow.rb:1599:5:1599:5 | d [element 0, element 2] | semmle.label | d [element 0, element 2] | | array_flow.rb:1599:5:1599:5 | d [element 1, element 1] | semmle.label | d [element 1, element 1] | @@ -4315,8 +4754,10 @@ nodes | array_flow.rb:1607:14:1607:14 | x [element 2] | semmle.label | x [element 2] | | array_flow.rb:1607:14:1607:17 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1612:5:1612:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1612:9:1612:29 | call to [] [element 2] | semmle.label | call to [] [element 2] | | array_flow.rb:1612:16:1612:28 | call to source | semmle.label | call to source | | array_flow.rb:1613:5:1613:5 | b [element 1] | semmle.label | b [element 1] | +| array_flow.rb:1613:9:1613:26 | call to [] [element 1] | semmle.label | call to [] [element 1] | | array_flow.rb:1613:13:1613:25 | call to source | semmle.label | call to source | | array_flow.rb:1614:5:1614:5 | c [element] | semmle.label | c [element] | | array_flow.rb:1614:9:1614:9 | a [element 2] | semmle.label | a [element 2] | @@ -4374,6 +4815,26 @@ nodes | array_flow.rb:1670:14:1670:18 | ...[...] | semmle.label | ...[...] | | array_flow.rb:1672:14:1672:15 | a2 [element 1] | semmle.label | a2 [element 1] | | array_flow.rb:1672:14:1672:18 | ...[...] | semmle.label | ...[...] | +| array_flow.rb:1677:5:1677:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1677:9:1677:29 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1677:16:1677:28 | call to source | semmle.label | call to source | +| array_flow.rb:1678:5:1678:5 | b [element] | semmle.label | b [element] | +| array_flow.rb:1678:9:1678:9 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1678:9:1680:7 | call to map [element] | semmle.label | call to map [element] | +| array_flow.rb:1681:10:1681:10 | b [element] | semmle.label | b [element] | +| array_flow.rb:1681:10:1681:13 | ...[...] | semmle.label | ...[...] | +| array_flow.rb:1685:5:1685:5 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1685:5:1685:5 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1685:9:1685:44 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| array_flow.rb:1685:9:1685:44 | call to [] [element 3] | semmle.label | call to [] [element 3] | +| array_flow.rb:1685:16:1685:28 | call to source | semmle.label | call to source | +| array_flow.rb:1685:31:1685:43 | call to source | semmle.label | call to source | +| array_flow.rb:1686:11:1686:11 | z | semmle.label | z | +| array_flow.rb:1686:14:1686:14 | w | semmle.label | w | +| array_flow.rb:1686:18:1686:18 | a [element 2] | semmle.label | a [element 2] | +| array_flow.rb:1686:18:1686:18 | a [element 3] | semmle.label | a [element 3] | +| array_flow.rb:1689:10:1689:10 | z | semmle.label | z | +| array_flow.rb:1690:10:1690:10 | w | semmle.label | w | subpaths arrayLiteral | array_flow.rb:9:9:9:25 | call to [] | @@ -4564,6 +5025,8 @@ arrayLiteral | array_flow.rb:1621:10:1621:12 | call to [] | | array_flow.rb:1647:9:1647:32 | ...[...] | | array_flow.rb:1668:14:1668:41 | ...[...] | +| array_flow.rb:1677:9:1677:29 | call to [] | +| array_flow.rb:1685:9:1685:44 | call to [] | #select | array_flow.rb:3:10:3:13 | ...[...] | array_flow.rb:2:10:2:20 | call to source | array_flow.rb:3:10:3:13 | ...[...] | $@ | array_flow.rb:2:10:2:20 | call to source | call to source | | array_flow.rb:5:10:5:13 | ...[...] | array_flow.rb:2:10:2:20 | call to source | array_flow.rb:5:10:5:13 | ...[...] | $@ | array_flow.rb:2:10:2:20 | call to source | call to source | @@ -5264,3 +5727,6 @@ arrayLiteral | array_flow.rb:1651:10:1651:13 | ...[...] | array_flow.rb:1647:18:1647:28 | call to source | array_flow.rb:1651:10:1651:13 | ...[...] | $@ | array_flow.rb:1647:18:1647:28 | call to source | call to source | | array_flow.rb:1670:14:1670:18 | ...[...] | array_flow.rb:1668:25:1668:37 | call to source | array_flow.rb:1670:14:1670:18 | ...[...] | $@ | array_flow.rb:1668:25:1668:37 | call to source | call to source | | array_flow.rb:1672:14:1672:18 | ...[...] | array_flow.rb:1668:25:1668:37 | call to source | array_flow.rb:1672:14:1672:18 | ...[...] | $@ | array_flow.rb:1668:25:1668:37 | call to source | call to source | +| array_flow.rb:1681:10:1681:13 | ...[...] | array_flow.rb:1677:16:1677:28 | call to source | array_flow.rb:1681:10:1681:13 | ...[...] | $@ | array_flow.rb:1677:16:1677:28 | call to source | call to source | +| array_flow.rb:1689:10:1689:10 | z | array_flow.rb:1685:16:1685:28 | call to source | array_flow.rb:1689:10:1689:10 | z | $@ | array_flow.rb:1685:16:1685:28 | call to source | call to source | +| array_flow.rb:1690:10:1690:10 | w | array_flow.rb:1685:31:1685:43 | call to source | array_flow.rb:1690:10:1690:10 | w | $@ | array_flow.rb:1685:31:1685:43 | call to source | call to source | diff --git a/ruby/ql/test/library-tests/dataflow/array-flow/array_flow.rb b/ruby/ql/test/library-tests/dataflow/array-flow/array_flow.rb index bc137a38334..cb07ce96ca6 100644 --- a/ruby/ql/test/library-tests/dataflow/array-flow/array_flow.rb +++ b/ruby/ql/test/library-tests/dataflow/array-flow/array_flow.rb @@ -1672,3 +1672,20 @@ class M139 sink(a2[i]) # $ hasValueFlow=139.2 end end + +def m139 + a = [0, 1, source(139.1)] + b = a.map do |x| + x + end + sink b[2] # $ hasValueFlow=139.1 +end + +def m140 + a = [0, 1, source(140.1), source(140.2)] + x, y, z, w = a + sink x + sink y + sink z # $ hasValueFlow=140.1 + sink w # $ hasValueFlow=140.2 +end diff --git a/ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.expected b/ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.expected index 7e55fbf8995..b13c31dbc78 100644 --- a/ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.expected +++ b/ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.expected @@ -20,14 +20,10 @@ edges | call_sensitivity.rb:44:26:44:33 | call to taint | call_sensitivity.rb:21:27:21:27 | x | provenance | | | call_sensitivity.rb:50:15:50:15 | x | call_sensitivity.rb:51:10:51:10 | x | provenance | | | call_sensitivity.rb:54:15:54:15 | x | call_sensitivity.rb:55:13:55:13 | x | provenance | | -| call_sensitivity.rb:54:15:54:15 | x | call_sensitivity.rb:55:13:55:13 | x | provenance | | -| call_sensitivity.rb:55:13:55:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | | | call_sensitivity.rb:55:13:55:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | | | call_sensitivity.rb:58:20:58:20 | x | call_sensitivity.rb:59:18:59:18 | x | provenance | | | call_sensitivity.rb:59:18:59:18 | x | call_sensitivity.rb:54:15:54:15 | x | provenance | | | call_sensitivity.rb:62:18:62:18 | y | call_sensitivity.rb:63:15:63:15 | y | provenance | | -| call_sensitivity.rb:62:18:62:18 | y | call_sensitivity.rb:63:15:63:15 | y | provenance | | -| call_sensitivity.rb:63:15:63:15 | y | call_sensitivity.rb:50:15:50:15 | x | provenance | | | call_sensitivity.rb:63:15:63:15 | y | call_sensitivity.rb:50:15:50:15 | x | provenance | | | call_sensitivity.rb:66:20:66:20 | x | call_sensitivity.rb:67:24:67:24 | x | provenance | | | call_sensitivity.rb:67:24:67:24 | x | call_sensitivity.rb:62:18:62:18 | y | provenance | | @@ -40,26 +36,16 @@ edges | call_sensitivity.rb:85:18:85:27 | ( ... ) | call_sensitivity.rb:80:15:80:15 | x | provenance | | | call_sensitivity.rb:85:19:85:26 | call to taint | call_sensitivity.rb:85:18:85:27 | ( ... ) | provenance | | | call_sensitivity.rb:88:30:88:30 | x | call_sensitivity.rb:89:23:89:23 | x | provenance | | -| call_sensitivity.rb:88:30:88:30 | x | call_sensitivity.rb:89:23:89:23 | x | provenance | | -| call_sensitivity.rb:89:23:89:23 | x | call_sensitivity.rb:70:30:70:30 | x | provenance | | | call_sensitivity.rb:89:23:89:23 | x | call_sensitivity.rb:70:30:70:30 | x | provenance | | | call_sensitivity.rb:92:35:92:35 | x | call_sensitivity.rb:93:28:93:28 | x | provenance | | | call_sensitivity.rb:93:28:93:28 | x | call_sensitivity.rb:88:30:88:30 | x | provenance | | | call_sensitivity.rb:96:33:96:33 | y | call_sensitivity.rb:97:25:97:25 | y | provenance | | -| call_sensitivity.rb:96:33:96:33 | y | call_sensitivity.rb:97:25:97:25 | y | provenance | | -| call_sensitivity.rb:97:25:97:25 | y | call_sensitivity.rb:70:30:70:30 | x | provenance | | | call_sensitivity.rb:97:25:97:25 | y | call_sensitivity.rb:70:30:70:30 | x | provenance | | | call_sensitivity.rb:100:35:100:35 | x | call_sensitivity.rb:101:34:101:34 | x | provenance | | | call_sensitivity.rb:101:34:101:34 | x | call_sensitivity.rb:96:33:96:33 | y | provenance | | | call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:105:10:105:10 | x | provenance | | | call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:105:10:105:10 | x | provenance | | -| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:105:10:105:10 | x | provenance | | -| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:105:10:105:10 | x | provenance | | | call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:106:13:106:13 | x | provenance | | -| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:106:13:106:13 | x | provenance | | -| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:106:13:106:13 | x | provenance | | -| call_sensitivity.rb:106:13:106:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | | -| call_sensitivity.rb:106:13:106:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | | | call_sensitivity.rb:106:13:106:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | | | call_sensitivity.rb:109:21:109:21 | x | call_sensitivity.rb:110:9:110:9 | x | provenance | | | call_sensitivity.rb:110:9:110:9 | x | call_sensitivity.rb:104:18:104:18 | x | provenance | | @@ -124,14 +110,10 @@ nodes | call_sensitivity.rb:50:15:50:15 | x | semmle.label | x | | call_sensitivity.rb:51:10:51:10 | x | semmle.label | x | | call_sensitivity.rb:54:15:54:15 | x | semmle.label | x | -| call_sensitivity.rb:54:15:54:15 | x | semmle.label | x | -| call_sensitivity.rb:55:13:55:13 | x | semmle.label | x | | call_sensitivity.rb:55:13:55:13 | x | semmle.label | x | | call_sensitivity.rb:58:20:58:20 | x | semmle.label | x | | call_sensitivity.rb:59:18:59:18 | x | semmle.label | x | | call_sensitivity.rb:62:18:62:18 | y | semmle.label | y | -| call_sensitivity.rb:62:18:62:18 | y | semmle.label | y | -| call_sensitivity.rb:63:15:63:15 | y | semmle.label | y | | call_sensitivity.rb:63:15:63:15 | y | semmle.label | y | | call_sensitivity.rb:66:20:66:20 | x | semmle.label | x | | call_sensitivity.rb:67:24:67:24 | x | semmle.label | x | @@ -145,25 +127,17 @@ nodes | call_sensitivity.rb:85:18:85:27 | ( ... ) | semmle.label | ( ... ) | | call_sensitivity.rb:85:19:85:26 | call to taint | semmle.label | call to taint | | call_sensitivity.rb:88:30:88:30 | x | semmle.label | x | -| call_sensitivity.rb:88:30:88:30 | x | semmle.label | x | -| call_sensitivity.rb:89:23:89:23 | x | semmle.label | x | | call_sensitivity.rb:89:23:89:23 | x | semmle.label | x | | call_sensitivity.rb:92:35:92:35 | x | semmle.label | x | | call_sensitivity.rb:93:28:93:28 | x | semmle.label | x | | call_sensitivity.rb:96:33:96:33 | y | semmle.label | y | -| call_sensitivity.rb:96:33:96:33 | y | semmle.label | y | -| call_sensitivity.rb:97:25:97:25 | y | semmle.label | y | | call_sensitivity.rb:97:25:97:25 | y | semmle.label | y | | call_sensitivity.rb:100:35:100:35 | x | semmle.label | x | | call_sensitivity.rb:101:34:101:34 | x | semmle.label | x | | call_sensitivity.rb:104:18:104:18 | x | semmle.label | x | | call_sensitivity.rb:104:18:104:18 | x | semmle.label | x | -| call_sensitivity.rb:104:18:104:18 | x | semmle.label | x | -| call_sensitivity.rb:104:18:104:18 | x | semmle.label | x | | call_sensitivity.rb:105:10:105:10 | x | semmle.label | x | | call_sensitivity.rb:106:13:106:13 | x | semmle.label | x | -| call_sensitivity.rb:106:13:106:13 | x | semmle.label | x | -| call_sensitivity.rb:106:13:106:13 | x | semmle.label | x | | call_sensitivity.rb:109:21:109:21 | x | semmle.label | x | | call_sensitivity.rb:110:9:110:9 | x | semmle.label | x | | call_sensitivity.rb:114:11:114:20 | ( ... ) | semmle.label | ( ... ) | diff --git a/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.expected b/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.expected index 7f40375e963..9fa0bcb272b 100644 --- a/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.expected +++ b/ruby/ql/test/library-tests/dataflow/flow-summaries/semantics.expected @@ -162,8 +162,10 @@ edges | semantics.rb:116:5:116:5 | h [element :a] | semantics.rb:117:16:117:16 | h [element :a] | provenance | | | semantics.rb:116:5:116:5 | h [element :a] | semantics.rb:121:22:121:22 | h [element :a] | provenance | | | semantics.rb:116:5:116:5 | h [element :a] | semantics.rb:121:22:121:22 | h [element :a] | provenance | | -| semantics.rb:116:14:116:14 | a | semantics.rb:116:5:116:5 | h [element :a] | provenance | | -| semantics.rb:116:14:116:14 | a | semantics.rb:116:5:116:5 | h [element :a] | provenance | | +| semantics.rb:116:9:116:22 | call to [] [element :a] | semantics.rb:116:5:116:5 | h [element :a] | provenance | | +| semantics.rb:116:9:116:22 | call to [] [element :a] | semantics.rb:116:5:116:5 | h [element :a] | provenance | | +| semantics.rb:116:14:116:14 | a | semantics.rb:116:9:116:22 | call to [] [element :a] | provenance | | +| semantics.rb:116:14:116:14 | a | semantics.rb:116:9:116:22 | call to [] [element :a] | provenance | | | semantics.rb:117:14:117:16 | ** ... [element :a] | semantics.rb:117:10:117:17 | call to s16 | provenance | | | semantics.rb:117:14:117:16 | ** ... [element :a] | semantics.rb:117:10:117:17 | call to s16 | provenance | | | semantics.rb:117:16:117:16 | h [element :a] | semantics.rb:117:14:117:16 | ** ... [element :a] | provenance | | @@ -212,10 +214,14 @@ edges | semantics.rb:135:5:135:7 | arr [element 0] | semantics.rb:136:15:136:17 | arr [element 0] | provenance | | | semantics.rb:135:5:135:7 | arr [element 1] | semantics.rb:136:15:136:17 | arr [element 1] | provenance | | | semantics.rb:135:5:135:7 | arr [element 1] | semantics.rb:136:15:136:17 | arr [element 1] | provenance | | -| semantics.rb:135:12:135:12 | a | semantics.rb:135:5:135:7 | arr [element 0] | provenance | | -| semantics.rb:135:12:135:12 | a | semantics.rb:135:5:135:7 | arr [element 0] | provenance | | -| semantics.rb:135:15:135:15 | b | semantics.rb:135:5:135:7 | arr [element 1] | provenance | | -| semantics.rb:135:15:135:15 | b | semantics.rb:135:5:135:7 | arr [element 1] | provenance | | +| semantics.rb:135:11:135:16 | call to [] [element 0] | semantics.rb:135:5:135:7 | arr [element 0] | provenance | | +| semantics.rb:135:11:135:16 | call to [] [element 0] | semantics.rb:135:5:135:7 | arr [element 0] | provenance | | +| semantics.rb:135:11:135:16 | call to [] [element 1] | semantics.rb:135:5:135:7 | arr [element 1] | provenance | | +| semantics.rb:135:11:135:16 | call to [] [element 1] | semantics.rb:135:5:135:7 | arr [element 1] | provenance | | +| semantics.rb:135:12:135:12 | a | semantics.rb:135:11:135:16 | call to [] [element 0] | provenance | | +| semantics.rb:135:12:135:12 | a | semantics.rb:135:11:135:16 | call to [] [element 0] | provenance | | +| semantics.rb:135:15:135:15 | b | semantics.rb:135:11:135:16 | call to [] [element 1] | provenance | | +| semantics.rb:135:15:135:15 | b | semantics.rb:135:11:135:16 | call to [] [element 1] | provenance | | | semantics.rb:136:14:136:17 | * ... [element 0] | semantics.rb:136:10:136:18 | call to s18 | provenance | | | semantics.rb:136:14:136:17 | * ... [element 0] | semantics.rb:136:10:136:18 | call to s18 | provenance | | | semantics.rb:136:14:136:17 | * ... [element 1] | semantics.rb:136:10:136:18 | call to s18 | provenance | | @@ -1275,6 +1281,8 @@ nodes | semantics.rb:115:9:115:18 | call to source | semmle.label | call to source | | semantics.rb:116:5:116:5 | h [element :a] | semmle.label | h [element :a] | | semantics.rb:116:5:116:5 | h [element :a] | semmle.label | h [element :a] | +| semantics.rb:116:9:116:22 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| semantics.rb:116:9:116:22 | call to [] [element :a] | semmle.label | call to [] [element :a] | | semantics.rb:116:14:116:14 | a | semmle.label | a | | semantics.rb:116:14:116:14 | a | semmle.label | a | | semantics.rb:117:10:117:17 | call to s16 | semmle.label | call to s16 | @@ -1332,6 +1340,10 @@ nodes | semantics.rb:135:5:135:7 | arr [element 0] | semmle.label | arr [element 0] | | semantics.rb:135:5:135:7 | arr [element 1] | semmle.label | arr [element 1] | | semantics.rb:135:5:135:7 | arr [element 1] | semmle.label | arr [element 1] | +| semantics.rb:135:11:135:16 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| semantics.rb:135:11:135:16 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| semantics.rb:135:11:135:16 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| semantics.rb:135:11:135:16 | call to [] [element 1] | semmle.label | call to [] [element 1] | | semantics.rb:135:12:135:12 | a | semmle.label | a | | semantics.rb:135:12:135:12 | a | semmle.label | a | | semantics.rb:135:15:135:15 | b | semmle.label | b | diff --git a/ruby/ql/test/library-tests/dataflow/global/Flow.expected b/ruby/ql/test/library-tests/dataflow/global/Flow.expected index fb836e8488c..7ae00a80dce 100644 --- a/ruby/ql/test/library-tests/dataflow/global/Flow.expected +++ b/ruby/ql/test/library-tests/dataflow/global/Flow.expected @@ -140,7 +140,6 @@ edges | instance_variables.rb:28:20:28:24 | field | instance_variables.rb:22:20:22:24 | field | provenance | | | instance_variables.rb:28:20:28:24 | field | instance_variables.rb:28:9:28:25 | [post] self [@field] | provenance | | | instance_variables.rb:31:18:31:18 | x | instance_variables.rb:33:13:33:13 | x | provenance | | -| instance_variables.rb:32:13:32:21 | call to taint | instance_variables.rb:22:20:22:24 | field | provenance | | | instance_variables.rb:32:13:32:21 | call to taint | instance_variables.rb:48:20:48:20 | x | provenance | | | instance_variables.rb:33:13:33:13 | x | instance_variables.rb:22:20:22:24 | field | provenance | | | instance_variables.rb:33:13:33:13 | x | instance_variables.rb:33:9:33:14 | call to new [@field] | provenance | | diff --git a/ruby/ql/test/library-tests/dataflow/hash-flow/hash-flow.expected b/ruby/ql/test/library-tests/dataflow/hash-flow/hash-flow.expected index df37ffac47a..d2da8837a56 100644 --- a/ruby/ql/test/library-tests/dataflow/hash-flow/hash-flow.expected +++ b/ruby/ql/test/library-tests/dataflow/hash-flow/hash-flow.expected @@ -5,11 +5,16 @@ edges | hash_flow.rb:10:5:10:8 | hash [element :c] | hash_flow.rb:24:10:24:13 | hash [element :c] | provenance | | | hash_flow.rb:10:5:10:8 | hash [element e] | hash_flow.rb:26:10:26:13 | hash [element e] | provenance | | | hash_flow.rb:10:5:10:8 | hash [element g] | hash_flow.rb:28:10:28:13 | hash [element g] | provenance | | -| hash_flow.rb:11:15:11:24 | call to taint | hash_flow.rb:10:5:10:8 | hash [element :a] | provenance | | -| hash_flow.rb:13:12:13:21 | call to taint | hash_flow.rb:10:5:10:8 | hash [element :c] | provenance | | -| hash_flow.rb:15:14:15:23 | call to taint | hash_flow.rb:10:5:10:8 | hash [element e] | provenance | | -| hash_flow.rb:17:16:17:25 | call to taint | hash_flow.rb:10:5:10:8 | hash [element g] | provenance | | -| hash_flow.rb:19:14:19:23 | call to taint | hash_flow.rb:10:5:10:8 | hash [element 0] | provenance | | +| hash_flow.rb:10:12:21:5 | call to [] [element 0] | hash_flow.rb:10:5:10:8 | hash [element 0] | provenance | | +| hash_flow.rb:10:12:21:5 | call to [] [element :a] | hash_flow.rb:10:5:10:8 | hash [element :a] | provenance | | +| hash_flow.rb:10:12:21:5 | call to [] [element :c] | hash_flow.rb:10:5:10:8 | hash [element :c] | provenance | | +| hash_flow.rb:10:12:21:5 | call to [] [element e] | hash_flow.rb:10:5:10:8 | hash [element e] | provenance | | +| hash_flow.rb:10:12:21:5 | call to [] [element g] | hash_flow.rb:10:5:10:8 | hash [element g] | provenance | | +| hash_flow.rb:11:15:11:24 | call to taint | hash_flow.rb:10:12:21:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:13:12:13:21 | call to taint | hash_flow.rb:10:12:21:5 | call to [] [element :c] | provenance | | +| hash_flow.rb:15:14:15:23 | call to taint | hash_flow.rb:10:12:21:5 | call to [] [element e] | provenance | | +| hash_flow.rb:17:16:17:25 | call to taint | hash_flow.rb:10:12:21:5 | call to [] [element g] | provenance | | +| hash_flow.rb:19:14:19:23 | call to taint | hash_flow.rb:10:12:21:5 | call to [] [element 0] | provenance | | | hash_flow.rb:22:10:22:13 | hash [element :a] | hash_flow.rb:22:10:22:17 | ...[...] | provenance | | | hash_flow.rb:24:10:24:13 | hash [element :c] | hash_flow.rb:24:10:24:17 | ...[...] | provenance | | | hash_flow.rb:26:10:26:13 | hash [element e] | hash_flow.rb:26:10:26:18 | ...[...] | provenance | | @@ -47,7 +52,8 @@ edges | hash_flow.rb:55:21:55:30 | call to taint | hash_flow.rb:55:13:55:37 | ...[...] [element :a] | provenance | | | hash_flow.rb:56:10:56:14 | hash1 [element :a] | hash_flow.rb:56:10:56:18 | ...[...] | provenance | | | hash_flow.rb:59:5:59:5 | x [element :a] | hash_flow.rb:60:18:60:18 | x [element :a] | provenance | | -| hash_flow.rb:59:13:59:22 | call to taint | hash_flow.rb:59:5:59:5 | x [element :a] | provenance | | +| hash_flow.rb:59:9:59:29 | call to [] [element :a] | hash_flow.rb:59:5:59:5 | x [element :a] | provenance | | +| hash_flow.rb:59:13:59:22 | call to taint | hash_flow.rb:59:9:59:29 | call to [] [element :a] | provenance | | | hash_flow.rb:60:5:60:9 | hash2 [element :a] | hash_flow.rb:61:10:61:14 | hash2 [element :a] | provenance | | | hash_flow.rb:60:13:60:19 | ...[...] [element :a] | hash_flow.rb:60:5:60:9 | hash2 [element :a] | provenance | | | hash_flow.rb:60:18:60:18 | x [element :a] | hash_flow.rb:60:13:60:19 | ...[...] [element :a] | provenance | | @@ -55,7 +61,9 @@ edges | hash_flow.rb:64:5:64:9 | hash3 [element] | hash_flow.rb:65:10:65:14 | hash3 [element] | provenance | | | hash_flow.rb:64:5:64:9 | hash3 [element] | hash_flow.rb:66:10:66:14 | hash3 [element] | provenance | | | hash_flow.rb:64:13:64:45 | ...[...] [element] | hash_flow.rb:64:5:64:9 | hash3 [element] | provenance | | -| hash_flow.rb:64:24:64:33 | call to taint | hash_flow.rb:64:13:64:45 | ...[...] [element] | provenance | | +| hash_flow.rb:64:18:64:44 | call to [] [element 0, element 1] | hash_flow.rb:64:13:64:45 | ...[...] [element] | provenance | | +| hash_flow.rb:64:19:64:34 | call to [] [element 1] | hash_flow.rb:64:18:64:44 | call to [] [element 0, element 1] | provenance | | +| hash_flow.rb:64:24:64:33 | call to taint | hash_flow.rb:64:19:64:34 | call to [] [element 1] | provenance | | | hash_flow.rb:65:10:65:14 | hash3 [element] | hash_flow.rb:65:10:65:18 | ...[...] | provenance | | | hash_flow.rb:66:10:66:14 | hash3 [element] | hash_flow.rb:66:10:66:18 | ...[...] | provenance | | | hash_flow.rb:68:5:68:9 | hash4 [element :a] | hash_flow.rb:69:10:69:14 | hash4 [element :a] | provenance | | @@ -68,14 +76,16 @@ edges | hash_flow.rb:73:10:73:14 | hash5 [element a] | hash_flow.rb:73:10:73:19 | ...[...] | provenance | | | hash_flow.rb:76:5:76:9 | hash6 [element a] | hash_flow.rb:77:10:77:14 | hash6 [element a] | provenance | | | hash_flow.rb:76:13:76:47 | ...[...] [element a] | hash_flow.rb:76:5:76:9 | hash6 [element a] | provenance | | -| hash_flow.rb:76:26:76:35 | call to taint | hash_flow.rb:76:13:76:47 | ...[...] [element a] | provenance | | +| hash_flow.rb:76:18:76:46 | call to [] [element a] | hash_flow.rb:76:13:76:47 | ...[...] [element a] | provenance | | +| hash_flow.rb:76:26:76:35 | call to taint | hash_flow.rb:76:18:76:46 | call to [] [element a] | provenance | | | hash_flow.rb:77:10:77:14 | hash6 [element a] | hash_flow.rb:77:10:77:19 | ...[...] | provenance | | | hash_flow.rb:84:5:84:9 | hash1 [element :a] | hash_flow.rb:85:10:85:14 | hash1 [element :a] | provenance | | | hash_flow.rb:84:13:84:42 | call to [] [element :a] | hash_flow.rb:84:5:84:9 | hash1 [element :a] | provenance | | | hash_flow.rb:84:26:84:35 | call to taint | hash_flow.rb:84:13:84:42 | call to [] [element :a] | provenance | | | hash_flow.rb:85:10:85:14 | hash1 [element :a] | hash_flow.rb:85:10:85:18 | ...[...] | provenance | | | hash_flow.rb:92:5:92:8 | hash [element :a] | hash_flow.rb:96:30:96:33 | hash [element :a] | provenance | | -| hash_flow.rb:93:15:93:24 | call to taint | hash_flow.rb:92:5:92:8 | hash [element :a] | provenance | | +| hash_flow.rb:92:12:95:5 | call to [] [element :a] | hash_flow.rb:92:5:92:8 | hash [element :a] | provenance | | +| hash_flow.rb:93:15:93:24 | call to taint | hash_flow.rb:92:12:95:5 | call to [] [element :a] | provenance | | | hash_flow.rb:96:5:96:9 | hash2 [element :a] | hash_flow.rb:97:10:97:14 | hash2 [element :a] | provenance | | | hash_flow.rb:96:13:96:34 | call to try_convert [element :a] | hash_flow.rb:96:5:96:9 | hash2 [element :a] | provenance | | | hash_flow.rb:96:30:96:33 | hash [element :a] | hash_flow.rb:96:13:96:34 | call to try_convert [element :a] | provenance | | @@ -98,14 +108,16 @@ edges | hash_flow.rb:120:10:120:13 | hash [element] | hash_flow.rb:120:10:120:17 | ...[...] | provenance | | | hash_flow.rb:127:5:127:8 | hash [element :a] | hash_flow.rb:131:5:131:8 | hash [element :a] | provenance | | | hash_flow.rb:127:5:127:8 | hash [element :a] | hash_flow.rb:134:5:134:8 | hash [element :a] | provenance | | -| hash_flow.rb:128:15:128:24 | call to taint | hash_flow.rb:127:5:127:8 | hash [element :a] | provenance | | +| hash_flow.rb:127:12:130:5 | call to [] [element :a] | hash_flow.rb:127:5:127:8 | hash [element :a] | provenance | | +| hash_flow.rb:128:15:128:24 | call to taint | hash_flow.rb:127:12:130:5 | call to [] [element :a] | provenance | | | hash_flow.rb:131:5:131:8 | hash [element :a] | hash_flow.rb:131:18:131:29 | key_or_value | provenance | | | hash_flow.rb:131:18:131:29 | key_or_value | hash_flow.rb:132:14:132:25 | key_or_value | provenance | | | hash_flow.rb:134:5:134:8 | hash [element :a] | hash_flow.rb:134:22:134:26 | value | provenance | | | hash_flow.rb:134:22:134:26 | value | hash_flow.rb:136:14:136:18 | value | provenance | | | hash_flow.rb:143:5:143:8 | hash [element :a] | hash_flow.rb:147:9:147:12 | hash [element :a] | provenance | | | hash_flow.rb:143:5:143:8 | hash [element :a] | hash_flow.rb:151:9:151:12 | hash [element :a] | provenance | | -| hash_flow.rb:144:15:144:25 | call to taint | hash_flow.rb:143:5:143:8 | hash [element :a] | provenance | | +| hash_flow.rb:143:12:146:5 | call to [] [element :a] | hash_flow.rb:143:5:143:8 | hash [element :a] | provenance | | +| hash_flow.rb:144:15:144:25 | call to taint | hash_flow.rb:143:12:146:5 | call to [] [element :a] | provenance | | | hash_flow.rb:147:5:147:5 | b [element 1] | hash_flow.rb:149:10:149:10 | b [element 1] | provenance | | | hash_flow.rb:147:5:147:5 | b [element 1] | hash_flow.rb:150:10:150:10 | b [element 1] | provenance | | | hash_flow.rb:147:9:147:12 | hash [element :a] | hash_flow.rb:147:9:147:22 | call to assoc [element 1] | provenance | | @@ -117,18 +129,21 @@ edges | hash_flow.rb:151:9:151:21 | call to assoc [element 1] | hash_flow.rb:151:5:151:5 | c [element 1] | provenance | | | hash_flow.rb:152:10:152:10 | c [element 1] | hash_flow.rb:152:10:152:13 | ...[...] | provenance | | | hash_flow.rb:169:5:169:8 | hash [element :a] | hash_flow.rb:173:9:173:12 | hash [element :a] | provenance | | -| hash_flow.rb:170:15:170:25 | call to taint | hash_flow.rb:169:5:169:8 | hash [element :a] | provenance | | +| hash_flow.rb:169:12:172:5 | call to [] [element :a] | hash_flow.rb:169:5:169:8 | hash [element :a] | provenance | | +| hash_flow.rb:170:15:170:25 | call to taint | hash_flow.rb:169:12:172:5 | call to [] [element :a] | provenance | | | hash_flow.rb:173:5:173:5 | a [element :a] | hash_flow.rb:174:10:174:10 | a [element :a] | provenance | | | hash_flow.rb:173:9:173:12 | hash [element :a] | hash_flow.rb:173:9:173:20 | call to compact [element :a] | provenance | | | hash_flow.rb:173:9:173:20 | call to compact [element :a] | hash_flow.rb:173:5:173:5 | a [element :a] | provenance | | | hash_flow.rb:174:10:174:10 | a [element :a] | hash_flow.rb:174:10:174:14 | ...[...] | provenance | | | hash_flow.rb:181:5:181:8 | hash [element :a] | hash_flow.rb:185:9:185:12 | hash [element :a] | provenance | | -| hash_flow.rb:182:15:182:25 | call to taint | hash_flow.rb:181:5:181:8 | hash [element :a] | provenance | | +| hash_flow.rb:181:12:184:5 | call to [] [element :a] | hash_flow.rb:181:5:181:8 | hash [element :a] | provenance | | +| hash_flow.rb:182:15:182:25 | call to taint | hash_flow.rb:181:12:184:5 | call to [] [element :a] | provenance | | | hash_flow.rb:185:5:185:5 | a | hash_flow.rb:186:10:186:10 | a | provenance | | | hash_flow.rb:185:9:185:12 | hash [element :a] | hash_flow.rb:185:9:185:23 | call to delete | provenance | | | hash_flow.rb:185:9:185:23 | call to delete | hash_flow.rb:185:5:185:5 | a | provenance | | | hash_flow.rb:193:5:193:8 | hash [element :a] | hash_flow.rb:197:9:197:12 | hash [element :a] | provenance | | -| hash_flow.rb:194:15:194:25 | call to taint | hash_flow.rb:193:5:193:8 | hash [element :a] | provenance | | +| hash_flow.rb:193:12:196:5 | call to [] [element :a] | hash_flow.rb:193:5:193:8 | hash [element :a] | provenance | | +| hash_flow.rb:194:15:194:25 | call to taint | hash_flow.rb:193:12:196:5 | call to [] [element :a] | provenance | | | hash_flow.rb:197:5:197:5 | a [element :a] | hash_flow.rb:201:10:201:10 | a [element :a] | provenance | | | hash_flow.rb:197:9:197:12 | [post] hash [element :a] | hash_flow.rb:202:10:202:13 | hash [element :a] | provenance | | | hash_flow.rb:197:9:197:12 | hash [element :a] | hash_flow.rb:197:9:197:12 | [post] hash [element :a] | provenance | | @@ -140,12 +155,16 @@ edges | hash_flow.rb:202:10:202:13 | hash [element :a] | hash_flow.rb:202:10:202:17 | ...[...] | provenance | | | hash_flow.rb:209:5:209:8 | hash [element :a] | hash_flow.rb:217:10:217:13 | hash [element :a] | provenance | | | hash_flow.rb:209:5:209:8 | hash [element :c, element :d] | hash_flow.rb:219:10:219:13 | hash [element :c, element :d] | provenance | | -| hash_flow.rb:210:15:210:25 | call to taint | hash_flow.rb:209:5:209:8 | hash [element :a] | provenance | | -| hash_flow.rb:213:19:213:29 | call to taint | hash_flow.rb:209:5:209:8 | hash [element :c, element :d] | provenance | | +| hash_flow.rb:209:12:216:5 | call to [] [element :a] | hash_flow.rb:209:5:209:8 | hash [element :a] | provenance | | +| hash_flow.rb:209:12:216:5 | call to [] [element :c, element :d] | hash_flow.rb:209:5:209:8 | hash [element :c, element :d] | provenance | | +| hash_flow.rb:210:15:210:25 | call to taint | hash_flow.rb:209:12:216:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:212:15:215:9 | call to [] [element :d] | hash_flow.rb:209:12:216:5 | call to [] [element :c, element :d] | provenance | | +| hash_flow.rb:213:19:213:29 | call to taint | hash_flow.rb:212:15:215:9 | call to [] [element :d] | provenance | | | hash_flow.rb:217:10:217:13 | hash [element :a] | hash_flow.rb:217:10:217:21 | call to dig | provenance | | | hash_flow.rb:219:10:219:13 | hash [element :c, element :d] | hash_flow.rb:219:10:219:24 | call to dig | provenance | | | hash_flow.rb:226:5:226:8 | hash [element :a] | hash_flow.rb:230:9:230:12 | hash [element :a] | provenance | | -| hash_flow.rb:227:15:227:25 | call to taint | hash_flow.rb:226:5:226:8 | hash [element :a] | provenance | | +| hash_flow.rb:226:12:229:5 | call to [] [element :a] | hash_flow.rb:226:5:226:8 | hash [element :a] | provenance | | +| hash_flow.rb:227:15:227:25 | call to taint | hash_flow.rb:226:12:229:5 | call to [] [element :a] | provenance | | | hash_flow.rb:230:5:230:5 | x [element :a] | hash_flow.rb:234:10:234:10 | x [element :a] | provenance | | | hash_flow.rb:230:9:230:12 | hash [element :a] | hash_flow.rb:230:9:233:7 | call to each [element :a] | provenance | | | hash_flow.rb:230:9:230:12 | hash [element :a] | hash_flow.rb:230:28:230:32 | value | provenance | | @@ -153,13 +172,15 @@ edges | hash_flow.rb:230:28:230:32 | value | hash_flow.rb:232:14:232:18 | value | provenance | | | hash_flow.rb:234:10:234:10 | x [element :a] | hash_flow.rb:234:10:234:14 | ...[...] | provenance | | | hash_flow.rb:241:5:241:8 | hash [element :a] | hash_flow.rb:245:9:245:12 | hash [element :a] | provenance | | -| hash_flow.rb:242:15:242:25 | call to taint | hash_flow.rb:241:5:241:8 | hash [element :a] | provenance | | +| hash_flow.rb:241:12:244:5 | call to [] [element :a] | hash_flow.rb:241:5:241:8 | hash [element :a] | provenance | | +| hash_flow.rb:242:15:242:25 | call to taint | hash_flow.rb:241:12:244:5 | call to [] [element :a] | provenance | | | hash_flow.rb:245:5:245:5 | x [element :a] | hash_flow.rb:248:10:248:10 | x [element :a] | provenance | | | hash_flow.rb:245:9:245:12 | hash [element :a] | hash_flow.rb:245:9:247:7 | call to each_key [element :a] | provenance | | | hash_flow.rb:245:9:247:7 | call to each_key [element :a] | hash_flow.rb:245:5:245:5 | x [element :a] | provenance | | | hash_flow.rb:248:10:248:10 | x [element :a] | hash_flow.rb:248:10:248:14 | ...[...] | provenance | | | hash_flow.rb:255:5:255:8 | hash [element :a] | hash_flow.rb:259:9:259:12 | hash [element :a] | provenance | | -| hash_flow.rb:256:15:256:25 | call to taint | hash_flow.rb:255:5:255:8 | hash [element :a] | provenance | | +| hash_flow.rb:255:12:258:5 | call to [] [element :a] | hash_flow.rb:255:5:255:8 | hash [element :a] | provenance | | +| hash_flow.rb:256:15:256:25 | call to taint | hash_flow.rb:255:12:258:5 | call to [] [element :a] | provenance | | | hash_flow.rb:259:5:259:5 | x [element :a] | hash_flow.rb:263:10:263:10 | x [element :a] | provenance | | | hash_flow.rb:259:9:259:12 | hash [element :a] | hash_flow.rb:259:9:262:7 | call to each_pair [element :a] | provenance | | | hash_flow.rb:259:9:259:12 | hash [element :a] | hash_flow.rb:259:33:259:37 | value | provenance | | @@ -167,7 +188,8 @@ edges | hash_flow.rb:259:33:259:37 | value | hash_flow.rb:261:14:261:18 | value | provenance | | | hash_flow.rb:263:10:263:10 | x [element :a] | hash_flow.rb:263:10:263:14 | ...[...] | provenance | | | hash_flow.rb:270:5:270:8 | hash [element :a] | hash_flow.rb:274:9:274:12 | hash [element :a] | provenance | | -| hash_flow.rb:271:15:271:25 | call to taint | hash_flow.rb:270:5:270:8 | hash [element :a] | provenance | | +| hash_flow.rb:270:12:273:5 | call to [] [element :a] | hash_flow.rb:270:5:270:8 | hash [element :a] | provenance | | +| hash_flow.rb:271:15:271:25 | call to taint | hash_flow.rb:270:12:273:5 | call to [] [element :a] | provenance | | | hash_flow.rb:274:5:274:5 | x [element :a] | hash_flow.rb:277:10:277:10 | x [element :a] | provenance | | | hash_flow.rb:274:9:274:12 | hash [element :a] | hash_flow.rb:274:9:276:7 | call to each_value [element :a] | provenance | | | hash_flow.rb:274:9:274:12 | hash [element :a] | hash_flow.rb:274:29:274:33 | value | provenance | | @@ -175,7 +197,8 @@ edges | hash_flow.rb:274:29:274:33 | value | hash_flow.rb:275:14:275:18 | value | provenance | | | hash_flow.rb:277:10:277:10 | x [element :a] | hash_flow.rb:277:10:277:14 | ...[...] | provenance | | | hash_flow.rb:284:5:284:8 | hash [element :c] | hash_flow.rb:290:9:290:12 | hash [element :c] | provenance | | -| hash_flow.rb:287:15:287:25 | call to taint | hash_flow.rb:284:5:284:8 | hash [element :c] | provenance | | +| hash_flow.rb:284:12:289:5 | call to [] [element :c] | hash_flow.rb:284:5:284:8 | hash [element :c] | provenance | | +| hash_flow.rb:287:15:287:25 | call to taint | hash_flow.rb:284:12:289:5 | call to [] [element :c] | provenance | | | hash_flow.rb:290:5:290:5 | x [element :c] | hash_flow.rb:293:10:293:10 | x [element :c] | provenance | | | hash_flow.rb:290:9:290:12 | hash [element :c] | hash_flow.rb:290:9:290:28 | call to except [element :c] | provenance | | | hash_flow.rb:290:9:290:28 | call to except [element :c] | hash_flow.rb:290:5:290:5 | x [element :c] | provenance | | @@ -186,8 +209,10 @@ edges | hash_flow.rb:300:5:300:8 | hash [element :a] | hash_flow.rb:315:9:315:12 | hash [element :a] | provenance | | | hash_flow.rb:300:5:300:8 | hash [element :c] | hash_flow.rb:305:9:305:12 | hash [element :c] | provenance | | | hash_flow.rb:300:5:300:8 | hash [element :c] | hash_flow.rb:315:9:315:12 | hash [element :c] | provenance | | -| hash_flow.rb:301:15:301:25 | call to taint | hash_flow.rb:300:5:300:8 | hash [element :a] | provenance | | -| hash_flow.rb:303:15:303:25 | call to taint | hash_flow.rb:300:5:300:8 | hash [element :c] | provenance | | +| hash_flow.rb:300:12:304:5 | call to [] [element :a] | hash_flow.rb:300:5:300:8 | hash [element :a] | provenance | | +| hash_flow.rb:300:12:304:5 | call to [] [element :c] | hash_flow.rb:300:5:300:8 | hash [element :c] | provenance | | +| hash_flow.rb:301:15:301:25 | call to taint | hash_flow.rb:300:12:304:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:303:15:303:25 | call to taint | hash_flow.rb:300:12:304:5 | call to [] [element :c] | provenance | | | hash_flow.rb:305:5:305:5 | b | hash_flow.rb:308:10:308:10 | b | provenance | | | hash_flow.rb:305:9:305:12 | hash [element :a] | hash_flow.rb:305:9:307:7 | call to fetch | provenance | | | hash_flow.rb:305:9:305:12 | hash [element :c] | hash_flow.rb:305:9:307:7 | call to fetch | provenance | | @@ -214,8 +239,10 @@ edges | hash_flow.rb:322:5:322:8 | hash [element :a] | hash_flow.rb:334:9:334:12 | hash [element :a] | provenance | | | hash_flow.rb:322:5:322:8 | hash [element :c] | hash_flow.rb:327:9:327:12 | hash [element :c] | provenance | | | hash_flow.rb:322:5:322:8 | hash [element :c] | hash_flow.rb:334:9:334:12 | hash [element :c] | provenance | | -| hash_flow.rb:323:15:323:25 | call to taint | hash_flow.rb:322:5:322:8 | hash [element :a] | provenance | | -| hash_flow.rb:325:15:325:25 | call to taint | hash_flow.rb:322:5:322:8 | hash [element :c] | provenance | | +| hash_flow.rb:322:12:326:5 | call to [] [element :a] | hash_flow.rb:322:5:322:8 | hash [element :a] | provenance | | +| hash_flow.rb:322:12:326:5 | call to [] [element :c] | hash_flow.rb:322:5:322:8 | hash [element :c] | provenance | | +| hash_flow.rb:323:15:323:25 | call to taint | hash_flow.rb:322:12:326:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:325:15:325:25 | call to taint | hash_flow.rb:322:12:326:5 | call to [] [element :c] | provenance | | | hash_flow.rb:327:5:327:5 | b [element] | hash_flow.rb:331:10:331:10 | b [element] | provenance | | | hash_flow.rb:327:9:327:12 | hash [element :a] | hash_flow.rb:327:9:330:7 | call to fetch_values [element] | provenance | | | hash_flow.rb:327:9:327:12 | hash [element :c] | hash_flow.rb:327:9:330:7 | call to fetch_values [element] | provenance | | @@ -235,8 +262,10 @@ edges | hash_flow.rb:335:10:335:10 | b [element] | hash_flow.rb:335:10:335:13 | ...[...] | provenance | | | hash_flow.rb:341:5:341:8 | hash [element :a] | hash_flow.rb:346:9:346:12 | hash [element :a] | provenance | | | hash_flow.rb:341:5:341:8 | hash [element :c] | hash_flow.rb:346:9:346:12 | hash [element :c] | provenance | | -| hash_flow.rb:342:15:342:25 | call to taint | hash_flow.rb:341:5:341:8 | hash [element :a] | provenance | | -| hash_flow.rb:344:15:344:25 | call to taint | hash_flow.rb:341:5:341:8 | hash [element :c] | provenance | | +| hash_flow.rb:341:12:345:5 | call to [] [element :a] | hash_flow.rb:341:5:341:8 | hash [element :a] | provenance | | +| hash_flow.rb:341:12:345:5 | call to [] [element :c] | hash_flow.rb:341:5:341:8 | hash [element :c] | provenance | | +| hash_flow.rb:342:15:342:25 | call to taint | hash_flow.rb:341:12:345:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:344:15:344:25 | call to taint | hash_flow.rb:341:12:345:5 | call to [] [element :c] | provenance | | | hash_flow.rb:346:5:346:5 | b [element :a] | hash_flow.rb:351:11:351:11 | b [element :a] | provenance | | | hash_flow.rb:346:9:346:12 | hash [element :a] | hash_flow.rb:346:9:350:7 | call to filter [element :a] | provenance | | | hash_flow.rb:346:9:346:12 | hash [element :a] | hash_flow.rb:346:30:346:34 | value | provenance | | @@ -247,8 +276,10 @@ edges | hash_flow.rb:351:11:351:15 | ...[...] | hash_flow.rb:351:10:351:16 | ( ... ) | provenance | | | hash_flow.rb:357:5:357:8 | hash [element :a] | hash_flow.rb:362:5:362:8 | hash [element :a] | provenance | | | hash_flow.rb:357:5:357:8 | hash [element :c] | hash_flow.rb:362:5:362:8 | hash [element :c] | provenance | | -| hash_flow.rb:358:15:358:25 | call to taint | hash_flow.rb:357:5:357:8 | hash [element :a] | provenance | | -| hash_flow.rb:360:15:360:25 | call to taint | hash_flow.rb:357:5:357:8 | hash [element :c] | provenance | | +| hash_flow.rb:357:12:361:5 | call to [] [element :a] | hash_flow.rb:357:5:357:8 | hash [element :a] | provenance | | +| hash_flow.rb:357:12:361:5 | call to [] [element :c] | hash_flow.rb:357:5:357:8 | hash [element :c] | provenance | | +| hash_flow.rb:358:15:358:25 | call to taint | hash_flow.rb:357:12:361:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:360:15:360:25 | call to taint | hash_flow.rb:357:12:361:5 | call to [] [element :c] | provenance | | | hash_flow.rb:362:5:362:8 | [post] hash [element :a] | hash_flow.rb:367:11:367:14 | hash [element :a] | provenance | | | hash_flow.rb:362:5:362:8 | hash [element :a] | hash_flow.rb:362:5:362:8 | [post] hash [element :a] | provenance | | | hash_flow.rb:362:5:362:8 | hash [element :a] | hash_flow.rb:362:27:362:31 | value | provenance | | @@ -258,8 +289,10 @@ edges | hash_flow.rb:367:11:367:18 | ...[...] | hash_flow.rb:367:10:367:19 | ( ... ) | provenance | | | hash_flow.rb:373:5:373:8 | hash [element :a] | hash_flow.rb:378:9:378:12 | hash [element :a] | provenance | | | hash_flow.rb:373:5:373:8 | hash [element :c] | hash_flow.rb:378:9:378:12 | hash [element :c] | provenance | | -| hash_flow.rb:374:15:374:25 | call to taint | hash_flow.rb:373:5:373:8 | hash [element :a] | provenance | | -| hash_flow.rb:376:15:376:25 | call to taint | hash_flow.rb:373:5:373:8 | hash [element :c] | provenance | | +| hash_flow.rb:373:12:377:5 | call to [] [element :a] | hash_flow.rb:373:5:373:8 | hash [element :a] | provenance | | +| hash_flow.rb:373:12:377:5 | call to [] [element :c] | hash_flow.rb:373:5:373:8 | hash [element :c] | provenance | | +| hash_flow.rb:374:15:374:25 | call to taint | hash_flow.rb:373:12:377:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:376:15:376:25 | call to taint | hash_flow.rb:373:12:377:5 | call to [] [element :c] | provenance | | | hash_flow.rb:378:5:378:5 | b [element] | hash_flow.rb:379:11:379:11 | b [element] | provenance | | | hash_flow.rb:378:9:378:12 | hash [element :a] | hash_flow.rb:378:9:378:20 | call to flatten [element] | provenance | | | hash_flow.rb:378:9:378:12 | hash [element :c] | hash_flow.rb:378:9:378:20 | call to flatten [element] | provenance | | @@ -268,8 +301,10 @@ edges | hash_flow.rb:379:11:379:14 | ...[...] | hash_flow.rb:379:10:379:15 | ( ... ) | provenance | | | hash_flow.rb:385:5:385:8 | hash [element :a] | hash_flow.rb:390:9:390:12 | hash [element :a] | provenance | | | hash_flow.rb:385:5:385:8 | hash [element :c] | hash_flow.rb:390:9:390:12 | hash [element :c] | provenance | | -| hash_flow.rb:386:15:386:25 | call to taint | hash_flow.rb:385:5:385:8 | hash [element :a] | provenance | | -| hash_flow.rb:388:15:388:25 | call to taint | hash_flow.rb:385:5:385:8 | hash [element :c] | provenance | | +| hash_flow.rb:385:12:389:5 | call to [] [element :a] | hash_flow.rb:385:5:385:8 | hash [element :a] | provenance | | +| hash_flow.rb:385:12:389:5 | call to [] [element :c] | hash_flow.rb:385:5:385:8 | hash [element :c] | provenance | | +| hash_flow.rb:386:15:386:25 | call to taint | hash_flow.rb:385:12:389:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:388:15:388:25 | call to taint | hash_flow.rb:385:12:389:5 | call to [] [element :c] | provenance | | | hash_flow.rb:390:5:390:5 | b [element :a] | hash_flow.rb:396:11:396:11 | b [element :a] | provenance | | | hash_flow.rb:390:9:390:12 | [post] hash [element :a] | hash_flow.rb:395:11:395:14 | hash [element :a] | provenance | | | hash_flow.rb:390:9:390:12 | hash [element :a] | hash_flow.rb:390:9:390:12 | [post] hash [element :a] | provenance | | @@ -284,12 +319,16 @@ edges | hash_flow.rb:396:11:396:15 | ...[...] | hash_flow.rb:396:10:396:16 | ( ... ) | provenance | | | hash_flow.rb:402:5:402:9 | hash1 [element :a] | hash_flow.rb:412:12:412:16 | hash1 [element :a] | provenance | | | hash_flow.rb:402:5:402:9 | hash1 [element :c] | hash_flow.rb:412:12:412:16 | hash1 [element :c] | provenance | | -| hash_flow.rb:403:15:403:25 | call to taint | hash_flow.rb:402:5:402:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:405:15:405:25 | call to taint | hash_flow.rb:402:5:402:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:402:13:406:5 | call to [] [element :a] | hash_flow.rb:402:5:402:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:402:13:406:5 | call to [] [element :c] | hash_flow.rb:402:5:402:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:403:15:403:25 | call to taint | hash_flow.rb:402:13:406:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:405:15:405:25 | call to taint | hash_flow.rb:402:13:406:5 | call to [] [element :c] | provenance | | | hash_flow.rb:407:5:407:9 | hash2 [element :d] | hash_flow.rb:412:24:412:28 | hash2 [element :d] | provenance | | | hash_flow.rb:407:5:407:9 | hash2 [element :f] | hash_flow.rb:412:24:412:28 | hash2 [element :f] | provenance | | -| hash_flow.rb:408:15:408:25 | call to taint | hash_flow.rb:407:5:407:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:410:15:410:25 | call to taint | hash_flow.rb:407:5:407:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:407:13:411:5 | call to [] [element :d] | hash_flow.rb:407:5:407:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:407:13:411:5 | call to [] [element :f] | hash_flow.rb:407:5:407:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:408:15:408:25 | call to taint | hash_flow.rb:407:13:411:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:410:15:410:25 | call to taint | hash_flow.rb:407:13:411:5 | call to [] [element :f] | provenance | | | hash_flow.rb:412:5:412:8 | hash [element :a] | hash_flow.rb:417:11:417:14 | hash [element :a] | provenance | | | hash_flow.rb:412:5:412:8 | hash [element :c] | hash_flow.rb:419:11:419:14 | hash [element :c] | provenance | | | hash_flow.rb:412:5:412:8 | hash [element :d] | hash_flow.rb:420:11:420:14 | hash [element :d] | provenance | | @@ -322,12 +361,16 @@ edges | hash_flow.rb:422:11:422:18 | ...[...] | hash_flow.rb:422:10:422:19 | ( ... ) | provenance | | | hash_flow.rb:428:5:428:9 | hash1 [element :a] | hash_flow.rb:438:12:438:16 | hash1 [element :a] | provenance | | | hash_flow.rb:428:5:428:9 | hash1 [element :c] | hash_flow.rb:438:12:438:16 | hash1 [element :c] | provenance | | -| hash_flow.rb:429:15:429:25 | call to taint | hash_flow.rb:428:5:428:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:431:15:431:25 | call to taint | hash_flow.rb:428:5:428:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:428:13:432:5 | call to [] [element :a] | hash_flow.rb:428:5:428:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:428:13:432:5 | call to [] [element :c] | hash_flow.rb:428:5:428:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:429:15:429:25 | call to taint | hash_flow.rb:428:13:432:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:431:15:431:25 | call to taint | hash_flow.rb:428:13:432:5 | call to [] [element :c] | provenance | | | hash_flow.rb:433:5:433:9 | hash2 [element :d] | hash_flow.rb:438:25:438:29 | hash2 [element :d] | provenance | | | hash_flow.rb:433:5:433:9 | hash2 [element :f] | hash_flow.rb:438:25:438:29 | hash2 [element :f] | provenance | | -| hash_flow.rb:434:15:434:25 | call to taint | hash_flow.rb:433:5:433:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:436:15:436:25 | call to taint | hash_flow.rb:433:5:433:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:433:13:437:5 | call to [] [element :d] | hash_flow.rb:433:5:433:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:433:13:437:5 | call to [] [element :f] | hash_flow.rb:433:5:433:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:434:15:434:25 | call to taint | hash_flow.rb:433:13:437:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:436:15:436:25 | call to taint | hash_flow.rb:433:13:437:5 | call to [] [element :f] | provenance | | | hash_flow.rb:438:5:438:8 | hash [element :a] | hash_flow.rb:443:11:443:14 | hash [element :a] | provenance | | | hash_flow.rb:438:5:438:8 | hash [element :c] | hash_flow.rb:445:11:445:14 | hash [element :c] | provenance | | | hash_flow.rb:438:5:438:8 | hash [element :d] | hash_flow.rb:446:11:446:14 | hash [element :d] | provenance | | @@ -375,13 +418,15 @@ edges | hash_flow.rb:455:11:455:15 | hash1 [element :f] | hash_flow.rb:455:11:455:19 | ...[...] | provenance | | | hash_flow.rb:455:11:455:19 | ...[...] | hash_flow.rb:455:10:455:20 | ( ... ) | provenance | | | hash_flow.rb:461:5:461:8 | hash [element :a] | hash_flow.rb:465:9:465:12 | hash [element :a] | provenance | | -| hash_flow.rb:462:15:462:25 | call to taint | hash_flow.rb:461:5:461:8 | hash [element :a] | provenance | | +| hash_flow.rb:461:12:464:5 | call to [] [element :a] | hash_flow.rb:461:5:461:8 | hash [element :a] | provenance | | +| hash_flow.rb:462:15:462:25 | call to taint | hash_flow.rb:461:12:464:5 | call to [] [element :a] | provenance | | | hash_flow.rb:465:5:465:5 | b [element 1] | hash_flow.rb:467:10:467:10 | b [element 1] | provenance | | | hash_flow.rb:465:9:465:12 | hash [element :a] | hash_flow.rb:465:9:465:22 | call to rassoc [element 1] | provenance | | | hash_flow.rb:465:9:465:22 | call to rassoc [element 1] | hash_flow.rb:465:5:465:5 | b [element 1] | provenance | | | hash_flow.rb:467:10:467:10 | b [element 1] | hash_flow.rb:467:10:467:13 | ...[...] | provenance | | | hash_flow.rb:473:5:473:8 | hash [element :a] | hash_flow.rb:477:9:477:12 | hash [element :a] | provenance | | -| hash_flow.rb:474:15:474:25 | call to taint | hash_flow.rb:473:5:473:8 | hash [element :a] | provenance | | +| hash_flow.rb:473:12:476:5 | call to [] [element :a] | hash_flow.rb:473:5:473:8 | hash [element :a] | provenance | | +| hash_flow.rb:474:15:474:25 | call to taint | hash_flow.rb:473:12:476:5 | call to [] [element :a] | provenance | | | hash_flow.rb:477:5:477:5 | b [element :a] | hash_flow.rb:482:10:482:10 | b [element :a] | provenance | | | hash_flow.rb:477:9:477:12 | hash [element :a] | hash_flow.rb:477:9:481:7 | call to reject [element :a] | provenance | | | hash_flow.rb:477:9:477:12 | hash [element :a] | hash_flow.rb:477:29:477:33 | value | provenance | | @@ -389,7 +434,8 @@ edges | hash_flow.rb:477:29:477:33 | value | hash_flow.rb:479:14:479:18 | value | provenance | | | hash_flow.rb:482:10:482:10 | b [element :a] | hash_flow.rb:482:10:482:14 | ...[...] | provenance | | | hash_flow.rb:488:5:488:8 | hash [element :a] | hash_flow.rb:492:9:492:12 | hash [element :a] | provenance | | -| hash_flow.rb:489:15:489:25 | call to taint | hash_flow.rb:488:5:488:8 | hash [element :a] | provenance | | +| hash_flow.rb:488:12:491:5 | call to [] [element :a] | hash_flow.rb:488:5:488:8 | hash [element :a] | provenance | | +| hash_flow.rb:489:15:489:25 | call to taint | hash_flow.rb:488:12:491:5 | call to [] [element :a] | provenance | | | hash_flow.rb:492:5:492:5 | b [element :a] | hash_flow.rb:497:10:497:10 | b [element :a] | provenance | | | hash_flow.rb:492:9:492:12 | [post] hash [element :a] | hash_flow.rb:498:10:498:13 | hash [element :a] | provenance | | | hash_flow.rb:492:9:492:12 | hash [element :a] | hash_flow.rb:492:9:492:12 | [post] hash [element :a] | provenance | | @@ -401,8 +447,10 @@ edges | hash_flow.rb:498:10:498:13 | hash [element :a] | hash_flow.rb:498:10:498:17 | ...[...] | provenance | | | hash_flow.rb:504:5:504:8 | hash [element :a] | hash_flow.rb:512:19:512:22 | hash [element :a] | provenance | | | hash_flow.rb:504:5:504:8 | hash [element :c] | hash_flow.rb:512:19:512:22 | hash [element :c] | provenance | | -| hash_flow.rb:505:15:505:25 | call to taint | hash_flow.rb:504:5:504:8 | hash [element :a] | provenance | | -| hash_flow.rb:507:15:507:25 | call to taint | hash_flow.rb:504:5:504:8 | hash [element :c] | provenance | | +| hash_flow.rb:504:12:508:5 | call to [] [element :a] | hash_flow.rb:504:5:504:8 | hash [element :a] | provenance | | +| hash_flow.rb:504:12:508:5 | call to [] [element :c] | hash_flow.rb:504:5:504:8 | hash [element :c] | provenance | | +| hash_flow.rb:505:15:505:25 | call to taint | hash_flow.rb:504:12:508:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:507:15:507:25 | call to taint | hash_flow.rb:504:12:508:5 | call to [] [element :c] | provenance | | | hash_flow.rb:512:5:512:9 | [post] hash2 [element :a] | hash_flow.rb:513:11:513:15 | hash2 [element :a] | provenance | | | hash_flow.rb:512:5:512:9 | [post] hash2 [element :c] | hash_flow.rb:515:11:515:15 | hash2 [element :c] | provenance | | | hash_flow.rb:512:19:512:22 | hash [element :a] | hash_flow.rb:512:5:512:9 | [post] hash2 [element :a] | provenance | | @@ -413,8 +461,10 @@ edges | hash_flow.rb:515:11:515:19 | ...[...] | hash_flow.rb:515:10:515:20 | ( ... ) | provenance | | | hash_flow.rb:519:5:519:8 | hash [element :a] | hash_flow.rb:524:9:524:12 | hash [element :a] | provenance | | | hash_flow.rb:519:5:519:8 | hash [element :c] | hash_flow.rb:524:9:524:12 | hash [element :c] | provenance | | -| hash_flow.rb:520:15:520:25 | call to taint | hash_flow.rb:519:5:519:8 | hash [element :a] | provenance | | -| hash_flow.rb:522:15:522:25 | call to taint | hash_flow.rb:519:5:519:8 | hash [element :c] | provenance | | +| hash_flow.rb:519:12:523:5 | call to [] [element :a] | hash_flow.rb:519:5:519:8 | hash [element :a] | provenance | | +| hash_flow.rb:519:12:523:5 | call to [] [element :c] | hash_flow.rb:519:5:519:8 | hash [element :c] | provenance | | +| hash_flow.rb:520:15:520:25 | call to taint | hash_flow.rb:519:12:523:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:522:15:522:25 | call to taint | hash_flow.rb:519:12:523:5 | call to [] [element :c] | provenance | | | hash_flow.rb:524:5:524:5 | b [element :a] | hash_flow.rb:529:11:529:11 | b [element :a] | provenance | | | hash_flow.rb:524:9:524:12 | hash [element :a] | hash_flow.rb:524:9:528:7 | call to select [element :a] | provenance | | | hash_flow.rb:524:9:524:12 | hash [element :a] | hash_flow.rb:524:30:524:34 | value | provenance | | @@ -425,8 +475,10 @@ edges | hash_flow.rb:529:11:529:15 | ...[...] | hash_flow.rb:529:10:529:16 | ( ... ) | provenance | | | hash_flow.rb:535:5:535:8 | hash [element :a] | hash_flow.rb:540:5:540:8 | hash [element :a] | provenance | | | hash_flow.rb:535:5:535:8 | hash [element :c] | hash_flow.rb:540:5:540:8 | hash [element :c] | provenance | | -| hash_flow.rb:536:15:536:25 | call to taint | hash_flow.rb:535:5:535:8 | hash [element :a] | provenance | | -| hash_flow.rb:538:15:538:25 | call to taint | hash_flow.rb:535:5:535:8 | hash [element :c] | provenance | | +| hash_flow.rb:535:12:539:5 | call to [] [element :a] | hash_flow.rb:535:5:535:8 | hash [element :a] | provenance | | +| hash_flow.rb:535:12:539:5 | call to [] [element :c] | hash_flow.rb:535:5:535:8 | hash [element :c] | provenance | | +| hash_flow.rb:536:15:536:25 | call to taint | hash_flow.rb:535:12:539:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:538:15:538:25 | call to taint | hash_flow.rb:535:12:539:5 | call to [] [element :c] | provenance | | | hash_flow.rb:540:5:540:8 | [post] hash [element :a] | hash_flow.rb:545:11:545:14 | hash [element :a] | provenance | | | hash_flow.rb:540:5:540:8 | hash [element :a] | hash_flow.rb:540:5:540:8 | [post] hash [element :a] | provenance | | | hash_flow.rb:540:5:540:8 | hash [element :a] | hash_flow.rb:540:27:540:31 | value | provenance | | @@ -436,8 +488,10 @@ edges | hash_flow.rb:545:11:545:18 | ...[...] | hash_flow.rb:545:10:545:19 | ( ... ) | provenance | | | hash_flow.rb:551:5:551:8 | hash [element :a] | hash_flow.rb:556:9:556:12 | hash [element :a] | provenance | | | hash_flow.rb:551:5:551:8 | hash [element :c] | hash_flow.rb:556:9:556:12 | hash [element :c] | provenance | | -| hash_flow.rb:552:15:552:25 | call to taint | hash_flow.rb:551:5:551:8 | hash [element :a] | provenance | | -| hash_flow.rb:554:15:554:25 | call to taint | hash_flow.rb:551:5:551:8 | hash [element :c] | provenance | | +| hash_flow.rb:551:12:555:5 | call to [] [element :a] | hash_flow.rb:551:5:551:8 | hash [element :a] | provenance | | +| hash_flow.rb:551:12:555:5 | call to [] [element :c] | hash_flow.rb:551:5:551:8 | hash [element :c] | provenance | | +| hash_flow.rb:552:15:552:25 | call to taint | hash_flow.rb:551:12:555:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:554:15:554:25 | call to taint | hash_flow.rb:551:12:555:5 | call to [] [element :c] | provenance | | | hash_flow.rb:556:5:556:5 | b [element 1] | hash_flow.rb:559:11:559:11 | b [element 1] | provenance | | | hash_flow.rb:556:9:556:12 | [post] hash [element :a] | hash_flow.rb:557:11:557:14 | hash [element :a] | provenance | | | hash_flow.rb:556:9:556:12 | hash [element :a] | hash_flow.rb:556:9:556:12 | [post] hash [element :a] | provenance | | @@ -451,8 +505,10 @@ edges | hash_flow.rb:565:5:565:8 | hash [element :a] | hash_flow.rb:570:9:570:12 | hash [element :a] | provenance | | | hash_flow.rb:565:5:565:8 | hash [element :a] | hash_flow.rb:575:9:575:12 | hash [element :a] | provenance | | | hash_flow.rb:565:5:565:8 | hash [element :c] | hash_flow.rb:575:9:575:12 | hash [element :c] | provenance | | -| hash_flow.rb:566:15:566:25 | call to taint | hash_flow.rb:565:5:565:8 | hash [element :a] | provenance | | -| hash_flow.rb:568:15:568:25 | call to taint | hash_flow.rb:565:5:565:8 | hash [element :c] | provenance | | +| hash_flow.rb:565:12:569:5 | call to [] [element :a] | hash_flow.rb:565:5:565:8 | hash [element :a] | provenance | | +| hash_flow.rb:565:12:569:5 | call to [] [element :c] | hash_flow.rb:565:5:565:8 | hash [element :c] | provenance | | +| hash_flow.rb:566:15:566:25 | call to taint | hash_flow.rb:565:12:569:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:568:15:568:25 | call to taint | hash_flow.rb:565:12:569:5 | call to [] [element :c] | provenance | | | hash_flow.rb:570:5:570:5 | b [element :a] | hash_flow.rb:571:11:571:11 | b [element :a] | provenance | | | hash_flow.rb:570:9:570:12 | hash [element :a] | hash_flow.rb:570:9:570:26 | call to slice [element :a] | provenance | | | hash_flow.rb:570:9:570:26 | call to slice [element :a] | hash_flow.rb:570:5:570:5 | b [element :a] | provenance | | @@ -470,8 +526,10 @@ edges | hash_flow.rb:578:11:578:15 | ...[...] | hash_flow.rb:578:10:578:16 | ( ... ) | provenance | | | hash_flow.rb:584:5:584:8 | hash [element :a] | hash_flow.rb:589:9:589:12 | hash [element :a] | provenance | | | hash_flow.rb:584:5:584:8 | hash [element :c] | hash_flow.rb:589:9:589:12 | hash [element :c] | provenance | | -| hash_flow.rb:585:15:585:25 | call to taint | hash_flow.rb:584:5:584:8 | hash [element :a] | provenance | | -| hash_flow.rb:587:15:587:25 | call to taint | hash_flow.rb:584:5:584:8 | hash [element :c] | provenance | | +| hash_flow.rb:584:12:588:5 | call to [] [element :a] | hash_flow.rb:584:5:584:8 | hash [element :a] | provenance | | +| hash_flow.rb:584:12:588:5 | call to [] [element :c] | hash_flow.rb:584:5:584:8 | hash [element :c] | provenance | | +| hash_flow.rb:585:15:585:25 | call to taint | hash_flow.rb:584:12:588:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:587:15:587:25 | call to taint | hash_flow.rb:584:12:588:5 | call to [] [element :c] | provenance | | | hash_flow.rb:589:5:589:5 | a [element, element 1] | hash_flow.rb:591:11:591:11 | a [element, element 1] | provenance | | | hash_flow.rb:589:9:589:12 | hash [element :a] | hash_flow.rb:589:9:589:17 | call to to_a [element, element 1] | provenance | | | hash_flow.rb:589:9:589:12 | hash [element :c] | hash_flow.rb:589:9:589:17 | call to to_a [element, element 1] | provenance | | @@ -483,8 +541,10 @@ edges | hash_flow.rb:597:5:597:8 | hash [element :a] | hash_flow.rb:607:9:607:12 | hash [element :a] | provenance | | | hash_flow.rb:597:5:597:8 | hash [element :c] | hash_flow.rb:602:9:602:12 | hash [element :c] | provenance | | | hash_flow.rb:597:5:597:8 | hash [element :c] | hash_flow.rb:607:9:607:12 | hash [element :c] | provenance | | -| hash_flow.rb:598:15:598:25 | call to taint | hash_flow.rb:597:5:597:8 | hash [element :a] | provenance | | -| hash_flow.rb:600:15:600:25 | call to taint | hash_flow.rb:597:5:597:8 | hash [element :c] | provenance | | +| hash_flow.rb:597:12:601:5 | call to [] [element :a] | hash_flow.rb:597:5:597:8 | hash [element :a] | provenance | | +| hash_flow.rb:597:12:601:5 | call to [] [element :c] | hash_flow.rb:597:5:597:8 | hash [element :c] | provenance | | +| hash_flow.rb:598:15:598:25 | call to taint | hash_flow.rb:597:12:601:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:600:15:600:25 | call to taint | hash_flow.rb:597:12:601:5 | call to [] [element :c] | provenance | | | hash_flow.rb:602:5:602:5 | a [element :a] | hash_flow.rb:603:11:603:11 | a [element :a] | provenance | | | hash_flow.rb:602:5:602:5 | a [element :c] | hash_flow.rb:605:11:605:11 | a [element :c] | provenance | | | hash_flow.rb:602:9:602:12 | hash [element :a] | hash_flow.rb:602:9:602:17 | call to to_h [element :a] | provenance | | @@ -500,13 +560,16 @@ edges | hash_flow.rb:607:9:607:12 | hash [element :c] | hash_flow.rb:607:28:607:32 | value | provenance | | | hash_flow.rb:607:9:611:7 | call to to_h [element] | hash_flow.rb:607:5:607:5 | b [element] | provenance | | | hash_flow.rb:607:28:607:32 | value | hash_flow.rb:609:14:609:18 | value | provenance | | -| hash_flow.rb:610:14:610:24 | call to taint | hash_flow.rb:607:9:611:7 | call to to_h [element] | provenance | | +| hash_flow.rb:610:9:610:25 | call to [] [element 1] | hash_flow.rb:607:9:611:7 | call to to_h [element] | provenance | | +| hash_flow.rb:610:14:610:24 | call to taint | hash_flow.rb:610:9:610:25 | call to [] [element 1] | provenance | | | hash_flow.rb:612:11:612:11 | b [element] | hash_flow.rb:612:11:612:15 | ...[...] | provenance | | | hash_flow.rb:612:11:612:15 | ...[...] | hash_flow.rb:612:10:612:16 | ( ... ) | provenance | | | hash_flow.rb:618:5:618:8 | hash [element :a] | hash_flow.rb:623:9:623:12 | hash [element :a] | provenance | | | hash_flow.rb:618:5:618:8 | hash [element :c] | hash_flow.rb:623:9:623:12 | hash [element :c] | provenance | | -| hash_flow.rb:619:15:619:25 | call to taint | hash_flow.rb:618:5:618:8 | hash [element :a] | provenance | | -| hash_flow.rb:621:15:621:25 | call to taint | hash_flow.rb:618:5:618:8 | hash [element :c] | provenance | | +| hash_flow.rb:618:12:622:5 | call to [] [element :a] | hash_flow.rb:618:5:618:8 | hash [element :a] | provenance | | +| hash_flow.rb:618:12:622:5 | call to [] [element :c] | hash_flow.rb:618:5:618:8 | hash [element :c] | provenance | | +| hash_flow.rb:619:15:619:25 | call to taint | hash_flow.rb:618:12:622:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:621:15:621:25 | call to taint | hash_flow.rb:618:12:622:5 | call to [] [element :c] | provenance | | | hash_flow.rb:623:5:623:5 | a [element] | hash_flow.rb:624:11:624:11 | a [element] | provenance | | | hash_flow.rb:623:5:623:5 | a [element] | hash_flow.rb:625:11:625:11 | a [element] | provenance | | | hash_flow.rb:623:5:623:5 | a [element] | hash_flow.rb:626:11:626:11 | a [element] | provenance | | @@ -521,8 +584,10 @@ edges | hash_flow.rb:626:11:626:16 | ...[...] | hash_flow.rb:626:10:626:17 | ( ... ) | provenance | | | hash_flow.rb:632:5:632:8 | hash [element :a] | hash_flow.rb:639:5:639:8 | hash [element :a] | provenance | | | hash_flow.rb:632:5:632:8 | hash [element :c] | hash_flow.rb:639:5:639:8 | hash [element :c] | provenance | | -| hash_flow.rb:633:15:633:25 | call to taint | hash_flow.rb:632:5:632:8 | hash [element :a] | provenance | | -| hash_flow.rb:635:15:635:25 | call to taint | hash_flow.rb:632:5:632:8 | hash [element :c] | provenance | | +| hash_flow.rb:632:12:636:5 | call to [] [element :a] | hash_flow.rb:632:5:632:8 | hash [element :a] | provenance | | +| hash_flow.rb:632:12:636:5 | call to [] [element :c] | hash_flow.rb:632:5:632:8 | hash [element :c] | provenance | | +| hash_flow.rb:633:15:633:25 | call to taint | hash_flow.rb:632:12:636:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:635:15:635:25 | call to taint | hash_flow.rb:632:12:636:5 | call to [] [element :c] | provenance | | | hash_flow.rb:637:5:637:8 | [post] hash [element] | hash_flow.rb:639:5:639:8 | hash [element] | provenance | | | hash_flow.rb:637:5:637:8 | [post] hash [element] | hash_flow.rb:640:11:640:14 | hash [element] | provenance | | | hash_flow.rb:637:5:637:8 | [post] hash [element] | hash_flow.rb:641:11:641:14 | hash [element] | provenance | | @@ -543,8 +608,10 @@ edges | hash_flow.rb:648:5:648:8 | hash [element :a] | hash_flow.rb:653:9:653:12 | hash [element :a] | provenance | | | hash_flow.rb:648:5:648:8 | hash [element :a] | hash_flow.rb:657:11:657:14 | hash [element :a] | provenance | | | hash_flow.rb:648:5:648:8 | hash [element :c] | hash_flow.rb:653:9:653:12 | hash [element :c] | provenance | | -| hash_flow.rb:649:15:649:25 | call to taint | hash_flow.rb:648:5:648:8 | hash [element :a] | provenance | | -| hash_flow.rb:651:15:651:25 | call to taint | hash_flow.rb:648:5:648:8 | hash [element :c] | provenance | | +| hash_flow.rb:648:12:652:5 | call to [] [element :a] | hash_flow.rb:648:5:648:8 | hash [element :a] | provenance | | +| hash_flow.rb:648:12:652:5 | call to [] [element :c] | hash_flow.rb:648:5:648:8 | hash [element :c] | provenance | | +| hash_flow.rb:649:15:649:25 | call to taint | hash_flow.rb:648:12:652:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:651:15:651:25 | call to taint | hash_flow.rb:648:12:652:5 | call to [] [element :c] | provenance | | | hash_flow.rb:653:5:653:5 | b [element] | hash_flow.rb:658:11:658:11 | b [element] | provenance | | | hash_flow.rb:653:9:653:12 | hash [element :a] | hash_flow.rb:653:35:653:39 | value | provenance | | | hash_flow.rb:653:9:653:12 | hash [element :c] | hash_flow.rb:653:35:653:39 | value | provenance | | @@ -557,8 +624,10 @@ edges | hash_flow.rb:658:11:658:15 | ...[...] | hash_flow.rb:658:10:658:16 | ( ... ) | provenance | | | hash_flow.rb:664:5:664:8 | hash [element :a] | hash_flow.rb:669:5:669:8 | hash [element :a] | provenance | | | hash_flow.rb:664:5:664:8 | hash [element :c] | hash_flow.rb:669:5:669:8 | hash [element :c] | provenance | | -| hash_flow.rb:665:15:665:25 | call to taint | hash_flow.rb:664:5:664:8 | hash [element :a] | provenance | | -| hash_flow.rb:667:15:667:25 | call to taint | hash_flow.rb:664:5:664:8 | hash [element :c] | provenance | | +| hash_flow.rb:664:12:668:5 | call to [] [element :a] | hash_flow.rb:664:5:664:8 | hash [element :a] | provenance | | +| hash_flow.rb:664:12:668:5 | call to [] [element :c] | hash_flow.rb:664:5:664:8 | hash [element :c] | provenance | | +| hash_flow.rb:665:15:665:25 | call to taint | hash_flow.rb:664:12:668:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:667:15:667:25 | call to taint | hash_flow.rb:664:12:668:5 | call to [] [element :c] | provenance | | | hash_flow.rb:669:5:669:8 | [post] hash [element] | hash_flow.rb:673:11:673:14 | hash [element] | provenance | | | hash_flow.rb:669:5:669:8 | hash [element :a] | hash_flow.rb:669:32:669:36 | value | provenance | | | hash_flow.rb:669:5:669:8 | hash [element :c] | hash_flow.rb:669:32:669:36 | value | provenance | | @@ -568,12 +637,16 @@ edges | hash_flow.rb:673:11:673:18 | ...[...] | hash_flow.rb:673:10:673:19 | ( ... ) | provenance | | | hash_flow.rb:679:5:679:9 | hash1 [element :a] | hash_flow.rb:689:12:689:16 | hash1 [element :a] | provenance | | | hash_flow.rb:679:5:679:9 | hash1 [element :c] | hash_flow.rb:689:12:689:16 | hash1 [element :c] | provenance | | -| hash_flow.rb:680:15:680:25 | call to taint | hash_flow.rb:679:5:679:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:682:15:682:25 | call to taint | hash_flow.rb:679:5:679:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:679:13:683:5 | call to [] [element :a] | hash_flow.rb:679:5:679:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:679:13:683:5 | call to [] [element :c] | hash_flow.rb:679:5:679:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:680:15:680:25 | call to taint | hash_flow.rb:679:13:683:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:682:15:682:25 | call to taint | hash_flow.rb:679:13:683:5 | call to [] [element :c] | provenance | | | hash_flow.rb:684:5:684:9 | hash2 [element :d] | hash_flow.rb:689:25:689:29 | hash2 [element :d] | provenance | | | hash_flow.rb:684:5:684:9 | hash2 [element :f] | hash_flow.rb:689:25:689:29 | hash2 [element :f] | provenance | | -| hash_flow.rb:685:15:685:25 | call to taint | hash_flow.rb:684:5:684:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:687:15:687:25 | call to taint | hash_flow.rb:684:5:684:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:684:13:688:5 | call to [] [element :d] | hash_flow.rb:684:5:684:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:684:13:688:5 | call to [] [element :f] | hash_flow.rb:684:5:684:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:685:15:685:25 | call to taint | hash_flow.rb:684:13:688:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:687:15:687:25 | call to taint | hash_flow.rb:684:13:688:5 | call to [] [element :f] | provenance | | | hash_flow.rb:689:5:689:8 | hash [element :a] | hash_flow.rb:694:11:694:14 | hash [element :a] | provenance | | | hash_flow.rb:689:5:689:8 | hash [element :c] | hash_flow.rb:696:11:696:14 | hash [element :c] | provenance | | | hash_flow.rb:689:5:689:8 | hash [element :d] | hash_flow.rb:697:11:697:14 | hash [element :d] | provenance | | @@ -622,8 +695,10 @@ edges | hash_flow.rb:706:11:706:19 | ...[...] | hash_flow.rb:706:10:706:20 | ( ... ) | provenance | | | hash_flow.rb:712:5:712:8 | hash [element :a] | hash_flow.rb:717:9:717:12 | hash [element :a] | provenance | | | hash_flow.rb:712:5:712:8 | hash [element :c] | hash_flow.rb:717:9:717:12 | hash [element :c] | provenance | | -| hash_flow.rb:713:15:713:25 | call to taint | hash_flow.rb:712:5:712:8 | hash [element :a] | provenance | | -| hash_flow.rb:715:15:715:25 | call to taint | hash_flow.rb:712:5:712:8 | hash [element :c] | provenance | | +| hash_flow.rb:712:12:716:5 | call to [] [element :a] | hash_flow.rb:712:5:712:8 | hash [element :a] | provenance | | +| hash_flow.rb:712:12:716:5 | call to [] [element :c] | hash_flow.rb:712:5:712:8 | hash [element :c] | provenance | | +| hash_flow.rb:713:15:713:25 | call to taint | hash_flow.rb:712:12:716:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:715:15:715:25 | call to taint | hash_flow.rb:712:12:716:5 | call to [] [element :c] | provenance | | | hash_flow.rb:717:5:717:5 | a [element] | hash_flow.rb:718:11:718:11 | a [element] | provenance | | | hash_flow.rb:717:9:717:12 | hash [element :a] | hash_flow.rb:717:9:717:19 | call to values [element] | provenance | | | hash_flow.rb:717:9:717:12 | hash [element :c] | hash_flow.rb:717:9:717:19 | call to values [element] | provenance | | @@ -633,8 +708,10 @@ edges | hash_flow.rb:724:5:724:8 | hash [element :a] | hash_flow.rb:729:9:729:12 | hash [element :a] | provenance | | | hash_flow.rb:724:5:724:8 | hash [element :a] | hash_flow.rb:731:9:731:12 | hash [element :a] | provenance | | | hash_flow.rb:724:5:724:8 | hash [element :c] | hash_flow.rb:731:9:731:12 | hash [element :c] | provenance | | -| hash_flow.rb:725:15:725:25 | call to taint | hash_flow.rb:724:5:724:8 | hash [element :a] | provenance | | -| hash_flow.rb:727:15:727:25 | call to taint | hash_flow.rb:724:5:724:8 | hash [element :c] | provenance | | +| hash_flow.rb:724:12:728:5 | call to [] [element :a] | hash_flow.rb:724:5:724:8 | hash [element :a] | provenance | | +| hash_flow.rb:724:12:728:5 | call to [] [element :c] | hash_flow.rb:724:5:724:8 | hash [element :c] | provenance | | +| hash_flow.rb:725:15:725:25 | call to taint | hash_flow.rb:724:12:728:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:727:15:727:25 | call to taint | hash_flow.rb:724:12:728:5 | call to [] [element :c] | provenance | | | hash_flow.rb:729:5:729:5 | b [element 0] | hash_flow.rb:730:10:730:10 | b [element 0] | provenance | | | hash_flow.rb:729:9:729:12 | hash [element :a] | hash_flow.rb:729:9:729:26 | call to values_at [element 0] | provenance | | | hash_flow.rb:729:9:729:26 | call to values_at [element 0] | hash_flow.rb:729:5:729:5 | b [element 0] | provenance | | @@ -646,24 +723,33 @@ edges | hash_flow.rb:732:10:732:10 | b [element] | hash_flow.rb:732:10:732:13 | ...[...] | provenance | | | hash_flow.rb:738:5:738:9 | hash1 [element :a] | hash_flow.rb:748:16:748:20 | hash1 [element :a] | provenance | | | hash_flow.rb:738:5:738:9 | hash1 [element :c] | hash_flow.rb:748:16:748:20 | hash1 [element :c] | provenance | | -| hash_flow.rb:739:15:739:25 | call to taint | hash_flow.rb:738:5:738:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:741:15:741:25 | call to taint | hash_flow.rb:738:5:738:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:738:13:742:5 | call to [] [element :a] | hash_flow.rb:738:5:738:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:738:13:742:5 | call to [] [element :c] | hash_flow.rb:738:5:738:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:739:15:739:25 | call to taint | hash_flow.rb:738:13:742:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:741:15:741:25 | call to taint | hash_flow.rb:738:13:742:5 | call to [] [element :c] | provenance | | | hash_flow.rb:743:5:743:9 | hash2 [element :d] | hash_flow.rb:748:44:748:48 | hash2 [element :d] | provenance | | | hash_flow.rb:743:5:743:9 | hash2 [element :f] | hash_flow.rb:748:44:748:48 | hash2 [element :f] | provenance | | -| hash_flow.rb:744:15:744:25 | call to taint | hash_flow.rb:743:5:743:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:746:15:746:25 | call to taint | hash_flow.rb:743:5:743:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:743:13:747:5 | call to [] [element :d] | hash_flow.rb:743:5:743:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:743:13:747:5 | call to [] [element :f] | hash_flow.rb:743:5:743:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:744:15:744:25 | call to taint | hash_flow.rb:743:13:747:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:746:15:746:25 | call to taint | hash_flow.rb:743:13:747:5 | call to [] [element :f] | provenance | | | hash_flow.rb:748:5:748:8 | hash [element :a] | hash_flow.rb:749:10:749:13 | hash [element :a] | provenance | | | hash_flow.rb:748:5:748:8 | hash [element :c] | hash_flow.rb:751:10:751:13 | hash [element :c] | provenance | | | hash_flow.rb:748:5:748:8 | hash [element :d] | hash_flow.rb:752:10:752:13 | hash [element :d] | provenance | | | hash_flow.rb:748:5:748:8 | hash [element :f] | hash_flow.rb:754:10:754:13 | hash [element :f] | provenance | | | hash_flow.rb:748:5:748:8 | hash [element :g] | hash_flow.rb:755:10:755:13 | hash [element :g] | provenance | | -| hash_flow.rb:748:14:748:20 | ** ... [element :a] | hash_flow.rb:748:5:748:8 | hash [element :a] | provenance | | -| hash_flow.rb:748:14:748:20 | ** ... [element :c] | hash_flow.rb:748:5:748:8 | hash [element :c] | provenance | | +| hash_flow.rb:748:12:748:59 | call to [] [element :a] | hash_flow.rb:748:5:748:8 | hash [element :a] | provenance | | +| hash_flow.rb:748:12:748:59 | call to [] [element :c] | hash_flow.rb:748:5:748:8 | hash [element :c] | provenance | | +| hash_flow.rb:748:12:748:59 | call to [] [element :d] | hash_flow.rb:748:5:748:8 | hash [element :d] | provenance | | +| hash_flow.rb:748:12:748:59 | call to [] [element :f] | hash_flow.rb:748:5:748:8 | hash [element :f] | provenance | | +| hash_flow.rb:748:12:748:59 | call to [] [element :g] | hash_flow.rb:748:5:748:8 | hash [element :g] | provenance | | +| hash_flow.rb:748:14:748:20 | ** ... [element :a] | hash_flow.rb:748:12:748:59 | call to [] [element :a] | provenance | | +| hash_flow.rb:748:14:748:20 | ** ... [element :c] | hash_flow.rb:748:12:748:59 | call to [] [element :c] | provenance | | | hash_flow.rb:748:16:748:20 | hash1 [element :a] | hash_flow.rb:748:14:748:20 | ** ... [element :a] | provenance | | | hash_flow.rb:748:16:748:20 | hash1 [element :c] | hash_flow.rb:748:14:748:20 | ** ... [element :c] | provenance | | -| hash_flow.rb:748:29:748:39 | call to taint | hash_flow.rb:748:5:748:8 | hash [element :g] | provenance | | -| hash_flow.rb:748:42:748:48 | ** ... [element :d] | hash_flow.rb:748:5:748:8 | hash [element :d] | provenance | | -| hash_flow.rb:748:42:748:48 | ** ... [element :f] | hash_flow.rb:748:5:748:8 | hash [element :f] | provenance | | +| hash_flow.rb:748:29:748:39 | call to taint | hash_flow.rb:748:12:748:59 | call to [] [element :g] | provenance | | +| hash_flow.rb:748:42:748:48 | ** ... [element :d] | hash_flow.rb:748:12:748:59 | call to [] [element :d] | provenance | | +| hash_flow.rb:748:42:748:48 | ** ... [element :f] | hash_flow.rb:748:12:748:59 | call to [] [element :f] | provenance | | | hash_flow.rb:748:44:748:48 | hash2 [element :d] | hash_flow.rb:748:42:748:48 | ** ... [element :d] | provenance | | | hash_flow.rb:748:44:748:48 | hash2 [element :f] | hash_flow.rb:748:42:748:48 | ** ... [element :f] | provenance | | | hash_flow.rb:749:10:749:13 | hash [element :a] | hash_flow.rb:749:10:749:17 | ...[...] | provenance | | @@ -675,9 +761,12 @@ edges | hash_flow.rb:762:5:762:8 | hash [element :c] | hash_flow.rb:771:10:771:13 | hash [element :c] | provenance | | | hash_flow.rb:762:5:762:8 | hash [element :c] | hash_flow.rb:774:9:774:12 | hash [element :c] | provenance | | | hash_flow.rb:762:5:762:8 | hash [element :d] | hash_flow.rb:772:10:772:13 | hash [element :d] | provenance | | -| hash_flow.rb:763:15:763:25 | call to taint | hash_flow.rb:762:5:762:8 | hash [element :a] | provenance | | -| hash_flow.rb:765:15:765:25 | call to taint | hash_flow.rb:762:5:762:8 | hash [element :c] | provenance | | -| hash_flow.rb:766:15:766:25 | call to taint | hash_flow.rb:762:5:762:8 | hash [element :d] | provenance | | +| hash_flow.rb:762:12:767:5 | call to [] [element :a] | hash_flow.rb:762:5:762:8 | hash [element :a] | provenance | | +| hash_flow.rb:762:12:767:5 | call to [] [element :c] | hash_flow.rb:762:5:762:8 | hash [element :c] | provenance | | +| hash_flow.rb:762:12:767:5 | call to [] [element :d] | hash_flow.rb:762:5:762:8 | hash [element :d] | provenance | | +| hash_flow.rb:763:15:763:25 | call to taint | hash_flow.rb:762:12:767:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:765:15:765:25 | call to taint | hash_flow.rb:762:12:767:5 | call to [] [element :c] | provenance | | +| hash_flow.rb:766:15:766:25 | call to taint | hash_flow.rb:762:12:767:5 | call to [] [element :d] | provenance | | | hash_flow.rb:769:10:769:13 | hash [element :a] | hash_flow.rb:769:10:769:17 | ...[...] | provenance | | | hash_flow.rb:771:10:771:13 | hash [element :c] | hash_flow.rb:771:10:771:17 | ...[...] | provenance | | | hash_flow.rb:772:10:772:13 | hash [element :d] | hash_flow.rb:772:10:772:17 | ...[...] | provenance | | @@ -690,12 +779,16 @@ edges | hash_flow.rb:783:10:783:13 | hash [element :c] | hash_flow.rb:783:10:783:17 | ...[...] | provenance | | | hash_flow.rb:790:5:790:9 | hash1 [element :a] | hash_flow.rb:800:12:800:16 | hash1 [element :a] | provenance | | | hash_flow.rb:790:5:790:9 | hash1 [element :c] | hash_flow.rb:800:12:800:16 | hash1 [element :c] | provenance | | -| hash_flow.rb:791:15:791:25 | call to taint | hash_flow.rb:790:5:790:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:793:15:793:25 | call to taint | hash_flow.rb:790:5:790:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:790:13:794:5 | call to [] [element :a] | hash_flow.rb:790:5:790:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:790:13:794:5 | call to [] [element :c] | hash_flow.rb:790:5:790:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:791:15:791:25 | call to taint | hash_flow.rb:790:13:794:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:793:15:793:25 | call to taint | hash_flow.rb:790:13:794:5 | call to [] [element :c] | provenance | | | hash_flow.rb:795:5:795:9 | hash2 [element :d] | hash_flow.rb:800:29:800:33 | hash2 [element :d] | provenance | | | hash_flow.rb:795:5:795:9 | hash2 [element :f] | hash_flow.rb:800:29:800:33 | hash2 [element :f] | provenance | | -| hash_flow.rb:796:15:796:25 | call to taint | hash_flow.rb:795:5:795:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:798:15:798:25 | call to taint | hash_flow.rb:795:5:795:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:795:13:799:5 | call to [] [element :d] | hash_flow.rb:795:5:795:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:795:13:799:5 | call to [] [element :f] | hash_flow.rb:795:5:795:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:796:15:796:25 | call to taint | hash_flow.rb:795:13:799:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:798:15:798:25 | call to taint | hash_flow.rb:795:13:799:5 | call to [] [element :f] | provenance | | | hash_flow.rb:800:5:800:8 | hash [element :a] | hash_flow.rb:805:11:805:14 | hash [element :a] | provenance | | | hash_flow.rb:800:5:800:8 | hash [element :c] | hash_flow.rb:807:11:807:14 | hash [element :c] | provenance | | | hash_flow.rb:800:5:800:8 | hash [element :d] | hash_flow.rb:808:11:808:14 | hash [element :d] | provenance | | @@ -728,12 +821,16 @@ edges | hash_flow.rb:810:11:810:18 | ...[...] | hash_flow.rb:810:10:810:19 | ( ... ) | provenance | | | hash_flow.rb:816:5:816:9 | hash1 [element :a] | hash_flow.rb:826:12:826:16 | hash1 [element :a] | provenance | | | hash_flow.rb:816:5:816:9 | hash1 [element :c] | hash_flow.rb:826:12:826:16 | hash1 [element :c] | provenance | | -| hash_flow.rb:817:15:817:25 | call to taint | hash_flow.rb:816:5:816:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:819:15:819:25 | call to taint | hash_flow.rb:816:5:816:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:816:13:820:5 | call to [] [element :a] | hash_flow.rb:816:5:816:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:816:13:820:5 | call to [] [element :c] | hash_flow.rb:816:5:816:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:817:15:817:25 | call to taint | hash_flow.rb:816:13:820:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:819:15:819:25 | call to taint | hash_flow.rb:816:13:820:5 | call to [] [element :c] | provenance | | | hash_flow.rb:821:5:821:9 | hash2 [element :d] | hash_flow.rb:826:30:826:34 | hash2 [element :d] | provenance | | | hash_flow.rb:821:5:821:9 | hash2 [element :f] | hash_flow.rb:826:30:826:34 | hash2 [element :f] | provenance | | -| hash_flow.rb:822:15:822:25 | call to taint | hash_flow.rb:821:5:821:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:824:15:824:25 | call to taint | hash_flow.rb:821:5:821:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:821:13:825:5 | call to [] [element :d] | hash_flow.rb:821:5:821:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:821:13:825:5 | call to [] [element :f] | hash_flow.rb:821:5:821:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:822:15:822:25 | call to taint | hash_flow.rb:821:13:825:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:824:15:824:25 | call to taint | hash_flow.rb:821:13:825:5 | call to [] [element :f] | provenance | | | hash_flow.rb:826:5:826:8 | hash [element :a] | hash_flow.rb:831:11:831:14 | hash [element :a] | provenance | | | hash_flow.rb:826:5:826:8 | hash [element :c] | hash_flow.rb:833:11:833:14 | hash [element :c] | provenance | | | hash_flow.rb:826:5:826:8 | hash [element :d] | hash_flow.rb:834:11:834:14 | hash [element :d] | provenance | | @@ -784,14 +881,18 @@ edges | hash_flow.rb:849:5:849:9 | hash1 [element :a] | hash_flow.rb:869:13:869:17 | hash1 [element :a] | provenance | | | hash_flow.rb:849:5:849:9 | hash1 [element :c] | hash_flow.rb:860:13:860:17 | hash1 [element :c] | provenance | | | hash_flow.rb:849:5:849:9 | hash1 [element :c] | hash_flow.rb:869:13:869:17 | hash1 [element :c] | provenance | | -| hash_flow.rb:850:12:850:22 | call to taint | hash_flow.rb:849:5:849:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:852:12:852:22 | call to taint | hash_flow.rb:849:5:849:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:849:13:853:5 | call to [] [element :a] | hash_flow.rb:849:5:849:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:849:13:853:5 | call to [] [element :c] | hash_flow.rb:849:5:849:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:850:12:850:22 | call to taint | hash_flow.rb:849:13:853:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:852:12:852:22 | call to taint | hash_flow.rb:849:13:853:5 | call to [] [element :c] | provenance | | | hash_flow.rb:854:5:854:9 | hash2 [element :d] | hash_flow.rb:860:33:860:37 | hash2 [element :d] | provenance | | | hash_flow.rb:854:5:854:9 | hash2 [element :d] | hash_flow.rb:869:33:869:37 | hash2 [element :d] | provenance | | | hash_flow.rb:854:5:854:9 | hash2 [element :f] | hash_flow.rb:860:33:860:37 | hash2 [element :f] | provenance | | | hash_flow.rb:854:5:854:9 | hash2 [element :f] | hash_flow.rb:869:33:869:37 | hash2 [element :f] | provenance | | -| hash_flow.rb:855:12:855:22 | call to taint | hash_flow.rb:854:5:854:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:857:12:857:22 | call to taint | hash_flow.rb:854:5:854:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:854:13:858:5 | call to [] [element :d] | hash_flow.rb:854:5:854:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:854:13:858:5 | call to [] [element :f] | hash_flow.rb:854:5:854:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:855:12:855:22 | call to taint | hash_flow.rb:854:13:858:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:857:12:857:22 | call to taint | hash_flow.rb:854:13:858:5 | call to [] [element :f] | provenance | | | hash_flow.rb:860:5:860:9 | hash3 [element :a] | hash_flow.rb:861:11:861:15 | hash3 [element :a] | provenance | | | hash_flow.rb:860:5:860:9 | hash3 [element :c] | hash_flow.rb:863:11:863:15 | hash3 [element :c] | provenance | | | hash_flow.rb:860:5:860:9 | hash3 [element :d] | hash_flow.rb:864:11:864:15 | hash3 [element :d] | provenance | | @@ -834,12 +935,16 @@ edges | hash_flow.rb:875:11:875:19 | ...[...] | hash_flow.rb:875:10:875:20 | ( ... ) | provenance | | | hash_flow.rb:881:5:881:9 | hash1 [element :a] | hash_flow.rb:892:12:892:16 | hash1 [element :a] | provenance | | | hash_flow.rb:881:5:881:9 | hash1 [element :c] | hash_flow.rb:892:12:892:16 | hash1 [element :c] | provenance | | -| hash_flow.rb:882:12:882:22 | call to taint | hash_flow.rb:881:5:881:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:884:12:884:22 | call to taint | hash_flow.rb:881:5:881:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:881:13:885:5 | call to [] [element :a] | hash_flow.rb:881:5:881:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:881:13:885:5 | call to [] [element :c] | hash_flow.rb:881:5:881:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:882:12:882:22 | call to taint | hash_flow.rb:881:13:885:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:884:12:884:22 | call to taint | hash_flow.rb:881:13:885:5 | call to [] [element :c] | provenance | | | hash_flow.rb:886:5:886:9 | hash2 [element :d] | hash_flow.rb:892:33:892:37 | hash2 [element :d] | provenance | | | hash_flow.rb:886:5:886:9 | hash2 [element :f] | hash_flow.rb:892:33:892:37 | hash2 [element :f] | provenance | | -| hash_flow.rb:887:12:887:22 | call to taint | hash_flow.rb:886:5:886:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:889:12:889:22 | call to taint | hash_flow.rb:886:5:886:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:886:13:890:5 | call to [] [element :d] | hash_flow.rb:886:5:886:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:886:13:890:5 | call to [] [element :f] | hash_flow.rb:886:5:886:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:887:12:887:22 | call to taint | hash_flow.rb:886:13:890:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:889:12:889:22 | call to taint | hash_flow.rb:886:13:890:5 | call to [] [element :f] | provenance | | | hash_flow.rb:892:5:892:8 | hash [element :a] | hash_flow.rb:893:11:893:14 | hash [element :a] | provenance | | | hash_flow.rb:892:5:892:8 | hash [element :c] | hash_flow.rb:895:11:895:14 | hash [element :c] | provenance | | | hash_flow.rb:892:5:892:8 | hash [element :d] | hash_flow.rb:896:11:896:14 | hash [element :d] | provenance | | @@ -878,12 +983,16 @@ edges | hash_flow.rb:905:11:905:19 | ...[...] | hash_flow.rb:905:10:905:20 | ( ... ) | provenance | | | hash_flow.rb:911:5:911:9 | hash1 [element :a] | hash_flow.rb:922:12:922:16 | hash1 [element :a] | provenance | | | hash_flow.rb:911:5:911:9 | hash1 [element :c] | hash_flow.rb:922:12:922:16 | hash1 [element :c] | provenance | | -| hash_flow.rb:912:12:912:22 | call to taint | hash_flow.rb:911:5:911:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:914:12:914:22 | call to taint | hash_flow.rb:911:5:911:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:911:13:915:5 | call to [] [element :a] | hash_flow.rb:911:5:911:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:911:13:915:5 | call to [] [element :c] | hash_flow.rb:911:5:911:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:912:12:912:22 | call to taint | hash_flow.rb:911:13:915:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:914:12:914:22 | call to taint | hash_flow.rb:911:13:915:5 | call to [] [element :c] | provenance | | | hash_flow.rb:916:5:916:9 | hash2 [element :d] | hash_flow.rb:922:33:922:37 | hash2 [element :d] | provenance | | | hash_flow.rb:916:5:916:9 | hash2 [element :f] | hash_flow.rb:922:33:922:37 | hash2 [element :f] | provenance | | -| hash_flow.rb:917:12:917:22 | call to taint | hash_flow.rb:916:5:916:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:919:12:919:22 | call to taint | hash_flow.rb:916:5:916:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:916:13:920:5 | call to [] [element :d] | hash_flow.rb:916:5:916:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:916:13:920:5 | call to [] [element :f] | hash_flow.rb:916:5:916:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:917:12:917:22 | call to taint | hash_flow.rb:916:13:920:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:919:12:919:22 | call to taint | hash_flow.rb:916:13:920:5 | call to [] [element :f] | provenance | | | hash_flow.rb:922:5:922:8 | hash [element :a] | hash_flow.rb:923:11:923:14 | hash [element :a] | provenance | | | hash_flow.rb:922:5:922:8 | hash [element :c] | hash_flow.rb:925:11:925:14 | hash [element :c] | provenance | | | hash_flow.rb:922:5:922:8 | hash [element :d] | hash_flow.rb:926:11:926:14 | hash [element :d] | provenance | | @@ -922,12 +1031,16 @@ edges | hash_flow.rb:935:11:935:19 | ...[...] | hash_flow.rb:935:10:935:20 | ( ... ) | provenance | | | hash_flow.rb:941:5:941:9 | hash1 [element :a] | hash_flow.rb:952:12:952:16 | hash1 [element :a] | provenance | | | hash_flow.rb:941:5:941:9 | hash1 [element :c] | hash_flow.rb:952:12:952:16 | hash1 [element :c] | provenance | | -| hash_flow.rb:942:12:942:22 | call to taint | hash_flow.rb:941:5:941:9 | hash1 [element :a] | provenance | | -| hash_flow.rb:944:12:944:22 | call to taint | hash_flow.rb:941:5:941:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:941:13:945:5 | call to [] [element :a] | hash_flow.rb:941:5:941:9 | hash1 [element :a] | provenance | | +| hash_flow.rb:941:13:945:5 | call to [] [element :c] | hash_flow.rb:941:5:941:9 | hash1 [element :c] | provenance | | +| hash_flow.rb:942:12:942:22 | call to taint | hash_flow.rb:941:13:945:5 | call to [] [element :a] | provenance | | +| hash_flow.rb:944:12:944:22 | call to taint | hash_flow.rb:941:13:945:5 | call to [] [element :c] | provenance | | | hash_flow.rb:946:5:946:9 | hash2 [element :d] | hash_flow.rb:952:33:952:37 | hash2 [element :d] | provenance | | | hash_flow.rb:946:5:946:9 | hash2 [element :f] | hash_flow.rb:952:33:952:37 | hash2 [element :f] | provenance | | -| hash_flow.rb:947:12:947:22 | call to taint | hash_flow.rb:946:5:946:9 | hash2 [element :d] | provenance | | -| hash_flow.rb:949:12:949:22 | call to taint | hash_flow.rb:946:5:946:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:946:13:950:5 | call to [] [element :d] | hash_flow.rb:946:5:946:9 | hash2 [element :d] | provenance | | +| hash_flow.rb:946:13:950:5 | call to [] [element :f] | hash_flow.rb:946:5:946:9 | hash2 [element :f] | provenance | | +| hash_flow.rb:947:12:947:22 | call to taint | hash_flow.rb:946:13:950:5 | call to [] [element :d] | provenance | | +| hash_flow.rb:949:12:949:22 | call to taint | hash_flow.rb:946:13:950:5 | call to [] [element :f] | provenance | | | hash_flow.rb:952:5:952:8 | hash [element :a] | hash_flow.rb:953:11:953:14 | hash [element :a] | provenance | | | hash_flow.rb:952:5:952:8 | hash [element :c] | hash_flow.rb:955:11:955:14 | hash [element :c] | provenance | | | hash_flow.rb:952:5:952:8 | hash [element :d] | hash_flow.rb:956:11:956:14 | hash [element :d] | provenance | | @@ -982,6 +1095,11 @@ nodes | hash_flow.rb:10:5:10:8 | hash [element :c] | semmle.label | hash [element :c] | | hash_flow.rb:10:5:10:8 | hash [element e] | semmle.label | hash [element e] | | hash_flow.rb:10:5:10:8 | hash [element g] | semmle.label | hash [element g] | +| hash_flow.rb:10:12:21:5 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| hash_flow.rb:10:12:21:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:10:12:21:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | +| hash_flow.rb:10:12:21:5 | call to [] [element e] | semmle.label | call to [] [element e] | +| hash_flow.rb:10:12:21:5 | call to [] [element g] | semmle.label | call to [] [element g] | | hash_flow.rb:11:15:11:24 | call to taint | semmle.label | call to taint | | hash_flow.rb:13:12:13:21 | call to taint | semmle.label | call to taint | | hash_flow.rb:15:14:15:23 | call to taint | semmle.label | call to taint | @@ -1033,6 +1151,7 @@ nodes | hash_flow.rb:56:10:56:14 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:56:10:56:18 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:59:5:59:5 | x [element :a] | semmle.label | x [element :a] | +| hash_flow.rb:59:9:59:29 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:59:13:59:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:60:5:60:9 | hash2 [element :a] | semmle.label | hash2 [element :a] | | hash_flow.rb:60:13:60:19 | ...[...] [element :a] | semmle.label | ...[...] [element :a] | @@ -1041,6 +1160,8 @@ nodes | hash_flow.rb:61:10:61:18 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:64:5:64:9 | hash3 [element] | semmle.label | hash3 [element] | | hash_flow.rb:64:13:64:45 | ...[...] [element] | semmle.label | ...[...] [element] | +| hash_flow.rb:64:18:64:44 | call to [] [element 0, element 1] | semmle.label | call to [] [element 0, element 1] | +| hash_flow.rb:64:19:64:34 | call to [] [element 1] | semmle.label | call to [] [element 1] | | hash_flow.rb:64:24:64:33 | call to taint | semmle.label | call to taint | | hash_flow.rb:65:10:65:14 | hash3 [element] | semmle.label | hash3 [element] | | hash_flow.rb:65:10:65:18 | ...[...] | semmle.label | ...[...] | @@ -1058,6 +1179,7 @@ nodes | hash_flow.rb:73:10:73:19 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:76:5:76:9 | hash6 [element a] | semmle.label | hash6 [element a] | | hash_flow.rb:76:13:76:47 | ...[...] [element a] | semmle.label | ...[...] [element a] | +| hash_flow.rb:76:18:76:46 | call to [] [element a] | semmle.label | call to [] [element a] | | hash_flow.rb:76:26:76:35 | call to taint | semmle.label | call to taint | | hash_flow.rb:77:10:77:14 | hash6 [element a] | semmle.label | hash6 [element a] | | hash_flow.rb:77:10:77:19 | ...[...] | semmle.label | ...[...] | @@ -1067,6 +1189,7 @@ nodes | hash_flow.rb:85:10:85:14 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:85:10:85:18 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:92:5:92:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:92:12:95:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:93:15:93:24 | call to taint | semmle.label | call to taint | | hash_flow.rb:96:5:96:9 | hash2 [element :a] | semmle.label | hash2 [element :a] | | hash_flow.rb:96:13:96:34 | call to try_convert [element :a] | semmle.label | call to try_convert [element :a] | @@ -1093,6 +1216,7 @@ nodes | hash_flow.rb:120:10:120:17 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:121:10:121:10 | c | semmle.label | c | | hash_flow.rb:127:5:127:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:127:12:130:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:128:15:128:24 | call to taint | semmle.label | call to taint | | hash_flow.rb:131:5:131:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:131:18:131:29 | key_or_value | semmle.label | key_or_value | @@ -1101,6 +1225,7 @@ nodes | hash_flow.rb:134:22:134:26 | value | semmle.label | value | | hash_flow.rb:136:14:136:18 | value | semmle.label | value | | hash_flow.rb:143:5:143:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:143:12:146:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:144:15:144:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:147:5:147:5 | b [element 1] | semmle.label | b [element 1] | | hash_flow.rb:147:9:147:12 | hash [element :a] | semmle.label | hash [element :a] | @@ -1115,6 +1240,7 @@ nodes | hash_flow.rb:152:10:152:10 | c [element 1] | semmle.label | c [element 1] | | hash_flow.rb:152:10:152:13 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:169:5:169:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:169:12:172:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:170:15:170:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:173:5:173:5 | a [element :a] | semmle.label | a [element :a] | | hash_flow.rb:173:9:173:12 | hash [element :a] | semmle.label | hash [element :a] | @@ -1122,12 +1248,14 @@ nodes | hash_flow.rb:174:10:174:10 | a [element :a] | semmle.label | a [element :a] | | hash_flow.rb:174:10:174:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:181:5:181:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:181:12:184:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:182:15:182:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:185:5:185:5 | a | semmle.label | a | | hash_flow.rb:185:9:185:12 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:185:9:185:23 | call to delete | semmle.label | call to delete | | hash_flow.rb:186:10:186:10 | a | semmle.label | a | | hash_flow.rb:193:5:193:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:193:12:196:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:194:15:194:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:197:5:197:5 | a [element :a] | semmle.label | a [element :a] | | hash_flow.rb:197:9:197:12 | [post] hash [element :a] | semmle.label | [post] hash [element :a] | @@ -1141,13 +1269,17 @@ nodes | hash_flow.rb:202:10:202:17 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:209:5:209:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:209:5:209:8 | hash [element :c, element :d] | semmle.label | hash [element :c, element :d] | +| hash_flow.rb:209:12:216:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:209:12:216:5 | call to [] [element :c, element :d] | semmle.label | call to [] [element :c, element :d] | | hash_flow.rb:210:15:210:25 | call to taint | semmle.label | call to taint | +| hash_flow.rb:212:15:215:9 | call to [] [element :d] | semmle.label | call to [] [element :d] | | hash_flow.rb:213:19:213:29 | call to taint | semmle.label | call to taint | | hash_flow.rb:217:10:217:13 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:217:10:217:21 | call to dig | semmle.label | call to dig | | hash_flow.rb:219:10:219:13 | hash [element :c, element :d] | semmle.label | hash [element :c, element :d] | | hash_flow.rb:219:10:219:24 | call to dig | semmle.label | call to dig | | hash_flow.rb:226:5:226:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:226:12:229:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:227:15:227:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:230:5:230:5 | x [element :a] | semmle.label | x [element :a] | | hash_flow.rb:230:9:230:12 | hash [element :a] | semmle.label | hash [element :a] | @@ -1157,6 +1289,7 @@ nodes | hash_flow.rb:234:10:234:10 | x [element :a] | semmle.label | x [element :a] | | hash_flow.rb:234:10:234:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:241:5:241:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:241:12:244:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:242:15:242:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:245:5:245:5 | x [element :a] | semmle.label | x [element :a] | | hash_flow.rb:245:9:245:12 | hash [element :a] | semmle.label | hash [element :a] | @@ -1164,6 +1297,7 @@ nodes | hash_flow.rb:248:10:248:10 | x [element :a] | semmle.label | x [element :a] | | hash_flow.rb:248:10:248:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:255:5:255:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:255:12:258:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:256:15:256:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:259:5:259:5 | x [element :a] | semmle.label | x [element :a] | | hash_flow.rb:259:9:259:12 | hash [element :a] | semmle.label | hash [element :a] | @@ -1173,6 +1307,7 @@ nodes | hash_flow.rb:263:10:263:10 | x [element :a] | semmle.label | x [element :a] | | hash_flow.rb:263:10:263:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:270:5:270:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:270:12:273:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:271:15:271:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:274:5:274:5 | x [element :a] | semmle.label | x [element :a] | | hash_flow.rb:274:9:274:12 | hash [element :a] | semmle.label | hash [element :a] | @@ -1182,6 +1317,7 @@ nodes | hash_flow.rb:277:10:277:10 | x [element :a] | semmle.label | x [element :a] | | hash_flow.rb:277:10:277:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:284:5:284:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:284:12:289:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:287:15:287:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:290:5:290:5 | x [element :c] | semmle.label | x [element :c] | | hash_flow.rb:290:9:290:12 | hash [element :c] | semmle.label | hash [element :c] | @@ -1190,6 +1326,8 @@ nodes | hash_flow.rb:293:10:293:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:300:5:300:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:300:5:300:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:300:12:304:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:300:12:304:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:301:15:301:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:303:15:303:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:305:5:305:5 | b | semmle.label | b | @@ -1221,6 +1359,8 @@ nodes | hash_flow.rb:316:10:316:10 | b | semmle.label | b | | hash_flow.rb:322:5:322:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:322:5:322:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:322:12:326:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:322:12:326:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:323:15:323:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:325:15:325:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:327:5:327:5 | b [element] | semmle.label | b [element] | @@ -1246,6 +1386,8 @@ nodes | hash_flow.rb:335:10:335:13 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:341:5:341:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:341:5:341:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:341:12:345:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:341:12:345:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:342:15:342:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:344:15:344:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:346:5:346:5 | b [element :a] | semmle.label | b [element :a] | @@ -1259,6 +1401,8 @@ nodes | hash_flow.rb:351:11:351:15 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:357:5:357:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:357:5:357:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:357:12:361:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:357:12:361:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:358:15:358:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:360:15:360:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:362:5:362:8 | [post] hash [element :a] | semmle.label | [post] hash [element :a] | @@ -1271,6 +1415,8 @@ nodes | hash_flow.rb:367:11:367:18 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:373:5:373:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:373:5:373:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:373:12:377:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:373:12:377:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:374:15:374:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:376:15:376:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:378:5:378:5 | b [element] | semmle.label | b [element] | @@ -1282,6 +1428,8 @@ nodes | hash_flow.rb:379:11:379:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:385:5:385:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:385:5:385:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:385:12:389:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:385:12:389:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:386:15:386:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:388:15:388:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:390:5:390:5 | b [element :a] | semmle.label | b [element :a] | @@ -1299,10 +1447,14 @@ nodes | hash_flow.rb:396:11:396:15 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:402:5:402:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:402:5:402:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:402:13:406:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:402:13:406:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:403:15:403:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:405:15:405:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:407:5:407:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:407:5:407:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:407:13:411:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:407:13:411:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:408:15:408:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:410:15:410:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:412:5:412:8 | hash [element :a] | semmle.label | hash [element :a] | @@ -1335,10 +1487,14 @@ nodes | hash_flow.rb:422:11:422:18 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:428:5:428:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:428:5:428:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:428:13:432:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:428:13:432:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:429:15:429:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:431:15:431:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:433:5:433:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:433:5:433:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:433:13:437:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:433:13:437:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:434:15:434:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:436:15:436:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:438:5:438:8 | hash [element :a] | semmle.label | hash [element :a] | @@ -1386,6 +1542,7 @@ nodes | hash_flow.rb:455:11:455:15 | hash1 [element :f] | semmle.label | hash1 [element :f] | | hash_flow.rb:455:11:455:19 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:461:5:461:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:461:12:464:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:462:15:462:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:465:5:465:5 | b [element 1] | semmle.label | b [element 1] | | hash_flow.rb:465:9:465:12 | hash [element :a] | semmle.label | hash [element :a] | @@ -1393,6 +1550,7 @@ nodes | hash_flow.rb:467:10:467:10 | b [element 1] | semmle.label | b [element 1] | | hash_flow.rb:467:10:467:13 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:473:5:473:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:473:12:476:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:474:15:474:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:477:5:477:5 | b [element :a] | semmle.label | b [element :a] | | hash_flow.rb:477:9:477:12 | hash [element :a] | semmle.label | hash [element :a] | @@ -1402,6 +1560,7 @@ nodes | hash_flow.rb:482:10:482:10 | b [element :a] | semmle.label | b [element :a] | | hash_flow.rb:482:10:482:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:488:5:488:8 | hash [element :a] | semmle.label | hash [element :a] | +| hash_flow.rb:488:12:491:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_flow.rb:489:15:489:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:492:5:492:5 | b [element :a] | semmle.label | b [element :a] | | hash_flow.rb:492:9:492:12 | [post] hash [element :a] | semmle.label | [post] hash [element :a] | @@ -1415,6 +1574,8 @@ nodes | hash_flow.rb:498:10:498:17 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:504:5:504:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:504:5:504:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:504:12:508:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:504:12:508:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:505:15:505:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:507:15:507:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:512:5:512:9 | [post] hash2 [element :a] | semmle.label | [post] hash2 [element :a] | @@ -1429,6 +1590,8 @@ nodes | hash_flow.rb:515:11:515:19 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:519:5:519:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:519:5:519:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:519:12:523:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:519:12:523:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:520:15:520:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:522:15:522:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:524:5:524:5 | b [element :a] | semmle.label | b [element :a] | @@ -1442,6 +1605,8 @@ nodes | hash_flow.rb:529:11:529:15 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:535:5:535:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:535:5:535:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:535:12:539:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:535:12:539:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:536:15:536:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:538:15:538:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:540:5:540:8 | [post] hash [element :a] | semmle.label | [post] hash [element :a] | @@ -1454,6 +1619,8 @@ nodes | hash_flow.rb:545:11:545:18 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:551:5:551:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:551:5:551:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:551:12:555:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:551:12:555:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:552:15:552:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:554:15:554:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:556:5:556:5 | b [element 1] | semmle.label | b [element 1] | @@ -1469,6 +1636,8 @@ nodes | hash_flow.rb:559:11:559:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:565:5:565:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:565:5:565:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:565:12:569:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:565:12:569:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:566:15:566:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:568:15:568:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:570:5:570:5 | b [element :a] | semmle.label | b [element :a] | @@ -1491,6 +1660,8 @@ nodes | hash_flow.rb:578:11:578:15 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:584:5:584:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:584:5:584:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:584:12:588:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:584:12:588:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:585:15:585:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:587:15:587:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:589:5:589:5 | a [element, element 1] | semmle.label | a [element, element 1] | @@ -1503,6 +1674,8 @@ nodes | hash_flow.rb:591:11:591:17 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:597:5:597:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:597:5:597:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:597:12:601:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:597:12:601:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:598:15:598:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:600:15:600:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:602:5:602:5 | a [element :a] | semmle.label | a [element :a] | @@ -1523,12 +1696,15 @@ nodes | hash_flow.rb:607:9:611:7 | call to to_h [element] | semmle.label | call to to_h [element] | | hash_flow.rb:607:28:607:32 | value | semmle.label | value | | hash_flow.rb:609:14:609:18 | value | semmle.label | value | +| hash_flow.rb:610:9:610:25 | call to [] [element 1] | semmle.label | call to [] [element 1] | | hash_flow.rb:610:14:610:24 | call to taint | semmle.label | call to taint | | hash_flow.rb:612:10:612:16 | ( ... ) | semmle.label | ( ... ) | | hash_flow.rb:612:11:612:11 | b [element] | semmle.label | b [element] | | hash_flow.rb:612:11:612:15 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:618:5:618:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:618:5:618:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:618:12:622:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:618:12:622:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:619:15:619:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:621:15:621:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:623:5:623:5 | a [element] | semmle.label | a [element] | @@ -1546,6 +1722,8 @@ nodes | hash_flow.rb:626:11:626:16 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:632:5:632:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:632:5:632:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:632:12:636:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:632:12:636:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:633:15:633:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:635:15:635:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:637:5:637:8 | [post] hash [element] | semmle.label | [post] hash [element] | @@ -1565,6 +1743,8 @@ nodes | hash_flow.rb:642:11:642:19 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:648:5:648:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:648:5:648:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:648:12:652:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:648:12:652:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:649:15:649:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:651:15:651:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:653:5:653:5 | b [element] | semmle.label | b [element] | @@ -1582,6 +1762,8 @@ nodes | hash_flow.rb:658:11:658:15 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:664:5:664:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:664:5:664:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:664:12:668:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:664:12:668:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:665:15:665:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:667:15:667:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:669:5:669:8 | [post] hash [element] | semmle.label | [post] hash [element] | @@ -1595,10 +1777,14 @@ nodes | hash_flow.rb:673:11:673:18 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:679:5:679:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:679:5:679:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:679:13:683:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:679:13:683:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:680:15:680:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:682:15:682:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:684:5:684:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:684:5:684:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:684:13:688:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:684:13:688:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:685:15:685:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:687:15:687:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:689:5:689:8 | hash [element :a] | semmle.label | hash [element :a] | @@ -1647,6 +1833,8 @@ nodes | hash_flow.rb:706:11:706:19 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:712:5:712:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:712:5:712:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:712:12:716:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:712:12:716:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:713:15:713:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:715:15:715:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:717:5:717:5 | a [element] | semmle.label | a [element] | @@ -1658,6 +1846,8 @@ nodes | hash_flow.rb:718:11:718:14 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:724:5:724:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:724:5:724:8 | hash [element :c] | semmle.label | hash [element :c] | +| hash_flow.rb:724:12:728:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:724:12:728:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:725:15:725:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:727:15:727:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:729:5:729:5 | b [element 0] | semmle.label | b [element 0] | @@ -1673,10 +1863,14 @@ nodes | hash_flow.rb:732:10:732:13 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:738:5:738:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:738:5:738:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:738:13:742:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:738:13:742:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:739:15:739:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:741:15:741:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:743:5:743:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:743:5:743:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:743:13:747:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:743:13:747:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:744:15:744:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:746:15:746:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:748:5:748:8 | hash [element :a] | semmle.label | hash [element :a] | @@ -1684,6 +1878,11 @@ nodes | hash_flow.rb:748:5:748:8 | hash [element :d] | semmle.label | hash [element :d] | | hash_flow.rb:748:5:748:8 | hash [element :f] | semmle.label | hash [element :f] | | hash_flow.rb:748:5:748:8 | hash [element :g] | semmle.label | hash [element :g] | +| hash_flow.rb:748:12:748:59 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:748:12:748:59 | call to [] [element :c] | semmle.label | call to [] [element :c] | +| hash_flow.rb:748:12:748:59 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:748:12:748:59 | call to [] [element :f] | semmle.label | call to [] [element :f] | +| hash_flow.rb:748:12:748:59 | call to [] [element :g] | semmle.label | call to [] [element :g] | | hash_flow.rb:748:14:748:20 | ** ... [element :a] | semmle.label | ** ... [element :a] | | hash_flow.rb:748:14:748:20 | ** ... [element :c] | semmle.label | ** ... [element :c] | | hash_flow.rb:748:16:748:20 | hash1 [element :a] | semmle.label | hash1 [element :a] | @@ -1706,6 +1905,9 @@ nodes | hash_flow.rb:762:5:762:8 | hash [element :a] | semmle.label | hash [element :a] | | hash_flow.rb:762:5:762:8 | hash [element :c] | semmle.label | hash [element :c] | | hash_flow.rb:762:5:762:8 | hash [element :d] | semmle.label | hash [element :d] | +| hash_flow.rb:762:12:767:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:762:12:767:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | +| hash_flow.rb:762:12:767:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | | hash_flow.rb:763:15:763:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:765:15:765:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:766:15:766:25 | call to taint | semmle.label | call to taint | @@ -1725,10 +1927,14 @@ nodes | hash_flow.rb:783:10:783:17 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:790:5:790:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:790:5:790:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:790:13:794:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:790:13:794:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:791:15:791:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:793:15:793:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:795:5:795:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:795:5:795:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:795:13:799:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:795:13:799:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:796:15:796:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:798:15:798:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:800:5:800:8 | hash [element :a] | semmle.label | hash [element :a] | @@ -1761,10 +1967,14 @@ nodes | hash_flow.rb:810:11:810:18 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:816:5:816:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:816:5:816:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:816:13:820:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:816:13:820:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:817:15:817:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:819:15:819:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:821:5:821:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:821:5:821:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:821:13:825:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:821:13:825:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:822:15:822:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:824:15:824:25 | call to taint | semmle.label | call to taint | | hash_flow.rb:826:5:826:8 | hash [element :a] | semmle.label | hash [element :a] | @@ -1813,10 +2023,14 @@ nodes | hash_flow.rb:843:11:843:19 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:849:5:849:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:849:5:849:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:849:13:853:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:849:13:853:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:850:12:850:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:852:12:852:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:854:5:854:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:854:5:854:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:854:13:858:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:854:13:858:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:855:12:855:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:857:12:857:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:860:5:860:9 | hash3 [element :a] | semmle.label | hash3 [element :a] | @@ -1869,10 +2083,14 @@ nodes | hash_flow.rb:875:11:875:19 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:881:5:881:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:881:5:881:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:881:13:885:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:881:13:885:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:882:12:882:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:884:12:884:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:886:5:886:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:886:5:886:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:886:13:890:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:886:13:890:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:887:12:887:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:889:12:889:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:892:5:892:8 | hash [element :a] | semmle.label | hash [element :a] | @@ -1917,10 +2135,14 @@ nodes | hash_flow.rb:905:11:905:19 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:911:5:911:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:911:5:911:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:911:13:915:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:911:13:915:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:912:12:912:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:914:12:914:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:916:5:916:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:916:5:916:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:916:13:920:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:916:13:920:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:917:12:917:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:919:12:919:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:922:5:922:8 | hash [element :a] | semmle.label | hash [element :a] | @@ -1965,10 +2187,14 @@ nodes | hash_flow.rb:935:11:935:19 | ...[...] | semmle.label | ...[...] | | hash_flow.rb:941:5:941:9 | hash1 [element :a] | semmle.label | hash1 [element :a] | | hash_flow.rb:941:5:941:9 | hash1 [element :c] | semmle.label | hash1 [element :c] | +| hash_flow.rb:941:13:945:5 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_flow.rb:941:13:945:5 | call to [] [element :c] | semmle.label | call to [] [element :c] | | hash_flow.rb:942:12:942:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:944:12:944:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:946:5:946:9 | hash2 [element :d] | semmle.label | hash2 [element :d] | | hash_flow.rb:946:5:946:9 | hash2 [element :f] | semmle.label | hash2 [element :f] | +| hash_flow.rb:946:13:950:5 | call to [] [element :d] | semmle.label | call to [] [element :d] | +| hash_flow.rb:946:13:950:5 | call to [] [element :f] | semmle.label | call to [] [element :f] | | hash_flow.rb:947:12:947:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:949:12:949:22 | call to taint | semmle.label | call to taint | | hash_flow.rb:952:5:952:8 | hash [element :a] | semmle.label | hash [element :a] | diff --git a/ruby/ql/test/library-tests/dataflow/local/TaintStep.expected b/ruby/ql/test/library-tests/dataflow/local/TaintStep.expected index 35249d82a65..f640ff6551a 100644 --- a/ruby/ql/test/library-tests/dataflow/local/TaintStep.expected +++ b/ruby/ql/test/library-tests/dataflow/local/TaintStep.expected @@ -2798,12 +2798,14 @@ | UseUseExplosion.rb:21:3691:21:3696 | call to use | UseUseExplosion.rb:21:3686:21:3696 | else ... | | UseUseExplosion.rb:24:5:25:7 | synthetic splat parameter | UseUseExplosion.rb:24:13:24:13 | i | | UseUseExplosion.rb:24:5:25:7 | use | UseUseExplosion.rb:1:1:26:3 | C | +| file://:0:0:0:0 | [summary param] ** in I18n.translate | file://:0:0:0:0 | [summary] read: Argument[hash-splat].Element[any] in I18n.translate | | file://:0:0:0:0 | [summary param] position 0 in & | file://:0:0:0:0 | [summary] read: Argument[0].Element[any] in & | | file://:0:0:0:0 | [summary param] position 0 in + | file://:0:0:0:0 | [summary] read: Argument[0].Element[any] in + | | file://:0:0:0:0 | [summary param] position 0 in ActionController::Parameters#merge | file://:0:0:0:0 | [summary] to write: ReturnValue in ActionController::Parameters#merge | | file://:0:0:0:0 | [summary param] position 0 in ActionController::Parameters#merge! | file://:0:0:0:0 | [summary] to write: Argument[self] in ActionController::Parameters#merge! | | file://:0:0:0:0 | [summary param] position 0 in ActionController::Parameters#merge! | file://:0:0:0:0 | [summary] to write: ReturnValue in ActionController::Parameters#merge! | | file://:0:0:0:0 | [summary param] position 0 in Arel.sql | file://:0:0:0:0 | [summary] to write: ReturnValue in Arel.sql | +| file://:0:0:0:0 | [summary param] position 0 in Arel::Nodes::SqlLiteral.new | file://:0:0:0:0 | [summary] to write: ReturnValue in Arel::Nodes::SqlLiteral.new | | file://:0:0:0:0 | [summary param] position 0 in Base64.decode64() | file://:0:0:0:0 | [summary] to write: ReturnValue in Base64.decode64() | | file://:0:0:0:0 | [summary param] position 0 in ERB.new | file://:0:0:0:0 | [summary] to write: ReturnValue in ERB.new | | file://:0:0:0:0 | [summary param] position 0 in File.absolute_path | file://:0:0:0:0 | [summary] to write: ReturnValue in File.absolute_path | @@ -2839,6 +2841,7 @@ | file://:0:0:0:0 | [summary param] self in assoc-unknown-arg | file://:0:0:0:0 | [summary] read: Argument[self].Element[any] in assoc-unknown-arg | | file://:0:0:0:0 | [summary param] self in each(0) | file://:0:0:0:0 | [summary] read: Argument[self].Element[any] in each(0) | | file://:0:0:0:0 | [summary] read: Argument[0].Element[any] in Hash[] | file://:0:0:0:0 | [summary] read: Argument[0].Element[any].Element[1] in Hash[] | +| file://:0:0:0:0 | [summary] read: Argument[hash-splat].Element[any] in I18n.translate | file://:0:0:0:0 | [summary] to write: ReturnValue in I18n.translate | | local_dataflow.rb:1:1:7:3 | self (foo) | local_dataflow.rb:3:8:3:10 | self | | local_dataflow.rb:1:1:7:3 | self in foo | local_dataflow.rb:1:1:7:3 | self (foo) | | local_dataflow.rb:1:1:7:3 | synthetic splat parameter | local_dataflow.rb:1:9:1:9 | a | diff --git a/ruby/ql/test/library-tests/dataflow/params/params-flow.expected b/ruby/ql/test/library-tests/dataflow/params/params-flow.expected index 629c9993984..879c57b1f17 100644 --- a/ruby/ql/test/library-tests/dataflow/params/params-flow.expected +++ b/ruby/ql/test/library-tests/dataflow/params/params-flow.expected @@ -27,32 +27,39 @@ edges | params_flow.rb:33:26:33:34 | call to taint | params_flow.rb:25:17:25:24 | **kwargs [hash-splat position :p2] | provenance | | | params_flow.rb:33:41:33:49 | call to taint | params_flow.rb:25:17:25:24 | **kwargs [hash-splat position :p3] | provenance | | | params_flow.rb:34:1:34:4 | args [element :p3] | params_flow.rb:35:25:35:28 | args [element :p3] | provenance | | -| params_flow.rb:34:14:34:22 | call to taint | params_flow.rb:34:1:34:4 | args [element :p3] | provenance | | +| params_flow.rb:34:8:34:32 | call to [] [element :p3] | params_flow.rb:34:1:34:4 | args [element :p3] | provenance | | +| params_flow.rb:34:14:34:22 | call to taint | params_flow.rb:34:8:34:32 | call to [] [element :p3] | provenance | | | params_flow.rb:35:12:35:20 | call to taint | params_flow.rb:25:12:25:13 | p1 | provenance | | | params_flow.rb:35:23:35:28 | ** ... [element :p3] | params_flow.rb:25:17:25:24 | **kwargs [element :p3] | provenance | | | params_flow.rb:35:25:35:28 | args [element :p3] | params_flow.rb:35:23:35:28 | ** ... [element :p3] | provenance | | | params_flow.rb:37:1:37:4 | args [element :p1] | params_flow.rb:38:10:38:13 | args [element :p1] | provenance | | | params_flow.rb:37:1:37:4 | args [element :p2] | params_flow.rb:38:10:38:13 | args [element :p2] | provenance | | -| params_flow.rb:37:16:37:24 | call to taint | params_flow.rb:37:1:37:4 | args [element :p1] | provenance | | -| params_flow.rb:37:34:37:42 | call to taint | params_flow.rb:37:1:37:4 | args [element :p2] | provenance | | +| params_flow.rb:37:8:37:44 | call to [] [element :p1] | params_flow.rb:37:1:37:4 | args [element :p1] | provenance | | +| params_flow.rb:37:8:37:44 | call to [] [element :p2] | params_flow.rb:37:1:37:4 | args [element :p2] | provenance | | +| params_flow.rb:37:16:37:24 | call to taint | params_flow.rb:37:8:37:44 | call to [] [element :p1] | provenance | | +| params_flow.rb:37:34:37:42 | call to taint | params_flow.rb:37:8:37:44 | call to [] [element :p2] | provenance | | | params_flow.rb:38:8:38:13 | ** ... [element :p1] | params_flow.rb:25:12:25:13 | p1 | provenance | | | params_flow.rb:38:8:38:13 | ** ... [element :p2] | params_flow.rb:25:17:25:24 | **kwargs [element :p2] | provenance | | | params_flow.rb:38:10:38:13 | args [element :p1] | params_flow.rb:38:8:38:13 | ** ... [element :p1] | provenance | | | params_flow.rb:38:10:38:13 | args [element :p2] | params_flow.rb:38:8:38:13 | ** ... [element :p2] | provenance | | | params_flow.rb:40:1:40:4 | args [element :p1] | params_flow.rb:41:26:41:29 | args [element :p1] | provenance | | -| params_flow.rb:40:16:40:24 | call to taint | params_flow.rb:40:1:40:4 | args [element :p1] | provenance | | +| params_flow.rb:40:8:40:26 | call to [] [element :p1] | params_flow.rb:40:1:40:4 | args [element :p1] | provenance | | +| params_flow.rb:40:16:40:24 | call to taint | params_flow.rb:40:8:40:26 | call to [] [element :p1] | provenance | | | params_flow.rb:41:13:41:21 | call to taint | params_flow.rb:16:18:16:19 | p2 | provenance | | | params_flow.rb:41:24:41:29 | ** ... [element :p1] | params_flow.rb:16:13:16:14 | p1 | provenance | | | params_flow.rb:41:26:41:29 | args [element :p1] | params_flow.rb:41:24:41:29 | ** ... [element :p1] | provenance | | | params_flow.rb:43:1:43:4 | args [element 0] | params_flow.rb:44:24:44:27 | args [element 0] | provenance | | -| params_flow.rb:43:9:43:17 | call to taint | params_flow.rb:43:1:43:4 | args [element 0] | provenance | | +| params_flow.rb:43:8:43:18 | call to [] [element 0] | params_flow.rb:43:1:43:4 | args [element 0] | provenance | | +| params_flow.rb:43:9:43:17 | call to taint | params_flow.rb:43:8:43:18 | call to [] [element 0] | provenance | | | params_flow.rb:44:12:44:20 | call to taint | params_flow.rb:9:16:9:17 | p1 | provenance | | | params_flow.rb:44:23:44:27 | * ... [element 0] | params_flow.rb:9:20:9:21 | p2 | provenance | | | params_flow.rb:44:24:44:27 | args [element 0] | params_flow.rb:44:23:44:27 | * ... [element 0] | provenance | | | params_flow.rb:46:1:46:4 | args [element 0] | params_flow.rb:47:13:47:16 | args [element 0] | provenance | | | params_flow.rb:46:1:46:4 | args [element 1] | params_flow.rb:47:13:47:16 | args [element 1] | provenance | | -| params_flow.rb:46:9:46:17 | call to taint | params_flow.rb:46:1:46:4 | args [element 0] | provenance | | -| params_flow.rb:46:20:46:28 | call to taint | params_flow.rb:46:1:46:4 | args [element 1] | provenance | | +| params_flow.rb:46:8:46:29 | call to [] [element 0] | params_flow.rb:46:1:46:4 | args [element 0] | provenance | | +| params_flow.rb:46:8:46:29 | call to [] [element 1] | params_flow.rb:46:1:46:4 | args [element 1] | provenance | | +| params_flow.rb:46:9:46:17 | call to taint | params_flow.rb:46:8:46:29 | call to [] [element 0] | provenance | | +| params_flow.rb:46:20:46:28 | call to taint | params_flow.rb:46:8:46:29 | call to [] [element 1] | provenance | | | params_flow.rb:47:12:47:16 | * ... [element 0] | params_flow.rb:9:16:9:17 | p1 | provenance | | | params_flow.rb:47:12:47:16 | * ... [element 1] | params_flow.rb:9:20:9:21 | p2 | provenance | | | params_flow.rb:47:13:47:16 | args [element 0] | params_flow.rb:47:12:47:16 | * ... [element 0] | provenance | | @@ -66,15 +73,18 @@ edges | params_flow.rb:55:9:55:17 | call to taint | params_flow.rb:49:13:49:14 | p1 | provenance | | | params_flow.rb:55:20:55:28 | call to taint | params_flow.rb:49:17:49:24 | *posargs [element 0] | provenance | | | params_flow.rb:57:1:57:4 | args [element 0] | params_flow.rb:58:21:58:24 | args [element 0] | provenance | | -| params_flow.rb:57:9:57:17 | call to taint | params_flow.rb:57:1:57:4 | args [element 0] | provenance | | +| params_flow.rb:57:8:57:18 | call to [] [element 0] | params_flow.rb:57:1:57:4 | args [element 0] | provenance | | +| params_flow.rb:57:9:57:17 | call to taint | params_flow.rb:57:8:57:18 | call to [] [element 0] | provenance | | | params_flow.rb:58:9:58:17 | call to taint | params_flow.rb:49:13:49:14 | p1 | provenance | | | params_flow.rb:58:20:58:24 | * ... [element 0] | params_flow.rb:49:17:49:24 | *posargs [element 0] | provenance | | | params_flow.rb:58:20:58:24 | * ... [element 0] | params_flow.rb:49:17:49:24 | *posargs [element 0] | provenance | | | params_flow.rb:58:21:58:24 | args [element 0] | params_flow.rb:58:20:58:24 | * ... [element 0] | provenance | | | params_flow.rb:60:1:60:4 | args [element 0] | params_flow.rb:61:10:61:13 | args [element 0] | provenance | | | params_flow.rb:60:1:60:4 | args [element 1] | params_flow.rb:61:10:61:13 | args [element 1] | provenance | | -| params_flow.rb:60:9:60:17 | call to taint | params_flow.rb:60:1:60:4 | args [element 0] | provenance | | -| params_flow.rb:60:20:60:28 | call to taint | params_flow.rb:60:1:60:4 | args [element 1] | provenance | | +| params_flow.rb:60:8:60:29 | call to [] [element 0] | params_flow.rb:60:1:60:4 | args [element 0] | provenance | | +| params_flow.rb:60:8:60:29 | call to [] [element 1] | params_flow.rb:60:1:60:4 | args [element 1] | provenance | | +| params_flow.rb:60:9:60:17 | call to taint | params_flow.rb:60:8:60:29 | call to [] [element 0] | provenance | | +| params_flow.rb:60:20:60:28 | call to taint | params_flow.rb:60:8:60:29 | call to [] [element 1] | provenance | | | params_flow.rb:61:9:61:13 | * ... [element 0] | params_flow.rb:49:13:49:14 | p1 | provenance | | | params_flow.rb:61:9:61:13 | * ... [element 1] | params_flow.rb:49:17:49:24 | *posargs [element 0] | provenance | | | params_flow.rb:61:10:61:13 | args [element 0] | params_flow.rb:61:9:61:13 | * ... [element 0] | provenance | | @@ -94,7 +104,8 @@ edges | params_flow.rb:78:43:78:51 | call to taint | params_flow.rb:69:24:69:24 | w | provenance | | | params_flow.rb:78:54:78:62 | call to taint | params_flow.rb:69:27:69:27 | r | provenance | | | params_flow.rb:80:1:80:4 | args [element 0] | params_flow.rb:81:22:81:25 | args [element 0] | provenance | | -| params_flow.rb:80:9:80:17 | call to taint | params_flow.rb:80:1:80:4 | args [element 0] | provenance | | +| params_flow.rb:80:8:80:51 | call to [] [element 0] | params_flow.rb:80:1:80:4 | args [element 0] | provenance | | +| params_flow.rb:80:9:80:17 | call to taint | params_flow.rb:80:8:80:51 | call to [] [element 0] | provenance | | | params_flow.rb:81:10:81:18 | call to taint | params_flow.rb:69:14:69:14 | x | provenance | | | params_flow.rb:81:21:81:25 | * ... [element 0] | params_flow.rb:69:17:69:17 | y | provenance | | | params_flow.rb:81:22:81:25 | args [element 0] | params_flow.rb:81:21:81:25 | * ... [element 0] | provenance | | @@ -108,10 +119,14 @@ edges | params_flow.rb:93:1:93:4 | args [element 1] | params_flow.rb:94:33:94:36 | args [element 1] | provenance | | | params_flow.rb:93:1:93:4 | args [element 2] | params_flow.rb:94:33:94:36 | args [element 2] | provenance | | | params_flow.rb:93:1:93:4 | args [element 3] | params_flow.rb:94:33:94:36 | args [element 3] | provenance | | -| params_flow.rb:93:9:93:17 | call to taint | params_flow.rb:93:1:93:4 | args [element 0] | provenance | | -| params_flow.rb:93:20:93:28 | call to taint | params_flow.rb:93:1:93:4 | args [element 1] | provenance | | -| params_flow.rb:93:31:93:39 | call to taint | params_flow.rb:93:1:93:4 | args [element 2] | provenance | | -| params_flow.rb:93:42:93:50 | call to taint | params_flow.rb:93:1:93:4 | args [element 3] | provenance | | +| params_flow.rb:93:8:93:51 | call to [] [element 0] | params_flow.rb:93:1:93:4 | args [element 0] | provenance | | +| params_flow.rb:93:8:93:51 | call to [] [element 1] | params_flow.rb:93:1:93:4 | args [element 1] | provenance | | +| params_flow.rb:93:8:93:51 | call to [] [element 2] | params_flow.rb:93:1:93:4 | args [element 2] | provenance | | +| params_flow.rb:93:8:93:51 | call to [] [element 3] | params_flow.rb:93:1:93:4 | args [element 3] | provenance | | +| params_flow.rb:93:9:93:17 | call to taint | params_flow.rb:93:8:93:51 | call to [] [element 0] | provenance | | +| params_flow.rb:93:20:93:28 | call to taint | params_flow.rb:93:8:93:51 | call to [] [element 1] | provenance | | +| params_flow.rb:93:31:93:39 | call to taint | params_flow.rb:93:8:93:51 | call to [] [element 2] | provenance | | +| params_flow.rb:93:42:93:50 | call to taint | params_flow.rb:93:8:93:51 | call to [] [element 3] | provenance | | | params_flow.rb:94:10:94:18 | call to taint | params_flow.rb:83:14:83:14 | t | provenance | | | params_flow.rb:94:21:94:29 | call to taint | params_flow.rb:83:17:83:17 | u | provenance | | | params_flow.rb:94:32:94:36 | * ... [element 0] | params_flow.rb:83:20:83:20 | v | provenance | | @@ -146,8 +161,10 @@ edges | params_flow.rb:118:13:118:13 | x [element] | params_flow.rb:118:12:118:13 | * ... [element] | provenance | | | params_flow.rb:130:1:130:4 | args [element 0] | params_flow.rb:131:11:131:14 | args [element 0] | provenance | | | params_flow.rb:130:1:130:4 | args [element 1] | params_flow.rb:131:11:131:14 | args [element 1] | provenance | | -| params_flow.rb:130:9:130:17 | call to taint | params_flow.rb:130:1:130:4 | args [element 0] | provenance | | -| params_flow.rb:130:20:130:28 | call to taint | params_flow.rb:130:1:130:4 | args [element 1] | provenance | | +| params_flow.rb:130:8:130:29 | call to [] [element 0] | params_flow.rb:130:1:130:4 | args [element 0] | provenance | | +| params_flow.rb:130:8:130:29 | call to [] [element 1] | params_flow.rb:130:1:130:4 | args [element 1] | provenance | | +| params_flow.rb:130:9:130:17 | call to taint | params_flow.rb:130:8:130:29 | call to [] [element 0] | provenance | | +| params_flow.rb:130:20:130:28 | call to taint | params_flow.rb:130:8:130:29 | call to [] [element 1] | provenance | | | params_flow.rb:131:10:131:14 | * ... [element 0] | params_flow.rb:83:14:83:14 | t | provenance | | | params_flow.rb:131:10:131:14 | * ... [element 1] | params_flow.rb:83:17:83:17 | u | provenance | | | params_flow.rb:131:11:131:14 | args [element 0] | params_flow.rb:131:10:131:14 | * ... [element 0] | provenance | | @@ -156,7 +173,8 @@ edges | params_flow.rb:133:14:133:18 | *args [element 1] | params_flow.rb:134:10:134:13 | args [element 1] | provenance | | | params_flow.rb:134:10:134:13 | args [element 1] | params_flow.rb:134:10:134:16 | ...[...] | provenance | | | params_flow.rb:137:10:137:43 | * ... [element 1] | params_flow.rb:133:14:133:18 | *args [element 1] | provenance | | -| params_flow.rb:137:23:137:31 | call to taint | params_flow.rb:137:10:137:43 | * ... [element 1] | provenance | | +| params_flow.rb:137:11:137:43 | call to [] [element 1] | params_flow.rb:137:10:137:43 | * ... [element 1] | provenance | | +| params_flow.rb:137:23:137:31 | call to taint | params_flow.rb:137:11:137:43 | call to [] [element 1] | provenance | | | params_flow.rb:153:28:153:29 | p2 | params_flow.rb:154:18:154:19 | p2 | provenance | | | params_flow.rb:154:18:154:19 | p2 | params_flow.rb:154:5:154:6 | [post] p1 [element 0] | provenance | | | params_flow.rb:164:23:164:24 | [post] p1 [element 0] | params_flow.rb:165:6:165:7 | p1 [element 0] | provenance | | @@ -204,12 +222,15 @@ nodes | params_flow.rb:33:26:33:34 | call to taint | semmle.label | call to taint | | params_flow.rb:33:41:33:49 | call to taint | semmle.label | call to taint | | params_flow.rb:34:1:34:4 | args [element :p3] | semmle.label | args [element :p3] | +| params_flow.rb:34:8:34:32 | call to [] [element :p3] | semmle.label | call to [] [element :p3] | | params_flow.rb:34:14:34:22 | call to taint | semmle.label | call to taint | | params_flow.rb:35:12:35:20 | call to taint | semmle.label | call to taint | | params_flow.rb:35:23:35:28 | ** ... [element :p3] | semmle.label | ** ... [element :p3] | | params_flow.rb:35:25:35:28 | args [element :p3] | semmle.label | args [element :p3] | | params_flow.rb:37:1:37:4 | args [element :p1] | semmle.label | args [element :p1] | | params_flow.rb:37:1:37:4 | args [element :p2] | semmle.label | args [element :p2] | +| params_flow.rb:37:8:37:44 | call to [] [element :p1] | semmle.label | call to [] [element :p1] | +| params_flow.rb:37:8:37:44 | call to [] [element :p2] | semmle.label | call to [] [element :p2] | | params_flow.rb:37:16:37:24 | call to taint | semmle.label | call to taint | | params_flow.rb:37:34:37:42 | call to taint | semmle.label | call to taint | | params_flow.rb:38:8:38:13 | ** ... [element :p1] | semmle.label | ** ... [element :p1] | @@ -217,17 +238,21 @@ nodes | params_flow.rb:38:10:38:13 | args [element :p1] | semmle.label | args [element :p1] | | params_flow.rb:38:10:38:13 | args [element :p2] | semmle.label | args [element :p2] | | params_flow.rb:40:1:40:4 | args [element :p1] | semmle.label | args [element :p1] | +| params_flow.rb:40:8:40:26 | call to [] [element :p1] | semmle.label | call to [] [element :p1] | | params_flow.rb:40:16:40:24 | call to taint | semmle.label | call to taint | | params_flow.rb:41:13:41:21 | call to taint | semmle.label | call to taint | | params_flow.rb:41:24:41:29 | ** ... [element :p1] | semmle.label | ** ... [element :p1] | | params_flow.rb:41:26:41:29 | args [element :p1] | semmle.label | args [element :p1] | | params_flow.rb:43:1:43:4 | args [element 0] | semmle.label | args [element 0] | +| params_flow.rb:43:8:43:18 | call to [] [element 0] | semmle.label | call to [] [element 0] | | params_flow.rb:43:9:43:17 | call to taint | semmle.label | call to taint | | params_flow.rb:44:12:44:20 | call to taint | semmle.label | call to taint | | params_flow.rb:44:23:44:27 | * ... [element 0] | semmle.label | * ... [element 0] | | params_flow.rb:44:24:44:27 | args [element 0] | semmle.label | args [element 0] | | params_flow.rb:46:1:46:4 | args [element 0] | semmle.label | args [element 0] | | params_flow.rb:46:1:46:4 | args [element 1] | semmle.label | args [element 1] | +| params_flow.rb:46:8:46:29 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| params_flow.rb:46:8:46:29 | call to [] [element 1] | semmle.label | call to [] [element 1] | | params_flow.rb:46:9:46:17 | call to taint | semmle.label | call to taint | | params_flow.rb:46:20:46:28 | call to taint | semmle.label | call to taint | | params_flow.rb:47:12:47:16 | * ... [element 0] | semmle.label | * ... [element 0] | @@ -245,12 +270,15 @@ nodes | params_flow.rb:55:9:55:17 | call to taint | semmle.label | call to taint | | params_flow.rb:55:20:55:28 | call to taint | semmle.label | call to taint | | params_flow.rb:57:1:57:4 | args [element 0] | semmle.label | args [element 0] | +| params_flow.rb:57:8:57:18 | call to [] [element 0] | semmle.label | call to [] [element 0] | | params_flow.rb:57:9:57:17 | call to taint | semmle.label | call to taint | | params_flow.rb:58:9:58:17 | call to taint | semmle.label | call to taint | | params_flow.rb:58:20:58:24 | * ... [element 0] | semmle.label | * ... [element 0] | | params_flow.rb:58:21:58:24 | args [element 0] | semmle.label | args [element 0] | | params_flow.rb:60:1:60:4 | args [element 0] | semmle.label | args [element 0] | | params_flow.rb:60:1:60:4 | args [element 1] | semmle.label | args [element 1] | +| params_flow.rb:60:8:60:29 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| params_flow.rb:60:8:60:29 | call to [] [element 1] | semmle.label | call to [] [element 1] | | params_flow.rb:60:9:60:17 | call to taint | semmle.label | call to taint | | params_flow.rb:60:20:60:28 | call to taint | semmle.label | call to taint | | params_flow.rb:61:9:61:13 | * ... [element 0] | semmle.label | * ... [element 0] | @@ -277,6 +305,7 @@ nodes | params_flow.rb:78:43:78:51 | call to taint | semmle.label | call to taint | | params_flow.rb:78:54:78:62 | call to taint | semmle.label | call to taint | | params_flow.rb:80:1:80:4 | args [element 0] | semmle.label | args [element 0] | +| params_flow.rb:80:8:80:51 | call to [] [element 0] | semmle.label | call to [] [element 0] | | params_flow.rb:80:9:80:17 | call to taint | semmle.label | call to taint | | params_flow.rb:81:10:81:18 | call to taint | semmle.label | call to taint | | params_flow.rb:81:21:81:25 | * ... [element 0] | semmle.label | * ... [element 0] | @@ -297,6 +326,10 @@ nodes | params_flow.rb:93:1:93:4 | args [element 1] | semmle.label | args [element 1] | | params_flow.rb:93:1:93:4 | args [element 2] | semmle.label | args [element 2] | | params_flow.rb:93:1:93:4 | args [element 3] | semmle.label | args [element 3] | +| params_flow.rb:93:8:93:51 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| params_flow.rb:93:8:93:51 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| params_flow.rb:93:8:93:51 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| params_flow.rb:93:8:93:51 | call to [] [element 3] | semmle.label | call to [] [element 3] | | params_flow.rb:93:9:93:17 | call to taint | semmle.label | call to taint | | params_flow.rb:93:20:93:28 | call to taint | semmle.label | call to taint | | params_flow.rb:93:31:93:39 | call to taint | semmle.label | call to taint | @@ -339,6 +372,8 @@ nodes | params_flow.rb:118:13:118:13 | x [element] | semmle.label | x [element] | | params_flow.rb:130:1:130:4 | args [element 0] | semmle.label | args [element 0] | | params_flow.rb:130:1:130:4 | args [element 1] | semmle.label | args [element 1] | +| params_flow.rb:130:8:130:29 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| params_flow.rb:130:8:130:29 | call to [] [element 1] | semmle.label | call to [] [element 1] | | params_flow.rb:130:9:130:17 | call to taint | semmle.label | call to taint | | params_flow.rb:130:20:130:28 | call to taint | semmle.label | call to taint | | params_flow.rb:131:10:131:14 | * ... [element 0] | semmle.label | * ... [element 0] | @@ -350,6 +385,7 @@ nodes | params_flow.rb:134:10:134:13 | args [element 1] | semmle.label | args [element 1] | | params_flow.rb:134:10:134:16 | ...[...] | semmle.label | ...[...] | | params_flow.rb:137:10:137:43 | * ... [element 1] | semmle.label | * ... [element 1] | +| params_flow.rb:137:11:137:43 | call to [] [element 1] | semmle.label | call to [] [element 1] | | params_flow.rb:137:23:137:31 | call to taint | semmle.label | call to taint | | params_flow.rb:153:28:153:29 | p2 | semmle.label | p2 | | params_flow.rb:154:5:154:6 | [post] p1 [element 0] | semmle.label | [post] p1 [element 0] | diff --git a/ruby/ql/test/library-tests/dataflow/summaries/Summaries.expected b/ruby/ql/test/library-tests/dataflow/summaries/Summaries.expected index 693832e5577..09c9d040e55 100644 --- a/ruby/ql/test/library-tests/dataflow/summaries/Summaries.expected +++ b/ruby/ql/test/library-tests/dataflow/summaries/Summaries.expected @@ -93,7 +93,8 @@ edges | summaries.rb:48:24:48:41 | call to source | summaries.rb:48:8:48:42 | call to preserveTaint | provenance | | | summaries.rb:51:24:51:30 | tainted | summaries.rb:51:6:51:31 | call to namedArg | provenance | | | summaries.rb:53:1:53:4 | args [element :foo] | summaries.rb:54:21:54:24 | args [element :foo] | provenance | | -| summaries.rb:53:15:53:31 | call to source | summaries.rb:53:1:53:4 | args [element :foo] | provenance | | +| summaries.rb:53:8:53:33 | call to [] [element :foo] | summaries.rb:53:1:53:4 | args [element :foo] | provenance | | +| summaries.rb:53:15:53:31 | call to source | summaries.rb:53:8:53:33 | call to [] [element :foo] | provenance | | | summaries.rb:54:19:54:24 | ** ... [element :foo] | summaries.rb:54:6:54:25 | call to namedArg | provenance | | | summaries.rb:54:21:54:24 | args [element :foo] | summaries.rb:54:19:54:24 | ** ... [element :foo] | provenance | | | summaries.rb:56:22:56:28 | tainted | summaries.rb:56:6:56:29 | call to anyArg | provenance | | @@ -118,10 +119,14 @@ edges | summaries.rb:79:1:79:1 | a [element 2] | summaries.rb:86:6:86:6 | a [element 2] | provenance | | | summaries.rb:79:1:79:1 | a [element 2] | summaries.rb:95:1:95:1 | a [element 2] | provenance | | | summaries.rb:79:1:79:1 | a [element 2] | summaries.rb:95:1:95:1 | a [element 2] | provenance | | -| summaries.rb:79:15:79:29 | call to source | summaries.rb:79:1:79:1 | a [element 1] | provenance | | -| summaries.rb:79:15:79:29 | call to source | summaries.rb:79:1:79:1 | a [element 1] | provenance | | -| summaries.rb:79:32:79:46 | call to source | summaries.rb:79:1:79:1 | a [element 2] | provenance | | -| summaries.rb:79:32:79:46 | call to source | summaries.rb:79:1:79:1 | a [element 2] | provenance | | +| summaries.rb:79:5:79:47 | call to [] [element 1] | summaries.rb:79:1:79:1 | a [element 1] | provenance | | +| summaries.rb:79:5:79:47 | call to [] [element 1] | summaries.rb:79:1:79:1 | a [element 1] | provenance | | +| summaries.rb:79:5:79:47 | call to [] [element 2] | summaries.rb:79:1:79:1 | a [element 2] | provenance | | +| summaries.rb:79:5:79:47 | call to [] [element 2] | summaries.rb:79:1:79:1 | a [element 2] | provenance | | +| summaries.rb:79:15:79:29 | call to source | summaries.rb:79:5:79:47 | call to [] [element 1] | provenance | | +| summaries.rb:79:15:79:29 | call to source | summaries.rb:79:5:79:47 | call to [] [element 1] | provenance | | +| summaries.rb:79:32:79:46 | call to source | summaries.rb:79:5:79:47 | call to [] [element 2] | provenance | | +| summaries.rb:79:32:79:46 | call to source | summaries.rb:79:5:79:47 | call to [] [element 2] | provenance | | | summaries.rb:81:1:81:1 | [post] a [element] | summaries.rb:82:6:82:6 | a [element] | provenance | | | summaries.rb:81:1:81:1 | [post] a [element] | summaries.rb:82:6:82:6 | a [element] | provenance | | | summaries.rb:81:1:81:1 | [post] a [element] | summaries.rb:84:6:84:6 | a [element] | provenance | | @@ -317,6 +322,7 @@ nodes | summaries.rb:51:6:51:31 | call to namedArg | semmle.label | call to namedArg | | summaries.rb:51:24:51:30 | tainted | semmle.label | tainted | | summaries.rb:53:1:53:4 | args [element :foo] | semmle.label | args [element :foo] | +| summaries.rb:53:8:53:33 | call to [] [element :foo] | semmle.label | call to [] [element :foo] | | summaries.rb:53:15:53:31 | call to source | semmle.label | call to source | | summaries.rb:54:6:54:25 | call to namedArg | semmle.label | call to namedArg | | summaries.rb:54:19:54:24 | ** ... [element :foo] | semmle.label | ** ... [element :foo] | @@ -340,6 +346,10 @@ nodes | summaries.rb:79:1:79:1 | a [element 1] | semmle.label | a [element 1] | | summaries.rb:79:1:79:1 | a [element 2] | semmle.label | a [element 2] | | summaries.rb:79:1:79:1 | a [element 2] | semmle.label | a [element 2] | +| summaries.rb:79:5:79:47 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| summaries.rb:79:5:79:47 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| summaries.rb:79:5:79:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | +| summaries.rb:79:5:79:47 | call to [] [element 2] | semmle.label | call to [] [element 2] | | summaries.rb:79:15:79:29 | call to source | semmle.label | call to source | | summaries.rb:79:15:79:29 | call to source | semmle.label | call to source | | summaries.rb:79:32:79:46 | call to source | semmle.label | call to source | diff --git a/ruby/ql/test/library-tests/frameworks/active_support/ActiveSupportDataFlow.expected b/ruby/ql/test/library-tests/frameworks/active_support/ActiveSupportDataFlow.expected index 4eadde7fa54..c6c8b9744bd 100644 --- a/ruby/ql/test/library-tests/frameworks/active_support/ActiveSupportDataFlow.expected +++ b/ruby/ql/test/library-tests/frameworks/active_support/ActiveSupportDataFlow.expected @@ -2,32 +2,37 @@ testFailures | hash_extensions.rb:126:10:126:19 | call to sole | Unexpected result: hasValueFlow=b | edges | active_support.rb:180:5:180:5 | x [element 0] | active_support.rb:181:9:181:9 | x [element 0] | provenance | | -| active_support.rb:180:10:180:17 | call to source | active_support.rb:180:5:180:5 | x [element 0] | provenance | | +| active_support.rb:180:9:180:18 | call to [] [element 0] | active_support.rb:180:5:180:5 | x [element 0] | provenance | | +| active_support.rb:180:10:180:17 | call to source | active_support.rb:180:9:180:18 | call to [] [element 0] | provenance | | | active_support.rb:181:5:181:5 | y [element] | active_support.rb:182:10:182:10 | y [element] | provenance | | | active_support.rb:181:9:181:9 | x [element 0] | active_support.rb:181:9:181:23 | call to compact_blank [element] | provenance | | | active_support.rb:181:9:181:23 | call to compact_blank [element] | active_support.rb:181:5:181:5 | y [element] | provenance | | | active_support.rb:182:10:182:10 | y [element] | active_support.rb:182:10:182:13 | ...[...] | provenance | | | active_support.rb:186:5:186:5 | x [element 0] | active_support.rb:187:9:187:9 | x [element 0] | provenance | | -| active_support.rb:186:10:186:18 | call to source | active_support.rb:186:5:186:5 | x [element 0] | provenance | | +| active_support.rb:186:9:186:22 | call to [] [element 0] | active_support.rb:186:5:186:5 | x [element 0] | provenance | | +| active_support.rb:186:10:186:18 | call to source | active_support.rb:186:9:186:22 | call to [] [element 0] | provenance | | | active_support.rb:187:5:187:5 | y [element] | active_support.rb:188:10:188:10 | y [element] | provenance | | | active_support.rb:187:9:187:9 | x [element 0] | active_support.rb:187:9:187:21 | call to excluding [element] | provenance | | | active_support.rb:187:9:187:21 | call to excluding [element] | active_support.rb:187:5:187:5 | y [element] | provenance | | | active_support.rb:188:10:188:10 | y [element] | active_support.rb:188:10:188:13 | ...[...] | provenance | | | active_support.rb:192:5:192:5 | x [element 0] | active_support.rb:193:9:193:9 | x [element 0] | provenance | | -| active_support.rb:192:10:192:18 | call to source | active_support.rb:192:5:192:5 | x [element 0] | provenance | | +| active_support.rb:192:9:192:22 | call to [] [element 0] | active_support.rb:192:5:192:5 | x [element 0] | provenance | | +| active_support.rb:192:10:192:18 | call to source | active_support.rb:192:9:192:22 | call to [] [element 0] | provenance | | | active_support.rb:193:5:193:5 | y [element] | active_support.rb:194:10:194:10 | y [element] | provenance | | | active_support.rb:193:9:193:9 | x [element 0] | active_support.rb:193:9:193:19 | call to without [element] | provenance | | | active_support.rb:193:9:193:19 | call to without [element] | active_support.rb:193:5:193:5 | y [element] | provenance | | | active_support.rb:194:10:194:10 | y [element] | active_support.rb:194:10:194:13 | ...[...] | provenance | | | active_support.rb:198:5:198:5 | x [element 0] | active_support.rb:199:9:199:9 | x [element 0] | provenance | | -| active_support.rb:198:10:198:18 | call to source | active_support.rb:198:5:198:5 | x [element 0] | provenance | | +| active_support.rb:198:9:198:22 | call to [] [element 0] | active_support.rb:198:5:198:5 | x [element 0] | provenance | | +| active_support.rb:198:10:198:18 | call to source | active_support.rb:198:9:198:22 | call to [] [element 0] | provenance | | | active_support.rb:199:5:199:5 | y [element] | active_support.rb:200:10:200:10 | y [element] | provenance | | | active_support.rb:199:9:199:9 | x [element 0] | active_support.rb:199:9:199:37 | call to in_order_of [element] | provenance | | | active_support.rb:199:9:199:37 | call to in_order_of [element] | active_support.rb:199:5:199:5 | y [element] | provenance | | | active_support.rb:200:10:200:10 | y [element] | active_support.rb:200:10:200:13 | ...[...] | provenance | | | active_support.rb:204:5:204:5 | a [element 0] | active_support.rb:205:9:205:9 | a [element 0] | provenance | | | active_support.rb:204:5:204:5 | a [element 0] | active_support.rb:206:10:206:10 | a [element 0] | provenance | | -| active_support.rb:204:10:204:18 | call to source | active_support.rb:204:5:204:5 | a [element 0] | provenance | | +| active_support.rb:204:9:204:22 | call to [] [element 0] | active_support.rb:204:5:204:5 | a [element 0] | provenance | | +| active_support.rb:204:10:204:18 | call to source | active_support.rb:204:9:204:22 | call to [] [element 0] | provenance | | | active_support.rb:205:5:205:5 | b [element 0] | active_support.rb:208:10:208:10 | b [element 0] | provenance | | | active_support.rb:205:5:205:5 | b [element] | active_support.rb:208:10:208:10 | b [element] | provenance | | | active_support.rb:205:5:205:5 | b [element] | active_support.rb:209:10:209:10 | b [element] | provenance | | @@ -54,37 +59,43 @@ edges | active_support.rb:290:7:290:16 | call to source | active_support.rb:290:3:290:3 | x | provenance | | | active_support.rb:291:8:291:8 | x | active_support.rb:291:8:291:17 | call to deep_dup | provenance | | | hash_extensions.rb:2:5:2:5 | h [element :a] | hash_extensions.rb:3:9:3:9 | h [element :a] | provenance | | -| hash_extensions.rb:2:14:2:24 | call to source | hash_extensions.rb:2:5:2:5 | h [element :a] | provenance | | +| hash_extensions.rb:2:9:2:26 | call to [] [element :a] | hash_extensions.rb:2:5:2:5 | h [element :a] | provenance | | +| hash_extensions.rb:2:14:2:24 | call to source | hash_extensions.rb:2:9:2:26 | call to [] [element :a] | provenance | | | hash_extensions.rb:3:5:3:5 | x [element] | hash_extensions.rb:4:10:4:10 | x [element] | provenance | | | hash_extensions.rb:3:9:3:9 | h [element :a] | hash_extensions.rb:3:9:3:24 | call to stringify_keys [element] | provenance | | | hash_extensions.rb:3:9:3:24 | call to stringify_keys [element] | hash_extensions.rb:3:5:3:5 | x [element] | provenance | | | hash_extensions.rb:4:10:4:10 | x [element] | hash_extensions.rb:4:10:4:14 | ...[...] | provenance | | | hash_extensions.rb:10:5:10:5 | h [element :a] | hash_extensions.rb:11:9:11:9 | h [element :a] | provenance | | -| hash_extensions.rb:10:14:10:24 | call to source | hash_extensions.rb:10:5:10:5 | h [element :a] | provenance | | +| hash_extensions.rb:10:9:10:26 | call to [] [element :a] | hash_extensions.rb:10:5:10:5 | h [element :a] | provenance | | +| hash_extensions.rb:10:14:10:24 | call to source | hash_extensions.rb:10:9:10:26 | call to [] [element :a] | provenance | | | hash_extensions.rb:11:5:11:5 | x [element] | hash_extensions.rb:12:10:12:10 | x [element] | provenance | | | hash_extensions.rb:11:9:11:9 | h [element :a] | hash_extensions.rb:11:9:11:20 | call to to_options [element] | provenance | | | hash_extensions.rb:11:9:11:20 | call to to_options [element] | hash_extensions.rb:11:5:11:5 | x [element] | provenance | | | hash_extensions.rb:12:10:12:10 | x [element] | hash_extensions.rb:12:10:12:14 | ...[...] | provenance | | | hash_extensions.rb:18:5:18:5 | h [element :a] | hash_extensions.rb:19:9:19:9 | h [element :a] | provenance | | -| hash_extensions.rb:18:14:18:24 | call to source | hash_extensions.rb:18:5:18:5 | h [element :a] | provenance | | +| hash_extensions.rb:18:9:18:26 | call to [] [element :a] | hash_extensions.rb:18:5:18:5 | h [element :a] | provenance | | +| hash_extensions.rb:18:14:18:24 | call to source | hash_extensions.rb:18:9:18:26 | call to [] [element :a] | provenance | | | hash_extensions.rb:19:5:19:5 | x [element] | hash_extensions.rb:20:10:20:10 | x [element] | provenance | | | hash_extensions.rb:19:9:19:9 | h [element :a] | hash_extensions.rb:19:9:19:24 | call to symbolize_keys [element] | provenance | | | hash_extensions.rb:19:9:19:24 | call to symbolize_keys [element] | hash_extensions.rb:19:5:19:5 | x [element] | provenance | | | hash_extensions.rb:20:10:20:10 | x [element] | hash_extensions.rb:20:10:20:14 | ...[...] | provenance | | | hash_extensions.rb:26:5:26:5 | h [element :a] | hash_extensions.rb:27:9:27:9 | h [element :a] | provenance | | -| hash_extensions.rb:26:14:26:24 | call to source | hash_extensions.rb:26:5:26:5 | h [element :a] | provenance | | +| hash_extensions.rb:26:9:26:26 | call to [] [element :a] | hash_extensions.rb:26:5:26:5 | h [element :a] | provenance | | +| hash_extensions.rb:26:14:26:24 | call to source | hash_extensions.rb:26:9:26:26 | call to [] [element :a] | provenance | | | hash_extensions.rb:27:5:27:5 | x [element] | hash_extensions.rb:28:10:28:10 | x [element] | provenance | | | hash_extensions.rb:27:9:27:9 | h [element :a] | hash_extensions.rb:27:9:27:29 | call to deep_stringify_keys [element] | provenance | | | hash_extensions.rb:27:9:27:29 | call to deep_stringify_keys [element] | hash_extensions.rb:27:5:27:5 | x [element] | provenance | | | hash_extensions.rb:28:10:28:10 | x [element] | hash_extensions.rb:28:10:28:14 | ...[...] | provenance | | | hash_extensions.rb:34:5:34:5 | h [element :a] | hash_extensions.rb:35:9:35:9 | h [element :a] | provenance | | -| hash_extensions.rb:34:14:34:24 | call to source | hash_extensions.rb:34:5:34:5 | h [element :a] | provenance | | +| hash_extensions.rb:34:9:34:26 | call to [] [element :a] | hash_extensions.rb:34:5:34:5 | h [element :a] | provenance | | +| hash_extensions.rb:34:14:34:24 | call to source | hash_extensions.rb:34:9:34:26 | call to [] [element :a] | provenance | | | hash_extensions.rb:35:5:35:5 | x [element] | hash_extensions.rb:36:10:36:10 | x [element] | provenance | | | hash_extensions.rb:35:9:35:9 | h [element :a] | hash_extensions.rb:35:9:35:29 | call to deep_symbolize_keys [element] | provenance | | | hash_extensions.rb:35:9:35:29 | call to deep_symbolize_keys [element] | hash_extensions.rb:35:5:35:5 | x [element] | provenance | | | hash_extensions.rb:36:10:36:10 | x [element] | hash_extensions.rb:36:10:36:14 | ...[...] | provenance | | | hash_extensions.rb:42:5:42:5 | h [element :a] | hash_extensions.rb:43:9:43:9 | h [element :a] | provenance | | -| hash_extensions.rb:42:14:42:24 | call to source | hash_extensions.rb:42:5:42:5 | h [element :a] | provenance | | +| hash_extensions.rb:42:9:42:26 | call to [] [element :a] | hash_extensions.rb:42:5:42:5 | h [element :a] | provenance | | +| hash_extensions.rb:42:14:42:24 | call to source | hash_extensions.rb:42:9:42:26 | call to [] [element :a] | provenance | | | hash_extensions.rb:43:5:43:5 | x [element] | hash_extensions.rb:44:10:44:10 | x [element] | provenance | | | hash_extensions.rb:43:9:43:9 | h [element :a] | hash_extensions.rb:43:9:43:33 | call to with_indifferent_access [element] | provenance | | | hash_extensions.rb:43:9:43:33 | call to with_indifferent_access [element] | hash_extensions.rb:43:5:43:5 | x [element] | provenance | | @@ -92,9 +103,12 @@ edges | hash_extensions.rb:50:5:50:5 | h [element :a] | hash_extensions.rb:51:9:51:9 | h [element :a] | provenance | | | hash_extensions.rb:50:5:50:5 | h [element :b] | hash_extensions.rb:51:9:51:9 | h [element :b] | provenance | | | hash_extensions.rb:50:5:50:5 | h [element :d] | hash_extensions.rb:51:9:51:9 | h [element :d] | provenance | | -| hash_extensions.rb:50:14:50:23 | call to taint | hash_extensions.rb:50:5:50:5 | h [element :a] | provenance | | -| hash_extensions.rb:50:29:50:38 | call to taint | hash_extensions.rb:50:5:50:5 | h [element :b] | provenance | | -| hash_extensions.rb:50:52:50:61 | call to taint | hash_extensions.rb:50:5:50:5 | h [element :d] | provenance | | +| hash_extensions.rb:50:9:50:63 | call to [] [element :a] | hash_extensions.rb:50:5:50:5 | h [element :a] | provenance | | +| hash_extensions.rb:50:9:50:63 | call to [] [element :b] | hash_extensions.rb:50:5:50:5 | h [element :b] | provenance | | +| hash_extensions.rb:50:9:50:63 | call to [] [element :d] | hash_extensions.rb:50:5:50:5 | h [element :d] | provenance | | +| hash_extensions.rb:50:14:50:23 | call to taint | hash_extensions.rb:50:9:50:63 | call to [] [element :a] | provenance | | +| hash_extensions.rb:50:29:50:38 | call to taint | hash_extensions.rb:50:9:50:63 | call to [] [element :b] | provenance | | +| hash_extensions.rb:50:52:50:61 | call to taint | hash_extensions.rb:50:9:50:63 | call to [] [element :d] | provenance | | | hash_extensions.rb:51:5:51:5 | x [element :a] | hash_extensions.rb:58:10:58:10 | x [element :a] | provenance | | | hash_extensions.rb:51:5:51:5 | x [element :b] | hash_extensions.rb:59:10:59:10 | x [element :b] | provenance | | | hash_extensions.rb:51:9:51:9 | [post] h [element :d] | hash_extensions.rb:56:10:56:10 | h [element :d] | provenance | | @@ -109,9 +123,12 @@ edges | hash_extensions.rb:67:5:67:10 | values [element 0] | hash_extensions.rb:68:9:68:14 | values [element 0] | provenance | | | hash_extensions.rb:67:5:67:10 | values [element 1] | hash_extensions.rb:68:9:68:14 | values [element 1] | provenance | | | hash_extensions.rb:67:5:67:10 | values [element 2] | hash_extensions.rb:68:9:68:14 | values [element 2] | provenance | | -| hash_extensions.rb:67:15:67:25 | call to source | hash_extensions.rb:67:5:67:10 | values [element 0] | provenance | | -| hash_extensions.rb:67:28:67:38 | call to source | hash_extensions.rb:67:5:67:10 | values [element 1] | provenance | | -| hash_extensions.rb:67:41:67:51 | call to source | hash_extensions.rb:67:5:67:10 | values [element 2] | provenance | | +| hash_extensions.rb:67:14:67:52 | call to [] [element 0] | hash_extensions.rb:67:5:67:10 | values [element 0] | provenance | | +| hash_extensions.rb:67:14:67:52 | call to [] [element 1] | hash_extensions.rb:67:5:67:10 | values [element 1] | provenance | | +| hash_extensions.rb:67:14:67:52 | call to [] [element 2] | hash_extensions.rb:67:5:67:10 | values [element 2] | provenance | | +| hash_extensions.rb:67:15:67:25 | call to source | hash_extensions.rb:67:14:67:52 | call to [] [element 0] | provenance | | +| hash_extensions.rb:67:28:67:38 | call to source | hash_extensions.rb:67:14:67:52 | call to [] [element 1] | provenance | | +| hash_extensions.rb:67:41:67:51 | call to source | hash_extensions.rb:67:14:67:52 | call to [] [element 2] | provenance | | | hash_extensions.rb:68:5:68:5 | h [element] | hash_extensions.rb:73:10:73:10 | h [element] | provenance | | | hash_extensions.rb:68:5:68:5 | h [element] | hash_extensions.rb:74:10:74:10 | h [element] | provenance | | | hash_extensions.rb:68:9:68:14 | values [element 0] | hash_extensions.rb:68:9:71:7 | call to index_by [element] | provenance | | @@ -127,9 +144,12 @@ edges | hash_extensions.rb:80:5:80:10 | values [element 0] | hash_extensions.rb:81:9:81:14 | values [element 0] | provenance | | | hash_extensions.rb:80:5:80:10 | values [element 1] | hash_extensions.rb:81:9:81:14 | values [element 1] | provenance | | | hash_extensions.rb:80:5:80:10 | values [element 2] | hash_extensions.rb:81:9:81:14 | values [element 2] | provenance | | -| hash_extensions.rb:80:15:80:25 | call to source | hash_extensions.rb:80:5:80:10 | values [element 0] | provenance | | -| hash_extensions.rb:80:28:80:38 | call to source | hash_extensions.rb:80:5:80:10 | values [element 1] | provenance | | -| hash_extensions.rb:80:41:80:51 | call to source | hash_extensions.rb:80:5:80:10 | values [element 2] | provenance | | +| hash_extensions.rb:80:14:80:52 | call to [] [element 0] | hash_extensions.rb:80:5:80:10 | values [element 0] | provenance | | +| hash_extensions.rb:80:14:80:52 | call to [] [element 1] | hash_extensions.rb:80:5:80:10 | values [element 1] | provenance | | +| hash_extensions.rb:80:14:80:52 | call to [] [element 2] | hash_extensions.rb:80:5:80:10 | values [element 2] | provenance | | +| hash_extensions.rb:80:15:80:25 | call to source | hash_extensions.rb:80:14:80:52 | call to [] [element 0] | provenance | | +| hash_extensions.rb:80:28:80:38 | call to source | hash_extensions.rb:80:14:80:52 | call to [] [element 1] | provenance | | +| hash_extensions.rb:80:41:80:51 | call to source | hash_extensions.rb:80:14:80:52 | call to [] [element 2] | provenance | | | hash_extensions.rb:81:5:81:5 | h [element] | hash_extensions.rb:86:10:86:10 | h [element] | provenance | | | hash_extensions.rb:81:5:81:5 | h [element] | hash_extensions.rb:87:10:87:10 | h [element] | provenance | | | hash_extensions.rb:81:9:81:14 | values [element 0] | hash_extensions.rb:81:31:81:33 | key | provenance | | @@ -152,8 +172,12 @@ edges | hash_extensions.rb:98:5:98:10 | values [element 0, element :name] | hash_extensions.rb:100:10:100:15 | values [element 0, element :name] | provenance | | | hash_extensions.rb:98:5:98:10 | values [element 0, element :name] | hash_extensions.rb:102:10:102:15 | values [element 0, element :name] | provenance | | | hash_extensions.rb:98:5:98:10 | values [element 0, element :name] | hash_extensions.rb:103:10:103:15 | values [element 0, element :name] | provenance | | -| hash_extensions.rb:98:21:98:31 | call to source | hash_extensions.rb:98:5:98:10 | values [element 0, element :id] | provenance | | -| hash_extensions.rb:98:40:98:54 | call to source | hash_extensions.rb:98:5:98:10 | values [element 0, element :name] | provenance | | +| hash_extensions.rb:98:14:98:102 | call to [] [element 0, element :id] | hash_extensions.rb:98:5:98:10 | values [element 0, element :id] | provenance | | +| hash_extensions.rb:98:14:98:102 | call to [] [element 0, element :name] | hash_extensions.rb:98:5:98:10 | values [element 0, element :name] | provenance | | +| hash_extensions.rb:98:15:98:56 | call to [] [element :id] | hash_extensions.rb:98:14:98:102 | call to [] [element 0, element :id] | provenance | | +| hash_extensions.rb:98:15:98:56 | call to [] [element :name] | hash_extensions.rb:98:14:98:102 | call to [] [element 0, element :name] | provenance | | +| hash_extensions.rb:98:21:98:31 | call to source | hash_extensions.rb:98:15:98:56 | call to [] [element :id] | provenance | | +| hash_extensions.rb:98:40:98:54 | call to source | hash_extensions.rb:98:15:98:56 | call to [] [element :name] | provenance | | | hash_extensions.rb:99:10:99:15 | values [element 0, element :id] | hash_extensions.rb:99:10:99:25 | call to pick | provenance | | | hash_extensions.rb:100:10:100:15 | values [element 0, element :name] | hash_extensions.rb:100:10:100:27 | call to pick | provenance | | | hash_extensions.rb:101:10:101:15 | values [element 0, element :id] | hash_extensions.rb:101:10:101:32 | call to pick [element 0] | provenance | | @@ -174,10 +198,18 @@ edges | hash_extensions.rb:110:5:110:10 | values [element 1, element :name] | hash_extensions.rb:111:10:111:15 | values [element 1, element :name] | provenance | | | hash_extensions.rb:110:5:110:10 | values [element 1, element :name] | hash_extensions.rb:113:10:113:15 | values [element 1, element :name] | provenance | | | hash_extensions.rb:110:5:110:10 | values [element 1, element :name] | hash_extensions.rb:114:10:114:15 | values [element 1, element :name] | provenance | | -| hash_extensions.rb:110:21:110:31 | call to source | hash_extensions.rb:110:5:110:10 | values [element 0, element :id] | provenance | | -| hash_extensions.rb:110:40:110:54 | call to source | hash_extensions.rb:110:5:110:10 | values [element 0, element :name] | provenance | | -| hash_extensions.rb:110:65:110:75 | call to source | hash_extensions.rb:110:5:110:10 | values [element 1, element :id] | provenance | | -| hash_extensions.rb:110:84:110:99 | call to source | hash_extensions.rb:110:5:110:10 | values [element 1, element :name] | provenance | | +| hash_extensions.rb:110:14:110:102 | call to [] [element 0, element :id] | hash_extensions.rb:110:5:110:10 | values [element 0, element :id] | provenance | | +| hash_extensions.rb:110:14:110:102 | call to [] [element 0, element :name] | hash_extensions.rb:110:5:110:10 | values [element 0, element :name] | provenance | | +| hash_extensions.rb:110:14:110:102 | call to [] [element 1, element :id] | hash_extensions.rb:110:5:110:10 | values [element 1, element :id] | provenance | | +| hash_extensions.rb:110:14:110:102 | call to [] [element 1, element :name] | hash_extensions.rb:110:5:110:10 | values [element 1, element :name] | provenance | | +| hash_extensions.rb:110:15:110:56 | call to [] [element :id] | hash_extensions.rb:110:14:110:102 | call to [] [element 0, element :id] | provenance | | +| hash_extensions.rb:110:15:110:56 | call to [] [element :name] | hash_extensions.rb:110:14:110:102 | call to [] [element 0, element :name] | provenance | | +| hash_extensions.rb:110:21:110:31 | call to source | hash_extensions.rb:110:15:110:56 | call to [] [element :id] | provenance | | +| hash_extensions.rb:110:40:110:54 | call to source | hash_extensions.rb:110:15:110:56 | call to [] [element :name] | provenance | | +| hash_extensions.rb:110:59:110:101 | call to [] [element :id] | hash_extensions.rb:110:14:110:102 | call to [] [element 1, element :id] | provenance | | +| hash_extensions.rb:110:59:110:101 | call to [] [element :name] | hash_extensions.rb:110:14:110:102 | call to [] [element 1, element :name] | provenance | | +| hash_extensions.rb:110:65:110:75 | call to source | hash_extensions.rb:110:59:110:101 | call to [] [element :id] | provenance | | +| hash_extensions.rb:110:84:110:99 | call to source | hash_extensions.rb:110:59:110:101 | call to [] [element :name] | provenance | | | hash_extensions.rb:111:10:111:15 | values [element 0, element :name] | hash_extensions.rb:111:10:111:28 | call to pluck [element] | provenance | | | hash_extensions.rb:111:10:111:15 | values [element 1, element :name] | hash_extensions.rb:111:10:111:28 | call to pluck [element] | provenance | | | hash_extensions.rb:111:10:111:28 | call to pluck [element] | hash_extensions.rb:111:10:111:31 | ...[...] | provenance | | @@ -198,13 +230,16 @@ edges | hash_extensions.rb:115:10:115:33 | call to pluck [element, element 1] | hash_extensions.rb:115:10:115:36 | ...[...] [element 1] | provenance | | | hash_extensions.rb:115:10:115:36 | ...[...] [element 1] | hash_extensions.rb:115:10:115:39 | ...[...] | provenance | | | hash_extensions.rb:122:5:122:10 | single [element 0] | hash_extensions.rb:125:10:125:15 | single [element 0] | provenance | | -| hash_extensions.rb:122:15:122:25 | call to source | hash_extensions.rb:122:5:122:10 | single [element 0] | provenance | | +| hash_extensions.rb:122:14:122:26 | call to [] [element 0] | hash_extensions.rb:122:5:122:10 | single [element 0] | provenance | | +| hash_extensions.rb:122:15:122:25 | call to source | hash_extensions.rb:122:14:122:26 | call to [] [element 0] | provenance | | | hash_extensions.rb:123:5:123:9 | multi [element 0] | hash_extensions.rb:126:10:126:14 | multi [element 0] | provenance | | -| hash_extensions.rb:123:14:123:24 | call to source | hash_extensions.rb:123:5:123:9 | multi [element 0] | provenance | | +| hash_extensions.rb:123:13:123:38 | call to [] [element 0] | hash_extensions.rb:123:5:123:9 | multi [element 0] | provenance | | +| hash_extensions.rb:123:14:123:24 | call to source | hash_extensions.rb:123:13:123:38 | call to [] [element 0] | provenance | | | hash_extensions.rb:125:10:125:15 | single [element 0] | hash_extensions.rb:125:10:125:20 | call to sole | provenance | | | hash_extensions.rb:126:10:126:14 | multi [element 0] | hash_extensions.rb:126:10:126:19 | call to sole | provenance | | nodes | active_support.rb:180:5:180:5 | x [element 0] | semmle.label | x [element 0] | +| active_support.rb:180:9:180:18 | call to [] [element 0] | semmle.label | call to [] [element 0] | | active_support.rb:180:10:180:17 | call to source | semmle.label | call to source | | active_support.rb:181:5:181:5 | y [element] | semmle.label | y [element] | | active_support.rb:181:9:181:9 | x [element 0] | semmle.label | x [element 0] | @@ -212,6 +247,7 @@ nodes | active_support.rb:182:10:182:10 | y [element] | semmle.label | y [element] | | active_support.rb:182:10:182:13 | ...[...] | semmle.label | ...[...] | | active_support.rb:186:5:186:5 | x [element 0] | semmle.label | x [element 0] | +| active_support.rb:186:9:186:22 | call to [] [element 0] | semmle.label | call to [] [element 0] | | active_support.rb:186:10:186:18 | call to source | semmle.label | call to source | | active_support.rb:187:5:187:5 | y [element] | semmle.label | y [element] | | active_support.rb:187:9:187:9 | x [element 0] | semmle.label | x [element 0] | @@ -219,6 +255,7 @@ nodes | active_support.rb:188:10:188:10 | y [element] | semmle.label | y [element] | | active_support.rb:188:10:188:13 | ...[...] | semmle.label | ...[...] | | active_support.rb:192:5:192:5 | x [element 0] | semmle.label | x [element 0] | +| active_support.rb:192:9:192:22 | call to [] [element 0] | semmle.label | call to [] [element 0] | | active_support.rb:192:10:192:18 | call to source | semmle.label | call to source | | active_support.rb:193:5:193:5 | y [element] | semmle.label | y [element] | | active_support.rb:193:9:193:9 | x [element 0] | semmle.label | x [element 0] | @@ -226,6 +263,7 @@ nodes | active_support.rb:194:10:194:10 | y [element] | semmle.label | y [element] | | active_support.rb:194:10:194:13 | ...[...] | semmle.label | ...[...] | | active_support.rb:198:5:198:5 | x [element 0] | semmle.label | x [element 0] | +| active_support.rb:198:9:198:22 | call to [] [element 0] | semmle.label | call to [] [element 0] | | active_support.rb:198:10:198:18 | call to source | semmle.label | call to source | | active_support.rb:199:5:199:5 | y [element] | semmle.label | y [element] | | active_support.rb:199:9:199:9 | x [element 0] | semmle.label | x [element 0] | @@ -233,6 +271,7 @@ nodes | active_support.rb:200:10:200:10 | y [element] | semmle.label | y [element] | | active_support.rb:200:10:200:13 | ...[...] | semmle.label | ...[...] | | active_support.rb:204:5:204:5 | a [element 0] | semmle.label | a [element 0] | +| active_support.rb:204:9:204:22 | call to [] [element 0] | semmle.label | call to [] [element 0] | | active_support.rb:204:10:204:18 | call to source | semmle.label | call to source | | active_support.rb:205:5:205:5 | b [element 0] | semmle.label | b [element 0] | | active_support.rb:205:5:205:5 | b [element] | semmle.label | b [element] | @@ -265,6 +304,7 @@ nodes | active_support.rb:291:8:291:8 | x | semmle.label | x | | active_support.rb:291:8:291:17 | call to deep_dup | semmle.label | call to deep_dup | | hash_extensions.rb:2:5:2:5 | h [element :a] | semmle.label | h [element :a] | +| hash_extensions.rb:2:9:2:26 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_extensions.rb:2:14:2:24 | call to source | semmle.label | call to source | | hash_extensions.rb:3:5:3:5 | x [element] | semmle.label | x [element] | | hash_extensions.rb:3:9:3:9 | h [element :a] | semmle.label | h [element :a] | @@ -272,6 +312,7 @@ nodes | hash_extensions.rb:4:10:4:10 | x [element] | semmle.label | x [element] | | hash_extensions.rb:4:10:4:14 | ...[...] | semmle.label | ...[...] | | hash_extensions.rb:10:5:10:5 | h [element :a] | semmle.label | h [element :a] | +| hash_extensions.rb:10:9:10:26 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_extensions.rb:10:14:10:24 | call to source | semmle.label | call to source | | hash_extensions.rb:11:5:11:5 | x [element] | semmle.label | x [element] | | hash_extensions.rb:11:9:11:9 | h [element :a] | semmle.label | h [element :a] | @@ -279,6 +320,7 @@ nodes | hash_extensions.rb:12:10:12:10 | x [element] | semmle.label | x [element] | | hash_extensions.rb:12:10:12:14 | ...[...] | semmle.label | ...[...] | | hash_extensions.rb:18:5:18:5 | h [element :a] | semmle.label | h [element :a] | +| hash_extensions.rb:18:9:18:26 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_extensions.rb:18:14:18:24 | call to source | semmle.label | call to source | | hash_extensions.rb:19:5:19:5 | x [element] | semmle.label | x [element] | | hash_extensions.rb:19:9:19:9 | h [element :a] | semmle.label | h [element :a] | @@ -286,6 +328,7 @@ nodes | hash_extensions.rb:20:10:20:10 | x [element] | semmle.label | x [element] | | hash_extensions.rb:20:10:20:14 | ...[...] | semmle.label | ...[...] | | hash_extensions.rb:26:5:26:5 | h [element :a] | semmle.label | h [element :a] | +| hash_extensions.rb:26:9:26:26 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_extensions.rb:26:14:26:24 | call to source | semmle.label | call to source | | hash_extensions.rb:27:5:27:5 | x [element] | semmle.label | x [element] | | hash_extensions.rb:27:9:27:9 | h [element :a] | semmle.label | h [element :a] | @@ -293,6 +336,7 @@ nodes | hash_extensions.rb:28:10:28:10 | x [element] | semmle.label | x [element] | | hash_extensions.rb:28:10:28:14 | ...[...] | semmle.label | ...[...] | | hash_extensions.rb:34:5:34:5 | h [element :a] | semmle.label | h [element :a] | +| hash_extensions.rb:34:9:34:26 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_extensions.rb:34:14:34:24 | call to source | semmle.label | call to source | | hash_extensions.rb:35:5:35:5 | x [element] | semmle.label | x [element] | | hash_extensions.rb:35:9:35:9 | h [element :a] | semmle.label | h [element :a] | @@ -300,6 +344,7 @@ nodes | hash_extensions.rb:36:10:36:10 | x [element] | semmle.label | x [element] | | hash_extensions.rb:36:10:36:14 | ...[...] | semmle.label | ...[...] | | hash_extensions.rb:42:5:42:5 | h [element :a] | semmle.label | h [element :a] | +| hash_extensions.rb:42:9:42:26 | call to [] [element :a] | semmle.label | call to [] [element :a] | | hash_extensions.rb:42:14:42:24 | call to source | semmle.label | call to source | | hash_extensions.rb:43:5:43:5 | x [element] | semmle.label | x [element] | | hash_extensions.rb:43:9:43:9 | h [element :a] | semmle.label | h [element :a] | @@ -309,6 +354,9 @@ nodes | hash_extensions.rb:50:5:50:5 | h [element :a] | semmle.label | h [element :a] | | hash_extensions.rb:50:5:50:5 | h [element :b] | semmle.label | h [element :b] | | hash_extensions.rb:50:5:50:5 | h [element :d] | semmle.label | h [element :d] | +| hash_extensions.rb:50:9:50:63 | call to [] [element :a] | semmle.label | call to [] [element :a] | +| hash_extensions.rb:50:9:50:63 | call to [] [element :b] | semmle.label | call to [] [element :b] | +| hash_extensions.rb:50:9:50:63 | call to [] [element :d] | semmle.label | call to [] [element :d] | | hash_extensions.rb:50:14:50:23 | call to taint | semmle.label | call to taint | | hash_extensions.rb:50:29:50:38 | call to taint | semmle.label | call to taint | | hash_extensions.rb:50:52:50:61 | call to taint | semmle.label | call to taint | @@ -329,6 +377,9 @@ nodes | hash_extensions.rb:67:5:67:10 | values [element 0] | semmle.label | values [element 0] | | hash_extensions.rb:67:5:67:10 | values [element 1] | semmle.label | values [element 1] | | hash_extensions.rb:67:5:67:10 | values [element 2] | semmle.label | values [element 2] | +| hash_extensions.rb:67:14:67:52 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| hash_extensions.rb:67:14:67:52 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| hash_extensions.rb:67:14:67:52 | call to [] [element 2] | semmle.label | call to [] [element 2] | | hash_extensions.rb:67:15:67:25 | call to source | semmle.label | call to source | | hash_extensions.rb:67:28:67:38 | call to source | semmle.label | call to source | | hash_extensions.rb:67:41:67:51 | call to source | semmle.label | call to source | @@ -346,6 +397,9 @@ nodes | hash_extensions.rb:80:5:80:10 | values [element 0] | semmle.label | values [element 0] | | hash_extensions.rb:80:5:80:10 | values [element 1] | semmle.label | values [element 1] | | hash_extensions.rb:80:5:80:10 | values [element 2] | semmle.label | values [element 2] | +| hash_extensions.rb:80:14:80:52 | call to [] [element 0] | semmle.label | call to [] [element 0] | +| hash_extensions.rb:80:14:80:52 | call to [] [element 1] | semmle.label | call to [] [element 1] | +| hash_extensions.rb:80:14:80:52 | call to [] [element 2] | semmle.label | call to [] [element 2] | | hash_extensions.rb:80:15:80:25 | call to source | semmle.label | call to source | | hash_extensions.rb:80:28:80:38 | call to source | semmle.label | call to source | | hash_extensions.rb:80:41:80:51 | call to source | semmle.label | call to source | @@ -370,6 +424,10 @@ nodes | hash_extensions.rb:92:10:92:16 | ...[...] | semmle.label | ...[...] | | hash_extensions.rb:98:5:98:10 | values [element 0, element :id] | semmle.label | values [element 0, element :id] | | hash_extensions.rb:98:5:98:10 | values [element 0, element :name] | semmle.label | values [element 0, element :name] | +| hash_extensions.rb:98:14:98:102 | call to [] [element 0, element :id] | semmle.label | call to [] [element 0, element :id] | +| hash_extensions.rb:98:14:98:102 | call to [] [element 0, element :name] | semmle.label | call to [] [element 0, element :name] | +| hash_extensions.rb:98:15:98:56 | call to [] [element :id] | semmle.label | call to [] [element :id] | +| hash_extensions.rb:98:15:98:56 | call to [] [element :name] | semmle.label | call to [] [element :name] | | hash_extensions.rb:98:21:98:31 | call to source | semmle.label | call to source | | hash_extensions.rb:98:40:98:54 | call to source | semmle.label | call to source | | hash_extensions.rb:99:10:99:15 | values [element 0, element :id] | semmle.label | values [element 0, element :id] | @@ -392,8 +450,16 @@ nodes | hash_extensions.rb:110:5:110:10 | values [element 0, element :name] | semmle.label | values [element 0, element :name] | | hash_extensions.rb:110:5:110:10 | values [element 1, element :id] | semmle.label | values [element 1, element :id] | | hash_extensions.rb:110:5:110:10 | values [element 1, element :name] | semmle.label | values [element 1, element :name] | +| hash_extensions.rb:110:14:110:102 | call to [] [element 0, element :id] | semmle.label | call to [] [element 0, element :id] | +| hash_extensions.rb:110:14:110:102 | call to [] [element 0, element :name] | semmle.label | call to [] [element 0, element :name] | +| hash_extensions.rb:110:14:110:102 | call to [] [element 1, element :id] | semmle.label | call to [] [element 1, element :id] | +| hash_extensions.rb:110:14:110:102 | call to [] [element 1, element :name] | semmle.label | call to [] [element 1, element :name] | +| hash_extensions.rb:110:15:110:56 | call to [] [element :id] | semmle.label | call to [] [element :id] | +| hash_extensions.rb:110:15:110:56 | call to [] [element :name] | semmle.label | call to [] [element :name] | | hash_extensions.rb:110:21:110:31 | call to source | semmle.label | call to source | | hash_extensions.rb:110:40:110:54 | call to source | semmle.label | call to source | +| hash_extensions.rb:110:59:110:101 | call to [] [element :id] | semmle.label | call to [] [element :id] | +| hash_extensions.rb:110:59:110:101 | call to [] [element :name] | semmle.label | call to [] [element :name] | | hash_extensions.rb:110:65:110:75 | call to source | semmle.label | call to source | | hash_extensions.rb:110:84:110:99 | call to source | semmle.label | call to source | | hash_extensions.rb:111:10:111:15 | values [element 0, element :name] | semmle.label | values [element 0, element :name] | @@ -421,8 +487,10 @@ nodes | hash_extensions.rb:115:10:115:36 | ...[...] [element 1] | semmle.label | ...[...] [element 1] | | hash_extensions.rb:115:10:115:39 | ...[...] | semmle.label | ...[...] | | hash_extensions.rb:122:5:122:10 | single [element 0] | semmle.label | single [element 0] | +| hash_extensions.rb:122:14:122:26 | call to [] [element 0] | semmle.label | call to [] [element 0] | | hash_extensions.rb:122:15:122:25 | call to source | semmle.label | call to source | | hash_extensions.rb:123:5:123:9 | multi [element 0] | semmle.label | multi [element 0] | +| hash_extensions.rb:123:13:123:38 | call to [] [element 0] | semmle.label | call to [] [element 0] | | hash_extensions.rb:123:14:123:24 | call to source | semmle.label | call to source | | hash_extensions.rb:125:10:125:15 | single [element 0] | semmle.label | single [element 0] | | hash_extensions.rb:125:10:125:20 | call to sole | semmle.label | call to sole | diff --git a/ruby/ql/test/library-tests/frameworks/core/Kernel.expected b/ruby/ql/test/library-tests/frameworks/core/Kernel.expected index 3d35933fbf6..c3c9c8f1896 100644 --- a/ruby/ql/test/library-tests/frameworks/core/Kernel.expected +++ b/ruby/ql/test/library-tests/frameworks/core/Kernel.expected @@ -42,6 +42,13 @@ sendCallCodeExecutions | Eval.rb:7:1:7:19 | call to send | Eval.rb:7:8:7:13 | "push" | | Kernel.rb:2:1:2:22 | call to send | Kernel.rb:2:6:2:12 | "raise" | | Kernel.rb:5:1:5:19 | call to send | Kernel.rb:5:8:5:13 | "push" | +methodCallCodeExecutions +| Kernel.rb:92:1:92:14 | call to method | Kernel.rb:92:8:92:13 | "exit" | +| Kernel.rb:93:1:93:21 | call to public_method | Kernel.rb:93:15:93:20 | "exit" | +| Kernel.rb:94:1:94:23 | call to singleton_method | Kernel.rb:94:18:94:22 | "foo" | +| Kernel.rb:96:1:96:18 | call to method | Kernel.rb:96:12:96:17 | "exit" | +| Kernel.rb:97:1:97:25 | call to public_method | Kernel.rb:97:19:97:24 | "exit" | +| Kernel.rb:98:1:98:27 | call to singleton_method | Kernel.rb:98:22:98:26 | "foo" | evalCallCodeExecutions | Eval.rb:3:1:3:43 | call to eval | Eval.rb:3:6:3:22 | "raise \\"error\\"" | | Kernel.rb:1:1:1:43 | call to eval | Kernel.rb:1:6:1:22 | "raise \\"error\\"" | diff --git a/ruby/ql/test/library-tests/frameworks/core/Kernel.ql b/ruby/ql/test/library-tests/frameworks/core/Kernel.ql index 89bd115e7d8..1577e037316 100644 --- a/ruby/ql/test/library-tests/frameworks/core/Kernel.ql +++ b/ruby/ql/test/library-tests/frameworks/core/Kernel.ql @@ -9,4 +9,6 @@ query predicate kernelSpawnCallExecutions(KernelSpawnCall c) { any() } query DataFlow::Node sendCallCodeExecutions(SendCallCodeExecution e) { result = e.getCode() } +query DataFlow::Node methodCallCodeExecutions(MethodCallCodeExecution e) { result = e.getCode() } + query DataFlow::Node evalCallCodeExecutions(EvalCallCodeExecution e) { result = e.getCode() } diff --git a/ruby/ql/test/library-tests/frameworks/core/Kernel.rb b/ruby/ql/test/library-tests/frameworks/core/Kernel.rb index ad233e16f9c..cf59f6cdefd 100644 --- a/ruby/ql/test/library-tests/frameworks/core/Kernel.rb +++ b/ruby/ql/test/library-tests/frameworks/core/Kernel.rb @@ -87,4 +87,12 @@ class Foo end end -UnknownModule.system("ls") \ No newline at end of file +UnknownModule.system("ls") + +method("exit").call +public_method("exit").call +singleton_method("foo").call + +Foo.method("exit").call +Foo.public_method("exit").call +Foo.singleton_method("foo").call diff --git a/ruby/ql/test/library-tests/frameworks/http_clients/HttpClients.expected b/ruby/ql/test/library-tests/frameworks/http_clients/HttpClients.expected index 50d8303925f..f6275da34ac 100644 --- a/ruby/ql/test/library-tests/frameworks/http_clients/HttpClients.expected +++ b/ruby/ql/test/library-tests/frameworks/http_clients/HttpClients.expected @@ -67,6 +67,14 @@ httpRequests | Typhoeus.rb:15:9:15:46 | call to delete | | Typhoeus.rb:18:9:18:44 | call to head | | Typhoeus.rb:21:9:21:47 | call to options | +| Typhoeus.rb:24:8:24:50 | call to new | +| Typhoeus.rb:27:8:27:50 | call to new | +| Typhoeus.rb:31:9:31:51 | call to new | +| Typhoeus.rb:34:9:34:51 | call to new | +| Typhoeus.rb:39:9:39:51 | call to new | +| Typhoeus.rb:44:9:44:51 | call to new | +| Typhoeus.rb:49:9:49:51 | call to new | +| Typhoeus.rb:54:9:54:51 | call to new | getFramework | Excon.rb:3:9:3:40 | call to get | Excon | | Excon.rb:6:9:6:60 | call to post | Excon | @@ -136,6 +144,14 @@ getFramework | Typhoeus.rb:15:9:15:46 | call to delete | Typhoeus | | Typhoeus.rb:18:9:18:44 | call to head | Typhoeus | | Typhoeus.rb:21:9:21:47 | call to options | Typhoeus | +| Typhoeus.rb:24:8:24:50 | call to new | Typhoeus | +| Typhoeus.rb:27:8:27:50 | call to new | Typhoeus | +| Typhoeus.rb:31:9:31:51 | call to new | Typhoeus | +| Typhoeus.rb:34:9:34:51 | call to new | Typhoeus | +| Typhoeus.rb:39:9:39:51 | call to new | Typhoeus | +| Typhoeus.rb:44:9:44:51 | call to new | Typhoeus | +| Typhoeus.rb:49:9:49:51 | call to new | Typhoeus | +| Typhoeus.rb:54:9:54:51 | call to new | Typhoeus | getResponseBody | Excon.rb:3:9:3:40 | call to get | Excon.rb:4:1:4:10 | call to body | | Excon.rb:6:9:6:60 | call to post | Excon.rb:7:1:7:10 | call to body | @@ -205,6 +221,14 @@ getResponseBody | Typhoeus.rb:15:9:15:46 | call to delete | Typhoeus.rb:16:1:16:10 | call to body | | Typhoeus.rb:18:9:18:44 | call to head | Typhoeus.rb:19:1:19:10 | call to body | | Typhoeus.rb:21:9:21:47 | call to options | Typhoeus.rb:22:1:22:10 | call to body | +| Typhoeus.rb:24:8:24:50 | call to new | Typhoeus.rb:25:1:25:13 | call to body | +| Typhoeus.rb:27:8:27:50 | call to new | Typhoeus.rb:29:1:29:18 | call to body | +| Typhoeus.rb:31:9:31:51 | call to new | Typhoeus.rb:32:1:32:23 | call to response_body | +| Typhoeus.rb:34:9:34:51 | call to new | Typhoeus.rb:36:5:36:15 | call to body | +| Typhoeus.rb:39:9:39:51 | call to new | Typhoeus.rb:41:5:41:15 | call to body | +| Typhoeus.rb:44:9:44:51 | call to new | Typhoeus.rb:46:5:46:15 | call to body | +| Typhoeus.rb:49:9:49:51 | call to new | Typhoeus.rb:51:5:51:15 | call to body | +| Typhoeus.rb:54:9:54:51 | call to new | Typhoeus.rb:55:19:55:24 | body15 | getAUrlPart | Excon.rb:3:9:3:40 | call to get | Excon.rb:3:19:3:39 | "http://example.com/" | | Excon.rb:6:9:6:60 | call to post | Excon.rb:6:20:6:40 | "http://example.com/" | @@ -287,3 +311,11 @@ getAUrlPart | Typhoeus.rb:15:9:15:46 | call to delete | Typhoeus.rb:15:25:15:45 | "http://example.com/" | | Typhoeus.rb:18:9:18:44 | call to head | Typhoeus.rb:18:23:18:43 | "http://example.com/" | | Typhoeus.rb:21:9:21:47 | call to options | Typhoeus.rb:21:26:21:46 | "http://example.com/" | +| Typhoeus.rb:24:8:24:50 | call to new | Typhoeus.rb:24:30:24:49 | "http://example.com" | +| Typhoeus.rb:27:8:27:50 | call to new | Typhoeus.rb:27:30:27:49 | "http://example.com" | +| Typhoeus.rb:31:9:31:51 | call to new | Typhoeus.rb:31:31:31:50 | "http://example.com" | +| Typhoeus.rb:34:9:34:51 | call to new | Typhoeus.rb:34:31:34:50 | "http://example.com" | +| Typhoeus.rb:39:9:39:51 | call to new | Typhoeus.rb:39:31:39:50 | "http://example.com" | +| Typhoeus.rb:44:9:44:51 | call to new | Typhoeus.rb:44:31:44:50 | "http://example.com" | +| Typhoeus.rb:49:9:49:51 | call to new | Typhoeus.rb:49:31:49:50 | "http://example.com" | +| Typhoeus.rb:54:9:54:51 | call to new | Typhoeus.rb:54:31:54:50 | "http://example.com" | diff --git a/ruby/ql/test/library-tests/frameworks/http_clients/Typhoeus.rb b/ruby/ql/test/library-tests/frameworks/http_clients/Typhoeus.rb index 743081478c8..3d79dae4f06 100644 --- a/ruby/ql/test/library-tests/frameworks/http_clients/Typhoeus.rb +++ b/ruby/ql/test/library-tests/frameworks/http_clients/Typhoeus.rb @@ -19,4 +19,39 @@ resp6 = Typhoeus.head("http://example.com/") resp6.body resp7 = Typhoeus.options("http://example.com/") -resp7.body \ No newline at end of file +resp7.body + +req8 = Typhoeus::Request.new("http://example.com") +req8.run.body + +req9 = Typhoeus::Request.new("http://example.com") +req9.run +req9.response.body + +req10 = Typhoeus::Request.new("http://example.com") +req10.run.response_body + +req11 = Typhoeus::Request.new("http://example.com") +req11.on_complete do |resp11| + resp11.body +end + +req12 = Typhoeus::Request.new("http://example.com") +req12.on_success do |resp12| + resp12.body +end + +req13 = Typhoeus::Request.new("http://example.com") +req13.on_failure do |resp13| + resp13.body +end + +req14 = Typhoeus::Request.new("http://example.com") +req14.on_progress do |resp14| + resp14.body +end + +req15 = Typhoeus::Request.new("http://example.com") +req15.on_body do |body15| + # ... +end \ No newline at end of file diff --git a/ruby/ql/test/library-tests/frameworks/sinatra/Flow.expected b/ruby/ql/test/library-tests/frameworks/sinatra/Flow.expected index baad7a63b8d..0930c4da2a4 100644 --- a/ruby/ql/test/library-tests/frameworks/sinatra/Flow.expected +++ b/ruby/ql/test/library-tests/frameworks/sinatra/Flow.expected @@ -4,12 +4,14 @@ edges | app.rb:75:5:75:8 | [post] self [@foo] | app.rb:76:32:76:35 | self [@foo] | provenance | | | app.rb:75:12:75:17 | call to params | app.rb:75:12:75:24 | ...[...] | provenance | | | app.rb:75:12:75:24 | ...[...] | app.rb:75:5:75:8 | [post] self [@foo] | provenance | | -| app.rb:76:32:76:35 | @foo | views/index.erb:2:10:2:12 | call to foo | provenance | | +| app.rb:76:25:76:36 | call to [] [element :foo] | views/index.erb:2:10:2:12 | call to foo | provenance | | +| app.rb:76:32:76:35 | @foo | app.rb:76:25:76:36 | call to [] [element :foo] | provenance | | | app.rb:76:32:76:35 | self [@foo] | app.rb:76:32:76:35 | @foo | provenance | | nodes | app.rb:75:5:75:8 | [post] self [@foo] | semmle.label | [post] self [@foo] | | app.rb:75:12:75:17 | call to params | semmle.label | call to params | | app.rb:75:12:75:24 | ...[...] | semmle.label | ...[...] | +| app.rb:76:25:76:36 | call to [] [element :foo] | semmle.label | call to [] [element :foo] | | app.rb:76:32:76:35 | @foo | semmle.label | @foo | | app.rb:76:32:76:35 | self [@foo] | semmle.label | self [@foo] | | views/index.erb:2:10:2:12 | call to foo | semmle.label | call to foo | diff --git a/ruby/ql/test/query-tests/experimental/LdapInjection/Ldapinjection.expected b/ruby/ql/test/query-tests/experimental/LdapInjection/Ldapinjection.expected index 9eddf82c15c..f4858a7017d 100644 --- a/ruby/ql/test/query-tests/experimental/LdapInjection/Ldapinjection.expected +++ b/ruby/ql/test/query-tests/experimental/LdapInjection/Ldapinjection.expected @@ -6,7 +6,9 @@ edges | LdapInjection.rb:9:5:9:8 | name | LdapInjection.rb:33:88:33:91 | name | provenance | | | LdapInjection.rb:9:12:9:17 | call to params | LdapInjection.rb:9:12:9:29 | ...[...] | provenance | | | LdapInjection.rb:9:12:9:29 | ...[...] | LdapInjection.rb:9:5:9:8 | name | provenance | | +| LdapInjection.rb:33:87:33:92 | call to [] [element 0] | LdapInjection.rb:33:87:33:92 | call to [] | provenance | | | LdapInjection.rb:33:88:33:91 | name | LdapInjection.rb:33:87:33:92 | call to [] | provenance | | +| LdapInjection.rb:33:88:33:91 | name | LdapInjection.rb:33:87:33:92 | call to [] [element 0] | provenance | | | LdapInjection.rb:33:88:33:91 | name | LdapInjection.rb:37:41:37:44 | name | provenance | | | LdapInjection.rb:37:5:37:10 | filter | LdapInjection.rb:38:62:38:67 | filter | provenance | | | LdapInjection.rb:37:14:37:45 | call to eq | LdapInjection.rb:37:5:37:10 | filter | provenance | | @@ -21,6 +23,7 @@ nodes | LdapInjection.rb:25:23:25:49 | "ou=people,dc=#{...},dc=com" | semmle.label | "ou=people,dc=#{...},dc=com" | | LdapInjection.rb:29:62:29:73 | "cn=#{...}" | semmle.label | "cn=#{...}" | | LdapInjection.rb:33:87:33:92 | call to [] | semmle.label | call to [] | +| LdapInjection.rb:33:87:33:92 | call to [] [element 0] | semmle.label | call to [] [element 0] | | LdapInjection.rb:33:88:33:91 | name | semmle.label | name | | LdapInjection.rb:37:5:37:10 | filter | semmle.label | filter | | LdapInjection.rb:37:14:37:45 | call to eq | semmle.label | call to eq | diff --git a/ruby/ql/test/query-tests/experimental/cwe-502/UnsafeYamlDeserialization.expected b/ruby/ql/test/query-tests/experimental/cwe-502/UnsafeYamlDeserialization.expected new file mode 100644 index 00000000000..c0bf81ce21a --- /dev/null +++ b/ruby/ql/test/query-tests/experimental/cwe-502/UnsafeYamlDeserialization.expected @@ -0,0 +1,56 @@ +edges +| UnsafeYamlDeserialization.rb:10:5:10:13 | yaml_data | UnsafeYamlDeserialization.rb:11:25:11:33 | yaml_data | provenance | | +| UnsafeYamlDeserialization.rb:10:17:10:22 | call to params | UnsafeYamlDeserialization.rb:10:17:10:28 | ...[...] | provenance | | +| UnsafeYamlDeserialization.rb:10:17:10:28 | ...[...] | UnsafeYamlDeserialization.rb:10:5:10:13 | yaml_data | provenance | | +| UnsafeYamlDeserialization.rb:17:5:17:13 | yaml_data | UnsafeYamlDeserialization.rb:18:25:18:33 | yaml_data | provenance | | +| UnsafeYamlDeserialization.rb:17:17:17:22 | call to params | UnsafeYamlDeserialization.rb:17:17:17:28 | ...[...] | provenance | | +| UnsafeYamlDeserialization.rb:17:17:17:28 | ...[...] | UnsafeYamlDeserialization.rb:17:5:17:13 | yaml_data | provenance | | +| UnsafeYamlDeserialization.rb:32:5:32:13 | yaml_data | UnsafeYamlDeserialization.rb:33:32:33:40 | yaml_data | provenance | | +| UnsafeYamlDeserialization.rb:32:5:32:13 | yaml_data | UnsafeYamlDeserialization.rb:34:37:34:45 | yaml_data | provenance | | +| UnsafeYamlDeserialization.rb:32:5:32:13 | yaml_data | UnsafeYamlDeserialization.rb:35:32:35:40 | yaml_data | provenance | | +| UnsafeYamlDeserialization.rb:32:5:32:13 | yaml_data | UnsafeYamlDeserialization.rb:37:14:37:33 | call to to_ruby | provenance | | +| UnsafeYamlDeserialization.rb:32:5:32:13 | yaml_data | UnsafeYamlDeserialization.rb:38:14:38:43 | call to to_ruby | provenance | | +| UnsafeYamlDeserialization.rb:32:5:32:13 | yaml_data | UnsafeYamlDeserialization.rb:39:14:39:48 | call to to_ruby | provenance | | +| UnsafeYamlDeserialization.rb:32:5:32:13 | yaml_data | UnsafeYamlDeserialization.rb:49:14:49:32 | call to to_ruby | provenance | | +| UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | UnsafeYamlDeserialization.rb:32:17:32:28 | ...[...] | provenance | | +| UnsafeYamlDeserialization.rb:32:17:32:28 | ...[...] | UnsafeYamlDeserialization.rb:32:5:32:13 | yaml_data | provenance | | +nodes +| UnsafeYamlDeserialization.rb:10:5:10:13 | yaml_data | semmle.label | yaml_data | +| UnsafeYamlDeserialization.rb:10:17:10:22 | call to params | semmle.label | call to params | +| UnsafeYamlDeserialization.rb:10:17:10:28 | ...[...] | semmle.label | ...[...] | +| UnsafeYamlDeserialization.rb:11:25:11:33 | yaml_data | semmle.label | yaml_data | +| UnsafeYamlDeserialization.rb:17:5:17:13 | yaml_data | semmle.label | yaml_data | +| UnsafeYamlDeserialization.rb:17:17:17:22 | call to params | semmle.label | call to params | +| UnsafeYamlDeserialization.rb:17:17:17:28 | ...[...] | semmle.label | ...[...] | +| UnsafeYamlDeserialization.rb:18:25:18:33 | yaml_data | semmle.label | yaml_data | +| UnsafeYamlDeserialization.rb:32:5:32:13 | yaml_data | semmle.label | yaml_data | +| UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | semmle.label | call to params | +| UnsafeYamlDeserialization.rb:32:17:32:28 | ...[...] | semmle.label | ...[...] | +| UnsafeYamlDeserialization.rb:33:32:33:40 | yaml_data | semmle.label | yaml_data | +| UnsafeYamlDeserialization.rb:34:37:34:45 | yaml_data | semmle.label | yaml_data | +| UnsafeYamlDeserialization.rb:35:32:35:40 | yaml_data | semmle.label | yaml_data | +| UnsafeYamlDeserialization.rb:37:14:37:33 | call to to_ruby | semmle.label | call to to_ruby | +| UnsafeYamlDeserialization.rb:38:14:38:43 | call to to_ruby | semmle.label | call to to_ruby | +| UnsafeYamlDeserialization.rb:39:14:39:48 | call to to_ruby | semmle.label | call to to_ruby | +| UnsafeYamlDeserialization.rb:49:14:49:32 | call to to_ruby | semmle.label | call to to_ruby | +| UnsafeYamlDeserialization.rb:61:24:61:34 | call to read | semmle.label | call to read | +| UnsafeYamlDeserialization.rb:64:24:64:33 | call to gets | semmle.label | call to gets | +| UnsafeYamlDeserialization.rb:67:24:67:32 | call to read | semmle.label | call to read | +| UnsafeYamlDeserialization.rb:70:24:70:27 | call to gets | semmle.label | call to gets | +| UnsafeYamlDeserialization.rb:73:24:73:32 | call to readlines | semmle.label | call to readlines | +subpaths +#select +| UnsafeYamlDeserialization.rb:11:25:11:33 | yaml_data | UnsafeYamlDeserialization.rb:10:17:10:22 | call to params | UnsafeYamlDeserialization.rb:11:25:11:33 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:10:17:10:22 | call to params | user-provided value | +| UnsafeYamlDeserialization.rb:18:25:18:33 | yaml_data | UnsafeYamlDeserialization.rb:17:17:17:22 | call to params | UnsafeYamlDeserialization.rb:18:25:18:33 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:17:17:17:22 | call to params | user-provided value | +| UnsafeYamlDeserialization.rb:33:32:33:40 | yaml_data | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | UnsafeYamlDeserialization.rb:33:32:33:40 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | user-provided value | +| UnsafeYamlDeserialization.rb:34:37:34:45 | yaml_data | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | UnsafeYamlDeserialization.rb:34:37:34:45 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | user-provided value | +| UnsafeYamlDeserialization.rb:35:32:35:40 | yaml_data | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | UnsafeYamlDeserialization.rb:35:32:35:40 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | user-provided value | +| UnsafeYamlDeserialization.rb:37:14:37:33 | call to to_ruby | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | UnsafeYamlDeserialization.rb:37:14:37:33 | call to to_ruby | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | user-provided value | +| UnsafeYamlDeserialization.rb:38:14:38:43 | call to to_ruby | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | UnsafeYamlDeserialization.rb:38:14:38:43 | call to to_ruby | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | user-provided value | +| UnsafeYamlDeserialization.rb:39:14:39:48 | call to to_ruby | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | UnsafeYamlDeserialization.rb:39:14:39:48 | call to to_ruby | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | user-provided value | +| UnsafeYamlDeserialization.rb:49:14:49:32 | call to to_ruby | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | UnsafeYamlDeserialization.rb:49:14:49:32 | call to to_ruby | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:32:17:32:22 | call to params | user-provided value | +| UnsafeYamlDeserialization.rb:61:24:61:34 | call to read | UnsafeYamlDeserialization.rb:61:24:61:34 | call to read | UnsafeYamlDeserialization.rb:61:24:61:34 | call to read | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:61:24:61:34 | call to read | value from stdin | +| UnsafeYamlDeserialization.rb:64:24:64:33 | call to gets | UnsafeYamlDeserialization.rb:64:24:64:33 | call to gets | UnsafeYamlDeserialization.rb:64:24:64:33 | call to gets | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:64:24:64:33 | call to gets | value from stdin | +| UnsafeYamlDeserialization.rb:67:24:67:32 | call to read | UnsafeYamlDeserialization.rb:67:24:67:32 | call to read | UnsafeYamlDeserialization.rb:67:24:67:32 | call to read | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:67:24:67:32 | call to read | value from stdin | +| UnsafeYamlDeserialization.rb:70:24:70:27 | call to gets | UnsafeYamlDeserialization.rb:70:24:70:27 | call to gets | UnsafeYamlDeserialization.rb:70:24:70:27 | call to gets | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:70:24:70:27 | call to gets | value from stdin | +| UnsafeYamlDeserialization.rb:73:24:73:32 | call to readlines | UnsafeYamlDeserialization.rb:73:24:73:32 | call to readlines | UnsafeYamlDeserialization.rb:73:24:73:32 | call to readlines | Unsafe deserialization depends on a $@. | UnsafeYamlDeserialization.rb:73:24:73:32 | call to readlines | value from stdin | diff --git a/ruby/ql/test/query-tests/experimental/cwe-502/UnsafeYamlDeserialization.qlref b/ruby/ql/test/query-tests/experimental/cwe-502/UnsafeYamlDeserialization.qlref new file mode 100644 index 00000000000..991ba757e43 --- /dev/null +++ b/ruby/ql/test/query-tests/experimental/cwe-502/UnsafeYamlDeserialization.qlref @@ -0,0 +1 @@ +experimental/cwe-502/UnsafeYamlDeserialization.ql \ No newline at end of file diff --git a/ruby/ql/test/query-tests/experimental/cwe-502/UnsafeYamlDeserialization.rb b/ruby/ql/test/query-tests/experimental/cwe-502/UnsafeYamlDeserialization.rb new file mode 100644 index 00000000000..c9b186e0915 --- /dev/null +++ b/ruby/ql/test/query-tests/experimental/cwe-502/UnsafeYamlDeserialization.rb @@ -0,0 +1,75 @@ +require "active_job" +require "base64" +require "json" +require "oj" +require "yaml" + +class UsersController < ActionController::Base + # BAD before psych version 4.0.0 and + def route1 + yaml_data = params[:key] + object = Psych.load yaml_data + object = Psych.load_file yaml_data + end + + # GOOD In psych version 4.0.0 and above + def route2 + yaml_data = params[:key] + object = Psych.load yaml_data + object = Psych.load_file yaml_data + end + + # GOOD + def route3 + yaml_data = params[:key] + object = Psych.parse_stream(yaml_data) + object = Psych.parse(yaml_data) + object = Psych.parse_file(yaml_data) + end + + # BAD + def route4 + yaml_data = params[:key] + object = Psych.unsafe_load(yaml_data) + object = Psych.unsafe_load_file(yaml_data) + object = Psych.load_stream(yaml_data) + parse_output = Psych.parse_stream(yaml_data) + object = parse_output.to_ruby + object = Psych.parse(yaml_data).to_ruby + object = Psych.parse_file(yaml_data).to_ruby + parsed_yaml = Psych.parse_stream(yaml_data) + parsed_yaml.children.each do |child| + object = child.to_ruby + end + Psych.parse_stream(yaml_data) do |document| + object = document.to_ruby + end + object = parsed_yaml.children.first.to_ruby + content = parsed_yaml.children[0].children[0].children + object = parsed_yaml.to_ruby[0] + object = content.to_ruby[0] + object = Psych.parse(yaml_data).children[0].to_ruby + end + + # GOOD + def route5 + plist_data = params[:key] + result = Plist.parse_xml(plist_data, marshal: false) + end + + def stdin + object = YAML.load $stdin.read + + # STDIN + object = YAML.load STDIN.gets + + # ARGF + object = YAML.load ARGF.read + + # Kernel.gets + object = YAML.load gets + + # Kernel.readlines + object = YAML.load readlines + end +end diff --git a/ruby/ql/test/query-tests/security/cwe-079/ReflectedXSS.expected b/ruby/ql/test/query-tests/security/cwe-079/ReflectedXSS.expected index 71f40d81a34..d92d24400e8 100644 --- a/ruby/ql/test/query-tests/security/cwe-079/ReflectedXSS.expected +++ b/ruby/ql/test/query-tests/security/cwe-079/ReflectedXSS.expected @@ -15,16 +15,27 @@ edges | app/controllers/foo/bars_controller.rb:19:22:19:23 | dt | app/views/foo/bars/show.html.erb:40:3:40:16 | @instance_text | provenance | | | app/controllers/foo/bars_controller.rb:24:39:24:44 | call to params | app/controllers/foo/bars_controller.rb:24:39:24:59 | ...[...] | provenance | | | app/controllers/foo/bars_controller.rb:24:39:24:59 | ...[...] | app/controllers/foo/bars_controller.rb:24:39:24:59 | ... = ... | provenance | | -| app/controllers/foo/bars_controller.rb:26:53:26:54 | dt | app/views/foo/bars/show.html.erb:5:9:5:20 | call to display_text | provenance | | -| app/controllers/foo/bars_controller.rb:26:53:26:54 | dt | app/views/foo/bars/show.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | provenance | | -| app/controllers/foo/bars_controller.rb:26:53:26:54 | dt | app/views/foo/bars/show.html.erb:12:9:12:21 | call to local_assigns [element :display_text] | provenance | | -| app/controllers/foo/bars_controller.rb:26:53:26:54 | dt | app/views/foo/bars/show.html.erb:17:15:17:27 | call to local_assigns [element :display_text] | provenance | | -| app/controllers/foo/bars_controller.rb:26:53:26:54 | dt | app/views/foo/bars/show.html.erb:35:3:35:14 | call to display_text | provenance | | -| app/controllers/foo/bars_controller.rb:26:53:26:54 | dt | app/views/foo/bars/show.html.erb:43:76:43:87 | call to display_text | provenance | | -| app/controllers/foo/bars_controller.rb:26:53:26:54 | dt | app/views/foo/bars/show.html.erb:82:6:82:17 | call to display_text | provenance | | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | app/views/foo/bars/show.html.erb:5:9:5:20 | call to display_text | provenance | | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | app/views/foo/bars/show.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | provenance | | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | app/views/foo/bars/show.html.erb:12:9:12:21 | call to local_assigns [element :display_text] | provenance | | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | app/views/foo/bars/show.html.erb:17:15:17:27 | call to local_assigns [element :display_text] | provenance | | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | app/views/foo/bars/show.html.erb:35:3:35:14 | call to display_text | provenance | | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | app/views/foo/bars/show.html.erb:43:76:43:87 | call to display_text | provenance | | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | app/views/foo/bars/show.html.erb:82:6:82:17 | call to display_text | provenance | | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | app/views/foo/bars/show.html.erb:85:36:85:47 | call to display_text | provenance | | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | app/views/foo/bars/show.html.erb:86:28:86:39 | call to display_text | provenance | | +| app/controllers/foo/bars_controller.rb:26:53:26:54 | dt | app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | provenance | | | app/controllers/foo/bars_controller.rb:30:5:30:7 | str | app/controllers/foo/bars_controller.rb:31:5:31:7 | str | provenance | | | app/controllers/foo/bars_controller.rb:30:11:30:16 | call to params | app/controllers/foo/bars_controller.rb:30:11:30:28 | ...[...] | provenance | | | app/controllers/foo/bars_controller.rb:30:11:30:28 | ...[...] | app/controllers/foo/bars_controller.rb:30:5:30:7 | str | provenance | | +| app/controllers/foo/bars_controller.rb:33:32:33:37 | call to params | app/controllers/foo/bars_controller.rb:33:32:33:49 | ...[...] | provenance | | +| app/controllers/foo/bars_controller.rb:33:32:33:49 | ...[...] | app/controllers/foo/bars_controller.rb:33:5:33:50 | call to translate | provenance | | +| app/controllers/foo/bars_controller.rb:34:24:34:29 | call to params | app/controllers/foo/bars_controller.rb:34:24:34:41 | ...[...] | provenance | | +| app/controllers/foo/bars_controller.rb:34:24:34:41 | ...[...] | app/controllers/foo/bars_controller.rb:34:5:34:42 | call to t | provenance | | +| app/controllers/foo/bars_controller.rb:36:34:36:39 | call to params | app/controllers/foo/bars_controller.rb:36:34:36:51 | ...[...] | provenance | | +| app/controllers/foo/bars_controller.rb:36:34:36:51 | ...[...] | app/controllers/foo/bars_controller.rb:36:5:36:52 | call to t | provenance | | +| app/controllers/foo/bars_controller.rb:37:42:37:47 | call to params | app/controllers/foo/bars_controller.rb:37:42:37:59 | ...[...] | provenance | | +| app/controllers/foo/bars_controller.rb:37:42:37:59 | ...[...] | app/controllers/foo/bars_controller.rb:37:5:37:60 | call to translate | provenance | | | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] [element] | provenance | | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | provenance | | @@ -32,16 +43,20 @@ edges | app/views/foo/bars/show.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | app/views/foo/bars/show.html.erb:8:9:8:36 | ...[...] | provenance | | | app/views/foo/bars/show.html.erb:12:9:12:21 | call to local_assigns [element :display_text] | app/views/foo/bars/show.html.erb:12:9:12:26 | ...[...] | provenance | | | app/views/foo/bars/show.html.erb:17:15:17:27 | call to local_assigns [element :display_text] | app/views/foo/bars/show.html.erb:17:15:17:32 | ...[...] | provenance | | -| app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | -| app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | provenance | | -| app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... [element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | provenance | | -| app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... [element] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | provenance | | +| app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | provenance | | +| app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | provenance | | +| app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | +| app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | provenance | | +| app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... | app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text] | provenance | | +| app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... [element] | app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text, element] | provenance | | | app/views/foo/bars/show.html.erb:43:76:43:87 | call to display_text | app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... | provenance | | | app/views/foo/bars/show.html.erb:43:76:43:87 | call to display_text | app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... [element] | provenance | | | app/views/foo/bars/show.html.erb:53:29:53:34 | call to params | app/views/foo/bars/show.html.erb:53:29:53:44 | ...[...] | provenance | | | app/views/foo/bars/show.html.erb:56:13:56:18 | call to params | app/views/foo/bars/show.html.erb:56:13:56:28 | ...[...] | provenance | | | app/views/foo/bars/show.html.erb:73:19:73:24 | call to params | app/views/foo/bars/show.html.erb:73:19:73:34 | ...[...] | provenance | | | app/views/foo/bars/show.html.erb:76:28:76:33 | call to params | app/views/foo/bars/show.html.erb:76:28:76:39 | ...[...] | provenance | | +| app/views/foo/bars/show.html.erb:85:36:85:47 | call to display_text | app/views/foo/bars/show.html.erb:85:9:85:48 | call to translate | provenance | | +| app/views/foo/bars/show.html.erb:86:28:86:39 | call to display_text | app/views/foo/bars/show.html.erb:86:9:86:40 | call to t | provenance | | nodes | app/controllers/foo/bars_controller.rb:9:12:9:17 | call to params | semmle.label | call to params | | app/controllers/foo/bars_controller.rb:9:12:9:29 | ...[...] | semmle.label | ...[...] | @@ -57,11 +72,24 @@ nodes | app/controllers/foo/bars_controller.rb:24:39:24:44 | call to params | semmle.label | call to params | | app/controllers/foo/bars_controller.rb:24:39:24:59 | ... = ... | semmle.label | ... = ... | | app/controllers/foo/bars_controller.rb:24:39:24:59 | ...[...] | semmle.label | ...[...] | +| app/controllers/foo/bars_controller.rb:26:37:26:76 | call to [] [element :display_text] | semmle.label | call to [] [element :display_text] | | app/controllers/foo/bars_controller.rb:26:53:26:54 | dt | semmle.label | dt | | app/controllers/foo/bars_controller.rb:30:5:30:7 | str | semmle.label | str | | app/controllers/foo/bars_controller.rb:30:11:30:16 | call to params | semmle.label | call to params | | app/controllers/foo/bars_controller.rb:30:11:30:28 | ...[...] | semmle.label | ...[...] | | app/controllers/foo/bars_controller.rb:31:5:31:7 | str | semmle.label | str | +| app/controllers/foo/bars_controller.rb:33:5:33:50 | call to translate | semmle.label | call to translate | +| app/controllers/foo/bars_controller.rb:33:32:33:37 | call to params | semmle.label | call to params | +| app/controllers/foo/bars_controller.rb:33:32:33:49 | ...[...] | semmle.label | ...[...] | +| app/controllers/foo/bars_controller.rb:34:5:34:42 | call to t | semmle.label | call to t | +| app/controllers/foo/bars_controller.rb:34:24:34:29 | call to params | semmle.label | call to params | +| app/controllers/foo/bars_controller.rb:34:24:34:41 | ...[...] | semmle.label | ...[...] | +| app/controllers/foo/bars_controller.rb:36:5:36:52 | call to t | semmle.label | call to t | +| app/controllers/foo/bars_controller.rb:36:34:36:39 | call to params | semmle.label | call to params | +| app/controllers/foo/bars_controller.rb:36:34:36:51 | ...[...] | semmle.label | ...[...] | +| app/controllers/foo/bars_controller.rb:37:5:37:60 | call to translate | semmle.label | call to translate | +| app/controllers/foo/bars_controller.rb:37:42:37:47 | call to params | semmle.label | call to params | +| app/controllers/foo/bars_controller.rb:37:42:37:59 | ...[...] | semmle.label | ...[...] | | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | semmle.label | call to display_text | | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | semmle.label | call to display_text [element] | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | semmle.label | call to local_assigns [element :display_text, element] | @@ -78,6 +106,8 @@ nodes | app/views/foo/bars/show.html.erb:17:15:17:32 | ...[...] | semmle.label | ...[...] | | app/views/foo/bars/show.html.erb:35:3:35:14 | call to display_text | semmle.label | call to display_text | | app/views/foo/bars/show.html.erb:40:3:40:16 | @instance_text | semmle.label | @instance_text | +| app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text, element] | semmle.label | call to [] [element :display_text, element] | +| app/views/foo/bars/show.html.erb:43:48:43:89 | call to [] [element :display_text] | semmle.label | call to [] [element :display_text] | | app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... | semmle.label | ... + ... | | app/views/foo/bars/show.html.erb:43:64:43:87 | ... + ... [element] | semmle.label | ... + ... [element] | | app/views/foo/bars/show.html.erb:43:76:43:87 | call to display_text | semmle.label | call to display_text | @@ -92,10 +122,18 @@ nodes | app/views/foo/bars/show.html.erb:76:28:76:33 | call to params | semmle.label | call to params | | app/views/foo/bars/show.html.erb:76:28:76:39 | ...[...] | semmle.label | ...[...] | | app/views/foo/bars/show.html.erb:82:6:82:17 | call to display_text | semmle.label | call to display_text | +| app/views/foo/bars/show.html.erb:85:9:85:48 | call to translate | semmle.label | call to translate | +| app/views/foo/bars/show.html.erb:85:36:85:47 | call to display_text | semmle.label | call to display_text | +| app/views/foo/bars/show.html.erb:86:9:86:40 | call to t | semmle.label | call to t | +| app/views/foo/bars/show.html.erb:86:28:86:39 | call to display_text | semmle.label | call to display_text | subpaths #select | app/controllers/foo/bars_controller.rb:24:39:24:59 | ... = ... | app/controllers/foo/bars_controller.rb:24:39:24:44 | call to params | app/controllers/foo/bars_controller.rb:24:39:24:59 | ... = ... | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:24:39:24:44 | call to params | user-provided value | | app/controllers/foo/bars_controller.rb:31:5:31:7 | str | app/controllers/foo/bars_controller.rb:30:11:30:16 | call to params | app/controllers/foo/bars_controller.rb:31:5:31:7 | str | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:30:11:30:16 | call to params | user-provided value | +| app/controllers/foo/bars_controller.rb:33:5:33:50 | call to translate | app/controllers/foo/bars_controller.rb:33:32:33:37 | call to params | app/controllers/foo/bars_controller.rb:33:5:33:50 | call to translate | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:33:32:33:37 | call to params | user-provided value | +| app/controllers/foo/bars_controller.rb:34:5:34:42 | call to t | app/controllers/foo/bars_controller.rb:34:24:34:29 | call to params | app/controllers/foo/bars_controller.rb:34:5:34:42 | call to t | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:34:24:34:29 | call to params | user-provided value | +| app/controllers/foo/bars_controller.rb:36:5:36:52 | call to t | app/controllers/foo/bars_controller.rb:36:34:36:39 | call to params | app/controllers/foo/bars_controller.rb:36:5:36:52 | call to t | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:36:34:36:39 | call to params | user-provided value | +| app/controllers/foo/bars_controller.rb:37:5:37:60 | call to translate | app/controllers/foo/bars_controller.rb:37:42:37:47 | call to params | app/controllers/foo/bars_controller.rb:37:5:37:60 | call to translate | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:37:42:37:47 | call to params | user-provided value | | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | user-provided value | | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | user-provided value | | app/views/foo/bars/show.html.erb:2:18:2:30 | @user_website | app/controllers/foo/bars_controller.rb:17:21:17:26 | call to params | app/views/foo/bars/show.html.erb:2:18:2:30 | @user_website | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:17:21:17:26 | call to params | user-provided value | @@ -112,3 +150,5 @@ subpaths | app/views/foo/bars/show.html.erb:73:19:73:34 | ...[...] | app/views/foo/bars/show.html.erb:73:19:73:24 | call to params | app/views/foo/bars/show.html.erb:73:19:73:34 | ...[...] | Cross-site scripting vulnerability due to a $@. | app/views/foo/bars/show.html.erb:73:19:73:24 | call to params | user-provided value | | app/views/foo/bars/show.html.erb:76:28:76:39 | ...[...] | app/views/foo/bars/show.html.erb:76:28:76:33 | call to params | app/views/foo/bars/show.html.erb:76:28:76:39 | ...[...] | Cross-site scripting vulnerability due to a $@. | app/views/foo/bars/show.html.erb:76:28:76:33 | call to params | user-provided value | | app/views/foo/bars/show.html.erb:82:6:82:17 | call to display_text | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | app/views/foo/bars/show.html.erb:82:6:82:17 | call to display_text | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | user-provided value | +| app/views/foo/bars/show.html.erb:85:9:85:48 | call to translate | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | app/views/foo/bars/show.html.erb:85:9:85:48 | call to translate | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | user-provided value | +| app/views/foo/bars/show.html.erb:86:9:86:40 | call to t | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | app/views/foo/bars/show.html.erb:86:9:86:40 | call to t | Cross-site scripting vulnerability due to a $@. | app/controllers/foo/bars_controller.rb:18:10:18:15 | call to params | user-provided value | diff --git a/ruby/ql/test/query-tests/security/cwe-079/StoredXSS.expected b/ruby/ql/test/query-tests/security/cwe-079/StoredXSS.expected index 8ae455760c1..99d248f4884 100644 --- a/ruby/ql/test/query-tests/security/cwe-079/StoredXSS.expected +++ b/ruby/ql/test/query-tests/security/cwe-079/StoredXSS.expected @@ -3,12 +3,13 @@ edges | app/controllers/foo/stores_controller.rb:8:10:8:29 | call to read | app/controllers/foo/stores_controller.rb:8:5:8:6 | dt | provenance | | | app/controllers/foo/stores_controller.rb:9:22:9:23 | dt | app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | provenance | | | app/controllers/foo/stores_controller.rb:9:22:9:23 | dt | app/views/foo/stores/show.html.erb:37:3:37:16 | @instance_text | provenance | | -| app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | app/views/foo/stores/show.html.erb:2:9:2:20 | call to display_text | provenance | | -| app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | app/views/foo/stores/show.html.erb:5:9:5:21 | call to local_assigns [element :display_text] | provenance | | -| app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | app/views/foo/stores/show.html.erb:9:9:9:21 | call to local_assigns [element :display_text] | provenance | | -| app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | app/views/foo/stores/show.html.erb:14:15:14:27 | call to local_assigns [element :display_text] | provenance | | -| app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | app/views/foo/stores/show.html.erb:32:3:32:14 | call to display_text | provenance | | -| app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | app/views/foo/stores/show.html.erb:40:76:40:87 | call to display_text | provenance | | +| app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | app/views/foo/stores/show.html.erb:2:9:2:20 | call to display_text | provenance | | +| app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | app/views/foo/stores/show.html.erb:5:9:5:21 | call to local_assigns [element :display_text] | provenance | | +| app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | app/views/foo/stores/show.html.erb:9:9:9:21 | call to local_assigns [element :display_text] | provenance | | +| app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | app/views/foo/stores/show.html.erb:14:15:14:27 | call to local_assigns [element :display_text] | provenance | | +| app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | app/views/foo/stores/show.html.erb:32:3:32:14 | call to display_text | provenance | | +| app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | app/views/foo/stores/show.html.erb:40:76:40:87 | call to display_text | provenance | | +| app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | provenance | | | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] [element] | provenance | | | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | app/views/foo/bars/_widget.html.erb:8:9:8:36 | ...[...] | provenance | | @@ -16,10 +17,12 @@ edges | app/views/foo/stores/show.html.erb:5:9:5:21 | call to local_assigns [element :display_text] | app/views/foo/stores/show.html.erb:5:9:5:36 | ...[...] | provenance | | | app/views/foo/stores/show.html.erb:9:9:9:21 | call to local_assigns [element :display_text] | app/views/foo/stores/show.html.erb:9:9:9:26 | ...[...] | provenance | | | app/views/foo/stores/show.html.erb:14:15:14:27 | call to local_assigns [element :display_text] | app/views/foo/stores/show.html.erb:14:15:14:32 | ...[...] | provenance | | -| app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | -| app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | provenance | | -| app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... [element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | provenance | | -| app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... [element] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | provenance | | +| app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | provenance | | +| app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text, element] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text, element] | provenance | | +| app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text] | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | provenance | | +| app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text] | app/views/foo/bars/_widget.html.erb:8:9:8:21 | call to local_assigns [element :display_text] | provenance | | +| app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... | app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text] | provenance | | +| app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... [element] | app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text, element] | provenance | | | app/views/foo/stores/show.html.erb:40:76:40:87 | call to display_text | app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... | provenance | | | app/views/foo/stores/show.html.erb:40:76:40:87 | call to display_text | app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... [element] | provenance | | | app/views/foo/stores/show.html.erb:86:17:86:28 | call to handle | app/views/foo/stores/show.html.erb:86:3:86:29 | call to sprintf | provenance | | @@ -27,6 +30,7 @@ nodes | app/controllers/foo/stores_controller.rb:8:5:8:6 | dt | semmle.label | dt | | app/controllers/foo/stores_controller.rb:8:10:8:29 | call to read | semmle.label | call to read | | app/controllers/foo/stores_controller.rb:9:22:9:23 | dt | semmle.label | dt | +| app/controllers/foo/stores_controller.rb:13:39:13:78 | call to [] [element :display_text] | semmle.label | call to [] [element :display_text] | | app/controllers/foo/stores_controller.rb:13:55:13:56 | dt | semmle.label | dt | | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text | semmle.label | call to display_text | | app/views/foo/bars/_widget.html.erb:5:9:5:20 | call to display_text [element] | semmle.label | call to display_text [element] | @@ -43,6 +47,8 @@ nodes | app/views/foo/stores/show.html.erb:14:15:14:32 | ...[...] | semmle.label | ...[...] | | app/views/foo/stores/show.html.erb:32:3:32:14 | call to display_text | semmle.label | call to display_text | | app/views/foo/stores/show.html.erb:37:3:37:16 | @instance_text | semmle.label | @instance_text | +| app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text, element] | semmle.label | call to [] [element :display_text, element] | +| app/views/foo/stores/show.html.erb:40:48:40:89 | call to [] [element :display_text] | semmle.label | call to [] [element :display_text] | | app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... | semmle.label | ... + ... | | app/views/foo/stores/show.html.erb:40:64:40:87 | ... + ... [element] | semmle.label | ... + ... [element] | | app/views/foo/stores/show.html.erb:40:76:40:87 | call to display_text | semmle.label | call to display_text | diff --git a/ruby/ql/test/query-tests/security/cwe-079/app/controllers/foo/bars_controller.rb b/ruby/ql/test/query-tests/security/cwe-079/app/controllers/foo/bars_controller.rb index ce6adfda027..4146cc29953 100644 --- a/ruby/ql/test/query-tests/security/cwe-079/app/controllers/foo/bars_controller.rb +++ b/ruby/ql/test/query-tests/security/cwe-079/app/controllers/foo/bars_controller.rb @@ -29,5 +29,11 @@ class BarsController < ApplicationController def make_safe_html str = params[:user_name] str.html_safe + + translate("welcome", name: params[:user_name]).html_safe # NOT OK - translate preserves taint + t("welcome", name: params[:user_name]).html_safe # NOT OK - t is an alias of translate + t("welcome_html", name: params[:user_name]).html_safe # OK - t escapes html when key ends in _html + I18n.t("welcome_html", name: params[:user_name]).html_safe # NOT OK - I18n.t does not escape html + I18n.translate("welcome_html", name: params[:user_name]).html_safe # NOT OK - alias end end diff --git a/ruby/ql/test/query-tests/security/cwe-079/app/views/foo/bars/show.html.erb b/ruby/ql/test/query-tests/security/cwe-079/app/views/foo/bars/show.html.erb index 21c463eddbb..b8092cd883f 100644 --- a/ruby/ql/test/query-tests/security/cwe-079/app/views/foo/bars/show.html.erb +++ b/ruby/ql/test/query-tests/security/cwe-079/app/views/foo/bars/show.html.erb @@ -80,3 +80,10 @@ <%# BAD: A local rendered raw as a local variable %> <%== display_text %> + +<%# BAD: translate preserves taint %> +<%= raw translate("welcome", name: display_text) %> +<%= raw t("welcome", name: display_text) %> + +<%# GOOD: translate sanitizes for html keys %> +<%= raw t("welcome1.html", name: display_text) %> diff --git a/ruby/ql/test/query-tests/security/cwe-089/ActiveRecordInjection.rb b/ruby/ql/test/query-tests/security/cwe-089/ActiveRecordInjection.rb index 9a94e48708d..ad074de5e98 100644 --- a/ruby/ql/test/query-tests/security/cwe-089/ActiveRecordInjection.rb +++ b/ruby/ql/test/query-tests/security/cwe-089/ActiveRecordInjection.rb @@ -114,6 +114,12 @@ class FooController < ActionController::Base User.joins(:a, params[:column]) User.count_by_sql(params[:custom_sql_query]) + + # BAD: executes `SELECT users.* FROM #{params[:tab]}` + # where `params[:tab]` is unsanitized + User.all.from(params[:tab]) + # BAD: executes `SELECT "users".* FROM (SELECT "users".* FROM "users") #{params[:sq]} + User.all.from(User.all, params[:sq]) end end diff --git a/ruby/ql/test/query-tests/security/cwe-089/ArelInjection.rb b/ruby/ql/test/query-tests/security/cwe-089/ArelInjection.rb index a1efb3adabb..1cd6782b241 100644 --- a/ruby/ql/test/query-tests/security/cwe-089/ArelInjection.rb +++ b/ruby/ql/test/query-tests/security/cwe-089/ArelInjection.rb @@ -4,5 +4,6 @@ class PotatoController < ActionController::Base name = params[:user_name] # BAD: SQL statement constructed from user input sql = Arel.sql("SELECT * FROM users WHERE name = #{name}") + sql = Arel::Nodes::SqlLiteral.new("SELECT * FROM users WHERE name = #{name}") end end \ No newline at end of file diff --git a/ruby/ql/test/query-tests/security/cwe-089/SqlInjection.expected b/ruby/ql/test/query-tests/security/cwe-089/SqlInjection.expected index 726aefe7a20..8b6c5bf4d16 100644 --- a/ruby/ql/test/query-tests/security/cwe-089/SqlInjection.expected +++ b/ruby/ql/test/query-tests/security/cwe-089/SqlInjection.expected @@ -8,10 +8,12 @@ edges | ActiveRecordInjection.rb:43:29:43:39 | ...[...] | ActiveRecordInjection.rb:43:20:43:42 | "id = '#{...}'" | provenance | | | ActiveRecordInjection.rb:48:30:48:35 | call to params | ActiveRecordInjection.rb:48:30:48:40 | ...[...] | provenance | | | ActiveRecordInjection.rb:48:30:48:40 | ...[...] | ActiveRecordInjection.rb:48:21:48:43 | "id = '#{...}'" | provenance | | -| ActiveRecordInjection.rb:52:22:52:44 | "id = '#{...}'" | ActiveRecordInjection.rb:52:21:52:45 | call to [] | provenance | | +| ActiveRecordInjection.rb:52:21:52:45 | call to [] [element 0] | ActiveRecordInjection.rb:52:21:52:45 | call to [] | provenance | | +| ActiveRecordInjection.rb:52:22:52:44 | "id = '#{...}'" | ActiveRecordInjection.rb:52:21:52:45 | call to [] [element 0] | provenance | | | ActiveRecordInjection.rb:52:31:52:36 | call to params | ActiveRecordInjection.rb:52:31:52:41 | ...[...] | provenance | | | ActiveRecordInjection.rb:52:31:52:41 | ...[...] | ActiveRecordInjection.rb:52:22:52:44 | "id = '#{...}'" | provenance | | -| ActiveRecordInjection.rb:57:23:57:45 | "id = '#{...}'" | ActiveRecordInjection.rb:57:22:57:46 | call to [] | provenance | | +| ActiveRecordInjection.rb:57:22:57:46 | call to [] [element 0] | ActiveRecordInjection.rb:57:22:57:46 | call to [] | provenance | | +| ActiveRecordInjection.rb:57:23:57:45 | "id = '#{...}'" | ActiveRecordInjection.rb:57:22:57:46 | call to [] [element 0] | provenance | | | ActiveRecordInjection.rb:57:32:57:37 | call to params | ActiveRecordInjection.rb:57:32:57:42 | ...[...] | provenance | | | ActiveRecordInjection.rb:57:32:57:42 | ...[...] | ActiveRecordInjection.rb:57:23:57:45 | "id = '#{...}'" | provenance | | | ActiveRecordInjection.rb:62:21:62:26 | call to params | ActiveRecordInjection.rb:62:21:62:35 | ...[...] | provenance | | @@ -44,35 +46,38 @@ edges | ActiveRecordInjection.rb:113:21:113:26 | call to params | ActiveRecordInjection.rb:113:21:113:35 | ...[...] | provenance | | | ActiveRecordInjection.rb:114:20:114:25 | call to params | ActiveRecordInjection.rb:114:20:114:34 | ...[...] | provenance | | | ActiveRecordInjection.rb:116:23:116:28 | call to params | ActiveRecordInjection.rb:116:23:116:47 | ...[...] | provenance | | -| ActiveRecordInjection.rb:122:5:122:6 | ps | ActiveRecordInjection.rb:123:11:123:12 | ps | provenance | | -| ActiveRecordInjection.rb:122:10:122:15 | call to params | ActiveRecordInjection.rb:122:5:122:6 | ps | provenance | | -| ActiveRecordInjection.rb:123:5:123:7 | uid | ActiveRecordInjection.rb:124:5:124:9 | uidEq | provenance | | -| ActiveRecordInjection.rb:123:11:123:12 | ps | ActiveRecordInjection.rb:123:11:123:17 | ...[...] | provenance | | -| ActiveRecordInjection.rb:123:11:123:17 | ...[...] | ActiveRecordInjection.rb:123:5:123:7 | uid | provenance | | -| ActiveRecordInjection.rb:124:5:124:9 | uidEq | ActiveRecordInjection.rb:128:20:128:32 | ... + ... | provenance | | -| ActiveRecordInjection.rb:124:5:124:9 | uidEq | ActiveRecordInjection.rb:128:28:128:32 | uidEq | provenance | | -| ActiveRecordInjection.rb:128:20:128:32 | ... + ... [element] | ActiveRecordInjection.rb:128:20:128:32 | ... + ... | provenance | | -| ActiveRecordInjection.rb:128:28:128:32 | uidEq | ActiveRecordInjection.rb:128:20:128:32 | ... + ... [element] | provenance | | -| ActiveRecordInjection.rb:161:21:161:26 | call to params | ActiveRecordInjection.rb:161:21:161:44 | ...[...] | provenance | | -| ActiveRecordInjection.rb:161:21:161:26 | call to params | ActiveRecordInjection.rb:161:21:161:44 | ...[...] | provenance | | -| ActiveRecordInjection.rb:161:21:161:44 | ...[...] | ActiveRecordInjection.rb:20:22:20:30 | condition | provenance | | -| ActiveRecordInjection.rb:175:59:175:64 | call to params | ActiveRecordInjection.rb:175:59:175:74 | ...[...] | provenance | | -| ActiveRecordInjection.rb:175:59:175:74 | ...[...] | ActiveRecordInjection.rb:175:27:175:76 | "this is an unsafe annotation:..." | provenance | | -| ActiveRecordInjection.rb:186:5:186:13 | my_params | ActiveRecordInjection.rb:187:47:187:55 | my_params | provenance | | -| ActiveRecordInjection.rb:186:17:186:32 | call to permitted_params | ActiveRecordInjection.rb:186:5:186:13 | my_params | provenance | | -| ActiveRecordInjection.rb:187:5:187:9 | query | ActiveRecordInjection.rb:188:37:188:41 | query | provenance | | -| ActiveRecordInjection.rb:187:47:187:55 | my_params | ActiveRecordInjection.rb:187:47:187:65 | ...[...] | provenance | | -| ActiveRecordInjection.rb:187:47:187:65 | ...[...] | ActiveRecordInjection.rb:187:5:187:9 | query | provenance | | -| ActiveRecordInjection.rb:193:5:193:10 | call to params | ActiveRecordInjection.rb:193:5:193:27 | call to require | provenance | | -| ActiveRecordInjection.rb:193:5:193:27 | call to require | ActiveRecordInjection.rb:193:5:193:59 | call to permit | provenance | | -| ActiveRecordInjection.rb:193:5:193:59 | call to permit | ActiveRecordInjection.rb:186:17:186:32 | call to permitted_params | provenance | | -| ActiveRecordInjection.rb:193:5:193:59 | call to permit | ActiveRecordInjection.rb:197:77:197:92 | call to permitted_params | provenance | | -| ActiveRecordInjection.rb:193:5:193:59 | call to permit | ActiveRecordInjection.rb:198:69:198:84 | call to permitted_params | provenance | | -| ActiveRecordInjection.rb:197:77:197:92 | call to permitted_params | ActiveRecordInjection.rb:197:77:197:102 | ...[...] | provenance | | -| ActiveRecordInjection.rb:197:77:197:102 | ...[...] | ActiveRecordInjection.rb:197:43:197:104 | "SELECT * FROM users WHERE id ..." | provenance | | -| ActiveRecordInjection.rb:198:69:198:84 | call to permitted_params | ActiveRecordInjection.rb:198:69:198:94 | ...[...] | provenance | | -| ActiveRecordInjection.rb:198:69:198:94 | ...[...] | ActiveRecordInjection.rb:198:35:198:96 | "SELECT * FROM users WHERE id ..." | provenance | | +| ActiveRecordInjection.rb:120:19:120:24 | call to params | ActiveRecordInjection.rb:120:19:120:30 | ...[...] | provenance | | +| ActiveRecordInjection.rb:122:29:122:34 | call to params | ActiveRecordInjection.rb:122:29:122:39 | ...[...] | provenance | | +| ActiveRecordInjection.rb:128:5:128:6 | ps | ActiveRecordInjection.rb:129:11:129:12 | ps | provenance | | +| ActiveRecordInjection.rb:128:10:128:15 | call to params | ActiveRecordInjection.rb:128:5:128:6 | ps | provenance | | +| ActiveRecordInjection.rb:129:5:129:7 | uid | ActiveRecordInjection.rb:130:5:130:9 | uidEq | provenance | | +| ActiveRecordInjection.rb:129:11:129:12 | ps | ActiveRecordInjection.rb:129:11:129:17 | ...[...] | provenance | | +| ActiveRecordInjection.rb:129:11:129:17 | ...[...] | ActiveRecordInjection.rb:129:5:129:7 | uid | provenance | | +| ActiveRecordInjection.rb:130:5:130:9 | uidEq | ActiveRecordInjection.rb:134:20:134:32 | ... + ... | provenance | | +| ActiveRecordInjection.rb:130:5:130:9 | uidEq | ActiveRecordInjection.rb:134:28:134:32 | uidEq | provenance | | +| ActiveRecordInjection.rb:134:20:134:32 | ... + ... [element] | ActiveRecordInjection.rb:134:20:134:32 | ... + ... | provenance | | +| ActiveRecordInjection.rb:134:28:134:32 | uidEq | ActiveRecordInjection.rb:134:20:134:32 | ... + ... [element] | provenance | | +| ActiveRecordInjection.rb:167:21:167:26 | call to params | ActiveRecordInjection.rb:167:21:167:44 | ...[...] | provenance | | +| ActiveRecordInjection.rb:167:21:167:26 | call to params | ActiveRecordInjection.rb:167:21:167:44 | ...[...] | provenance | | +| ActiveRecordInjection.rb:167:21:167:44 | ...[...] | ActiveRecordInjection.rb:20:22:20:30 | condition | provenance | | +| ActiveRecordInjection.rb:181:59:181:64 | call to params | ActiveRecordInjection.rb:181:59:181:74 | ...[...] | provenance | | +| ActiveRecordInjection.rb:181:59:181:74 | ...[...] | ActiveRecordInjection.rb:181:27:181:76 | "this is an unsafe annotation:..." | provenance | | +| ActiveRecordInjection.rb:192:5:192:13 | my_params | ActiveRecordInjection.rb:193:47:193:55 | my_params | provenance | | +| ActiveRecordInjection.rb:192:17:192:32 | call to permitted_params | ActiveRecordInjection.rb:192:5:192:13 | my_params | provenance | | +| ActiveRecordInjection.rb:193:5:193:9 | query | ActiveRecordInjection.rb:194:37:194:41 | query | provenance | | +| ActiveRecordInjection.rb:193:47:193:55 | my_params | ActiveRecordInjection.rb:193:47:193:65 | ...[...] | provenance | | +| ActiveRecordInjection.rb:193:47:193:65 | ...[...] | ActiveRecordInjection.rb:193:5:193:9 | query | provenance | | +| ActiveRecordInjection.rb:199:5:199:10 | call to params | ActiveRecordInjection.rb:199:5:199:27 | call to require | provenance | | +| ActiveRecordInjection.rb:199:5:199:27 | call to require | ActiveRecordInjection.rb:199:5:199:59 | call to permit | provenance | | +| ActiveRecordInjection.rb:199:5:199:59 | call to permit | ActiveRecordInjection.rb:192:17:192:32 | call to permitted_params | provenance | | +| ActiveRecordInjection.rb:199:5:199:59 | call to permit | ActiveRecordInjection.rb:203:77:203:92 | call to permitted_params | provenance | | +| ActiveRecordInjection.rb:199:5:199:59 | call to permit | ActiveRecordInjection.rb:204:69:204:84 | call to permitted_params | provenance | | +| ActiveRecordInjection.rb:203:77:203:92 | call to permitted_params | ActiveRecordInjection.rb:203:77:203:102 | ...[...] | provenance | | +| ActiveRecordInjection.rb:203:77:203:102 | ...[...] | ActiveRecordInjection.rb:203:43:203:104 | "SELECT * FROM users WHERE id ..." | provenance | | +| ActiveRecordInjection.rb:204:69:204:84 | call to permitted_params | ActiveRecordInjection.rb:204:69:204:94 | ...[...] | provenance | | +| ActiveRecordInjection.rb:204:69:204:94 | ...[...] | ActiveRecordInjection.rb:204:35:204:96 | "SELECT * FROM users WHERE id ..." | provenance | | | ArelInjection.rb:4:5:4:8 | name | ArelInjection.rb:6:20:6:61 | "SELECT * FROM users WHERE nam..." | provenance | | +| ArelInjection.rb:4:5:4:8 | name | ArelInjection.rb:7:39:7:80 | "SELECT * FROM users WHERE nam..." | provenance | | | ArelInjection.rb:4:12:4:17 | call to params | ArelInjection.rb:4:12:4:29 | ...[...] | provenance | | | ArelInjection.rb:4:12:4:29 | ...[...] | ArelInjection.rb:4:5:4:8 | name | provenance | | | PgInjection.rb:6:5:6:8 | name | PgInjection.rb:13:5:13:8 | qry1 | provenance | | @@ -104,10 +109,12 @@ nodes | ActiveRecordInjection.rb:48:30:48:35 | call to params | semmle.label | call to params | | ActiveRecordInjection.rb:48:30:48:40 | ...[...] | semmle.label | ...[...] | | ActiveRecordInjection.rb:52:21:52:45 | call to [] | semmle.label | call to [] | +| ActiveRecordInjection.rb:52:21:52:45 | call to [] [element 0] | semmle.label | call to [] [element 0] | | ActiveRecordInjection.rb:52:22:52:44 | "id = '#{...}'" | semmle.label | "id = '#{...}'" | | ActiveRecordInjection.rb:52:31:52:36 | call to params | semmle.label | call to params | | ActiveRecordInjection.rb:52:31:52:41 | ...[...] | semmle.label | ...[...] | | ActiveRecordInjection.rb:57:22:57:46 | call to [] | semmle.label | call to [] | +| ActiveRecordInjection.rb:57:22:57:46 | call to [] [element 0] | semmle.label | call to [] [element 0] | | ActiveRecordInjection.rb:57:23:57:45 | "id = '#{...}'" | semmle.label | "id = '#{...}'" | | ActiveRecordInjection.rb:57:32:57:37 | call to params | semmle.label | call to params | | ActiveRecordInjection.rb:57:32:57:42 | ...[...] | semmle.label | ...[...] | @@ -160,40 +167,45 @@ nodes | ActiveRecordInjection.rb:114:20:114:34 | ...[...] | semmle.label | ...[...] | | ActiveRecordInjection.rb:116:23:116:28 | call to params | semmle.label | call to params | | ActiveRecordInjection.rb:116:23:116:47 | ...[...] | semmle.label | ...[...] | -| ActiveRecordInjection.rb:122:5:122:6 | ps | semmle.label | ps | -| ActiveRecordInjection.rb:122:10:122:15 | call to params | semmle.label | call to params | -| ActiveRecordInjection.rb:123:5:123:7 | uid | semmle.label | uid | -| ActiveRecordInjection.rb:123:11:123:12 | ps | semmle.label | ps | -| ActiveRecordInjection.rb:123:11:123:17 | ...[...] | semmle.label | ...[...] | -| ActiveRecordInjection.rb:124:5:124:9 | uidEq | semmle.label | uidEq | -| ActiveRecordInjection.rb:128:20:128:32 | ... + ... | semmle.label | ... + ... | -| ActiveRecordInjection.rb:128:20:128:32 | ... + ... [element] | semmle.label | ... + ... [element] | -| ActiveRecordInjection.rb:128:28:128:32 | uidEq | semmle.label | uidEq | -| ActiveRecordInjection.rb:161:21:161:26 | call to params | semmle.label | call to params | -| ActiveRecordInjection.rb:161:21:161:44 | ...[...] | semmle.label | ...[...] | -| ActiveRecordInjection.rb:161:21:161:44 | ...[...] | semmle.label | ...[...] | -| ActiveRecordInjection.rb:175:27:175:76 | "this is an unsafe annotation:..." | semmle.label | "this is an unsafe annotation:..." | -| ActiveRecordInjection.rb:175:59:175:64 | call to params | semmle.label | call to params | -| ActiveRecordInjection.rb:175:59:175:74 | ...[...] | semmle.label | ...[...] | -| ActiveRecordInjection.rb:186:5:186:13 | my_params | semmle.label | my_params | -| ActiveRecordInjection.rb:186:17:186:32 | call to permitted_params | semmle.label | call to permitted_params | -| ActiveRecordInjection.rb:187:5:187:9 | query | semmle.label | query | -| ActiveRecordInjection.rb:187:47:187:55 | my_params | semmle.label | my_params | -| ActiveRecordInjection.rb:187:47:187:65 | ...[...] | semmle.label | ...[...] | -| ActiveRecordInjection.rb:188:37:188:41 | query | semmle.label | query | -| ActiveRecordInjection.rb:193:5:193:10 | call to params | semmle.label | call to params | -| ActiveRecordInjection.rb:193:5:193:27 | call to require | semmle.label | call to require | -| ActiveRecordInjection.rb:193:5:193:59 | call to permit | semmle.label | call to permit | -| ActiveRecordInjection.rb:197:43:197:104 | "SELECT * FROM users WHERE id ..." | semmle.label | "SELECT * FROM users WHERE id ..." | -| ActiveRecordInjection.rb:197:77:197:92 | call to permitted_params | semmle.label | call to permitted_params | -| ActiveRecordInjection.rb:197:77:197:102 | ...[...] | semmle.label | ...[...] | -| ActiveRecordInjection.rb:198:35:198:96 | "SELECT * FROM users WHERE id ..." | semmle.label | "SELECT * FROM users WHERE id ..." | -| ActiveRecordInjection.rb:198:69:198:84 | call to permitted_params | semmle.label | call to permitted_params | -| ActiveRecordInjection.rb:198:69:198:94 | ...[...] | semmle.label | ...[...] | +| ActiveRecordInjection.rb:120:19:120:24 | call to params | semmle.label | call to params | +| ActiveRecordInjection.rb:120:19:120:30 | ...[...] | semmle.label | ...[...] | +| ActiveRecordInjection.rb:122:29:122:34 | call to params | semmle.label | call to params | +| ActiveRecordInjection.rb:122:29:122:39 | ...[...] | semmle.label | ...[...] | +| ActiveRecordInjection.rb:128:5:128:6 | ps | semmle.label | ps | +| ActiveRecordInjection.rb:128:10:128:15 | call to params | semmle.label | call to params | +| ActiveRecordInjection.rb:129:5:129:7 | uid | semmle.label | uid | +| ActiveRecordInjection.rb:129:11:129:12 | ps | semmle.label | ps | +| ActiveRecordInjection.rb:129:11:129:17 | ...[...] | semmle.label | ...[...] | +| ActiveRecordInjection.rb:130:5:130:9 | uidEq | semmle.label | uidEq | +| ActiveRecordInjection.rb:134:20:134:32 | ... + ... | semmle.label | ... + ... | +| ActiveRecordInjection.rb:134:20:134:32 | ... + ... [element] | semmle.label | ... + ... [element] | +| ActiveRecordInjection.rb:134:28:134:32 | uidEq | semmle.label | uidEq | +| ActiveRecordInjection.rb:167:21:167:26 | call to params | semmle.label | call to params | +| ActiveRecordInjection.rb:167:21:167:44 | ...[...] | semmle.label | ...[...] | +| ActiveRecordInjection.rb:167:21:167:44 | ...[...] | semmle.label | ...[...] | +| ActiveRecordInjection.rb:181:27:181:76 | "this is an unsafe annotation:..." | semmle.label | "this is an unsafe annotation:..." | +| ActiveRecordInjection.rb:181:59:181:64 | call to params | semmle.label | call to params | +| ActiveRecordInjection.rb:181:59:181:74 | ...[...] | semmle.label | ...[...] | +| ActiveRecordInjection.rb:192:5:192:13 | my_params | semmle.label | my_params | +| ActiveRecordInjection.rb:192:17:192:32 | call to permitted_params | semmle.label | call to permitted_params | +| ActiveRecordInjection.rb:193:5:193:9 | query | semmle.label | query | +| ActiveRecordInjection.rb:193:47:193:55 | my_params | semmle.label | my_params | +| ActiveRecordInjection.rb:193:47:193:65 | ...[...] | semmle.label | ...[...] | +| ActiveRecordInjection.rb:194:37:194:41 | query | semmle.label | query | +| ActiveRecordInjection.rb:199:5:199:10 | call to params | semmle.label | call to params | +| ActiveRecordInjection.rb:199:5:199:27 | call to require | semmle.label | call to require | +| ActiveRecordInjection.rb:199:5:199:59 | call to permit | semmle.label | call to permit | +| ActiveRecordInjection.rb:203:43:203:104 | "SELECT * FROM users WHERE id ..." | semmle.label | "SELECT * FROM users WHERE id ..." | +| ActiveRecordInjection.rb:203:77:203:92 | call to permitted_params | semmle.label | call to permitted_params | +| ActiveRecordInjection.rb:203:77:203:102 | ...[...] | semmle.label | ...[...] | +| ActiveRecordInjection.rb:204:35:204:96 | "SELECT * FROM users WHERE id ..." | semmle.label | "SELECT * FROM users WHERE id ..." | +| ActiveRecordInjection.rb:204:69:204:84 | call to permitted_params | semmle.label | call to permitted_params | +| ActiveRecordInjection.rb:204:69:204:94 | ...[...] | semmle.label | ...[...] | | ArelInjection.rb:4:5:4:8 | name | semmle.label | name | | ArelInjection.rb:4:12:4:17 | call to params | semmle.label | call to params | | ArelInjection.rb:4:12:4:29 | ...[...] | semmle.label | ...[...] | | ArelInjection.rb:6:20:6:61 | "SELECT * FROM users WHERE nam..." | semmle.label | "SELECT * FROM users WHERE nam..." | +| ArelInjection.rb:7:39:7:80 | "SELECT * FROM users WHERE nam..." | semmle.label | "SELECT * FROM users WHERE nam..." | | PgInjection.rb:6:5:6:8 | name | semmle.label | name | | PgInjection.rb:6:12:6:17 | call to params | semmle.label | call to params | | PgInjection.rb:6:12:6:24 | ...[...] | semmle.label | ...[...] | @@ -211,7 +223,7 @@ subpaths #select | ActiveRecordInjection.rb:10:33:10:67 | "name='#{...}' and pass='#{...}'" | ActiveRecordInjection.rb:70:23:70:28 | call to params | ActiveRecordInjection.rb:10:33:10:67 | "name='#{...}' and pass='#{...}'" | This SQL query depends on a $@. | ActiveRecordInjection.rb:70:23:70:28 | call to params | user-provided value | | ActiveRecordInjection.rb:10:33:10:67 | "name='#{...}' and pass='#{...}'" | ActiveRecordInjection.rb:70:38:70:43 | call to params | ActiveRecordInjection.rb:10:33:10:67 | "name='#{...}' and pass='#{...}'" | This SQL query depends on a $@. | ActiveRecordInjection.rb:70:38:70:43 | call to params | user-provided value | -| ActiveRecordInjection.rb:23:16:23:24 | condition | ActiveRecordInjection.rb:161:21:161:26 | call to params | ActiveRecordInjection.rb:23:16:23:24 | condition | This SQL query depends on a $@. | ActiveRecordInjection.rb:161:21:161:26 | call to params | user-provided value | +| ActiveRecordInjection.rb:23:16:23:24 | condition | ActiveRecordInjection.rb:167:21:167:26 | call to params | ActiveRecordInjection.rb:23:16:23:24 | condition | This SQL query depends on a $@. | ActiveRecordInjection.rb:167:21:167:26 | call to params | user-provided value | | ActiveRecordInjection.rb:35:30:35:44 | ...[...] | ActiveRecordInjection.rb:35:30:35:35 | call to params | ActiveRecordInjection.rb:35:30:35:44 | ...[...] | This SQL query depends on a $@. | ActiveRecordInjection.rb:35:30:35:35 | call to params | user-provided value | | ActiveRecordInjection.rb:39:18:39:32 | ...[...] | ActiveRecordInjection.rb:39:18:39:23 | call to params | ActiveRecordInjection.rb:39:18:39:32 | ...[...] | This SQL query depends on a $@. | ActiveRecordInjection.rb:39:18:39:23 | call to params | user-provided value | | ActiveRecordInjection.rb:43:20:43:42 | "id = '#{...}'" | ActiveRecordInjection.rb:43:29:43:34 | call to params | ActiveRecordInjection.rb:43:20:43:42 | "id = '#{...}'" | This SQL query depends on a $@. | ActiveRecordInjection.rb:43:29:43:34 | call to params | user-provided value | @@ -237,13 +249,16 @@ subpaths | ActiveRecordInjection.rb:113:21:113:35 | ...[...] | ActiveRecordInjection.rb:113:21:113:26 | call to params | ActiveRecordInjection.rb:113:21:113:35 | ...[...] | This SQL query depends on a $@. | ActiveRecordInjection.rb:113:21:113:26 | call to params | user-provided value | | ActiveRecordInjection.rb:114:20:114:34 | ...[...] | ActiveRecordInjection.rb:114:20:114:25 | call to params | ActiveRecordInjection.rb:114:20:114:34 | ...[...] | This SQL query depends on a $@. | ActiveRecordInjection.rb:114:20:114:25 | call to params | user-provided value | | ActiveRecordInjection.rb:116:23:116:47 | ...[...] | ActiveRecordInjection.rb:116:23:116:28 | call to params | ActiveRecordInjection.rb:116:23:116:47 | ...[...] | This SQL query depends on a $@. | ActiveRecordInjection.rb:116:23:116:28 | call to params | user-provided value | -| ActiveRecordInjection.rb:128:20:128:32 | ... + ... | ActiveRecordInjection.rb:122:10:122:15 | call to params | ActiveRecordInjection.rb:128:20:128:32 | ... + ... | This SQL query depends on a $@. | ActiveRecordInjection.rb:122:10:122:15 | call to params | user-provided value | -| ActiveRecordInjection.rb:161:21:161:44 | ...[...] | ActiveRecordInjection.rb:161:21:161:26 | call to params | ActiveRecordInjection.rb:161:21:161:44 | ...[...] | This SQL query depends on a $@. | ActiveRecordInjection.rb:161:21:161:26 | call to params | user-provided value | -| ActiveRecordInjection.rb:175:27:175:76 | "this is an unsafe annotation:..." | ActiveRecordInjection.rb:175:59:175:64 | call to params | ActiveRecordInjection.rb:175:27:175:76 | "this is an unsafe annotation:..." | This SQL query depends on a $@. | ActiveRecordInjection.rb:175:59:175:64 | call to params | user-provided value | -| ActiveRecordInjection.rb:188:37:188:41 | query | ActiveRecordInjection.rb:193:5:193:10 | call to params | ActiveRecordInjection.rb:188:37:188:41 | query | This SQL query depends on a $@. | ActiveRecordInjection.rb:193:5:193:10 | call to params | user-provided value | -| ActiveRecordInjection.rb:197:43:197:104 | "SELECT * FROM users WHERE id ..." | ActiveRecordInjection.rb:193:5:193:10 | call to params | ActiveRecordInjection.rb:197:43:197:104 | "SELECT * FROM users WHERE id ..." | This SQL query depends on a $@. | ActiveRecordInjection.rb:193:5:193:10 | call to params | user-provided value | -| ActiveRecordInjection.rb:198:35:198:96 | "SELECT * FROM users WHERE id ..." | ActiveRecordInjection.rb:193:5:193:10 | call to params | ActiveRecordInjection.rb:198:35:198:96 | "SELECT * FROM users WHERE id ..." | This SQL query depends on a $@. | ActiveRecordInjection.rb:193:5:193:10 | call to params | user-provided value | +| ActiveRecordInjection.rb:120:19:120:30 | ...[...] | ActiveRecordInjection.rb:120:19:120:24 | call to params | ActiveRecordInjection.rb:120:19:120:30 | ...[...] | This SQL query depends on a $@. | ActiveRecordInjection.rb:120:19:120:24 | call to params | user-provided value | +| ActiveRecordInjection.rb:122:29:122:39 | ...[...] | ActiveRecordInjection.rb:122:29:122:34 | call to params | ActiveRecordInjection.rb:122:29:122:39 | ...[...] | This SQL query depends on a $@. | ActiveRecordInjection.rb:122:29:122:34 | call to params | user-provided value | +| ActiveRecordInjection.rb:134:20:134:32 | ... + ... | ActiveRecordInjection.rb:128:10:128:15 | call to params | ActiveRecordInjection.rb:134:20:134:32 | ... + ... | This SQL query depends on a $@. | ActiveRecordInjection.rb:128:10:128:15 | call to params | user-provided value | +| ActiveRecordInjection.rb:167:21:167:44 | ...[...] | ActiveRecordInjection.rb:167:21:167:26 | call to params | ActiveRecordInjection.rb:167:21:167:44 | ...[...] | This SQL query depends on a $@. | ActiveRecordInjection.rb:167:21:167:26 | call to params | user-provided value | +| ActiveRecordInjection.rb:181:27:181:76 | "this is an unsafe annotation:..." | ActiveRecordInjection.rb:181:59:181:64 | call to params | ActiveRecordInjection.rb:181:27:181:76 | "this is an unsafe annotation:..." | This SQL query depends on a $@. | ActiveRecordInjection.rb:181:59:181:64 | call to params | user-provided value | +| ActiveRecordInjection.rb:194:37:194:41 | query | ActiveRecordInjection.rb:199:5:199:10 | call to params | ActiveRecordInjection.rb:194:37:194:41 | query | This SQL query depends on a $@. | ActiveRecordInjection.rb:199:5:199:10 | call to params | user-provided value | +| ActiveRecordInjection.rb:203:43:203:104 | "SELECT * FROM users WHERE id ..." | ActiveRecordInjection.rb:199:5:199:10 | call to params | ActiveRecordInjection.rb:203:43:203:104 | "SELECT * FROM users WHERE id ..." | This SQL query depends on a $@. | ActiveRecordInjection.rb:199:5:199:10 | call to params | user-provided value | +| ActiveRecordInjection.rb:204:35:204:96 | "SELECT * FROM users WHERE id ..." | ActiveRecordInjection.rb:199:5:199:10 | call to params | ActiveRecordInjection.rb:204:35:204:96 | "SELECT * FROM users WHERE id ..." | This SQL query depends on a $@. | ActiveRecordInjection.rb:199:5:199:10 | call to params | user-provided value | | ArelInjection.rb:6:20:6:61 | "SELECT * FROM users WHERE nam..." | ArelInjection.rb:4:12:4:17 | call to params | ArelInjection.rb:6:20:6:61 | "SELECT * FROM users WHERE nam..." | This SQL query depends on a $@. | ArelInjection.rb:4:12:4:17 | call to params | user-provided value | +| ArelInjection.rb:7:39:7:80 | "SELECT * FROM users WHERE nam..." | ArelInjection.rb:4:12:4:17 | call to params | ArelInjection.rb:7:39:7:80 | "SELECT * FROM users WHERE nam..." | This SQL query depends on a $@. | ArelInjection.rb:4:12:4:17 | call to params | user-provided value | | PgInjection.rb:14:15:14:18 | qry1 | PgInjection.rb:6:12:6:17 | call to params | PgInjection.rb:14:15:14:18 | qry1 | This SQL query depends on a $@. | PgInjection.rb:6:12:6:17 | call to params | user-provided value | | PgInjection.rb:15:21:15:24 | qry1 | PgInjection.rb:6:12:6:17 | call to params | PgInjection.rb:15:21:15:24 | qry1 | This SQL query depends on a $@. | PgInjection.rb:6:12:6:17 | call to params | user-provided value | | PgInjection.rb:20:22:20:25 | qry2 | PgInjection.rb:6:12:6:17 | call to params | PgInjection.rb:20:22:20:25 | qry2 | This SQL query depends on a $@. | PgInjection.rb:6:12:6:17 | call to params | user-provided value | diff --git a/ruby/ql/test/query-tests/security/cwe-094/UnsafeCodeConstruction/UnsafeCodeConstruction.expected b/ruby/ql/test/query-tests/security/cwe-094/UnsafeCodeConstruction/UnsafeCodeConstruction.expected index 8af3ed306de..4ff7b8aa338 100644 --- a/ruby/ql/test/query-tests/security/cwe-094/UnsafeCodeConstruction/UnsafeCodeConstruction.expected +++ b/ruby/ql/test/query-tests/security/cwe-094/UnsafeCodeConstruction/UnsafeCodeConstruction.expected @@ -5,7 +5,8 @@ edges | impl/unsafeCode.rb:28:17:28:22 | my_arr | impl/unsafeCode.rb:29:10:29:15 | my_arr | provenance | | | impl/unsafeCode.rb:32:21:32:21 | x | impl/unsafeCode.rb:33:12:33:12 | x | provenance | | | impl/unsafeCode.rb:33:5:33:7 | arr [element 0] | impl/unsafeCode.rb:34:10:34:12 | arr | provenance | | -| impl/unsafeCode.rb:33:12:33:12 | x | impl/unsafeCode.rb:33:5:33:7 | arr [element 0] | provenance | | +| impl/unsafeCode.rb:33:11:33:23 | call to [] [element 0] | impl/unsafeCode.rb:33:5:33:7 | arr [element 0] | provenance | | +| impl/unsafeCode.rb:33:12:33:12 | x | impl/unsafeCode.rb:33:11:33:23 | call to [] [element 0] | provenance | | | impl/unsafeCode.rb:37:15:37:15 | x | impl/unsafeCode.rb:39:14:39:14 | x | provenance | | | impl/unsafeCode.rb:39:5:39:7 | [post] arr [element] | impl/unsafeCode.rb:40:10:40:12 | arr | provenance | | | impl/unsafeCode.rb:39:5:39:7 | [post] arr [element] | impl/unsafeCode.rb:44:10:44:12 | arr | provenance | | @@ -18,9 +19,11 @@ edges | impl/unsafeCode.rb:60:11:60:18 | call to Array [element 0] | impl/unsafeCode.rb:60:5:60:7 | arr [element 0] | provenance | | | impl/unsafeCode.rb:60:17:60:17 | x | impl/unsafeCode.rb:60:11:60:18 | call to Array [element 0] | provenance | | | impl/unsafeCode.rb:63:5:63:8 | arr2 [element 0] | impl/unsafeCode.rb:64:10:64:13 | arr2 | provenance | | +| impl/unsafeCode.rb:63:12:63:43 | call to [] [element 0] | impl/unsafeCode.rb:63:5:63:8 | arr2 [element 0] | provenance | | | impl/unsafeCode.rb:63:13:63:32 | call to Array [element 1] | impl/unsafeCode.rb:63:13:63:42 | call to join | provenance | | -| impl/unsafeCode.rb:63:13:63:42 | call to join | impl/unsafeCode.rb:63:5:63:8 | arr2 [element 0] | provenance | | -| impl/unsafeCode.rb:63:30:63:30 | y | impl/unsafeCode.rb:63:13:63:32 | call to Array [element 1] | provenance | | +| impl/unsafeCode.rb:63:13:63:42 | call to join | impl/unsafeCode.rb:63:12:63:43 | call to [] [element 0] | provenance | | +| impl/unsafeCode.rb:63:19:63:31 | call to [] [element 1] | impl/unsafeCode.rb:63:13:63:32 | call to Array [element 1] | provenance | | +| impl/unsafeCode.rb:63:30:63:30 | y | impl/unsafeCode.rb:63:19:63:31 | call to [] [element 1] | provenance | | nodes | impl/unsafeCode.rb:2:12:2:17 | target | semmle.label | target | | impl/unsafeCode.rb:3:17:3:25 | #{...} | semmle.label | #{...} | @@ -32,6 +35,7 @@ nodes | impl/unsafeCode.rb:29:10:29:15 | my_arr | semmle.label | my_arr | | impl/unsafeCode.rb:32:21:32:21 | x | semmle.label | x | | impl/unsafeCode.rb:33:5:33:7 | arr [element 0] | semmle.label | arr [element 0] | +| impl/unsafeCode.rb:33:11:33:23 | call to [] [element 0] | semmle.label | call to [] [element 0] | | impl/unsafeCode.rb:33:12:33:12 | x | semmle.label | x | | impl/unsafeCode.rb:34:10:34:12 | arr | semmle.label | arr | | impl/unsafeCode.rb:37:15:37:15 | x | semmle.label | x | @@ -50,8 +54,10 @@ nodes | impl/unsafeCode.rb:60:17:60:17 | x | semmle.label | x | | impl/unsafeCode.rb:61:10:61:12 | arr | semmle.label | arr | | impl/unsafeCode.rb:63:5:63:8 | arr2 [element 0] | semmle.label | arr2 [element 0] | +| impl/unsafeCode.rb:63:12:63:43 | call to [] [element 0] | semmle.label | call to [] [element 0] | | impl/unsafeCode.rb:63:13:63:32 | call to Array [element 1] | semmle.label | call to Array [element 1] | | impl/unsafeCode.rb:63:13:63:42 | call to join | semmle.label | call to join | +| impl/unsafeCode.rb:63:19:63:31 | call to [] [element 1] | semmle.label | call to [] [element 1] | | impl/unsafeCode.rb:63:30:63:30 | y | semmle.label | y | | impl/unsafeCode.rb:64:10:64:13 | arr2 | semmle.label | arr2 | subpaths diff --git a/ruby/ql/test/query-tests/security/cwe-312/CleartextLogging.expected b/ruby/ql/test/query-tests/security/cwe-312/CleartextLogging.expected index cb29945fbee..bf95f464117 100644 --- a/ruby/ql/test/query-tests/security/cwe-312/CleartextLogging.expected +++ b/ruby/ql/test/query-tests/security/cwe-312/CleartextLogging.expected @@ -12,7 +12,8 @@ edges | logging.rb:3:1:3:8 | password | logging.rb:28:26:28:33 | password | provenance | | | logging.rb:3:12:3:45 | "043697b96909e03ca907599d6420555f" | logging.rb:3:1:3:8 | password | provenance | | | logging.rb:30:1:30:4 | hsh1 [element :password] | logging.rb:38:20:38:23 | hsh1 [element :password] | provenance | | -| logging.rb:30:20:30:53 | "aec5058e61f7f122998b1a30ee2c66b6" | logging.rb:30:1:30:4 | hsh1 [element :password] | provenance | | +| logging.rb:30:8:30:55 | call to [] [element :password] | logging.rb:30:1:30:4 | hsh1 [element :password] | provenance | | +| logging.rb:30:20:30:53 | "aec5058e61f7f122998b1a30ee2c66b6" | logging.rb:30:8:30:55 | call to [] [element :password] | provenance | | | logging.rb:34:1:34:4 | [post] hsh2 [element :password] | logging.rb:35:1:35:4 | hsh3 [element :password] | provenance | | | logging.rb:34:1:34:4 | [post] hsh2 [element :password] | logging.rb:40:20:40:23 | hsh2 [element :password] | provenance | | | logging.rb:34:19:34:52 | "beeda625d7306b45784d91ea0336e201" | logging.rb:34:1:34:4 | [post] hsh2 [element :password] | provenance | | @@ -53,6 +54,7 @@ nodes | logging.rb:26:18:26:34 | "pw: #{...}" | semmle.label | "pw: #{...}" | | logging.rb:28:26:28:33 | password | semmle.label | password | | logging.rb:30:1:30:4 | hsh1 [element :password] | semmle.label | hsh1 [element :password] | +| logging.rb:30:8:30:55 | call to [] [element :password] | semmle.label | call to [] [element :password] | | logging.rb:30:20:30:53 | "aec5058e61f7f122998b1a30ee2c66b6" | semmle.label | "aec5058e61f7f122998b1a30ee2c66b6" | | logging.rb:34:1:34:4 | [post] hsh2 [element :password] | semmle.label | [post] hsh2 [element :password] | | logging.rb:34:19:34:52 | "beeda625d7306b45784d91ea0336e201" | semmle.label | "beeda625d7306b45784d91ea0336e201" | diff --git a/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/PlistUnsafeDeserialization.rb b/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/PlistUnsafeDeserialization.rb deleted file mode 100644 index 63f64b5cd22..00000000000 --- a/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/PlistUnsafeDeserialization.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'yaml' -class UsersController < ActionController::Base - def example - # not safe - result = Plist.parse_xml(params[:yaml_string]) - result = Plist.parse_xml(params[:yaml_string], marshal: true) - - # safe - result = Plist.parse_xml(params[:yaml_string], marshal: false) - end -end - - diff --git a/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/UnsafeDeserialization.expected b/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/UnsafeDeserialization.expected index bf0376f3959..71e206901b9 100644 --- a/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/UnsafeDeserialization.expected +++ b/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/UnsafeDeserialization.expected @@ -1,6 +1,4 @@ edges -| PlistUnsafeDeserialization.rb:5:30:5:35 | call to params | PlistUnsafeDeserialization.rb:5:30:5:49 | ...[...] | provenance | | -| PlistUnsafeDeserialization.rb:6:30:6:35 | call to params | PlistUnsafeDeserialization.rb:6:30:6:49 | ...[...] | provenance | | | UnsafeDeserialization.rb:11:5:11:19 | serialized_data | UnsafeDeserialization.rb:12:27:12:41 | serialized_data | provenance | | | UnsafeDeserialization.rb:11:23:11:50 | call to decode64 | UnsafeDeserialization.rb:11:5:11:19 | serialized_data | provenance | | | UnsafeDeserialization.rb:11:39:11:44 | call to params | UnsafeDeserialization.rb:11:39:11:50 | ...[...] | provenance | | @@ -40,21 +38,22 @@ edges | UnsafeDeserialization.rb:115:5:115:13 | yaml_data | UnsafeDeserialization.rb:116:25:116:33 | yaml_data | provenance | | | UnsafeDeserialization.rb:115:17:115:22 | call to params | UnsafeDeserialization.rb:115:17:115:28 | ...[...] | provenance | | | UnsafeDeserialization.rb:115:17:115:28 | ...[...] | UnsafeDeserialization.rb:115:5:115:13 | yaml_data | provenance | | -| YAMLUnsafeDeserialization.rb:5:16:5:21 | call to params | YAMLUnsafeDeserialization.rb:5:16:5:35 | ...[...] | provenance | | -| YAMLUnsafeDeserialization.rb:11:23:11:28 | call to params | YAMLUnsafeDeserialization.rb:11:23:11:42 | ...[...] | provenance | | -| YAMLUnsafeDeserialization.rb:12:28:12:33 | call to params | YAMLUnsafeDeserialization.rb:12:28:12:45 | ...[...] | provenance | | -| YAMLUnsafeDeserialization.rb:13:23:13:28 | call to params | YAMLUnsafeDeserialization.rb:13:23:13:42 | ...[...] | provenance | | -| YAMLUnsafeDeserialization.rb:14:39:14:44 | call to params | YAMLUnsafeDeserialization.rb:14:39:14:58 | ...[...] | provenance | | -| YAMLUnsafeDeserialization.rb:14:39:14:58 | ...[...] | YAMLUnsafeDeserialization.rb:15:5:15:24 | call to to_ruby | provenance | | -| YAMLUnsafeDeserialization.rb:16:17:16:22 | call to params | YAMLUnsafeDeserialization.rb:16:17:16:36 | ...[...] | provenance | | -| YAMLUnsafeDeserialization.rb:16:17:16:36 | ...[...] | YAMLUnsafeDeserialization.rb:16:5:16:45 | call to to_ruby | provenance | | -| YAMLUnsafeDeserialization.rb:17:22:17:27 | call to params | YAMLUnsafeDeserialization.rb:17:22:17:39 | ...[...] | provenance | | -| YAMLUnsafeDeserialization.rb:17:22:17:39 | ...[...] | YAMLUnsafeDeserialization.rb:17:5:17:48 | call to to_ruby | provenance | | +| UnsafeDeserialization.rb:122:5:122:13 | yaml_data | UnsafeDeserialization.rb:123:25:123:33 | yaml_data | provenance | | +| UnsafeDeserialization.rb:122:17:122:22 | call to params | UnsafeDeserialization.rb:122:17:122:28 | ...[...] | provenance | | +| UnsafeDeserialization.rb:122:17:122:28 | ...[...] | UnsafeDeserialization.rb:122:5:122:13 | yaml_data | provenance | | +| UnsafeDeserialization.rb:137:5:137:13 | yaml_data | UnsafeDeserialization.rb:138:32:138:40 | yaml_data | provenance | | +| UnsafeDeserialization.rb:137:5:137:13 | yaml_data | UnsafeDeserialization.rb:139:37:139:45 | yaml_data | provenance | | +| UnsafeDeserialization.rb:137:5:137:13 | yaml_data | UnsafeDeserialization.rb:140:32:140:40 | yaml_data | provenance | | +| UnsafeDeserialization.rb:137:5:137:13 | yaml_data | UnsafeDeserialization.rb:142:14:142:33 | call to to_ruby | provenance | | +| UnsafeDeserialization.rb:137:5:137:13 | yaml_data | UnsafeDeserialization.rb:143:14:143:43 | call to to_ruby | provenance | | +| UnsafeDeserialization.rb:137:5:137:13 | yaml_data | UnsafeDeserialization.rb:144:14:144:48 | call to to_ruby | provenance | | +| UnsafeDeserialization.rb:137:17:137:22 | call to params | UnsafeDeserialization.rb:137:17:137:28 | ...[...] | provenance | | +| UnsafeDeserialization.rb:137:17:137:28 | ...[...] | UnsafeDeserialization.rb:137:5:137:13 | yaml_data | provenance | | +| UnsafeDeserialization.rb:149:5:149:14 | plist_data | UnsafeDeserialization.rb:150:30:150:39 | plist_data | provenance | | +| UnsafeDeserialization.rb:149:5:149:14 | plist_data | UnsafeDeserialization.rb:151:30:151:39 | plist_data | provenance | | +| UnsafeDeserialization.rb:149:18:149:23 | call to params | UnsafeDeserialization.rb:149:18:149:29 | ...[...] | provenance | | +| UnsafeDeserialization.rb:149:18:149:29 | ...[...] | UnsafeDeserialization.rb:149:5:149:14 | plist_data | provenance | | nodes -| PlistUnsafeDeserialization.rb:5:30:5:35 | call to params | semmle.label | call to params | -| PlistUnsafeDeserialization.rb:5:30:5:49 | ...[...] | semmle.label | ...[...] | -| PlistUnsafeDeserialization.rb:6:30:6:35 | call to params | semmle.label | call to params | -| PlistUnsafeDeserialization.rb:6:30:6:49 | ...[...] | semmle.label | ...[...] | | UnsafeDeserialization.rb:11:5:11:19 | serialized_data | semmle.label | serialized_data | | UnsafeDeserialization.rb:11:23:11:50 | call to decode64 | semmle.label | call to decode64 | | UnsafeDeserialization.rb:11:39:11:44 | call to params | semmle.label | call to params | @@ -106,32 +105,31 @@ nodes | UnsafeDeserialization.rb:115:17:115:22 | call to params | semmle.label | call to params | | UnsafeDeserialization.rb:115:17:115:28 | ...[...] | semmle.label | ...[...] | | UnsafeDeserialization.rb:116:25:116:33 | yaml_data | semmle.label | yaml_data | -| UnsafeDeserialization.rb:120:24:120:34 | call to read | semmle.label | call to read | -| UnsafeDeserialization.rb:123:24:123:33 | call to gets | semmle.label | call to gets | -| UnsafeDeserialization.rb:126:24:126:32 | call to read | semmle.label | call to read | -| UnsafeDeserialization.rb:129:24:129:27 | call to gets | semmle.label | call to gets | -| UnsafeDeserialization.rb:132:24:132:32 | call to readlines | semmle.label | call to readlines | -| YAMLUnsafeDeserialization.rb:5:16:5:21 | call to params | semmle.label | call to params | -| YAMLUnsafeDeserialization.rb:5:16:5:35 | ...[...] | semmle.label | ...[...] | -| YAMLUnsafeDeserialization.rb:11:23:11:28 | call to params | semmle.label | call to params | -| YAMLUnsafeDeserialization.rb:11:23:11:42 | ...[...] | semmle.label | ...[...] | -| YAMLUnsafeDeserialization.rb:12:28:12:33 | call to params | semmle.label | call to params | -| YAMLUnsafeDeserialization.rb:12:28:12:45 | ...[...] | semmle.label | ...[...] | -| YAMLUnsafeDeserialization.rb:13:23:13:28 | call to params | semmle.label | call to params | -| YAMLUnsafeDeserialization.rb:13:23:13:42 | ...[...] | semmle.label | ...[...] | -| YAMLUnsafeDeserialization.rb:14:39:14:44 | call to params | semmle.label | call to params | -| YAMLUnsafeDeserialization.rb:14:39:14:58 | ...[...] | semmle.label | ...[...] | -| YAMLUnsafeDeserialization.rb:15:5:15:24 | call to to_ruby | semmle.label | call to to_ruby | -| YAMLUnsafeDeserialization.rb:16:5:16:45 | call to to_ruby | semmle.label | call to to_ruby | -| YAMLUnsafeDeserialization.rb:16:17:16:22 | call to params | semmle.label | call to params | -| YAMLUnsafeDeserialization.rb:16:17:16:36 | ...[...] | semmle.label | ...[...] | -| YAMLUnsafeDeserialization.rb:17:5:17:48 | call to to_ruby | semmle.label | call to to_ruby | -| YAMLUnsafeDeserialization.rb:17:22:17:27 | call to params | semmle.label | call to params | -| YAMLUnsafeDeserialization.rb:17:22:17:39 | ...[...] | semmle.label | ...[...] | +| UnsafeDeserialization.rb:122:5:122:13 | yaml_data | semmle.label | yaml_data | +| UnsafeDeserialization.rb:122:17:122:22 | call to params | semmle.label | call to params | +| UnsafeDeserialization.rb:122:17:122:28 | ...[...] | semmle.label | ...[...] | +| UnsafeDeserialization.rb:123:25:123:33 | yaml_data | semmle.label | yaml_data | +| UnsafeDeserialization.rb:137:5:137:13 | yaml_data | semmle.label | yaml_data | +| UnsafeDeserialization.rb:137:17:137:22 | call to params | semmle.label | call to params | +| UnsafeDeserialization.rb:137:17:137:28 | ...[...] | semmle.label | ...[...] | +| UnsafeDeserialization.rb:138:32:138:40 | yaml_data | semmle.label | yaml_data | +| UnsafeDeserialization.rb:139:37:139:45 | yaml_data | semmle.label | yaml_data | +| UnsafeDeserialization.rb:140:32:140:40 | yaml_data | semmle.label | yaml_data | +| UnsafeDeserialization.rb:142:14:142:33 | call to to_ruby | semmle.label | call to to_ruby | +| UnsafeDeserialization.rb:143:14:143:43 | call to to_ruby | semmle.label | call to to_ruby | +| UnsafeDeserialization.rb:144:14:144:48 | call to to_ruby | semmle.label | call to to_ruby | +| UnsafeDeserialization.rb:149:5:149:14 | plist_data | semmle.label | plist_data | +| UnsafeDeserialization.rb:149:18:149:23 | call to params | semmle.label | call to params | +| UnsafeDeserialization.rb:149:18:149:29 | ...[...] | semmle.label | ...[...] | +| UnsafeDeserialization.rb:150:30:150:39 | plist_data | semmle.label | plist_data | +| UnsafeDeserialization.rb:151:30:151:39 | plist_data | semmle.label | plist_data | +| UnsafeDeserialization.rb:161:24:161:34 | call to read | semmle.label | call to read | +| UnsafeDeserialization.rb:164:24:164:33 | call to gets | semmle.label | call to gets | +| UnsafeDeserialization.rb:167:24:167:32 | call to read | semmle.label | call to read | +| UnsafeDeserialization.rb:170:24:170:27 | call to gets | semmle.label | call to gets | +| UnsafeDeserialization.rb:173:24:173:32 | call to readlines | semmle.label | call to readlines | subpaths #select -| PlistUnsafeDeserialization.rb:5:30:5:49 | ...[...] | PlistUnsafeDeserialization.rb:5:30:5:35 | call to params | PlistUnsafeDeserialization.rb:5:30:5:49 | ...[...] | Unsafe deserialization depends on a $@. | PlistUnsafeDeserialization.rb:5:30:5:35 | call to params | user-provided value | -| PlistUnsafeDeserialization.rb:6:30:6:49 | ...[...] | PlistUnsafeDeserialization.rb:6:30:6:35 | call to params | PlistUnsafeDeserialization.rb:6:30:6:49 | ...[...] | Unsafe deserialization depends on a $@. | PlistUnsafeDeserialization.rb:6:30:6:35 | call to params | user-provided value | | UnsafeDeserialization.rb:12:27:12:41 | serialized_data | UnsafeDeserialization.rb:11:39:11:44 | call to params | UnsafeDeserialization.rb:12:27:12:41 | serialized_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:11:39:11:44 | call to params | user-provided value | | UnsafeDeserialization.rb:18:30:18:44 | serialized_data | UnsafeDeserialization.rb:17:39:17:44 | call to params | UnsafeDeserialization.rb:18:30:18:44 | serialized_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:17:39:17:44 | call to params | user-provided value | | UnsafeDeserialization.rb:24:24:24:32 | json_data | UnsafeDeserialization.rb:23:17:23:22 | call to params | UnsafeDeserialization.rb:24:24:24:32 | json_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:23:17:23:22 | call to params | user-provided value | @@ -145,15 +143,17 @@ subpaths | UnsafeDeserialization.rb:94:22:94:29 | xml_data | UnsafeDeserialization.rb:93:16:93:21 | call to params | UnsafeDeserialization.rb:94:22:94:29 | xml_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:93:16:93:21 | call to params | user-provided value | | UnsafeDeserialization.rb:110:34:110:36 | xml | UnsafeDeserialization.rb:109:11:109:16 | call to params | UnsafeDeserialization.rb:110:34:110:36 | xml | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:109:11:109:16 | call to params | user-provided value | | UnsafeDeserialization.rb:116:25:116:33 | yaml_data | UnsafeDeserialization.rb:115:17:115:22 | call to params | UnsafeDeserialization.rb:116:25:116:33 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:115:17:115:22 | call to params | user-provided value | -| UnsafeDeserialization.rb:120:24:120:34 | call to read | UnsafeDeserialization.rb:120:24:120:34 | call to read | UnsafeDeserialization.rb:120:24:120:34 | call to read | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:120:24:120:34 | call to read | value from stdin | -| UnsafeDeserialization.rb:123:24:123:33 | call to gets | UnsafeDeserialization.rb:123:24:123:33 | call to gets | UnsafeDeserialization.rb:123:24:123:33 | call to gets | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:123:24:123:33 | call to gets | value from stdin | -| UnsafeDeserialization.rb:126:24:126:32 | call to read | UnsafeDeserialization.rb:126:24:126:32 | call to read | UnsafeDeserialization.rb:126:24:126:32 | call to read | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:126:24:126:32 | call to read | value from stdin | -| UnsafeDeserialization.rb:129:24:129:27 | call to gets | UnsafeDeserialization.rb:129:24:129:27 | call to gets | UnsafeDeserialization.rb:129:24:129:27 | call to gets | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:129:24:129:27 | call to gets | value from stdin | -| UnsafeDeserialization.rb:132:24:132:32 | call to readlines | UnsafeDeserialization.rb:132:24:132:32 | call to readlines | UnsafeDeserialization.rb:132:24:132:32 | call to readlines | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:132:24:132:32 | call to readlines | value from stdin | -| YAMLUnsafeDeserialization.rb:5:16:5:35 | ...[...] | YAMLUnsafeDeserialization.rb:5:16:5:21 | call to params | YAMLUnsafeDeserialization.rb:5:16:5:35 | ...[...] | Unsafe deserialization depends on a $@. | YAMLUnsafeDeserialization.rb:5:16:5:21 | call to params | user-provided value | -| YAMLUnsafeDeserialization.rb:11:23:11:42 | ...[...] | YAMLUnsafeDeserialization.rb:11:23:11:28 | call to params | YAMLUnsafeDeserialization.rb:11:23:11:42 | ...[...] | Unsafe deserialization depends on a $@. | YAMLUnsafeDeserialization.rb:11:23:11:28 | call to params | user-provided value | -| YAMLUnsafeDeserialization.rb:12:28:12:45 | ...[...] | YAMLUnsafeDeserialization.rb:12:28:12:33 | call to params | YAMLUnsafeDeserialization.rb:12:28:12:45 | ...[...] | Unsafe deserialization depends on a $@. | YAMLUnsafeDeserialization.rb:12:28:12:33 | call to params | user-provided value | -| YAMLUnsafeDeserialization.rb:13:23:13:42 | ...[...] | YAMLUnsafeDeserialization.rb:13:23:13:28 | call to params | YAMLUnsafeDeserialization.rb:13:23:13:42 | ...[...] | Unsafe deserialization depends on a $@. | YAMLUnsafeDeserialization.rb:13:23:13:28 | call to params | user-provided value | -| YAMLUnsafeDeserialization.rb:15:5:15:24 | call to to_ruby | YAMLUnsafeDeserialization.rb:14:39:14:44 | call to params | YAMLUnsafeDeserialization.rb:15:5:15:24 | call to to_ruby | Unsafe deserialization depends on a $@. | YAMLUnsafeDeserialization.rb:14:39:14:44 | call to params | user-provided value | -| YAMLUnsafeDeserialization.rb:16:5:16:45 | call to to_ruby | YAMLUnsafeDeserialization.rb:16:17:16:22 | call to params | YAMLUnsafeDeserialization.rb:16:5:16:45 | call to to_ruby | Unsafe deserialization depends on a $@. | YAMLUnsafeDeserialization.rb:16:17:16:22 | call to params | user-provided value | -| YAMLUnsafeDeserialization.rb:17:5:17:48 | call to to_ruby | YAMLUnsafeDeserialization.rb:17:22:17:27 | call to params | YAMLUnsafeDeserialization.rb:17:5:17:48 | call to to_ruby | Unsafe deserialization depends on a $@. | YAMLUnsafeDeserialization.rb:17:22:17:27 | call to params | user-provided value | +| UnsafeDeserialization.rb:123:25:123:33 | yaml_data | UnsafeDeserialization.rb:122:17:122:22 | call to params | UnsafeDeserialization.rb:123:25:123:33 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:122:17:122:22 | call to params | user-provided value | +| UnsafeDeserialization.rb:138:32:138:40 | yaml_data | UnsafeDeserialization.rb:137:17:137:22 | call to params | UnsafeDeserialization.rb:138:32:138:40 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:137:17:137:22 | call to params | user-provided value | +| UnsafeDeserialization.rb:139:37:139:45 | yaml_data | UnsafeDeserialization.rb:137:17:137:22 | call to params | UnsafeDeserialization.rb:139:37:139:45 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:137:17:137:22 | call to params | user-provided value | +| UnsafeDeserialization.rb:140:32:140:40 | yaml_data | UnsafeDeserialization.rb:137:17:137:22 | call to params | UnsafeDeserialization.rb:140:32:140:40 | yaml_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:137:17:137:22 | call to params | user-provided value | +| UnsafeDeserialization.rb:142:14:142:33 | call to to_ruby | UnsafeDeserialization.rb:137:17:137:22 | call to params | UnsafeDeserialization.rb:142:14:142:33 | call to to_ruby | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:137:17:137:22 | call to params | user-provided value | +| UnsafeDeserialization.rb:143:14:143:43 | call to to_ruby | UnsafeDeserialization.rb:137:17:137:22 | call to params | UnsafeDeserialization.rb:143:14:143:43 | call to to_ruby | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:137:17:137:22 | call to params | user-provided value | +| UnsafeDeserialization.rb:144:14:144:48 | call to to_ruby | UnsafeDeserialization.rb:137:17:137:22 | call to params | UnsafeDeserialization.rb:144:14:144:48 | call to to_ruby | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:137:17:137:22 | call to params | user-provided value | +| UnsafeDeserialization.rb:150:30:150:39 | plist_data | UnsafeDeserialization.rb:149:18:149:23 | call to params | UnsafeDeserialization.rb:150:30:150:39 | plist_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:149:18:149:23 | call to params | user-provided value | +| UnsafeDeserialization.rb:151:30:151:39 | plist_data | UnsafeDeserialization.rb:149:18:149:23 | call to params | UnsafeDeserialization.rb:151:30:151:39 | plist_data | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:149:18:149:23 | call to params | user-provided value | +| UnsafeDeserialization.rb:161:24:161:34 | call to read | UnsafeDeserialization.rb:161:24:161:34 | call to read | UnsafeDeserialization.rb:161:24:161:34 | call to read | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:161:24:161:34 | call to read | value from stdin | +| UnsafeDeserialization.rb:164:24:164:33 | call to gets | UnsafeDeserialization.rb:164:24:164:33 | call to gets | UnsafeDeserialization.rb:164:24:164:33 | call to gets | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:164:24:164:33 | call to gets | value from stdin | +| UnsafeDeserialization.rb:167:24:167:32 | call to read | UnsafeDeserialization.rb:167:24:167:32 | call to read | UnsafeDeserialization.rb:167:24:167:32 | call to read | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:167:24:167:32 | call to read | value from stdin | +| UnsafeDeserialization.rb:170:24:170:27 | call to gets | UnsafeDeserialization.rb:170:24:170:27 | call to gets | UnsafeDeserialization.rb:170:24:170:27 | call to gets | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:170:24:170:27 | call to gets | value from stdin | +| UnsafeDeserialization.rb:173:24:173:32 | call to readlines | UnsafeDeserialization.rb:173:24:173:32 | call to readlines | UnsafeDeserialization.rb:173:24:173:32 | call to readlines | Unsafe deserialization depends on a $@. | UnsafeDeserialization.rb:173:24:173:32 | call to readlines | value from stdin | diff --git a/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/UnsafeDeserialization.rb b/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/UnsafeDeserialization.rb index ed89f3e566c..633a99c14fb 100644 --- a/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/UnsafeDeserialization.rb +++ b/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/UnsafeDeserialization.rb @@ -110,10 +110,51 @@ class UsersController < ActionController::Base hash = Hash.from_trusted_xml(xml) end - # BAD + # BAD before psych version 4.0.0 def route15 yaml_data = params[:key] object = Psych.load yaml_data + object = Psych.load_file yaml_data + end + + # GOOD In psych version 4.0.0 and above + def route16 + yaml_data = params[:key] + object = Psych.load yaml_data + object = Psych.load_file yaml_data + end + + # GOOD + def route17 + yaml_data = params[:key] + object = Psych.parse_stream(yaml_data) + object = Psych.parse(yaml_data) + object = Psych.parse_file(yaml_data) + end + + # BAD + def route18 + yaml_data = params[:key] + object = Psych.unsafe_load(yaml_data) + object = Psych.unsafe_load_file(yaml_data) + object = Psych.load_stream(yaml_data) + parse_output = Psych.parse_stream(yaml_data) + object = parse_output.to_ruby + object = Psych.parse(yaml_data).to_ruby + object = Psych.parse_file(yaml_data).to_ruby + end + + # BAD + def route19 + plist_data = params[:key] + result = Plist.parse_xml(plist_data) + result = Plist.parse_xml(plist_data, marshal: true) + end + + # GOOD + def route20 + plist_data = params[:key] + result = Plist.parse_xml(plist_data, marshal: false) end def stdin @@ -131,4 +172,4 @@ class UsersController < ActionController::Base # Kernel.readlines object = YAML.load readlines end -end +end \ No newline at end of file diff --git a/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/YAMLUnsafeDeserialization.rb b/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/YAMLUnsafeDeserialization.rb deleted file mode 100644 index 6e836a0a049..00000000000 --- a/ruby/ql/test/query-tests/security/cwe-502/unsafe-deserialization/YAMLUnsafeDeserialization.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'yaml' -class UsersController < ActionController::Base - def example - # safe - Psych.load(params[:yaml_string]) - Psych.load_file(params[:yaml_file]) - Psych.parse_stream(params[:yaml_string]) - Psych.parse(params[:yaml_string]) - Psych.parse_file(params[:yaml_file]) - # unsafe - Psych.unsafe_load(params[:yaml_string]) - Psych.unsafe_load_file(params[:yaml_file]) - Psych.load_stream(params[:yaml_string]) - parse_output = Psych.parse_stream(params[:yaml_string]) - parse_output.to_ruby - Psych.parse(params[:yaml_string]).to_ruby - Psych.parse_file(params[:yaml_file]).to_ruby - - end -end - - diff --git a/ruby/ql/test/query-tests/security/cwe-506/HardcodedDataInterpretedAsCode.expected b/ruby/ql/test/query-tests/security/cwe-506/HardcodedDataInterpretedAsCode.expected index 84a46276371..e556d12096d 100644 --- a/ruby/ql/test/query-tests/security/cwe-506/HardcodedDataInterpretedAsCode.expected +++ b/ruby/ql/test/query-tests/security/cwe-506/HardcodedDataInterpretedAsCode.expected @@ -1,6 +1,7 @@ edges | tst.rb:1:7:1:7 | r | tst.rb:2:4:2:4 | r | provenance | | -| tst.rb:2:4:2:4 | r | tst.rb:2:3:2:15 | call to pack | provenance | | +| tst.rb:2:3:2:5 | call to [] [element 0] | tst.rb:2:3:2:15 | call to pack | provenance | | +| tst.rb:2:4:2:4 | r | tst.rb:2:3:2:5 | call to [] [element 0] | provenance | | | tst.rb:5:1:5:23 | totally_harmless_string | tst.rb:7:8:7:30 | totally_harmless_string | provenance | | | tst.rb:5:27:5:72 | "707574732822636f646520696e6a6..." | tst.rb:5:1:5:23 | totally_harmless_string | provenance | | | tst.rb:7:8:7:30 | totally_harmless_string | tst.rb:1:7:1:7 | r | provenance | | @@ -12,6 +13,7 @@ edges | tst.rb:17:6:17:32 | another_questionable_string | tst.rb:17:6:17:38 | call to strip | provenance | | nodes | tst.rb:1:7:1:7 | r | semmle.label | r | +| tst.rb:2:3:2:5 | call to [] [element 0] | semmle.label | call to [] [element 0] | | tst.rb:2:3:2:15 | call to pack | semmle.label | call to pack | | tst.rb:2:4:2:4 | r | semmle.label | r | | tst.rb:5:1:5:23 | totally_harmless_string | semmle.label | totally_harmless_string | diff --git a/ruby/tools/BUILD.bazel b/ruby/tools/BUILD.bazel new file mode 100644 index 00000000000..4ec50830a43 --- /dev/null +++ b/ruby/tools/BUILD.bazel @@ -0,0 +1,11 @@ +load("@semmle_code//:dist.bzl", "pack_zip") + +pack_zip( + name = "tools", + srcs = glob(["**/*"]), + excludes = [ + "BUILD.bazel", + ], + prefix = "tools", + visibility = ["//visibility:public"], +) diff --git a/shared/controlflow/codeql/controlflow/Cfg.qll b/shared/controlflow/codeql/controlflow/Cfg.qll index 682240972dc..e7e033f9ae2 100644 --- a/shared/controlflow/codeql/controlflow/Cfg.qll +++ b/shared/controlflow/codeql/controlflow/Cfg.qll @@ -4,6 +4,7 @@ */ private import codeql.util.Location +private import codeql.util.FileSystem /** Provides the language-specific input specification. */ signature module InputSig { @@ -1132,19 +1133,19 @@ module Make Input> { final class AstCfgNode = AstCfgNodeImpl; + /** A node to be included in the output of `TestOutput`. */ + signature class RelevantNodeSig extends Node { + /** + * Gets a string used to resolve ties in node and edge ordering. + */ + string getOrderDisambiguation(); + } + /** * Import this module into a `.ql` file of `@kind graph` to render a CFG. The * graph is restricted to nodes from `RelevantNode`. */ - module TestOutput { - /** A CFG node to include in the output. */ - abstract class RelevantNode extends Node { - /** - * Gets a string used to resolve ties in node and edge ordering. - */ - string getOrderDisambiguation() { result = "" } - } - + module TestOutput { /** Holds if `n` is a relevant node in the CFG. */ query predicate nodes(RelevantNode n, string attr, string val) { attr = "semmle.order" and @@ -1192,6 +1193,78 @@ module Make Input> { } } + /** Provides the input to `ViewCfgQuery`. */ + signature module ViewCfgQueryInputSig { + /** The source file selected in the IDE. Should be an `external` predicate. */ + string selectedSourceFile(); + + /** The source line selected in the IDE. Should be an `external` predicate. */ + int selectedSourceLine(); + + /** The source column selected in the IDE. Should be an `external` predicate. */ + int selectedSourceColumn(); + + /** + * Holds if CFG scope `scope` spans column `startColumn` of line `startLine` to + * column `endColumn` of line `endLine` in `file`. + */ + predicate cfgScopeSpan( + CfgScope scope, File file, int startLine, int startColumn, int endLine, int endColumn + ); + } + + /** + * Provides an implementation for a `View CFG` query. + * + * Import this module into a `.ql` that looks like + * + * ```ql + * @name Print CFG + * @description Produces a representation of a file's Control Flow Graph. + * This query is used by the VS Code extension. + * @id /print-cfg + * @kind graph + * @tags ide-contextual-queries/print-cfg + * ``` + */ + module ViewCfgQuery ViewCfgQueryInput> { + private import ViewCfgQueryInput + + bindingset[file, line, column] + private CfgScope smallestEnclosingScope(File file, int line, int column) { + result = + min(CfgScope scope, int startLine, int startColumn, int endLine, int endColumn | + cfgScopeSpan(scope, file, startLine, startColumn, endLine, endColumn) and + ( + startLine < line + or + startLine = line and startColumn <= column + ) and + ( + endLine > line + or + endLine = line and endColumn >= column + ) + | + scope order by startLine desc, startColumn desc, endLine, endColumn + ) + } + + private import IdeContextual + + private class RelevantNode extends Node { + RelevantNode() { + this.getScope() = + smallestEnclosingScope(getFileBySourceArchiveName(selectedSourceFile()), + selectedSourceLine(), selectedSourceColumn()) + } + + string getOrderDisambiguation() { result = "" } + } + + import TestOutput + } + /** Provides a set of consistency queries. */ module Consistency { /** Holds if `s1` and `s2` are distinct representations of the same set. */ diff --git a/shared/dataflow/codeql/dataflow/DataFlow.qll b/shared/dataflow/codeql/dataflow/DataFlow.qll index bad80247861..6a18c166613 100644 --- a/shared/dataflow/codeql/dataflow/DataFlow.qll +++ b/shared/dataflow/codeql/dataflow/DataFlow.qll @@ -6,6 +6,9 @@ /** Provides language-specific data flow parameters. */ signature module InputSig { + /** + * A node in the data flow graph. + */ class Node { /** Gets a textual representation of this element. */ string toString(); @@ -30,9 +33,27 @@ signature module InputSig { ReturnKind getKind(); } + /** + * A node in the data flow graph that represents an output of a call. + */ class OutNode extends Node; + /** + * A node in the data flow graph representing the value of some other node + * after an operation that might have changed its state. A typical example is + * an argument, which may have been modified by the callee. For example, + * consider the following code calling a setter method: + * ``` + * x.setFoo(y); + * ``` + * The post-update node for the argument node `x` is the node representing the + * value of `x` after the field `foo` has been updated. + */ class PostUpdateNode extends Node { + /** + * Gets the pre-update node, that is, the node that represents the same + * value prior to the operation. + */ Node getPreUpdateNode(); } @@ -131,6 +152,12 @@ signature module InputSig { string toString(); } + /** + * Holds if access paths with `c` at their head always should be tracked at + * high precision. This disables adaptive access path precision for such + * access paths. This may be beneficial for content that indicates an + * element of an array or container. + */ predicate forceHighPrecision(Content c); /** @@ -150,11 +177,19 @@ signature module InputSig { Content getAReadContent(); } + /** + * A content approximation. A content approximation corresponds to one or + * more `Content`s, and is used to provide an in-between level of precision + * for pruning. + */ class ContentApprox { /** Gets a textual representation of this element. */ string toString(); } + /** + * Gets the content approximation for content `c`. + */ ContentApprox getContentApprox(Content c); class ParameterPosition { @@ -169,8 +204,16 @@ signature module InputSig { string toString(); } + /** + * Holds if the parameter position `ppos` matches the argument position + * `apos`. + */ predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos); + /** + * Holds if there is a simple local flow step from `node1` to `node2`. These + * are the value-preserving intra-callable flow steps. + */ predicate simpleLocalFlowStep(Node node1, Node node2); /** diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index 840e67e9fa7..d555b281710 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -439,15 +439,6 @@ module MakeImpl { ) } - // inline to reduce fan-out via `getAReadContent` - bindingset[c] - private predicate clearsContentEx(NodeEx n, Content c) { - exists(ContentSet cs | - clearsContentCached(n.asNode(), cs) and - pragma[only_bind_out](c) = pragma[only_bind_into](cs).getAReadContent() - ) - } - // inline to reduce fan-out via `getAReadContent` bindingset[c] private predicate expectsContentEx(NodeEx n, Content c) { @@ -588,7 +579,7 @@ module MakeImpl { cc = false or cc = true and - not reducedViableImplInCallContext(call, _, _) + not CachedCallContextSensitivity::reducedViableImplInCallContext(call, _, _) ) or // call context may help reduce virtual dispatch @@ -611,7 +602,7 @@ module MakeImpl { ) { fwdFlow(arg, true) and viableParamArgEx(call, p, arg) and - reducedViableImplInCallContext(call, _, _) and + CachedCallContextSensitivity::reducedViableImplInCallContext(call, _, _) and target = p.getEnclosingCallable() and not fullBarrier(p) } @@ -982,6 +973,14 @@ module MakeImpl { exists(ap) } + predicate relevantCallEdgeIn(DataFlowCall call, DataFlowCallable c) { + callEdgeArgParam(call, c, _, _, _, _) + } + + predicate relevantCallEdgeOut(DataFlowCall call, DataFlowCallable c) { + callEdgeReturn(call, c, _, _, _, _, _) + } + additional predicate stats( boolean fwd, int nodes, int fields, int conscand, int states, int tuples, int calledges ) { @@ -1178,6 +1177,10 @@ module MakeImpl { DataFlowCall call, DataFlowCallable c, RetNodeEx ret, ReturnKindExt kind, NodeEx out, boolean allowsFieldFlow, Ap ap ); + + predicate relevantCallEdgeIn(DataFlowCall call, DataFlowCallable c); + + predicate relevantCallEdgeOut(DataFlowCall call, DataFlowCallable c); } private module MkStage { @@ -1219,7 +1222,9 @@ module MakeImpl { ApOption apSome(Ap ap); - class Cc; + class Cc { + string toString(); + } class CcCall extends Cc; @@ -1731,13 +1736,9 @@ module MakeImpl { private module FwdTypeFlowInput implements TypeFlowInput { predicate enableTypeFlow = Param::enableTypeFlow/0; - predicate relevantCallEdgeIn(DataFlowCall call, DataFlowCallable c) { - PrevStage::callEdgeArgParam(call, c, _, _, _, _) - } + predicate relevantCallEdgeIn = PrevStage::relevantCallEdgeIn/2; - predicate relevantCallEdgeOut(DataFlowCall call, DataFlowCallable c) { - PrevStage::callEdgeReturn(call, c, _, _, _, _, _) - } + predicate relevantCallEdgeOut = PrevStage::relevantCallEdgeOut/2; pragma[nomagic] private predicate dataFlowTakenCallEdgeIn0( @@ -1894,11 +1895,11 @@ module MakeImpl { pragma[nomagic] private predicate returnFlowsThrough( RetNodeEx ret, ReturnPosition pos, FlowState state, CcCall ccc, ParamNodeEx p, Typ argT, - Ap argAp, Ap ap + Ap argAp, ApApprox argApa, Ap ap ) { - exists(DataFlowCall call, ApApprox apa, boolean allowsFieldFlow, ApApprox innerArgApa | - returnFlowsThrough0(call, state, ccc, ap, apa, ret, p, argT, argAp, innerArgApa) and - flowThroughOutOfCall(call, ccc, ret, _, allowsFieldFlow, innerArgApa, apa) and + exists(DataFlowCall call, ApApprox apa, boolean allowsFieldFlow | + returnFlowsThrough0(call, state, ccc, ap, apa, ret, p, argT, argAp, argApa) and + flowThroughOutOfCall(call, ccc, ret, _, allowsFieldFlow, argApa, apa) and pos = ret.getReturnPosition() and if allowsFieldFlow = false then ap instanceof ApNil else any() ) @@ -1910,10 +1911,10 @@ module MakeImpl { ) { exists(ApApprox argApa, Typ argT | returnFlowsThrough(_, _, _, _, pragma[only_bind_into](p), pragma[only_bind_into](argT), - pragma[only_bind_into](argAp), ap) and + pragma[only_bind_into](argAp), pragma[only_bind_into](argApa), ap) and flowIntoCallApaTaken(call, _, pragma[only_bind_into](arg), p, allowsFieldFlow, argApa) and fwdFlow(arg, _, _, _, _, _, pragma[only_bind_into](argT), pragma[only_bind_into](argAp), - argApa) and + pragma[only_bind_into](argApa)) and if allowsFieldFlow = false then argAp instanceof ApNil else any() ) } @@ -2017,7 +2018,7 @@ module MakeImpl { // flow out of a callable exists(ReturnPosition pos | revFlowOut(_, node, pos, state, _, _, _, ap) and - if returnFlowsThrough(node, pos, state, _, _, _, _, ap) + if returnFlowsThrough(node, pos, state, _, _, _, _, _, ap) then ( returnCtx = TReturnCtxMaybeFlowThrough(pos) and returnAp = apSome(ap) @@ -2179,7 +2180,7 @@ module MakeImpl { ) { exists(RetNodeEx ret, FlowState state, CcCall ccc | revFlowOut(call, ret, pos, state, returnCtx, _, returnAp, ap) and - returnFlowsThrough(ret, pos, state, ccc, _, _, _, ap) and + returnFlowsThrough(ret, pos, state, ccc, _, _, _, _, ap) and matchesCall(ccc, call) ) } @@ -2248,7 +2249,7 @@ module MakeImpl { pragma[nomagic] predicate parameterMayFlowThrough(ParamNodeEx p, Ap ap) { exists(ReturnPosition pos | - returnFlowsThrough(_, pos, _, _, p, _, ap, _) and + returnFlowsThrough(_, pos, _, _, p, _, ap, _, _) and parameterFlowsThroughRev(p, ap, pos, _) ) } @@ -2256,7 +2257,7 @@ module MakeImpl { pragma[nomagic] predicate returnMayFlowThrough(RetNodeEx ret, Ap argAp, Ap ap, ReturnKindExt kind) { exists(ParamNodeEx p, ReturnPosition pos | - returnFlowsThrough(ret, pos, _, _, p, _, argAp, ap) and + returnFlowsThrough(ret, pos, _, _, p, _, argAp, _, ap) and parameterFlowsThroughRev(p, argAp, pos, ap) and kind = pos.getKind() ) @@ -2314,6 +2315,14 @@ module MakeImpl { ) } + predicate relevantCallEdgeIn(DataFlowCall call, DataFlowCallable c) { + callEdgeArgParam(call, c, _, _, _, _) + } + + predicate relevantCallEdgeOut(DataFlowCall call, DataFlowCallable c) { + callEdgeReturn(call, c, _, _, _, _, _) + } + additional predicate stats( boolean fwd, int nodes, int fields, int conscand, int states, int tuples, int calledges, int tfnodes, int tftuples @@ -2356,9 +2365,7 @@ module MakeImpl { } private module BooleanCallContext { - class Cc extends boolean { - Cc() { this in [true, false] } - } + class Cc = Boolean; class CcCall extends Cc { CcCall() { this = true } @@ -2398,7 +2405,24 @@ module MakeImpl { CcNoCall getCallContextReturn(DataFlowCallable c, DataFlowCall call) { any() } } - private module Level1CallContext { + private signature module Level1CallContextInputSig { + DataFlowCallable prunedViableImplInCallContext(DataFlowCall call, CallContextSpecificCall ctx); + + bindingset[call, ctx] + predicate noPrunedViableImplInCallContext(DataFlowCall call, CallContext ctx); + + predicate recordDataFlowCallSiteDispatch(DataFlowCall call, DataFlowCallable callable); + + predicate recordDataFlowCallSiteUnreachable(DataFlowCall call, DataFlowCallable callable); + + predicate reducedViableImplInReturn(DataFlowCallable c, DataFlowCall call); + + DataFlowCall prunedViableImplInCallContextReverse( + DataFlowCallable callable, CallContextReturn ctx + ); + } + + private module Level1CallContext { class Cc = CallContext; class CcCall = CallContextCall; @@ -2419,17 +2443,17 @@ module MakeImpl { LocalCc getLocalCc(NodeEx node, Cc cc) { any() } DataFlowCallable viableImplCallContextReduced(DataFlowCall call, CcCall ctx) { - result = prunedViableImplInCallContext(call, ctx) + result = Input::prunedViableImplInCallContext(call, ctx) } bindingset[call, ctx] predicate viableImplNotCallContextReduced(DataFlowCall call, Cc ctx) { - noPrunedViableImplInCallContext(call, ctx) + Input::noPrunedViableImplInCallContext(call, ctx) } bindingset[call, c] CcCall getCallContextCall(DataFlowCall call, DataFlowCallable c) { - if recordDataFlowCallSiteDispatch(call, c) + if Input::recordDataFlowCallSiteDispatch(call, c) then result = TSpecificCall(call) else result = TSomeCall() } @@ -2446,24 +2470,26 @@ module MakeImpl { } DataFlowCallable viableImplCallContextReduced(DataFlowCall call, CcCall ctx) { - result = prunedViableImplInCallContext(call, ctx) + result = Input::prunedViableImplInCallContext(call, ctx) } bindingset[call, ctx] predicate viableImplNotCallContextReduced(DataFlowCall call, Cc ctx) { - noPrunedViableImplInCallContext(call, ctx) + Input::noPrunedViableImplInCallContext(call, ctx) } bindingset[call, c] CcCall getCallContextCall(DataFlowCall call, DataFlowCallable c) { - if recordDataFlowCallSite(call, c) + if + Input::recordDataFlowCallSiteDispatch(call, c) or + Input::recordDataFlowCallSiteUnreachable(call, c) then result = TSpecificCall(call) else result = TSomeCall() } } DataFlowCallable viableImplCallContextReducedReverse(DataFlowCall call, CcNoCall ctx) { - call = prunedViableImplInCallContextReverse(result, ctx) + call = Input::prunedViableImplInCallContextReverse(result, ctx) } predicate viableImplNotCallContextReducedReverse(CcNoCall ctx) { @@ -2472,7 +2498,9 @@ module MakeImpl { bindingset[call, c] CcNoCall getCallContextReturn(DataFlowCallable c, DataFlowCall call) { - if reducedViableImplInReturn(c, call) then result = TReturn(c, call) else result = ccNone() + if Input::reducedViableImplInReturn(c, call) + then result = TReturn(c, call) + else result = ccNone() } } @@ -2510,7 +2538,11 @@ module MakeImpl { ApOption apSome(Ap ap) { result = TBooleanSome(ap) } - import Level1CallContext + private module Level1CallContextInput implements Level1CallContextInputSig { + import CachedCallContextSensitivity + } + + import Level1CallContext import NoLocalCallContext bindingset[node1, state1] @@ -2780,7 +2812,23 @@ module MakeImpl { ApOption apSome(Ap ap) { result = TApproxAccessPathFrontSome(ap) } - import Level1CallContext + additional module Level1CallContextInput implements Level1CallContextInputSig { + private module CallContextSensitivityInput implements CallContextSensitivityInputSig { + predicate relevantCallEdgeIn = PrevStage::relevantCallEdgeIn/2; + + predicate relevantCallEdgeOut = PrevStage::relevantCallEdgeOut/2; + + predicate reducedViableImplInCallContextCand = + CachedCallContextSensitivity::reducedViableImplInCallContext/3; + + predicate reducedViableImplInReturnCand = + CachedCallContextSensitivity::reducedViableImplInReturn/2; + } + + import CallContextSensitivity + } + + import Level1CallContext import NoLocalCallContext predicate localStep( @@ -2887,16 +2935,24 @@ module MakeImpl { } pragma[nomagic] - private predicate clearContent(NodeEx node, Content c) { + additional predicate clearContent(NodeEx node, Content c, boolean isStoreTarget) { exists(ContentSet cs | PrevStage::readStepCand(_, pragma[only_bind_into](c), _) and c = cs.getAReadContent() and - clearSet(node, cs) + clearSet(node, cs) and + if PrevStage::storeStepCand(_, _, _, node, _, _) + then isStoreTarget = true + else isStoreTarget = false ) } pragma[nomagic] - private predicate clear(NodeEx node, Ap ap) { clearContent(node, ap.getHead()) } + private predicate clear(NodeEx node, Ap ap) { + // When `node` is the target of a store, we interpret `clearsContent` as + // only pertaining to _earlier_ store steps. In this case, we need to postpone + // checking `clearsContent` to the `pathStep` predicate + clearContent(node, ap.getHead(), false) + } pragma[nomagic] private predicate expectsContentCand(NodeEx node, Ap ap) { @@ -3148,7 +3204,23 @@ module MakeImpl { ApOption apSome(Ap ap) { result = TAccessPathApproxSome(ap) } - import Level1CallContext + additional module Level1CallContextInput implements Level1CallContextInputSig { + private module CallContextSensitivityInput implements CallContextSensitivityInputSig { + predicate relevantCallEdgeIn = PrevStage::relevantCallEdgeIn/2; + + predicate relevantCallEdgeOut = PrevStage::relevantCallEdgeOut/2; + + predicate reducedViableImplInCallContextCand = + Stage3Param::Level1CallContextInput::reducedViableImplInCallContext/3; + + predicate reducedViableImplInReturnCand = + Stage3Param::Level1CallContextInput::reducedViableImplInReturn/2; + } + + import CallContextSensitivity + } + + import Level1CallContext import LocalCallContext predicate localStep( @@ -3418,6 +3490,16 @@ module MakeImpl { /** Gets a textual representation of this access path. */ abstract string toString(); + + /** Holds if `node`, which is the target of a store step, clears data stored in this access path. */ + pragma[nomagic] + predicate storeTargetIsClearedAt(NodeEx node) { + exists(AccessPathApprox apa | + apa = this.getApprox() and + Stage5::revFlowAp(node, apa) and + Stage4Param::clearContent(node, apa.getHead(), true) + ) + } } private class AccessPathNil extends AccessPath, TAccessPathNil { @@ -3912,11 +3994,13 @@ module MakeImpl { PathNodeMid mid, NodeEx node, FlowState state, CallContext cc, SummaryCtx sc, DataFlowType t, AccessPath ap ) { - exists(DataFlowType t0 | - pathStep0(mid, node, state, cc, sc, t0, ap) and - Stage5::revFlow(node, state, ap.getApprox()) and + exists(DataFlowType t0, boolean isStoreStep | + pathStep0(mid, pragma[only_bind_into](node), pragma[only_bind_into](state), cc, sc, t0, ap, + isStoreStep) and + Stage5::revFlow(pragma[only_bind_into](node), pragma[only_bind_into](state), ap.getApprox()) and strengthenType(node, t0, t) and - not inBarrier(node, state) + not inBarrier(node, state) and + if ap.storeTargetIsClearedAt(node) then isStoreStep = true else any() ) } @@ -3927,17 +4011,19 @@ module MakeImpl { pragma[nomagic] private predicate pathStep0( PathNodeMid mid, NodeEx node, FlowState state, CallContext cc, SummaryCtx sc, DataFlowType t, - AccessPath ap + AccessPath ap, boolean isStoreStep ) { exists(NodeEx midnode, FlowState state0, LocalCallContext localCC | pathNode(mid, midnode, state0, cc, sc, t, ap, localCC) and - localFlowBigStep(midnode, state0, node, state, true, _, localCC) + localFlowBigStep(midnode, state0, node, state, true, _, localCC) and + isStoreStep = false ) or exists(NodeEx midnode, FlowState state0, LocalCallContext localCC | pathNode(mid, midnode, state0, cc, sc, _, ap, localCC) and localFlowBigStep(midnode, state0, node, state, false, t, localCC) and - ap instanceof AccessPathNil + ap instanceof AccessPathNil and + isStoreStep = false ) or jumpStepEx(mid.getNodeExOutgoing(), node) and @@ -3945,7 +4031,8 @@ module MakeImpl { cc instanceof CallContextAny and sc instanceof SummaryCtxNone and t = mid.getType() and - ap = mid.getAp() + ap = mid.getAp() and + isStoreStep = false or additionalJumpStep(mid.getNodeExOutgoing(), node) and state = mid.getState() and @@ -3953,35 +4040,45 @@ module MakeImpl { sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and t = node.getDataFlowType() and - ap = TAccessPathNil() + ap = TAccessPathNil() and + isStoreStep = false or additionalJumpStateStep(mid.getNodeExOutgoing(), mid.getState(), node, state) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and t = node.getDataFlowType() and - ap = TAccessPathNil() + ap = TAccessPathNil() and + isStoreStep = false or exists(Content c, DataFlowType t0, AccessPath ap0 | pathStoreStep(mid, node, state, t0, ap0, c, t, cc) and ap.isCons(c, t0, ap0) and - sc = mid.getSummaryCtx() + sc = mid.getSummaryCtx() and + isStoreStep = true ) or exists(Content c, AccessPath ap0 | pathReadStep(mid, node, state, ap0, c, cc) and ap0.isCons(c, t, ap) and - sc = mid.getSummaryCtx() + sc = mid.getSummaryCtx() and + isStoreStep = false ) or - pathIntoCallable(mid, node, state, _, cc, sc, _) and t = mid.getType() and ap = mid.getAp() + pathIntoCallable(mid, node, state, _, cc, sc, _) and + t = mid.getType() and + ap = mid.getAp() and + isStoreStep = false or pathOutOfCallable(mid, node, state, cc) and t = mid.getType() and ap = mid.getAp() and - sc instanceof SummaryCtxNone + sc instanceof SummaryCtxNone and + isStoreStep = false or - pathThroughCallable(mid, node, state, cc, t, ap) and sc = mid.getSummaryCtx() + pathThroughCallable(mid, node, state, cc, t, ap) and + sc = mid.getSummaryCtx() and + isStoreStep = false } pragma[nomagic] @@ -4026,6 +4123,22 @@ module MakeImpl { ) } + private module PrunedCallContextSensitivityStage5 { + private module CallContextSensitivityInput implements CallContextSensitivityInputSig { + predicate relevantCallEdgeIn = Stage5::relevantCallEdgeIn/2; + + predicate relevantCallEdgeOut = Stage5::relevantCallEdgeOut/2; + + predicate reducedViableImplInCallContextCand = + Stage5Param::Level1CallContextInput::reducedViableImplInCallContext/3; + + predicate reducedViableImplInReturnCand = + Stage5Param::Level1CallContextInput::reducedViableImplInReturn/2; + } + + import CallContextSensitivity + } + pragma[nomagic] private predicate pathOutOfCallable1( PathNodeMid mid, DataFlowCall call, ReturnKindExt kind, FlowState state, CallContext cc, @@ -4035,9 +4148,11 @@ module MakeImpl { pathOutOfCallable0(mid, pos, state, innercc, apa) and c = pos.getCallable() and kind = pos.getKind() and - resolveReturn(innercc, c, call) + PrunedCallContextSensitivityStage5::resolveReturn(innercc, c, call) | - if reducedViableImplInReturn(c, call) then cc = TReturn(c, call) else cc = TAnyCallContext() + if PrunedCallContextSensitivityStage5::reducedViableImplInReturn(c, call) + then cc = TReturn(c, call) + else cc = TAnyCallContext() ) } @@ -4087,8 +4202,6 @@ module MakeImpl { ) } - private predicate parameterCandProj(DataFlowCallable c) { parameterCand(c, _, _) } - pragma[nomagic] private predicate pathIntoCallable0( PathNodeMid mid, DataFlowCallable callable, ParameterPosition pos, FlowState state, @@ -4097,7 +4210,7 @@ module MakeImpl { exists(AccessPathApprox apa | pathIntoArg(mid, pragma[only_bind_into](pos), state, outercc, call, t, ap, pragma[only_bind_into](apa)) and - callable = ResolveCall::resolveCall(call, outercc) and + callable = PrunedCallContextSensitivityStage5::resolveCall(call, outercc) and parameterCand(callable, pragma[only_bind_into](pos), pragma[only_bind_into](apa)) ) } @@ -4127,7 +4240,7 @@ module MakeImpl { not Config::getAFeature() instanceof FeatureEqualSourceSinkCallContext ) | - if recordDataFlowCallSite(call, callable) + if PrunedCallContextSensitivityStage5::recordDataFlowCallSite(call, callable) then innercc = TSpecificCall(call) else innercc = TSomeCall() ) @@ -4623,17 +4736,18 @@ module MakeImpl { exists(explorationLimit()) or revPartialPathStep(_, node, state, sc1, sc2, sc3, ap) and - not clearsContentEx(node, ap.getHead()) and - ( - notExpectsContent(node) or - expectsContentEx(node, ap.getHead()) - ) and - not fullBarrier(node) and - not stateBarrier(node, state) and - not outBarrier(node, state) and distSink(node.getEnclosingCallable()) <= explorationLimit() } + // inline to reduce fan-out via `getAReadContent` + bindingset[c] + private predicate clearsContentEx(NodeEx n, Content c) { + exists(ContentSet cs | + clearsContentCached(n.asNode(), cs) and + pragma[only_bind_out](c) = pragma[only_bind_into](cs).getAReadContent() + ) + } + pragma[nomagic] private predicate partialPathStep( PartialPathNodeFwd mid, NodeEx node, FlowState state, CallContext cc, TSummaryCtx1 sc1, @@ -4648,16 +4762,20 @@ module MakeImpl { TSummaryCtx2 sc2, TSummaryCtx3 sc3, TSummaryCtx4 sc4, DataFlowType t0, DataFlowType t, PartialAccessPath ap ) { - partialPathStep0(mid, node, state, cc, sc1, sc2, sc3, sc4, t0, ap) and - not fullBarrier(node) and - not stateBarrier(node, state) and - not inBarrier(node, state) and - not clearsContentEx(node, ap.getHead()) and - ( - notExpectsContent(node) or - expectsContentEx(node, ap.getHead()) - ) and - strengthenType(node, t0, t) + exists(boolean isStoreStep | + partialPathStep0(mid, node, state, cc, sc1, sc2, sc3, sc4, t0, ap, isStoreStep) and + not fullBarrier(node) and + not stateBarrier(node, state) and + not inBarrier(node, state) and + ( + notExpectsContent(node) or + expectsContentEx(node, ap.getHead()) + ) and + strengthenType(node, t0, t) + | + isStoreStep = true or + not clearsContentEx(node, ap.getHead()) + ) } pragma[nomagic] @@ -4852,7 +4970,8 @@ module MakeImpl { pragma[nomagic] private predicate partialPathStep0( PartialPathNodeFwd mid, NodeEx node, FlowState state, CallContext cc, TSummaryCtx1 sc1, - TSummaryCtx2 sc2, TSummaryCtx3 sc3, TSummaryCtx4 sc4, DataFlowType t, PartialAccessPath ap + TSummaryCtx2 sc2, TSummaryCtx3 sc3, TSummaryCtx4 sc4, DataFlowType t, PartialAccessPath ap, + boolean isStoreStep ) { not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( @@ -4886,7 +5005,8 @@ module MakeImpl { mid.getAp() instanceof PartialAccessPathNil and t = node.getDataFlowType() and ap = TPartialNil() - ) + ) and + isStoreStep = false or jumpStepEx(mid.getNodeEx(), node) and state = mid.getState() and @@ -4896,7 +5016,8 @@ module MakeImpl { sc3 = TSummaryCtx3None() and sc4 = TSummaryCtx4None() and t = mid.getType() and - ap = mid.getAp() + ap = mid.getAp() and + isStoreStep = false or additionalJumpStep(mid.getNodeEx(), node) and state = mid.getState() and @@ -4907,7 +5028,8 @@ module MakeImpl { sc4 = TSummaryCtx4None() and mid.getAp() instanceof PartialAccessPathNil and t = node.getDataFlowType() and - ap = TPartialNil() + ap = TPartialNil() and + isStoreStep = false or additionalJumpStateStep(mid.getNodeEx(), mid.getState(), node, state) and cc instanceof CallContextAny and @@ -4917,7 +5039,8 @@ module MakeImpl { sc4 = TSummaryCtx4None() and mid.getAp() instanceof PartialAccessPathNil and t = node.getDataFlowType() and - ap = TPartialNil() + ap = TPartialNil() and + isStoreStep = false or partialPathStoreStep(mid, _, _, _, node, t, ap) and state = mid.getState() and @@ -4925,7 +5048,8 @@ module MakeImpl { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc3 = mid.getSummaryCtx3() and - sc4 = mid.getSummaryCtx4() + sc4 = mid.getSummaryCtx4() and + isStoreStep = true or exists(DataFlowType t0, PartialAccessPath ap0, Content c | partialPathReadStep(mid, t0, ap0, c, node, cc) and @@ -4935,21 +5059,25 @@ module MakeImpl { sc3 = mid.getSummaryCtx3() and sc4 = mid.getSummaryCtx4() and apConsFwd(t, ap, c, t0, ap0) - ) + ) and + isStoreStep = false or - partialPathIntoCallable(mid, node, state, _, cc, sc1, sc2, sc3, sc4, _, t, ap) + partialPathIntoCallable(mid, node, state, _, cc, sc1, sc2, sc3, sc4, _, t, ap) and + isStoreStep = false or partialPathOutOfCallable(mid, node, state, cc, t, ap) and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and sc3 = TSummaryCtx3None() and - sc4 = TSummaryCtx4None() + sc4 = TSummaryCtx4None() and + isStoreStep = false or partialPathThroughCallable(mid, node, state, cc, t, ap) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc3 = mid.getSummaryCtx3() and - sc4 = mid.getSummaryCtx4() + sc4 = mid.getSummaryCtx4() and + isStoreStep = false } bindingset[result, i] @@ -5019,9 +5147,9 @@ module MakeImpl { partialPathOutOfCallable0(mid, pos, state, innercc, t, ap) and c = pos.getCallable() and kind = pos.getKind() and - resolveReturn(innercc, c, call) + CachedCallContextSensitivity::resolveReturn(innercc, c, call) | - if reducedViableImplInReturn(c, call) + if CachedCallContextSensitivity::reducedViableImplInReturn(c, call) then cc = TReturn(c, call) else cc = TAnyCallContext() ) @@ -5054,15 +5182,13 @@ module MakeImpl { ) } - private predicate anyCallable(DataFlowCallable c) { any() } - pragma[nomagic] private predicate partialPathIntoCallable0( PartialPathNodeFwd mid, DataFlowCallable callable, ParameterPosition pos, FlowState state, CallContext outercc, DataFlowCall call, DataFlowType t, PartialAccessPath ap ) { partialPathIntoArg(mid, pos, state, outercc, call, t, ap) and - callable = ResolveCall::resolveCall(call, outercc) + callable = CachedCallContextSensitivity::resolveCall(call, outercc) } private predicate partialPathIntoCallable( @@ -5078,7 +5204,7 @@ module MakeImpl { sc3 = TSummaryCtx3Some(t) and sc4 = TSummaryCtx4Some(ap) | - if recordDataFlowCallSite(call, callable) + if CachedCallContextSensitivity::recordDataFlowCallSite(call, callable) then innercc = TSpecificCall(call) else innercc = TSomeCall() ) @@ -5131,13 +5257,47 @@ module MakeImpl { private predicate revPartialPathStep( PartialPathNodeRev mid, NodeEx node, FlowState state, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, TRevSummaryCtx3 sc3, PartialAccessPath ap + ) { + exists(boolean isStoreStep | + revPartialPathStep0(mid, node, state, sc1, sc2, sc3, ap, isStoreStep) and + ( + notExpectsContent(node) or + expectsContentEx(node, ap.getHead()) + ) and + not fullBarrier(node) and + not stateBarrier(node, state) and + not outBarrier(node, state) and + // if a node is not the target of a store, we can check `clearsContent` immediately + ( + storeEx(_, _, node, _, _) + or + not clearsContentEx(node, ap.getHead()) + ) + | + // if a node is the target of a store, we can only check `clearsContent` + // when we know whether we took the store step + isStoreStep = true + or + exists(NodeEx midNode, PartialAccessPath midAp | + midNode = mid.getNodeEx() and + midAp = mid.getAp() and + not clearsContentEx(midNode, midAp.getHead()) + ) + ) + } + + pragma[nomagic] + private predicate revPartialPathStep0( + PartialPathNodeRev mid, NodeEx node, FlowState state, TRevSummaryCtx1 sc1, + TRevSummaryCtx2 sc2, TRevSummaryCtx3 sc3, PartialAccessPath ap, boolean isStoreStep ) { localFlowStepEx(node, mid.getNodeEx()) and state = mid.getState() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc3 = mid.getSummaryCtx3() and - ap = mid.getAp() + ap = mid.getAp() and + isStoreStep = false or additionalLocalFlowStep(node, mid.getNodeEx()) and state = mid.getState() and @@ -5145,21 +5305,24 @@ module MakeImpl { sc2 = mid.getSummaryCtx2() and sc3 = mid.getSummaryCtx3() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil() + ap = TPartialNil() and + isStoreStep = false or additionalLocalStateStep(node, state, mid.getNodeEx(), mid.getState()) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc3 = mid.getSummaryCtx3() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil() + ap = TPartialNil() and + isStoreStep = false or jumpStepEx(node, mid.getNodeEx()) and state = mid.getState() and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and sc3 = TRevSummaryCtx3None() and - ap = mid.getAp() + ap = mid.getAp() and + isStoreStep = false or additionalJumpStep(node, mid.getNodeEx()) and state = mid.getState() and @@ -5167,20 +5330,23 @@ module MakeImpl { sc2 = TRevSummaryCtx2None() and sc3 = TRevSummaryCtx3None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil() + ap = TPartialNil() and + isStoreStep = false or additionalJumpStateStep(node, state, mid.getNodeEx(), mid.getState()) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and sc3 = TRevSummaryCtx3None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil() + ap = TPartialNil() and + isStoreStep = false or revPartialPathReadStep(mid, _, _, node, ap) and state = mid.getState() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - sc3 = mid.getSummaryCtx3() + sc3 = mid.getSummaryCtx3() and + isStoreStep = false or exists(PartialAccessPath ap0, Content c | revPartialPathStoreStep(mid, ap0, c, node) and @@ -5188,7 +5354,8 @@ module MakeImpl { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc3 = mid.getSummaryCtx3() and - apConsRev(ap, c, ap0) + apConsRev(ap, c, ap0) and + isStoreStep = true ) or exists(ParamNodeEx p | @@ -5201,18 +5368,21 @@ module MakeImpl { sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and sc3 = TRevSummaryCtx3None() and - ap = mid.getAp() + ap = mid.getAp() and + isStoreStep = false ) or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, state, sc1, sc2, sc3, _, ap) and - pos = getReturnPosition(node.asNode()) + pos = getReturnPosition(node.asNode()) and + isStoreStep = false ) or revPartialPathThroughCallable(mid, node, state, ap) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - sc3 = mid.getSummaryCtx3() + sc3 = mid.getSummaryCtx3() and + isStoreStep = false } pragma[inline] diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll index 21040c2d0d9..679be2cb5c6 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll @@ -393,6 +393,216 @@ module MakeImplCommon { result = viableCallableLambda(call, _) } + signature module CallContextSensitivityInputSig { + /** Holds if the edge is possibly needed in the direction `call` to `c`. */ + predicate relevantCallEdgeIn(DataFlowCall call, DataFlowCallable c); + + /** Holds if the edge is possibly needed in the direction `c` to `call`. */ + predicate relevantCallEdgeOut(DataFlowCall call, DataFlowCallable c); + + /** + * Holds if the call context `ctx` may reduce the set of viable run-time + * dispatch targets of call `call` in `c`. + */ + default predicate reducedViableImplInCallContextCand( + DataFlowCall call, DataFlowCallable c, DataFlowCall ctx + ) { + relevantCallEdgeIn(ctx, c) and + mayBenefitFromCallContextExt(call, c) + } + + /** + * Holds if flow returning from callable `c` to call `call` might return + * further and if this path may restrict the set of call sites that can be + * returned to. + */ + default predicate reducedViableImplInReturnCand(DataFlowCallable c, DataFlowCall call) { + relevantCallEdgeOut(call, c) and + mayBenefitFromCallContextExt(call, _) + } + } + + /** Provides predicates releated to call-context sensitivity. */ + module CallContextSensitivity { + private import Input + + pragma[nomagic] + DataFlowCallable viableImplInCallContextExtIn(DataFlowCall call, DataFlowCall ctx) { + reducedViableImplInCallContextCand(call, _, ctx) and + result = viableImplInCallContextExt(call, ctx) and + relevantCallEdgeIn(call, result) + } + + /** + * Holds if the call context `ctx` reduces the set of viable run-time + * dispatch targets of call `call` in `c`. + */ + pragma[nomagic] + predicate reducedViableImplInCallContext(DataFlowCall call, DataFlowCallable c, DataFlowCall ctx) { + exists(int tgts, int ctxtgts | + reducedViableImplInCallContextCand(call, c, ctx) and + ctxtgts = count(viableImplInCallContextExtIn(call, ctx)) and + tgts = strictcount(DataFlowCallable tgt | relevantCallEdgeIn(call, tgt)) and + ctxtgts < tgts + ) + } + + /** + * Holds if the call context `call` allows us to prune unreachable nodes in `callable`. + */ + pragma[nomagic] + predicate recordDataFlowCallSiteUnreachable(DataFlowCall call, DataFlowCallable callable) { + exists(Node n | + relevantCallEdgeIn(call, callable) and + getNodeEnclosingCallable(n) = callable and + isUnreachableInCallCached(n, call) + ) + } + + pragma[nomagic] + DataFlowCallable viableImplInCallContextExtOut(DataFlowCall call, DataFlowCall ctx) { + exists(DataFlowCallable c | + reducedViableImplInReturnCand(result, call) and + result = viableImplInCallContextExt(call, ctx) and + mayBenefitFromCallContextExt(call, c) and + relevantCallEdgeOut(ctx, c) + ) + } + + /** + * Holds if flow returning from callable `c` to call `call` might return + * further and if this path restricts the set of call sites that can be + * returned to. + */ + pragma[nomagic] + predicate reducedViableImplInReturn(DataFlowCallable c, DataFlowCall call) { + exists(int tgts, int ctxtgts | + reducedViableImplInReturnCand(c, call) and + ctxtgts = count(DataFlowCall ctx | c = viableImplInCallContextExtOut(call, ctx)) and + tgts = + strictcount(DataFlowCall ctx | + callEnclosingCallable(call, any(DataFlowCallable encl | relevantCallEdgeOut(ctx, encl))) + ) and + ctxtgts < tgts + ) + } + + signature module PrunedViableImplInputSig { + predicate reducedViableImplInCallContext( + DataFlowCall call, DataFlowCallable c, DataFlowCall ctx + ); + + predicate reducedViableImplInReturn(DataFlowCallable c, DataFlowCall call); + + predicate recordDataFlowCallSiteUnreachable(DataFlowCall call, DataFlowCallable c); + } + + /** + * This module is only parameterized so that we can refer to cached versions + * of the input predicates in `CachedCallContextSensitivity`. + */ + module PrunedViableImpl { + /** + * Gets a viable run-time dispatch target for the call `call` in the + * context `ctx`. This is restricted to those calls for which a context + * makes a difference. + */ + pragma[nomagic] + DataFlowCallable prunedViableImplInCallContext(DataFlowCall call, CallContextSpecificCall ctx) { + exists(DataFlowCall outer | ctx = TSpecificCall(outer) | + result = viableImplInCallContextExtIn(call, outer) and + Input2::reducedViableImplInCallContext(call, _, outer) + ) + } + + /** Holds if `call` does not have a reduced set of dispatch targets in call context `ctx`. */ + bindingset[call, ctx] + predicate noPrunedViableImplInCallContext(DataFlowCall call, CallContext ctx) { + exists(DataFlowCall outer | ctx = TSpecificCall(outer) | + not Input2::reducedViableImplInCallContext(call, _, outer) + ) + or + ctx instanceof CallContextSomeCall + or + ctx instanceof CallContextAny + or + ctx instanceof CallContextReturn + } + + /** + * Resolves a call from `call` in `cc` to `result`, where `result` is + * restricted by `relevantResolveTarget`. + */ + bindingset[call, cc] + DataFlowCallable resolveCall(DataFlowCall call, CallContext cc) { + result = prunedViableImplInCallContext(call, cc) + or + noPrunedViableImplInCallContext(call, cc) and + relevantCallEdgeIn(call, result) + } + + /** + * Gets a viable call site for the return from `callable` in call context + * `ctx`. This is restricted to those callables and contexts for which + * the possible call sites are restricted. + */ + pragma[nomagic] + DataFlowCall prunedViableImplInCallContextReverse( + DataFlowCallable callable, CallContextReturn ctx + ) { + exists(DataFlowCallable c0, DataFlowCall call0 | + callEnclosingCallable(call0, callable) and + ctx = TReturn(c0, call0) and + c0 = viableImplInCallContextExtOut(call0, result) and + Input2::reducedViableImplInReturn(c0, call0) + ) + } + + /** + * Resolves a return from `callable` in `cc` to `call`. + */ + bindingset[cc, callable] + predicate resolveReturn(CallContextNoCall cc, DataFlowCallable callable, DataFlowCall call) { + cc instanceof CallContextAny and relevantCallEdgeOut(call, callable) + or + call = prunedViableImplInCallContextReverse(callable, cc) + } + + /** + * Holds if the call context `call` improves virtual dispatch in `callable`. + */ + pragma[nomagic] + predicate recordDataFlowCallSiteDispatch(DataFlowCall call, DataFlowCallable callable) { + Input2::reducedViableImplInCallContext(_, callable, call) + } + + /** + * Holds if the call context `call` either improves virtual dispatch in + * `callable` or if it allows us to prune unreachable nodes in `callable`. + */ + predicate recordDataFlowCallSite(DataFlowCall call, DataFlowCallable c) { + Input2::recordDataFlowCallSiteUnreachable(call, c) or + recordDataFlowCallSiteDispatch(call, c) + } + } + + private predicate reducedViableImplInCallContextAlias = reducedViableImplInCallContext/3; + + private predicate reducedViableImplInReturnAlias = reducedViableImplInReturn/2; + + private predicate recordDataFlowCallSiteUnreachableAlias = recordDataFlowCallSiteUnreachable/2; + + private module DefaultPrunedViableImplInput implements PrunedViableImplInputSig { + predicate reducedViableImplInCallContext = reducedViableImplInCallContextAlias/3; + + predicate reducedViableImplInReturn = reducedViableImplInReturnAlias/2; + + predicate recordDataFlowCallSiteUnreachable = recordDataFlowCallSiteUnreachableAlias/2; + } + + import PrunedViableImpl + } + cached private module Cached { /** @@ -498,6 +708,102 @@ module MakeImplCommon { ) } + /** + * Holds if the set of viable implementations that can be called by `call` + * might be improved by knowing the call context. + */ + cached + predicate mayBenefitFromCallContextExt(DataFlowCall call, DataFlowCallable callable) { + ( + mayBenefitFromCallContext(call) + or + exists(viableCallableLambda(call, TDataFlowCallSome(_))) + ) and + callEnclosingCallable(call, callable) + } + + /** + * Gets a viable dispatch target of `call` in the context `ctx`. This is + * restricted to those `call`s for which a context might make a difference. + */ + cached + DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) { + result = viableImplInCallContext(call, ctx) and + result = viableCallable(call) + or + result = viableCallableLambda(call, TDataFlowCallSome(ctx)) + or + exists(DataFlowCallable enclosing | + mayBenefitFromCallContextExt(call, enclosing) and + enclosing = viableCallableExt(ctx) and + result = viableCallableLambda(call, TDataFlowCallNone()) + ) + } + + /** + * A cached version of the `CallContextSensitivity` module. Only used in + * pruning stages 1+2 and flow exploration; all subsequent pruning stages use a + * pruned version, based on the relevant call edges from the previous stage. + */ + cached + module CachedCallContextSensitivity { + private module CallContextSensitivityInput implements CallContextSensitivityInputSig { + predicate relevantCallEdgeIn(DataFlowCall call, DataFlowCallable c) { + c = viableCallableExt(call) + } + + predicate relevantCallEdgeOut(DataFlowCall call, DataFlowCallable c) { + c = viableCallableExt(call) + } + } + + private module Impl1 = CallContextSensitivity; + + cached + predicate reducedViableImplInCallContext( + DataFlowCall call, DataFlowCallable c, DataFlowCall ctx + ) { + Impl1::reducedViableImplInCallContext(call, c, ctx) + } + + cached + predicate recordDataFlowCallSiteUnreachable(DataFlowCall call, DataFlowCallable c) { + Impl1::recordDataFlowCallSiteUnreachable(call, c) + } + + cached + predicate reducedViableImplInReturn(DataFlowCallable c, DataFlowCall call) { + Impl1::reducedViableImplInReturn(c, call) + } + + private module PrunedViableImplInput implements Impl1::PrunedViableImplInputSig { + predicate reducedViableImplInCallContext = + CachedCallContextSensitivity::reducedViableImplInCallContext/3; + + predicate reducedViableImplInReturn = + CachedCallContextSensitivity::reducedViableImplInReturn/2; + + predicate recordDataFlowCallSiteUnreachable = + CachedCallContextSensitivity::recordDataFlowCallSiteUnreachable/2; + } + + private module Impl2 = Impl1::PrunedViableImpl; + + import Impl2 + + cached + DataFlowCallable prunedViableImplInCallContext(DataFlowCall call, CallContextSpecificCall ctx) { + result = Impl2::prunedViableImplInCallContext(call, ctx) + } + + cached + DataFlowCall prunedViableImplInCallContextReverse( + DataFlowCallable callable, CallContextReturn ctx + ) { + result = Impl2::prunedViableImplInCallContextReverse(callable, ctx) + } + } + /** * Holds if `p` is the parameter of a viable dispatch target of `call`, * and `p` has position `ppos`. @@ -788,106 +1094,6 @@ module MakeImplCommon { import FlowThrough - cached - private module DispatchWithCallContext { - /** - * Holds if the set of viable implementations that can be called by `call` - * might be improved by knowing the call context. - */ - pragma[nomagic] - private predicate mayBenefitFromCallContextExt(DataFlowCall call, DataFlowCallable callable) { - ( - mayBenefitFromCallContext(call) - or - exists(viableCallableLambda(call, TDataFlowCallSome(_))) - ) and - callEnclosingCallable(call, callable) - } - - /** - * Gets a viable dispatch target of `call` in the context `ctx`. This is - * restricted to those `call`s for which a context might make a difference. - */ - cached - DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) { - result = viableImplInCallContext(call, ctx) and - result = viableCallable(call) - or - result = viableCallableLambda(call, TDataFlowCallSome(ctx)) - or - exists(DataFlowCallable enclosing | - mayBenefitFromCallContextExt(call, enclosing) and - enclosing = viableCallableExt(ctx) and - result = viableCallableLambda(call, TDataFlowCallNone()) - ) - } - - /** - * Holds if the call context `ctx` reduces the set of viable run-time - * dispatch targets of call `call` in `c`. - */ - cached - predicate reducedViableImplInCallContext( - DataFlowCall call, DataFlowCallable c, DataFlowCall ctx - ) { - exists(int tgts, int ctxtgts | - mayBenefitFromCallContextExt(call, c) and - c = viableCallableExt(ctx) and - ctxtgts = count(viableImplInCallContextExt(call, ctx)) and - tgts = strictcount(viableCallableExt(call)) and - ctxtgts < tgts - ) - } - - /** - * Gets a viable run-time dispatch target for the call `call` in the - * context `ctx`. This is restricted to those calls for which a context - * makes a difference. - */ - cached - DataFlowCallable prunedViableImplInCallContext(DataFlowCall call, CallContextSpecificCall ctx) { - exists(DataFlowCall outer | ctx = TSpecificCall(outer) | - result = viableImplInCallContextExt(call, outer) and - reducedViableImplInCallContext(call, _, outer) - ) - } - - /** - * Holds if flow returning from callable `c` to call `call` might return - * further and if this path restricts the set of call sites that can be - * returned to. - */ - cached - predicate reducedViableImplInReturn(DataFlowCallable c, DataFlowCall call) { - exists(int tgts, int ctxtgts | - mayBenefitFromCallContextExt(call, _) and - c = viableCallableExt(call) and - ctxtgts = count(DataFlowCall ctx | c = viableImplInCallContextExt(call, ctx)) and - tgts = strictcount(DataFlowCall ctx | callEnclosingCallable(call, viableCallableExt(ctx))) and - ctxtgts < tgts - ) - } - - /** - * Gets a viable call site for the return from `callable` in call context - * `ctx`. This is restricted to those callables and contexts for which - * the possible call sites are restricted. - */ - cached - DataFlowCall prunedViableImplInCallContextReverse( - DataFlowCallable callable, CallContextReturn ctx - ) { - exists(DataFlowCallable c0, DataFlowCall call0 | - callEnclosingCallable(call0, callable) and - ctx = TReturn(c0, call0) and - c0 = viableImplInCallContextExt(call0, result) and - reducedViableImplInReturn(c0, call0) - ) - } - } - - import DispatchWithCallContext - /** * Holds if `p` can flow to the pre-update node associated with post-update * node `n`, in the same callable, using only value-preserving steps. @@ -966,22 +1172,6 @@ module MakeImplCommon { reverseStepThroughInputOutputAlias(node1, node2) } - /** - * Holds if the call context `call` improves virtual dispatch in `callable`. - */ - cached - predicate recordDataFlowCallSiteDispatch(DataFlowCall call, DataFlowCallable callable) { - reducedViableImplInCallContext(_, callable, call) - } - - /** - * Holds if the call context `call` allows us to prune unreachable nodes in `callable`. - */ - cached - predicate recordDataFlowCallSiteUnreachable(DataFlowCall call, DataFlowCallable callable) { - exists(Node n | getNodeEnclosingCallable(n) = callable | isUnreachableInCallCached(n, call)) - } - cached predicate allowParameterReturnInSelfCached(ParamNode p) { allowParameterReturnInSelf(p) } @@ -994,9 +1184,13 @@ module MakeImplCommon { cached newtype TCallContext = TAnyCallContext() or - TSpecificCall(DataFlowCall call) { recordDataFlowCallSite(call, _) } or + TSpecificCall(DataFlowCall call) { + CachedCallContextSensitivity::recordDataFlowCallSite(call, _) + } or TSomeCall() or - TReturn(DataFlowCallable c, DataFlowCall call) { reducedViableImplInReturn(c, call) } + TReturn(DataFlowCallable c, DataFlowCall call) { + CachedCallContextSensitivity::reducedViableImplInReturn(c, call) + } cached newtype TReturnPosition = @@ -1448,15 +1642,6 @@ module MakeImplCommon { } } - /** - * Holds if the call context `call` either improves virtual dispatch in - * `callable` or if it allows us to prune unreachable nodes in `callable`. - */ - predicate recordDataFlowCallSite(DataFlowCall call, DataFlowCallable callable) { - recordDataFlowCallSiteDispatch(call, callable) or - recordDataFlowCallSiteUnreachable(call, callable) - } - /** * A `Node` at which a cast can occur such that the type should be checked. */ @@ -1542,7 +1727,7 @@ module MakeImplCommon { } override predicate relevantFor(DataFlowCallable callable) { - recordDataFlowCallSite(this.getCall(), callable) + CachedCallContextSensitivity::recordDataFlowCallSite(this.getCall(), callable) } override predicate matchesCall(DataFlowCall call) { call = this.getCall() } @@ -1773,58 +1958,6 @@ module MakeImplCommon { result = getReturnPosition0(ret, ret.getKind()) } - /** Holds if `call` does not have a reduced set of dispatch targets in call context `ctx`. */ - bindingset[call, ctx] - predicate noPrunedViableImplInCallContext(DataFlowCall call, CallContext ctx) { - exists(DataFlowCall outer | ctx = TSpecificCall(outer) | - not reducedViableImplInCallContext(call, _, outer) - ) - or - ctx instanceof CallContextSomeCall - or - ctx instanceof CallContextAny - or - ctx instanceof CallContextReturn - } - - /** - * Resolves a return from `callable` in `cc` to `call`. - */ - bindingset[cc, callable] - predicate resolveReturn(CallContext cc, DataFlowCallable callable, DataFlowCall call) { - cc instanceof CallContextAny and callable = viableCallableExt(call) - or - call = prunedViableImplInCallContextReverse(callable, cc) - } - - signature predicate relevantResolveTargetSig(DataFlowCallable c); - - module ResolveCall { - pragma[nomagic] - private DataFlowCallable prunedRelevantViableImplInCallContext(DataFlowCall call, CallContext cc) { - result = prunedViableImplInCallContext(call, cc) and - relevantResolveTarget(result) - } - - pragma[nomagic] - private DataFlowCallable viableRelevantCallableExt(DataFlowCall call) { - result = viableCallableExt(call) and - relevantResolveTarget(result) - } - - /** - * Resolves a call from `call` in `cc` to `result`, where `result` is - * restricted by `relevantResolveTarget`. - */ - bindingset[call, cc] - DataFlowCallable resolveCall(DataFlowCall call, CallContext cc) { - result = prunedRelevantViableImplInCallContext(call, cc) - or - noPrunedViableImplInCallContext(call, cc) and - result = viableRelevantCallableExt(call) - } - } - /** An optional Boolean value. */ class BooleanOption extends TBooleanOption { string toString() { diff --git a/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll b/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll index 25a276d41a7..f3e840720ab 100644 --- a/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll @@ -1081,8 +1081,8 @@ module Make Input> { SummaryComponentStack outputContents | summary(c, inputContents, outputContents, preservesValue) and - pred = summaryNodeInputState(c, inputContents) and - succ = summaryNodeOutputState(c, outputContents) + pred = summaryNodeInputState(pragma[only_bind_into](c), inputContents) and + succ = summaryNodeOutputState(pragma[only_bind_into](c), outputContents) | preservesValue = true or diff --git a/shared/mad/codeql/mad/ModelValidation.qll b/shared/mad/codeql/mad/ModelValidation.qll index 20ef0015d78..2f990af4e0f 100644 --- a/shared/mad/codeql/mad/ModelValidation.qll +++ b/shared/mad/codeql/mad/ModelValidation.qll @@ -116,9 +116,9 @@ module KindValidation { this = [ // shared - "local", "remote", "file", + "local", "remote", "file", "commandargs", "database", "environment", // Java - "android-external-storage-dir", "contentprovider", "database", "environment", + "android-external-storage-dir", "contentprovider", // C# "file-write", // JavaScript diff --git a/shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll b/shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll index a8a722f7b5d..e178c44cafb 100644 --- a/shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll +++ b/shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll @@ -160,17 +160,62 @@ signature module Semantic { /** Gets a tiebreaker id in case `getBlockId1` is not unique. */ default string getBlockId2(BasicBlock bb) { result = "" } + /** + * A guard in the range analysis. + */ class Guard { + /** + * Gets a string representation of the guard. + */ string toString(); + /** + * Gets the basic block associated with the guard. + */ BasicBlock getBasicBlock(); + /** + * Gets the guard as an expression, if any. + */ Expr asExpr(); + /** + * Holds if the guard directly controls a given basic block. For example in + * the following code, the guard `(x > y)` directly controls the block + * beneath it: + * ``` + * if (x > y) + * { + * Console.WriteLine("x is greater than y"); + * } + * ``` + * `branch` indicates whether the basic block is entered when the guard + * evaluates to `true` or when it evaluates to `false`. + */ predicate directlyControls(BasicBlock controlled, boolean branch); + /** + * Holds if this guard is an equality test between `e1` and `e2`. If the + * test is negated, that is `!=`, then `polarity` is false, otherwise + * `polarity` is true. + */ predicate isEquality(Expr e1, Expr e2, boolean polarity); + /** + * Holds if there is a branch edge between two basic blocks. For example + * in the following C code, there are two branch edges from the basic block + * containing the condition `(x > y)` to the beginnings of the true and + * false blocks that follow: + * ``` + * if (x > y) { + * printf("x is greater than y\n"); + * } else { + * printf("x is not greater than y\n"); + * } + * ``` + * `branch` indicates whether the second basic block is the one entered + * when the guard evaluates to `true` or when it evaluates to `false`. + */ predicate hasBranchEdge(BasicBlock bb1, BasicBlock bb2, boolean branch); } @@ -194,18 +239,50 @@ signature module Semantic { /** Gets the type of an expression. */ Type getExprType(Expr e); + /** + * A static single-assignment (SSA) variable. + */ class SsaVariable { + /** + * Gets an expression reading the value of this SSA variable. + */ Expr getAUse(); + /** + * Gets the basic block where this SSA variable is defined. + */ BasicBlock getBasicBlock(); } + /** + * A phi node in the SSA form. A phi node is a kind of node in the SSA form + * that represents a merge point where multiple control flow paths converge + * and the value of a variable needs to be selected according to which + * control flow path was taken. For example, in the following Ruby code: + * ```rb + * if b + * x = 0 + * else + * x = 1 + * end + * puts x + * ``` + * A phi node for `x` is inserted just before the call `puts x`, since the + * value of `x` may come from either `x = 0` or `x = 1`. + */ class SsaPhiNode extends SsaVariable { /** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */ predicate hasInputFromBlock(SsaVariable inp, BasicBlock bb); } + /** + * An SSA variable representing the value of an explicit update of the source variable. + */ class SsaExplicitUpdate extends SsaVariable { + /** + * Gets the expression that defines the value of the variable in this + * update. + */ Expr getDefiningExpr(); } @@ -296,11 +373,32 @@ signature module LangSig { } signature module BoundSig { + /** + * A bound that the range analysis can infer for a variable. This includes + * constant bounds represented by the abstract value zero, SSA bounds for when + * a variable is bounded by the value of a different variable, and possibly + * other abstract values that may be useful variable bounds. Since all bounds + * are combined with an integer delta there's no need to represent constant + * bounds other than zero. + */ class SemBound { + /** + * Gets a string representation of this bound. + */ string toString(); + /** + * Gets the location of this bound. + */ Location getLocation(); + /** + * Gets an expression that equals this bound plus `delta`. + * + * For the zero-bound this gets integer constants equal to `delta`, for any + * value `delta`. For other bounds this gets expressions equal to the bound + * and `delta = 0`. + */ Sem::Expr getExpr(D::Delta delta); } diff --git a/shared/tree-sitter-extractor/src/autobuilder.rs b/shared/tree-sitter-extractor/src/autobuilder.rs index 97ea5a9b32c..10f66286ab8 100644 --- a/shared/tree-sitter-extractor/src/autobuilder.rs +++ b/shared/tree-sitter-extractor/src/autobuilder.rs @@ -74,14 +74,35 @@ impl Autobuilder { cmd.arg("--working-dir=."); cmd.arg(&self.database); - for line in env::var("LGTM_INDEX_FILTERS") - .unwrap_or_default() - .split('\n') - { + // LGTM_INDEX_FILTERS is a prioritized list of include/exclude filters, where + // later filters take priority over earlier ones. + // 1) If we only see includes, we should ignore everything else, which is + // achieved by using `--also-match={filter}`. + // 2) if we see both includes and excludes, we process them in order by using + // `--also-match={filter}` for includes and `--also-match=!{filter}` for + // excludes. + // 3) If we only see excludes, we should accept everything else. Naive solution + // of just using `--also-match=!{filter}` is not good enough, since nothing + // will make the `--also-match`` pass for any file. In that case, we add a dummy + // initial `--also-match=**/*``to get the desired behavior. + let tmp = env::var("LGTM_INDEX_FILTERS").unwrap_or_default(); + let lgtm_index_filters = tmp.split('\n'); + let lgtm_index_filters_has_include = lgtm_index_filters + .clone() + .any(|s| s.starts_with("include:")); + let lgtm_index_filters_has_exclude = lgtm_index_filters + .clone() + .any(|s| s.starts_with("exclude:")); + + if !lgtm_index_filters_has_include && lgtm_index_filters_has_exclude { + cmd.arg("--also-match=**/*"); + } + + for line in lgtm_index_filters { if let Some(stripped) = line.strip_prefix("include:") { cmd.arg("--also-match=".to_owned() + stripped); } else if let Some(stripped) = line.strip_prefix("exclude:") { - cmd.arg("--exclude=".to_owned() + stripped); + cmd.arg("--also-match=!".to_owned() + stripped); } } let exit = &cmd.spawn()?.wait()?; diff --git a/swift/BUILD.bazel b/swift/BUILD.bazel index 93d4fd9a7e4..2c7c1256782 100644 --- a/swift/BUILD.bazel +++ b/swift/BUILD.bazel @@ -115,6 +115,7 @@ py_binary( deps = [":_create_extractor_pack"], ) +# TODO this is unneeded here but still used in the internal repo. Remove once it's not generate_cmake( name = "cmake", targets = [ diff --git a/swift/CMakeLists.txt b/swift/CMakeLists.txt index 2b44cc58993..46bcd32db32 100644 --- a/swift/CMakeLists.txt +++ b/swift/CMakeLists.txt @@ -17,4 +17,4 @@ project(codeql) include(../misc/bazel/cmake/setup.cmake) -include_generated(//swift:cmake) +generate_and_include(//swift/...) diff --git a/swift/extractor/BUILD.bazel b/swift/extractor/BUILD.bazel index 984c205d97b..f711b3b9d2b 100644 --- a/swift/extractor/BUILD.bazel +++ b/swift/extractor/BUILD.bazel @@ -1,5 +1,4 @@ load("//swift:rules.bzl", "swift_cc_binary") -load("//misc/bazel/cmake:cmake.bzl", "generate_cmake") load("//misc/bazel:pkg_runfiles.bzl", "pkg_runfiles") swift_cc_binary( diff --git a/swift/logging/tests/assertion-diagnostics/BUILD.bazel b/swift/logging/tests/assertion-diagnostics/BUILD.bazel index e51459e1e17..ea31eac779a 100644 --- a/swift/logging/tests/assertion-diagnostics/BUILD.bazel +++ b/swift/logging/tests/assertion-diagnostics/BUILD.bazel @@ -1,5 +1,4 @@ load("//swift:rules.bzl", "swift_cc_binary") -load("//misc/bazel/cmake:cmake.bzl", "generate_cmake") swift_cc_binary( name = "assert-false", diff --git a/swift/ql/lib/change-notes/2024-02-22-extension-patch.md b/swift/ql/lib/change-notes/2024-02-22-extension-patch.md new file mode 100644 index 00000000000..7bd78f3b785 --- /dev/null +++ b/swift/ql/lib/change-notes/2024-02-22-extension-patch.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* Fixed an issue where `TypeDecl.getFullName` would get stuck in an loop and fail when minor database inconsistencies are present. diff --git a/swift/ql/lib/codeql/swift/controlflow/internal/PrintCFG.ql b/swift/ql/lib/codeql/swift/controlflow/internal/PrintCFG.ql index fa25c039263..2f9a0572111 100644 --- a/swift/ql/lib/codeql/swift/controlflow/internal/PrintCFG.ql +++ b/swift/ql/lib/codeql/swift/controlflow/internal/PrintCFG.ql @@ -7,52 +7,45 @@ * @tags ide-contextual-queries/print-cfg */ -private import codeql.IDEContextual +private import codeql.swift.elements.File private import codeql.swift.controlflow.ControlFlowGraph -private import codeql.swift.controlflow.internal.ControlFlowGraphImpl::TestOutput +private import codeql.swift.controlflow.internal.ControlFlowGraphImpl as Impl +private import codeql.swift.controlflow.internal.ControlFlowGraphImplSpecific /** * Gets the source file to generate a CFG from. */ external string selectedSourceFile(); +private predicate selectedSourceFileAlias = selectedSourceFile/0; + /** * Gets the source line to generate a CFG from. */ -external string selectedSourceLine(); +external int selectedSourceLine(); + +private predicate selectedSourceLineAlias = selectedSourceLine/0; /** * Gets the source column to generate a CFG from. */ -external string selectedSourceColumn(); +external int selectedSourceColumn(); -bindingset[file, line, column] -private CfgScope smallestEnclosingScope(File file, int line, int column) { - result = - min(Location loc, CfgScope scope | - loc = scope.getLocation() and - ( - loc.getStartLine() < line - or - loc.getStartLine() = line and loc.getStartColumn() <= column - ) and - ( - loc.getEndLine() > line - or - loc.getEndLine() = line and loc.getEndColumn() >= column - ) and - loc.getFile() = file - | - scope - order by - loc.getStartLine() desc, loc.getStartColumn() desc, loc.getEndLine(), loc.getEndColumn() - ) -} +private predicate selectedSourceColumnAlias = selectedSourceColumn/0; -class MyRelevantNode extends RelevantNode { - MyRelevantNode() { - this.getScope() = - smallestEnclosingScope(getFileBySourceArchiveName(selectedSourceFile()), - selectedSourceLine().toInt(), selectedSourceColumn().toInt()) +module ViewCfgQueryInput implements Impl::ViewCfgQueryInputSig { + predicate selectedSourceFile = selectedSourceFileAlias/0; + + predicate selectedSourceLine = selectedSourceLineAlias/0; + + predicate selectedSourceColumn = selectedSourceColumnAlias/0; + + predicate cfgScopeSpan( + CfgInput::CfgScope scope, File file, int startLine, int startColumn, int endLine, int endColumn + ) { + file = scope.getFile() and + scope.getLocation().hasLocationInfo(_, startLine, startColumn, endLine, endColumn) } } + +import Impl::ViewCfgQuery diff --git a/swift/ql/lib/codeql/swift/elements/File.qll b/swift/ql/lib/codeql/swift/elements/File.qll index 4645c6a1094..823430ee7ee 100644 --- a/swift/ql/lib/codeql/swift/elements/File.qll +++ b/swift/ql/lib/codeql/swift/elements/File.qll @@ -15,11 +15,64 @@ class File extends Generated::File { /** Gets the URL of this file. */ string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" } - /** Gets the base name of this file. */ - string getBaseName() { - result = this.getAbsolutePath().regexpCapture(".*/(([^/]*?)(?:\\.([^.]*))?)", 1) + /** + * Holds if either, + * - `part` is the base name of this container and `i = 1`, or + * - `part` is the stem of this container and `i = 2`, or + * - `part` is the extension of this container and `i = 3`. + */ + cached + private predicate splitAbsolutePath(string part, int i) { + part = this.getAbsolutePath().regexpCapture(".*/(([^/]*?)(?:\\.([^.]*))?)", i) } + /** Gets the base name of this file. */ + string getBaseName() { this.splitAbsolutePath(result, 1) } + + /** + * Gets the extension of this container, that is, the suffix of its base name + * after the last dot character, if any. + * + * In particular, + * + * - if the name does not include a dot, there is no extension, so this + * predicate has no result; + * - if the name ends in a dot, the extension is the empty string; + * - if the name contains multiple dots, the extension follows the last dot. + * + * Here are some examples of absolute paths and the corresponding extensions + * (surrounded with quotes to avoid ambiguity): + * + * + * + * + * + * + * + * + *
    Absolute pathExtension
    "/tmp/tst.txt""txt"
    "/tmp/.classpath""classpath"
    "/bin/bash"not defined
    "/tmp/tst2."""
    "/tmp/x.tar.gz""gz"
    + */ + string getExtension() { this.splitAbsolutePath(result, 3) } + + /** + * Gets the stem of this container, that is, the prefix of its base name up to + * (but not including) the last dot character if there is one, or the entire + * base name if there is not. + * + * Here are some examples of absolute paths and the corresponding stems + * (surrounded with quotes to avoid ambiguity): + * + * + * + * + * + * + * + * + *
    Absolute pathStem
    "/tmp/tst.txt""tst"
    "/tmp/.classpath"""
    "/bin/bash""bash"
    "/tmp/tst2.""tst2"
    "/tmp/x.tar.gz""x.tar"
    + */ + string getStem() { this.splitAbsolutePath(result, 2) } + /** * Gets the number of lines containing code in this file. This value * is approximate. diff --git a/swift/ql/lib/codeql/swift/elements/decl/ExtensionDecl.qll b/swift/ql/lib/codeql/swift/elements/decl/ExtensionDecl.qll index 5e59669adcb..625229fcb13 100644 --- a/swift/ql/lib/codeql/swift/elements/decl/ExtensionDecl.qll +++ b/swift/ql/lib/codeql/swift/elements/decl/ExtensionDecl.qll @@ -2,9 +2,10 @@ private import codeql.swift.generated.decl.ExtensionDecl class ExtensionDecl extends Generated::ExtensionDecl { override string toString() { - result = "extension of " + this.getExtendedTypeDecl().toString() + result = + "extension of " + unique(NominalTypeDecl td | td = this.getExtendedTypeDecl()).toString() or - not exists(this.getExtendedTypeDecl()) and + count(this.getExtendedTypeDecl()) != 1 and result = "extension" } } diff --git a/swift/ql/lib/codeql/swift/elements/decl/TypeDecl.qll b/swift/ql/lib/codeql/swift/elements/decl/TypeDecl.qll index e75e2ff9b40..9055f29d6ca 100644 --- a/swift/ql/lib/codeql/swift/elements/decl/TypeDecl.qll +++ b/swift/ql/lib/codeql/swift/elements/decl/TypeDecl.qll @@ -109,13 +109,13 @@ class TypeDecl extends Generated::TypeDecl { cached string getFullName() { not this.getEnclosingDecl() instanceof TypeDecl and - not this.getEnclosingDecl() instanceof ExtensionDecl and + not count(this.getEnclosingDecl().(ExtensionDecl).getExtendedTypeDecl()) = 1 and result = this.getName() or result = this.getEnclosingDecl().(TypeDecl).getFullName() + "." + this.getName() or result = - this.getEnclosingDecl().(ExtensionDecl).getExtendedTypeDecl().getFullName() + "." + - this.getName() + unique(NominalTypeDecl td | td = this.getEnclosingDecl().(ExtensionDecl).getExtendedTypeDecl()) + .getFullName() + "." + this.getName() } } diff --git a/swift/ql/test/library-tests/controlflow/graph/Cfg.ql b/swift/ql/test/library-tests/controlflow/graph/Cfg.ql index 093638e5f87..661ab48818a 100644 --- a/swift/ql/test/library-tests/controlflow/graph/Cfg.ql +++ b/swift/ql/test/library-tests/controlflow/graph/Cfg.ql @@ -4,16 +4,17 @@ import swift import codeql.swift.controlflow.ControlFlowGraph -import codeql.swift.controlflow.internal.ControlFlowGraphImpl::TestOutput -class MyRelevantNode extends RelevantNode { +class MyRelevantNode extends ControlFlowNode { MyRelevantNode() { this.getScope().getLocation().getFile().getName().matches("%swift/ql/test%") } private AstNode asAstNode() { result = this.getAstNode().asAstNode() } - override string getOrderDisambiguation() { + string getOrderDisambiguation() { result = this.asAstNode().getPrimaryQlClasses() or not exists(this.asAstNode()) and result = "" } } + +import codeql.swift.controlflow.internal.ControlFlowGraphImpl::TestOutput diff --git a/swift/ql/test/query-tests/Security/CWE-311/CleartextStorageDatabase.expected b/swift/ql/test/query-tests/Security/CWE-311/CleartextStorageDatabase.expected index d3d3e9ec03e..0542196fe2f 100644 --- a/swift/ql/test/query-tests/Security/CWE-311/CleartextStorageDatabase.expected +++ b/swift/ql/test/query-tests/Security/CWE-311/CleartextStorageDatabase.expected @@ -164,7 +164,6 @@ edges | testCoreData2.swift:98:18:98:18 | d [value] | testCoreData2.swift:98:18:98:20 | .value | provenance | | | testCoreData2.swift:98:18:98:20 | .value | testCoreData2.swift:98:2:98:2 | [post] dbObj [myValue] | provenance | | | testCoreData2.swift:101:10:101:10 | bankAccountNo | testCoreData2.swift:103:13:103:13 | e | provenance | | -| testCoreData2.swift:103:13:103:13 | e | testCoreData2.swift:70:9:70:9 | self | provenance | | | testCoreData2.swift:103:13:103:13 | e | testCoreData2.swift:104:18:104:18 | e | provenance | | | testCoreData2.swift:104:2:104:2 | [post] dbObj [myValue] | testCoreData2.swift:104:2:104:2 | [post] dbObj | provenance | | | testCoreData2.swift:104:18:104:18 | e | testCoreData2.swift:70:9:70:9 | self | provenance | |